X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5a5d6473c0f5339854a4105a57c6a733632f073..cd72551c2b6cbf67a4a5caf0ba00ba64e41183b2:/wxPython/src/misc2.i diff --git a/wxPython/src/misc2.i b/wxPython/src/misc2.i index 31fb8758ce..1e01336806 100644 --- a/wxPython/src/misc2.i +++ b/wxPython/src/misc2.i @@ -16,6 +16,7 @@ %{ #include "helpers.h" +#include "pyistream.h" #include #include #include @@ -48,9 +49,6 @@ %import streams.i %import utils.i -%{ - static wxString wxPyEmptyStr(""); -%} //--------------------------------------------------------------------------- // Dialog Functions @@ -65,15 +63,15 @@ wxString wxFileSelector(char* message, int x = -1, int y = -1); wxString wxGetTextFromUser(const wxString& message, - const wxString& caption = wxPyEmptyStr, - const wxString& default_value = wxPyEmptyStr, + const wxString& caption = wxEmptyString, + const wxString& default_value = wxEmptyString, wxWindow *parent = NULL, int x = -1, int y = -1, bool centre = TRUE); wxString wxGetPasswordFromUser(const wxString& message, - const wxString& caption = wxPyEmptyStr, - const wxString& default_value = wxPyEmptyStr, + const wxString& caption = wxEmptyString, + const wxString& default_value = wxEmptyString, wxWindow *parent = NULL); @@ -101,7 +99,7 @@ int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, int wxMessageBox(const wxString& message, - const wxString& caption = wxPyEmptyStr, + const wxString& caption = wxEmptyString, int style = wxOK | wxCENTRE, wxWindow *parent = NULL, int x = -1, int y = -1); @@ -186,6 +184,7 @@ enum wxSystemColour { wxSYS_COLOUR_SCROLLBAR, wxSYS_COLOUR_BACKGROUND, + wxSYS_COLOUR_DESKTOP = wxSYS_COLOUR_BACKGROUND, wxSYS_COLOUR_ACTIVECAPTION, wxSYS_COLOUR_INACTIVECAPTION, wxSYS_COLOUR_MENU, @@ -200,23 +199,28 @@ enum wxSystemColour wxSYS_COLOUR_HIGHLIGHT, wxSYS_COLOUR_HIGHLIGHTTEXT, wxSYS_COLOUR_BTNFACE, + wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE, wxSYS_COLOUR_BTNSHADOW, + wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW, wxSYS_COLOUR_GRAYTEXT, wxSYS_COLOUR_BTNTEXT, wxSYS_COLOUR_INACTIVECAPTIONTEXT, wxSYS_COLOUR_BTNHIGHLIGHT, + wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, + wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, + wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, wxSYS_COLOUR_3DDKSHADOW, wxSYS_COLOUR_3DLIGHT, wxSYS_COLOUR_INFOTEXT, wxSYS_COLOUR_INFOBK, wxSYS_COLOUR_LISTBOX, + wxSYS_COLOUR_HOTLIGHT, + wxSYS_COLOUR_GRADIENTACTIVECAPTION, + wxSYS_COLOUR_GRADIENTINACTIVECAPTION, + wxSYS_COLOUR_MENUHILIGHT, + wxSYS_COLOUR_MENUBAR, - wxSYS_COLOUR_DESKTOP = wxSYS_COLOUR_BACKGROUND, - wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE, - wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW, - wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, - wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, - wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT + wxSYS_COLOUR_MAX }; // possible values for wxSystemSettings::GetMetric() parameter @@ -285,13 +289,6 @@ public: // return true if the port has certain feature static bool HasFeature(wxSystemFeature index); - - // the backwards compatible versions, don't use these methods in the new - // code! - static wxColour GetSystemColour(int index); - static wxFont GetSystemFont(int index); - static int GetSystemMetric(int index); - }; @@ -541,6 +538,7 @@ class wxStopWatch public: // ctor starts the stop watch wxStopWatch(); + ~wxStopWatch(); void Start(long t = 0); void Pause(); void Resume(); @@ -1039,8 +1037,8 @@ public: { public: // ctors - MessageParameters(const wxString& filename=wxPyEmptyStr, - const wxString& mimetype=wxPyEmptyStr); + MessageParameters(const wxString& filename=wxEmptyString, + const wxString& mimetype=wxEmptyString); // accessors (called by GetOpenCommand) // filename @@ -1136,7 +1134,7 @@ public: // get the command to open/execute the file of given type %addmethods { PyObject* GetOpenCommand(const wxString& filename, - const wxString& mimetype=wxPyEmptyStr) { + const wxString& mimetype=wxEmptyString) { wxString str; if (self->GetOpenCommand(&str, wxFileType::MessageParameters(filename, mimetype))) return PyString_FromString(str.c_str()); @@ -1149,7 +1147,7 @@ public: // get the command to print the file of given type %addmethods { PyObject* GetPrintCommand(const wxString& filename, - const wxString& mimetype=wxPyEmptyStr) { + const wxString& mimetype=wxEmptyString) { wxString str; if (self->GetPrintCommand(&str, wxFileType::MessageParameters(filename, mimetype))) return PyString_FromString(str.c_str()); @@ -1162,7 +1160,7 @@ public: // Get all commands defined for this file type %addmethods { PyObject* GetAllCommands(const wxString& filename, - const wxString& mimetype=wxPyEmptyStr) { + const wxString& mimetype=wxEmptyString) { wxArrayString verbs; wxArrayString commands; if (self->GetAllCommands(&verbs, &commands,