bump product version to 4.1.6.2
[LibreOffice.git] / sfx2 / inc / srchdlg.hxx
blob5913917592f87b35abb17ba7e7c0238cbb5cd338
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _SFX_SRCHDLG_HXX_
20 #define _SFX_SRCHDLG_HXX_
22 #include <vcl/button.hxx>
23 #include <vcl/combobox.hxx>
24 #include <vcl/edit.hxx>
25 #include <vcl/fixed.hxx>
26 #include <sfx2/basedlgs.hxx>
28 // ============================================================================
30 namespace sfx2 {
32 // ============================================================================
33 // SearchDialog
34 // ============================================================================
36 class SearchDialog : public ModelessDialog
38 private:
39 FixedText m_aSearchLabel;
40 ComboBox m_aSearchEdit;
41 CheckBox m_aWholeWordsBox;
42 CheckBox m_aMatchCaseBox;
43 CheckBox m_aWrapAroundBox;
44 CheckBox m_aBackwardsBox;
45 PushButton m_aFindBtn;
46 CancelButton m_aCancelBtn;
48 Link m_aFindHdl;
49 Link m_aCloseHdl;
51 String m_sToggleText;
52 OUString m_sConfigName;
53 OString m_sWinState;
55 bool m_bIsConstructed;
57 void LoadConfig();
58 void SaveConfig();
60 DECL_LINK(FindHdl, void *);
61 DECL_LINK(ToggleHdl, void *);
63 public:
64 SearchDialog( Window* pWindow, const OUString& rConfigName );
65 ~SearchDialog();
67 inline void SetFindHdl( const Link& rLink ) { m_aFindHdl = rLink; }
68 inline void SetCloseHdl( const Link& rLink ) { m_aCloseHdl = rLink; }
70 inline String GetSearchText() const { return m_aSearchEdit.GetText(); }
71 inline void SetSearchText( const String& _rText ) { m_aSearchEdit.SetText( _rText ); }
72 inline bool IsOnlyWholeWords() const { return ( m_aWholeWordsBox.IsChecked() != sal_False ); }
73 inline bool IsMarchCase() const { return ( m_aMatchCaseBox.IsChecked() != sal_False ); }
74 inline bool IsWrapAround() const { return ( m_aWrapAroundBox.IsChecked() != sal_False ); }
75 inline bool IsSearchBackwards() const { return ( m_aBackwardsBox.IsChecked() != sal_False ); }
77 void SetFocusOnEdit();
79 virtual sal_Bool Close();
80 virtual void Move();
81 virtual void StateChanged( StateChangedType nStateChange );
84 // ============================================================================
86 } // namespace sfx2
88 // ============================================================================
90 #endif // _SFX_SRCHDLG_HXX_
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */