bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / svx / colrctrl.hxx
blobe7ff30f3bb4fa62341cb422fb10785591e9decc9
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 #ifndef INCLUDED_SVX_COLRCTRL_HXX
20 #define INCLUDED_SVX_COLRCTRL_HXX
22 #include <sal/types.h>
23 #include <sfx2/dockwin.hxx>
24 #include <svl/lstner.hxx>
25 #include <vcl/transfer.hxx>
26 #include <svx/SvxColorValueSet.hxx>
27 #include <svx/xtable.hxx>
28 #include <tools/gen.hxx>
29 #include <tools/link.hxx>
30 #include <vcl/vclptr.hxx>
32 namespace vcl { class Window; }
34 class SfxBindings;
35 class SfxBroadcaster;
36 class SfxChildWindow;
37 class SfxHint;
39 /*************************************************************************
41 |* SvxColorValueSet_docking
43 \************************************************************************/
45 class SAL_WARN_UNUSED SvxColorValueSet_docking final : public SvxColorValueSet, public DragSourceHelper
47 bool mbLeftButton;
48 Point aDragPosPixel;
50 using SvxColorValueSet::StartDrag;
52 void DoDrag();
54 // ValueSet
55 virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
56 virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
58 // DragSourceHelper
59 virtual void StartDrag( sal_Int8 nAction, const Point& rPtPixel ) override;
61 DECL_LINK(ExecDragHdl, void*, void);
63 public:
64 SvxColorValueSet_docking( vcl::Window* pParent );
66 bool IsLeftButton() const { return mbLeftButton; }
69 /*************************************************************************
71 |* SvxColorDockingWindow
73 \************************************************************************/
75 class SAL_WARN_UNUSED SvxColorDockingWindow : public SfxDockingWindow, public SfxListener
77 friend class SvxColorChildWindow;
79 private:
80 XColorListRef pColorList;
81 VclPtr<SvxColorValueSet_docking> aColorSet;
82 sal_uInt16 nCols;
83 sal_uInt16 nLines;
84 long nCount;
85 Size aItemSize;
87 void FillValueSet();
88 void SetSize();
89 DECL_LINK( SelectHdl, ValueSet*, void );
91 /** This function is called when the window gets the focus. It grabs
92 the focus to the color value set so that it can be controlled with
93 the keyboard.
95 virtual void GetFocus() override;
97 protected:
98 virtual bool Close() override;
99 virtual void Resize() override;
100 virtual void Resizing( Size& rSize ) override;
102 public:
103 SvxColorDockingWindow(SfxBindings* pBindings,
104 SfxChildWindow *pCW,
105 vcl::Window* pParent);
106 virtual ~SvxColorDockingWindow() override;
107 virtual void dispose() override;
109 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
111 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
114 #endif
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */