Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef INCLUDED_SVX_SOURCE_DIALOG_CONTIMP_HXX
20 : #define INCLUDED_SVX_SOURCE_DIALOG_CONTIMP_HXX
21 :
22 : #include <svx/contdlg.hxx>
23 : #include "contwnd.hxx"
24 : #include <vcl/toolbox.hxx>
25 : #include <vcl/status.hxx>
26 :
27 : #define CONT_RESID(nId) ResId( nId, DIALOG_MGR() )
28 :
29 : class SvxSuperContourDlg : public SvxContourDlg
30 : {
31 : using SvxContourDlg::GetPolyPolygon;
32 :
33 : Graphic aGraphic;
34 : Graphic aUndoGraphic;
35 : Graphic aRedoGraphic;
36 : Graphic aUpdateGraphic;
37 : PolyPolygon aUpdatePolyPoly;
38 : Timer aUpdateTimer;
39 : Timer aCreateTimer;
40 : Size aLastSize;
41 : void* pUpdateEditingObject;
42 : void* pCheckObj;
43 : SvxContourDlgItem aContourItem;
44 : ToolBox aTbx1;
45 : MetricField aMtfTolerance;
46 : ContourWindow aContourWnd;
47 : StatusBar aStbStatus;
48 : sal_uIntPtr nGrfChanged;
49 : sal_Bool bExecState;
50 : sal_Bool bUpdateGraphicLinked;
51 : sal_Bool bGraphicLinked;
52 : ImageList maImageList;
53 :
54 : virtual void Resize() SAL_OVERRIDE;
55 : virtual bool Close() SAL_OVERRIDE;
56 :
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* );
67 :
68 : public:
69 :
70 : SvxSuperContourDlg( SfxBindings *pBindings, SfxChildWindow *pCW,
71 : Window* pParent, const ResId& rResId );
72 : virtual ~SvxSuperContourDlg();
73 :
74 : void SetExecState( sal_Bool bEnable );
75 :
76 : void SetGraphic( const Graphic& rGraphic );
77 : void SetGraphicLinked( sal_Bool bLinked ) { bGraphicLinked = bLinked; }
78 0 : const Graphic& GetGraphic() const { return aGraphic; }
79 0 : sal_Bool IsGraphicChanged() const { return nGrfChanged > 0UL; }
80 :
81 : void SetPolyPolygon( const PolyPolygon& rPolyPoly );
82 : PolyPolygon GetPolyPolygon( bool bRescaleToGraphic = true );
83 :
84 0 : void SetEditingObject( void* pObj ) { pCheckObj = pObj; }
85 0 : const void* GetEditingObject() const { return pCheckObj; }
86 :
87 : bool IsUndoPossible() const;
88 : bool IsRedoPossible() const;
89 :
90 : void UpdateGraphic( const Graphic& rGraphic, sal_Bool bGraphicLinked,
91 : const PolyPolygon* pPolyPoly = NULL,
92 : void* pEditingObj = NULL );
93 :
94 : /** switches the toolbox images depending on the actuall high contrast display mode state */
95 : void ApplyImageList();
96 :
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;
100 :
101 : };
102 :
103 :
104 : #endif // INCLUDED_SVX_SOURCE_DIALOG_CONTIMP_HXX
105 :
106 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|