LCOV - code coverage report
Current view: top level - vcl/inc/headless - svpframe.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 3 0.0 %
Date: 2014-04-14 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             : 
      20             : #ifndef INCLUDED_VCL_INC_HEADLESS_SVPFRAME_HXX
      21             : #define INCLUDED_VCL_INC_HEADLESS_SVPFRAME_HXX
      22             : 
      23             : #include <vcl/sysdata.hxx>
      24             : #include <basegfx/range/b2ibox.hxx>
      25             : #include <basebmp/bitmapdevice.hxx>
      26             : 
      27             : #include <salframe.hxx>
      28             : 
      29             : #include <list>
      30             : 
      31             : #ifdef IOS
      32             : #define SvpSalGraphics AquaSalGraphics
      33             : #define SvpSalInstance AquaSalInstance
      34             : #endif
      35             : 
      36             : class SvpSalInstance;
      37             : class SvpSalGraphics;
      38             : 
      39             : class SvpSalFrame : public SalFrame
      40             : {
      41             :     SvpSalInstance*                     m_pInstance;
      42             :     SvpSalFrame*                        m_pParent;       // pointer to parent frame
      43             :     std::list< SvpSalFrame* >           m_aChildren;     // List of child frames
      44             :     sal_uLong                           m_nStyle;
      45             :     bool                                m_bVisible;
      46             :     bool                                m_bDamageTracking;
      47             :     bool                                m_bTopDown;
      48             :     basebmp::Format                     m_nScanlineFormat;
      49             :     long                                m_nMinWidth;
      50             :     long                                m_nMinHeight;
      51             :     long                                m_nMaxWidth;
      52             :     long                                m_nMaxHeight;
      53             : 
      54             :     SystemEnvData                       m_aSystemChildData;
      55             : 
      56             :     basebmp::BitmapDeviceSharedPtr      m_aFrame;
      57             :     std::list< SvpSalGraphics* >        m_aGraphics;
      58             : 
      59             :     static SvpSalFrame*       s_pFocusFrame;
      60             : public:
      61             :     SvpSalFrame( SvpSalInstance* pInstance,
      62             :                  SalFrame* pParent,
      63             :                  sal_uLong nSalFrameStyle,
      64             :                  bool      bTopDown,
      65             :                  basebmp::Format nScanlineFormat,
      66             :                  SystemParentData* pSystemParent = NULL );
      67             :     virtual ~SvpSalFrame();
      68             : 
      69             :     void GetFocus();
      70             :     void LoseFocus();
      71             :     void PostPaint(bool bImmediate) const;
      72             :     void AllocateFrame();
      73             : 
      74             : #if defined IOS || defined ANDROID
      75             :     const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aFrame; }
      76             : #endif
      77             : 
      78             :     // SalFrame
      79             :     virtual SalGraphics*        AcquireGraphics() SAL_OVERRIDE;
      80             :     virtual void                ReleaseGraphics( SalGraphics* pGraphics ) SAL_OVERRIDE;
      81             : 
      82             :     virtual bool                PostEvent( void* pData ) SAL_OVERRIDE;
      83             : 
      84             :     virtual void                SetTitle( const OUString& rTitle ) SAL_OVERRIDE;
      85             :     virtual void                SetIcon( sal_uInt16 nIcon ) SAL_OVERRIDE;
      86             :     virtual void                SetMenu( SalMenu* pMenu ) SAL_OVERRIDE;
      87             :     virtual void                DrawMenuBar() SAL_OVERRIDE;
      88             : 
      89             :     virtual void                SetExtendedFrameStyle( SalExtStyle nExtStyle ) SAL_OVERRIDE;
      90             :     virtual void                Show( bool bVisible, bool bNoActivate = false ) SAL_OVERRIDE;
      91             :     virtual void                Enable( bool bEnable ) SAL_OVERRIDE;
      92             :     virtual void                SetMinClientSize( long nWidth, long nHeight ) SAL_OVERRIDE;
      93             :     virtual void                SetMaxClientSize( long nWidth, long nHeight ) SAL_OVERRIDE;
      94             :     virtual void                SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) SAL_OVERRIDE;
      95             :     virtual void                GetClientSize( long& rWidth, long& rHeight ) SAL_OVERRIDE;
      96             :     virtual void                GetWorkArea( Rectangle& rRect ) SAL_OVERRIDE;
      97             :     virtual SalFrame*           GetParent() const SAL_OVERRIDE;
      98             :     virtual void                SetWindowState( const SalFrameState* pState ) SAL_OVERRIDE;
      99             :     virtual bool                GetWindowState( SalFrameState* pState ) SAL_OVERRIDE;
     100             :     virtual void                ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay ) SAL_OVERRIDE;
     101             :     virtual void                StartPresentation( bool bStart ) SAL_OVERRIDE;
     102             :     virtual void                SetAlwaysOnTop( bool bOnTop ) SAL_OVERRIDE;
     103             :     virtual void                ToTop( sal_uInt16 nFlags ) SAL_OVERRIDE;
     104             :     virtual void                SetPointer( PointerStyle ePointerStyle ) SAL_OVERRIDE;
     105             :     virtual void                CaptureMouse( bool bMouse ) SAL_OVERRIDE;
     106             :     virtual void                SetPointerPos( long nX, long nY ) SAL_OVERRIDE;
     107             :     using SalFrame::Flush;
     108             :     virtual void                Flush() SAL_OVERRIDE;
     109             :     virtual void                Sync() SAL_OVERRIDE;
     110             :     virtual void                SetInputContext( SalInputContext* pContext ) SAL_OVERRIDE;
     111             :     virtual void                EndExtTextInput( sal_uInt16 nFlags ) SAL_OVERRIDE;
     112             :     virtual OUString            GetKeyName( sal_uInt16 nKeyCode ) SAL_OVERRIDE;
     113             :     virtual bool                MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) SAL_OVERRIDE;
     114             :     virtual LanguageType        GetInputLanguage() SAL_OVERRIDE;
     115             :     virtual void                UpdateSettings( AllSettings& rSettings ) SAL_OVERRIDE;
     116             :     virtual void                Beep() SAL_OVERRIDE;
     117             :     virtual const SystemEnvData* GetSystemData() const SAL_OVERRIDE;
     118             :     virtual SalPointerState     GetPointerState() SAL_OVERRIDE;
     119             :     virtual SalIndicatorState   GetIndicatorState() SAL_OVERRIDE;
     120             :     virtual void                SimulateKeyPress( sal_uInt16 nKeyCode ) SAL_OVERRIDE;
     121             :     virtual void                SetParent( SalFrame* pNewParent ) SAL_OVERRIDE;
     122             :     virtual bool                SetPluginParent( SystemParentData* pNewParent ) SAL_OVERRIDE;
     123             :     virtual void                ResetClipRegion() SAL_OVERRIDE;
     124             :     virtual void                BeginSetClipRegion( sal_uLong nRects ) SAL_OVERRIDE;
     125             :     virtual void                UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) SAL_OVERRIDE;
     126             :     virtual void                EndSetClipRegion() SAL_OVERRIDE;
     127             : 
     128             :     // If enabled we can get damage notifications for regions immediately rendered to ...
     129             :     virtual void                enableDamageTracker( bool bOn = true );
     130           0 :     virtual void                damaged( const basegfx::B2IBox& /* rDamageRect */) {}
     131             : 
     132             :     /*TODO: functional implementation */
     133           0 :     virtual void                SetScreenNumber( unsigned int nScreen ) SAL_OVERRIDE { (void)nScreen; }
     134           0 :     virtual void                SetApplicationID(const OUString &rApplicationID) SAL_OVERRIDE { (void) rApplicationID; }
     135             :     bool                        IsVisible() { return m_bVisible; }
     136             : 
     137             :     static SvpSalFrame*         GetFocusFrame() { return s_pFocusFrame; }
     138             : 
     139             : };
     140             : 
     141             : #endif // INCLUDED_VCL_INC_HEADLESS_SVPFRAME_HXX
     142             : 
     143             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10