all repos — fluxbox @ fa1d775e099f752328b0dfd5da824986abdec85b

custom fork of the fluxbox windowmanager

using FbTk EventHandler and FbTk FbWindow
fluxgen fluxgen
commit

fa1d775e099f752328b0dfd5da824986abdec85b

parent

eb9bb882ed9fb21c8048a71e41a7a2cedec3f9c3

1 files changed, 14 insertions(+), 11 deletions(-)

jump to
M src/Basemenu.hhsrc/Basemenu.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Basemenu.hh,v 1.20 2002/12/01 13:41:54 rathnor Exp $ +// $Id: Basemenu.hh,v 1.21 2002/12/03 23:21:42 fluxgen Exp $ #ifndef BASEMENU_HH #define BASEMENU_HH

@@ -30,16 +30,19 @@

#include <X11/Xlib.h> #include <vector> #include <string> + +#include "FbWindow.hh" +#include "EventHandler.hh" class Basemenu; class BasemenuItem; -class Fluxbox; class BImageControl; class BScreen; + /** Base class for menus */ -class Basemenu { +class Basemenu: public FbTk::EventHandler { public: enum Alignment{ ALIGNDONTCARE = 1, ALIGNTOP, ALIGNBOTTOM }; enum { RIGHT = 1, LEFT };

@@ -69,12 +72,12 @@ /**

@name event handlers */ //@{ - void buttonPressEvent(XButtonEvent *bp); - void buttonReleaseEvent(XButtonEvent *br); - void motionNotifyEvent(XMotionEvent *mn); - void enterNotifyEvent(XCrossingEvent *en); - void leaveNotifyEvent(XCrossingEvent *ce); - void exposeEvent(XExposeEvent *ee); + void buttonPressEvent(XButtonEvent &bp); + void buttonReleaseEvent(XButtonEvent &br); + void motionNotifyEvent(XMotionEvent &mn); + void enterNotifyEvent(XCrossingEvent &en); + void leaveNotifyEvent(XCrossingEvent &ce); + void exposeEvent(XExposeEvent &ee); //@} void reconfigure();

@@ -98,7 +101,7 @@ bool isTorn() const { return torn; }

bool isVisible() const { return visible; } const BScreen *screen() const { return m_screen; } BScreen *screen() { return m_screen; } - Window windowID() const { return menu.window; } + Window windowID() const { return menu.window.window(); } const std::string &label() const { return menu.label; } int x() const { return menu.x; } int y() const { return menu.y; }

@@ -145,7 +148,7 @@ Alignment m_alignment;

struct _menu { Pixmap frame_pixmap, title_pixmap, hilite_pixmap, sel_pixmap; - Window window, frame, title; + FbTk::FbWindow window, frame, title; std::string label; int x, y, x_move, y_move, x_shift, y_shift, sublevels, persub, minsub,