VAPoR  0.1
Public Member Functions | Static Public Member Functions | List of all members
VAPoR::VizWinMgr Class Reference

A class for managing all visualizers. More...

#include <vizwinmgr.h>

Inheritance diagram for VAPoR::VizWinMgr:
VAPoR::ParsedXml

Public Member Functions

void forceRender (RenderParams *rp, bool always=false)
 
bool reloadShaders ()
 Method that forces all glWindows to reload their shaders. More...
 
void setParams (int winNum, Params *p, ParamsBase::ParamsBaseType typeId, int instance=-1)
 
ParamsgetParams (int winNum, Params::ParamsBaseType pType, int instance=-1)
 
int getActiveInstanceIndex (Params::ParamsBaseType t)
 
ParamsgetApplicableParams (Params::ParamsBaseType t)
 
ParamsgetApplicableParams (const std::string &tag)
 
void setVizDirty (Params *p, DirtyBitType bittype, bool bit=true, bool refresh=true)
 
- Public Member Functions inherited from VAPoR::ParsedXml
virtual ~ParsedXml ()
 
virtual bool elementStartHandler (ExpatParseMgr *, int, std::string &, const char **)=0
 
virtual bool elementEndHandler (ExpatParseMgr *, int, std::string &)=0
 
virtual bool charHandler (ExpatParseMgr *, const XML_Char *, int)
 

Static Public Member Functions

static ParamsgetActiveParams (const std::string &tag)
 
static EventRoutergetEventRouter (Params::ParamsBaseType typeId)
 
static void InstallTab (const std::string tag, EventRouterCreateFcn fcn)
 
static EventRoutergetEventRouter (const std::string &tag)
 
static ParamsgetGlobalParams (Params::ParamsBaseType ptype)
 
static int getNumInstances (int winnum, Params::ParamsBaseType pType)
 
static int getCurrentInstanceIndex (int winnum, Params::ParamsBaseType t)
 
static int findInstanceIndex (int winnum, Params *params, Params::ParamsBaseType t)
 
static int RegisterMouseMode (const std::string paramsTag, int manipType, const char *name, const char *const xpmIcon[]=0)
 

Additional Inherited Members

- Public Attributes inherited from VAPoR::ParsedXml
ParsedXmlpreviousClass
 
- Static Protected Attributes inherited from VAPoR::ParsedXml
static const string _stringType
 
static const string _longType
 
static const string _doubleType
 
static const string _typeAttr
 

Detailed Description

A class for managing all visualizers.

Author
Alan Norton
Version
$Revision$
Date
$Date$ This class manages the VAPOR visualizers. Its main function is to keep track of what visualizers are active and what EventRouter and Params instances are associated with each visualizer.

Definition at line 81 of file vizwinmgr.h.

Member Function Documentation

static int VAPoR::VizWinMgr::findInstanceIndex ( int  winnum,
Params params,
Params::ParamsBaseType  t 
)
static

Static method that identifies the instance index of a Params instance in a particular renderer tab. Each of the renderer instances indicated in the tab are associated with a unique Params instance, whether or not the instance has been enabled. All of the instances are associated with a particular visualizer.

Parameters
[in]intwinnum Visualizer number
[in]Params*Pointer to Params instance
[in]ParamsBase::ParamsBaseTypeTypeId associated with this Params
Return values
intInstance index associated with this params or -1 if not found.
void VAPoR::VizWinMgr::forceRender ( RenderParams rp,
bool  always = false 
)

Method that requests a re-rendering for the renderer associated with a particular RenderParams instance. The renderer must be enabled or this will have no effect unless the optional 'always' parameter is true.

Parameters
[in]RenderParams*pointer to RenderParams instance that is associated with the rendering requested.
[in]boolalways indicates that rerender will occur even if the params is disabled.
int VAPoR::VizWinMgr::getActiveInstanceIndex ( Params::ParamsBaseType  t)
inline

Method that identifies the active index in the active visualizer

Parameters
[in]ParamsBase::ParamsBaseTypeTypeId associated with this Params
Return values
intCurrent active instance index

Definition at line 178 of file vizwinmgr.h.

References getCurrentInstanceIndex().

static Params* VAPoR::VizWinMgr::getActiveParams ( const std::string &  tag)
inlinestatic

Static method that identifies the currently active params instance of a given type. This is the currently selected instance in the current active visualizer.

Parameters
[in]conststd::string& tag The XML tag associated with a Params class
Return values
Params*Pointer to Params instance that is currently active

Definition at line 100 of file vizwinmgr.h.

References VAPoR::Params::GetParamsInstance().

Params* VAPoR::VizWinMgr::getApplicableParams ( Params::ParamsBaseType  t)

Identify the params instance that is current of a particular type (i.e. in a particular tab).

Parameters
[in]ParamsBase::ParamsBaseTypeTypeId associated with this Params
Return values
Params*Params instance that is current

Referenced by getApplicableParams().

Params* VAPoR::VizWinMgr::getApplicableParams ( const std::string &  tag)
inline

Identify the params instance that is currently applied of a particular tag

Parameters
[in]conststd::string& XML tag associated with this Params
Return values
Params*Params instance that is current

Definition at line 190 of file vizwinmgr.h.

References getApplicableParams(), and VAPoR::ParamsBase::GetTypeFromTag().

static int VAPoR::VizWinMgr::getCurrentInstanceIndex ( int  winnum,
Params::ParamsBaseType  t 
)
static

Static method that identifies the active instance index of a Params in a particular visualizer.

Parameters
[in]intwinnum Visualizer number
[in]ParamsBase::ParamsBaseTypeTypeId associated with this Params
Return values
intCurrent active instance index

Referenced by getActiveInstanceIndex().

static EventRouter* VAPoR::VizWinMgr::getEventRouter ( Params::ParamsBaseType  typeId)
static

Static method obtains the EventRouter instance associated with a particular Params type. There is a unique EventRouter subclass associated with each tab, and a unique instance of that subclass.

Parameters
[in]Params::ParamsBaseTypeTypeId of the Params type
Return values
EventRouter*Pointer to the associated EventRouter instance

Referenced by getEventRouter().

static EventRouter* VAPoR::VizWinMgr::getEventRouter ( const std::string &  tag)
inlinestatic

Static method obtains the EventRouter instance associated with a particular Params tag

Parameters
[in]conststd::string& Tag of the Params
Return values
EventRouter*pointer to the associated EventRouter instance

Definition at line 127 of file vizwinmgr.h.

References getEventRouter(), and VAPoR::ParamsBase::GetTypeFromTag().

static Params* VAPoR::VizWinMgr::getGlobalParams ( Params::ParamsBaseType  ptype)
static

Static method that returns the global Params of a given type. If the params is a RenderParams type, returns a default instance that is not actually used in rendering

Parameters
[in]Params::ParamsBaseTypeTypeId of the Params type
Return values
Params*pointer to the associated Params instance
static int VAPoR::VizWinMgr::getNumInstances ( int  winnum,
Params::ParamsBaseType  pType 
)
static

Static method that identifies the number of instances of a Params of a particular type, in a particular visualizer.

Parameters
[in]intwinnum Visualizer number
[in]ParamsBase::ParamsBaseTypeTypeId associated with this Params
Return values
intNumber of instances
Params* VAPoR::VizWinMgr::getParams ( int  winNum,
Params::ParamsBaseType  pType,
int  instance = -1 
)

Method that identifies the params instance associated with a visualizer, type, and instance index.

Parameters
[in]intwinNum : Visualizer number
[in]ParamsBase::ParamsBaseTypeTypeId associated with this Params
[in]intinstance : The index of the associated instance, or -1 for the active instance.
Return values
Params*Pointer to the Params instance
static void VAPoR::VizWinMgr::InstallTab ( const std::string  tag,
EventRouterCreateFcn  fcn 
)
static

Static method that creates an eventRouter, and installs it as one of the tabs. All extension EventRouter classes must call this during the InstallExtensions() method.

Parameters
[in]conststd::string tag : XML tag identifying the Params class.
[in]EventRouterCreateFcn: the required method that creates the EventRouter.
static int VAPoR::VizWinMgr::RegisterMouseMode ( const std::string  paramsTag,
int  manipType,
const char *  name,
const char *const  xpmIcon[] = 0 
)
static

Static method that enables use of a manipulator with a Mouse Mode.

Parameters
[in]conststd::string Tag associated with Params class that owns the manipulator
[in]intManipulator type. Valid types are 1 (3d axis aligned), 2 (2D) and 3 (3D Rotated)
[in]constchar* Name of the mouse mode that will be displayed in GUI
[in]constchar* const xpmIcon[] An xpm bitmap that will be displayed in the GUI, defaults to no icon.
bool VAPoR::VizWinMgr::reloadShaders ( )

Method that forces all glWindows to reload their shaders.

void VAPoR::VizWinMgr::setParams ( int  winNum,
Params p,
ParamsBase::ParamsBaseType  typeId,
int  instance = -1 
)

Method that specifies a params instance that is to be associated with a particular instance index in the renderer tab. This is needed during EventRouter::MakeCurrent(), when the Params instance changes as a result of Undo/Redo action.

Parameters
[in]intwinNum : Visualizer number
[in]Params*p : Pointer to the new Params instance
[in]ParamsBase::ParamsBaseTypeTypeId associated with this Params
[in]intinstance : The index of the associated instance, or -1 for the active instance.
void VAPoR::VizWinMgr::setVizDirty ( Params p,
DirtyBitType  bittype,
bool  bit = true,
bool  refresh = true 
)

General function for window-specific dirty bit setting. Useful when the state of a Params has changed and some window(s) will need to be redrawn. Turns on or off the specified dirty bit in all of the windows where the specified Params is used. Optionally requests a refresh in those windows.

Parameters
[in]Params*: Pointer to a Params instance.
[in]DirtyBitTypebittype : Dirty bit that is being set
[in]bit: Indicates whether it is being set dirty (true, default) or clean.
[in]boolrefresh : Indicates whether a refresh is also requested; true by default.

The documentation for this class was generated from the following file: