LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/include/svx - colrctrl.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2013-07-09 Functions: 0 3 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 _SVX_COLRCTRL_HXX
      20             : #define _SVX_COLRCTRL_HXX
      21             : 
      22             : #include <sfx2/dockwin.hxx>
      23             : #include <sfx2/childwin.hxx>
      24             : #include <svx/SvxColorValueSet.hxx>
      25             : #include <svtools/transfer.hxx>
      26             : #include <svl/lstner.hxx>
      27             : #include <svx/svxdllapi.h>
      28             : #include <svx/xtable.hxx>
      29             : 
      30             : class SvData;
      31             : 
      32             : /*************************************************************************
      33             : |*
      34             : |* SvxColorValueSet_docking
      35             : |*
      36             : \************************************************************************/
      37             : 
      38           0 : class SvxColorValueSet_docking : public SvxColorValueSet, public DragSourceHelper
      39             : {
      40             : private:
      41             :     using SvxColorValueSet::StartDrag;
      42             : 
      43             :     bool            mbLeftButton;
      44             :     Point           aDragPosPixel;
      45             : 
      46             : protected:
      47             : 
      48             :     void            DoDrag();
      49             : 
      50             :     // ValueSet
      51             :     virtual void    MouseButtonDown( const MouseEvent& rMEvt );
      52             :     virtual void    MouseButtonUp( const MouseEvent& rMEvt );
      53             :     virtual void    Command(const CommandEvent& rCEvt );
      54             : 
      55             :     // DragSourceHelper
      56             :     virtual void    StartDrag( sal_Int8 nAction, const Point& rPtPixel );
      57             : 
      58             :                     DECL_STATIC_LINK(SvxColorValueSet_docking, ExecDragHdl, void*);
      59             : 
      60             : public:
      61             :                     SvxColorValueSet_docking( Window* pParent, WinBits nWinStyle = WB_ITEMBORDER );
      62             :                     SvxColorValueSet_docking( Window* pParent, const ResId& rResId );
      63             : 
      64           0 :     bool IsLeftButton() const { return mbLeftButton; }
      65             : };
      66             : 
      67             : /*************************************************************************
      68             : |*
      69             : |* SvxColorDockingWindow
      70             : |*
      71             : \************************************************************************/
      72             : 
      73             : class SvxColorDockingWindow : public SfxDockingWindow, public SfxListener
      74             : {
      75             :  friend class SvxColorChildWindow;
      76             : 
      77             : private:
      78             :     XColorListRef       pColorList;
      79             :     SvxColorValueSet_docking aColorSet;
      80             :     sal_uInt16          nLeftSlot;
      81             :     sal_uInt16          nRightSlot;
      82             :     sal_uInt16          nCols;
      83             :     sal_uInt16          nLines;
      84             :     long                nCount;
      85             :     Size                aItemSize;
      86             : 
      87             :     void                FillValueSet();
      88             :     void                SetSize();
      89             :                         DECL_LINK( SelectHdl, void * );
      90             : 
      91             :     /** This function is called when the window gets the focus.  It grabs
      92             :         the focus to the color value set so that it can be controlled with
      93             :         the keyboard.
      94             :     */
      95             :     virtual void GetFocus (void);
      96             : 
      97             : protected:
      98             :     virtual sal_Bool    Close();
      99             :     virtual void    Resize();
     100             :     virtual void    Resizing( Size& rSize );
     101             : 
     102             : public:
     103             :                     SvxColorDockingWindow( SfxBindings* pBindings,
     104             :                                            SfxChildWindow *pCW,
     105             :                                            Window* pParent,
     106             :                                            const ResId& rResId );
     107             :                     ~SvxColorDockingWindow();
     108             : 
     109             :     virtual void    Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
     110             : 
     111             :     void            SetSlotIDs( sal_uInt16 nLeft, sal_uInt16 nRight )
     112             :                         { nLeftSlot = nLeft; nRightSlot = nRight; }
     113             : 
     114             :     virtual long    Notify( NotifyEvent& rNEvt );
     115             : };
     116             : 
     117             : #endif
     118             : 
     119             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10