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
29struct ImplSVEvent;
30
32{
34
35 css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus;
36 OUString aLookUpText;
38 std::stack< OUString > aLookUpHistory;
40
41 std::unique_ptr<weld::Button> m_xLeftBtn;
42 std::unique_ptr<weld::ComboBox> m_xWordCB;
43 std::unique_ptr<weld::TreeView> m_xAlternativesCT;
44 std::unique_ptr<weld::Label> m_xNotFound;
45 std::unique_ptr<weld::Entry> m_xReplaceEdit;
46 std::unique_ptr<weld::ComboBox> m_xLangLB;
47 std::unique_ptr<weld::Button> m_xReplaceBtn;
49
50public:
51 virtual ~SvxThesaurusDialog() override;
52
53 // Handler
54 DECL_LINK( ReplaceBtnHdl_Impl, weld::Button&, void );
55 DECL_LINK( LeftBtnHdl_Impl, weld::Button&, void );
56 DECL_LINK( LanguageHdl_Impl, weld::ComboBox&, void );
57 DECL_LINK( WordSelectHdl_Impl, weld::ComboBox&, void );
58 DECL_LINK( AlternativesSelectHdl_Impl, weld::TreeView&, void );
59 DECL_LINK( AlternativesDoubleClickHdl_Impl, weld::TreeView&, bool );
60 DECL_LINK( SelectFirstHdl_Impl, void*, void );
61 DECL_LINK( ReplaceEditHdl_Impl, weld::Entry&, void );
62 DECL_LINK( ModifyTimer_Hdl, Timer *, void );
63 DECL_LINK( KeyInputHdl, const KeyEvent&, bool );
64
67 css::uno::Sequence< css::uno::Reference< css::linguistic2::XMeaning > >
68 queryMeanings_Impl( OUString& rTerm, const css::lang::Locale& rLocale, const css::beans::PropertyValues& rProperties );
69
71 void LookUp( const OUString &rText );
72 void LookUp_Impl();
73
74public:
76 css::uno::Reference< css::linguistic2::XThesaurus > const & xThesaurus,
77 const OUString &rWord, LanguageType nLanguage);
78 void SetWindowTitle( LanguageType nLanguage );
79 OUString GetWord() const;
80};
81
82/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DECL_LINK(LeftBtnHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xReplaceBtn
Definition: thesdlg.hxx:47
void LookUp(const OUString &rText)
Definition: thesdlg.cxx:126
std::unique_ptr< weld::TreeView > m_xAlternativesCT
Definition: thesdlg.hxx:43
std::unique_ptr< weld::ComboBox > m_xLangLB
Definition: thesdlg.hxx:46
DECL_LINK(KeyInputHdl, const KeyEvent &, bool)
DECL_LINK(AlternativesDoubleClickHdl_Impl, weld::TreeView &, bool)
std::unique_ptr< weld::Entry > m_xReplaceEdit
Definition: thesdlg.hxx:45
DECL_LINK(ReplaceBtnHdl_Impl, weld::Button &, void)
LanguageType nLookUpLanguage
Definition: thesdlg.hxx:37
css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus
Definition: thesdlg.hxx:35
DECL_LINK(LanguageHdl_Impl, weld::ComboBox &, void)
DECL_LINK(WordSelectHdl_Impl, weld::ComboBox &, void)
DECL_LINK(SelectFirstHdl_Impl, void *, void)
DECL_LINK(AlternativesSelectHdl_Impl, weld::TreeView &, void)
virtual ~SvxThesaurusDialog() override
Definition: thesdlg.cxx:320
DECL_LINK(ModifyTimer_Hdl, Timer *, void)
void SetWindowTitle(LanguageType nLanguage)
Definition: thesdlg.cxx:334
std::stack< OUString > aLookUpHistory
Definition: thesdlg.hxx:38
OUString GetWord() const
Definition: thesdlg.cxx:345
SvxThesaurusDialog(weld::Widget *pParent, css::uno::Reference< css::linguistic2::XThesaurus > const &xThesaurus, const OUString &rWord, LanguageType nLanguage)
Definition: thesdlg.cxx:238
ImplSVEvent * m_nSelectFirstEvent
Definition: thesdlg.hxx:48
OUString aLookUpText
Definition: thesdlg.hxx:36
std::unique_ptr< weld::ComboBox > m_xWordCB
Definition: thesdlg.hxx:42
bool UpdateAlternativesBox_Impl()
Definition: thesdlg.cxx:86
DECL_LINK(ReplaceEditHdl_Impl, weld::Entry &, void)
std::unique_ptr< weld::Button > m_xLeftBtn
Definition: thesdlg.hxx:41
std::unique_ptr< weld::Label > m_xNotFound
Definition: thesdlg.hxx:44
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