]> git.saurik.com Git - wxWidgets.git/commitdiff
Added some more docstrings, and also a few little tweaks along the way.
authorRobin Dunn <robin@alldunn.com>
Wed, 18 Feb 2004 02:12:12 +0000 (02:12 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 18 Feb 2004 02:12:12 +0000 (02:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/_checkbox.i
wxPython/src/_choice.i
wxPython/src/_clipbrd.i
wxPython/src/_cmndlgs.i
wxPython/src/gtk/controls.py
wxPython/src/gtk/controls_wrap.cpp
wxPython/src/gtk/misc.py
wxPython/src/gtk/misc_wrap.cpp
wxPython/src/gtk/windows.py
wxPython/src/gtk/windows_wrap.cpp

index 7d2b4a1fce402b01fde360755b8a4c671d5b6425..39fd4105e71bbea98789e498ca79bb339e63f1db 100644 (file)
@@ -44,34 +44,96 @@ enum wxCheckBoxState
 
 //---------------------------------------------------------------------------
 
+DocStr(wxCheckBox,
+"A checkbox is a labelled box which by default is either on (checkmark is
+visible) or off (no checkmark). Optionally (When the wxCHK_3STATE style flag
+is set) it can have a third state, called the mixed or undetermined
+state. Often this is used as a \"Does Not Apply\" state.");
+
+RefDoc(wxCheckBox, "
+ Styles
+    wx.CHK_2STATE:     Create a 2-state checkbox. This is the default.
+    wx.CHK_3STATE:     Create a 3-state checkbox.
+    wx.CHK_ALLOW_3RD_STATE_FOR_USER: By default a user can't set a 3-state
+                                     checkbox to the third state. It can only
+                                     be done from code. Using this flags
+                                     allows the user to set the checkbox to
+                                     the third state by clicking.
+    wx.ALIGN_RIGHT:    Makes the text appear on the left of the checkbox.
+
+ Events
+    EVT_CHECKBOX:       Sent when checkbox is clicked.
+");
+
+
+        
 class wxCheckBox : public wxControl
 {
 public:
     %pythonAppend wxCheckBox         "self._setOORInfo(self)"
     %pythonAppend wxCheckBox()       ""
+
+    DocCtorStr(
+        wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label,
+                   const wxPoint& pos = wxDefaultPosition,
+                   const wxSize& size = wxDefaultSize,
+                   long style = 0,
+                   const wxValidator& validator = wxDefaultValidator,
+                   const wxString& name = wxPyCheckBoxNameStr),
+        "Creates and shows a CheckBox control");
+
+    DocCtorStrName(
+        wxCheckBox(),
+        "Precreate a CheckBox for 2-phase creation.",
+        PreCheckBox);
+
+    
+    DocDeclStr(
+        bool, Create(wxWindow* parent, wxWindowID id, const wxString& label,
+                     const wxPoint& pos = wxDefaultPosition,
+                     const wxSize& size = wxDefaultSize,
+                     long style = 0,
+                     const wxValidator& validator = wxDefaultValidator,
+                     const wxString& name = wxPyCheckBoxNameStr),
+        "Actually create the GUI CheckBox for 2-phase creation.");
+
+    
+    DocDeclStr(
+        bool, GetValue(),
+        "Gets the state of a 2-state CheckBox.  Returns True if it is checked,\n"
+        "False otherwise.");
+    
+    DocDeclStr(
+        bool, IsChecked(),
+        "Similar to GetValue, but raises an exception if it is not a 2-state CheckBox.");
+    
+    DocDeclStr(
+        void, SetValue(const bool state),
+        "Set the state of a 2-state CheckBox.  Pass True for checked,\n"
+        "False for unchecked.");
+    
+    DocDeclStr(
+        wxCheckBoxState, Get3StateValue() const,
+        "Returns wx.CHK_UNCHECKED when the CheckBox is unchecked, wx.CHK_CHECKED when\n"
+        "it is checked and wx.CHK_UNDETERMINED when it's in the undetermined state.\n"
+        "Raises an exceptiion when the function is used with a 2-state CheckBox.");
+    
+    DocDeclStr(
+        void, Set3StateValue(wxCheckBoxState state),
+        "Sets the CheckBox to the given state.  The state parameter can be\n"
+        "one of the following: wx.CHK_UNCHECKED (Check is off), wx.CHK_CHECKED\n"
+        "(Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an\n"
+        "exception  when the CheckBox is a 2-state checkbox and setting the state\n"
+        "to wx.CHK_UNDETERMINED.");
+    
+    DocDeclStr(
+        bool, Is3State() const,
+        "Returns whether or not the CheckBox is a 3-state CheckBox.");
+    
+    DocDeclStr(
+        bool, Is3rdStateAllowedForUser() const,
+        "Returns whether or not the user can set the CheckBox to the third state.");
     
-    wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label,
-               const wxPoint& pos = wxDefaultPosition,
-               const wxSize& size = wxDefaultSize,
-               long style = 0,
-               const wxValidator& validator = wxDefaultValidator,
-               const wxString& name = wxPyCheckBoxNameStr);
-    %name(PreCheckBox)wxCheckBox();
-
-    bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
-               const wxPoint& pos = wxDefaultPosition,
-               const wxSize& size = wxDefaultSize,
-               long style = 0,
-               const wxValidator& validator = wxDefaultValidator,
-               const wxString& name = wxPyCheckBoxNameStr);
-
-    bool GetValue();
-    bool IsChecked();
-    void SetValue(const bool state);
-    wxCheckBoxState Get3StateValue() const;
-    void Set3StateValue(wxCheckBoxState state);
-    bool Is3State() const;
-    bool Is3rdStateAllowedForUser() const;
 };
 
 //---------------------------------------------------------------------------
index 604cf4c8972c2cb4c3f89c4a968900a5e59fa263..65069848f3917009bf34594ae75a30b998b1cc00 100644 (file)
@@ -20,42 +20,75 @@ MAKE_CONST_WXSTRING(ChoiceNameStr);
 //---------------------------------------------------------------------------
 %newgroup;
 
+
+DocStr(wxChoice,       
+"A Choice control is used to select one of a list of strings. Unlike a ListBox,
+only the selection is visible until the user pulls down the menu of choices.");
+
+RefDoc(wxChoice, "
+ Events
+    EVT_CHOICE:         Sent when an item in the list is selected.
+");
+       
+
 class wxChoice : public wxControlWithItems
 {
 public:
     %pythonAppend wxChoice         "self._setOORInfo(self)"
     %pythonAppend wxChoice()       ""
 
-    wxChoice(wxWindow *parent, wxWindowID id,
-             const wxPoint& pos = wxDefaultPosition,
-             const wxSize& size = wxDefaultSize,
-             //int choices=0, wxString* choices_array=NULL,
-             const wxArrayString& choices = wxPyEmptyStringArray,
-             long style = 0,
-             const wxValidator& validator = wxDefaultValidator,
-             const wxString& name = wxPyChoiceNameStr);
-    %name(PreChoice)wxChoice();
-
-    bool Create(wxWindow *parent, wxWindowID id,
-                const wxPoint& pos = wxDefaultPosition,
-                const wxSize& size = wxDefaultSize,
-                //int choices=0, wxString* choices_array=NULL,
-                const wxArrayString& choices = wxPyEmptyStringArray,
-                long style = 0,
-                const wxValidator& validator = wxDefaultValidator,
-                const wxString& name = wxPyChoiceNameStr);
-
-#ifndef __WXX11__
-    int GetColumns();
-    void SetColumns(const int n = 1);
-#endif
-    void SetSelection(const int n);
-    void SetStringSelection(const wxString& string);
-    void SetString(int n, const wxString& s);
-
-    %pragma(python) addtoclass = "
-    Select = SetSelection
-    "
+    DocCtorAStr(
+        wxChoice(wxWindow *parent, wxWindowID id,
+                 const wxPoint& pos = wxDefaultPosition,
+                 const wxSize& size = wxDefaultSize,
+                 const wxArrayString& choices = wxPyEmptyStringArray,
+                 long style = 0,
+                 const wxValidator& validator = wxDefaultValidator,
+                 const wxString& name = wxPyChoiceNameStr),
+        "__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,\n" 
+        "    List choices=[], long style=0, Validator validator=DefaultValidator,\n"
+        "    String name=ChoiceNameStr) -> Choice",
+        "Create and show a Choice control");
+
+    DocCtorStrName(
+        wxChoice(),
+        "Precreate a Choice control for 2-phase creation.",
+        PreChoice);
+                
+
+    DocDeclAStr(
+        bool, Create(wxWindow *parent, wxWindowID id,
+                     const wxPoint& pos = wxDefaultPosition,
+                     const wxSize& size = wxDefaultSize,
+                     const wxArrayString& choices = wxPyEmptyStringArray,
+                     long style = 0,
+                     const wxValidator& validator = wxDefaultValidator,
+                     const wxString& name = wxPyChoiceNameStr),
+        "Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,\n" 
+        "    List choices=[], long style=0, Validator validator=DefaultValidator,\n"
+        "    String name=ChoiceNameStr) -> bool",
+        "Actually create the GUI Choice control for 2-phase creation");
+    
+
+//     // These are only meaningful on wxMotif...
+//     int GetColumns();
+//     void SetColumns(const int n = 1);
+
+
+    DocDeclStr(
+        void , SetSelection(const int n),
+        "Select the n'th item (zero based) in the list.");
+    
+    DocDeclStr(
+        void , SetStringSelection(const wxString& string),
+        "Select the item with the specifed string");
+    
+    DocDeclStr(
+        void , SetString(int n, const wxString& string),
+        "Set the label for the n'th item (zero based) in the list.");
+    
+
+    %pythoncode { Select = SetSelection }
 };
 
 //---------------------------------------------------------------------------
index ef48ae8daa9d96f3bec9396edc393d118b23c32b..f0a2dde60ec8643ea13ee88df280c74eaa3ec446 100644 (file)
 %{
 %}
 
+DocStr(wxClipboard,
+       
+"wx.Clipboard represents the system clipboard and provides methods to copy data
+to or paste data from it.  Normally, you should only use wx.TheClipboard which
+is a reference to a global wx.Clipboard instance.
+
+Call wx.TheClipboard.Open to get ownership of the clipboard. If this operation
+returns True, you now own the clipboard. Call wx.TheClipboard.SetData to put
+data on the clipboard, or wx.TheClipboard.GetData to retrieve data from the
+clipboard.  Call wx.TheClipboard.Close to close the clipboard and relinquish
+ownership. You should keep the clipboard open only momentarily.
+");
+
 
 
-// wxClipboard represents the system clipboard. Normally, you should use
-// wxTheClipboard which is a global pointer to the (unique) clipboard.
-//
-// Clipboard can be used to copy data to/paste data from. It works together
-// with wxDataObject.
 class wxClipboard : public wxObject {
 public:
-    wxClipboard();
+    DocCtorStr( wxClipboard(), "" );
+    
     ~wxClipboard();
 
-    // open the clipboard before Add/SetData() and GetData()
-    virtual bool Open();
 
-    // close the clipboard after Add/SetData() and GetData()
-    virtual void Close();
+    DocDeclStr(
+        virtual bool , Open(),
+        "Call this function to open the clipboard before calling SetData\n"
+        "and GetData.  Call Close when you have finished with the clipboard.\n"
+        "You should keep the clipboard open for only a very short time.\n"
+        "Returns true on success. ");
+    
+
+    DocDeclStr(
+        virtual void , Close(),
+        "Closes the clipboard.");
+    
 
-    // query whether the clipboard is opened
-    virtual bool IsOpened() const;
+    DocDeclStr(
+        virtual bool , IsOpened() const,
+        "Query whether the clipboard is opened");
+    
 
 
     %apply SWIGTYPE *DISOWN { wxDataObject *data };
     
-    // add to the clipboard data
-    //
-    // NB: the clipboard owns the pointer and will delete it, so data must be
-    //     allocated on the heap
-    virtual bool AddData( wxDataObject *data );
+    DocDeclStr(
+        virtual bool , AddData( wxDataObject *data ),
+        "Call this function to add the data object to the clipboard. You\n"
+        "may call this function repeatedly after having cleared the clipboard.\n"
+        "After this function has been called, the clipboard owns the data, so\n"
+        "do not delete the data explicitly.");
+    
 
-    // set the clipboard data, this is the same as Clear() followed by
-    // AddData()
-    virtual bool SetData( wxDataObject *data );
+    DocDeclStr(
+        virtual bool , SetData( wxDataObject *data ),
+        "Set the clipboard data, this is the same as Clear followed by AddData.");
+    
 
     %clear wxDataObject *data;
     
-    // ask if data in correct format is available
-    virtual bool IsSupported( const wxDataFormat& format );
 
-    // fill data with data on the clipboard (if available)
-    virtual bool GetData( wxDataObject& data );
+    DocDeclStr(
+        virtual bool , IsSupported( const wxDataFormat& format ),
+        "Returns True if the given format is available in the data object(s) on\n"
+        "the clipboard.");
+
+    DocDeclStr(
+        virtual bool , GetData( wxDataObject& data ),
+        "Call this function to fill data with data on the clipboard, if available\n"
+        "in the required format. Returns true on success.");
+    
+    
+    DocDeclStr(
+        virtual void , Clear(),
+        "Clears data from the clipboard object and also  the system's clipboard\n"
+        "if possible.");
     
-    // clears wxTheClipboard and the system's clipboard if possible
-    virtual void Clear();
 
-    // flushes the clipboard: this means that the data which is currently on
-    // clipboard will stay available even after the application exits (possibly
-    // eating memory), otherwise the clipboard will be emptied on exit
-    virtual bool Flush();
+    DocDeclStr(
+        virtual bool , Flush(),
+        "Flushes the clipboard: this means that the data which is currently on\n"
+        "clipboard will stay available even after the application exits (possibly\n"
+        "eating memory), otherwise the clipboard will be emptied on exit.\n"
+        "Returns False if the operation is unsuccesful for any reason.");
+    
 
-    // X11 has two clipboards which get selected by this call. Empty on MSW.
-    virtual void UsePrimarySelection( bool primary = False );
+    DocDeclStr(
+        virtual void , UsePrimarySelection( bool primary = True ),
+        "On platforms supporting it (the X11 based platforms), selects the so\n"
+        "called PRIMARY SELECTION as the clipboard as opposed to the normal\n"
+        "clipboard, if primary is True.");
 };
 
 
@@ -83,16 +120,19 @@ wxClipboard* const wxTheClipboard;
 //---------------------------------------------------------------------------
 
 
-// helpful class for opening the clipboard and automatically closing it when
-// the locker is destroyed
+DocStr(wxClipboardLocker,
+"A helpful class for opening the clipboard and automatically closing it when
+the locker is destroyed.");
+
 class wxClipboardLocker
 {
 public:
     wxClipboardLocker(wxClipboard *clipboard = NULL);
     ~wxClipboardLocker();
 
-    //bool operator!() const;
-
+    DocStr(__nonzero__,
+           "A ClipboardLocker instance evaluates to True if the clipboard was\n"
+           "successfully opened.")
     %extend {
         bool __nonzero__()   { return !!(*self); }
     }
index 745d15f1e89ff1b2ab8bc362668f2c9d0b50e4f7..66c82e438d352f5ccc67b5025100995b938bd3b9 100644 (file)
@@ -26,86 +26,249 @@ MAKE_CONST_WXSTRING(MessageBoxCaptionStr);
 //---------------------------------------------------------------------------
 
 
+DocStr(wxColourData,
+       "This class holds a variety of information related to colour dialogs.");
+    
 class wxColourData : public wxObject {
 public:
-    wxColourData();
+    DocCtorStr(
+        wxColourData(),
+        "Constructor, sets default values.");
+    
     ~wxColourData();
 
-    bool GetChooseFull();
-    wxColour GetColour();
-    wxColour GetCustomColour(int i);
-    void SetChooseFull(int flag);
-    void SetColour(const wxColour& colour);
-    void SetCustomColour(int i, const wxColour& colour);
+    
+    DocDeclStr(
+        bool , GetChooseFull(),
+        "Under Windows, determines whether the Windows colour dialog will display\n"
+        "the full dialog with custom colour selection controls. Has no meaning\n"
+        "under other platforms.  The default value is true.");
+    
+    DocDeclStr(
+        wxColour , GetColour(),
+        "Gets the colour (pre)selected by the dialog.");
+    
+    DocDeclStr(
+        wxColour , GetCustomColour(int i),
+        "Gets the i'th custom colour associated with the colour dialog. i should\n"
+        "be an integer between 0 and 15. The default custom colours are all white.");
+    
+    DocDeclStr(
+        void , SetChooseFull(int flag),
+        "Under Windows, tells the Windows colour dialog to display the full dialog\n"
+        "with custom colour selection controls. Under other platforms, has no effect.\n"
+        "The default value is true.");
+    
+    DocDeclStr(
+        void , SetColour(const wxColour& colour),
+        "Sets the default colour for the colour dialog.  The default colour is black.");
+    
+    DocDeclStr(
+        void , SetCustomColour(int i, const wxColour& colour),
+        "Sets the i'th custom colour for the colour dialog. i should be an integer\n"
+        "between 0 and 15. The default custom colours are all white.");
+    
 };
 
 
+DocStr(wxColourDialog,
+       "This class represents the colour chooser dialog.");
+
 class wxColourDialog : public wxDialog {
 public:
     %pythonAppend wxColourDialog   "self._setOORInfo(self)"
 
-    wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
+   DocCtorStr(
+       wxColourDialog(wxWindow* parent, wxColourData* data = NULL),
+       "Constructor. Pass a parent window, and optionally a ColourData, which\n"
+       "will be copied to the colour dialog's internal ColourData instance.");
 
-    wxColourData& GetColourData();
-    int ShowModal();
+    DocDeclStr(
+        wxColourData& , GetColourData(),
+        "Returns a reference to the ColourData used by the dialog.");
 };
 
 
 //--------------------------------------------------------------------------------
 
+
+DocStr(wxDirDialog,
+       "This class represents the directory chooser dialog.");
+
+RefDoc(wxDirDialog, "
+ Styles
+    wxDD_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.");
+
 class wxDirDialog : public wxDialog {
 public:
     %pythonAppend wxDirDialog   "self._setOORInfo(self)"
     
-    wxDirDialog(wxWindow* parent,
-                const wxString& message = wxPyDirSelectorPromptStr,
-                const wxString& defaultPath = wxPyEmptyString,
-                long style = 0,
-                const wxPoint& pos = wxDefaultPosition,
-                const wxSize& size = wxDefaultSize,
-                const wxString& name = wxPyDirDialogNameStr);
-
-
-    wxString GetPath();
-    wxString GetMessage();
-    long GetStyle();
-    void SetMessage(const wxString& message);
-    void SetPath(const wxString& path);
-    int ShowModal();
+    DocCtorStr(
+        wxDirDialog(wxWindow* parent,
+                    const wxString& message = wxPyDirSelectorPromptStr,
+                    const wxString& defaultPath = wxPyEmptyString,
+                    long style = 0,
+                    const wxPoint& pos = wxDefaultPosition,
+                    const wxSize& size = wxDefaultSize,
+                    const wxString& name = wxPyDirDialogNameStr),
+        "Constructor.  Use ShowModal method to show the dialog.");
+
+
+    DocDeclStr(
+        wxString , GetPath(),
+        "Returns the default or user-selected path.");
+    
+    DocDeclStr(
+        wxString , GetMessage(),
+        "Returns the message that will be displayed on the dialog.");
+    
+    DocDeclStr(
+        long , GetStyle(),
+        "Returns the dialog style.");
+    
+    DocDeclStr(
+        void , SetMessage(const wxString& message),
+        "Sets the message that will be displayed on the dialog.");
+    
+    DocDeclStr(
+        void , SetPath(const wxString& path),
+        "Sets the default path.");
+    
 };
 
 
 //---------------------------------------------------------------------------
 
+DocStr(wxFileDialog,
+       "This class represents the file chooser dialog.");
+
+RefDoc(wxFileDialog, "
+In Windows, this is the common file selector dialog. In X, this is a file
+selector box with somewhat less functionality. The path and filename are
+distinct elements of a full file pathname. If path is \"\", the current
+directory will be used. If filename is \"\", no default filename will be
+supplied. The wildcard determines what files are displayed in the file
+selector, and file extension supplies a type extension for the required
+filename.
+
+Both the X and Windows versions implement a wildcard filter. Typing a filename
+containing wildcards (*, ?) in the filename text item, and clicking on Ok,
+will result in only those files matching the pattern being displayed. The
+wildcard may be a specification for multiple types of file with a description
+for each, such as:
+
+   \"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\"
+
+ Styles
+    wx.OPEN              This is an open dialog.
+
+    wx.SAVE              This is a save dialog.
+
+    wx.HIDE_READONLY     For open dialog only: hide the checkbox allowing to
+                         open the file in read-only mode.
+
+    wx.OVERWRITE_PROMPT  For save dialog only: prompt for a confirmation if a
+                         file will be overwritten.
+
+    wx.MULTIPLE          For open dialog only: allows selecting multiple files.
+
+    wx.CHANGE_DIR        Change the current working directory to the directory
+                         where the file(s) chosen by the user are.
+");
+
+
+
 class wxFileDialog : public wxDialog {
 public:
     %pythonAppend wxFileDialog   "self._setOORInfo(self)"
+
+    DocCtorStr(
+        wxFileDialog(wxWindow* parent,
+                     const wxString& message = wxPyFileSelectorPromptStr,
+                     const wxString& defaultDir = wxPyEmptyString,
+                     const wxString& defaultFile = wxPyEmptyString,
+                     const wxString& wildcard = wxPyFileSelectorDefaultWildcardStr,
+                     long style = 0,
+                     const wxPoint& pos = wxDefaultPosition),
+        "Constructor.  Use ShowModal method to show the dialog.");
+
+
+    DocDeclStr(
+        void , SetMessage(const wxString& message),
+        "Sets the message that will be displayed on the dialog.");
+    
+    DocDeclStr(
+        void , SetPath(const wxString& path),
+        "Sets the path (the combined directory and filename that will\n"
+        "be returned when the dialog is dismissed).");
+    
+    DocDeclStr(
+        void , SetDirectory(const wxString& dir),
+        "Sets the default directory.");
+    
+    DocDeclStr(
+        void , SetFilename(const wxString& name),
+        "Sets the default filename.");
+    
+    DocDeclStr(
+        void , SetWildcard(const wxString& wildCard),
+        "Sets the wildcard, which can contain multiple file types, for example:\n"
+        "    \"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.");
     
-    wxFileDialog(wxWindow* parent,
-                 const wxString& message = wxPyFileSelectorPromptStr,
-                 const wxString& defaultDir = wxPyEmptyString,
-                 const wxString& defaultFile = wxPyEmptyString,
-                 const wxString& wildcard = wxPyFileSelectorDefaultWildcardStr,
-                 long style = 0,
-                 const wxPoint& pos = wxDefaultPosition);
-
-
-    void SetMessage(const wxString& message);
-    void SetPath(const wxString& path);
-    void SetDirectory(const wxString& dir);
-    void SetFilename(const wxString& name);
-    void SetWildcard(const wxString& wildCard);
-    void SetStyle(long style);
-    void SetFilterIndex(int filterIndex);
-
-    wxString GetMessage() const;
-    wxString GetPath() const;
-    wxString GetDirectory() const;
-    wxString GetFilename() const;
-    wxString GetWildcard() const;
-    long GetStyle() const;
-    int GetFilterIndex() const;
 
+    DocDeclStr(
+        wxString , GetMessage() const,
+        "Returns the message that will be displayed on the dialog.");
+    
+    DocDeclStr(
+        wxString , GetPath() const,
+        "Returns the full path (directory and filename) of the selected file.");
+    
+    DocDeclStr(
+        wxString , GetDirectory() const,
+        "Returns the default directory.");
+    
+    DocDeclStr(
+        wxString , GetFilename() const,
+        "Returns the default filename.");
+    
+    DocDeclStr(
+        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\n"
+        "the wildcard parameter. Before the dialog is shown, this is the index\n"
+        "which will be used when the dialog is first displayed. After the dialog\n"
+        "is shown, this is the index selected by the user.");
+
+
+    DocStr(GetFilenames,
+        "Returns a list of filenames chosen in the dialog.  This function should\n"
+        "only be used with the dialogs which have wx.MULTIPLE style, use\n"
+        "GetFilename for the others.");
+
+    DocStr(GetPaths,
+        "Fills the array paths with the full paths of the files chosen. This\n"
+        "function should only be used with the dialogs which have wx.MULTIPLE style,\n"
+        "use GetPath for the others.");   
+    
     %extend {
         PyObject* GetFilenames() {
             wxArrayString arr;
index 7199f90a23b48fe0c9b0626d56900c979e11c134..48894ccddaa66f02dd83b7676799a2ee994cabc0 100644 (file)
@@ -222,6 +222,12 @@ CHK_UNCHECKED = _controls.CHK_UNCHECKED
 CHK_CHECKED = _controls.CHK_CHECKED
 CHK_UNDETERMINED = _controls.CHK_UNDETERMINED
 class CheckBox(core.Control):
+    """
+    A checkbox is a labelled box which by default is either on (checkmark is
+    visible) or off (no checkmark). Optionally (When the wxCHK_3STATE style flag
+    is set) it can have a third state, called the mixed or undetermined
+    state. Often this is used as a "Does Not Apply" state.
+    """
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxCheckBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     def __init__(self, *args, **kwargs):
@@ -229,6 +235,8 @@ class CheckBox(core.Control):
         __init__(Window parent, int id, String label, Point pos=DefaultPosition, 
             Size size=DefaultSize, long style=0, 
             Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> CheckBox
+
+        Creates and shows a CheckBox control
         """
         newobj = _controls.new_CheckBox(*args, **kwargs)
         self.this = newobj.this
@@ -241,35 +249,73 @@ class CheckBox(core.Control):
         Create(Window parent, int id, String label, Point pos=DefaultPosition, 
             Size size=DefaultSize, long style=0, 
             Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> bool
+
+        Actually create the GUI CheckBox for 2-phase creation.
         """
         return _controls.CheckBox_Create(*args, **kwargs)
 
     def GetValue(*args, **kwargs):
-        """GetValue() -> bool"""
+        """
+        GetValue() -> bool
+
+        Gets the state of a 2-state CheckBox.  Returns True if it is checked,
+        False otherwise.
+        """
         return _controls.CheckBox_GetValue(*args, **kwargs)
 
     def IsChecked(*args, **kwargs):
-        """IsChecked() -> bool"""
+        """
+        IsChecked() -> bool
+
+        Similar to GetValue, but raises an exception if it is not a 2-state CheckBox.
+        """
         return _controls.CheckBox_IsChecked(*args, **kwargs)
 
     def SetValue(*args, **kwargs):
-        """SetValue(bool state)"""
+        """
+        SetValue(bool state)
+
+        Set the state of a 2-state CheckBox.  Pass True for checked,
+        False for unchecked.
+        """
         return _controls.CheckBox_SetValue(*args, **kwargs)
 
     def Get3StateValue(*args, **kwargs):
-        """Get3StateValue() -> int"""
+        """
+        Get3StateValue() -> int
+
+        Returns wx.CHK_UNCHECKED when the CheckBox is unchecked, wx.CHK_CHECKED when
+        it is checked and wx.CHK_UNDETERMINED when it's in the undetermined state.
+        Raises an exceptiion when the function is used with a 2-state CheckBox.
+        """
         return _controls.CheckBox_Get3StateValue(*args, **kwargs)
 
     def Set3StateValue(*args, **kwargs):
-        """Set3StateValue(int state)"""
+        """
+        Set3StateValue(int state)
+
+        Sets the CheckBox to the given state.  The state parameter can be
+        one of the following: wx.CHK_UNCHECKED (Check is off), wx.CHK_CHECKED
+        (Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an
+        exception  when the CheckBox is a 2-state checkbox and setting the state
+        to wx.CHK_UNDETERMINED.
+        """
         return _controls.CheckBox_Set3StateValue(*args, **kwargs)
 
     def Is3State(*args, **kwargs):
-        """Is3State() -> bool"""
+        """
+        Is3State() -> bool
+
+        Returns whether or not the CheckBox is a 3-state CheckBox.
+        """
         return _controls.CheckBox_Is3State(*args, **kwargs)
 
     def Is3rdStateAllowedForUser(*args, **kwargs):
-        """Is3rdStateAllowedForUser() -> bool"""
+        """
+        Is3rdStateAllowedForUser() -> bool
+
+        Returns whether or not the user can set the CheckBox to the third state.
+        """
         return _controls.CheckBox_Is3rdStateAllowedForUser(*args, **kwargs)
 
 
@@ -282,7 +328,11 @@ _controls.CheckBox_swigregister(CheckBoxPtr)
 CheckBoxNameStr = cvar.CheckBoxNameStr
 
 def PreCheckBox(*args, **kwargs):
-    """PreCheckBox() -> CheckBox"""
+    """
+    PreCheckBox() -> CheckBox
+
+    Precreate a CheckBox for 2-phase creation.
+    """
     val = _controls.new_PreCheckBox(*args, **kwargs)
     val.thisown = 1
     return val
@@ -290,14 +340,19 @@ def PreCheckBox(*args, **kwargs):
 #---------------------------------------------------------------------------
 
 class Choice(core.ControlWithItems):
+    """
+    A Choice control is used to select one of a list of strings. Unlike a ListBox,
+    only the selection is visible until the user pulls down the menu of choices.
+    """
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxChoice instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     def __init__(self, *args, **kwargs):
         """
-        __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, 
-            wxArrayString choices=wxPyEmptyStringArray, 
-            long style=0, Validator validator=DefaultValidator, 
+        __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
+            List choices=[], long style=0, Validator validator=DefaultValidator,
             String name=ChoiceNameStr) -> Choice
+
+        Create and show a Choice control
         """
         newobj = _controls.new_Choice(*args, **kwargs)
         self.this = newobj.this
@@ -307,33 +362,39 @@ class Choice(core.ControlWithItems):
 
     def Create(*args, **kwargs):
         """
-        Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, 
-            wxArrayString choices=wxPyEmptyStringArray, 
-            long style=0, Validator validator=DefaultValidator, 
+        Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
+            List choices=[], long style=0, Validator validator=DefaultValidator,
             String name=ChoiceNameStr) -> bool
+
+        Actually create the GUI Choice control for 2-phase creation
         """
         return _controls.Choice_Create(*args, **kwargs)
 
-    def GetColumns(*args, **kwargs):
-        """GetColumns() -> int"""
-        return _controls.Choice_GetColumns(*args, **kwargs)
-
-    def SetColumns(*args, **kwargs):
-        """SetColumns(int n=1)"""
-        return _controls.Choice_SetColumns(*args, **kwargs)
-
     def SetSelection(*args, **kwargs):
-        """SetSelection(int n)"""
+        """
+        SetSelection(int n)
+
+        Select the n'th item (zero based) in the list.
+        """
         return _controls.Choice_SetSelection(*args, **kwargs)
 
     def SetStringSelection(*args, **kwargs):
-        """SetStringSelection(String string)"""
+        """
+        SetStringSelection(String string)
+
+        Select the item with the specifed string
+        """
         return _controls.Choice_SetStringSelection(*args, **kwargs)
 
     def SetString(*args, **kwargs):
-        """SetString(int n, String s)"""
+        """
+        SetString(int n, String string)
+
+        Set the label for the n'th item (zero based) in the list.
+        """
         return _controls.Choice_SetString(*args, **kwargs)
 
+    Select = SetSelection 
 
 class ChoicePtr(Choice):
     def __init__(self, this):
@@ -344,7 +405,11 @@ _controls.Choice_swigregister(ChoicePtr)
 ChoiceNameStr = cvar.ChoiceNameStr
 
 def PreChoice(*args, **kwargs):
-    """PreChoice() -> Choice"""
+    """
+    PreChoice() -> Choice
+
+    Precreate a Choice control for 2-phase creation.
+    """
     val = _controls.new_PreChoice(*args, **kwargs)
     val.thisown = 1
     return val
index 2d26c4974f5dbfd1948a637b7f256949ac592b7e..3c5c6dbe5c5d2d6cafcbb428806a0b9cc6a46e1c 100644 (file)
@@ -2471,63 +2471,6 @@ static PyObject *_wrap_Choice_Create(PyObject *self, PyObject *args, PyObject *k
 }
 
 
-static PyObject *_wrap_Choice_GetColumns(PyObject *self, PyObject *args, PyObject *kwargs) {
-    PyObject *resultobj;
-    wxChoice *arg1 = (wxChoice *) 0 ;
-    int result;
-    PyObject * obj0 = 0 ;
-    char *kwnames[] = {
-        (char *) "self", NULL 
-    };
-    
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Choice_GetColumns",kwnames,&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxChoice,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    {
-        PyThreadState* __tstate = wxPyBeginAllowThreads();
-        result = (int)(arg1)->GetColumns();
-        
-        wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;
-    }
-    resultobj = SWIG_PyObj_FromInt((int)result);
-    return resultobj;
-    fail:
-    return NULL;
-}
-
-
-static PyObject *_wrap_Choice_SetColumns(PyObject *self, PyObject *args, PyObject *kwargs) {
-    PyObject *resultobj;
-    wxChoice *arg1 = (wxChoice *) 0 ;
-    int arg2 = (int) (int)1 ;
-    PyObject * obj0 = 0 ;
-    PyObject * obj1 = 0 ;
-    char *kwnames[] = {
-        (char *) "self",(char *) "n", NULL 
-    };
-    
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Choice_SetColumns",kwnames,&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxChoice,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    if (obj1) {
-        {
-            arg2 = (int const) SWIG_PyObj_AsInt(obj1);  
-            if (PyErr_Occurred()) SWIG_fail;
-        }
-    }
-    {
-        PyThreadState* __tstate = wxPyBeginAllowThreads();
-        (arg1)->SetColumns(arg2);
-        
-        wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;
-    }
-    Py_INCREF(Py_None); resultobj = Py_None;
-    return resultobj;
-    fail:
-    return NULL;
-}
-
-
 static PyObject *_wrap_Choice_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxChoice *arg1 = (wxChoice *) 0 ;
@@ -2608,7 +2551,7 @@ static PyObject *_wrap_Choice_SetString(PyObject *self, PyObject *args, PyObject
     PyObject * obj1 = 0 ;
     PyObject * obj2 = 0 ;
     char *kwnames[] = {
-        (char *) "self",(char *) "n",(char *) "s", NULL 
+        (char *) "self",(char *) "n",(char *) "string", NULL 
     };
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Choice_SetString",kwnames,&obj0,&obj1,&obj2)) goto fail;
@@ -29413,8 +29356,6 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"new_Choice", (PyCFunction) _wrap_new_Choice, METH_VARARGS | METH_KEYWORDS },
         { (char *)"new_PreChoice", (PyCFunction) _wrap_new_PreChoice, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Choice_Create", (PyCFunction) _wrap_Choice_Create, METH_VARARGS | METH_KEYWORDS },
-        { (char *)"Choice_GetColumns", (PyCFunction) _wrap_Choice_GetColumns, METH_VARARGS | METH_KEYWORDS },
-        { (char *)"Choice_SetColumns", (PyCFunction) _wrap_Choice_SetColumns, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Choice_SetSelection", (PyCFunction) _wrap_Choice_SetSelection, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Choice_SetStringSelection", (PyCFunction) _wrap_Choice_SetStringSelection, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Choice_SetString", (PyCFunction) _wrap_Choice_SetString, METH_VARARGS | METH_KEYWORDS },
index d8ef4c470ac6ac40c55fb521bd835fc721967dc9..933f52924ec8e2ff04c672bc479d181de24ca77d 100644 (file)
@@ -4578,6 +4578,18 @@ _misc.FileDropTarget_swigregister(FileDropTargetPtr)
 #---------------------------------------------------------------------------
 
 class Clipboard(core.Object):
+    """
+    wx.Clipboard represents the system clipboard and provides methods to copy data
+    to or paste data from it.  Normally, you should only use wx.TheClipboard which
+    is a reference to a global wx.Clipboard instance.
+
+    Call wx.TheClipboard.Open to get ownership of the clipboard. If this operation
+    returns True, you now own the clipboard. Call wx.TheClipboard.SetData to put
+    data on the clipboard, or wx.TheClipboard.GetData to retrieve data from the
+    clipboard.  Call wx.TheClipboard.Close to close the clipboard and relinquish
+    ownership. You should keep the clipboard open only momentarily.
+
+    """
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxClipboard instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     def __init__(self, *args, **kwargs):
@@ -4593,43 +4605,97 @@ class Clipboard(core.Object):
         except: pass
 
     def Open(*args, **kwargs):
-        """Open() -> bool"""
+        """
+        Open() -> bool
+
+        Call this function to open the clipboard before calling SetData
+        and GetData.  Call Close when you have finished with the clipboard.
+        You should keep the clipboard open for only a very short time.
+        Returns true on success. 
+        """
         return _misc.Clipboard_Open(*args, **kwargs)
 
     def Close(*args, **kwargs):
-        """Close()"""
+        """
+        Close()
+
+        Closes the clipboard.
+        """
         return _misc.Clipboard_Close(*args, **kwargs)
 
     def IsOpened(*args, **kwargs):
-        """IsOpened() -> bool"""
+        """
+        IsOpened() -> bool
+
+        Query whether the clipboard is opened
+        """
         return _misc.Clipboard_IsOpened(*args, **kwargs)
 
     def AddData(*args, **kwargs):
-        """AddData(DataObject data) -> bool"""
+        """
+        AddData(DataObject data) -> bool
+
+        Call this function to add the data object to the clipboard. You
+        may call this function repeatedly after having cleared the clipboard.
+        After this function has been called, the clipboard owns the data, so
+        do not delete the data explicitly.
+        """
         return _misc.Clipboard_AddData(*args, **kwargs)
 
     def SetData(*args, **kwargs):
-        """SetData(DataObject data) -> bool"""
+        """
+        SetData(DataObject data) -> bool
+
+        Set the clipboard data, this is the same as Clear followed by AddData.
+        """
         return _misc.Clipboard_SetData(*args, **kwargs)
 
     def IsSupported(*args, **kwargs):
-        """IsSupported(DataFormat format) -> bool"""
+        """
+        IsSupported(DataFormat format) -> bool
+
+        Returns True if the given format is available in the data object(s) on
+        the clipboard.
+        """
         return _misc.Clipboard_IsSupported(*args, **kwargs)
 
     def GetData(*args, **kwargs):
-        """GetData(DataObject data) -> bool"""
+        """
+        GetData(DataObject data) -> bool
+
+        Call this function to fill data with data on the clipboard, if available
+        in the required format. Returns true on success.
+        """
         return _misc.Clipboard_GetData(*args, **kwargs)
 
     def Clear(*args, **kwargs):
-        """Clear()"""
+        """
+        Clear()
+
+        Clears data from the clipboard object and also  the system's clipboard
+        if possible.
+        """
         return _misc.Clipboard_Clear(*args, **kwargs)
 
     def Flush(*args, **kwargs):
-        """Flush() -> bool"""
+        """
+        Flush() -> bool
+
+        Flushes the clipboard: this means that the data which is currently on
+        clipboard will stay available even after the application exits (possibly
+        eating memory), otherwise the clipboard will be emptied on exit.
+        Returns False if the operation is unsuccesful for any reason.
+        """
         return _misc.Clipboard_Flush(*args, **kwargs)
 
     def UsePrimarySelection(*args, **kwargs):
-        """UsePrimarySelection(bool primary=False)"""
+        """
+        UsePrimarySelection(bool primary=True)
+
+        On platforms supporting it (the X11 based platforms), selects the so
+        called PRIMARY SELECTION as the clipboard as opposed to the normal
+        clipboard, if primary is True.
+        """
         return _misc.Clipboard_UsePrimarySelection(*args, **kwargs)
 
 
@@ -4641,10 +4707,19 @@ class ClipboardPtr(Clipboard):
 _misc.Clipboard_swigregister(ClipboardPtr)
 
 class ClipboardLocker(object):
+    """
+    A helpful class for opening the clipboard and automatically closing it when
+    the locker is destroyed.
+    """
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxClipboardLocker instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     def __init__(self, *args, **kwargs):
-        """__init__(Clipboard clipboard=None) -> ClipboardLocker"""
+        """
+        __init__(Clipboard clipboard=None) -> ClipboardLocker
+
+        A helpful class for opening the clipboard and automatically closing it when
+        the locker is destroyed.
+        """
         newobj = _misc.new_ClipboardLocker(*args, **kwargs)
         self.this = newobj.this
         self.thisown = 1
@@ -4656,7 +4731,12 @@ class ClipboardLocker(object):
         except: pass
 
     def __nonzero__(*args, **kwargs):
-        """__nonzero__() -> bool"""
+        """
+        __nonzero__() -> bool
+
+        A ClipboardLocker instance evaluates to True if the clipboard was
+        successfully opened.
+        """
         return _misc.ClipboardLocker___nonzero__(*args, **kwargs)
 
 
index 5a0677b54bdcb24c69d1bfb182863a579d61f98b..f207099f10b4ca2baf4749a37810ebc1815b5084 100644 (file)
@@ -26493,7 +26493,7 @@ static PyObject *_wrap_Clipboard_Flush(PyObject *self, PyObject *args, PyObject
 static PyObject *_wrap_Clipboard_UsePrimarySelection(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxClipboard *arg1 = (wxClipboard *) 0 ;
-    bool arg2 = (bool) False ;
+    bool arg2 = (bool) True ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     char *kwnames[] = {
index 476378daf566ef4d4f90f0a4488f651a612a735d..b314d70f7d7bf897c605b0784c1200343b0dba62 100644 (file)
@@ -1640,10 +1640,15 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
 #---------------------------------------------------------------------------
 
 class ColourData(core.Object):
+    """This class holds a variety of information related to colour dialogs."""
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxColourData instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     def __init__(self, *args, **kwargs):
-        """__init__() -> ColourData"""
+        """
+        __init__() -> ColourData
+
+        Constructor, sets default values.
+        """
         newobj = _windows.new_ColourData(*args, **kwargs)
         self.this = newobj.this
         self.thisown = 1
@@ -1655,27 +1660,57 @@ class ColourData(core.Object):
         except: pass
 
     def GetChooseFull(*args, **kwargs):
-        """GetChooseFull() -> bool"""
+        """
+        GetChooseFull() -> bool
+
+        Under Windows, determines whether the Windows colour dialog will display
+        the full dialog with custom colour selection controls. Has no meaning
+        under other platforms.  The default value is true.
+        """
         return _windows.ColourData_GetChooseFull(*args, **kwargs)
 
     def GetColour(*args, **kwargs):
-        """GetColour() -> Colour"""
+        """
+        GetColour() -> Colour
+
+        Gets the colour (pre)selected by the dialog.
+        """
         return _windows.ColourData_GetColour(*args, **kwargs)
 
     def GetCustomColour(*args, **kwargs):
-        """GetCustomColour(int i) -> Colour"""
+        """
+        GetCustomColour(int i) -> Colour
+
+        Gets the i'th custom colour associated with the colour dialog. i should
+        be an integer between 0 and 15. The default custom colours are all white.
+        """
         return _windows.ColourData_GetCustomColour(*args, **kwargs)
 
     def SetChooseFull(*args, **kwargs):
-        """SetChooseFull(int flag)"""
+        """
+        SetChooseFull(int flag)
+
+        Under Windows, tells the Windows colour dialog to display the full dialog
+        with custom colour selection controls. Under other platforms, has no effect.
+        The default value is true.
+        """
         return _windows.ColourData_SetChooseFull(*args, **kwargs)
 
     def SetColour(*args, **kwargs):
-        """SetColour(Colour colour)"""
+        """
+        SetColour(Colour colour)
+
+        Sets the default colour for the colour dialog.  The default colour is black.
+        """
         return _windows.ColourData_SetColour(*args, **kwargs)
 
     def SetCustomColour(*args, **kwargs):
-        """SetCustomColour(int i, Colour colour)"""
+        """
+        SetCustomColour(int i, Colour colour)
+
+        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 white.
+        """
         return _windows.ColourData_SetCustomColour(*args, **kwargs)
 
 
@@ -1693,10 +1728,16 @@ GetTextFromUserPromptStr = cvar.GetTextFromUserPromptStr
 MessageBoxCaptionStr = cvar.MessageBoxCaptionStr
 
 class ColourDialog(Dialog):
+    """This class represents the colour chooser dialog."""
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxColourDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     def __init__(self, *args, **kwargs):
-        """__init__(Window parent, ColourData data=None) -> ColourDialog"""
+        """
+        __init__(Window parent, ColourData data=None) -> ColourDialog
+
+        Constructor. Pass a parent window, and optionally a ColourData, which
+        will be copied to the colour dialog's internal ColourData instance.
+        """
         newobj = _windows.new_ColourDialog(*args, **kwargs)
         self.this = newobj.this
         self.thisown = 1
@@ -1704,12 +1745,12 @@ class ColourDialog(Dialog):
         self._setOORInfo(self)
 
     def GetColourData(*args, **kwargs):
-        """GetColourData() -> ColourData"""
-        return _windows.ColourDialog_GetColourData(*args, **kwargs)
+        """
+        GetColourData() -> ColourData
 
-    def ShowModal(*args, **kwargs):
-        """ShowModal() -> int"""
-        return _windows.ColourDialog_ShowModal(*args, **kwargs)
+        Returns a reference to the ColourData used by the dialog.
+        """
+        return _windows.ColourDialog_GetColourData(*args, **kwargs)
 
 
 class ColourDialogPtr(ColourDialog):
@@ -1720,6 +1761,7 @@ class ColourDialogPtr(ColourDialog):
 _windows.ColourDialog_swigregister(ColourDialogPtr)
 
 class DirDialog(Dialog):
+    """This class represents the directory chooser dialog."""
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxDirDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     def __init__(self, *args, **kwargs):
@@ -1728,6 +1770,8 @@ class DirDialog(Dialog):
             String defaultPath=EmptyString, long style=0, 
             Point pos=DefaultPosition, Size size=DefaultSize, 
             String name=DirDialogNameStr) -> DirDialog
+
+        Constructor.  Use ShowModal method to show the dialog.
         """
         newobj = _windows.new_DirDialog(*args, **kwargs)
         self.this = newobj.this
@@ -1736,28 +1780,44 @@ class DirDialog(Dialog):
         self._setOORInfo(self)
 
     def GetPath(*args, **kwargs):
-        """GetPath() -> String"""
+        """
+        GetPath() -> String
+
+        Returns the default or user-selected path.
+        """
         return _windows.DirDialog_GetPath(*args, **kwargs)
 
     def GetMessage(*args, **kwargs):
-        """GetMessage() -> String"""
+        """
+        GetMessage() -> String
+
+        Returns the message that will be displayed on the dialog.
+        """
         return _windows.DirDialog_GetMessage(*args, **kwargs)
 
     def GetStyle(*args, **kwargs):
-        """GetStyle() -> long"""
+        """
+        GetStyle() -> long
+
+        Returns the dialog style.
+        """
         return _windows.DirDialog_GetStyle(*args, **kwargs)
 
     def SetMessage(*args, **kwargs):
-        """SetMessage(String message)"""
+        """
+        SetMessage(String message)
+
+        Sets the message that will be displayed on the dialog.
+        """
         return _windows.DirDialog_SetMessage(*args, **kwargs)
 
     def SetPath(*args, **kwargs):
-        """SetPath(String path)"""
-        return _windows.DirDialog_SetPath(*args, **kwargs)
+        """
+        SetPath(String path)
 
-    def ShowModal(*args, **kwargs):
-        """ShowModal() -> int"""
-        return _windows.DirDialog_ShowModal(*args, **kwargs)
+        Sets the default path.
+        """
+        return _windows.DirDialog_SetPath(*args, **kwargs)
 
 
 class DirDialogPtr(DirDialog):
@@ -1768,6 +1828,7 @@ class DirDialogPtr(DirDialog):
 _windows.DirDialog_swigregister(DirDialogPtr)
 
 class FileDialog(Dialog):
+    """This class represents the file chooser dialog."""
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxFileDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     def __init__(self, *args, **kwargs):
@@ -1776,6 +1837,8 @@ class FileDialog(Dialog):
             String defaultDir=EmptyString, String defaultFile=EmptyString, 
             String wildcard=FileSelectorDefaultWildcardStr, 
             long style=0, Point pos=DefaultPosition) -> FileDialog
+
+        Constructor.  Use ShowModal method to show the dialog.
         """
         newobj = _windows.new_FileDialog(*args, **kwargs)
         self.this = newobj.this
@@ -1784,67 +1847,140 @@ class FileDialog(Dialog):
         self._setOORInfo(self)
 
     def SetMessage(*args, **kwargs):
-        """SetMessage(String message)"""
+        """
+        SetMessage(String message)
+
+        Sets the message that will be displayed on the dialog.
+        """
         return _windows.FileDialog_SetMessage(*args, **kwargs)
 
     def SetPath(*args, **kwargs):
-        """SetPath(String path)"""
+        """
+        SetPath(String path)
+
+        Sets the path (the combined directory and filename that will
+        be returned when the dialog is dismissed).
+        """
         return _windows.FileDialog_SetPath(*args, **kwargs)
 
     def SetDirectory(*args, **kwargs):
-        """SetDirectory(String dir)"""
+        """
+        SetDirectory(String dir)
+
+        Sets the default directory.
+        """
         return _windows.FileDialog_SetDirectory(*args, **kwargs)
 
     def SetFilename(*args, **kwargs):
-        """SetFilename(String name)"""
+        """
+        SetFilename(String name)
+
+        Sets the default filename.
+        """
         return _windows.FileDialog_SetFilename(*args, **kwargs)
 
     def SetWildcard(*args, **kwargs):
-        """SetWildcard(String wildCard)"""
+        """
+        SetWildcard(String wildCard)
+
+        Sets the wildcard, which can contain multiple file types, for example:
+            "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
+        """
         return _windows.FileDialog_SetWildcard(*args, **kwargs)
 
     def SetStyle(*args, **kwargs):
-        """SetStyle(long style)"""
+        """
+        SetStyle(long style)
+
+        Sets the dialog style.
+        """
         return _windows.FileDialog_SetStyle(*args, **kwargs)
 
     def SetFilterIndex(*args, **kwargs):
-        """SetFilterIndex(int filterIndex)"""
+        """
+        SetFilterIndex(int filterIndex)
+
+        Sets the default filter index, starting from zero.
+        """
         return _windows.FileDialog_SetFilterIndex(*args, **kwargs)
 
     def GetMessage(*args, **kwargs):
-        """GetMessage() -> String"""
+        """
+        GetMessage() -> String
+
+        Returns the message that will be displayed on the dialog.
+        """
         return _windows.FileDialog_GetMessage(*args, **kwargs)
 
     def GetPath(*args, **kwargs):
-        """GetPath() -> String"""
+        """
+        GetPath() -> String
+
+        Returns the full path (directory and filename) of the selected file.
+        """
         return _windows.FileDialog_GetPath(*args, **kwargs)
 
     def GetDirectory(*args, **kwargs):
-        """GetDirectory() -> String"""
+        """
+        GetDirectory() -> String
+
+        Returns the default directory.
+        """
         return _windows.FileDialog_GetDirectory(*args, **kwargs)
 
     def GetFilename(*args, **kwargs):
-        """GetFilename() -> String"""
+        """
+        GetFilename() -> String
+
+        Returns the default filename.
+        """
         return _windows.FileDialog_GetFilename(*args, **kwargs)
 
     def GetWildcard(*args, **kwargs):
-        """GetWildcard() -> String"""
+        """
+        GetWildcard() -> String
+
+        Returns the file dialog wildcard.
+        """
         return _windows.FileDialog_GetWildcard(*args, **kwargs)
 
     def GetStyle(*args, **kwargs):
-        """GetStyle() -> long"""
+        """
+        GetStyle() -> long
+
+        Returns the dialog style.
+        """
         return _windows.FileDialog_GetStyle(*args, **kwargs)
 
     def GetFilterIndex(*args, **kwargs):
-        """GetFilterIndex() -> int"""
+        """
+        GetFilterIndex() -> int
+
+        Returns the index into the list of filters supplied, optionally, in
+        the wildcard parameter. Before the dialog is shown, this is the index
+        which will be used when the dialog is first displayed. After the dialog
+        is shown, this is the index selected by the user.
+        """
         return _windows.FileDialog_GetFilterIndex(*args, **kwargs)
 
     def GetFilenames(*args, **kwargs):
-        """GetFilenames() -> PyObject"""
+        """
+        GetFilenames() -> PyObject
+
+        Returns a list of filenames chosen in the dialog.  This function should
+        only be used with the dialogs which have wx.MULTIPLE style, use
+        GetFilename for the others.
+        """
         return _windows.FileDialog_GetFilenames(*args, **kwargs)
 
     def GetPaths(*args, **kwargs):
-        """GetPaths() -> PyObject"""
+        """
+        GetPaths() -> PyObject
+
+        Fills the array paths with the full paths of the files chosen. This
+        function should only be used with the dialogs which have wx.MULTIPLE style,
+        use GetPath for the others.
+        """
         return _windows.FileDialog_GetPaths(*args, **kwargs)
 
 
index 191fa932a38e908d315fc8ab51ae6246d2a74b51..053f5eb0c7f6fa05cec0ba4e85926f4014196c2c 100644 (file)
@@ -10978,31 +10978,6 @@ static PyObject *_wrap_ColourDialog_GetColourData(PyObject *self, PyObject *args
 }
 
 
-static PyObject *_wrap_ColourDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) {
-    PyObject *resultobj;
-    wxColourDialog *arg1 = (wxColourDialog *) 0 ;
-    int result;
-    PyObject * obj0 = 0 ;
-    char *kwnames[] = {
-        (char *) "self", NULL 
-    };
-    
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ColourDialog_ShowModal",kwnames,&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColourDialog,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    {
-        PyThreadState* __tstate = wxPyBeginAllowThreads();
-        result = (int)(arg1)->ShowModal();
-        
-        wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;
-    }
-    resultobj = SWIG_PyObj_FromInt((int)result);
-    return resultobj;
-    fail:
-    return NULL;
-}
-
-
 static PyObject * ColourDialog_swigregister(PyObject *self, PyObject *args) {
     PyObject *obj;
     if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -11287,31 +11262,6 @@ static PyObject *_wrap_DirDialog_SetPath(PyObject *self, PyObject *args, PyObjec
 }
 
 
-static PyObject *_wrap_DirDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) {
-    PyObject *resultobj;
-    wxDirDialog *arg1 = (wxDirDialog *) 0 ;
-    int result;
-    PyObject * obj0 = 0 ;
-    char *kwnames[] = {
-        (char *) "self", NULL 
-    };
-    
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:DirDialog_ShowModal",kwnames,&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDirDialog,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    {
-        PyThreadState* __tstate = wxPyBeginAllowThreads();
-        result = (int)(arg1)->ShowModal();
-        
-        wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;
-    }
-    resultobj = SWIG_PyObj_FromInt((int)result);
-    return resultobj;
-    fail:
-    return NULL;
-}
-
-
 static PyObject * DirDialog_swigregister(PyObject *self, PyObject *args) {
     PyObject *obj;
     if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -22943,7 +22893,6 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"ColourData_swigregister", ColourData_swigregister, METH_VARARGS },
         { (char *)"new_ColourDialog", (PyCFunction) _wrap_new_ColourDialog, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ColourDialog_GetColourData", (PyCFunction) _wrap_ColourDialog_GetColourData, METH_VARARGS | METH_KEYWORDS },
-        { (char *)"ColourDialog_ShowModal", (PyCFunction) _wrap_ColourDialog_ShowModal, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ColourDialog_swigregister", ColourDialog_swigregister, METH_VARARGS },
         { (char *)"new_DirDialog", (PyCFunction) _wrap_new_DirDialog, METH_VARARGS | METH_KEYWORDS },
         { (char *)"DirDialog_GetPath", (PyCFunction) _wrap_DirDialog_GetPath, METH_VARARGS | METH_KEYWORDS },
@@ -22951,7 +22900,6 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"DirDialog_GetStyle", (PyCFunction) _wrap_DirDialog_GetStyle, METH_VARARGS | METH_KEYWORDS },
         { (char *)"DirDialog_SetMessage", (PyCFunction) _wrap_DirDialog_SetMessage, METH_VARARGS | METH_KEYWORDS },
         { (char *)"DirDialog_SetPath", (PyCFunction) _wrap_DirDialog_SetPath, METH_VARARGS | METH_KEYWORDS },
-        { (char *)"DirDialog_ShowModal", (PyCFunction) _wrap_DirDialog_ShowModal, METH_VARARGS | METH_KEYWORDS },
         { (char *)"DirDialog_swigregister", DirDialog_swigregister, METH_VARARGS },
         { (char *)"new_FileDialog", (PyCFunction) _wrap_new_FileDialog, METH_VARARGS | METH_KEYWORDS },
         { (char *)"FileDialog_SetMessage", (PyCFunction) _wrap_FileDialog_SetMessage, METH_VARARGS | METH_KEYWORDS },