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

UI::BaseListselect Struct Reference

#include <ui_listselect.h>

Inheritance diagram for UI::BaseListselect:

UI::Panel UI::Object UI::Listselect< Entry & >

List of all members.

Detailed Description

This class defines a list-select box whose entries are defined by a name and an associated numeric ID.

Use the Listselect template to use arbitrary IDs.

Definition at line 40 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

Public Member Functions

void add (const char *const name, uint value, const int picid=-1, const bool select_this=false)
 BaseListselect (Panel *parent, int x, int y, uint w, uint h, Align align=Align_Left, bool show_check=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
uint get_selected () const throw (No_Selection)
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
virtual void move_inside_parent ()
void move_to_top ()
uint 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)
 ~BaseListselect ()

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 ()

Private Types

typedef std::vector
< Entry_Record * > 

Private Member Functions

void set_scrollpos (const int)

Private Attributes

Align m_align
int m_check_picid
Entry_Record_vector m_entry_records
int m_last_click_time
uint m_last_selection
uint m_lineheight
uint m_max_pic_width
uint m_scrollpos
uint m_selection
bool m_show_check

Static Private Attributes

static const int DOUBLE_CLICK_INTERVAL = 500
static const int ms_darken_value = -20


struct  Entry_Record
struct  No_Selection

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

Generated by  Doxygen 1.6.0   Back to index