NCBI C++ ToolKit
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
CMinimapHandler Class Reference

Search Toolkit Book for CMinimapHandler

CMinimapHandler provides support for mouse-driven zoom and pan operations. More...

#include <gui/widgets/gl/minimap_handler.hpp>

+ Inheritance diagram for CMinimapHandler:
+ Collaboration diagram for CMinimapHandler:

Public Member Functions

 CMinimapHandler ()
 class CMinimapHandler More...
 
virtual ~CMinimapHandler ()
 
void SetHost (IMinimapHandlerHost *pHost)
 
IGenericHandlerHostGetGenericHost ()
 
void Render (CGlPane &Pane)
 
void OnLeftDown (wxMouseEvent &event)
 IGlEventHandler implementation. More...
 
void OnLeftUp (wxMouseEvent &event)
 
void OnMotion (wxMouseEvent &event)
 
void OnMouseWheel (wxMouseEvent &event)
 
void OnMouseCaptureLost (wxMouseCaptureLostEvent &evt)
 
void OnKeyDown (wxKeyEvent &event)
 
void OnKeyUp (wxKeyEvent &event)
 
IGlEventHandler implementaion
virtual void SetPane (CGlPane *pane)
 
virtual wxEvtHandler * GetEvtHandler ()
 
- Public Member Functions inherited from IGlEventHandler
virtual ~IGlEventHandler ()
 

Protected Types

enum  EState { eIdle , eReadyMinimap , eMinimap }
 
enum  ESubstate { eNormal , eJumpTo , eCursor }
 
typedef ESubstate TSubstate
 

Protected Member Functions

void x_SwitchToReadyState (EState new_state, const wxPoint &ms_pos)
 signal handlers - functions doing the real job More...
 
void x_SwithToActiveState (EState state, const wxPoint &ms_pos)
 
TSubstate x_GetSubstate (const wxPoint &ms_pos)
 
void x_OnChangeZoomRectPan (int x, int y)
 
void x_OnEndMinimap (EState new_state)
 
void x_OnChangePan (const wxPoint &ms_pos)
 
void x_OnSelectCursor (const wxPoint &ms_pos)
 
void x_RenderMinimap (CGlPane &pane)
 
const IMinimapHandlerHostx_GetHost (void) const
 
IMinimapHandlerHostx_GetHost (void)
 
TModelUnit x_ScaleToNorm (TModelUnit scale) const
 
TModelUnit x_NormToScale (TModelUnit norm) const
 

Protected Attributes

I3DTexturem_pTexture
 
float m_XCoordLimit
 
float m_YCoordLimit
 
IMinimapHandlerHostm_Host
 
CGlPanem_Pane
 
EState m_State
 
TSubstate m_Substate
 
int m_CursorId
 
TVPRect m_Minimap
 
TVPRect m_MiniCursor
 
int m_PixPerNorm
 
TModelUnit m_MaxNorm
 
TModelUnit m_MinNorm
 
TModelUnit m_StartNorm
 
TModelUnit m_CurrNorm
 
wxPoint m_MarkerPos
 
wxPoint m_MouseStart
 
wxPoint m_CurrPos
 
wxPoint m_LastMouse
 
TModelPoint m_ptStart
 
int m_WheelTotalShift
 
int m_InnerRectX
 
int m_InnerRectY
 
int m_InnerRectW
 
int m_InnerRectH
 
double m_scalex
 
double m_scaley
 
CRgbaColor m_ScaleColor
 
CRgbaColor m_TickColor
 
CRgbaColor m_RectColor
 

Detailed Description

CMinimapHandler provides support for mouse-driven zoom and pan operations.

Definition at line 80 of file minimap_handler.hpp.

Member Typedef Documentation

◆ TSubstate

Definition at line 121 of file minimap_handler.hpp.

Member Enumeration Documentation

◆ EState

enum CMinimapHandler::EState
protected
Enumerator
eIdle 
eReadyMinimap 
eMinimap 

Definition at line 109 of file minimap_handler.hpp.

◆ ESubstate

Enumerator
eNormal 
eJumpTo 
eCursor 

Definition at line 115 of file minimap_handler.hpp.

Constructor & Destructor Documentation

◆ CMinimapHandler()

CMinimapHandler::CMinimapHandler ( )

class CMinimapHandler

Definition at line 59 of file minimap_handler.cpp.

◆ ~CMinimapHandler()

CMinimapHandler::~CMinimapHandler ( )
virtual

Definition at line 77 of file minimap_handler.cpp.

Member Function Documentation

◆ GetEvtHandler()

wxEvtHandler * CMinimapHandler::GetEvtHandler ( )
virtual

Implements IGlEventHandler.

Definition at line 88 of file minimap_handler.cpp.

