wxArt2D
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
a2dCentralCanvasCommandProcessor Class Reference

a command wrapper specially designed to work with wxArt2D docview classes and rest. More...

#include <cancom.h>

Inheritance diagram for a2dCentralCanvasCommandProcessor:
Inheritance graph
[legend]
Collaboration diagram for a2dCentralCanvasCommandProcessor:
Collaboration graph
[legend]

Public Member Functions

 a2dCentralCanvasCommandProcessor (long flags=a2dDEFAULT_DOCUMENT_FLAGS, bool initialize=true, int maxCommands=-1)
 
 a2dCentralCanvasCommandProcessor (a2dDocumentCommandProcessor *other)
 initilize with lower level command processor
 
 ~a2dCentralCanvasCommandProcessor ()
 destructor
 
void UpdateAllViews ()
 
void OnUpdateUndo (wxUpdateUIEvent &event)
 
void OnUpdateRedo (wxUpdateUIEvent &event)
 
bool ProcessEvent (wxEvent &event)
 reroutes events to the current active drawingPart when not handled here. More...
 
void OnPushToolUpdateMenu (wxUpdateUIEvent &event)
 
void OnUpdateMenu (wxUpdateUIEvent &event)
 
void OnMenu (wxCommandEvent &event)
 All menu's a2dMenuIdItem using can be intercepted here.
 
bool SubmitToDrawing (a2dCommand *command, bool storeIt=true)
 Submit a command to the active drawing.
 
a2dCanvasDocumentGetCanvasDocument ()
 return current document in the command processor
 
double GetUnitsScaleOfDocument ()
 Get UnitScale of current document if set else returns 1.
 
void SetGridX (const a2dDoMu &gridX)
 grid setting X
 
void SetGridY (const a2dDoMu &gridY)
 grid setting Y
 
void Refresh ()
 refresh what is documents and shown on views
 
bool SaveLayers (const wxFileName &fileName)
 
bool LoadLayers (const wxFileName &fileName)
 
a2dCanvasObjectAddCurrent (a2dCanvasObject *objectToAdd, bool withUndo=false, a2dPropertyIdList *setStyles=NULL, a2dCanvasObject *parentObject=NULL)
 add the current canvas object to parent as child More...
 
bool CvgString (const wxString &cvgString)
 
bool SetPropertyToObject (const wxString &objectname, const wxString &propertyname, const wxString &value=wxT(""))
 To set a property by to a certain object. More...
 
bool SetPropertyToObject (const wxString &objectname, a2dNamedProperty *property)
 To set a property by to a certain object. More...
 
bool SetLayerProperty (long layer, const wxString &propertyname, const wxString &value)
 set a layer property via command "setlayerproperty" More...
 
a2dBaseToolGetActiveTool ()
 returns the current active tool in the current active view More...
 
a2dBaseToolPopTool ()
 pop a tool from the tool stack of the current active a2dCanvasView
 
bool SetShowObject (int index)
 set show object using index of child
 
bool Zoom (double x1, double y1, double x2, double y2, bool upp)
 zoom into this area
 
bool Update ()
 force an update of information on the currently active view
 
void SetCurrentView (a2dView *view)
 besides calling the base class, its connect to Current view (active or not) for some events
 
a2dCanvasViewCheckDrawer () const
 is a view with a2dCanvasView active
 
a2dCanvasDocumentCheckCanvasDocument () const
 is a view with a2dCanvasView active and does it have a document
 
a2dCanvasCommandProcessorGetDrawingCmdProcessor ()
 get commandprocessor of document
 
void FillLibraryPoints ()
 
a2dCanvasDocumentGetLibraryPoints () const
 
virtual void OnExit ()
 cleaup modeless dialogs created from here
 
virtual bool ShowDlg (const a2dCommandId *comID, bool modal, bool onTop)
 
void DeleteDlgs ()
 
bool IsShownStructureDlg ()
 
void SetBooleanEngineMarge (const a2dDoMu &marge)
 boolean engine setting
 
void SetBooleanEngineGrid (long grid)
 boolean engine setting
 
void SetBooleanEngineDGrid (double dgrid)
 boolean engine setting
 
void SetBooleanEngineCorrectionAber (const a2dDoMu &aber)
 boolean engine setting
 
void SetBooleanEngineCorrectionFactor (const a2dDoMu &aber)
 boolean engine setting
 
void SetBooleanEngineMaxlinemerge (const a2dDoMu &maxline)
 boolean engine setting
 
void SetBooleanEngineWindingRule (bool rule)
 boolean engine setting
 
void SetBooleanEngineRoundfactor (double roundfac)
 boolean engine setting
 
void SetBooleanEngineSmoothAber (const a2dDoMu &aber)
 
