1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: funcpage.hxx,v $
10 * $Revision: 1.4.32.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_FUNCPAGE_HXX
32 #define SC_FUNCPAGE_HXX
34 #include "funcutl.hxx"
35 #include "global.hxx" // ScAddress
36 #include <svtools/stdctrl.hxx>
37 #ifndef _LSTBOX_HXX //autogen
38 #include <vcl/lstbox.hxx>
40 #include <vcl/group.hxx>
41 #include <svtools/svmedit.hxx>
42 #include <vcl/tabpage.hxx>
44 #ifndef _SVSTDARR_STRINGS
46 #define _SVSTDARR_STRINGS
47 #include <svtools/svstdarr.hxx>
50 #include <vcl/tabctrl.hxx>
51 #include "parawin.hxx"
52 #include <svtools/svtreebx.hxx>
53 #include "compiler.hxx"
58 class ScFuncName_Impl
;
62 //============================================================================
66 //============================================================================
67 class ScListBox
: public ListBox
71 virtual void KeyInput( const KeyEvent
& rKEvt
);
72 virtual long PreNotify( NotifyEvent
& rNEvt
);
75 ScListBox( Window
* pParent
, const ResId
& rResId
);
81 //============================================================================
82 class ScFuncPage
: public TabPage
86 Link aDoubleClickLink
;
88 FixedText aFtCategory
;
90 FixedText aFtFunction
;
91 ScListBox aLbFunction
;
92 ImageButton aIBFunction
;
94 const ScFuncDesc
* aLRUList
[LRU_MAX
];
97 DECL_LINK( SelHdl
, ListBox
* );
98 DECL_LINK( DblClkHdl
, ListBox
* );
102 void UpdateFunctionList();
108 ScFuncPage( Window
* pParent
);
110 void SetCategory(USHORT nCat
);
111 void SetFunction(USHORT nFunc
);
113 USHORT
GetCategory();
114 USHORT
GetFunction();
115 USHORT
GetFunctionEntryCount();
117 USHORT
GetFuncPos(const ScFuncDesc
*);
118 const ScFuncDesc
* GetFuncDesc( USHORT nPos
) const;
119 String
GetSelFunctionName() const;
121 void SetDoubleClickHdl( const Link
& rLink
) { aDoubleClickLink
= rLink
; }
122 const Link
& GetDoubleClickHdl() const { return aDoubleClickLink
; }
124 void SetSelectHdl( const Link
& rLink
) { aSelectionLink
= rLink
; }
125 const Link
& GetSelectHdl() const { return aSelectionLink
; }