Simulateur Ferroviaire
Reconstruction et visualisation d'un réseau ferroviaire à partir de données GeoJSON — Win32 / WebView2 / Leaflet
Chargement...
Recherche...
Aucune correspondance
MainWindow.h
Aller à la documentation de ce fichier.
1
18#pragma once
19
20#include <optional>
21#include <string>
22
23#include "framework.h"
30
44{
45public:
46
55 MainWindow(HINSTANCE hInstance,
56 const WCHAR* className,
57 const WCHAR* title,
58 int nCmdShow);
59
66 void create();
67
81 static LRESULT CALLBACK windowProc(HWND hWnd, UINT message,
82 WPARAM wParam, LPARAM lParam);
83
84private:
85
86 // =========================================================================
87 // Gestionnaires de messages
88 // =========================================================================
89
93 LRESULT handleMessage(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
94
105 void onCommand(HWND hWnd, int commandId);
106
116 void onProgressUpdate(int progress, std::wstring* label);
117
125 void onParsingSuccess(HWND hWnd);
126
136 void onParsingError(HWND hWnd, LPARAM lParam);
137
143 void onParsingCancelled();
144
150 void onFileOpen(HWND hWnd);
151
157 void onFileExport(HWND hWnd);
158
164 void onCancelButtonClick();
165
172 void onParserSettings();
173
177 void onSizeUpdate();
178
182 void onDestroy();
183
189 void onWebMessage(const std::string& jsonMessage);
190
196 void onSwitchClick(const std::string& switchId);
197
201 void onTogglePCC();
202
203
204 // =========================================================================
205 // Membres
206 // =========================================================================
207
209 HWND m_hWnd = nullptr;
210 HINSTANCE m_hInstance;
211 const WCHAR* m_className;
212 const WCHAR* m_title;
214
217
224
229 std::string m_parserIniPath;
230
235 std::optional<GeoParsingTask> m_parserTask;
236
238 Logger m_logger{ "HMI" };
239
242
245};
Tâche asynchrone d'exécution du pipeline GeoParser v2.
Panneau PCC superposé togglable, affiché par-dessus la carte Leaflet.
Persistence de ParserConfig via fichier .ini (SimpleIni).
Paramètres de configuration du pipeline GeoParser.
Barre de progression Win32 avec label de phase et bouton Cancel.
Journaliseur associé à un moteur nommé.
Definition Logger.h:99
Fenêtre principale de l'application SimulateurFerroviaire.
Definition MainWindow.h:44
WebViewPanel m_webViewPanel
Definition MainWindow.h:241
void onTogglePCC()
Bascule la visibilité du panneau PCC (F2 ou IDM_VIEW_PCC).
Definition MainWindow.cpp:381
std::optional< GeoParsingTask > m_parserTask
Definition MainWindow.h:235
void onSwitchClick(const std::string &switchId)
Met à jour l'état d'un SwitchBlock après un clic Leaflet.
Definition MainWindow.cpp:364
static LRESULT CALLBACK windowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Procédure de fenêtre statique, point d'entrée imposé par Win32.
Definition MainWindow.cpp:104
void onFileExport(HWND hWnd)
Ouvre le dialogue d'export et déclenche l'export GeoJSON.
Definition MainWindow.cpp:255
void create()
Crée et affiche la fenêtre Win32, initialise la ProgressBar et charge la ParserConfig depuis le fichi...
Definition MainWindow.cpp:44
void onWebMessage(const std::string &jsonMessage)
Dispatcher des messages JSON reçus depuis Leaflet.
Definition MainWindow.cpp:345
void onCancelButtonClick()
Demande l'annulation du parsing en cours via GeoParsingTask.
Definition MainWindow.cpp:311
void onParserSettings()
Ouvre le dialogue des paramètres du parser (IDM_PARSER_SETTINGS).
Definition MainWindow.cpp:317
void onDestroy()
Nettoie les ressources avant la destruction (WM_DESTROY).
Definition MainWindow.cpp:338
void onSizeUpdate()
Appelé lors d'un redimensionnement — ajuste WebView et PCCPanel.
Definition MainWindow.cpp:330
const WCHAR * m_title
Definition MainWindow.h:212
int m_nCmdShow
Definition MainWindow.h:213
void onFileOpen(HWND hWnd)
Ouvre le sélecteur de fichier et lance le parsing asynchrone.
Definition MainWindow.cpp:233
void onParsingSuccess(HWND hWnd)
Gère la fin réussie du parsing (WM_PARSING_SUCCESS).
Definition MainWindow.cpp:275
HWND m_hWnd
Definition MainWindow.h:209
HINSTANCE m_hInstance
Definition MainWindow.h:210
void onParsingError(HWND hWnd, LPARAM lParam)
Gère un échec de parsing (WM_PARSING_ERROR).
Definition MainWindow.cpp:287
LRESULT handleMessage(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Dispatcher principal des messages de la fenêtre.
Definition MainWindow.cpp:131
void onParsingCancelled()
Gère une annulation propre du parsing (WM_PARSING_CANCELLED).
Definition MainWindow.cpp:305
PCCPanel m_pccPanel
Definition MainWindow.h:244
std::string m_parserIniPath
Definition MainWindow.h:229
ParserConfig m_parserConfig
Definition MainWindow.h:223
const WCHAR * m_className
Definition MainWindow.h:211
void onProgressUpdate(int progress, std::wstring *label)
Gère la mise à jour de la progression (WM_PROGRESS_UPDATE).
Definition MainWindow.cpp:264
ProgressBar m_progressBar
Definition MainWindow.h:216
Logger m_logger
Definition MainWindow.h:238
void onCommand(HWND hWnd, int commandId)
Gère les commandes menu et boutons (WM_COMMAND).
Definition MainWindow.cpp:195
Definition PCCPanel.h:55
Definition ProgressBar.h:18
Wrapper Win32 autour de WebView2 pour affichage HTML embarqué.
Definition WebViewPanel.h:29
Configuration complète du pipeline GeoParser — POD sans logique.
Definition ParserConfig.h:16