void SetBooleanEngineLinkHoles (bool doLinkHoles)
 
void SetRadiusMin (const a2dDoMu &radiusMin)
 Polygon/polyline to Arc Minimum radius to test.
 
void SetRadiusMax (const a2dDoMu &radiusMax)
 Polygon/polyline to Arc Maximum radius to test.
 
void SetAberPolyToArc (const a2dDoMu &aber)
 Polygon/polyline to Arc Maximum abberation.
 
void SetAberArcToPoly (const a2dDoMu &aber)
 Arc to Polygon/polyline Maximum abberation.
 
void SetSmall (const a2dDoMu &smallest)
 detection of small object, smaller than this
 
bool GdsIoSaveTextAsPolygon (bool onOff)
 
bool KeyIoSaveTextAsPolygon (bool onOff)
 
const a2dDoMuGetRadiusMin () const
 Polygon/polyline to Arc Minimum radius to test.
 
const a2dDoMuGetRadiusMax () const
 Polygon/polyline to Arc Maximum radius to test.
 
const a2dDoMuGetAberPolyToArc () const
 Polygon/polyline to Arc Maximum abberation.
 
const a2dDoMuGetAberArcToPoly () const
 Arc to Polygon/polyline Maximum abberation.
 
const a2dDoMuGetSmall () const
 detection of small object, smaller than this
 
const a2dDoMuGetBooleanEngineMarge () const
 boolean engine setting
 
long GetBooleanEngineGrid () const
 boolean engine setting
 
double GetBooleanEngineDGrid () const
 boolean engine setting
 
const a2dDoMuGetBooleanEngineCorrectionAber () const
 boolean engine setting
 
const a2dDoMuGetBooleanEngineCorrectionFactor () const
 boolean engine setting
 
const a2dDoMuGetBooleanEngineMaxlinemerge () const
 boolean engine setting
 
bool GetBooleanEngineWindingRule () const
 boolean engine setting
 
double GetBooleanEngineRoundfactor () const
 boolean engine setting
 
const a2dDoMuGetBooleanEngineSmoothAber () const
 boolean engine setting
 
bool GetBooleanEngineLinkHoles () const
 boolean engine setting
 
bool SaveViewAsImage (a2dCanvasDocument *doc, const wxString &file, wxBitmapType type, a2dCanvasObject *from)
 Save current view as an image of the given type.
 
- Public Member Functions inherited from a2dDocumentCommandProcessor
 a2dDocumentCommandProcessor (long flags=a2dDEFAULT_DOCUMENT_FLAGS, bool initialize=true, int maxCommands=-1)
 Constructor. More...
 
 a2dDocumentCommandProcessor (a2dDocumentCommandProcessor *other)
 construct and initilize based on other.
 
 ~a2dDocumentCommandProcessor ()
 destructor
 
void OnMenu (wxCommandEvent &event)
 All menu's ( also using a2dMenuIdItem ) can be intercepted here. More...
 
wxString AskFile (const wxString &message, const wxString &default_path="", const wxString &default_filename="", const wxString &default_extension="", const wxString &wildcard="*.*", int flags=0, int x=-1, int y=-1)
 ask for a file using a file selector. More...
 
virtual void Initialize ()
 Initializes data; currently just calls OnCreateFileHistory. More...
 
virtual bool SubmitToDocument (a2dCommand *command, bool storeIt=true)
 redirect the command to the current document ( if available )
 
bool FileClose (bool force=true)
 Closes and deletes the currently active document unless Close was vetod.
 
a2dError FileNew (a2dDocumentPtr &doc, a2dTemplateFlagMask docTemplateFlags=a2dTemplateFlag::VISIBLE)
 Creates a document from a list of templates (if more than one template).
 
a2dDocumentTemplateGetPreferredOpenDocumentTemplate ()
 Return the preferred document template for Opening files.
 
void SetPreferredOpenDocumentTemplate (a2dDocumentTemplate *docTemplate)
 Set the preferred document template for Opening files.
 
a2dError FileOpen (a2dDocumentPtr &doc, const wxFileName &file=wxFileName(wxT("")), a2dTemplateFlagMask docTemplateFlags=a2dTemplateFlag::VISIBLE|a2dTemplateFlag::LOAD)
 Creates a new document and reads in the selected file. More...
 
a2dError FilesOpen (const wxString &openPath=wxT(""), int dialogFlags=wxFD_MULTIPLE|wxFD_OPEN, a2dTemplateFlagMask docTemplateFlags=a2dTemplateFlag::VISIBLE|a2dTemplateFlag::LOAD)
 open one or more files using a file dialog More...
 
a2dError FileOpenCheck (a2dDocumentPtr &doc, const wxFileName &file, bool checkModification)
 Return existing document, or open it from file. More...
 
bool FileRevert ()
 revert the current document to the non saved document on disk. More...
 
bool FileSave ()
 Saves the current document by calling wxDocument::Save for the current document.
 
bool FileSaveAll ()
 Saves the documents by calling wxDocument::Save for each document.
 
bool FileSaveAs (const wxFileName &file=wxFileName(wxT("")), a2dDocumentFlagMask flags=a2dREFDOC_NON)
 Calls wxDocument::SaveAs for the current document. More...
 
a2dDocumentTemplateGetPreferredExportDocumentTemplate ()
 Return the preferred document template for Exporting files.
 
void SetPreferredExportDocumentTemplate (a2dDocumentTemplate *docTemplate)
 Set the preferred document template for Exporting files.
 
bool FileExport (const wxFileName &file=wxFileName(wxT("")), const wxString &description=wxT(""), a2dDocumentFlagMask flags=a2dREFDOC_NON)
 Calls a2dDocument::Export for the current document. More...
 
a2dDocumentTemplateGetPreferredImportDocumentTemplate ()
 Return the preferred document template for Importing files.
 
void SetPreferredImportDocumentTemplate (a2dDocumentTemplate *docTemplate)
 Set the preferred document template for Importing files.
 
bool FileImport (const wxFileName &file=wxFileName(wxT("")), const wxString &description=wxT(""), a2dDocumentFlagMask flags=a2dREFDOC_NON)
 Calls a2dDocument::Import for the current document. More...
 
bool Print (a2dPrintWhat printWhat=a2dPRINT_Print)
 print the current active view.
 
bool Preview (a2dPrintWhat printWhat=a2dPRINT_Preview)
 print preview of the current active view.
 
bool PrintSetup (a2dPrintWhat printWhat)
 printer setup the current active document or central command processor.
 
wxPageSetupDialogData GetDefaultPrintSettings ()
 Return page setup data, as set in the current default printer.
 
wxPageSetupDialogData * GetPrintSetup (a2dPrintWhat printWhat)
 get printer setup the current active view or document or the one from central command processor.
 
void OnCannotOpenDocument (a2dCommandEvent &event)
 default handler when a file could not be opened More...
 
virtual a2dError CreateDocuments (const wxString &path, a2dDocumentFlagMask documentflags=a2dREFDOC_NON, a2dDocumentTemplate *wantedDocTemplate=NULL, int dialogflags=wxFD_OPEN, a2dTemplateFlagMask docTemplateFlags=a2dTemplateFlag::VISIBLE)
 Creates new documents in a manner determined by the flags parameter, which can be: More...
 
a2dViewAddDocumentCreateView (a2dDocument *newDoc, const wxString &viewTypeName=wxT(""), a2dDocumentFlagMask documentflags=a2dREFDOC_NEW, a2dTemplateFlagMask docTemplateFlags=a2dTemplateFlag::VISIBLE, a2dTemplateFlagMask viewTemplateFlags=a2dTemplateFlag::VISIBLE)
 adds the given document, and creates a view for it. More...
 
a2dError AddCreatedDocument (a2dDocument *newDoc, bool sentPreAddCreatedDocumentEvent=false, bool sentPostCreateDocumentEvent=false, a2dDocumentFlagMask documentflags=a2dREFDOC_NEW, a2dTemplateFlagMask docTemplateFlags=a2dTemplateFlag::VISIBLE)
 add a in memory created document, but do not create a view. More...
 
virtual a2dViewCreateView (a2dDocument *doc, const wxString &viewTypeName=wxT(""), a2dDocumentFlagMask flags=a2dREFDOC_NON, a2dTemplateFlagMask viewTemplateFlags=a2dTemplateFlag::VISIBLE)
 Creates a new view for the given document. More...
 
void ReleaseTemplate (a2dDocumentTemplate *temp, long flags=0)
 remove/release a template More...
 
virtual bool FlushDoc (a2dDocument *doc)
 
a2dDocumentTemplateMatchTemplate (const wxString &path)
 return template suitable for loading the file in path, using FindTemplateForPath.
 
virtual a2dError SelectDocumentPath (const wxString &title, const a2dDocumentTemplateList &docTemplates, wxString &path, a2dDocumentFlagMask flags, wxArrayString *selectedPaths, a2dDocumentTemplate **chosenTemplate, int dialogflags=wxFD_OPEN, a2dTemplateFlagMask docTemplateFlags=a2dTemplateFlag::VISIBLE, const a2dDocumentTemplate *preferedTemplate=NULL)
 pops up a file selector with optional a list of filters More...
 
virtual a2dDocumentTemplateSelectDocumentType (bool sort=false, a2dTemplateFlagMask docTemplateFlags=a2dTemplateFlag::VISIBLE)
 Returns a document template by asking the user. More...
 
