NCBI C++ ToolKit
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CwxGridTableAdapter Class Reference

Search Toolkit Book for CwxGridTableAdapter

CGridTableQuery. More...

#include <gui/widgets/grid_widget/wxgrid_table_adapter.hpp>

+ Inheritance diagram for CwxGridTableAdapter:
+ Collaboration diagram for CwxGridTableAdapter:

Classes

class  CEventHandler
 

Public Member Functions

 CwxGridTableAdapter (ITableData &tableData, ICommandProccessor *cmdProccessor)
 
 ~CwxGridTableAdapter ()
 
string GetRegPath () const
 
wxMenu * CreateMenu ()
 
wxGridTableBase interface implementation
virtual int GetNumberRows ()
 
virtual int GetNumberCols ()
 
virtual wxString GetColLabelValue (int col)
 
virtual wxString GetRowLabelValue (int row)
 
virtual wxString GetValue (int row, int col)
 
virtual void SetValue (int row, int col, const wxString &value)
 
virtual bool IsEmptyCell (int, int)
 
virtual bool CanGetValueAs (int row, int col, const wxString &typeName)
 
virtual long GetValueAsLong (int row, int col)
 
virtual double GetValueAsDouble (int row, int col)
 
virtual void SetValueAsLong (int row, int col, long value)
 
virtual void SetValueAsDouble (int row, int col, double value)
 
virtual bool CanSetValueAs (int row, int col, const wxString &typeName)
 
wxString GetHtmlValue (int row, int col)
 
virtual void SetView (wxGrid *grid)
 
IGridTableAdapter interface implementation
virtual void ShowColumn (size_t col, bool show)
 
virtual bool IsColumnShown (size_t col) const
 
virtual size_t GetOriginalRow (size_t queryRow) const
 
virtual size_t GetCurrentRow (size_t queryRow) const
 
virtual void SortByColumn (TSortColumn sortColumn)
 
virtual TSortColumn GetSortColumn () const
 
virtual void SetSelection (const vector< size_t > &query_sel)
 
virtual void IterateSelection (int dir)
 
IRegSettings interface implementation
virtual void SetRegistryPath (const string &reg_path)
 
virtual void LoadSettings ()
 
virtual void SaveSettings () const
 
- Public Member Functions inherited from IGridTableAdapter
 IGridTableAdapter (ITableData &tableData)
 
virtual ~IGridTableAdapter ()
 
ITableDataGetTable ()
 
virtual vector< size_t > GetVisibleColumns () const
 
virtual size_t GetCurrentSelection () const
 
virtual void HideUnselected (bool b)
 
virtual bool GetHideUnselected () const
 
- Public Member Functions inherited from IRegSettings
virtual ~IRegSettings ()
 

Protected Member Functions

bool x_ValidateColumns (const vector< size_t > &colums) const
 
void x_UpdateSelectedIndices ()
 
void x_ResetRows ()
 
void x_UpdateRenderers ()
 
void x_SaveColumnWidth (const string &label, int width)
 
int x_LoadColumnWidth (const string &label)
 
wxGridCellAttr * x_GetDefaultRendererAttr (bool allowEdit)
 
wxGridCellAttr * x_GetIntRendererAttr (bool allowEdit)
 
wxGridCellAttr * x_GetFloatRendererAttr (bool allowEdit)
 
wxGridCellAttr * x_GetHtmlCellAttrL ()
 
wxGridCellAttr * x_GetHtmlCellAttrR ()
 
bool x_CoordsToTableData (int &row, int &col)
 
bool x_ColToTableData (int &col)
 
bool x_RowToTableData (int &row)
 

Protected Attributes

vector< size_t > m_RowToTable
 maps from row position in display to table (ITableData) index More...
 
vector< size_t > m_TableToRow
 maps from ITableData index to row position in display More...
 
vector< size_t > m_SelectedRowToTable
 maps from index in m_Selected to table (ITableData) index More...
 
vector< size_t > m_SelectedTableToRow
 maps from ITableData index to index in m_Selected array More...
 
TSortColumn m_SortColumn
 
wxGridCellAttr * m_DefaultCellAttr
 
wxGridCellAttr * m_IntCellAttr
 
wxGridCellAttr * m_FloatCellAttr
 
wxGridCellAttr * m_HtmlCellAttrL
 
wxGridCellAttr * m_HtmlCellAttrR
 
wxGridCellAttr * m_TextCellAttrEdit
 
wxGridCellAttr * m_IntCellAttrEdit
 
wxGridCellAttr * m_FloatCellAttrEdit
 
string m_RegPath
 
ICommandProccessorm_CmdProccessor
 
CEventHandler m_EventHandler
 
- Protected Attributes inherited from IGridTableAdapter
CIRef< ITableDatam_TableData
 
vector< size_t > m_VisibleColumns
 
vector< size_t > m_Selected
 
size_t m_CurrentSelection
 
bool m_HideUnselected
 

Additional Inherited Members

- Public Types inherited from IGridTableAdapter
enum  ESort { kAscending , Descending }
 
typedef pair< size_t, ESortTSortColumn
 

Detailed Description

CGridTableQuery.

Definition at line 52 of file wxgrid_table_adapter.hpp.

Constructor & Destructor Documentation

◆ CwxGridTableAdapter()

CwxGridTableAdapter::CwxGridTableAdapter ( ITableData tableData,
ICommandProccessor cmdProccessor 
)

◆ ~CwxGridTableAdapter()

CwxGridTableAdapter::~CwxGridTableAdapter ( )

Member Function Documentation

◆ CanGetValueAs()

bool CwxGridTableAdapter::CanGetValueAs ( int  row,
int  col,
const wxString &  typeName 
)
virtual

◆ CanSetValueAs()

bool CwxGridTableAdapter::CanSetValueAs ( int  row,
int  col,
const wxString &  typeName 
)
virtual

◆ CreateMenu()

static wxMenu * CwxGridTableAdapter::CreateMenu ( )

◆ GetColLabelValue()

wxString CwxGridTableAdapter::GetColLabelValue ( int  col)
virtual

◆ GetCurrentRow()

size_t CwxGridTableAdapter::GetCurrentRow ( size_t  queryRow) const
virtual

◆ GetHtmlValue()

wxString CwxGridTableAdapter::GetHtmlValue ( int  row,
int  col 
)

◆ GetNumberCols()

int CwxGridTableAdapter::GetNumberCols ( )
virtual

Definition at line 208 of file wxgrid_table_adapter.cpp.

References IGridTableAdapter::m_VisibleColumns.

Referenced by CGridWidget::OnExportToCSV().

◆ GetNumberRows()

int CwxGridTableAdapter::GetNumberRows ( )
virtual

◆ GetOriginalRow()

size_t CwxGridTableAdapter::GetOriginalRow ( size_t  queryRow) const
virtual

◆ GetRegPath()

string CwxGridTableAdapter::GetRegPath ( ) const

◆ GetRowLabelValue()

wxString CwxGridTableAdapter::GetRowLabelValue ( int  row)
virtual

◆ GetSortColumn()

virtual TSortColumn CwxGridTableAdapter::GetSortColumn ( ) const
inlinevirtual

Implements IGridTableAdapter.

Definition at line 113 of file wxgrid_table_adapter.hpp.

References m_SortColumn.

◆ GetValue()

wxString CwxGridTableAdapter::GetValue ( int  row,
int  col 
)
virtual

◆ GetValueAsDouble()

double CwxGridTableAdapter::GetValueAsDouble ( int  row,
int  col 
)
virtual

◆ GetValueAsLong()

long CwxGridTableAdapter::GetValueAsLong ( int  row,
int  col 
)
virtual

◆ IsColumnShown()

bool CwxGridTableAdapter::IsColumnShown ( size_t  col) const
virtual

Implements IGridTableAdapter.

Definition at line 564 of file wxgrid_table_adapter.cpp.

References IGridTableAdapter::m_VisibleColumns.

◆ IsEmptyCell()

virtual bool CwxGridTableAdapter::IsEmptyCell ( int  ,
int   
)
inlinevirtual

Definition at line 84 of file wxgrid_table_adapter.hpp.

◆ IterateSelection()

void CwxGridTableAdapter::IterateSelection ( int  dir)
virtual

◆ LoadSettings()

void CwxGridTableAdapter::LoadSettings ( )
virtual

◆ SaveSettings()

void CwxGridTableAdapter::SaveSettings ( ) const
virtual

◆ SetRegistryPath()

virtual void CwxGridTableAdapter::SetRegistryPath ( const string reg_path)
inlinevirtual

Implements IRegSettings.

Definition at line 121 of file wxgrid_table_adapter.hpp.

References m_RegPath.

Referenced by CGridWidget::SetRegistryPath(), and CGridWidget::x_InitGrid().

◆ SetSelection()

void CwxGridTableAdapter::SetSelection ( const vector< size_t > &  query_sel)
virtual

◆ SetValue()

void CwxGridTableAdapter::SetValue ( int  row,
int  col,
const wxString &  value 
)
virtual

◆ SetValueAsDouble()

void CwxGridTableAdapter::SetValueAsDouble ( int  row,
int  col,
double  value 
)
virtual

◆ SetValueAsLong()

void CwxGridTableAdapter::SetValueAsLong ( int  row,
int  col,
long  value 
)
virtual

◆ SetView()

void CwxGridTableAdapter::SetView ( wxGrid *  grid)
virtual

◆ ShowColumn()

void CwxGridTableAdapter::ShowColumn ( size_t  col,
bool  show 
)
virtual

◆ SortByColumn()

void CwxGridTableAdapter::SortByColumn ( TSortColumn  sortColumn)
virtual

◆ x_ColToTableData()

bool CwxGridTableAdapter::x_ColToTableData ( int col)
protected

Definition at line 338 of file wxgrid_table_adapter.cpp.

References IGridTableAdapter::m_VisibleColumns.

Referenced by GetColLabelValue().

◆ x_CoordsToTableData()

bool CwxGridTableAdapter::x_CoordsToTableData ( int row,
int col 
)
protected

◆ x_GetDefaultRendererAttr()

wxGridCellAttr * CwxGridTableAdapter::x_GetDefaultRendererAttr ( bool  allowEdit)
protected

Definition at line 409 of file wxgrid_table_adapter.cpp.

References m_CmdProccessor, m_DefaultCellAttr, and m_TextCellAttrEdit.

Referenced by x_UpdateRenderers().

◆ x_GetFloatRendererAttr()

wxGridCellAttr * CwxGridTableAdapter::x_GetFloatRendererAttr ( bool  allowEdit)
protected

Definition at line 456 of file wxgrid_table_adapter.cpp.

References m_CmdProccessor, m_FloatCellAttr, and m_FloatCellAttrEdit.

Referenced by x_UpdateRenderers().

◆ x_GetHtmlCellAttrL()

wxGridCellAttr * CwxGridTableAdapter::x_GetHtmlCellAttrL ( )
protected

Definition at line 481 of file wxgrid_table_adapter.cpp.

References m_HtmlCellAttrL.

Referenced by x_UpdateRenderers().

◆ x_GetHtmlCellAttrR()

wxGridCellAttr * CwxGridTableAdapter::x_GetHtmlCellAttrR ( )
protected

Definition at line 494 of file wxgrid_table_adapter.cpp.

References m_HtmlCellAttrR.

Referenced by x_UpdateRenderers().

◆ x_GetIntRendererAttr()

wxGridCellAttr * CwxGridTableAdapter::x_GetIntRendererAttr ( bool  allowEdit)
protected

Definition at line 431 of file wxgrid_table_adapter.cpp.

References m_CmdProccessor, m_IntCellAttr, and m_IntCellAttrEdit.

Referenced by x_UpdateRenderers().

◆ x_LoadColumnWidth()

int CwxGridTableAdapter::x_LoadColumnWidth ( const string label)
protected

◆ x_ResetRows()

void CwxGridTableAdapter::x_ResetRows ( )
protected

◆ x_RowToTableData()

bool CwxGridTableAdapter::x_RowToTableData ( int row)
protected

◆ x_SaveColumnWidth()

void CwxGridTableAdapter::x_SaveColumnWidth ( const string label,
int  width 
)
protected

◆ x_UpdateRenderers()

void CwxGridTableAdapter::x_UpdateRenderers ( )
protected

◆ x_UpdateSelectedIndices()

void CwxGridTableAdapter::x_UpdateSelectedIndices ( )
protected

◆ x_ValidateColumns()

bool CwxGridTableAdapter::x_ValidateColumns ( const vector< size_t > &  colums) const
protected

Definition at line 600 of file wxgrid_table_adapter.cpp.

References i, set< Key, Compare >::insert(), and IGridTableAdapter::m_TableData.

Referenced by LoadSettings().

Member Data Documentation

◆ m_CmdProccessor

ICommandProccessor* CwxGridTableAdapter::m_CmdProccessor
protected

◆ m_DefaultCellAttr

