wxShapeFramework  1.13.0 beta
wxSFThumbnail Class Reference

Class encalpsulating a shape canvas' thumbnail. This GUI control derived from wxPanel can be associated with one shape canvas and can be used for previewing and manipulating of it. More...

#include <Thumbnail.h>

Collaboration diagram for wxSFThumbnail:

List of all members.

Public Types

enum  IDS { ID_UPDATETIMER = wxID_HIGHEST + 1, IDM_SHOWELEMENTS, IDM_SHOWCONNECTIONS }
 Internally used IDs. More...
enum  THUMBSTYLE { tsSHOW_ELEMENTS = 1, tsSHOW_CONNECTIONS = 2 }
 Thumbnail style. More...

Public Member Functions

 wxSFThumbnail (wxWindow *parent)
 Constructor.
virtual ~wxSFThumbnail ()
 Destructor.
void SetThumbStyle (int style)
 Set the thumbnail style.
int GetThumbStyle ()
 Get current thumbnail style.
void SetCanvas (wxSFShapeCanvas *canvas)
 Set canvas managed by the thumbnail.
virtual void DrawContent (wxDC &dc)
 Implementation of drawing of the thumbnail's content. This virtual function can be overrided by the user for customization of the thumbnail appearance.

Protected Member Functions

void _OnPaint (wxPaintEvent &event)
 Current thumbnail's style.
wxSize GetCanvasOffset ()
 Get offset (view start) of managed shape canvas defined in pixels.

Protected Attributes

wxSFShapeCanvasm_pCanvas
wxTimer m_UpdateTimer
 Pointer to managed shape canvas.
wxPoint m_nPrevMousePos
 Timer user for the thumbnail's update.
double m_nScale
 Auxiliary varialble.
int m_nThumbStyle
 Current thumbnail's scale.

Private Member Functions

void _OnEraseBackground (wxEraseEvent &event)
 Internally used event handler.
void _OnMouseMove (wxMouseEvent &event)
 Internally used event handler.
void _OnLeftDown (wxMouseEvent &event)
 Internally used event handler.
void _OnRightDown (wxMouseEvent &event)
 Internally used event handler.
void _OnTimer (wxTimerEvent &event)
 Internally used event handler.
void _OnShowElements (wxCommandEvent &event)
 Internally used event handler.
void _OnShowConnections (wxCommandEvent &event)
 Internally used event handler.
void _OnUpdateShowElements (wxUpdateUIEvent &event)
 Internally used event handler.
void _OnUpdateShowConnections (wxUpdateUIEvent &event)
 Internally used event handler.
 DECLARE_EVENT_TABLE ()

Detailed Description

Class encalpsulating a shape canvas' thumbnail. This GUI control derived from wxPanel can be associated with one shape canvas and can be used for previewing and manipulating of it.


Member Enumeration Documentation

Internally used IDs.

Enumerator:
ID_UPDATETIMER 
IDM_SHOWELEMENTS 
IDM_SHOWCONNECTIONS 

Thumbnail style.

Enumerator:
tsSHOW_ELEMENTS 

Show diagram elements (excluding connections) in the thumbnail.

tsSHOW_CONNECTIONS 

Show diagram connections in the thumbnail.


Constructor & Destructor Documentation

wxSFThumbnail::wxSFThumbnail ( wxWindow *  parent)

Constructor.

Parameters:
parentPointer to parent window
virtual wxSFThumbnail::~wxSFThumbnail ( ) [virtual]

Destructor.


Member Function Documentation

void wxSFThumbnail::_OnEraseBackground ( wxEraseEvent &  event) [private]

Internally used event handler.

void wxSFThumbnail::_OnLeftDown ( wxMouseEvent &  event) [private]

Internally used event handler.

void wxSFThumbnail::_OnMouseMove ( wxMouseEvent &  event) [private]

Internally used event handler.

void wxSFThumbnail::_OnPaint ( wxPaintEvent &  event) [protected]

Current thumbnail's style.

Internally used event handler.

void wxSFThumbnail::_OnRightDown ( wxMouseEvent &  event) [private]

Internally used event handler.

void wxSFThumbnail::_OnShowConnections ( wxCommandEvent &  event) [private]

Internally used event handler.

void wxSFThumbnail::_OnShowElements ( wxCommandEvent &  event) [private]

Internally used event handler.

void wxSFThumbnail::_OnTimer ( wxTimerEvent &  event) [private]

Internally used event handler.

void wxSFThumbnail::_OnUpdateShowConnections ( wxUpdateUIEvent &  event) [private]

Internally used event handler.

void wxSFThumbnail::_OnUpdateShowElements ( wxUpdateUIEvent &  event) [private]

Internally used event handler.

virtual void wxSFThumbnail::DrawContent ( wxDC &  dc) [virtual]

Implementation of drawing of the thumbnail's content. This virtual function can be overrided by the user for customization of the thumbnail appearance.

Parameters:
dcReference to output device context
wxSize wxSFThumbnail::GetCanvasOffset ( ) [protected]

Get offset (view start) of managed shape canvas defined in pixels.

Returns:
Canvas offset in pixels
int wxSFThumbnail::GetThumbStyle ( ) [inline]

Get current thumbnail style.

Returns:
Style value composed of predefined flags
See also:
THUMBSTYLE

Set canvas managed by the thumbnail.

Parameters:
canvasPointer to shape canvas
void wxSFThumbnail::SetThumbStyle ( int  style) [inline]

Set the thumbnail style.

Parameters:
styleStyle value composed of predefined flags
See also:
THUMBSTYLE

Member Data Documentation

wxPoint wxSFThumbnail::m_nPrevMousePos [protected]

Timer user for the thumbnail's update.

double wxSFThumbnail::m_nScale [protected]

Auxiliary varialble.

Current thumbnail's scale.

wxTimer wxSFThumbnail::m_UpdateTimer [protected]

Pointer to managed shape canvas.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines