From 50e55c13ea2da06b1b03069673ae45edd780fc99 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 30 Dec 2011 06:14:17 +0000 Subject: [PATCH] Interface fixes and tweaks for Phoenix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/anybutton.h | 1 + interface/wx/dirdlg.h | 2 ++ interface/wx/event.h | 17 +++++++++++ interface/wx/filedlg.h | 2 ++ interface/wx/image.h | 3 ++ interface/wx/process.h | 35 --------------------- interface/wx/scrolbar.h | 5 +++ interface/wx/textctrl.h | 2 ++ interface/wx/toplevel.h | 8 +++++ interface/wx/utils.h | 66 ++++++++++++++++++++++++++++++++++++++++ interface/wx/wrapsizer.h | 8 +++++ 11 files changed, 114 insertions(+), 35 deletions(-) diff --git a/interface/wx/anybutton.h b/interface/wx/anybutton.h index fa59a5373b..448ddd5742 100644 --- a/interface/wx/anybutton.h +++ b/interface/wx/anybutton.h @@ -14,6 +14,7 @@ #define wxBU_EXACTFIT 0x0001 #define wxBU_NOTEXT 0x0002 +#define wxBU_AUTODRAW 0x0004 /** diff --git a/interface/wx/dirdlg.h b/interface/wx/dirdlg.h index f844523a87..2e0c607f07 100644 --- a/interface/wx/dirdlg.h +++ b/interface/wx/dirdlg.h @@ -6,6 +6,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) + /** @class wxDirDialog diff --git a/interface/wx/event.h b/interface/wx/event.h index 7cf8ec67f4..cb1b2aeb63 100644 --- a/interface/wx/event.h +++ b/interface/wx/event.h @@ -1560,6 +1560,23 @@ public: +enum +{ + wxJOYSTICK1, + wxJOYSTICK2 +}; + +// Which button is down? +enum +{ + wxJOY_BUTTON_ANY = -1, + wxJOY_BUTTON1 = 1, + wxJOY_BUTTON2 = 2, + wxJOY_BUTTON3 = 4, + wxJOY_BUTTON4 = 8 +}; + + /** @class wxJoystickEvent diff --git a/interface/wx/filedlg.h b/interface/wx/filedlg.h index e8dd236323..63b6bbedd8 100644 --- a/interface/wx/filedlg.h +++ b/interface/wx/filedlg.h @@ -17,6 +17,8 @@ enum wxFD_PREVIEW = 0x0100 }; +#define wxFD_DEFAULT_STYLE wxFD_OPEN + /** @class wxFileDialog diff --git a/interface/wx/image.h b/interface/wx/image.h index 8f19e19969..de1676a55f 100644 --- a/interface/wx/image.h +++ b/interface/wx/image.h @@ -350,6 +350,9 @@ const unsigned char wxIMAGE_ALPHA_TRANSPARENT = 0; */ const unsigned char wxIMAGE_ALPHA_OPAQUE = 0xff; +const unsigned char wxIMAGE_ALPHA_THRESHOLD = 0x80; + + /** @class wxImage diff --git a/interface/wx/process.h b/interface/wx/process.h index 80117f40ff..edbe214ffa 100644 --- a/interface/wx/process.h +++ b/interface/wx/process.h @@ -6,41 +6,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -/** - Signal constants used by wxProcess. -*/ -enum wxSignal -{ - wxSIGNONE = 0, //!< verify if the process exists under Unix - wxSIGHUP, - wxSIGINT, - wxSIGQUIT, - wxSIGILL, - wxSIGTRAP, - wxSIGABRT, - wxSIGEMT, - wxSIGFPE, - wxSIGKILL, //!< forcefully kill, dangerous! - wxSIGBUS, - wxSIGSEGV, - wxSIGSYS, - wxSIGPIPE, - wxSIGALRM, - wxSIGTERM //!< terminate the process gently -}; - -/** - Return values for wxProcess::Kill. -*/ -enum wxKillError -{ - wxKILL_OK, //!< no error - wxKILL_BAD_SIGNAL, //!< no such signal - wxKILL_ACCESS_DENIED, //!< permission denied - wxKILL_NO_PROCESS, //!< no such process - wxKILL_ERROR //!< another, unspecified error -}; - /** @class wxProcess diff --git a/interface/wx/scrolbar.h b/interface/wx/scrolbar.h index 5ecc481320..9a90d332ad 100644 --- a/interface/wx/scrolbar.h +++ b/interface/wx/scrolbar.h @@ -240,5 +240,10 @@ public: @see GetThumbPosition() */ virtual void SetThumbPosition(int viewStart); + + /** + Returns @true for scrollbars that have the vertical style set. + */ + bool IsVertical() const; }; diff --git a/interface/wx/textctrl.h b/interface/wx/textctrl.h index b3bb03dc46..048cf6564a 100644 --- a/interface/wx/textctrl.h +++ b/interface/wx/textctrl.h @@ -52,6 +52,8 @@ #define wxTE_RICH2 0x8000 +#define wxTEXT_TYPE_ANY 0 + /** wxTextCoord is a line or row number diff --git a/interface/wx/toplevel.h b/interface/wx/toplevel.h index 813925bf27..2656212f0b 100644 --- a/interface/wx/toplevel.h +++ b/interface/wx/toplevel.h @@ -34,6 +34,14 @@ enum wxFULLSCREEN_NOCAPTION }; +#define wxDEFAULT_FRAME_STYLE (wxSYSTEM_MENU | \ + wxRESIZE_BORDER | \ + wxMINIMIZE_BOX | \ + wxMAXIMIZE_BOX | \ + wxCLOSE_BOX | \ + wxCAPTION | \ + wxCLIP_CHILDREN) + /** @class wxTopLevelWindow diff --git a/interface/wx/utils.h b/interface/wx/utils.h index 3dfa72f319..0ce06ea02c 100644 --- a/interface/wx/utils.h +++ b/interface/wx/utils.h @@ -6,6 +6,56 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +/** + Signal constants used by wxProcess. +*/ +enum wxSignal +{ + wxSIGNONE = 0, //!< verify if the process exists under Unix + wxSIGHUP, + wxSIGINT, + wxSIGQUIT, + wxSIGILL, + wxSIGTRAP, + wxSIGABRT, + wxSIGEMT, + wxSIGFPE, + wxSIGKILL, //!< forcefully kill, dangerous! + wxSIGBUS, + wxSIGSEGV, + wxSIGSYS, + wxSIGPIPE, + wxSIGALRM, + wxSIGTERM //!< terminate the process gently +}; + +/** + Return values for wxProcess::Kill. +*/ +enum wxKillError +{ + wxKILL_OK, //!< no error + wxKILL_BAD_SIGNAL, //!< no such signal + wxKILL_ACCESS_DENIED, //!< permission denied + wxKILL_NO_PROCESS, //!< no such process + wxKILL_ERROR //!< another, unspecified error +}; + +enum wxKillFlags +{ + wxKILL_NOCHILDREN = 0, //!< don't kill children + wxKILL_CHILDREN = 1 //!< kill children +}; + +enum wxShutdownFlags +{ + wxSHUTDOWN_FORCE = 1, //!< can be combined with other flags (MSW-only) + wxSHUTDOWN_POWEROFF = 2, //!< power off the computer + wxSHUTDOWN_REBOOT = 4, //!< shutdown and reboot + wxSHUTDOWN_LOGOFF = 8 //!< close session (currently MSW-only) +}; + + /** @class wxWindowDisabler @@ -523,6 +573,22 @@ void wxQsort(void* pbase, size_t total_elems, */ void wxSetDisplayName(const wxString& displayName); + +/** + flags for wxStripMenuCodes +*/ +enum +{ + // strip '&' characters + wxStrip_Mnemonics = 1, + + // strip everything after '\t' + wxStrip_Accel = 2, + + // strip everything (this is the default) + wxStrip_All = wxStrip_Mnemonics | wxStrip_Accel +}; + /** Strips any menu codes from @a str and returns the result. diff --git a/interface/wx/wrapsizer.h b/interface/wx/wrapsizer.h index f3e09387ca..da82f34e19 100644 --- a/interface/wx/wrapsizer.h +++ b/interface/wx/wrapsizer.h @@ -6,6 +6,14 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// flags for wxWrapSizer +enum +{ + wxEXTEND_LAST_ON_EACH_LINE, + wxREMOVE_LEADING_SPACES, + wxWRAPSIZER_DEFAULT_FLAGS +}; + /** @class wxWrapSizer -- 2.45.2