1 #ifndef __GUI_WIDGETS_GL___MOUSE_ZOOM_HANDLER__HPP
2 #define __GUI_WIDGETS_GL___MOUSE_ZOOM_HANDLER__HPP
95 virtual void SetMode(EMode
mode);
98 virtual void Render(
CGlPane& Pane);
102 virtual bool IsScaleMode()
const {
return (m_State==eScale || m_State==eReadyScale); }
106 virtual void SetPane(
CGlPane* pane);
107 virtual wxEvtHandler* GetEvtHandler();
112 void OnLeftDown(wxMouseEvent& event);
113 void OnLeftUp(wxMouseEvent& event);
114 void OnMotion(wxMouseEvent& event);
115 void OnMouseWheel(wxMouseEvent& event);
116 void OnOtherMouseEvents(wxMouseEvent& event);
117 void OnMiddleDown(wxMouseEvent& event);
118 void OnMiddleUp(wxMouseEvent& event);
119 void OnMouseCaptureLost(wxMouseCaptureLostEvent& evt);
120 void OnKeyDown(wxKeyEvent& event);
121 void OnKeyUp(wxKeyEvent& event);
122 void OnKillFocus(wxFocusEvent& event);
143 EKeyState x_GetKeyState();
144 EKeyState x_GetKeyState(wxKeyEvent& event);
149 void x_SwitchToReadyState(
EState new_state,
const wxPoint& ms_pos);
150 void x_SwitchToActiveState(
EState state,
const wxPoint& ms_pos);
152 void x_OnChangeScale(
int d_y);
153 void x_OnEndScale(
EState new_state);
155 void x_OnChangeZoomRectPan(
const wxPoint& pos);
156 void x_OnEndZoomRect(
EState new_state);
157 void x_OnEndPan(
EState new_state);
158 void x_OnChangePan(
const wxPoint& ms_pos);
162 void x_OnSelectCursor(
void);
168 void x_RenderScale(
CGlPane& pane);
169 void x_RenderZoomRect(
CGlPane& pane);
170 void x_RenderPan(
CGlPane& pane);
172 void x_DrawTicks(
int center_x,
int y,
int tick_w);
173 void x_DrawMarker(
bool fill,
int x_c,
int y_c,
int half);
178 void x_CaptureMouse();
179 void x_ReleaseMouse();
CMouseZoomHandler provides support for mouse-driven zoom and pan operations.
IMouseZoomHandlerHost * m_Host
virtual void SetPanMode(EPanMode mode)
virtual void SetPanOnMouseDown(bool b)
virtual bool IsScaleMode() const
virtual EPanMode GetPanMode() const
const IMouseZoomHandlerHost * x_GetHost(void) const
IMouseZoomHandlerHost * x_GetHost(void)
class CRgbaColor provides a simple abstraction for managing colors.
Interface IMouseZoomHandlerHost represents a context in which CMouseZoomHandler functions.
virtual void MZHH_ZoomRect(const TModelRect &rc)=0
virtual void MZHH_ZoomPoint(const TModelPoint &point, TModelUnit factor)=0
virtual void MZHH_SetScale(TModelUnit scale, const TModelPoint &point)=0
virtual ~IMouseZoomHandlerHost()
virtual TVPUnit MZHH_GetVPPosByY(int y) const =0
converts window coord to Viewport coord
virtual void MZHH_EndOp()=0
virtual TModelUnit MZHH_GetScale(EScaleType type)=0
virtual void MZHH_Scroll(TModelUnit d_x, TModelUnit d_y)=0
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_GUIWIDGETS_GL_EXPORT
The NCBI C++/STL use hints.