ReactOS 0.4.16-dev-338-g34e76ad
ui.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS msctfime.ime
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: User Interface of msctfime.ime
5 * COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6 */
7
8#pragma once
9
10class CUIFGripper;
14class CUIFWindow;
15 class CCompFrameWindow;
18
19/***********************************************************************/
20
29extern UINT WM_MSIME_MOUSE;
31
34
35/***********************************************************************/
36
38{
39public:
41
43};
44
45/***********************************************************************/
46
48{
49public:
51
54 DWORD nObjectID,
57 DWORD dwButtonFlags,
58 LPCWSTR pszText);
59 ~CCompFinalizeButton() override;
60
61 STDMETHOD_(void, OnLeftClick)() override;
62};
63
64/***********************************************************************/
65
67{
68public:
70
72};
73
74/***********************************************************************/
75
77{
78public:
81
83
84 void Init();
85 void MoveShow(LONG x, LONG y, BOOL bShow);
86
87 STDMETHOD_(void, OnCreate)(HWND hWnd) override;
88};
89
90/***********************************************************************/
91
93{
94public:
99
100public:
102 ~CDefCompFrameWindow() override;
103
104 void Init();
107 void SetCompStrRect(INT nWidth, INT nHeight, BOOL bShow);
108
109 void LoadPosition();
110 void SavePosition();
111
112 STDMETHOD_(void, OnCreate)(HWND hWnd) override;
113 STDMETHOD_(BOOL, OnSetCursor)(UINT uMsg, LONG x, LONG y) override;
115 LPARAM lParam) override;
116 STDMETHOD_(void, HandleMouseMsg)(UINT uMsg, LONG x, LONG y) override;
117};
118
119/***********************************************************************/
120
122{
125
126 HRESULT ShiftPolyText(INT xDelta, INT yDelta);
127 POLYTEXTW *GetPolyAt(INT iItem);
128 HRESULT RemoveLastLine(BOOL bHorizontal);
129 void RemoveAll();
130};
131
132/***********************************************************************/
133
135{
140
142};
143
144/***********************************************************************/
145
147{
148public:
164
165public:
167 virtual ~UIComposition();
168
173
174 HRESULT UpdateShowCompWndFlag(CicIMCLock& imcLock, DWORD *pdwCompStrLen);
175 HRESULT UpdateFont(CicIMCLock& imcLock);
179
180 void OnImeStartComposition(CicIMCLock& imcLock, HWND hUIWnd);
185 void OnImeSetContext(CicIMCLock& imcLock, HWND hUIWnd, WPARAM wParam, LPARAM lParam);
187 void OnTimer(HWND hWnd);
189
191 static BOOL InquireImeUIWndState(CicIMCLock& imcLock);
193
195};
196
197/***********************************************************************/
198
199struct UI
200{
203
204 UI(HWND hWnd);
205 virtual ~UI();
206
208 void _Destroy();
209
210 static void OnCreate(HWND hWnd);
211 static void OnDestroy(HWND hWnd);
212
214};
215
216/***********************************************************************/
217
220 _In_ HWND hWnd,
221 _In_ UINT uMsg,
224
Arabic default style
Definition: afstyles.h:94
HWND hWnd
Definition: settings.c:17
#define EXTERN_C
Definition: basetyps.h:12
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
MARGINS m_Margins
Definition: ui.h:79
STDMETHOD_(void, OnCreate)(HWND hWnd) override
void Init()
@implemented
Definition: ui.cpp:129
CCompFinalizeButton * m_pFinalizeButton
Definition: ui.h:80
void MoveShow(LONG x, LONG y, BOOL bShow)
@implemented
Definition: ui.cpp:151
~CCompFinalizeButton() override
@implemented
Definition: ui.cpp:93
CCompFrameWindow * m_pCompFrameWindow
Definition: ui.h:50
STDMETHOD_(void, OnLeftClick)() override
HIMC m_hIMC
Definition: ui.h:69
CDefCompFrameWindow * m_pDefCompFrameWindow
Definition: ui.h:40
void MyScreenToClient(LPPOINT ppt, LPRECT prc)
@implemented
Definition: ui.cpp:249
CDefCompFrameGripper * m_pGripper
Definition: ui.h:96
void SetCompStrRect(INT nWidth, INT nHeight, BOOL bShow)
@implemented
Definition: ui.cpp:262
STDMETHOD_(LRESULT, OnWindowPosChanged)(HWND hWnd
void SavePosition()
@implemented
Definition: ui.cpp:313
INT GetGripperWidth()
@implemented
Definition: ui.cpp:232
STDMETHOD_(void, OnCreate)(HWND hWnd) override
~CDefCompFrameWindow() override
@implemented
Definition: ui.cpp:195
STDMETHOD_(void, HandleMouseMsg)(UINT uMsg
MARGINS m_Margins
Definition: ui.h:98
UINT WPARAM wParam
Definition: ui.h:114
CCompFinalizeButton * m_pFinalizeButton
Definition: ui.h:97
void LoadPosition()
@implemented
Definition: ui.cpp:295
void Init()
@implemented
Definition: ui.cpp:201
HWND m_hwndCompStr
Definition: ui.h:95
LPCRECT prc
Definition: cicuif.h:230
INT y
Definition: cicuif.h:563
UINT WPARAM LPARAM lParam
Definition: cicuif.h:590
INT INT nWidth
Definition: cicuif.h:563
INT INT INT nHeight
Definition: cicuif.h:563
BOOL m_bInComposition
Definition: ui.h:160
HRESULT UpdateCompositionRect(CicIMCLock &imcLock)
@unimplemented
Definition: ui.cpp:794
INT GetLevelFromIMC(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:800
static BOOL GetImeUIWndTextExtent(CicIMCLock &imcLock, LPARAM lParam)
@implemented
Definition: ui.cpp:719
static BOOL InquireImeUIWndState(CicIMCLock &imcLock)
Definition: ui.cpp:651
HWND m_hwndParent
Definition: ui.h:149
HRESULT DestroyCompositionWindow()
@implemented
Definition: ui.cpp:619
HRESULT CreateDefFrameWnd(HWND hwndParent, HIMC hIMC)
@implemented
Definition: ui.cpp:504
INT m_cchCompStr
Definition: ui.h:159
virtual ~UIComposition()
@implemented
Definition: ui.cpp:463
void OnImeStartComposition(CicIMCLock &imcLock, HWND hUIWnd)
@unimplemented
Definition: ui.cpp:741
LPWSTR GetCompStrBuffer(INT cchStr)
@implemented
Definition: ui.cpp:725
BOOL m_bHasCompStr
Definition: ui.h:161
HRESULT UpdateFont(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:682
BOOL m_bHasCompWnd
Definition: ui.h:150
HRESULT OnImeSetContextAfter(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:825
CCompButtonFrameWindow * m_pCompButtonFrameWindow
Definition: ui.h:163
static BOOL SendMessageToUI(CicIMCLock &imcLock, WPARAM wParam, LPARAM lParam)
Definition: ui.cpp:489
DWORD m_dwUnknown55
Definition: ui.h:155
HRESULT OnDestroy()
@implemented
Definition: ui.cpp:773
void OnImeSetContext(CicIMCLock &imcLock, HWND hUIWnd, WPARAM wParam, LPARAM lParam)
@unimplemented
Definition: ui.cpp:761
HFONT m_hFont1
Definition: ui.h:152
HRESULT OnImeNotifySetCompositionWindow(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:788
SIZE m_CaretSize
Definition: ui.h:156
HRESULT CreateCompositionWindow(CicIMCLock &imcLock, HWND hwndParent)
@implemented
Definition: ui.cpp:566
DWORD m_dwUnknown54
Definition: ui.h:153
DWORD m_dwUnknown56[2]
Definition: ui.h:157
COMPWND m_CompStrs[4]
Definition: ui.h:151
HFONT m_hFont2
Definition: ui.h:154
CDefCompFrameWindow * m_pDefCompFrameWindow
Definition: ui.h:162
LPWSTR m_strCompStr
Definition: ui.h:158
HRESULT OnImeEndComposition()
@unimplemented
Definition: ui.cpp:754
HRESULT UpdateShowCompWndFlag(CicIMCLock &imcLock, DWORD *pdwCompStrLen)
@implemented
Definition: ui.cpp:659
void OnTimer(HWND hWnd)
Definition: ui.cpp:709
HRESULT CreateCompButtonWnd(HWND hwndParent, HIMC hIMC)
@implemented
Definition: ui.cpp:526
HRESULT OnImeCompositionUpdate(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:747
void OnPaintTheme(WPARAM wParam)
@unimplemented
Definition: ui.cpp:767
static LRESULT CALLBACK CompWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
@unimplemented
Definition: ui.cpp:780
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static HWND hwndParent
Definition: cryptui.c:300
DWORD HIMC
Definition: dimm.idl:75
UINT WM_MSIME_RECONVERTREQUEST
Definition: ui.cpp:16
UINT WM_MSIME_DOCUMENTFEED
Definition: ui.cpp:18
BOOL RegisterImeClass(VOID)
@implemented
Definition: ui.cpp:1356
UINT WM_MSIME_UIREADY
Definition: ui.cpp:15
BOOL IsMsImeMessage(_In_ UINT uMsg)
@implemented
Definition: ui.cpp:26
UINT WM_MSIME_SHOWIMEPAD
Definition: ui.cpp:21
UINT WM_MSIME_MODEBIAS
Definition: ui.cpp:20
UINT WM_MSIME_KEYMAP
Definition: ui.cpp:23
UINT WM_MSIME_RECONVERT
Definition: ui.cpp:17
UINT WM_MSIME_SERVICE
Definition: ui.cpp:14
UINT WM_MSIME_MOUSE
Definition: ui.cpp:22
EXTERN_C LRESULT CALLBACK UIWndProc(_In_ HWND hWnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
@implemented
Definition: ui.cpp:1344
UINT WM_MSIME_QUERYPOSITION
Definition: ui.cpp:19
BOOL RegisterMSIMEMessage(VOID)
@implemented
Definition: ui.cpp:41
VOID UnregisterImeClass(VOID)
@implemented
Definition: ui.cpp:1396
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxObject * pParent
Definition: fxdpcapi.cpp:86
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
BOOL OnCreate(HWND hWnd)
Definition: msconfig.c:83
unsigned int UINT
Definition: ndis.h:50
#define _In_
Definition: no_sal2.h:158
_Out_ LPRECT prc
Definition: ntgdi.h:1658
long LONG
Definition: pedump.c:60
Definition: ui.h:135
CPolyText m_PolyText
Definition: ui.h:137
HWND m_hWnd
Definition: ui.h:136
DWORD m_dwUnknown57[3]
Definition: ui.h:139
CicCaret m_Caret
Definition: ui.h:138
void _ClientToScreen(LPRECT prc)
@implemented
Definition: ui.cpp:445
Definition: ui.h:122
HRESULT RemoveLastLine(BOOL bHorizontal)
@implemented
Definition: ui.cpp:404
CicArray< POLYTEXTW > m_PolyTextArray
Definition: ui.h:123
CicArray< DWORD > m_ValueArray
Definition: ui.h:124
HRESULT ShiftPolyText(INT xDelta, INT yDelta)
@implemented
Definition: ui.cpp:391
POLYTEXTW * GetPolyAt(INT iItem)
@implemented
Definition: ui.cpp:385
void RemoveAll()
@implemented
Definition: ui.cpp:436
Definition: ui.h:200
virtual ~UI()
@implemented
Definition: ui.cpp:882
void OnImeSetContext(CicIMCLock &imcLock, WPARAM wParam, LPARAM lParam)
@implemented
Definition: ui.cpp:928
HWND m_hWnd
Definition: ui.h:201
void _Destroy()
@implemented
Definition: ui.cpp:899
static void OnCreate(HWND hWnd)
@implemented
Definition: ui.cpp:906
static void OnDestroy(HWND hWnd)
@implemented
Definition: ui.cpp:917
HRESULT _Create()
@implemented
Definition: ui.cpp:888
UIComposition * m_pComp
Definition: ui.h:202
Definition: misc.c:279
int32_t INT
Definition: typedefs.h:58
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185