+ //scroll the window in device coordinates
+ virtual void ScrollWindow( int dx, int dy,
+ const wxRect* rect = (wxRect *) NULL );
+
+ //get y axis orientation
+ virtual bool GetYaxis() { return FALSE; }
+
+ //get the visible part in world coordinates
+ virtual double GetMinX() const;
+ virtual double GetMinY() const;
+ virtual double GetMaxX() const;
+ virtual double GetMaxY() const;
+
+ //convert from window to virtual coordinates
+ virtual double DeviceToLogicalX(int x) const;
+ virtual double DeviceToLogicalY(int y) const;
+ virtual double DeviceToLogicalXRel(int x) const;
+ virtual double DeviceToLogicalYRel(int y) const;
+ virtual int LogicalToDeviceX(double x) const;
+ virtual int LogicalToDeviceY(double y) const;
+ virtual int LogicalToDeviceXRel(double x) const;
+ virtual int LogicalToDeviceYRel(double y) const;
+
+protected:
+ wxBitmap m_buffer;
+
+ //always available and m_buffer selected
+ wxDC* m_renderDC;
+
+ bool m_needUpdate;
+ wxList m_updateRects;
+ wxCanvasObjectGroup* m_root;
+
+ wxColour m_background;
+ bool m_frozen;
+ wxCanvasObject *m_lastMouse;
+ wxCanvasObject *m_captureMouse;
+
+ int m_oldDeviceX,m_oldDeviceY;
+
+ wxCanvasAdmin* m_admin;
+
+private:
+ int m_bufferX,m_bufferY;
+
+protected:
+ void OnMouse( wxMouseEvent &event );
+ void OnPaint( wxPaintEvent &event );
+ void OnSize( wxSizeEvent &event );
+ void OnIdle( wxIdleEvent &event );
+ void OnSetFocus( wxFocusEvent &event );
+ void OnKillFocus( wxFocusEvent &event );
+ void OnEraseBackground( wxEraseEvent &event );
+
+private:
+ DECLARE_CLASS(wxCanvas)
+ DECLARE_EVENT_TABLE()
+};
+
+
+
+class wxVectorCanvas: public wxCanvas
+{
+public:
+ // constructors and destructors
+ wxVectorCanvas( wxCanvasAdmin* admin ,wxWindow *parent, wxWindowID id = -1,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxScrolledWindowStyle );
+