MainView
This is the main white background that you place classes and groups on. It does not inherit from ChildWindow because it is not a child window. It DOES inherit from WindowView because it acts an awful lot like a Group. This shouldn't be surprising because it actually is a group. However it's an invisible, implied group.
public:
MainView( MainFrame* pParent, GroupObjectPtr pBaseGroup)
~MainView( )
void ClearAll( )
void ActualPositionToClientPosition( wxPoint& Pos)
void ClientPositionToActualPosition( wxPoint& Pos)
std::string ConvertToXml( ) const
void PaintToDC( wxDC& DC, const wxPoint& DeviceOrigin)
It annoys me that wxWidgets doesn't have this kind of thing built in. I need it to paint to the Bitmap for the HTMLDoc generation. I'll probably also need it for printing.
- const wxPoint& DeviceOrigin: When you paint a window in response to an OnPaint the top left corner of your window is 0,0. When you paint to a big MemoryDC the 0,0 position is the top left of the entire DC. wxWidgets has a wxDC::SetDeviceOrigin, but no GetDeviceOrigin. This helps you figure out where you are.
boost::posix_time::ptime GetLatestUpdateTime( ) const
void LoadFromXml( XMLReader& Reader)
wxSize GetModelDimensions( ) const
returns the size of the model at 100% zoom.
wxPoint GetScrollOffset( ) const
where the user is scrolled to in pixels.
void SetZoom( double Zoom)
double GetZoom( ) const
protected:
private:
enum ContextMenuIDs
static const std::string XML_NAME
const std::string& GetObjectName( ) const
bool CanParentWindowView( ) const
void OnCreateGroup( wxCommandEvent& Event)
void OnCreateClass( wxCommandEvent& Event)
void OnCreateFromHeader( wxCommandEvent& Event)
void OnPaint( wxPaintEvent& Event)
void OnDraw( wxDC& DC) const
void OnContextMenu( wxContextMenuEvent& Event)
void OnMouseMove( wxMouseEvent& Event)
void OnMouseWheel( wxMouseEvent& Event)
void OnLeftDown( wxMouseEvent& Event)
void OnLeftUp( wxMouseEvent& Event)
GroupObjectPtr m_pBaseGroup
double m_Zoom
wxPoint m_ContextMenuPosition
int m_VirtualSize
int m_ScrollUnit
bool m_bMouseMovingInheritance
wxPoint m_MousePoint
InheritanceInternalPtr m_pMovingInheritance
DECLARE_EVENT_TABLE()