]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/dirdlg.cpp
   1 ///////////////////////////////////////////////////////////////////////////// 
   2 // Name:        src/palmos/dirdlg.cpp 
   3 // Purpose:     wxDirDialog 
   4 // Author:      William Osborne - minimal working wxPalmOS port 
   8 // Copyright:   (c) William Osborne 
   9 // Licence:     wxWindows licence 
  10 ///////////////////////////////////////////////////////////////////////////// 
  12 // ============================================================================ 
  14 // ============================================================================ 
  16 // ---------------------------------------------------------------------------- 
  18 // ---------------------------------------------------------------------------- 
  20 // For compilers that support precompilation, includes "wx.h". 
  21 #include "wx/wxprec.h" 
  29 #if defined(__WIN95__) && !defined(__GNUWIN32_OLD__) && wxUSE_OLE 
  31 #include "wx/dirdlg.h" 
  35     #include "wx/dialog.h" 
  37     #include "wx/app.h"     // for GetComCtl32Version() 
  40 #include "wx/palmos/private.h" 
  42 // ---------------------------------------------------------------------------- 
  44 // ---------------------------------------------------------------------------- 
  47     #define MAX_PATH 4096      // be generous 
  50 #ifndef BIF_NEWDIALOGSTYLE 
  51     #define BIF_NEWDIALOGSTYLE 0x0040 
  54 #ifndef BIF_NONEWFOLDERBUTTON 
  55     #define BIF_NONEWFOLDERBUTTON  0x0200 
  59     #define BIF_EDITBOX 16 
  62 // ---------------------------------------------------------------------------- 
  64 // ---------------------------------------------------------------------------- 
  66 IMPLEMENT_CLASS(wxDirDialog
, wxDialog
) 
  68 // ---------------------------------------------------------------------------- 
  69 // private functions prototypes 
  70 // ---------------------------------------------------------------------------- 
  73 static void ItemListFree(LPITEMIDLIST pidl
); 
  75 // the callback proc for the dir dlg 
  76 static int CALLBACK 
BrowseCallbackProc(HWND hwnd
, UINT uMsg
, LPARAM lp
, 
  80 // ============================================================================ 
  82 // ============================================================================ 
  84 // ---------------------------------------------------------------------------- 
  86 // ---------------------------------------------------------------------------- 
  88 wxDirDialog::wxDirDialog(wxWindow 
*parent
, 
  89                          const wxString
& message
, 
  90                          const wxString
& defaultPath
, 
  92                          const wxPoint
& WXUNUSED(pos
), 
  93                          const wxSize
& WXUNUSED(size
), 
  94                          const wxString
& WXUNUSED(name
)) 
  98 void wxDirDialog::SetPath(const wxString
& path
) 
 102 int wxDirDialog::ShowModal() 
 107 // ---------------------------------------------------------------------------- 
 109 // ---------------------------------------------------------------------------- 
 112 BrowseCallbackProc(HWND hwnd
, UINT uMsg
, LPARAM lp
, LPARAM pData
) 
 118 static void ItemListFree(LPITEMIDLIST pidl
) 
 123         SHGetMalloc(&pMalloc
); 
 131             wxLogLastError(wxT("SHGetMalloc")); 
 137     #include "../generic/dirdlgg.cpp" 
 138 #endif // compiler/platform on which the code here compiles 
 140 #endif // wxUSE_DIRDLG