mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
*neutrino menu classes: code optimized, temporary code for item arrows removed, needs a better solution
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1051 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -78,9 +78,12 @@ class CMenuTarget
|
||||
class CMenuItem
|
||||
{
|
||||
protected:
|
||||
int x, y, dx, offx, name_start_x;
|
||||
int x, y, dx, offx, name_start_x, icon_frame_w;
|
||||
bool used;
|
||||
fb_pixel_t item_color, item_bgcolor;
|
||||
|
||||
void initItemColors(const bool select_mode);
|
||||
|
||||
public:
|
||||
bool active;
|
||||
neutrino_msg_t directKey;
|
||||
@@ -88,10 +91,6 @@ class CMenuItem
|
||||
bool can_arrow;
|
||||
std::string iconName;
|
||||
std::string selected_iconName;
|
||||
bool show_marker;
|
||||
fb_pixel_t item_color;
|
||||
fb_pixel_t item_bgcolor;
|
||||
|
||||
|
||||
CMenuItem();
|
||||
virtual ~CMenuItem(){}
|
||||
@@ -100,11 +99,10 @@ class CMenuItem
|
||||
{
|
||||
used = true;
|
||||
}
|
||||
|
||||
|
||||
virtual void init(const int X, const int Y, const int DX, const int OFFX);
|
||||
|
||||
virtual int paint (bool selected = false, bool last = false) = 0;
|
||||
|
||||
virtual int getHeight(void) const = 0;
|
||||
virtual int getWidth(void)
|
||||
{
|
||||
@@ -121,16 +119,12 @@ class CMenuItem
|
||||
return 0;
|
||||
}
|
||||
virtual void setActive(const bool Active);
|
||||
|
||||
virtual void paintItemButton(const bool select_mode, const int &item_height, const std::string& icon_Name = NEUTRINO_ICON_BUTTON_RIGHT, const bool icon_centered = false);
|
||||
|
||||
virtual void setItemColors(const bool select_mode , const fb_pixel_t &def_color = COL_MENUCONTENT, const fb_pixel_t &def_bgcolor = COL_MENUCONTENT_PLUS_0,
|
||||
const fb_pixel_t &def_sel_color = COL_MENUCONTENTSELECTED, const fb_pixel_t &def_sel_bgcolor = COL_MENUCONTENTSELECTED_PLUS_0,
|
||||
const fb_pixel_t &def_inactiv_color = COL_MENUCONTENTINACTIVE, const fb_pixel_t &def_inactiv_bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0);
|
||||
|
||||
virtual void paintItemButton(const bool select_mode, const int &item_height, const std::string& icon_Name = NEUTRINO_ICON_BUTTON_RIGHT);
|
||||
|
||||
virtual void paintItemBackground (const bool select_mode, const int &item_height);
|
||||
|
||||
virtual void paintItem(const bool select_mode, const int &item_height);
|
||||
virtual void prepareItem(const bool select_mode, const int &item_height);
|
||||
|
||||
virtual void setItemButton(const std::string& icon_Name, const bool is_select_button = false);
|
||||
|
||||
@@ -372,7 +366,7 @@ class CMenuWidget : public CMenuTarget
|
||||
CFrameBuffer *frameBuffer;
|
||||
std::vector<CMenuItem*> items;
|
||||
std::vector<unsigned int> page_start;
|
||||
std::string iconfile;
|
||||
std::string iconfile;
|
||||
|
||||
int min_width;
|
||||
int width;
|
||||
|
Reference in New Issue
Block a user