X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/42e2bbb9e149c589ab03cf6d2adec0617a9f0f24..fe45b493dcc42fea4ad4f781a4fb7844d2e95fd0:/wxPython/src/_cmndlgs.i?ds=sidebyside diff --git a/wxPython/src/_cmndlgs.i b/wxPython/src/_cmndlgs.i index bb15ae0138..56a841e97a 100644 --- a/wxPython/src/_cmndlgs.i +++ b/wxPython/src/_cmndlgs.i @@ -113,9 +113,10 @@ wxColour wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL, //-------------------------------------------------------------------------------- enum { + wxDD_CHANGE_DIR, + wxDD_DIR_MUST_EXIST, wxDD_NEW_DIR_BUTTON, wxDD_DEFAULT_STYLE, - wxDD_CHANGE_DIR, }; DocStr(wxDirDialog, @@ -129,10 +130,12 @@ Window Styles wx.DEFAULT_DIALOG_STYLE, wx.DD_NEW_DIR_BUTTON and wx.RESIZE_BORDER. - wx.DD_NEW_DIR_BUTTON Add 'Create new directory' button and allow - directory names to be editable. On Windows - the new directory button is only available - with recent versions of the common dialogs. + wx.DD_DIR_MUST_EXIST The dialog will allow the user to choose only an + existing folder. When this style is not given, a + 'Create new directory' button is added to the dialog + (on Windows) or some other way is provided to the + user to type the name of a new folder. + Use this instead of deprecated wx.DD_NEW_DIR_BUTTON. wx.DD_CHANGE_DIR Change the current working directory to the directory chosen by the user. @@ -195,15 +198,6 @@ public: %} enum { - // These will dissappear in 2.8 - wxOPEN, - wxSAVE, - wxOVERWRITE_PROMPT, - wxFILE_MUST_EXIST, - wxMULTIPLE, - wxCHANGE_DIR, - wxHIDE_READONLY, - wxFD_OPEN, wxFD_SAVE, wxFD_OVERWRITE_PROMPT, @@ -214,6 +208,17 @@ enum { wxFD_DEFAULT_STYLE, }; +%pythoncode { + %# deprecated names + OPEN = FD_OPEN + SAVE = FD_SAVE + OVERWRITE_PROMPT = FD_OVERWRITE_PROMPT + FILE_MUST_EXIST = FD_FILE_MUST_EXIST + MULTIPLE = FD_MULTIPLE + CHANGE_DIR = FD_CHANGE_DIR +} + + DocStr(wxFileDialog, "wx.FileDialog allows the user to select one or more files from the filesystem.", " @@ -440,6 +445,8 @@ If an item is selected then its index will appear in the list.", ""); return wxArrayInt2PyList_helper(self->GetSelections()); } } + + %property(Selections, GetSelections, SetSelections, doc="See `GetSelections` and `SetSelections`"); }; @@ -486,6 +493,9 @@ public: DocDeclStr( void , SetSelection(int sel), "Set the current selected item to sel", ""); + + %property(Selection, GetSelection, SetSelection, doc="See `GetSelection` and `SetSelection`"); + %property(StringSelection, GetStringSelection, doc="See `GetStringSelection`"); }; @@ -519,6 +529,8 @@ or the original value if the user has pressed Cancel.", ""); DocDeclStr( void , SetValue(const wxString& value), "Sets the default text value.", ""); + + %property(Value, GetValue, SetValue, doc="See `GetValue` and `SetValue`"); }; //--------------------------------------------------------------------------- @@ -558,6 +570,9 @@ public: "Constructor. Use ShowModal method to show the dialog.", ""); long GetValue(); + + %property(Value, GetValue, doc="See `GetValue`"); + }; //--------------------------------------------------------------------------- @@ -640,7 +655,7 @@ dialog (Windows only). The default value is false.", ""); %property(AllowSymbols, GetAllowSymbols, SetAllowSymbols, doc="See `GetAllowSymbols` and `SetAllowSymbols`"); %property(ChosenFont, GetChosenFont, SetChosenFont, doc="See `GetChosenFont` and `SetChosenFont`"); %property(Colour, GetColour, SetColour, doc="See `GetColour` and `SetColour`"); - %property(EnableEffects, GetEnableEffects, doc="See `GetEnableEffects`"); +// %property(EnableEffects, GetEnableEffects, doc="See `GetEnableEffects`"); %property(InitialFont, GetInitialFont, SetInitialFont, doc="See `GetInitialFont` and `SetInitialFont`"); %property(ShowHelp, GetShowHelp, SetShowHelp, doc="See `GetShowHelp` and `SetShowHelp`"); @@ -729,6 +744,17 @@ public: //--------------------------------------------------------------------------- +enum { + wxPD_AUTO_HIDE, + wxPD_APP_MODAL, + wxPD_CAN_ABORT, + wxPD_ELAPSED_TIME, + wxPD_ESTIMATED_TIME, + wxPD_REMAINING_TIME, + wxPD_SMOOTH, + wxPD_CAN_SKIP +}; + DocStr(wxProgressDialog, "A dialog that shows a short message and a progress bar. Optionally, it @@ -794,7 +820,8 @@ parent window only.", ""); // only if style is set. This is so the API doesn't change for existing // users... DocDeclAStr( - virtual bool , Update(int value, const wxString& newmsg = wxPyEmptyString, + virtual bool , Update(int value, + const wxString& newmsg = wxPyEmptyString, bool *OUTPUT), "Update(self, int value, String newmsg) --> (continue, skip)", "Updates the dialog, setting the progress bar to the new value and, if @@ -805,11 +832,21 @@ boolean values, ``(continue, skip)`` where ``continue`` is ``True`` unless the Cancel button has been pressed, and ``skip`` is ``False`` unless the Skip button (if any) has been pressed. -If the ``continue`` return value is ``false``, the application can either +If the ``continue`` return value is ``False``, the application can either immediately destroy the dialog or ask the user for confirmation, and if the abort is not confirmed the dialog may be resumed with `Resume` function. ", ""); + + DocDeclAStr( + virtual bool , Pulse(const wxString& newmsg = wxPyEmptyString, + bool *OUTPUT), + "Pulse(self, String newmsg) --> (continue, skip)", + "Just like `Update` but switches the dialog to use a gauge in +interminante mode and calls `wx.Gauge.Pulse` to show the user a bit of +progress.", ""); + %pythoncode { UpdatePulse = Pulse } + DocDeclStr( void , Resume(), "Can be used to continue with the dialog, after the user had chosen to