virtual a2dDocumentTemplateFindTemplateForPath (const a2dDocumentTemplateList &docTemplates, const wxString &path, a2dTemplateFlagMask mask=a2dTemplateFlag::VISIBLE)
 function used in CreateDocument() when a2dREFDOC_SILENT is used for creating it. More...
 
virtual a2dViewTemplateSelectViewType (a2dDocument *doc, const a2dViewTemplateList &list, const wxString &viewTypeName=wxT(""), bool sort=false, a2dTemplateFlagMask viewTemplateFlags=a2dTemplateFlag::VISIBLE)
 Returns a view template by asking the user. More...
 
void AssociateDocTemplate (a2dDocumentTemplate *temp)
 add a reference to a a2dDocumentTemplate to the a2dDocumentTemplateList
 
void DisassociateDocTemplate (a2dDocumentTemplate *temp)
 remove a reference to a a2dDocumentTemplate to the a2dDocumentTemplateList
 
void AssociateViewTemplate (a2dViewTemplate *temp)
 add a reference to a a2dViewTemplate to the wxViewTemplateReflist
 
void DisassociateViewTemplate (a2dViewTemplate *temp)
 remove a reference to a a2dViewTemplate to the wxViewTemplateReflist
 
void SetCurrentDocument (a2dDocument *document)
 set the current document, only needed in cases More...
 
a2dDocumentGetCurrentDocument () const
 Get the current Document, which is the document that was last accessed from a view. More...
 
a2dCommandProcessorGetCurrentDocumentCommandProcessor () const
 get the command processor of the current document. More...
 
void SetMaxDocsOpen (size_t n)
 Sets the maximum number of documents that can be open at a time. More...
 
size_t GetMaxDocsOpen () const
 Gets the maximum number of documents that can be open at a time.
 
void AddDocument (a2dDocument *doc)
 Add a document to the manager's list. More...
 
void RemoveDocument (a2dDocument *doc)
 remove a document from the manager's list More...
 
bool CloseDocuments (bool force=true)
 closes all currently open documents More...
 
bool Clear (bool force=true)
 Clear remaining documents and templates. More...
 
bool Exit (bool force=true)
 Called to Exit the application properly. More...
 
void SetBusyExit (bool exitBusy)
 
bool GetBusyExit ()
 return true if the application is bussy exiting.
 
a2dViewGetCurrentView () const
 return the one that is active right now (e.g. has focus in case of a wxWindow), or NULL
 
const a2dDocumentListGetDocuments () const
 returns a reference to the a2dDocumentList, which contains all a2dDocument's that are open.
 
const a2dDocumentTemplateListGetDocTemplates ()
 returns a reference to the a2dDocumentTemplateList, which contains all a2dDocumentTemplate's.
 
const a2dViewTemplateListGetViewTemplates ()
 returns a reference to the a2dViewTemplateList, which contains all a2dViewTemplate's.
 
virtual bool MakeDefaultName (wxString &buf)
 Make a default document name.
 
virtual wxString MakeFrameTitle (a2dDocument *doc, const wxString &modifiedIndicator=wxT(""))
 Make a frame title (override this to do something different) More...
 
virtual a2dFileHistoryOnCreateFileHistory ()
 A hook to allow a derived class to create a different type of file history. Called from Initialize.
 
virtual a2dFileHistoryGetFileHistory () const
 returns a pointer to the file history list
 
virtual void AddFileToHistory (const wxFileName &file, a2dDocumentTemplate *docTemplate=NULL, a2dViewTemplate *viewTemplate=NULL)
 File history management.
 
virtual void RemoveFileFromHistory (size_t i)
 Remove a file from history.
 
virtual size_t GetHistoryFilesCount () const
 Return number fo files in history.
 
virtual a2dFileHistoryItemGetHistoryFileItem (size_t i) const
 return the a2dFileHistoryItem of the i'th file in the history
 
virtual wxString GetHistoryFile (size_t i) const
 return the filename of the i'th file in the history
 
virtual void FileHistoryUseMenu (wxMenu *menu)
 Use this menu for appending recently-visited document filenames,. More...
 
virtual void FileHistoryRemoveMenu (wxMenu *menu)
 Removes the given menu from the list of menus managed by the file history object.
 
virtual void FileHistoryAddFilesToMenu ()
 Appends the files in the history list, to all menus managed by the file history object.
 
virtual void FileHistoryAddFilesToMenu (wxMenu *menu)
 Appends the files in the history list, to the given menu only.
 
wxString GetLastDirectory () const
 Gets the directory to be displayed to the user when opening a file. Initially this is empty.
 
void SetLastDirectory (const wxString &dir)
 Sets the directory to be displayed to the user when opening a file. Initially this is empty.
 
