1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: contimp.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
34 #include <svx/contdlg.hxx>
36 #include "contwnd.hxx"
37 #include <vcl/toolbox.hxx>
38 #include <vcl/status.hxx>
40 #define CONT_RESID(nId) ResId( nId, DIALOG_MGR() )
42 /*************************************************************************
46 \************************************************************************/
48 class SvxSuperContourDlg
: public SvxContourDlg
50 using SvxContourDlg::GetPolyPolygon
;
55 Graphic aUpdateGraphic
;
56 PolyPolygon aUpdatePolyPoly
;
60 void* pUpdateEditingObject
;
62 SvxContourDlgItem aContourItem
;
64 MetricField aMtfTolerance
;
65 ContourWindow aContourWnd
;
71 BOOL bUpdateGraphicLinked
;
73 ImageList maImageList
;
74 ImageList maImageListH
;
76 virtual void Resize();
80 void ReducePoints( const long nTol
= 8 );
82 DECL_LINK( Tbx1ClickHdl
, ToolBox
* );
83 DECL_LINK( MousePosHdl
, ContourWindow
* );
84 DECL_LINK( GraphSizeHdl
, ContourWindow
* );
85 DECL_LINK( UpdateHdl
, Timer
* );
86 DECL_LINK( CreateHdl
, Timer
* );
87 DECL_LINK( StateHdl
, ContourWindow
* );
88 DECL_LINK( PipetteHdl
, ContourWindow
* );
89 DECL_LINK( PipetteClickHdl
, ContourWindow
* );
90 DECL_LINK( WorkplaceClickHdl
, ContourWindow
* );
91 DECL_LINK( MiscHdl
, void* );
95 SvxSuperContourDlg( SfxBindings
*pBindings
, SfxChildWindow
*pCW
,
96 Window
* pParent
, const ResId
& rResId
);
97 ~SvxSuperContourDlg();
99 void SetExecState( BOOL bEnable
);
101 void SetGraphic( const Graphic
& rGraphic
);
102 void SetGraphicLinked( BOOL bLinked
) { bGraphicLinked
= bLinked
; }
103 const Graphic
& GetGraphic() const { return aGraphic
; }
104 BOOL
IsGraphicChanged() const { return nGrfChanged
> 0UL; }
106 void SetPolyPolygon( const PolyPolygon
& rPolyPoly
);
107 PolyPolygon
GetPolyPolygon( BOOL bRescaleToGraphic
= TRUE
);
109 void SetEditingObject( void* pObj
) { pCheckObj
= pObj
; }
110 const void* GetEditingObject() const { return pCheckObj
; }
112 BOOL
IsUndoPossible() const;
113 BOOL
IsRedoPossible() const;
115 void UpdateGraphic( const Graphic
& rGraphic
, BOOL bGraphicLinked
,
116 const PolyPolygon
* pPolyPoly
= NULL
,
117 void* pEditingObj
= NULL
);
119 /** switches the toolbox images depending on the actuall high contrast display mode state */
120 void ApplyImageList();
122 /** virtual method from Window is used to detect change in high contrast display mode
123 to switch the toolbox images */
124 virtual void DataChanged( const DataChangedEvent
& rDCEvt
);
129 #endif // _CONTIMP_HXX_