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: section.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 _SV_SECTION_HXX
32 #define _SV_SECTION_HXX
38 #include <vcl/ctrl.hxx>
40 #ifndef _SV_DOCKWIN_HXX
41 #include <vcl/dockwin.hxx>
44 #ifndef _SV_TABPAGE_HXX
45 #include <vcl/tabpage.hxx>
48 #ifndef _SV_EXPANDER_HXX
49 #include <bf_svtools/expander.hxx>
52 #ifndef _SV_PRIVSPLT_HXX
53 #include <bf_svtools/privsplt.hxx>
59 class SvSectionControl
;
61 class SvSection
: public DockingWindow
64 SvSectionControl
* pSectionControl
;
73 DECL_LINK( ToggleHdl
, SvExpander
* );
74 DECL_LINK( SplitHdl
, SvPrivatSplit
* );
76 void ImplExpandSection();
77 void ImplShrinkSection();
81 Window aChildWinContainer
;
82 SvPrivatSplit aPrivatSplit
;
84 virtual void Resize();
85 virtual void Paint( const Rectangle
& rRect
);
86 virtual long Notify( NotifyEvent
& rNEvt
);
89 SvSection(const XubString
& rName
,SvSectionControl
* pParent
,
91 SvSection(const XubString
& rName
,SvSectionControl
* pParent
,
92 Window
* pChildWin
, WinBits nStyle
= 0);
94 virtual void SetScrollPos(long nPos
);
95 void SetChildPos(long nPos
);
97 void SetSectionControl(SvSectionControl
* pParent
);
98 const SvSectionControl
* GetSectionControl()const ;
99 void SetSectionText( const XubString
& );
100 const XubString
& GetSectionText() const {return aName
;}
102 void SetChildWin(Window
* pChildWin
);
103 Window
* GetChildWin() const {return pChildWin
;}
105 void SetSectionID(USHORT nId
) {nSectionID
=nId
;}
106 USHORT
GetSectionID() const {return nSectionID
;}
108 void SetMaxHeight(long nHeight
);
111 void SetMinHeight(long nHeight
);
114 void SetMinWidth(long nWidth
);
117 void ExpandSection();
118 void ShrinkSection();