MatOCAD Logo

Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

wxZoomData Class Reference

Class for zoomable windows. More...

#include <resizec.h>

List of all members.

Public Member Functions

 wxZoomData ()
 Ctor.
 wxZoomData (const wxSize &size, const wxPoint &pos)
 Ctor.
void SetZoomSize (wxWindow *Window, float zoom)
 Set new zoom factor (changes size only).
void SetZoomRect (wxWindow *Window, float zoom, int curxoffs, int curyoffs, int newxoffs, int newyoffs)
 Set new zoom factor (position and size).
void SetCurrentZoom (float zoom)
 Changes zoom factor without resizing the window.
float GetZoom ()
 Returns the set zoom factor.
void SetSize (int width, int height)
 Updates the original window size.
void Move (int xpos, int ypos)
 Updates the original window position.

Private Attributes

wxSize m_orgSize
 Original window size.
wxPoint m_orgPos
 Original window pos.
wxRect m_currRect
 Current window size.
float m_zoom
 Current zoom factor.


Detailed Description

Class for zoomable windows.

Stores the original size of the window, so that Zooming is always computed from this data, and thus rounding errors are avoided.

Definition at line 29 of file resizec.h.


Constructor & Destructor Documentation

wxZoomData::wxZoomData  )  [inline]
 

Ctor.

Definition at line 41 of file resizec.h.

wxZoomData::wxZoomData const wxSize &  size,
const wxPoint &  pos
[inline]
 

Ctor.

Definition at line 43 of file resizec.h.


Member Function Documentation

float wxZoomData::GetZoom  )  [inline]
 

Returns the set zoom factor.

Definition at line 72 of file resizec.h.

References m_zoom.

void wxZoomData::Move int  xpos,
int  ypos
 

Updates the original window position.

Definition at line 64 of file resizec.cpp.

References m_currRect, m_orgPos, and m_zoom.

Referenced by wxResizeableControl::DoSetSize(), and wxResizeableControl::OnMove().

void wxZoomData::SetCurrentZoom float  zoom  )  [inline]
 

Changes zoom factor without resizing the window.

Definition at line 63 of file resizec.h.

References m_orgPos, m_orgSize, and m_zoom.

Referenced by wxResizeableControl::SetCurrentZoom().

void wxZoomData::SetSize int  width,
int  height
 

Updates the original window size.

Definition at line 52 of file resizec.cpp.

Referenced by wxResizeableControl::DoSetSize(), and wxResizeableControl::OnSize().

void wxZoomData::SetZoomRect wxWindow *  Window,
float  zoom,
int  curxoffs,
int  curyoffs,
int  newxoffs,
int  newyoffs
 

Set new zoom factor (position and size).

curxoffs and curyoffs are the current offset values (e. g. scroll position) in absolute size (unzoomed) newxoffs and newyoffs are the new offset values

Definition at line 76 of file resizec.cpp.

References m_currRect, m_orgPos, m_orgSize, and m_zoom.

void wxZoomData::SetZoomSize wxWindow *  Window,
float  zoom
[inline]
 

Set new zoom factor (changes size only).

Definition at line 46 of file resizec.h.

References m_currRect, m_orgSize, and m_zoom.

Referenced by wxResizeableControl::SetZoom().


Member Data Documentation

wxRect wxZoomData::m_currRect [private]
 

Current window size.

Definition at line 36 of file resizec.h.

Referenced by Move(), SetZoomRect(), and SetZoomSize().

wxPoint wxZoomData::m_orgPos [private]
 

Original window pos.

Definition at line 34 of file resizec.h.

Referenced by Move(), SetCurrentZoom(), and SetZoomRect().

wxSize wxZoomData::m_orgSize [private]
 

Original window size.

Definition at line 32 of file resizec.h.

Referenced by SetCurrentZoom(), SetZoomRect(), and SetZoomSize().

float wxZoomData::m_zoom [private]
 

Current zoom factor.

Definition at line 38 of file resizec.h.

Referenced by GetZoom(), Move(), SetCurrentZoom(), SetZoomRect(), and SetZoomSize().


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

 

SourceForge Logo