◆ GetGenericHost()

IGenericHandlerHost * CMinimapHandler::GetGenericHost ( )

◆ OnKeyDown()

void CMinimapHandler::OnKeyDown ( wxKeyEvent &  event)

◆ OnKeyUp()

void CMinimapHandler::OnKeyUp ( wxKeyEvent &  event)

◆ OnLeftDown()

void CMinimapHandler::OnLeftDown ( wxMouseEvent &  event)

◆ OnLeftUp()

void CMinimapHandler::OnLeftUp ( wxMouseEvent &  event)

◆ OnMotion()

void CMinimapHandler::OnMotion ( wxMouseEvent &  event)

◆ OnMouseCaptureLost()

void CMinimapHandler::OnMouseCaptureLost ( wxMouseCaptureLostEvent &  evt)

Definition at line 522 of file minimap_handler.cpp.

◆ OnMouseWheel()

void CMinimapHandler::OnMouseWheel ( wxMouseEvent &  event)

◆ Render()

void CMinimapHandler::Render ( CGlPane Pane)

◆ SetHost()

void CMinimapHandler::SetHost ( IMinimapHandlerHost pHost)

Definition at line 94 of file minimap_handler.cpp.

References m_Host.

◆ SetPane()

void CMinimapHandler::SetPane ( CGlPane pane)
virtual

Reimplemented from IGlEventHandler.

Definition at line 82 of file minimap_handler.cpp.

References m_Pane.

◆ x_GetHost() [1/2]

IMinimapHandlerHost* CMinimapHandler::x_GetHost ( void  )
inlineprotected

Definition at line 138 of file minimap_handler.hpp.

References m_Host.

◆ x_GetHost() [2/2]

const IMinimapHandlerHost* CMinimapHandler::x_GetHost ( void  ) const
inlineprotected

Definition at line 137 of file minimap_handler.hpp.

References m_Host.

◆ x_GetSubstate()

CMinimapHandler::TSubstate CMinimapHandler::x_GetSubstate ( const wxPoint &  ms_pos)
protected

◆ x_NormToScale()

TModelUnit CMinimapHandler::x_NormToScale ( TModelUnit  norm) const
protected

Definition at line 499 of file minimap_handler.cpp.

◆ x_OnChangePan()

void CMinimapHandler::x_OnChangePan ( const wxPoint &  ms_pos)
protected

◆ x_OnChangeZoomRectPan()

void CMinimapHandler::x_OnChangeZoomRectPan ( int  x,
int  y 
)
protected

◆ x_OnEndMinimap()

void CMinimapHandler::x_OnEndMinimap ( EState  new_state)
protected

◆ x_OnSelectCursor()

void CMinimapHandler::x_OnSelectCursor ( const wxPoint &  ms_pos)
protected

◆ x_RenderMinimap()

void CMinimapHandler::x_RenderMinimap ( CGlPane pane)
protected

◆ x_ScaleToNorm()

TModelUnit CMinimapHandler::x_ScaleToNorm ( TModelUnit  scale) const
protected

Definition at line 493 of file minimap_handler.cpp.

References log.

Referenced by x_SwitchToReadyState().

◆ x_SwitchToReadyState()

void CMinimapHandler::x_SwitchToReadyState ( EState  new_state,
const wxPoint &  ms_pos 
)
protected

◆ x_SwithToActiveState()

void CMinimapHandler::x_SwithToActiveState ( EState  state,
const wxPoint &  ms_pos 
)
protected

Member Data Documentation

◆ m_CurrNorm

TModelUnit CMinimapHandler::m_CurrNorm
protected

Definition at line 161 of file minimap_handler.hpp.

Referenced by OnMouseWheel(), x_OnEndMinimap(), and x_SwitchToReadyState().

◆ m_CurrPos

wxPoint CMinimapHandler::m_CurrPos
protected

Definition at line 166 of file minimap_handler.hpp.

Referenced by x_OnChangePan(), and x_SwitchToReadyState().

◆ m_CursorId

int CMinimapHandler::m_CursorId
protected

Definition at line 151 of file minimap_handler.hpp.

Referenced by x_OnSelectCursor().

◆ m_Host

IMinimapHandlerHost* CMinimapHandler::m_Host
protected

◆ m_InnerRectH

int CMinimapHandler::m_InnerRectH
protected

Definition at line 174 of file minimap_handler.hpp.

Referenced by x_RenderMinimap().

◆ m_InnerRectW

int CMinimapHandler::m_InnerRectW
protected

Definition at line 174 of file minimap_handler.hpp.

Referenced by x_RenderMinimap().

◆ m_InnerRectX

int CMinimapHandler::m_InnerRectX
protected

Definition at line 173 of file minimap_handler.hpp.

