nss: upgrade to release 3.73
[LibreOffice.git] / formula / source / ui / dlg / ControlHelper.hxx
blob613e40c5e9c73778f78c083ae0693132c67e925f
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 INCLUDED_FORMULA_SOURCE_UI_DLG_CONTROLHELPER_HXX
20 #define INCLUDED_FORMULA_SOURCE_UI_DLG_CONTROLHELPER_HXX
22 #include <formula/funcutl.hxx>
24 namespace formula
27 class ParaWin;
30 class ArgEdit : public RefEdit
32 public:
33 ArgEdit(std::unique_ptr<weld::Entry> xControl);
35 void Init(ArgEdit* pPrevEdit, ArgEdit* pNextEdit,
36 weld::ScrolledWindow& rArgSlider,
37 ParaWin& rParaWin, sal_uInt16 nArgCount);
39 protected:
40 virtual bool KeyInput(const KeyEvent& rKEvt) override;
42 private:
43 ArgEdit* pEdPrev;
44 ArgEdit* pEdNext;
45 weld::ScrolledWindow* pSlider;
46 ParaWin* pParaWin;
47 sal_uInt16 nArgs;
52 class ArgInput final
54 private:
55 Link<ArgInput&,void> aFxClickLink;
56 Link<ArgInput&,void> aFxFocusLink;
57 Link<ArgInput&,void> aEdFocusLink;
58 Link<ArgInput&,void> aEdModifyLink;
60 weld::Label*pFtArg;
61 weld::Button* pBtnFx;
62 ArgEdit* pEdArg;
63 RefButton* pRefBtn;
65 DECL_LINK( FxBtnClickHdl, weld::Button&, void );
66 DECL_LINK( FxBtnFocusHdl, weld::Widget&, void );
67 DECL_LINK( EdFocusHdl, RefEdit&, void );
68 DECL_LINK( EdModifyHdl, RefEdit&, void );
70 public:
72 ArgInput();
74 void InitArgInput(weld::Label* pftArg,
75 weld::Button* pbtnFx,
76 ArgEdit* pedArg,
77 RefButton* prefBtn);
79 void SetArgName(const OUString &aArg);
80 OUString GetArgName() const;
81 void SetArgNameFont(const vcl::Font&);
83 void SetArgVal(const OUString &aVal);
84 OUString GetArgVal() const;
86 void SelectAll();
88 ArgEdit* GetArgEdPtr() { return pEdArg; }
91 void SetFxClickHdl( const Link<ArgInput&,void>& rLink ) { aFxClickLink = rLink; }
93 void SetFxFocusHdl( const Link<ArgInput&,void>& rLink ) { aFxFocusLink = rLink; }
95 void SetEdFocusHdl( const Link<ArgInput&,void>& rLink ) { aEdFocusLink = rLink; }
97 void SetEdModifyHdl( const Link<ArgInput&,void>& rLink ) { aEdModifyLink = rLink; }
99 void Hide();
100 void Show();
102 void UpdateAccessibleNames();
106 #endif // FORMULA_FORMULA_HELPER_HXX_INCLUDED
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */