ManaPlus
|
#include <setupitem.h>
Public Member Functions | |
SetupItemSlider2 (const std::string &text, const std::string &description, const std::string &keyName, SetupTabScroll *const parent, const std::string &eventName, const int min, const int max, const int step, SetupItemNames *const values, const OnTheFly onTheFly, const MainConfig mainConfig, const DoNotAlign doNotAlign) | |
SetupItemSlider2 (const std::string &text, const std::string &description, const std::string &keyName, SetupTabScroll *const parent, const std::string &eventName, const int min, const int max, const int step, SetupItemNames *const values, const std::string &def, const OnTheFly onTheFly, const MainConfig mainConfig, const DoNotAlign doNotAlign) | |
~SetupItemSlider2 () | |
void | createControls () |
void | fromWidget () |
void | toWidget () |
void | action (const ActionEvent &event) |
void | apply (const std::string &eventName) |
void | setInvertValue (const int v) |
Public Member Functions inherited from SetupItem | |
~SetupItem () | |
void | load () |
virtual void | save () |
void | setWidget (Widget *widget) |
Widget * | getWidget () const |
Configuration * | getConfig () const |
virtual std::string | getActionEventId () const |
virtual void | doAction () |
virtual void | cancel (const std::string &eventName) |
virtual void | externalUpdated (const std::string &eventName) |
virtual void | externalUnloaded (const std::string &eventName) |
MainConfig | isMainConfig () const |
void | fixFirstItemSize (Widget *const widget) |
virtual void | rereadValue () |
void | setValue (const std::string &str) |
std::string | getValue () const |
std::string | getEventName () const |
Public Member Functions inherited from ActionListener | |
virtual | ~ActionListener () |
Public Member Functions inherited from Widget2 | |
virtual | ~Widget2 () |
const Color & | getThemeColor (const ThemeColorIdT type, const unsigned int alpha) const A_INLINE |
const Color & | getThemeCharColor (const signed char c, bool &valid) const A_INLINE |
virtual void | setWidget2 (const Widget2 *const widget) |
void | setPalette (int palette) |
void | checkPalette () |
void | setForegroundColor2 (const Color &color) |
Widget * | getWindow () const |
virtual void | setWindow (Widget *const window) |
Protected Member Functions | |
void | updateLabel () |
int | getMaxWidth () |
Protected Member Functions inherited from SetupItem | |
SetupItem (const std::string &text, const std::string &description, const std::string &keyName, SetupTabScroll *const parent, const std::string &eventName, const MainConfig 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, const MainConfig mainConfig) | |
Protected Member Functions inherited from ActionListener | |
ActionListener () | |
Protected Member Functions inherited from Widget2 | |
Widget2 (const Widget2 *const widget) | |
Protected Attributes | |
HorizontContainer * | mHorizont |
Label * | mLabel |
Label * | mLabel2 |
Slider * | mSlider |
SetupItemNames * | mValues |
int | mMin |
int | mMax |
int | mStep |
int | mInvertValue |
bool | mInvert |
OnTheFly | mOnTheFly |
DoNotAlign | mDoNotAlign |
Protected Attributes inherited from SetupItem | |
std::string | mText |
std::string | mDescription |
std::string | mKeyName |
SetupTabScroll * | mParent |
std::string | mEventName |
std::string | mValue |
std::string | mDefault |
Widget * | mWidget |
std::list< Widget * > | mTempWidgets |
int | mValueType |
MainConfig | mMainConfig |
bool | mUseDefault |
Protected Attributes inherited from Widget2 | |
int | mPaletteOffset |
Widget * | mWindow |
Color | mForegroundColor2 |
Additional Inherited Members | |
Public Types inherited from SetupItem | |
enum | { VBOOL = 0 , VSTR , VINT , VNONE } |
Definition at line 455 of file setupitem.h.
SetupItemSlider2::SetupItemSlider2 | ( | const std::string & | text, |
const std::string & | description, | ||
const std::string & | keyName, | ||
SetupTabScroll *const | parent, | ||
const std::string & | eventName, | ||
const int | min, | ||
const int | max, | ||
const int | step, | ||
SetupItemNames *const | values, | ||
const OnTheFly | onTheFly, | ||
const MainConfig | mainConfig, | ||
const DoNotAlign | doNotAlign | ||
) |
Definition at line 991 of file setupitem.cpp.
References createControls(), SetupItem::mValueType, and SetupItem::VSTR.
SetupItemSlider2::SetupItemSlider2 | ( | const std::string & | text, |
const std::string & | description, | ||
const std::string & | keyName, | ||
SetupTabScroll *const | parent, | ||
const std::string & | eventName, | ||
const int | min, | ||
const int | max, | ||
const int | step, | ||
SetupItemNames *const | values, | ||
const std::string & | def, | ||
const OnTheFly | onTheFly, | ||
const MainConfig | mainConfig, | ||
const DoNotAlign | doNotAlign | ||
) |
Definition at line 1021 of file setupitem.cpp.
References createControls(), SetupItem::mValueType, and SetupItem::VSTR.
SetupItemSlider2::~SetupItemSlider2 | ( | ) |
Definition at line 1052 of file setupitem.cpp.
References mHorizont, mLabel, mSlider, and SetupItem::mWidget.
|
virtual |
Called when an action is recieved from a widget. It is used to be able to recieve a notification that an action has occured.
actionEvent | The event of the action. |
Reimplemented from SetupItem.
Definition at line 1137 of file setupitem.cpp.
References fromWidget(), mOnTheFly, OnTheFly_true, SetupItem::save(), and updateLabel().
|
virtual |
Reimplemented from SetupItem.
Definition at line 1162 of file setupitem.cpp.
References fromWidget(), SetupItem::mEventName, and SetupItem::save().
void SetupItemSlider2::createControls | ( | ) |
Definition at line 1060 of file setupitem.cpp.
References HorizontContainer::add(), VertContainer::add2(), Widget::addActionListener(), SetupTabScroll::addControl(), DoNotAlign_false, SetupItem::fixFirstItemSize(), SetupTabScroll::getContainer(), getMaxWidth(), SetupItem::load(), SetupItem::mDescription, mDoNotAlign, SetupItem::mEventName, mHorizont, mLabel, mLabel2, mMax, mMin, SetupItem::mParent, mSlider, mStep, SetupItem::mText, SetupItem::mValue, SetupItem::mWidget, Widget::setActionEventId(), Widget::setHeight(), ToolTipListener::setToolTip(), Slider::setValue(), Widget::setWidth(), and updateLabel().
Referenced by SetupItemSlider2().
|
virtual |
Implements SetupItem.
Definition at line 1114 of file setupitem.cpp.
References Slider::getValue(), mInvert, mInvertValue, mSlider, SetupItem::mValue, roundDouble(), and Catch::toString().
|
protected |
Definition at line 1093 of file setupitem.cpp.
References Gui::getFont(), Font::getWidth(), gui, and mValues.
Referenced by createControls().
void SetupItemSlider2::setInvertValue | ( | const int | v | ) |
|
virtual |
Implements SetupItem.
Definition at line 1125 of file setupitem.cpp.
References mInvert, mInvertValue, mSlider, SetupItem::mValue, roundDouble(), Slider::setValue(), and updateLabel().
Referenced by setInvertValue().
|
protected |
Definition at line 1145 of file setupitem.cpp.
References CAST_S32, Slider::getValue(), mLabel2, mMin, mSlider, mValues, and Label::setCaption().
Referenced by action(), createControls(), and toWidget().
|
protected |
Definition at line 513 of file setupitem.h.
Referenced by createControls().
|
protected |
Definition at line 502 of file setupitem.h.
Referenced by createControls(), and ~SetupItemSlider2().
|
protected |
Definition at line 511 of file setupitem.h.
Referenced by fromWidget(), setInvertValue(), and toWidget().
|
protected |
Definition at line 510 of file setupitem.h.
Referenced by fromWidget(), setInvertValue(), and toWidget().
|
protected |
Definition at line 503 of file setupitem.h.
Referenced by createControls(), and ~SetupItemSlider2().
|
protected |
Definition at line 504 of file setupitem.h.
Referenced by createControls(), and updateLabel().
|
protected |
Definition at line 508 of file setupitem.h.
Referenced by createControls().
|
protected |
Definition at line 507 of file setupitem.h.
Referenced by createControls(), and updateLabel().
|
protected |
Definition at line 512 of file setupitem.h.
Referenced by action().
|
protected |
Definition at line 505 of file setupitem.h.
Referenced by createControls(), fromWidget(), toWidget(), updateLabel(), and ~SetupItemSlider2().
|
protected |
Definition at line 509 of file setupitem.h.
Referenced by createControls().
|
protected |
Definition at line 506 of file setupitem.h.
Referenced by getMaxWidth(), and updateLabel().