]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/fdrepdlg.cpp
Forgot to commit header.
[wxWidgets.git] / src / palmos / fdrepdlg.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/fdrepdlg.cpp
3 // Purpose: wxFindReplaceDialog class
4 // Author: William Osborne
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "mswfdrepdlg.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_FINDREPLDLG
32
33 #ifndef WX_PRECOMP
34 #include "wx/intl.h"
35 #include "wx/log.h"
36 #endif
37
38 #include "wx/palmos/private.h"
39
40 #include "wx/fdrepdlg.h"
41
42 // ----------------------------------------------------------------------------
43 // functions prototypes
44 // ----------------------------------------------------------------------------
45
46 // ----------------------------------------------------------------------------
47 // wxWin macros
48 // ----------------------------------------------------------------------------
49
50 IMPLEMENT_DYNAMIC_CLASS(wxFindReplaceDialog, wxDialog)
51
52 // ----------------------------------------------------------------------------
53 // wxFindReplaceDialogImpl: the internals of wxFindReplaceDialog
54 // ----------------------------------------------------------------------------
55
56 class WXDLLEXPORT wxFindReplaceDialogImpl
57 {
58 public:
59 wxFindReplaceDialogImpl(wxFindReplaceDialog *dialog, int flagsWX);
60 ~wxFindReplaceDialogImpl();
61
62 void InitFindWhat(const wxString& str);
63 void InitReplaceWith(const wxString& str);
64
65 void SubclassDialog(HWND hwnd);
66
67 static UINT GetFindDialogMessage() { return ms_msgFindDialog; }
68
69 // only for passing to ::FindText or ::ReplaceText
70 FINDREPLACE *GetPtrFindReplace() { return &m_findReplace; }
71
72 // set/query the "closed by user" flag
73 void SetClosedByUser() { m_wasClosedByUser = TRUE; }
74 bool WasClosedByUser() const { return m_wasClosedByUser; }
75
76 private:
77 void InitString(const wxString& str, LPTSTR *ppStr, WORD *pLen);
78
79 // the owner of the dialog
80 HWND m_hwndOwner;
81
82 // the previous window proc of our owner
83 WNDPROC m_oldParentWndProc;
84
85 // the find replace data used by the dialog
86 FINDREPLACE m_findReplace;
87
88 // TRUE if the user closed us, FALSE otherwise
89 bool m_wasClosedByUser;
90
91 // registered Message for Dialog
92 static UINT ms_msgFindDialog;
93
94 DECLARE_NO_COPY_CLASS(wxFindReplaceDialogImpl)
95 };
96
97 UINT wxFindReplaceDialogImpl::ms_msgFindDialog = 0;
98
99 // ============================================================================
100 // implementation
101 // ============================================================================
102
103 // ----------------------------------------------------------------------------
104 // wxFindReplaceDialogImpl
105 // ----------------------------------------------------------------------------
106
107 wxFindReplaceDialogImpl::wxFindReplaceDialogImpl(wxFindReplaceDialog *dialog,
108 int flagsWX)
109 {
110 }
111
112 void wxFindReplaceDialogImpl::InitString(const wxString& str,
113 LPTSTR *ppStr, WORD *pLen)
114 {
115 }
116
117 void wxFindReplaceDialogImpl::InitFindWhat(const wxString& str)
118 {
119 }
120
121 void wxFindReplaceDialogImpl::InitReplaceWith(const wxString& str)
122 {
123 }
124
125 void wxFindReplaceDialogImpl::SubclassDialog(HWND hwnd)
126 {
127 }
128
129 wxFindReplaceDialogImpl::~wxFindReplaceDialogImpl()
130 {
131 }
132
133 // ============================================================================
134 // wxFindReplaceDialog implementation
135 // ============================================================================
136
137 // ----------------------------------------------------------------------------
138 // wxFindReplaceDialog ctors/dtor
139 // ----------------------------------------------------------------------------
140
141 void wxFindReplaceDialog::Init()
142 {
143 }
144
145 wxFindReplaceDialog::wxFindReplaceDialog(wxWindow *parent,
146 wxFindReplaceData *data,
147 const wxString &title,
148 int flags)
149 : wxFindReplaceDialogBase(parent, data, title, flags)
150 {
151 }
152
153 wxFindReplaceDialog::~wxFindReplaceDialog()
154 {
155 }
156
157 bool wxFindReplaceDialog::Create(wxWindow *parent,
158 wxFindReplaceData *data,
159 const wxString &title,
160 int flags)
161 {
162 return false;
163 }
164
165 // ----------------------------------------------------------------------------
166 // wxFindReplaceData show/hide
167 // ----------------------------------------------------------------------------
168
169 bool wxFindReplaceDialog::Show(bool show)
170 {
171 return false;
172 }
173
174 // ----------------------------------------------------------------------------
175 // wxFindReplaceDialog title handling
176 // ----------------------------------------------------------------------------
177
178 void wxFindReplaceDialog::SetTitle( const wxString& title)
179 {
180 }
181
182 wxString wxFindReplaceDialog::GetTitle() const
183 {
184 return wxString;
185 }
186
187 // ----------------------------------------------------------------------------
188 // wxFindReplaceDialog position/size
189 // ----------------------------------------------------------------------------
190
191 void wxFindReplaceDialog::DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
192 int WXUNUSED(width), int WXUNUSED(height),
193 int WXUNUSED(sizeFlags))
194 {
195 // ignore - we can't change the size of this standard dialog
196 return;
197 }
198
199 // NB: of course, both of these functions are completely bogus, but it's better
200 // than nothing
201 void wxFindReplaceDialog::DoGetSize(int *width, int *height) const
202 {
203 }
204
205 void wxFindReplaceDialog::DoGetClientSize(int *width, int *height) const
206 {
207 }
208
209 #endif // wxUSE_FINDREPLDLG
210