update dev300-m58
[ooovba.git] / svx / source / dialog / contimp.hxx
blobdd88d823b51ed01cb083d64c068bb3a503eb8659
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: contimp.hxx,v $
10 * $Revision: 1.7 $
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 ************************************************************************/
30 #ifndef _CONTIMP_HXX_
31 #define _CONTIMP_HXX_
33 #ifndef _CONTDLG_HXX
34 #include <svx/contdlg.hxx>
35 #endif
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;
52 Graphic aGraphic;
53 Graphic aUndoGraphic;
54 Graphic aRedoGraphic;
55 Graphic aUpdateGraphic;
56 PolyPolygon aUpdatePolyPoly;
57 Timer aUpdateTimer;
58 Timer aCreateTimer;
59 Size aLastSize;
60 void* pUpdateEditingObject;
61 void* pCheckObj;
62 SvxContourDlgItem aContourItem;
63 ToolBox aTbx1;
64 MetricField aMtfTolerance;
65 ContourWindow aContourWnd;
66 StatusBar aStbStatus;
67 ULONG nGrfChanged;
68 BOOL bExecState;
69 BOOL bPipetteMode;
70 BOOL bWorkplaceMode;
71 BOOL bUpdateGraphicLinked;
72 BOOL bGraphicLinked;
73 ImageList maImageList;
74 ImageList maImageListH;
76 virtual void Resize();
77 virtual BOOL Close();
79 void DoAutoCreate();
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* );
93 public:
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_