void CheckCurrentView (a2dView *view)
 Views do inform the document manager when a view will be destroyed. More...
 
wxPageSetupDialogData * GetPageSetupData (void) const
 
void SetPageSetupData (const wxPageSetupDialogData &pageSetupData)
 
void SetPageSetupData (wxPageSetupDialogData *pageSetupData)
 
void SetUndo (bool withUndo)
 set undo storage or not
 
bool GetUndo ()
 get undo storage setting
 
- Public Member Functions inherited from a2dCommandProcessor
 a2dCommandProcessor (int maxCommands=-1)
 Constructor. More...
 
virtual ~a2dCommandProcessor ()
 destructor
 
virtual bool Submit (a2dCommand *command, bool storeIt=true)
 next to the base class submit, it sets a2DocumentCommandProcessor for a2dCommand
 
virtual void Store (a2dCommand *command)
 just store the command without executing it
 
virtual bool Undo ()
 Undo one command or command group.
 
virtual bool Redo ()
 Redo one command or command group.
 
virtual bool CanUndo () const
 Are there commands to undo and can they be undone ?
 
virtual bool CanRedo () const
 Are there commands to redo and can they be redone ?
 
virtual void SetMenuStrings ()
 does sent an event to update menu strings after a command
 
wxString GetUndoMenuLabel () const
 Gets the current Undo menu label.
 
wxString GetRedoMenuLabel () const
 Gets the current Undo menu label.
 
a2dCommandGetCurrentCommand () const
 command list access
 
int GetMaxCommands () const
 get the limit on number of commands to store
 
a2dCommandGroupGetRootGroup () const
 return top/startgroup
 
a2dCommandGroupGetCurrentGroup () const
 return current group
 
void SetCurrentGroup (a2dCommandGroup *group)
 set current group More...
 
virtual void ClearCommands ()
 remove all commands stored
 
const wxString & GetUndoAccelerator () const
 By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y".
 
const wxString & GetRedoAccelerator () const
 By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y".
 
void SetUndoAccelerator (const wxString &accel)
 By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y".
 
void SetRedoAccelerator (const wxString &accel)
 By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y".
 
virtual bool SetOrAddPropertyToObject (a2dObject *propRefObject, const wxString &name, const wxString &value=wxT(""), bool withUndo=true)
 set a named property to the given object More...
 
virtual bool SetOrAddPropertyToObject (a2dObject *propRefObject, a2dNamedProperty *property, bool withUndo=true)
 set a named property to the given object More...
 
a2dCommandGroupCommandGroupBegin (const wxString &name)
 Start a new command group. More...
 
void CommandGroupBegin (a2dCommandGroup *group)
 Start a new command group.
 
void CommandGroupEnd (a2dCommandGroup *group)
 End a command group.
 
bool SmrtPtrRelease ()
 
- Public Member Functions inherited from a2dObject
bool SearchDynamicEventTable (wxEvent &event)
 
void Connect (int winid, int lastId, int eventType, wxObjectEventFunction func, wxObject *userData=(wxObject *) NULL, wxEvtHandler *eventSink=(wxEvtHandler *) NULL)
 
bool Disconnect (int winid, int lastId, wxEventType eventType, wxObjectEventFunction func=NULL, wxObject *userData=(wxObject *) NULL, wxEvtHandler *eventSink=(wxEvtHandler *) NULL)
 
void ProcessConnectedEvent (wxEvent &event)
 wxCHECK_VERSION(2,9,0) More...
 
void ConnectEvent (wxEventType type, wxEvtHandler *eventSink)
 
bool DisconnectEvent (wxEventType type, wxEvtHandler *eventSink)
 
bool DisconnectEventAll (wxEvtHandler *eventSink)
 Remove all dynamic events in classA, going to classB (eventSink) More...
 
 a2dObject ()
 constructor
 
virtual ~a2dObject ()
 destructor
 
void operator= (const a2dObject &other)
 assignment operator
 
int GetOwnedBy ()
 like it to be protected, but this does not work with wxList macros More...
 
virtual a2dObjectSetNonDynamic ()
 Call to mark this object as non-dynamic (static/local/auto) More...
 
void CheckReferences ()
 Check zero reference count and delete if count is 0. More...
 
a2dObjectClone (CloneOptions options, a2dRefMap *refs=NULL) const
 create an exact copy of this property
 
 a2dObject (const a2dObject &other, CloneOptions options, a2dRefMap *refs)
 
virtual wxString GetName () const
 Returns the name of this object, if no name is given the internal id will be returned. More...
 
virtual void SetName (const wxString &name)
 Creates the a2dStringProperty PROPID_Name. More...
 
virtual bool IsTemporary_DontSave () const
 Check if this is a temporary object, which should not be saved.
 
