LCOV - code coverage report
Current view: top level - libreoffice/svx/inc/svx - bmpmask.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2012-12-17 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 _BMPMASK_HXX_
      20             : #define _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 );
      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( 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             :     Size                aLastSize;
      85             :     ToolBox             aTbxPipette;
      86             :     ColorWindow*        pCtlPipette;
      87             :     PushButton          aBtnExec;
      88             :     FixedLine           aGrpQ;
      89             : 
      90             :     FixedText           aFt1;
      91             :     FixedText           aFt2;
      92             :     FixedText           aFt3;
      93             :     CheckBox            aCbx1;
      94             :     MaskSet*            pQSet1;
      95             :     MetricField         aSp1;
      96             :     ColorLB             aLbColor1;
      97             : 
      98             :     CheckBox            aCbx2;
      99             :     MaskSet*            pQSet2;
     100             :     MetricField         aSp2;
     101             :     ColorLB             aLbColor2;
     102             : 
     103             :     CheckBox            aCbx3;
     104             :     MaskSet*            pQSet3;
     105             :     MetricField         aSp3;
     106             :     ColorLB             aLbColor3;
     107             : 
     108             :     CheckBox            aCbx4;
     109             :     MaskSet*            pQSet4;
     110             :     MetricField         aSp4;
     111             :     ColorLB             aLbColor4;
     112             : 
     113             :     MaskData*           pData;
     114             :     CheckBox            aCbxTrans;
     115             :     ColorLB             aLbColorTrans;
     116             : 
     117             :     XColorListRef       pColLst;
     118             :     Color               aPipetteColor;
     119             :     SvxBmpMaskSelectItem aSelItem;
     120             : 
     121             :     Image               maImgPipette;
     122             : 
     123             :     virtual sal_Bool        Close();
     124             : 
     125             : #ifdef BMPMASK_PRIVATE
     126             : 
     127             :     sal_uInt16              InitColorArrays( Color* pSrcCols, Color* pDstCols,
     128             :                                          sal_uIntPtr* pTols );
     129             : 
     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 );
     142             : 
     143             : #endif // BMPMASK_PRIVATE
     144             : 
     145             : public:
     146             : 
     147             :                         SvxBmpMask( SfxBindings *pBindinx,
     148             :                                     SfxChildWindow *pCW,
     149             :                                     Window* pParent,
     150             :                                     const ResId& rResId );
     151             :                         ~SvxBmpMask();
     152             : 
     153             :     void                SetColor( const Color& rColor );
     154             :     void                PipetteClicked();
     155             : 
     156             :     sal_Bool            NeedsColorList() const;
     157             :     void                SetColorList( const XColorListRef &pColorList );
     158             : 
     159             :     void                SetExecState( sal_Bool bEnable );
     160             : 
     161             :     Graphic             Mask( const Graphic& rGraphic );
     162             : 
     163             :     sal_Bool                IsEyedropping() const;
     164             : 
     165             :     void                onSelect( MaskSet* pSet );
     166             : 
     167             :     virtual void DataChanged( const DataChangedEvent& rDCEvt );
     168             :     void ApplyStyle();
     169             : 
     170             : private:
     171             : 
     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.
     175             :     */
     176             :     SVX_DLLPRIVATE void SetAccessibleNames (void);
     177             : };
     178             : 
     179             : #endif // _BMPMASK_HXX_
     180             : 
     181             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10