ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Base class for widgets which need to edit text, like ListWidget and EditTextWidget. More...

#include <editable.h>

Inheritance diagram for GUI::EditableWidget:
Collaboration diagram for GUI::EditableWidget:

List of all members.

Public Types

typedef Common::String String

Public Member Functions

 EditableWidget (GuiObject *boss, int x, int y, int w, int h, const char *tooltip=0, uint32 cmd=0)
 EditableWidget (GuiObject *boss, const String &name, const char *tooltip=0, uint32 cmd=0)
virtual ~EditableWidget ()
void init ()
virtual void setEditString (const String &str)
virtual const StringgetEditString () const
virtual void handleTickle ()
virtual bool handleKeyDown (Common::KeyState state)
virtual void reflowLayout ()
bool setCaretPos (int newPos)

Protected Member Functions

virtual void startEditMode ()=0
virtual void endEditMode ()=0
virtual void abortEditMode ()=0
virtual Common::Rect getEditRect () const =0
 The area where text input is being made.
virtual int getCaretOffset () const
void drawCaret (bool erase)
bool adjustOffset ()
void makeCaretVisible ()
void defaultKeyDownHandler (Common::KeyState &state, bool &dirty, bool &forcecaret, bool &handled)
void setFontStyle (ThemeEngine::FontStyle font)
virtual bool tryInsertChar (byte c, int pos)

Protected Attributes

String _editString
uint32 _cmd
bool _caretVisible
uint32 _caretTime
int _caretPos
bool _caretInverse
int _editScrollOffset
ThemeEngine::FontStyle _font
ThemeEngine::TextInversionState _inversion

Detailed Description

Base class for widgets which need to edit text, like ListWidget and EditTextWidget.

Definition at line 42 of file editable.h.


Member Typedef Documentation

Reimplemented in GUI::EditTextWidget, and GUI::ListWidget.

Definition at line 44 of file editable.h.


Constructor & Destructor Documentation

GUI::EditableWidget::EditableWidget ( GuiObject boss,
int  x,
int  y,
int  w,
int  h,
const char *  tooltip = 0,
uint32  cmd = 0 
)

Definition at line 31 of file editable.cpp.

GUI::EditableWidget::EditableWidget ( GuiObject boss,
const String name,
const char *  tooltip = 0,
uint32  cmd = 0 
)

Definition at line 36 of file editable.cpp.

GUI::EditableWidget::~EditableWidget (  )  [virtual]

Definition at line 54 of file editable.cpp.


Member Function Documentation

virtual void GUI::EditableWidget::abortEditMode (  )  [protected, pure virtual]

Implemented in GUI::EditTextWidget, and GUI::ListWidget.

bool GUI::EditableWidget::adjustOffset (  )  [protected]

Definition at line 345 of file editable.cpp.

void GUI::EditableWidget::defaultKeyDownHandler ( Common::KeyState state,
bool &  dirty,
bool &  forcecaret,
bool &  handled 
) [protected]

Definition at line 255 of file editable.cpp.

void GUI::EditableWidget::drawCaret ( bool  erase  )  [protected]

Definition at line 282 of file editable.cpp.

virtual void GUI::EditableWidget::endEditMode (  )  [protected, pure virtual]

Implemented in GUI::EditTextWidget, and GUI::ListWidget.

int GUI::EditableWidget::getCaretOffset (  )  const [protected, virtual]

Definition at line 267 of file editable.cpp.

virtual Common::Rect GUI::EditableWidget::getEditRect (  )  const [protected, pure virtual]

The area where text input is being made.

This should exactly match the rect with which the actual edit string is drawn otherwise nasty graphics glitches when redrawing the caret can occur.

Implemented in GUI::EditTextWidget, and GUI::ListWidget.

virtual const String& GUI::EditableWidget::getEditString (  )  const [inline, virtual]

Definition at line 70 of file editable.h.

bool GUI::EditableWidget::handleKeyDown ( Common::KeyState  state  )  [virtual]

Reimplemented in GUI::ListWidget.

Definition at line 88 of file editable.cpp.

void GUI::EditableWidget::handleTickle (  )  [virtual]

Reimplemented in GUI::ListWidget.

Definition at line 80 of file editable.cpp.

void GUI::EditableWidget::init (  ) 

Definition at line 41 of file editable.cpp.

void GUI::EditableWidget::makeCaretVisible (  )  [protected]

Definition at line 373 of file editable.cpp.

void GUI::EditableWidget::reflowLayout (  )  [virtual]

Reimplemented in GUI::EditTextWidget, and GUI::ListWidget.

Definition at line 57 of file editable.cpp.

bool GUI::EditableWidget::setCaretPos ( int  newPos  ) 

Definition at line 339 of file editable.cpp.

void GUI::EditableWidget::setEditString ( const String str  )  [virtual]

Reimplemented in GUI::EditTextWidget.

Definition at line 65 of file editable.cpp.

void GUI::EditableWidget::setFontStyle ( ThemeEngine::FontStyle  font  )  [inline, protected]

Definition at line 95 of file editable.h.

virtual void GUI::EditableWidget::startEditMode (  )  [protected, pure virtual]

Implemented in GUI::EditTextWidget, and GUI::ListWidget.

bool GUI::EditableWidget::tryInsertChar ( byte  c,
int  pos 
) [protected, virtual]

Reimplemented in GUI::DomainEditTextWidget.

Definition at line 72 of file editable.cpp.


Member Data Documentation

Definition at line 54 of file editable.h.

Definition at line 52 of file editable.h.

Definition at line 51 of file editable.h.

Definition at line 50 of file editable.h.

Reimplemented in GUI::ListWidget.

Definition at line 48 of file editable.h.

Definition at line 56 of file editable.h.

Definition at line 46 of file editable.h.

Definition at line 58 of file editable.h.


The documentation for this class was generated from the following files:


Generated on Sat Mar 16 2019 05:06:25 for ResidualVM by doxygen 1.7.1
curved edge   curved edge