Process command line and configuration file in the application class.

This commit is contained in:
Saleem Edah-Tally
2025-07-13 12:46:36 +02:00
parent 4b23b1f3de
commit 059b16f08a
4 changed files with 67 additions and 55 deletions

12
XS7.h
View File

@@ -22,19 +22,13 @@ public:
XS7(wxWindow* parent, wxWindowID id = SYMBOL_S7_IDNAME, const wxString& caption = SYMBOL_S7_TITLE,
const wxPoint& pos = SYMBOL_S7_POSITION, const wxSize& size = SYMBOL_S7_SIZE, long style = SYMBOL_S7_STYLE );
virtual ~XS7();
bool ParseCmdLine();
void Setup();
void Setup(wxConfig * config);
private:
std::unique_ptr<wxConfig> m_config = nullptr;
wxConfig * m_config = nullptr;
XInsaneWidget * m_insaneWidget = nullptr;
/*
* An optional tag for wxConfig files. This allows using different profiles
* by specifying the -c command line option.
*/
wxString m_configTag;
void OnDpkRepositoryChange ( wxFileDirPickerEvent& evt );
void OnDpkDoubleClick ( wxMouseEvent& evt );
void OnAppKeyPressed(wxKeyEvent& evt);