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: dstribut.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 ************************************************************************/
30 #ifndef _SVX_DSTRIBUT_HXX
31 #define _SVX_DSTRIBUT_HXX
33 #include <svx/dlgctrl.hxx>
34 #include <vcl/group.hxx>
35 #include <vcl/fixed.hxx>
36 #include <svx/dstribut_enum.hxx> //CHINA001
37 /*************************************************************************
39 \************************************************************************/
42 enum SvxDistributeHorizontal
44 SvxDistributeHorizontalNone = 0,
45 SvxDistributeHorizontalLeft,
46 SvxDistributeHorizontalCenter,
47 SvxDistributeHorizontalDistance,
48 SvxDistributeHorizontalRight
51 enum SvxDistributeVertical
53 SvxDistributeVerticalNone = 0,
54 SvxDistributeVerticalTop,
55 SvxDistributeVerticalCenter,
56 SvxDistributeVerticalDistance,
57 SvxDistributeVerticalBottom
61 /*************************************************************************
63 \************************************************************************/
65 class SvxDistributePage
: public SvxTabPage
67 SvxDistributeHorizontal meDistributeHor
;
68 SvxDistributeVertical meDistributeVer
;
70 FixedLine maFlHorizontal
;
71 RadioButton maBtnHorNone
;
72 RadioButton maBtnHorLeft
;
73 RadioButton maBtnHorCenter
;
74 RadioButton maBtnHorDistance
;
75 RadioButton maBtnHorRight
;
77 FixedImage maHorCenter
;
78 FixedImage maHorDistance
;
79 FixedImage maHorHigh
;
80 FixedLine maFlVertical
;
81 RadioButton maBtnVerNone
;
82 RadioButton maBtnVerTop
;
83 RadioButton maBtnVerCenter
;
84 RadioButton maBtnVerDistance
;
85 RadioButton maBtnVerBottom
;
87 FixedImage maVerCenter
;
88 FixedImage maVerDistance
;
89 FixedImage maVerHigh
;
92 SvxDistributePage(Window
* pWindow
, const SfxItemSet
& rInAttrs
,
93 SvxDistributeHorizontal eHor
= SvxDistributeHorizontalNone
,
94 SvxDistributeVertical eVer
= SvxDistributeVerticalNone
);
97 static SfxTabPage
* Create(Window
*, const SfxItemSet
&,
98 SvxDistributeHorizontal eHor
, SvxDistributeVertical eVer
);
99 static UINT16
* GetRanges();
100 virtual BOOL
FillItemSet(SfxItemSet
&);
101 virtual void Reset(const SfxItemSet
&);
102 virtual void PointChanged(Window
* pWindow
, RECT_POINT eRP
);
104 SvxDistributeHorizontal
GetDistributeHor() const { return meDistributeHor
; }
105 SvxDistributeVertical
GetDistributeVer() const { return meDistributeVer
; }
108 /*************************************************************************
110 \************************************************************************/
112 class SvxDistributeDialog
: public SfxSingleTabDialog
114 SvxDistributePage
* mpPage
;
117 SvxDistributeDialog(Window
* pParent
, const SfxItemSet
& rAttr
,
118 SvxDistributeHorizontal eHor
= SvxDistributeHorizontalNone
,
119 SvxDistributeVertical eVer
= SvxDistributeVerticalNone
);
120 ~SvxDistributeDialog();
122 SvxDistributeHorizontal
GetDistributeHor() const { return mpPage
->GetDistributeHor(); }
123 SvxDistributeVertical
GetDistributeVer() const { return mpPage
->GetDistributeVer(); }
127 #endif // _SVX_DSTRIBUT_HXX