aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/TextButton.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-10 21:36:37 (GMT)
committerfluxgen <fluxgen>2003-09-10 21:36:37 (GMT)
commit8c9818a84bb6d0da24e1f91bc227ebea655bfdb1 (patch)
tree054fecb1cbe37ee723ea464e20936a1b318cb007 /src/FbTk/TextButton.hh
parent69583dc2666906234707aef041629c7724f84371 (diff)
downloadfluxbox-8c9818a84bb6d0da24e1f91bc227ebea655bfdb1.zip
fluxbox-8c9818a84bb6d0da24e1f91bc227ebea655bfdb1.tar.bz2
reduced flicker with buffer
Diffstat (limited to 'src/FbTk/TextButton.hh')
-rw-r--r--src/FbTk/TextButton.hh15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/FbTk/TextButton.hh b/src/FbTk/TextButton.hh
index fa1149d..5d87804 100644
--- a/src/FbTk/TextButton.hh
+++ b/src/FbTk/TextButton.hh
@@ -19,13 +19,14 @@
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: TextButton.hh,v 1.1 2003/08/18 12:15:38 fluxgen Exp $ 22// $Id: TextButton.hh,v 1.2 2003/09/10 21:36:37 fluxgen Exp $
23 23
24#ifndef FBTK_TEXTBUTTON_HH 24#ifndef FBTK_TEXTBUTTON_HH
25#define FBTK_TEXTBUTTON_HH 25#define FBTK_TEXTBUTTON_HH
26 26
27#include "Button.hh" 27#include "Button.hh"
28#include "Text.hh" 28#include "Text.hh"
29#include "FbPixmap.hh"
29 30
30#include <string> 31#include <string>
31 32
@@ -43,8 +44,17 @@ public:
43 void setText(const std::string &text); 44 void setText(const std::string &text);
44 void setFont(const FbTk::Font &font); 45 void setFont(const FbTk::Font &font);
45 void setBevel(int bevel); 46 void setBevel(int bevel);
47
48 void resize(unsigned int width, unsigned int height);
49 void moveResize(int x, int y,
50 unsigned int width, unsigned int height);
51
46 /// clears window and redraw text 52 /// clears window and redraw text
47 void clear(); 53 void clear();
54 /// clears area and redraws text
55 void clearArea(int x, int y,
56 unsigned int width, unsigned int height,
57 bool exposure = false);
48 58
49 inline FbTk::Justify justify() const { return m_justify; } 59 inline FbTk::Justify justify() const { return m_justify; }
50 inline const std::string &text() const { return m_text; } 60 inline const std::string &text() const { return m_text; }
@@ -53,9 +63,10 @@ public:
53 int bevel() const { return m_bevel; } 63 int bevel() const { return m_bevel; }
54 64
55protected: 65protected:
56 void drawText(int x_offset = 0, int y_offset = 0); 66 virtual void drawText(int x_offset = 0, int y_offset = 0);
57 67
58private: 68private:
69 FbTk::FbPixmap m_buffer; ///< for background buffer
59 const FbTk::Font *m_font; 70 const FbTk::Font *m_font;
60 std::string m_text; 71 std::string m_text;
61 FbTk::Justify m_justify; 72 FbTk::Justify m_justify;