1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: srchdlg.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SFX_SRCHDLG_HXX_
31 #define _SFX_SRCHDLG_HXX_
33 #ifndef _VCL_BUTTON_HXX
34 #include <vcl/button.hxx>
36 #include <vcl/combobox.hxx>
38 #include <vcl/edit.hxx>
40 #ifndef _VCL_FIXED_HXX
41 #include <vcl/fixed.hxx>
43 #include <sfx2/basedlgs.hxx>
45 // ============================================================================
49 // ============================================================================
51 // ============================================================================
53 class SearchDialog
: public ModelessDialog
56 FixedText m_aSearchLabel
;
57 ComboBox m_aSearchEdit
;
58 CheckBox m_aWholeWordsBox
;
59 CheckBox m_aMatchCaseBox
;
60 CheckBox m_aWrapAroundBox
;
61 CheckBox m_aBackwardsBox
;
62 PushButton m_aFindBtn
;
63 CancelButton m_aCancelBtn
;
69 ::rtl::OUString m_sConfigName
;
70 ByteString m_sWinState
;
72 bool m_bIsConstructed
;
77 DECL_LINK( FindHdl
, PushButton
* );
78 DECL_LINK( ToggleHdl
, CheckBox
* );
81 SearchDialog( Window
* pWindow
, const ::rtl::OUString
& rConfigName
);
84 inline void SetFindHdl( const Link
& rLink
) { m_aFindHdl
= rLink
; }
85 inline void SetCloseHdl( const Link
& rLink
) { m_aCloseHdl
= rLink
; }
87 inline String
GetSearchText() const { return m_aSearchEdit
.GetText(); }
88 inline void SetSearchText( const String
& _rText
) { m_aSearchEdit
.SetText( _rText
); }
89 inline bool IsOnlyWholeWords() const { return ( m_aWholeWordsBox
.IsChecked() != FALSE
); }
90 inline bool IsMarchCase() const { return ( m_aMatchCaseBox
.IsChecked() != FALSE
); }
91 inline bool IsWrapAround() const { return ( m_aWrapAroundBox
.IsChecked() != FALSE
); }
92 inline bool IsSearchBackwards() const { return ( m_aBackwardsBox
.IsChecked() != FALSE
); }
94 void SetFocusOnEdit();
98 virtual void StateChanged( StateChangedType nStateChange
);
101 // ============================================================================
105 // ============================================================================
107 #endif // _SFX_SRCHDLG_HXX_