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

Interactive_Player Struct Reference

#include <interactive_player.h>

Inheritance diagram for Interactive_Player:

Interactive_Base Map_View UI::Panel UI::Object

List of all members.


Detailed Description

class Interactive_Player

This is the interactive player. this one is responsible to show the correct map to the player and draws the user interface, cares for input and so on.

Definition at line 46 of file interactive_player.h.


Public Types

enum  { dfShowCensus = 1, dfShowStatistics = 2, dfDebug = 4 }
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 abort_build_road ()
bool append_build_road (Coords field)
void center_mouse ()
virtual void cleanup_for_load ()
void draw (RenderTarget *dst)
virtual void draw_border (RenderTarget *dst)
Editor_Game_Base & egbase () throw ()
const Editor_Game_Base & egbase () const throw ()
virtual void end ()
void end_modal (int code)
void field_action ()
void finish_build_road ()
void fit_inner (Panel *inner)
void focus ()
void free_children ()
uint get_bborder () const
ushort get_border_snap_distance () const
CoordPath * get_build_road ()
Coords get_build_road_end () const throw ()
Direction get_build_road_end_dir () const throw ()
Coords get_build_road_start () const throw ()
bool get_can_focus () const
const std::vector
< NetGame::Chat_Message > * 
get_chatmsges ()
bool get_display_flag (uint flag)
uint get_display_flags ()
bool get_dock_windows_to_edges () const
const Panel * get_first_child () const
Game * get_game () const
int get_h () const
bool get_handle_mouse () const
int get_inner_h () const
int get_inner_w () const
const Panel * get_last_child () const
uint get_lborder () const
Point get_mouse_position () const throw ()
const Panel * get_next_sibling () const
uchar get_panel_snap_distance () const
Panel * get_parent () const
Playerget_player () const throw ()
uchar get_player_number () const
const Panel * get_prev_sibling () const
uint get_rborder () const
bool get_sel_freeze () const
const Node_and_Triangle & get_sel_pos () const
uint get_sel_radius () const throw ()
bool get_sel_triangles () const throw ()
bool get_snap_windows_only_when_overlapping () const
uint get_tborder () const
bool get_think () const
bool get_top_on_click () const
Point get_viewpoint () const
bool get_visible () const
int get_w () const
int get_x () const
int get_y () const
void grab_mouse (bool grab)
bool handle_key (bool down, int code, char c)
virtual void handle_mousein (bool inside)
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
 Interactive_Player (Game &, const uchar pln)
bool is_building_road () const
bool is_dragging () const
virtual bool is_snap_target () const
virtual void move_inside_parent ()
void move_to_top ()
void move_view_to (const Coords)
void move_view_to_point (Point pos)
void need_complete_redraw ()
Playerplayer () const throw ()
void postload ()
virtual void reference_player_tribe (const int, const void *const)
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_display_flag (uint flag, bool on)
void set_display_flags (uint flags)
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_player_number (uint plrn)
void set_pos (const Point)
void set_rel_viewpoint (Point r)
void set_sel_freeze (const bool yes) throw ()
virtual void set_sel_pos (const Node_and_Triangle<>)
void set_sel_radius (const uint n)
void set_sel_triangles (const bool yes) throw ()
void set_show_chat_overlay (bool t)
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_viewpoint (Point vp)
void set_visible (bool on)
bool show_chat_overlay ()
void start ()
void start_build_road (Coords start, int player)
virtual void think ()
void toggle_buildhelp ()
void toggle_help ()
void toggle_main_menu ()
void toggle_resources ()
const char * tooltip () const throw ()
void track_sel (Point m)
void update (int x, int y, int w, int h)
void update_inner (int x, int y, int w, int h)
void warp_mouse_to_field (Coords c)

Static Public Member Functions

static int get_xres ()
static int get_yres ()

Public Attributes

UI::Signal fieldclicked
bool m_show_workarea_preview
UI::Signal2< int, int > warpview

Static Public Attributes

static const int dying_code = -1

Protected Member Functions

void die ()
virtual void draw_overlay (RenderTarget &)
void hide_minimap ()
Interactive_Baseintbase () const throw ()
bool keyboard_free ()
void mainview_move (int x, int y)
void minimap_warp (int x, int y)
void play_click ()
void set_sel_picture (const char *const)
void toggle_minimap ()
void unset_sel_picture ()

Private Attributes

UI::Multiline_Textarea m_chat_messages
std::vector
< NetGame::Chat_Message > 
m_chatmsges
bool m_do_chat_overlays
UI::UniqueWindow::Registry m_encyclopedia
UI::UniqueWindow::Registry m_fieldaction
Game * m_game
bool m_is_typing_msg
UI::Textarea m_label_speed
Game_Main_Menu_Windows m_mainm_windows
UI::UniqueWindow::Registry m_mainmenu
Player_Number m_player_number
std::vector
< Overlay_Chat_Messages > 
m_show_chatmsg
UI::Button< Interactive_Playerm_toggle_buildhelp
UI::Button< Interactive_Playerm_toggle_help
UI::Button< Interactive_Playerm_toggle_main_menu
UI::Button< Interactive_Playerm_toggle_minimap
UI::Button< Interactive_Playerm_toggle_resources
UI::Textarea m_type_message
std::string m_typed_message

Friends

class Sound_Handler

Classes

struct  Game_Main_Menu_Windows
struct  Overlay_Chat_Messages

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

Generated by  Doxygen 1.6.0   Back to index