Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

UIVR Class Reference

UIObject subclass implementing a Virtual Reality user interface. I coordinates multiple tools, taking manipulation commands from them and giving them back various messages and flags. UIVR is the thing which has to know about the different kinds of tools. More...

#include <P_UIVR.h>

Inheritance diagram for UIVR:

UIObject List of all members.

Public Methods

 UIVR (VMDApp *)
 ~UIVR ()
int add_tool_with_USL (const char *type, int argc, const char **USL)
 Add a tool that finds it sensor from a USL. More...

int change_type (int toolnum, const char *type)
 Change the type of an existing tool. More...

int remove_tool (int i)
 remove the given tool; return success. More...

int check_event ()
 check for an event, and queue it if found. Return TRUE if an event was generated. More...

Toolgettool (int i)
int num_tools ()
const char * tool_name (int i)
int tool_type (const char *nm)
int num_tool_types ()
virtual int act_on_command (int, Command *)
 update the display due to a command being executed. Return whether any action was taken on this command. Arguments are the command type, command object, and the success of the command (T or F). More...

ResizeArray< JString * > * get_tracker_names ()
 Return list of device names for each class of device, as obtained from the .vmdsensors file. Only devices for which a corresponding device class exists will be returned in the list. Delete the list and its elements when finished. More...

ResizeArray< JString * > * get_feedback_names ()
ResizeArray< JString * > * get_button_names ()
int set_tracker (int toolnum, const char *device)
 Set the tracker, feedback, or buttons of the given tool. Pass NULL as the device to simply remove the device without replacing it. Return success. More...

int set_feedback (int toolnum, const char *device)
int set_buttons (int toolnum, const char *device)
int set_position_scale (int toolnum, float newval)
int set_force_scale (int toolnum, float newval)
int set_spring_scale (int toolnum, float newval)

Static Public Methods

ResizeArray< JString * > * get_device_names ()
 Return list of device names that have been read from the .vmdsensors file. More...


Detailed Description

UIObject subclass implementing a Virtual Reality user interface. I coordinates multiple tools, taking manipulation commands from them and giving them back various messages and flags. UIVR is the thing which has to know about the different kinds of tools.

Definition at line 44 of file P_UIVR.h.


Constructor & Destructor Documentation

UIVR::UIVR VMDApp  
 

Definition at line 104 of file P_UIVR.C.

References NameList< int >::add_name, UIObject::command_wanted, UIObject::reset, Command::TOOL_ADD_DEVICE, Command::TOOL_CALLBACK, Command::TOOL_DELETE_DEVICE, Command::TOOL_OFFSET, and Command::TOOL_REP.

UIVR::~UIVR  
 

Definition at line 91 of file P_UIVR.C.

References NameList< Buttons * >::data, NameList< Feedback * >::data, NameList< VMDTracker * >::data, NameList< Buttons * >::num, NameList< Feedback * >::num, NameList< VMDTracker * >::num, and ResizeArray< Tool * >::num.


Member Function Documentation

int UIVR::act_on_command int    type,
Command   c
[virtual]
 

update the display due to a command being executed. Return whether any action was taken on this command. Arguments are the command type, command object, and the success of the command (T or F).

Reimplemented from UIObject.

Definition at line 262 of file P_UIVR.C.

References Tool::assign_rep, Tool::clear_rep, gettool, CmdToolRep::molid, CmdToolAddDevice::name, CmdToolAddDevice::num, num, CmdToolCallback::on, Tool::remove_device, CmdToolRep::repnum, UIObject::set_callbacks, Tool::setoffset, Command::TOOL_ADD_DEVICE, Command::TOOL_CALLBACK, Command::TOOL_DELETE_DEVICE, Command::TOOL_OFFSET, Command::TOOL_REP, and CmdToolRep::toolnum.

int UIVR::add_tool_with_USL const char *    type,
int    argc,
const char **    USL
 

Add a tool that finds it sensor from a USL.

Definition at line 165 of file P_UIVR.C.

References num.

Referenced by VMDApp::tool_create.

int UIVR::change_type int    toolnum,
const char *    type
 

Change the type of an existing tool.

Definition at line 174 of file P_UIVR.C.

References ResizeArray< Tool * >::num, and Tool::steal_sensor.

Referenced by VMDApp::tool_change_type.

int UIVR::check_event void    [virtual]
 

check for an event, and queue it if found. Return TRUE if an event was generated.

Reimplemented from UIObject.

Definition at line 193 of file P_UIVR.C.

References NULL, ResizeArray< Tool * >::num, and remove_tool.

ResizeArray< JString * > * UIVR::get_button_names  
 

Definition at line 395 of file P_UIVR.C.

References generic_get_names.

Referenced by ToolFltkMenu::reset_device_menus.

ResizeArray< JString * > * UIVR::get_device_names   [static]
 

Return list of device names that have been read from the .vmdsensors file.

Definition at line 367 of file P_UIVR.C.

References SensorConfig::getnames.

ResizeArray< JString * > * UIVR::get_feedback_names  
 

Definition at line 392 of file P_UIVR.C.

References generic_get_names.

Referenced by ToolFltkMenu::reset_device_menus.

ResizeArray< JString * > * UIVR::get_tracker_names  
 

Return list of device names for each class of device, as obtained from the .vmdsensors file. Only devices for which a corresponding device class exists will be returned in the list. Delete the list and its elements when finished.

Definition at line 389 of file P_UIVR.C.

References generic_get_names.

Referenced by ToolFltkMenu::reset_device_menus.

Tool * UIVR::gettool int    i
 

Definition at line 225 of file P_UIVR.C.

References NULL, and ResizeArray< Tool * >::num.

Referenced by act_on_command, ToolFltkMenu::reset_tool_list, ToolFltkMenu::select_tool, set_buttons, set_feedback, set_force_scale, set_position_scale, set_spring_scale, set_tracker, and ToolFltkMenu::update_toolrep_choosers.

int UIVR::num_tool_types   [inline]
 

Definition at line 71 of file P_UIVR.h.

References NameList< int >::num.

Referenced by ToolFltkMenu::ToolFltkMenu.

int UIVR::num_tools   [inline]
 

Definition at line 60 of file P_UIVR.h.

References ResizeArray< Tool * >::num.

Referenced by ToolFltkMenu::reset_tool_list.

int UIVR::remove_tool int    i
 

remove the given tool; return success.

Definition at line 185 of file P_UIVR.C.

References ResizeArray< Tool * >::num.

Referenced by check_event, and VMDApp::tool_delete.

int UIVR::set_buttons int    toolnum,
const char *    device
 

Definition at line 357 of file P_UIVR.C.

References Tool::add_buttons, gettool, and NULL.

Referenced by ToolFltkMenu::choose_buttons.

int UIVR::set_feedback int    toolnum,
const char *    device
 

Definition at line 348 of file P_UIVR.C.

References Tool::add_feedback, gettool, and NULL.

Referenced by ToolFltkMenu::choose_feedback.

int UIVR::set_force_scale int    toolnum,
float    newval
 

Definition at line 241 of file P_UIVR.C.

References gettool, and Tool::setforcescale.

Referenced by VMDApp::tool_set_force_scale.

int UIVR::set_position_scale int    toolnum,
float    newval
 

Definition at line 231 of file P_UIVR.C.

References gettool, and Tool::setscale.

Referenced by VMDApp::tool_set_position_scale.

int UIVR::set_spring_scale int    toolnum,
float    newval
 

Definition at line 251 of file P_UIVR.C.

References gettool, and Tool::setspringscale.

Referenced by VMDApp::tool_set_spring_scale.

int UIVR::set_tracker int    toolnum,
const char *    device
 

Set the tracker, feedback, or buttons of the given tool. Pass NULL as the device to simply remove the device without replacing it. Return success.

Definition at line 339 of file P_UIVR.C.

References Tool::add_tracker, gettool, and NULL.

Referenced by ToolFltkMenu::choose_tracker.

const char* UIVR::tool_name int    i [inline]
 

Definition at line 62 of file P_UIVR.h.

References NameList< int >::name, and NameList< int >::num.

Referenced by ToolFltkMenu::ToolFltkMenu.

int UIVR::tool_type const char *    nm [inline]
 

Definition at line 67 of file P_UIVR.h.

References NameList< int >::typecode.


The documentation for this class was generated from the following files:
Generated on Thu Mar 28 02:46:02 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002