Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Private::OutputViewerData::AreaLinkRenderer Class Referencefinal
Inheritance diagram for Antares::Private::OutputViewerData::AreaLinkRenderer:
Antares::Component::Datagrid::Renderer::IRenderer

Public Types

using IRenderer = Antares::Component::Datagrid::Renderer::IRenderer
 Convenient alias.
 
using OutputViewerComponent = Antares::Window::OutputViewer::Component
 The output viewer.
 
using DatagridType = Antares::Component::Datagrid::Component
 Grid.
 
using CellType = Yuni::CString<64, false>
 
- Public Types inherited from Antares::Component::Datagrid::Renderer::IRenderer
enum  CellStyle {
  cellStyleDefault = 0 , cellStyleCustom , cellStyleDefaultAlternate , cellStyleDefaultDisabled ,
  cellStyleDefaultAlternateDisabled , cellStyleDefaultCenter , cellStyleDefaultCenterAlternate , cellStyleDefaultCenterDisabled ,
  cellStyleDefaultCenterAlternateDisabled , cellStyleWarning , cellStyleError , cellStyleDisabled ,
  cellStyleAverage , cellStyleSum , cellStyleMinMax , cellStyleConstraintEnabled ,
  cellStyleConstraintDisabled , cellStyleConstraintNoWeight , cellStyleConstraintWeight , cellStyleConstraintWeightCount ,
  cellStyleConstraintOperator , cellStyleConstraintType , cellStyleLayerDisabled , cellStyleFilterYearByYearOn ,
  cellStyleFilterYearByYearOff , cellStyleFilterSynthesisOn , cellStyleFilterSynthesisOff , cellStyleFilterUndefined ,
  cellStyleAdqPatchVirtual , cellStyleAdqPatchOutside , cellStyleAdqPatchInside , cellStyleMax
}
 

Public Member Functions

Constructor & Destructor
 AreaLinkRenderer (OutputViewerComponent *component, const Antares::Matrix< CellType > *matrix)
 Constructor.
 
virtual ~AreaLinkRenderer ()
 Destructor.
 
virtual int width () const
 The effective width of the grid.
 
virtual int height () const
 The effective height of the grid.
 
virtual wxString columnCaption (int colIndx) const
 Get the caption of a column.
 
virtual wxString rowCaption (int rowIndx) const
 Get the caption of a row.
 
virtual wxString cellValue (int, int) const
 Get the string representation of a Cell.
 
virtual double cellNumericValue (int, int) const
 Get the floating value of a Cell.
 
virtual bool cellValue (int x, int y, const Yuni::String &value)
 Try to modify a cell value.
 
virtual void resetColors (int, int, wxColour &, wxColour &) const
 
virtual Date::Precision precision ()
 Time Precision.
 
virtual IRenderer::CellStyle cellStyle (int, int) const
 
virtual wxColour cellBackgroundColor (int, int) const
 
virtual wxColour cellTextColor (int, int) const
 
virtual wxColour verticalBorderColor (int x, int y) const
 Get the color of the vertical right border.
 
virtual int cellAlignment (int, int) const
 Get the alignment of a cell (-1: left, 0: center, +1: right)
 
virtual bool valid () const
 
virtual void onScroll ()
 A scroll event has been triggered.
 
virtual void onSelectCell (unsigned x, unsigned y)
 
virtual void onExternalSelectCell (unsigned x, unsigned y)
 
- Public Member Functions inherited from Antares::Component::Datagrid::Renderer::IRenderer
 IRenderer ()
 Default constructor.
 
virtual ~IRenderer ()
 Destructor.
 
virtual int internalWidth () const
 The real width of the matrix in memory.
 
virtual int internalHeight () const
 The real height of the matrix in memory.
 
virtual wxString asString (int x, int y) const
 Read a cell as a string.
 
virtual double asDouble (int x, int y) const
 Read a cell as a double.
 
void appendCellValue (int x, int y, Yuni::String &s) const
 
IRenderer::CellStyle cellStyleWithNumericCheck (int x, int y) const
 
virtual wxColour horizontalBorderColor (int x, int y) const
 Get the color of the horizontal bottom border.
 
virtual int columnWidthCustom (int x) const
 Get how the a column must resize (0: auto, >0: specific width, <0: use custom string)
 
virtual void hintForColumnWidth (int x, wxString &out) const
 String to use.
 
virtual bool ensureDataAreLoaded ()
 Make sure all data are effectively loaded.
 
virtual uint maxWidthResize () const
 The most suitable column count.
 
virtual uint maxHeightResize () const
 The most suitable column count.
 
virtual void resizeMatrixToXColumns (uint)
 Resize the internal matrix with a given col count.
 
virtual bool onMatrixResize (uint oldX, uint oldY, uint &newX, uint &newY)
 Event trigerred before resizing a matrix.
 
virtual void onMatrixLoad ()
 Event triggered right after a matrix was loaded by the renderer.
 
virtual bool circularShiftRowsUntilDate (MonthName month, uint daymonth)
 Rotate all rows until a given date.
 
virtual void onSelectCell (uint, uint)
 A cell has been selected.
 
virtual void applyLayerFiltering (size_t layerID, VGridHelper *gridHelper)
 

