]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/dirdlg.cpp
map EAGAIN to wxSOCKET_WOULDBLOCK too as tit has this meaning for read() (even though...
[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 #include "wx/dirdlg.h"
32
33 #ifndef WX_PRECOMP
34 #include "wx/utils.h"
35 #include "wx/dialog.h"
36 #include "wx/log.h"
37 #include "wx/app.h" // for GetComCtl32Version()
38 #endif
39
40 #include "wx/palmos/private.h"
41
42 // ----------------------------------------------------------------------------
43 // constants
44 // ----------------------------------------------------------------------------
45
46 #ifndef MAX_PATH
47 #define MAX_PATH 4096 // be generous
48 #endif
49
50 #ifndef BIF_NEWDIALOGSTYLE
51 #define BIF_NEWDIALOGSTYLE 0x0040
52 #endif
53
54 #ifndef BIF_NONEWFOLDERBUTTON
55 #define BIF_NONEWFOLDERBUTTON 0x0200
56 #endif
57
58 #ifndef BIF_EDITBOX
59 #define BIF_EDITBOX 16
60 #endif
61
62 // ----------------------------------------------------------------------------
63 // wxWidgets macros
64 // ----------------------------------------------------------------------------
65
66 IMPLEMENT_CLASS(wxDirDialog, wxDialog)
67
68 // ----------------------------------------------------------------------------
69 // private functions prototypes
70 // ----------------------------------------------------------------------------
71
72 // free the parameter
73 static void ItemListFree(LPITEMIDLIST pidl);
74
75 // the callback proc for the dir dlg
76 static int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp,
77 LPARAM pData);
78
79
80 // ============================================================================
81 // implementation
82 // ============================================================================
83
84 // ----------------------------------------------------------------------------
85 // wxDirDialog
86 // ----------------------------------------------------------------------------
87
88 wxDirDialog::wxDirDialog(wxWindow *parent,
89 const wxString& message,
90 const wxString& defaultPath,
91 long style,
92 const wxPoint& WXUNUSED(pos),
93 const wxSize& WXUNUSED(size),
94 const wxString& WXUNUSED(name))
95 {
96 }
97
98 void wxDirDialog::SetPath(const wxString& path)
99 {
100 }
101
102 int wxDirDialog::ShowModal()
103 {
104 return wxID_OK;
105 }
106
107 // ----------------------------------------------------------------------------
108 // private functions
109 // ----------------------------------------------------------------------------
110
111 static int CALLBACK
112 BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData)
113 {
114 return 0;
115 }
116
117
118 static void ItemListFree(LPITEMIDLIST pidl)
119 {
120 if ( pidl )
121 {
122 LPMALLOC pMalloc;
123 SHGetMalloc(&pMalloc);
124 if ( pMalloc )
125 {
126 pMalloc->Free(pidl);
127 pMalloc->Release();
128 }
129 else
130 {
131 wxLogLastError(wxT("SHGetMalloc"));
132 }
133 }
134 }
135
136 #else
137 #include "../generic/dirdlgg.cpp"
138 #endif // compiler/platform on which the code here compiles
139
140 #endif // wxUSE_DIRDLG