wxArt2D
|
a command wrapper specially designed to work with wxArt2D docview classes and rest. More...
#include <cancom.h>
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. | |
a2dCanvasDocument * | GetCanvasDocument () |
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) |
a2dCanvasObject * | AddCurrent (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... | |
a2dBaseTool * | GetActiveTool () |
returns the current active tool in the current active view More... | |
a2dBaseTool * | PopTool () |
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 | |
a2dCanvasView * | CheckDrawer () const |
is a view with a2dCanvasView active | |
a2dCanvasDocument * | CheckCanvasDocument () const |
is a view with a2dCanvasView active and does it have a document | |
a2dCanvasCommandProcessor * | GetDrawingCmdProcessor () |
get commandprocessor of document | |
void | FillLibraryPoints () |
a2dCanvasDocument * | GetLibraryPoints () 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 a2dDoMu & | GetRadiusMin () const |
Polygon/polyline to Arc Minimum radius to test. | |
const a2dDoMu & | GetRadiusMax () const |
Polygon/polyline to Arc Maximum radius to test. | |
const a2dDoMu & | GetAberPolyToArc () const |
Polygon/polyline to Arc Maximum abberation. | |
const a2dDoMu & | GetAberArcToPoly () const |
Arc to Polygon/polyline Maximum abberation. | |
const a2dDoMu & | GetSmall () const |
detection of small object, smaller than this | |
const a2dDoMu & | GetBooleanEngineMarge () const |
boolean engine setting | |
long | GetBooleanEngineGrid () const |
boolean engine setting | |
double | GetBooleanEngineDGrid () const |
boolean engine setting | |
const a2dDoMu & | GetBooleanEngineCorrectionAber () const |
boolean engine setting | |
const a2dDoMu & | GetBooleanEngineCorrectionFactor () const |
boolean engine setting | |
const a2dDoMu & | GetBooleanEngineMaxlinemerge () const |
boolean engine setting | |
bool | GetBooleanEngineWindingRule () const |
boolean engine setting | |
double | GetBooleanEngineRoundfactor () const |
boolean engine setting | |
const a2dDoMu & | GetBooleanEngineSmoothAber () 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. | |
![]() | |
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). | |
a2dDocumentTemplate * | GetPreferredOpenDocumentTemplate () |
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... | |
a2dDocumentTemplate * | GetPreferredExportDocumentTemplate () |
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... | |
a2dDocumentTemplate * | GetPreferredImportDocumentTemplate () |
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... | |
a2dView * | AddDocumentCreateView (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 a2dView * | CreateView (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) |
a2dDocumentTemplate * | MatchTemplate (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 a2dDocumentTemplate * | SelectDocumentType (bool sort=false, a2dTemplateFlagMask docTemplateFlags=a2dTemplateFlag::VISIBLE) |
Returns a document template by asking the user. More... | |
virtual a2dDocumentTemplate * | FindTemplateForPath (const a2dDocumentTemplateList &docTemplates, const wxString &path, a2dTemplateFlagMask mask=a2dTemplateFlag::VISIBLE) |
function used in CreateDocument() when a2dREFDOC_SILENT is used for creating it. More... | |
virtual a2dViewTemplate * | SelectViewType (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... | |
a2dDocument * | GetCurrentDocument () const |
Get the current Document, which is the document that was last accessed from a view. More... | |
a2dCommandProcessor * | GetCurrentDocumentCommandProcessor () 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. | |
a2dView * | GetCurrentView () const |
return the one that is active right now (e.g. has focus in case of a wxWindow), or NULL | |
const a2dDocumentList & | GetDocuments () const |
returns a reference to the a2dDocumentList, which contains all a2dDocument's that are open. | |
const a2dDocumentTemplateList & | GetDocTemplates () |
returns a reference to the a2dDocumentTemplateList, which contains all a2dDocumentTemplate's. | |
const a2dViewTemplateList & | GetViewTemplates () |
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 a2dFileHistory * | OnCreateFileHistory () |
A hook to allow a derived class to create a different type of file history. Called from Initialize. | |
virtual a2dFileHistory * | GetFileHistory () 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 a2dFileHistoryItem * | GetHistoryFileItem (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 | |
![]() | |
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. | |
a2dCommand * | GetCurrentCommand () const |
command list access | |
int | GetMaxCommands () const |
get the limit on number of commands to store | |
a2dCommandGroup * | GetRootGroup () const |
return top/startgroup | |
a2dCommandGroup * | GetCurrentGroup () 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... | |
a2dCommandGroup * | CommandGroupBegin (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 () |
![]() | |
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 a2dObject * | SetNonDynamic () |
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... | |
a2dObject * | Clone (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 () | |
a2dNamedProperty * | GetProperty (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 a2dNamedProperty * | FindProperty (const a2dPropertyId *id, a2dPropertyId::Flags flags=a2dPropertyId::flag_none) |
Find a dynamic property with given id in the property list. More... | |
virtual const a2dNamedProperty * | FindProperty (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 a2dNamedPropertyList & | GetPropertyList () 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) |
![]() | |
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. | |
![]() | |
void | SentBusyEvent (bool start, a2dCommand *command) |
a2dCommandGroup * | FindActiveGroup () |
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 | |
![]() | |
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< a2dCanvasDocument > | m_librarypoints |
LayerPropertiesDialog * | m_layersdlg |
a2dLayerOrderDialog * | m_layerOrderDlg |
a2dCanvasObjectsDocDialog * | m_structDlgDoc |
![]() | |
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 | |
a2dView * | m_currentView |
the current view (active or inactive) | |
a2dDocument * | m_currentDocument |
the current active document | |
a2dFileHistory * | m_fileHistory |
the file history | |
wxString | m_lastDirectory |
the last visited directory | |
a2dDocumentTemplate * | m_preferredImportTemplate |
preferred document template for Importing files. | |
a2dDocumentTemplate * | m_preferredExportTemplate |
preferred document template for Exporting files. | |
a2dDocumentTemplate * | m_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 | |
![]() | |
wxUint32 | m_maxNoCommands |
maximum number of commands to store | |
a2dSmrtPtr< a2dCommandGroup > | m_rootGroup |
this is the root of the command group tree | |
a2dSmrtPtr< a2dCommandGroup > | m_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 | |
![]() | |
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 | |
![]() | |
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< a2dObject > | TAutoZeroPtrListClass |
this is needed inside the smart pointer template code | |
![]() | |
static a2dPropertyIdBool * | PROPID_Check = NULL |
used for linking multiple referenced objects when serializing | |
static a2dPropertyIdUri * | PROPID_URI = NULL |
attach an URL to the object | |
static a2dPropertyIdString * | PROPID_Name = NULL |
Name property, to return name of this object. | |
static a2dPropertyIdVoidPtr * | PROPID_autozeroptrlist = NULL |
static const a2dSignal | sm_Edit_properties = wxNewId() |
edit properties event, see EditProperties() | |
![]() | |
enum | { refcount_nondynamic = 0x76543210 } |
special refcount value for non-dynamic objects | |
a command wrapper specially designed to work with wxArt2D docview classes and rest.
This class wraps command string into functions for a a2dDocumentCommandProcessor.
a2dCentralCanvasCommandProcessor::a2dCentralCanvasCommandProcessor | ( | long | flags = a2dDEFAULT_DOCUMENT_FLAGS , |
bool | initialize = true , |
||
int | maxCommands = -1 |
||
) |
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.
objectToAdd | this is the object to add to the current parentobject |
withUndo | if true a a2dCommand_AddObject will be used to have undo information |
setStyles | the object added will get these styles that are currently set in the command processor |
parentObject | when 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.
|
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"
layer | layer to add property to |
propertyname | name 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.
objectname | name of the object to set the property to. object name is:
|
propertyname | name 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.
objectname | name of the object to set the property to. object name is:
|
property | the 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.