Classes | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends

gui2::tgrid Class Reference

Base container class. More...

#include <grid.hpp>

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

List of all members.

Classes

class  iterator
 Iterator for the tchild items. More...
class  tchild
 Child item of the grid. More...

Public Member Functions

 tgrid (const unsigned rows=0, const unsigned cols=0)
virtual ~tgrid ()
unsigned add_row (const unsigned count=1)
 Addes a row to end of the grid.
void set_row_grow_factor (const unsigned row, const unsigned factor)
 Sets the grow factor for a row.
void set_column_grow_factor (const unsigned column, const unsigned factor)
 Sets the grow factor for a column.
void set_child (twidget *widget, const unsigned row, const unsigned col, const unsigned flags, const unsigned border_size)
 Sets a child in the grid.
twidgetswap_child (const std::string &id, twidget *widget, const bool recurse, twidget *new_parent=NULL)
 Exchangs a child in the grid.
void remove_child (const unsigned row, const unsigned col)
 Removes and frees a widget in a cell.
void remove_child (const std::string &id, const bool find_all=false)
 Removes and frees a widget in a cell by it's id.
void set_active (const bool active)
 Activates all children.
const twidgetwidget (const unsigned row, const unsigned col) const
 Returns the widget in the selected cell.
twidgetwidget (const unsigned row, const unsigned col)
 Returns the widget in the selected cell.
void layout_init (const bool full_initialization)
 Inherited from twidget.
void reduce_width (const unsigned maximum_width)
 Tries to reduce the width of a container.
void request_reduce_width (const unsigned maximum_width)
 Inherited from twidget.
void demand_reduce_width (const unsigned maximum_width)
 Inherited from twidget.
void reduce_height (const unsigned maximum_height)
 Tries to reduce the height of a container.
void request_reduce_height (const unsigned maximum_height)
 Inherited from twidget.
void demand_reduce_height (const unsigned maximum_height)
 Inherited from twidget.
tpoint recalculate_best_size ()
 Recalculates the best size.
bool can_wrap () const
 Inherited from twidget.
void place (const tpoint &origin, const tpoint &size)
 Inherited from twidget.
void set_origin (const tpoint &origin)
 Inherited from twidget.
void set_visible_area (const SDL_Rect &area)
 Inherited from twidget.
void layout_children ()
 Inherited from twidget.
void child_populate_dirty_list (twindow &caller, const std::vector< twidget * > &call_stack)
 Inherited from twidget.
twidgetfind_at (const tpoint &coordinate, const bool must_be_active)
 Inherited from twidget.
const twidgetfind_at (const tpoint &coordinate, const bool must_be_active) const
 Inherited from twidget.
twidgetfind (const std::string &id, const bool must_be_active)
 Inherited from twidget.
const twidgetfind (const std::string &id, const bool must_be_active) const
 Inherited from twidget.
bool has_widget (const twidget *widget) const
 Inherited from twidget.
bool disable_click_dismiss () const
 Inherited from tcontrol.
virtual iterator::twalker_create_walker ()
 Inherited from twidget.
void set_rows (const unsigned rows)
unsigned int get_rows () const
void set_cols (const unsigned cols)
unsigned int get_cols () const
void set_rows_cols (const unsigned rows, const unsigned cols)
 Wrapper to set_rows and set_cols.
iterator begin ()
iterator end ()

Static Public Attributes

