SDLLineEdit(3)

NAME
SDLLineEdit - An editable text box.

SYNOPSIS

#include <sdllineedit.h>

Inherits SDLGradientWidget.

  Public Methods
SDLLineEdit (SDLWidget* parent, SDL_Rect& r)
~SDLLineEdit ()
void LoadThemeStyle (const char* widgettype)
Load a style from the theme definition.
void LoadThemeStyle (const char* widgettype, const char* objectname)
Load a style from the theme definition.
void EditBegin ()
start edit.
void EditEnd ()
void SetCursorPos (int p)
int GetCursorPos ()
char* GetText ()
void SetText (char* new_text)
void SetTextFormat (char* text, ...)
Sets formated text (like printf).
bool IsCursorVisible ()
void SendChar (char c)
Send a char into the LineEdit widget.
void SendDel ()
Send a 'del' keystroke into the LineEdit widget.
void SendBackspace ()
Send a 'BKSPC' keystroke into the LineEdit widget.
void SetValidKeys (char* keys)
Define a set of valid keys.

  Protected Methods
virtual void eventEditBegin (int id, SDLWidget* widget, unsigned long data, void *clientdata)
virtual void eventEditEnd (int id, SDLWidget* widget, unsigned long data, void *clientdata)
void eventDraw (SDL_Surface* surface, SDL_Rect* rect)
bool eventKeyDown (const SDL_KeyboardEvent* key)
Overridable Eventhandler for a SDL_KeyboardEvent message.
bool eventMouseButtonDown (const SDL_MouseButtonEvent* button)
Overridable Eventhandler for a SDL_MouseButtonEvent message.
void eventInputFocusLost (SDLMessageObject* newfocus)
bool eventFilterKey (const SDL_KeyboardEvent* key)

DETAILED DESCRIPTION

An editable text box.

Author(s):
 Alexander Pipelka

 This really should be renamed to SDLTextBox or something similar, because SDLLineEdit really makes no sense :). Also the 'Edit' part implies that it will always be modifiable, but having a modifyable attribute would probably be better than creating a whole new widget for an unmodifiable text box.

Definition at line 53 of file sdllineedit.h.

CONSTRUCTOR & DESTRUCTOR DOCUMENTATION

  SDLLineEdit::SDLLineEdit (SDLWidget * parent, SDL_Rect & r)

  SDLLineEdit::~SDLLineEdit ()

MEMBER FUNCTION DOCUMENTATION

  void SDLLineEdit::EditBegin ()

start edit.

  void SDLLineEdit::EditEnd ()

  int SDLLineEdit::GetCursorPos ()

  char * SDLLineEdit::GetText ()

  bool SDLLineEdit::IsCursorVisible ()

  void SDLLineEdit::LoadThemeStyle (const char * widgettype, const char * objectname) [virtual]

Load a style from the theme definition.

Parameters:

widgettype name of the widgettype

objectname name of the object

Loads the defined style of a given widgettype and objectname.

Reimplemented from SDLGradientWidget.

  void SDLLineEdit::LoadThemeStyle (const char * widgettype) [virtual]

Load a style from the theme definition.

Parameters:

widgettype name of the widgettype

objectname name of the object

Loads the defined style for a given widgettype

Reimplemented from SDLGradientWidget.

  void SDLLineEdit::SendBackspace ()

Send a 'BKSPC' keystroke into the LineEdit widget.

  void SDLLineEdit::SendChar (char c)

Send a char into the LineEdit widget.

Parameters:

c the character to insert

  void SDLLineEdit::SendDel ()

Send a 'del' keystroke into the LineEdit widget.

  void SDLLineEdit::SetCursorPos (int p)

  void SDLLineEdit::SetText (char * new_text)

  void SDLLineEdit::SetTextFormat (char * text, ...)

Sets formated text (like printf).

  void SDLLineEdit::SetValidKeys (char * keys)

Define a set of valid keys.

Parameters:

keys a string which contains all valid chars

  void SDLLineEdit::eventDraw (SDL_Surface * surface, SDL_Rect * rect) [protected, virtual]

Reimplemented from SDLGradientWidget.

  void SDLLineEdit::eventEditBegin (int id, SDLWidget * widget, unsigned long data, void * clientdata) [protected, virtual]

  void SDLLineEdit::eventEditEnd (int id, SDLWidget * widget, unsigned long data, void * clientdata) [protected, virtual]

  bool SDLLineEdit::eventFilterKey (const SDL_KeyboardEvent * key) [protected]

  void SDLLineEdit::eventInputFocusLost (SDLMessageObject * newfocus) [protected, virtual]

Reimplemented from SDLMessageObject.

  bool SDLLineEdit::eventKeyDown (const SDL_KeyboardEvent * key) [protected, virtual]

Overridable Eventhandler for a SDL_KeyboardEvent message.

This handler is called when a key changed it's state from unpressed to pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:

key SDL_KeyboardEvent message

Returns:
 Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from SDLMessageObject.

  bool SDLLineEdit::eventMouseButtonDown (const SDL_MouseButtonEvent * button) [protected, virtual]

Overridable Eventhandler for a SDL_MouseButtonEvent message.

This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:

button SDL_MouseButtonEvent message

Returns:
 Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from SDLWidgetDnD.

AUTHOR

Generated automatically by Doxygen for ParaGUI from the source code.