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 _SV_SALFRAME_H 29 #define _SV_SALFRAME_H 30 31 #include <vcl/sysdata.hxx> 32 #include <salframe.hxx> 33 34 #ifndef PM_BIDI_INCLUDED 35 #include <pmbidi.h> 36 #endif 37 38 #ifndef __UCONV_H__ 39 #include <uconv.h> 40 #endif 41 42 #ifndef __UNIDEF_H__ 43 #include <unidef.h> 44 #endif 45 46 #ifndef __UNIKBD_H__ 47 #include <unikbd.h> 48 #endif 49 50 //class SalFrame; 51 class Os2SalGraphics; 52 53 // ---------------- 54 // - SalFrameData - 55 // ---------------- 56 57 //class SalFrameData 58 class Os2SalFrame : public SalFrame 59 { 60 public: 61 HWND mhWndFrame; // HWND-Frame 62 HWND mhWndClient; // HWND-Client 63 HAB mhAB; // HAB 64 HPOINTER mhPointer; // Current MousePointer 65 void* mpInst; // VCL-Instance 66 //SALFRAMEPROC mpProc; // VCL-Proc 67 Os2SalGraphics* mpGraphics; // current frame graphics 68 Os2SalFrame* mpNextFrame; // pointer to next frame 69 SystemEnvData maSysData; // system data 70 SalFrameState maState; // frame state 71 int mnShowState; // show state 72 ULONG mnStyle; // SalFrameStyle 73 long mnWidth; // Window-Witdth 74 long mnHeight; // Window-Height 75 SWP maFullScreenRect; // WindowRect befor FullScreenMode 76 sal_Bool mbGraphics; // is Graphics used 77 sal_Bool mbAllwayOnTop; // Allways on top modus 78 sal_Bool mbVisible; // Visible Show/Hide-Status 79 sal_Bool mbMinHide; // hide called from OS2 80 sal_Bool mbHandleIME; // TRUE: Wir handeln die IME-Messages 81 sal_Bool mbConversionMode; // TRUE: Wir befinden uns im Conversion-Modus 82 sal_Bool mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus 83 sal_Bool mbCaption; // has window a caption 84 sal_Bool mbBorder; // has window a border 85 sal_Bool mbFixBorder; // has window a fixed border 86 sal_Bool mbSizeBorder; // has window a sizeable border 87 sal_Bool mbNoIcon; // is an window without an icon 88 sal_Bool mbFloatWin; // is a FloatingWindow 89 sal_Bool mbFullScreen; // TRUE: in full screen mode 90 sal_Bool mbPresentation; // TRUE: Presentation Mode running 91 sal_Bool mbInShow; // innerhalb eines Show-Aufrufs 92 sal_Bool mbRestoreMaximize; // Restore-Maximize 93 sal_Bool mbInMoveMsg; // Move-Message wird verarbeitet 94 sal_Bool mbInSizeMsg; // Size-Message wird verarbeitet 95 sal_Bool mbFullScreenToolWin; // WS_EX_TOOLWINDOW reset in FullScreenMode 96 sal_Bool mbDefPos; // default-position 97 sal_Bool mbOverwriteState; // TRUE: WindowState darf umgesetzt werden 98 99 int mnMinWidth; // min. client width in pixeln 100 int mnMinHeight; // min. client height in pixeln 101 int mnMaxWidth; // max. client width in pixeln 102 int mnMaxHeight; // max. client height in pixeln 103 static ULONG mnInputLang; // current Input Language 104 KHAND mnKeyboardHandle; // current unicode keyboard 105 static sal_Bool mbInReparent; // TRUE: ignore focus lost and gain due to reparenting 106 107 private: 108 Os2SalFrame* mpParentFrame; // parent frame pointer 109 110 public: 111 Os2SalFrame(); 112 virtual ~Os2SalFrame(); 113 114 virtual SalGraphics* GetGraphics(); 115 virtual void ReleaseGraphics( SalGraphics* pGraphics ); 116 virtual sal_Bool PostEvent( void* pData ); 117 virtual void SetTitle( const XubString& rTitle ); 118 virtual void SetIcon( USHORT nIcon ); 119 virtual void SetMenu( SalMenu* pSalMenu ); 120 virtual void DrawMenuBar(); 121 virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ); 122 virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = FALSE ); 123 virtual void Enable( sal_Bool bEnable ); 124 virtual void SetMinClientSize( long nWidth, long nHeight ); 125 virtual void SetMaxClientSize( long nWidth, long nHeight ); 126 virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ); 127 virtual void GetClientSize( long& rWidth, long& rHeight ); 128 virtual void GetWorkArea( RECTL& rRect ); 129 virtual void GetWorkArea( Rectangle& rRect ); 130 virtual SalFrame* GetParent() const; 131 virtual void SetWindowState( const SalFrameState* pState ); 132 virtual sal_Bool GetWindowState( SalFrameState* pState ); 133 virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ); 134 virtual void StartPresentation( sal_Bool bStart ); 135 virtual void SetAlwaysOnTop( sal_Bool bOnTop ); 136 virtual void ToTop( USHORT nFlags ); 137 virtual void SetPointer( PointerStyle ePointerStyle ); 138 virtual void CaptureMouse( sal_Bool bMouse ); 139 virtual void SetPointerPos( long nX, long nY ); 140 virtual void Flush(); 141 virtual void Sync(); 142 virtual void SetInputContext( SalInputContext* pContext ); 143 virtual void EndExtTextInput( USHORT nFlags ); 144 virtual String GetKeyName( USHORT nKeyCode ); 145 virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ); 146 virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); 147 virtual LanguageType GetInputLanguage(); 148 virtual SalBitmap* SnapShot(); 149 virtual void UpdateSettings( AllSettings& rSettings ); 150 virtual void Beep( SoundType eSoundType ); 151 virtual const SystemEnvData* GetSystemData() const; 152 virtual SalPointerState GetPointerState(); 153 virtual void SetParent( SalFrame* pNewParent ); 154 virtual bool SetPluginParent( SystemParentData* pNewParent ); 155 virtual void SetBackgroundBitmap( SalBitmap* ); 156 virtual void SetScreenNumber( unsigned int ); 157 virtual void ResetClipRegion(); 158 virtual void BeginSetClipRegion( ULONG nRects ); 159 virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); 160 virtual void EndSetClipRegion(); 161 162 }; 163 164 #endif // _SV_SALFRAME_H 165