Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Controller Class Reference

#include <controller.hxx>

Collaboration diagram for Controller:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Controller ()
 Controller (const std::string &filename)
 ~Controller ()
bool has_been_run ()
bool is_running ()
bool slow_down_active ()
void set_slow_down (bool s)
void set_action_cam (bool)
bool get_action_cam ()
void set_hide_dots (bool)
bool get_hide_dots ()
Worldget_world ()
void load_world (const std::string &name)
void save_world (const std::string &name)
std::string get_slot_filename (int n)
void save_to_slot (int n)
void load_from_slot (int n)
void update ()
void clear_world ()
void undo ()
void redo ()
void push_undo ()
void start_simulation ()

Static Public Member Functions

Controller * instance ()

Detailed Description

Holds all the different World states, handles undo and things like that

Definition at line 27 of file controller.hxx.


Constructor & Destructor Documentation

Controller::Controller  
 

Create an empty world workspace

Definition at line 25 of file controller.cxx.

Controller::Controller const std::string &    filename
 

Definition at line 35 of file controller.cxx.

Controller::~Controller  
 

Definition at line 45 of file controller.cxx.


Member Function Documentation

void Controller::clear_world  
 

Definition at line 149 of file controller.cxx.

bool Controller::get_action_cam  
 

Definition at line 200 of file controller.cxx.

Referenced by action_cam_hfunc(), and WorldViewComponent::draw().

bool Controller::get_hide_dots  
 

Definition at line 212 of file controller.cxx.

Referenced by WorldViewComponent::draw(), hide_dots_callback(), and hide_dots_hfunc().

std::string Controller::get_slot_filename int    n
 

Definition at line 72 of file controller.cxx.

World* Controller::get_world   [inline]
 

Definition at line 65 of file controller.hxx.

Referenced by RectCollider::bounce(), WorldViewComponent::draw(), WorldViewInsertTool::draw_background(), WorldViewInsertTool::draw_foreground(), WorldGUIManager::draw_overlay(), WorldViewSelectTool::on_delete_press(), WorldViewInsertTool::on_delete_press(), WorldViewInsertTool::on_fix_press(), WorldViewSelectTool::on_mouse_move(), WorldViewSelectTool::on_primary_button_press(), WorldViewInsertTool::on_primary_button_press(), WorldViewColliderTool::on_primary_button_release(), WorldViewColliderTool::on_secondary_button_release(), Selection::select_particles(), and Selection::validate().

bool Controller::has_been_run   [inline]
 

Definition at line 53 of file controller.hxx.

References World::get_has_been_run().

Controller* Controller::instance   [inline, static]
 

Definition at line 51 of file controller.hxx.

Referenced by action_cam_callback(), action_cam_hfunc(), RectCollider::bounce(), WorldViewComponent::draw(), WorldViewInsertTool::draw_background(), GUISlowMoButton::draw_content(), GUIRunButton::draw_content(), WorldViewInsertTool::draw_foreground(), WorldGUIManager::draw_overlay(), Selection::duplicate(), hide_dots_callback(), hide_dots_hfunc(), WorldButton::on_click(), GUINewFileButton::on_click(), GUISlowMoButton::on_click(), GUIRunButton::on_click(), WorldViewSelectTool::on_delete_press(), WorldViewInsertTool::on_delete_press(), WorldViewInsertTool::on_fix_press(), WorldViewSelectTool::on_mouse_move(), WorldViewSelectTool::on_primary_button_press(), WorldViewInsertTool::on_primary_button_press(), WorldViewColliderTool::on_primary_button_press(), WorldViewColliderTool::on_primary_button_release(), WorldViewSelectTool::on_secondary_button_press(), WorldViewColliderTool::on_secondary_button_release(), redo_callback(), X11Display::run(), Selection::select_particles(), undo_callback(), WorldGUIManager::update(), and Selection::validate().

bool Controller::is_running   [inline]
 

Definition at line 55 of file controller.hxx.

Referenced by WorldViewComponent::draw(), GUIRunButton::draw_content(), and X11Display::run().

void Controller::load_from_slot int    n
 

Definition at line 88 of file controller.cxx.

References load_world().

void Controller::load_world const std::string &    name
 

Load a world by name, name is relative to the construo user directory

Definition at line 51 of file controller.cxx.

Referenced by load_from_slot(), and WorldButton::on_click().

void Controller::push_undo  
 

Push the current world to the undo stack

Definition at line 143 of file controller.cxx.

References World::duplicate().

Referenced by Selection::duplicate(), WorldViewSelectTool::on_delete_press(), WorldViewInsertTool::on_delete_press(), WorldViewSelectTool::on_primary_button_press(), WorldViewColliderTool::on_primary_button_press(), WorldViewSelectTool::on_secondary_button_press(), and WorldViewColliderTool::on_secondary_button_release().

void Controller::redo  
 

Definition at line 178 of file controller.cxx.

Referenced by redo_callback().

void Controller::save_to_slot int    n
 

Definition at line 78 of file controller.cxx.

References save_world().

void Controller::save_world const std::string &    name
 

Save a world by name, name is relative to the construo user directory

Definition at line 63 of file controller.cxx.

References World::write_lisp().

Referenced by WorldButton::on_click(), GUINewFileButton::on_click(), ConstruoMain::on_exit(), and save_to_slot().

void Controller::set_action_cam bool   
 

Definition at line 194 of file controller.cxx.

Referenced by action_cam_callback().

void Controller::set_hide_dots bool   
 

Definition at line 206 of file controller.cxx.

Referenced by hide_dots_callback().

void Controller::set_slow_down bool    s [inline]
 

Definition at line 57 of file controller.hxx.

Referenced by GUISlowMoButton::on_click().

bool Controller::slow_down_active   [inline]
 

Definition at line 56 of file controller.hxx.

Referenced by GUISlowMoButton::draw_content().

void Controller::start_simulation  
 

start or stops the simulation

Definition at line 127 of file controller.cxx.

References World::duplicate().

Referenced by GUIRunButton::on_click().

void Controller::undo  
 

Definition at line 158 of file controller.cxx.

Referenced by undo_callback().

void Controller::update  
 

Updates the state of the controller and also the world

Definition at line 98 of file controller.cxx.

References DeltaManager::getset(), and World::update().

Referenced by WorldGUIManager::update().


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