NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members

Search Toolkit Book for CGlPane

class CGlPane More...

#include <gui/opengl/glpane.hpp>

+ Collaboration diagram for CGlPane:

Public Types

enum  EProjectionMode { eNone = -1 , eOrtho , ePixels }
 
enum  EOriginType {
  eOriginLeft , eOriginRight , eOriginBottom , eOriginTop ,
  eOriginCenter
}
 Specifies what point should be preserved during various coordinate space adjustments. More...
 
enum  EProjMatrixPolicy { eNeverUpdate , eAlwaysUpdate }
 EProjMatrixPolicy controls CGlPane behavior in respect to obtaining projection matrices for future use in Project..(), UnProject...() functions. More...
 
enum  EAdjustmentPolicy { fShiftToLimits = 0x1 , fScaleToLimits = 0x2 , fAdjustAll = fShiftToLimits | fScaleToLimits }
 EAdjustmentPolicy specifies how visible area should be adjusted if some of the prjection parameters change. More...
 
enum  EZoomOptions { fZoomX = 0x1 , fZoomY = 0x2 , fForce = 0x4 , fZoomXY = fZoomX | fZoomY }
 EZoomOptions flags control behavior of Zoom operations. More...
 

Public Member Functions

 CGlPane (EProjMatrixPolicy policy=eAlwaysUpdate)
 CGlPane. More...
 
 CGlPane (const CGlPane &pane)
 
virtual ~CGlPane ()
 
void SetViewport (const TVPRect &R)
 
TVPRectGetViewport (void)
 
const TVPRectGetViewport (void) const
 
void SetModelLimitsRect (const TModelRect &R)
 
TModelRectGetModelLimitsRect (void)
 
const TModelRectGetModelLimitsRect (void) const
 
void SetVisibleRect (const TModelRect &R)
 
TModelRectGetVisibleRect (void)
 
const TModelRectGetVisibleRect (void) const
 
void SetClipRect (const TVPRect *rc_clip=NULL)
 set clipping rect that will be used by glScissor, NULL for reset More...
 
const TVPRectGetClipRect () const
 returns clipping rect or NULL (if there is no clipping) More...
 
void EnableOffset (bool b_en=true)
 Offset is used as a workaround for OpenGL precision problems emerging when size of visible range is small in comparision to coordinates in this range. More...
 
TModelUnit GetOffsetX () const
 
TModelUnit GetOffsetY () const
 
TModelPoint GetOffset () const
 
bool Open (EProjectionMode Mode)
 
bool OpenOrtho ()
 
bool OpenPixels ()
 
void Close (void)
 
EProjectionMode GetProjMode (void) const
 
TModelUnit GetScaleX (void) const
 
TModelUnit GetScaleY (void) const
 
CVect2< TModelUnitGetScale () const
 
void SetMinScaleX (TModelUnit scale)
 
void SetMinScaleY (TModelUnit scale)
 
TModelUnit GetMinScaleX (void) const
 
TModelUnit GetMinScaleY (void) const
 
TModelUnit GetZoomAllScaleX (void) const
 
TModelUnit GetZoomAllScaleY (void) const
 
void SetProportionalMode (bool set)
 
bool IsProportionalMode (void) const
 
void SetOriginType (EOriginType type_x, EOriginType type_y)
 
void SetAdjustmentPolicy (int adjust_x, int adjust_y)
 
void SetAdjustToLimits (bool adjust_x, bool adjust_y)
 
void EnableZoom (bool en_x, bool en_y)
 
bool IsZoomInAvaiable (void)
 
bool IsZoomOutAvaiable (void)
 
TModelUnit GetZoomFactor (void) const
 
void SetZoomFactor (TModelUnit factor=2.0)
 
void ZoomAll (int options=fZoomXY)
 
void ZoomInCenter (int options=fZoomXY)
 
void ZoomIn (TModelUnit x, TModelUnit y, int options=fZoomXY)
 
void ZoomIn (TModelPoint p, int options=fZoomXY)
 
void ZoomOutCenter (int options=fZoomXY)
 