static const unsigned VERTICAL_SHIFT = 0
static const unsigned VERTICAL_GROW_SEND_TO_CLIENT = 1 << VERTICAL_SHIFT
static const unsigned VERTICAL_ALIGN_TOP = 2 << VERTICAL_SHIFT
static const unsigned VERTICAL_ALIGN_CENTER = 3 << VERTICAL_SHIFT
static const unsigned VERTICAL_ALIGN_BOTTOM = 4 << VERTICAL_SHIFT
static const unsigned VERTICAL_MASK = 7 << VERTICAL_SHIFT
static const unsigned HORIZONTAL_SHIFT = 3
static const unsigned HORIZONTAL_GROW_SEND_TO_CLIENT = 1 << HORIZONTAL_SHIFT
static const unsigned HORIZONTAL_ALIGN_LEFT = 2 << HORIZONTAL_SHIFT
static const unsigned HORIZONTAL_ALIGN_CENTER = 3 << HORIZONTAL_SHIFT
static const unsigned HORIZONTAL_ALIGN_RIGHT = 4 << HORIZONTAL_SHIFT
static const unsigned HORIZONTAL_MASK = 7 << HORIZONTAL_SHIFT
static const unsigned BORDER_TOP = 1 << 6
static const unsigned BORDER_BOTTOM = 1 << 7
static const unsigned BORDER_LEFT = 1 << 8
static const unsigned BORDER_RIGHT = 1 << 9
static const unsigned BORDER_ALL

Private Member Functions

tpoint calculate_best_size () const
 Inherited from twidget.
const tchildchild (const unsigned row, const unsigned col) const
tchildchild (const unsigned row, const unsigned col)
void layout (const tpoint &origin)
 Layouts the children in the grid.
void impl_draw_children (surface &frame_buffer)
 Inherited from twidget.
void impl_draw_children (surface &frame_buffer, int x_offset, int y_offset)

Private Attributes

unsigned rows_
 The number of grid rows.
unsigned cols_
 The number of grid columns.
std::vector< unsigned > row_height_
 The row heights in the grid.
std::vector< unsigned > col_width_
 The column widths in the grid.
std::vector< unsigned > row_grow_factor_
 The grow factor for all rows.
std::vector< unsigned > col_grow_factor_
 The grow factor for all columns.
std::vector< tchildchildren_
 The child items.

Friends

class tdebug_layout_graph
struct tgrid_implementation

Detailed Description

Base container class.

This class holds a number of widgets and their wanted layout parameters. It also layouts the items in the grid and hanldes their drawing.

Definition at line 29 of file grid.hpp.


Constructor & Destructor Documentation

gui2::tgrid::tgrid ( const unsigned  rows = 0,
const unsigned  cols = 0 
) [explicit]

Definition at line 37 of file grid.cpp.

Referenced by create_walker().

Here is the caller graph for this function:

gui2::tgrid::~tgrid (  )  [virtual]

Definition at line 48 of file grid.cpp.

References child(), children_, and gui2::tgrid::tchild::widget().

Here is the call graph for this function:


Member Function Documentation

unsigned gui2::tgrid::add_row ( const unsigned  count = 1  ) 

Addes a row to end of the grid.

Parameters:
count Number of rows to add, should be > 0.
Returns:
The row number of the first row added.

Definition at line 57 of file grid.cpp.

References cols_, rows_, and set_rows_cols().

Referenced by gui2::tcontainer_::add_row().

Here is the call graph for this function:

Here is the caller graph for this function:

iterator gui2::tgrid::begin (  )  [inline]

Definition at line 389 of file grid.hpp.

References children_.

Referenced by gui2::tcontainer_::begin().

Here is the caller graph for this function:

tpoint gui2::tgrid::calculate_best_size (  )  const [private, virtual]

Inherited from twidget.

Implements gui2::twidget.

Definition at line 379 of file grid.cpp.

References child(), col_width_, cols_, DBG_GUI_L, gui2::tgrid::tchild::get_best_size(), gui2::log_gui_layout, LOG_HEADER, log_scope2, LOG_SCOPE_HEADER, row_height_, rows_, gui2::tpoint::x, and gui2::tpoint::y.

Referenced by place(), recalculate_best_size(), request_reduce_height(), and request_reduce_width().

Here is the call graph for this function:

Here is the caller graph for this function:

bool gui2::tgrid::can_wrap (  )  const [virtual]

Inherited from twidget.

Reimplemented from gui2::twidget.

Definition at line 428 of file grid.cpp.

