Browse code

Replace the Sound View dialog with a wxWidgets-based one.

* Removes the one that was orignally based entirely on the DeSmuME one, while still looking most the same but cleaner.
* To accommodate this, I needed to rework how wxWidgets was initialized so the configuration dialog boxes could also work alongside this.
* Needed to add a custom wxApp to handle the above.
* This also means that the configuration dialog no longer needs the plugin's HINSTANCE passed along.
* Had to not disable wxGauge or wxToogleButton for the Sound View dialog.
* Also remove the now-unneeded enums in the XSFConfig*.cpp files.
* Sound View is still done in a thread so its event loop can run independently from the rest of the plugin.
* XSFConfig_NCSF doesn't need to be the one to start the Sound View dialog now.

Naram Qashat authored on 2021/04/10 15:19:43
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,34 @@
1
+/*
2
+ * xSF - Core wxWidgets App
3
+ * By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
4
+ *
5
+ * Partially based on the vio*sf framework
6
+ */
7
+
8
+#pragma once
9
+
10
+#ifdef __GNUC__
11
+# pragma GCC diagnostic push
12
+# pragma GCC diagnostic ignored "-Wold-style-cast"
13
+#elif defined(__clang__)
14
+# pragma clang diagnostic push
15
+# pragma clang diagnostic ignored "-Wold-style-cast"
16
+#endif
17
+#include <wx/app.h>
18
+#ifdef __GNUC__
19
+# pragma GCC diagnostic pop
20
+#elif defined(__clang__)
21
+# pragma clang diagnostic pop
22
+#endif
23
+#include "windowsh_wrapper.h"
24
+
25
+class XSFConfig;
26
+
27
+class XSFApp : public wxApp
28
+{
29
+public:
30
+	// Even though most of the plugins are just going to create an instance of XSFApp, I am using this to allow the NCSF plugin to make a derived instance instead.
31
+	static XSFApp *Create();
32
+
33
+	void ConfigDialog(HWND parent, XSFConfig *config);
34
+};