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/linear__sel__handler_8cpp_source.html below:

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

40 #include <wx/window.h> 59

: m_Orientation(orient),

62

m_bResizeCursor(

false

),

64

m_ShowCoordinates(

true

),

66

m_SelColor(0.5

f

, 0.5

f

, 0.5

f

, 0.25

f

),

67

m_BorderColor(0.25

f

, 0.25

f

, 0.25

f

, 0.5

f

),

68

m_PassiveSelColor(0.6

f

, 0.6

f

, 0.6

f

, 0.25

f

),

69

m_SymbolColor(1.0

f

, 0.0

f

, 0.0

f

, 1.0

f

),

168

wxPoint ms_pos =

event

.GetPosition();

175  for

( k=

'A'

; k<=

'Z'

; ++k) {

176  if

(wxGetKeyState((wxKeyCode)k))

180  if

(wxGetKeyState(WXK_ALT)) {

216

wxPoint ms_pos =

event

.GetPosition();

226  bool

handled =

false

;

227

wxPoint ms_pos =

event

.GetPosition();

229  if

(event.Dragging()) {

248  bool

b_hit_start =

false

;

363  bool

b_hit_start =

false

;

388

wxStockCursor cur_id = wxCURSOR_ARROW;

392

wxCursor cursor(cur_id);

431  bool

b_min_start =

false

;

439  int D

=

abs

(z - from_Z);

441  if

(min_D < 0 || min_D >

D

) {

449

b_min_start =

false

;

455

b_hit_start = b_min_start;

457

range = *p_min_range;

474

pos =

max

(pos, min_pos);

475

pos =

min

(pos, max_pos);

500  if

(

type

== GL_LINE) {

501

gl.

Begin

(GL_LINE_STRIP);

511

gl.

Rectd

(rc.

Left

() - offset_x, rc.

Top

() - offset_y,

512

rc.

Right

() - offset_x, rc.

Bottom

() - offset_y);

525

gl.

Enable

(GL_LINE_SMOOTH);

541

gl.

Begin

(GL_QUADS);

543

gl.

Vertex2d

(x - half_w_x, y + lw_y);

544

gl.

Vertex2d

(x + lw_x + half_w_x, y + lw_y);

545

gl.

Vertex2d

(x + lw_x + half_w_x, y);

550

gl.

Vertex2d

(x + lw_x, y - half_w_y);

553

gl.

Vertex2d

(x, y + lw_y + half_w_y);

554

gl.

Vertex2d

(x + lw_x, y + lw_y + half_w_y);

560

gl.

Begin

(GL_QUADS);

563

gl.

Vertex2d

(x - half_w_x, y + lw_y);

564

gl.

Vertex2d

(x + lw_x + half_w_x, y + lw_y);

565

gl.

Vertex2d

(x + lw_x + half_w_x, y);

568

gl.

Vertex2d

(x + lw_x, y - half_w_y);

569

gl.

Vertex2d

(x + lw_x, y + lw_y + half_w_y);

570

gl.

Vertex2d

(x, y + lw_y + half_w_y);

585  CGlAttrGuard

AttrGuard(GL_ENABLE_BIT | GL_POLYGON_BIT | GL_HINT_BIT);

606

rc.

SetHorz

(

r

.GetFrom(),

r

.GetToOpen());

609

rc.

SetVert

(

r

.GetFrom(),

r

.GetToOpen());

612  RenderRect

(rc, offset_x, offset_y, fill_color, GL_FILL);

631  RenderRect

(rc_curr, offset_x, offset_y, fill_color, GL_FILL);

634  RenderRect

(rc_curr, offset_x, offset_y, border_c, GL_LINE);

659

(rc_curr.

Bottom

() + rc_curr.

Top

()) / 2 - offset_y);

661

pos_world = pane.

UnProject

(pos_screen.

X

(), pos_screen.

Y

());

665

symbol_w, 4.0, scale_x, scale_y,

m_OpType

, b_horz);

668

symbol_w, 2.0, scale_x, scale_y,

m_OpType

, b_horz);

681  TModelUnit

x_s = 0.0, y_s = 0.0, x_e = 0.0, y_e = 0.0;

685  TModelUnit

scale = b_horz ? scale_x : scale_y;

696  if

(space >

fabs

(text_w_s)) {

702  if

(space >

fabs

(text_w_e)) {

709  TModelUnit

h_s = 0.0, w_s = 0.0, h_e = 0.0, w_e = 0.0;

711

x_s = text_pos_s - offset_x;

712

y_s = (rc_curr.

Bottom

() + rc_curr.

Top

() - text_h) * 0.5 - offset_y;

713

x_e = text_pos_e - offset_x;

716

y_off = 2.0 * scale_y;

721

x_s = (rc_curr.

Left

() + rc_curr.

Right

() + text_h) * 0.5 - offset_x;

722

y_s = text_pos_s - offset_y;

724

y_e = text_pos_e - offset_y;

725

x_off = -2.0 * scale_x;

736

gl.

Rectd

(x_s - x_off , y_s - y_off, x_s + w_s + x_off, y_s + h_s + y_off);

737

gl.

Rectd

(x_e - x_off , y_e - y_off, x_e + w_e + x_off, y_e + h_e + y_off);

743  float

rotation = 0.0f;

748

gl.

WriteText

(x_s, y_s, pos_str_s.c_str(), rotation);

749

gl.

WriteText

(x_e, y_e, pos_str_e.c_str(), rotation);

static EGUIState wxGetSelectState(const wxMouseEvent &event)

CGlAttrGuard - guard class for restoring OpenGL attributes.

Class CLinearSelHandler represents in GUI a one-dimnesional multi-segment selection.

void x_AddToSelection(const TSeqRange &Range)

void OnLeftUp(wxMouseEvent &event)

TModelUnit x_MouseToSeqPos(const wxPoint &ms_pos)

void Render(CGlPane &Pane, ERenderingOption option=eActiveState)

void SetSelection(const TRangeColl &C, bool bRedraw)

void ResetSelection(bool bRedraw)

const TRangeColl & GetSelection() const

EOrientation m_Orientation

void SetColor(EColorType type, const CRgbaColor &color)

TSeqRange GetSelectionLimits() const

void x_RemoveFromSelection(const TSeqRange &Range)

TSeqRange m_CurrRange

range being modified

void x_OnStartSel(const wxPoint &ms_pos, CGUIEvent::EGUIState state)

Signal handlers.

void OnLeftDoubleClick(wxMouseEvent &event)

void OnMotion(wxMouseEvent &event)

void SetShowRangeCoords(bool flag)

void x_OnChangeSelRange(const wxPoint &ms_pos)

IGenericHandlerHost * GetGenericHost()

void OnMouseCaptureLost(wxMouseCaptureLostEvent &evt)

EOpType m_OpType

operation type

void OnLeftDown(wxMouseEvent &event)

EExtState m_ExtState

current range extension state

TModelUnit x_ClipPosByRange(TModelUnit Pos)

void SetHost(ISelHandlerHost *host)

bool m_ShowCoordinates

Flag indicating to show range coordinates during selection.

EOpType x_GetOpTypeByState(CGUIEvent::EGUIState state) const

helper functions

virtual void SetPane(CGlPane *pane)

void SetOrientation(EOrientation orient)

virtual wxEvtHandler * GetEvtHandler()

CRgbaColor m_PassiveSelColor

void x_HitTest(const wxPoint &ms_pos, TSeqRange &Range, bool &bHitStart)

virtual ~CLinearSelHandler()

void x_OnSelectCursor(const wxPoint &ms_pos)

TThisType & CombineWith(const TRange &r)

TThisType & Subtract(const TRange &r)

class CRgbaColor provides a simple abstraction for managing colors.

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

virtual TModelUnit SHH_GetModelByWindow(int z, EOrientation orient)=0

virtual void SHH_OnChanged()=0

virtual TVPUnit SHH_GetWindowByModel(TModelUnit z, EOrientation orient)=0

unsigned int TSeqPos

Type for sequence locations and lengths.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

virtual void Enable(GLenum glstate)=0

virtual void Begin(GLenum mode)=0

Start rendering.

TModelPoint UnProject(TVPUnit m_x, TVPUnit m_y) const

IRender & GetGl()

convenience function for getting current render manager

void Vertex2d(GLdouble x, GLdouble y)

virtual void BeginText(const CGlTextureFont *font, const CRgbaColor &color)=0

Text is drawn is pixel coordinates.

TModelUnit GetOffsetY() const

virtual void EndText()=0

Pops matrices and attributes after writing text.

TModelRect & GetModelLimitsRect(void)

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.

void SetVert(T bottom, T top)

virtual void WriteText(TModelUnit x, TModelUnit y, const char *text, TModelUnit rotate_degrees=0.0)=0

Write text at specified model coords.

virtual TModelUnit TextWidth(const char *text) const

Compute and return font metrics.

virtual TModelUnit TextHeight(void) const

TModelRect & GetVisibleRect(void)

virtual void LineWidth(GLfloat w)=0

Set line width for drawing: glLineWidth()

TModelUnit GetScaleX(void) const

TModelUnit GetScaleY(void) const

TModelUnit GetOffsetX() const

void SetHorz(T left, T right)

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)

TVPPoint Project(TModelUnit m_x, TModelUnit m_y) const

position_type GetLength(void) const

bool NotEmpty(void) const

TThisType & SetToOpen(position_type toOpen)

position_type GetToOpen(void) const

TThisType & SetLength(position_type length)

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)

Convert numeric value to string.

@ fWithCommas

Use commas as thousands separator.

void SetFrom(TFrom value)

Assign a value to From data member.

TFrom GetFrom(void) const

Get the From member data.

static void s_RenderSymbol(TModelUnit x, TModelUnit y, TModelUnit w, TModelUnit line_w, TModelUnit scale_x, TModelUnit scale_y, CLinearSelHandler::EOpType type, bool b_horz)

void RenderRect(const TModelRect &rc, TModelUnit offset_x, TModelUnit offset_y, CRgbaColor &color, GLenum type)

static const int kSymbolBorder

static int kDragThreshold

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)


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