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 FORMULA_PARAWIN_HXX
32 #define FORMULA_PARAWIN_HXX
34 #include <svtools/stdctrl.hxx>
35 #include <svtools/svmedit.hxx>
36 #include <vcl/lstbox.hxx>
37 #include <vcl/group.hxx>
38 #include <vcl/tabpage.hxx>
39 #include <vcl/tabctrl.hxx>
40 #include <vcl/scrbar.hxx>
43 #include "formula/funcutl.hxx"
44 #include "ControlHelper.hxx"
45 #include "ModuleHelper.hxx"
49 //============================================================================
50 #define NOT_FOUND 0xffff
51 //============================================================================
52 class IFunctionDescription
;
53 class IControlReferenceHandler
;
55 class ParaWin
: public TabPage
58 OModuleClient m_aModuleClient
;
61 Link aArgModifiedLink
;
63 ::std::vector
<USHORT
> aVisibleArgMapping
;
64 const IFunctionDescription
* pFuncDesc
;
65 IControlReferenceHandler
* pMyParent
;
66 USHORT nArgs
; // unsuppressed arguments
70 FixedInfo aFtEditDesc
;
102 ArgInput aArgInput
[4];
103 String aDefaultString
;
104 ::std::vector
<String
>
107 DECL_LINK( ScrollHdl
, ScrollBar
* );
108 DECL_LINK( ModifyHdl
, ArgInput
* );
109 DECL_LINK( GetEdFocusHdl
, ArgInput
* );
110 DECL_LINK( GetFxFocusHdl
, ArgInput
* );
111 DECL_LINK( GetFxHdl
, ArgInput
* );
115 virtual void SliderMoved();
116 virtual void ArgumentModified();
117 virtual void FxClick();
119 void InitArgInput( USHORT nPos
, FixedText
& rFtArg
, ImageButton
& rBtnFx
,
120 ArgEdit
& rEdArg
, RefButton
& rRefBtn
);
123 void SetArgumentDesc(const String
& aText
);
124 void SetArgumentText(const String
& aText
);
127 void SetArgName (USHORT no
,const String
&aArg
);
128 void SetArgNameFont (USHORT no
,const Font
&);
129 void SetArgVal (USHORT no
,const String
&aArg
);
131 void HideParaLine(USHORT no
);
132 void ShowParaLine(USHORT no
);
133 void UpdateArgDesc( USHORT nArg
);
134 void UpdateArgInput( USHORT nOffset
, USHORT i
);
137 ParaWin(Window
* pParent
,IControlReferenceHandler
* _pDlg
,Point aPos
);
140 void SetFunctionDesc(const IFunctionDescription
* pFDesc
);
141 void SetArgumentOffset(USHORT nOffset
);
142 void SetEditDesc(const String
& aText
);
146 BOOL
IsRefMode() {return bRefMode
;}
147 void SetRefMode(BOOL bFlag
) {bRefMode
=bFlag
;}
149 USHORT
GetActiveLine();
150 void SetActiveLine(USHORT no
);
151 RefEdit
* GetActiveEdit();
152 String
GetActiveArgName();
154 String
GetArgument(USHORT no
);
155 void SetArgument(USHORT no
, const String
& aString
);
156 void SetArgumentFonts(const Font
&aBoldFont
,const Font
&aLightFont
);
158 void SetEdFocus(USHORT nEditLine
); //Sichtbare Editzeilen
159 USHORT
GetSliderPos();
160 void SetSliderPos(USHORT nSliderPos
);
162 void SetScrollHdl( const Link
& rLink
) { aScrollLink
= rLink
; }
163 const Link
& GetScrollHdl() const { return aScrollLink
; }
165 void SetArgModifiedHdl( const Link
& rLink
) { aArgModifiedLink
= rLink
; }
166 const Link
& GetArgModifiedHdl() const { return aArgModifiedLink
; }
168 void SetFxHdl( const Link
& rLink
) { aFxLink
= rLink
; }
169 const Link
& GetFxHdl() const { return aFxLink
; }
176 #endif // FORMULA_PARAWIN_HXX