21#ifndef __ANTARES_TOOLBOX_COMPONENTS_DATAGRID__GRID_HELPER_H__
22#define __ANTARES_TOOLBOX_COMPONENTS_DATAGRID__GRID_HELPER_H__
27#include <yuni/core/math.h>
91 virtual wxString
GetValue(
int row,
int col)
override;
93 virtual double GetValueAsDouble(
int row,
int col)
override;
95 virtual bool GetValueAsBool(
int row,
int col)
override;
115 virtual void SetValue(
int row,
int col,
const wxString& v)
override;
116 virtual void SetValue(
int row,
int col,
const Yuni::String& v);
143 virtual bool CanValueAs(
int,
int,
const wxString&);
145 void resetIndicesToDefault();
146 void resetIndicesToDefaultWithoutInit();
148 void precision(
const Date::Precision p);
150 void loadFromMatrix();
157 wxColour foregroundColorFromCellStyle(Renderer::IRenderer::CellStyle s)
const;
158 wxColour backgroundColorFromCellStyle(Renderer::IRenderer::CellStyle s)
const;
160 void appendCSSForAllCellStyles(wxString& s);
161 void appendCSSForAllCellStyles2(Yuni::String& s);
163 bool markTheStudyAsModified()
const;
176 Date::Precision pDataGridPrecision;
178 bool pMarkStudyModifiedWhenModifyingCell;
186#include "gridhelper.hxx"
Data provider for Datagrids.
Definition renderer.h:53
Wrapper between a wxGridTableBase and a renderer
Definition gridhelper.h:47
virtual wxString GetRowLabelValue(int row) override
Get the label for a given row.
Definition gridhelper.cpp:517
std::vector< int > Indices
Indices.
Definition gridhelper.h:50
virtual int GetNumberCols() override
Get the number of columns that the wxGrid should display.
Definition gridhelper.hxx:35
int realRow(uint row) const
Get the real index used by the renderer of a given row index used by the wxGrid.
Definition gridhelper.hxx:61
bool IsEmptyCell(int, int) override
Get if a cell is empty or not (unused)
Definition gridhelper.hxx:50
Renderer::IRenderer * renderer() const
The renderer.
Definition gridhelper.hxx:72
virtual ~VGridHelper()
Destructor.
Definition gridhelper.h:57
virtual wxString GetColLabelValue(int col) override
Get the label for a given colum.
Definition gridhelper.cpp:524
virtual void SetValue(int row, int col, const wxString &v) override
Try to set the value of a given cell.
Definition gridhelper.cpp:541
int realCol(uint col) const
Get the real index used by the renderer of a given column index used by the wxGrid.
Definition gridhelper.hxx:55
virtual double GetNumericValue(int row, int col) const
Get the float value of the cell at a given position.
Definition gridhelper.cpp:536
virtual int GetNumberRows() override
Get the number of rows that the wxGrid should display.
Definition gridhelper.hxx:30
bool valid
Get if the grid is valid.
Definition gridhelper.h:170
virtual wxString GetValue(int row, int col) override
Get the string representation of the cell at a given position.
Definition gridhelper.cpp:529