LibreOffice Module svx (master) 1
contwnd.hxx
Go to the documentation of this file.
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
20#ifndef INCLUDED_SVX_SOURCE_DIALOG_CONTWND_HXX
21#define INCLUDED_SVX_SOURCE_DIALOG_CONTWND_HXX
22
23#include <tools/poly.hxx>
24#include <svx/graphctl.hxx>
25
26class ContourWindow final : public GraphCtrl
27{
37
38 virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
39 virtual bool MouseMove(const MouseEvent& rMEvt) override;
40 virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
41 virtual void SdrObjCreated( const SdrObject& rObj ) override;
42 virtual void InitSdrModel() override;
43 virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
44 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
45
46public:
47
49
50 void SetPolyPolygon( const tools::PolyPolygon& rPolyPoly );
52
53 void SetPipetteMode( const bool bPipette ) { bPipetteMode = bPipette; }
54 const Color& GetPipetteColor() const { return aPipetteColor; }
55
56 bool IsClickValid() const { return bClickValid; }
57 bool IsContourChanged() const;
58
59 void SetWorkplaceMode( const bool bWorkplace ) { bWorkplaceMode = bWorkplace; }
60 const tools::Rectangle& GetWorkRect() const { return aWorkRect; }
61
62 void SetPipetteHdl( const Link<ContourWindow&,void>& rLink ) { aPipetteLink = rLink; }
65};
66
67
68#endif
69
70/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool bClickValid
Definition: contwnd.hxx:36
const Color & GetPipetteColor() const
Definition: contwnd.hxx:54
void SetWorkplaceClickHdl(const Link< ContourWindow &, void > &rLink)
Definition: contwnd.hxx:64
bool IsClickValid() const
Definition: contwnd.hxx:56
tools::PolyPolygon aPolyPoly
Definition: contwnd.hxx:28
void SetPipetteHdl(const Link< ContourWindow &, void > &rLink)
Definition: contwnd.hxx:62
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: contwnd.cxx:139
const tools::Rectangle & GetWorkRect() const
Definition: contwnd.hxx:60
bool IsContourChanged() const
Definition: contwnd.cxx:128
void SetPolyPolygon(const tools::PolyPolygon &rPolyPoly)
Definition: contwnd.cxx:43
const tools::PolyPolygon & GetPolyPolygon()
Definition: contwnd.cxx:87
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: contwnd.cxx:262
Link< ContourWindow &, void > aPipetteClickLink
Definition: contwnd.hxx:32
virtual bool MouseMove(const MouseEvent &rMEvt) override
Definition: contwnd.cxx:157
virtual void SdrObjCreated(const SdrObject &rObj) override
Definition: contwnd.cxx:122
virtual void InitSdrModel() override
Definition: contwnd.cxx:110
Link< ContourWindow &, void > aPipetteLink
Definition: contwnd.hxx:31
Color aPipetteColor
Definition: contwnd.hxx:29
void SetPipetteClickHdl(const Link< ContourWindow &, void > &rLink)
Definition: contwnd.hxx:63
bool bWorkplaceMode
Definition: contwnd.hxx:35
void SetPipetteMode(const bool bPipette)
Definition: contwnd.hxx:53
void SetWorkplaceMode(const bool bWorkplace)
Definition: contwnd.hxx:59
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: contwnd.cxx:226
tools::Rectangle aWorkRect
Definition: contwnd.hxx:30
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Definition: contwnd.cxx:180
ContourWindow(weld::Dialog *pDialog)
Definition: contwnd.cxx:34
bool bPipetteMode
Definition: contwnd.hxx:34
Link< ContourWindow &, void > aWorkplaceClickLink
Definition: contwnd.hxx:33
Abstract DrawObject.
Definition: svdobj.hxx:260