17#ifndef __albaOpManager_H__
18#define __albaOpManager_H__
28#include "albaServiceClient.h"
29#include "albaAbsLogicManager.h"
42class albaOpReparentTo;
43class albaOpCreateGroup;
44class albaOpShowHistory;
77 virtual
void FillMenu(wxMenu* import, wxMenu* mexport, wxMenu* operations);
95 virtual
void OpRun(
int op_id);
98 virtual
void OpRun(
albaOp *op,
void *op_param = NULL);
101 virtual
void OpRun(
albaString &op_type,
void *op_param = NULL);
103 void RunOpAddGroup();
110 void RunOpReparentTo();
111 void RunOpShowHistory();
120 virtual
void WarningIfCantUndo (
bool warn) {m_Warn = warn;};
129 virtual bool Running() {
return m_Context.Caller() != NULL;};
194 virtual void Notify(
int msg,
long arg=0L);
216 wxAcceleratorEntry m_OpAccelEntries[
MAXOP];
236 friend class albaOpManagerTest;
#define ALBA_ID_DEC(idname)
This macros is used to define a new Id and should be placed in a .cpp file.
#define EXPORT_STL_VECTOR(declspec_, T_)
Implementation of the message object for the Subject/Observer design pattern.
class name: albaGUISettingsDialog.
class name: albaGUISettings base class for more complex specified classes regarding the setting of ap...
Interface implementing the Observer of the Subject/Observer design pattern.
albaOpContextStack represents the stack used for implementing Undo and Redo mechanism
class name: albaOpCopy Operation which perform copy of a node.
class name: albaOpCut Operation which perform cut on a node input.
albaOpShowHistory * m_OpShowHistory
virtual void SetToolbar(wxToolBar *tb)
Set a reference to the main toolbar.
albaOpCreateGroup * m_OpAddGroup
Pointer to the (always available) operation for Adding Group VMEs.
wxToolBar * m_ToolBar
Pointer to the application's Toolbal.
std::vector< albaOp * > m_OpList
List of pointer of plugged operations.
virtual void EnableOp(bool CanEnable=true)
Enable/Disable the men items operation.
virtual void Notify(int msg, long arg=0L)
Sent a string message to the listener.
albaOp * GetRunningOperation()
Return the current running operation.
virtual bool Running()
return true if there is a running operation.
albaDeviceButtonsPadMouse * m_Mouse
Pointer to the mouse devices.
virtual void OpDo(albaOp *op)
Execute the current operation.
void SetBuildNum(albaString val)
Get Build Num.
virtual bool ForceStopWithOk()
Try to Stop the Current operation with OK condition.
void SetMouse(albaDeviceButtonsPadMouse *mouse)
Initialize the action for the mouse device.
albaUser * m_User
User credentials.
virtual bool StopCurrentOperation()
Stop the current operation in any case - to be used as last resort.
virtual void OpRedo()
Execute the 'Do' method of the operation.
albaOpReparentTo * m_OpReparent
Pointer to the (always available) operation for reparenting VMEs.
albaOpPaste * m_OpPaste
Pointer to the (always available) operation for pasting VMEs.
albaOp * GetOperationById(int id)
Return an instance of operation from id.
virtual void OnEvent(albaEventBase *alba_event)
process the events sent by subjects
albaOpSelect * m_OpSelect
Pointer to the (always available) operation for selecting VMEs.
albaOp * m_RunningOp
Pointer to the current running operation.
bool m_Warn
Flag to warn the user when an operation that can not undo is starting.
albaObserver * m_Listener
virtual bool WarnUser(albaOp *op)
Warn the user if the operation is undoable.
virtual void SetListener(albaObserver *Listener)
virtual void OpRunOk(albaOp *op)
This method is called if the operation must be executed.
virtual void OpRunCancel(albaOp *op)
The operation is not executed and is deleted.
albaVME * m_NaturalNode
Pointer to the NATURAL node on which is running a non-input preserving operation.
albaOpCut * m_OpCut
Pointer to the (always available) operation for cutting VMEs.
albaOpContextStack m_Context
void * m_OpParameters
Pointer to the operation's parameter list.
virtual void OpUndo()
Execute the 'UnDo' method of the operation.
albaVME * m_Selected
Pointer to the current selected node.
wxMenuBar * m_MenuBar
Pointer to the Application's main menù.
albaUser * GetMafUser()
Return the current alba user.
virtual void SetMenubar(wxMenuBar *mb)
Set a reference to the main men.
void FillTraceabilityAttribute(albaOp *op, albaVME *in_node, albaVME *out_node)
Fill the attribute for traceability events.
albaOpCopy * m_OpCopy
Pointer to the (always available) operation for copying VMEs.
albaString GetBuildNum() const
Set Build Num.
albaOpRename * m_OpRename
Pointer to the (always available) operation for reparenting VMEs.
void SetAccelerator(albaOp *op)
virtual void EnableToolbar(bool CanEnable=true)
Enable/Disable the toolbar's buttons.
virtual void ClearUndoStack()
Clear the stack of executed operation.
virtual bool ForceStopWithCancel()
Try to Stop the Current Stop operation with CANCEL condition.
int m_NumOp
Number of plugged operations.
void EnableContextualMenu(albaGUITreeContextualMenu *contextualMenu, albaVME *node, bool CanEnable=true)
void RefreshMenu()
Called by logic to refresh the operation's menù items.
void SetMafUser(albaUser *user)
Set MafUser.
class name: albaOpPaste Operation which perform paste of a node previously copied or cut.
class name: albaOpPaste Operation which perform paste of a node previously copied or cut.
class name: albaOpSelect Operation for the selection of a vme.
albaString - performs common string operations on c-strings.
albaUser - Used to manage username and password; store them and give basic function to check user's c...