1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
20 #ifndef INCLUDED_SVX_SOURCE_TBXCTRLS_COLORWINDOW_HXX
21 #define INCLUDED_SVX_SOURCE_TBXCTRLS_COLORWINDOW_HXX
23 #include <sfx2/tbxctrl.hxx>
24 #include <svtools/valueset.hxx>
25 #include <svl/lstner.hxx>
26 #include <rtl/ustring.hxx>
27 #include <com/sun/star/frame/XFrame.hpp>
28 #include <svx/SvxColorValueSet.hxx>
29 #include <svx/PaletteManager.hxx>
30 #include <vcl/lstbox.hxx>
32 class BorderColorStatus
;
34 class SvxColorWindow_Impl
: public SfxPopupWindow
36 using FloatingWindow::StateChanged
;
39 const sal_uInt16 theSlotId
;
40 VclPtr
<SvxColorValueSet
> mpColorSet
;
41 VclPtr
<SvxColorValueSet
> mpRecentColorSet
;
43 VclPtr
<ListBox
> mpPaletteListBox
;
44 VclPtr
<PushButton
> mpButtonAutoColor
;
45 VclPtr
<PushButton
> mpButtonPicker
;
46 VclPtr
<FixedLine
> mpAutomaticSeparator
;
48 Link
<> maSelectedLink
;
50 PaletteManager
& mrPaletteManager
;
51 BorderColorStatus
& mrBorderColorStatus
;
53 DECL_LINK( SelectHdl
, SvxColorValueSet
* );
54 DECL_LINK( SelectPaletteHdl
, void *);
55 DECL_LINK( AutoColorClickHdl
, void * );
56 DECL_LINK( OpenPickerClickHdl
, void * );
59 virtual void Resize() SAL_OVERRIDE
;
60 virtual bool Close() SAL_OVERRIDE
;
63 SvxColorWindow_Impl( const OUString
& rCommand
,
64 PaletteManager
& rPaletteManager
,
65 BorderColorStatus
& rBorderColorStatus
,
67 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& rFrame
,
68 const OUString
& rWndTitle
,
69 vcl::Window
* pParentWindow
);
70 virtual ~SvxColorWindow_Impl();
71 virtual void dispose() SAL_OVERRIDE
;
72 void StartSelection();
74 virtual void KeyInput( const KeyEvent
& rKEvt
) SAL_OVERRIDE
;
75 virtual void StateChanged( sal_uInt16 nSID
, SfxItemState eState
, const SfxPoolItem
* pState
) SAL_OVERRIDE
;
77 virtual VclPtr
<SfxPopupWindow
> Clone() const SAL_OVERRIDE
;
78 void SetSelectedHdl( const Link
<>& rLink
) { maSelectedLink
= rLink
; }
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */