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

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

60

, m_MarkerType(ePoint)

68

, m_Color(1.0

f

, 0.0

f

, 0.0

f

, 0.3

f

)

180

wxPoint pos =

event

.GetPosition();

208

wxPoint pos =

event

.GetPosition();

234  if

(marker_pos != (

TSeqPos

)(-1)) {

246

pos + half_x + l_w, rc.

Top

());

255  if

(event.Dragging()) {

257

wxPoint ms_pos =

event

.GetPosition();

264

glGetIntegerv(GL_VIEWPORT, vp);

265  if

(ms_pos.x < vp[0])

267  else if

(ms_pos.x > vp[0] + vp[2])

268

ms_pos.x = vp[0] + vp[2];

293

wxPoint pos =

event

.GetPosition();

349

gl.

Begin

(GL_TRIANGLE_STRIP);

351  double

incr = M_PI / 10;

356  double a

= M_PI / 2 + incr;

357  for

(

int i

= 0;

i

< 4; ++

i

) {

358  float

sina = half*sin(

a

), cosa = half*cos(

a

);

359

gl.

Vertex2d

(x_c + cosa, y_c - sina);

360

gl.

Vertex2d

(x_c + cosa, y_c + sina);

375

gl.

Rectd

(x, y-half, x+w, y+half);

381

gl.

Color4f

(1.0f, 1.0f, 1.0f, 1.0f);

391  double

height{ 0.0 };

398  CGlAttrGuard

AttrGuard(GL_ENABLE_BIT | GL_POLYGON_BIT | GL_HINT_BIT);

412  if

(marker_pos != (

TSeqPos

)(-1)) {

427

gl.

BlendFunc

(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

437

cur_pos = pane.

ProjectX

(pos + 1.0);

438

cur_end_pos = pane.

ProjectX

(end_pos);

442

cur_end_pos = pane.

ProjectX

(end_pos + 1.0);

446  double

top = rcV.

Top

() - off;

447  double

bottom = (height > 0.0) ? rcV.

Top

() - off - height : rcV.

Bottom

();

448  if

(bottom < rcV.

Bottom

()) {

449

height -= rcV.

Bottom

() - bottom;

458

gl.

Rectd

(cur_pos, top, cur_end_pos, bottom - 1);

463

gl.

Begin

(GL_LINES);

472

text_pos -= width / 2.0;

static EGUIState wxGetSelectState(const wxMouseEvent &event)

CGlAttrGuard - guard class for restoring OpenGL attributes.

Class CSeqMarkHandler represents in GUI a single "hairpin" on a sequence bar.

void x_DrawMarker(TModelUnit x_c, TModelUnit y_c, int half) const

void OnMouseCaptureLost(wxMouseCaptureLostEvent &evt)

void OnLeftDown(wxMouseEvent &event)

TModelUnit m_PosOff

offset between mouse position and marker position

TModelRect x_GetMarkRect(CGlPane &pane) const

CGlTextureFont m_Font_Helv10

virtual void SetPane(CGlPane *pane)

void SetMarkerType(EMarkerType t)

void Render(CGlPane &Pane, ERenderingOption option)

string m_Label

label shown beside the marker (optional).

IGenericHandlerHost * GetGenericHost()

const string & GetId() const

bool m_MarkDrag

For draging the mark.

TModelUnit m_ExtendedPos

Second position, for range markers.

CGlTextureFont m_LabelFont

TSeqPos x_SeqDragPos() const

helper functions

void OnMotion(wxMouseEvent &event)

virtual ~CSeqMarkHandler()

void SetRange(TSeqRange range)

bool m_Flipped

True if strands are flipped.

virtual wxEvtHandler * GetEvtHandler()

TModelUnit GetPosLeft() const

Return positions based on whether sequence is flipped.

void x_DrawLabel(TModelUnit x, TModelUnit y, int half) const

ISeqMarkHandlerHost * m_Host

virtual string x_GetText(TSeqPos pos)

void SetPos(TModelUnit pos)

bool m_ShowCoord

show coordinate

TModelUnit GetPosRight() const

void SetHost(ISeqMarkHandlerHost *pHost)

TModelUnit m_DragPos

marker position

void SetFlipped(bool flipped)

void OnLeftUp(wxMouseEvent &event)

void SetExtendedPos(TModelUnit pos)

void OnLeftDoubleClick(wxMouseEvent &event)

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

class ISeqMarkHandlerHost

virtual void SMHH_OnReset(const string &marker_id)=0

The derived class may need to do something differently when a marker gets reset, such as remove the m...

virtual TSeqPos SMHH_GetSeqMark() const =0

If the host needs to dictate/store the marker position, then it needs to return a non (TSeqPos)-1 val...

virtual void SMHH_SetSeqMark(TSeqPos mark)=0

The derived class may choose do something differently when marker position is changed.

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

unsigned int TSeqPos

Type for sequence locations and lengths.

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

virtual void Enable(GLenum glstate)=0

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.

TModelUnit UnProjectWidth(TVPUnit vp_w) const

TVPUnit ProjectX(TModelUnit m_x) const

IRender & GetGl()

convenience function for getting current render manager

void Vertex2d(GLdouble x, GLdouble y)

TVPRect & GetViewport(void)

virtual TModelUnit TextHeight(const CGlTextureFont *font) const =0

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

Text is drawn is pixel coordinates.

virtual TModelUnit TextWidth(const CGlTextureFont *font, const char *text) const =0

virtual void EndText()=0

Pops matrices and attributes after writing text.

bool PtInRect(T x, T y) const

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 UnProjectHeight(TVPUnit vp_h) const

void Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a)

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

Write text at specified model coords.

TModelRect & GetVisibleRect(void)

CGlRect< TModelUnit > TModelRect

CGlPoint< TModelUnit > TModelPoint

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.

static string SizetToString(size_t value, TNumToStringFlags flags=0, int base=10)

Convert size_t to string.

@ fWithCommas

Use commas as thousands separator.

TTo GetTo(void) const

Get the To member data.

TFrom GetFrom(void) const

Get the From member data.

unsigned int

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

Int4 delta(size_t dimension_, const Int4 *score_)


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