Search Toolkit Book for CAlnMultiRenderer
class CAlnMultiRenderer - renders multiple alignment represented by IAlnMultiRendererContext (the Model). More...
#include <gui/widgets/aln_multiple/alnmulti_renderer.hpp>
Columns can be "fixed size" or "resizable".
Fixed size columns are rendered with specifed width. Remaining screen space is divided between "resizable" columns proportionally to m_Share.
int AddColumn () int AddColumn (int width, const string &label, int data) int InsertColumn (int pos, int width, const string &label, int data) void SetResizableColumn (int index) void SetColumns (const vector< SColumn > &columns, int resizable_index) void SetColumnWidth (int index, int width) void SetColumnPos (int index, int pos) void SetColumnUserData (int index, int data) void SetColumnVisible (int index, bool b_visible) bool IsColumnVisible (int index) const void SetColumnsByStyle (CWidgetDisplayStyle &style) void GetVisibleColumns (vector< string > &labels) void UpdateColumns () IAlnMultiRendererContext * x_GetContext () const IAlnMultiRendererContext * x_GetContext () const void x_Layout () void x_Render (TAreaVector *p_areas) void x_RenderHeader (TAreaVector *p_areas) void x_RenderRuler (TAreaVector *p_areas) void x_RenderItems (TAreaVector *p_areas) void x_RenderItemsRange (int iFisrt, int iLast, TAreaVector *p_areas) void x_RenderRow (IAlignRow *row, CGlPane &pane, int state, TVPUnit row_top, TAreaVector *areas) void x_RenderMasterRow (TAreaVector *p_areas) void x_PrepareMasterPane (CGlPane &pane) void x_RenderAlignAreaTopLine () void x_ResetRowListMap () void x_InvalidateRows (bool layout_only=false) void x_PurgeRowListMap () int x_GetLineByWindowY (int WinY) const int x_GetLineByVPY (int vp_y) const TVPRect x_GetLineRect (int Index) TColumnType x_GetColumnType (const SColumn &C) void x_LayoutColumns () string x_GetRowTooltip (const TVPPoint &pt, IAlignRow *p_row, int i_col, int vp_top_y) void x_AddStatisticsRow (ITooltipFormatter &formatter, const string &tag, int part, int total)class CAlnMultiRenderer - renders multiple alignment represented by IAlnMultiRendererContext (the Model).
IAlnMultiRenderer renders a grid where rows corresponds to IAlignRow objects and columns represent different types of information. Columns can be configured using "Column management" API.
Definition at line 113 of file alnmulti_renderer.hpp.
◆ TAreaVector ◆ TColumnType ◆ TColumnVector ◆ TRowToList ◆ EHitResult ◆ EHtmlAreaTypes ◆ CAlnMultiRenderer() [1/2]Constructor, with column add, icons setup and resize.
Definition at line 52 of file alnmulti_renderer.cpp.
References CGlTextureFont::eFontFace_Helvetica, CGlPane::EnableOffset(), eNone, CRuler::eTop, m_Header, m_Ruler, m_RulerPane, SetBackColor(), CAlnMultiHeader::SetContext(), CRuler::SetFont(), CRuler::SetHorizontal(), SetMasterBackColor(), and SetupColumns().
◆ CAlnMultiRenderer() [2/2] CAlnMultiRenderer::CAlnMultiRenderer ( )Empty object constructor – for two-phase construction call SetupColums() to finish the class construction process.
◆ ~CAlnMultiRenderer() ◆ AddColumn() [1/2] int CAlnMultiRenderer::AddColumn ( ) ◆ AddColumn() [2/2] ◆ AutoFitColumns()Definition at line 836 of file alnmulti_renderer.cpp.
References IGlFont::eMetric_FullTextWidth, ctll::empty(), GetColumn(), GetColumnsCount(), IAlignRow::GetColumnText(), IAlnMultiRendererContext::GetLinesCount(), CGlTextureFont::GetMetric(), IAlnMultiRendererContext::GetRowByLine(), i, m_ResizableColumnIndex, IAlnMultiHeaderContext::SColumn::m_Visible, SetColumnWidth(), text(), UpdateColumns(), x_GetColumnType(), and x_GetContext().
◆ GetAlignmentTooltip()Definition at line 317 of file alnmulti_renderer.cpp.
References IAlignRow::eAlignment, IAlnMultiRendererContext::GetAlignPort(), GetColumnIndexByType(), IAlnMultiRendererContext::GetLineByRowNum(), IAlnMultiRendererContext::GetLinePosY(), GetMasterArea(), CGlPane::GetVisibleRect(), GetVPListTop(), int, kMasterRowSpace, m_rcBounds, row, CGlRect< T >::Top(), x_GetContext(), and x_GetRowTooltip().
◆ GetBackColor() ◆ GetColumn() [1/2] ◆ GetColumn() [2/2]Implements IAlnMultiHeaderContext.
Definition at line 1020 of file alnmulti_renderer.cpp.
References _ASSERT.
Referenced by AutoFitColumns(), CAlnMultiPane::GetAlignVPWidth(), GetColumnRect(), GetColumnTypeByIndex(), GetColumnTypeByX(), CAlnMultiWidget::OnSettings(), SetupPaneForColumn(), CAlnMultiPane::SortByColumn(), CAlnMultiPane::UpdateHeaderSortState(), x_Layout(), CAlnMultiPane::x_OnRowMouseEvent(), x_RenderRow(), and CAlnMultiWidget::x_UpdateStyleColumns().
◆ GetColumnIndexByType() int CAlnMultiRenderer::GetColumnIndexByType ( TColumnType type ) const ◆ GetColumnIndexByX() int CAlnMultiRenderer::GetColumnIndexByX ( int x ) const virtual ◆ GetColumnRect() TVPRect CAlnMultiRenderer::GetColumnRect ( int i_col, bool include_header ) const ◆ GetColumnRectByType() ◆ GetColumnsCount() int CAlnMultiRenderer::GetColumnsCount ( void ) const virtual ◆ GetColumnTypeByIndex() ◆ GetColumnTypeByX() ◆ GetHeader() ◆ GetHeaderAreaHeight() int CAlnMultiRenderer::GetHeaderAreaHeight ( ) const inline ◆ GetListAreaHeight() int CAlnMultiRenderer::GetListAreaHeight ( ) const inline ◆ GetListTop() int CAlnMultiRenderer::GetListTop ( ) const ◆ GetMasterArea() TVPRect CAlnMultiRenderer::GetMasterArea ( ) const ◆ GetMasterAreaHeight() int CAlnMultiRenderer::GetMasterAreaHeight ( ) const inline ◆ GetMasterBackColor() ◆ GetRect() TVPRect CAlnMultiRenderer::GetRect ( ) const virtual ◆ GetResizableColumnIndex() int CAlnMultiRenderer::GetResizableColumnIndex ( ) const virtual ◆ GetRuler() CRuler & CAlnMultiRenderer::GetRuler ( ) ◆ GetRulerAreaHeight() int CAlnMultiRenderer::GetRulerAreaHeight ( ) const inline ◆ GetRulerPane() CGlPane& CAlnMultiRenderer::GetRulerPane ( ) inline ◆ GetTooltip() string CAlnMultiRenderer::GetTooltip ( void ) virtualDefinition at line 282 of file alnmulti_renderer.cpp.
References eHeader, eMasterRow, eRows, IAlnMultiRendererContext::GetAlignPort(), IAlnMultiRendererContext::GetLineByRowNum(), IAlnMultiRendererContext::GetLinePosY(), GetMasterArea(), CAlnMultiHeader::GetTooltip(), CGlPane::GetVisibleRect(), GetVPListTop(), int, CWeakIRef< Interface, Locker >::Lock(), m_Header, m_HitResult, m_TooltipColumn, m_TooltipRow, m_TooltipVPPos, row, CGlRect< T >::Top(), x_GetContext(), and x_GetRowTooltip().
Referenced by CGetTooltip_local::operator()(), and CAlnMultiPane::TTHH_GetTooltip().
◆ GetVisibleColumns() void CAlnMultiRenderer::GetVisibleColumns ( vector< string > & labels ) ◆ GetVPListTop() int CAlnMultiRenderer::GetVPListTop ( ) const ◆ HitTest() int CAlnMultiRenderer::HitTest ( int vp_x, int vp_y, int & col ) virtualDefinition at line 883 of file alnmulti_renderer.cpp.
References CGlRect< T >::Bottom(), eHeader, eMasterRow, eNone, eRows, eRuler, IAlnMultiRendererContext::fShownElement_Alignment, IAlnMultiRendererContext::fShownElement_All, IAlnMultiRendererContext::fShownElement_Header, IAlnMultiRendererContext::fShownElement_MasterRow, IAlnMultiRendererContext::fShownElement_Ruler, GetColumnIndexByX(), IAlnMultiRendererContext::GetShownElements(), CGlRect< T >::Height(), kMasterRowSpace, m_HeaderRect, m_ListAreaRect, m_MasterRect, m_rcBounds, m_RulerRect, CGlRect< T >::Top(), and x_GetContext().
Referenced by NeedTooltip().
◆ InsertColumn() ◆ IsColumnVisible() bool CAlnMultiRenderer::IsColumnVisible ( int index ) const ◆ NeedTooltip() bool CAlnMultiRenderer::NeedTooltip ( int vp_x, int vp_y ) virtualDefinition at line 245 of file alnmulti_renderer.cpp.
References eHeader, eMasterRow, eRows, IAlnMultiRendererContext::GetMasterRow(), IAlnMultiRendererContext::GetRowByLine(), HitTest(), CGlPoint< T >::Init(), CWeakIRef< Interface, Locker >::Lock(), m_Header, m_HitResult, m_TooltipColumn, m_TooltipRow, m_TooltipVPPos, CAlnMultiHeader::NeedTooltip(), NULL, row, x_GetContext(), and x_GetLineByVPY().
Referenced by CAlnMultiPane::TTHH_NeedTooltip().
◆ Render() [1/2] void CAlnMultiRenderer::Render ( ) virtual ◆ Render() [2/2] ◆ Resize() ◆ SetBackColor() ◆ SetCgiMode() void CAlnMultiRenderer::SetCgiMode ( bool b_set ) inline ◆ SetColumnPos() ◆ SetColumns() void CAlnMultiRenderer::SetColumns ( const vector< SColumn > & columns, int resizable_index ) ◆ SetColumnsByStyle() ◆ SetColumnUserData() void CAlnMultiRenderer::SetColumnUserData ( int index, int data ) ◆ SetColumnVisible() void CAlnMultiRenderer::SetColumnVisible ( int index, bool b_visible ) ◆ SetColumnWidth() void CAlnMultiRenderer::SetColumnWidth ( int index, int width ) ◆ SetContext() ◆ SetFocused() void CAlnMultiRenderer::SetFocused ( bool b_set ) inline ◆ SetMasterBackColor() ◆ SetResizableColumn() void CAlnMultiRenderer::SetResizableColumn ( int index ) ◆ SetupColumns()Adds default columns for the renderer, allows custom setup (column icon override, etc)
Definition at line 77 of file alnmulti_renderer.cpp.
References AddColumn(), IAlignRow::eAlignment, IAlignRow::eDescr, IAlignRow::eEnd, IAlignRow::eIcons, IAlignRow::eSeqEnd, IAlignRow::eSeqLength, IAlignRow::eSeqStart, IAlignRow::eStart, IAlignRow::eTaxLabel, Resize(), and SetResizableColumn().
Referenced by CAlnMultiRenderer().
◆ SetupPaneForColumn() void CAlnMultiRenderer::SetupPaneForColumn ( CGlPane & pane, int i_col ) const ◆ Update() void CAlnMultiRenderer::Update ( bool layout_only =false
) virtual ◆ UpdateColumns() void CAlnMultiRenderer::UpdateColumns ( ) ◆ UpdateOnDataChanged() void CAlnMultiRenderer::UpdateOnDataChanged ( ) virtual ◆ x_AddStatisticsRow() ◆ x_GetColumnType() ◆ x_GetContext() [1/2]
Definition at line 240 of file alnmulti_renderer.hpp.
References m_Context.
Referenced by AutoFitColumns(), GetAlignmentTooltip(), GetTooltip(), HitTest(), NeedTooltip(), x_GetLineByVPY(), x_GetLineByWindowY(), x_GetLineRect(), x_GetRowTooltip(), x_InvalidateRows(), x_Layout(), x_PrepareMasterPane(), x_Render(), x_RenderAlignAreaTopLine(), x_RenderItems(), x_RenderItemsRange(), x_RenderMasterRow(), and x_RenderRuler().
◆ x_GetContext() [2/2] ◆ x_GetLineByVPY() int CAlnMultiRenderer::x_GetLineByVPY ( int vp_y ) const protected ◆ x_GetLineByWindowY() int CAlnMultiRenderer::x_GetLineByWindowY ( int WinY ) const protected ◆ x_GetLineRect() TVPRect CAlnMultiRenderer::x_GetLineRect ( int Index ) protected ◆ x_GetRowTooltip()Definition at line 370 of file alnmulti_renderer.cpp.
References _ASSERT, CHtmlTooltipFormatter::CreateTooltipFormatter(), IAlignRow::eAlignment, CGlPane::EnableOffset(), eSeq_code_type_iupacaa, eSeq_code_type_iupacna, NStr::fWithCommas, IAlignRow::GetAlnSeqString(), GetColumnTypeByIndex(), IAlnMultiRendererContext::GetConsensusRow(), CSeqportUtil::GetIndex(), IAlnMultiRendererContext::GetLinesCount(), IAlnMultiRendererContext::GetMasterRow(), CSeqportUtil::GetName(), IAlnMultiRendererContext::GetRowByLine(), i, NStr::IntToString(), ITERATE, match(), NULL, row, SetupPaneForColumn(), string, CGlPane::UnProjectX(), CGlPoint< T >::X(), x_AddStatisticsRow(), x_GetContext(), and x_PrepareMasterPane().
Referenced by GetAlignmentTooltip(), and GetTooltip().
◆ x_InvalidateRows() void CAlnMultiRenderer::x_InvalidateRows ( bool layout_only =false
) protected
Definition at line 959 of file alnmulti_renderer.cpp.
References CGlRect< T >::Bottom(), IAlignRow::eInvalidate, IAlnMultiRendererContext::GetAlignPort(), IAlnMultiRendererContext::GetLineByModelY(), IAlnMultiRendererContext::GetLinesCount(), IAlnMultiRendererContext::GetMasterRow(), IAlnMultiRendererContext::GetRowByLine(), CGlPane::GetVisibleRect(), i, m_RowToList, max(), NON_CONST_ITERATE, row, CGlRect< T >::Top(), IAlignRow::Update(), and x_GetContext().
Referenced by Update().
◆ x_Layout() void CAlnMultiRenderer::x_Layout ( ) protectedDefinition at line 568 of file alnmulti_renderer.cpp.
References _ASSERT, CGlRect< T >::Bottom(), IAlignRow::eAlignment, IAlnMultiRendererContext::fShownElement_All, IAlnMultiRendererContext::fShownElement_Header, IAlnMultiRendererContext::fShownElement_MasterRow, IAlnMultiRendererContext::fShownElement_Ruler, GetColumn(), GetColumnIndexByType(), IAlnMultiRendererContext::GetMasterRow(), CRuler::GetPreferredSize(), IAlnMultiRendererContext::GetShownElements(), CGlRect< T >::Init(), kMasterRowSpace, kRulerSpace, CGlRect< T >::Left(), m_Header, m_HeaderRect, m_ListAreaRect, m_MasterRect, IAlnMultiHeaderContext::SColumn::m_Pos, m_rcBounds, m_Ruler, m_RulerRect, IAlnMultiHeaderContext::SColumn::m_Width, CAlnMultiHeader::PreferredSize(), row, CGlRect< T >::SetBottom(), CGlRect< T >::SetHorz(), CGlRect< T >::SetRight(), CGlRect< T >::SetTop(), CGlRect< T >::SetVert(), CRenderableImpl::SetVPRect(), CRuler::SetVPRect(), CGlRect< T >::Top(), IAlnMultiHeaderContext::SColumn::VisibleWidth(), x_GetContext(), and CGlPoint< T >::Y().
Referenced by Resize(), Update(), and UpdateOnDataChanged().
◆ x_LayoutColumns() void CAlnMultiRenderer::x_LayoutColumns ( ) protected ◆ x_PrepareMasterPane() void CAlnMultiRenderer::x_PrepareMasterPane ( CGlPane & pane ) protectedDefinition at line 349 of file alnmulti_renderer.cpp.
References CGlRect< T >::Bottom(), IAlnMultiRendererContext::GetAlignPort(), IAlignRow::GetHeightPixels(), IAlnMultiRendererContext::GetMasterRow(), CGlPane::GetModelLimitsRect(), CGlPane::GetViewport(), CGlPane::GetVisibleRect(), H, m_bCgiMode, m_MasterRect, CGlRect< T >::SetBottom(), CGlPane::SetExactOrthoProjection(), CGlPane::SetModelLimitsRect(), CGlRect< T >::SetVert(), CGlPane::SetViewport(), CGlPane::SetVisibleRect(), and x_GetContext().
Referenced by x_GetRowTooltip(), and x_RenderMasterRow().
◆ x_PurgeRowListMap() void CAlnMultiRenderer::x_PurgeRowListMap ( ) protected ◆ x_Render() void CAlnMultiRenderer::x_Render ( TAreaVector * p_areas ) protectedDefinition at line 161 of file alnmulti_renderer.cpp.
References ERR_POST, IAlnMultiRendererContext::fShownElement_All, IAlnMultiRendererContext::fShownElement_Header, IAlnMultiRendererContext::fShownElement_Main, IAlnMultiRendererContext::fShownElement_MasterRow, IAlnMultiRendererContext::fShownElement_Ruler, CRgbaColor::GetAlpha(), CRgbaColor::GetBlue(), CRgbaColor::GetGreen(), CException::GetMsg(), CRgbaColor::GetRed(), IAlnMultiRendererContext::GetShownElements(), m_BackColor, CException::what(), x_GetContext(), x_PurgeRowListMap(), x_RenderAlignAreaTopLine(), x_RenderHeader(), x_RenderItems(), x_RenderMasterRow(), x_RenderRuler(), and x_ResetRowListMap().
Referenced by Render().
◆ x_RenderAlignAreaTopLine() void CAlnMultiRenderer::x_RenderAlignAreaTopLine ( ) protectedDefinition at line 202 of file alnmulti_renderer.cpp.
References IRender::Begin(), CGlPane::Close(), IRender::ColorC(), CWidgetDisplayStyle::eFrame, map_checker< Container >::empty(), IRender::End(), CGlPane::eNeverUpdate, CRowDisplayStyle::GetColor(), GetGl(), IAlnMultiRendererContext::GetMasterRow(), IAlnMultiRendererContext::GetRowByLine(), CRowDisplayStyle::IsWebRendering(), CGlRect< T >::Left(), m_ListAreaRect, m_MasterRect, m_RowToList, CGlPane::OpenPixels(), CGlRect< T >::Right(), row, CGlRect< T >::SetTop(), CGlPane::SetViewport(), CGlRect< T >::Top(), IRender::Vertex2d(), and x_GetContext().
Referenced by x_Render().
◆ x_RenderHeader() void CAlnMultiRenderer::x_RenderHeader ( TAreaVector * p_areas ) protected ◆ x_RenderItems() void CAlnMultiRenderer::x_RenderItems ( TAreaVector * p_areas ) protected ◆ x_RenderItemsRange() void CAlnMultiRenderer::x_RenderItemsRange ( int iFisrt, int iLast, TAreaVector * p_areas ) protectedDefinition at line 745 of file alnmulti_renderer.cpp.
References CGlPane::eAlwaysUpdate, CGlPane::EnableOffset(), CGlPane::eNeverUpdate, IAlignRow::fItemFocused, IAlignRow::fItemSelected, IAlignRow::fNone, IAlignRow::fWidgetFocused, IAlnMultiRendererContext::GetAlignPort(), IAlnMultiRendererContext::GetFocusedItemIndex(), IAlnMultiRendererContext::GetLinePosY(), CGlPane::GetModelLimitsRect(), IAlnMultiRendererContext::GetRowByLine(), CGlPane::GetViewport(), CGlPane::GetVisibleRect(), GetVPListTop(), CGlRect< T >::Height(), i, int, m_bCgiMode, m_bFocused, m_ListAreaRect, m_rcBounds, NULL, CGlPane::SetClipRect(), CGlPane::SetExactOrthoProjection(), CGlRect< T >::SetHorz(), CGlPane::SetModelLimitsRect(), CGlRect< T >::SetTop(), CGlPane::SetViewport(), CGlPane::SetVisibleRect(), CGlRect< T >::Top(), CGlRect< T >::Width(), x_GetContext(), and x_RenderRow().
Referenced by x_RenderItems().
◆ x_RenderMasterRow() void CAlnMultiRenderer::x_RenderMasterRow ( TAreaVector * p_areas ) protectedDefinition at line 690 of file alnmulti_renderer.cpp.
References CGlPane::Close(), IRender::Color3f(), CGlPane::EnableOffset(), CGlPane::eNeverUpdate, IAlignRow::fItemSelected, IAlignRow::fNone, IAlignRow::fWidgetFocused, CRgbaColor::GetBlue(), GetGl(), CRgbaColor::GetGreen(), IAlignRow::GetHeightPixels(), IAlnMultiRendererContext::GetMasterRow(), CRgbaColor::GetRed(), IAlignRow::GetRowState(), IAlnMultiRendererContext::IsRendererFocused(), CGlRect< T >::Left(), m_MasterBackColor, m_MasterRect, CGlPane::OpenPixels(), IRender::PolygonMode(), IRender::Rectd(), CGlRect< T >::Right(), CGlRect< T >::Top(), x_GetContext(), x_PrepareMasterPane(), and x_RenderRow().
Referenced by x_Render().
◆ x_RenderRow()Definition at line 794 of file alnmulti_renderer.cpp.
References _ASSERT, ERR_POST, GetColumn(), GetColumnsCount(), CException::GetMsg(), m_RowToList, row, SetupPaneForColumn(), IAlnMultiHeaderContext::SColumn::VisibleWidth(), CException::what(), and x_GetColumnType().
Referenced by x_RenderItemsRange(), and x_RenderMasterRow().
◆ x_RenderRuler() void CAlnMultiRenderer::x_RenderRuler ( TAreaVector * p_areas ) protectedDefinition at line 663 of file alnmulti_renderer.cpp.
References eHtmlArea_Link, IAlnMultiRendererContext::GetAlignPort(), CGlPane::GetModelLimitsRect(), CGlPane::GetVisibleRect(), CGlRect< T >::Height(), m_Ruler, m_RulerPane, m_RulerRect, CRuler::Render(), CGlPane::SetModelLimitsRect(), CGlRect< T >::SetVert(), CGlPane::SetViewport(), CGlPane::SetVisibleRect(), CGlRect< T >::Width(), and x_GetContext().
Referenced by x_Render().
◆ x_ResetRowListMap() void CAlnMultiRenderer::x_ResetRowListMap ( ) protected ◆ m_BackColor ◆ m_bCgiMode ◆ m_bFocused bool CAlnMultiRenderer::m_bFocused protected ◆ m_Columns ◆ m_Context ◆ m_Header ◆ m_HeaderRect TVPRect CAlnMultiRenderer::m_HeaderRect protected ◆ m_HitResult int CAlnMultiRenderer::m_HitResult protected ◆ m_ListAreaRect TVPRect CAlnMultiRenderer::m_ListAreaRect protected ◆ m_MasterBackColor ◆ m_MasterRect TVPRect CAlnMultiRenderer::m_MasterRect protected ◆ m_rcBounds TVPRect CAlnMultiRenderer::m_rcBounds protected ◆ m_ResizableColumnIndex int CAlnMultiRenderer::m_ResizableColumnIndex protected ◆ m_RowToList ◆ m_Ruler CRuler CAlnMultiRenderer::m_Ruler protected ◆ m_RulerPane CGlPane CAlnMultiRenderer::m_RulerPane protected ◆ m_RulerRect TVPRect CAlnMultiRenderer::m_RulerRect protected ◆ m_TooltipColumn int CAlnMultiRenderer::m_TooltipColumn protected ◆ m_TooltipRow ◆ m_TooltipVPPos TVPPoint CAlnMultiRenderer::m_TooltipVPPos protectedThe documentation for this class was generated from the following files:
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