Referenced by x_RenderMinimap().

◆ m_InnerRectY

int CMinimapHandler::m_InnerRectY
protected

Definition at line 173 of file minimap_handler.hpp.

Referenced by x_RenderMinimap().

◆ m_LastMouse

wxPoint CMinimapHandler::m_LastMouse
protected

Definition at line 167 of file minimap_handler.hpp.

Referenced by OnMotion(), and x_SwitchToReadyState().

◆ m_MarkerPos

wxPoint CMinimapHandler::m_MarkerPos
protected

Definition at line 163 of file minimap_handler.hpp.

Referenced by x_RenderMinimap(), and x_SwitchToReadyState().

◆ m_MaxNorm

TModelUnit CMinimapHandler::m_MaxNorm
protected

Definition at line 158 of file minimap_handler.hpp.

Referenced by x_SwitchToReadyState().

◆ m_MiniCursor

TVPRect CMinimapHandler::m_MiniCursor
protected

Definition at line 154 of file minimap_handler.hpp.

Referenced by OnLeftUp(), OnMotion(), x_GetSubstate(), and x_RenderMinimap().

◆ m_Minimap

TVPRect CMinimapHandler::m_Minimap
protected

Definition at line 153 of file minimap_handler.hpp.

Referenced by x_GetSubstate(), and x_RenderMinimap().

◆ m_MinNorm

TModelUnit CMinimapHandler::m_MinNorm
protected

Definition at line 159 of file minimap_handler.hpp.

Referenced by x_SwitchToReadyState().

◆ m_MouseStart

wxPoint CMinimapHandler::m_MouseStart
protected

Definition at line 165 of file minimap_handler.hpp.

Referenced by x_OnChangePan(), and x_SwithToActiveState().

◆ m_Pane

CGlPane* CMinimapHandler::m_Pane
protected

Definition at line 148 of file minimap_handler.hpp.

Referenced by SetPane(), x_OnChangePan(), and x_SwithToActiveState().

◆ m_PixPerNorm

int CMinimapHandler::m_PixPerNorm
protected

Definition at line 157 of file minimap_handler.hpp.

Referenced by OnMouseWheel().

◆ m_pTexture

I3DTexture* CMinimapHandler::m_pTexture
protected

Definition at line 144 of file minimap_handler.hpp.

Referenced by OnKeyUp(), Render(), and x_RenderMinimap().

◆ m_ptStart

TModelPoint CMinimapHandler::m_ptStart
protected

Definition at line 168 of file minimap_handler.hpp.

Referenced by x_SwithToActiveState().

◆ m_RectColor

CRgbaColor CMinimapHandler::m_RectColor
protected

Definition at line 181 of file minimap_handler.hpp.

Referenced by x_RenderMinimap().

◆ m_ScaleColor

CRgbaColor CMinimapHandler::m_ScaleColor
protected

Definition at line 179 of file minimap_handler.hpp.

Referenced by x_RenderMinimap().

◆ m_scalex

double CMinimapHandler::m_scalex
protected

Definition at line 176 of file minimap_handler.hpp.

Referenced by x_OnChangeZoomRectPan(), and x_RenderMinimap().

◆ m_scaley

double CMinimapHandler::m_scaley
protected

Definition at line 176 of file minimap_handler.hpp.

Referenced by x_OnChangeZoomRectPan(), and x_RenderMinimap().

◆ m_StartNorm

TModelUnit CMinimapHandler::m_StartNorm
protected

Definition at line 160 of file minimap_handler.hpp.

Referenced by OnMouseWheel(), x_OnEndMinimap(), and x_SwitchToReadyState().

◆ m_State

EState CMinimapHandler::m_State
protected

◆ m_Substate

TSubstate CMinimapHandler::m_Substate
protected

Definition at line 150 of file minimap_handler.hpp.

Referenced by OnLeftUp(), and x_OnSelectCursor().

◆ m_TickColor

CRgbaColor CMinimapHandler::m_TickColor
protected

Definition at line 180 of file minimap_handler.hpp.

Referenced by x_RenderMinimap().

◆ m_WheelTotalShift

int CMinimapHandler::m_WheelTotalShift
protected

Definition at line 171 of file minimap_handler.hpp.

Referenced by OnMouseWheel().

◆ m_XCoordLimit

float CMinimapHandler::m_XCoordLimit
protected

Definition at line 145 of file minimap_handler.hpp.

Referenced by Render(), and x_RenderMinimap().

◆ m_YCoordLimit

float CMinimapHandler::m_YCoordLimit
protected

Definition at line 146 of file minimap_handler.hpp.

Referenced by Render(), and x_RenderMinimap().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:44 2024 by modify_doxy.py rev. 669887