LCOV - code coverage report
Current view: top level - include/svx - bmpmask.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 2 0.0 %
Date: 2014-11-03 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          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_BMPMASK_HXX
      20             : #define INCLUDED_SVX_BMPMASK_HXX
      21             : 
      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>
      29             : 
      30             : #include <svx/dlgctrl.hxx>
      31             : 
      32             : /*************************************************************************
      33             : |*
      34             : |*  class SvxBmpMaskSelectItem
      35             : |*
      36             : \************************************************************************/
      37             : class SvxBmpMask;
      38             : 
      39           0 : class SvxBmpMaskSelectItem : public SfxControllerItem
      40             : {
      41             : private:
      42             :     SvxBmpMask  &rBmpMask;
      43             : 
      44             : protected:
      45             :     virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
      46             :                                const SfxPoolItem* pState ) SAL_OVERRIDE;
      47             : 
      48             : public:
      49             :     SvxBmpMaskSelectItem( sal_uInt16 nId, SvxBmpMask& rMask,
      50             :                           SfxBindings& rBindings );
      51             : };
      52             : 
      53             : /*************************************************************************
      54             : |*
      55             : |* Derivative from SfxChildWindow as 'container' for Float
      56             : |*
      57             : \************************************************************************/
      58             : 
      59           0 : class SVX_DLLPUBLIC SvxBmpMaskChildWindow : public SfxChildWindow
      60             : {
      61             :  public:
      62             :                             SvxBmpMaskChildWindow( vcl::Window*,
      63             :                                                    sal_uInt16, SfxBindings*,
      64             :                                                    SfxChildWinInfo* );
      65             : 
      66             :     SFX_DECL_CHILDWINDOW_WITHID(SvxBmpMaskChildWindow);
      67             : };
      68             : 
      69             : /*************************************************************************
      70             : |*
      71             : |*  class SvxBmpMask
      72             : |*
      73             : \************************************************************************/
      74             : 
      75             : class MaskData;
      76             : class MaskSet;
      77             : class ColorWindow;
      78             : 
      79             : class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
      80             : {
      81             :     friend class MaskData;
      82             :     friend class MaskSet;
      83             : 
      84             :     ToolBox             aTbxPipette;
      85             :     ColorWindow*        pCtlPipette;
      86             :     PushButton          aBtnExec;
      87             :     FixedLine           aGrpQ;
      88             : 
      89             :     FixedText           aFt1;
      90             :     FixedText           aFt2;
      91             :     FixedText           aFt3;
      92             :     CheckBox            aCbx1;
      93             :     MaskSet*            pQSet1;
      94             :     MetricField         aSp1;
      95             :     ColorLB             aLbColor1;
      96             : 
      97             :     CheckBox            aCbx2;
      98             :     MaskSet*            pQSet2;
      99             :     MetricField         aSp2;
     100             :     ColorLB             aLbColor2;
     101             : 
     102             :     CheckBox            aCbx3;
     103             :     MaskSet*            pQSet3;
     104             :     MetricField         aSp3;
     105             :     ColorLB             aLbColor3;
     106             : 
     107             :     CheckBox            aCbx4;
     108             :     MaskSet*            pQSet4;
     109             :     MetricField         aSp4;
     110             :     ColorLB             aLbColor4;
     111             : 
     112             :     MaskData*           pData;
     113             :     CheckBox            aCbxTrans;
     114             :     ColorLB             aLbColorTrans;
     115             : 
     116             :     XColorListRef       pColLst;
     117             :     Color               aPipetteColor;
     118             :     SvxBmpMaskSelectItem aSelItem;
     119             : 
     120             :     Image               maImgPipette;
     121             : 
     122             :     virtual bool        Close() SAL_OVERRIDE;
     123             : 
     124             : #ifdef BMPMASK_PRIVATE
     125             : 
     126             :     sal_uInt16              InitColorArrays( Color* pSrcCols, Color* pDstCols,
     127             :                                          sal_uIntPtr* pTols );
     128             : 
     129             :     Bitmap              ImpMask( const Bitmap& rBitmap );
     130             :     GDIMetaFile         ImpMask( const GDIMetaFile& rMtf );
     131             :     Animation           ImpMask( const Animation& rAnimation );
     132             :     BitmapEx            ImpMaskTransparent( const BitmapEx& rBitmapEx,
     133             :                                             const Color& rColor,
     134             :                                             const long nTol );
     135             :     BitmapEx            ImpReplaceTransparency( const BitmapEx& rBmpEx,
     136             :                                                 const Color& rColor );
     137             :     Animation           ImpReplaceTransparency( const Animation& rAnim,
     138             :                                                 const Color& rColor );
     139             :     GDIMetaFile         ImpReplaceTransparency( const GDIMetaFile& rMtf,
     140             :                                                 const Color& rColor );
     141             : 
     142             : #endif // BMPMASK_PRIVATE
     143             : 
     144             : public:
     145             : 
     146             :                         SvxBmpMask( SfxBindings *pBindinx,
     147             :                                     SfxChildWindow *pCW,
     148             :                                     vcl::Window* pParent,
     149             :                                     const ResId& rResId );
     150             :                         virtual ~SvxBmpMask();
     151             : 
     152             :     void                SetColor( const Color& rColor );
     153             :     void                PipetteClicked();
     154             : 
     155             :     bool                NeedsColorList() const;
     156             :     void                SetColorList( const XColorListRef &pColorList );
     157             : 
     158             :     void                SetExecState( bool bEnable );
     159             : 
     160             :     Graphic             Mask( const Graphic& rGraphic );
     161             : 
     162             :     bool                IsEyedropping() const;
     163             : 
     164             :     void                onSelect( MaskSet* pSet );
     165             : 
     166             :     virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
     167             :     void ApplyStyle();
     168             : 
     169             : private:
     170             : 
     171             :     /** Set names for accessible objects.  This is necessary for objects
     172             :         like the source color checkboxes which initially have no name and
     173             :         for which the description would be read by AT.
     174             :     */
     175             :     SVX_DLLPRIVATE void SetAccessibleNames (void);
     176             : };
     177             : 
     178             : #endif // INCLUDED_SVX_BMPMASK_HXX
     179             : 
     180             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10