Pioneer
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Gui::Widget Class Referenceabstract

#include <GuiWidget.h>

Inheritance diagram for Gui::Widget:
Inheritance graph
[legend]

Public Types

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

 Widget ()
 
virtual void Draw ()=0
 
virtual ~Widget ()
 
virtual void GetSizeRequested (float size[2])=0
 
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)
 
virtual void GrabFocus ()
 
bool IsFocused ()
 
virtual void ShowAll ()
 
virtual void Show ()
 
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 OnMouseDown (MouseButtonEvent *e)
 
virtual bool OnMouseUp (MouseButtonEvent *e)
 
virtual bool OnMouseMotion (MouseMotionEvent *e)
 
virtual void OnActivate ()
 
virtual void OnMouseEnter ()
 
virtual void OnMouseLeave ()
 
virtual bool OnKeyDown (const SDL_Keysym *sym)
 
virtual void OnTextInput (Uint32 unicode)
 
bool IsMouseOver ()
 
void OnPreShortcut (const SDL_Keysym *sym)
 
unsigned int GetEventMask ()
 

Public Attributes

sigc::signal< void > onMouseEnter
 
sigc::signal< void > onMouseLeave
 
sigc::signal< void > onSetSize
 
sigc::signal< void > onDelete
 
float w
 
float h
 

Static Public Attributes

static const unsigned int EVENT_ALL = 0xffffffff
 

Protected Member Functions

virtual std::string GetOverrideTooltip ()
 
void UpdateOverriddenTooltip ()
 

Protected Attributes

unsigned int m_eventMask
 
struct {
   SDL_Keycode   sym
 
   SDL_Keymod   mod
 
m_shortcut
 

Member Enumeration Documentation

◆ EventMask

Enumerator
EVENT_NONE 
EVENT_KEYDOWN 
EVENT_KEYUP 
EVENT_MOUSEDOWN 
EVENT_MOUSEUP 
EVENT_MOUSEMOTION 

Constructor & Destructor Documentation

◆ Widget()

Gui::Widget::Widget ( )

◆ ~Widget()

Gui::Widget::~Widget ( )
virtual
Here is the call graph for this function:

Member Function Documentation

◆ Draw()

virtual void Gui::Widget::Draw ( )
pure virtual

◆ GetAbsolutePosition()

void Gui::Widget::GetAbsolutePosition ( float  pos[2]) const
Here is the call graph for this function:

◆ GetEnabled()

bool Gui::Widget::GetEnabled ( )
inline

◆ GetEventMask()

unsigned int Gui::Widget::GetEventMask ( )
inline

◆ GetMinimumSize()

virtual void Gui::Widget::GetMinimumSize ( float  size[2])
inlinevirtual

Reimplemented in Gui::VScrollPortal, Gui::ScrollBar, and Gui::Box.

Here is the call graph for this function:

◆ GetOverrideTooltip()

virtual std::string Gui::Widget::GetOverrideTooltip ( )
inlineprotectedvirtual

Reimplemented in Gui::MultiStateImageButton.

◆ GetParent()

Container* Gui::Widget::GetParent ( ) const
inline

◆ GetSize()

void Gui::Widget::GetSize ( float  size[2])
inline

◆ GetSizeRequested()

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

◆ GetToolTip()

const std::string& Gui::Widget::GetToolTip ( ) const
inline

◆ GrabFocus()

void Gui::Widget::GrabFocus ( )
virtual

Reimplemented in Gui::TextEntry.

Here is the call graph for this function:

◆ Hide()

void Gui::Widget::Hide ( )
virtual

Reimplemented in Gui::Tabbed.

Here is the call graph for this function:

◆ HideTooltip()

void Gui::Widget::HideTooltip ( )
Here is the call graph for this function:

◆ IsFocused()

bool Gui::Widget::IsFocused ( )
Here is the call graph for this function:

◆ IsMouseOver()

bool Gui::Widget::IsMouseOver ( )
inline

◆ IsVisible()

bool Gui::Widget::IsVisible ( ) const
Here is the call graph for this function:

◆ OnActivate()

virtual void Gui::Widget::OnActivate ( )
inlinevirtual

◆ OnKeyDown()

virtual bool Gui::Widget::OnKeyDown ( const SDL_Keysym *  sym)
inlinevirtual

Reimplemented in Gui::TextEntry.

◆ OnMouseDown()

virtual bool Gui::Widget::OnMouseDown ( MouseButtonEvent e)
inlinevirtual

◆ OnMouseEnter()

void Gui::Widget::OnMouseEnter ( )
virtual
Here is the call graph for this function:

◆ OnMouseLeave()

void Gui::Widget::OnMouseLeave ( )
virtual
Here is the call graph for this function:

◆ OnMouseMotion()

virtual bool Gui::Widget::OnMouseMotion ( MouseMotionEvent e)
inlinevirtual

Reimplemented in Gui::VScrollPortal, and Gui::Container.

◆ OnMouseUp()

virtual bool Gui::Widget::OnMouseUp ( MouseButtonEvent e)
inlinevirtual

◆ OnPreShortcut()

void Gui::Widget::OnPreShortcut ( const SDL_Keysym *  sym)
Here is the call graph for this function:

◆ OnTextInput()

virtual void Gui::Widget::OnTextInput ( Uint32  unicode)
inlinevirtual

Reimplemented in Gui::TextEntry.

◆ ResizeRequest()

void Gui::Widget::ResizeRequest ( )
Here is the call graph for this function:

◆ SetEnabled()

void Gui::Widget::SetEnabled ( bool  v)
inline

◆ SetParent()

void Gui::Widget::SetParent ( Container p)
inline

◆ SetScissor()

void Gui::Widget::SetScissor ( bool  enabled)
Here is the call graph for this function:

◆ SetShortcut()

void Gui::Widget::SetShortcut ( SDL_Keycode  key,
SDL_Keymod  mod 
)

◆ SetSize()

void Gui::Widget::SetSize ( float  w,
float  h 
)
inline

◆ SetToolTip()

void Gui::Widget::SetToolTip ( std::string  s)
inline

◆ Show()

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

Reimplemented in Gui::TextEntry, Gui::Tabbed, and Gui::Container.

◆ ShowAll()

virtual void Gui::Widget::ShowAll ( )
inlinevirtual

Reimplemented in SectorView, Gui::Stack, and Gui::Container.

◆ UpdateOverriddenTooltip()

void Gui::Widget::UpdateOverriddenTooltip ( )
protected
Here is the call graph for this function:

Member Data Documentation

◆ EVENT_ALL

const unsigned int Gui::Widget::EVENT_ALL = 0xffffffff
static

◆ h

float Gui::Widget::h

◆ m_eventMask

unsigned int Gui::Widget::m_eventMask
protected

◆ 

struct { ... } Gui::Widget::m_shortcut

◆ mod

SDL_Keymod Gui::Widget::mod

◆ onDelete

sigc::signal<void> Gui::Widget::onDelete

◆ onMouseEnter

sigc::signal<void> Gui::Widget::onMouseEnter

◆ onMouseLeave

sigc::signal<void> Gui::Widget::onMouseLeave

◆ onSetSize

sigc::signal<void> Gui::Widget::onSetSize

◆ sym

SDL_Keycode Gui::Widget::sym

◆ w

float Gui::Widget::w

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