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