diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-17 20:35:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-17 20:35:16 +0300 |
commit | b52b013d0edc3be56566aa4fb21c5cde8a8997f5 (patch) | |
tree | e94d62a8f292a83ba672416bdb89483ae3726c23 /src/gui | |
parent | 6685cfdde742442bc0d79606daf8ef55c8e23711 (diff) | |
download | manaverse-b52b013d0edc3be56566aa4fb21c5cde8a8997f5.tar.gz manaverse-b52b013d0edc3be56566aa4fb21c5cde8a8997f5.tar.bz2 manaverse-b52b013d0edc3be56566aa4fb21c5cde8a8997f5.tar.xz manaverse-b52b013d0edc3be56566aa4fb21c5cde8a8997f5.zip |
add restrict into setupitem.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/setupitem.cpp | 213 | ||||
-rw-r--r-- | src/gui/widgets/setupitem.h | 204 |
2 files changed, 221 insertions, 196 deletions
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp index 9b552d568..2dd16cf81 100644 --- a/src/gui/widgets/setupitem.cpp +++ b/src/gui/widgets/setupitem.cpp @@ -44,9 +44,12 @@ #include "debug.h" -SetupItem::SetupItem(const std::string &text, const std::string &description, - const std::string &keyName, SetupTabScroll *const parent, - const std::string &eventName, const bool mainConfig) : +SetupItem::SetupItem(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + const bool mainConfig) : gcn::ActionListener(), Widget2(), mText(text), @@ -64,9 +67,12 @@ SetupItem::SetupItem(const std::string &text, const std::string &description, { } -SetupItem::SetupItem(const std::string &text, const std::string &description, - const std::string &keyName, SetupTabScroll *const parent, - const std::string &eventName, const std::string &def, +SetupItem::SetupItem(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + const std::string &restrict def, const bool mainConfig) : gcn::ActionListener(), Widget2(), @@ -185,11 +191,11 @@ void SetupItem::rereadValue() toWidget(); } -SetupItemCheckBox::SetupItemCheckBox(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, +SetupItemCheckBox::SetupItemCheckBox(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const bool mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig), mCheckBox(nullptr) @@ -197,12 +203,12 @@ SetupItemCheckBox::SetupItemCheckBox(const std::string &text, createControls(); } -SetupItemCheckBox::SetupItemCheckBox(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - const std::string &def, +SetupItemCheckBox::SetupItemCheckBox(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + const std::string &restrict def, const bool mainConfig) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mCheckBox(nullptr) @@ -246,11 +252,11 @@ void SetupItemCheckBox::toWidget() } -SetupItemTextField::SetupItemTextField(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, +SetupItemTextField::SetupItemTextField(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const bool mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig), mHorizont(nullptr), @@ -263,12 +269,12 @@ SetupItemTextField::SetupItemTextField(const std::string &text, createControls(); } -SetupItemTextField::SetupItemTextField(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - const std::string &def, +SetupItemTextField::SetupItemTextField(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + const std::string &restrict def, const bool mainConfig) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mHorizont(nullptr), @@ -364,11 +370,15 @@ void SetupItemTextField::apply(const std::string &eventName) save(); } -SetupItemIntTextField::SetupItemIntTextField(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, +SetupItemIntTextField::SetupItemIntTextField(const std::string &restrict text, + const std::string &restrict + description, + const std::string &restrict + keyName, + SetupTabScroll *restrict + const parent, + const std::string &restrict + eventName, const int min, const int max, const bool mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig), @@ -384,13 +394,17 @@ SetupItemIntTextField::SetupItemIntTextField(const std::string &text, createControls(); } -SetupItemIntTextField::SetupItemIntTextField(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, +SetupItemIntTextField::SetupItemIntTextField(const std::string &restrict text, + const std::string &restrict + description, + const std::string &restrict + keyName, + SetupTabScroll *restrict + const parent, + const std::string &restrict + eventName, const int min, const int max, - const std::string &def, + const std::string &restrict def, const bool mainConfig) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mHorizont(nullptr), @@ -493,9 +507,9 @@ void SetupItemIntTextField::apply(const std::string &eventName) } -SetupItemLabel::SetupItemLabel(const std::string &text, - const std::string &description, - SetupTabScroll *const parent, +SetupItemLabel::SetupItemLabel(const std::string &restrict text, + const std::string &restrict description, + SetupTabScroll *restrict const parent, const bool separator) : SetupItem(text, description, "", parent, "", "", true), mLabel(nullptr), @@ -548,12 +562,12 @@ void SetupItemLabel::apply(const std::string &eventName A_UNUSED) } -SetupItemDropDown::SetupItemDropDown(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - gcn::ListModel *const model, +SetupItemDropDown::SetupItemDropDown(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + gcn::ListModel *restrict const model, const int width, const bool mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig), @@ -567,14 +581,14 @@ SetupItemDropDown::SetupItemDropDown(const std::string &text, createControls(); } -SetupItemDropDown::SetupItemDropDown(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - gcn::ListModel *const model, +SetupItemDropDown::SetupItemDropDown(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + gcn::ListModel *restrict const model, const int width, - const std::string &def, + const std::string &restrict def, const bool mainConfig) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), mHorizont(nullptr), @@ -636,11 +650,11 @@ void SetupItemDropDown::toWidget() } -SetupItemSlider::SetupItemSlider(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, +SetupItemSlider::SetupItemSlider(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const double min, const double max, const int width, const bool onTheFly, const bool mainConfig) : @@ -657,13 +671,14 @@ SetupItemSlider::SetupItemSlider(const std::string &text, createControls(); } -SetupItemSlider::SetupItemSlider(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, +SetupItemSlider::SetupItemSlider(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const double min, const double max, - const std::string &def, const int width, + const std::string &restrict def, + const int width, const bool onTheFly, const bool mainConfig) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), @@ -745,13 +760,13 @@ void SetupItemSlider::apply(const std::string &eventName) } -SetupItemSlider2::SetupItemSlider2(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, +SetupItemSlider2::SetupItemSlider2(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const int min, const int max, - SetupItemNames *const values, + SetupItemNames *restrict const values, const bool onTheFly, const bool mainConfig, const bool doNotAlign) : @@ -772,14 +787,14 @@ SetupItemSlider2::SetupItemSlider2(const std::string &text, createControls(); } -SetupItemSlider2::SetupItemSlider2(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, +SetupItemSlider2::SetupItemSlider2(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const int min, const int max, - SetupItemNames *const values, - const std::string &def, + SetupItemNames *restrict const values, + const std::string &restrict def, const bool onTheFly, const bool mainConfig, const bool doNotAlign) : SetupItem(text, description, keyName, parent, eventName, def, mainConfig), @@ -925,12 +940,13 @@ void SetupItemSlider2::setInvertValue(const int v) } -SetupItemSliderList::SetupItemSliderList(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - gcn::ListModel *const model, +SetupItemSliderList::SetupItemSliderList(const std::string &restrict text, + const std::string &restrict + description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + gcn::ListModel *restrict const model, const int width, const bool onTheFly, const bool mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig), @@ -944,13 +960,14 @@ SetupItemSliderList::SetupItemSliderList(const std::string &text, mValueType = VSTR; } -SetupItemSliderList::SetupItemSliderList(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - gcn::ListModel *const model, - const std::string &def, +SetupItemSliderList::SetupItemSliderList(const std::string &restrict text, + const std::string &restrict + description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + gcn::ListModel *restrict const model, + const std::string &restrict def, const int width, const bool onTheFly, const bool mainConfig) : @@ -1029,12 +1046,12 @@ void SetupItemSliderList::apply(const std::string &eventName) save(); } -SetupItemSound::SetupItemSound(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - gcn::ListModel *const model, +SetupItemSound::SetupItemSound(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + gcn::ListModel *restrict const model, const int width, const bool onTheFly, const bool mainConfig) : SetupItemSliderList(text, description, keyName, parent, eventName, diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h index 0f6b5d392..a7f2fc900 100644 --- a/src/gui/widgets/setupitem.h +++ b/src/gui/widgets/setupitem.h @@ -97,13 +97,19 @@ class SetupItem : public gcn::ActionListener, void rereadValue(); protected: - SetupItem(const std::string &text, const std::string &description, - const std::string &keyName, SetupTabScroll *const parent, - const std::string &eventName, const bool mainConfig); + SetupItem(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + const bool mainConfig); - SetupItem(const std::string &text, const std::string &description, - const std::string &keyName, SetupTabScroll *const parent, - const std::string &eventName, const std::string &def, + SetupItem(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + const std::string &def, const bool mainConfig); std::string mText; @@ -134,19 +140,19 @@ class SetupItem : public gcn::ActionListener, class SetupItemCheckBox final : public SetupItem { public: - SetupItemCheckBox(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, + SetupItemCheckBox(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const bool mainConfig = true); - SetupItemCheckBox(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - const std::string &def, + SetupItemCheckBox(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + const std::string &restrict def, const bool mainConfig = true); A_DELETE_COPY(SetupItemCheckBox) @@ -166,19 +172,19 @@ class SetupItemCheckBox final : public SetupItem class SetupItemTextField final : public SetupItem { public: - SetupItemTextField(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, + SetupItemTextField(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const bool mainConfig = true); - SetupItemTextField(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - const std::string &def, + SetupItemTextField(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + const std::string &restrict def, const bool mainConfig = true); A_DELETE_COPY(SetupItemTextField) @@ -206,21 +212,21 @@ class SetupItemTextField final : public SetupItem class SetupItemIntTextField final : public SetupItem { public: - SetupItemIntTextField(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, + SetupItemIntTextField(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const int min, const int max, const bool mainConfig = true); - SetupItemIntTextField(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, + SetupItemIntTextField(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const int min, const int max, - const std::string &def, + const std::string &restrict def, const bool mainConfig = true); A_DELETE_COPY(SetupItemIntTextField) @@ -250,9 +256,9 @@ class SetupItemIntTextField final : public SetupItem class SetupItemLabel final : public SetupItem { public: - SetupItemLabel(const std::string &text, - const std::string &description, - SetupTabScroll *const parent, + SetupItemLabel(const std::string &restrict text, + const std::string &restrict description, + SetupTabScroll *restrict const parent, const bool separator = true); A_DELETE_COPY(SetupItemLabel) @@ -277,21 +283,22 @@ class SetupItemLabel final : public SetupItem class SetupItemDropDown final : public SetupItem { public: - SetupItemDropDown(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - gcn::ListModel *const model, + SetupItemDropDown(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + gcn::ListModel *restrict const model, const int width, const bool mainConfig = true); - SetupItemDropDown(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - gcn::ListModel *const model, - const int width, const std::string &def, + SetupItemDropDown(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + gcn::ListModel *restrict const model, + const int width, + const std::string &restrict def, const bool mainConfig = true); A_DELETE_COPY(SetupItemDropDown) @@ -315,22 +322,22 @@ class SetupItemDropDown final : public SetupItem class SetupItemSlider final : public SetupItem { public: - SetupItemSlider(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, + SetupItemSlider(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const double min, const double max, const int width = 150, const bool onTheFly = false, const bool mainConfig = true); - SetupItemSlider(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, + SetupItemSlider(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const double min, const double max, - const std::string &def, const int width = 150, + const std::string &restrict def, const int width = 150, const bool onTheFly = false, const bool mainConfig = true); @@ -367,25 +374,25 @@ typedef SetupItemNames::const_iterator SetupItemNamesConstIter; class SetupItemSlider2 final : public SetupItem { public: - SetupItemSlider2(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, + SetupItemSlider2(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const int min, const int max, - SetupItemNames *const values, + SetupItemNames *restrict const values, const bool onTheFly = false, const bool mainConfig = true, const bool doNotAlign = false); - SetupItemSlider2(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, + SetupItemSlider2(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, const int min, const int max, - SetupItemNames *const values, - const std::string &def, + SetupItemNames *restrict const values, + const std::string &restrict def, const bool onTheFly = false, const bool mainConfig = true, const bool doNotAlign = false); @@ -444,22 +451,23 @@ class SetupItemSliderList : public SetupItem virtual void addMoreControls() = 0; protected: - SetupItemSliderList(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - gcn::ListModel *const model, + SetupItemSliderList(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + gcn::ListModel *restrict const model, const int width = 150, const bool onTheFly = false, const bool mainConfig = true); - SetupItemSliderList(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - gcn::ListModel *const model, - const std::string &def, const int width = 150, + SetupItemSliderList(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + gcn::ListModel *restrict const model, + const std::string &restrict def, + const int width = 150, const bool onTheFly = false, const bool mainConfig = true); @@ -474,12 +482,12 @@ class SetupItemSliderList : public SetupItem class SetupItemSound final : public SetupItemSliderList { public: - SetupItemSound(const std::string &text, - const std::string &description, - const std::string &keyName, - SetupTabScroll *const parent, - const std::string &eventName, - gcn::ListModel *const model, + SetupItemSound(const std::string &restrict text, + const std::string &restrict description, + const std::string &restrict keyName, + SetupTabScroll *restrict const parent, + const std::string &restrict eventName, + gcn::ListModel *restrict const model, const int width = 150, const bool onTheFly = false, const bool mainConfig = true); |