ReactOS 0.4.15-dev-8222-g9164419
CDefCompFrameWindow Class Reference

#include <ui.h>

Inheritance diagram for CDefCompFrameWindow:
Collaboration diagram for CDefCompFrameWindow:

Public Member Functions

 CDefCompFrameWindow (HIMC hIMC, DWORD style)
 @implemented
 
 ~CDefCompFrameWindow () override
 @implemented
 
void Init ()
 @implemented
 
INT GetGripperWidth ()
 @implemented
 
void MyScreenToClient (LPPOINT ppt, LPRECT prc)
 @implemented
 
void SetCompStrRect (INT nWidth, INT nHeight, BOOL bShow)
 @implemented
 
void LoadPosition ()
 @implemented
 
void SavePosition ()
 @implemented
 
 STDMETHOD_ (void, OnCreate)(HWND hWnd) override
 
 STDMETHOD_ (BOOL, OnSetCursor)(UINT uMsg
 
 STDMETHOD_ (LRESULT, OnWindowPosChanged)(HWND hWnd
 
 STDMETHOD_ (void, HandleMouseMsg)(UINT uMsg
 
- Public Member Functions inherited from CCompFrameWindow
 CCompFrameWindow (HIMC hIMC, DWORD style)
 @implemented
 
- Public Member Functions inherited from CUIFWindow
 operator HWND () const
 
 CUIFWindow (HINSTANCE hInst, DWORD style)
 
 ~CUIFWindow () override
 
 STDMETHOD_ (BOOL, Initialize)() override
 
 STDMETHOD_ (void, Show)(BOOL bVisible) override
 
 STDMETHOD_ (void, SetRect)(LPCRECT prc) override
 
 STDMETHOD_ (void, PaintObject)(HDC hDC
 
 STDMETHOD_ (void, RemoveUIObj)(CUIFObject *pRemove) override
 
void SetCaptureObject (CUIFObject *pCaptured)
 
void SetObjectPointed (CUIFObject *pPointed, POINT pt)
 
void CreateScheme ()
 
BOOL GetWorkArea (LPCRECT prcWnd, LPRECT prcWorkArea)
 
void AdjustWindowPosition ()
 
void SetBehindModal (CUIFWindow *pBehindModal)
 
void SetTimerObject (CUIFObject *pTimerObject, UINT uElapse)
 
 STDMETHOD_ (LPCTSTR, GetClassName)()
 
 STDMETHOD_ (LPCTSTR, GetWndTitle)()
 
 STDMETHOD_ (DWORD, GetWndStyle)()
 
 STDMETHOD_ (DWORD, GetWndStyleEx)()
 
 STDMETHOD_ (HWND, CreateWnd)(HWND hwndParent)
 
 STDMETHOD_ (void, Move)(INT x
 
 STDMETHOD_ (BOOL, AnimateWnd)(DWORD dwTime
 
 STDMETHOD_ (void, OnObjectMoved)(CUIFObject *pObject)
 
 STDMETHOD_ (void, OnMouseOutFromWindow)(LONG x
 
 STDMETHOD_ (LRESULT, OnDisplayChange)(HWND hWnd
 
 STDMETHOD_ (HRESULT, OnGetObject)(HWND hWnd
 
 STDMETHOD_ (LRESULT, WindowProc)(HWND hWnd
 
 STDMETHOD_ (BOOL, OnEraseBkGnd)(HWND hWnd
 
 STDMETHOD_ (void, OnThemeChanged)(HWND hWnd
 
 STDMETHOD_ (void, UpdateUI)(LPCRECT prc)
 
 STDMETHOD_ (void, SetCapture)(int)
 
 STDMETHOD_ (void, ModalMouseNotify)(UINT uMsg
 
 STDMETHOD_ (void, HandleMouseMsg)(UINT uMsg
 
 STDMETHOD_ (void, ClientRectToWindowRect)(LPRECT pRect)
 
 STDMETHOD_ (void, GetWindowFrameSize)(LPSIZE pSize)
 
- Public Member Functions inherited from CUIFObject
 CUIFObject (CUIFObject *pParent, DWORD nObjectID, LPCRECT prc, DWORD style)
 @unimplemented
 
virtual ~CUIFObject ()
 
void StartCapture ()
 
void EndCapture ()
 
BOOL IsCapture ()
 
BOOL IsRTL ()
 
LRESULT NotifyCommand (WPARAM wParam, LPARAM lParam)
 
CUIFObjectObjectFromPoint (POINT pt)
 
void SetScheme (CUIFScheme *scheme)
 
void StartTimer (WPARAM wParam)
 
void EndTimer ()
 
 STDMETHOD_ (BOOL, Initialize)()
 
 STDMETHOD_ (void, OnPaint)(HDC hDC)
 
 STDMETHOD_ (void, OnTimer)()
 
 STDMETHOD_ (void, OnLButtonDown)(LONG x
 
 STDMETHOD_ (void, GetRect)(LPRECT prc)
 
 STDMETHOD_ (void, SetRect)(LPCRECT prc)
 
 STDMETHOD_ (BOOL, PtInObject)(POINT pt)
 
 STDMETHOD_ (void, PaintObject)(HDC hDC
 
 STDMETHOD_ (void, CallOnPaint)()
 
 STDMETHOD_ (void, Enable)(BOOL bEnable)
 
 STDMETHOD_ (void, Show)(BOOL bVisible)
 
 STDMETHOD_ (void, SetFontToThis)(HFONT hFont)
 
 STDMETHOD_ (void, SetFont)(HFONT hFont)
 
 STDMETHOD_ (void, SetStyle)(DWORD style)
 
 STDMETHOD_ (void, AddUIObj)(CUIFObject *pObject)
 
 STDMETHOD_ (void, RemoveUIObj)(CUIFObject *pObject)
 
 STDMETHOD_ (LRESULT, OnObjectNotify)(CUIFObject *pObject
 
 STDMETHOD_ (void, SetToolTip)(LPCWSTR pszToolTip)
 
 STDMETHOD_ (LPCWSTR, GetToolTip)()
 
 STDMETHOD_ (LRESULT, OnShowToolTip)()
 
 STDMETHOD_ (void, OnHideToolTip)()
 
 STDMETHOD_ (void, DetachWndObj)()
 
 STDMETHOD_ (void, ClearWndObj)()
 
 STDMETHOD_ (BOOL, OnPaintTheme)(HDC hDC)
 
 STDMETHOD_ (void, OnPaintNoTheme)(HDC hDC)
 
 STDMETHOD_ (void, ClearTheme)()
 
- Public Member Functions inherited from CUIFTheme
HRESULT InternalOpenThemeData (HWND hWnd)
 
HRESULT EnsureThemeData (HWND hWnd)
 
HRESULT CloseThemeData ()
 
STDMETHOD() DrawThemeBackground (HDC hDC, int iStateId, LPCRECT pRect, LPCRECT pClipRect)
 
STDMETHOD() DrawThemeParentBackground (HWND hwnd, HDC hDC, LPRECT prc)
 
STDMETHOD() DrawThemeText (HDC hDC, int iStateId, LPCWSTR pszText, int cchText, DWORD dwTextFlags, DWORD dwTextFlags2, LPCRECT pRect)
 
STDMETHOD() DrawThemeIcon (HDC hDC, int iStateId, LPCRECT pRect, HIMAGELIST himl, int iImageIndex)
 
STDMETHOD() GetThemeBackgroundExtent (HDC hDC, int iStateId, LPCRECT pContentRect, LPRECT pExtentRect)
 
STDMETHOD() GetThemeBackgroundContentRect (HDC hDC, int iStateId, LPCRECT pBoundingRect, LPRECT pContentRect)
 
STDMETHOD() GetThemeTextExtent (HDC hDC, int iStateId, LPCWSTR pszText, int cchCharCount, DWORD dwTextFlags, LPCRECT pBoundingRect, LPRECT pExtentRect)
 
STDMETHOD() GetThemePartSize (HDC hDC, int iStateId, LPRECT prc, THEMESIZE eSize, SIZE *psz)
 
STDMETHOD() DrawThemeEdge (HDC hDC, int iStateId, LPCRECT pDestRect, UINT uEdge, UINT uFlags, LPRECT pContentRect)
 
STDMETHOD() GetThemeColor (int iStateId, int iPropId, COLORREF *pColor)
 
STDMETHOD() GetThemeMargins (HDC hDC, int iStateId, int iPropId, LPRECT prc, MARGINS *pMargins)
 
STDMETHOD() GetThemeFont (HDC hDC, int iStateId, int iPropId, LOGFONTW *pFont)
 
 STDMETHOD_ (COLORREF, GetThemeSysColor)(INT iColorId)
 
 STDMETHOD_ (int, GetThemeSysSize)(int iSizeId)
 
 STDMETHOD_ (void, SetActiveTheme)(LPCWSTR pszClassList
 

Public Attributes

HWND m_hwndCompStr
 
CDefCompFrameGripperm_pGripper
 
CCompFinalizeButtonm_pFinalizeButton
 
MARGINS m_Margins
 
LONG x
 
LONG LONG y override
 
UINT uMsg
 
UINT WPARAM wParam
 
UINT WPARAM LPARAM lParam override
 
- Public Attributes inherited from CCompFrameWindow
HIMC m_hIMC
 
- Public Attributes inherited from CUIFWindow
LPCRECT prc override
 
INT y
 
INT INT nWidth
 
INT INT INT nHeight
 
DWORD dwFlags
 
LONG y
 
UINT uMsg
 
UINT WPARAM wParam
 
UINT WPARAM LPARAM lParam { return 0
 
WPARAM wParam
 
WPARAM LPARAM lParam
 
LONG x
 
LONG LONG y
 
- Public Attributes inherited from CUIFObject
LONG y
 
LPCRECT prc
 
WPARAM wParam
 
WPARAM LPARAM lParam
 
- Public Attributes inherited from CUIFTheme
LPCWSTR m_pszClassList
 
INT m_iPartId
 
INT m_iStateId
 
HTHEME m_hTheme
 
INT iPartId
 
INT INT iStateId
 

Additional Inherited Members

- Public Types inherited from CUIFWindow
enum  { POINTING_TIMER_ID = 0x7982 , USER_TIMER_ID = 0x5461 }
 
- Static Public Member Functions inherited from CUIFWindow
static CUIFWindowGetThis (HWND hWnd)
 
static void SetThis (HWND hWnd, LONG_PTR dwNewLong)
 
static LRESULT CALLBACK WindowProcedure (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
- Static Public Attributes inherited from CUIFTheme
static HINSTANCE s_hUXTHEME = NULL
 
static FN_OpenThemeData s_fnOpenThemeData = NULL
 
static FN_CloseThemeData s_fnCloseThemeData = NULL
 
static FN_DrawThemeBackground s_fnDrawThemeBackground = NULL
 
static FN_DrawThemeParentBackground s_fnDrawThemeParentBackground = NULL
 
static FN_DrawThemeText s_fnDrawThemeText = NULL
 
static FN_DrawThemeIcon s_fnDrawThemeIcon = NULL
 
static FN_GetThemeBackgroundExtent s_fnGetThemeBackgroundExtent = NULL
 
static FN_GetThemeBackgroundContentRect s_fnGetThemeBackgroundContentRect = NULL
 
static FN_GetThemeTextExtent s_fnGetThemeTextExtent = NULL
 
static FN_GetThemePartSize s_fnGetThemePartSize = NULL
 
static FN_DrawThemeEdge s_fnDrawThemeEdge = NULL
 
static FN_GetThemeColor s_fnGetThemeColor = NULL
 
static FN_GetThemeMargins s_fnGetThemeMargins = NULL
 
static FN_GetThemeFont s_fnGetThemeFont = NULL
 
static FN_GetThemeSysColor s_fnGetThemeSysColor = NULL
 
static FN_GetThemeSysSize s_fnGetThemeSysSize = NULL
 
- Protected Attributes inherited from CUIFWindow
INT m_nLeft
 
INT m_nTop
 
INT m_nHeight
 
INT m_nWidth
 
HINSTANCE m_hInst
 
HWND m_hWnd
 
CUIFObjectm_pTimerObject
 
CUIFObjectm_pCaptured
 
CUIFObjectm_pPointed
 
BOOL m_bPointing
 
CUIFWindowm_pBehindModal
 
CUIFToolTipm_pToolTip
 
CUIFShadowm_pShadow
 
BOOL m_bShowShadow
 
- Protected Attributes inherited from CUIFObject
CUIFObjectm_pParent
 
CUIFWindowm_pWindow
 
CUIFSchemem_pScheme
 
CUIFObjectArray m_ObjectArray
 
DWORD m_nObjectID
 
DWORD m_style
 
RECT m_rc
 
BOOL m_bEnable
 
BOOL m_bVisible
 
HFONT m_hFont
 
BOOL m_bHasCustomFont
 
LPWSTR m_pszToolTip
 
DWORD m_dwUnknown4 [2]
 

Detailed Description

Definition at line 92 of file ui.h.

Constructor & Destructor Documentation

◆ CDefCompFrameWindow()

CDefCompFrameWindow::CDefCompFrameWindow ( HIMC  hIMC,
DWORD  style 
)

@implemented

Definition at line 185 of file ui.cpp.

186 : CCompFrameWindow(hIMC, style)
187{
188 LoadPosition();
189 m_iPartId = 1;
190 m_iStateId = 1;
191 m_pszClassList = L"TASKBAR";
192}
Arabic default style
Definition: afstyles.h:94
void LoadPosition()
@implemented
Definition: ui.cpp:295
LPCWSTR m_pszClassList
Definition: cicuif.h:90
INT m_iStateId
Definition: cicuif.h:92
INT m_iPartId
Definition: cicuif.h:91
#define L(x)
Definition: ntvdm.h:50

◆ ~CDefCompFrameWindow()

CDefCompFrameWindow::~CDefCompFrameWindow ( )
override

@implemented

Definition at line 195 of file ui.cpp.

196{
197 SavePosition();
198}
void SavePosition()
@implemented
Definition: ui.cpp:313

Member Function Documentation

◆ GetGripperWidth()

INT CDefCompFrameWindow::GetGripperWidth ( )

@implemented

Definition at line 232 of file ui.cpp.

233{
235 return 5;
236
237 INT ret = -1;
239 SIZE partSize;
240 if (SUCCEEDED(m_pGripper->GetThemePartSize(hDC, 1, 0, TS_TRUE, &partSize)))
241 ret = partSize.cx + 4;
242
244
245 return ((ret < 0) ? 5 : ret);
246}
static HDC hDC
Definition: 3dtext.c:33
@ TS_TRUE
CDefCompFrameGripper * m_pGripper
Definition: ui.h:96
STDMETHOD() GetThemePartSize(HDC hDC, int iStateId, LPRECT prc, THEMESIZE eSize, SIZE *psz)
Definition: cicuif.cpp:154
HRESULT EnsureThemeData(HWND hWnd)
Definition: cicuif.cpp:77
HWND m_hWnd
Definition: cicuif.h:518
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
static HDC
Definition: imagelist.c:92
LONG cx
Definition: kdterminal.h:27
int32_t INT
Definition: typedefs.h:58
int ret
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)

Referenced by SetCompStrRect().

◆ Init()

void CDefCompFrameWindow::Init ( )

@implemented

Definition at line 201 of file ui.cpp.

202{
203 RECT rc;
204
205 if (!m_pGripper)
206 {
207 ZeroMemory(&rc, sizeof(rc));
208 m_pGripper = new(cicNoThrow) CDefCompFrameGripper(this, &rc, 0);
209 m_pGripper->Initialize();
210 AddUIObj(m_pGripper);
211 }
212
214 {
215 ZeroMemory(&rc, sizeof(rc));
216 m_pFinalizeButton = new(cicNoThrow) CCompFinalizeButton(this, 0, &rc, 0, 0x10000, NULL);
217 m_pFinalizeButton->Initialize();
219
222
223 WCHAR szText[256];
225 SetToolTip(szText);
226
227 AddUIObj(m_pFinalizeButton);
228 }
229}
#define cicNoThrow
Definition: cicbase.h:34
CCompFinalizeButton * m_pFinalizeButton
Definition: ui.h:97
void SetIcon(HICON hIcon)
Definition: cicuif.cpp:3525
HINSTANCE g_hInst
Definition: ctfmon.cpp:23
#define NULL
Definition: types.h:112
#define IDI_DOWN
Definition: resource.h:11
#define IDS_FINALIZE_STRING
Definition: resource.h:15
static HICON
Definition: imagelist.c:84
HICON hIcon
Definition: msconfig.c:44
#define _countof(array)
Definition: sndvol32.h:70
#define ZeroMemory
Definition: winbase.h:1712
#define IMAGE_ICON
Definition: winuser.h:212
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2234
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by UIComposition::CreateDefFrameWnd().

◆ LoadPosition()

void CDefCompFrameWindow::LoadPosition ( )

@implemented

Definition at line 295 of file ui.cpp.

296{
297 DWORD x = 0, y = 0;
298
300 CicRegKey regKey;
302 TEXT("SOFTWARE\\Microsoft\\CTF\\CUAS\\DefaultCompositionWindow"));
303 if (error == ERROR_SUCCESS)
304 {
305 regKey.QueryDword(TEXT("Left"), &x);
306 regKey.QueryDword(TEXT("Top"), &y);
307 }
308
309 Move(x, y, 0, 0);
310}
LSTATUS Open(HKEY hKey, LPCTSTR lpSubKey, REGSAM samDesired=KEY_READ)
Definition: cicreg.h:51
LSTATUS QueryDword(LPCTSTR pszValueName, LPDWORD pdwValue)
Definition: cicreg.h:61
#define ERROR_SUCCESS
Definition: deptool.c:10
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define TEXT(s)
Definition: k32.h:26
#define error(str)
Definition: mkdosfs.c:1605
#define HKEY_CURRENT_USER
Definition: winreg.h:11

Referenced by CDefCompFrameWindow().

◆ MyScreenToClient()

void CDefCompFrameWindow::MyScreenToClient ( LPPOINT  ppt,
LPRECT  prc 
)

@implemented

Definition at line 249 of file ui.cpp.

250{
251 if (ppt)
253
254 if (prc)
255 {
258 }
259}
LPCRECT prc
Definition: cicuif.h:230
LONG right
Definition: windef.h:308
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)

Referenced by STDMETHODIMP_().

◆ SavePosition()

void CDefCompFrameWindow::SavePosition ( )

@implemented

Definition at line 313 of file ui.cpp.

314{
316 CicRegKey regKey;
318 TEXT("SOFTWARE\\Microsoft\\CTF\\CUAS\\DefaultCompositionWindow"));
319 if (error == ERROR_SUCCESS)
320 {
321 regKey.SetDword(TEXT("Left"), m_nLeft);
322 regKey.SetDword(TEXT("Top"), m_nTop);
323 }
324}
INT m_nTop
Definition: cicuif.h:514
INT m_nLeft
Definition: cicuif.h:513
LSTATUS SetDword(LPCTSTR pszValueName, DWORD dwValue)
Definition: cicreg.h:67
LSTATUS Create(HKEY hKey, LPCTSTR lpSubKey)
Definition: cicreg.h:56

Referenced by ~CDefCompFrameWindow().

◆ SetCompStrRect()

void CDefCompFrameWindow::SetCompStrRect ( INT  nWidth,
INT  nHeight,
BOOL  bShow 
)

@implemented

Definition at line 262 of file ui.cpp.

263{
264 INT GripperWidth = GetGripperWidth();
265
266 RECT rc;
268
269 Move(rc.left, rc.top, GripperWidth + nWidth + 24, nHeight + 10);
270
271 if (m_pGripper)
272 {
273 rc = { 2, 3, GripperWidth + 2, nHeight + 7 };
274 m_pGripper->SetRect(&rc);
275 }
276
278 {
279 rc = {
280 GripperWidth + nWidth + 4,
281 3,
282 m_Margins.cxLeftWidth + m_Margins.cxRightWidth + GripperWidth + nWidth + 22,
284 };
285 m_pFinalizeButton->SetRect(&rc);
286 }
287
288 Show(bShow);
289
290 ::MoveWindow(m_hwndCompStr, GripperWidth + 2, 7, nWidth, nHeight, TRUE);
292}
INT GetGripperWidth()
@implemented
Definition: ui.cpp:232
MARGINS m_Margins
Definition: ui.h:98
HWND m_hwndCompStr
Definition: ui.h:95
INT INT nWidth
Definition: cicuif.h:563
INT INT INT nHeight
Definition: cicuif.h:563
#define TRUE
Definition: types.h:120
int cyBottomHeight
Definition: misc.c:283
int cyTopHeight
Definition: misc.c:282
int cxRightWidth
Definition: misc.c:281
int cxLeftWidth
Definition: misc.c:280
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define SW_HIDE
Definition: winuser.h:768
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define SW_SHOWNOACTIVATE
Definition: winuser.h:774
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)

◆ STDMETHOD_() [1/4]

CDefCompFrameWindow::STDMETHOD_ ( BOOL  ,
OnSetCursor   
)

◆ STDMETHOD_() [2/4]

CDefCompFrameWindow::STDMETHOD_ ( LRESULT  ,
OnWindowPosChanged   
)

◆ STDMETHOD_() [3/4]

CDefCompFrameWindow::STDMETHOD_ ( void  ,
HandleMouseMsg   
)

◆ STDMETHOD_() [4/4]

CDefCompFrameWindow::STDMETHOD_ ( void  ,
OnCreate   
)
override

Member Data Documentation

◆ m_hwndCompStr

HWND CDefCompFrameWindow::m_hwndCompStr

Definition at line 95 of file ui.h.

Referenced by UIComposition::CreateCompositionWindow(), SetCompStrRect(), and STDMETHODIMP_().

◆ m_Margins

MARGINS CDefCompFrameWindow::m_Margins

Definition at line 98 of file ui.h.

Referenced by SetCompStrRect().

◆ m_pFinalizeButton

CCompFinalizeButton* CDefCompFrameWindow::m_pFinalizeButton

Definition at line 97 of file ui.h.

Referenced by Init(), and SetCompStrRect().

◆ m_pGripper

CDefCompFrameGripper* CDefCompFrameWindow::m_pGripper

Definition at line 96 of file ui.h.

Referenced by GetGripperWidth(), Init(), and SetCompStrRect().

◆ override [1/2]

LONG LONG y CDefCompFrameWindow::override

Definition at line 113 of file ui.h.

◆ override [2/2]

UINT WPARAM LPARAM lParam CDefCompFrameWindow::override

Definition at line 115 of file ui.h.

◆ uMsg

UINT CDefCompFrameWindow::uMsg

Definition at line 114 of file ui.h.

◆ wParam

UINT WPARAM CDefCompFrameWindow::wParam

Definition at line 114 of file ui.h.

◆ x

LONG CDefCompFrameWindow::x

Definition at line 113 of file ui.h.

Referenced by STDMETHODIMP_().


The documentation for this class was generated from the following files: