Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
startupwizard.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_APPLICATION_WINDOWS_STARTUP_WIZARD_H__
22#define __ANTARES_APPLICATION_WINDOWS_STARTUP_WIZARD_H__
23
24#include <wx/dialog.h>
25#include <map>
26#include "../toolbox/components/button.h"
27
28namespace Antares
29{
30namespace Window
31{
39class StartupWizard final : public wxDialog
40{
41public:
45 static void Show();
46
50 static void Close();
51
52public:
54
55
60 explicit StartupWizard(wxFrame* parent);
62 virtual ~StartupWizard();
64
65private:
76 void addControls(const wxString& mapping,
77 const char* image,
78 const wxString& title,
79 const wxString& subtitle = wxString(),
80 bool useEvents = true);
81
82 void addRecentItem(const wxString& mapping, const wxString& title, const wxString& path);
83
88 void resetAllBackgroundColors(wxWindow* selected);
89
91 void onClick(wxCommandEvent& evt);
92
94 void onClose(void*);
95
96 void onDropDownExamples(Component::Button&, wxMenu&, void*);
97 void showAllExamples();
99 // void onPreparePopupMenu();
101 void onDisplayPopupMenu();
102
104 void onWindowMotion(wxMouseEvent& evt);
106 void onMotion(wxMouseEvent& evt);
107
109 void loadRecentFiles();
110
111private:
116 std::map<int, wxString> pMapping;
118 wxColour pDefaultBgColor;
120 wxColour pSelectedBgColor;
122 int pPanelButtonsID;
124 wxWindow* pLastSelected;
126 // This variable is nearly only useful under Windows to prevent useless changes
127 // selecting a folder
128 bool pAllowDisplaySelection;
130 wxMenu* pMenuExamples;
132 std::map<int, Yuni::String> pMenuLinks;
133
135 wxWindow* pBtnExamples;
137 Yuni::String pExFolder;
138
139}; // class StartupWizard
140
141} // namespace Window
142} // namespace Antares
143
144#endif // __ANTARES_APPLICATION_WINDOWS_STARTUP_WIZARD_H__
Definition button.h:34
Startup Wizard User Interface.
Definition startupwizard.h:40
StartupWizard(wxFrame *parent)
Default constructor.
Definition startupwizard.cpp:223
static void Show()
Show an instance of StartupWizard.
Definition startupwizard.cpp:206
static void Close()
Close any opened startup window.
Definition startupwizard.cpp:214
virtual ~StartupWizard()
Destructor.
Definition startupwizard.cpp:386