1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 SC_STRUCTPG_HXX
21 #define SC_STRUCTPG_HXX
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/treelistbox.hxx>
30 #include "formula/IFunctionDescription.hxx"
31 #include "formula/omoduleclient.hxx"
33 //============================================================================
35 //============================================================================
40 class StructListBox
: public SvTreeListBox
47 virtual void MouseButtonDown( const MouseEvent
& rMEvt
);
51 StructListBox(Window
* pParent
, const ResId
& rResId
);
53 /** Inserts an entry with static image (no difference between collapsed/expanded). */
54 SvTreeListEntry
* InsertStaticEntry(
55 const XubString
& rText
,
56 const Image
& rEntryImg
,
57 SvTreeListEntry
* pParent
= NULL
,
58 sal_uLong nPos
= LIST_APPEND
,
59 IFormulaToken
* pToken
= NULL
);
61 void SetActiveFlag(sal_Bool bFlag
=sal_True
);
62 sal_Bool
GetActiveFlag();
67 //============================================================================
69 class StructPage
: public TabPage
70 , public IStructHelper
73 OModuleClient m_aModuleClient
;
77 StructListBox aTlbStruct
;
81 IFormulaToken
* pSelectedToken
;
83 DECL_LINK( SelectHdl
, SvTreeListBox
* );
85 using Window::GetParent
;
89 IFormulaToken
* GetFunctionEntry(SvTreeListEntry
* pEntry
);
93 StructPage( Window
* pParent
);
96 virtual SvTreeListEntry
* InsertEntry(const XubString
& rText
, SvTreeListEntry
* pParent
,
97 sal_uInt16 nFlag
,sal_uLong nPos
=0,IFormulaToken
* pScToken
=NULL
);
99 virtual String
GetEntryText(SvTreeListEntry
* pEntry
) const;
100 virtual SvTreeListEntry
* GetParent(SvTreeListEntry
* pEntry
) const;
102 void SetSelectionHdl( const Link
& rLink
) { aSelLink
= rLink
; }
103 const Link
& GetSelectionHdl() const { return aSelLink
; }
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */