1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SVP_SVPFRAME_HXX 25 26 #include <vcl/sysdata.hxx> 27 28 #include <salframe.hxx> 29 #include "svpelement.hxx" 30 31 #include <list> 32 33 class SvpSalInstance; 34 class SvpSalGraphics; 35 36 class SvpSalFrame : public SalFrame, public SvpElement 37 { 38 SvpSalInstance* m_pInstance; 39 SvpSalFrame* m_pParent; // pointer to parent frame 40 std::list< SvpSalFrame* > m_aChildren; // List of child frames 41 sal_uLong m_nStyle; 42 bool m_bVisible; 43 long m_nMinWidth; 44 long m_nMinHeight; 45 long m_nMaxWidth; 46 long m_nMaxHeight; 47 48 SystemEnvData m_aSystemChildData; 49 50 basebmp::BitmapDeviceSharedPtr m_aFrame; 51 std::list< SvpSalGraphics* > m_aGraphics; 52 53 static SvpSalFrame* s_pFocusFrame; 54 public: 55 SvpSalFrame( SvpSalInstance* pInstance, 56 SalFrame* pParent, 57 sal_uLong nSalFrameStyle, 58 SystemParentData* pSystemParent = NULL ); 59 virtual ~SvpSalFrame(); 60 61 void GetFocus(); 62 void LoseFocus(); 63 void PostPaint() const; 64 65 // SvpElement getDevice() const66 virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aFrame; } 67 68 // SalFrame 69 virtual SalGraphics* GetGraphics(); 70 virtual void ReleaseGraphics( SalGraphics* pGraphics ); 71 72 virtual sal_Bool PostEvent( void* pData ); 73 74 virtual void SetTitle( const XubString& rTitle ); 75 virtual void SetIcon( sal_uInt16 nIcon ); 76 virtual void SetMenu( SalMenu* pMenu ); 77 virtual void DrawMenuBar(); 78 79 virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ); 80 virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = sal_False ); 81 virtual void Enable( sal_Bool bEnable ); 82 virtual void SetMinClientSize( long nWidth, long nHeight ); 83 virtual void SetMaxClientSize( long nWidth, long nHeight ); 84 virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ); 85 virtual void GetClientSize( long& rWidth, long& rHeight ); 86 virtual void GetWorkArea( Rectangle& rRect ); 87 virtual SalFrame* GetParent() const; 88 virtual void SetWindowState( const SalFrameState* pState ); 89 virtual sal_Bool GetWindowState( SalFrameState* pState ); 90 virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ); 91 virtual void StartPresentation( sal_Bool bStart ); 92 virtual void SetAlwaysOnTop( sal_Bool bOnTop ); 93 virtual void ToTop( sal_uInt16 nFlags ); 94 virtual void SetPointer( PointerStyle ePointerStyle ); 95 virtual void CaptureMouse( sal_Bool bMouse ); 96 virtual void SetPointerPos( long nX, long nY ); 97 using SalFrame::Flush; 98 virtual void Flush(); 99 virtual void Sync(); 100 virtual void SetInputContext( SalInputContext* pContext ); 101 virtual void EndExtTextInput( sal_uInt16 nFlags ); 102 virtual String GetKeyName( sal_uInt16 nKeyCode ); 103 virtual String GetSymbolKeyName( const XubString& rFontName, sal_uInt16 nKeyCode ); 104 virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); 105 virtual LanguageType GetInputLanguage(); 106 virtual SalBitmap* SnapShot(); 107 virtual void UpdateSettings( AllSettings& rSettings ); 108 virtual void Beep( SoundType eSoundType ); 109 virtual const SystemEnvData* GetSystemData() const; 110 virtual SalPointerState GetPointerState(); 111 virtual void SetParent( SalFrame* pNewParent ); 112 virtual bool SetPluginParent( SystemParentData* pNewParent ); 113 virtual void SetBackgroundBitmap( SalBitmap* pBitmap ); 114 virtual void ResetClipRegion(); 115 virtual void BeginSetClipRegion( sal_uLong nRects ); 116 virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); 117 virtual void EndSetClipRegion(); 118 119 /*TODO: functional implementation */ SetScreenNumber(unsigned int nScreen)120 virtual void SetScreenNumber( unsigned int nScreen ) { (void)nScreen; } 121 }; 122 #endif // _SVP_SVPFRAME_HXX 123