References gui2::tgrid::tchild::can_wrap(), child(), and children_.

Referenced by gui2::tscrollbar_container::can_wrap(), and gui2::tcontainer_::can_wrap().

Here is the call graph for this function:

Here is the caller graph for this function:

const tchild& gui2::tgrid::child ( const unsigned  row,
const unsigned  col 
) const [inline, private]
tchild& gui2::tgrid::child ( const unsigned  row,
const unsigned  col 
) [inline, private]

Definition at line 422 of file grid.hpp.

References children_, and rows_.

void gui2::tgrid::child_populate_dirty_list ( twindow caller,
const std::vector< twidget * > &  call_stack 
) [virtual]

Inherited from twidget.

Reimplemented from gui2::twidget.

Definition at line 588 of file grid.cpp.

References child(), children_, gui2::twidget::populate_dirty_list(), and gui2::tgrid::tchild::widget().

Here is the call graph for this function:

iterator::twalker_ * gui2::tgrid::create_walker (  )  [virtual]

Inherited from twidget.

Implements gui2::twidget.

Definition at line 660 of file grid.cpp.

References tgrid().

Referenced by test_grid().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::demand_reduce_height ( const unsigned  maximum_height  )  [virtual]

Inherited from twidget.

Todo:
Implement.

Reimplemented from gui2::twidget.

Definition at line 367 of file grid.cpp.

Referenced by gui2::tcontainer_::demand_reduce_height().

Here is the caller graph for this function:

void gui2::tgrid::demand_reduce_width ( const unsigned  maximum_width  )  [virtual]

Inherited from twidget.

Todo:
Implement.

Reimplemented from gui2::twidget.

Definition at line 270 of file grid.cpp.

Referenced by gui2::tcontainer_::demand_reduce_width().

Here is the caller graph for this function:

bool gui2::tgrid::disable_click_dismiss (  )  const [virtual]
iterator gui2::tgrid::end (  )  [inline]

Definition at line 390 of file grid.hpp.

References children_.

Referenced by gui2::tcontainer_::end().

Here is the caller graph for this function:

const twidget * gui2::tgrid::find ( const std::string &  id,
const bool  must_be_active 
) const [virtual]

Inherited from twidget.

Reimplemented from gui2::twidget.

Definition at line 622 of file grid.cpp.

twidget * gui2::tgrid::find ( const std::string &  id,
const bool  must_be_active 
) [virtual]

Inherited from twidget.

Reimplemented from gui2::twidget.

Definition at line 616 of file grid.cpp.

Referenced by gui2::tscroll_label::finalize_subclass(), gui2::ttree_view_node::find(), and gui2::tcontainer_::find().

Here is the caller graph for this function:

twidget * gui2::tgrid::find_at ( const tpoint coordinate,
const bool  must_be_active 
) [virtual]

Inherited from twidget.

Reimplemented from gui2::twidget.

Definition at line 602 of file grid.cpp.

Referenced by gui2::tcontainer_::find_at().

Here is the caller graph for this function:

const twidget * gui2::tgrid::find_at ( const tpoint coordinate,
const bool  must_be_active 
) const [virtual]

Inherited from twidget.

Reimplemented from gui2::twidget.

Definition at line 609 of file grid.cpp.

unsigned int gui2::tgrid::get_cols (  )  const [inline]

Definition at line 281 of file grid.hpp.

References cols_.

Referenced by gui2::tcontainer_::get_cols(), gui2::ttree_view_node::init_grid(), and gui2::twindow::~twindow().

Here is the caller graph for this function:

unsigned int gui2::tgrid::get_rows (  )  const [inline]

Definition at line 278 of file grid.hpp.

References rows_.

Referenced by gui2::tcontainer_::get_rows(), gui2::ttree_view_node::init_grid(), and gui2::twindow::~twindow().

Here is the caller graph for this function:

bool gui2::tgrid::has_widget ( const twidget widget  )  const [virtual]

Inherited from twidget.

