, m_MarkerType(ePoint)
68, m_Color(1.0
f, 0.0
f, 0.0
f, 0.3
f)
180wxPoint pos =
event.GetPosition();
208wxPoint pos =
event.GetPosition();
234 if(marker_pos != (
TSeqPos)(-1)) {
246pos + half_x + l_w, rc.
Top());
255 if(event.Dragging()) {
257wxPoint ms_pos =
event.GetPosition();
264glGetIntegerv(GL_VIEWPORT, vp);
265 if(ms_pos.x < vp[0])
267 else if(ms_pos.x > vp[0] + vp[2])
268ms_pos.x = vp[0] + vp[2];
293wxPoint pos =
event.GetPosition();
349gl.
Begin(GL_TRIANGLE_STRIP);
351 doubleincr = M_PI / 10;
356 double a= M_PI / 2 + incr;
357 for(
int i= 0;
i< 4; ++
i) {
358 floatsina = half*sin(
a), cosa = half*cos(
a);
359gl.
Vertex2d(x_c + cosa, y_c - sina);
360gl.
Vertex2d(x_c + cosa, y_c + sina);
375gl.
Rectd(x, y-half, x+w, y+half);
381gl.
Color4f(1.0f, 1.0f, 1.0f, 1.0f);
391 doubleheight{ 0.0 };
398 CGlAttrGuardAttrGuard(GL_ENABLE_BIT | GL_POLYGON_BIT | GL_HINT_BIT);
412 if(marker_pos != (
TSeqPos)(-1)) {
427gl.
BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
437cur_pos = pane.
ProjectX(pos + 1.0);
438cur_end_pos = pane.
ProjectX(end_pos);
442cur_end_pos = pane.
ProjectX(end_pos + 1.0);
446 doubletop = rcV.
Top() - off;
447 doublebottom = (height > 0.0) ? rcV.
Top() - off - height : rcV.
Bottom();
448 if(bottom < rcV.
Bottom()) {
449height -= rcV.
Bottom() - bottom;
458gl.
Rectd(cur_pos, top, cur_end_pos, bottom - 1);
463gl.
Begin(GL_LINES);
472text_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