ALBA
albaViewPlot.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaViewPlot
5 Authors: Silvano Imboden - Paolo Quadrani
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16#ifndef __albaViewPlot_H__
17#define __albaViewPlot_H__
18
19//----------------------------------------------------------------------------
20// Include:
21//----------------------------------------------------------------------------
22#include "albaView.h"
23#include "albaSceneGraph.h"
24#include "albaSceneNode.h" //used in subclasses
25#include <map>
26
27//----------------------------------------------------------------------------
28// forward references :
29//----------------------------------------------------------------------------
30class albaVME;
32
35{
38};
39
40#ifdef ALBA_EXPORTS
41#include "albaDllMacros.h"
43#endif
44
45//----------------------------------------------------------------------------
46// albaViewPlot :
47//----------------------------------------------------------------------------
51class ALBA_EXPORT albaViewPlot: public albaView
52{
53public:
54 albaViewPlot(const wxString &label = "plot View");
55 virtual ~albaViewPlot();
56
58
59 virtual albaView* Copy(albaObserver *Listener, bool lightCopyEnabled = false);
60 virtual void Create();
61 virtual void OnEvent(albaEventBase *alba_event);
62
64/* enum VIEW_VTK_WIDGET_ID
65 {
66 ID_SHOW_GRID = Superclass::ID_LAST,
67 ID_GRID_NORMAL,
68 ID_LAST
69 };*/
70
72 virtual void VmeAdd(albaVME *vme);
73
75 virtual void VmeRemove(albaVME *vme);
76
77 virtual void VmeSelect(albaVME *vme, bool select);
78
80 virtual void VmeShow(albaVME *vme, bool show);
81
85 virtual void VmeUpdateProperty(albaVME *vme, bool fromTag = false);
86
89 virtual int GetNodeStatus(albaVME *vme);
90
95
100 virtual void VmeCreatePipe(albaVME *vme);
101
104 virtual void VmeDeletePipe(albaVME *vme);
105
106 virtual albaSceneGraph *GetSceneGraph() {return m_Sg;};
107
108 virtual void SetBackgroundColor(wxColor color);
109
110 typedef std::map<albaString, albaVisualPipeInfo> albaPipeMap;
111
113 void PlugVisualPipe(albaString vme_type, albaString pipe_type, long visibility = VISIBLE);
114
116
119
120protected:
122
123 virtual albaGUI *CreateGui();
124
126 void GetVisualPipeName(albaVME *vme, albaString &pipe_name);
127};
128#endif
#define EXPORT_STL_MAP(declspec_, K_, V_)
Definition: albaDllMacros.h:90
@ VISIBLE
Definition: albaView.h:59
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
albaGUI is a panel with function to easily create GUI.
Definition: albaGUI.h:110
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36
albaString - performs common string operations on c-strings.
Definition: albaString.h:43
albaVME -
Definition: albaVME.h:150
albaViewPlot is a View that got a albaXYPlot and plot curves on a plane.
Definition: albaViewPlot.h:52
albaSceneGraph * m_Sg
Definition: albaViewPlot.h:121
virtual albaPipe * GetNodePipe(albaVME *vme)
Return a pointer to the visual pipe of the node passed as argument.
albaViewPlot(const wxString &label="plot View")
albaPipeMap m_PipeMap
Map used to store visual pipeline associated with vme types.
Definition: albaViewPlot.h:115
virtual int GetNodeStatus(albaVME *vme)
Set the visualization status for the node (visible, not visible, mutex, ...)
std::map< albaString, albaVisualPipeInfo > albaPipeMap
Definition: albaViewPlot.h:110
virtual void VmeSelect(albaVME *vme, bool select)
virtual albaSceneGraph * GetSceneGraph()
Definition: albaViewPlot.h:106
virtual void VmeRemove(albaVME *vme)
Remove the vme from the view's scene-graph.
albaTypeMacro(albaViewPlot, albaView)
virtual void VmeShow(albaVME *vme, bool show)
Called to show/hide vme.
virtual void SetBackgroundColor(wxColor color)
virtual void VmeCreatePipe(albaVME *vme)
Create the visual pipe for the node passed as argument.
virtual void Create()
virtual albaGUI * CreateGui()
Internally used to create a new instance of the GUI.
void PlugVisualPipe(albaString vme_type, albaString pipe_type, long visibility=VISIBLE)
Plug a visual pipe for a particular vme.
void SetMouse(albaDeviceButtonsPadMouse *mouse)
Set the mouse device to use inside the view.
virtual void VmeAdd(albaVME *vme)
IDs for the GUI.
virtual void VmeUpdateProperty(albaVME *vme, bool fromTag=false)
Called to update visual pipe properties of the vme passed as argument.
virtual void OnEvent(albaEventBase *alba_event)
process the events sent by subjects
virtual ~albaViewPlot()
virtual void VmeDeletePipe(albaVME *vme)
Delete vme's visual pipe.
void GetVisualPipeName(albaVME *vme, albaString &pipe_name)
Return the visual pipe's name.
virtual albaView * Copy(albaObserver *Listener, bool lightCopyEnabled=false)
albaView is the base class for Views in alba.
Definition: albaView.h:79
Struct containing information regarding visual pipe plugged into the view.
Definition: albaViewPlot.h:35
albaString m_PipeName
Definition: albaViewPlot.h:36