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: funcutl.hxx,v $
10 * $Revision: 1.5.32.2 $
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_FUNCUTL_HXX
32 #define SC_FUNCUTL_HXX
34 #ifndef _SCRBAR_HXX //autogen
35 #include <vcl/scrbar.hxx>
37 #ifndef _FIXED_HXX //autogen
38 #include <vcl/fixed.hxx>
40 #include <svtools/svmedit.hxx>
41 #include "anyrefdg.hxx" // formula::RefButton
44 //============================================================================
47 class ValWnd
: public Window
50 ValWnd( Window
* pParent
, const ResId
& rId
);
52 void SetValue( const String
& rStrVal
);
55 virtual void Paint( const Rectangle
& rRect
);
63 //============================================================================
66 class ScEditBox
: public Control
70 MultiLineEdit
* pMEdit
;
74 DECL_LINK( ChangedHdl
, ScEditBox
* );
78 virtual long PreNotify( NotifyEvent
& rNEvt
);
79 virtual void SelectionChanged();
80 virtual void Resize();
81 virtual void GetFocus();
85 ScEditBox( Window
* pParent
, const ResId
& rResId
);
89 MultiLineEdit
* GetEdit() {return pMEdit
;}
91 void SetSelChangedHdl( const Link
& rLink
) { aSelChangedLink
= rLink
; }
92 const Link
& GetSelChangedHdl() const { return aSelChangedLink
; }
99 //============================================================================
102 class ArgEdit
: public formula::RefEdit
105 ArgEdit( Window
* pParent
, const ResId
& rResId
);
107 void Init( ArgEdit
* pPrevEdit
, ArgEdit
* pNextEdit
,
108 ScrollBar
& rArgSlider
, USHORT nArgCount
);
111 virtual void KeyInput( const KeyEvent
& rKEvt
);
121 //============================================================================
138 formula::RefButton
* pRefBtn
;
140 DECL_LINK( FxBtnClickHdl
, ImageButton
* );
141 DECL_LINK( RefBtnClickHdl
,formula::RefButton
* );
142 DECL_LINK( FxBtnFocusHdl
, ImageButton
* );
143 DECL_LINK( RefBtnFocusHdl
,formula::RefButton
* );
144 DECL_LINK( EdFocusHdl
, ArgEdit
* );
145 DECL_LINK( EdModifyHdl
,ArgEdit
* );
149 virtual void FxClick();
150 virtual void RefClick();
151 virtual void FxFocus();
152 virtual void RefFocus();
153 virtual void EdFocus();
154 virtual void EdModify();
160 void InitArgInput ( FixedText
* pftArg
,
163 formula::RefButton
* prefBtn
);
165 void SetArgName(const String
&aArg
);
167 void SetArgNameFont(const Font
&);
169 void SetArgVal(const String
&aVal
);
172 void SetArgSelection (const Selection
& rSel
);
174 ArgEdit
* GetArgEdPtr() {return pEdArg
;}
177 void SetFxClickHdl( const Link
& rLink
) { aFxClickLink
= rLink
; }
178 const Link
& GetFxClickHdl() const { return aFxClickLink
; }
180 void SetRefClickHdl( const Link
& rLink
) { aRefClickLink
= rLink
; }
181 const Link
& GetRefClickHdl() const { return aRefClickLink
; }
183 void SetFxFocusHdl( const Link
& rLink
) { aFxFocusLink
= rLink
; }
184 const Link
& GetFxFocusHdl() const { return aFxFocusLink
; }
186 void SetRefFocusHdl( const Link
& rLink
) { aRefFocusLink
= rLink
; }
187 const Link
& GetRefFocusHdl() const { return aRefFocusLink
; }
189 void SetEdFocusHdl( const Link
& rLink
) { aEdFocusLink
= rLink
; }
190 const Link
& GetEdFocusHdl() const { return aEdFocusLink
; }
192 void SetEdModifyHdl( const Link
& rLink
) { aEdModifyLink
= rLink
; }
193 const Link
& GetEdModifyHdl() const { return aEdModifyLink
; }