aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Menu.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-04-20 13:49:26 (GMT)
committerfluxgen <fluxgen>2003-04-20 13:49:26 (GMT)
commitf2cef835656ee02b6229e009062a587a7864c86d (patch)
tree87dc39baaac225582b33b1db62985c42592cdfe7 /src/FbTk/Menu.hh
parent671fdb606f13db76349f4abd886aff21230c8618 (diff)
downloadfluxbox-f2cef835656ee02b6229e009062a587a7864c86d.zip
fluxbox-f2cef835656ee02b6229e009062a587a7864c86d.tar.bz2
menu alpha
Diffstat (limited to 'src/FbTk/Menu.hh')
-rw-r--r--src/FbTk/Menu.hh13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh
index f808820..54cabcf 100644
--- a/src/FbTk/Menu.hh
+++ b/src/FbTk/Menu.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Menu.hh,v 1.10 2003/02/23 00:59:13 fluxgen Exp $ 25// $Id: Menu.hh,v 1.11 2003/04/20 13:47:20 fluxgen Exp $
26 26
27#ifndef FBTK_MENU_HH 27#ifndef FBTK_MENU_HH
28#define FBTK_MENU_HH 28#define FBTK_MENU_HH
@@ -43,6 +43,7 @@ namespace FbTk {
43class MenuItem; 43class MenuItem;
44class MenuTheme; 44class MenuTheme;
45class ImageControl; 45class ImageControl;
46class Transparent;
46 47
47/// Base class for menus 48/// Base class for menus
48class Menu: public FbTk::EventHandler { 49class Menu: public FbTk::EventHandler {
@@ -85,6 +86,9 @@ public:
85 86
86 void disableTitle(); 87 void disableTitle();
87 void enableTitle(); 88 void enableTitle();
89
90 static void setAlpha(unsigned char alpha) { s_alpha = alpha; }
91
88 /** 92 /**
89 @name event handlers 93 @name event handlers
90 */ 94 */
@@ -135,6 +139,7 @@ public:
135 bool hasSubmenu(unsigned int index) const; 139 bool hasSubmenu(unsigned int index) const;
136 bool isItemSelected(unsigned int index) const; 140 bool isItemSelected(unsigned int index) const;
137 bool isItemEnabled(unsigned int index) const; 141 bool isItemEnabled(unsigned int index) const;
142 static unsigned char alpha() { return s_alpha; }
138 //@} 143 //@}
139 144
140protected: 145protected:
@@ -147,7 +152,7 @@ protected:
147 152
148 virtual void itemSelected(int button, unsigned int index) { } 153 virtual void itemSelected(int button, unsigned int index) { }
149 virtual void drawItem(unsigned int index, bool highlight = false, 154 virtual void drawItem(unsigned int index, bool highlight = false,
150 bool clear= false, 155 bool clear= false, bool render_trans = true,
151 int x= -1, int y= -1, 156 int x= -1, int y= -1,
152 unsigned int width= 0, unsigned int height= 0); 157 unsigned int width= 0, unsigned int height= 0);
153 virtual void redrawTitle(); 158 virtual void redrawTitle();
@@ -156,6 +161,7 @@ protected:
156 inline const Menu *parent() const { return m_parent; } 161 inline const Menu *parent() const { return m_parent; }
157 162
158private: 163private:
164
159 typedef std::vector<MenuItem *> Menuitems; 165 typedef std::vector<MenuItem *> Menuitems;
160 const MenuTheme &m_theme; 166 const MenuTheme &m_theme;
161 Display *m_display; 167 Display *m_display;
@@ -193,6 +199,9 @@ private:
193 }; 199 };
194 200
195 ThemeObserver m_themeobserver; 201 ThemeObserver m_themeobserver;
202 std::auto_ptr<Transparent> m_trans;
203 Drawable m_root_pm;
204 static unsigned char s_alpha;
196}; 205};
197 206
198}; // end namespace FbTk 207}; // end namespace FbTk