LCOV - code coverage report
Current view: top level - svx/inc/svx - colrctrl.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 3 0.0 %
Date: 2012-08-25 Functions: 0 5 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 6 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _SVX_COLRCTRL_HXX
      29                 :            : #define _SVX_COLRCTRL_HXX
      30                 :            : 
      31                 :            : #include <sfx2/dockwin.hxx>
      32                 :            : #include <sfx2/childwin.hxx>
      33                 :            : #include <svtools/valueset.hxx>
      34                 :            : #include <svtools/transfer.hxx>
      35                 :            : #include <svl/lstner.hxx>
      36                 :            : #include <svx/svxdllapi.h>
      37                 :            : #include <svx/xtable.hxx>
      38                 :            : 
      39                 :            : class SvData;
      40                 :            : 
      41                 :            : /*************************************************************************
      42                 :            : |*
      43                 :            : |* SvxColorValueSet
      44                 :            : |*
      45                 :            : \************************************************************************/
      46                 :            : 
      47 [ #  # ][ #  # ]:          0 : class SvxColorValueSet : public ValueSet, public DragSourceHelper
      48                 :            : {
      49                 :            :     using ValueSet::StartDrag;
      50                 :            : 
      51                 :            : private:
      52                 :            : 
      53                 :            :     sal_Bool            bLeft;
      54                 :            :     Point           aDragPosPixel;
      55                 :            : 
      56                 :            : protected:
      57                 :            : 
      58                 :            :     void            DoDrag();
      59                 :            : 
      60                 :            :     // ValueSet
      61                 :            :     virtual void    MouseButtonDown( const MouseEvent& rMEvt );
      62                 :            :     virtual void    MouseButtonUp( const MouseEvent& rMEvt );
      63                 :            :     virtual void    Command(const CommandEvent& rCEvt );
      64                 :            : 
      65                 :            :     // DragSourceHelper
      66                 :            :     virtual void    StartDrag( sal_Int8 nAction, const Point& rPtPixel );
      67                 :            : 
      68                 :            :                     DECL_STATIC_LINK(SvxColorValueSet, ExecDragHdl, void*);
      69                 :            : 
      70                 :            : public:
      71                 :            :                     SvxColorValueSet( Window* pParent, const ResId& rResId );
      72                 :            : 
      73                 :          0 :     sal_Bool            IsLeftButton() const { return bLeft; }
      74                 :            : };
      75                 :            : 
      76                 :            : /*************************************************************************
      77                 :            : |*
      78                 :            : |* Derivation from SfxChildWindow as "container" for Controller
      79                 :            : |*
      80                 :            : \************************************************************************/
      81                 :            : 
      82         [ #  # ]:          0 : class SVX_DLLPUBLIC SvxColorChildWindow : public SfxChildWindow
      83                 :            : {
      84                 :            :  public:
      85                 :            :     SvxColorChildWindow( Window*, sal_uInt16, SfxBindings*,
      86                 :            :                          SfxChildWinInfo* );
      87                 :            : 
      88                 :            :     SFX_DECL_CHILDWINDOW_WITHID(SvxColorChildWindow);
      89                 :            : };
      90                 :            : 
      91                 :            : /*************************************************************************
      92                 :            : |*
      93                 :            : |* SvxColorDockingWindow
      94                 :            : |*
      95                 :            : \************************************************************************/
      96                 :            : 
      97                 :            : class SvxColorDockingWindow : public SfxDockingWindow, public SfxListener
      98                 :            : {
      99                 :            :  friend class SvxColorChildWindow;
     100                 :            : 
     101                 :            : private:
     102                 :            :     XColorListRef       pColorList;
     103                 :            :     SvxColorValueSet    aColorSet;
     104                 :            :     sal_uInt16          nLeftSlot;
     105                 :            :     sal_uInt16          nRightSlot;
     106                 :            :     sal_uInt16          nCols;
     107                 :            :     sal_uInt16          nLines;
     108                 :            :     long                nCount;
     109                 :            :     Size                aColorSize;
     110                 :            :     Size                aItemSize;
     111                 :            : 
     112                 :            :     void                FillValueSet();
     113                 :            :     void                SetSize();
     114                 :            :                         DECL_LINK( SelectHdl, void * );
     115                 :            : 
     116                 :            :     /** This function is called when the window gets the focus.  It grabs
     117                 :            :         the focus to the color value set so that it can be controlled with
     118                 :            :         the keyboard.
     119                 :            :     */
     120                 :            :     virtual void GetFocus (void);
     121                 :            : 
     122                 :            : protected:
     123                 :            :     virtual sal_Bool    Close();
     124                 :            :     virtual void    Resize();
     125                 :            :     virtual void    Resizing( Size& rSize );
     126                 :            : 
     127                 :            : public:
     128                 :            :                     SvxColorDockingWindow( SfxBindings* pBindings,
     129                 :            :                                            SfxChildWindow *pCW,
     130                 :            :                                            Window* pParent,
     131                 :            :                                            const ResId& rResId );
     132                 :            :                     ~SvxColorDockingWindow();
     133                 :            : 
     134                 :            :     virtual void    Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
     135                 :            : 
     136                 :            :     void            SetSlotIDs( sal_uInt16 nLeft, sal_uInt16 nRight )
     137                 :            :                         { nLeftSlot = nLeft; nRightSlot = nRight; }
     138                 :            : 
     139                 :            :     virtual long    Notify( NotifyEvent& rNEvt );
     140                 :            : };
     141                 :            : 
     142                 :            : #endif
     143                 :            : 
     144                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10