18 #ifndef __A2DCANVASTOOLS_H__
19 #define __A2DCANVASTOOLS_H__
39 #if defined(WXART2D_USINGDLL)
41 template class A2DCANVASDLLEXP std::allocator<class a2dSmrtPtr<class a2dBaseTool> >;
42 template class A2DCANVASDLLEXP std::allocator< std::_List_nod<class a2dSmrtPtr<class a2dBaseTool>, std::allocator<class a2dSmrtPtr<class a2dBaseTool> > >::_Node >;
43 template class A2DCANVASDLLEXP std::allocator< std::_List_ptr<class a2dSmrtPtr<class a2dBaseTool>, std::allocator<class a2dSmrtPtr<class a2dBaseTool> > >::_Nodeptr >;
44 template class A2DCANVASDLLEXP std::list<class a2dSmrtPtr<class a2dBaseTool> >::iterator;
45 template class A2DCANVASDLLEXP std::list<class a2dSmrtPtr<class a2dBaseTool> >;
110 void StopAllTools(
bool abort =
true );
118 virtual void ReStart();
136 bool ProcessEvent( wxEvent& event );
168 bool EnableTool(
const wxString& tool ,
bool disableothers );
174 bool EnableTool(
a2dBaseTool* tool ,
bool disableothers );
180 bool DisableTool(
const wxString& tool );
195 void ActivateTop(
bool active );
203 bool Activate(
const wxString& tool,
bool disableothers );
230 virtual bool TriggerReStartEdit( wxUint16 editmode );
239 virtual void Render();
245 void SetSnap(
bool doSnap );
291 bool ToolsProcessEvent( wxEvent& event );
294 void OnEnter( wxMouseEvent& WXUNUSED( event ) );
298 void OnPaint( wxPaintEvent& event );
300 void OnIdle( wxIdleEvent& event );
334 DECLARE_EVENT_TABLE()
338 #if defined(WXART2D_USINGDLL)
346 class A2DCANVASDLLEXP a2dToolFunctor;
351 DECLARE_MENU_ITEMID( CmdMenu_NoMenu )
399 bool ProcessEvent( wxEvent& event );
404 a2dObject* GetEventHandler()
406 if ( m_eventHandler )
407 return m_eventHandler;
422 virtual wxString GetToolString()
const;
427 virtual bool StartTool(
a2dBaseTool* currenttool );
434 virtual bool ZoomSave() = 0;
470 void StopTool(
bool abort =
false );
509 virtual void SetActive(
bool active =
true );
519 virtual bool EnterBusyMode();
521 virtual bool EnterBusyModeNoGroup();
527 virtual void FinishBusyMode(
bool closeCommandGroup =
true );
533 virtual void AbortBusyMode();
536 void SetFill(
const a2dFill& fill );
545 void SetStroke(
const a2dStroke& stroke );
554 void SetLayer( wxUint16 layer );
604 virtual void SetMode(
int mode ) { m_mode = mode; }
615 void SetPending(
bool pending =
true ) { m_pending = pending; }
634 return m_controller->GetDrawingPart();
640 wxWindow* GetDisplayWindow();
646 a2dCanvasCommandProcessor* GetCanvasCommandProcessor();
650 double GetHitMargin();
654 virtual void OpenCommandGroup(
bool restart );
656 virtual void OpenCommandGroupNamed(
const wxString& name );
658 virtual void CloseCommandGroup();
661 virtual wxString GetCommandGroupName();
676 void SetMousePopupMenu( wxMenu* mousemenu );
697 void RemoveAllDecorations();
709 void SetIgnorePendingObjects(
bool onoff );
720 void SetContourWidth(
double width );
731 void SetIsEditTool(
bool isEditTool ) { m_isEditTool = isEditTool; }
733 bool GetIsEditTool() {
return m_isEditTool; }
735 void SetInitiatingMenuId(
const a2dMenuIdItem& initiatingMenuId ) { m_initiatingMenuId = &initiatingMenuId; }
737 const a2dMenuIdItem& GetInitiatingMenuId() {
return *m_initiatingMenuId; }
756 void OnMouseEvent( wxMouseEvent& event );
758 void OnChar( wxKeyEvent& event );
760 void OnKeyDown( wxKeyEvent& event );
762 void OnKeyUp( wxKeyEvent& event );
765 virtual void DoStopTool(
bool abort );
866 DECLARE_EVENT_TABLE()
886 DECLARE_EVENT_TABLE()
896 bool ProcessEvent( wxEvent& event );
902 #endif //__A2DCANVASTOOLS_H__
Display Part of a a2dDrawing, in which a2dCanvasObjects are shown.
Base class for all types of strokes, understood by a2dDrawer2D classes.
class to map references to objects stored in XML, in order to make the connection later on...
a command processor specially designed to work with a a2dCanvasDocument
#define DECLARE_PROPERTIES()
check if class has the given id as a valid id for this object
a2dCanvasObject is the base class for Canvas Objects.
a group of commands, used to group commands together for undo/redo
Drawing context abstraction.
corridor as a direct event path to a a2dCanvasObject
while iterating a a2dCanvasDocument, this holds the context.
smart pointer class and list.
Event sent to a2dCommandProcessor.
This template class is for property ids with a known data type.
CloneOptions
options for cloning
Contain one drawing as hierarchical tree of a2dCanvasObject's.