Welcome to the NetCologne GmbH open source mirroring service!

This machine mirrors various open-source projects. 20 Gbit/s uplink.

If there are any issues or you want another project mirrored, please contact mirror-service -=AT=- netcologne DOT de !

WorldViewComponent class Reference
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

WorldViewComponent Class Reference

#include <worldview_component.hxx>

Inheritance diagram for WorldViewComponent:

Inheritance graph
[legend]
Collaboration diagram for WorldViewComponent:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Mode { INSERT_MODE, SELECT_MODE, ZOOM_MODE, COLLIDER_MODE }

Public Member Functions

void set_mode (Mode m)
Mode get_mode ()
 WorldViewComponent ()
 ~WorldViewComponent ()
WorldViewInsertToolget_insert_tool ()
ZoomGraphicContextget_gc ()
void draw (GraphicContext *parent_gc)
void on_primary_button_press (int x, int y)
void on_primary_button_release (int x, int y)
void on_secondary_button_press (int x, int y)
void on_secondary_button_release (int x, int y)
void on_tertiary_button_press (int x, int y)
void on_tertiary_button_release (int x, int y)
void on_mouse_move (int x, int y, int of_x, int of_y)
void on_duplicate_press (int x, int y)
void on_delete_press (int x, int y)
void on_fix_press (int x, int y)
void on_button_press (int button_id, int x, int y)
void wheel_up (int x, int y)
void wheel_down (int x, int y)
void scroll_left ()
void scroll_right ()
void scroll_up ()
void scroll_down ()
float get_zoom ()
bool is_at (int x, int y)

Static Public Member Functions

WorldViewComponent * instance ()

Detailed Description

GUI Component that manages the view and the editing of the world

Definition at line 36 of file worldview_component.hxx.


Member Enumeration Documentation

enum WorldViewComponent::Mode
 

Enumeration values:
INSERT_MODE 
SELECT_MODE 
ZOOM_MODE 
COLLIDER_MODE 

Definition at line 39 of file worldview_component.hxx.

Referenced by get_mode().


Constructor & Destructor Documentation

WorldViewComponent::WorldViewComponent  
 

Definition at line 32 of file worldview_component.cxx.

References graphic_context, and INSERT_MODE.

WorldViewComponent::~WorldViewComponent  
 

Definition at line 84 of file worldview_component.cxx.


Member Function Documentation

void WorldViewComponent::draw GraphicContext   parent_gc [virtual]
 

Implements GUIComponent.

Definition at line 90 of file worldview_component.cxx.

References World::calc_bounding_box(), COLLIDER_MODE, WorldViewTool::draw_background(), World::draw_colliders(), WorldViewTool::draw_foreground(), ZoomGraphicContext::draw_line(), World::draw_particles(), World::draw_springs(), GraphicContext::draw_string(), Controller::get_action_cam(), GraphicContext::get_height(), GUIComponent::get_height(), Controller::get_hide_dots(), GUIComponent::get_width(), Controller::get_world(), INSERT_MODE, Controller::instance(), Controller::is_running(), SELECT_MODE, ZoomGraphicContext::set_parent_gc(), WorldBoundingBox::x1, WorldBoundingBox::x2, WorldBoundingBox::y1, WorldBoundingBox::y2, ZOOM_MODE, ZoomGraphicContext::zoom_out(), and ZoomGraphicContext::zoom_to().

ZoomGraphicContext* WorldViewComponent::get_gc   [inline]
 

Definition at line 74 of file worldview_component.hxx.

Referenced by WorldViewInsertTool::draw_background(), WorldViewColliderTool::draw_background(), WorldViewZoomTool::draw_foreground(), WorldViewSelectTool::draw_foreground(), WorldViewInsertTool::draw_foreground(), WorldViewColliderTool::draw_foreground(), WorldViewSelectTool::on_button_press(), WorldViewInsertTool::on_delete_press(), WorldViewInsertTool::on_fix_press(), WorldViewSelectTool::on_mouse_move(), WorldViewColliderTool::on_mouse_move(), WorldViewZoomTool::on_primary_button_press(), WorldViewSelectTool::on_primary_button_press(), WorldViewInsertTool::on_primary_button_press(), WorldViewColliderTool::on_primary_button_press(), WorldViewZoomTool::on_primary_button_release(), WorldViewColliderTool::on_primary_button_release(), and WorldViewSelectTool::on_secondary_button_press().

WorldViewInsertTool* WorldViewComponent::get_insert_tool   [inline]
 

Definition at line 72 of file worldview_component.hxx.

Referenced by decrease_particle_mass(), and increase_particle_mass().

Mode WorldViewComponent::get_mode   [inline]
 

Definition at line 65 of file worldview_component.hxx.

References Mode.

Referenced by collider_mode_hfunc(), WorldGUIManager::draw_overlay(), insert_mode_hfunc(), select_mode_hfunc(), and zoom_mode_hfunc().

float WorldViewComponent::get_zoom  
 

Definition at line 267 of file worldview_component.cxx.

References ZoomGraphicContext::get_zoom().

WorldViewComponent* WorldViewComponent::instance   [inline, static]
 

Definition at line 70 of file worldview_component.hxx.