Grid

using MatrixType = Antares::Matrix<CellType>
 Matrix.
 
OutputViewerComponentpComponent
 Reference to the parent control.
 
DatagridTypepGrid
 
const MatrixTypepMatrix
 The matrix.
 
uint pWidth
 The pseudo Width.
 
uint pHeight
 The pseudo height.
 
std::vector< wxString > pColNames
 
std::vector< bool > pColToUseForRowCaption
 
uint pSelectionCellX
 Current selection.
 
uint pSelectionCellY
 
void grid (DatagridType *grid)
 

Additional Inherited Members

- Static Public Member Functions inherited from Antares::Component::Datagrid::Renderer::IRenderer
static const wxChar * CellStyleToCSSClass (CellStyle s)
 
static void CellStyleToCSSClass (CellStyle s, Yuni::String &str)
 
- Public Attributes inherited from Antares::Component::Datagrid::Renderer::IRenderer
Yuni::Event< void()> onRefresh
 Event on refresh.
 
Date::Precision dataGridPrecision
 The real precision asked by the datagrid.
 
Data::Study::Ptr study
 Attached study (if any)
 
bool invalidate
 True to invalidate the current data and force a refresh for the next call to DBGrid:onDraw.
 
- Protected Member Functions inherited from Antares::Component::Datagrid::Renderer::IRenderer
virtual void onStudyClosed ()
 Event: the study has been closed.
 
virtual void onStudyLoaded ()
 Event: the study has been loaded.
 

Member Function Documentation

◆ cellAlignment()

int Antares::Private::OutputViewerData::AreaLinkRenderer::cellAlignment ( int x,
int y ) const
virtual

Get the alignment of a cell (-1: left, 0: center, +1: right)

Reimplemented from Antares::Component::Datagrid::Renderer::IRenderer.

◆ cellBackgroundColor()

wxColour Antares::Private::OutputViewerData::AreaLinkRenderer::cellBackgroundColor ( int x,
int y ) const
virtual

◆ cellNumericValue()

double Antares::Private::OutputViewerData::AreaLinkRenderer::cellNumericValue ( int x,
int y ) const
virtual

Get the floating value of a Cell.

Implements Antares::Component::Datagrid::Renderer::IRenderer.

◆ cellStyle()

IRenderer::CellStyle Antares::Private::OutputViewerData::AreaLinkRenderer::cellStyle ( int ,
int  ) const
virtual

◆ cellTextColor()

wxColour Antares::Private::OutputViewerData::AreaLinkRenderer::cellTextColor ( int x,
int y ) const
virtual

◆ cellValue() [1/2]

virtual bool Antares::Private::OutputViewerData::AreaLinkRenderer::cellValue ( int x,
int y,
const Yuni::String & value )
virtual

Try to modify a cell value.

Returns
True if the operation succeeded, False otherwise

Implements Antares::Component::Datagrid::Renderer::IRenderer.

◆ cellValue() [2/2]

wxString Antares::Private::OutputViewerData::AreaLinkRenderer::cellValue ( int x,
int y ) const
virtual

Get the string representation of a Cell.

Implements Antares::Component::Datagrid::Renderer::IRenderer.

◆ columnCaption()

wxString Antares::Private::OutputViewerData::AreaLinkRenderer::columnCaption ( int colIndx) const
virtual

Get the caption of a column.

Implements Antares::Component::Datagrid::Renderer::IRenderer.

◆ height()

int Antares::Private::OutputViewerData::AreaLinkRenderer::height ( ) const
virtual

The effective height of the grid.

Implements Antares::Component::Datagrid::Renderer::IRenderer.

◆ onScroll()

void Antares::Private::OutputViewerData::AreaLinkRenderer::onScroll ( )
virtual

A scroll event has been triggered.

Reimplemented from Antares::Component::Datagrid::Renderer::IRenderer.

◆ precision()

virtual Date::Precision Antares::Private::OutputViewerData::AreaLinkRenderer::precision ( )
inlinevirtual

Time Precision.

Reimplemented from Antares::Component::Datagrid::Renderer::IRenderer.

◆ resetColors()

virtual void Antares::Private::OutputViewerData::AreaLinkRenderer::resetColors ( int ,
int ,
wxColour & ,
wxColour &  ) const
inlinevirtual

◆ rowCaption()

wxString Antares::Private::OutputViewerData::AreaLinkRenderer::rowCaption ( int rowIndx) const
virtual

Get the caption of a row.

Implements Antares::Component::Datagrid::Renderer::IRenderer.

◆ valid()

bool Antares::Private::OutputViewerData::AreaLinkRenderer::valid ( ) const
virtual

◆ verticalBorderColor()

wxColour Antares::Private::OutputViewerData::AreaLinkRenderer::verticalBorderColor ( int x,
int y ) const
virtual

Get the color of the vertical right border.

Reimplemented from Antares::Component::Datagrid::Renderer::IRenderer.

◆ width()

int Antares::Private::OutputViewerData::AreaLinkRenderer::width ( ) const
virtual

The effective width of the grid.

Implements Antares::Component::Datagrid::Renderer::IRenderer.


The documentation for this class was generated from the following files: