aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/TextButton.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/TextButton.hh')
-rw-r--r--src/FbTk/TextButton.hh11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/FbTk/TextButton.hh b/src/FbTk/TextButton.hh
index 8c5b583..42c26f5 100644
--- a/src/FbTk/TextButton.hh
+++ b/src/FbTk/TextButton.hh
@@ -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: TextButton.hh,v 1.5 2004/01/08 22:03:13 fluxgen Exp $ 22// $Id: TextButton.hh,v 1.6 2004/10/10 16:04:33 akir Exp $
23 23
24#ifndef FBTK_TEXTBUTTON_HH 24#ifndef FBTK_TEXTBUTTON_HH
25#define FBTK_TEXTBUTTON_HH 25#define FBTK_TEXTBUTTON_HH
@@ -44,6 +44,9 @@ public:
44 void setText(const std::string &text); 44 void setText(const std::string &text);
45 void setFont(const FbTk::Font &font); 45 void setFont(const FbTk::Font &font);
46 void setBevel(int bevel); 46 void setBevel(int bevel);
47 void setTextPadding(unsigned int padding);
48 void setTextPaddingLeft(unsigned int leftpadding);
49 void setTextPaddingRight(unsigned int rightpadding);
47 50
48 void resize(unsigned int width, unsigned int height); 51 void resize(unsigned int width, unsigned int height);
49 void moveResize(int x, int y, 52 void moveResize(int x, int y,
@@ -63,6 +66,8 @@ public:
63 inline const FbTk::Font &font() const { return *m_font; } 66 inline const FbTk::Font &font() const { return *m_font; }
64 unsigned int textWidth() const; 67 unsigned int textWidth() const;
65 int bevel() const { return m_bevel; } 68 int bevel() const { return m_bevel; }
69 unsigned int leftPadding() const { return m_left_padding; }
70 unsigned int rightPadding() const { return m_right_padding; }
66 71
67protected: 72protected:
68 virtual void drawText(int x_offset = 0, int y_offset = 0); 73 virtual void drawText(int x_offset = 0, int y_offset = 0);
@@ -71,7 +76,11 @@ private:
71 const FbTk::Font *m_font; 76 const FbTk::Font *m_font;
72 std::string m_text; 77 std::string m_text;
73 FbTk::Justify m_justify; 78 FbTk::Justify m_justify;
79
74 int m_bevel; 80 int m_bevel;
81 unsigned int m_left_padding; ///< space between buttonborder and text
82 unsigned int m_right_padding; ///< space between buttonborder and text
83
75 FbTk::FbPixmap m_buffer; ///< for background buffer 84 FbTk::FbPixmap m_buffer; ///< for background buffer
76}; 85};
77 86