Public Member Functions | Private Attributes

gui2::policy::placement::thorizontal_list Struct Reference

Places the items in a horizontal row. More...

#include <generator_private.hpp>

Inheritance diagram for gui2::policy::placement::thorizontal_list:
Inheritance graph
[legend]
Collaboration diagram for gui2::policy::placement::thorizontal_list:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 thorizontal_list ()
void create_item (const unsigned index)
 Called when an item is created.
void request_reduce_width (const unsigned)
 Tries to reduce the width for the generator.
virtual void request_reduce_height (const unsigned)
 Tries to reduce the height for the generator.
tpoint calculate_best_size () const
 Calculates the best size for the generator.
void place (const tpoint &origin, const tpoint &size)
 Sets the size of the generator.
void set_origin (const tpoint &origin)
 Sets the origin of the generator.
void set_visible_area (const SDL_Rect &area)
 Sets the visible area of the generator.
twidgetfind_at (const tpoint &coordinate, const bool must_be_active)
 Inherited from tgenerator_.
const twidgetfind_at (const tpoint &coordinate, const bool must_be_active) const
 Inherited from tgenerator_.
void handle_key_up_arrow (SDLMod, bool &)
 Inherited from tgenerator_.
void handle_key_down_arrow (SDLMod, bool &)
 Inherited from tgenerator_.
void handle_key_left_arrow (SDLMod modifier, bool &handled)
 Inherited from tgenerator_.
void handle_key_right_arrow (SDLMod modifier, bool &handled)
 Inherited from tgenerator_.

Private Attributes

bool placed_
 Has the grid already been placed?

Detailed Description

Places the items in a horizontal row.

Definition at line 164 of file generator_private.hpp.


Constructor & Destructor Documentation

gui2::policy::placement::thorizontal_list::thorizontal_list (  ) 

Definition at line 95 of file generator.cpp.


Member Function Documentation

tpoint gui2::policy::placement::thorizontal_list::calculate_best_size (  )  const [virtual]

Calculates the best size for the generator.

Returns:
The best size,

Implements gui2::tgenerator_.

Definition at line 110 of file generator.cpp.

void gui2::policy::placement::thorizontal_list::create_item ( const unsigned  index  ) 

Called when an item is created.

This function should place the new item.

Parameters:
index The index of the new item.

Todo:
implement.

Definition at line 100 of file generator.cpp.

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

Inherited from tgenerator_.

Implements gui2::tgenerator_.

Definition at line 194 of file generator.cpp.

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

Inherited from tgenerator_.

Implements gui2::tgenerator_.

Definition at line 216 of file generator.cpp.

void gui2::policy::placement::thorizontal_list::handle_key_down_arrow ( SDLMod  ,
bool &   
) [inline, virtual]

Inherited from tgenerator_.

Implements gui2::tgenerator_.

Definition at line 243 of file generator_private.hpp.

void gui2::policy::placement::thorizontal_list::handle_key_left_arrow ( SDLMod  modifier,
bool &  handled 
) [virtual]

Inherited from tgenerator_.

Implements gui2::tgenerator_.

Definition at line 238 of file generator.cpp.

void gui2::policy::placement::thorizontal_list::handle_key_right_arrow ( SDLMod  modifier,
bool &  handled 
) [virtual]

Inherited from tgenerator_.

Implements gui2::tgenerator_.

Definition at line 260 of file generator.cpp.

void gui2::policy::placement::thorizontal_list::handle_key_up_arrow ( SDLMod  ,
bool &   
) [inline, virtual]

Inherited from tgenerator_.

Implements gui2::tgenerator_.

Definition at line 237 of file generator_private.hpp.

void gui2::policy::placement::thorizontal_list::place ( const tpoint origin,
const tpoint size 
) [virtual]

Sets the size of the generator.

Parameters:
origin The origin of the generator.
size The size of the generator.

Implements gui2::tgenerator_.

Definition at line 133 of file generator.cpp.

virtual void gui2::policy::placement::thorizontal_list::request_reduce_height ( const   unsigned  )  [inline, virtual]

Tries to reduce the height for the generator.

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

Implements gui2::tgenerator_.

Definition at line 194 of file generator_private.hpp.

void gui2::policy::placement::thorizontal_list::request_reduce_width ( const   unsigned  )  [inline, virtual]

Tries to reduce the width for the generator.

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

Implements gui2::tgenerator_.

Definition at line 185 of file generator_private.hpp.

void gui2::policy::placement::thorizontal_list::set_origin ( const tpoint origin  )  [virtual]

Sets the origin of the generator.

Parameters:
origin The origin of the generator.

Implements gui2::tgenerator_.

Definition at line 164 of file generator.cpp.

void gui2::policy::placement::thorizontal_list::set_visible_area ( const SDL_Rect &  area  )  [virtual]

Sets the visible area of the generator.

Parameters:
area The visible area.

Implements gui2::tgenerator_.

Definition at line 179 of file generator.cpp.


Member Data Documentation

Has the grid already been placed?

If the grid is placed it's no problem set the location of the new item,it hasn't been placed, there's no information about its location so do nothing.

Definition at line 262 of file generator_private.hpp.


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

Generated by doxygen 1.7.1 on Fri May 25 2012 01:23:43 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs