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:
@@ -24,13 +24,12 @@
|
||||
#ifndef __CC_FORM_ICONS_H__
|
||||
#define __CC_FORM_ICONS_H__
|
||||
|
||||
#include "cc_frm.h"
|
||||
#include "cc_frm_chain.h"
|
||||
|
||||
class CComponentsIconForm : public CComponentsForm
|
||||
class CComponentsIconForm : public CComponentsFrmChain
|
||||
{
|
||||
private:
|
||||
std::vector<std::string> v_icons;
|
||||
int ccif_offset, ccif_icon_align;
|
||||
void initMaxHeight(int *pheight);
|
||||
|
||||
protected:
|
||||
@@ -52,25 +51,12 @@ class CComponentsIconForm : public CComponentsForm
|
||||
fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
|
||||
// ~CComponentsIconForm(); //inherited from CComponentsForm
|
||||
|
||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
void initCCIcons();
|
||||
void addIcon(const std::string& icon_name);
|
||||
void addIcon(std::vector<std::string> icon_name);
|
||||
void removeIcons(){v_icons.clear();};
|
||||
void insertIcon(const uint& icon_id, const std::string& icon_name);
|
||||
void removeIcon(const uint& icon_id);
|
||||
void removeIcon(const std::string& icon_name);
|
||||
void removeAllIcons();
|
||||
void setIconOffset(const int offset){ccif_offset = offset;};
|
||||
|
||||
enum //alignements
|
||||
{
|
||||
CC_ICONS_FRM_ALIGN_RIGHT ,
|
||||
CC_ICONS_FRM_ALIGN_LEFT
|
||||
};
|
||||
void setIconAlign(int alignment){ccif_icon_align = alignment;};
|
||||
|
||||
int getIconId(const std::string& icon_name);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user