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 .
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 \************************************************************************/
39 class SvxBmpMaskSelectItem
: public SfxControllerItem
45 virtual void StateChanged( sal_uInt16 nSID
, SfxItemState eState
,
46 const SfxPoolItem
* pState
);
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
62 SvxBmpMaskChildWindow( Window
*,
63 sal_uInt16
, SfxBindings
*,
66 SFX_DECL_CHILDWINDOW_WITHID(SvxBmpMaskChildWindow
);
69 /*************************************************************************
73 \************************************************************************/
79 class SVX_DLLPUBLIC SvxBmpMask
: public SfxDockingWindow
81 friend class MaskData
;
86 ColorWindow
* pCtlPipette
;
115 ColorLB aLbColorTrans
;
117 XColorListRef pColLst
;
119 SvxBmpMaskSelectItem aSelItem
;
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
,
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
147 SvxBmpMask( SfxBindings
*pBindinx
,
150 const ResId
& rResId
);
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
);
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: */