Reimplemented from gui2::twidget.

Definition at line 629 of file grid.cpp.

References child(), children_, gui2::twidget::has_widget(), and gui2::tgrid::tchild::widget().

Referenced by gui2::tcontainer_::has_widget(), gui2::tlistbox::list_item_clicked(), and gui2::tpane::signal_handler_request_placement().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::impl_draw_children ( surface frame_buffer  )  [private, virtual]
void gui2::tgrid::impl_draw_children ( surface frame_buffer,
int  x_offset,
int  y_offset 
) [private, virtual]
void gui2::tgrid::layout ( const tpoint origin  )  [private]

Layouts the children in the grid.

Definition at line 904 of file grid.cpp.

References child(), col_width_, cols_, DBG_GUI_L, LOG_HEADER, gui2::tgrid::tchild::place(), row_height_, rows_, widget(), gui2::tpoint::x, and gui2::tpoint::y.

Referenced by place().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::layout_children (  )  [virtual]

Inherited from twidget.

Reimplemented from gui2::twidget.

Definition at line 580 of file grid.cpp.

References child(), children_, gui2::twidget::layout_children(), and gui2::tgrid::tchild::widget().

Referenced by gui2::tscrollbar_container::layout_children(), gui2::tcontainer_::layout_children(), and gui2::tstacked_widget::layout_children().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::layout_init ( const bool  full_initialization  )  [virtual]
void gui2::tgrid::place ( const tpoint origin,
const tpoint size 
) [virtual]
tpoint gui2::tgrid::recalculate_best_size (  ) 

Recalculates the best size.

This is used for scrollbar containers when they try to update their contents size before falling back to the 'global' invalidate_layout.

Returns:
The newly calculated size.

Definition at line 372 of file grid.cpp.

References calculate_best_size(), and gui2::twidget::set_layout_size().

Referenced by gui2::tscrollbar_container::content_resize_request().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::reduce_height ( const unsigned  maximum_height  ) 

Tries to reduce the height of a container.

See also:
layout_algorihm for more information.
Parameters:
maximum_height The wanted maximum height.

Todo:
Implement.

Definition at line 275 of file grid.cpp.

References DBG_GUI_L, gui2::twidget::get_best_size(), gui2::log_gui_layout, LOG_HEADER, log_scope2, LOG_SCOPE_HEADER, request_reduce_height(), and gui2::tpoint::y.

Referenced by gui2::tcontainer_::reduce_height().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::reduce_width ( const unsigned  maximum_width  ) 

Tries to reduce the width of a container.

See also:
layout_algorihm for more information.
Parameters:
maximum_width The wanted maximum width.

Todo:
Implement.

Definition at line 197 of file grid.cpp.

References DBG_GUI_L, gui2::twidget::get_best_size(), gui2::log_gui_layout, LOG_HEADER, log_scope2, LOG_SCOPE_HEADER, request_reduce_width(), and gui2::tpoint::x.

Referenced by gui2::tcontainer_::reduce_width().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::remove_child ( const unsigned  row,
const unsigned  col 
)

Removes and frees a widget in a cell.

Parameters:
row The row of the cell.
col The columnof the cell.

Definition at line 135 of file grid.cpp.

References child(), cols_, rows_, gui2::tgrid::tchild::set_widget(), and gui2::tgrid::tchild::widget().

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

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::remove_child ( const std::string &  id,
const bool  find_all = false 
)

Removes and frees a widget in a cell by it's id.

Parameters:
id The id of the widget to free.
find_all If true if removes all items with the id, otherwise it stops after removing the first item (or once all children have been tested).

Definition at line 147 of file grid.cpp.

References child(), children_, gui2::tgrid::tchild::id(), gui2::tgrid::tchild::set_widget(), and gui2::tgrid::tchild::widget().

Here is the call graph for this function:

void gui2::tgrid::request_reduce_height ( const unsigned  maximum_height  )  [virtual]

Inherited from twidget.

Todo:
this point shouldn't be reached, find out why it does.
Todo:
Improve this code.

Now we try every item to be reduced, maybe items need a flag whether or not to try to reduce and also eveluate whether the force reduction is still needed.

Reimplemented from gui2::twidget.

Definition at line 308 of file grid.cpp.

References calculate_best_size(), DBG_GUI_L, gui2::twidget::get_best_size(), LOG_HEADER, row_height_, gui2::tgrid_implementation::row_request_reduce_height(), rows_, gui2::twidget::set_layout_size(), and gui2::tpoint::y.

Referenced by reduce_height(), gui2::tscrollbar_container::request_reduce_height(), and gui2::tcontainer_::request_reduce_height().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::request_reduce_width ( const unsigned  maximum_width  )  [virtual]

Inherited from twidget.

Todo:
this point shouldn't be reached, find out why it does.

Implements gui2::twidget.

Definition at line 230 of file grid.cpp.

References calculate_best_size(), col_width_, cols_, gui2::tgrid_implementation::column_request_reduce_width(), DBG_GUI_L, gui2::twidget::get_best_size(), LOG_HEADER, gui2::twidget::set_layout_size(), and gui2::tpoint::x.

Referenced by reduce_width(), gui2::tscrollbar_container::request_reduce_width(), and gui2::tcontainer_::request_reduce_width().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::set_active ( const bool  active  ) 

Activates all children.

If a child inherits from tcontrol or is a tgrid it will call set_active() for the child otherwise it ignores the widget.

Parameters:
active Parameter for set_active.

Definition at line 162 of file grid.cpp.

References child(), children_, preferences::grid(), gui2::tcontrol::set_active(), set_active(), gui2::tgrid::tchild::widget(), and widget().

Referenced by set_active(), gui2::tcontainer_::set_active(), and gui2::tlistbox::set_row_active().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::set_child ( twidget widget,
const unsigned  row,
const unsigned  col,
const unsigned  flags,
const unsigned  border_size 
)

Sets a child in the grid.

When the child is added to the grid the grid 'owns' the widget. The widget is put in a cell, and every cell can only contain 1 widget if the wanted cell already contains a widget, that widget is freed and removed.

Parameters:
widget The widget to put in the grid.
row The row of the cell.
col The columnof the cell.
flags The flags for the widget in the cell.
border_size The size of the border for the cell, how the border is applied depends on the flags.

Definition at line 68 of file grid.cpp.

References child(), cols_, HORIZONTAL_MASK, gui2::tgrid::tchild::id(), LOG_HEADER, rows_, gui2::tgrid::tchild::set_border_size(), gui2::tgrid::tchild::set_flags(), gui2::twidget::set_parent(), gui2::tgrid::tchild::set_widget(), VERTICAL_MASK, gui2::tgrid::tchild::widget(), and WRN_GUI_G.

Referenced by add_widget(), gui2::tbuilder_grid::build(), gui2::ttree_view::finalize_setup(), and gui2::tcontainer_::set_child().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::set_cols ( const unsigned  cols  ) 

Definition at line 674 of file grid.cpp.

References cols_, rows_, and set_rows_cols().

Referenced by gui2::tcontainer_::set_cols().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::set_column_grow_factor ( const unsigned  column,
const unsigned  factor 
) [inline]

Sets the grow factor for a column.

Todo:
refer to a page with the layout manipulation info.
Parameters:
column The column to modify.
factor The grow factor.

Definition at line 96 of file grid.hpp.

References col_grow_factor_, and gui2::twidget::set_dirty().

Referenced by gui2::tbuilder_grid::build(), and gui2::tcontainer_::set_column_grow_factor().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::set_origin ( const tpoint origin  )  [virtual]
void gui2::tgrid::set_row_grow_factor ( const unsigned  row,
const unsigned  factor 
) [inline]

Sets the grow factor for a row.

Todo:
refer to a page with the layout manipulation info.
Parameters:
row The row to modify.
factor The grow factor.

