1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SVX_SOURCE_DIALOG_CONTIMP_HXX
20 #define INCLUDED_SVX_SOURCE_DIALOG_CONTIMP_HXX
22 #include <svx/contdlg.hxx>
23 #include "contwnd.hxx"
24 #include <vcl/toolbox.hxx>
25 #include <vcl/status.hxx>
27 #define CONT_RESID(nId) ResId( nId, DIALOG_MGR() )
29 class SvxSuperContourDlg
: public SvxContourDlg
31 using SvxContourDlg::GetPolyPolygon
;
36 Graphic aUpdateGraphic
;
37 PolyPolygon aUpdatePolyPoly
;
41 void* pUpdateEditingObject
;
43 SvxContourDlgItem aContourItem
;
45 MetricField aMtfTolerance
;
46 ContourWindow aContourWnd
;
48 sal_uIntPtr nGrfChanged
;
50 bool bUpdateGraphicLinked
;
52 ImageList maImageList
;
54 virtual void Resize() SAL_OVERRIDE
;
55 virtual bool Close() SAL_OVERRIDE
;
57 DECL_LINK( Tbx1ClickHdl
, ToolBox
* );
58 DECL_LINK( MousePosHdl
, ContourWindow
* );
59 DECL_LINK( GraphSizeHdl
, ContourWindow
* );
60 DECL_LINK(UpdateHdl
, void *);
61 DECL_LINK(CreateHdl
, void *);
62 DECL_LINK( StateHdl
, ContourWindow
* );
63 DECL_LINK( PipetteHdl
, ContourWindow
* );
64 DECL_LINK( PipetteClickHdl
, ContourWindow
* );
65 DECL_LINK( WorkplaceClickHdl
, ContourWindow
* );
66 DECL_LINK( MiscHdl
, void* );
70 SvxSuperContourDlg( SfxBindings
*pBindings
, SfxChildWindow
*pCW
,
71 Window
* pParent
, const ResId
& rResId
);
72 virtual ~SvxSuperContourDlg();
74 void SetExecState( bool bEnable
);
76 void SetGraphic( const Graphic
& rGraphic
);
77 void SetGraphicLinked( bool bLinked
) { bGraphicLinked
= bLinked
; }
78 const Graphic
& GetGraphic() const { return aGraphic
; }
79 bool IsGraphicChanged() const { return nGrfChanged
> 0UL; }
81 void SetPolyPolygon( const PolyPolygon
& rPolyPoly
);
82 PolyPolygon
GetPolyPolygon( bool bRescaleToGraphic
= true );
84 void SetEditingObject( void* pObj
) { pCheckObj
= pObj
; }
85 const void* GetEditingObject() const { return pCheckObj
; }
87 bool IsUndoPossible() const;
88 bool IsRedoPossible() const;
90 void UpdateGraphic( const Graphic
& rGraphic
, bool bGraphicLinked
,
91 const PolyPolygon
* pPolyPoly
= NULL
,
92 void* pEditingObj
= NULL
);
94 /** switches the toolbox images depending on the actuall high contrast display mode state */
95 void ApplyImageList();
97 /** virtual method from Window is used to detect change in high contrast display mode
98 to switch the toolbox images */
99 virtual void DataChanged( const DataChangedEvent
& rDCEvt
) SAL_OVERRIDE
;
104 #endif // INCLUDED_SVX_SOURCE_DIALOG_CONTIMP_HXX
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */