1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_VCL_INC_WIN_SALFRAME_H
21 #define INCLUDED_VCL_INC_WIN_SALFRAME_H
23 #include <vcl/sysdata.hxx>
24 #include <salframe.hxx>
31 class WinSalFrame
: public SalFrame
34 HWND mhWnd
; // Window handle
35 HCURSOR mhCursor
; // cursor handle
36 HIMC mhDefIMEContext
; // default IME-Context
37 WinSalGraphics
* mpGraphics
; // current frame graphics
38 WinSalGraphics
* mpGraphics2
; // current frame graphics for other threads
39 WinSalFrame
* mpNextFrame
; // pointer to next frame
40 HMENU mSelectedhMenu
; // the menu where highlighting is currently going on
41 HMENU mLastActivatedhMenu
; // the menu that was most recently opened
42 SystemEnvData maSysData
; // system data
43 SalFrameState maState
; // frame state
44 int mnShowState
; // show state
45 long mnWidth
; // client width in pixeln
46 long mnHeight
; // client height in pixeln
47 int mnMinWidth
; // min. client width in pixeln
48 int mnMinHeight
; // min. client height in pixeln
49 int mnMaxWidth
; // max. client width in pixeln
50 int mnMaxHeight
; // max. client height in pixeln
51 RECT maFullScreenRect
; // fullscreen rect
52 int mnFullScreenShowState
; // fullscreen restore show state
53 UINT mnInputLang
; // current Input Language
54 UINT mnInputCodePage
; // current Input CodePage
55 sal_uIntPtr mnStyle
; // style
56 bool mbGraphics
; // is Graphics used
57 bool mbCaption
; // has window a caption
58 bool mbBorder
; // has window a border
59 bool mbFixBorder
; // has window a fixed border
60 bool mbSizeBorder
; // has window a sizeable border
61 bool mbNoIcon
; // is an window without an icon
62 bool mbFloatWin
; // is a FloatingWindow
63 bool mbFullScreen
; // TRUE: in full screen mode
64 bool mbPresentation
; // TRUE: Presentation Mode running
65 bool mbInShow
; // innerhalb eines Show-Aufrufs
66 bool mbRestoreMaximize
; // Restore-Maximize
67 bool mbInMoveMsg
; // Move-Message wird verarbeitet
68 bool mbInSizeMsg
; // Size-Message wird verarbeitet
69 bool mbFullScreenToolWin
; // WS_EX_TOOLWINDOW reset in FullScreenMode
70 bool mbDefPos
; // default-position
71 bool mbOverwriteState
; // TRUE: WindowState darf umgesetzt werden
72 bool mbIME
; // TRUE: We are in IME Mode
73 bool mbHandleIME
; // TRUE: Wir handeln die IME-Messages
74 bool mbSpezIME
; // TRUE: Spez IME
75 bool mbAtCursorIME
; // TRUE: Wir behandeln nur einige IME-Messages
76 bool mbCandidateMode
; // TRUE: Wir befinden uns im Candidate-Modus
77 static bool mbInReparent
; // TRUE: ignore focus lost and gain due to reparenting
79 RGNDATA
* mpClipRgnData
;
82 sal_Int32 mnDisplay
; // Display used for Fullscreen, 0 is primary monitor
83 bool mbPropertiesStored
; // has values stored in the window property store
85 void updateScreenNumber();
88 virtual ~WinSalFrame();
90 virtual SalGraphics
* AcquireGraphics() SAL_OVERRIDE
;
91 virtual void ReleaseGraphics( SalGraphics
* pGraphics
) SAL_OVERRIDE
;
92 virtual bool PostEvent( void* pData
) SAL_OVERRIDE
;
93 virtual void SetTitle( const OUString
& rTitle
) SAL_OVERRIDE
;
94 virtual void SetIcon( sal_uInt16 nIcon
) SAL_OVERRIDE
;
95 virtual void SetMenu( SalMenu
* pSalMenu
) SAL_OVERRIDE
;
96 virtual void DrawMenuBar() SAL_OVERRIDE
;
97 virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle
) SAL_OVERRIDE
;
98 virtual void Show( bool bVisible
, bool bNoActivate
= FALSE
) SAL_OVERRIDE
;
99 virtual void SetMinClientSize( long nWidth
, long nHeight
) SAL_OVERRIDE
;
100 virtual void SetMaxClientSize( long nWidth
, long nHeight
) SAL_OVERRIDE
;
101 virtual void SetPosSize( long nX
, long nY
, long nWidth
, long nHeight
, sal_uInt16 nFlags
) SAL_OVERRIDE
;
102 virtual void GetClientSize( long& rWidth
, long& rHeight
) SAL_OVERRIDE
;
103 virtual void GetWorkArea( Rectangle
& rRect
) SAL_OVERRIDE
;
104 virtual SalFrame
* GetParent() const SAL_OVERRIDE
;
105 virtual void SetWindowState( const SalFrameState
* pState
) SAL_OVERRIDE
;
106 virtual bool GetWindowState( SalFrameState
* pState
) SAL_OVERRIDE
;
107 virtual void ShowFullScreen( bool bFullScreen
, sal_Int32 nDisplay
) SAL_OVERRIDE
;
108 virtual void StartPresentation( bool bStart
) SAL_OVERRIDE
;
109 virtual void SetAlwaysOnTop( bool bOnTop
) SAL_OVERRIDE
;
110 virtual void ToTop( sal_uInt16 nFlags
) SAL_OVERRIDE
;
111 virtual void SetPointer( PointerStyle ePointerStyle
) SAL_OVERRIDE
;
112 virtual void CaptureMouse( bool bMouse
) SAL_OVERRIDE
;
113 virtual void SetPointerPos( long nX
, long nY
) SAL_OVERRIDE
;
114 using SalFrame::Flush
;
115 virtual void Flush() SAL_OVERRIDE
;
116 virtual void Sync() SAL_OVERRIDE
;
117 virtual void SetInputContext( SalInputContext
* pContext
) SAL_OVERRIDE
;
118 virtual void EndExtTextInput( sal_uInt16 nFlags
) SAL_OVERRIDE
;
119 virtual OUString
GetKeyName( sal_uInt16 nKeyCode
) SAL_OVERRIDE
;
120 virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode
, LanguageType aLangType
, vcl::KeyCode
& rKeyCode
) SAL_OVERRIDE
;
121 virtual LanguageType
GetInputLanguage() SAL_OVERRIDE
;
122 virtual void UpdateSettings( AllSettings
& rSettings
) SAL_OVERRIDE
;
123 virtual void Beep() SAL_OVERRIDE
;
124 virtual const SystemEnvData
* GetSystemData() const SAL_OVERRIDE
;
125 virtual SalPointerState
GetPointerState() SAL_OVERRIDE
;
126 virtual KeyIndicatorState
GetIndicatorState() SAL_OVERRIDE
;
127 virtual void SimulateKeyPress( sal_uInt16 nKeyCode
) SAL_OVERRIDE
;
128 virtual void SetParent( SalFrame
* pNewParent
) SAL_OVERRIDE
;
129 virtual bool SetPluginParent( SystemParentData
* pNewParent
) SAL_OVERRIDE
;
130 virtual void SetScreenNumber( unsigned int ) SAL_OVERRIDE
;
131 virtual void SetApplicationID( const OUString
&rApplicationID
) SAL_OVERRIDE
;
132 virtual void ResetClipRegion() SAL_OVERRIDE
;
133 virtual void BeginSetClipRegion( sal_uIntPtr nRects
) SAL_OVERRIDE
;
134 virtual void UnionClipRegion( long nX
, long nY
, long nWidth
, long nHeight
) SAL_OVERRIDE
;
135 virtual void EndSetClipRegion() SAL_OVERRIDE
;
138 void ImplSalGetWorkArea( HWND hWnd
, RECT
*pRect
, const RECT
*pParentRect
);
140 // get foreign key names
142 OUString
getKeysReplacementName(
147 #endif // INCLUDED_VCL_INC_WIN_SALFRAME_H
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */