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 _SV_SALFRAME_H 29*cdf0e10cSrcweir #define _SV_SALFRAME_H 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <vcl/sysdata.hxx> 32*cdf0e10cSrcweir #include <salframe.hxx> 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir class WinSalGraphics; 35*cdf0e10cSrcweir 36*cdf0e10cSrcweir // ---------------- 37*cdf0e10cSrcweir // - WinSalFrame - 38*cdf0e10cSrcweir // ---------------- 39*cdf0e10cSrcweir 40*cdf0e10cSrcweir class WinSalFrame : public SalFrame 41*cdf0e10cSrcweir { 42*cdf0e10cSrcweir public: 43*cdf0e10cSrcweir HWND mhWnd; // Window handle 44*cdf0e10cSrcweir HCURSOR mhCursor; // cursor handle 45*cdf0e10cSrcweir HIMC mhDefIMEContext; // default IME-Context 46*cdf0e10cSrcweir WinSalGraphics* mpGraphics; // current frame graphics 47*cdf0e10cSrcweir WinSalGraphics* mpGraphics2; // current frame graphics for other threads 48*cdf0e10cSrcweir WinSalFrame* mpNextFrame; // pointer to next frame 49*cdf0e10cSrcweir HMENU mSelectedhMenu; // the menu where highlighting is currently going on 50*cdf0e10cSrcweir HMENU mLastActivatedhMenu; // the menu that was most recently opened 51*cdf0e10cSrcweir SystemEnvData maSysData; // system data 52*cdf0e10cSrcweir SalFrameState maState; // frame state 53*cdf0e10cSrcweir int mnShowState; // show state 54*cdf0e10cSrcweir long mnWidth; // client width in pixeln 55*cdf0e10cSrcweir long mnHeight; // client height in pixeln 56*cdf0e10cSrcweir int mnMinWidth; // min. client width in pixeln 57*cdf0e10cSrcweir int mnMinHeight; // min. client height in pixeln 58*cdf0e10cSrcweir int mnMaxWidth; // max. client width in pixeln 59*cdf0e10cSrcweir int mnMaxHeight; // max. client height in pixeln 60*cdf0e10cSrcweir RECT maFullScreenRect; // fullscreen rect 61*cdf0e10cSrcweir int mnFullScreenShowState; // fullscreen restore show state 62*cdf0e10cSrcweir UINT mnInputLang; // current Input Language 63*cdf0e10cSrcweir UINT mnInputCodePage; // current Input CodePage 64*cdf0e10cSrcweir sal_uIntPtr mnStyle; // style 65*cdf0e10cSrcweir sal_Bool mbGraphics; // is Graphics used 66*cdf0e10cSrcweir sal_Bool mbCaption; // has window a caption 67*cdf0e10cSrcweir sal_Bool mbBorder; // has window a border 68*cdf0e10cSrcweir sal_Bool mbFixBorder; // has window a fixed border 69*cdf0e10cSrcweir sal_Bool mbSizeBorder; // has window a sizeable border 70*cdf0e10cSrcweir sal_Bool mbNoIcon; // is an window without an icon 71*cdf0e10cSrcweir sal_Bool mbFloatWin; // is a FloatingWindow 72*cdf0e10cSrcweir sal_Bool mbFullScreen; // TRUE: in full screen mode 73*cdf0e10cSrcweir sal_Bool mbPresentation; // TRUE: Presentation Mode running 74*cdf0e10cSrcweir sal_Bool mbInShow; // innerhalb eines Show-Aufrufs 75*cdf0e10cSrcweir sal_Bool mbRestoreMaximize; // Restore-Maximize 76*cdf0e10cSrcweir sal_Bool mbInMoveMsg; // Move-Message wird verarbeitet 77*cdf0e10cSrcweir sal_Bool mbInSizeMsg; // Size-Message wird verarbeitet 78*cdf0e10cSrcweir sal_Bool mbFullScreenToolWin; // WS_EX_TOOLWINDOW reset in FullScreenMode 79*cdf0e10cSrcweir sal_Bool mbDefPos; // default-position 80*cdf0e10cSrcweir sal_Bool mbOverwriteState; // TRUE: WindowState darf umgesetzt werden 81*cdf0e10cSrcweir sal_Bool mbIME; // TRUE: We are in IME Mode 82*cdf0e10cSrcweir sal_Bool mbHandleIME; // TRUE: Wir handeln die IME-Messages 83*cdf0e10cSrcweir sal_Bool mbSpezIME; // TRUE: Spez IME 84*cdf0e10cSrcweir sal_Bool mbAtCursorIME; // TRUE: Wir behandeln nur einige IME-Messages 85*cdf0e10cSrcweir sal_Bool mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus 86*cdf0e10cSrcweir static sal_Bool mbInReparent; // TRUE: ignore focus lost and gain due to reparenting 87*cdf0e10cSrcweir 88*cdf0e10cSrcweir RGNDATA* mpClipRgnData; 89*cdf0e10cSrcweir RECT* mpNextClipRect; 90*cdf0e10cSrcweir sal_Bool mbFirstClipRect; 91*cdf0e10cSrcweir sal_Int32 mnDisplay; // Display used for Fullscreen, 0 is primary monitor 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir void updateScreenNumber(); 94*cdf0e10cSrcweir public: 95*cdf0e10cSrcweir WinSalFrame(); 96*cdf0e10cSrcweir virtual ~WinSalFrame(); 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir virtual SalGraphics* GetGraphics(); 99*cdf0e10cSrcweir virtual void ReleaseGraphics( SalGraphics* pGraphics ); 100*cdf0e10cSrcweir virtual sal_Bool PostEvent( void* pData ); 101*cdf0e10cSrcweir virtual void SetTitle( const XubString& rTitle ); 102*cdf0e10cSrcweir virtual void SetIcon( sal_uInt16 nIcon ); 103*cdf0e10cSrcweir virtual void SetMenu( SalMenu* pSalMenu ); 104*cdf0e10cSrcweir virtual void DrawMenuBar(); 105*cdf0e10cSrcweir virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ); 106*cdf0e10cSrcweir virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = FALSE ); 107*cdf0e10cSrcweir virtual void Enable( sal_Bool bEnable ); 108*cdf0e10cSrcweir virtual void SetMinClientSize( long nWidth, long nHeight ); 109*cdf0e10cSrcweir virtual void SetMaxClientSize( long nWidth, long nHeight ); 110*cdf0e10cSrcweir virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ); 111*cdf0e10cSrcweir virtual void GetClientSize( long& rWidth, long& rHeight ); 112*cdf0e10cSrcweir virtual void GetWorkArea( Rectangle& rRect ); 113*cdf0e10cSrcweir virtual SalFrame* GetParent() const; 114*cdf0e10cSrcweir virtual void SetWindowState( const SalFrameState* pState ); 115*cdf0e10cSrcweir virtual sal_Bool GetWindowState( SalFrameState* pState ); 116*cdf0e10cSrcweir virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ); 117*cdf0e10cSrcweir virtual void StartPresentation( sal_Bool bStart ); 118*cdf0e10cSrcweir virtual void SetAlwaysOnTop( sal_Bool bOnTop ); 119*cdf0e10cSrcweir virtual void ToTop( sal_uInt16 nFlags ); 120*cdf0e10cSrcweir virtual void SetPointer( PointerStyle ePointerStyle ); 121*cdf0e10cSrcweir virtual void CaptureMouse( sal_Bool bMouse ); 122*cdf0e10cSrcweir virtual void SetPointerPos( long nX, long nY ); 123*cdf0e10cSrcweir using SalFrame::Flush; 124*cdf0e10cSrcweir virtual void Flush(); 125*cdf0e10cSrcweir virtual void Sync(); 126*cdf0e10cSrcweir virtual void SetInputContext( SalInputContext* pContext ); 127*cdf0e10cSrcweir virtual void EndExtTextInput( sal_uInt16 nFlags ); 128*cdf0e10cSrcweir virtual String GetKeyName( sal_uInt16 nKeyCode ); 129*cdf0e10cSrcweir virtual String GetSymbolKeyName( const XubString& rFontName, sal_uInt16 nKeyCode ); 130*cdf0e10cSrcweir virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); 131*cdf0e10cSrcweir virtual LanguageType GetInputLanguage(); 132*cdf0e10cSrcweir virtual SalBitmap* SnapShot(); 133*cdf0e10cSrcweir virtual void UpdateSettings( AllSettings& rSettings ); 134*cdf0e10cSrcweir virtual void Beep( SoundType eSoundType ); 135*cdf0e10cSrcweir virtual const SystemEnvData* GetSystemData() const; 136*cdf0e10cSrcweir virtual SalPointerState GetPointerState(); 137*cdf0e10cSrcweir virtual void SetParent( SalFrame* pNewParent ); 138*cdf0e10cSrcweir virtual bool SetPluginParent( SystemParentData* pNewParent ); 139*cdf0e10cSrcweir virtual void SetBackgroundBitmap( SalBitmap* ); 140*cdf0e10cSrcweir virtual void SetScreenNumber( unsigned int ); 141*cdf0e10cSrcweir virtual void ResetClipRegion(); 142*cdf0e10cSrcweir virtual void BeginSetClipRegion( sal_uIntPtr nRects ); 143*cdf0e10cSrcweir virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); 144*cdf0e10cSrcweir virtual void EndSetClipRegion(); 145*cdf0e10cSrcweir }; 146*cdf0e10cSrcweir 147*cdf0e10cSrcweir void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect ); 148*cdf0e10cSrcweir 149*cdf0e10cSrcweir #endif // _SV_SALFRAME_H 150