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 INCLUDED_SC_SOURCE_UI_INC_FUNCPAGE_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_FUNCPAGE_HXX
23 #include "funcutl.hxx"
25 #include <svtools/stdctrl.hxx>
26 #include <vcl/lstbox.hxx>
27 #include <vcl/group.hxx>
28 #include <svtools/svmedit.hxx>
29 #include <vcl/tabpage.hxx>
31 #include <vcl/tabctrl.hxx>
32 #include "parawin.hxx"
33 #include <svtools/treelistbox.hxx>
34 #include "compiler.hxx"
40 class ScListBox
: public ListBox
44 virtual void KeyInput( const KeyEvent
& rKEvt
);
45 virtual bool PreNotify( NotifyEvent
& rNEvt
);
48 ScListBox( vcl::Window
* pParent
, const ResId
& rResId
);
51 class ScFuncPage
: public TabPage
55 Link
<> aDoubleClickLink
;
56 Link
<> aSelectionLink
;
57 FixedText aFtCategory
;
59 FixedText aFtFunction
;
60 ScListBox aLbFunction
;
61 ImageButton aIBFunction
;
63 const ScFuncDesc
* aLRUList
[LRU_MAX
];
65 DECL_LINK( SelHdl
, ListBox
* );
66 DECL_LINK( DblClkHdl
, ListBox
* );
70 void UpdateFunctionList();
75 ScFuncPage( vcl::Window
* pParent
);
77 void SetCategory(sal_uInt16 nCat
);
78 void SetFunction(sal_uInt16 nFunc
);
80 sal_uInt16
GetCategory();
81 sal_uInt16
GetFunction();
82 sal_uInt16
GetFunctionEntryCount();
84 sal_uInt16
GetFuncPos(const ScFuncDesc
*);
85 const ScFuncDesc
* GetFuncDesc( sal_uInt16 nPos
) const;
86 OUString
GetSelFunctionName() const;
88 void SetDoubleClickHdl( const Link
<>& rLink
) { aDoubleClickLink
= rLink
; }
89 const Link
<>& GetDoubleClickHdl() const { return aDoubleClickLink
; }
91 void SetSelectHdl( const Link
<>& rLink
) { aSelectionLink
= rLink
; }
92 const Link
<>& GetSelectHdl() const { return aSelectionLink
; }
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */