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

UI::Window Struct Reference

#include <ui_window.h>

Inheritance diagram for UI::Window:

UI::Panel UI::Object UI::UniqueWindow Editor_Tool_Menu GameOptionsSoundMenu

List of all members.


Detailed Description

Windows are cached by default.

The graphics (see m_pic_*) are used in the following manner: (Example)

<--20leftmostpixel_of_top--><60Pixels as often as possible to reach window with from top><20rightmost pixel of top> ^ 20 topmost pixels of l_border <--- > same for r_border as often as needed: 60 pixels of l_border <--- > same for r_border 20 bottom pixels of l_border <--- > same for r_border <--20leftmostpixel_of_bot--><60Pixels as often as possible to reach window with from bot><20rightmost pixel of bot>

So: the l_border and the r_border pics MUST have a height of 100, while the width must be 20 and the top and bot pics MUST have a width of 100, while the height must be 20

A click with the middle mouse button (or STRG+LClick) minimizes a window. Minimize means, that the window is only the caption bar, nothing inside. Another click on this bar resizes the window again

Definition at line 49 of file ui_window.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 ()
void center_to_parent ()
virtual void draw (RenderTarget *dst)
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)
bool handle_mousemove (const Uint8 state, int mx, int my, int xdiff, int ydiff)
bool handle_mousepress (const Uint8 btn, int mx, int my)
bool handle_mouserelease (const Uint8 btn, int mx, int my)
bool has_focus () const
bool is_minimal () const throw ()
bool is_snap_target () const
void minimize ()
virtual void move_inside_parent ()
void move_to_mouse ()
void move_to_top ()
void restore ()
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_title (const char *text)
void set_tooltip (const char *const)
void set_top_on_click (bool on)
void set_visible (bool on)
virtual void start ()
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)
 Window (Panel *parent, int x, int y, uint w, uint h, const char *title)
 ~Window ()

Static Public Attributes

static const int dying_code = -1

Protected Member Functions

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

Private Member Functions

void dock_bottom ()
void dock_left ()
void dock_right ()
void undock_bottom ()
void undock_left ()
void undock_right ()

Private Attributes

bool _docked_bottom
bool _docked_left
bool _docked_right
int _drag_start_mouse_x
int _drag_start_mouse_y
int _drag_start_win_x
int _drag_start_win_y
bool _dragging
bool _is_minimal
uint _oldh
uint _oldw
uint m_pic_background
uint m_pic_bottom
uint m_pic_lborder
uint m_pic_rborder
uint m_pic_top
std::string m_title

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

Generated by  Doxygen 1.6.0   Back to index