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: parawin.hxx,v $
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_PARAWIN_HXX
32 #define SC_PARAWIN_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>
56 //============================================================================
57 #define NOT_FOUND 0xffff
58 //============================================================================
60 class ScParaWin
: public TabPage
66 Link aArgModifiedLink
;
68 ::std::vector
<USHORT
> aVisibleArgMapping
;
69 const ScFuncDesc
* pFuncDesc
;
70 ScAnyRefDlg
* pMyParent
;
71 USHORT nArgs
; // unsuppressed arguments
75 FixedInfo aFtEditDesc
;
82 formula::RefButton aRefBtn1
;
86 formula::RefButton aRefBtn2
;
90 formula::RefButton aRefBtn3
;
94 formula::RefButton aRefBtn4
;
101 ArgInput aArgInput
[4];
102 String aDefaultString
;
103 SvStrings aParaArray
;
104 DECL_LINK( ScrollHdl
, ScrollBar
* );
105 DECL_LINK( ModifyHdl
, ArgInput
* );
106 DECL_LINK( GetEdFocusHdl
, ArgInput
* );
107 DECL_LINK( GetFxFocusHdl
, ArgInput
* );
108 DECL_LINK( GetFxHdl
, ArgInput
* );
112 virtual void SliderMoved();
113 virtual void ArgumentModified();
114 virtual void FxClick();
116 void InitArgInput( USHORT nPos
, FixedText
& rFtArg
, ImageButton
& rBtnFx
,
117 ArgEdit
& rEdArg
, formula::RefButton
& rRefBtn
);
120 void SetArgumentDesc(const String
& aText
);
121 void SetArgumentText(const String
& aText
);
124 void SetArgName (USHORT no
,const String
&aArg
);
125 void SetArgNameFont (USHORT no
,const Font
&);
126 void SetArgVal (USHORT no
,const String
&aArg
);
128 void HideParaLine(USHORT no
);
129 void ShowParaLine(USHORT no
);
130 void UpdateArgDesc( USHORT nArg
);
131 void UpdateArgInput( USHORT nOffset
, USHORT i
);
134 ScParaWin(ScAnyRefDlg
* pParent
,Point aPos
);
137 void SetFunctionDesc(const ScFuncDesc
* pFDesc
);
138 void SetArgumentOffset(USHORT nOffset
);
139 void SetEditDesc(const String
& aText
);
143 BOOL
IsRefMode() {return bRefMode
;}
144 void SetRefMode(BOOL bFlag
) {bRefMode
=bFlag
;}
146 USHORT
GetActiveLine();
147 void SetActiveLine(USHORT no
);
148 formula::RefEdit
* GetActiveEdit();
149 String
GetActiveArgName();
151 String
GetArgument(USHORT no
);
152 void SetArgument(USHORT no
, const String
& aString
);
153 void SetArgumentFonts(const Font
&aBoldFont
,const Font
&aLightFont
);
155 void SetEdFocus(USHORT nEditLine
); //Sichtbare Editzeilen
156 USHORT
GetSliderPos();
157 void SetSliderPos(USHORT nSliderPos
);
159 void SetScrollHdl( const Link
& rLink
) { aScrollLink
= rLink
; }
160 const Link
& GetScrollHdl() const { return aScrollLink
; }
162 void SetArgModifiedHdl( const Link
& rLink
) { aArgModifiedLink
= rLink
; }
163 const Link
& GetArgModifiedHdl() const { return aArgModifiedLink
; }
165 void SetFxHdl( const Link
& rLink
) { aFxLink
= rLink
; }
166 const Link
& GetFxHdl() const { return aFxLink
; }
173 #endif // SC_PARAWIN_HXX