21 #ifndef __ANTARES_TOOLBOX_COMPONENTS_DATAGRID__GRID_HELPER_H__
22 #define __ANTARES_TOOLBOX_COMPONENTS_DATAGRID__GRID_HELPER_H__
27 #include <yuni/core/math.h>
30 namespace Antares::Component::Datagrid
88 virtual wxString
GetValue(
int row,
int col)
override;
90 virtual double GetValueAsDouble(
int row,
int col)
override;
92 virtual bool GetValueAsBool(
int row,
int col)
override;
112 virtual void SetValue(
int row,
int col,
const wxString& v)
override;
113 virtual void SetValue(
int row,
int col,
const Yuni::String& v);
140 virtual bool CanValueAs(
int,
int,
const wxString&);
142 void resetIndicesToDefault();
143 void resetIndicesToDefaultWithoutInit();
145 void precision(
const Date::Precision p);
147 void loadFromMatrix();
154 wxColour foregroundColorFromCellStyle(Renderer::IRenderer::CellStyle s)
const;
155 wxColour backgroundColorFromCellStyle(Renderer::IRenderer::CellStyle s)
const;
157 void appendCSSForAllCellStyles(wxString& s);
158 void appendCSSForAllCellStyles2(Yuni::String& s);
160 bool markTheStudyAsModified()
const;
173 Date::Precision pDataGridPrecision;
175 bool pMarkStudyModifiedWhenModifyingCell;
181 #include "gridhelper.hxx"
Data provider for Datagrids.
Definition: renderer.h:50
Wrapper between a wxGridTableBase and a renderer
Definition: gridhelper.h:42
virtual wxString GetRowLabelValue(int row) override
Get the label for a given row.
Definition: gridhelper.cpp:532
std::vector< int > Indices
Indices.
Definition: gridhelper.h:45
virtual int GetNumberCols() override
Get the number of columns that the wxGrid should display.
Definition: gridhelper.hxx:31
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:57
bool IsEmptyCell(int, int) override
Get if a cell is empty or not (unused)
Definition: gridhelper.hxx:46
Renderer::IRenderer * renderer() const
The renderer.
Definition: gridhelper.hxx:68
virtual ~VGridHelper()
Destructor.
Definition: gridhelper.h:53
virtual wxString GetColLabelValue(int col) override
Get the label for a given colum.
Definition: gridhelper.cpp:541
virtual void SetValue(int row, int col, const wxString &v) override
Try to set the value of a given cell.
Definition: gridhelper.cpp:560
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:51
virtual double GetNumericValue(int row, int col) const
Get the float value of the cell at a given position.
Definition: gridhelper.cpp:555
virtual int GetNumberRows() override
Get the number of rows that the wxGrid should display.
Definition: gridhelper.hxx:26
bool valid
Get if the grid is valid.
Definition: gridhelper.h:167
virtual wxString GetValue(int row, int col) override
Get the string representation of the cell at a given position.
Definition: gridhelper.cpp:546