1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <svx/pagectrl.hxx>
23 #include <editeng/paperinf.hxx>
25 #include <fmtclds.hxx>
31 class SW_DLLPUBLIC SwPageExample
: public SvxPageWindow
34 SwPageExample(Window
* pPar
, const ResId
& rResId
)
35 : SvxPageWindow(pPar
, rResId
)
37 SetSize(SvxPaperInfo::GetPaperSize(PAPER_A4
));
40 SwPageExample(Window
* pPar
)
43 SetSize(SvxPaperInfo::GetPaperSize(PAPER_A4
));
46 void UpdateExample( const SfxItemSet
& rSet
);
51 class SW_DLLPUBLIC SwPageGridExample
: public SwPageExample
53 SwTextGridItem
* pGridItem
;
56 virtual void DrawPage( const Point
& rPoint
,
57 const sal_Bool bSecond
,
58 const sal_Bool bEnabled
);
60 SwPageGridExample(Window
* pPar
, const ResId
& rResId
) :
61 SwPageExample(pPar
, rResId
),
64 SwPageGridExample(Window
* pPar
) :
70 void UpdateExample( const SfxItemSet
& rSet
);
73 class SW_DLLPUBLIC SwColExample
: public SwPageExample
77 using SwPageExample::UpdateExample
;
80 virtual void DrawPage( const Point
& rPoint
,
81 const sal_Bool bSecond
,
82 const sal_Bool bEnabled
);
85 SwColExample(Window
* pPar
, const ResId
& rResId
)
86 : SwPageExample(pPar
, rResId
)
91 SwColExample(Window
* pPar
)
97 void UpdateExample( const SfxItemSet
& rSet
, SwColMgr
* pMgr
)
100 SwPageExample::UpdateExample(rSet
);
104 class SW_DLLPUBLIC SwColumnOnlyExample
: public Window
113 virtual void Paint( const Rectangle
& rRect
);
116 SwColumnOnlyExample(Window
*);
118 void SetColumns(const SwFmtCol
& rCol
);
120 virtual Size
GetOptimalSize() const;
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */