Pioneer
Public Types | Public Member Functions | Public Attributes | List of all members
Gui::TextEntry Class Reference

#include <GuiTextEntry.h>

Inheritance diagram for Gui::TextEntry:
Inheritance graph
[legend]
Collaboration diagram for Gui::TextEntry:
Collaboration graph
[legend]

Public Types

enum  NewlineMode { IgnoreNewline , AcceptNewline , AcceptCtrlNewline }
 
- Public Types inherited from Gui::Widget
enum  EventMask {
  EVENT_NONE = 0 , EVENT_KEYDOWN = 1 << 0 , EVENT_KEYUP = 1 << 1 , EVENT_MOUSEDOWN = 1 << 2 ,
  EVENT_MOUSEUP = 1 << 3 , EVENT_MOUSEMOTION = 1 << 4
}
 

Public Member Functions

 TextEntry ()
 
virtual ~TextEntry ()
 
virtual void GetSizeRequested (float size[2])
 
virtual void Draw ()
 
virtual bool OnMouseDown (MouseButtonEvent *e)
 
void SetText (const std::string &text)
 
std::string GetText () const
 
void SetCursorPos (int pos)
 
int GetCursorPos () const
 
virtual bool OnKeyDown (const SDL_Keysym *)
 
virtual void OnTextInput (Uint32 unicode)
 
virtual void Show ()
 
virtual void GrabFocus ()
 
void Unfocus ()
 
NewlineMode GetNewlineMode () const
 
void SetNewlineMode (NewlineMode mode)
 
- Public Member Functions inherited from Gui::Widget
 Widget ()
 
virtual ~Widget ()
 
virtual void GetMinimumSize (float size[2])
 
void GetAbsolutePosition (float pos[2]) const
 
void GetSize (float size[2])
 
void SetSize (float w, float h)
 
void ResizeRequest ()
 
void SetShortcut (SDL_Keycode key, SDL_Keymod mod)
 
void SetScissor (bool enabled)
 
bool GetEnabled ()
 
void SetEnabled (bool v)
 
bool IsFocused ()
 
virtual void ShowAll ()
 
virtual void Hide ()
 
void HideTooltip ()
 
bool IsVisible () const
 
ContainerGetParent () const
 
void SetParent (Container *p)
 
void SetToolTip (std::string s)
 
const std::string & GetToolTip () const
 
virtual bool OnMouseUp (MouseButtonEvent *e)
 
virtual bool OnMouseMotion (MouseMotionEvent *e)
 
virtual void OnActivate ()
 
virtual void OnMouseEnter ()
 
virtual void OnMouseLeave ()
 
bool IsMouseOver ()
 
void OnPreShortcut (const SDL_Keysym *sym)
 
unsigned int GetEventMask ()
 

Public Attributes

sigc::signal< void, const SDL_Keysym * > onKeyPress
 
sigc::signal< void > onValueChanged
 
- Public Attributes inherited from Gui::Widget
sigc::signal< void > onMouseEnter
 
sigc::signal< void > onMouseLeave
 
sigc::signal< void > onSetSize
 
sigc::signal< void > onDelete
 
float w
 
float h
 

Additional Inherited Members

- Static Public Attributes inherited from Gui::Widget
static const unsigned int EVENT_ALL = 0xffffffff
 
- Protected Member Functions inherited from Gui::Widget
virtual std::string GetOverrideTooltip ()
 
void UpdateOverriddenTooltip ()
 
- Protected Attributes inherited from Gui::Widget
unsigned int m_eventMask
 
struct {
   SDL_Keycode   sym
 
   SDL_Keymod   mod
 
m_shortcut
 

Member Enumeration Documentation

◆ NewlineMode

Enumerator
IgnoreNewline 
AcceptNewline 
AcceptCtrlNewline 

Constructor & Destructor Documentation

◆ TextEntry()

Gui::TextEntry::TextEntry ( )
Here is the call graph for this function:

◆ ~TextEntry()

Gui::TextEntry::~TextEntry ( )
virtual

Member Function Documentation

◆ Draw()

void Gui::TextEntry::Draw ( )
virtual

Implements Gui::Widget.

Here is the call graph for this function:

◆ GetCursorPos()

int Gui::TextEntry::GetCursorPos ( ) const
inline

◆ GetNewlineMode()

NewlineMode Gui::TextEntry::GetNewlineMode ( ) const
inline

◆ GetSizeRequested()

void Gui::TextEntry::GetSizeRequested ( float  size[2])
virtual

containers call this on children. input: size[] will contain max permissible size output: size[] will contain what space the widget desires

Implements Gui::Widget.

Here is the call graph for this function:

◆ GetText()

std::string Gui::TextEntry::GetText ( ) const
inline

◆ GrabFocus()

void Gui::TextEntry::GrabFocus ( )
virtual

Reimplemented from Gui::Widget.

Here is the call graph for this function:

◆ OnKeyDown()

bool Gui::TextEntry::OnKeyDown ( const SDL_Keysym *  sym)
virtual

Reimplemented from Gui::Widget.

Here is the call graph for this function:

◆ OnMouseDown()

bool Gui::TextEntry::OnMouseDown ( MouseButtonEvent e)
virtual

Reimplemented from Gui::Widget.

Here is the call graph for this function:

◆ OnTextInput()

void Gui::TextEntry::OnTextInput ( Uint32  unicode)
virtual

Reimplemented from Gui::Widget.

Here is the call graph for this function:

◆ SetCursorPos()

void Gui::TextEntry::SetCursorPos ( int  pos)
inline
Here is the call graph for this function:

◆ SetNewlineMode()

void Gui::TextEntry::SetNewlineMode ( NewlineMode  mode)
inline

◆ SetText()

void Gui::TextEntry::SetText ( const std::string &  text)
Here is the call graph for this function:

◆ Show()

virtual void Gui::TextEntry::Show ( )
inlinevirtual

Reimplemented from Gui::Widget.

Here is the call graph for this function:

◆ Unfocus()

void Gui::TextEntry::Unfocus ( )
Here is the call graph for this function:

Member Data Documentation

◆ onKeyPress

sigc::signal<void, const SDL_Keysym *> Gui::TextEntry::onKeyPress

◆ onValueChanged

sigc::signal<void> Gui::TextEntry::onValueChanged

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