mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
widget/menu.*: add keyval_ext type
instead of adding unneeded default values to all menuchooser options just to cater for two special cases, add an extra version that does not need a locale setting but instead takes a char* instead. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@129 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -223,23 +223,44 @@ class CMenuOptionNumberChooser : public CAbstractMenuOptionChooser
|
||||
class CMenuOptionChooser : public CAbstractMenuOptionChooser
|
||||
{
|
||||
public:
|
||||
struct keyval_ext
|
||||
{
|
||||
int key;
|
||||
neutrino_locale_t value;
|
||||
const char *valname;
|
||||
};
|
||||
|
||||
struct keyval
|
||||
{
|
||||
const int key;
|
||||
const neutrino_locale_t value;
|
||||
const char * valname;
|
||||
};
|
||||
|
||||
private:
|
||||
const struct keyval * options;
|
||||
std::vector<keyval_ext> options;
|
||||
unsigned number_of_options;
|
||||
CChangeObserver * observ;
|
||||
std::string optionNameString;
|
||||
bool pulldown;
|
||||
|
||||
public:
|
||||
CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "", bool Pulldown = false);
|
||||
CMenuOptionChooser(const char* OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "", bool Pulldown = false);
|
||||
CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval * const Options,
|
||||
const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
||||
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "",
|
||||
bool Pulldown = false);
|
||||
CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval_ext * const Options,
|
||||
const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
||||
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "",
|
||||
bool Pulldown = false);
|
||||
CMenuOptionChooser(const char* OptionName, int * const OptionValue, const struct keyval * const Options,
|
||||
const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
||||
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "",
|
||||
bool Pulldown = false);
|
||||
CMenuOptionChooser(const char* OptionName, int * const OptionValue, const struct keyval_ext * const Options,
|
||||
const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
||||
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "",
|
||||
bool Pulldown = false);
|
||||
~CMenuOptionChooser();
|
||||
|
||||
void setOptionValue(const int newvalue);
|
||||
int getOptionValue(void) const;
|
||||
|
Reference in New Issue
Block a user