diff options
Diffstat (limited to 'src/FbTk/Button.cc')
-rw-r--r-- | src/FbTk/Button.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/FbTk/Button.cc b/src/FbTk/Button.cc index bcdc90e..9edbe5c 100644 --- a/src/FbTk/Button.cc +++ b/src/FbTk/Button.cc | |||
@@ -30,7 +30,8 @@ namespace FbTk { | |||
30 | Button::Button(int screen_num, int x, int y, | 30 | Button::Button(int screen_num, int x, int y, |
31 | unsigned int width, unsigned int height): | 31 | unsigned int width, unsigned int height): |
32 | FbWindow(screen_num, x, y, width, height, | 32 | FbWindow(screen_num, x, y, width, height, |
33 | ExposureMask | ButtonPressMask | ButtonReleaseMask), | 33 | ExposureMask | ButtonPressMask | EnterWindowMask | |
34 | LeaveWindowMask | ButtonReleaseMask), | ||
34 | m_background_pm(0), | 35 | m_background_pm(0), |
35 | m_pressed_pm(0), | 36 | m_pressed_pm(0), |
36 | m_pressed_color(), | 37 | m_pressed_color(), |
@@ -45,7 +46,8 @@ Button::Button(int screen_num, int x, int y, | |||
45 | Button::Button(const FbWindow &parent, int x, int y, | 46 | Button::Button(const FbWindow &parent, int x, int y, |
46 | unsigned int width, unsigned int height): | 47 | unsigned int width, unsigned int height): |
47 | FbWindow(parent, x, y, width, height, | 48 | FbWindow(parent, x, y, width, height, |
48 | ExposureMask | ButtonPressMask | ButtonReleaseMask), | 49 | ExposureMask | ButtonPressMask | ButtonReleaseMask | |
50 | EnterWindowMask | LeaveWindowMask), | ||
49 | m_background_pm(0), | 51 | m_background_pm(0), |
50 | m_pressed_pm(0), | 52 | m_pressed_pm(0), |
51 | m_pressed_color(), | 53 | m_pressed_color(), |
@@ -90,6 +92,14 @@ void Button::setBackgroundPixmap(Pixmap pm) { | |||
90 | FbTk::FbWindow::setBackgroundPixmap(pm); | 92 | FbTk::FbWindow::setBackgroundPixmap(pm); |
91 | } | 93 | } |
92 | 94 | ||
95 | |||
96 | void Button::enterNotifyEvent(XCrossingEvent &ce){ | ||
97 | |||
98 | } | ||
99 | void Button::leaveNotifyEvent(XCrossingEvent &ce){ | ||
100 | |||
101 | } | ||
102 | |||
93 | void Button::buttonPressEvent(XButtonEvent &event) { | 103 | void Button::buttonPressEvent(XButtonEvent &event) { |
94 | bool update = false; | 104 | bool update = false; |
95 | if (m_pressed_pm != 0) { | 105 | if (m_pressed_pm != 0) { |
@@ -146,4 +156,4 @@ void Button::exposeEvent(XExposeEvent &event) { | |||
146 | clearArea(event.x, event.y, event.width, event.height); | 156 | clearArea(event.x, event.y, event.width, event.height); |
147 | } | 157 | } |
148 | 158 | ||
149 | }; // end namespace FbTk | 159 | } // end namespace FbTk |