void SaveAsDocument (a2dIOHandlerXmlSerOut &out)
 Save this object and all below as an XML document. More...
 
virtual void Save (wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dObjectList *towrite)
 write all needed to an XML type of file called the CVG format More...
 
void LoadFromDocument (a2dIOHandlerXmlSerIn &parser)
 Load this object and all below from an XML document. More...
 
virtual void Load (wxObject *parent, a2dIOHandlerXmlSerIn &parser)
 load object from CVG file More...
 
wxInt64 GetUniqueSerializationId () const
 return a unique id for this object More...
 
virtual bool AlwaysWriteSerializationId () const
 If true, always write an id. More...
 
virtual bool LinkReference (a2dObject *other)
 link a reference in the object to the given value More...
 
virtual void ResolveInform ()
 inform an object that reference resolution was done More...
 
void Walker (wxObject *parent, a2dWalkerIOHandler &handler)
 This is used to recursively walk through an object tree.
 
void SetCheck (bool check)
 general flag use at will. More...
 
bool GetCheck () const
 general flag use at will.
 
void SetRelease (bool value)
 set release flag More...
 
bool GetRelease () const
 get release flag More...
 
a2dAutoZeroPtr< a2dObject > ** GetAutoZeroPtrList ()
 return the list head pointer for autozero pointers to this object More...
 
 DECLARE_PROPERTIES ()
 
a2dNamedPropertyGetProperty (const a2dPropertyId *propertyId, a2dPropertyId::Flags flags=a2dPropertyId::flag_none) const
 get property on this object More...
 
void SetProperty (a2dNamedProperty *propertyHolder, a2dPropertyId::SetFlags flags=a2dPropertyId::set_none)
 Set the property to the this object. More...
 
void SetProperty (const a2dNamedProperty &propertyHolder, a2dPropertyId::SetFlags flags=a2dPropertyId::set_none)
 Set the property to the this object and if enabled, to all childs and object members. More...
 
virtual a2dNamedPropertyFindProperty (const a2dPropertyId *id, a2dPropertyId::Flags flags=a2dPropertyId::flag_none)
 Find a dynamic property with given id in the property list. More...
 
virtual const a2dNamedPropertyFindProperty (const a2dPropertyId *id, a2dPropertyId::Flags flags=a2dPropertyId::flag_none) const
 Find a dynamic property with given id in the property list. More...
 
virtual bool HasProperty (const a2dPropertyId *id, const wxString &stringvalue=wxEmptyString) const
 Check if the object has a property with given id and string representation. More...
 
virtual void OnPropertyChanged (const a2dPropertyId *id)
 This function is called after a property changed. More...
 
virtual bool EditProperties (const a2dPropertyId *id, bool withUndo=true)
 edit properties of the object More...
 
void TakeOverProperties (a2dObject *from, a2dPropertyIdList *listOfIds)
 Properties in the id list are taken from the given object, en set to this. More...
 
wxURI GetURI () const
 quick way to get to PROPID_URI property More...
 
void SetURI (const wxURI &url)
 quickly set a property PROPID_URI More...
 
const a2dNamedPropertyListGetPropertyList () const
 Get the Property List. More...
 
bool HasDynamicProperties () const
 test if there are dynamic properties in the m_propertylist
 
virtual bool RemoveProperty (const a2dPropertyId *id, bool all=true)
 This function is called by a2dPropertyId to remove a property from the list. More...
 
void RemoveTemporaryProperties ()
 remove all temporary properties
 
virtual bool AddProperty (a2dNamedProperty *property)
 This function is called by a2dPropertyId to add a property to the list. More...
 

Protected Member Functions

void OnBusyBegin (a2dCommandProcessorEvent &event)
 do this at command start
 
void OnBusyEnd (a2dCommandProcessorEvent &event)
 do this at command end
 
void OnChangedDocument (a2dCommandEvent &event)
 
- Protected Member Functions inherited from a2dDocumentCommandProcessor
void OnUndo (wxCommandEvent &event)
 default handler for GUI event with id wxID_UNDO
 
void OnRedo (wxCommandEvent &event)
 default handler for GUI event with id wxID_REDO
 
