mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CMenuWidget: rework cc modules implementation
- don't create header instance on every widget paint. - remove parameters from hide(), not needed anymore - add signal/slot OnBeforePaint(), OnAfterHide() - try to fix infoclock handling - add member ResetModules() - allow separator to paint with gradient
This commit is contained in:
@@ -308,7 +308,7 @@ class CAbstractMenuOptionChooser : public CMenuItem
|
||||
optionValue = NULL;
|
||||
}
|
||||
~CAbstractMenuOptionChooser(){}
|
||||
|
||||
sigc::signal<void> OnAfterChangeOption;
|
||||
};
|
||||
|
||||
class CMenuOptionNumberChooser : public CAbstractMenuOptionChooser
|
||||
@@ -444,7 +444,7 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser
|
||||
int getWidth(void);
|
||||
void setOptions(const struct keyval * const Options, const unsigned Number_Of_Options);
|
||||
void setOptions(const struct keyval_ext * const Options, const unsigned Number_Of_Options);
|
||||
sigc::signal<void> OnAfterChangeOption;
|
||||
|
||||
int paint(bool selected);
|
||||
|
||||
int exec(CMenuTarget* parent);
|
||||
@@ -497,7 +497,7 @@ class CMenuGlobal
|
||||
static CMenuGlobal* getInstance();
|
||||
};
|
||||
|
||||
class CMenuWidget : public CMenuTarget
|
||||
class CMenuWidget : public CMenuTarget, public CComponentsSignals
|
||||
{
|
||||
private:
|
||||
mn_widget_id_t widget_index;
|
||||
@@ -505,7 +505,7 @@ class CMenuWidget : public CMenuTarget
|
||||
CComponentsDetailLine *details_line;
|
||||
CComponentsInfoBox *info_box;
|
||||
int hint_height;
|
||||
bool show_details_line;
|
||||
CComponentsHeader *header;
|
||||
protected:
|
||||
std::string nameString;
|
||||
neutrino_locale_t name;
|
||||
@@ -562,7 +562,7 @@ class CMenuWidget : public CMenuTarget
|
||||
CMenuWidget(const std::string &Name, const std::string & Icon = "", const int mwidth = 30, const mn_widget_id_t &w_index = NO_WIDGET_ID);
|
||||
CMenuWidget(const neutrino_locale_t Name, const std::string & Icon = "", const int mwidth = 30, const mn_widget_id_t &w_index = NO_WIDGET_ID);
|
||||
~CMenuWidget();
|
||||
|
||||
void ResetModules();
|
||||
virtual void addItem(CMenuItem* menuItem, const bool defaultselected = false);
|
||||
|
||||
enum
|
||||
@@ -610,7 +610,7 @@ class CMenuWidget : public CMenuTarget
|
||||
};
|
||||
void addKey(neutrino_msg_t key, CMenuTarget *menue, const std::string &action);
|
||||
void setFooter(const struct button_label *_fbutton_label, const int _fbutton_count, bool repaint = false);
|
||||
void suppressDetailsLine(bool suppress = true){show_details_line = suppress ? false : true;};
|
||||
|
||||
void setNextShortcut(int sc) { nextShortcut = sc; };
|
||||
int getNextShortcut() { return nextShortcut; };
|
||||
};
|
||||
|
Reference in New Issue
Block a user