Referenced by collider_mode_hfunc(), decrease_particle_mass(), WorldViewInsertTool::draw_background(), WorldViewColliderTool::draw_background(), WorldViewZoomTool::draw_foreground(), WorldViewSelectTool::draw_foreground(), WorldViewInsertTool::draw_foreground(), WorldViewColliderTool::draw_foreground(), WorldGUIManager::draw_overlay(), increase_particle_mass(), insert_mode_hfunc(), WorldViewSelectTool::on_button_press(), GUIZoomOutButton::on_click(), GUIZoomInButton::on_click(), WorldViewInsertTool::on_delete_press(), WorldViewInsertTool::on_fix_press(), WorldViewSelectTool::on_mouse_move(), WorldViewColliderTool::on_mouse_move(), WorldViewZoomTool::on_primary_button_press(), WorldViewSelectTool::on_primary_button_press(), WorldViewInsertTool::on_primary_button_press(), WorldViewColliderTool::on_primary_button_press(), WorldViewZoomTool::on_primary_button_release(), WorldViewColliderTool::on_primary_button_release(), WorldViewSelectTool::on_secondary_button_press(), select_mode_hfunc(), switch_to_collider_mode(), switch_to_insert_mode(), switch_to_select_mode(), switch_to_zoom_mode(), zoom_in_callback(), zoom_mode_hfunc(), and zoom_out_callback().

bool WorldViewComponent::is_at int    x,
int    y
[inline, virtual]
 

Returns:
true if the component is present at the given location

Reimplemented from GUIComponent.

Definition at line 105 of file worldview_component.hxx.

void WorldViewComponent::on_button_press int    button_id,
int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 158 of file worldview_component.cxx.

References WorldViewTool::on_button_press().

void WorldViewComponent::on_delete_press int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 188 of file worldview_component.cxx.

References WorldViewTool::on_delete_press().

void WorldViewComponent::on_duplicate_press int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 194 of file worldview_component.cxx.

References WorldViewTool::on_duplicate_press().

void WorldViewComponent::on_fix_press int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 200 of file worldview_component.cxx.

References WorldViewTool::on_fix_press().

void WorldViewComponent::on_mouse_move int    x,
int    y,
int    of_x,
int    of_y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 249 of file worldview_component.cxx.

References ZoomGraphicContext::get_zoom(), WorldViewTool::on_mouse_move(), and ZoomGraphicContext::set_offset().

void WorldViewComponent::on_primary_button_press int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 164 of file worldview_component.cxx.

References WorldViewTool::on_primary_button_press().

void WorldViewComponent::on_primary_button_release int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 170 of file worldview_component.cxx.

References WorldViewTool::on_primary_button_release().

void WorldViewComponent::on_secondary_button_press int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 176 of file worldview_component.cxx.

References WorldViewTool::on_secondary_button_press().

void WorldViewComponent::on_secondary_button_release int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 182 of file worldview_component.cxx.

References WorldViewTool::on_secondary_button_release().

void WorldViewComponent::on_tertiary_button_press int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 230 of file worldview_component.cxx.

References ZoomGraphicContext::get_x_offset(), ZoomGraphicContext::get_y_offset(), GUIManager::grab_mouse(), WorldGUIManager::instance(), ZoomGraphicContext::screen_to_world_x(), and ZoomGraphicContext::screen_to_world_y().

void WorldViewComponent::on_tertiary_button_release int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 242 of file worldview_component.cxx.

References WorldGUIManager::instance(), and GUIManager::ungrab_mouse().

void WorldViewComponent::scroll_down   [virtual]
 

Reimplemented from GUIComponent.

Definition at line 224 of file worldview_component.cxx.

References ZoomGraphicContext::translate_offset().

void WorldViewComponent::scroll_left   [virtual]
 

Reimplemented from GUIComponent.

Definition at line 206 of file worldview_component.cxx.

References ZoomGraphicContext::translate_offset().

void WorldViewComponent::scroll_right   [virtual]
 

Reimplemented from GUIComponent.

Definition at line 212 of file worldview_component.cxx.

References ZoomGraphicContext::translate_offset().

void WorldViewComponent::scroll_up   [virtual]
 

Reimplemented from GUIComponent.

Definition at line 218 of file worldview_component.cxx.

References ZoomGraphicContext::translate_offset().

void WorldViewComponent::set_mode Mode    m
 

Definition at line 49 of file worldview_component.cxx.

References WorldViewTool::activate(), COLLIDER_MODE, WorldViewTool::deactivate(), INSERT_MODE, SELECT_MODE, and ZOOM_MODE.

Referenced by switch_to_collider_mode(), switch_to_insert_mode(), switch_to_select_mode(), and switch_to_zoom_mode().

void WorldViewComponent::wheel_down int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 152 of file worldview_component.cxx.

References ZoomGraphicContext::zoom_out().

Referenced by GUIZoomOutButton::on_click(), and zoom_out_callback().

void WorldViewComponent::wheel_up int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 146 of file worldview_component.cxx.

References ZoomGraphicContext::zoom_in().

Referenced by GUIZoomInButton::on_click(), and zoom_in_callback().


The documentation for this class was generated from the following files:
Generated on Thu Jul 24 10:25:28 2003 for Construo by doxygen1.3-rc3