Line data Source code
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 : #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_GRAPHIC_GRAPHICPROPERTYPANEL_HXX
20 : #define INCLUDED_SVX_SOURCE_SIDEBAR_GRAPHIC_GRAPHICPROPERTYPANEL_HXX
21 :
22 : #include <vcl/ctrl.hxx>
23 : #include <sfx2/sidebar/SidebarPanelBase.hxx>
24 : #include <sfx2/sidebar/ControllerItem.hxx>
25 : #include <svx/sidebar/PanelLayout.hxx>
26 : #include <vcl/fixed.hxx>
27 : #include <boost/scoped_ptr.hpp>
28 :
29 : class FixedText;
30 : class MetricField;
31 : class ListBox;
32 : class FloatingWindow;
33 :
34 :
35 : namespace svx { namespace sidebar {
36 :
37 : class GraphicPropertyPanel
38 : : public PanelLayout,
39 : public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
40 : {
41 : public:
42 : static GraphicPropertyPanel* Create(
43 : vcl::Window* pParent,
44 : const css::uno::Reference<css::frame::XFrame>& rxFrame,
45 : SfxBindings* pBindings);
46 :
47 : virtual void DataChanged(
48 : const DataChangedEvent& rEvent) SAL_OVERRIDE;
49 :
50 : virtual void NotifyItemUpdate(
51 : const sal_uInt16 nSId,
52 : const SfxItemState eState,
53 : const SfxPoolItem* pState,
54 : const bool bIsEnabled) SAL_OVERRIDE;
55 :
56 0 : SfxBindings* GetBindings() { return mpBindings;}
57 :
58 : private:
59 : //ui controls
60 : MetricField* mpMtrBrightness;
61 : MetricField* mpMtrContrast;
62 : ListBox* mpLBColorMode;
63 : MetricField* mpMtrTrans;
64 : MetricField* mpMtrRed;
65 : MetricField* mpMtrGreen;
66 : MetricField* mpMtrBlue;
67 : MetricField* mpMtrGamma;
68 :
69 : ::sfx2::sidebar::ControllerItem maBrightControl;
70 : ::sfx2::sidebar::ControllerItem maContrastControl;
71 : ::sfx2::sidebar::ControllerItem maTransparenceControl;
72 : ::sfx2::sidebar::ControllerItem maRedControl;
73 : ::sfx2::sidebar::ControllerItem maGreenControl;
74 : ::sfx2::sidebar::ControllerItem maBlueControl;
75 : ::sfx2::sidebar::ControllerItem maGammaControl;
76 : ::sfx2::sidebar::ControllerItem maModeControl;
77 :
78 : OUString msNormal;
79 : OUString msBW;
80 : OUString msGray;
81 : OUString msWater;
82 :
83 : css::uno::Reference<css::frame::XFrame> mxFrame;
84 : SfxBindings* mpBindings;
85 :
86 : DECL_LINK( ModifyBrightnessHdl, void * );
87 : DECL_LINK( ModifyContrastHdl, void * );
88 : DECL_LINK( ModifyTransHdl, void * );
89 : DECL_LINK( ClickColorModeHdl, void * );
90 : DECL_LINK( ImplPopupModeEndHdl, FloatingWindow* );
91 : DECL_LINK( RedHdl, void*);
92 : DECL_LINK( GreenHdl, void*);
93 : DECL_LINK( BlueHdl, void*);
94 : DECL_LINK( GammaHdl, void*);
95 :
96 : // constructor/destuctor
97 : GraphicPropertyPanel(
98 : vcl::Window* pParent,
99 : const css::uno::Reference<css::frame::XFrame>& rxFrame,
100 : SfxBindings* pBindings);
101 : virtual ~GraphicPropertyPanel();
102 :
103 : void SetupIcons(void);
104 : void Initialize();
105 : };
106 :
107 :
108 : } } // end of namespace ::svx::sidebar
109 :
110 : #endif
111 :
112 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|