Logo Search packages:      
Sourcecode: widelands version File versions  Download package

UI::Listselect< Entry & > Struct Template Reference

#include <ui_listselect.h>

Inheritance diagram for UI::Listselect< Entry & >:

UI::BaseListselect UI::Panel UI::Object

List of all members.

Detailed Description

template<typename Entry>
struct UI::Listselect< Entry & >

This template specialization is for backwards compatibility and convenience only. Allowing references as template parameter is not a good idea (e.g. STL containers don't allow it), you should really use pointers instead because they are more explicit, and that's what this specialization does internally.

Definition at line 173 of file ui_listselect.h.

Public Types

enum  {
  pf_handle_mouse = 1, pf_think = 2, pf_top_on_click = 4, pf_die = 8,
  pf_child_die = 16, pf_visible = 32, pf_can_focus = 64, pf_snap_windows_only_when_overlapping = 128,
  pf_dock_windows_to_edges = 256
typedef Listselect< Entry * > Base

Public Member Functions

void add (const char *const name, uint value, const int picid=-1, const bool select_this=false)
void add (const char *const name, Entry value, const int picid=-1, const bool select_this=false)
void add (const char *const name, Entry &value, const int picid=-1, const bool select_this=false)
void center_mouse ()
void clear ()
void draw (RenderTarget *dst)
virtual void draw_border (RenderTarget *dst)
virtual void draw_overlay (RenderTarget &dst)
virtual void end ()
void end_modal (int code)
void fit_inner (Panel *inner)
void focus ()
void free_children ()
uint get_bborder () const
ushort get_border_snap_distance () const
bool get_can_focus () const
bool get_dock_windows_to_edges () const
uint get_eff_w () const throw ()
const Panelget_first_child () const
int get_h () const
bool get_handle_mouse () const
int get_inner_h () const
int get_inner_w () const
const Panelget_last_child () const
uint get_lborder () const
uint get_lineheight () const throw ()
 Return the total height (text + spacing) occupied by a single line.
Point get_mouse_position () const throw ()
const Panelget_next_sibling () const
uchar get_panel_snap_distance () const
Panelget_parent () const
const Panelget_prev_sibling () const
uint get_rborder () const
Entry & get_selected () const
bool get_snap_windows_only_when_overlapping () const
uint get_tborder () const
bool get_think () const
bool get_top_on_click () const
bool get_visible () const
int get_w () const
int get_x () const
int get_y () const
void grab_mouse (bool grab)
virtual bool handle_key (bool down, int code, char c)
virtual void handle_mousein (bool inside)
virtual bool handle_mousemove (const Uint8 state, int x, int y, int xdiff, int ydiff)
bool handle_mousepress (const Uint8 btn, int x, int y)
bool handle_mouserelease (const Uint8 btn, int x, int y)
bool has_focus () const
bool has_selection () const throw ()
virtual bool is_snap_target () const
 Listselect (Panel *parent, int x, int y, uint w, uint h, Align align=Align_Left, bool show_check=false)
virtual void move_inside_parent ()
void move_to_top ()
Entry & operator[] (const uint i) const throw ()
void remove (const char *const name)
void remove (const uint i)
void remove_selected () throw (No_Selection)
int run ()
void select (const uint i)
uint selection_index () const throw ()
void set_align (const Align)
void set_border (uint l, uint r, uint t, uint b)
void set_border_snap_distance (const uchar value)
void set_cache (bool enable)
void set_can_focus (bool yes)
void set_dock_windows_to_edges (const bool on=true)
void set_entry_color (const uint n, const RGBColor) throw ()
void set_handle_mouse (bool yes)
void set_inner_size (uint nw, uint nh)
void set_mouse_pos (const Point)
void set_panel_snap_distance (const uchar value)
void set_pos (const Point)
void set_size (const uint nw, const uint nh)
void set_snap_windows_only_when_overlapping (const bool on=true)
void set_think (bool yes)
void set_tooltip (const char *const)
void set_top_on_click (bool on)
void set_visible (bool on)
uint size () const throw ()
void sort (const uint Begin=0, uint End=std::numeric_limits< uint >::max())
virtual void start ()
void switch_entries (const uint, const uint)
virtual void think ()
const char * tooltip () const throw ()
void update (int x, int y, int w, int h)
void update_inner (int x, int y, int w, int h)

Static Public Member Functions

static uint no_selection_index () throw ()

Public Attributes

Signal1< uint > double_clicked
Signal1< uint > selected

Static Public Attributes

static const int dying_code = -1

Protected Member Functions

void die ()
bool keyboard_free ()
void play_click ()

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index