1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #ifndef _SVP_SVPFRAME_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir #include <vcl/sysdata.hxx> 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir #include <salframe.hxx> 33*cdf0e10cSrcweir #include "svpelement.hxx" 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir #include <list> 36*cdf0e10cSrcweir 37*cdf0e10cSrcweir class SvpSalInstance; 38*cdf0e10cSrcweir class SvpSalGraphics; 39*cdf0e10cSrcweir 40*cdf0e10cSrcweir class SvpSalFrame : public SalFrame, public SvpElement 41*cdf0e10cSrcweir { 42*cdf0e10cSrcweir SvpSalInstance* m_pInstance; 43*cdf0e10cSrcweir SvpSalFrame* m_pParent; // pointer to parent frame 44*cdf0e10cSrcweir std::list< SvpSalFrame* > m_aChildren; // List of child frames 45*cdf0e10cSrcweir sal_uLong m_nStyle; 46*cdf0e10cSrcweir bool m_bVisible; 47*cdf0e10cSrcweir long m_nMinWidth; 48*cdf0e10cSrcweir long m_nMinHeight; 49*cdf0e10cSrcweir long m_nMaxWidth; 50*cdf0e10cSrcweir long m_nMaxHeight; 51*cdf0e10cSrcweir 52*cdf0e10cSrcweir SystemEnvData m_aSystemChildData; 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir basebmp::BitmapDeviceSharedPtr m_aFrame; 55*cdf0e10cSrcweir std::list< SvpSalGraphics* > m_aGraphics; 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir static SvpSalFrame* s_pFocusFrame; 58*cdf0e10cSrcweir public: 59*cdf0e10cSrcweir SvpSalFrame( SvpSalInstance* pInstance, 60*cdf0e10cSrcweir SalFrame* pParent, 61*cdf0e10cSrcweir sal_uLong nSalFrameStyle, 62*cdf0e10cSrcweir SystemParentData* pSystemParent = NULL ); 63*cdf0e10cSrcweir virtual ~SvpSalFrame(); 64*cdf0e10cSrcweir 65*cdf0e10cSrcweir void GetFocus(); 66*cdf0e10cSrcweir void LoseFocus(); 67*cdf0e10cSrcweir void PostPaint() const; 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir // SvpElement 70*cdf0e10cSrcweir virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aFrame; } 71*cdf0e10cSrcweir 72*cdf0e10cSrcweir // SalFrame 73*cdf0e10cSrcweir virtual SalGraphics* GetGraphics(); 74*cdf0e10cSrcweir virtual void ReleaseGraphics( SalGraphics* pGraphics ); 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir virtual sal_Bool PostEvent( void* pData ); 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir virtual void SetTitle( const XubString& rTitle ); 79*cdf0e10cSrcweir virtual void SetIcon( sal_uInt16 nIcon ); 80*cdf0e10cSrcweir virtual void SetMenu( SalMenu* pMenu ); 81*cdf0e10cSrcweir virtual void DrawMenuBar(); 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ); 84*cdf0e10cSrcweir virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = sal_False ); 85*cdf0e10cSrcweir virtual void Enable( sal_Bool bEnable ); 86*cdf0e10cSrcweir virtual void SetMinClientSize( long nWidth, long nHeight ); 87*cdf0e10cSrcweir virtual void SetMaxClientSize( long nWidth, long nHeight ); 88*cdf0e10cSrcweir virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ); 89*cdf0e10cSrcweir virtual void GetClientSize( long& rWidth, long& rHeight ); 90*cdf0e10cSrcweir virtual void GetWorkArea( Rectangle& rRect ); 91*cdf0e10cSrcweir virtual SalFrame* GetParent() const; 92*cdf0e10cSrcweir virtual void SetWindowState( const SalFrameState* pState ); 93*cdf0e10cSrcweir virtual sal_Bool GetWindowState( SalFrameState* pState ); 94*cdf0e10cSrcweir virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ); 95*cdf0e10cSrcweir virtual void StartPresentation( sal_Bool bStart ); 96*cdf0e10cSrcweir virtual void SetAlwaysOnTop( sal_Bool bOnTop ); 97*cdf0e10cSrcweir virtual void ToTop( sal_uInt16 nFlags ); 98*cdf0e10cSrcweir virtual void SetPointer( PointerStyle ePointerStyle ); 99*cdf0e10cSrcweir virtual void CaptureMouse( sal_Bool bMouse ); 100*cdf0e10cSrcweir virtual void SetPointerPos( long nX, long nY ); 101*cdf0e10cSrcweir using SalFrame::Flush; 102*cdf0e10cSrcweir virtual void Flush(); 103*cdf0e10cSrcweir virtual void Sync(); 104*cdf0e10cSrcweir virtual void SetInputContext( SalInputContext* pContext ); 105*cdf0e10cSrcweir virtual void EndExtTextInput( sal_uInt16 nFlags ); 106*cdf0e10cSrcweir virtual String GetKeyName( sal_uInt16 nKeyCode ); 107*cdf0e10cSrcweir virtual String GetSymbolKeyName( const XubString& rFontName, sal_uInt16 nKeyCode ); 108*cdf0e10cSrcweir virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); 109*cdf0e10cSrcweir virtual LanguageType GetInputLanguage(); 110*cdf0e10cSrcweir virtual SalBitmap* SnapShot(); 111*cdf0e10cSrcweir virtual void UpdateSettings( AllSettings& rSettings ); 112*cdf0e10cSrcweir virtual void Beep( SoundType eSoundType ); 113*cdf0e10cSrcweir virtual const SystemEnvData* GetSystemData() const; 114*cdf0e10cSrcweir virtual SalPointerState GetPointerState(); 115*cdf0e10cSrcweir virtual void SetParent( SalFrame* pNewParent ); 116*cdf0e10cSrcweir virtual bool SetPluginParent( SystemParentData* pNewParent ); 117*cdf0e10cSrcweir virtual void SetBackgroundBitmap( SalBitmap* pBitmap ); 118*cdf0e10cSrcweir virtual void ResetClipRegion(); 119*cdf0e10cSrcweir virtual void BeginSetClipRegion( sal_uLong nRects ); 120*cdf0e10cSrcweir virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); 121*cdf0e10cSrcweir virtual void EndSetClipRegion(); 122*cdf0e10cSrcweir 123*cdf0e10cSrcweir /*TODO: functional implementation */ 124*cdf0e10cSrcweir virtual void SetScreenNumber( unsigned int nScreen ) { (void)nScreen; } 125*cdf0e10cSrcweir }; 126*cdf0e10cSrcweir #endif // _SVP_SVPFRAME_HXX 127