CComponentsDetailsLine: add basic constructor without args

This commit is contained in:
2012-08-22 12:40:44 +02:00
parent 232933f9fc
commit ee52053f2d
2 changed files with 36 additions and 8 deletions

View File

@@ -259,14 +259,18 @@ class CComponentsPIP : public CComponentsContainer
void hide(bool no_restore = false); void hide(bool no_restore = false);
}; };
class CComponentsDetailLine : public CComponents class CComponentsDetailLine : public CComponents
{ {
private: private:
int thickness, y_down, h_mark_top, h_mark_down; int thickness, y_down, h_mark_top, h_mark_down;
void initVar();
public: public:
CComponentsDetailLine();
CComponentsDetailLine( const int x_pos,const int y_pos_top, const int y_pos_down, CComponentsDetailLine( const int x_pos,const int y_pos_top, const int y_pos_down,
const int h_mark_up =16 , const int h_mark_down = 16, const int h_mark_up = CC_HEIGHT_MIN , const int h_mark_down = CC_HEIGHT_MIN,
fb_pixel_t color_line = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0); fb_pixel_t color_line = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
~CComponentsDetailLine(); ~CComponentsDetailLine();
@@ -275,6 +279,7 @@ class CComponentsDetailLine : public CComponents
void setColors(fb_pixel_t color_line, fb_pixel_t color_shadow){col_body = color_line; col_shadow = color_shadow;}; void setColors(fb_pixel_t color_line, fb_pixel_t color_shadow){col_body = color_line; col_shadow = color_shadow;};
void syncSysColors(); void syncSysColors();
void setYPosDown(const int& y_pos_down){y_down = y_pos_down;}; void setYPosDown(const int& y_pos_down){y_down = y_pos_down;};
void setHMarkTop(const int& h_mark_top_){h_mark_top = h_mark_top_;};
void setHMarkDown(const int& h_mark_down_){h_mark_down = h_mark_down_;}; void setHMarkDown(const int& h_mark_down_){h_mark_down = h_mark_down_;};
}; };

View File

@@ -481,24 +481,47 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam,
//------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------
//sub class CComponentsDetailLine from CComponents //sub class CComponentsDetailLine from CComponents
CComponentsDetailLine::CComponentsDetailLine()
{
initVar();
//CComponents
x = 0;
y = 0;
col_shadow = COL_MENUCONTENTDARK_PLUS_0;
col_body = COL_MENUCONTENT_PLUS_6;
//CComponentsDetailLine
y_down = 0;
h_mark_top = CC_HEIGHT_MIN;
h_mark_down = CC_HEIGHT_MIN;
}
CComponentsDetailLine::CComponentsDetailLine(const int x_pos, const int y_pos_top, const int y_pos_down, const int h_mark_top_, const int h_mark_down_, fb_pixel_t color_line, fb_pixel_t color_shadow) CComponentsDetailLine::CComponentsDetailLine(const int x_pos, const int y_pos_top, const int y_pos_down, const int h_mark_top_, const int h_mark_down_, fb_pixel_t color_line, fb_pixel_t color_shadow)
{ {
initVar();
//CComponents //CComponents
x = x_pos; x = x_pos;
y = y_pos_top; y = y_pos_top;
width = CC_WIDTH_MIN;
col_shadow = color_shadow; col_shadow = color_shadow;
col_body = color_line; col_body = color_line;
// col_frame = COL_BACKGROUND; // not used in this class
// shadow = CC_SHADOW_OFF; // not used in this class
shadow_w = 1;
firstPaint = true;
v_fbdata.clear();
//CComponentsDetailLine //CComponentsDetailLine
y_down = y_pos_down; y_down = y_pos_down;
h_mark_top = h_mark_top_; h_mark_top = h_mark_top_;
h_mark_down = h_mark_down_; h_mark_down = h_mark_down_;
}
void CComponentsDetailLine::initVar()
{
//CComponents
shadow_w = 1;
firstPaint = true;
v_fbdata.clear();
width = CC_WIDTH_MIN;
//CComponentsDetailLine
thickness = 4; thickness = 4;
} }