A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/mouse__zoom__handler_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/gl/mouse_zoom_handler.cpp Source File

67

m_CursorId(wxCURSOR_ARROW),

69

m_PanOnMouseDown(

false

),

80

m_HasCapture(

false

),

82

m_ScaleColor(0.0

f

, 0.5

f

, 0.0

f

, 0.3

f

),

83

m_TickColor(1.0

f

, 1.0

f

, 1.0

f

),

84

m_RectColor(0.0

f

, 0.5

f

, 0.0

f

, 0.1

f

)

136  CGlAttrGuard

AttrGuard(GL_LINE_BIT | GL_ENABLE_BIT | GL_POLYGON_BIT | GL_HINT_BIT);

183

gl.

Begin

(GL_LINE_STRIP);

201

gl.

Begin

(GL_LINES);

218  for

(

int i

= start_i;

i

<= end_i;

i

++ ) {

242

x2 = rc_vp.

Right

();

266

gl.

BlendFunc

(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

271

gl.

Rectd

(x1, y1, x2, y2);

278

gl.

Enable

(GL_LINE_STIPPLE);

280

gl.

Begin

(GL_LINES);

314

gl.

Enable

(GL_POLYGON_SMOOTH);

315

glHint(GL_POLYGON_SMOOTH_HINT, GL_FASTEST);

322  double

d_x = x2 - x1;

323  double

d_y = y2 - y1;

324  double

angle = 90.0 * atan2(d_y, d_x) / atan2(1.0, 0.0);

325  double

hyp = sqrt(d_x * d_x + d_y * d_y);

329

gl.

Rotated

(angle, 0.0, 0.0, 1.0);

331

gl.

Begin

(GL_QUADS);

350

gl.

Rotated

(-angle, 0.0, 0.0, 1.0);

364

gl.

Begin

(GL_TRIANGLE_STRIP);

365

gl.

Vertex2d

(x_c - half, y_c + half);

366

gl.

Vertex2d

(x_c - half, y_c - half);

373

gl.

Begin

(GL_LINE_STRIP);

376

gl.

Vertex2d

(x_c - half, y_c - half);

377

gl.

Vertex2d

(x_c - half, y_c + half);

409  if

(wxGetKeyState(wxKeyCode(

'Z'

))) {

411

}

else if

(wxGetKeyState(wxKeyCode(

'R'

))) {

413

}

else if

(wxGetKeyState(wxKeyCode(

'P'

))) {

426  for

( k=

'A'

; k<=

'Z'

; ++k) {

427  if

(wxGetKeyState((wxKeyCode)k))

430  for

( k=

'0'

; k<=

'9'

; ++k) {

431  if

(wxGetKeyState((wxKeyCode)k))

435  if

(wxGetKeyState(WXK_SHIFT) ||

436

wxGetKeyState(WXK_ALT) ||

437

wxGetKeyState(WXK_CONTROL) ||

438

wxGetKeyState(WXK_COMMAND))

456  switch

(event.GetKeyCode()) {

496  if

(ready_st !=

eIdle

) {

518

wxPoint ms_pos =

event

.GetPosition();

544  if

(!wxGetKeyState(wxKeyCode(

'P'

))) {

563

wxPoint pos =

event

.GetPosition();

565  if

(event.Dragging()) {

609

wxPoint pos =

event

.GetPosition();

693  if

( ready_st !=

eIdle

){

869  if

(x2 != x1 || y2 != y1) {

871  int

left =

min

(x1, x2);

872  int

right =

max

(x1, x2);

873  int

bottom =

min

(y1, y2);

874  int

top =

max

(y1, y2);

959  double

sc = exp(norm);

CGlAttrGuard - guard class for restoring OpenGL attributes.

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

void x_OnChangeZoomRectPan(const wxPoint &pos)

void x_OnChangeScale(int d_y)

d_y is the absolute shift in pixels from the position where m_StartNorm have been initialized

void OnOtherMouseEvents(wxMouseEvent &event)

virtual void SetHost(IMouseZoomHandlerHost *pHost)

int x_NormToPixels(TModelUnit norm) const

void x_RenderZoomRect(CGlPane &pane)

EKeyState x_GetKeyState()

void OnMotion(wxMouseEvent &event)

void x_OnChangePan(const wxPoint &ms_pos)

void x_SwitchToReadyState(EState new_state, const wxPoint &ms_pos)

signal handlers - functions doing the real job

void x_DrawMarker(bool fill, int x_c, int y_c, int half)

void x_OnEndZoomRect(EState new_state)

TModelUnit x_ScaleToNorm(TModelUnit scale) const

helper functions

IMouseZoomHandlerHost * m_Host

void OnKeyUp(wxKeyEvent &event)

virtual wxEvtHandler * GetEvtHandler()

void x_OnSelectCursor(void)

void OnKeyDown(wxKeyEvent &event)

void OnMiddleUp(wxMouseEvent &event)

void OnLeftUp(wxMouseEvent &event)

virtual void SetMode(EMode mode)

void OnKillFocus(wxFocusEvent &event)

void OnMouseWheel(wxMouseEvent &event)

void x_RenderPan(CGlPane &pane)

void x_OnEndPan(EState new_state)

virtual IGenericHandlerHost * GetGenericHost()

void x_SwitchToActiveState(EState state, const wxPoint &ms_pos)

TModelUnit x_NormToScale(TModelUnit norm) const

void x_OnEndScale(EState new_state)

void x_RenderScale(CGlPane &pane)

void OnMiddleDown(wxMouseEvent &event)

virtual void SetPane(CGlPane *pane)

void OnMouseCaptureLost(wxMouseCaptureLostEvent &evt)

void x_DrawTicks(int center_x, int y, int tick_w)

void OnLeftDown(wxMouseEvent &event)

virtual void Render(CGlPane &Pane)

virtual ~CMouseZoomHandler()

virtual void GHH_ReleaseMouse()=0

releases captured mouse

virtual void GHH_Redraw()=0

redraws the Host and the handler

virtual void GHH_CaptureMouse()=0

captures mouse events in the hosting window for D&D

virtual void GHH_SetCursor(const wxCursor &cursor)=0

changes the cursor in the hosting window

Interface IMouseZoomHandlerHost represents a context in which CMouseZoomHandler functions.

virtual void MZHH_ZoomRect(const TModelRect &rc)=0

virtual void MZHH_SetScale(TModelUnit scale, const TModelPoint &point)=0

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

Include a standard set of the NCBI C++ Toolkit most basic headers.

void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)

virtual void Translated(GLdouble x, GLdouble y, GLdouble z)=0

CGlRect & IntersectWith(const CGlRect &r)

virtual void Enable(GLenum glstate)=0

virtual void LineStipple(GLint factor, GLushort pattern)=0

Set line stipple pattern: glLineStipple(). Deprecated in gl 3.2+.

virtual void Begin(GLenum mode)=0

Start rendering.

virtual void BlendFunc(GLenum sfactor, GLenum dfactor)=0

Options to be used when GL_BLEND is enabled.

TModelPoint UnProject(TVPUnit m_x, TVPUnit m_y) const

IRender & GetGl()

convenience function for getting current render manager

void Vertex2d(GLdouble x, GLdouble y)

TVPRect & GetViewport(void)

TModelUnit UnProjectX(TVPUnit m_x) const

TModelRect & GetModelLimitsRect(void)

virtual void Rotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)=0

virtual void End()=0

Finish rendering (create buffer and send to renderer)

virtual void PolygonMode(GLenum face, GLenum mode)=0

Set the polygon rasterization mode.

TModelUnit UnProjectY(TVPUnit m_y) const

virtual void Disable(GLenum glstate)=0

glDisable()

virtual void LineWidth(GLfloat w)=0

Set line width for drawing: glLineWidth()

virtual void ColorC(const CRgbaColor &c)=0

Set current color (glColor{3,4}{f,d}{v,})

void Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

unsigned int

A callback function used to compare two keys in a database.

static const int kArrowHeadW

static const int kArrowHeadL

static const int kArrowBodyW


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4