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 procedures of the dialog windows plus launching functions
|
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
|
|
|
|
|
2023-07-05 03:06:22 +00:00
|
|
|
void ShowError(INT stringID, ...);
|
|
|
|
|
2017-11-01 13:59:01 +00:00
|
|
|
class CMirrorRotateDialog : public CDialogImpl<CMirrorRotateDialog>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum { IDD = IDD_MIRRORROTATE };
|
2015-05-08 16:02:36 +00:00
|
|
|
|
2017-11-01 13:59:01 +00:00
|
|
|
BEGIN_MSG_MAP(CMirrorRotateDialog)
|
|
|
|
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
|
|
|
MESSAGE_HANDLER(WM_CLOSE, OnClose)
|
|
|
|
COMMAND_ID_HANDLER(IDOK, OnOk)
|
|
|
|
COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
|
|
|
|
COMMAND_ID_HANDLER(IDD_MIRRORROTATERB3, OnRadioButton3)
|
|
|
|
COMMAND_ID_HANDLER(IDD_MIRRORROTATERB1, OnRadioButton12)
|
|
|
|
COMMAND_ID_HANDLER(IDD_MIRRORROTATERB2, OnRadioButton12)
|
|
|
|
END_MSG_MAP()
|
2015-05-08 16:02:36 +00:00
|
|
|
|
2017-11-01 13:59:01 +00:00
|
|
|
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
LRESULT OnRadioButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
LRESULT OnRadioButton12(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
};
|
|
|
|
|
|
|
|
class CAttributesDialog : public CDialogImpl<CAttributesDialog>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum { IDD = IDD_ATTRIBUTES };
|
|
|
|
|
|
|
|
BEGIN_MSG_MAP(CAttributesDialog)
|
|
|
|
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
|
|
|
MESSAGE_HANDLER(WM_CLOSE, OnClose)
|
|
|
|
COMMAND_ID_HANDLER(IDOK, OnOk)
|
|
|
|
COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
|
|
|
|
COMMAND_ID_HANDLER(IDD_ATTRIBUTESSTANDARD, OnDefault)
|
|
|
|
COMMAND_ID_HANDLER(IDD_ATTRIBUTESRB1, OnRadioButton1)
|
2018-05-23 20:17:22 +00:00
|
|
|
COMMAND_ID_HANDLER(IDD_ATTRIBUTESRB2, OnRadioButton2)
|
|
|
|
COMMAND_ID_HANDLER(IDD_ATTRIBUTESRB3, OnRadioButton3)
|
2017-11-01 13:59:01 +00:00
|
|
|
COMMAND_ID_HANDLER(IDD_ATTRIBUTESEDIT1, OnEdit1)
|
2018-05-23 20:17:22 +00:00
|
|
|
COMMAND_ID_HANDLER(IDD_ATTRIBUTESEDIT2, OnEdit2)
|
2017-11-01 13:59:01 +00:00
|
|
|
END_MSG_MAP()
|
|
|
|
|
|
|
|
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
LRESULT OnDefault(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
LRESULT OnRadioButton1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
LRESULT OnRadioButton2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
LRESULT OnRadioButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
LRESULT OnEdit1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
LRESULT OnEdit2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
|
|
|
|
public:
|
|
|
|
int newWidth;
|
|
|
|
int newHeight;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CStretchSkewDialog : public CDialogImpl<CStretchSkewDialog>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum { IDD = IDD_STRETCHSKEW };
|
|
|
|
|
|
|
|
BEGIN_MSG_MAP(CStretchSkewDialog)
|
|
|
|
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
|
|
|
MESSAGE_HANDLER(WM_CLOSE, OnClose)
|
|
|
|
COMMAND_ID_HANDLER(IDOK, OnOk)
|
|
|
|
COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
|
|
|
|
END_MSG_MAP()
|
|
|
|
|
|
|
|
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
|
|
|
|
|
|
|
public:
|
|
|
|
POINT percentage;
|
|
|
|
POINT angle;
|
|
|
|
};
|
2022-01-05 07:26:05 +00:00
|
|
|
|
|
|
|
class CFontsDialog : public CDialogImpl<CFontsDialog>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum { IDD = IDD_FONTS };
|
|
|
|
|
|
|
|
CFontsDialog();
|
|
|
|
void InitFontNames();
|
|
|
|
void InitFontSizes();
|
|
|
|
void InitToolbar();
|
|
|
|
|
|
|
|
BEGIN_MSG_MAP(CFontsDialog)
|
|
|
|
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
|
|
|
MESSAGE_HANDLER(WM_CLOSE, OnClose)
|
|
|
|
MESSAGE_HANDLER(WM_COMMAND, OnCommand)
|
|
|
|
MESSAGE_HANDLER(WM_MOVE, OnMove)
|
|
|
|
MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
|
|
|
|
MESSAGE_HANDLER(WM_TOOLSMODELTOOLCHANGED, OnToolsModelToolChanged)
|
|
|
|
MESSAGE_HANDLER(WM_MEASUREITEM, OnMeasureItem)
|
|
|
|
MESSAGE_HANDLER(WM_DRAWITEM, OnDrawItem)
|
|
|
|
END_MSG_MAP()
|
|
|
|
|
|
|
|
protected:
|
|
|
|
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnNotify(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnMeasureItem(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
LRESULT OnDrawItem(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
|
|
|
void OnFontSize(UINT codeNotify);
|
|
|
|
void OnFontName(UINT codeNotify);
|
|
|
|
};
|