bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / svx / ClassificationEditView.hxx
blob7c7070e8a2fddf11b4be784d69ab05e1450ee4df
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 */
11 #ifndef INCLUDED_SVX_CLASSIFICATIONEDITVIEW_HXX
12 #define INCLUDED_SVX_CLASSIFICATIONEDITVIEW_HXX
14 #include <sal/config.h>
15 #include <svx/svxdllapi.h>
16 #include <editeng/editeng.hxx>
17 #include <editeng/editview.hxx>
18 #include <editeng/svxenum.hxx>
19 #include <vcl/customweld.hxx>
21 namespace svx {
23 class ClassificationEditEngine : public EditEngine
25 public:
26 ClassificationEditEngine(SfxItemPool* pItemPool);
28 virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor) override;
31 class SVX_DLLPUBLIC ClassificationEditView : public weld::CustomWidgetController,
32 public EditViewCallbacks
34 public:
35 ClassificationEditView();
36 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
37 virtual ~ClassificationEditView() override;
39 void SetCharAttributes();
41 void InsertField(const SvxFieldItem& rField);
43 void InvertSelectionWeight();
45 void SetNumType(SvxNumType eNumType);
47 std::unique_ptr<ClassificationEditEngine> pEdEngine;
48 std::unique_ptr<EditView> pEdView;
50 const ClassificationEditEngine& getEditEngine()
52 return *pEdEngine;
55 void SetModifyHdl(const Link<LinkParamNone*,void>& rLink)
57 pEdEngine->SetModifyHdl(rLink);
60 protected:
61 virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
62 virtual bool MouseMove( const MouseEvent& rMEvt ) override;
63 virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
64 virtual bool MouseButtonUp( const MouseEvent& rMEvt ) override;
65 virtual bool KeyInput( const KeyEvent& rKEvt ) override;
66 virtual void GetFocus() override;
67 virtual void Resize() override;
70 virtual void EditViewInvalidate(const tools::Rectangle& rRect) const override
72 weld::DrawingArea* pDrawingArea = GetDrawingArea();
73 pDrawingArea->queue_draw_area(rRect.Left(), rRect.Top(), rRect.GetWidth(), rRect.GetHeight());
76 virtual void EditViewSelectionChange() const override
78 weld::DrawingArea* pDrawingArea = GetDrawingArea();
79 pDrawingArea->queue_draw();
82 virtual OutputDevice& EditViewOutputDevice() const override
84 return GetDrawingArea()->get_ref_device();
88 } // end svx namespace
90 #endif // INCLUDED_SVX_CLASSIFICATIONEDITVIEW_HXX
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */