mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CComponentsHeader: rework context button handling
CComponentsHeader uses now CComponentsIconForm, which is now derived from CComponentsFrmChain. Some methods should be now simplified and allow to handle some modifications easier.
This commit is contained in:
@@ -36,45 +36,46 @@ You can set default form parameters like position, size, colors etc. and additi
|
||||
to display with defined direction.
|
||||
*/
|
||||
|
||||
//direction types
|
||||
enum
|
||||
{
|
||||
CC_DIR_X = 0x1,
|
||||
CC_DIR_Y = 0x2
|
||||
};
|
||||
|
||||
class CComponentsFrmChain : public CComponentsForm
|
||||
{
|
||||
private:
|
||||
///property: defined arrangement mode of items, can be vertical or horizontal
|
||||
int chn_horizontal;
|
||||
|
||||
///property: defines height from sum of all contained items
|
||||
bool chn_dyn_height;
|
||||
///property: defines width from sum of all contained items
|
||||
bool chn_dyn_width;
|
||||
|
||||
///init all required variables
|
||||
void initVarChain( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
const std::vector<CComponentsItem*> *v_items,
|
||||
bool horizontal,
|
||||
bool dynamic_width,
|
||||
bool dynamic_height,
|
||||
int direction,
|
||||
CComponentsForm* parent,
|
||||
bool has_shadow,
|
||||
fb_pixel_t& color_frame,
|
||||
fb_pixel_t& color_body,
|
||||
fb_pixel_t& color_shadow);
|
||||
|
||||
void initCChainItems();
|
||||
protected:
|
||||
///property: mode for arrangement direction of items, see also setDirection(), getDirection()
|
||||
int chn_direction;
|
||||
|
||||
void initChainItems();
|
||||
|
||||
public:
|
||||
CComponentsFrmChain( const int& x_pos = 1, const int& y_pos = 1, const int& w = 720, const int& h = 32,
|
||||
const std::vector<CComponentsItem*> *v_items = NULL,
|
||||
bool horizontal = true,
|
||||
bool dynamic_width = false,
|
||||
bool dynamic_height = false,
|
||||
int direction = CC_DIR_X,
|
||||
CComponentsForm* parent = NULL,
|
||||
bool has_shadow = CC_SHADOW_OFF,
|
||||
fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6,
|
||||
fb_pixel_t& color_body = COL_MENUHEAD_PLUS_0,
|
||||
fb_pixel_t& color_shadow = COL_MENUCONTENTDARK_PLUS_0);
|
||||
// ~CComponentsSlider(); //inherited from CComponentsForm
|
||||
|
||||
///defines mode for arrangement direction of items, see also chn_direction
|
||||
virtual void setDirection(int direction);
|
||||
///gets the mode of arrangment direction
|
||||
virtual int getDirection(){return chn_direction;};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user