16 #ifndef __WXCANDOC_H__
17 #define __WXCANDOC_H__
24 #include "a2dprivate.h"
41 #endif //wxART2D_USE_SVGIO
46 #endif //wxART2D_USE_GDSIO
60 #if wxUSE_PRINTING_ARCHITECTURE
108 a2dViewPrintout(
const wxPageSetupDialogData& pageSetupData,
a2dCanvasView* drawer,
const wxString& title,
const wxString& filename,
a2dPrintWhat typeOfPrint,
bool drawframe,
double scalelimit,
bool fitToPage );
124 bool OnPrintPage(
int );
128 const wxPageSetupDialogData& m_pageSetupData;
163 DECLARE_EVENT_TABLE()
168 a2dZoomedView( wxWindow* parent, wxWindowID
id,
const wxPoint& pos,
const wxSize& size,
long style,
a2dCanvasView* canvasview );
183 void OnPaint( wxPaintEvent& event );
188 void OnSize( wxSizeEvent& event );
214 #if defined(_DEBUG) && defined (SMART_POINTER_DEBUG)
215 a2dInitCurrentSmartPointerOwner m_initCurrentSmartPointerOwner;
217 DECLARE_EVENT_TABLE()
261 virtual bool ProcessEvent( wxEvent& event );
265 #if wxUSE_PRINTING_ARCHITECTURE
271 virtual wxPrintout* OnCreatePrintout(
a2dPrintWhat typeOfPrint,
const wxPageSetupDialogData& pageSetupData );
285 virtual void OnDraw( wxDC* );
332 typedef wxUint16 a2dDrawingId;
415 void CreateCommandProcessor();
441 void SetLibraryName(
const wxString& libraryname ) { m_libraryname = libraryname; }
453 virtual void DeleteContents();
469 #if wxART2D_USE_CVGIO
475 #endif //wxART2D_USE_CVGIO
481 bool SaveLayers(
const wxString& filename );
488 bool LoadLayers(
const wxString& filename );
494 virtual void UpdateLoadedLayerSetup();
499 #if wxART2D_USE_CVGIO
508 #endif //wxART2D_USE_CVGIO
548 void SetLayerSetup(
a2dLayers* layersetup );
563 void SetMultiRoot(
bool multiRoot =
true ) { m_multiRoot = multiRoot; }
643 void SetUnits(
const wxString& unitString ) { m_units = unitString; }
649 void SetAccessTime(
const wxDateTime& datatime ) { m_accesstime = datatime; }
675 void OnIdle( wxIdleEvent& event );
696 #if wxART2D_USE_CVGIO
699 #endif //wxART2D_USE_CVGIO
762 DECLARE_EVENT_TABLE()
766 #if defined(WXART2D_USINGDLL)
776 DECLARE_EVENT_TABLE()
781 const wxPoint& pos = wxDefaultPosition,
782 const wxSize& size = wxDefaultSize,
783 long style = wxScrolledWindowStyle,
a2dDrawer2D* drawer2D = 0 );
786 const wxPoint& pos = wxDefaultPosition,
787 const wxSize& size = wxDefaultSize,
788 long style = wxScrolledWindowStyle );
Display Part of a a2dDrawing, in which a2dCanvasObjects are shown.
all basic primitives derived from a2dCanvasObject
wxString m_units_measure
measuring unit (e.g. Meters Inch Microns etc.)
double m_printscalelimit
Set the scaling limit for printing, so that small stuff is not zoomed to full page.
void SetVersion(wxString version)
set version of library or document
wxString m_description
description for document
wxString m_units
unit (e.g. Meters Inch Microns etc.)
double m_units_scale
scaling factor (how many "m_units_measure" is one unit)
void SetUnitsScale(double scale)
this is the number that defines the physical dimension in meters / inch/ etc.
void OnCloseView(a2dCloseViewEvent &event)
Intercept to do cleanup/veto closing of a view.
void SetDescription(const wxString &desc)
Sets a description of the document.
bool m_multiRoot
multi root document
void SetMultiRoot(bool multiRoot=true)
Set true if the document read from a file did not have on erootobject but several.
bool m_printtitle
if true, a printout is done with title (document name (description?)), otherwise not ...
class to map references to objects stored in XML, in order to make the connection later on...
View on a a2dCanvasDocument.
void SetPrintFrame(bool val)
If true, draw a frame around printouts.
static bool GetPrintAsBitmap()
if set, printing is done via a bitmap which is drawn into, and next bitmap is printed.
a2dSmrtPtr< a2dCameleon > m_main
what is the root a2dcameleon in the drawing to display after opening a document, when m_show is not s...
a2dCanvasObjectPtr m_show
what to display when document is openened
wxString m_version
version of library or document
wxOutputStream a2dDocumentOutputStream
output stream based wxStreams
double GetUnitsScale()
this is the number that defines the physical dimension in meters / inch/ etc.
Input and output handler for the XmlSer format.
UpdateMode
Various mode flags for Update.
a command processor specially designed to work with a a2dCanvasDocument
a2dDrawing * GetDrawing() const
get the root object, which holds the objects in the document.
double m_normalize_scale
normalization factor to scale normalized objects.
The base class for all drawable objects in a a2dCanvasDocument.
using a file stream for input, stream the file into a a2dDocument or other object ...
static const a2dSignal sig_changedLayer
when an object is removed from a layer,
void SetLibraryName(const wxString &libraryname)
to name the document as a library (independent of a path and filename )
void SetAccessTime(const wxDateTime &datatime)
Sets the time of last access to this doc.
a2dView event, to report events in the a2dView class
object to show several appearance views on what it contains
a2dCanvasObject is the base class for Canvas Objects.
a2dPrintWhat m_typeOfPrint
type of print requested
void SetPrintFilename(bool val)
If true render the printout with a filename string, otherwise not.
output handler for the CVG format.
a2dLayers * GetLayerSetup()
Get the layersettings for the canvas.
a2dCanvas uses a2dCanvasView for displaying a view on a a2dCanvasDocument.
special a2dCanvasObject which are used to create hierarchy different from the standard a2dCanvasObjec...
a2dCameleon * GetTopCameleon()
what is the top a2dcameleon in the drawing to display after opening a document, when m_show is not se...
void SetPrintFitToPage(bool val)
If true, draw a view on all page without real scale.
void SetUnitsAccuracy(double accuracy)
this is the number that defines the number of decimal places in the fraction
vector path a2dVectorPath derived from a2dCanvasObject
Holds a view on a a2dDocument.
double m_scalelimit
limit scaling to this value (world/pixel)
bool m_drawframe
draw a frame around the page
static const a2dSignal sig_layersetupChanged
layer info changed id sent around when m_layersetup is changed.
The document class can be used to model an application's file-based data.
wxDateTime m_accesstime
when was the document last accessed.
wxString GetVersion()
get version of library or document
wxUint16 a2dPrintWhat
defines what to print
Docview classes for document view, window and frame.
wxString GetUnits()
this string defines the unit e.g. meters / inch/ etc.
void SetPrintScaleLimit(double val)
Set the scaling limit for printing, so that small stuff is not zoomed to full page.
a2dCanvasObject * GetShowObject()
what to display when document is openened
Drawing context abstraction.
a2dCanvas and a2dCanvasView meet eachother here.
to print what is displayed on a a2dCanvasView or the whole document as seen from the showobject of th...
Input and output handler for the XmlSer format.
void SetPrintTitle(bool val)
If true render the printout with a title string, otherwise not.
view to display the size of a2dCanvasView compared to the whole of the a2dCanvasDocument that is view...
void SetNormalizeScale(double scale)
see GetNormalizeScale()
Contains a2dDrawing Class to hold a drawing.
properties specific for a2dCanvasOject
using a file stream for output, stream a a2dDocument or other wxObject into a stream.
wxString m_title
title put above printout
a2dCanvas is used to display one of the a2dCanvasObjects which are part of a a2dCanvasDocument object...
a2dSmrtPtr< a2dLayers > m_layersetup
setup for layers in this document
double m_units_accuracy
how many decimal places in fraction are valid
wxInputStream a2dDocumentInputStream
input stream based wxStreams
wxString m_libraryname
name of library or document
wxDateTime & GetInternalChangedTime()
gives time when a change was made to the document which may effect rendering
wxString & GetDescription()
Returns the description of the document.
wxDateTime m_changedInternalAccesstime
gives time when a change was made to the document which may effect rendering
static bool m_printAsBitmap
if set print a bitmap that was drawn into
double GetNormalizeScale()
Normalize objects ( defined in coordinates -1 to 1 ranges ) will be multiplied by this factor...
a2dCanvasView * m_canvasDocview
the view to view zoomed
double GetUnitsAccuracy()
this is the number that defines the number of decimal places in the fraction
Each a2dCanvasView needs to have a a2dCanvasDocument set in order to render data. ...
bool m_printfilename
if true, a printout is done with filename (document file path), otherwise not
a2dCanvasView * m_drawingView
maping defined by this canvas
void SetUnits(const wxString &unitString)
this string defines the unit e.g. meters / inch/ etc.
Event sent to a2dCommandProcessor.
bool m_printfittopage
If true, draw a view on all page without real scale.
used to report a2dDocument events
static void SetPrintAsBitmap(bool printAsBitmap)
if set, printing is done via a bitmap which is drawn into, and next bitmap is printed.
all polygon and polyline a2dCanvasObject are here.
Input handler for the CVG format.
wxDateTime & GetAccessTime()
Returns the time of last access.
GdsII format input and output.
void SetShowObject(a2dCanvasObject *show)
what to display when document is openened
void SetTopCameleon(a2dCameleon *root)
what is the top a2dcameleon in the drawing to display after opening a document, when m_show is not se...
wxString m_filename
filename put below printout
CloneOptions
options for cloning
a2dDrawingPtr m_drawing
start a2dCanvasObject containing all primitives
Contain one drawing as hierarchical tree of a2dCanvasObject's.
wxString & GetLibraryName()
Get name the document as a library (independent of a path and filename )
bool m_printframe
If true, draw a frame around printouts.