Definition at line 81 of file grid.hpp.

References row_grow_factor_, and gui2::twidget::set_dirty().

Referenced by gui2::tbuilder_grid::build(), and gui2::tcontainer_::set_row_grow_factor().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::set_rows ( const unsigned  rows  ) 

Definition at line 665 of file grid.cpp.

References cols_, rows_, and set_rows_cols().

Referenced by gui2::tcontainer_::set_rows().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::set_rows_cols ( const unsigned  rows,
const unsigned  cols 
)

Wrapper to set_rows and set_cols.

Parameters:
rows Parameter to call set_rows with.
cols Parameter to call set_cols with.

Definition at line 683 of file grid.cpp.

References children_, col_grow_factor_, cols_, LOG_HEADER, row_grow_factor_, rows_, and WRN_GUI_G.

Referenced by add_row(), gui2::tbuilder_grid::build(), gui2::ttree_view::finalize_setup(), set_cols(), set_rows(), and gui2::tcontainer_::set_rows_cols().

Here is the caller graph for this function:

void gui2::tgrid::set_visible_area ( const SDL_Rect &  area  )  [virtual]
twidget * gui2::tgrid::swap_child ( const std::string &  id,
twidget widget,
const bool  recurse,
twidget new_parent = NULL 
)

Exchangs a child in the grid.

It replaced the child with a certain id with the new widget but doesn't touch the other settings of the child.

Parameters:
id The id of the widget to free.
widget The widget to put in the grid.
recurse Do we want to decent into the child grids.
new_parent The new parent for the swapped out widget.

returns The widget which got removed (the parent of the widget is cleared). If no widget found and thus not replace NULL will returned.

Definition at line 97 of file grid.cpp.

References child(), children_, preferences::grid(), gui2::tgrid::tchild::id(), gui2::twidget::set_parent(), gui2::tgrid::tchild::set_widget(), swap_child(), and gui2::tgrid::tchild::widget().

Referenced by gui2::tscrollbar_container::finalize_setup(), and swap_child().

Here is the call graph for this function:

Here is the caller graph for this function:

const twidget* gui2::tgrid::widget ( const unsigned  row,
const unsigned  col 
) const [inline]

Returns the widget in the selected cell.

Definition at line 172 of file grid.hpp.

References child(), and gui2::tgrid::tchild::widget().

Referenced by disable_click_dismiss(), impl_draw_children(), gui2::ttree_view_node::init_grid(), layout(), gui2::policy::select_action::tselect::select(), set_active(), set_origin(), and set_visible_area().

Here is the call graph for this function:

Here is the caller graph for this function:

twidget* gui2::tgrid::widget ( const unsigned  row,
const unsigned  col 
) [inline]

Returns the widget in the selected cell.

Definition at line 176 of file grid.hpp.

References child(), and gui2::tgrid::tchild::widget().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class tdebug_layout_graph [friend]

Reimplemented from gui2::twidget.

Definition at line 31 of file grid.hpp.

friend struct tgrid_implementation [friend]

Definition at line 32 of file grid.hpp.


Member Data Documentation

const unsigned gui2::tgrid::BORDER_ALL [static]
Initial value:

Definition at line 59 of file grid.hpp.

const unsigned gui2::tgrid::BORDER_BOTTOM = 1 << 7 [static]

Definition at line 56 of file grid.hpp.

Referenced by gui2::tgrid::tchild::border_space(), and gui2::tgrid::tchild::place().

const unsigned gui2::tgrid::BORDER_LEFT = 1 << 8 [static]

Definition at line 57 of file grid.hpp.

Referenced by gui2::tgrid::tchild::border_space(), and gui2::tgrid::tchild::place().

const unsigned gui2::tgrid::BORDER_RIGHT = 1 << 9 [static]

Definition at line 58 of file grid.hpp.

Referenced by gui2::tgrid::tchild::border_space(), and gui2::tgrid::tchild::place().

const unsigned gui2::tgrid::BORDER_TOP = 1 << 6 [static]

