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