1c2c66affSColin Finck /*
2c2c66affSColin Finck  * PROJECT:    PAINT for ReactOS
38f1f1c7aSStanislav Motylkov  * LICENSE:    LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4c2c66affSColin Finck  * PURPOSE:    Window procedure of the tool settings window
5f5200e6cSStanislav Motylkov  * COPYRIGHT:  Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
6c2c66affSColin Finck  */
7c2c66affSColin Finck 
84db1f987SAmine Khaldi #pragma once
94db1f987SAmine Khaldi 
10c2c66affSColin Finck class CToolSettingsWindow : public CWindowImpl<CToolSettingsWindow>
11c2c66affSColin Finck {
12c2c66affSColin Finck public:
13640d67d1SKatayama Hirofumi MZ     DECLARE_WND_CLASS_EX(L"ToolSettings", CS_DBLCLKS, COLOR_BTNFACE)
14c2c66affSColin Finck 
15c2c66affSColin Finck     BEGIN_MSG_MAP(CToolSettingsWindow)
16c2c66affSColin Finck         MESSAGE_HANDLER(WM_CREATE, OnCreate)
17c2c66affSColin Finck         MESSAGE_HANDLER(WM_VSCROLL, OnVScroll)
18c2c66affSColin Finck         MESSAGE_HANDLER(WM_PAINT, OnPaint)
19c2c66affSColin Finck         MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
2062eeb158SKatayama Hirofumi MZ         MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
21c2c66affSColin Finck         MESSAGE_HANDLER(WM_TOOLSMODELTOOLCHANGED, OnToolsModelToolChanged)
22c2c66affSColin Finck         MESSAGE_HANDLER(WM_TOOLSMODELSETTINGSCHANGED, OnToolsModelSettingsChanged)
23c2c66affSColin Finck         MESSAGE_HANDLER(WM_TOOLSMODELZOOMCHANGED, OnToolsModelZoomChanged)
24e9f3790aSKatayama Hirofumi MZ         MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
25c2c66affSColin Finck     END_MSG_MAP()
26c2c66affSColin Finck 
2757891b5fSKatayama Hirofumi MZ     BOOL DoCreate(HWND hwndParent);
2857891b5fSKatayama Hirofumi MZ 
2957891b5fSKatayama Hirofumi MZ private:
30c2c66affSColin Finck     CWindow trackbarZoom;
31e9f3790aSKatayama Hirofumi MZ     HICON m_hNontranspIcon;
32e9f3790aSKatayama Hirofumi MZ     HICON m_hTranspIcon;
33c2c66affSColin Finck 
3457891b5fSKatayama Hirofumi MZ     VOID drawTrans(HDC hdc, LPCRECT prc);
3557891b5fSKatayama Hirofumi MZ     VOID drawRubber(HDC hdc, LPCRECT prc);
3657891b5fSKatayama Hirofumi MZ     VOID drawBrush(HDC hdc, LPCRECT prc);
3757891b5fSKatayama Hirofumi MZ     VOID drawLine(HDC hdc, LPCRECT prc);
3857891b5fSKatayama Hirofumi MZ     VOID drawBox(HDC hdc, LPCRECT prc);
3957891b5fSKatayama Hirofumi MZ     VOID drawAirBrush(HDC hdc, LPCRECT prc);
40*1aeebfdaSKatayama Hirofumi MZ     VOID calculateTwoBoxes(CRect& rect1, CRect& rect2);
4157891b5fSKatayama Hirofumi MZ 
42c2c66affSColin Finck     LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
43e9f3790aSKatayama Hirofumi MZ     LRESULT OnDestroy(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
44c2c66affSColin Finck     LRESULT OnVScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
45c2c66affSColin Finck     LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
46c2c66affSColin Finck     LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
4762eeb158SKatayama Hirofumi MZ     LRESULT OnNotify(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
48c2c66affSColin Finck     LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
49c2c66affSColin Finck     LRESULT OnToolsModelSettingsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
50c2c66affSColin Finck     LRESULT OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
51c2c66affSColin Finck };
52