LibreOffice Module formula (master) 1
ControlHelper.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 <formula/funcutl.hxx>
22
23namespace formula
24{
25
26class ParaWin;
27
28
29class ArgEdit : public RefEdit
30{
31public:
32 ArgEdit(std::unique_ptr<weld::Entry> xControl);
33
34 void Init(ArgEdit* pPrevEdit, ArgEdit* pNextEdit,
35 weld::ScrolledWindow& rArgSlider,
36 ParaWin& rParaWin, sal_uInt16 nArgCount);
37
38protected:
39 virtual bool KeyInput(const KeyEvent& rKEvt) override;
40
41private:
46 sal_uInt16 nArgs;
47};
48
49
50
51class ArgInput final
52{
53private:
58
63
64 DECL_LINK( FxBtnClickHdl, weld::Button&, void );
65 DECL_LINK( FxBtnFocusHdl, weld::Widget&, void );
66 DECL_LINK( EdFocusHdl, RefEdit&, void );
67 DECL_LINK( EdModifyHdl, RefEdit&, void );
68
69public:
70
71 ArgInput();
72
73 void InitArgInput(weld::Label* pftArg,
74 weld::Button* pbtnFx,
75 ArgEdit* pedArg,
76 RefButton* prefBtn);
77
78 void SetArgName(const OUString &aArg);
79 OUString GetArgName() const;
80 void SetArgNameFont(const vcl::Font&);
81
82 void SetArgVal(const OUString &aVal);
83 OUString GetArgVal() const;
84
85 void SelectAll();
86
87 ArgEdit* GetArgEdPtr() { return pEdArg; }
88
89
90 void SetFxClickHdl( const Link<ArgInput&,void>& rLink ) { aFxClickLink = rLink; }
91
92 void SetFxFocusHdl( const Link<ArgInput&,void>& rLink ) { aFxFocusLink = rLink; }
93
94 void SetEdFocusHdl( const Link<ArgInput&,void>& rLink ) { aEdFocusLink = rLink; }
95
96 void SetEdModifyHdl( const Link<ArgInput&,void>& rLink ) { aEdModifyLink = rLink; }
97
98 void Hide();
99 void Show();
100
102};
103
104}
105
106/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ArgEdit(std::unique_ptr< weld::Entry > xControl)
Definition: funcutl.cxx:34
virtual bool KeyInput(const KeyEvent &rKEvt) override
Definition: funcutl.cxx:56
void Init(ArgEdit *pPrevEdit, ArgEdit *pNextEdit, weld::ScrolledWindow &rArgSlider, ParaWin &rParaWin, sal_uInt16 nArgCount)
Definition: funcutl.cxx:44
weld::ScrolledWindow * pSlider
void SetFxClickHdl(const Link< ArgInput &, void > &rLink)
void SetArgNameFont(const vcl::Font &)
Definition: funcutl.cxx:176
Link< ArgInput &, void > aFxClickLink
void SetEdModifyHdl(const Link< ArgInput &, void > &rLink)
Link< ArgInput &, void > aEdModifyLink
Link< ArgInput &, void > aEdFocusLink
OUString GetArgName() const
Definition: funcutl.cxx:167
Link< ArgInput &, void > aFxFocusLink
void UpdateAccessibleNames()
Definition: funcutl.cxx:229
DECL_LINK(FxBtnClickHdl, weld::Button &, void)
void SetFxFocusHdl(const Link< ArgInput &, void > &rLink)
ArgEdit * GetArgEdPtr()
void SetEdFocusHdl(const Link< ArgInput &, void > &rLink)
OUString GetArgVal() const
Definition: funcutl.cxx:197
void InitArgInput(weld::Label *pftArg, weld::Button *pbtnFx, ArgEdit *pedArg, RefButton *prefBtn)
Definition: funcutl.cxx:139
DECL_LINK(EdModifyHdl, RefEdit &, void)
DECL_LINK(FxBtnFocusHdl, weld::Widget &, void)
void SetArgName(const OUString &aArg)
Definition: funcutl.cxx:160
weld::Label * pFtArg
DECL_LINK(EdFocusHdl, RefEdit &, void)
RefButton * pRefBtn
void SetArgVal(const OUString &aVal)
Definition: funcutl.cxx:190
weld::Button * pBtnFx