wxGridCellAttr* CwxGridTableAdapter::m_DefaultCellAttr
protected

Definition at line 163 of file wxgrid_table_adapter.hpp.

Referenced by x_GetDefaultRendererAttr(), and ~CwxGridTableAdapter().

◆ m_EventHandler

CEventHandler CwxGridTableAdapter::m_EventHandler
protected

Definition at line 178 of file wxgrid_table_adapter.hpp.

Referenced by SetView().

◆ m_FloatCellAttr

wxGridCellAttr* CwxGridTableAdapter::m_FloatCellAttr
protected

Definition at line 165 of file wxgrid_table_adapter.hpp.

Referenced by x_GetFloatRendererAttr(), and ~CwxGridTableAdapter().

◆ m_FloatCellAttrEdit

wxGridCellAttr* CwxGridTableAdapter::m_FloatCellAttrEdit
protected

Definition at line 172 of file wxgrid_table_adapter.hpp.

Referenced by x_GetFloatRendererAttr(), and ~CwxGridTableAdapter().

◆ m_HtmlCellAttrL

wxGridCellAttr* CwxGridTableAdapter::m_HtmlCellAttrL
protected

Definition at line 167 of file wxgrid_table_adapter.hpp.

Referenced by x_GetHtmlCellAttrL(), and ~CwxGridTableAdapter().

◆ m_HtmlCellAttrR

wxGridCellAttr* CwxGridTableAdapter::m_HtmlCellAttrR
protected

Definition at line 168 of file wxgrid_table_adapter.hpp.

Referenced by x_GetHtmlCellAttrR(), and ~CwxGridTableAdapter().

◆ m_IntCellAttr

wxGridCellAttr* CwxGridTableAdapter::m_IntCellAttr
protected

Definition at line 164 of file wxgrid_table_adapter.hpp.

Referenced by x_GetIntRendererAttr(), and ~CwxGridTableAdapter().

◆ m_IntCellAttrEdit

wxGridCellAttr* CwxGridTableAdapter::m_IntCellAttrEdit
protected

Definition at line 171 of file wxgrid_table_adapter.hpp.

Referenced by x_GetIntRendererAttr(), and ~CwxGridTableAdapter().

◆ m_RegPath

string CwxGridTableAdapter::m_RegPath
protected

◆ m_RowToTable

vector<size_t> CwxGridTableAdapter::m_RowToTable
protected

maps from row position in display to table (ITableData) index

Definition at line 133 of file wxgrid_table_adapter.hpp.

Referenced by GetNumberRows(), GetOriginalRow(), SortByColumn(), x_CoordsToTableData(), x_ResetRows(), x_RowToTableData(), and x_UpdateSelectedIndices().

◆ m_SelectedRowToTable

vector<size_t> CwxGridTableAdapter::m_SelectedRowToTable
protected

maps from index in m_Selected to table (ITableData) index

Definition at line 138 of file wxgrid_table_adapter.hpp.

Referenced by GetOriginalRow(), IterateSelection(), x_CoordsToTableData(), x_RowToTableData(), and x_UpdateSelectedIndices().

◆ m_SelectedTableToRow

vector<size_t> CwxGridTableAdapter::m_SelectedTableToRow
protected

maps from ITableData index to index in m_Selected array

Definition at line 140 of file wxgrid_table_adapter.hpp.

Referenced by GetCurrentRow(), IterateSelection(), and x_UpdateSelectedIndices().

◆ m_SortColumn

TSortColumn CwxGridTableAdapter::m_SortColumn
protected

Definition at line 142 of file wxgrid_table_adapter.hpp.

Referenced by GetSortColumn(), and SortByColumn().

◆ m_TableToRow

vector<size_t> CwxGridTableAdapter::m_TableToRow
protected

maps from ITableData index to row position in display

Definition at line 135 of file wxgrid_table_adapter.hpp.

Referenced by GetCurrentRow(), IterateSelection(), SortByColumn(), and x_ResetRows().

◆ m_TextCellAttrEdit

wxGridCellAttr* CwxGridTableAdapter::m_TextCellAttrEdit
protected

Definition at line 170 of file wxgrid_table_adapter.hpp.

Referenced by x_GetDefaultRendererAttr(), and ~CwxGridTableAdapter().


The documentation for this class was generated from the following files:
Modified on Thu Jun 27 18:27:44 2024 by modify_doxy.py rev. 669887