fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / svx / bmpmask.hxx
blob247beaafc7d2b0559be9b41528970feeb37069a6
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 _BMPMASK_HXX_
20 #define _BMPMASK_HXX_
22 #include <sfx2/ctrlitem.hxx>
23 #include <sfx2/dockwin.hxx>
24 #include <vcl/toolbox.hxx>
25 #include <vcl/fixed.hxx>
26 #include <vcl/group.hxx>
27 #include <vcl/graph.hxx>
28 #include "svx/svxdllapi.h"
30 #include <svx/dlgctrl.hxx>
32 /*************************************************************************
34 |* class SvxBmpMaskSelectItem
36 \************************************************************************/
37 class SvxBmpMask;
39 class SvxBmpMaskSelectItem : public SfxControllerItem
41 private:
42 SvxBmpMask &rBmpMask;
44 protected:
45 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
46 const SfxPoolItem* pState );
48 public:
49 SvxBmpMaskSelectItem( sal_uInt16 nId, SvxBmpMask& rMask,
50 SfxBindings& rBindings );
53 /*************************************************************************
55 |* Derivative from SfxChildWindow as 'container' for Float
57 \************************************************************************/
59 class SVX_DLLPUBLIC SvxBmpMaskChildWindow : public SfxChildWindow
61 public:
62 SvxBmpMaskChildWindow( Window*,
63 sal_uInt16, SfxBindings*,
64 SfxChildWinInfo* );
66 SFX_DECL_CHILDWINDOW_WITHID(SvxBmpMaskChildWindow);
69 /*************************************************************************
71 |* class SvxBmpMask
73 \************************************************************************/
75 class MaskData;
76 class MaskSet;
77 class ColorWindow;
79 class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
81 friend class MaskData;
82 friend class MaskSet;
84 Size aLastSize;
85 ToolBox aTbxPipette;
86 ColorWindow* pCtlPipette;
87 PushButton aBtnExec;
88 FixedLine aGrpQ;
90 FixedText aFt1;
91 FixedText aFt2;
92 FixedText aFt3;
93 CheckBox aCbx1;
94 MaskSet* pQSet1;
95 MetricField aSp1;
96 ColorLB aLbColor1;
98 CheckBox aCbx2;
99 MaskSet* pQSet2;
100 MetricField aSp2;
101 ColorLB aLbColor2;
103 CheckBox aCbx3;
104 MaskSet* pQSet3;
105 MetricField aSp3;
106 ColorLB aLbColor3;
108 CheckBox aCbx4;
109 MaskSet* pQSet4;
110 MetricField aSp4;
111 ColorLB aLbColor4;
113 MaskData* pData;
114 CheckBox aCbxTrans;
115 ColorLB aLbColorTrans;
117 XColorListRef pColLst;
118 Color aPipetteColor;
119 SvxBmpMaskSelectItem aSelItem;
121 Image maImgPipette;
123 virtual sal_Bool Close();
125 #ifdef BMPMASK_PRIVATE
127 sal_uInt16 InitColorArrays( Color* pSrcCols, Color* pDstCols,
128 sal_uIntPtr* pTols );
130 Bitmap ImpMask( const Bitmap& rBitmap );
131 GDIMetaFile ImpMask( const GDIMetaFile& rMtf );
132 Animation ImpMask( const Animation& rAnimation );
133 BitmapEx ImpMaskTransparent( const BitmapEx& rBitmapEx,
134 const Color& rColor,
135 const long nTol );
136 BitmapEx ImpReplaceTransparency( const BitmapEx& rBmpEx,
137 const Color& rColor );
138 Animation ImpReplaceTransparency( const Animation& rAnim,
139 const Color& rColor );
140 GDIMetaFile ImpReplaceTransparency( const GDIMetaFile& rMtf,
141 const Color& rColor );
143 #endif // BMPMASK_PRIVATE
145 public:
147 SvxBmpMask( SfxBindings *pBindinx,
148 SfxChildWindow *pCW,
149 Window* pParent,
150 const ResId& rResId );
151 ~SvxBmpMask();
153 void SetColor( const Color& rColor );
154 void PipetteClicked();
156 sal_Bool NeedsColorList() const;
157 void SetColorList( const XColorListRef &pColorList );
159 void SetExecState( sal_Bool bEnable );
161 Graphic Mask( const Graphic& rGraphic );
163 sal_Bool IsEyedropping() const;
165 void onSelect( MaskSet* pSet );
167 virtual void DataChanged( const DataChangedEvent& rDCEvt );
168 void ApplyStyle();
170 private:
172 /** Set names for accessible objects. This is necessary for objects
173 like the source color checkboxes which initially have no name and
174 for which the description would be read by AT.
176 SVX_DLLPRIVATE void SetAccessibleNames (void);
179 #endif // _BMPMASK_HXX_
181 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */