LibreOffice Module cui (master)  1
thesdlg.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #pragma once
20 
21 #include <com/sun/star/linguistic2/XThesaurus.hpp>
22 
23 #include <vcl/idle.hxx>
24 #include <sfx2/basedlgs.hxx>
25 
26 #include <memory>
27 #include <stack>
28 
30 {
32 
33  css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus;
34  OUString aLookUpText;
36  std::stack< OUString > aLookUpHistory;
38 
39  std::unique_ptr<weld::Button> m_xLeftBtn;
40  std::unique_ptr<weld::ComboBox> m_xWordCB;
41  std::unique_ptr<weld::TreeView> m_xAlternativesCT;
42  std::unique_ptr<weld::Label> m_xNotFound;
43  std::unique_ptr<weld::Entry> m_xReplaceEdit;
44  std::unique_ptr<weld::ComboBox> m_xLangLB;
45  std::unique_ptr<weld::Button> m_xReplaceBtn;
46 
47 public:
48  virtual ~SvxThesaurusDialog() override;
49 
50  // Handler
51  DECL_LINK( ReplaceBtnHdl_Impl, weld::Button&, void );
52  DECL_LINK( LeftBtnHdl_Impl, weld::Button&, void );
53  DECL_LINK( LanguageHdl_Impl, weld::ComboBox&, void );
54  DECL_LINK( WordSelectHdl_Impl, weld::ComboBox&, void );
55  DECL_LINK( AlternativesSelectHdl_Impl, weld::TreeView&, void );
56  DECL_LINK( AlternativesDoubleClickHdl_Impl, weld::TreeView&, bool );
57  DECL_LINK( SelectFirstHdl_Impl, void*, void );
58  DECL_LINK( ReplaceEditHdl_Impl, weld::Entry&, void );
59  DECL_LINK( ModifyTimer_Hdl, Timer *, void );
60  DECL_LINK( KeyInputHdl, const KeyEvent&, bool );
61 
64  css::uno::Sequence< css::uno::Reference< css::linguistic2::XMeaning > >
65  queryMeanings_Impl( OUString& rTerm, const css::lang::Locale& rLocale, const css::beans::PropertyValues& rProperties );
66 
68  void LookUp( const OUString &rText );
69  void LookUp_Impl();
70 
71 public:
73  css::uno::Reference< css::linguistic2::XThesaurus > const & xThesaurus,
74  const OUString &rWord, LanguageType nLanguage);
75  void SetWindowTitle( LanguageType nLanguage );
76  OUString GetWord() const;
77 };
78 
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvxThesaurusDialog(weld::Widget *pParent, css::uno::Reference< css::linguistic2::XThesaurus > const &xThesaurus, const OUString &rWord, LanguageType nLanguage)
Definition: thesdlg.cxx:236
OUString aLookUpText
Definition: thesdlg.hxx:34
LanguageType nLookUpLanguage
Definition: thesdlg.hxx:35
DECL_LINK(ReplaceBtnHdl_Impl, weld::Button &, void)
virtual ~SvxThesaurusDialog() override
Definition: thesdlg.cxx:318
std::unique_ptr< weld::Label > m_xNotFound
Definition: thesdlg.hxx:42
std::unique_ptr< weld::TreeView > m_xAlternativesCT
Definition: thesdlg.hxx:41
OUString GetWord() const
Definition: thesdlg.cxx:338
css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus
Definition: thesdlg.hxx:33
std::unique_ptr< weld::Button > m_xReplaceBtn
Definition: thesdlg.hxx:45
bool UpdateAlternativesBox_Impl()
Definition: thesdlg.cxx:86
void SetWindowTitle(LanguageType nLanguage)
Definition: thesdlg.cxx:327
std::unique_ptr< weld::Button > m_xLeftBtn
Definition: thesdlg.hxx:39
std::stack< OUString > aLookUpHistory
Definition: thesdlg.hxx:36
css::uno::Sequence< css::uno::Reference< css::linguistic2::XMeaning > > queryMeanings_Impl(OUString &rTerm, const css::lang::Locale &rLocale, const css::beans::PropertyValues &rProperties)
Definition: thesdlg.cxx:62
std::unique_ptr< weld::ComboBox > m_xWordCB
Definition: thesdlg.hxx:40
std::unique_ptr< weld::ComboBox > m_xLangLB
Definition: thesdlg.hxx:44
void LookUp(const OUString &rText)
Definition: thesdlg.cxx:126
std::unique_ptr< weld::Entry > m_xReplaceEdit
Definition: thesdlg.hxx:43