LibreOffice Module formula (master) 1
structpg.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
20#pragma once
21
22#include <vcl/weld.hxx>
23
24namespace formula
25{
26
27class FormulaToken;
28
29
30class StructPage final
31{
32private:
33 std::unique_ptr<weld::Builder> m_xBuilder;
34 std::unique_ptr<weld::Container> m_xContainer;
35 std::unique_ptr<weld::TreeView> m_xTlbStruct;
36
38
39 OUString maImgEnd;
40 OUString maImgError;
41
44
45 DECL_LINK(SelectHdl, weld::TreeView&, void);
46
47 const FormulaToken* GetFunctionEntry(const weld::TreeIter* pEntry);
48
49 void SetActiveFlag(bool bFlag);
50 bool GetActiveFlag() const { return bActiveFlag;}
51
52public:
53
54 explicit StructPage(weld::Container* pParent);
56
57 void ClearStruct();
58 bool InsertEntry(const OUString& rText, const weld::TreeIter* pParent,
59 sal_uInt16 nFlag, int nPos,
60 const FormulaToken* pIFormulaToken,
61 weld::TreeIter& rRet);
62
63 OUString GetEntryText(const weld::TreeIter* pEntry) const;
64
65 void SetSelectionHdl( const Link<StructPage&,void>& rLink ) { aSelLink = rLink; }
66
68
69 bool IsVisible() const { return m_xContainer->get_visible(); }
70};
71
72} // formula
73
74/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Link< StructPage &, void > aSelLink
Definition: structpg.hxx:37
OUString GetEntryText(const weld::TreeIter *pEntry) const
Definition: structpg.cxx:97
bool GetActiveFlag() const
Definition: structpg.hxx:50
void SetSelectionHdl(const Link< StructPage &, void > &rLink)
Definition: structpg.hxx:65
std::unique_ptr< weld::TreeView > m_xTlbStruct
Definition: structpg.hxx:35
StructPage(weld::Container *pParent)
Definition: structpg.cxx:35
bool IsVisible() const
Definition: structpg.hxx:69
OUString maImgError
Definition: structpg.hxx:40
DECL_LINK(SelectHdl, weld::TreeView &, void)
weld::TreeView & GetTlbStruct() const
Definition: structpg.hxx:67
bool InsertEntry(const OUString &rText, const weld::TreeIter *pParent, sal_uInt16 nFlag, int nPos, const FormulaToken *pIFormulaToken, weld::TreeIter &rRet)
Definition: structpg.cxx:60
const FormulaToken * GetFunctionEntry(const weld::TreeIter *pEntry)
Definition: structpg.cxx:105
void SetActiveFlag(bool bFlag)
Definition: structpg.cxx:30
std::unique_ptr< weld::Builder > m_xBuilder
Definition: structpg.hxx:33
std::unique_ptr< weld::Container > m_xContainer
Definition: structpg.hxx:34
const FormulaToken * pSelectedToken
Definition: structpg.hxx:42