ReactOS 0.4.15-dev-8390-g075894b
ciccaret.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Cicero
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: Displaying Cicero caret
5 * COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6 */
7
8#include "precomp.h"
9#include "ciccaret.h"
10
15{
19 m_pt.x = m_pt.y = 0;
20 m_size.cx = m_size.cy = 0;
21}
22
27{
28 HideCaret();
31}
32
37{
38 m_hWnd = hWnd;
39 m_size = size;
40 if (::IsWindow(hWnd))
42}
43
48{
49 HideCaret();
52}
53
58{
60 {
63 }
65}
66
71{
75}
76
81{
83 {
86 }
87}
88
93{
94 BOOL bCaretVisible = m_bCaretVisible;
95 if (bCaretVisible)
97
98 m_pt = pt;
99
100 if (bCaretVisible)
101 InvertCaret();
102}
103
108{
109 m_bCaretBlinking = bBlinking;
110}
static HDC hDC
Definition: 3dtext.c:33
HWND hWnd
Definition: settings.c:17
CicCaret()
Definition: ciccaret.cpp:14
BOOL m_bCaretBlinking
Definition: ciccaret.h:17
HWND m_hWnd
Definition: ciccaret.h:13
POINT m_pt
Definition: ciccaret.h:15
UINT m_uCaretBlinkTimerID
Definition: ciccaret.h:14
@ TIMER_ID
Definition: ciccaret.h:21
void SetBlinking(BOOL bBlinking)
Definition: ciccaret.cpp:107
void HideCaret()
Definition: ciccaret.cpp:57
void DestroyCaret()
Definition: ciccaret.cpp:47
void OnTimer()
Definition: ciccaret.cpp:80
void SetCaretPos(POINT pt)
Definition: ciccaret.cpp:92
BOOL m_bCaretVisible
Definition: ciccaret.h:18
void CreateCaret(HWND hWnd, SIZE size)
Definition: ciccaret.cpp:36
void InvertCaret()
Definition: ciccaret.cpp:70
SIZE m_size
Definition: ciccaret.h:16
virtual ~CicCaret()
Definition: ciccaret.cpp:26
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define pt(x, y)
Definition: drawing.c:79
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizeiptr size
Definition: glext.h:5919
static HDC
Definition: imagelist.c:92
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define DSTINVERT
Definition: wingdi.h:327
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI IsWindow(_In_opt_ HWND)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
UINT WINAPI GetCaretBlinkTime(void)
Definition: ntwrapper.h:166