1*3334a7e6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*3334a7e6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*3334a7e6SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*3334a7e6SAndrew Rist * distributed with this work for additional information 6*3334a7e6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*3334a7e6SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*3334a7e6SAndrew Rist * "License"); you may not use this file except in compliance 9*3334a7e6SAndrew Rist * with the License. You may obtain a copy of the License at 10*3334a7e6SAndrew Rist * 11*3334a7e6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*3334a7e6SAndrew Rist * 13*3334a7e6SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*3334a7e6SAndrew Rist * software distributed under the License is distributed on an 15*3334a7e6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*3334a7e6SAndrew Rist * KIND, either express or implied. See the License for the 17*3334a7e6SAndrew Rist * specific language governing permissions and limitations 18*3334a7e6SAndrew Rist * under the License. 19*3334a7e6SAndrew Rist * 20*3334a7e6SAndrew Rist *************************************************************/ 21*3334a7e6SAndrew Rist 22*3334a7e6SAndrew Rist 23cdf0e10cSrcweir #ifndef _SVX_OPTGRID_HXX 24cdf0e10cSrcweir #define _SVX_OPTGRID_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir // include --------------------------------------------------------------- 27cdf0e10cSrcweir 28cdf0e10cSrcweir #include <sfx2/tabdlg.hxx> 29cdf0e10cSrcweir #include <svl/eitem.hxx> 30cdf0e10cSrcweir #include <vcl/group.hxx> 31cdf0e10cSrcweir #include <vcl/fixed.hxx> 32cdf0e10cSrcweir #include <vcl/field.hxx> 33cdf0e10cSrcweir #include "svx/svxdllapi.h" 34cdf0e10cSrcweir 35cdf0e10cSrcweir class SvxGridTabPage; 36cdf0e10cSrcweir 37cdf0e10cSrcweir // class SvxOptionsGrid -------------------------------------------------- 38cdf0e10cSrcweir 39cdf0e10cSrcweir class SVX_DLLPUBLIC SvxOptionsGrid 40cdf0e10cSrcweir { 41cdf0e10cSrcweir protected: 42cdf0e10cSrcweir sal_uInt32 nFldDrawX; 43cdf0e10cSrcweir sal_uInt32 nFldDivisionX; 44cdf0e10cSrcweir sal_uInt32 nFldDrawY; 45cdf0e10cSrcweir sal_uInt32 nFldDivisionY; 46cdf0e10cSrcweir sal_uInt32 nFldSnapX; 47cdf0e10cSrcweir sal_uInt32 nFldSnapY; 48cdf0e10cSrcweir sal_Bool bUseGridsnap:1; 49cdf0e10cSrcweir sal_Bool bSynchronize:1; 50cdf0e10cSrcweir sal_Bool bGridVisible:1; 51cdf0e10cSrcweir sal_Bool bEqualGrid: 1; 52cdf0e10cSrcweir 53cdf0e10cSrcweir public: 54cdf0e10cSrcweir SvxOptionsGrid(); 55cdf0e10cSrcweir ~SvxOptionsGrid(); 56cdf0e10cSrcweir SetFldDrawX(sal_uInt32 nSet)57cdf0e10cSrcweir void SetFldDrawX( sal_uInt32 nSet){nFldDrawX = nSet;} SetFldDivisionX(sal_uInt32 nSet)58cdf0e10cSrcweir void SetFldDivisionX(sal_uInt32 nSet){nFldDivisionX = nSet;} SetFldDrawY(sal_uInt32 nSet)59cdf0e10cSrcweir void SetFldDrawY ( sal_uInt32 nSet){nFldDrawY = nSet;} SetFldDivisionY(sal_uInt32 nSet)60cdf0e10cSrcweir void SetFldDivisionY(sal_uInt32 nSet){nFldDivisionY = nSet;} SetFldSnapX(sal_uInt32 nSet)61cdf0e10cSrcweir void SetFldSnapX( sal_uInt32 nSet){nFldSnapX = nSet;} SetFldSnapY(sal_uInt32 nSet)62cdf0e10cSrcweir void SetFldSnapY ( sal_uInt32 nSet){nFldSnapY = nSet;} SetUseGridSnap(sal_Bool bSet)63cdf0e10cSrcweir void SetUseGridSnap( sal_Bool bSet ) {bUseGridsnap = bSet;} SetSynchronize(sal_Bool bSet)64cdf0e10cSrcweir void SetSynchronize( sal_Bool bSet ) {bSynchronize = bSet;} SetGridVisible(sal_Bool bSet)65cdf0e10cSrcweir void SetGridVisible( sal_Bool bSet ) {bGridVisible = bSet;} SetEqualGrid(sal_Bool bSet)66cdf0e10cSrcweir void SetEqualGrid( sal_Bool bSet ) {bEqualGrid = bSet;} 67cdf0e10cSrcweir GetFldDrawX() const68cdf0e10cSrcweir sal_uInt32 GetFldDrawX( ) const { return nFldDrawX; } GetFldDivisionX() const69cdf0e10cSrcweir sal_uInt32 GetFldDivisionX() const { return nFldDivisionX;} GetFldDrawY() const70cdf0e10cSrcweir sal_uInt32 GetFldDrawY ( ) const { return nFldDrawY; } GetFldDivisionY() const71cdf0e10cSrcweir sal_uInt32 GetFldDivisionY() const { return nFldDivisionY;} GetFldSnapX() const72cdf0e10cSrcweir sal_uInt32 GetFldSnapX( ) const { return nFldSnapX; } GetFldSnapY() const73cdf0e10cSrcweir sal_uInt32 GetFldSnapY ( ) const { return nFldSnapY; } GetUseGridSnap() const74cdf0e10cSrcweir sal_Bool GetUseGridSnap( ) const { return bUseGridsnap; } GetSynchronize() const75cdf0e10cSrcweir sal_Bool GetSynchronize( ) const { return bSynchronize; } GetGridVisible() const76cdf0e10cSrcweir sal_Bool GetGridVisible( ) const { return bGridVisible; } GetEqualGrid() const77cdf0e10cSrcweir sal_Bool GetEqualGrid() const { return bEqualGrid; } 78cdf0e10cSrcweir }; 79cdf0e10cSrcweir 80cdf0e10cSrcweir // class SvxGridItem ----------------------------------------------------- 81cdf0e10cSrcweir 82cdf0e10cSrcweir class SVX_DLLPUBLIC SvxGridItem : public SvxOptionsGrid, public SfxPoolItem 83cdf0e10cSrcweir { 84cdf0e10cSrcweir // #i9076# 85cdf0e10cSrcweir friend class SvxGridTabPage; 86cdf0e10cSrcweir 87cdf0e10cSrcweir public: SvxGridItem(sal_uInt16 _nWhich)88cdf0e10cSrcweir SvxGridItem( sal_uInt16 _nWhich) : SfxPoolItem(_nWhich){}; 89cdf0e10cSrcweir SvxGridItem( const SvxGridItem& pTestItem ); 90cdf0e10cSrcweir 91cdf0e10cSrcweir virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; 92cdf0e10cSrcweir virtual int operator==( const SfxPoolItem& ) const; 93cdf0e10cSrcweir 94cdf0e10cSrcweir virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, 95cdf0e10cSrcweir SfxMapUnit eCoreMetric, 96cdf0e10cSrcweir SfxMapUnit ePresMetric, 97cdf0e10cSrcweir String &rText, const IntlWrapper * = 0 ) const; 98cdf0e10cSrcweir 99cdf0e10cSrcweir }; 100cdf0e10cSrcweir 101cdf0e10cSrcweir // class SvxGridTabPage -------------------------------------------------- 102cdf0e10cSrcweir 103cdf0e10cSrcweir class SVX_DLLPUBLIC SvxGridTabPage : public SfxTabPage 104cdf0e10cSrcweir { 105cdf0e10cSrcweir using TabPage::ActivatePage; 106cdf0e10cSrcweir using TabPage::DeactivatePage; 107cdf0e10cSrcweir 108cdf0e10cSrcweir public: 109cdf0e10cSrcweir SvxGridTabPage( Window* pParent, const SfxItemSet& rSet ); 110cdf0e10cSrcweir 111cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); 112cdf0e10cSrcweir 113cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 114cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 115cdf0e10cSrcweir 116cdf0e10cSrcweir virtual void ActivatePage( const SfxItemSet& rSet ); 117cdf0e10cSrcweir virtual int DeactivatePage( SfxItemSet* pSet ); 118cdf0e10cSrcweir 119cdf0e10cSrcweir private: 120cdf0e10cSrcweir CheckBox aCbxUseGridsnap; 121cdf0e10cSrcweir CheckBox aCbxGridVisible; 122cdf0e10cSrcweir 123cdf0e10cSrcweir FixedLine aFlResolution; 124cdf0e10cSrcweir FixedText aFtDrawX; 125cdf0e10cSrcweir MetricField aMtrFldDrawX; 126cdf0e10cSrcweir FixedText aFtDrawY; 127cdf0e10cSrcweir MetricField aMtrFldDrawY; 128cdf0e10cSrcweir 129cdf0e10cSrcweir FixedLine aFlDivision; 130cdf0e10cSrcweir FixedText aFtDivisionX; 131cdf0e10cSrcweir NumericField aNumFldDivisionX; 132cdf0e10cSrcweir FixedText aDivisionPointX; 133cdf0e10cSrcweir 134cdf0e10cSrcweir FixedText aFtDivisionY; 135cdf0e10cSrcweir NumericField aNumFldDivisionY; 136cdf0e10cSrcweir FixedText aDivisionPointY; 137cdf0e10cSrcweir 138cdf0e10cSrcweir CheckBox aCbxSynchronize; 139cdf0e10cSrcweir FixedLine aGrpDrawGrid; // Neu 140cdf0e10cSrcweir 141cdf0e10cSrcweir protected: 142cdf0e10cSrcweir //these controls are used in draw and impress 143cdf0e10cSrcweir FixedLine aGrpSnap; 144cdf0e10cSrcweir CheckBox aCbxSnapHelplines; 145cdf0e10cSrcweir CheckBox aCbxSnapBorder; 146cdf0e10cSrcweir CheckBox aCbxSnapFrame; 147cdf0e10cSrcweir CheckBox aCbxSnapPoints; 148cdf0e10cSrcweir FixedText aFtSnapArea; 149cdf0e10cSrcweir MetricField aMtrFldSnapArea; 150cdf0e10cSrcweir 151cdf0e10cSrcweir FixedLine aSeparatorFL; 152cdf0e10cSrcweir 153cdf0e10cSrcweir FixedLine aGrpOrtho; 154cdf0e10cSrcweir CheckBox aCbxOrtho; 155cdf0e10cSrcweir CheckBox aCbxBigOrtho; 156cdf0e10cSrcweir CheckBox aCbxRotate; 157cdf0e10cSrcweir MetricField aMtrFldAngle; 158cdf0e10cSrcweir FixedText aFtBezAngle; 159cdf0e10cSrcweir MetricField aMtrFldBezAngle; 160cdf0e10cSrcweir 161cdf0e10cSrcweir private: 162cdf0e10cSrcweir sal_Bool bAttrModified; 163cdf0e10cSrcweir // sal_Bool bEqualGrid; // Neu 164cdf0e10cSrcweir 165cdf0e10cSrcweir #ifdef _SVX_OPTGRID_CXX 166cdf0e10cSrcweir DECL_LINK( ClickRotateHdl_Impl, void * ); 167cdf0e10cSrcweir DECL_LINK( ChangeDrawHdl_Impl, MetricField * ); 168cdf0e10cSrcweir DECL_LINK( ChangeGridsnapHdl_Impl, void * ); 169cdf0e10cSrcweir DECL_LINK( ChangeDivisionHdl_Impl, NumericField * ); 170cdf0e10cSrcweir 171cdf0e10cSrcweir #endif 172cdf0e10cSrcweir }; 173cdf0e10cSrcweir 174cdf0e10cSrcweir 175cdf0e10cSrcweir #endif 176cdf0e10cSrcweir 177