NCBI C++ ToolKit
|
Search Toolkit Book for CMinimapHandler
CMinimapHandler provides support for mouse-driven zoom and pan operations. More...
#include <gui/widgets/gl/minimap_handler.hpp>
Public Member Functions | |
CMinimapHandler () | |
class CMinimapHandler More... | |
virtual | ~CMinimapHandler () |
void | SetHost (IMinimapHandlerHost *pHost) |
IGenericHandlerHost * | GetGenericHost () |
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 IMinimapHandlerHost * | x_GetHost (void) const |
IMinimapHandlerHost * | x_GetHost (void) |
TModelUnit | x_ScaleToNorm (TModelUnit scale) const |
TModelUnit | x_NormToScale (TModelUnit norm) const |
Protected Attributes | |
I3DTexture * | m_pTexture |
float | m_XCoordLimit |
float | m_YCoordLimit |
IMinimapHandlerHost * | m_Host |
CGlPane * | m_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 |
CMinimapHandler provides support for mouse-driven zoom and pan operations.
Definition at line 80 of file minimap_handler.hpp.
|
protected |
Definition at line 121 of file minimap_handler.hpp.
|
protected |
Enumerator | |
---|---|
eIdle | |
eReadyMinimap | |
eMinimap |
Definition at line 109 of file minimap_handler.hpp.
|
protected |
Enumerator | |
---|---|
eNormal | |
eJumpTo | |
eCursor |
Definition at line 115 of file minimap_handler.hpp.
CMinimapHandler::CMinimapHandler | ( | ) |
class CMinimapHandler
Definition at line 59 of file minimap_handler.cpp.
|
virtual |
Definition at line 77 of file minimap_handler.cpp.
|
virtual |
Implements IGlEventHandler.
Definition at line 88 of file minimap_handler.cpp.
IGenericHandlerHost * CMinimapHandler::GetGenericHost | ( | ) |
Definition at line 100 of file minimap_handler.cpp.
References m_Host.
Referenced by x_OnChangePan(), x_OnChangeZoomRectPan(), x_OnEndMinimap(), x_SwitchToReadyState(), and x_SwithToActiveState().
void CMinimapHandler::OnKeyDown | ( | wxKeyEvent & | event | ) |
Definition at line 375 of file minimap_handler.cpp.
References eIdle, eReadyMinimap, m_State, sIsMiniMapMode(), x_OnSelectCursor(), and x_SwitchToReadyState().
void CMinimapHandler::OnKeyUp | ( | wxKeyEvent & | event | ) |
Definition at line 392 of file minimap_handler.cpp.
References eIdle, eMinimap, eReadyMinimap, m_pTexture, m_State, NULL, sIsMiniMapMode(), x_OnEndMinimap(), and x_OnSelectCursor().
void CMinimapHandler::OnLeftDown | ( | wxMouseEvent & | event | ) |
IGlEventHandler implementation.
Definition at line 250 of file minimap_handler.cpp.
References eIdle, eMinimap, eReadyMinimap, sIsMiniMapMode(), x_OnSelectCursor(), x_SwitchToReadyState(), and x_SwithToActiveState().
void CMinimapHandler::OnLeftUp | ( | wxMouseEvent & | event | ) |
Definition at line 323 of file minimap_handler.cpp.
References CGlRect< T >::Bottom(), eJumpTo, eMinimap, eReadyMinimap, CGlRect< T >::Height(), CGlRect< T >::Left(), m_MiniCursor, m_State, m_Substate, CGlRect< T >::Width(), x_OnChangeZoomRectPan(), x_OnEndMinimap(), and x_OnSelectCursor().
void CMinimapHandler::OnMotion | ( | wxMouseEvent & | event | ) |
Definition at line 269 of file minimap_handler.cpp.
References CGlRect< T >::Bottom(), eIdle, eMinimap, CGlRect< T >::Height(), CGlRect< T >::Left(), m_LastMouse, m_MiniCursor, m_State, CGlRect< T >::Width(), x_OnChangeZoomRectPan(), and x_OnSelectCursor().
void CMinimapHandler::OnMouseCaptureLost | ( | wxMouseCaptureLostEvent & | evt | ) |
Definition at line 522 of file minimap_handler.cpp.
void CMinimapHandler::OnMouseWheel | ( | wxMouseEvent & | event | ) |
Definition at line 345 of file minimap_handler.cpp.
References _ASSERT, eIdle, eMinimap, eReadyMinimap, int, m_CurrNorm, m_PixPerNorm, m_StartNorm, m_State, m_WheelTotalShift, sIsMiniMapMode(), x_OnSelectCursor(), x_SwitchToReadyState(), and x_SwithToActiveState().
void CMinimapHandler::Render | ( | CGlPane & | Pane | ) |
Definition at line 109 of file minimap_handler.cpp.
References eMinimap, eReadyMinimap, m_Host, m_pTexture, m_State, m_XCoordLimit, m_YCoordLimit, I3DTexture::MakeCurrent(), IMinimapHandlerHost::MMHH_GetTexture(), and x_RenderMinimap().
Referenced by CPhyloTreePane::x_RenderMouseZoomHandler().
void CMinimapHandler::SetHost | ( | IMinimapHandlerHost * | pHost | ) |
Definition at line 94 of file minimap_handler.cpp.
References m_Host.
|
virtual |
Reimplemented from IGlEventHandler.
Definition at line 82 of file minimap_handler.cpp.
References m_Pane.
|
inlineprotected |
Definition at line 138 of file minimap_handler.hpp.
References m_Host.
|
inlineprotected |
Definition at line 137 of file minimap_handler.hpp.
References m_Host.
|
protected |
Definition at line 505 of file minimap_handler.cpp.
References CGlRect< T >::Bottom(), eCursor, eJumpTo, eNormal, CGlRect< T >::Left(), m_MiniCursor, m_Minimap, CGlRect< T >::Right(), and CGlRect< T >::Top().
Referenced by x_OnSelectCursor().
|
protected |
Definition at line 499 of file minimap_handler.cpp.
|
protected |
Definition at line 304 of file minimap_handler.cpp.
References GetGenericHost(), IGenericHandlerHost::GHH_Redraw(), m_CurrPos, m_Host, m_MouseStart, m_Pane, IMinimapHandlerHost::MMHH_GetVPPosByY(), IMinimapHandlerHost::MMHH_Scroll(), CGlPane::UnProjectX(), and CGlPane::UnProjectY().
Definition at line 448 of file minimap_handler.cpp.
References GetGenericHost(), IGenericHandlerHost::GHH_Redraw(), m_Host, m_scalex, m_scaley, and IMinimapHandlerHost::MMHH_Scroll().
Referenced by OnLeftUp(), and OnMotion().
|
protected |
Definition at line 455 of file minimap_handler.cpp.
References _ASSERT, eMinimap, GetGenericHost(), IGenericHandlerHost::GHH_Redraw(), IGenericHandlerHost::GHH_ReleaseMouse(), m_CurrNorm, m_Host, m_StartNorm, m_State, and IMinimapHandlerHost::MMHH_EndOp().
Referenced by OnKeyUp(), and OnLeftUp().
|
protected |
Definition at line 468 of file minimap_handler.cpp.
References eIdle, eJumpTo, eMinimap, eReadyMinimap, m_CursorId, m_State, m_Substate, and x_GetSubstate().
Referenced by OnKeyDown(), OnKeyUp(), OnLeftDown(), OnLeftUp(), OnMotion(), and OnMouseWheel().
|
protected |
Definition at line 131 of file minimap_handler.cpp.
References IRender::Begin(), IRender::BlendFunc(), CGlUtils::CheckGlError(), CGlPane::Close(), IRender::ColorC(), IRender::Disable(), IRender::Enable(), IRender::End(), GetGl(), CGlPane::GetModelLimitsRect(), CGlPane::GetViewport(), CGlPane::GetVisibleRect(), CGlRect< T >::Height(), CGlRect< T >::Init(), int, kGaugeMaxDim, kMinInnerRectDim, CGlRect< T >::Left(), IRender::LineWidth(), m_Host, m_InnerRectH, m_InnerRectW, m_InnerRectX, m_InnerRectY, m_MarkerPos, m_MiniCursor, m_Minimap, m_pTexture, m_RectColor, m_ScaleColor, m_scalex, m_scaley, m_TickColor, m_XCoordLimit, m_YCoordLimit, I3DTexture::MakeCurrent(), max(), min(), IMinimapHandlerHost::MMHH_GetVPPosByY(), CGlPane::OpenPixels(), IRender::TexCoord2f(), CGlRect< T >::Top(), IRender::Vertex2d(), CGlRect< T >::Width(), and xr().
Referenced by Render().
|
protected |
Definition at line 493 of file minimap_handler.cpp.
References log.
Referenced by x_SwitchToReadyState().
signal handlers - functions doing the real job
Signal handlers.
Definition at line 415 of file minimap_handler.cpp.
References _ASSERT, IMinimapHandlerHost::eCurrent, IMinimapHandlerHost::eMax, IMinimapHandlerHost::eMin, eReadyMinimap, GetGenericHost(), IGenericHandlerHost::GHH_Redraw(), m_CurrNorm, m_CurrPos, m_Host, m_LastMouse, m_MarkerPos, m_MaxNorm, m_MinNorm, m_StartNorm, m_State, IMinimapHandlerHost::MMHH_GetScale(), and x_ScaleToNorm().
Referenced by OnKeyDown(), OnLeftDown(), and OnMouseWheel().
Definition at line 436 of file minimap_handler.cpp.
References _ASSERT, GetGenericHost(), IGenericHandlerHost::GHH_CaptureMouse(), m_Host, m_MouseStart, m_Pane, m_ptStart, m_State, IMinimapHandlerHost::MMHH_GetVPPosByY(), and CGlPane::UnProject().
Referenced by OnLeftDown(), and OnMouseWheel().
|
protected |
Definition at line 161 of file minimap_handler.hpp.
Referenced by OnMouseWheel(), x_OnEndMinimap(), and x_SwitchToReadyState().
|
protected |
Definition at line 166 of file minimap_handler.hpp.
Referenced by x_OnChangePan(), and x_SwitchToReadyState().
|
protected |
Definition at line 151 of file minimap_handler.hpp.
Referenced by x_OnSelectCursor().
|
protected |
Definition at line 147 of file minimap_handler.hpp.
Referenced by GetGenericHost(), Render(), SetHost(), x_GetHost(), x_OnChangePan(), x_OnChangeZoomRectPan(), x_OnEndMinimap(), x_RenderMinimap(), x_SwitchToReadyState(), and x_SwithToActiveState().
|
protected |
Definition at line 174 of file minimap_handler.hpp.
Referenced by x_RenderMinimap().
|
protected |
Definition at line 174 of file minimap_handler.hpp.
Referenced by x_RenderMinimap().
|
protected |
Definition at line 173 of file minimap_handler.hpp.
Referenced by x_RenderMinimap().
|
protected |
Definition at line 173 of file minimap_handler.hpp.
Referenced by x_RenderMinimap().
|
protected |
Definition at line 167 of file minimap_handler.hpp.
Referenced by OnMotion(), and x_SwitchToReadyState().
|
protected |
Definition at line 163 of file minimap_handler.hpp.
Referenced by x_RenderMinimap(), and x_SwitchToReadyState().
|
protected |
Definition at line 158 of file minimap_handler.hpp.
Referenced by x_SwitchToReadyState().
|
protected |
Definition at line 154 of file minimap_handler.hpp.
Referenced by OnLeftUp(), OnMotion(), x_GetSubstate(), and x_RenderMinimap().
|
protected |
Definition at line 153 of file minimap_handler.hpp.
Referenced by x_GetSubstate(), and x_RenderMinimap().
|
protected |
Definition at line 159 of file minimap_handler.hpp.
Referenced by x_SwitchToReadyState().
|
protected |
Definition at line 165 of file minimap_handler.hpp.
Referenced by x_OnChangePan(), and x_SwithToActiveState().
|
protected |
Definition at line 148 of file minimap_handler.hpp.
Referenced by SetPane(), x_OnChangePan(), and x_SwithToActiveState().
|
protected |
Definition at line 157 of file minimap_handler.hpp.
Referenced by OnMouseWheel().
|
protected |
Definition at line 144 of file minimap_handler.hpp.
Referenced by OnKeyUp(), Render(), and x_RenderMinimap().
|
protected |
Definition at line 168 of file minimap_handler.hpp.
Referenced by x_SwithToActiveState().
|
protected |
Definition at line 181 of file minimap_handler.hpp.
Referenced by x_RenderMinimap().
|
protected |
Definition at line 179 of file minimap_handler.hpp.
Referenced by x_RenderMinimap().
|
protected |
Definition at line 176 of file minimap_handler.hpp.
Referenced by x_OnChangeZoomRectPan(), and x_RenderMinimap().
|
protected |
Definition at line 176 of file minimap_handler.hpp.
Referenced by x_OnChangeZoomRectPan(), and x_RenderMinimap().
|
protected |
Definition at line 160 of file minimap_handler.hpp.
Referenced by OnMouseWheel(), x_OnEndMinimap(), and x_SwitchToReadyState().
|
protected |
Definition at line 149 of file minimap_handler.hpp.
Referenced by OnKeyDown(), OnKeyUp(), OnLeftUp(), OnMotion(), OnMouseWheel(), Render(), x_OnEndMinimap(), x_OnSelectCursor(), x_SwitchToReadyState(), and x_SwithToActiveState().
|
protected |
Definition at line 150 of file minimap_handler.hpp.
Referenced by OnLeftUp(), and x_OnSelectCursor().
|
protected |
Definition at line 180 of file minimap_handler.hpp.
Referenced by x_RenderMinimap().
|
protected |
Definition at line 171 of file minimap_handler.hpp.
Referenced by OnMouseWheel().
|
protected |
Definition at line 145 of file minimap_handler.hpp.
Referenced by Render(), and x_RenderMinimap().
|
protected |
Definition at line 146 of file minimap_handler.hpp.
Referenced by Render(), and x_RenderMinimap().