Update ooo320-m1
[ooovba.git] / sc / source / ui / inc / funcpage.hxx
blob231c25753bf08b7af7f43f3fc3e98166e47ff6f7
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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>
39 #endif
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>
49 #endif
50 #include <vcl/tabctrl.hxx>
51 #include "parawin.hxx"
52 #include <svtools/svtreebx.hxx>
53 #include "compiler.hxx"
54 #include "cell.hxx"
57 class ScViewData;
58 class ScFuncName_Impl;
59 class ScDocument;
60 class ScFuncDesc;
62 //============================================================================
64 #define LRU_MAX 10
66 //============================================================================
67 class ScListBox : public ListBox
69 protected:
71 virtual void KeyInput( const KeyEvent& rKEvt );
72 virtual long PreNotify( NotifyEvent& rNEvt );
74 public:
75 ScListBox( Window* pParent, const ResId& rResId );
81 //============================================================================
82 class ScFuncPage : public TabPage
84 private:
86 Link aDoubleClickLink;
87 Link aSelectionLink;
88 FixedText aFtCategory;
89 ListBox aLbCategory;
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* );
100 protected:
102 void UpdateFunctionList();
103 void InitLRUList();
106 public:
108 ScFuncPage( Window* pParent);
110 void SetCategory(USHORT nCat);
111 void SetFunction(USHORT nFunc);
112 void SetFocus();
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; }
130 #endif