1 #ifndef GUI_WIDGETS_WX___WXGRID_TABLE_ADAPTER_HPP
2 #define GUI_WIDGETS_WX___WXGRID_TABLE_ADAPTER_HPP
65 void OnAssignColumnValue(wxCommandEvent& event);
66 void OnUpdateAssignColumnValue(wxUpdateUIEvent& event);
68 void OnCopyColumn(wxCommandEvent& event);
69 void OnUpdateCopyColumn(wxUpdateUIEvent& event);
76 virtual int GetNumberRows();
77 virtual int GetNumberCols();
79 virtual wxString GetColLabelValue(
int col);
80 virtual wxString GetRowLabelValue(
int row);
81 virtual wxString GetValue(
int row,
int col);
83 virtual void SetValue(
int row,
int col,
const wxString&
value);
86 virtual bool CanGetValueAs(
int row,
int col,
const wxString& typeName );
87 virtual long GetValueAsLong(
int row,
int col );
88 virtual double GetValueAsDouble(
int row,
int col );
90 virtual void SetValueAsLong(
int row,
int col,
long value );
91 virtual void SetValueAsDouble(
int row,
int col,
double value );
92 virtual bool CanSetValueAs(
int row,
int col,
const wxString& typeName );
94 wxString GetHtmlValue(
int row,
int col);
101 virtual void SetView( wxGrid *
grid );
106 virtual void ShowColumn(
size_t col,
bool show);
115 virtual void SetSelection(
const vector<size_t>& query_sel);
126 string GetRegPath()
const;
144 bool x_ValidateColumns(
const vector<size_t>& colums)
const;
145 void x_UpdateSelectedIndices();
147 void x_UpdateRenderers();
149 void x_SaveColumnWidth(
const string&
label,
int width);
150 int x_LoadColumnWidth(
const string&
label);
153 wxGridCellAttr* x_GetDefaultRendererAttr(
bool allowEdit);
154 wxGridCellAttr* x_GetIntRendererAttr(
bool allowEdit);
155 wxGridCellAttr* x_GetFloatRendererAttr(
bool allowEdit);
156 wxGridCellAttr* x_GetHtmlCellAttrL();
157 wxGridCellAttr* x_GetHtmlCellAttrR();
159 bool x_CoordsToTableData(
int&
row,
int& col);
160 bool x_ColToTableData(
int& col);
161 bool x_RowToTableData(
int&
row);
CEventHandler(CwxGridTableAdapter &adapter)
CwxGridTableAdapter & m_Adapter
vector< size_t > m_SelectedRowToTable
maps from index in m_Selected to table (ITableData) index
vector< size_t > m_TableToRow
maps from ITableData index to row position in display
wxGridCellAttr * m_HtmlCellAttrR
wxGridCellAttr * m_TextCellAttrEdit
wxGridCellAttr * m_FloatCellAttr
ICommandProccessor * m_CmdProccessor
virtual bool IsEmptyCell(int, int)
wxGridCellAttr * m_IntCellAttr
vector< size_t > m_SelectedTableToRow
maps from ITableData index to index in m_Selected array
wxGridCellAttr * m_HtmlCellAttrL
vector< size_t > m_RowToTable
maps from row position in display to table (ITableData) index
wxGridCellAttr * m_FloatCellAttrEdit
CEventHandler m_EventHandler
virtual TSortColumn GetSortColumn() const
wxGridCellAttr * m_DefaultCellAttr
virtual void SetRegistryPath(const string ®_path)
wxGridCellAttr * m_IntCellAttrEdit
Undo/Redo interface for editing operations.
virtual size_t GetOriginalRow(size_t queryRow) const =0
virtual void IterateSelection(int)
virtual bool IsColumnShown(size_t col) const =0
virtual size_t GetCurrentRow(size_t queryRow) const =0
virtual void ShowColumn(size_t col, bool show)=0
virtual void SortByColumn(TSortColumn sortColumn)=0
pair< size_t, ESort > TSortColumn
virtual void SetSelection(const vector< size_t > &query_sel)
IRegSettings An interface for objects that save / restore settings using CGuiRegistry.
virtual void SaveSettings() const =0
virtual void LoadSettings()=0
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_GUIWIDGETS_GRID_WIDGET_EXPORT
static const char label[]
Defines to provide correct exporting from DLLs in Windows.
const GenericPointer< typename T::ValueType > T2 value
#define row(bind, expected)
wxMenu * CreateMenu(const CMenuItem *item)
Creates a wxMenu object replicating the structure of CMenuItem.