tdf#145842 canceling remote file delete makes file disappear from treeview
[LibreOffice.git] / svx / inc / colrctrl.hxx
blob012f0085598dd7b84915818879d332f9ec44f17e
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 * This file incorporates work covered by the following license notice:
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 .
19 #pragma once
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>
31 namespace vcl { class Window; }
33 class SfxBindings;
34 class SfxBroadcaster;
35 class SfxChildWindow;
36 class SfxHint;
37 class SvxColorValueSetData;
39 /*************************************************************************
41 |* SvxColorValueSet_docking
43 \************************************************************************/
45 class SAL_WARN_UNUSED SvxColorValueSet_docking final : public SvxColorValueSet
47 rtl::Reference<SvxColorValueSetData> m_xHelper;
48 bool mbLeftButton;
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;
55 virtual bool StartDrag() override;
57 public:
58 SvxColorValueSet_docking(std::unique_ptr<weld::ScrolledWindow> pWindow);
60 bool IsLeftButton() const { return mbLeftButton; }
63 /*************************************************************************
65 |* SvxColorDockingWindow
67 \************************************************************************/
69 class SAL_WARN_UNUSED SvxColorDockingWindow final : public SfxDockingWindow, public SfxListener
71 friend class SvxColorChildWindow;
73 private:
74 XColorListRef pColorList;
75 std::unique_ptr<SvxColorValueSet_docking> xColorSet;
76 std::unique_ptr<weld::CustomWeld> xColorSetWin;
78 void FillValueSet();
80 DECL_LINK(SelectHdl, ValueSet*, void);
82 /** This function is called when the window gets the focus. It grabs
83 the focus to the color value set so that it can be controlled with
84 the keyboard.
86 virtual void GetFocus() override;
88 virtual bool Close() override;
90 public:
91 SvxColorDockingWindow(SfxBindings* pBindings,
92 SfxChildWindow *pCW,
93 vcl::Window* pParent);
94 virtual ~SvxColorDockingWindow() override;
95 virtual void dispose() override;
97 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
99 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */