nss: upgrade to release 3.73
[LibreOffice.git] / formula / source / ui / dlg / funcpage.hxx
blob319ee7c8ad2c131bf4fb6e47d40e8f4c01796a9f
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 .
20 #ifndef INCLUDED_FORMULA_SOURCE_UI_DLG_FUNCPAGE_HXX
21 #define INCLUDED_FORMULA_SOURCE_UI_DLG_FUNCPAGE_HXX
23 #include <vcl/weld.hxx>
24 #include <vector>
26 namespace formula
29 class IFunctionDescription;
30 class IFunctionManager;
31 class IFunctionCategory;
33 typedef const IFunctionDescription* TFunctionDesc;
35 class FuncPage final
37 private:
38 std::unique_ptr<weld::Builder> m_xBuilder;
39 std::unique_ptr<weld::Container> m_xContainer;
41 std::unique_ptr<weld::ComboBox> m_xLbCategory;
42 std::unique_ptr<weld::TreeView> m_xLbFunction;
43 std::unique_ptr<weld::Entry> m_xLbFunctionSearchString;
45 Link<FuncPage&,void> aDoubleClickLink;
46 Link<FuncPage&,void> aSelectionLink;
47 const IFunctionManager* m_pFunctionManager;
49 ::std::vector< TFunctionDesc > aLRUList;
50 OString m_aHelpId;
52 void impl_addFunctions(const IFunctionCategory* _pCategory);
54 DECL_LINK(SelComboBoxHdl, weld::ComboBox&, void);
55 DECL_LINK(SelTreeViewHdl, weld::TreeView&, void);
56 DECL_LINK(DblClkHdl, weld::TreeView&, bool);
57 DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
58 DECL_LINK(ModifyHdl, weld::Entry&, void);
60 void UpdateFunctionList(const OUString&);
62 public:
64 FuncPage(weld::Container* pContainer, const IFunctionManager* _pFunctionManager);
65 ~FuncPage();
67 void SetCategory(sal_Int32 nCat);
68 void SetFunction(sal_Int32 nFunc);
69 void SetFocus();
70 sal_Int32 GetCategory() const;
71 sal_Int32 GetCategoryEntryCount() const;
72 sal_Int32 GetFunction() const;
73 sal_Int32 GetFunctionEntryCount() const;
75 sal_Int32 GetFuncPos(const IFunctionDescription* _pDesc);
76 const IFunctionDescription* GetFuncDesc( sal_Int32 nPos ) const;
77 OUString GetSelFunctionName() const;
79 void SetDoubleClickHdl( const Link<FuncPage&,void>& rLink ) { aDoubleClickLink = rLink; }
81 void SetSelectHdl( const Link<FuncPage&,void>& rLink ) { aSelectionLink = rLink; }
83 bool IsVisible() const { return m_xContainer->get_visible(); }
86 } // formula
87 #endif
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */