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