Branch data Line data Source code
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 : : #ifndef SC_STRUCTPG_HXX
21 : : #define SC_STRUCTPG_HXX
22 : :
23 : : #include <svtools/stdctrl.hxx>
24 : : #include <vcl/lstbox.hxx>
25 : : #include <vcl/group.hxx>
26 : : #include <svtools/svmedit.hxx>
27 : : #include <vcl/tabpage.hxx>
28 : : #include <vcl/tabctrl.hxx>
29 : : #include <svtools/svtreebx.hxx>
30 : : #include "formula/IFunctionDescription.hxx"
31 : : #include "formula/omoduleclient.hxx"
32 : :
33 : : //============================================================================
34 : :
35 : : //============================================================================
36 : : namespace formula
37 : : {
38 : :
39 : : class IFormulaToken;
40 [ # # ]: 0 : class StructListBox : public SvTreeListBox
41 : : {
42 : : private:
43 : :
44 : : sal_Bool bActiveFlag;
45 : :
46 : : protected:
47 : : virtual void MouseButtonDown( const MouseEvent& rMEvt );
48 : :
49 : : public:
50 : :
51 : : StructListBox(Window* pParent, const ResId& rResId );
52 : :
53 : : /** Inserts an entry with static image (no difference between collapsed/expanded). */
54 : : SvLBoxEntry* InsertStaticEntry(
55 : : const XubString& rText,
56 : : const Image& rEntryImg,
57 : : SvLBoxEntry* pParent = NULL,
58 : : sal_uLong nPos = LIST_APPEND,
59 : : IFormulaToken* pToken = NULL );
60 : :
61 : : void SetActiveFlag(sal_Bool bFlag=sal_True);
62 : : sal_Bool GetActiveFlag();
63 : : void GetFocus();
64 : : void LoseFocus();
65 : : };
66 : :
67 : : //============================================================================
68 : :
69 [ # # ][ # # ]: 0 : class StructPage : public TabPage
[ # # ][ # # ]
[ # # ][ # # ]
70 : : , public IStructHelper
71 : : {
72 : : private:
73 : : OModuleClient m_aModuleClient;
74 : : Link aSelLink;
75 : :
76 : : FixedText aFtStruct;
77 : : StructListBox aTlbStruct;
78 : : Image maImgEnd;
79 : : Image maImgError;
80 : :
81 : : IFormulaToken* pSelectedToken;
82 : :
83 : : DECL_LINK( SelectHdl, SvTreeListBox* );
84 : :
85 : : using Window::GetParent;
86 : :
87 : : protected:
88 : :
89 : : IFormulaToken* GetFunctionEntry(SvLBoxEntry* pEntry);
90 : :
91 : : public:
92 : :
93 : : StructPage( Window* pParent);
94 : :
95 : : void ClearStruct();
96 : : virtual SvLBoxEntry* InsertEntry(const XubString& rText, SvLBoxEntry* pParent,
97 : : sal_uInt16 nFlag,sal_uLong nPos=0,IFormulaToken* pScToken=NULL);
98 : :
99 : : virtual String GetEntryText(SvLBoxEntry* pEntry) const;
100 : : virtual SvLBoxEntry* GetParent(SvLBoxEntry* pEntry) const;
101 : :
102 : 0 : void SetSelectionHdl( const Link& rLink ) { aSelLink = rLink; }
103 : : const Link& GetSelectionHdl() const { return aSelLink; }
104 : : };
105 : :
106 : : } // formula
107 : :
108 : : #endif
109 : :
110 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|