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 : tools::PolyPolygon aUpdatePolyPoly;
38 : Timer aUpdateTimer;
39 : Timer aCreateTimer;
40 : Size aLastSize;
41 : void* pUpdateEditingObject;
42 : void* pCheckObj;
43 : SvxContourDlgItem aContourItem;
44 : ToolBox* m_pTbx1;
45 : MetricField* m_pMtfTolerance;
46 : ContourWindow* m_pContourWnd;
47 : StatusBar* m_pStbStatus;
48 : sal_uIntPtr nGrfChanged;
49 : bool bExecState;
50 : bool bUpdateGraphicLinked;
51 : bool bGraphicLinked;
52 :
53 : sal_uInt16 mnApplyId;
54 : sal_uInt16 mnWorkSpaceId;
55 : sal_uInt16 mnSelectId;
56 : sal_uInt16 mnRectId;
57 : sal_uInt16 mnCircleId;
58 : sal_uInt16 mnPolyId;
59 : sal_uInt16 mnPolyEditId;
60 : sal_uInt16 mnPolyMoveId;
61 : sal_uInt16 mnPolyInsertId;
62 : sal_uInt16 mnPolyDeleteId;
63 : sal_uInt16 mnAutoContourId;
64 : sal_uInt16 mnUndoId;
65 : sal_uInt16 mnRedoId;
66 : sal_uInt16 mnPipetteId;
67 :
68 : virtual bool Close() SAL_OVERRIDE;
69 :
70 : DECL_LINK( Tbx1ClickHdl, ToolBox* );
71 : DECL_LINK( MousePosHdl, ContourWindow* );
72 : DECL_LINK( GraphSizeHdl, ContourWindow* );
73 : DECL_LINK(UpdateHdl, void *);
74 : DECL_LINK(CreateHdl, void *);
75 : DECL_LINK( StateHdl, ContourWindow* );
76 : DECL_LINK( PipetteHdl, ContourWindow* );
77 : DECL_LINK( PipetteClickHdl, ContourWindow* );
78 : DECL_LINK( WorkplaceClickHdl, ContourWindow* );
79 : DECL_LINK( MiscHdl, void* );
80 :
81 : public:
82 :
83 : SvxSuperContourDlg(SfxBindings *pBindings, SfxChildWindow *pCW,
84 : vcl::Window* pParent);
85 : virtual ~SvxSuperContourDlg();
86 :
87 : void SetExecState( bool bEnable );
88 :
89 : void SetGraphic( const Graphic& rGraphic );
90 : void SetGraphicLinked( bool bLinked ) { bGraphicLinked = bLinked; }
91 0 : const Graphic& GetGraphic() const { return aGraphic; }
92 0 : bool IsGraphicChanged() const { return nGrfChanged > 0UL; }
93 :
94 : void SetPolyPolygon( const tools::PolyPolygon& rPolyPoly );
95 : tools::PolyPolygon GetPolyPolygon( bool bRescaleToGraphic = true );
96 :
97 0 : void SetEditingObject( void* pObj ) { pCheckObj = pObj; }
98 0 : const void* GetEditingObject() const { return pCheckObj; }
99 :
100 : bool IsUndoPossible() const;
101 : bool IsRedoPossible() const;
102 :
103 : void UpdateGraphic( const Graphic& rGraphic, bool bGraphicLinked,
104 : const tools::PolyPolygon* pPolyPoly = NULL,
105 : void* pEditingObj = NULL );
106 : };
107 :
108 :
109 : #endif // INCLUDED_SVX_SOURCE_DIALOG_CONTIMP_HXX
110 :
111 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|