gui2::tpanel Class Reference

Visible container to hold children. More...

#include <panel.hpp>

Inheritance diagram for gui2::tpanel:

Inheritance graph
[legend]
Collaboration diagram for gui2::tpanel:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 tpanel (const unsigned canvas_count=2)
 Constructor.
twidgetfind_widget (const tpoint &coordinate, const bool must_be_active)
 Inherited from tcontrol.
const twidgetfind_widget (const tpoint &coordinate, const bool must_be_active) const
 Inherited from tcontrol.
twidgetfind_widget (const std::string &id, const bool must_be_active)
 Inherited from tcontrol.
const twidgetfind_widget (const std::string &id, const bool must_be_active) const
 Inherited from tcontrol.
bool has_vertical_scrollbar () const
 Inherited from twidget.
void set_active (const bool)
 A panel is always active atm so ignore the request.
bool get_active () const
 Gets the active state of the control.
unsigned get_state () const
 Returns the id of the state, which is also the index for the canvas.
void draw (surface &surface)
 Inherited from tcontrol.
SDL_Rect get_client_rect () const

Private Member Functions

const std::string & get_control_type () const
 Inherited from tcontrol.
tpoint border_space () const
 Inherited from tcontainer_.


Detailed Description

Visible container to hold children.

Definition at line 23 of file panel.hpp.


Constructor & Destructor Documentation

gui2::tpanel::tpanel ( const unsigned  canvas_count = 2  )  [inline]

Constructor.

Parameters:
canvas_count The canvas count for tcontrol.

Definition at line 30 of file panel.hpp.


Member Function Documentation

twidget* gui2::tpanel::find_widget ( const tpoint coordinate,
const bool  must_be_active 
) [inline, virtual]

Inherited from tcontrol.

Reimplemented from gui2::tcontainer_.

Reimplemented in gui2::twindow.

Definition at line 35 of file panel.hpp.

References gui2::tcontainer_::find_widget().

Referenced by gui2::twindow::find_widget().

const twidget* gui2::tpanel::find_widget ( const tpoint coordinate,
const bool  must_be_active 
) const [inline, virtual]

Inherited from tcontrol.

Reimplemented from gui2::tcontainer_.

Reimplemented in gui2::twindow.

Definition at line 38 of file panel.hpp.

References gui2::tcontainer_::find_widget().

twidget* gui2::tpanel::find_widget ( const std::string &  id,
const bool  must_be_active 
) [inline, virtual]

Inherited from tcontrol.

Reimplemented from gui2::tcontainer_.

Reimplemented in gui2::twindow.

Definition at line 42 of file panel.hpp.

References gui2::tcontainer_::find_widget().

const twidget* gui2::tpanel::find_widget ( const std::string &  id,
const bool  must_be_active 
) const [inline, virtual]

Inherited from tcontrol.

Reimplemented from gui2::tcontainer_.

Reimplemented in gui2::twindow.

Definition at line 45 of file panel.hpp.

References gui2::tcontainer_::find_widget().

bool gui2::tpanel::has_vertical_scrollbar (  )  const [inline, virtual]

Inherited from twidget.

Since we can't define a good default behaviour we force the inheriting classes to define this function. So inheriting classes act as one widget others as a collection of multiple objects.

Implements gui2::tcontainer_.

Definition at line 49 of file panel.hpp.

void gui2::tpanel::set_active ( const   bool  )  [inline, virtual]

A panel is always active atm so ignore the request.

Implements gui2::tcontrol.

Reimplemented in gui2::twindow.

Definition at line 52 of file panel.hpp.

bool gui2::tpanel::get_active (  )  const [inline, virtual]

Gets the active state of the control.

Implements gui2::tcontrol.

Reimplemented in gui2::twindow.

Definition at line 53 of file panel.hpp.

unsigned gui2::tpanel::get_state (  )  const [inline, virtual]

Returns the id of the state, which is also the index for the canvas.

Implements gui2::tcontrol.

Reimplemented in gui2::twindow.

Definition at line 54 of file panel.hpp.

void gui2::tpanel::draw ( surface surface  )  [virtual]

Inherited from tcontrol.

Reimplemented from gui2::tcontainer_.

Reimplemented in gui2::twindow.

Definition at line 41 of file panel.cpp.

References blit_surface(), gui2::tcontrol::canvas(), gui2::tcontainer_::dirty(), cursor::draw(), gui2::twidget::get_rect(), and rect.

SDL_Rect gui2::tpanel::get_client_rect (  )  const [virtual]

const std::string& gui2::tpanel::get_control_type (  )  const [inline, private, virtual]

Inherited from tcontrol.

Implements gui2::tcontrol.

Reimplemented in gui2::twindow.

Definition at line 64 of file panel.hpp.

References type.

tpoint gui2::tpanel::border_space (  )  const [private, virtual]


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs