aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/TextButton.hh
diff options
context:
space:
mode:
authorsimonb <simonb>2006-03-26 04:02:30 (GMT)
committersimonb <simonb>2006-03-26 04:02:30 (GMT)
commitaf74a2284551c8511b66d77112c7bf32831c1522 (patch)
tree35a8830352f5facc1fc9c58b82c0c6dce8fc921e /src/FbTk/TextButton.hh
parent872f6a0e1e4230f702ad69fa2d7e10a2fa78b7a3 (diff)
downloadfluxbox_pavel-af74a2284551c8511b66d77112c7bf32831c1522.zip
fluxbox_pavel-af74a2284551c8511b66d77112c7bf32831c1522.tar.bz2
rotated fonts, buttons, containers. Used for tabs for now
Diffstat (limited to 'src/FbTk/TextButton.hh')
-rw-r--r--src/FbTk/TextButton.hh13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/FbTk/TextButton.hh b/src/FbTk/TextButton.hh
index f5738b5..5796a39 100644
--- a/src/FbTk/TextButton.hh
+++ b/src/FbTk/TextButton.hh
@@ -38,11 +38,12 @@ class Font;
38class TextButton: public FbTk::Button, FbTk::FbWindowRenderer { 38class TextButton: public FbTk::Button, FbTk::FbWindowRenderer {
39public: 39public:
40 TextButton(const FbTk::FbWindow &parent, 40 TextButton(const FbTk::FbWindow &parent,
41 const FbTk::Font &font, const std::string &text); 41 FbTk::Font &font, const std::string &text);
42 42
43 void setJustify(FbTk::Justify just); 43 void setJustify(FbTk::Justify just);
44 bool setOrientation(FbTk::Orientation orient);
44 void setText(const std::string &text); 45 void setText(const std::string &text);
45 void setFont(const FbTk::Font &font); 46 void setFont(FbTk::Font &font);
46 void setBevel(int bevel); 47 void setBevel(int bevel);
47 void setTextPadding(unsigned int padding); 48 void setTextPadding(unsigned int padding);
48 void setTextPaddingLeft(unsigned int leftpadding); 49 void setTextPaddingLeft(unsigned int leftpadding);
@@ -65,8 +66,9 @@ public:
65 66
66 inline FbTk::Justify justify() const { return m_justify; } 67 inline FbTk::Justify justify() const { return m_justify; }
67 inline const std::string &text() const { return m_text; } 68 inline const std::string &text() const { return m_text; }
68 inline const FbTk::Font &font() const { return *m_font; } 69 inline FbTk::Font &font() const { return *m_font; }
69 unsigned int textWidth() const; 70 unsigned int textWidth() const;
71 unsigned int textHeight() const;
70 int bevel() const { return m_bevel; } 72 int bevel() const { return m_bevel; }
71 unsigned int leftPadding() const { return m_left_padding; } 73 unsigned int leftPadding() const { return m_left_padding; }
72 unsigned int rightPadding() const { return m_right_padding; } 74 unsigned int rightPadding() const { return m_right_padding; }
@@ -77,10 +79,11 @@ protected:
77 virtual void drawText(int x_offset, int y_offset, FbDrawable *drawable_override); 79 virtual void drawText(int x_offset, int y_offset, FbDrawable *drawable_override);
78 80
79private: 81private:
80 const FbTk::Font *m_font; 82 FbTk::Font *m_font;
81 std::string m_text; 83 std::string m_text;
82 FbTk::Justify m_justify; 84 FbTk::Justify m_justify;
83 85 FbTk::Orientation m_orientation;
86
84 int m_bevel; 87 int m_bevel;
85 unsigned int m_left_padding; ///< space between buttonborder and text 88 unsigned int m_left_padding; ///< space between buttonborder and text
86 unsigned int m_right_padding; ///< space between buttonborder and text 89 unsigned int m_right_padding; ///< space between buttonborder and text