Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
mainpanel.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_MAIN_PANEL_H__
22#define __ANTARES_TOOLBOX_COMPONENT_MAIN_PANEL_H__
23
24#include <wx/dc.h>
25#include <ui/common/component/panel.h>
26
27namespace Antares
28{
29namespace Component
30{
31class MainPanel final : public Panel, public Yuni::IEventObserver<MainPanel>
32{
33public:
35
36
40 MainPanel(wxWindow* parent);
42 virtual ~MainPanel();
44
46
47
48 const wxString& studyCaption() const
49 {
50 return pStudyCaption;
51 }
53 void studyCaption(const wxString& s);
55
57
58
59 const wxString& author() const
60 {
61 return pAuthor;
62 }
64 void author(const wxString& s);
66
67 void refreshFromStudy();
68
69private:
73 void onDraw(wxPaintEvent& evt);
74
78 void onEraseBackground(wxEraseEvent&)
79 {
80 }
81
89 void addProperty(wxDC& dc,
90 const wxString& caption,
91 const wxString& text,
92 const wxSize& size,
93 int& posY) const;
94
95 void onStudyChanged(Antares::Data::Study& study);
96 void onStudyChanged();
97
98private:
100 wxString pStudyCaption;
102 wxString pAuthor;
104 int pCachedSizeY;
106 wxBitmap* pBeta;
108 wxBitmap* pRC;
109
110 DECLARE_EVENT_TABLE()
111
112}; // class MainPanel
113
114} // namespace Component
115} // namespace Antares
116
117#endif // __ANTARES_TOOLBOX_COMPONENT_MAIN_PANEL_H__
Definition mainpanel.h:32
MainPanel(wxWindow *parent)
Constructor.
Definition mainpanel.cpp:42
const wxString & studyCaption() const
Get the caption/title of the study.
Definition mainpanel.h:48
const wxString & author() const
Get the author.
Definition mainpanel.h:59
virtual ~MainPanel()
Destructor.
Definition mainpanel.cpp:59
Panel implementation.
Definition panel.h:36
Definition study.h:61