28 #include "wx/cmdproc.h"
29 #include <wx/module.h>
31 #if wxCHECK_VERSION(2,9,0)
32 #include "wx/chartype.h"
33 #include "wx/strvararg.h"
44 #define EVT_BUTTON_ANY(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_BUTTON_CLICKED, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast < wxCommandEventFunction > ( & func ), (wxObject *) NULL ),
47 #define EVT_CHOICE_ANY(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_CHOICE_SELECTED, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast < wxCommandEventFunction > ( & func ), (wxObject *) NULL ),
51 #if defined(WXDOCVIEW_USINGDLL)
58 #if (defined(__WXMSW__) && defined(WXUSINGDLL) )
64 class A2DGENERALDLLEXP a2dHashMapCommandIds;
65 class A2DGENERALDLLEXP a2dHashMapCommandIds_wxImplementation_HashTable;
66 class A2DGENERALDLLEXP a2dHashMapCommandIds_wxImplementation_KeyEx;
116 static const a2dCommandId& GetCommandByName(
const wxString& commandName );
119 static a2dHashMapCommandIds& GetHashMap();
162 const wxString& menuString = wxEmptyString
172 virtual wxString GetName()
const;
194 virtual bool Do() = 0;
197 virtual bool Undo() = 0;
200 virtual bool PreDo() {
return true; }
205 virtual bool CanUndo()
const {
return m_canUndo; }
229 virtual bool ClearAfterCurrentCommand(
a2dCommand* current );
244 virtual bool ContainsCommand(
a2dCommand* command );
246 virtual void DistributeEvent( wxEventType eventType );
254 #if wxART2D_USE_CVGIO
257 wxLogMessage( _(
"Not implemented" ) );
262 wxLogMessage( _(
"Not implemented" ) );
265 #endif //wxART2D_USE_CVGIO
303 { m_message = other.m_message; }
307 if ( &other !=
this )
309 m_message = other.m_message;
317 wxString getMessage()
const {
return m_message; }
318 void setMessage(
const wxString& exMessage ) { m_message = exMessage; }
327 #if (defined(__WXMSW__) && defined(WXUSINGDLL) )
329 template class A2DGENERALDLLEXP std::allocator<class a2dSmrtPtr<class a2dCommand> >;
330 template class A2DGENERALDLLEXP std::allocator< std::_List_nod<class a2dSmrtPtr<class a2dCommand>, std::allocator<class a2dSmrtPtr<class a2dCommand> > >::_Node >;
331 template class A2DGENERALDLLEXP std::allocator< std::_List_ptr<class a2dSmrtPtr<class a2dCommand>, std::allocator<class a2dSmrtPtr<class a2dCommand> > >::_Nodeptr >;
332 template class A2DGENERALDLLEXP std::list<class a2dSmrtPtr<class a2dCommand> >;
375 const wxString& menuString = wxEmptyString
390 virtual bool ClearAfterCurrentCommand(
a2dCommand* current );
408 virtual bool ContainsCommand(
a2dCommand* command );
443 #if (defined(__WXMSW__) && defined(WXUSINGDLL) )
597 a2dObject* GetObject() {
return m_propRefObject.Get(); }
620 BEGIN_DECLARE_EVENT_TYPES()
622 DECLARE_EXPORTED_EVENT_TYPE( A2DGENERALDLLEXP, wxEVT_BEGINBUSY, 1 )
624 DECLARE_EXPORTED_EVENT_TYPE( A2DGENERALDLLEXP, wxEVT_ENDBUSY, 1 )
626 DECLARE_EXPORTED_EVENT_TYPE( A2DGENERALDLLEXP, wxEVT_DO, 1 )
628 DECLARE_EXPORTED_EVENT_TYPE( A2DGENERALDLLEXP, wxEVT_UNDO, 1 )
630 DECLARE_EXPORTED_EVENT_TYPE( A2DGENERALDLLEXP, wxEVT_REDO, 1 )
632 DECLARE_EXPORTED_EVENT_TYPE( A2DGENERALDLLEXP, wxEVT_MENUSTRINGS, 1 )
634 DECLARE_EXPORTED_EVENT_TYPE( A2DGENERALDLLEXP, a2dEVT_PROPOBJECT_EDITPROPERTIES_EVENT, 1 )
635 DECLARE_EXPORTED_EVENT_TYPE( A2DGENERALDLLEXP, wxEVT_RECORD, 1 )
636 END_DECLARE_EVENT_TYPES()
685 #define EVT_PROPOBJECT_EDITPROPERTIES_EVENT(func) DECLARE_EVENT_TABLE_ENTRY( a2dEVT_PROPOBJECT_EDITPROPERTIES_EVENT, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast < a2dPropertyEditEventFunctionEvt > ( & func ), (wxObject *) NULL ),
715 m_undoLabel = wxT(
"" );
716 m_redoLabel = wxT(
"" );
732 const wxString& undoLabel,
bool canUndo,
733 const wxString& redoLabel,
bool canRedo
738 m_undoLabel = undoLabel;
739 m_redoLabel = redoLabel;
795 #define EVT_DO(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_DO, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast< wxCommandProcessorEventFunction > (& func), (wxObject *) NULL ),
797 #define EVT_UNDO(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_UNDO, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast< wxCommandProcessorEventFunction > (& func), (wxObject *) NULL ),
799 #define EVT_REDO(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_REDO, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast< wxCommandProcessorEventFunction > (& func), (wxObject *) NULL ),
801 #define EVT_MENUSTRINGS(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MENUSTRINGS, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast< wxCommandProcessorEventFunction > (& func), (wxObject *) NULL ),
803 #define EVT_MODIFIES(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MODIFIES, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast< wxCommandProcessorEventFunction > (& func), (wxObject *) NULL ),
806 #define EVT_BEGINBUSY(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_BEGINBUSY, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast< wxCommandProcessorEventFunction > (& func), (wxObject *) NULL ),
808 #define EVT_ENDBUSY(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_ENDBUSY, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast< wxCommandProcessorEventFunction > (& func), (wxObject *) NULL ),
849 virtual bool Submit(
a2dCommand* command,
bool storeIt =
true );
859 virtual bool CanUndo()
const;
861 virtual bool CanRedo()
const;
864 virtual void Initialize();
907 virtual void SetMenuStrings();
910 wxString GetUndoMenuLabel()
const;
913 wxString GetRedoMenuLabel()
const;
918 return m_currentCommand;
939 virtual void ClearCommands();
959 virtual bool SetOrAddPropertyToObject(
a2dObject* propRefObject,
const wxString& name,
const wxString& value = wxT(
"" ),
bool withUndo =
true );
982 bool SmrtPtrRelease();
992 void SentBusyEvent(
bool start,
a2dCommand* command );
998 void SetCurrentToLastActive();
1005 virtual bool DoPreCommand(
a2dCommand& cmd );
1008 virtual bool DoPostCommand(
a2dCommand& cmd );
1069 #if (defined(__WXMSW__) && defined(WXUSINGDLL) )
1077 #if (defined(__WXMSW__) && defined(WXUSINGDLL) )
1078 template class A2DGENERALDLLEXP std::allocator< wxEventType >;
1079 template class A2DGENERALDLLEXP std::allocator< std::_List_nod< wxEventType, std::allocator< wxEventType > >::_Node >;
1080 template class A2DGENERALDLLEXP std::allocator< std::_List_ptr< wxEventType, std::allocator< wxEventType > >::_Nodeptr >;
1081 template class A2DGENERALDLLEXP std::list< wxEventType >;
1114 virtual void ResetErrors();
1117 virtual void ReportError(
const a2dError& error,
const wxString& errorstr = wxEmptyString );
1120 #if !wxCHECK_VERSION(2,9,0)
1121 virtual void ReportErrorF(
const a2dError& error,
const wxChar* Format, ... );
1123 WX_DEFINE_VARARG_FUNC_VOID( ReportErrorF, 2, (
const a2dError&,
const wxFormatString& ), DoPrintfWchar, DoPrintfUtf8 )
1126 virtual void ReportWarning(
const a2dError& error,
const wxString& errorstr );
1129 #if !wxCHECK_VERSION(2,9,0)
1130 virtual void ReportWarningF(
const a2dError& error,
const wxChar* Format, ... );
1132 WX_DEFINE_VARARG_FUNC_VOID( ReportWarningF, 2, (
const a2dError&,
const wxFormatString& ), DoPrintfWcharWarn, DoPrintfUtf8Warn )
1139 wxString GetErrorsAsString();
1147 void SendToLogTarget();
1154 virtual void RecordF( wxObject* sender,
const wxChar* Format, ... );
1156 virtual void RecordF(
const wxChar* Format, ... );
1165 void IgnoreError(
unsigned int id );
1171 wxString* GetVariableString(
const wxString& variablename );
1179 wxString GetWxArt2DVar(
bool withSep =
true )
const;
1181 wxString GetWxArt2DArtVar(
bool withSep =
true,
bool silent =
false )
const;
1183 void SetLogConnectedEvents(
bool logConnectedEvents ) { m_logConnectedEvents = logConnectedEvents; }
1185 bool GetLogConnectedEvents() {
return m_logConnectedEvents; }
1189 #if wxCHECK_VERSION(2,9,0)
1190 #if !wxUSE_UTF8_LOCALE_ONLY
1191 virtual void DoPrintfWchar(
const a2dError&,
const wxChar* format, ... );
1192 virtual void DoPrintfWcharWarn(
const a2dError&,
const wxChar* format, ... );
1194 #if wxUSE_UNICODE_UTF8
1195 virtual void DoPrintfUtf8(
const a2dError&,
const char* format, ... );
1196 virtual void DoPrintfUtf8Warn(
const a2dError&,
const char* format, ... );
1217 bool m_logConnectedEvents;
1224 #if wxART2D_USE_CVGIO
1226 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
1227 #endif //wxART2D_USE_CVGIO
1244 virtual bool OnInit();
1245 virtual void OnExit();
1252 #if (defined(__WXMSW__) && defined(WXUSINGDLL) )
1257 A2DGENERALDLLEXP_DATA (
extern a2dSmrtPtr<a2dGeneralGlobal> )
a2dGeneralGlobals;
1265 #define A2D_ARGUMENT_SETTER( TYPE, ARGUMENT_NAME ) \
1267 ARGUMENT_NAME( const TYPE& arg) { \
1268 this->argValue.ARGUMENT_NAME = arg; \
1269 this->argSet.ARGUMENT_NAME = true; \
1293 argSet.varname =
false;
1294 argSet.varvalue =
false;
1301 A2D_ARGUMENT_SETTER( wxString, varname )
1302 A2D_ARGUMENT_SETTER( wxString, varvalue )
1306 wxString varname; wxString varvalue;
1311 bool varname, varvalue;
1317 m_args.argValue.varname = args.argSet.varname ? args.argValue.varname : wxString( wxEmptyString );
1318 m_args.argValue.varvalue = args.argSet.varvalue ? args.argValue.varvalue : wxString( wxEmptyString );
1356 argSet.varname =
false;
1357 argSet.varvalue =
false;
1364 A2D_ARGUMENT_SETTER( wxString, varname )
1365 A2D_ARGUMENT_SETTER( wxString, varvalue )
1369 wxString varname; wxString varvalue;
1374 bool varname, varvalue;
1380 m_args.argValue.varname = args.argSet.varname ? args.argValue.varname : wxString( wxEmptyString );
1381 m_args.argValue.varvalue = args.argSet.varvalue ? args.argValue.varvalue : wxString( wxEmptyString );
1390 if ( wxSetEnv( m_args.argValue.varname, m_args.argValue.varvalue ) )
1393 #if wxCHECK_VERSION(2,9,0)
1395 m_args.argValue.varname, m_args.argValue.varvalue );
1398 m_args.argValue.varname.c_str(), m_args.argValue.varvalue.c_str() );
1428 argSet.varname =
false;
1429 argSet.varvalue =
false;
1437 A2D_ARGUMENT_SETTER( wxString, varname )
1438 A2D_ARGUMENT_SETTER( wxString, varvalue )
1442 wxString varname; wxString varvalue;
1447 bool varname, varvalue;
1453 m_args.argValue.varname = args.argSet.varname ? args.argValue.varname : wxString( wxEmptyString );
1454 m_args.argValue.varvalue = args.argSet.varvalue ? args.argValue.varvalue : wxString( wxEmptyString );
1470 m_args.argSet.varvalue =
true;
1501 argSet.varname =
false;
1502 argSet.varvalue =
false;
1510 A2D_ARGUMENT_SETTER( wxString, varname )
1511 A2D_ARGUMENT_SETTER( wxString, varvalue )
1515 wxString varname; wxString varvalue;
1520 bool varname, varvalue;
1526 m_args.argValue.varname = args.argSet.varname ? args.argValue.varname : wxString( wxEmptyString );
1527 if ( !args.argSet.varname || m_args.argValue.varname.IsEmpty() )
1538 if( !wxGetEnv( m_args.argValue.varname, &envValue ) )
1544 m_args.argSet.varvalue =
true;
1545 m_args.argValue.varvalue = envValue;
1557 typedef std::map< wxString, a2dMenuIdItem* > a2dMenuIdItemMap;
1563 class A2DGENERALDLLEXP a2dMenuIdItem :
public wxObject
1567 DECLARE_CLASS( a2dMenuIdItem )
1570 static const a2dMenuIdItem sm_noCmdMenuId;
1573 a2dMenuIdItem( const wxString& menuIdName = wxEmptyString,
1574 const wxString& text = wxEmptyString,
1575 const wxString& help = wxEmptyString, wxItemKind kind = wxITEM_NORMAL );
1577 virtual ~a2dMenuIdItem() {};
1580 void SetId(
int itemid ) { m_id = itemid; }
1586 bool SameId(
const a2dMenuIdItem& other )
const {
return m_id == other.m_id; }
1594 virtual void SetText(
const wxString& str );
1597 wxString
GetLabel()
const {
return GetLabelText( m_text ); }
1599 const wxString&
GetText()
const {
return m_text; }
1602 static wxString GetLabelText(
const wxString& text );
1606 void SetKind( wxItemKind kind ) { m_kind = kind; }
1609 virtual void SetCheckable(
bool checkable ) { m_kind = checkable ? wxITEM_CHECK : wxITEM_NORMAL; }
1613 {
return m_kind == wxITEM_CHECK || m_kind == wxITEM_RADIO; }
1616 virtual void Enable(
bool enable =
true ) { m_isEnabled = enable; }
1621 virtual void Check(
bool check =
true ) { m_isChecked = check; }
1628 void SetHelp(
const wxString& str );
1630 const wxString& GetHelp()
const {
return m_help; }
1632 void SetBitmaps(
const wxBitmap& bmpChecked,
1633 const wxBitmap& bmpUnchecked = wxNullBitmap );
1634 void SetBitmap(
const wxBitmap& bmp ) { SetBitmaps( bmp ); }
1635 const wxBitmap& GetBitmap(
bool checked =
true )
const
1636 {
return checked ? m_bmpChecked : m_bmpUnchecked; }
1638 void SetDisabledBitmap(
const wxBitmap& bmpDisabled )
1639 { m_bmpDisabled = bmpDisabled; }
1640 const wxBitmap& GetDisabledBitmap()
const
1641 {
return m_bmpDisabled; }
1645 virtual wxAcceleratorEntry* GetAccel()
const;
1649 virtual void SetAccel( wxAcceleratorEntry* accel );
1650 #endif // wxUSE_ACCEL
1656 static const a2dMenuIdItem& GetItemByName(
const wxString& menuIdName );
1659 static a2dMenuIdItemMap& GetHashMap();
1662 static void InitializeBitmaps();
1677 wxBitmap m_bmpChecked,
1685 static bool m_bitmapinitialized;
1688 #define DECLARE_MENU_ITEMID( menuName ) extern a2dMenuIdItem& menuName() ;
1690 #define DEFINE_MENU_ITEMID( menuName, menuText, menuHelp ) a2dMenuIdItem& menuName() \
1692 static a2dMenuIdItem item( wxT(#menuName), menuText, menuHelp ); \
1696 #define DEFINE_MENU_ITEMID_KIND( menuName, menuText, menuHelp, kind ) a2dMenuIdItem& menuName () \
1698 static a2dMenuIdItem item( wxT(#menuName), menuText, menuHelp, (kind) ); \
1702 #define DECLARE_EXPORTED_EVTIDFUNC( expdecl, eventName ) \
1703 DECLARE_EXPORTED_EVENT_TYPE( expdecl, eventName, 1 ) \
1704 extern wxEventType& GETID_##eventName();
1707 #define DECLARE_EVTIDFUNC( eventName ) \
1708 DECLARE_EVENT_TYPE( eventName, 1 ) \
1709 extern wxEventType& GETID_##eventName();
1711 #define DEFINE_EVTIDFUNC( eventName ) \
1712 wxEventType& GETID_##eventName() \
1714 static wxEventType type = wxNewEventType(); \
1717 const wxEventType eventName = GETID_##eventName();
1720 #endif // _COMEVTH__
wxString m_menuString
if set this will be used for menu Undo/Redo labels, else the m_commandId its name is used...
void SetCommandProcessor(a2dCommandProcessor *cmp)
set when submitting this command via a2dCommandProcessor
a2dNamedProperty * GetProperty()
property that is set packed as a2dNamedProperty.
(In) Visible property that can be added to Docview Objects.
const a2dPropertyId * GetPropertyId()
property that is set packed as a2dNamedProperty.
static const a2dCommandId Id
Set a string environment variable.
static a2dVariablesHash m_variableList
aliaslist containing internal variables
virtual bool PostDo()
Override this to perform a dependency action after command is done.
virtual wxString GetGroupName() const
return command name
static const a2dCommandId Id
Set a string environment variable.
a2dCommandGroup * GetRootGroup() const
return top/startgroup
static a2dPathList m_configpath
Path(s) for configuration file(s) in an application.
virtual wxEvent * Clone() const
clone the event.
const wxString & GetRedoAccelerator() const
By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y".
a2dCommandException(const a2dCommandException &other)
Copy constructor.
fundamental classes used by all other modules.
const a2dError a2dError_GetVar
class to map references to objects stored in XML, in order to make the connection later on...
see a2dCommandProcessorEvent
a2dAutoZeroPtr< a2dObject > m_propRefObject
all property references will be set NULL when this object, having the property, will be deleted...
a2dCommand * GetCommand()
the command ( if there was one ) that did it.
a2dSmrtPtrWrap< a2dCommand > a2dCommandStore
const wxString & GetUndoAccelerator() const
By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y".
One Global instance of this class exists, in order to get to global needed objects.
a2dCommandProcessorEvent(a2dCommand *cmd, const wxString &undoLabel, bool canUndo, const wxString &redoLabel, bool canRedo)
constructor
int a2dErrorWarningCode
error codes generated in docview framework.
wxString & GetUndoMenuLabel()
by default this is a2dCommandProcessor::GetUndoMenuLabel()
Input and output handler for the XmlSer format.
static const a2dCommandId Id
Set a string environment variable.
wxString m_redoAccelerator
associated redo accelerator
bool m_canRedo
used for wxEVT_MENUSTRINGS event
bool m_canUndo
can this command be undone
a2dCommandProcessor * m_cmp
allows commands to get to the command processor that submitted the command.
wxString m_groupName
name of group of commands
list of a2dNamedProperty objects
int GetMaxCommands() const
get the limit on number of commands to store
void SetRedoAccelerator(const wxString &accel)
By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y".
const a2dCommandId * m_commandId
can be used to identify the command
void SetUndoAccelerator(const wxString &accel)
By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y".
void SetParentGroup(a2dCommandGroup *parent)
set the parent group of this group
static const a2dCommandId sm_groupCommandId
property for group command id
a2dCommandException(const wxString &exMessage)
Constructor.
bool m_canUndo
used for wxEVT_MENUSTRINGS event
const a2dNamedProperty * GetVariable(const wxString &variableName)
get an existing variable of unknown type (not cloned)
a2dCommandPtr m_currentCommand
this is the tree-trace to the currently active command
Set a environment variable.
a group of commands, used to group commands together for undo/redo
static a2dErrorVector & GetErrors()
get the errors found sofar.
const a2dPropertyId * m_id
id of the property that is set.
virtual class a2dCommandGroup * IsCommandGroup()
This is like a wxDynamicCast, but much faster.
bool m_active
If true, this command group is not yet closed and may still receive commands.
a2dCommandGroup * GetCurrentGroup() const
return current group
a2dCommandGroup * m_parentGroup
this is the parent group of this group
wxString m_undoLabel
used for wxEVT_MENUSTRINGS event
virtual class a2dCommandGroup * IsCommandGroup()
This is like a wxDynamicCast, but much faster.
static const a2dCommandId sm_noCommandTypeId
property for type of command id
void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
Save settings.
virtual void ReportError(const a2dError &error, const wxString &errorstr=wxEmptyString)
concatenate to the the error report the given error.
wxUint32 m_maxNoCommands
maximum number of commands to store
void(wxEvtHandler::* a2dPropertyEditEventFunctionEvt)(a2dPropertyEditEvent &)
event function for a2dPropertyEditEvent
a2dSmrtPtr< a2dCommandGroup > m_currentGroup
this is the parent group of the current command ( which may be a group itself )
const a2dCommandId * GetCommandId()
a specific id for this command.
const a2dCommandId * GetCommandTypeId()
used to identify groups of simular commands
wxString m_undoAccelerator
associated undo accelerator attached to menu
A2DGENERALDLLEXP a2dSmrtPtr< a2dGeneralGlobal > a2dGeneralGlobals
a global pointer to get to global instance of important classes.
Set a string variable inside wxDocview.
Holds internal variables to be used whereever needed.
static const a2dCommandId Id
Set a string variable inside wxDocview.
a2dCommand * GetCurrentCommand() const
command list access
Input and output handler for the XmlSer format.
const a2dError a2dError_SetEnv
virtual bool PreDo()
Override this to perform a dependency action before command is done.
a2dVariablesHash & GetVariablesHash()
aliases list for setting internal variables
bool CanRedo()
by default this is a2dCommandProcessor::CanRedo()
help class which makes it possible to store a smart pointer as a wxObject*
a2dCommandList m_subcommands
the list of subcommands
bool GetEdited()
when properties where edited, this must become true
bool GetDoLog()
Is logging to wxLog target on or off?
virtual wxString GetIdClassName()
get name of class
Each a2dCommand is given a command id at construction.
a2dSmrtPtr< a2dCommandGroup > m_rootGroup
this is the root of the command group tree
basic list class based on STL containers.
static a2dErrorVector m_errors
list of all possible errors
a2dCommand * m_cmd
see GetCommand()
static wxArrayInt m_ignoredErrorIds
list of error id's to be ignored.
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
Load settings.
bool CanUndo()
by default this is a2dCommandProcessor::CanUndo()
a2dPropertyIdList & GetPropertyIdList()
Get a reference to the central list of dynamic created property id's.
virtual wxEvent * Clone() const
clone the event
void SetDoLog(bool onOff)
Set logging to wxLog target on or off.
wxString m_redoLabel
used for wxEVT_MENUSTRINGS event
virtual ~a2dCommandId()
destructor
a2dPathList & GetConfigPathList()
Path(s) for configuration file(s) in an application.
const a2dCommandId * m_commandTypeId
if set can be used to identify groups of commands
This is the base class for all kinds of property id's for a2dObject.
bool SetVariableString(const wxString &variableName, const wxString &value)
set a new or replace an existing wxString variable
static bool m_directlog
logging to wxLog target on or off
a2dNamedPropertyPtr m_property
property set to the object.
virtual void ReportErrorF(const a2dError &error, const wxChar *Format,...)
concatenate to the the error report the given error.
a2dCommandGroup * GetParentGroup()
return the parent group of this group
const a2dError a2dError_GetEnv
A list class for reference counted objects.
wxString & GetRedoMenuLabel()
by default this is a2dCommandProcessor::GetRedoMenuLabel()
Event sent to a2dCommandProcessor.
virtual wxString StringValueRepresentation() const
void SetEdited(bool edited)
set to signal that properties where edited.
a2dCommandProcessorEvent(wxEventType type, a2dCommand *cmd)
constructor
This template class is for property ids with a known data type.
initializes the general module
friend class a2dCommandProcessor
a2DocumentCommandProcessor may access the list directly
WX_DECLARE_HASH_MAP_WITH_DECL(wxString, a2dCommandId *, wxStringHash, wxStringEqual, a2dHashMapCommandIds, class A2DGENERALDLLEXP)
This hash table is used for a2dCommandId with name.
wxString GetName() const
get name
CloneOptions
options for cloning
static const a2dCommandId sm_noCommandId
property for command id
For exceptions thrown from commands.
used to change a property on objects
a2dCommandProcessorEvent(const a2dCommandProcessorEvent &event)
constructor
class A2DGENERALDLLEXP a2dSmrtPtrList< a2dCommand > a2dCommandList
a list of commands used by the command processor or command groups
a base command for the a2dCommandProcessor