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