ManaPlus
|
#include <setupitem.h>
Public Member Functions | |
SetupItemTextField (const std::string &text, const std::string &description, const std::string &keyName, SetupTabScroll *const parent, const std::string &eventName, const MainConfig mainConfig, const UseBase64 useBase64) | |
SetupItemTextField (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, const UseBase64 useBase64) | |
~SetupItemTextField () | |
void | createControls () |
void | fromWidget () |
void | toWidget () |
void | action (const ActionEvent &event) |
void | apply (const std::string &eventName) |
void | cancel (const std::string &eventName) |
void | externalUpdated (const std::string &eventName) |
void | rereadValue () |
void | save () |
void | setUseBase64 (const UseBase64 b) |
Public Member Functions inherited from SetupItem | |
~SetupItem () | |
void | load () |
void | setWidget (Widget *widget) |
Widget * | getWidget () const |
Configuration * | getConfig () const |
virtual std::string | getActionEventId () const |
virtual void | doAction () |
virtual void | externalUnloaded (const std::string &eventName) |
MainConfig | isMainConfig () const |
void | fixFirstItemSize (Widget *const widget) |
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 |
TextField * | mTextField |
Button * | mButton |
EditDialog * | mEditDialog |
UseBase64 | mUseBase64 |
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 186 of file setupitem.h.
SetupItemTextField::SetupItemTextField | ( | const std::string & | text, |
const std::string & | description, | ||
const std::string & | keyName, | ||
SetupTabScroll *const | parent, | ||
const std::string & | eventName, | ||
const MainConfig | mainConfig, | ||
const UseBase64 | useBase64 | ||
) |
Definition at line 275 of file setupitem.cpp.
References createControls(), SetupItem::mValueType, and SetupItem::VSTR.
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, | ||
const MainConfig | mainConfig, | ||
const UseBase64 | useBase64 | ||
) |
Definition at line 294 of file setupitem.cpp.
References createControls(), SetupItem::mValueType, and SetupItem::VSTR.
SetupItemTextField::~SetupItemTextField | ( | ) |
Definition at line 314 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 415 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 TextField::setText().
|
virtual |
Reimplemented from SetupItem.
Definition at line 443 of file setupitem.cpp.
References fromWidget(), SetupItem::mEventName, and save().
|
virtual |
Reimplemented from SetupItem.
Definition at line 338 of file setupitem.cpp.
References decodeBase64String(), SetupItem::load(), mUseBase64, SetupItem::mValue, toWidget(), and UseBase64_true.
void SetupItemTextField::createControls | ( | ) |
Definition at line 362 of file setupitem.cpp.
References _, HorizontContainer::add(), VertContainer::add2(), Widget::addActionListener(), SetupTabScroll::addControl(), BUTTON_SKIN, decodeBase64String(), SetupItem::fixFirstItemSize(), SetupTabScroll::getContainer(), SetupItem::load(), LoseFocusOnTab_true, mButton, SetupItem::mDescription, SetupItem::mEventName, mHorizont, mLabel, SetupItem::mParent, SetupItem::mText, mTextField, mUseBase64, SetupItem::mValue, SetupItem::mWidget, ToolTipListener::setToolTip(), Widget::setWidth(), and UseBase64_true.
Referenced by SetupItemTextField().
|
virtual |
Reimplemented from SetupItem.
Definition at line 346 of file setupitem.cpp.
References decodeBase64String(), SetupItem::load(), mUseBase64, SetupItem::mValue, toWidget(), and UseBase64_true.
|
virtual |
Implements SetupItem.
Definition at line 399 of file setupitem.cpp.
References TextField::getText(), mTextField, and SetupItem::mValue.
|
virtual |
Reimplemented from SetupItem.
Definition at line 354 of file setupitem.cpp.
References decodeBase64String(), SetupItem::load(), mUseBase64, SetupItem::mValue, toWidget(), and UseBase64_true.
|
virtual |
Reimplemented from SetupItem.
Definition at line 323 of file setupitem.cpp.
References encodeBase64String(), mUseBase64, SetupItem::mValue, SetupItem::save(), STD_MOVE, and UseBase64_true.
Referenced by apply().
|
inline |
|
virtual |
Implements SetupItem.
Definition at line 407 of file setupitem.cpp.
References mTextField, SetupItem::mValue, and TextField::setText().
Referenced by cancel(), externalUpdated(), and rereadValue().
|
protected |
Definition at line 236 of file setupitem.h.
Referenced by createControls(), and ~SetupItemTextField().
|
protected |
Definition at line 237 of file setupitem.h.
Referenced by action().
|
protected |
Definition at line 233 of file setupitem.h.
Referenced by createControls(), and ~SetupItemTextField().
|
protected |
Definition at line 234 of file setupitem.h.
Referenced by createControls(), and ~SetupItemTextField().
|
protected |
Definition at line 235 of file setupitem.h.
Referenced by action(), createControls(), fromWidget(), toWidget(), and ~SetupItemTextField().
|
protected |
Definition at line 238 of file setupitem.h.
Referenced by cancel(), createControls(), externalUpdated(), rereadValue(), save(), and setUseBase64().