]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/dirdlg.cpp
Setup notifiers from datamodel to generic
[wxWidgets.git] / src / palmos / dirdlg.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/dirdlg.cpp
3 // Purpose: wxDirDialog
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by:
6 // Created: 10.13.04
7 // RCS-ID: $Id$
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
22
23 #ifdef __BORLANDC__
24 #pragma hdrstop
25 #endif
26
27 #if wxUSE_DIRDLG
28
29 #if defined(__WIN95__) && !defined(__GNUWIN32_OLD__) && wxUSE_OLE
30
31 #ifndef WX_PRECOMP
32 #include "wx/utils.h"
33 #include "wx/dialog.h"
34 #include "wx/dirdlg.h"
35 #include "wx/log.h"
36 #include "wx/app.h" // for GetComCtl32Version()
37 #endif
38
39 #include "wx/palmos/private.h"
40
41 // ----------------------------------------------------------------------------
42 // constants
43 // ----------------------------------------------------------------------------
44
45 #ifndef MAX_PATH
46 #define MAX_PATH 4096 // be generous
47 #endif
48
49 #ifndef BIF_NEWDIALOGSTYLE
50 #define BIF_NEWDIALOGSTYLE 0x0040
51 #endif
52
53 #ifndef BIF_NONEWFOLDERBUTTON
54 #define BIF_NONEWFOLDERBUTTON 0x0200
55 #endif
56
57 #ifndef BIF_EDITBOX
58 #define BIF_EDITBOX 16
59 #endif
60
61 // ----------------------------------------------------------------------------
62 // wxWidgets macros
63 // ----------------------------------------------------------------------------
64
65 IMPLEMENT_CLASS(wxDirDialog, wxDialog)
66
67 // ----------------------------------------------------------------------------
68 // private functions prototypes
69 // ----------------------------------------------------------------------------
70
71 // free the parameter
72 static void ItemListFree(LPITEMIDLIST pidl);
73
74 // the callback proc for the dir dlg
75 static int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp,
76 LPARAM pData);
77
78
79 // ============================================================================
80 // implementation
81 // ============================================================================
82
83 // ----------------------------------------------------------------------------
84 // wxDirDialog
85 // ----------------------------------------------------------------------------
86
87 wxDirDialog::wxDirDialog(wxWindow *parent,
88 const wxString& message,
89 const wxString& defaultPath,
90 long style,
91 const wxPoint& WXUNUSED(pos),
92 const wxSize& WXUNUSED(size),
93 const wxString& WXUNUSED(name))
94 {
95 }
96
97 void wxDirDialog::SetPath(const wxString& path)
98 {
99 }
100
101 int wxDirDialog::ShowModal()
102 {
103 return wxID_OK;
104 }
105
106 // ----------------------------------------------------------------------------
107 // private functions
108 // ----------------------------------------------------------------------------
109
110 static int CALLBACK
111 BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData)
112 {
113 return 0;
114 }
115
116
117 static void ItemListFree(LPITEMIDLIST pidl)
118 {
119 if ( pidl )
120 {
121 LPMALLOC pMalloc;
122 SHGetMalloc(&pMalloc);
123 if ( pMalloc )
124 {
125 pMalloc->Free(pidl);
126 pMalloc->Release();
127 }
128 else
129 {
130 wxLogLastError(wxT("SHGetMalloc"));
131 }
132 }
133 }
134
135 #else
136 #include "../generic/dirdlgg.cpp"
137 #endif // compiler/platform on which the code here compiles
138
139 #endif // wxUSE_DIRDLG