]> git.saurik.com Git - wxWidgets.git/commitdiff
minor fixes for custom controls support in wxFileDialog: slightly improve documentati...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Jan 2009 14:04:25 +0000 (14:04 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Jan 2009 14:04:25 +0000 (14:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/filedlg.h
include/wx/msw/filedlg.h
interface/wx/filedlg.h
src/common/fldlgcmn.cpp
src/msw/filedlg.cpp

index 0ebe1f6a7193d430e7b269c968c1e47c9ecd2202..ed59dec2385aabb96698d047a379af928c0d76b8 100644 (file)
@@ -122,7 +122,7 @@ public:
 
     virtual bool SupportsExtraControl() const { return false; }
 
 
     virtual bool SupportsExtraControl() const { return false; }
 
-    bool SetExtraControlCreator(ExtraControlCreatorFunction WXUNUSED(c));
+    bool SetExtraControlCreator(ExtraControlCreatorFunction creator);
     wxWindow *GetExtraControl() const { return m_extraControl; }
 
     // Utility functions
     wxWindow *GetExtraControl() const { return m_extraControl; }
 
     // Utility functions
index 0de223b2922f7aa0a0ee82189900b2fd34ca2e49..62203364ae38143981e53c31091545889cc92a00 100644 (file)
@@ -34,8 +34,8 @@ public:
     virtual void GetFilenames(wxArrayString& files) const;
 #ifndef __WXWINCE__
     virtual bool SupportsExtraControl() const { return true; }
     virtual void GetFilenames(wxArrayString& files) const;
 #ifndef __WXWINCE__
     virtual bool SupportsExtraControl() const { return true; }
-#endif // __WXWINCE__
     void MSWOnInitDialogHook(WXHWND hwnd);
     void MSWOnInitDialogHook(WXHWND hwnd);
+#endif // __WXWINCE__
 
     virtual int ShowModal();
 
 
     virtual int ShowModal();
 
index 450f333e7fafee71a3afe309234686d40ffa7c26..57f09528c3bccc933f2b4c550c9f7dce05896e59 100644 (file)
@@ -11,8 +11,6 @@
 
     This class represents the file chooser dialog.
 
 
     This class represents the file chooser dialog.
 
-    It pops up a file selector box (native for Windows and GTK2.4+).
-
     The path and filename are distinct elements of a full file pathname.
     If path is wxEmptyString, the current directory will be used.
     If filename is wxEmptyString, no default filename will be supplied.
     The path and filename are distinct elements of a full file pathname.
     If path is wxEmptyString, the current directory will be used.
     If filename is wxEmptyString, no default filename will be supplied.
@@ -55,7 +53,7 @@
            file(s) chosen by the user are.
     @style{wxFD_PREVIEW}
            Show the preview of the selected files (currently only supported by
            file(s) chosen by the user are.
     @style{wxFD_PREVIEW}
            Show the preview of the selected files (currently only supported by
-           wxGTK using GTK+ 2.4 or later).
+           wxGTK).
     @endStyleTable
 
     @library{wxcore}
     @endStyleTable
 
     @library{wxcore}
@@ -113,6 +111,8 @@ public:
     /**
         If functions SetExtraControlCreator() and ShowModal() were called,
         returns the extra window. Otherwise returns @NULL.
     /**
         If functions SetExtraControlCreator() and ShowModal() were called,
         returns the extra window. Otherwise returns @NULL.
+
+        @since 2.9.0
     */
     wxWindow* GetExtraControl() const;
 
     */
     wxWindow* GetExtraControl() const;
 
@@ -173,6 +173,13 @@ public:
     */
     virtual void SetDirectory(const wxString& directory);
 
     */
     virtual void SetDirectory(const wxString& directory);
 
+    /**
+        The type of function used as an argument for SetExtraControlCreator().
+
+        @since 2.9.0
+    */
+    typedef wxWindow *(*ExtraControlCreatorFunction)(wxWindow*);
+
     /**
         Customize file dialog by adding extra window, which is typically placed
         below the list of files and above the buttons.
     /**
         Customize file dialog by adding extra window, which is typically placed
         below the list of files and above the buttons.
@@ -182,9 +189,11 @@ public:
         The @c creator function should take pointer to parent window (file dialog)
         and should return a window allocated with operator new.
 
         The @c creator function should take pointer to parent window (file dialog)
         and should return a window allocated with operator new.
 
-        Supported platforms: wxGTK, wxUniv.
+        Supported platforms: wxGTK, wxMSW, wxUniv.
+
+        @since 2.9.0
     */
     */
-    bool SetExtraControlCreator(ExtraControlCreatorFunction);
+    bool SetExtraControlCreator(ExtraControlCreatorFunction creator);
 
     /**
         Sets the default filename.
 
     /**
         Sets the default filename.
index ab3908303eb5745ee641ba58d163681b4f2d0384..e57a244cb39f9927ae4257a08b4bd8e595c237e8 100644 (file)
@@ -151,12 +151,12 @@ wxString wxFileDialogBase::AppendExtension(const wxString &filePath,
     return filePath + ext;
 }
 
     return filePath + ext;
 }
 
-bool wxFileDialogBase::SetExtraControlCreator(ExtraControlCreatorFunction c)
+bool wxFileDialogBase::SetExtraControlCreator(ExtraControlCreatorFunction creator)
 {
     wxCHECK_MSG( !m_extraControlCreator, false,
                  "wxFileDialog::SetExtraControl() called second time" );
 
 {
     wxCHECK_MSG( !m_extraControlCreator, false,
                  "wxFileDialog::SetExtraControl() called second time" );
 
-    m_extraControlCreator = c;
+    m_extraControlCreator = creator;
     return SupportsExtraControl();
 }
 
     return SupportsExtraControl();
 }
 
index 7b5ac99870ebd0a7ce3600caf98e238ee021bdd0..ae89ed5c05eb056991ca228c97e798a7132e10d4 100644 (file)
@@ -86,6 +86,7 @@ wxFileDialogHookFunction(HWND      hDlg,
 {
     switch ( iMsg )
     {
 {
     switch ( iMsg )
     {
+#ifndef __WXWINCE__
         case WM_INITDIALOG:
             {
                 OPENFILENAME* ofn = reinterpret_cast<OPENFILENAME *>(lParam);
         case WM_INITDIALOG:
             {
                 OPENFILENAME* ofn = reinterpret_cast<OPENFILENAME *>(lParam);
@@ -93,6 +94,7 @@ wxFileDialogHookFunction(HWND      hDlg,
                     ->MSWOnInitDialogHook((WXHWND)hDlg);
             }
             break;
                     ->MSWOnInitDialogHook((WXHWND)hDlg);
             }
             break;
+#endif // __WXWINCE__
 
         case WM_NOTIFY:
             {
 
         case WM_NOTIFY:
             {
@@ -368,6 +370,7 @@ static bool ShowCommFileDialog(OPENFILENAME *of, long style)
     return true;
 }
 
     return true;
 }
 
+#ifndef __WXWINCE__
 void wxFileDialog::MSWOnInitDialogHook(WXHWND hwnd)
 {
    SetHWND(hwnd);
 void wxFileDialog::MSWOnInitDialogHook(WXHWND hwnd)
 {
    SetHWND(hwnd);
@@ -376,6 +379,7 @@ void wxFileDialog::MSWOnInitDialogHook(WXHWND hwnd)
 
    SetHWND(NULL);
 }
 
    SetHWND(NULL);
 }
+#endif // __WXWINCE__
 
 int wxFileDialog::ShowModal()
 {
 
 int wxFileDialog::ShowModal()
 {