build fix
[LibreOffice.git] / include / svx / colrctrl.hxx
blobc3b8eaf18b8693c371e9bd58cbae1032fbe43d4f
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 <sfx2/dockwin.hxx>
23 #include <sfx2/childwin.hxx>
24 #include <svx/SvxColorValueSet.hxx>
25 #include <svtools/transfer.hxx>
26 #include <svl/lstner.hxx>
27 #include <svx/svxdllapi.h>
28 #include <svx/xtable.hxx>
29 #include <vcl/vclptr.hxx>
31 class SvData;
33 /*************************************************************************
35 |* SvxColorValueSet_docking
37 \************************************************************************/
39 class SAL_WARN_UNUSED SvxColorValueSet_docking : public SvxColorValueSet, public DragSourceHelper
41 private:
42 using SvxColorValueSet::StartDrag;
44 bool mbLeftButton;
45 Point aDragPosPixel;
47 protected:
49 void DoDrag();
51 // ValueSet
52 virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
53 virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
55 // DragSourceHelper
56 virtual void StartDrag( sal_Int8 nAction, const Point& rPtPixel ) override;
58 DECL_LINK(ExecDragHdl, void*, void);
60 public:
61 SvxColorValueSet_docking( vcl::Window* pParent );
63 bool IsLeftButton() const { return mbLeftButton; }
66 /*************************************************************************
68 |* SvxColorDockingWindow
70 \************************************************************************/
72 class SAL_WARN_UNUSED SvxColorDockingWindow : public SfxDockingWindow, public SfxListener
74 friend class SvxColorChildWindow;
76 private:
77 XColorListRef pColorList;
78 VclPtr<SvxColorValueSet_docking> aColorSet;
79 sal_uInt16 nLeftSlot;
80 sal_uInt16 nRightSlot;
81 sal_uInt16 nCols;
82 sal_uInt16 nLines;
83 long nCount;
84 Size aItemSize;
86 void FillValueSet();
87 void SetSize();
88 DECL_LINK( SelectHdl, ValueSet*, void );
90 /** This function is called when the window gets the focus. It grabs
91 the focus to the color value set so that it can be controlled with
92 the keyboard.
94 virtual void GetFocus() override;
96 protected:
97 virtual bool Close() override;
98 virtual void Resize() override;
99 virtual void Resizing( Size& rSize ) override;
101 public:
102 SvxColorDockingWindow(SfxBindings* pBindings,
103 SfxChildWindow *pCW,
104 vcl::Window* pParent);
105 virtual ~SvxColorDockingWindow() override;
106 virtual void dispose() override;
108 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
110 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
113 #endif
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */