LCOV - code coverage report
Current view: top level - vcl/inc/vcl - fixed.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2012-08-25 Functions: 0 4 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 4 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                 :            : 
      29                 :            : #ifndef _SV_FIXED_HXX
      30                 :            : #define _SV_FIXED_HXX
      31                 :            : 
      32                 :            : #include <tools/solar.h>
      33                 :            : #include <vcl/dllapi.h>
      34                 :            : #include <vcl/bitmap.hxx>
      35                 :            : #include <vcl/image.hxx>
      36                 :            : #include <vcl/ctrl.hxx>
      37                 :            : 
      38                 :            : class UserDrawEvent;
      39                 :            : 
      40                 :            : // -------------
      41                 :            : // - FixedText -
      42                 :            : // -------------
      43                 :            : 
      44         [ #  # ]:          0 : class VCL_DLLPUBLIC FixedText : public Control
      45                 :            : {
      46                 :            : private:
      47                 :            :     using Control::ImplInitSettings;
      48                 :            :     using Window::ImplInit;
      49                 :            :     SAL_DLLPRIVATE void    ImplInit( Window* pParent, WinBits nStyle );
      50                 :            :     SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
      51                 :            :     SAL_DLLPRIVATE void    ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
      52                 :            :     SAL_DLLPRIVATE void    ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
      53                 :            :                               const Point& rPos, const Size& rSize, bool bFillLayout = false ) const;
      54                 :            : public:
      55                 :            :     SAL_DLLPRIVATE static sal_uInt16   ImplGetTextStyle( WinBits nWinBits );
      56                 :            : protected:
      57                 :            :     virtual void    FillLayoutData() const;
      58                 :            :     virtual const Font&
      59                 :            :                     GetCanonicalFont( const StyleSettings& _rStyle ) const;
      60                 :            :     virtual const Color&
      61                 :            :                     GetCanonicalTextColor( const StyleSettings& _rStyle ) const;
      62                 :            : 
      63                 :            : public:
      64                 :            :                     FixedText( Window* pParent, WinBits nStyle = 0 );
      65                 :            :                     FixedText( Window* pParent, const ResId& rResId );
      66                 :            :                     FixedText( Window* pParent, const ResId& rResId, bool bDisableAccessibleLabelForRelation );
      67                 :            : 
      68                 :            :     virtual void    Paint( const Rectangle& rRect );
      69                 :            :     virtual void    Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
      70                 :            :     virtual void    Resize();
      71                 :            :     virtual void    StateChanged( StateChangedType nType );
      72                 :            :     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
      73                 :            : 
      74                 :            :     static Size     CalcMinimumTextSize( Control const* pControl, long nMaxWidth = 0 );
      75                 :            :     Size            CalcMinimumSize( long nMaxWidth = 0 ) const;
      76                 :            :     virtual Size    GetOptimalSize(WindowSizeType eType) const;
      77                 :            : };
      78                 :            : 
      79                 :            : // -------------
      80                 :            : // - FixedLine -
      81                 :            : // -------------
      82                 :            : 
      83         [ #  # ]:          0 : class VCL_DLLPUBLIC FixedLine : public Control
      84                 :            : {
      85                 :            : private:
      86                 :            :     using Control::ImplInitSettings;
      87                 :            :     using Window::ImplInit;
      88                 :            :     SAL_DLLPRIVATE void    ImplInit( Window* pParent, WinBits nStyle );
      89                 :            :     SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
      90                 :            :     SAL_DLLPRIVATE void    ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
      91                 :            :     SAL_DLLPRIVATE void    ImplDraw( bool bLayout = false );
      92                 :            : 
      93                 :            : protected:
      94                 :            :     virtual void    FillLayoutData() const;
      95                 :            :     virtual const Font&
      96                 :            :                     GetCanonicalFont( const StyleSettings& _rStyle ) const;
      97                 :            :     virtual const Color&
      98                 :            :                     GetCanonicalTextColor( const StyleSettings& _rStyle ) const;
      99                 :            : 
     100                 :            : public:
     101                 :            :                     FixedLine( Window* pParent, WinBits nStyle = WB_HORZ );
     102                 :            :                     FixedLine( Window* pParent, const ResId& rResId );
     103                 :            : 
     104                 :            :     virtual void    Paint( const Rectangle& rRect );
     105                 :            :     virtual void    Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
     106                 :            :     virtual void    Resize();
     107                 :            :     virtual void    StateChanged( StateChangedType nType );
     108                 :            :     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
     109                 :            : 
     110                 :            :     virtual Size    GetOptimalSize(WindowSizeType eType) const;
     111                 :            : };
     112                 :            : 
     113                 :            : // ---------------
     114                 :            : // - FixedBitmap -
     115                 :            : // ---------------
     116                 :            : 
     117                 :            : class VCL_DLLPUBLIC FixedBitmap : public Control
     118                 :            : {
     119                 :            : private:
     120                 :            :     Bitmap          maBitmap;
     121                 :            : 
     122                 :            :     using Control::ImplInitSettings;
     123                 :            :     using Window::ImplInit;
     124                 :            :     SAL_DLLPRIVATE void    ImplInit( Window* pParent, WinBits nStyle );
     125                 :            :     SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
     126                 :            :     SAL_DLLPRIVATE void    ImplInitSettings();
     127                 :            :     SAL_DLLPRIVATE void    ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
     128                 :            :                               const Point& rPos, const Size& rSize );
     129                 :            : 
     130                 :            : protected:
     131                 :            :     SAL_DLLPRIVATE void    ImplLoadRes( const ResId& rResId );
     132                 :            : 
     133                 :            : public:
     134                 :            :                     FixedBitmap( Window* pParent, WinBits nStyle = 0 );
     135                 :            :                     FixedBitmap( Window* pParent, const ResId& rResId );
     136                 :            :                     ~FixedBitmap();
     137                 :            : 
     138                 :            :     virtual void    Paint( const Rectangle& rRect );
     139                 :            :     virtual void    Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
     140                 :            :     virtual void    Resize();
     141                 :            :     virtual void    StateChanged( StateChangedType nType );
     142                 :            :     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
     143                 :            : 
     144                 :            :     void            SetBitmap( const Bitmap& rBitmap );
     145                 :            :     using OutputDevice::GetBitmap;
     146                 :            :     const Bitmap&   GetBitmap() const { return maBitmap; }
     147                 :            : };
     148                 :            : 
     149                 :            : // --------------
     150                 :            : // - FixedImage -
     151                 :            : // --------------
     152                 :            : 
     153                 :            : class VCL_DLLPUBLIC FixedImage : public Control
     154                 :            : {
     155                 :            : private:
     156                 :            :     Image           maImage;
     157                 :            :     sal_Bool            mbInUserDraw;
     158                 :            : 
     159                 :            : private:
     160                 :            :     using Control::ImplInitSettings;
     161                 :            :     using Window::ImplInit;
     162                 :            :     SAL_DLLPRIVATE void    ImplInit( Window* pParent, WinBits nStyle );
     163                 :            :     SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
     164                 :            :     SAL_DLLPRIVATE void    ImplInitSettings();
     165                 :            : 
     166                 :            : protected:
     167                 :            :     SAL_DLLPRIVATE void    ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
     168                 :            :                               const Point& rPos, const Size& rSize );
     169                 :            :     SAL_DLLPRIVATE void    ImplLoadRes( const ResId& rResId );
     170                 :            : 
     171                 :            : public:
     172                 :            :                     FixedImage( Window* pParent, WinBits nStyle = 0 );
     173                 :            :                     FixedImage( Window* pParent, const ResId& rResId );
     174                 :            :                     ~FixedImage();
     175                 :            : 
     176                 :            :     virtual void    Paint( const Rectangle& rRect );
     177                 :            :     virtual void    Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
     178                 :            :     virtual void    Resize();
     179                 :            :     virtual void    StateChanged( StateChangedType nType );
     180                 :            :     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
     181                 :            :     virtual void    UserDraw( const UserDrawEvent& rUDEvt );
     182                 :            :     virtual Size    GetOptimalSize(WindowSizeType eType) const;
     183                 :            : 
     184                 :            :     void            SetImage( const Image& rImage );
     185                 :            :     const Image&    GetImage() const { return maImage; }
     186                 :            : 
     187                 :            :     sal_Bool        SetModeImage( const Image& rImage );
     188                 :            :     const Image&    GetModeImage( ) const;
     189                 :            : ;
     190                 :            : };
     191                 :            : 
     192                 :            : #endif  // _SV_FIXED_HXX
     193                 :            : 
     194                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10