-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappsettings.h
More file actions
40 lines (33 loc) · 1.12 KB
/
appsettings.h
File metadata and controls
40 lines (33 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/////////////////////////////////////////////////////////////////////////////
// Name: appsettings.h
// Purpose: Header file for appsettings.cpp
// Author: Jan Buchholz
// Created: 2025-11-12
/////////////////////////////////////////////////////////////////////////////
#pragma once
#include <wx/wx.h>
#include "jbtypes.h"
class MainWindow; // forward declaration
class AppSettings {
public:
static AppSettings& instance(MainWindow* mainWin = nullptr);
// prohibit copying
AppSettings(const AppSettings&) = delete;
// prohibit overwrite
AppSettings& operator=(const AppSettings&) = delete;
void loadPreferences();
void savePreferences();
void openPreferencesDialog();
mo_app_settings getAppSettings();
private:
// private constructor with parent MainFrame
explicit AppSettings(MainWindow* mainWin);
MainWindow* m_mainWindow = nullptr;
mo_app_settings m_prefs;
std::string m_prefsPath;
const int c_windowHeight = 800;
const int c_windowWidth = 1280;
const int c_sashPos = 200;
const int c_windowPosX = 300;
const int c_windowsPosY = 100;
};