1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/fdrepdlg.cpp
3 // Purpose: wxFindReplaceDialog class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "mswfdrepdlg.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
38 #include "wx/palmos/private.h"
40 #include "wx/fdrepdlg.h"
42 // ----------------------------------------------------------------------------
43 // functions prototypes
44 // ----------------------------------------------------------------------------
46 // ----------------------------------------------------------------------------
48 // ----------------------------------------------------------------------------
50 IMPLEMENT_DYNAMIC_CLASS(wxFindReplaceDialog
, wxDialog
)
52 // ----------------------------------------------------------------------------
53 // wxFindReplaceDialogImpl: the internals of wxFindReplaceDialog
54 // ----------------------------------------------------------------------------
56 class WXDLLEXPORT wxFindReplaceDialogImpl
59 wxFindReplaceDialogImpl(wxFindReplaceDialog
*dialog
, int flagsWX
);
60 ~wxFindReplaceDialogImpl();
62 void InitFindWhat(const wxString
& str
);
63 void InitReplaceWith(const wxString
& str
);
65 void SubclassDialog(HWND hwnd
);
67 static UINT
GetFindDialogMessage() { return ms_msgFindDialog
; }
69 // only for passing to ::FindText or ::ReplaceText
70 FINDREPLACE
*GetPtrFindReplace() { return &m_findReplace
; }
72 // set/query the "closed by user" flag
73 void SetClosedByUser() { m_wasClosedByUser
= TRUE
; }
74 bool WasClosedByUser() const { return m_wasClosedByUser
; }
77 void InitString(const wxString
& str
, LPTSTR
*ppStr
, WORD
*pLen
);
79 // the owner of the dialog
82 // the previous window proc of our owner
83 WNDPROC m_oldParentWndProc
;
85 // the find replace data used by the dialog
86 FINDREPLACE m_findReplace
;
88 // TRUE if the user closed us, FALSE otherwise
89 bool m_wasClosedByUser
;
91 // registered Message for Dialog
92 static UINT ms_msgFindDialog
;
94 DECLARE_NO_COPY_CLASS(wxFindReplaceDialogImpl
)
97 UINT
wxFindReplaceDialogImpl::ms_msgFindDialog
= 0;
99 // ============================================================================
101 // ============================================================================
103 // ----------------------------------------------------------------------------
104 // wxFindReplaceDialogImpl
105 // ----------------------------------------------------------------------------
107 wxFindReplaceDialogImpl::wxFindReplaceDialogImpl(wxFindReplaceDialog
*dialog
,
112 void wxFindReplaceDialogImpl::InitString(const wxString
& str
,
113 LPTSTR
*ppStr
, WORD
*pLen
)
117 void wxFindReplaceDialogImpl::InitFindWhat(const wxString
& str
)
121 void wxFindReplaceDialogImpl::InitReplaceWith(const wxString
& str
)
125 void wxFindReplaceDialogImpl::SubclassDialog(HWND hwnd
)
129 wxFindReplaceDialogImpl::~wxFindReplaceDialogImpl()
133 // ============================================================================
134 // wxFindReplaceDialog implementation
135 // ============================================================================
137 // ----------------------------------------------------------------------------
138 // wxFindReplaceDialog ctors/dtor
139 // ----------------------------------------------------------------------------
141 void wxFindReplaceDialog::Init()
145 wxFindReplaceDialog::wxFindReplaceDialog(wxWindow
*parent
,
146 wxFindReplaceData
*data
,
147 const wxString
&title
,
149 : wxFindReplaceDialogBase(parent
, data
, title
, flags
)
153 wxFindReplaceDialog::~wxFindReplaceDialog()
157 bool wxFindReplaceDialog::Create(wxWindow
*parent
,
158 wxFindReplaceData
*data
,
159 const wxString
&title
,
165 // ----------------------------------------------------------------------------
166 // wxFindReplaceData show/hide
167 // ----------------------------------------------------------------------------
169 bool wxFindReplaceDialog::Show(bool show
)
174 // ----------------------------------------------------------------------------
175 // wxFindReplaceDialog title handling
176 // ----------------------------------------------------------------------------
178 void wxFindReplaceDialog::SetTitle( const wxString
& title
)
182 wxString
wxFindReplaceDialog::GetTitle() const
187 // ----------------------------------------------------------------------------
188 // wxFindReplaceDialog position/size
189 // ----------------------------------------------------------------------------
191 void wxFindReplaceDialog::DoSetSize(int WXUNUSED(x
), int WXUNUSED(y
),
192 int WXUNUSED(width
), int WXUNUSED(height
),
193 int WXUNUSED(sizeFlags
))
195 // ignore - we can't change the size of this standard dialog
199 // NB: of course, both of these functions are completely bogus, but it's better
201 void wxFindReplaceDialog::DoGetSize(int *width
, int *height
) const
205 void wxFindReplaceDialog::DoGetClientSize(int *width
, int *height
) const
209 #endif // wxUSE_FINDREPLDLG