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