Fixes for building with newer wxWidgets.
[dcpomatic.git] / src / wx / wx_util.h
index af25ce0f5e1851ba1ca1fdcf086ff6564b3f10da..294c661a87dbed0fe88d59519f16cd872c0e0e7c 100644 (file)
 #define DCPOMATIC_WX_UTIL_H
 
 #include "lib/dcpomatic_time.h"
+#include "lib/warnings.h"
+DCPOMATIC_DISABLE_WARNINGS
 #include <wx/wx.h>
+DCPOMATIC_ENABLE_WARNINGS
 #include <wx/gbsizer.h>
 #include <boost/function.hpp>
 #include <boost/thread.hpp>
@@ -46,7 +49,7 @@ class PasswordEntry;
 #define DCPOMATIC_DIALOG_BORDER 12
 
 /** Spacing to use between buttons in a vertical line */
-#ifdef DCPOMATIC_OSX
+#if defined(DCPOMATIC_OSX) | defined(__WXGTK3__)
 #define DCPOMATIC_BUTTON_STACK_GAP 2
 #else
 #define DCPOMATIC_BUTTON_STACK_GAP 0
@@ -87,6 +90,23 @@ extern wxSplashScreen* maybe_show_splash ();
 extern double calculate_mark_interval (double start);
 extern bool display_progress (wxString title, wxString task);
 extern bool report_errors_from_last_job (wxWindow* parent);
+extern wxString bitmap_path (std::string name);
+
+struct Offset
+{
+       Offset (wxString n, int h, int m)
+               : name (n)
+               , hour (h)
+               , minute (m)
+       {}
+
+       wxString name;
+       int hour;
+       int minute;
+};
+
+extern int get_offsets (std::vector<Offset>& offsets);
+
 
 extern void checked_set (FilePickerCtrl* widget, boost::filesystem::path value);
 extern void checked_set (wxDirPickerCtrl* widget, boost::filesystem::path value);