mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
/gui/widget/menue.cpp: rework constructors, use methodes for init
Many redundant code lines were never been refactored or reduced, but instead came many in with some of last changes e.g.7b4e3bc03b
Origin commit data ------------------ Branch: ni/coolstream Commit:5f7f453bd7
Author: Thilo Graf <dbt@novatux.de> Date: 2014-04-07 (Mon, 07 Apr 2014) ------------------ This commit was generated by Migit
This commit is contained in:
@@ -1170,51 +1170,61 @@ void CMenuWidget::addKey(neutrino_msg_t key, CMenuTarget *menue, const std::stri
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
CMenuOptionNumberChooser::CMenuOptionNumberChooser(const neutrino_locale_t Name, int * const OptionValue, const bool Active, const int min_value, const int max_value, CChangeObserver * const Observ, const int print_offset, const int special_value, const neutrino_locale_t special_value_name, bool sliderOn)
|
CMenuOptionNumberChooser::CMenuOptionNumberChooser( const neutrino_locale_t Name,
|
||||||
|
int * const OptionValue,
|
||||||
|
const bool Active,
|
||||||
|
const int min_value,
|
||||||
|
const int max_value,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
const int print_offset,
|
||||||
|
const int special_value,
|
||||||
|
const neutrino_locale_t special_value_name,
|
||||||
|
bool sliderOn)
|
||||||
{
|
{
|
||||||
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
initMenuOptionNumberChooser("", Name, OptionValue, Active, min_value, max_value, Observ, print_offset, special_value, special_value_name, sliderOn);
|
||||||
name = Name;
|
|
||||||
active = Active;
|
|
||||||
optionValue = OptionValue;
|
|
||||||
|
|
||||||
lower_bound = min_value;
|
|
||||||
upper_bound = max_value;
|
|
||||||
|
|
||||||
display_offset = print_offset;
|
|
||||||
|
|
||||||
localized_value = special_value;
|
|
||||||
localized_value_name = special_value_name;
|
|
||||||
|
|
||||||
nameString = "";
|
|
||||||
numberFormat = "%d";
|
|
||||||
numberFormatFunction = NULL;
|
|
||||||
observ = Observ;
|
|
||||||
slider_on = sliderOn;
|
|
||||||
|
|
||||||
numeric_input = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionNumberChooser::CMenuOptionNumberChooser(const std::string &Name, int * const OptionValue, const bool Active, const int min_value, const int max_value, CChangeObserver * const Observ, const int print_offset, const int special_value, const neutrino_locale_t special_value_name, bool sliderOn)
|
CMenuOptionNumberChooser::CMenuOptionNumberChooser( const std::string &Name,
|
||||||
|
int * const OptionValue,
|
||||||
|
const bool Active,
|
||||||
|
const int min_value,
|
||||||
|
const int max_value,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
const int print_offset,
|
||||||
|
const int special_value,
|
||||||
|
const neutrino_locale_t special_value_name,
|
||||||
|
bool sliderOn)
|
||||||
|
{
|
||||||
|
initMenuOptionNumberChooser(Name, NONEXISTANT_LOCALE, OptionValue, Active, min_value, max_value, Observ, print_offset, special_value, special_value_name, sliderOn);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMenuOptionNumberChooser::initMenuOptionNumberChooser( const std::string &s_name,
|
||||||
|
const neutrino_locale_t l_name,
|
||||||
|
int * const OptionValue,
|
||||||
|
const bool Active,
|
||||||
|
const int min_value,
|
||||||
|
const int max_value,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
const int print_offset,
|
||||||
|
const int special_value,
|
||||||
|
const neutrino_locale_t special_value_name,
|
||||||
|
bool sliderOn)
|
||||||
{
|
{
|
||||||
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
||||||
name = NONEXISTANT_LOCALE;
|
nameString = s_name;
|
||||||
active = Active;
|
name = l_name;
|
||||||
optionValue = OptionValue;
|
optionValue = OptionValue;
|
||||||
|
active = Active;
|
||||||
lower_bound = min_value;
|
lower_bound = min_value;
|
||||||
upper_bound = max_value;
|
upper_bound = max_value;
|
||||||
|
observ = Observ;
|
||||||
display_offset = print_offset;
|
display_offset = print_offset;
|
||||||
|
|
||||||
localized_value = special_value;
|
localized_value = special_value;
|
||||||
localized_value_name = special_value_name;
|
localized_value_name = special_value_name;
|
||||||
|
|
||||||
nameString = Name;
|
|
||||||
numberFormat = "%d";
|
|
||||||
numberFormatFunction = NULL;
|
|
||||||
observ = Observ;
|
|
||||||
slider_on = sliderOn;
|
slider_on = sliderOn;
|
||||||
|
|
||||||
|
numberFormat = "%d";
|
||||||
|
numberFormatFunction = NULL;
|
||||||
numeric_input = false;
|
numeric_input = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1334,19 +1344,21 @@ int CMenuOptionNumberChooser::getWidth(void)
|
|||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown, bool OptionsSort)
|
CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName,
|
||||||
|
int * const OptionValue,
|
||||||
|
const struct keyval * const Options,
|
||||||
|
const unsigned Number_Of_Options,
|
||||||
|
const bool Active,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
const neutrino_msg_t DirectKey,
|
||||||
|
const std::string & IconName,
|
||||||
|
bool Pulldown,
|
||||||
|
bool OptionsSort)
|
||||||
{
|
{
|
||||||
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
initVarOptionChooser("", OptionName, OptionValue, Active, Observ, DirectKey, IconName, Pulldown, OptionsSort);
|
||||||
nameString = "";
|
|
||||||
name = OptionName;
|
|
||||||
active = Active;
|
|
||||||
optionValue = OptionValue;
|
|
||||||
number_of_options = Number_Of_Options;
|
number_of_options = Number_Of_Options;
|
||||||
observ = Observ;
|
|
||||||
directKey = DirectKey;
|
|
||||||
iconName = IconName;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
optionsSort = OptionsSort;
|
|
||||||
for (unsigned int i = 0; i < number_of_options; i++)
|
for (unsigned int i = 0; i < number_of_options; i++)
|
||||||
{
|
{
|
||||||
struct keyval_ext opt;
|
struct keyval_ext opt;
|
||||||
@@ -1355,19 +1367,21 @@ CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionChooser::CMenuOptionChooser(const std::string &OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown, bool OptionsSort)
|
CMenuOptionChooser::CMenuOptionChooser(const std::string &OptionName,
|
||||||
|
int * const OptionValue,
|
||||||
|
const struct keyval * const Options,
|
||||||
|
const unsigned Number_Of_Options,
|
||||||
|
const bool Active,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
neutrino_msg_t DirectKey,
|
||||||
|
const std::string & IconName,
|
||||||
|
bool Pulldown,
|
||||||
|
bool OptionsSort)
|
||||||
{
|
{
|
||||||
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
initVarOptionChooser(OptionName, NONEXISTANT_LOCALE, OptionValue, Active, Observ, DirectKey, IconName, Pulldown, OptionsSort);
|
||||||
nameString = OptionName;
|
|
||||||
name = NONEXISTANT_LOCALE;
|
|
||||||
active = Active;
|
|
||||||
optionValue = OptionValue;
|
|
||||||
number_of_options = Number_Of_Options;
|
number_of_options = Number_Of_Options;
|
||||||
observ = Observ;
|
|
||||||
directKey = DirectKey;
|
|
||||||
iconName = IconName;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
optionsSort = OptionsSort;
|
|
||||||
for (unsigned int i = 0; i < number_of_options; i++)
|
for (unsigned int i = 0; i < number_of_options; i++)
|
||||||
{
|
{
|
||||||
struct keyval_ext opt;
|
struct keyval_ext opt;
|
||||||
@@ -1376,67 +1390,89 @@ CMenuOptionChooser::CMenuOptionChooser(const std::string &OptionName, int * cons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval_ext * const Options,
|
CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName,
|
||||||
const unsigned Number_Of_Options, const bool Active, CChangeObserver * const Observ,
|
int * const OptionValue,
|
||||||
const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown, bool OptionsSort)
|
const struct keyval_ext * const Options,
|
||||||
|
const unsigned Number_Of_Options,
|
||||||
|
const bool Active,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
const neutrino_msg_t DirectKey,
|
||||||
|
const std::string & IconName,
|
||||||
|
bool Pulldown,
|
||||||
|
bool OptionsSort)
|
||||||
{
|
{
|
||||||
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
initVarOptionChooser("", OptionName, OptionValue, Active, Observ, DirectKey, IconName, Pulldown, OptionsSort);
|
||||||
nameString = "";
|
|
||||||
name = OptionName;
|
|
||||||
active = Active;
|
|
||||||
optionValue = OptionValue;
|
|
||||||
number_of_options = Number_Of_Options;
|
number_of_options = Number_Of_Options;
|
||||||
observ = Observ;
|
|
||||||
directKey = DirectKey;
|
|
||||||
iconName = IconName;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
optionsSort = OptionsSort;
|
|
||||||
for (unsigned int i = 0; i < number_of_options; i++)
|
for (unsigned int i = 0; i < number_of_options; i++)
|
||||||
options.push_back(Options[i]);
|
options.push_back(Options[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionChooser::CMenuOptionChooser(const std::string &OptionName, int * const OptionValue, const struct keyval_ext * const Options,
|
CMenuOptionChooser::CMenuOptionChooser(const std::string &OptionName,
|
||||||
const unsigned Number_Of_Options, const bool Active, CChangeObserver * const Observ,
|
int * const OptionValue,
|
||||||
const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown, bool OptionsSort)
|
const struct keyval_ext * const Options,
|
||||||
|
const unsigned Number_Of_Options,
|
||||||
|
const bool Active,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
const neutrino_msg_t DirectKey,
|
||||||
|
const std::string & IconName,
|
||||||
|
bool Pulldown,
|
||||||
|
bool OptionsSort)
|
||||||
{
|
{
|
||||||
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
initVarOptionChooser(OptionName, NONEXISTANT_LOCALE, OptionValue, Active, Observ, DirectKey, IconName, Pulldown, OptionsSort);
|
||||||
nameString = OptionName;
|
|
||||||
name = NONEXISTANT_LOCALE;
|
|
||||||
active = Active;
|
|
||||||
optionValue = OptionValue;
|
|
||||||
number_of_options = Number_Of_Options;
|
number_of_options = Number_Of_Options;
|
||||||
observ = Observ;
|
|
||||||
directKey = DirectKey;
|
|
||||||
iconName = IconName;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
optionsSort = OptionsSort;
|
|
||||||
for (unsigned int i = 0; i < number_of_options; i++)
|
for (unsigned int i = 0; i < number_of_options; i++)
|
||||||
options.push_back(Options[i]);
|
options.push_back(Options[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, std::vector<keyval_ext> &Options, const bool Active, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown, bool OptionsSort)
|
CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName,
|
||||||
|
int * const OptionValue,
|
||||||
|
std::vector<keyval_ext> &Options,
|
||||||
|
const bool Active,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
const neutrino_msg_t DirectKey,
|
||||||
|
const std::string & IconName,
|
||||||
|
bool Pulldown,
|
||||||
|
bool OptionsSort)
|
||||||
{
|
{
|
||||||
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
initVarOptionChooser("", OptionName, OptionValue, Active, Observ, DirectKey, IconName, Pulldown, OptionsSort);
|
||||||
nameString = "";
|
|
||||||
name = OptionName;
|
|
||||||
active = Active;
|
|
||||||
optionValue = OptionValue;
|
|
||||||
options = Options;
|
options = Options;
|
||||||
observ = Observ;
|
|
||||||
directKey = DirectKey;
|
|
||||||
iconName = IconName;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
optionsSort = OptionsSort;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionChooser::CMenuOptionChooser(const std::string &OptionName, int * const OptionValue, std::vector<keyval_ext> &Options, const bool Active, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown, bool OptionsSort)
|
CMenuOptionChooser::CMenuOptionChooser(const std::string &OptionName,
|
||||||
|
int * const OptionValue,
|
||||||
|
std::vector<keyval_ext> &Options,
|
||||||
|
const bool Active,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
const neutrino_msg_t DirectKey,
|
||||||
|
const std::string & IconName,
|
||||||
|
bool Pulldown,
|
||||||
|
bool OptionsSort)
|
||||||
|
{
|
||||||
|
initVarOptionChooser(OptionName, NONEXISTANT_LOCALE, OptionValue, Active, Observ, DirectKey, IconName, Pulldown, OptionsSort);
|
||||||
|
|
||||||
|
options = Options;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMenuOptionChooser::initVarOptionChooser( const std::string &OptionName,
|
||||||
|
const neutrino_locale_t Name,
|
||||||
|
int * const OptionValue,
|
||||||
|
const bool Active,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
neutrino_msg_t DirectKey,
|
||||||
|
const std::string & IconName,
|
||||||
|
bool Pulldown,
|
||||||
|
bool OptionsSort)
|
||||||
{
|
{
|
||||||
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
||||||
nameString = OptionName;
|
nameString = OptionName;
|
||||||
name = NONEXISTANT_LOCALE;
|
name = Name;
|
||||||
active = Active;
|
|
||||||
optionValue = OptionValue;
|
optionValue = OptionValue;
|
||||||
options = Options;
|
active = Active;
|
||||||
observ = Observ;
|
observ = Observ;
|
||||||
directKey = DirectKey;
|
directKey = DirectKey;
|
||||||
iconName = IconName;
|
iconName = IconName;
|
||||||
@@ -1657,24 +1693,38 @@ int CMenuOptionChooser::getWidth(void)
|
|||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
CMenuOptionStringChooser::CMenuOptionStringChooser(const neutrino_locale_t OptionName, std::string* OptionValue, bool Active, CChangeObserver* Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown)
|
CMenuOptionStringChooser::CMenuOptionStringChooser(const neutrino_locale_t OptionName,
|
||||||
|
std::string* OptionValue,
|
||||||
|
bool Active, CChangeObserver* Observ,
|
||||||
|
const neutrino_msg_t DirectKey,
|
||||||
|
const std::string & IconName,
|
||||||
|
bool Pulldown)
|
||||||
{
|
{
|
||||||
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
initVarMenuOptionStringChooser("", OptionName, OptionValue, Active, Observ, DirectKey, IconName, Pulldown);
|
||||||
nameString = "";
|
|
||||||
name = OptionName;
|
|
||||||
active = Active;
|
|
||||||
optionValueString = OptionValue;
|
|
||||||
observ = Observ;
|
|
||||||
directKey = DirectKey;
|
|
||||||
iconName = IconName;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionStringChooser::CMenuOptionStringChooser(const std::string &OptionName, std::string* OptionValue, bool Active, CChangeObserver* Observ, const neutrino_msg_t DirectKey, const std::string & IconName, bool Pulldown)
|
CMenuOptionStringChooser::CMenuOptionStringChooser(const std::string &OptionName,
|
||||||
|
std::string* OptionValue,
|
||||||
|
bool Active, CChangeObserver* Observ,
|
||||||
|
const neutrino_msg_t DirectKey,
|
||||||
|
const std::string & IconName,
|
||||||
|
bool Pulldown)
|
||||||
|
{
|
||||||
|
initVarMenuOptionStringChooser(OptionName, NONEXISTANT_LOCALE, OptionValue, Active, Observ, DirectKey, IconName, Pulldown);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMenuOptionStringChooser::initVarMenuOptionStringChooser( const std::string &string_Name,
|
||||||
|
const neutrino_locale_t locale_Name,
|
||||||
|
std::string* OptionValue,
|
||||||
|
bool Active,
|
||||||
|
CChangeObserver* Observ,
|
||||||
|
const neutrino_msg_t DirectKey,
|
||||||
|
const std::string & IconName,
|
||||||
|
bool Pulldown)
|
||||||
{
|
{
|
||||||
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
||||||
nameString = OptionName;
|
nameString = string_Name;
|
||||||
name = NONEXISTANT_LOCALE;
|
name = locale_Name;
|
||||||
active = Active;
|
active = Active;
|
||||||
optionValueString = OptionValue;
|
optionValueString = OptionValue;
|
||||||
observ = Observ;
|
observ = Observ;
|
||||||
@@ -1778,58 +1828,75 @@ int CMenuOptionStringChooser::paint( bool selected )
|
|||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active, const std::string &Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
|
CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text,
|
||||||
|
const bool Active,
|
||||||
|
const std::string &Option,
|
||||||
|
CMenuTarget* Target,
|
||||||
|
const char * const ActionKey,
|
||||||
|
neutrino_msg_t DirectKey,
|
||||||
|
const char * const IconName,
|
||||||
|
const char * const IconName_Info_right,
|
||||||
|
bool IsStatic)
|
||||||
{
|
{
|
||||||
option_string = &Option;
|
initVarMenuForwarder("", Text, Active, &Option, NULL, Target, ActionKey, DirectKey, IconName, IconName_Info_right, IsStatic);
|
||||||
option = NULL;
|
|
||||||
name = Text;
|
|
||||||
nameString = "";
|
|
||||||
active = Active;
|
|
||||||
jumpTarget = Target;
|
|
||||||
actionKey = ActionKey ? ActionKey : "";
|
|
||||||
directKey = DirectKey;
|
|
||||||
iconName = IconName ? IconName : "";
|
|
||||||
iconName_Info_right = IconName_Info_right ? IconName_Info_right : "";
|
|
||||||
isStatic = IsStatic;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuForwarder::CMenuForwarder(const std::string& Text, const bool Active, const std::string &Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
|
CMenuForwarder::CMenuForwarder(const std::string& Text,
|
||||||
|
const bool Active,
|
||||||
|
const std::string &Option,
|
||||||
|
CMenuTarget* Target,
|
||||||
|
const char * const ActionKey,
|
||||||
|
neutrino_msg_t DirectKey,
|
||||||
|
const char * const IconName,
|
||||||
|
const char * const IconName_Info_right,
|
||||||
|
bool IsStatic)
|
||||||
{
|
{
|
||||||
option_string = &Option;
|
initVarMenuForwarder(Text, NONEXISTANT_LOCALE, Active, &Option, NULL, Target, ActionKey, DirectKey, IconName, IconName_Info_right, IsStatic);
|
||||||
option = NULL;
|
|
||||||
name = NONEXISTANT_LOCALE;
|
|
||||||
nameString = Text;
|
|
||||||
active = Active;
|
|
||||||
jumpTarget = Target;
|
|
||||||
actionKey = ActionKey ? ActionKey : "";
|
|
||||||
directKey = DirectKey;
|
|
||||||
iconName = IconName ? IconName : "";
|
|
||||||
iconName_Info_right = IconName_Info_right ? IconName_Info_right : "";
|
|
||||||
isStatic = IsStatic;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active, const char * const Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
|
CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text,
|
||||||
|
const bool Active,
|
||||||
|
const char * const Option,
|
||||||
|
CMenuTarget* Target,
|
||||||
|
const char * const ActionKey,
|
||||||
|
neutrino_msg_t DirectKey,
|
||||||
|
const char * const IconName,
|
||||||
|
const char * const IconName_Info_right,
|
||||||
|
bool IsStatic)
|
||||||
{
|
{
|
||||||
option_string = NULL;
|
initVarMenuForwarder("", Text, Active, NULL, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right, IsStatic);
|
||||||
option = Option;
|
|
||||||
name = Text;
|
|
||||||
nameString = "";
|
|
||||||
active = Active;
|
|
||||||
jumpTarget = Target;
|
|
||||||
actionKey = ActionKey ? ActionKey : "";
|
|
||||||
directKey = DirectKey;
|
|
||||||
iconName = IconName ? IconName : "";
|
|
||||||
iconName_Info_right = IconName_Info_right ? IconName_Info_right : "";
|
|
||||||
isStatic = IsStatic;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuForwarder::CMenuForwarder(const std::string& Text, const bool Active, const char * const Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
|
CMenuForwarder::CMenuForwarder(const std::string& Text,
|
||||||
|
const bool Active,
|
||||||
|
const char * const Option,
|
||||||
|
CMenuTarget* Target,
|
||||||
|
const char * const ActionKey,
|
||||||
|
neutrino_msg_t DirectKey,
|
||||||
|
const char * const IconName,
|
||||||
|
const char * const IconName_Info_right,
|
||||||
|
bool IsStatic)
|
||||||
{
|
{
|
||||||
option_string = NULL;
|
initVarMenuForwarder(Text, NONEXISTANT_LOCALE, Active, NULL, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right, IsStatic);
|
||||||
option = Option;
|
}
|
||||||
name = NONEXISTANT_LOCALE;
|
|
||||||
nameString = Text;
|
void CMenuForwarder::initVarMenuForwarder( const std::string& string_text,
|
||||||
|
const neutrino_locale_t& locale_text,
|
||||||
|
const bool Active,
|
||||||
|
const std::string * Option_string,
|
||||||
|
const char * const Option_cstring,
|
||||||
|
CMenuTarget* Target,
|
||||||
|
const char * const ActionKey,
|
||||||
|
neutrino_msg_t DirectKey,
|
||||||
|
const char * const IconName,
|
||||||
|
const char * const IconName_Info_right,
|
||||||
|
bool IsStatic)
|
||||||
|
{
|
||||||
|
name = locale_text;
|
||||||
|
nameString = string_text;
|
||||||
active = Active;
|
active = Active;
|
||||||
|
option_string = Option_string;
|
||||||
|
option = Option_cstring;
|
||||||
jumpTarget = Target;
|
jumpTarget = Target;
|
||||||
actionKey = ActionKey ? ActionKey : "";
|
actionKey = ActionKey ? ActionKey : "";
|
||||||
directKey = DirectKey;
|
directKey = DirectKey;
|
||||||
@@ -1937,22 +2004,23 @@ int CMenuForwarder::paint(bool selected)
|
|||||||
//-------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
CMenuSeparator::CMenuSeparator(const int Type, const neutrino_locale_t Text, bool IsStatic)
|
CMenuSeparator::CMenuSeparator(const int Type, const neutrino_locale_t Text, bool IsStatic)
|
||||||
{
|
{
|
||||||
directKey = CRCInput::RC_nokey;
|
initVarMenuSeparator(Type, "", Text, IsStatic);
|
||||||
iconName = "";
|
|
||||||
type = Type;
|
|
||||||
name = Text;
|
|
||||||
nameString = "";
|
|
||||||
isStatic = IsStatic;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuSeparator::CMenuSeparator(const int Type, const std::string Text, bool IsStatic)
|
CMenuSeparator::CMenuSeparator(const int Type, const std::string& Text, bool IsStatic)
|
||||||
{
|
{
|
||||||
|
initVarMenuSeparator(Type, Text, NONEXISTANT_LOCALE, IsStatic);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMenuSeparator::initVarMenuSeparator(const int Type, const std::string& string_Text, const neutrino_locale_t locale_Text, bool IsStatic)
|
||||||
|
{
|
||||||
|
type = Type;
|
||||||
|
name = locale_Text;
|
||||||
|
nameString = string_Text;
|
||||||
|
isStatic = IsStatic;
|
||||||
|
|
||||||
directKey = CRCInput::RC_nokey;
|
directKey = CRCInput::RC_nokey;
|
||||||
iconName = "";
|
iconName = "";
|
||||||
type = Type;
|
|
||||||
name = NONEXISTANT_LOCALE;
|
|
||||||
nameString = Text;
|
|
||||||
isStatic = IsStatic;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMenuSeparator::getHeight(void) const
|
int CMenuSeparator::getHeight(void) const
|
||||||
|
@@ -182,7 +182,12 @@ class CMenuItem
|
|||||||
|
|
||||||
class CMenuSeparator : public CMenuItem
|
class CMenuSeparator : public CMenuItem
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
int type;
|
int type;
|
||||||
|
void initVarMenuSeparator( const int Type,
|
||||||
|
const std::string& string_Text,
|
||||||
|
const neutrino_locale_t locale_Text,
|
||||||
|
bool IsStatic);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -199,7 +204,7 @@ class CMenuSeparator : public CMenuItem
|
|||||||
|
|
||||||
|
|
||||||
CMenuSeparator(const int Type = 0, const neutrino_locale_t Text = NONEXISTANT_LOCALE, bool IsStatic = false);
|
CMenuSeparator(const int Type = 0, const neutrino_locale_t Text = NONEXISTANT_LOCALE, bool IsStatic = false);
|
||||||
CMenuSeparator(const int Type, const std::string Text, bool IsStatic = false);
|
CMenuSeparator(const int Type, const std::string& Text, bool IsStatic = false);
|
||||||
virtual ~CMenuSeparator(){}
|
virtual ~CMenuSeparator(){}
|
||||||
|
|
||||||
int paint(bool selected=false);
|
int paint(bool selected=false);
|
||||||
@@ -221,20 +226,60 @@ class CMenuForwarder : public CMenuItem
|
|||||||
|
|
||||||
virtual std::string getOption(void);
|
virtual std::string getOption(void);
|
||||||
|
|
||||||
|
void initVarMenuForwarder( const std::string& string_text,
|
||||||
|
const neutrino_locale_t& locale_text,
|
||||||
|
const bool Active,
|
||||||
|
const std::string * Option_string,
|
||||||
|
const char * const Option_cstring,
|
||||||
|
CMenuTarget* Target,
|
||||||
|
const char * const ActionKey,
|
||||||
|
neutrino_msg_t DirectKey,
|
||||||
|
const char * const IconName,
|
||||||
|
const char * const IconName_Info_right,
|
||||||
|
bool IsStatic);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CMenuForwarder(const neutrino_locale_t Text, const bool Active, const std::string &Option,
|
CMenuForwarder( const neutrino_locale_t Text,
|
||||||
CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
const bool Active,
|
||||||
const char * const IconName = NULL, const char * const IconName_Info_right = NULL, bool IsStatic = false);
|
const std::string &Option,
|
||||||
CMenuForwarder(const std::string & Text, const bool Active, const std::string &Option,
|
CMenuTarget* Target=NULL,
|
||||||
CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
const char * const ActionKey = NULL,
|
||||||
const char * const IconName = NULL, const char * const IconName_Info_right = NULL, bool IsStatic = false);
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
||||||
CMenuForwarder(const neutrino_locale_t Text, const bool Active = true, const char * const Option=NULL,
|
const char * const IconName = NULL,
|
||||||
CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
const char * const IconName_Info_right = NULL,
|
||||||
const char * const IconName = NULL, const char * const IconName_Info_right = NULL, bool IsStatic = false);
|
bool IsStatic = false);
|
||||||
CMenuForwarder(const std::string & Text, const bool Active = true, const char * const Option=NULL,
|
|
||||||
CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
CMenuForwarder( const std::string& Text,
|
||||||
const char * const IconName = NULL, const char * const IconName_Info_right = NULL, bool IsStatic = false);
|
const bool Active,
|
||||||
|
const std::string &Option,
|
||||||
|
CMenuTarget* Target=NULL,
|
||||||
|
const char * const ActionKey = NULL,
|
||||||
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
||||||
|
const char * const IconName = NULL,
|
||||||
|
const char * const IconName_Info_right = NULL,
|
||||||
|
bool IsStatic = false);
|
||||||
|
|
||||||
|
CMenuForwarder( const neutrino_locale_t Text,
|
||||||
|
const bool Active = true,
|
||||||
|
const char * const Option=NULL,
|
||||||
|
CMenuTarget* Target=NULL,
|
||||||
|
const char * const ActionKey = NULL,
|
||||||
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
||||||
|
const char * const IconName = NULL,
|
||||||
|
const char * const IconName_Info_right = NULL,
|
||||||
|
bool IsStatic = false);
|
||||||
|
|
||||||
|
CMenuForwarder( const std::string& Text,
|
||||||
|
const bool Active = true,
|
||||||
|
const char * const Option=NULL,
|
||||||
|
CMenuTarget* Target=NULL,
|
||||||
|
const char * const ActionKey = NULL,
|
||||||
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
||||||
|
const char * const IconName = NULL,
|
||||||
|
const char * const IconName_Info_right = NULL,
|
||||||
|
bool IsStatic = false);
|
||||||
|
|
||||||
|
|
||||||
virtual ~CMenuForwarder(){}
|
virtual ~CMenuForwarder(){}
|
||||||
|
|
||||||
@@ -256,21 +301,44 @@ class CMenuForwarder : public CMenuItem
|
|||||||
class CMenuDForwarder : public CMenuForwarder
|
class CMenuDForwarder : public CMenuForwarder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMenuDForwarder(const neutrino_locale_t Text, const bool Active, const std::string &Option,
|
CMenuDForwarder(const neutrino_locale_t Text,
|
||||||
CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
const bool Active,
|
||||||
const char * const IconName = NULL, const char * const IconName_Info_right = NULL)
|
const std::string &Option,
|
||||||
|
CMenuTarget* Target=NULL,
|
||||||
|
const char * const ActionKey = NULL,
|
||||||
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
||||||
|
const char * const IconName = NULL,
|
||||||
|
const char * const IconName_Info_right = NULL)
|
||||||
: CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) { };
|
: CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) { };
|
||||||
CMenuDForwarder(const std::string & Text, const bool Active, const std::string &Option,
|
|
||||||
CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
CMenuDForwarder(const std::string& Text,
|
||||||
const char * const IconName = NULL, const char * const IconName_Info_right = NULL)
|
const bool Active,
|
||||||
|
const std::string &Option,
|
||||||
|
CMenuTarget* Target=NULL,
|
||||||
|
const char * const ActionKey = NULL,
|
||||||
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
||||||
|
const char * const IconName = NULL,
|
||||||
|
const char * const IconName_Info_right = NULL)
|
||||||
: CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) { };
|
: CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) { };
|
||||||
CMenuDForwarder(const neutrino_locale_t Text, const bool Active=true, const char * const Option=NULL,
|
|
||||||
CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
CMenuDForwarder(const neutrino_locale_t Text,
|
||||||
const char * const IconName = NULL, const char * const IconName_Info_right = NULL)
|
const bool Active=true,
|
||||||
|
const char * const Option=NULL,
|
||||||
|
CMenuTarget* Target=NULL,
|
||||||
|
const char * const ActionKey = NULL,
|
||||||
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
||||||
|
const char * const IconName = NULL,
|
||||||
|
const char * const IconName_Info_right = NULL)
|
||||||
: CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) { };
|
: CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) { };
|
||||||
CMenuDForwarder(const std::string & Text, const bool Active=true, const char * const Option=NULL,
|
|
||||||
CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
CMenuDForwarder(const std::string& Text,
|
||||||
const char * const IconName = NULL, const char * const IconName_Info_right = NULL)
|
bool Active=true,
|
||||||
|
const char * const Option=NULL,
|
||||||
|
CMenuTarget* Target=NULL,
|
||||||
|
const char * const ActionKey = NULL,
|
||||||
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
||||||
|
const char * const IconName = NULL,
|
||||||
|
const char * const IconName_Info_right = NULL)
|
||||||
: CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) { };
|
: CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right) { };
|
||||||
|
|
||||||
~CMenuDForwarder() { delete jumpTarget; }
|
~CMenuDForwarder() { delete jumpTarget; }
|
||||||
@@ -312,13 +380,40 @@ private:
|
|||||||
std::string numberFormat;
|
std::string numberFormat;
|
||||||
std::string (*numberFormatFunction)(int num);
|
std::string (*numberFormatFunction)(int num);
|
||||||
|
|
||||||
|
void initMenuOptionNumberChooser( const std::string &s_name,
|
||||||
|
const neutrino_locale_t l_name,
|
||||||
|
int * const OptionValue,
|
||||||
|
const bool Active,
|
||||||
|
const int min_value,
|
||||||
|
const int max_value,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
const int print_offset,
|
||||||
|
const int special_value,
|
||||||
|
const neutrino_locale_t special_value_name,
|
||||||
|
bool sliderOn);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active,
|
CMenuOptionNumberChooser(const neutrino_locale_t name,
|
||||||
const int min_value, const int max_value, CChangeObserver * const Observ = NULL, const int print_offset = 0,
|
int * const OptionValue,
|
||||||
const int special_value = 0, const neutrino_locale_t special_value_name = NONEXISTANT_LOCALE, bool sliderOn = false );
|
const bool Active,
|
||||||
CMenuOptionNumberChooser(const std::string &name, int * const OptionValue, const bool Active,
|
const int min_value,
|
||||||
const int min_value, const int max_value, CChangeObserver * const Observ = NULL, const int print_offset = 0,
|
const int max_value,
|
||||||
const int special_value = 0, const neutrino_locale_t special_value_name = NONEXISTANT_LOCALE, bool sliderOn = false );
|
CChangeObserver * const Observ = NULL,
|
||||||
|
const int print_offset = 0,
|
||||||
|
const int special_value = 0,
|
||||||
|
const neutrino_locale_t special_value_name = NONEXISTANT_LOCALE,
|
||||||
|
bool sliderOn = false );
|
||||||
|
|
||||||
|
CMenuOptionNumberChooser(const std::string &name,
|
||||||
|
int * const OptionValue,
|
||||||
|
const bool Active,
|
||||||
|
const int min_value,
|
||||||
|
const int max_value,
|
||||||
|
CChangeObserver * const Observ = NULL,
|
||||||
|
const int print_offset = 0,
|
||||||
|
const int special_value = 0,
|
||||||
|
const neutrino_locale_t special_value_name = NONEXISTANT_LOCALE,
|
||||||
|
bool sliderOn = false );
|
||||||
|
|
||||||
int paint(bool selected);
|
int paint(bool selected);
|
||||||
|
|
||||||
@@ -382,32 +477,80 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser
|
|||||||
bool optionsSort;
|
bool optionsSort;
|
||||||
|
|
||||||
void clearChooserOptions();
|
void clearChooserOptions();
|
||||||
|
void initVarOptionChooser( const std::string &OptionName,
|
||||||
|
const neutrino_locale_t Name,
|
||||||
|
int * const OptionValue,
|
||||||
|
const bool Active,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
neutrino_msg_t DirectKey,
|
||||||
|
const std::string & IconName,
|
||||||
|
bool Pulldown,
|
||||||
|
bool OptionsSort
|
||||||
|
);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMenuOptionChooser(const neutrino_locale_t Name, int * const OptionValue, const struct keyval * const Options,
|
CMenuOptionChooser( const neutrino_locale_t Name,
|
||||||
const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
int * const OptionValue,
|
||||||
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "",
|
const struct keyval * const Options,
|
||||||
bool Pulldown = false, bool OptionsSort = false);
|
const unsigned Number_Of_Options,
|
||||||
CMenuOptionChooser(const neutrino_locale_t Name, int * const OptionValue, const struct keyval_ext * const Options,
|
const bool Active = false,
|
||||||
const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
CChangeObserver * const Observ = NULL,
|
||||||
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "",
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
||||||
bool Pulldown = false, bool OptionsSort = false);
|
const std::string & IconName= "",
|
||||||
CMenuOptionChooser(const std::string &Name, 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, bool OptionsSort = false);
|
|
||||||
CMenuOptionChooser(const std::string &Name, 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, bool OptionsSort = false);
|
|
||||||
CMenuOptionChooser(const neutrino_locale_t Name, int * const OptionValue, std::vector<keyval_ext> &Options,
|
|
||||||
const bool Active = false, CChangeObserver * const Observ = NULL,
|
|
||||||
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "",
|
|
||||||
bool Pulldown = false, bool OptionsSort = false);
|
|
||||||
CMenuOptionChooser(const std::string &Name, int * const OptionValue, std::vector<keyval_ext> &Options,
|
|
||||||
const bool Active = false, CChangeObserver * const Observ = NULL,
|
|
||||||
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "",
|
|
||||||
bool Pulldown = false, bool OptionsSort = false);
|
bool Pulldown = false, bool OptionsSort = false);
|
||||||
|
|
||||||
|
CMenuOptionChooser( const neutrino_locale_t Name,
|
||||||
|
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,
|
||||||
|
bool OptionsSort = false);
|
||||||
|
|
||||||
|
CMenuOptionChooser( const std::string &Name,
|
||||||
|
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,
|
||||||
|
bool OptionsSort = false);
|
||||||
|
|
||||||
|
CMenuOptionChooser( const std::string &Name,
|
||||||
|
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,
|
||||||
|
bool OptionsSort = false);
|
||||||
|
|
||||||
|
CMenuOptionChooser( const neutrino_locale_t Name,
|
||||||
|
int * const OptionValue,
|
||||||
|
std::vector<keyval_ext> &Options,
|
||||||
|
const bool Active = false,
|
||||||
|
CChangeObserver * const Observ = NULL,
|
||||||
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
||||||
|
const std::string & IconName= "",
|
||||||
|
bool Pulldown = false,
|
||||||
|
bool OptionsSort = false);
|
||||||
|
|
||||||
|
CMenuOptionChooser( const std::string &Name,
|
||||||
|
int * const OptionValue,
|
||||||
|
std::vector<keyval_ext> &Options,
|
||||||
|
const bool Active = false,
|
||||||
|
CChangeObserver * const Observ = NULL,
|
||||||
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
||||||
|
const std::string & IconName= "",
|
||||||
|
bool Pulldown = false,
|
||||||
|
bool OptionsSort = false);
|
||||||
|
|
||||||
~CMenuOptionChooser();
|
~CMenuOptionChooser();
|
||||||
|
|
||||||
void setOption(const int newvalue);
|
void setOption(const int newvalue);
|
||||||
@@ -424,19 +567,37 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser
|
|||||||
|
|
||||||
class CMenuOptionStringChooser : public CMenuItem
|
class CMenuOptionStringChooser : public CMenuItem
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
int height;
|
int height;
|
||||||
std::string * optionValueString;
|
std::string * optionValueString;
|
||||||
std::vector<std::string> options;
|
std::vector<std::string> options;
|
||||||
CChangeObserver * observ;
|
CChangeObserver * observ;
|
||||||
bool pulldown;
|
bool pulldown;
|
||||||
|
|
||||||
|
void initVarMenuOptionStringChooser( const std::string &string_Name,
|
||||||
|
const neutrino_locale_t locale_Name,
|
||||||
|
std::string* OptionValue,
|
||||||
|
bool Active,
|
||||||
|
CChangeObserver* Observ,
|
||||||
|
const neutrino_msg_t DirectKey,
|
||||||
|
const std::string & IconName,
|
||||||
|
bool Pulldown);
|
||||||
public:
|
public:
|
||||||
CMenuOptionStringChooser(const neutrino_locale_t Name, std::string* OptionValue, bool Active = false,
|
CMenuOptionStringChooser( const neutrino_locale_t Name,
|
||||||
CChangeObserver* Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
std::string* OptionValue,
|
||||||
const std::string & IconName= "", bool Pulldown = false);
|
bool Active = false,
|
||||||
CMenuOptionStringChooser(const std::string &Name, std::string* OptionValue, bool Active = false,
|
CChangeObserver* Observ = NULL,
|
||||||
CChangeObserver* Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
||||||
const std::string & IconName= "", bool Pulldown = false);
|
const std::string & IconName= "",
|
||||||
|
bool Pulldown = false);
|
||||||
|
|
||||||
|
CMenuOptionStringChooser( const std::string &Name,
|
||||||
|
std::string* OptionValue,
|
||||||
|
bool Active = false,
|
||||||
|
CChangeObserver* Observ = NULL,
|
||||||
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey,
|
||||||
|
const std::string & IconName= "",
|
||||||
|
bool Pulldown = false);
|
||||||
|
|
||||||
~CMenuOptionStringChooser();
|
~CMenuOptionStringChooser();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user