ManaPlus
|
#include <chatinput.h>
Public Member Functions | |
ChatInput (ChatWindow *const window) | |
void | focusLost (const Event &event) |
void | processVisible (const Visible n) |
void | unprotectFocus () |
void | setVisible (Visible visible) |
Public Member Functions inherited from TextField | |
TextField (const Widget2 *const widget, const std::string &text, const LoseFocusOnTab loseFocusOnTab, ActionListener *const listener, const std::string &eventId, const bool sendAlwaysEvents) | |
~TextField () | |
void | draw (Graphics *const graphics) |
void | safeDraw (Graphics *const graphics) |
void | updateAlpha () |
void | drawFrame (Graphics *const graphics) |
void | safeDrawFrame (Graphics *const graphics) |
void | setNumeric (const bool numeric) |
void | setRange (const int min, const int max) |
void | keyPressed (KeyEvent &event) |
void | setMinimum (const int min) |
void | setMaximum (const int max) |
int | getValue () const |
void | setSendAlwaysEvents (const bool b) |
void | adjustSize () |
void | adjustHeight () |
void | setCaretPosition (unsigned int position) |
void | mousePressed (MouseEvent &event) |
void | handlePaste () |
void | handleCopy () const |
void | focusGained (const Event &event) |
void | focusLost (const Event &event) |
void | moveCaretBack () |
void | moveCaretForward () |
void | moveCaretWordBack () |
void | moveCaretWordForward () |
void | caretDelete () |
void | caretDeleteToStart () |
void | caretDeleteWord () |
void | setAllowSpecialActions (const bool b) |
std::string | getTextBeforeCaret () const |
void | setText (const std::string &text) |
const std::string & | getText () const |
unsigned int | getCaretPosition () const |
void | mouseDragged (MouseEvent &event) |
void | widgetHidden (const Event &event) |
void | setParent (Widget *widget) |
void | setWindow (Widget *const widget) |
void | signalEvent () |
Public Member Functions inherited from Widget | |
Widget (const Widget2 *const widget) | |
~Widget () | |
void | setFrameSize (const unsigned int frameSize) |
unsigned int | getFrameSize () const |
virtual void | logic () |
Widget * | getParent () const |
void | setWidth (const int width) |
int | getWidth () const |
void | setHeight (const int height) |
int | getHeight () const |
void | setSize (const int width, const int height) |
void | setX (const int x) |
int | getX () const |
void | setY (const int y) |
int | getY () const |
void | setPosition (const int x, const int y) |
void | setDimension (const Rect &dimension) |
const Rect & | getDimension () const |
void | setFocusable (const bool focusable) |
bool | isFocusable () const |
virtual bool | isFocused () const |
void | setEnabled (const bool enabled) |
bool | isEnabled () const |
void | setVisible (Visible visible) |
bool | isVisible () const |
void | setBaseColor (const Color &color) |
const Color & | getBaseColor () const |
void | setForegroundColor (const Color &color) |
const Color & | getForegroundColor () const |
void | setBackgroundColor (const Color &color) |
const Color & | getBackgroundColor () const |
virtual void | requestFocus () |
virtual void | requestMoveToTop () |
virtual void | requestMoveToBottom () |
virtual void | setFocusHandler (FocusHandler *const focusHandler) |
FocusHandler * | getFocusHandler () |
void | addActionListener (ActionListener *const actionListener) |
void | removeActionListener (ActionListener *const actionListener) |
void | addDeathListener (WidgetDeathListener *const deathListener) |
void | removeDeathListener (WidgetDeathListener *const deathListener) |
void | addMouseListener (MouseListener *const mouseListener) |
void | removeMouseListener (MouseListener *const mouseListener) |
void | addKeyListener (KeyListener *const keyListener) |
void | removeKeyListener (KeyListener *const keyListener) |
void | addFocusListener (FocusListener *const focusListener) |
void | removeFocusListener (FocusListener *const focusListener) |
void | addWidgetListener (WidgetListener *const widgetListener) |
void | removeWidgetListener (WidgetListener *const widgetListener) |
void | setActionEventId (const std::string &actionEventId) |
const std::string & | getActionEventId () const |
virtual void | getAbsolutePosition (int &x, int &y) const |
Font * | getFont () const |
void | setFont (Font *const font) |
bool | isTabInEnabled () const |
void | setTabInEnabled (const bool enabled) |
bool | isTabOutEnabled () const |
void | setTabOutEnabled (const bool enabled) |
void | requestModalFocus () |
virtual void | requestModalMouseInputFocus () |
virtual void | releaseModalFocus () |
virtual void | releaseModalMouseInputFocus () |
virtual bool | isModalFocused () const |
virtual bool | isModalMouseInputFocused () const |
virtual Widget * | getWidgetAt (int x, int y) |
const std::list< MouseListener * > & | getMouseListeners () const A_CONST |
const std::list< KeyListener * > & | getKeyListeners () const A_CONST |
const std::list< FocusListener * > & | getFocusListeners () const A_CONST |
virtual Rect | getChildrenArea () |
virtual FocusHandler * | getInternalFocusHandler () |
void | setInternalFocusHandler (FocusHandler *const internalFocusHandler) |
virtual void | moveToTop (Widget *widget) |
virtual void | moveToBottom (Widget *widget) |
virtual void | focusNext () |
virtual void | focusPrevious () |
virtual void | showWidgetPart (Widget *const widget, const Rect &area) |
void | setId (const std::string &id) |
const std::string & | getId () const |
virtual void | showPart (const Rect &rectangle) |
bool | isAllowLogic () const |
void | setMouseConsume (const bool b) |
bool | isMouseConsume () const |
void | setRedraw (const bool b) |
virtual bool | isSelectable () const |
void | setSelectable (const bool selectable) |
void | windowResized () |
virtual void | postInit () |
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 |
Public Member Functions inherited from FocusListener | |
virtual | ~FocusListener () |
Public Member Functions inherited from KeyListener | |
virtual | ~KeyListener () |
virtual void | keyReleased (KeyEvent &event) |
Public Member Functions inherited from MouseListener | |
virtual | ~MouseListener () |
virtual void | mouseEntered (MouseEvent &event) |
virtual void | mouseExited (MouseEvent &event) |
virtual void | mouseReleased (MouseEvent &event) |
virtual void | mouseClicked (MouseEvent &event) |
virtual void | mouseWheelMovedUp (MouseEvent &event) |
virtual void | mouseWheelMovedDown (MouseEvent &event) |
virtual void | mouseMoved (MouseEvent &event) |
Public Member Functions inherited from WidgetListener | |
virtual | ~WidgetListener () |
virtual void | widgetResized (const Event &event) |
virtual void | widgetMoved (const Event &event) |
virtual void | widgetShown (const Event &event) |
Private Attributes | |
ChatWindow * | mWindow |
bool | mFocusGaining |
Additional Inherited Members | |
Static Public Member Functions inherited from Widget | |
static void | setGlobalFont (Font *const font) |
static Font * | getGloablFont () |
static void | cleanGlobalFont () |
static bool | widgetExists (const Widget *const widget) |
static void | distributeWindowResizeEvent () |
static Widget * | callPostInit (Widget *const widget) |
Data Fields inherited from Widget | |
Visible | mVisible |
Protected Types inherited from Widget | |
typedef std::list< MouseListener * > | MouseListenerList |
typedef MouseListenerList::iterator | MouseListenerIterator |
typedef std::list< KeyListener * > | KeyListenerList |
typedef KeyListenerList::iterator | KeyListenerIterator |
typedef std::list< ActionListener * > | ActionListenerList |
typedef ActionListenerList::iterator | ActionListenerIterator |
typedef std::list< WidgetDeathListener * > | WidgetDeathListenerList |
typedef WidgetDeathListenerList::iterator | WidgetDeathListenerIterator |
typedef std::list< FocusListener * > | FocusListenerList |
typedef FocusListenerList::iterator | FocusListenerIterator |
typedef std::list< WidgetListener * > | WidgetListenerList |
typedef WidgetListenerList::iterator | WidgetListenerIterator |
Protected Member Functions inherited from TextField | |
void | drawCaret (Graphics *graphics, int x) |
void | fixScroll () |
void | fontChanged () |
bool | handleNormalKeys (const InputActionT action, bool &consumed) |
void | handleCtrlKeys (const InputActionT action, bool &consumed) |
Protected Member Functions inherited from Widget | |
void | distributeActionEvent () |
void | distributeResizedEvent () |
void | distributeMovedEvent () |
void | distributeHiddenEvent () |
void | distributeShownEvent () |
Protected Member Functions inherited from Widget2 | |
Widget2 (const Widget2 *const widget) | |
Protected Member Functions inherited from FocusListener | |
FocusListener () | |
Protected Member Functions inherited from KeyListener | |
KeyListener () | |
Protected Member Functions inherited from MouseListener | |
MouseListener () | |
Protected Member Functions inherited from WidgetListener | |
WidgetListener () | |
Protected Attributes inherited from TextField | |
std::string | mText |
TextChunk | mTextChunk |
unsigned int | mCaretPosition |
int | mXScroll |
const Color * | mCaretColor |
int | mMinimum |
int | mMaximum |
time_t | mLastEventPaste |
int | mPadding |
bool | mNumeric |
LoseFocusOnTab | mLoseFocusOnTab |
bool | mAllowSpecialActions |
bool | mSendAlwaysEvents |
bool | mTextChanged |
Protected Attributes inherited from Widget | |
MouseListenerList | mMouseListeners |
KeyListenerList | mKeyListeners |
ActionListenerList | mActionListeners |
WidgetDeathListenerList | mDeathListeners |
FocusListenerList | mFocusListeners |
WidgetListenerList | mWidgetListeners |
Color | mForegroundColor |
Color | mBackgroundColor |
Color | mBaseColor |
Rect | mDimension |
std::string | mActionEventId |
std::string | mId |
FocusHandler * | mFocusHandler |
FocusHandler * | mInternalFocusHandler |
Widget * | mParent |
Font * | mCurrentFont |
unsigned int | mFrameSize |
bool | mFocusable |
bool | mTabIn |
bool | mTabOut |
bool | mEnabled |
bool | mAllowLogic |
bool | mMouseConsume |
bool | mRedraw |
bool | mSelectable |
Protected Attributes inherited from Widget2 | |
int | mPaletteOffset |
Widget * | mWindow |
Color | mForegroundColor2 |
Static Protected Attributes inherited from TextField | |
static Skin * | mSkin |
static int | instances = 0 |
static float | mAlpha = 1.0 |
static ImageRect | skin |
Static Protected Attributes inherited from Widget | |
static Font * | mGlobalFont = 0 |
The chat input hides when it loses focus. It is also invisible by default.
Definition at line 40 of file chatinput.h.
|
inlineexplicit |
Definition at line 43 of file chatinput.h.
References Widget::addFocusListener(), setVisible(), and Visible_false.
|
inlinevirtual |
Called if the chat input loses focus. It will set itself to invisible as result.
Reimplemented from FocusListener.
Definition at line 59 of file chatinput.h.
References chatWindow, config, TextField::focusLost(), Configuration::getBoolValue(), mFocusGaining, processVisible(), Widget::requestFocus(), ChatWindow::updateVisibility(), and Visible_false.
|
inline |
Definition at line 75 of file chatinput.h.
References ChatWindow::adjustTabSize(), config, emoteWindow, Configuration::getBoolValue(), EmoteWindow::hide(), Widget::isVisible(), mFocusGaining, mWindow, setVisible(), Visible_false, and Visible_true.
Referenced by focusLost(), ChatWindow::keyPressed(), ChatWindow::requestChatFocus(), and ChatWindow::toggleChatFocus().
|
inline |
Definition at line 97 of file chatinput.h.
References Widget::setVisible().
Referenced by ChatInput(), and processVisible().
|
inline |
Definition at line 94 of file chatinput.h.
References mFocusGaining.
Referenced by ChatWindow::action().
|
private |
Definition at line 104 of file chatinput.h.
Referenced by focusLost(), processVisible(), and unprotectFocus().
|
private |
Definition at line 103 of file chatinput.h.
Referenced by processVisible().