xref: /trunk/main/cui/source/inc/dstribut.hxx (revision c4eee24d)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SVX_DSTRIBUT_HXX
24 #define _SVX_DSTRIBUT_HXX
25 
26 #include <svx/dlgctrl.hxx>
27 #include <vcl/group.hxx>
28 #include <vcl/fixed.hxx>
29 #include <svx/dstribut_enum.hxx> //CHINA001
30 /*************************************************************************
31 |*
32 \************************************************************************/
33 
34 /*
35 enum SvxDistributeHorizontal
36 {
37 	SvxDistributeHorizontalNone = 0,
38 	SvxDistributeHorizontalLeft,
39 	SvxDistributeHorizontalCenter,
40 	SvxDistributeHorizontalDistance,
41 	SvxDistributeHorizontalRight
42 };
43 
44 enum SvxDistributeVertical
45 {
46 	SvxDistributeVerticalNone = 0,
47 	SvxDistributeVerticalTop,
48 	SvxDistributeVerticalCenter,
49 	SvxDistributeVerticalDistance,
50 	SvxDistributeVerticalBottom
51 };
52 */
53 
54 /*************************************************************************
55 |*
56 \************************************************************************/
57 
58 class SvxDistributePage : public SvxTabPage
59 {
60 	SvxDistributeHorizontal		meDistributeHor;
61 	SvxDistributeVertical		meDistributeVer;
62 
63 	FixedLine					maFlHorizontal		;
64 	RadioButton					maBtnHorNone		;
65 	RadioButton					maBtnHorLeft		;
66 	RadioButton					maBtnHorCenter		;
67 	RadioButton					maBtnHorDistance	;
68 	RadioButton					maBtnHorRight		;
69 	FixedImage					maHorLow			;
70 	FixedImage					maHorCenter			;
71 	FixedImage					maHorDistance		;
72 	FixedImage					maHorHigh			;
73 	FixedLine					maFlVertical		;
74 	RadioButton					maBtnVerNone		;
75 	RadioButton					maBtnVerTop			;
76 	RadioButton					maBtnVerCenter		;
77 	RadioButton					maBtnVerDistance	;
78 	RadioButton					maBtnVerBottom		;
79 	FixedImage					maVerLow			;
80 	FixedImage					maVerCenter			;
81 	FixedImage					maVerDistance		;
82 	FixedImage					maVerHigh			;
83 
84 public:
85 	SvxDistributePage(Window* pWindow, const SfxItemSet& rInAttrs,
86 		SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone,
87 		SvxDistributeVertical eVer = SvxDistributeVerticalNone);
88 	~SvxDistributePage();
89 
90 	static SfxTabPage* Create(Window*, const SfxItemSet&,
91 		SvxDistributeHorizontal eHor, SvxDistributeVertical eVer);
92 	static sal_uInt16* GetRanges();
93 	virtual sal_Bool FillItemSet(SfxItemSet&);
94 	virtual void Reset(const SfxItemSet&);
95 	virtual void PointChanged(Window* pWindow, RECT_POINT eRP);
96 
GetDistributeHor() const97 	SvxDistributeHorizontal GetDistributeHor() const { return meDistributeHor; }
GetDistributeVer() const98 	SvxDistributeVertical GetDistributeVer() const { return meDistributeVer; }
99 };
100 
101 /*************************************************************************
102 |*
103 \************************************************************************/
104 
105 class SvxDistributeDialog : public SfxSingleTabDialog
106 {
107 	SvxDistributePage*			mpPage;
108 
109 public:
110 	SvxDistributeDialog(Window* pParent, const SfxItemSet& rAttr,
111 		SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone,
112 		SvxDistributeVertical eVer = SvxDistributeVerticalNone);
113 	~SvxDistributeDialog();
114 
GetDistributeHor() const115 	SvxDistributeHorizontal GetDistributeHor() const { return mpPage->GetDistributeHor(); }
GetDistributeVer() const116 	SvxDistributeVertical GetDistributeVer() const { return mpPage->GetDistributeVer(); }
117 };
118 
119 
120 #endif // _SVX_DSTRIBUT_HXX
121 
122