merge the formfield patch from ooo-build
[ooovba.git] / svx / source / dialog / contwnd.hxx
blob29ebe78618f212fe7693e8fd7062df08b552f433
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: contwnd.hxx,v $
10 * $Revision: 1.5 $
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 ************************************************************************/
31 #ifndef _CONTWND_HXX
32 #define _CONTWND_HXX
34 #include <tools/poly.hxx>
35 #include <svx/graphctl.hxx>
37 /*************************************************************************
41 \************************************************************************/
43 class ContourWindow : public GraphCtrl
45 PolyPolygon aPolyPoly;
46 Color aPipetteColor;
47 Rectangle aWorkRect;
48 Link aPipetteLink;
49 Link aPipetteClickLink;
50 Link aWorkplaceClickLink;
51 BOOL bPipetteMode;
52 BOOL bWorkplaceMode;
53 BOOL bClickValid;
55 protected:
57 virtual void MouseButtonDown(const MouseEvent& rMEvt);
58 virtual void MouseMove(const MouseEvent& rMEvt);
59 virtual void MouseButtonUp(const MouseEvent& rMEvt);
60 virtual void SdrObjCreated( const SdrObject& rObj );
61 virtual void InitSdrModel();
62 virtual void Paint( const Rectangle& rRect );
64 void CreatePolyPolygon();
66 public:
68 ContourWindow( Window* pParent, const ResId& rResId );
69 ~ContourWindow();
71 void SetPolyPolygon( const PolyPolygon& rPolyPoly );
72 const PolyPolygon& GetPolyPolygon();
74 void SetPipetteMode( const BOOL bPipette ) { bPipetteMode = bPipette; }
75 BOOL IsPipetteMode() const { return bPipetteMode; }
76 const Color& GetPipetteColor() const { return aPipetteColor; }
78 BOOL IsClickValid() const { return bClickValid; }
79 BOOL IsContourChanged() const;
81 void SetWorkplaceMode( const BOOL bWorkplace ) { bWorkplaceMode = bWorkplace; }
82 BOOL IsWorkplaceMode() const { return bWorkplaceMode; }
83 const Rectangle& GetWorkRect() const { return aWorkRect; }
85 void SetPipetteHdl( const Link& rLink ) { aPipetteLink = rLink; }
86 void SetPipetteClickHdl( const Link& rLink ) { aPipetteClickLink = rLink; }
88 void SetWorkplaceClickHdl( const Link& rLink ) { aWorkplaceClickLink = rLink; }
92 #endif