ManaPlus
|
#include <setupitem.h>
Public Member Functions | |
SetupItemIntTextField (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 MainConfig mainConfig) | |
SetupItemIntTextField (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 std::string &def, const MainConfig mainConfig) | |
~SetupItemIntTextField () | |
void | createControls () |
void | fromWidget () |
void | toWidget () |
void | action (const ActionEvent &event) |
void | apply (const std::string &eventName) |
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 Attributes | |
HorizontContainer * | mHorizont |
Label * | mLabel |
IntTextField * | mTextField |
Button * | mButton |
EditDialog * | mEditDialog |
int | mMin |
int | mMax |
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 } |
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) | |
Definition at line 241 of file setupitem.h.
SetupItemIntTextField::SetupItemIntTextField | ( | 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 MainConfig | mainConfig | ||
) |
Definition at line 452 of file setupitem.cpp.
References createControls(), SetupItem::mValueType, and SetupItem::VSTR.
SetupItemIntTextField::SetupItemIntTextField | ( | 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 std::string & | def, | ||
const MainConfig | mainConfig | ||
) |
Definition at line 476 of file setupitem.cpp.
References createControls(), SetupItem::mValueType, and SetupItem::VSTR.
SetupItemIntTextField::~SetupItemIntTextField | ( | ) |
Definition at line 501 of file setupitem.cpp.
References mButton, mHorizont, mLabel, mTextField, 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 560 of file setupitem.cpp.
References Widget::addActionListener(), CREATEWIDGETR, fromWidget(), Widget::getActionEventId(), EditDialog::getMsg(), TextField::getText(), mEditDialog, SetupItem::mEventName, Modal_true, SetupItem::mText, mTextField, SetupItem::mWidget, and IntTextField::setValue().
|
virtual |
Reimplemented from SetupItem.
Definition at line 588 of file setupitem.cpp.
References fromWidget(), SetupItem::mEventName, and SetupItem::save().
void SetupItemIntTextField::createControls | ( | ) |
Definition at line 510 of file setupitem.cpp.
References _, HorizontContainer::add(), VertContainer::add2(), Widget::addActionListener(), SetupTabScroll::addControl(), BUTTON_SKIN, Enable_true, SetupItem::fixFirstItemSize(), SetupTabScroll::getContainer(), SetupItem::load(), mButton, SetupItem::mDescription, SetupItem::mEventName, mHorizont, mLabel, mMax, mMin, SetupItem::mParent, SetupItem::mText, mTextField, SetupItem::mValue, SetupItem::mWidget, Widget::setActionEventId(), ToolTipListener::setToolTip(), and Widget::setWidth().
Referenced by SetupItemIntTextField().
|
virtual |
Implements SetupItem.
Definition at line 544 of file setupitem.cpp.
References TextField::getText(), mTextField, and SetupItem::mValue.
|
virtual |
Implements SetupItem.
Definition at line 552 of file setupitem.cpp.
References mTextField, SetupItem::mValue, and TextField::setText().
|
protected |
Definition at line 279 of file setupitem.h.
Referenced by createControls(), and ~SetupItemIntTextField().
|
protected |
Definition at line 280 of file setupitem.h.
Referenced by action().
|
protected |
Definition at line 276 of file setupitem.h.
Referenced by createControls(), and ~SetupItemIntTextField().
|
protected |
Definition at line 277 of file setupitem.h.
Referenced by createControls(), and ~SetupItemIntTextField().
|
protected |
Definition at line 282 of file setupitem.h.
Referenced by createControls().
|
protected |
Definition at line 281 of file setupitem.h.
Referenced by createControls().
|
protected |
Definition at line 278 of file setupitem.h.
Referenced by action(), createControls(), fromWidget(), toWidget(), and ~SetupItemIntTextField().