mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 09:51:13 +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.
Origin commit data
------------------
Commit: 6fe7b452c1
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-03-22 (Sat, 22 Mar 2014)
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