merge the formfield patch from ooo-build
[ooovba.git] / binfilter / inc / bf_svtools / section.hxx
blob5b2ec50b622471e7d38b4413b8b13961afc3d7d0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: section.hxx,v $
10 * $Revision: 1.3 $
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
34 #ifndef _SV_SV_H
35 #include <vcl/sv.h>
36 #endif
37 #ifndef _SV_CTRL_HXX
38 #include <vcl/ctrl.hxx>
39 #endif
40 #ifndef _SV_DOCKWIN_HXX
41 #include <vcl/dockwin.hxx>
42 #endif
44 #ifndef _SV_TABPAGE_HXX
45 #include <vcl/tabpage.hxx>
46 #endif
48 #ifndef _SV_EXPANDER_HXX
49 #include <bf_svtools/expander.hxx>
50 #endif
52 #ifndef _SV_PRIVSPLT_HXX
53 #include <bf_svtools/privsplt.hxx>
54 #endif
56 namespace binfilter
59 class SvSectionControl;
61 class SvSection : public DockingWindow
63 private:
64 SvSectionControl* pSectionControl;
65 USHORT nSectionID;
66 Window* pChildWin;
67 XubString aName;
68 long nHeight;
69 long nMinHeight;
70 long nMinWidth;
71 long nOldHeight;
73 DECL_LINK( ToggleHdl, SvExpander* );
74 DECL_LINK( SplitHdl, SvPrivatSplit* );
76 void ImplExpandSection();
77 void ImplShrinkSection();
79 protected:
80 SvExpander aExpander;
81 Window aChildWinContainer;
82 SvPrivatSplit aPrivatSplit;
84 virtual void Resize();
85 virtual void Paint( const Rectangle& rRect );
86 virtual long Notify( NotifyEvent& rNEvt );
88 public:
89 SvSection(const XubString& rName,SvSectionControl* pParent,
90 WinBits nStyle = 0);
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);
109 long GetMaxHeight();
111 void SetMinHeight(long nHeight);
112 long GetMinHeight();
114 void SetMinWidth(long nWidth);
115 long GetMinWidth();
117 void ExpandSection();
118 void ShrinkSection();
119 BOOL IsExpanded();
124 #endif