xref: /aoo41x/main/cui/source/inc/dstribut.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 _SVX_DSTRIBUT_HXX
28 #define _SVX_DSTRIBUT_HXX
29 
30 #include <svx/dlgctrl.hxx>
31 #include <vcl/group.hxx>
32 #include <vcl/fixed.hxx>
33 #include <svx/dstribut_enum.hxx> //CHINA001
34 /*************************************************************************
35 |*
36 \************************************************************************/
37 
38 /*
39 enum SvxDistributeHorizontal
40 {
41 	SvxDistributeHorizontalNone = 0,
42 	SvxDistributeHorizontalLeft,
43 	SvxDistributeHorizontalCenter,
44 	SvxDistributeHorizontalDistance,
45 	SvxDistributeHorizontalRight
46 };
47 
48 enum SvxDistributeVertical
49 {
50 	SvxDistributeVerticalNone = 0,
51 	SvxDistributeVerticalTop,
52 	SvxDistributeVerticalCenter,
53 	SvxDistributeVerticalDistance,
54 	SvxDistributeVerticalBottom
55 };
56 */
57 
58 /*************************************************************************
59 |*
60 \************************************************************************/
61 
62 class SvxDistributePage : public SvxTabPage
63 {
64 	SvxDistributeHorizontal		meDistributeHor;
65 	SvxDistributeVertical		meDistributeVer;
66 
67 	FixedLine					maFlHorizontal		;
68 	RadioButton					maBtnHorNone		;
69 	RadioButton					maBtnHorLeft		;
70 	RadioButton					maBtnHorCenter		;
71 	RadioButton					maBtnHorDistance	;
72 	RadioButton					maBtnHorRight		;
73 	FixedImage					maHorLow			;
74 	FixedImage					maHorCenter			;
75 	FixedImage					maHorDistance		;
76 	FixedImage					maHorHigh			;
77 	FixedLine					maFlVertical		;
78 	RadioButton					maBtnVerNone		;
79 	RadioButton					maBtnVerTop			;
80 	RadioButton					maBtnVerCenter		;
81 	RadioButton					maBtnVerDistance	;
82 	RadioButton					maBtnVerBottom		;
83 	FixedImage					maVerLow			;
84 	FixedImage					maVerCenter			;
85 	FixedImage					maVerDistance		;
86 	FixedImage					maVerHigh			;
87 
88 public:
89 	SvxDistributePage(Window* pWindow, const SfxItemSet& rInAttrs,
90 		SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone,
91 		SvxDistributeVertical eVer = SvxDistributeVerticalNone);
92 	~SvxDistributePage();
93 
94 	static SfxTabPage* Create(Window*, const SfxItemSet&,
95 		SvxDistributeHorizontal eHor, SvxDistributeVertical eVer);
96 	static sal_uInt16* GetRanges();
97 	virtual sal_Bool FillItemSet(SfxItemSet&);
98 	virtual void Reset(const SfxItemSet&);
99 	virtual void PointChanged(Window* pWindow, RECT_POINT eRP);
100 
101 	SvxDistributeHorizontal GetDistributeHor() const { return meDistributeHor; }
102 	SvxDistributeVertical GetDistributeVer() const { return meDistributeVer; }
103 };
104 
105 /*************************************************************************
106 |*
107 \************************************************************************/
108 
109 class SvxDistributeDialog : public SfxSingleTabDialog
110 {
111 	SvxDistributePage*			mpPage;
112 
113 public:
114 	SvxDistributeDialog(Window* pParent, const SfxItemSet& rAttr,
115 		SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone,
116 		SvxDistributeVertical eVer = SvxDistributeVerticalNone);
117 	~SvxDistributeDialog();
118 
119 	SvxDistributeHorizontal GetDistributeHor() const { return mpPage->GetDistributeHor(); }
120 	SvxDistributeVertical GetDistributeVer() const { return mpPage->GetDistributeVer(); }
121 };
122 
123 
124 #endif // _SVX_DSTRIBUT_HXX
125 
126