*neutrino menu classes: code reduced

- removed double codes for painting items, more will comming soon

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1044 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
thilo
2011-01-26 11:03:57 +00:00
parent e9d9a1fdd4
commit 5e83dabea2
3 changed files with 91 additions and 127 deletions

View File

@@ -78,7 +78,7 @@ class CMenuTarget
class CMenuItem
{
protected:
int x, y, dx, offx;
int x, y, dx, offx, name_start_x;
bool used;
public:
@@ -93,14 +93,7 @@ class CMenuItem
fb_pixel_t item_bgcolor;
CMenuItem()
{
x = -1;
directKey = CRCInput::RC_nokey;
iconName = "";
can_arrow = false;
used = false;
}
CMenuItem();
virtual ~CMenuItem(){}
virtual void isUsed(void)
@@ -129,17 +122,19 @@ class CMenuItem
}
virtual void setActive(const bool Active);
virtual void paintItemButton(const int startX, const int frame_height, const bool select_mode, const std::string& icon_Name = NEUTRINO_ICON_BUTTON_RIGHT, const bool icon_centered = false);
virtual void paintItemButton(/*const int frame_height, */const bool select_mode, 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 paintItemBackground (const bool select_mode, const int &x, const int &y, const int &width, const int &height);
virtual void paintItemBackground (const bool select_mode, const int &height);
virtual void paintItem(const bool select_mode, int &start_x, int &start_y, int &width, int &height);
virtual void paintItem(const bool select_mode, int &height);
virtual void setItemButton(const std::string& icon_Name, const bool is_select_button = false);
virtual void paintItemCaption(const bool select_mode, const int &height, const char * left_text=NULL, const char * right_text=NULL);
};
class CMenuSeparator : public CMenuItem