2015-05-08 16:02:36 +00:00
|
|
|
/*
|
2023-06-23 11:04:32 +00:00
|
|
|
* PROJECT: PAINT for ReactOS
|
|
|
|
* LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
|
|
|
|
* PURPOSE: Window procedure of the tool settings window
|
2023-06-27 18:22:21 +00:00
|
|
|
* COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
|
2015-05-08 16:02:36 +00:00
|
|
|
*/
|
|
|
|
|
2017-12-09 12:36:45 +00:00
|
|
|
#pragma once
|
|
|
|
|
2015-07-07 10:42:49 +00:00
|
|
|
class CToolSettingsWindow : public CWindowImpl<CToolSettingsWindow>
|
|
|
|
{
|
|
|
|
public:
|
2023-11-04 10:25:45 +00:00
|
|
|
DECLARE_WND_CLASS_EX(L"ToolSettings", CS_DBLCLKS, COLOR_BTNFACE)
|
2015-05-08 16:02:36 +00:00
|
|
|
|
2015-07-07 11:44:50 +00:00
|
|
|
BEGIN_MSG_MAP(CToolSettingsWindow)
|
|
|
|
MESSAGE_HANDLER(WM_CREATE, OnCreate)
|
2015-07-07 10:42:49 +00:00
|
|
|
MESSAGE_HANDLER(WM_VSCROLL, OnVScroll)
|
|
|
|
MESSAGE_HANDLER(WM_PAINT, OnPaint)
|
|
|
|
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
|
2023-10-10 01:59:29 +00:00
|
|
|
MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
|
2015-07-07 11:44:50 +00:00
|
|
|
MESSAGE_HANDLER(WM_TOOLSMODELTOOLCHANGED, OnToolsModelToolChanged)
|
|
|
|
MESSAGE_HANDLER(WM_TOOLSMODELSETTINGSCHANGED, OnToolsModelSettingsChanged)
|
|
|
|
MESSAGE_HANDLER(WM_TOOLSMODELZOOMCHANGED, OnToolsModelZoomChanged)
|
2023-03-17 23:24:19 +00:00
|
|
|
MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
|
2015-07-07 10:42:49 +00:00
|
|
|
END_MSG_MAP()
|
|
|
|
|
2023-03-21 04:13:53 +00:00
|
|
|
BOOL DoCreate(HWND hwndParent);
|
|
|
|
|
|
|
|
private:
|
2015-07-07 11:44:50 +00:00
|
|
|
CWindow trackbarZoom;
|
2023-03-17 23:24:19 +00:00
|
|
|
HICON m_hNontranspIcon;
|
|
|
|
HICON m_hTranspIcon;
|
2015-07-07 11:44:50 +00:00
|
|
|
|
2023-03-21 04:13:53 +00:00
|
|
|
VOID drawTrans(HDC hdc, LPCRECT prc);
|
|
|
|
VOID drawRubber(HDC hdc, LPCRECT prc);
|
|
|
|
VOID drawBrush(HDC hdc, LPCRECT prc);
|
|
|
|
VOID drawLine(HDC hdc, LPCRECT prc);
|
|
|
|
VOID drawBox(HDC hdc, LPCRECT prc);
|
|
|
|
VOID drawAirBrush(HDC hdc, LPCRECT prc);
|
2023-11-23 06:01:29 +00:00
|
|
|
VOID calculateTwoBoxes(CRect& rect1, CRect& rect2);
|
2023-03-21 04:13:53 +00:00
|
|
|
|
2015-07-07 11:44:50 +00:00
|
|
|
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
2023-03-17 23:24:19 +00:00
|
|
|
LRESULT OnDestroy(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
2015-07-07 10:42:49 +00:00
|
|
|
LRESULT OnVScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
2023-10-10 01:59:29 +00:00
|
|
|
LRESULT OnNotify(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
2015-07-07 11:44:50 +00:00
|
|
|
LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnToolsModelSettingsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
2015-07-07 10:42:49 +00:00
|
|
|
};
|