X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d0e2ede057148772415ee526344f1a1597db3ae7..0a95d3369e08206a43032472418693f7726591e5:/wxPython/src/_cmndlgs.i?ds=sidebyside diff --git a/wxPython/src/_cmndlgs.i b/wxPython/src/_cmndlgs.i index c731226806..f488af7ecb 100644 --- a/wxPython/src/_cmndlgs.i +++ b/wxPython/src/_cmndlgs.i @@ -72,6 +72,11 @@ black.", ""); "Sets the i'th custom colour for the colour dialog. i should be an integer between 0 and 15. The default custom colours are all invalid colours.", ""); + + %property(ChooseFull, GetChooseFull, SetChooseFull, doc="See `GetChooseFull` and `SetChooseFull`"); + %property(Colour, GetColour, SetColour, doc="See `GetColour` and `SetColour`"); + %property(CustomColour, GetCustomColour, SetCustomColour, doc="See `GetCustomColour` and `SetCustomColour`"); + }; @@ -95,6 +100,8 @@ instance.", ""); DocDeclStr( wxColourData& , GetColourData(), "Returns a reference to the `wx.ColourData` used by the dialog.", ""); + + %property(ColourData, GetColourData, doc="See `GetColourData`"); }; @@ -175,20 +182,27 @@ public: void , SetPath(const wxString& path), "Sets the default path.", ""); + %property(Message, GetMessage, SetMessage, doc="See `GetMessage` and `SetMessage`"); + %property(Path, GetPath, SetPath, doc="See `GetPath` and `SetPath`"); }; //--------------------------------------------------------------------------- +%{ +// for compatibility only +#define wxHIDE_READONLY 0 +%} + enum { // These will dissappear in 2.8 wxOPEN, wxSAVE, - wxHIDE_READONLY, wxOVERWRITE_PROMPT, wxFILE_MUST_EXIST, wxMULTIPLE, wxCHANGE_DIR, + wxHIDE_READONLY, wxFD_OPEN, wxFD_SAVE, @@ -196,6 +210,7 @@ enum { wxFD_FILE_MUST_EXIST, wxFD_MULTIPLE, wxFD_CHANGE_DIR, + wxFD_PREVIEW, wxFD_DEFAULT_STYLE, }; @@ -283,10 +298,6 @@ example:: \"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\" ", ""); - DocDeclStr( - void , SetStyle(long style), - "Sets the dialog style.", ""); - DocDeclStr( void , SetFilterIndex(int filterIndex), "Sets the default filter index, starting from zero.", ""); @@ -311,10 +322,6 @@ example:: wxString , GetWildcard() const, "Returns the file dialog wildcard.", ""); - DocDeclStr( - long , GetStyle() const, - "Returns the dialog style.", ""); - DocDeclStr( int , GetFilterIndex() const, "Returns the index into the list of filters supplied, optionally, in @@ -366,6 +373,15 @@ style, use GetPath for the others.", ""); // const wxString &extensionList); + %property(Directory, GetDirectory, SetDirectory, doc="See `GetDirectory` and `SetDirectory`"); + %property(Filename, GetFilename, SetFilename, doc="See `GetFilename` and `SetFilename`"); + %property(Filenames, GetFilenames, doc="See `GetFilenames`"); + %property(FilterIndex, GetFilterIndex, SetFilterIndex, doc="See `GetFilterIndex` and `SetFilterIndex`"); + %property(Message, GetMessage, SetMessage, doc="See `GetMessage` and `SetMessage`"); + %property(Path, GetPath, SetPath, doc="See `GetPath` and `SetPath`"); + %property(Paths, GetPaths, doc="See `GetPaths`"); + %property(Wildcard, GetWildcard, SetWildcard, doc="See `GetWildcard` and `SetWildcard`"); + }; @@ -424,6 +440,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`"); }; @@ -461,7 +479,7 @@ public: DocDeclStr( int , GetSelection(), - "Get the index of teh currently selected item.", ""); + "Get the index of the currently selected item.", ""); DocDeclStr( wxString , GetStringSelection(), @@ -470,6 +488,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`"); }; @@ -503,6 +524,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`"); }; //--------------------------------------------------------------------------- @@ -522,6 +545,33 @@ public: //--------------------------------------------------------------------------- +DocStr( wxNumberEntryDialog, +"A dialog with spin control, ok and cancel buttons.", "") + +MustHaveApp(wxNumberEntryDialog); + +class wxNumberEntryDialog : public wxDialog +{ +public: + %pythonAppend wxNumberEntryDialog "self._setOORInfo(self)" + + DocCtorStr( + wxNumberEntryDialog(wxWindow *parent, + const wxString& message, + const wxString& prompt, + const wxString& caption, + long value, long min, long max, + const wxPoint& pos = wxDefaultPosition), + "Constructor. Use ShowModal method to show the dialog.", ""); + + long GetValue(); + + %property(Value, GetValue, doc="See `GetValue`"); + +}; + +//--------------------------------------------------------------------------- + DocStr(wxFontData, "This class holds a variety of information related to font dialogs and @@ -596,6 +646,14 @@ default is 0, 0 (unrestricted range).", ""); void , SetShowHelp(bool showHelp), "Determines whether the Help button will be displayed in the font 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(InitialFont, GetInitialFont, SetInitialFont, doc="See `GetInitialFont` and `SetInitialFont`"); + %property(ShowHelp, GetShowHelp, SetShowHelp, doc="See `GetShowHelp` and `SetShowHelp`"); + }; @@ -625,6 +683,8 @@ results with via the `wx.FontData` returned by `GetFontData`.", ""); wxFontData& , GetFontData(), "Returns a reference to the internal `wx.FontData` used by the wx.FontDialog.", ""); + + %property(FontData, GetFontData, doc="See `GetFontData`"); }; @@ -679,6 +739,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 @@ -744,7 +815,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 @@ -755,11 +827,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 @@ -859,6 +941,11 @@ and replace all events).", ""); DocDeclStr( void , SetReplaceString(const wxString& str), "", ""); + + %property(Dialog, GetDialog, doc="See `GetDialog`"); + %property(FindString, GetFindString, SetFindString, doc="See `GetFindString` and `SetFindString`"); + %property(Flags, GetFlags, SetFlags, doc="See `GetFlags` and `SetFlags`"); + %property(ReplaceString, GetReplaceString, SetReplaceString, doc="See `GetReplaceString` and `SetReplaceString`"); }; @@ -923,6 +1010,9 @@ public: void , SetReplaceString(const wxString& str), "Set the replacement string (used as initial value by the dialog).", ""); + %property(FindString, GetFindString, SetFindString, doc="See `GetFindString` and `SetFindString`"); + %property(Flags, GetFlags, SetFlags, doc="See `GetFlags` and `SetFlags`"); + %property(ReplaceString, GetReplaceString, SetReplaceString, doc="See `GetReplaceString` and `SetReplaceString`"); }; @@ -987,6 +1077,7 @@ non-None. Use Show to display the dialog.", ""); void , SetData(wxFindReplaceData *data), "Set the FindReplaceData object used by this dialog.", ""); + %property(Data, GetData, SetData, doc="See `GetData` and `SetData`"); }; //---------------------------------------------------------------------------