void OnUpdateFileOpen (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnUpdateFileClose (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnUpdateFileCloseAll (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnUpdateFileRevert (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnUpdateFileNew (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnUpdateFileSave (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnUpdateFileSaveAll (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnUpdateFileSaveAs (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnUpdateCreateView (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnUpdateUndo (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnUpdateRedo (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnUpdatePrint (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnUpdatePrintSetup (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnUpdatePreview (wxUpdateUIEvent &event)
 Handlers for UI update commands.
 
void OnActivateView (a2dViewEvent &viewevent)
 Views do inform the document manager. More...
 
void OnRemoveView (a2dDocumentEvent &viewevent)
 Views do inform the document manager when a view will be removed. More...
 
void OnAddView (a2dDocumentEvent &docevent)
 It works when a2dView::SetDocument() executing.
 
- Protected Member Functions inherited from a2dCommandProcessor
void SentBusyEvent (bool start, a2dCommand *command)
 
a2dCommandGroupFindActiveGroup ()
 find the currently active command group
 
void SetCurrentToLastActive ()
 Set the current command to the last command in the active group.
 
virtual bool DoPreCommand (a2dCommand &cmd)
 Called before doing the actual command.
 
virtual bool DoPostCommand (a2dCommand &cmd)
 Called after doing the actual command.
 
virtual bool DoCommand (a2dCommand &cmd)
 sents a a2dCommandProcessorEvent with id ::wxEVT_DO
 
virtual bool UndoCommand (a2dCommand &cmd)
 sents a a2dCommandProcessorEvent with id ::wxEVT_UNDO
 
virtual bool RedoCommand (a2dCommand &cmd)
 sents a a2dCommandProcessorEvent with id ::wxEVT_REDO
 
- Protected Member Functions inherited from a2dObject
virtual bool DoIgnoreIfNotMember (const a2dPropertyId *id) const
 used to decide if a property shall be ignored, if it is not a member More...
 
virtual void DoWalker (wxObject *parent, a2dWalkerIOHandler &handler)
 iterate over this object and its children More...
 
virtual void DoSave (wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
 Save settings.
 
virtual void DoLoad (wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
 Load settings.
 

Protected Attributes

a2dSmrtPtr< a2dCanvasDocumentm_librarypoints
 
LayerPropertiesDialogm_layersdlg
 
a2dLayerOrderDialogm_layerOrderDlg
 
a2dCanvasObjectsDocDialogm_structDlgDoc
 
- Protected Attributes inherited from a2dDocumentCommandProcessor
long m_flags
 user flags use at will ( not used internal )
 
int m_defaultDocumentNameCounter
 to create unique new names for file
 
size_t m_maxDocsOpen
 the maximum of documents allowed open
 
a2dDocumentList m_docs
 list of all that are open
 
a2dDocumentTemplateList m_docTemplates
 templates for documents
 
a2dViewTemplateList m_viewTemplates
 templates for views
 
a2dViewm_currentView
 the current view (active or inactive)
 
a2dDocumentm_currentDocument
 the current active document
 
a2dFileHistorym_fileHistory
 the file history
 
wxString m_lastDirectory
 the last visited directory
 
a2dDocumentTemplatem_preferredImportTemplate
 preferred document template for Importing files.
 
a2dDocumentTemplatem_preferredExportTemplate
 preferred document template for Exporting files.
 
a2dDocumentTemplatem_preferredOpenTemplate
 preferred document template for Opening files.
 
bool m_withUndo
 if set, for commands which can undo, will be submitted like that.
 
bool m_busyExit
 set when terminating application
 
wxPageSetupDialogData * m_pageSetupData
 this is the global printer page setup data for printer
 
- Protected Attributes inherited from a2dCommandProcessor
wxUint32 m_maxNoCommands
 maximum number of commands to store
 
a2dSmrtPtr< a2dCommandGroupm_rootGroup
 this is the root of the command group tree
 
a2dSmrtPtr< a2dCommandGroupm_currentGroup
 this is the parent group of the current command ( which may be a group itself )
 
a2dCommandPtr m_currentCommand
 this is the tree-trace to the currently active command
 
wxString m_undoAccelerator
 associated undo accelerator attached to menu
 
wxString m_redoAccelerator
 associated redo accelerator
 
- Protected Attributes inherited from a2dObject
a2dNamedPropertyList m_propertylist
 properties
 
int m_refcount
 how many references to this object do exist
 
bool m_check: 1
 used for linking multiple referenced objects when serializing
 
bool m_release: 1
 when set object is treated as being deleted, and wil be deleted in idle time.
 
bool m_recursion_active: 1
 this is used as a recursion stopper
 
bool m_pendingDisconnects: 1
 
unsigned int m_iteratorCount
 
a2dAutoZeroPtr< a2dObject > * m_autozeroptrlist
 this is a list of all a2dAutoZeroPtr object pointing to this object
 

Friends

class a2dCommand_GroupAB
 

Additional Inherited Members

- Public Types inherited from a2dObject
enum  CloneOptions {
  clone_members = 0x00000001, clone_properties = 0x00000002, clone_childs = 0x00000004, clone_unused = 0x00000008,
  clone_setoriginal = 0x00000010, clone_seteditcopy = 0x00000020, clone_noReference = 0x00000040, clone_noCameleonRef = 0x00000080,
  clone_toDrag = 0x00000100, clone_flat = 0x00000000, clone_deep = clone_members | clone_properties | clone_childs
}
 options for cloning More...
 
typedef a2dAutoZeroPtr< a2dObjectTAutoZeroPtrListClass
 this is needed inside the smart pointer template code
 
- Static Public Attributes inherited from a2dObject
static a2dPropertyIdBoolPROPID_Check = NULL
 used for linking multiple referenced objects when serializing
 
static a2dPropertyIdUriPROPID_URI = NULL
 attach an URL to the object
 
static a2dPropertyIdStringPROPID_Name = NULL
 Name property, to return name of this object.
 
static a2dPropertyIdVoidPtrPROPID_autozeroptrlist = NULL
 
static const a2dSignal sm_Edit_properties = wxNewId()
 edit properties event, see EditProperties()
 
- Protected Types inherited from a2dObject
enum  { refcount_nondynamic = 0x76543210 }
 special refcount value for non-dynamic objects
 

Detailed Description

a command wrapper specially designed to work with wxArt2D docview classes and rest.

This class wraps command string into functions for a a2dDocumentCommandProcessor.

Definition at line 100 of file cancom.h.

Constructor & Destructor Documentation

a2dCentralCanvasCommandProcessor::a2dCentralCanvasCommandProcessor ( long  flags = a2dDEFAULT_DOCUMENT_FLAGS,
bool  initialize = true,
int  maxCommands = -1 
)

Member Function Documentation

a2dCanvasObject * a2dCentralCanvasCommandProcessor::AddCurrent ( a2dCanvasObject objectToAdd,
bool  withUndo = false,
a2dPropertyIdList setStyles = NULL,
a2dCanvasObject parentObject = NULL 
)

add the current canvas object to parent as child

First the current style is to the currentobject, and then it is added to the document.

Parameters
objectToAddthis is the object to add to the current parentobject
withUndoif true a a2dCommand_AddObject will be used to have undo information
setStylesthe object added will get these styles that are currently set in the command processor
parentObjectwhen not NULL, this will become the current parent object.

Definition at line 1284 of file cancom.cpp.

a2dBaseTool * a2dCentralCanvasCommandProcessor::GetActiveTool ( )

returns the current active tool in the current active view

If the view is of type a2dCanvasView, then if a a2dToolContr is set for it, the first tool on its tool stack is returned.

Definition at line 1574 of file cancom.cpp.

bool a2dCentralCanvasCommandProcessor::ProcessEvent ( wxEvent &  event)
virtual

reroutes events to the current active drawingPart when not handled here.

In general menu commands are handled here or in the a2dDrawingPart.

Reimplemented from a2dDocumentCommandProcessor.

Definition at line 315 of file cancom.cpp.

bool a2dCentralCanvasCommandProcessor::SetLayerProperty ( long  layer,
const wxString &  propertyname,
const wxString &  value 
)

set a layer property via command "setlayerproperty"

Parameters
layerlayer to add property to
propertynamename of property
value

Definition at line 1555 of file cancom.cpp.

bool a2dCentralCanvasCommandProcessor::SetPropertyToObject ( const wxString &  objectname,
const wxString &  propertyname,
const wxString &  value = wxT( "" ) 
)

To set a property by to a certain object.

Parameters
objectnamename of the object to set the property to. object name is:
  1. a2dBaseTool Sets a property on the a2dToolContr its FirstTool of the current a2dCanvasView.
  2. a2dToolContr Sets a property on the a2dToolContr of the current a2dCanvasView.
  3. a2dCanvasCommandProcessor Sets a property to this a2dCentralCanvasCommandProcessor
  4. a2dCentralCanvasCommandProcessor Sets a property on the current a2dCanvasDocument its wxCommandProcessor
propertynamename of property
value

Definition at line 1432 of file cancom.cpp.

bool a2dCentralCanvasCommandProcessor::SetPropertyToObject ( const wxString &  objectname,
a2dNamedProperty property 
)

To set a property by to a certain object.

Parameters
objectnamename of the object to set the property to. object name is:
  1. a2dBaseTool Sets a property on the a2dToolContr its FirstTool of the current a2dCanvasView.
  2. a2dToolContr Sets a property on the a2dToolContr of the current a2dCanvasView.
  3. a2dCanvasCommandProcessor Sets a property to this a2dCentralCanvasCommandProcessor
  4. a2dCentralCanvasCommandProcessor Sets a property on the current a2dCanvasDocument its wxCommandProcessor
propertythe property to set

todo HOW undo menu's work when commands endsup on this commandprocessor its commandstack.

Definition at line 1491 of file cancom.cpp.


The documentation for this class was generated from the following files:
a2dCentralCanvasCommandProcessor Class Reference -- Sun Oct 12 2014 17:04:31 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation