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>

Inheritance diagram for wxSFThumbnail:
Collaboration diagram for wxSFThumbnail:

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. More...
 
virtual ~wxSFThumbnail ()
 Destructor. More...
 
void SetThumbStyle (int style)
 Set the thumbnail style. More...
 
int GetThumbStyle ()
 Get current thumbnail style. More...
 
void SetCanvas (wxSFShapeCanvas *canvas)
 Set canvas managed by the thumbnail. More...
 
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. More...
 

Protected Member Functions

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

Protected Attributes

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

Private Member Functions

void _OnEraseBackground (wxEraseEvent &event)
 Internally used event handler. More...
 
void _OnMouseMove (wxMouseEvent &event)
 Internally used event handler. More...
 
void _OnLeftDown (wxMouseEvent &event)
 Internally used event handler. More...
 
void _OnRightDown (wxMouseEvent &event)
 Internally used event handler. More...
 
void _OnTimer (wxTimerEvent &event)
 Internally used event handler. More...
 
void _OnShowElements (wxCommandEvent &event)
 Internally used event handler. More...
 
void _OnShowConnections (wxCommandEvent &event)
 Internally used event handler. More...
 
void _OnUpdateShowElements (wxUpdateUIEvent &event)
 Internally used event handler. More...
 
void _OnUpdateShowConnections (wxUpdateUIEvent &event)
 Internally used event handler. More...
 
 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

◆ IDS

Internally used IDs.

Enumerator
ID_UPDATETIMER 
IDM_SHOWELEMENTS 
IDM_SHOWCONNECTIONS 

◆ THUMBSTYLE

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::wxSFThumbnail ( wxWindow *  parent)

Constructor.

Parameters
parentPointer to parent window

◆ ~wxSFThumbnail()

virtual wxSFThumbnail::~wxSFThumbnail ( )
virtual

Destructor.

Member Function Documentation

◆ _OnEraseBackground()

void wxSFThumbnail::_OnEraseBackground ( wxEraseEvent &  event)
private

Internally used event handler.

◆ _OnLeftDown()

void wxSFThumbnail::_OnLeftDown ( wxMouseEvent &  event)
private

Internally used event handler.

◆ _OnMouseMove()

void wxSFThumbnail::_OnMouseMove ( wxMouseEvent &  event)
private

Internally used event handler.

◆ _OnPaint()

void wxSFThumbnail::_OnPaint ( wxPaintEvent &  event)
protected

Current thumbnail's style.

Internally used event handler.

◆ _OnRightDown()

void wxSFThumbnail::_OnRightDown ( wxMouseEvent &  event)
private

Internally used event handler.

◆ _OnShowConnections()

void wxSFThumbnail::_OnShowConnections ( wxCommandEvent &  event)
private

Internally used event handler.

◆ _OnShowElements()

void wxSFThumbnail::_OnShowElements ( wxCommandEvent &  event)
private

Internally used event handler.

◆ _OnTimer()

void wxSFThumbnail::_OnTimer ( wxTimerEvent &  event)
private

Internally used event handler.

◆ _OnUpdateShowConnections()

void wxSFThumbnail::_OnUpdateShowConnections ( wxUpdateUIEvent &  event)
private

Internally used event handler.

◆ _OnUpdateShowElements()

void wxSFThumbnail::_OnUpdateShowElements ( wxUpdateUIEvent &  event)
private

Internally used event handler.

◆ DECLARE_EVENT_TABLE()

wxSFThumbnail::DECLARE_EVENT_TABLE ( )
private

◆ DrawContent()

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

◆ GetCanvasOffset()

wxSize wxSFThumbnail::GetCanvasOffset ( )
protected

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

Returns
Canvas offset in pixels

◆ GetThumbStyle()

int wxSFThumbnail::GetThumbStyle ( )
inline

Get current thumbnail style.

Returns
Style value composed of predefined flags
See also
THUMBSTYLE

◆ SetCanvas()

void wxSFThumbnail::SetCanvas ( wxSFShapeCanvas canvas)

Set canvas managed by the thumbnail.

Parameters
canvasPointer to shape canvas

◆ SetThumbStyle()

void wxSFThumbnail::SetThumbStyle ( int  style)
inline

Set the thumbnail style.

Parameters
styleStyle value composed of predefined flags
See also
THUMBSTYLE

Member Data Documentation

◆ m_nPrevMousePos

wxPoint wxSFThumbnail::m_nPrevMousePos
protected

Timer user for the thumbnail's update.

◆ m_nScale

double wxSFThumbnail::m_nScale
protected

Auxiliary varialble.

◆ m_nThumbStyle

int wxSFThumbnail::m_nThumbStyle
protected

Current thumbnail's scale.

◆ m_pCanvas

wxSFShapeCanvas* wxSFThumbnail::m_pCanvas
protected

◆ m_UpdateTimer

wxTimer wxSFThumbnail::m_UpdateTimer
protected

Pointer to managed shape canvas.


The documentation for this class was generated from the following file: