X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fwx_util.h;h=1143c5b53a13916c44746e768841a6c4222c6f98;hb=0062a0ad4e8bde2866cd42404ea103ed29fa59db;hp=30e2b739acacd038e8431ca6fcde871ca56aeca3;hpb=2d2af972a53a2c11b95469058803b4eaed2d3c01;p=dcpomatic.git diff --git a/src/wx/wx_util.h b/src/wx/wx_util.h index 30e2b739a..1143c5b53 100644 --- a/src/wx/wx_util.h +++ b/src/wx/wx_util.h @@ -28,17 +28,21 @@ #define DCPOMATIC_WX_UTIL_H +#include "wx_ptr.h" +#include "lib/config.h" #include "lib/dcpomatic_time.h" -#include "lib/warnings.h" -DCPOMATIC_DISABLE_WARNINGS -#include -DCPOMATIC_ENABLE_WARNINGS +#include +LIBDCP_DISABLE_WARNINGS #include -#include +#include +LIBDCP_ENABLE_WARNINGS #include +#include class FilePickerCtrl; +class LanguageTagWidget; +class RegionSubtagWidget; class wxDirPickerCtrl; class wxSpinCtrl; class wxSpinCtrlDouble; @@ -66,6 +70,8 @@ class PasswordEntry; #define DCPOMATIC_CHECKBOX_BOTTOM_PAD 0 #endif +#define DCPOMATIC_SUBHEADING_TOP_PAD 16 + /** Amount by which you need to top-pad a choice to make it line up, in some cases */ #ifdef DCPOMATIC_OSX #define DCPOMATIC_CHOICE_TOP_PAD 1 @@ -113,15 +119,17 @@ extern wxString context_translation (wxString); extern std::string string_client_data (wxClientData* o); extern wxString time_to_timecode (dcpomatic::DCPTime t, double fps); extern void setup_audio_channels_choice (wxChoice* choice, int minimum); -extern wxSplashScreen* maybe_show_splash (); +extern wx_ptr 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); +extern wxString icon_path(std::string name); extern wxSize small_button_size (wxWindow* parent, wxString text); extern bool gui_is_dark (); extern double dpi_scale_factor (wxWindow* window); - +extern int search_ctrl_height (); +extern void report_config_load_failure(wxWindow* parent, Config::LoadFailure what); struct Offset { @@ -153,12 +161,15 @@ extern void checked_set (wxCheckBox* widget, bool value); extern void checked_set (wxRadioButton* widget, bool value); extern void checked_set (wxStaticText* widget, std::string value); extern void checked_set (wxStaticText* widget, wxString value); +extern void checked_set(LanguageTagWidget* widget, dcp::LanguageTag value); +extern void checked_set(LanguageTagWidget* widget, boost::optional value); +extern void checked_set(RegionSubtagWidget* widget, boost::optional value); extern int wx_get (wxChoice* widget); extern int wx_get (wxSpinCtrl* widget); extern double wx_get (wxSpinCtrlDouble* widget); -#if defined(__WXMSW__) +#ifdef DCPOMATIC_WINDOWS #define DCPOMATIC_USE_OWN_PICKER #endif