diff options
Diffstat (limited to 'src/FbTk/Button.cc')
-rw-r--r-- | src/FbTk/Button.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/FbTk/Button.cc b/src/FbTk/Button.cc index 03b5283..6d2fd21 100644 --- a/src/FbTk/Button.cc +++ b/src/FbTk/Button.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: Button.cc,v 1.8 2003/06/05 12:42:31 fluxgen Exp $ | 22 | // $Id: Button.cc,v 1.9 2003/08/04 12:46:49 fluxgen Exp $ |
23 | 23 | ||
24 | #include "Button.hh" | 24 | #include "Button.hh" |
25 | 25 | ||
@@ -69,15 +69,15 @@ void Button::setOnClick(RefCount<Command> &cmd, int button) { | |||
69 | } | 69 | } |
70 | 70 | ||
71 | void Button::move(int x, int y) { | 71 | void Button::move(int x, int y) { |
72 | m_win.move(x, y); | 72 | window().move(x, y); |
73 | } | 73 | } |
74 | 74 | ||
75 | void Button::resize(unsigned int w, unsigned int h) { | 75 | void Button::resize(unsigned int w, unsigned int h) { |
76 | m_win.resize(w, h); | 76 | window().resize(w, h); |
77 | } | 77 | } |
78 | 78 | ||
79 | void Button::moveResize(int x, int y, unsigned int width, unsigned int height) { | 79 | void Button::moveResize(int x, int y, unsigned int width, unsigned int height) { |
80 | m_win.moveResize(x, y, width, height); | 80 | window().moveResize(x, y, width, height); |
81 | } | 81 | } |
82 | 82 | ||
83 | void Button::setPixmap(Pixmap pm) { | 83 | void Button::setPixmap(Pixmap pm) { |
@@ -92,12 +92,14 @@ void Button::setBackgroundColor(const Color &color) { | |||
92 | m_win.setBackgroundColor(color); | 92 | m_win.setBackgroundColor(color); |
93 | m_background_color = color; | 93 | m_background_color = color; |
94 | clear(); | 94 | clear(); |
95 | window().updateTransparent(); | ||
95 | } | 96 | } |
96 | 97 | ||
97 | void Button::setBackgroundPixmap(Pixmap pm) { | 98 | void Button::setBackgroundPixmap(Pixmap pm) { |
98 | m_win.setBackgroundPixmap(pm); | 99 | m_win.setBackgroundPixmap(pm); |
99 | m_background_pm = pm; | 100 | m_background_pm = pm; |
100 | clear(); | 101 | clear(); |
102 | window().updateTransparent(); | ||
101 | } | 103 | } |
102 | 104 | ||
103 | void Button::show() { | 105 | void Button::show() { |
@@ -113,7 +115,7 @@ void Button::buttonPressEvent(XButtonEvent &event) { | |||
113 | m_win.setBackgroundPixmap(m_pressed_pm); | 115 | m_win.setBackgroundPixmap(m_pressed_pm); |
114 | m_pressed = true; | 116 | m_pressed = true; |
115 | clear(); | 117 | clear(); |
116 | 118 | window().updateTransparent(); | |
117 | } | 119 | } |
118 | 120 | ||
119 | void Button::buttonReleaseEvent(XButtonEvent &event) { | 121 | void Button::buttonReleaseEvent(XButtonEvent &event) { |
@@ -140,11 +142,13 @@ void Button::buttonReleaseEvent(XButtonEvent &event) { | |||
140 | if (event.button > 0 && event.button <= 5 && | 142 | if (event.button > 0 && event.button <= 5 && |
141 | m_onclick[event.button -1].get() != 0) | 143 | m_onclick[event.button -1].get() != 0) |
142 | m_onclick[event.button - 1]->execute(); | 144 | m_onclick[event.button - 1]->execute(); |
143 | 145 | ||
146 | window().updateTransparent(); | ||
144 | } | 147 | } |
145 | 148 | ||
146 | void Button::exposeEvent(XExposeEvent &event) { | 149 | void Button::exposeEvent(XExposeEvent &event) { |
147 | m_win.clear(); | 150 | clear(); |
151 | window().updateTransparent(event.x, event.y, event.width, event.height); | ||
148 | } | 152 | } |
149 | 153 | ||
150 | }; // end namespace FbTk | 154 | }; // end namespace FbTk |