LibreOffice Module svx (master)  1
colrctrl.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 #pragma once
20 
21 #include <sal/types.h>
22 #include <sfx2/dockwin.hxx>
23 #include <svl/lstner.hxx>
24 #include <svx/SvxColorValueSet.hxx>
25 #include <svx/xtable.hxx>
26 #include <tools/gen.hxx>
27 #include <tools/link.hxx>
28 #include <vcl/vclptr.hxx>
29 #include <com/sun/star/drawing/FillStyle.hpp>
30 
31 namespace vcl { class Window; }
32 
33 class SfxBindings;
34 class SfxBroadcaster;
35 class SfxChildWindow;
36 class SfxHint;
38 
39 /*************************************************************************
40 |*
41 |* SvxColorValueSet_docking
42 |*
43 \************************************************************************/
44 
46 {
49 
50  // ValueSet
51  virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
52  virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
53  virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
54 
55  virtual bool StartDrag() override;
56 
57 public:
58  SvxColorValueSet_docking(std::unique_ptr<weld::ScrolledWindow> pWindow);
59 
60  bool IsLeftButton() const { return mbLeftButton; }
61 };
62 
63 /*************************************************************************
64 |*
65 |* SvxColorDockingWindow
66 |*
67 \************************************************************************/
68 
70 {
71 friend class SvxColorChildWindow;
72 
73 private:
75  std::unique_ptr<SvxColorValueSet_docking> xColorSet;
76  std::unique_ptr<weld::CustomWeld> xColorSetWin;
77 
78  void FillValueSet();
79 
80  DECL_LINK(SelectHdl, ValueSet*, void);
81 
86  virtual void GetFocus() override;
87 
88  virtual bool Close() override;
89 
90 public:
92  SfxChildWindow *pCW,
94  virtual ~SvxColorDockingWindow() override;
95  virtual void dispose() override;
96 
97  virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
98 
99  virtual bool EventNotify( NotifyEvent& rNEvt ) override;
100 };
101 
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
std::unique_ptr< SvxColorValueSet_docking > xColorSet
Definition: colrctrl.hxx:75
virtual bool Close() override
virtual bool EventNotify(NotifyEvent &rNEvt) override
Child of SfxChildWindow as a "container" for Controller.
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
XColorListRef pColorList
Definition: colrctrl.hxx:74
VclPtr< vcl::Window > pParent
DECL_LINK(TimerHdl, Timer *, void)
#define SAL_WARN_UNUSED
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint)
std::unique_ptr< weld::CustomWeld > xColorSetWin
Definition: colrctrl.hxx:76
virtual void dispose() override
bool IsLeftButton() const
Definition: colrctrl.hxx:60
rtl::Reference< SvxColorValueSetData > m_xHelper
Definition: colrctrl.hxx:47