LibreOffice Module svx (master) 1
contimp.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#ifndef INCLUDED_SVX_SOURCE_DIALOG_CONTIMP_HXX
20#define INCLUDED_SVX_SOURCE_DIALOG_CONTIMP_HXX
21
22#include <sfx2/ctrlitem.hxx>
23#include "contwnd.hxx"
24#include <vcl/idle.hxx>
25
27
29{
31
32protected:
33
34 virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override;
35
36public:
37
39};
40
41class ContourWindow;
42
44{
45private:
47public:
49 : m_rWnd(rWnd)
50 {
51 }
52 virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
53 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override
54 {
56 Size aSize(pDrawingArea->get_approximate_digit_width() * 3,
57 pDrawingArea->get_text_height());
58 pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
59 SetOutputSizePixel(aSize);
60 }
61};
62
64{
74 void* pCheckObj;
76 sal_Int32 mnGrfChanged;
80
82 std::unique_ptr<ContourWindow> m_xContourWnd;
83 std::unique_ptr<StatusColor> m_xStbStatusColor;
84 std::unique_ptr<weld::Toolbar> m_xTbx1;
85 std::unique_ptr<weld::MetricSpinButton> m_xMtfTolerance;
86 std::unique_ptr<weld::Label> m_xStbStatus2;
87 std::unique_ptr<weld::Label> m_xStbStatus3;
88 std::unique_ptr<weld::Button> m_xCancelBtn;
89 std::unique_ptr<weld::CustomWeld> m_xStbStatusColorWeld;
90 std::unique_ptr<weld::CustomWeld> m_xContourWndWeld;
91
92 DECL_LINK( Tbx1ClickHdl, const OString&, void );
93 DECL_LINK( MousePosHdl, GraphCtrl*, void );
94 DECL_LINK( GraphSizeHdl, GraphCtrl*, void );
95 DECL_LINK( UpdateHdl, Timer *, void );
96 DECL_LINK( CreateHdl, Timer *, void );
97 DECL_LINK( StateHdl, GraphCtrl*, void );
98 DECL_LINK( PipetteHdl, ContourWindow&, void );
99 DECL_LINK( PipetteClickHdl, ContourWindow&, void );
100 DECL_LINK( WorkplaceClickHdl, ContourWindow&, void );
101 DECL_LINK( CancelHdl, weld::Button&, void );
102
103 void SetActiveTool(std::string_view rId);
104 void SetActivePoly(std::string_view rId);
105
107
108public:
109
110 SvxSuperContourDlg(weld::Builder& rBuilder, weld::Dialog& rDialog, SfxBindings* pBindings);
112
113 void SetExecState( bool bEnable );
114
115 void SetGraphic( const Graphic& rGraphic );
116 const Graphic& GetGraphic() const { return aGraphic; }
117 bool IsGraphicChanged() const { return mnGrfChanged > 0; }
118
119 void SetPolyPolygon( const tools::PolyPolygon& rPolyPoly );
121
122 const void* GetEditingObject() const { return pCheckObj; }
123
124 void UpdateGraphic( const Graphic& rGraphic, bool bGraphicLinked,
125 const tools::PolyPolygon* pPolyPoly,
126 void* pEditingObj );
127};
128
129
130#endif // INCLUDED_SVX_SOURCE_DIALOG_CONTIMP_HXX
131
132/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr tools::Long Height() const
constexpr tools::Long Width() const
ContourWindow & m_rWnd
Definition: contimp.hxx:46
StatusColor(ContourWindow &rWnd)
Definition: contimp.hxx:48
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: contimp.hxx:53
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: _contdlg.cxx:600
SvxContourDlgItem(SvxSuperContourDlg &rDlg, SfxBindings &rBindings)
Definition: _contdlg.cxx:42
virtual void StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
Definition: _contdlg.cxx:48
SvxSuperContourDlg & rDlg
Definition: contimp.hxx:30
DECL_LINK(CancelHdl, weld::Button &, void)
std::unique_ptr< weld::Label > m_xStbStatus3
Definition: contimp.hxx:87
SvxSuperContourDlg(weld::Builder &rBuilder, weld::Dialog &rDialog, SfxBindings *pBindings)
Definition: _contdlg.cxx:192
void SetExecState(bool bEnable)
Definition: _contdlg.cxx:267
std::unique_ptr< ContourWindow > m_xContourWnd
Definition: contimp.hxx:82
Graphic aGraphic
Definition: contimp.hxx:65
std::unique_ptr< weld::Toolbar > m_xTbx1
Definition: contimp.hxx:84
tools::PolyPolygon GetPolyPolygon()
Definition: _contdlg.cxx:309
DECL_LINK(WorkplaceClickHdl, ContourWindow &, void)
Graphic aUpdateGraphic
Definition: contimp.hxx:68
const Graphic & GetGraphic() const
Definition: contimp.hxx:116
SfxBindings & GetBindings()
Definition: contimp.hxx:106
void SetActivePoly(std::string_view rId)
Definition: _contdlg.cxx:467
DECL_LINK(Tbx1ClickHdl, const OString &, void)
Graphic aRedoGraphic
Definition: contimp.hxx:67
SfxBindings * mpBindings
Definition: contimp.hxx:72
DECL_LINK(CreateHdl, Timer *, void)
DECL_LINK(PipetteHdl, ContourWindow &, void)
std::unique_ptr< StatusColor > m_xStbStatusColor
Definition: contimp.hxx:83
const void * GetEditingObject() const
Definition: contimp.hxx:122
void UpdateGraphic(const Graphic &rGraphic, bool bGraphicLinked, const tools::PolyPolygon *pPolyPoly, void *pEditingObj)
Definition: _contdlg.cxx:336
void * pUpdateEditingObject
Definition: contimp.hxx:73
DECL_LINK(StateHdl, GraphCtrl *, void)
void SetGraphic(const Graphic &rGraphic)
Definition: _contdlg.cxx:272
bool IsGraphicChanged() const
Definition: contimp.hxx:117
std::unique_ptr< weld::CustomWeld > m_xStbStatusColorWeld
Definition: contimp.hxx:89
std::unique_ptr< weld::Button > m_xCancelBtn
Definition: contimp.hxx:88
DECL_LINK(GraphSizeHdl, GraphCtrl *, void)
void SetPolyPolygon(const tools::PolyPolygon &rPolyPoly)
Definition: _contdlg.cxx:280
Graphic aUndoGraphic
Definition: contimp.hxx:66
tools::PolyPolygon aUpdatePolyPoly
Definition: contimp.hxx:69
bool bUpdateGraphicLinked
Definition: contimp.hxx:78
std::unique_ptr< weld::CustomWeld > m_xContourWndWeld
Definition: contimp.hxx:90
sal_Int32 mnGrfChanged
Definition: contimp.hxx:76
weld::Dialog & m_rDialog
Definition: contimp.hxx:81
DECL_LINK(PipetteClickHdl, ContourWindow &, void)
std::unique_ptr< weld::Label > m_xStbStatus2
Definition: contimp.hxx:86
DECL_LINK(MousePosHdl, GraphCtrl *, void)
void SetActiveTool(std::string_view rId)
Definition: _contdlg.cxx:459
SvxContourDlgItem aContourItem
Definition: contimp.hxx:75
DECL_LINK(UpdateHdl, Timer *, void)
std::unique_ptr< weld::MetricSpinButton > m_xMtfTolerance
Definition: contimp.hxx:85
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea)
void SetOutputSizePixel(const Size &rSize)
virtual int get_text_height() const=0
virtual void set_size_request(int nWidth, int nHeight)=0
virtual float get_approximate_digit_width() const=0
SfxItemState