ReactOS 0.4.15-dev-8146-gdc0ed6d
textedit.h
Go to the documentation of this file.
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4 * PURPOSE: Text editor and font chooser for the text tool
5 * COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
6 */
7
8#pragma once
9
10#define CX_MINTEXTEDIT 100
11#define CY_MINTEXTEDIT 24
12
13class CTextEditWindow : public CWindowImpl<CTextEditWindow>
14{
15public:
17
19 void DoFillBack(HWND hwnd, HDC hDC);
20 void FixEditPos(LPCWSTR pszOldText);
21 void InvalidateEditRect();
22 void UpdateFont();
25 HFONT GetFont() const { return m_hFont; }
26
53
55 LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
62 LRESULT OnChar(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
66 LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
71 LRESULT OnMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
72 LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
75 LRESULT OnCut(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
76 LRESULT OnPaste(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
77 LRESULT OnClear(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
78
84
86 void DrawGrip(HDC hDC, RECT& rc);
87};
static HDC hDC
Definition: 3dtext.c:33
#define WM_TOOLSMODELZOOMCHANGED
Definition: precomp.h:51
#define WM_PALETTEMODELCOLORCHANGED
Definition: precomp.h:52
#define WM_TOOLSMODELTOOLCHANGED
Definition: precomp.h:49
#define WM_TOOLSMODELSETTINGSCHANGED
Definition: precomp.h:50
@ Create
Definition: registry.c:563
LRESULT OnNCPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:159
LRESULT OnClear(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:513
LRESULT OnNCHitTest(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:180
LRESULT OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:306
HFONT m_hFontZoomed
Definition: textedit.h:82
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:265
LRESULT OnChar(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:89
HWND m_hwndParent
Definition: textedit.h:80
LRESULT OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:103
LRESULT OnSetSel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:368
LRESULT OnCut(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:499
LRESULT OnToolsModelSettingsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:300
BOOL GetEditRect(LPRECT prc) const
Definition: textedit.cpp:377
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:142
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:259
INT DoHitTest(RECT &rc, POINT pt)
Definition: textedit.cpp:23
LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:313
void InvalidateEditRect()
Definition: textedit.cpp:281
LRESULT OnPaste(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:506
LRESULT OnEraseBkGnd(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:127
LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:119
LRESULT OnSizing(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:436
HFONT GetFont() const
Definition: textedit.h:25
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:188
void DrawGrip(HDC hDC, RECT &rc)
Definition: textedit.cpp:42
HFONT m_hFont
Definition: textedit.h:81
LRESULT OnPaletteModelColorChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:294
LRESULT OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:494
LRESULT OnMoving(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:394
LRESULT OnMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:205
void UpdateFont()
Definition: textedit.cpp:326
void DoFillBack(HWND hwnd, HDC hDC)
Definition: textedit.cpp:245
LRESULT OnNCCalcSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:175
void FixEditPos(LPCWSTR pszOldText)
Definition: textedit.cpp:47
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: textedit.cpp:211
void ValidateEditRect(LPCRECT prc OPTIONAL)
Definition: textedit.cpp:383
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static HWND hwndParent
Definition: cryptui.c:300
#define pt(x, y)
Definition: drawing.c:79
unsigned int BOOL
Definition: ntddk_ex.h:94
#define MESSAGE_HANDLER(msg, func)
Definition: atlwin.h:1926
#define BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1898
#define END_MSG_MAP()
Definition: atlwin.h:1917
static HDC
Definition: imagelist.c:92
static BOOL protected
Definition: protectdata.c:37
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
unsigned int UINT
Definition: ndis.h:50
_Out_ LPRECT prc
Definition: ntgdi.h:1658
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
#define WM_MOUSEWHEEL
Definition: treelist.c:96
int32_t INT
Definition: typedefs.h:58
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WM_PAINT
Definition: winuser.h:1620
#define WM_ERASEBKGND
Definition: winuser.h:1625
#define WM_CLOSE
Definition: winuser.h:1621
#define WM_PASTE
Definition: winuser.h:1863
#define WM_CREATE
Definition: winuser.h:1608
#define WM_SIZE
Definition: winuser.h:1611
#define WM_NCHITTEST
Definition: winuser.h:1686
#define WM_CUT
Definition: winuser.h:1861
#define WM_LBUTTONDOWN
Definition: winuser.h:1776
#define EM_SETSEL
Definition: winuser.h:2018
#define WM_CHAR
Definition: winuser.h:1717
#define WM_MOVE
Definition: winuser.h:1610
#define WM_SIZING
Definition: winuser.h:1807
#define WM_SETCURSOR
Definition: winuser.h:1636
#define WM_CLEAR
Definition: winuser.h:1864
#define WM_KEYDOWN
Definition: winuser.h:1715
#define WM_MOVING
Definition: winuser.h:1809
#define WM_NCCALCSIZE
Definition: winuser.h:1685
#define WM_NCPAINT
Definition: winuser.h:1687
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185