Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef _COLEX_HXX
20 : #define _COLEX_HXX
21 :
22 : #include <svx/pagectrl.hxx>
23 : #include <editeng/paperinf.hxx>
24 : #include "swdllapi.h"
25 : #include <fmtclds.hxx>
26 : #include "frmatr.hxx"
27 :
28 : class SwColMgr;
29 : class SfxItemSet;
30 :
31 0 : class SW_DLLPUBLIC SwPageExample : public SvxPageWindow
32 : {
33 : public:
34 0 : SwPageExample(Window* pPar, const ResId& rResId ) :
35 0 : SvxPageWindow(pPar, rResId )
36 0 : {SetSize(SvxPaperInfo::GetPaperSize(PAPER_A4));/*DIN A4*/}
37 :
38 : void UpdateExample( const SfxItemSet& rSet );
39 : };
40 :
41 : class SwTextGridItem;
42 :
43 : class SW_DLLPUBLIC SwPageGridExample : public SwPageExample
44 : {
45 : SwTextGridItem* pGridItem;
46 : sal_Bool m_bVertical;
47 : protected:
48 : virtual void DrawPage( const Point& rPoint,
49 : const sal_Bool bSecond,
50 : const sal_Bool bEnabled );
51 : public:
52 0 : SwPageGridExample(Window* pPar, const ResId& rResId ) :
53 : SwPageExample(pPar, rResId ),
54 : pGridItem(0),
55 0 : m_bVertical(sal_False){}
56 : ~SwPageGridExample();
57 : void UpdateExample( const SfxItemSet& rSet );
58 : };
59 :
60 0 : class SW_DLLPUBLIC SwColExample : public SwPageExample
61 : {
62 : SwColMgr* pColMgr;
63 :
64 : using SwPageExample::UpdateExample;
65 :
66 : protected:
67 : virtual void DrawPage( const Point& rPoint,
68 : const sal_Bool bSecond,
69 : const sal_Bool bEnabled );
70 :
71 : public:
72 0 : SwColExample(Window* pPar, const ResId& rResId ) :
73 : SwPageExample(pPar, rResId ),
74 0 : pColMgr(0){}
75 :
76 0 : void UpdateExample( const SfxItemSet& rSet, SwColMgr* pMgr )
77 0 : { pColMgr = pMgr;
78 0 : SwPageExample::UpdateExample(rSet);
79 0 : }
80 : };
81 :
82 0 : class SW_DLLPUBLIC SwColumnOnlyExample : public Window
83 : {
84 : private:
85 : Size m_aWinSize;
86 :
87 : Size m_aFrmSize;
88 : SwFmtCol m_aCols;
89 :
90 : protected:
91 : virtual void Paint( const Rectangle& rRect );
92 :
93 : public:
94 : SwColumnOnlyExample( Window* , const ResId& );
95 :
96 : void SetColumns(const SwFmtCol& rCol);
97 :
98 : };
99 :
100 : #endif // _COLEX_HXX
101 :
102 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|