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: dwfunctr.hxx,v $
10 * $Revision: 1.7.46.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 ************************************************************************/
30 #ifndef _SC_DWFUNCTR_HXX
31 #define _SC_DWFUNCTR_HXX
33 #include <sfx2/childwin.hxx>
34 #include <sfx2/dockwin.hxx>
35 #include <svtools/lstner.hxx>
36 #include <svtools/stdctrl.hxx>
38 #ifndef _LSTBOX_HXX //autogen
39 #include <vcl/lstbox.hxx>
42 #ifndef _IMAGEBTN_HXX //autogen
43 #include <vcl/imagebtn.hxx>
46 #ifndef _COMBOBOX_HXX //autogen
47 #include <vcl/combobox.hxx>
49 #include "anyrefdg.hxx"
50 #include "global.hxx" // ScAddress
51 #include "privsplt.hxx"
52 #include "funcdesc.hxx"
57 /*************************************************************************
59 |* Ableitung vom SfxChildWindow als "Behaelter" fuer Controller
61 \************************************************************************/
63 class ScFunctionChildWindow
: public SfxChildWindow
66 ScFunctionChildWindow( Window
*, USHORT
, SfxBindings
*,
69 SFX_DECL_CHILDWINDOW(ScFunctionChildWindow
);
72 /*************************************************************************
76 \************************************************************************/
78 class ScFunctionDockWin
: public SfxDockingWindow
, public SfxListener
83 ScPrivatSplit aPrivatSplit
;
87 ListBox
* pAllFuncList
;
89 SfxChildAlignment eSfxNewAlignment
;
90 SfxChildAlignment eSfxOldAlignment
;
91 ImageButton aInsertButton
;
92 FixedText aFiFuncDesc
;
101 Point aSplitterInitPos
;
102 const ScFuncDesc
* pFuncDesc
;
107 const ScFuncDesc
* aLRUList
[LRU_MAX
];
109 void UpdateFunctionList();
110 void UpdateLRUList();
111 void DoEnter(BOOL bOk
); //@@ ???
112 void SetDescription();
113 void SetLeftRightSize();
114 void SetTopBottonSize();
115 void SetMyWidthLeRi(Size
&aNewSize
);
116 void SetMyHeightLeRi(Size
&aNewSize
);
117 void SetMyWidthToBo(Size
&aNewSize
);
118 void SetMyHeightToBo(Size
&aNewSize
);
119 void UseSplitterInitPos();
121 DECL_LINK( SetSelectionHdl
, void* );
122 DECL_LINK( SelHdl
, ListBox
* );
123 DECL_LINK(SetSplitHdl
,ScPrivatSplit
*);
124 DECL_LINK( TimerHdl
, Timer
*);
128 virtual BOOL
Close();
129 virtual void Resize();
130 virtual void Resizing( Size
& rSize
);
131 virtual void SetSize();
132 virtual void ToggleFloatingMode();
133 virtual void StateChanged( StateChangedType nStateChange
);
136 virtual SfxChildAlignment
CheckAlignment(SfxChildAlignment
,
137 SfxChildAlignment eAlign
);
140 ScFunctionDockWin( SfxBindings
* pBindings
,
143 const ResId
& rResId
);
145 ~ScFunctionDockWin();
147 using SfxDockingWindow::Notify
;
148 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
150 void SetSlotIDs( USHORT nLeft
, USHORT nRight
)
151 { nLeftSlot
= nLeft
; nRightSlot
= nRight
; }
155 void Initialize (SfxChildWinInfo
* pInfo
);
156 virtual void FillInfo(SfxChildWinInfo
&) const;