ALBA
albaOpSelect.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaOpSelect
5 Authors: Silvano Imboden, Gianluigi Crimi
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 __albaOpSelect_H__
17#define __albaOpSelect_H__
18//----------------------------------------------------------------------------
19// includes :
20//----------------------------------------------------------------------------
21#include "albaDecl.h"
22#include "albaEvent.h"
23#include "albaOp.h"
24#include "albaVMEIterator.h"
25#include "albaSmartPointer.h" //for albaAutoPointer
26//----------------------------------------------------------------------------
27// forward references :
28//----------------------------------------------------------------------------
29class albaVME;
30
31template class ALBA_EXPORT albaAutoPointer<albaVME>;
32
37class ALBA_EXPORT albaOpSelect: public albaOp
38{
39public:
41
43 albaOpSelect(wxString label=_("Select"));
47 bool Accept(albaVME* vme);
49 void SetInput(albaVME* vme);
51 albaVME* GetInput(){return m_OldNodeSelected;};
53 void SetNewSel(albaVME* vme);
55 albaVME* GetNewSel(){return m_NewNodeSelected;};
57 void OpDo();
59 void OpUndo();
63 void OpRun();
64protected:
67};
72class ALBA_EXPORT albaOpEdit: public albaOp
73{
74public:
76 albaOpEdit(wxString label="");
80 void SetInput(albaVME* vme) {m_Selection = vme;};
92 void SetClipboard(albaVME *node);
96 void OpRun();
97protected:
98
102
105};
110class ALBA_EXPORT albaOpCut: public albaOpEdit
111{
112public:
114 albaOpCut(wxString label=_("Cut"));
118 bool Accept(albaVME* vme);
120 void OpDo();
121
123 void OpUndo();
128
129protected:
131 void LoadChild(albaVME *vme);
134};
139class ALBA_EXPORT albaOpCopy: public albaOpEdit
140{
141public:
143 albaOpCopy(wxString label=_("Copy"));
147 bool Accept(albaVME* vme);
149 void OpDo();
151 void OpUndo();
154};
159class ALBA_EXPORT albaOpPaste: public albaOpEdit
160{
161public:
163 albaOpPaste(wxString label=_("Paste"));
165 bool Accept(albaVME* vme);
167 void OpDo();
169 void OpUndo();
172protected:
175};
176
181class ALBA_EXPORT albaOpRename : public albaOpEdit
182{
183public:
185 albaOpRename(wxString label = _("Rename"));
187 bool Accept(albaVME* vme);
189 void OpDo();
191 void OpUndo();
194
195 albaString GetOldName() { return m_OldName; };
196
197protected:
200};
201
202#endif
Hold a reference to a T instance.
class name: albaOpCopy Operation which perform copy of a node.
Definition: albaOpSelect.h:140
void OpDo()
execute the operation.
void OpUndo()
undo the operation.
bool Accept(albaVME *vme)
check if node can be input of the operation.
albaOpCopy(wxString label=_("Copy"))
Constructor.
~albaOpCopy()
Destructor.
albaOp * Copy()
return a instance of current object.
class name: albaOpCut Operation which perform cut on a node input.
Definition: albaOpSelect.h:111
albaAutoPointer< albaVME > m_SelectionParentBackup
Definition: albaOpSelect.h:132
~albaOpCut()
Destructor.
albaOp * Copy()
return a instance of current object.
void LoadVTKData(albaVME *vme)
Load VTK data for the specified VME (Added by Losi on 03.06.2010)
bool Accept(albaVME *vme)
check if node can be input of the operation.
void OpDo()
execute the operation.
void OpUndo()
undo the operation.
void LoadChild(albaVME *vme)
Load all children in the tree (Added by Di Cosmo on 24.05.2012)
bool m_Cutted
Definition: albaOpSelect.h:133
albaOpCut(wxString label=_("Cut"))
Constructor.
class name: albaOpEdit Interface operation for cut, copy, and paste operation.
Definition: albaOpSelect.h:73
void ClipboardClear()
clear the clipboard.
void SetClipboard(albaVME *node)
set the clipboard
void ClipboardBackup()
store clipboard for backup
void ClipboardRestore()
restore clipboard from backup
albaAutoPointer< albaVME > m_Backup
Definition: albaOpSelect.h:103
~albaOpEdit()
Destructor.
void OpRun()
runs operation.
albaVME * GetClipboard()
return the albaVME that is in the clipboard
albaOpEdit(wxString label="")
Constructor.
void SetInput(albaVME *vme)
set input node to the operation.
Definition: albaOpSelect.h:80
void RestoreBackLinksForTheSubTree(albaVME *vme)
bool CanRestoreBackLinksForTheSubTree(albaVME *vme, albaVME *root)
bool ClipboardIsEmpty()
check if the clipboard is empty.
void RemoveBackLinksForTheSubTree(albaVME *vme)
albaAutoPointer< albaVME > m_Selection
Definition: albaOpSelect.h:104
void SetSelectionParent(albaVME *parent)
set the parent of the selection
class name: albaOpPaste Operation which perform paste of a node previously copied or cut.
Definition: albaOpSelect.h:160
bool Accept(albaVME *vme)
check if node can be input of the operation.
albaOp * Copy()
return a instance of current object.
void OpDo()
execute the operation.
albaAutoPointer< albaVME > m_PastedVme
Definition: albaOpSelect.h:173
albaOpPaste(wxString label=_("Paste"))
Constructor.
void OpUndo()
undo the operation.
class name: albaOpPaste Operation which perform paste of a node previously copied or cut.
Definition: albaOpSelect.h:182
albaOp * Copy()
return a instance of current object.
albaOpRename(wxString label=_("Rename"))
Constructor.
void OpDo()
execute the operation.
void OpUndo()
undo the operation.
albaString GetOldName()
Definition: albaOpSelect.h:195
bool Accept(albaVME *vme)
check if node can be input of the operation.
albaString m_OldName
Definition: albaOpSelect.h:198
class name: albaOpSelect Operation for the selection of a vme.
Definition: albaOpSelect.h:38
albaAutoPointer< albaVME > m_NewNodeSelected
Definition: albaOpSelect.h:66
void SetNewSel(albaVME *vme)
selection of another node.
albaVME * GetInput()
retrieve the input node.
Definition: albaOpSelect.h:51
void OpUndo()
undo the operation.
bool Accept(albaVME *vme)
check if node can be input of the operation.
albaTypeMacro(albaOpSelect, albaOp)
~albaOpSelect()
Destructor.
albaOpSelect(wxString label=_("Select"))
Constructor.
void OpRun()
runs operation.
void SetInput(albaVME *vme)
set input node to the operation.
albaOp * Copy()
return a instance of current object.
albaAutoPointer< albaVME > m_OldNodeSelected
Definition: albaOpSelect.h:65
void OpDo()
execute the operation.
albaVME * GetNewSel()
retrieve new selected node.
Definition: albaOpSelect.h:55
Definition: albaOp.h:51
albaString - performs common string operations on c-strings.
Definition: albaString.h:43
albaVME -
Definition: albaVME.h:150