00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ARROWBUTTON_HH
00025 #define ARROWBUTTON_HH
00026
00027 #include "Button.hh"
00028
00030 class ArrowButton: public FbTk::Button {
00031 public:
00032 enum Type { LEFT, RIGHT, UP, DOWN};
00033
00034 ArrowButton(Type arrow_type, const FbTk::FbWindow &parent,
00035 int x, int y,
00036 unsigned int width, unsigned int height);
00037 ArrowButton(Type arrow_type, int screen_num,
00038 int x, int y,
00039 unsigned int width, unsigned int height);
00040 void clear();
00041 void buttonReleaseEvent(XButtonEvent &event);
00042 void buttonPressEvent(XButtonEvent &event);
00043 void exposeEvent(XExposeEvent &event);
00044 void enterNotifyEvent(XCrossingEvent &ce);
00045 void leaveNotifyEvent(XCrossingEvent &ce);
00046
00047 void setMouseMotionHandler(FbTk::EventHandler *eh) { m_mouse_handler = eh; }
00048 private:
00049 void drawArrow();
00050 Type m_arrow_type;
00051 FbTk::EventHandler *m_mouse_handler;
00052 };
00053
00054 #endif // ARROWBUTTON_HH