13334a7e6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 33334a7e6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 43334a7e6SAndrew Rist * or more contributor license agreements. See the NOTICE file 53334a7e6SAndrew Rist * distributed with this work for additional information 63334a7e6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 73334a7e6SAndrew Rist * to you under the Apache License, Version 2.0 (the 83334a7e6SAndrew Rist * "License"); you may not use this file except in compliance 93334a7e6SAndrew Rist * with the License. You may obtain a copy of the License at 103334a7e6SAndrew Rist * 113334a7e6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 123334a7e6SAndrew Rist * 133334a7e6SAndrew Rist * Unless required by applicable law or agreed to in writing, 143334a7e6SAndrew Rist * software distributed under the License is distributed on an 153334a7e6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 163334a7e6SAndrew Rist * KIND, either express or implied. See the License for the 173334a7e6SAndrew Rist * specific language governing permissions and limitations 183334a7e6SAndrew Rist * under the License. 193334a7e6SAndrew Rist * 203334a7e6SAndrew Rist *************************************************************/ 213334a7e6SAndrew Rist 223334a7e6SAndrew Rist 23cdf0e10cSrcweir #ifndef _SVX_DLG_CTRL_HXX 24cdf0e10cSrcweir #define _SVX_DLG_CTRL_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir // include --------------------------------------------------------------- 27cdf0e10cSrcweir 28cdf0e10cSrcweir #include <svtools/ctrlbox.hxx> 29cdf0e10cSrcweir #include <sfx2/tabdlg.hxx> 30cdf0e10cSrcweir #include "svx/svxdllapi.h" 31cdf0e10cSrcweir #include <svx/rectenum.hxx> 32cdf0e10cSrcweir #include <vcl/graph.hxx> 33cdf0e10cSrcweir #ifndef _XTABLE_HXX 34cdf0e10cSrcweir class XBitmapEntry; 35cdf0e10cSrcweir class XBitmapList; 36cdf0e10cSrcweir class XColorEntry; 37cdf0e10cSrcweir class XColorTable; 38cdf0e10cSrcweir class XDash; 39cdf0e10cSrcweir class XDashEntry; 40cdf0e10cSrcweir class XDashList; 41cdf0e10cSrcweir class XGradient; 42cdf0e10cSrcweir class XGradientEntry; 43cdf0e10cSrcweir class XGradientList; 44cdf0e10cSrcweir class XHatch; 45cdf0e10cSrcweir class XHatchEntry; 46cdf0e10cSrcweir class XHatchList; 47cdf0e10cSrcweir class XLineEndEntry; 48cdf0e10cSrcweir class XLineEndList; 49cdf0e10cSrcweir class XFillAttrSetItem; 50cdf0e10cSrcweir #endif 51cdf0e10cSrcweir 52cdf0e10cSrcweir class XOBitmap; 53cdf0e10cSrcweir class XOutdevItemPool; 54cdf0e10cSrcweir 55cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace awt { 56cdf0e10cSrcweir struct Point; 57cdf0e10cSrcweir } } } } 58cdf0e10cSrcweir 59cdf0e10cSrcweir /************************************************************************* 60cdf0e10cSrcweir |* 61cdf0e10cSrcweir |* Von SfxTabPage abgeleitet, um vom Control ueber virtuelle Methode 62cdf0e10cSrcweir |* benachrichtigt werden zu koennen. 63cdf0e10cSrcweir |* 64cdf0e10cSrcweir \************************************************************************/ 65cdf0e10cSrcweir class SvxTabPage : public SfxTabPage 66cdf0e10cSrcweir { 67cdf0e10cSrcweir 68cdf0e10cSrcweir public: 69cdf0e10cSrcweir SvxTabPage( Window* pParent, ResId Id, const SfxItemSet& rInAttrs ) : 70cdf0e10cSrcweir SfxTabPage( pParent, Id, rInAttrs ) {} 71cdf0e10cSrcweir 72cdf0e10cSrcweir virtual void PointChanged( Window* pWindow, RECT_POINT eRP ) = 0; 73cdf0e10cSrcweir }; 74cdf0e10cSrcweir 75cdf0e10cSrcweir /************************************************************************* 76cdf0e10cSrcweir |* 77cdf0e10cSrcweir |* Control zur Darstellung und Auswahl der Eckpunkte (und Mittelpunkt) 78cdf0e10cSrcweir |* eines Objekts 79cdf0e10cSrcweir |* 80cdf0e10cSrcweir \************************************************************************/ 81cdf0e10cSrcweir typedef sal_uInt16 CTL_STATE; 82cdf0e10cSrcweir #define CS_NOHORZ 1 // no horizontal input information is used 83cdf0e10cSrcweir #define CS_NOVERT 2 // no vertikal input information is used 84cdf0e10cSrcweir 85cdf0e10cSrcweir class SvxRectCtlAccessibleContext; 86cdf0e10cSrcweir 87cdf0e10cSrcweir class SVX_DLLPUBLIC SvxRectCtl : public Control 88cdf0e10cSrcweir { 89cdf0e10cSrcweir private: 90cdf0e10cSrcweir SVX_DLLPRIVATE void InitSettings( sal_Bool bForeground, sal_Bool bBackground ); 91cdf0e10cSrcweir SVX_DLLPRIVATE void InitRectBitmap( void ); 92cdf0e10cSrcweir SVX_DLLPRIVATE Bitmap& GetRectBitmap( void ); 93cdf0e10cSrcweir SVX_DLLPRIVATE void Resize_Impl(); 94cdf0e10cSrcweir 95cdf0e10cSrcweir protected: 96cdf0e10cSrcweir SvxRectCtlAccessibleContext* pAccContext; 97cdf0e10cSrcweir sal_uInt16 nBorderWidth; 98cdf0e10cSrcweir sal_uInt16 nRadius; 99cdf0e10cSrcweir Size aSize; 100cdf0e10cSrcweir Point aPtLT, aPtMT, aPtRT; 101cdf0e10cSrcweir Point aPtLM, aPtMM, aPtRM; 102cdf0e10cSrcweir Point aPtLB, aPtMB, aPtRB; 103cdf0e10cSrcweir Point aPtNew; 104cdf0e10cSrcweir RECT_POINT eRP, eDefRP; 105cdf0e10cSrcweir CTL_STYLE eCS; 106cdf0e10cSrcweir Bitmap* pBitmap; 107cdf0e10cSrcweir CTL_STATE m_nState; 108cdf0e10cSrcweir 109cdf0e10cSrcweir // #103516# Added a possibility to completely disable this control 110cdf0e10cSrcweir sal_Bool mbCompleteDisable; 111cdf0e10cSrcweir 112cdf0e10cSrcweir RECT_POINT GetRPFromPoint( Point ) const; 113cdf0e10cSrcweir Point GetPointFromRP( RECT_POINT ) const; 114cdf0e10cSrcweir void SetFocusRect( const Rectangle* pRect = NULL ); // pRect == NULL -> calculate rectangle in method 115cdf0e10cSrcweir Point SetActualRPWithoutInvalidate( RECT_POINT eNewRP ); // returns the last point 116cdf0e10cSrcweir 117cdf0e10cSrcweir virtual void GetFocus(); 118cdf0e10cSrcweir virtual void LoseFocus(); 119cdf0e10cSrcweir 120cdf0e10cSrcweir Point GetApproxLogPtFromPixPt( const Point& rRoughPixelPoint ) const; 121cdf0e10cSrcweir public: 122cdf0e10cSrcweir SvxRectCtl( Window* pParent, const ResId& rResId, RECT_POINT eRpt = RP_MM, 123cdf0e10cSrcweir sal_uInt16 nBorder = 200, sal_uInt16 nCircle = 80, CTL_STYLE eStyle = CS_RECT ); 124cdf0e10cSrcweir virtual ~SvxRectCtl(); 125cdf0e10cSrcweir 126cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 127cdf0e10cSrcweir virtual void MouseButtonDown( const MouseEvent& rMEvt ); 128cdf0e10cSrcweir virtual void KeyInput( const KeyEvent& rKeyEvt ); 129cdf0e10cSrcweir virtual void StateChanged( StateChangedType nStateChange ); 130cdf0e10cSrcweir virtual void DataChanged( const DataChangedEvent& rDCEvt ); 131cdf0e10cSrcweir virtual void Resize(); 132cdf0e10cSrcweir 133cdf0e10cSrcweir void Reset(); 134cdf0e10cSrcweir RECT_POINT GetActualRP() const; 135cdf0e10cSrcweir void SetActualRP( RECT_POINT eNewRP ); 136cdf0e10cSrcweir 137cdf0e10cSrcweir void SetState( CTL_STATE nState ); 138cdf0e10cSrcweir 139cdf0e10cSrcweir sal_uInt8 GetNumOfChilds( void ) const; // returns number of usable radio buttons 140cdf0e10cSrcweir 141cdf0e10cSrcweir Rectangle CalculateFocusRectangle( void ) const; 142cdf0e10cSrcweir Rectangle CalculateFocusRectangle( RECT_POINT eRectPoint ) const; 143cdf0e10cSrcweir 144cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); 145cdf0e10cSrcweir 146cdf0e10cSrcweir RECT_POINT GetApproxRPFromPixPt( const ::com::sun::star::awt::Point& rPixelPoint ) const; 147cdf0e10cSrcweir 148cdf0e10cSrcweir // #103516# Added a possibility to completely disable this control 149cdf0e10cSrcweir sal_Bool IsCompletelyDisabled() const { return mbCompleteDisable; } 150cdf0e10cSrcweir void DoCompletelyDisable(sal_Bool bNew); 151cdf0e10cSrcweir }; 152cdf0e10cSrcweir 153cdf0e10cSrcweir /************************************************************************* 154cdf0e10cSrcweir |* 155cdf0e10cSrcweir |* Control zur Darstellung und Auswahl des Winkels der Eckpunkte 156cdf0e10cSrcweir |* eines Objekts 157cdf0e10cSrcweir |* 158cdf0e10cSrcweir \************************************************************************/ 159cdf0e10cSrcweir class SvxAngleCtl : public SvxRectCtl 160cdf0e10cSrcweir { 161cdf0e10cSrcweir private: 162cdf0e10cSrcweir void Initialize(); 163cdf0e10cSrcweir 164cdf0e10cSrcweir protected: 165cdf0e10cSrcweir Font aFont; 166cdf0e10cSrcweir Size aFontSize; 167cdf0e10cSrcweir sal_Bool bPositive; 168cdf0e10cSrcweir 169cdf0e10cSrcweir public: 170cdf0e10cSrcweir SvxAngleCtl( Window* pParent, const ResId& rResId ); 171cdf0e10cSrcweir SvxAngleCtl( Window* pParent, const ResId& rResId, Size aSize ); 172cdf0e10cSrcweir 173cdf0e10cSrcweir void ChangeMetric() 174cdf0e10cSrcweir { bPositive = !bPositive; } 175cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 176cdf0e10cSrcweir }; 177cdf0e10cSrcweir 178cdf0e10cSrcweir /************************************************************************* 179cdf0e10cSrcweir |* 180cdf0e10cSrcweir |* Preview-Control zur Darstellung von Bitmaps 181cdf0e10cSrcweir |* 182cdf0e10cSrcweir \************************************************************************/ 183cdf0e10cSrcweir 184cdf0e10cSrcweir class SVX_DLLPUBLIC SvxBitmapCtl 185cdf0e10cSrcweir { 186cdf0e10cSrcweir protected: 187cdf0e10cSrcweir Size aSize; 188cdf0e10cSrcweir sal_uInt16 nLines; 189cdf0e10cSrcweir Color aPixelColor, aBackgroundColor; 190cdf0e10cSrcweir const sal_uInt16* pBmpArray; 191cdf0e10cSrcweir 192cdf0e10cSrcweir public: 193cdf0e10cSrcweir SvxBitmapCtl( Window* pParent, const Size& rSize ); 194cdf0e10cSrcweir ~SvxBitmapCtl(); 195cdf0e10cSrcweir 196*70d3707aSArmin Le Grand BitmapEx GetBitmapEx(); 197cdf0e10cSrcweir 198cdf0e10cSrcweir void SetBmpArray( const sal_uInt16* pPixel ) { pBmpArray = pPixel; } 199cdf0e10cSrcweir void SetLines( sal_uInt16 nLns ) { nLines = nLns; } 200cdf0e10cSrcweir void SetPixelColor( Color aColor ) { aPixelColor = aColor; } 201cdf0e10cSrcweir void SetBackgroundColor( Color aColor ) { aBackgroundColor = aColor; } 202cdf0e10cSrcweir }; 203cdf0e10cSrcweir 204cdf0e10cSrcweir /************************************************************************* 205cdf0e10cSrcweir |* 206cdf0e10cSrcweir |* Control zum Editieren von Bitmaps 207cdf0e10cSrcweir |* 208cdf0e10cSrcweir \************************************************************************/ 209cdf0e10cSrcweir class SVX_DLLPUBLIC SvxPixelCtl : public Control 210cdf0e10cSrcweir { 211cdf0e10cSrcweir private: 212cdf0e10cSrcweir using OutputDevice::SetLineColor; 213cdf0e10cSrcweir 214cdf0e10cSrcweir protected: 215cdf0e10cSrcweir sal_uInt16 nLines, nSquares; 216cdf0e10cSrcweir Color aPixelColor; 217cdf0e10cSrcweir Color aBackgroundColor; 218cdf0e10cSrcweir Color aLineColor; 219cdf0e10cSrcweir Size aRectSize; 220cdf0e10cSrcweir sal_uInt16* pPixel; 221cdf0e10cSrcweir sal_Bool bPaintable; 222cdf0e10cSrcweir 223cdf0e10cSrcweir void ChangePixel( sal_uInt16 nPixel ); 224cdf0e10cSrcweir 225cdf0e10cSrcweir public: 226cdf0e10cSrcweir SvxPixelCtl( Window* pParent, const ResId& rResId, 227cdf0e10cSrcweir sal_uInt16 nNumber = 8 ); 228cdf0e10cSrcweir ~SvxPixelCtl(); 229cdf0e10cSrcweir 230cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 231cdf0e10cSrcweir virtual void MouseButtonDown( const MouseEvent& rMEvt ); 232cdf0e10cSrcweir 233*70d3707aSArmin Le Grand void SetXBitmap( const BitmapEx& rBitmapEx ); 234cdf0e10cSrcweir 235cdf0e10cSrcweir void SetPixelColor( const Color& rCol ) { aPixelColor = rCol; } 236cdf0e10cSrcweir void SetBackgroundColor( const Color& rCol ) { aBackgroundColor = rCol; } 237cdf0e10cSrcweir void SetLineColor( const Color& rCol ) { aLineColor = rCol; } 238cdf0e10cSrcweir 239cdf0e10cSrcweir sal_uInt16 GetLineCount() const { return nLines; } 240cdf0e10cSrcweir Color GetPixelColor() const { return aPixelColor; } 241cdf0e10cSrcweir Color GetBackgroundColor() const { return aBackgroundColor; } 242cdf0e10cSrcweir 243cdf0e10cSrcweir sal_uInt16 GetBitmapPixel( const sal_uInt16 nPixelNumber ); 244cdf0e10cSrcweir sal_uInt16* GetBitmapPixelPtr() { return pPixel; } 245cdf0e10cSrcweir 246cdf0e10cSrcweir void SetPaintable( sal_Bool bTmp ) { bPaintable = bTmp; } 247cdf0e10cSrcweir void Reset(); 248cdf0e10cSrcweir }; 249cdf0e10cSrcweir 250cdf0e10cSrcweir /************************************************************************* 251cdf0e10cSrcweir |* 252cdf0e10cSrcweir |* ColorLB kann mit Farben und Namen gefuellt werden 253cdf0e10cSrcweir |* 254cdf0e10cSrcweir \************************************************************************/ 255cdf0e10cSrcweir class SVX_DLLPUBLIC ColorLB : public ColorListBox 256cdf0e10cSrcweir { 257cdf0e10cSrcweir 258cdf0e10cSrcweir public: 259cdf0e10cSrcweir ColorLB( Window* pParent, ResId Id ) : ColorListBox( pParent, Id ) {} 260cdf0e10cSrcweir ColorLB( Window* pParent, WinBits aWB ) : ColorListBox( pParent, aWB ) {} 261cdf0e10cSrcweir 262cdf0e10cSrcweir virtual void Fill( const XColorTable* pTab ); 263cdf0e10cSrcweir 264cdf0e10cSrcweir void Append( XColorEntry* pEntry, Bitmap* pBmp = NULL ); 265cdf0e10cSrcweir void Modify( XColorEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL ); 266cdf0e10cSrcweir }; 267cdf0e10cSrcweir 268cdf0e10cSrcweir /************************************************************************* 269cdf0e10cSrcweir |* 270cdf0e10cSrcweir |* HatchingLB 271cdf0e10cSrcweir |* 272cdf0e10cSrcweir \************************************************************************/ 273cdf0e10cSrcweir class SVX_DLLPUBLIC HatchingLB : public ListBox 274cdf0e10cSrcweir { 275cdf0e10cSrcweir 276cdf0e10cSrcweir public: 277cdf0e10cSrcweir HatchingLB( Window* pParent, ResId Id, sal_Bool bUserDraw = sal_True ); 278cdf0e10cSrcweir HatchingLB( Window* pParent, WinBits aWB, sal_Bool bUserDraw = sal_True ); 279cdf0e10cSrcweir 280cdf0e10cSrcweir virtual void Fill( const XHatchList* pList ); 281cdf0e10cSrcweir virtual void UserDraw( const UserDrawEvent& rUDEvt ); 282cdf0e10cSrcweir 283cdf0e10cSrcweir void Append( XHatchEntry* pEntry, Bitmap* pBmp = NULL ); 284cdf0e10cSrcweir void Modify( XHatchEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL ); 285cdf0e10cSrcweir void SelectEntryByList( const XHatchList* pList, const String& rStr, 286cdf0e10cSrcweir const XHatch& rXHatch, sal_uInt16 nDist = 0 ); 287cdf0e10cSrcweir 288cdf0e10cSrcweir private: 289cdf0e10cSrcweir XHatchList* mpList; 290cdf0e10cSrcweir sal_Bool mbUserDraw; 291cdf0e10cSrcweir }; 292cdf0e10cSrcweir 293cdf0e10cSrcweir /************************************************************************* 294cdf0e10cSrcweir |* 295cdf0e10cSrcweir |* GradientLB 296cdf0e10cSrcweir |* 297cdf0e10cSrcweir \************************************************************************/ 298cdf0e10cSrcweir class SVX_DLLPUBLIC GradientLB : public ListBox 299cdf0e10cSrcweir { 300cdf0e10cSrcweir public: 301cdf0e10cSrcweir GradientLB( Window* pParent, ResId Id, sal_Bool bUserDraw = sal_True ); 302cdf0e10cSrcweir GradientLB( Window* pParent, WinBits aWB, sal_Bool bUserDraw = sal_True ); 303cdf0e10cSrcweir 304cdf0e10cSrcweir virtual void Fill( const XGradientList* pList ); 305cdf0e10cSrcweir virtual void UserDraw( const UserDrawEvent& rUDEvt ); 306cdf0e10cSrcweir 307cdf0e10cSrcweir void Append( XGradientEntry* pEntry, Bitmap* pBmp = NULL ); 308cdf0e10cSrcweir void Modify( XGradientEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL ); 309cdf0e10cSrcweir void SelectEntryByList( const XGradientList* pList, const String& rStr, 310cdf0e10cSrcweir const XGradient& rXGradient, sal_uInt16 nDist = 0 ); 311cdf0e10cSrcweir 312cdf0e10cSrcweir private: 313cdf0e10cSrcweir XGradientList* mpList; 314cdf0e10cSrcweir sal_Bool mbUserDraw; 315cdf0e10cSrcweir }; 316cdf0e10cSrcweir 317cdf0e10cSrcweir /************************************************************************* 318cdf0e10cSrcweir |* 319cdf0e10cSrcweir |* BitmapLB 320cdf0e10cSrcweir |* 321cdf0e10cSrcweir \************************************************************************/ 322cdf0e10cSrcweir class SVX_DLLPUBLIC BitmapLB : public ListBox 323cdf0e10cSrcweir { 324cdf0e10cSrcweir public: 325*70d3707aSArmin Le Grand BitmapLB(Window* pParent, ResId Id, bool bUserDraw = true); 326cdf0e10cSrcweir 327*70d3707aSArmin Le Grand virtual void Fill(const XBitmapList* pList); 328*70d3707aSArmin Le Grand virtual void UserDraw(const UserDrawEvent& rUDEvt); 329cdf0e10cSrcweir 330*70d3707aSArmin Le Grand void Append(XBitmapEntry* pEntry, BitmapEx* pBmpEx = 0); 331*70d3707aSArmin Le Grand void Modify(XBitmapEntry* pEntry, sal_uInt16 nPos, BitmapEx* pBmpEx = 0); 332*70d3707aSArmin Le Grand void SelectEntryByList(const XBitmapList* pList, const String& rStr); 333cdf0e10cSrcweir 334cdf0e10cSrcweir private: 335*70d3707aSArmin Le Grand VirtualDevice maVD; 336*70d3707aSArmin Le Grand BitmapEx maBitmapEx; 337cdf0e10cSrcweir 338cdf0e10cSrcweir XBitmapList* mpList; 339*70d3707aSArmin Le Grand bool mbUserDraw; 340cdf0e10cSrcweir 341cdf0e10cSrcweir SVX_DLLPRIVATE void SetVirtualDevice(); 342cdf0e10cSrcweir }; 343cdf0e10cSrcweir 344cdf0e10cSrcweir /************************************************************************* 345cdf0e10cSrcweir |* 346cdf0e10cSrcweir |* FillAttrLB vereint alle Fuellattribute in einer ListBox 347cdf0e10cSrcweir |* 348cdf0e10cSrcweir \************************************************************************/ 349cdf0e10cSrcweir class FillAttrLB : public ColorListBox 350cdf0e10cSrcweir { 351cdf0e10cSrcweir private: 352*70d3707aSArmin Le Grand VirtualDevice maVD; 353*70d3707aSArmin Le Grand BitmapEx maBitmapEx; 354cdf0e10cSrcweir 355cdf0e10cSrcweir void SetVirtualDevice(); 356cdf0e10cSrcweir 357cdf0e10cSrcweir public: 358*70d3707aSArmin Le Grand FillAttrLB( Window* pParent, ResId Id ); 359*70d3707aSArmin Le Grand FillAttrLB( Window* pParent, WinBits aWB ); 360cdf0e10cSrcweir 361cdf0e10cSrcweir virtual void Fill( const XColorTable* pTab ); 362cdf0e10cSrcweir virtual void Fill( const XHatchList* pList ); 363cdf0e10cSrcweir virtual void Fill( const XGradientList* pList ); 364cdf0e10cSrcweir virtual void Fill( const XBitmapList* pList ); 365cdf0e10cSrcweir 366*70d3707aSArmin Le Grand void SelectEntryByList(const XBitmapList* pList, const String& rStr); 367cdf0e10cSrcweir }; 368cdf0e10cSrcweir 369cdf0e10cSrcweir /************************************************************************* 370cdf0e10cSrcweir |* 371cdf0e10cSrcweir |* FillTypeLB 372cdf0e10cSrcweir |* 373cdf0e10cSrcweir \************************************************************************/ 374cdf0e10cSrcweir class FillTypeLB : public ListBox 375cdf0e10cSrcweir { 376cdf0e10cSrcweir 377cdf0e10cSrcweir public: 378cdf0e10cSrcweir FillTypeLB( Window* pParent, ResId Id ) : ListBox( pParent, Id ) {} 379cdf0e10cSrcweir FillTypeLB( Window* pParent, WinBits aWB ) : ListBox( pParent, aWB ) {} 380cdf0e10cSrcweir 381cdf0e10cSrcweir virtual void Fill(); 382cdf0e10cSrcweir }; 383cdf0e10cSrcweir 384cdf0e10cSrcweir /************************************************************************* 385cdf0e10cSrcweir |* 386cdf0e10cSrcweir |* LineLB 387cdf0e10cSrcweir |* 388cdf0e10cSrcweir \************************************************************************/ 389cdf0e10cSrcweir class SVX_DLLPUBLIC LineLB : public ListBox 390cdf0e10cSrcweir { 391cdf0e10cSrcweir 392cdf0e10cSrcweir public: 393cdf0e10cSrcweir LineLB( Window* pParent, ResId Id ) : ListBox( pParent, Id ) {} 394cdf0e10cSrcweir LineLB( Window* pParent, WinBits aWB ) : ListBox( pParent, aWB ) {} 395cdf0e10cSrcweir 396cdf0e10cSrcweir virtual void Fill( const XDashList* pList ); 397cdf0e10cSrcweir 398cdf0e10cSrcweir void Append( XDashEntry* pEntry, Bitmap* pBmp = NULL ); 399cdf0e10cSrcweir void Modify( XDashEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL ); 400cdf0e10cSrcweir void SelectEntryByList( const XDashList* pList, const String& rStr, 401cdf0e10cSrcweir const XDash& rDash, sal_uInt16 nDist = 0 ); 402cdf0e10cSrcweir void FillStyles(); 403cdf0e10cSrcweir }; 404cdf0e10cSrcweir 405cdf0e10cSrcweir /************************************************************************* 406cdf0e10cSrcweir |* 407cdf0e10cSrcweir |* LineEndsLB 408cdf0e10cSrcweir |* 409cdf0e10cSrcweir \************************************************************************/ 410cdf0e10cSrcweir class SVX_DLLPUBLIC LineEndLB : public ListBox 411cdf0e10cSrcweir { 412cdf0e10cSrcweir 413cdf0e10cSrcweir public: 414cdf0e10cSrcweir LineEndLB( Window* pParent, ResId Id ) : ListBox( pParent, Id ) {} 415cdf0e10cSrcweir LineEndLB( Window* pParent, WinBits aWB ) : ListBox( pParent, aWB ) {} 416cdf0e10cSrcweir 417cdf0e10cSrcweir virtual void Fill( const XLineEndList* pList, sal_Bool bStart = sal_True ); 418cdf0e10cSrcweir 419cdf0e10cSrcweir void Append( XLineEndEntry* pEntry, Bitmap* pBmp = NULL, 420cdf0e10cSrcweir sal_Bool bStart = sal_True ); 421cdf0e10cSrcweir void Modify( XLineEndEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL, 422cdf0e10cSrcweir sal_Bool bStart = sal_True ); 423cdf0e10cSrcweir }; 424cdf0e10cSrcweir 425cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 426cdf0e10cSrcweir 427cdf0e10cSrcweir class SdrObject; 428cdf0e10cSrcweir class SdrModel; 429cdf0e10cSrcweir 430cdf0e10cSrcweir class SvxPreviewBase : public Control 431cdf0e10cSrcweir { 432cdf0e10cSrcweir private: 433cdf0e10cSrcweir SdrModel* mpModel; 434cdf0e10cSrcweir VirtualDevice* mpBufferDevice; 435cdf0e10cSrcweir 436cdf0e10cSrcweir protected: 437cdf0e10cSrcweir void InitSettings(bool bForeground, bool bBackground); 438cdf0e10cSrcweir 439cdf0e10cSrcweir // prepare buffered paint 440cdf0e10cSrcweir void LocalPrePaint(); 441cdf0e10cSrcweir 442cdf0e10cSrcweir // end and output buffered paint 443cdf0e10cSrcweir void LocalPostPaint(); 444cdf0e10cSrcweir 445cdf0e10cSrcweir public: 446cdf0e10cSrcweir SvxPreviewBase( Window* pParent, const ResId& rResId ); 447cdf0e10cSrcweir virtual ~SvxPreviewBase(); 448cdf0e10cSrcweir 449cdf0e10cSrcweir // change support 450cdf0e10cSrcweir virtual void StateChanged(StateChangedType nStateChange); 451cdf0e10cSrcweir virtual void DataChanged(const DataChangedEvent& rDCEvt); 452cdf0e10cSrcweir 453cdf0e10cSrcweir // dada read access 454cdf0e10cSrcweir SdrModel& getModel() const { return *mpModel; } 455cdf0e10cSrcweir OutputDevice& getBufferDevice() const { return *mpBufferDevice; } 456cdf0e10cSrcweir }; 457cdf0e10cSrcweir 458cdf0e10cSrcweir /************************************************************************* 459cdf0e10cSrcweir |* 460cdf0e10cSrcweir |* SvxLinePreview 461cdf0e10cSrcweir |* 462cdf0e10cSrcweir \************************************************************************/ 463cdf0e10cSrcweir 464cdf0e10cSrcweir class SVX_DLLPUBLIC SvxXLinePreview : public SvxPreviewBase 465cdf0e10cSrcweir { 466cdf0e10cSrcweir private: 467cdf0e10cSrcweir SdrObject* mpLineObjA; 468cdf0e10cSrcweir SdrObject* mpLineObjB; 469cdf0e10cSrcweir SdrObject* mpLineObjC; 470cdf0e10cSrcweir 471cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart) 472cdf0e10cSrcweir Graphic* mpGraphic; 473cdf0e10cSrcweir sal_Bool mbWithSymbol; 474cdf0e10cSrcweir Size maSymbolSize; 475cdf0e10cSrcweir 476cdf0e10cSrcweir public: 477cdf0e10cSrcweir SvxXLinePreview( Window* pParent, const ResId& rResId ); 478cdf0e10cSrcweir virtual ~SvxXLinePreview(); 479cdf0e10cSrcweir 480cdf0e10cSrcweir void SetLineAttributes(const SfxItemSet& rItemSet); 481cdf0e10cSrcweir 482cdf0e10cSrcweir void ShowSymbol( sal_Bool b ) { mbWithSymbol = b; }; 483cdf0e10cSrcweir void SetSymbol( Graphic* p, const Size& s ); 484cdf0e10cSrcweir void ResizeSymbol( const Size& s ); 485cdf0e10cSrcweir 486cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 487cdf0e10cSrcweir }; 488cdf0e10cSrcweir 489cdf0e10cSrcweir /************************************************************************* 490cdf0e10cSrcweir |* 491cdf0e10cSrcweir |* SvxXRectPreview 492cdf0e10cSrcweir |* 493cdf0e10cSrcweir \************************************************************************/ 494cdf0e10cSrcweir 495cdf0e10cSrcweir class SVX_DLLPUBLIC SvxXRectPreview : public SvxPreviewBase 496cdf0e10cSrcweir { 497cdf0e10cSrcweir private: 498cdf0e10cSrcweir SdrObject* mpRectangleObject; 499cdf0e10cSrcweir 500cdf0e10cSrcweir public: 501cdf0e10cSrcweir SvxXRectPreview( Window* pParent, const ResId& rResId ); 502cdf0e10cSrcweir virtual ~SvxXRectPreview(); 503cdf0e10cSrcweir 504cdf0e10cSrcweir void SetAttributes(const SfxItemSet& rItemSet); 505cdf0e10cSrcweir 506cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 507cdf0e10cSrcweir }; 508cdf0e10cSrcweir 509cdf0e10cSrcweir /************************************************************************* 510cdf0e10cSrcweir |* 511cdf0e10cSrcweir |* SvxXShadowPreview 512cdf0e10cSrcweir |* 513cdf0e10cSrcweir \************************************************************************/ 514cdf0e10cSrcweir 515cdf0e10cSrcweir class SVX_DLLPUBLIC SvxXShadowPreview : public SvxPreviewBase 516cdf0e10cSrcweir { 517cdf0e10cSrcweir private: 518cdf0e10cSrcweir SdrObject* mpRectangleObject; 519cdf0e10cSrcweir SdrObject* mpRectangleShadow; 520cdf0e10cSrcweir 521cdf0e10cSrcweir public: 522cdf0e10cSrcweir SvxXShadowPreview( Window* pParent, const ResId& rResId ); 523cdf0e10cSrcweir virtual ~SvxXShadowPreview(); 524cdf0e10cSrcweir 525cdf0e10cSrcweir void SetRectangleAttributes(const SfxItemSet& rItemSet); 526cdf0e10cSrcweir void SetShadowAttributes(const SfxItemSet& rItemSet); 527cdf0e10cSrcweir void SetShadowPosition(const Point& rPos); 528cdf0e10cSrcweir 529cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 530cdf0e10cSrcweir }; 531cdf0e10cSrcweir 532cdf0e10cSrcweir #endif // _SVX_DLG_CTRL_HXX 533cdf0e10cSrcweir 534