Definition at line 55 of file grid.hpp.

Referenced by gui2::tgrid::tchild::border_space(), and gui2::tgrid::tchild::place().

std::vector<tchild> gui2::tgrid::children_ [private]

The child items.

All children are stored in a 1D vector and the formula to access a cell is: rows_ * col + row. All other vectors use the same access formula.

Definition at line 419 of file grid.hpp.

Referenced by begin(), can_wrap(), child(), child_populate_dirty_list(), disable_click_dismiss(), end(), has_widget(), impl_draw_children(), layout_children(), layout_init(), remove_child(), set_active(), set_origin(), set_rows_cols(), set_visible_area(), swap_child(), and ~tgrid().

std::vector<unsigned> gui2::tgrid::col_grow_factor_ [private]

The grow factor for all columns.

Definition at line 411 of file grid.hpp.

Referenced by place(), set_column_grow_factor(), and set_rows_cols().

std::vector<unsigned> gui2::tgrid::col_width_ [mutable, private]

The column widths in the grid.

Definition at line 405 of file grid.hpp.

Referenced by calculate_best_size(), layout(), place(), and request_reduce_width().

unsigned gui2::tgrid::cols_ [private]

Definition at line 51 of file grid.hpp.

Referenced by gui2::twindow::layout(), and gui2::tgrid::tchild::place().

const unsigned gui2::tgrid::HORIZONTAL_ALIGN_LEFT = 2 << HORIZONTAL_SHIFT [static]

Definition at line 50 of file grid.hpp.

Referenced by gui2::twindow::layout(), and gui2::tgrid::tchild::place().

const unsigned gui2::tgrid::HORIZONTAL_ALIGN_RIGHT = 4 << HORIZONTAL_SHIFT [static]

Definition at line 52 of file grid.hpp.

Referenced by gui2::twindow::layout(), and gui2::tgrid::tchild::place().

const unsigned gui2::tgrid::HORIZONTAL_MASK = 7 << HORIZONTAL_SHIFT [static]

Definition at line 53 of file grid.hpp.

Referenced by gui2::tgrid::tchild::place(), and set_child().

const unsigned gui2::tgrid::HORIZONTAL_SHIFT = 3 [static]

Definition at line 48 of file grid.hpp.

std::vector<unsigned> gui2::tgrid::row_grow_factor_ [private]

The grow factor for all rows.

Definition at line 408 of file grid.hpp.

Referenced by place(), set_row_grow_factor(), and set_rows_cols().

std::vector<unsigned> gui2::tgrid::row_height_ [mutable, private]

The row heights in the grid.

Definition at line 402 of file grid.hpp.

Referenced by calculate_best_size(), layout(), place(), and request_reduce_height().

unsigned gui2::tgrid::rows_ [private]
const unsigned gui2::tgrid::VERTICAL_ALIGN_BOTTOM = 4 << VERTICAL_SHIFT [static]

Definition at line 45 of file grid.hpp.

Referenced by gui2::twindow::layout(), and gui2::tgrid::tchild::place().

const unsigned gui2::tgrid::VERTICAL_ALIGN_CENTER = 3 << VERTICAL_SHIFT [static]

Definition at line 44 of file grid.hpp.

Referenced by gui2::twindow::layout(), and gui2::tgrid::tchild::place().

const unsigned gui2::tgrid::VERTICAL_ALIGN_TOP = 2 << VERTICAL_SHIFT [static]

Definition at line 43 of file grid.hpp.

Referenced by gui2::twindow::layout(), and gui2::tgrid::tchild::place().

const unsigned gui2::tgrid::VERTICAL_MASK = 7 << VERTICAL_SHIFT [static]

Definition at line 46 of file grid.hpp.

Referenced by gui2::tgrid::tchild::place(), and set_child().

const unsigned gui2::tgrid::VERTICAL_SHIFT = 0 [static]

Definition at line 41 of file grid.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:22:54 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs