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

UI::Panel Struct Reference

#include <ui_panel.h>

Inheritance diagram for UI::Panel:

UI::Object Fullscreen_Menu_Base Map_View MiniMap::View PlayerDescriptionGroup UI::BaseListselect UI::Basic_Button UI::Box UI::Icon_Grid UI::Multiline_Textarea UI::Progress_Bar UI::Scrollbar UI::Slider UI::Statebox UI::Tab_Panel UI::Textarea UI::Window

List of all members.


Detailed Description

Panel is a basic rectangular UI element. The outer rectangle is defined by (_x, _y, _w, _h) and encloses the entire panel, including both border and inner area/rectangle. The inner rectangle is the outer rectangle minus the border sizes. Child panel coordinates are always relative to the inner rectangle.

Definition at line 47 of file ui_panel.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 center_mouse ()
virtual 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
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
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
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)
virtual bool handle_mousepress (const Uint8 btn, int x, int y)
virtual bool handle_mouserelease (const Uint8 btn, int x, int y)
bool has_focus () const
virtual bool is_snap_target () const
virtual void move_inside_parent ()
void move_to_top ()
 Panel (Panel *const nparent, const int nx, const int ny, const uint nw, const uint nh, const std::string &tooltip_text=std::string())
int run ()
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_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)
virtual void start ()
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)
virtual ~Panel ()

Static Public Attributes

static const int dying_code = -1

Protected Member Functions

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

Private Member Functions

void check_child_death ()
Panelchild_at_mouse_cursor (int mouse_x, int mouse_y, Panel *child)
void do_draw (RenderTarget *dst)
bool do_key (bool down, int code, char c)
void do_mousein (bool inside)
bool do_mousemove (const Uint8 state, int x, int y, int xdiff, int ydiff)
bool do_mousepress (const Uint8 btn, int x, int y)
bool do_mouserelease (const Uint8 btn, int x, int y)
void draw_tooltip (RenderTarget *dst, Panel *lowest)

Static Private Member Functions

static void ui_key (bool down, int code, char c)
static void ui_mousemove (const Uint8 state, int x, int y, int xdiff, int ydiff)
static void ui_mousepress (const Uint8 button, int x, int y)
static void ui_mouserelease (const Uint8 button, int x, int y)
static Panelui_trackmouse (int *x, int *y)

Private Attributes

uint _bborder
uchar _border_snap_distance
uint _cache
Panel_fchild
uint _flags
Panel_focus
uint _h
uint _lborder
Panel_lchild
Panel_mousein
bool _needdraw
Panel_next
uchar _panel_snap_distance
Panel_parent
Panel_prev
uint _rborder
int _retcode
bool _running
uint _tborder
char * _tooltip
uint _w
int _x
int _y

Static Private Attributes

static Panel_g_mousegrab = 0
static Panel_g_mousein = 0
static Panel_modal = 0
static uint s_default_cursor = 0

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

Generated by  Doxygen 1.6.0   Back to index