wxRectTracker
Public Member Functions | Protected Member Functions | Protected Attributes
wxRectTrackerRatio Class Reference

Tracker with Ratio constraint. More...

#include <RectTrackerRatio.h>

Inheritance diagram for wxRectTrackerRatio:
wxRectTracker

List of all members.

Public Member Functions

int GetFixedHeight ()
int GetFixedWidth ()
double GetGuideRatio ()
int GetOrientation ()
double GetRatio ()
void SetFixedSize (int width, int height)
void SetGuideRatio (double ratio)
void SetOrientation (int orientation)
void SetRatio (double ratio)
 wxRectTrackerRatio (wxWindow *parent, wxFrame *frame=NULL)
virtual ~wxRectTrackerRatio ()

Protected Member Functions

virtual void AdjustTrackerRect (wxRect &curRect, int handler)
void AdjustTrackerRectFixed (wxRect &curRect, int handler)
void AdjustTrackerRectRatio (wxRect &curRect, int handler, bool expand)
long CalcRectDist (wxRect r1, wxRect r2)
wxRect CalcRectNearer (wxRect rr, wxRect r1, wxRect r2)
virtual void DrawRect (wxDC &dc, int x, int y, int w, int h)
virtual void DrawTracker (wxDC &dc, int x, int y, int w, int h)

Protected Attributes

int fixedHeight
 Fixed height.
int fixedWidth
 Fixed width.
double guideRatio
 Ratio of the 4 guide lines (ex : 0 = none; 0.5 = middle ; 0.66 = third)
int orientation
 Orientation : 0 : automatic, -1 : portrait, 1 : landscape.
double ratio
 The tracker should keep this ratio (0 : don't use)

Detailed Description

Tracker with Ratio constraint.

This class adds a width/height constraint in the tracker. The user can only drag a tracker which respect this constraint. It uses basically :

Definition at line 29 of file RectTrackerRatio.h.


Constructor & Destructor Documentation

wxRectTrackerRatio::wxRectTrackerRatio ( wxWindow *  parent,
wxFrame *  frame = NULL 
)

Definition at line 18 of file RectTrackerRatio.cpp.

Definition at line 26 of file RectTrackerRatio.cpp.


Member Function Documentation

void wxRectTrackerRatio::AdjustTrackerRect ( wxRect &  curRect,
int  handler 
) [protected, virtual]

Reimplemented from wxRectTracker.

Definition at line 125 of file RectTrackerRatio.cpp.

void wxRectTrackerRatio::AdjustTrackerRectFixed ( wxRect &  curRect,
int  handler 
) [protected]

Definition at line 111 of file RectTrackerRatio.cpp.

void wxRectTrackerRatio::AdjustTrackerRectRatio ( wxRect &  curRect,
int  handler,
bool  expand 
) [protected]

Definition at line 48 of file RectTrackerRatio.cpp.

long wxRectTrackerRatio::CalcRectDist ( wxRect  r1,
wxRect  r2 
) [protected]

Definition at line 30 of file RectTrackerRatio.cpp.

wxRect wxRectTrackerRatio::CalcRectNearer ( wxRect  rr,
wxRect  r1,
wxRect  r2 
) [protected]

Definition at line 41 of file RectTrackerRatio.cpp.

void wxRectTrackerRatio::DrawRect ( wxDC &  dc,
int  x,
int  y,
int  w,
int  h 
) [protected, virtual]

Reimplemented from wxRectTracker.

Definition at line 181 of file RectTrackerRatio.cpp.

void wxRectTrackerRatio::DrawTracker ( wxDC &  dc,
int  x,
int  y,
int  w,
int  h 
) [protected, virtual]

Reimplemented from wxRectTracker.

Definition at line 197 of file RectTrackerRatio.cpp.

Definition at line 42 of file RectTrackerRatio.h.

Definition at line 41 of file RectTrackerRatio.h.

double wxRectTrackerRatio::GetGuideRatio ( ) [inline]

Definition at line 39 of file RectTrackerRatio.h.

Definition at line 40 of file RectTrackerRatio.h.

double wxRectTrackerRatio::GetRatio ( ) [inline]

Definition at line 38 of file RectTrackerRatio.h.

void wxRectTrackerRatio::SetFixedSize ( int  width,
int  height 
)

Definition at line 163 of file RectTrackerRatio.cpp.

void wxRectTrackerRatio::SetGuideRatio ( double  ratio)

Definition at line 151 of file RectTrackerRatio.cpp.

void wxRectTrackerRatio::SetOrientation ( int  orientation)

Definition at line 157 of file RectTrackerRatio.cpp.

void wxRectTrackerRatio::SetRatio ( double  ratio)

Definition at line 142 of file RectTrackerRatio.cpp.


Member Data Documentation

Fixed height.

Definition at line 67 of file RectTrackerRatio.h.

Fixed width.

Definition at line 65 of file RectTrackerRatio.h.

double wxRectTrackerRatio::guideRatio [protected]

Ratio of the 4 guide lines (ex : 0 = none; 0.5 = middle ; 0.66 = third)

Definition at line 63 of file RectTrackerRatio.h.

Orientation : 0 : automatic, -1 : portrait, 1 : landscape.

Definition at line 69 of file RectTrackerRatio.h.

double wxRectTrackerRatio::ratio [protected]

The tracker should keep this ratio (0 : don't use)

Definition at line 61 of file RectTrackerRatio.h.