2015-07-07 11:02:30 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: PAINT for ReactOS
|
|
|
|
* LICENSE: LGPL
|
2015-09-09 13:13:35 +00:00
|
|
|
* FILE: base/applications/mspaint/imgarea.h
|
2015-07-07 11:02:30 +00:00
|
|
|
* PURPOSE: Window procedure of the main window and all children apart from
|
|
|
|
* hPalWin, hToolSettings and hSelection
|
|
|
|
* PROGRAMMERS: Benedikt Freisen
|
2017-07-27 09:29:42 +00:00
|
|
|
* Katayama Hirofumi MZ
|
2015-07-07 11:02:30 +00:00
|
|
|
*/
|
|
|
|
|
2017-12-09 12:36:45 +00:00
|
|
|
#pragma once
|
|
|
|
|
2015-07-07 11:02:30 +00:00
|
|
|
class CImgAreaWindow : public CWindowImpl<CMainWindow>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DECLARE_WND_CLASS_EX(_T("ImgAreaWindow"), CS_DBLCLKS, COLOR_BTNFACE)
|
|
|
|
|
2015-07-07 11:44:50 +00:00
|
|
|
BEGIN_MSG_MAP(CImgAreaWindow)
|
2015-07-07 11:02:30 +00:00
|
|
|
MESSAGE_HANDLER(WM_SIZE, OnSize)
|
|
|
|
MESSAGE_HANDLER(WM_PAINT, OnPaint)
|
|
|
|
MESSAGE_HANDLER(WM_SETCURSOR, OnSetCursor)
|
|
|
|
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
|
|
|
|
MESSAGE_HANDLER(WM_RBUTTONDOWN, OnRButtonDown)
|
|
|
|
MESSAGE_HANDLER(WM_LBUTTONUP, OnLButtonUp)
|
|
|
|
MESSAGE_HANDLER(WM_RBUTTONUP, OnRButtonUp)
|
|
|
|
MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
|
|
|
|
MESSAGE_HANDLER(WM_MOUSELEAVE, OnMouseLeave)
|
2015-07-07 11:56:37 +00:00
|
|
|
MESSAGE_HANDLER(WM_IMAGEMODELDIMENSIONSCHANGED, OnImageModelDimensionsChanged)
|
|
|
|
MESSAGE_HANDLER(WM_IMAGEMODELIMAGECHANGED, OnImageModelImageChanged)
|
2017-07-27 09:29:42 +00:00
|
|
|
MESSAGE_HANDLER(WM_CAPTURECHANGED, OnCaptureChanged)
|
|
|
|
MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown)
|
2015-07-07 11:02:30 +00:00
|
|
|
END_MSG_MAP()
|
|
|
|
|
|
|
|
BOOL drawing;
|
|
|
|
|
|
|
|
private:
|
|
|
|
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnRButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnLButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnRButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnMouseLeave(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
2015-07-07 11:56:37 +00:00
|
|
|
LRESULT OnImageModelDimensionsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnImageModelImageChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
2017-07-27 09:29:42 +00:00
|
|
|
LRESULT OnCaptureChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
2015-07-07 11:02:30 +00:00
|
|
|
|
|
|
|
void drawZoomFrame(int mouseX, int mouseY);
|
2017-07-27 09:29:42 +00:00
|
|
|
void cancelDrawing();
|
2015-07-07 11:02:30 +00:00
|
|
|
};
|