LCOV - code coverage report
Current view: top level - extensions/source/propctrlr - browserline.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 7 0.0 %
Date: 2012-08-25 Functions: 0 5 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 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 _EXTENSIONS_PROPCTRLR_BROWSERLINE_HXX_
      30                 :            : #define _EXTENSIONS_PROPCTRLR_BROWSERLINE_HXX_
      31                 :            : 
      32                 :            : #include <com/sun/star/inspection/XPropertyControl.hpp>
      33                 :            : #include <vcl/fixed.hxx>
      34                 :            : #include <vcl/button.hxx>
      35                 :            : 
      36                 :            : namespace com { namespace sun { namespace star { namespace inspection { namespace PropertyLineElement
      37                 :            : {
      38                 :            :     const sal_Int16 CompleteLine = 0x4000;
      39                 :            : } } } } }
      40                 :            : 
      41                 :            : //............................................................................
      42                 :            : namespace pcr
      43                 :            : {
      44                 :            : //............................................................................
      45                 :            : 
      46                 :            :     class OBrowserLine;
      47                 :            : 
      48                 :            :     //========================================================================
      49                 :          0 :     class IButtonClickListener
      50                 :            :     {
      51                 :            :     public:
      52                 :            :         virtual void    buttonClicked( OBrowserLine* _pLine, sal_Bool _bPrimary ) = 0;
      53                 :            : 
      54                 :            :     protected:
      55                 :          0 :         ~IButtonClickListener() {}
      56                 :            :     };
      57                 :            : 
      58                 :            :     //========================================================================
      59                 :            :     class OBrowserLine
      60                 :            :     {
      61                 :            :     private:
      62                 :            :         ::rtl::OUString         m_sEntryName;
      63                 :            :         FixedText               m_aFtTitle;
      64                 :            :         Size                    m_aOutputSize;
      65                 :            :         Point                   m_aLinePos;
      66                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >
      67                 :            :                                 m_xControl;
      68                 :            :         Window*                 m_pControlWindow;
      69                 :            :         PushButton*             m_pBrowseButton;
      70                 :            :         PushButton*             m_pAdditionalBrowseButton;
      71                 :            :         IButtonClickListener*   m_pClickListener;
      72                 :            :         Window*                 m_pTheParent;
      73                 :            :         sal_uInt16              m_nNameWidth;
      74                 :            :         sal_uInt16              m_nEnableFlags;
      75                 :            :         bool                    m_bIndentTitle;
      76                 :            :         bool                    m_bReadOnly;
      77                 :            : 
      78                 :            :     public:
      79                 :            :                             OBrowserLine( const ::rtl::OUString& _rEntryName, Window* pParent);
      80                 :            :                             ~OBrowserLine();
      81                 :            : 
      82                 :            :         void setControl( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& _rxControl );
      83                 :          0 :         const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& getControl() const
      84                 :            :         {
      85                 :          0 :             return m_xControl;
      86                 :            :         }
      87                 :          0 :         inline Window* getControlWindow() const
      88                 :            :         {
      89                 :          0 :             return m_pControlWindow;
      90                 :            :         }
      91                 :            : 
      92                 :            :         const ::rtl::OUString&
      93                 :          0 :                             GetEntryName() const { return m_sEntryName; }
      94                 :            : 
      95                 :            :         void                SetComponentHelpIds( const rtl::OString& _rHelpId, const rtl::OString& _sPrimaryButtonId, const rtl::OString& _sSecondaryButtonId );
      96                 :            : 
      97                 :            :         void                SetTitle(const String& rString );
      98                 :            :         void                FullFillTitleString();
      99                 :            :         String              GetTitle() const;
     100                 :            :         void                SetTitleWidth(sal_uInt16);
     101                 :            : 
     102                 :            :         void                SetPosSizePixel(Point aPos,Size aSize);
     103                 :            :         void                Show(sal_Bool bFlag=sal_True);
     104                 :            :         void                Hide();
     105                 :            :         sal_Bool            IsVisible();
     106                 :            : 
     107                 :            :         Window*             GetRefWindow();
     108                 :            :         void                SetTabOrder(Window* pRefWindow, sal_uInt16 nFlags );
     109                 :            : 
     110                 :            :         sal_Bool            GrabFocus();
     111                 :            :         void                ShowBrowseButton( const ::rtl::OUString& _rImageURL, sal_Bool _bPrimary );
     112                 :            :         void                ShowBrowseButton( const Image& _rImage, sal_Bool _bPrimary );
     113                 :            :         void                ShowBrowseButton( sal_Bool _bPrimary );
     114                 :            :         void                HideBrowseButton( sal_Bool _bPrimary );
     115                 :            : 
     116                 :            :         void                EnablePropertyControls( sal_Int16 _nControls, bool _bEnable );
     117                 :            :         void                EnablePropertyLine( bool _bEnable );
     118                 :            : 
     119                 :            :         void                SetReadOnly( bool _bReadOnly );
     120                 :            : 
     121                 :            :         void                SetClickListener( IButtonClickListener* _pListener );
     122                 :            : 
     123                 :            :         void                IndentTitle( bool _bIndent );
     124                 :            : 
     125                 :            :     private:
     126                 :            :         DECL_LINK( OnButtonClicked, PushButton* );
     127                 :            :         DECL_LINK( OnButtonFocus, PushButton* );
     128                 :            : 
     129                 :            :         void    implHideBrowseButton( sal_Bool _bPrimary, bool _bReLayout );
     130                 :            :         void    implUpdateEnabledDisabled();
     131                 :            : 
     132                 :            :         void    impl_layoutComponents();
     133                 :            : 
     134                 :            :         PushButton& impl_ensureButton( bool _bPrimary );
     135                 :            :         void        impl_getImagesFromURL_nothrow( const ::rtl::OUString& _rImageURL, Image& _out_rImage );
     136                 :            :     };
     137                 :            : 
     138                 :            : //............................................................................
     139                 :            : } // namespace pcr
     140                 :            : //............................................................................
     141                 :            : 
     142                 :            : #endif // _EXTENSIONS_PROPCTRLR_BROWSERLINE_HXX_
     143                 :            : 
     144                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10