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

#include <GuiContainer.h>

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

Classes

struct  widget_pos
 

Public Member Functions

 Container ()
 
virtual ~Container ()
 
bool OnMouseDown (MouseButtonEvent *e)
 
bool OnMouseUp (MouseButtonEvent *e)
 
bool OnMouseMotion (MouseMotionEvent *e)
 
void RemoveAllChildren ()
 
void DeleteAllChildren ()
 
void GetChildPosition (const Widget *child, float outPos[2]) const
 
int GetNumChildren ()
 
virtual void Draw ()
 
void ShowChildren ()
 
void HideChildren ()
 
virtual void Show ()
 
virtual void ShowAll ()
 
virtual void HideAll ()
 
virtual void OnChildResizeRequest (Widget *)=0
 
void SetBgColor (const Color &col)
 
void SetTransparency (bool a)
 
virtual void UpdateAllChildSizes ()=0
 
void RemoveChild (Widget *w)
 
- Public Member Functions inherited from Gui::Widget
 Widget ()
 
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 Hide ()
 
void HideTooltip ()
 
bool IsVisible () const
 
ContainerGetParent () const
 
void SetParent (Container *p)
 
void SetToolTip (std::string s)
 
const std::string & GetToolTip () const
 
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, MouseButtonEvent * > onMouseButtonEvent
 
- 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
 

Protected Types

typedef std::list< widget_posWidgetList
 

Protected Member Functions

void PrependChild (Widget *w, float x, float y)
 
void AppendChild (Widget *w, float x, float y)
 
void MoveChild (Widget *w, float x, float y)
 
WidgetList::const_iterator FindChild (const Widget *w) const
 
WidgetList::iterator FindChild (const Widget *w)
 
- Protected Member Functions inherited from Gui::Widget
virtual std::string GetOverrideTooltip ()
 
void UpdateOverriddenTooltip ()
 

Protected Attributes

WidgetList m_children
 
- Protected Attributes inherited from Gui::Widget
unsigned int m_eventMask
 
struct {
   SDL_Keycode   sym
 
   SDL_Keymod   mod
 
m_shortcut
 

Additional Inherited Members

- 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
}
 
- Static Public Attributes inherited from Gui::Widget
static const unsigned int EVENT_ALL = 0xffffffff
 

Member Typedef Documentation

◆ WidgetList

typedef std::list<widget_pos> Gui::Container::WidgetList
protected

Constructor & Destructor Documentation

◆ Container()

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

◆ ~Container()

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

Member Function Documentation

◆ AppendChild()

void Gui::Container::AppendChild ( Widget w,
float  x,
float  y 
)
protected
Here is the call graph for this function:

◆ DeleteAllChildren()

void Gui::Container::DeleteAllChildren ( )

◆ Draw()

void Gui::Container::Draw ( )
virtual

Implements Gui::Widget.

Reimplemented in WorldView, Gui::VScrollPortal, Gui::Tabbed, and Gui::MeterBar.

Here is the call graph for this function:

◆ FindChild() [1/2]

Container::WidgetList::iterator Gui::Container::FindChild ( const Widget w)
protected

◆ FindChild() [2/2]

Container::WidgetList::const_iterator Gui::Container::FindChild ( const Widget w) const
protected

◆ GetChildPosition()

void Gui::Container::GetChildPosition ( const Widget child,
float  outPos[2] 
) const
Here is the call graph for this function:

◆ GetNumChildren()

int Gui::Container::GetNumChildren ( )
inline

◆ HideAll()

void Gui::Container::HideAll ( )
virtual
Here is the call graph for this function:

◆ HideChildren()

void Gui::Container::HideChildren ( )

◆ MoveChild()

void Gui::Container::MoveChild ( Widget w,
float  x,
float  y 
)
protected
Here is the call graph for this function:

◆ OnChildResizeRequest()

virtual void Gui::Container::OnChildResizeRequest ( Widget )
pure virtual

◆ OnMouseDown()

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

Reimplemented from Gui::Widget.

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

◆ OnMouseMotion()

bool Gui::Container::OnMouseMotion ( MouseMotionEvent e)
virtual

Reimplemented from Gui::Widget.

Reimplemented in Gui::VScrollPortal.

◆ OnMouseUp()

bool Gui::Container::OnMouseUp ( MouseButtonEvent e)
virtual

Reimplemented from Gui::Widget.

Reimplemented in Gui::VScrollPortal.

◆ PrependChild()

void Gui::Container::PrependChild ( Widget w,
float  x,
float  y 
)
protected
Here is the call graph for this function:

◆ RemoveAllChildren()

void Gui::Container::RemoveAllChildren ( )

◆ RemoveChild()

void Gui::Container::RemoveChild ( Widget w)
Here is the call graph for this function:

◆ SetBgColor()

void Gui::Container::SetBgColor ( const Color col)

◆ SetTransparency()

void Gui::Container::SetTransparency ( bool  a)
inline

◆ Show()

void Gui::Container::Show ( )
virtual

Reimplemented from Gui::Widget.

Reimplemented in Gui::Tabbed.

Here is the call graph for this function:

◆ ShowAll()

void Gui::Container::ShowAll ( )
virtual

Reimplemented from Gui::Widget.

Reimplemented in SectorView, and Gui::Stack.

Here is the call graph for this function:

◆ ShowChildren()

void Gui::Container::ShowChildren ( )

◆ UpdateAllChildSizes()

virtual void Gui::Container::UpdateAllChildSizes ( )
pure virtual

Member Data Documentation

◆ m_children

WidgetList Gui::Container::m_children
protected

◆ onMouseButtonEvent

sigc::signal<void, MouseButtonEvent *> Gui::Container::onMouseButtonEvent

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