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