15 #ifndef GUI_WIDGETS_LIST_HPP_INCLUDED
16 #define GUI_WIDGETS_LIST_HPP_INCLUDED
18 #ifdef GUI2_EXPERIMENTAL_LISTBOX
32 class tlist :
public tcontainer_
34 friend class tdebug_layout_graph;
48 tlist(
const bool has_minimum,
49 const bool has_maximum,
84 void add_row(
const std::map<std::string /* widget id */, string_map>&
data,
85 const int index = -1);
93 void append_rows(
const std::vector<string_map>&
items);
103 void remove_row(
const unsigned row,
unsigned count = 1);
109 unsigned get_item_count()
const;
119 void set_row_active(
const unsigned row,
const bool active);
127 void set_row_shown(
const unsigned row,
const bool shown);
141 void set_row_shown(
const std::vector<bool>& shown);
155 const tgrid* get_row_grid(
const unsigned row)
const;
164 tgrid* get_row_grid(
const unsigned row);
172 bool select_row(
const unsigned row,
const bool select =
true);
180 int get_selected_row()
const;
196 bool update_content_size();
204 virtual bool get_active()
const override;
207 virtual unsigned get_state()
const override;
210 virtual void place(
const tpoint& origin,
const tpoint&
size)
override;
239 tgenerator_* generator_;
262 const int width_modification
263 ,
const int height_modification);
266 void layout_children(
const bool force);
269 virtual void set_content_size(
const tpoint& origin,
const tpoint&
size);
272 virtual void set_self_active(
const bool active)
override;
275 virtual const std::string& get_control_type()
const override;
281 void signal_handler_pre_child_left_button_click(tgrid*
grid,
286 void signal_handler_left_button_click(tgrid*
grid,
295 typedef tlist tlistbox;
boost::intrusive_ptr< const tbuilder_grid > tbuilder_grid_const_ptr
void clear(const std::string &key)
tplacement
Determines how the items are placed.
const std::vector< std::string > items
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
A class inherited from ttext_box that displays its input as stars.
tevent
The event send to the dispatcher.
bool init()
Initializes the gui subsystems.
GLuint GLuint GLsizei count
std::map< std::string, t_string > string_map
GLenum GLenum GLvoid * row
GLsizei const GLcharARB ** string