ReactOS  0.4.12-dev-18-gf469aca
selection.h
Go to the documentation of this file.
1 /*
2  * PROJECT: PAINT for ReactOS
3  * LICENSE: LGPL
4  * FILE: base/applications/mspaint/selection.h
5  * PURPOSE: Window procedure of the selection window
6  * PROGRAMMERS: Benedikt Freisen
7  * Katayama Hirofumi MZ
8  */
9 
10 #pragma once
11 
12 class CSelectionWindow : public CWindowImpl<CSelectionWindow>
13 {
14 public:
16 
31  END_MSG_MAP()
32 
33  LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
34  LRESULT OnEraseBkgnd(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
35  LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
36  LRESULT OnSysColorChange(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
37  LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
38  LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
39  LRESULT OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
40  LRESULT OnLButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
41  LRESULT OnPaletteModelColorChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
42  LRESULT OnToolsModelSettingsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
43  LRESULT OnSelectionModelRefreshNeeded(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
44  LRESULT OnCaptureChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
45  LRESULT OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
46 
47 private:
48  static const LPCTSTR m_lpszCursorLUT[9];
50  int m_iAction;
55 
56  int IdentifyCorner(int iXPos, int iYPos, int iWidth, int iHeight);
57 };
58 
LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: selection.cpp:140
#define WM_PALETTEMODELCOLORCHANGED
Definition: definitions.h:244
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1608
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
#define WM_LBUTTONDOWN
Definition: winuser.h:1752
LRESULT OnToolsModelSettingsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: selection.cpp:276
#define WM_CAPTURECHANGED
Definition: winuser.h:1784
#define DECLARE_WND_CLASS_EX(WndClassName, style, bkgnd)
Definition: atlwin.h:1867
LRESULT OnSelectionModelRefreshNeeded(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: selection.cpp:285
LRESULT OnCaptureChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: selection.cpp:236
DWORD m_dwSystemSelectionColor
Definition: selection.h:54
LRESULT OnLButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: selection.cpp:212
void ForceRefreshSelectionContents()
Definition: selection.cpp:56
WPARAM wParam
Definition: combotst.c:138
UINT_PTR WPARAM
Definition: windef.h:207
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: selection.cpp:96
LONG_PTR LPARAM
Definition: windef.h:208
#define WM_SETCURSOR
Definition: winuser.h:1618
#define WM_KEYDOWN
Definition: winuser.h:1691
#define WM_TOOLSMODELSETTINGSCHANGED
Definition: definitions.h:242
#define _T(x)
Definition: vfdio.h:22
unsigned int BOOL
Definition: ntddk_ex.h:94
#define END_MSG_MAP()
Definition: atlwin.h:1780
unsigned int UINT
Definition: ndis.h:50
unsigned long DWORD
Definition: ntddk_ex.h:95
LRESULT OnPaletteModelColorChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: selection.cpp:269
#define WM_PAINT
Definition: winuser.h:1602
#define COLOR_BTNFACE
Definition: winuser.h:918
#define CS_DBLCLKS
Definition: winuser.h:646
LRESULT OnSysColorChange(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: selection.cpp:126
LRESULT OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: selection.cpp:257
#define WM_LBUTTONUP
Definition: winuser.h:1753
LRESULT OnEraseBkgnd(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: selection.cpp:110
#define WM_MOUSEMOVE
Definition: winuser.h:1751
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: selection.cpp:116
#define BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1761
static const LPCTSTR m_lpszCursorLUT[9]
Definition: selection.h:48
#define MESSAGE_HANDLER(msg, func)
Definition: atlwin.h:1789
int IdentifyCorner(int iXPos, int iYPos, int iWidth, int iHeight)
Definition: selection.cpp:66
#define WM_CREATE
Definition: winuser.h:1590
#define WM_ERASEBKGND
Definition: winuser.h:1607
LONG_PTR LRESULT
Definition: windef.h:209
LRESULT OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: selection.cpp:157
#define WM_SELECTIONMODELREFRESHNEEDED
Definition: definitions.h:248
LPARAM lParam
Definition: combotst.c:139
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: selection.cpp:134