void ZoomOut (TModelUnit x, TModelUnit y, int options=fZoomXY)
 
void ZoomOut (TModelPoint p, int options=fZoomXY)
 
void ZoomPoint (TModelUnit x, TModelUnit y, TModelUnit factor, int options=fZoomXY)
 
void ZoomPoint (TModelPoint p, TModelUnit factor, int options=fZoomXY)
 
void ZoomRect (const TModelRect &r)
 
void SetScale (TModelUnit scale_x, TModelUnit scale_y, TModelPoint p_center)
 
void SetScaleRefPoint (TModelUnit scale_x, TModelUnit scale_y, TModelPoint p_ref)
 
void SetScale (TModelUnit scale_x, TModelUnit scale_y)
 
void SetExactOrthoProjection (bool exact_projection)
 
bool NeedsScrollX (void) const
 
bool NeedsScrollY (void) const
 
void Scroll (TModelUnit dx, TModelUnit dy)
 
void SetProportional (TModelRect &vr, TModelRect &mr)
 
void ScrollTo (const CVect2< TModelUnit > &pos, TModelUnit pctx, TModelUnit pcty)
 
void AdjustToLimits ()
 
TVPUnit ProjectX (TModelUnit m_x) const
 
TVPUnit ProjectY (TModelUnit m_y) const
 
TVPPoint Project (TModelUnit m_x, TModelUnit m_y) const
 
TModelUnit UnProjectX (TVPUnit m_x) const
 
TModelUnit UnProjectY (TVPUnit m_y) const
 
TModelPoint UnProject (TVPUnit m_x, TVPUnit m_y) const
 
TModelUnit UnProjectWidth (TVPUnit vp_w) const
 
TModelUnit UnProjectHeight (TVPUnit vp_h) const
 
CVect2< TModelUnitProjectEx (CVect2< TModelUnit > pt)
 Project in a manner that supports rendering to pdf as well (viewport may be larger than max. More...
 
CVect2< TModelUnitUnProjectEx (const CVect2< TModelUnit > &pt)
 
void SetOutputUnitScaler (TModelUnit u)
 Set/get output scaler. More...
 
TModelUnit GetOutputUnitScaler () const
 
TModelUnit GetPixelDist (TModelUnit d) const
 Return the scaled pixel distance. Only important for pdf rendering. More...
 

Protected Member Functions

bool x_OpenOrtho ()
 
bool x_OpenPixels ()
 
void x_Open_SetViewport ()
 
void x_UpdateProjectMatrices (void)
 
void x_CorrectScale (TModelPoint p_center)
 
void x_ShiftToFitLimits (void)
 
void x_ScaleToFitLimits (void)
 
void x_AdjustVisibleRect (void)
 
void x_AssertNotOpen (void) const
 
void x_AssertOrtho (void) const
 

Static Protected Member Functions

static TModelUnit s_GetShift (TModelUnit low_shift, TModelUnit high_shift, bool neg_range, EOriginType type)
 

Protected Attributes

TVPRect m_rcVP
 
TModelRect m_rcLimits
 
TModelRect m_rcVisible
 
TModelRect m_rcOrigVisible
 
const TVPRectm_prcClip
 
EProjectionMode m_Mode
 
EProjMatrixPolicy m_MatrixPolicy
 
int m_AdjustX
 
int m_AdjustY
 
bool m_bEnableOffset
 
bool m_bExactOrthoProjection
 
bool m_bZoomEnX
 
bool m_bZoomEnY
 
TModelUnit m_ZoomFactor
 
bool m_bProportionalMode
 
EOriginType m_TypeX
 
EOriginType m_TypeY
 
TModelUnit m_MinScaleX
 
TModelUnit m_MinScaleY
 
TModelUnit m_OutputUnitScaler
 
GLint m_mxVP [4]
 
GLdouble m_mxProjection [16]
 
GLdouble m_mxModelView [16]
 

Detailed Description

class CGlPane

Definition at line 61 of file glpane.hpp.


The documentation for this class was generated from the following files:
Modified on Sat Jul 13 13:41:30 2024 by modify_doxy.py rev. 669887