CTextbox: Required functions for CCompoments

- Add member to disable background box
- Add setter for text an background color
- Add setTextBorderWidth() & setTextFont()
- Calculate y-position of text in refreshText()


Origin commit data
------------------
Commit: 39306221b1
Author: Thilo Graf <dbt@novatux.de>
Date: 2012-08-16 (Thu, 16 Aug 2012)

Origin message was:
------------------
*CTextbox: Required functions for CCompoments

- Add member to disable background box
- Add setter for text an background color
- Add setTextBorderWidth() & setTextFont()
- Calculate y-position of text in refreshText()
This commit is contained in:
2012-08-16 17:38:43 +02:00
committed by Michael Liebmann
parent 0c31abbf1e
commit ed6438b87d
2 changed files with 55 additions and 30 deletions

View File

@@ -118,12 +118,18 @@ class CTextBox
int m_nCurrentLine;
int m_nCurrentPage;
int m_nBgRadius;
int m_nBgRadiusType;
bool m_nPaintBackground;
Font* m_pcFontText;
int m_nFontTextHeight;
CFBWindow::color_t m_textBackgroundColor;
fb_pixel_t m_textColor;
CFrameBuffer * frameBuffer;
int max_width;
int text_border_width;
public:
/* Constructor */
CTextBox();
@@ -139,8 +145,13 @@ class CTextBox
/* Functions */
void refresh(void);
void scrollPageDown(const int pages);
void scrollPageUp(const int pages);
void scrollPageUp(const int pages);
void enableBackgroundPaint(bool mode = true){m_nPaintBackground = mode;};
bool setText(const std::string* newText, int _max_width = 0);
void setTextColor(fb_pixel_t color_text){ m_textColor = color_text;};
void setBackGroundRadius(const int radius, const int type){m_nBgRadius = radius; m_nBgRadiusType = type;};
void setTextBorderWidth(int border);
void setTextFont(Font* font_text);
inline bool isPainted(void) {if( frameBuffer == NULL) return (false); else return (true);};
inline CBox getWindowsPos(void) {return(m_cFrame);};