Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
misc.h
1/*
2** Copyright 2007-2024, RTE (https://www.rte-france.com)
3** See AUTHORS.txt
4** SPDX-License-Identifier: MPL-2.0
5** This file is part of Antares-Simulator,
6** Adequacy and Performance assessment for interconnected energy networks.
7**
8** Antares_Simulator is free software: you can redistribute it and/or modify
9** it under the terms of the Mozilla Public Licence 2.0 as published by
10** the Mozilla Foundation, either version 2 of the License, or
11** (at your option) any later version.
12**
13** Antares_Simulator is distributed in the hope that it will be useful,
14** but WITHOUT ANY WARRANTY; without even the implied warranty of
15** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16** Mozilla Public Licence 2.0 for more details.
17**
18** You should have received a copy of the Mozilla Public Licence 2.0
19** along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
20*/
21#ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_MISC_H__
22#define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_MISC_H__
23
24#include "../area.h"
25#include "../matrix.h"
26
27namespace Antares
28{
29namespace Component
30{
31namespace Datagrid
32{
33namespace Renderer
34{
36{
37public:
39
40
44 Misc(wxWindow* control, Toolbox::InputSelector::Area* notifier);
45
47 virtual ~Misc();
49
50 virtual int width() const
51 {
52 return Renderer::Matrix<>::width() + 1;
53 }
54 virtual int height() const
55 {
57 }
58
59 virtual wxString columnCaption(int colIndx) const;
60
61 virtual wxString rowCaption(int rowIndx) const
62 {
63 return Renderer::Matrix<>::rowCaption(rowIndx);
64 }
65
66 virtual wxString cellValue(int x, int y) const;
67
68 virtual double cellNumericValue(int x, int y) const;
69
70 virtual bool cellValue(int x, int y, const Yuni::String& value)
71 {
72 return Renderer::Matrix<>::cellValue(x, y, value);
73 }
74
75 virtual void resetColors(int, int, wxColour&, wxColour&) const
76 { /*Do nothing*/
77 }
78
79 virtual IRenderer::CellStyle cellStyle(int col, int row) const;
80
81 virtual wxColour horizontalBorderColor(int x, int y) const;
82 virtual wxColour verticalBorderColor(int x, int y) const;
83
84 virtual uint maxWidthResize() const
85 {
86 return 0;
87 }
88 virtual bool valid() const
89 {
91 }
92
93 virtual Date::Precision precision()
94 {
95 return Date::hourly;
96 }
97
98protected:
99 virtual void internalAreaChanged(Antares::Data::Area* area);
101 virtual void onStudyClosed() override;
103 virtual void onStudyLoaded() override;
104
105}; // class Misc
106
107} // namespace Renderer
108} // namespace Datagrid
109} // namespace Component
110} // namespace Antares
111
112#endif // __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_MISC_H__
virtual wxString cellValue(int x, int y) const override
Get the value of a cell.
Definition matrix.hxx:96
virtual wxString rowCaption(int rowIndx) const override
Get the row caption.
Definition matrix.hxx:47
virtual int width() const override
Get the width of the datagrid.
Definition matrix.hxx:63
virtual int height() const override
Get the height of the datagrid.
Definition matrix.hxx:69
virtual wxColour horizontalBorderColor(int x, int y) const
Get the color of the horizontal bottom border.
Definition misc.cpp:115
Misc(wxWindow *control, Toolbox::InputSelector::Area *notifier)
Constructor.
Definition misc.cpp:36
virtual double cellNumericValue(int x, int y) const
Get the value of a cell.
Definition misc.cpp:87
virtual Date::Precision precision()
Time Precision.
Definition misc.h:93
virtual bool cellValue(int x, int y, const Yuni::String &value)
Set the value of a cell.
Definition misc.h:70
virtual int width() const
Get the width of the datagrid.
Definition misc.h:50
virtual void onStudyLoaded() override
Event: the study has been loaded.
Definition misc.cpp:144
virtual wxString cellValue(int x, int y) const
Get the value of a cell.
Definition misc.cpp:72
virtual ~Misc()
Destructor.
Definition misc.cpp:41
virtual uint maxWidthResize() const
The most suitable column count.
Definition misc.h:84
virtual wxString columnCaption(int colIndx) const
Get the column caption.
Definition misc.cpp:46
virtual wxString rowCaption(int rowIndx) const
Get the row caption.
Definition misc.h:61
virtual void onStudyClosed() override
Event: the study has been closed.
Definition misc.cpp:138
virtual wxColour verticalBorderColor(int x, int y) const
Get the color of the vertical right border.
Definition misc.cpp:132
virtual int height() const
Get the height of the datagrid.
Definition misc.h:54
Definition for a single area.
Definition area.h:52
A n-by-n matrix.
Definition jit.h:30
Visual Component for displaying all available areas (and groups)
Definition area.h:41