1 #ifndef GUI_WIDGETS_SEQ_GRAPHIC___SEQGRAPHIC_PANE__HPP
2 #define GUI_WIDGETS_SEQ_GRAPHIC___SEQGRAPHIC_PANE__HPP
223 void OnKeyUp(wxKeyEvent& event);
282 virtual void Update(
void)
override;
415 void OnSearchTip(
const string& tip_id,
const wxRect& tip_rect);
416 void OnZoomTip(
const string& tip_id,
const wxRect& );
545 #ifdef ATTRIB_MENU_SUPPORT
CCachedTipHandle(const string &t_name, objects::CScope &scope)
const string & GetParentTrackName() const
bool HasMatches(const CObject &object, objects::CScope &scope) const
CEvent - generic event implementation TODO TODO - Attachments.
CLayoutTrackHandler - is the handler for handling the user interactions on layout tracks.
Class CLinearSelHandler represents in GUI a one-dimnesional multi-segment selection.
Help class to manage markers.
void SetColor(const CRgbaColor &color)
void SetMarkerType(CSeqMarkHandler::EMarkerType t)
void SetExtendedPos(TModelUnit pos)
void Render(CGlPane &pane, CSeqMarkHandler::ERenderingOption option)
TSeqPos GetExtendedPos() const
const CRgbaColor & GetColor() const
void SetRange(TSeqRange range)
CSeqMarkHandler m_Handler
const string & GetLabel() const
void SetPos(TModelUnit pos)
CSeqMarkHandler::EMarkerType GetMarkerType() const
void SetLabel(const string &label)
CMouseZoomHandler provides support for mouse-driven zoom and pan operations.
void Clear(objects::CScope *scope)
bool HasMatches(const CObject &object, objects::CScope &scope) const
void Add(ISelObjectHandle *obj_handle, CObject &obj)
class CRgbaColor provides a simple abstraction for managing colors.
class CSeqGlyph defines an interface that wraps a rectilinear abstract object.
list< CRef< CSeqGlyph > > TObjects
CConstRef< CSeqGlyph > x_GetOnlyOneSelectedGlyph()
virtual void SMHH_SetSeqMark(TSeqPos mark) override
The derived class may choose do something differently when marker position is changed.
void OnTipRemoved(const string &tip_id)
string GetMarkers() const
get/set markers stored as a string.
void OnTipAdded(const string &tip_id)
void x_RemoveMarker(const string &id)
virtual TModelUnit SMHH_GetModelByWindow(int z, EOrientation orient) override
CSeqMarkHandler & x_GetDefaultMarker()
CConstRef< CSeqGlyph > GetSelectedLayoutObj()
map< string, CRef< CMarker > > TSeqMarkers
void OnMiddleDown(wxMouseEvent &event)
void NextPrevSplice(EDirection dir)
CRef< CSeqGraphicConfig > m_ConfigSettings
void x_RenderTooltipConnector()
CSeqGraphicWidget * x_GetParent()
virtual void LTH_OnLayoutChanged() override
provides mouse coords in OpenGL viewport coord system
virtual void MZHH_SetScale(TModelUnit scale, const TModelPoint &point) override
void ExpandAllTracks(bool expand)
@ eMouse_Idle
no button down
@ eMouse_RectSelect
with SHIFT key down
@ eMouse_IncRectSelect
with SHIFT and CTRL key down
@ eMouse_IncSelect
with CTRL key down
@ eMouse_Pan
left click and drag
@ eMouse_Down
left button down, not sure what to do yet
string GetNewMarkerName()
const TRangeColl & GetRangeSelection(void) const
virtual void UpdateVectorLayout() override
CConstRef< CMarker > GetMarker(const string &id)
TModelUnit GetHeight()
class CSeqGraphicPane
virtual ~CSeqGraphicPane()
virtual TModelPoint THH_GetModelByWindow(const wxPoint &pt) override
void SetRangeSelection(const TRangeColl &ranges)
void x_NotifyWidgetRangeChanged()
CTooltipInfo m_TooltipInfo
bool CanGoBack(void) const
virtual void MZHH_ZoomRect(const TModelRect &rc) override
virtual void PostDialogShow() override
Post-processing after showing a dialog.
CSeqGraphicPane(CSeqGraphicWidget *parent)
void SelectOnlyThisObject(const CSeqGlyph *glyph, int mouse_x, int mouse_y)
virtual const TVPRect & GetViewportRect() const override
virtual TVPUnit MZHH_GetVPPosByY(int y) const override
converts window coord to Viewport coord
void OnMouseCaptureLost(wxMouseCaptureLostEvent &)
void RemoveMarker(const string &marker_id)
void x_NotifyWidgetSelChanged()
void InitDataSource(SConstScopedObject &obj)
void SetViewportWidth(TSeqPos from, TSeqPos to, TVPUnit vp_width)
const CSeqGraphicWidget * x_GetParent() const
void SelectSeqLoc(const objects::CSeq_loc *loc)
TSeqRange FindText(const string &text, bool match_case)
bool CanGoForward(void) const
bool AllJobsFinished() const
virtual void SMHH_OnReset(const string &id) override
The derived class may need to do something differently when a marker gets reset, such as remove the m...
void AddPointMarker(const string &name, TSeqPos pos, const CRgbaColor color)
void GetFeatureNames(vector< string > &names)
void x_ChangeSwitchPoint()
void AdjustViewPort()
Potential actions include loading data and generating layouts.
void GetObjectSelection(TConstObjects &objs) const
retrieve the selections from our renderer.
CRef< CSeqGraphicConfig > GetConfig()
virtual void LTH_ZoomOnRange(const TSeqRange &range) override
notifies the host we need to zoom on to a range.
string GetHitMarker() const
CWeakRef< CSeqGlyph > x_GetGlyphByTipId(const string &tip_id)
void SetSeqStart(TSeqPos pos)
void SetInputObject(SConstScopedObject &obj)
void SetSeqStartMarker(const string &id)
bool IsHorizontal() const
void SetSeqStartPoint(TModelPoint point)
virtual void LTH_PopupMenu(wxMenu *menu) override
show track-specific context menu.
void x_RenderRectSelHandler(CGlPane &pane)
Rectangular selection.
void SetVectorMode(bool b)
@)
virtual void PreDialogShow() override
Prepare for showing a dialog.
bool m_VectorPane
If true pane is only for creating vector graphics - ignore other draw events.
CWeakRef< CSeqGlyph > m_LastHitGlyph
last hit glyph.
virtual void x_Render() override
Draw the GL window.
CRef< CSGSequenceDS > m_DS
void OnMouseWheel(wxMouseEvent &event)
const TSeqMarkers & GetAllMarkers() const
int m_MarkerHandlerIndex
Marker handler index among all registered handlers.
void SetHorizontal(bool b_horz, bool b_flip)
virtual void ResetSearch() override
TRangeVec m_BackForwardHistory
void OnLeftDblClick(wxMouseEvent &event)
void UpdateConfig()
the config object just changed. Do what is necessary.
bool AllTracksCreated() const
virtual TModelUnit MZHH_GetScale(EScaleType type) override
CMouseZoomHandler m_MouseZoomHandler
void ResetObjectSelection()
virtual void Update(void) override
void GetCurrentObject(int mouse_x, int mouse_y, TConstObjects &objs)
void SelectObject(const CObject *obj, bool verified)
virtual void MZHH_ZoomPoint(const TModelPoint &point, TModelUnit factor) override
CRef< CSeqGraphicRenderer > m_Renderer
virtual void LTH_PushEventHandler(wxEvtHandler *handler) override
CStickyTooltipHandler m_TooltipManager
void AdjustViewPortHeightToImage()
bool m_Title
When rendering vector image, add a title.
virtual CTooltipInfo TTHH_GetTooltip(const wxRect &rect) override
Return the contents to be displayed in the tool tip.
void OnScrollEnd(wxScrollEvent &event)
TSeqPos GetSeqStart() const
void ShowAllTracks(bool shown)
virtual void AddTitle(bool b) override
void x_OnPurgeMarkers(CEvent *)
CFeaturePanel * GetFeaturePanel()
void SetExternalGlyphs(const CSeqGlyph::TObjects &objs)
CSGSequenceDS * GetDataSource(void)
virtual int x_GetAreaByVPPos(int vp_x, int vp_y) override
void ResetRangeSelection()
virtual void LTH_ConfigureTracksDlg(const string &category) override
void OnKeyUp(wxKeyEvent &event)
void SaveCurrentRange()
For Back or Forward operations.
void OnLeftUp(wxMouseEvent &event)
bool x_HasDefaultMarker() const
void ModifyMarker(const string &id, const string &label, TSeqPos pos, const CRgbaColor color)
virtual void MZHH_EndOp() override
size_t GetMarkerNum() const
virtual void MZHH_Scroll(TModelUnit d_x, TModelUnit d_y) override
virtual TModelUnit SHH_GetModelByWindow(int z, EOrientation orient) override
virtual TVPPoint GetPortSize(void) override
Get GL view port size.
map< string, CRef< CCachedTipHandle > > TPinnedTips
virtual TSeqPos SMHH_GetSeqMark() const override
If the host needs to dictate/store the marker position, then it needs to return a non (TSeqPos)-1 val...
virtual void SHH_OnChanged() override
ISelHandlerHost implementation.
size_t m_BackForwardPos
position in m_BackForwardHistory
CIRef< ISGDataSourceContext > m_DSContext
bool x_ModifyMarker(CRef< CMarker > &marker, const string &id, const string &label, const CRgbaColor color)
CLinearSelHandler::TRangeColl TRangeColl
virtual CRef< CLayoutTrack > THH_GetLayoutTrack() override
Get the layout track under the current mouse position.
virtual bool TTHH_ProcessURL(const wxString &href) override
Return true if the specified URL has been processed. Used for custom commands.
void DeSelectObject(const CObject *obj)
void SelectLastHitObject(int mouse_x, int mouse_y)
virtual string TTHH_NeedTooltip(const wxPoint &pt) override
Return id of the underlying element to dispaly a tooltip, otherwise "".
vector< TSeqRange > TRangeVec
@ }
CLayoutTrackHandler m_TrackHandler
void OnSearchTip(const string &tip_id, const wxRect &tip_rect)
void OnLeftDown(wxMouseEvent &event)
int GetPopupArea(wxPoint pos)
void OnZoomTip(const string &tip_id, const wxRect &)
void OnKeyDown(wxKeyEvent &event)
virtual void RenderVectorGraphics(int vp_width, int vp_height) override
Render for vector output.
void SetMarkers(const string &markers)
virtual void LTH_PopEventHandler() override
string x_GetCachedTipId(const CSeqGlyph *glyph) const
bool CanZoomSelection(void)
void SetSeqMarker(TModelPoint point)
CLinearSelHandler m_SelHandler
void OnKillFocus(wxFocusEvent &event)
void SetNonAsnInput(const INonAsnTrackData &data)
void OnInfoTip(const string &)
void RenameMarker(const string &id, const string &label)
void x_AddNewMarker(CRef< CMarker > marker, const string &label, const CRgbaColor &color)
void OnMotion(wxMouseEvent &event)
void AddRangeMarker(const string &name, TSeqRange range, const CRgbaColor color)
void SetActivatedTip(const string &id)
void OnContextMenu(wxContextMenuEvent &event)
virtual TVPUnit SHH_GetWindowByModel(TModelUnit z, EOrientation orient) override
void UpdateData(TSeqPos from, TSeqPos to)
void ShowAllTracks(bool shown)
void ExpandAllTracks(bool expand)
Class CSeqMarkHandler represents in GUI a single "hairpin" on a sequence bar.
const CRgbaColor & GetColor() const
void SetMarkerType(EMarkerType t)
void Render(CGlPane &Pane, ERenderingOption option)
const string & GetLabel() const
TSeqPos GetExtendedPos() const
EMarkerType GetMarkerType() const
void SetLabel(const string &label)
void SetRange(TSeqRange range)
void SetColor(const CRgbaColor &color)
void SetPos(TModelUnit pos)
void SetFlipped(bool flipped)
void SetExtendedPos(TModelUnit pos)
IGlyphDialogHost An interface used for handling issues related to any dialog pops up that requires so...
ILayoutTrackHost An interface used for handling GUI-related events, such as layout change event that ...
Interface IMouseZoomHandlerHost represents a context in which CMouseZoomHandler functions.
class ISeqMarkHandlerHost
ITrackHandlerHost ITrackHandlerHost represents a context for handling the user interactions on a layo...
Interface class for the pdf renderer.
void(*)(CSeq_entry_Handle seh, IWorkbench *wb, const CSerialObject &obj) handler
static const struct name_t names[]
unsigned int TSeqPos
Type for sequence locations and lengths.
vector< CConstRef< CObject > > TConstObjects
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static const char label[]
static void text(MDB_val *v)
range(_Ty, _Ty) -> range< _Ty >
double f(double x_, const double &y_)
Standard mechanism to include OpenGL headers for all platforms.