diff options
author | fluxgen <fluxgen> | 2002-12-03 23:21:42 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-12-03 23:21:42 (GMT) |
commit | fa1d775e099f752328b0dfd5da824986abdec85b (patch) | |
tree | 4042278b0e75bfc116dc666e2ece5c7b1a7ca6f1 /src | |
parent | eb9bb882ed9fb21c8048a71e41a7a2cedec3f9c3 (diff) | |
download | fluxbox_lack-fa1d775e099f752328b0dfd5da824986abdec85b.zip fluxbox_lack-fa1d775e099f752328b0dfd5da824986abdec85b.tar.bz2 |
using FbTk EventHandler and FbTk FbWindow
Diffstat (limited to 'src')
-rw-r--r-- | src/Basemenu.hh | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/Basemenu.hh b/src/Basemenu.hh index e14dd01..d094185 100644 --- a/src/Basemenu.hh +++ b/src/Basemenu.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: Basemenu.hh,v 1.20 2002/12/01 13:41:54 rathnor Exp $ | 25 | // $Id: Basemenu.hh,v 1.21 2002/12/03 23:21:42 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef BASEMENU_HH | 27 | #ifndef BASEMENU_HH |
28 | #define BASEMENU_HH | 28 | #define BASEMENU_HH |
@@ -31,15 +31,18 @@ | |||
31 | #include <vector> | 31 | #include <vector> |
32 | #include <string> | 32 | #include <string> |
33 | 33 | ||
34 | #include "FbWindow.hh" | ||
35 | #include "EventHandler.hh" | ||
36 | |||
34 | class Basemenu; | 37 | class Basemenu; |
35 | class BasemenuItem; | 38 | class BasemenuItem; |
36 | class Fluxbox; | ||
37 | class BImageControl; | 39 | class BImageControl; |
38 | class BScreen; | 40 | class BScreen; |
41 | |||
39 | /** | 42 | /** |
40 | Base class for menus | 43 | Base class for menus |
41 | */ | 44 | */ |
42 | class Basemenu { | 45 | class Basemenu: public FbTk::EventHandler { |
43 | public: | 46 | public: |
44 | enum Alignment{ ALIGNDONTCARE = 1, ALIGNTOP, ALIGNBOTTOM }; | 47 | enum Alignment{ ALIGNDONTCARE = 1, ALIGNTOP, ALIGNBOTTOM }; |
45 | enum { RIGHT = 1, LEFT }; | 48 | enum { RIGHT = 1, LEFT }; |
@@ -69,12 +72,12 @@ public: | |||
69 | @name event handlers | 72 | @name event handlers |
70 | */ | 73 | */ |
71 | //@{ | 74 | //@{ |
72 | void buttonPressEvent(XButtonEvent *bp); | 75 | void buttonPressEvent(XButtonEvent &bp); |
73 | void buttonReleaseEvent(XButtonEvent *br); | 76 | void buttonReleaseEvent(XButtonEvent &br); |
74 | void motionNotifyEvent(XMotionEvent *mn); | 77 | void motionNotifyEvent(XMotionEvent &mn); |
75 | void enterNotifyEvent(XCrossingEvent *en); | 78 | void enterNotifyEvent(XCrossingEvent &en); |
76 | void leaveNotifyEvent(XCrossingEvent *ce); | 79 | void leaveNotifyEvent(XCrossingEvent &ce); |
77 | void exposeEvent(XExposeEvent *ee); | 80 | void exposeEvent(XExposeEvent &ee); |
78 | //@} | 81 | //@} |
79 | 82 | ||
80 | void reconfigure(); | 83 | void reconfigure(); |
@@ -98,7 +101,7 @@ public: | |||
98 | bool isVisible() const { return visible; } | 101 | bool isVisible() const { return visible; } |
99 | const BScreen *screen() const { return m_screen; } | 102 | const BScreen *screen() const { return m_screen; } |
100 | BScreen *screen() { return m_screen; } | 103 | BScreen *screen() { return m_screen; } |
101 | Window windowID() const { return menu.window; } | 104 | Window windowID() const { return menu.window.window(); } |
102 | const std::string &label() const { return menu.label; } | 105 | const std::string &label() const { return menu.label; } |
103 | int x() const { return menu.x; } | 106 | int x() const { return menu.x; } |
104 | int y() const { return menu.y; } | 107 | int y() const { return menu.y; } |
@@ -145,7 +148,7 @@ private: | |||
145 | 148 | ||
146 | struct _menu { | 149 | struct _menu { |
147 | Pixmap frame_pixmap, title_pixmap, hilite_pixmap, sel_pixmap; | 150 | Pixmap frame_pixmap, title_pixmap, hilite_pixmap, sel_pixmap; |
148 | Window window, frame, title; | 151 | FbTk::FbWindow window, frame, title; |
149 | 152 | ||
150 | std::string label; | 153 | std::string label; |
151 | int x, y, x_move, y_move, x_shift, y_shift, sublevels, persub, minsub, | 154 | int x, y, x_move, y_move, x_shift, y_shift, sublevels, persub, minsub, |