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