xref: /trunk/main/sw/source/ui/inc/colex.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _COLEX_HXX
28 #define _COLEX_HXX
29 
30 #include <svx/pagectrl.hxx>
31 #include <editeng/paperinf.hxx>
32 #include "swdllapi.h"
33 #include <fmtclds.hxx>
34 #include "frmatr.hxx"
35 
36 class SwColMgr;
37 class SfxItemSet;
38 
39 /* -----------------------------08.02.2002 11:32------------------------------
40 
41  ---------------------------------------------------------------------------*/
42 class SW_DLLPUBLIC SwPageExample : public SvxPageWindow
43 {
44 public:
45     SwPageExample(Window* pPar, const ResId& rResId ) :
46                                 SvxPageWindow(pPar, rResId )
47                                 {SetSize(SvxPaperInfo::GetPaperSize(PAPER_A4));/*DIN A4*/}
48 
49     void UpdateExample( const SfxItemSet& rSet );
50 };
51 /* -----------------------------08.02.2002 11:34------------------------------
52 
53  ---------------------------------------------------------------------------*/
54 class SwTextGridItem;
55 class SW_DLLPUBLIC SwPageGridExample : public SwPageExample
56 {
57     SwTextGridItem*     pGridItem;
58     sal_Bool            m_bVertical;
59 protected:
60 	virtual void DrawPage( const Point& rPoint,
61 						   const sal_Bool bSecond,
62 						   const sal_Bool bEnabled );
63 public:
64     SwPageGridExample(Window* pPar, const ResId& rResId ) :
65                                 SwPageExample(pPar, rResId ),
66                                 pGridItem(0),
67                                 m_bVertical(sal_False){}
68     ~SwPageGridExample();
69     void UpdateExample( const SfxItemSet& rSet );
70 };
71 /*--------------------------------------------------------------------
72 	Beschreibung:
73  --------------------------------------------------------------------*/
74 
75 class SW_DLLPUBLIC SwColExample : public SwPageExample
76 {
77 	SwColMgr* 	pColMgr;
78 
79     using SwPageExample::UpdateExample;
80 
81 protected:
82 	virtual void DrawPage( const Point& rPoint,
83 						   const sal_Bool bSecond,
84 						   const sal_Bool bEnabled );
85 
86 public:
87         SwColExample(Window* pPar, const ResId& rResId ) :
88                                 SwPageExample(pPar, rResId ),
89                                 pColMgr(0){}
90 
91     void UpdateExample( const SfxItemSet& rSet, SwColMgr* pMgr  )
92         {   pColMgr = pMgr;
93             SwPageExample::UpdateExample(rSet);
94         }
95 };
96 
97 /*-----------------25.10.96 08.23-------------------
98 
99 --------------------------------------------------*/
100 class SW_DLLPUBLIC SwColumnOnlyExample : public Window
101 {
102 private:
103     Size        m_aWinSize;
104 
105     Size        m_aFrmSize;
106     SwFmtCol    m_aCols;
107 
108 protected:
109 	virtual void Paint( const Rectangle& rRect );
110 
111 public:
112 	SwColumnOnlyExample( Window* , const ResId& );
113 
114     void        SetColumns(const SwFmtCol& rCol);
115 
116 };
117 
118 #endif // _COLEX_HXX
119