xref: /aoo41x/main/svx/inc/svx/dlgctrl.hxx (revision 4d7c9de0)
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>
33a68b38dfSArmin Le Grand 
34cdf0e10cSrcweir #ifndef _XTABLE_HXX
35cdf0e10cSrcweir class XBitmapEntry;
36cdf0e10cSrcweir class XColorEntry;
37cdf0e10cSrcweir class XDash;
38cdf0e10cSrcweir class XDashEntry;
39cdf0e10cSrcweir class XGradient;
40cdf0e10cSrcweir class XGradientEntry;
41cdf0e10cSrcweir class XHatch;
42cdf0e10cSrcweir class XHatchEntry;
43cdf0e10cSrcweir class XLineEndEntry;
44cdf0e10cSrcweir class XFillAttrSetItem;
45cdf0e10cSrcweir #endif
46cdf0e10cSrcweir 
47cdf0e10cSrcweir class XOBitmap;
48cdf0e10cSrcweir class XOutdevItemPool;
49cdf0e10cSrcweir 
50cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace awt {
51cdf0e10cSrcweir 	struct Point;
52cdf0e10cSrcweir } } } }
53cdf0e10cSrcweir 
54cdf0e10cSrcweir /*************************************************************************
55cdf0e10cSrcweir |*
56cdf0e10cSrcweir |* Von SfxTabPage abgeleitet, um vom Control ueber virtuelle Methode
57cdf0e10cSrcweir |* benachrichtigt werden zu koennen.
58cdf0e10cSrcweir |*
59cdf0e10cSrcweir \************************************************************************/
60cdf0e10cSrcweir class SvxTabPage : public SfxTabPage
61cdf0e10cSrcweir {
62cdf0e10cSrcweir 
63cdf0e10cSrcweir public:
SvxTabPage(Window * pParent,ResId Id,const SfxItemSet & rInAttrs)64cdf0e10cSrcweir 	SvxTabPage( Window* pParent, ResId Id, const SfxItemSet& rInAttrs  ) :
65cdf0e10cSrcweir 		SfxTabPage( pParent, Id, rInAttrs ) {}
66cdf0e10cSrcweir 
67cdf0e10cSrcweir 	virtual void PointChanged( Window* pWindow, RECT_POINT eRP ) = 0;
68cdf0e10cSrcweir };
69cdf0e10cSrcweir 
70cdf0e10cSrcweir /*************************************************************************
71cdf0e10cSrcweir |*
72cdf0e10cSrcweir |*	Control zur Darstellung und Auswahl der Eckpunkte (und Mittelpunkt)
73cdf0e10cSrcweir |*	eines Objekts
74cdf0e10cSrcweir |*
75cdf0e10cSrcweir \************************************************************************/
76cdf0e10cSrcweir typedef sal_uInt16 CTL_STATE;
77cdf0e10cSrcweir #define CS_NOHORZ	1		// no horizontal input information is used
78cdf0e10cSrcweir #define CS_NOVERT	2		// no vertikal input information is used
79cdf0e10cSrcweir 
80cdf0e10cSrcweir class SvxRectCtlAccessibleContext;
81*4d7c9de0SHerbert Dürr class SvxPixelCtlAccessible;
82cdf0e10cSrcweir class SVX_DLLPUBLIC SvxRectCtl : public Control
83cdf0e10cSrcweir {
84cdf0e10cSrcweir private:
85cdf0e10cSrcweir 	SVX_DLLPRIVATE void				InitSettings( sal_Bool bForeground, sal_Bool bBackground );
86cdf0e10cSrcweir 	SVX_DLLPRIVATE void				InitRectBitmap( void );
87cdf0e10cSrcweir 	SVX_DLLPRIVATE Bitmap&          GetRectBitmap( void );
88cdf0e10cSrcweir     SVX_DLLPRIVATE void             Resize_Impl();
89cdf0e10cSrcweir 
90cdf0e10cSrcweir protected:
91cdf0e10cSrcweir 	SvxRectCtlAccessibleContext*	pAccContext;
92cdf0e10cSrcweir 	sal_uInt16							nBorderWidth;
93cdf0e10cSrcweir 	sal_uInt16							nRadius;
94cdf0e10cSrcweir 	Size							aSize;
95cdf0e10cSrcweir 	Point							aPtLT, aPtMT, aPtRT;
96cdf0e10cSrcweir 	Point							aPtLM, aPtMM, aPtRM;
97cdf0e10cSrcweir 	Point							aPtLB, aPtMB, aPtRB;
98cdf0e10cSrcweir 	Point							aPtNew;
99cdf0e10cSrcweir 	RECT_POINT						eRP, eDefRP;
100cdf0e10cSrcweir 	CTL_STYLE						eCS;
101cdf0e10cSrcweir 	Bitmap*							pBitmap;
102cdf0e10cSrcweir 	CTL_STATE						m_nState;
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 	// #103516# Added a possibility to completely disable this control
105cdf0e10cSrcweir 	sal_Bool						mbCompleteDisable;
106cdf0e10cSrcweir 
107cdf0e10cSrcweir 	RECT_POINT			GetRPFromPoint( Point ) const;
108cdf0e10cSrcweir 	Point				GetPointFromRP( RECT_POINT ) const;
109cdf0e10cSrcweir 	void				SetFocusRect( const Rectangle* pRect = NULL );		// pRect == NULL -> calculate rectangle in method
110cdf0e10cSrcweir 	Point				SetActualRPWithoutInvalidate( RECT_POINT eNewRP );	// returns the last point
111cdf0e10cSrcweir 
112cdf0e10cSrcweir 	virtual void		GetFocus();
113cdf0e10cSrcweir 	virtual void		LoseFocus();
114cdf0e10cSrcweir 
115cdf0e10cSrcweir 	Point				GetApproxLogPtFromPixPt( const Point& rRoughPixelPoint ) const;
116cdf0e10cSrcweir public:
117cdf0e10cSrcweir 	SvxRectCtl( Window* pParent, const ResId& rResId, RECT_POINT eRpt = RP_MM,
118cdf0e10cSrcweir 				sal_uInt16 nBorder = 200, sal_uInt16 nCircle = 80, CTL_STYLE eStyle = CS_RECT );
119cdf0e10cSrcweir 	virtual ~SvxRectCtl();
120cdf0e10cSrcweir 
121cdf0e10cSrcweir 	virtual void 		Paint( const Rectangle& rRect );
122cdf0e10cSrcweir 	virtual void 		MouseButtonDown( const MouseEvent& rMEvt );
123cdf0e10cSrcweir     virtual void        KeyInput( const KeyEvent& rKeyEvt );
124cdf0e10cSrcweir 	virtual void		StateChanged( StateChangedType nStateChange );
125cdf0e10cSrcweir 	virtual void		DataChanged( const DataChangedEvent& rDCEvt );
126cdf0e10cSrcweir     virtual void        Resize();
127cdf0e10cSrcweir 
128cdf0e10cSrcweir 	void				Reset();
129cdf0e10cSrcweir 	RECT_POINT			GetActualRP() const;
130cdf0e10cSrcweir 	void				SetActualRP( RECT_POINT eNewRP );
131cdf0e10cSrcweir 
132cdf0e10cSrcweir 	void				SetState( CTL_STATE nState );
133cdf0e10cSrcweir 
134cdf0e10cSrcweir 	sal_uInt8				GetNumOfChilds( void ) const;	// returns number of usable radio buttons
135cdf0e10cSrcweir 
136cdf0e10cSrcweir 	Rectangle			CalculateFocusRectangle( void ) const;
137cdf0e10cSrcweir 	Rectangle			CalculateFocusRectangle( RECT_POINT eRectPoint ) const;
138cdf0e10cSrcweir 
139cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
140cdf0e10cSrcweir 
141cdf0e10cSrcweir 	RECT_POINT			GetApproxRPFromPixPt( const ::com::sun::star::awt::Point& rPixelPoint ) const;
142cdf0e10cSrcweir 
143cdf0e10cSrcweir 	// #103516# Added a possibility to completely disable this control
IsCompletelyDisabled() const144cdf0e10cSrcweir 	sal_Bool IsCompletelyDisabled() const { return mbCompleteDisable; }
145cdf0e10cSrcweir 	void DoCompletelyDisable(sal_Bool bNew);
146cdf0e10cSrcweir };
147cdf0e10cSrcweir 
148cdf0e10cSrcweir /*************************************************************************
149cdf0e10cSrcweir |*
150cdf0e10cSrcweir |*	Control zur Darstellung und Auswahl des Winkels der Eckpunkte
151cdf0e10cSrcweir |*	eines Objekts
152cdf0e10cSrcweir |*
153cdf0e10cSrcweir \************************************************************************/
154cdf0e10cSrcweir class SvxAngleCtl : public SvxRectCtl
155cdf0e10cSrcweir {
156cdf0e10cSrcweir private:
157cdf0e10cSrcweir 	void	Initialize();
158cdf0e10cSrcweir 
159cdf0e10cSrcweir protected:
160cdf0e10cSrcweir 	Font	aFont;
161cdf0e10cSrcweir 	Size	aFontSize;
162cdf0e10cSrcweir 	sal_Bool	bPositive;
163cdf0e10cSrcweir 
164cdf0e10cSrcweir public:
165cdf0e10cSrcweir 			SvxAngleCtl( Window* pParent, const ResId& rResId );
166cdf0e10cSrcweir 			SvxAngleCtl( Window* pParent, const ResId& rResId, Size aSize );
167cdf0e10cSrcweir 
ChangeMetric()168cdf0e10cSrcweir 	void	ChangeMetric()
169cdf0e10cSrcweir 				{ bPositive = !bPositive; }
170cdf0e10cSrcweir 	virtual void Paint( const Rectangle& rRect );
171cdf0e10cSrcweir };
172cdf0e10cSrcweir 
173cdf0e10cSrcweir /*************************************************************************
174cdf0e10cSrcweir |*
175cdf0e10cSrcweir |*	Preview-Control zur Darstellung von Bitmaps
176cdf0e10cSrcweir |*
177cdf0e10cSrcweir \************************************************************************/
178cdf0e10cSrcweir 
179cdf0e10cSrcweir class SVX_DLLPUBLIC SvxBitmapCtl
180cdf0e10cSrcweir {
181cdf0e10cSrcweir protected:
182cdf0e10cSrcweir 	Size			aSize;
183cdf0e10cSrcweir 	sal_uInt16			nLines;
184cdf0e10cSrcweir 	Color			aPixelColor, aBackgroundColor;
185cdf0e10cSrcweir 	const sal_uInt16*	pBmpArray;
186cdf0e10cSrcweir 
187cdf0e10cSrcweir public:
188cdf0e10cSrcweir 			SvxBitmapCtl( Window* pParent, const Size& rSize );
189cdf0e10cSrcweir 			~SvxBitmapCtl();
190cdf0e10cSrcweir 
19170d3707aSArmin Le Grand 	BitmapEx GetBitmapEx();
192cdf0e10cSrcweir 
SetBmpArray(const sal_uInt16 * pPixel)193cdf0e10cSrcweir 	void	SetBmpArray( const sal_uInt16* pPixel ) { pBmpArray = pPixel; }
SetLines(sal_uInt16 nLns)194cdf0e10cSrcweir 	void	SetLines( sal_uInt16 nLns ) { nLines = nLns; }
SetPixelColor(Color aColor)195cdf0e10cSrcweir 	void	SetPixelColor( Color aColor ) { aPixelColor = aColor; }
SetBackgroundColor(Color aColor)196cdf0e10cSrcweir 	void	SetBackgroundColor( Color aColor ) { aBackgroundColor = aColor; }
197cdf0e10cSrcweir };
198cdf0e10cSrcweir 
199cdf0e10cSrcweir /*************************************************************************
200cdf0e10cSrcweir |*
201cdf0e10cSrcweir |*	Control zum Editieren von Bitmaps
202cdf0e10cSrcweir |*
203cdf0e10cSrcweir \************************************************************************/
204cdf0e10cSrcweir class SVX_DLLPUBLIC SvxPixelCtl : public Control
205cdf0e10cSrcweir {
206cdf0e10cSrcweir private:
207cdf0e10cSrcweir     using OutputDevice::SetLineColor;
208cdf0e10cSrcweir 
209cdf0e10cSrcweir protected:
210cdf0e10cSrcweir 	sal_uInt16		nLines, nSquares;
211cdf0e10cSrcweir 	Color		aPixelColor;
212cdf0e10cSrcweir 	Color		aBackgroundColor;
213cdf0e10cSrcweir 	Color		aLineColor;
214cdf0e10cSrcweir 	Size		aRectSize;
215cdf0e10cSrcweir 	sal_uInt16* 	pPixel;
216cdf0e10cSrcweir 	sal_Bool		bPaintable;
2179b8096d0SSteve Yin 	//Solution:Add member identifying position
2189b8096d0SSteve Yin 	Point       aFocusPosition;
2199b8096d0SSteve Yin 	Rectangle   implCalFocusRect( const Point& aPosition );
220cdf0e10cSrcweir 	void	ChangePixel( sal_uInt16 nPixel );
221cdf0e10cSrcweir 
222cdf0e10cSrcweir public:
223cdf0e10cSrcweir 			SvxPixelCtl( Window* pParent, const ResId& rResId,
224cdf0e10cSrcweir 						sal_uInt16 nNumber = 8 );
225cdf0e10cSrcweir 			~SvxPixelCtl();
226cdf0e10cSrcweir 
227cdf0e10cSrcweir 	virtual void Paint( const Rectangle& rRect );
228cdf0e10cSrcweir 	virtual void MouseButtonDown( const MouseEvent& rMEvt );
229cdf0e10cSrcweir 
23070d3707aSArmin Le Grand 	void	SetXBitmap( const BitmapEx& rBitmapEx );
231cdf0e10cSrcweir 
SetPixelColor(const Color & rCol)232cdf0e10cSrcweir 	void	SetPixelColor( const Color& rCol ) { aPixelColor = rCol; }
SetBackgroundColor(const Color & rCol)233cdf0e10cSrcweir 	void	SetBackgroundColor( const Color& rCol ) { aBackgroundColor = rCol; }
SetLineColor(const Color & rCol)234cdf0e10cSrcweir 	void	SetLineColor( const Color& rCol ) { aLineColor = rCol; }
235cdf0e10cSrcweir 
GetLineCount() const236cdf0e10cSrcweir 	sal_uInt16	GetLineCount() const { return nLines; }
GetPixelColor() const237cdf0e10cSrcweir 	Color	GetPixelColor() const { return aPixelColor; }
GetBackgroundColor() const238cdf0e10cSrcweir 	Color	GetBackgroundColor() const { return aBackgroundColor; }
239cdf0e10cSrcweir 
240cdf0e10cSrcweir 	sal_uInt16	GetBitmapPixel( const sal_uInt16 nPixelNumber );
GetBitmapPixelPtr()241cdf0e10cSrcweir 	sal_uInt16* GetBitmapPixelPtr() { return pPixel; }
242cdf0e10cSrcweir 
SetPaintable(sal_Bool bTmp)243cdf0e10cSrcweir 	void	SetPaintable( sal_Bool bTmp ) { bPaintable = bTmp; }
244cdf0e10cSrcweir 	void	Reset();
2459b8096d0SSteve Yin 	SvxPixelCtlAccessible*	m_pAccess;
2469b8096d0SSteve Yin 	::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >		m_xAccess;
2479b8096d0SSteve Yin 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
GetSquares() const2489b8096d0SSteve Yin 	long GetSquares() const { return nSquares ; }
GetWidth() const2499b8096d0SSteve Yin 	long GetWidth() const { return aRectSize.getWidth() ; }
GetHeight() const2509b8096d0SSteve Yin 	long GetHeight() const { return aRectSize.getHeight() ; }
2519b8096d0SSteve Yin 
2529b8096d0SSteve Yin 	//Device Pixel .
2539b8096d0SSteve Yin 	long ShowPosition( const Point &pt);
2549b8096d0SSteve Yin 
2559b8096d0SSteve Yin 	long PointToIndex(const Point &pt) const;
2569b8096d0SSteve Yin 	Point IndexToPoint(long nIndex) const ;
2579b8096d0SSteve Yin 	long GetFoucsPosIndex() const ;
2589b8096d0SSteve Yin 	//Solution:Keyboard fucntion for key input and focus handling function
2599b8096d0SSteve Yin 	virtual void        KeyInput( const KeyEvent& rKEvt );
2609b8096d0SSteve Yin 	virtual void        GetFocus();
2619b8096d0SSteve Yin     virtual void        LoseFocus();
262cdf0e10cSrcweir };
263cdf0e10cSrcweir 
264cdf0e10cSrcweir /*************************************************************************
265cdf0e10cSrcweir |*
266cdf0e10cSrcweir |* ColorLB kann mit Farben und Namen gefuellt werden
267cdf0e10cSrcweir |*
268cdf0e10cSrcweir \************************************************************************/
269c7be74b1SArmin Le Grand 
270c7be74b1SArmin Le Grand class XColorList;
271c7be74b1SArmin Le Grand typedef ::boost::shared_ptr< XColorList > XColorListSharedPtr;
272c7be74b1SArmin Le Grand 
273cdf0e10cSrcweir class SVX_DLLPUBLIC ColorLB : public ColorListBox
274cdf0e10cSrcweir {
275cdf0e10cSrcweir 
276cdf0e10cSrcweir public:
ColorLB(Window * pParent,ResId Id)277cdf0e10cSrcweir 		 ColorLB( Window* pParent, ResId Id ) : ColorListBox( pParent, Id ) {}
ColorLB(Window * pParent,WinBits aWB)278cdf0e10cSrcweir 		 ColorLB( Window* pParent, WinBits aWB ) : ColorListBox( pParent, aWB ) {}
279cdf0e10cSrcweir 
280c7be74b1SArmin Le Grand 	virtual void Fill( const XColorListSharedPtr aTab );
281cdf0e10cSrcweir 
2823e407bd8SArmin Le Grand 	void Append( const XColorEntry& rEntry );
2833e407bd8SArmin Le Grand 	void Modify( const XColorEntry& rEntry, sal_uInt16 nPos );
284cdf0e10cSrcweir };
285cdf0e10cSrcweir 
286cdf0e10cSrcweir /*************************************************************************
287cdf0e10cSrcweir |*
288cdf0e10cSrcweir |* HatchingLB
289cdf0e10cSrcweir |*
290cdf0e10cSrcweir \************************************************************************/
291c7be74b1SArmin Le Grand 
292c7be74b1SArmin Le Grand class XHatchList;
293c7be74b1SArmin Le Grand typedef ::boost::shared_ptr< XHatchList > XHatchListSharedPtr;
294c7be74b1SArmin Le Grand 
295cdf0e10cSrcweir class SVX_DLLPUBLIC HatchingLB : public ListBox
296cdf0e10cSrcweir {
297cdf0e10cSrcweir public:
298a68b38dfSArmin Le Grand 	 explicit HatchingLB( Window* pParent, ResId Id);
299a68b38dfSArmin Le Grand 	 explicit HatchingLB( Window* pParent, WinBits aWB);
300cdf0e10cSrcweir 
301c7be74b1SArmin Le Grand 	virtual void Fill( const XHatchListSharedPtr aList );
302cdf0e10cSrcweir 
3033e407bd8SArmin Le Grand 	void	Append( const XHatchEntry& rEntry, const Bitmap& rBitmap );
3043e407bd8SArmin Le Grand 	void	Modify( const XHatchEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
305c7be74b1SArmin Le Grand 	void	SelectEntryByList( const XHatchListSharedPtr aList, const String& rStr, const XHatch& rXHatch, sal_uInt16 nDist = 0 );
306cdf0e10cSrcweir };
307cdf0e10cSrcweir 
308cdf0e10cSrcweir /*************************************************************************
309cdf0e10cSrcweir |*
310cdf0e10cSrcweir |* GradientLB
311cdf0e10cSrcweir |*
312cdf0e10cSrcweir \************************************************************************/
313c7be74b1SArmin Le Grand 
314c7be74b1SArmin Le Grand class XGradientList;
315c7be74b1SArmin Le Grand typedef ::boost::shared_ptr< XGradientList > XGradientListSharedPtr;
316c7be74b1SArmin Le Grand 
317cdf0e10cSrcweir class SVX_DLLPUBLIC GradientLB : public ListBox
318cdf0e10cSrcweir {
319cdf0e10cSrcweir public:
320a68b38dfSArmin Le Grand 	explicit GradientLB( Window* pParent, ResId Id);
321a68b38dfSArmin Le Grand 	explicit GradientLB( Window* pParent, WinBits aWB);
322cdf0e10cSrcweir 
323c7be74b1SArmin Le Grand 	virtual void Fill( const XGradientListSharedPtr aList );
324cdf0e10cSrcweir 
3253e407bd8SArmin Le Grand 	void	Append( const XGradientEntry& rEntry, const Bitmap& rBitmap );
3263e407bd8SArmin Le Grand 	void	Modify( const XGradientEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
327c7be74b1SArmin Le Grand 	void	SelectEntryByList( const XGradientListSharedPtr aList, const String& rStr, const XGradient& rXGradient, sal_uInt16 nDist = 0 );
328cdf0e10cSrcweir 
329cdf0e10cSrcweir private:
330c7be74b1SArmin Le Grand 	XGradientListSharedPtr maList;
331cdf0e10cSrcweir };
332cdf0e10cSrcweir 
333cdf0e10cSrcweir /*************************************************************************
334cdf0e10cSrcweir |*
335cdf0e10cSrcweir |* BitmapLB
336cdf0e10cSrcweir |*
337cdf0e10cSrcweir \************************************************************************/
338c7be74b1SArmin Le Grand 
339c7be74b1SArmin Le Grand class XBitmapList;
340c7be74b1SArmin Le Grand typedef ::boost::shared_ptr< XBitmapList > XBitmapListSharedPtr;
341c7be74b1SArmin Le Grand 
342cdf0e10cSrcweir class SVX_DLLPUBLIC BitmapLB : public ListBox
343cdf0e10cSrcweir {
344cdf0e10cSrcweir public:
345a68b38dfSArmin Le Grand     explicit BitmapLB(Window* pParent, ResId Id);
346cdf0e10cSrcweir 
347c7be74b1SArmin Le Grand 	virtual void Fill(const XBitmapListSharedPtr aList);
348cdf0e10cSrcweir 
3493e407bd8SArmin Le Grand 	void Append(const Size& rSize, const XBitmapEntry& rEntry);
3503e407bd8SArmin Le Grand 	void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos);
351c7be74b1SArmin Le Grand 	void SelectEntryByList(const XBitmapListSharedPtr aList, const String& rStr);
352cdf0e10cSrcweir 
353cdf0e10cSrcweir private:
35470d3707aSArmin Le Grand 	BitmapEx        maBitmapEx;
355cdf0e10cSrcweir };
356cdf0e10cSrcweir 
357cdf0e10cSrcweir /*************************************************************************
358cdf0e10cSrcweir |*
359cdf0e10cSrcweir |* FillAttrLB vereint alle Fuellattribute in einer ListBox
360cdf0e10cSrcweir |*
361cdf0e10cSrcweir \************************************************************************/
362cdf0e10cSrcweir class FillAttrLB : public ColorListBox
363cdf0e10cSrcweir {
364cdf0e10cSrcweir private:
36570d3707aSArmin Le Grand 	BitmapEx		maBitmapEx;
366cdf0e10cSrcweir 
367cdf0e10cSrcweir public:
36870d3707aSArmin Le Grand     FillAttrLB( Window* pParent, ResId Id );
36970d3707aSArmin Le Grand     FillAttrLB( Window* pParent, WinBits aWB );
370cdf0e10cSrcweir 
371c7be74b1SArmin Le Grand 	virtual void Fill( const XColorListSharedPtr aTab );
372c7be74b1SArmin Le Grand 	virtual void Fill( const XHatchListSharedPtr aList );
373c7be74b1SArmin Le Grand 	virtual void Fill( const XGradientListSharedPtr aList );
374c7be74b1SArmin Le Grand 	virtual void Fill( const XBitmapListSharedPtr aList );
375cdf0e10cSrcweir 
376c7be74b1SArmin Le Grand 	void SelectEntryByList(const XBitmapListSharedPtr aList, const String& rStr);
377cdf0e10cSrcweir };
378cdf0e10cSrcweir 
379cdf0e10cSrcweir /*************************************************************************
380cdf0e10cSrcweir |*
381cdf0e10cSrcweir |* FillTypeLB
382cdf0e10cSrcweir |*
383cdf0e10cSrcweir \************************************************************************/
384cdf0e10cSrcweir class FillTypeLB : public ListBox
385cdf0e10cSrcweir {
386cdf0e10cSrcweir 
387cdf0e10cSrcweir public:
FillTypeLB(Window * pParent,ResId Id)388cdf0e10cSrcweir 		 FillTypeLB( Window* pParent, ResId Id ) : ListBox( pParent, Id ) {}
FillTypeLB(Window * pParent,WinBits aWB)389cdf0e10cSrcweir 		 FillTypeLB( Window* pParent, WinBits aWB ) : ListBox( pParent, aWB ) {}
390cdf0e10cSrcweir 
391cdf0e10cSrcweir 	virtual void Fill();
392cdf0e10cSrcweir };
393cdf0e10cSrcweir 
394cdf0e10cSrcweir /*************************************************************************
395cdf0e10cSrcweir |*
396cdf0e10cSrcweir |* LineLB
397cdf0e10cSrcweir |*
398cdf0e10cSrcweir \************************************************************************/
399c7be74b1SArmin Le Grand 
400c7be74b1SArmin Le Grand class XDashList;
401c7be74b1SArmin Le Grand typedef ::boost::shared_ptr< XDashList > XDashListSharedPtr;
402c7be74b1SArmin Le Grand 
403cdf0e10cSrcweir class SVX_DLLPUBLIC LineLB : public ListBox
404cdf0e10cSrcweir {
405ed6b2054SArmin Le Grand private:
406ed6b2054SArmin Le Grand     /// bitfield
407ed6b2054SArmin Le Grand     /// defines if standard fields (none, solid) are added, default is true
408ed6b2054SArmin Le Grand     bool        mbAddStandardFields : 1;
409cdf0e10cSrcweir 
410cdf0e10cSrcweir public:
411ed6b2054SArmin Le Grand     LineLB(Window* pParent, ResId Id);
412ed6b2054SArmin Le Grand     LineLB(Window* pParent, WinBits aWB);
413ed6b2054SArmin Le Grand     virtual ~LineLB();
414ed6b2054SArmin Le Grand 
415c7be74b1SArmin Le Grand     virtual void Fill(const XDashListSharedPtr aList);
416cdf0e10cSrcweir 
getAddStandardFields() const417ed6b2054SArmin Le Grand     bool getAddStandardFields() const { return mbAddStandardFields; }
418ed6b2054SArmin Le Grand     void setAddStandardFields(bool bNew);
419cdf0e10cSrcweir 
4203e407bd8SArmin Le Grand     void Append(const XDashEntry& rEntry, const Bitmap& rBitmap );
4213e407bd8SArmin Le Grand     void Modify(const XDashEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
422c7be74b1SArmin Le Grand     void SelectEntryByList(const XDashListSharedPtr aList, const String& rStr, const XDash& rDash, sal_uInt16 nDist = 0);
423cdf0e10cSrcweir };
424cdf0e10cSrcweir 
425cdf0e10cSrcweir /*************************************************************************
426cdf0e10cSrcweir |*
427cdf0e10cSrcweir |* LineEndsLB
428cdf0e10cSrcweir |*
429cdf0e10cSrcweir \************************************************************************/
430c7be74b1SArmin Le Grand 
431c7be74b1SArmin Le Grand class XLineEndList;
432c7be74b1SArmin Le Grand typedef ::boost::shared_ptr< XLineEndList > XLineEndListSharedPtr;
433c7be74b1SArmin Le Grand 
434cdf0e10cSrcweir class SVX_DLLPUBLIC LineEndLB : public ListBox
435cdf0e10cSrcweir {
436cdf0e10cSrcweir 
437cdf0e10cSrcweir public:
438fb2c9d94SAndre Fischer                           LineEndLB( Window* pParent, ResId Id );
439fb2c9d94SAndre Fischer                           LineEndLB( Window* pParent, WinBits aWB );
440fb2c9d94SAndre Fischer                  virtual ~LineEndLB (void);
441fb2c9d94SAndre Fischer 
4423e407bd8SArmin Le Grand 	virtual void Fill( const XLineEndListSharedPtr aList, bool bStart = true );
443cdf0e10cSrcweir 
4443e407bd8SArmin Le Grand 	void	Append( const XLineEndEntry& rEntry, const Bitmap& rBitmap, bool bStart = true );
4453e407bd8SArmin Le Grand 	void	Modify( const XLineEndEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap, bool bStart = true );
446cdf0e10cSrcweir };
447cdf0e10cSrcweir 
448cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
449cdf0e10cSrcweir 
450cdf0e10cSrcweir class SdrObject;
451cdf0e10cSrcweir class SdrModel;
452cdf0e10cSrcweir 
453cdf0e10cSrcweir class SvxPreviewBase : public Control
454cdf0e10cSrcweir {
455cdf0e10cSrcweir private:
456cdf0e10cSrcweir 	SdrModel*										mpModel;
457cdf0e10cSrcweir     VirtualDevice*                                  mpBufferDevice;
458cdf0e10cSrcweir 
459cdf0e10cSrcweir protected:
460cdf0e10cSrcweir 	void InitSettings(bool bForeground, bool bBackground);
461cdf0e10cSrcweir 
462cdf0e10cSrcweir     // prepare buffered paint
463cdf0e10cSrcweir     void LocalPrePaint();
464cdf0e10cSrcweir 
465cdf0e10cSrcweir     // end and output buffered paint
466cdf0e10cSrcweir     void LocalPostPaint();
467cdf0e10cSrcweir 
468cdf0e10cSrcweir public:
469cdf0e10cSrcweir 	SvxPreviewBase( Window* pParent, const ResId& rResId );
470cdf0e10cSrcweir 	virtual ~SvxPreviewBase();
471cdf0e10cSrcweir 
472cdf0e10cSrcweir     // change support
473cdf0e10cSrcweir 	virtual void StateChanged(StateChangedType nStateChange);
474cdf0e10cSrcweir 	virtual void DataChanged(const DataChangedEvent& rDCEvt);
475cdf0e10cSrcweir 
476cdf0e10cSrcweir     // dada read access
getModel() const477cdf0e10cSrcweir     SdrModel& getModel() const { return *mpModel; }
getBufferDevice() const478cdf0e10cSrcweir     OutputDevice& getBufferDevice() const { return *mpBufferDevice; }
479cdf0e10cSrcweir };
480cdf0e10cSrcweir 
481cdf0e10cSrcweir /*************************************************************************
482cdf0e10cSrcweir |*
483cdf0e10cSrcweir |* SvxLinePreview
484cdf0e10cSrcweir |*
485cdf0e10cSrcweir \************************************************************************/
486cdf0e10cSrcweir 
487cdf0e10cSrcweir class SVX_DLLPUBLIC SvxXLinePreview : public SvxPreviewBase
488cdf0e10cSrcweir {
489cdf0e10cSrcweir private:
490cdf0e10cSrcweir 	SdrObject*										mpLineObjA;
491cdf0e10cSrcweir 	SdrObject*										mpLineObjB;
492cdf0e10cSrcweir 	SdrObject*										mpLineObjC;
493cdf0e10cSrcweir 
494cdf0e10cSrcweir 	//#58425# Symbole auf einer Linie (z.B. StarChart)
495cdf0e10cSrcweir 	Graphic*										mpGraphic;
496cdf0e10cSrcweir 	sal_Bool										mbWithSymbol;
497cdf0e10cSrcweir 	Size											maSymbolSize;
498cdf0e10cSrcweir 
499cdf0e10cSrcweir public:
500cdf0e10cSrcweir 	SvxXLinePreview( Window* pParent, const ResId& rResId );
501cdf0e10cSrcweir 	virtual ~SvxXLinePreview();
502cdf0e10cSrcweir 
503cdf0e10cSrcweir 	void SetLineAttributes(const SfxItemSet& rItemSet);
504cdf0e10cSrcweir 
ShowSymbol(sal_Bool b)505cdf0e10cSrcweir 	void ShowSymbol( sal_Bool b ) { mbWithSymbol = b; };
506cdf0e10cSrcweir 	void SetSymbol( Graphic* p, const Size& s );
507cdf0e10cSrcweir 	void ResizeSymbol( const Size& s );
508cdf0e10cSrcweir 
509cdf0e10cSrcweir 	virtual void Paint( const Rectangle& rRect );
510cdf0e10cSrcweir };
511cdf0e10cSrcweir 
512cdf0e10cSrcweir /*************************************************************************
513cdf0e10cSrcweir |*
514cdf0e10cSrcweir |* SvxXRectPreview
515cdf0e10cSrcweir |*
516cdf0e10cSrcweir \************************************************************************/
517cdf0e10cSrcweir 
518cdf0e10cSrcweir class SVX_DLLPUBLIC SvxXRectPreview : public SvxPreviewBase
519cdf0e10cSrcweir {
520cdf0e10cSrcweir private:
521cdf0e10cSrcweir 	SdrObject*										mpRectangleObject;
522cdf0e10cSrcweir 
523cdf0e10cSrcweir public:
524cdf0e10cSrcweir 	SvxXRectPreview( Window* pParent, const ResId& rResId );
525cdf0e10cSrcweir 	virtual ~SvxXRectPreview();
526cdf0e10cSrcweir 
527cdf0e10cSrcweir 	void SetAttributes(const SfxItemSet& rItemSet);
528cdf0e10cSrcweir 
529cdf0e10cSrcweir 	virtual void	Paint( const Rectangle& rRect );
530cdf0e10cSrcweir };
531cdf0e10cSrcweir 
532cdf0e10cSrcweir /*************************************************************************
533cdf0e10cSrcweir |*
534cdf0e10cSrcweir |* SvxXShadowPreview
535cdf0e10cSrcweir |*
536cdf0e10cSrcweir \************************************************************************/
537cdf0e10cSrcweir 
538cdf0e10cSrcweir class SVX_DLLPUBLIC SvxXShadowPreview : public SvxPreviewBase
539cdf0e10cSrcweir {
540cdf0e10cSrcweir private:
541cdf0e10cSrcweir 	SdrObject*										mpRectangleObject;
542cdf0e10cSrcweir 	SdrObject*										mpRectangleShadow;
543cdf0e10cSrcweir 
544cdf0e10cSrcweir public:
545cdf0e10cSrcweir 	SvxXShadowPreview( Window* pParent, const ResId& rResId );
546cdf0e10cSrcweir 	virtual ~SvxXShadowPreview();
547cdf0e10cSrcweir 
548cdf0e10cSrcweir 	void SetRectangleAttributes(const SfxItemSet& rItemSet);
549cdf0e10cSrcweir 	void SetShadowAttributes(const SfxItemSet& rItemSet);
550cdf0e10cSrcweir 	void SetShadowPosition(const Point& rPos);
551cdf0e10cSrcweir 
552cdf0e10cSrcweir 	virtual void	Paint( const Rectangle& rRect );
553cdf0e10cSrcweir };
554cdf0e10cSrcweir 
555cdf0e10cSrcweir #endif // _SVX_DLG_CTRL_HXX
556cdf0e10cSrcweir 
557