mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 09:51:22 +02:00
CComponentsScrollBar: add missing attributes for different visual modes
This commit is contained in:
@@ -42,6 +42,12 @@ class CComponentsScrollBar : public CComponentsFrmChain
|
||||
///names of navi icons
|
||||
std::string sb_up_icon, sb_down_icon;
|
||||
|
||||
///visualize count mode
|
||||
bool sb_visual_enable;
|
||||
|
||||
///segment colors
|
||||
fb_pixel_t sb_segment_col, sb_segment_col_sel;
|
||||
|
||||
///count of segments
|
||||
int sb_segments_count;
|
||||
|
||||
@@ -55,11 +61,11 @@ class CComponentsScrollBar : public CComponentsFrmChain
|
||||
|
||||
///init segements
|
||||
void initSegments();
|
||||
|
||||
|
||||
///init all items
|
||||
void initCCItems();
|
||||
|
||||
void initVarSbForm( const int& count);
|
||||
void initVarSbForm( const int& count, const fb_pixel_t& color_select, const fb_pixel_t& color_passive);
|
||||
|
||||
public:
|
||||
/**Class constructor to generate individual scrollbar objects
|
||||
@@ -73,9 +79,11 @@ class CComponentsScrollBar : public CComponentsFrmChain
|
||||
* usual paraemters:
|
||||
* @param[in] parent optional, exepts type pointer to a parent CComponentsForm object, default NULL
|
||||
* @param[in] shadow_mode optional, exepts type int defined by shadow mode enums, default CC_SHADOW_OFF
|
||||
* @param[in] color_frame optional, exepts type fb_pixel_t, default COL_SCROLLBAR_ACTIVE_PLUS_0
|
||||
* @param[in] color_body optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PASSIVE_PLUS_0
|
||||
* @param[in] color_frame optional, exepts type fb_pixel_t, default COL_SCROLLBAR
|
||||
* @param[in] color_body optional, exepts type fb_pixel_t, default COL_SCROLLBAR
|
||||
* @param[in] color_shadow optional, exepts type fb_pixel_t, default COL_SHADOW_PLUS_0
|
||||
* @param[in] color_select optional, exepts type fb_pixel_t, default COL_SCROLLBAR_ACTIVE
|
||||
* @param[in] color_passive optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PASSIVE
|
||||
*/
|
||||
CComponentsScrollBar( const int &x_pos,
|
||||
const int &y_pos,
|
||||
@@ -84,9 +92,11 @@ class CComponentsScrollBar : public CComponentsFrmChain
|
||||
const int& count = 1,
|
||||
CComponentsForm *parent = NULL,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_SCROLLBAR_ACTIVE_PLUS_0,
|
||||
fb_pixel_t color_body = COL_SCROLLBAR_PASSIVE_PLUS_0,
|
||||
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0);
|
||||
fb_pixel_t color_frame = COL_SCROLLBAR,
|
||||
fb_pixel_t color_body = COL_SCROLLBAR,
|
||||
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0,
|
||||
fb_pixel_t color_select = COL_SCROLLBAR_ACTIVE,
|
||||
fb_pixel_t color_passive = COL_SCROLLBAR_PASSIVE);
|
||||
// ~CComponentsScrollBar(); //inherited from CComponentsForm
|
||||
|
||||
/**Set current page number
|
||||
@@ -123,6 +133,16 @@ class CComponentsScrollBar : public CComponentsFrmChain
|
||||
* @see setSegmentCount()
|
||||
*/
|
||||
int getSegmentCount(){return sb_segments_count;}
|
||||
|
||||
/**Enable/disable vizualized count of possible scroll items
|
||||
* @param[in] enable optional, exepts type bool.
|
||||
* @note Default mode is disabled.
|
||||
*/
|
||||
void enableVisualize(bool enable = true){sb_visual_enable = enable;}
|
||||
|
||||
/**Disable vizualized count of possible scroll items
|
||||
*/
|
||||
void disableVisualize(){enableVisualize(false);}
|
||||
};
|
||||
|
||||
/**Small and easy to apply scrollbar paint methode without expilcit object declaration
|
||||
@@ -141,6 +161,8 @@ class CComponentsScrollBar : public CComponentsFrmChain
|
||||
* @param[in] color_frame optional, exepts type fb_pixel_t, default COL_SCROLLBAR_ACTIVE_PLUS_0
|
||||
* @param[in] color_body optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PASSIVE_PLUS_0
|
||||
* @param[in] color_shadow optional, exepts type fb_pixel_t, default COL_SHADOW_PLUS_0
|
||||
* @param[in] color_select optional, exepts type fb_pixel_t, default COL_SCROLLBAR_ACTIVE
|
||||
* @param[in] color_passive optional, exepts type fb_pixel_t, default COL_SCROLLBAR_PASSIVE
|
||||
*/
|
||||
void paintScrollBar( const int &x_pos,
|
||||
const int &y_pos,
|
||||
@@ -149,8 +171,10 @@ void paintScrollBar( const int &x_pos,
|
||||
const int& count,
|
||||
const int& current_num,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_SCROLLBAR_ACTIVE_PLUS_0,
|
||||
fb_pixel_t color_body = COL_SCROLLBAR_PASSIVE_PLUS_0,
|
||||
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0);
|
||||
fb_pixel_t color_frame = COL_SCROLLBAR,
|
||||
fb_pixel_t color_body = COL_SCROLLBAR,
|
||||
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0,
|
||||
fb_pixel_t color_select = COL_SCROLLBAR_ACTIVE,
|
||||
fb_pixel_t color_passive = COL_SCROLLBAR_PASSIVE);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user