ReactOS 0.4.16-dev-336-gb667d82
|
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include <wingdi.h>
#include <tchar.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlpath.h>
#include <atlstr.h>
#include <atlwin.h>
#include <atltypes.h>
#include <windowsx.h>
#include <commdlg.h>
#include <commctrl.h>
#include <stdlib.h>
#include <math.h>
#include <shellapi.h>
#include <htmlhelp.h>
#include <strsafe.h>
#include <ui/CWaitCursor.h>
#include <debug.h>
#include "resource.h"
#include "drawing.h"
#include "dib.h"
#include "fullscreen.h"
#include "history.h"
#include "miniature.h"
#include "palette.h"
#include "palettemodel.h"
#include "registry.h"
#include "selectionmodel.h"
#include "sizebox.h"
#include "canvas.h"
#include "textedit.h"
#include "toolbox.h"
#include "toolsettings.h"
#include "toolsmodel.h"
#include "main.h"
#include "dialogs.h"
#include "atlimagedx.h"
Go to the source code of this file.
Macros | |
#define | _USE_MATH_DEFINES /* for M_PI */ |
#define | GRIP_SIZE 3 |
#define | MIN_ZOOM 125 |
#define | MAX_ZOOM 8000 |
#define | MAX_LONG_PATH 512 |
#define | WM_TOOLSMODELTOOLCHANGED (WM_APP + 0) |
#define | WM_TOOLSMODELSETTINGSCHANGED (WM_APP + 1) |
#define | WM_TOOLSMODELZOOMCHANGED (WM_APP + 2) |
#define | WM_PALETTEMODELCOLORCHANGED (WM_APP + 3) |
#define | DEG2RAD(degree) (((degree) * M_PI) / 180) |
#define | RAD2DEG(radian) ((LONG)(((radian) * 180) / M_PI)) |
#define | CHECKED_IF(bChecked) ((bChecked) ? (MF_CHECKED | MF_BYCOMMAND) : (MF_UNCHECKED | MF_BYCOMMAND)) |
#define | ENABLED_IF(bEnabled) ((bEnabled) ? (MF_ENABLED | MF_BYCOMMAND) : (MF_GRAYED | MF_BYCOMMAND)) |
Enumerations | |
enum | HITTEST { HIT_NONE = 0 , HIT_UPPER_LEFT , HIT_UPPER_CENTER , HIT_UPPER_RIGHT , HIT_MIDDLE_LEFT , HIT_MIDDLE_RIGHT , HIT_LOWER_LEFT , HIT_LOWER_CENTER , HIT_LOWER_RIGHT , HIT_BORDER , HIT_INNER } |
Functions | |
void | ShowOutOfMemory (void) |
BOOL | nearlyEqualPoints (INT x0, INT y0, INT x1, INT y1) |
BOOL | OpenMailer (HWND hWnd, LPCWSTR pszPathName) |
void | getBoundaryOfPtStack (RECT &rcBoundary, INT cPoints, const POINT *pPoints) |
template<typename T > | |
void | Swap (T &a, T &b) |
#define CHECKED_IF | ( | bChecked | ) | ((bChecked) ? (MF_CHECKED | MF_BYCOMMAND) : (MF_UNCHECKED | MF_BYCOMMAND)) |
#define ENABLED_IF | ( | bEnabled | ) | ((bEnabled) ? (MF_ENABLED | MF_BYCOMMAND) : (MF_GRAYED | MF_BYCOMMAND)) |
Enumerator | |
---|---|
HIT_NONE | |
HIT_UPPER_LEFT | |
HIT_UPPER_CENTER | |
HIT_UPPER_RIGHT | |
HIT_MIDDLE_LEFT | |
HIT_MIDDLE_RIGHT | |
HIT_LOWER_LEFT | |
HIT_LOWER_CENTER | |
HIT_LOWER_RIGHT | |
HIT_BORDER | |
HIT_INNER |
Definition at line 54 of file precomp.h.
Definition at line 49 of file mouse.cpp.
Referenced by ShapeTool::OnButtonUp().
Definition at line 99 of file main.cpp.
Referenced by CMainWindow::OnCommand().
Definition at line 34 of file main.cpp.
Referenced by ImageModel::Crop(), InitializeImage(), CMainWindow::OnCommand(), and ImageModel::PushImageForUndo().
|
extern |
Definition at line 14 of file dialogs.cpp.
Referenced by CMainWindow::OnCommand().
|
extern |
Definition at line 10 of file canvas.cpp.
Referenced by CMainWindow::alignChildrenToMainWindow(), CMainWindow::ConfirmSave(), SelectionModel::drawFrameOnCanvas(), ToolsModel::DrawWithMouseTool(), ZoomTool::getNewZoomRect(), SelectionModel::hitTest(), CTextEditWindow::InvalidateEditRect(), SelectionModel::Landing(), SelectionModel::moveSelection(), PaletteModel::NotifyColorChanged(), ImageModel::NotifyImageChanged(), ToolsModel::NotifyZoomChanged(), SelectionBaseTool::OnButtonDown(), ZoomTool::OnButtonDown(), TextTool::OnButtonDown(), TextTool::OnButtonUp(), CMainWindow::OnCommand(), CMainWindow::OnCreate(), TextTool::OnDrawOverlayOnImage(), CMainWindow::OnKeyDown(), CMainWindow::OnMouseWheel(), CTextEditWindow::OnMoving(), CTextEditWindow::OnSizing(), CToolSettingsWindow::OnVScroll(), CMainWindow::saveImage(), SetBitmapAndInfo(), and CTextEditWindow::ValidateEditRect().
|
extern |
Definition at line 16 of file dialogs.cpp.
Referenced by ToolsModel::NotifyToolChanged(), TextTool::OnButtonUp(), CMainWindow::OnCommand(), CMainWindow::OnInitMenuPopup(), and wWinMain().
|
extern |
Definition at line 10 of file fullscreen.cpp.
Referenced by CMainWindow::OnCommand().
|
extern |
Definition at line 16 of file main.cpp.
Referenced by CMainWindow::InsertSelectionFromHBITMAP().
|
extern |
Definition at line 10 of file dib.cpp.
Referenced by CAttributesDialog::OnInitDialog(), and SetFileInfo().
|
extern |
Definition at line 13 of file dib.cpp.
Referenced by CAttributesDialog::OnInitDialog(), and SetFileInfo().
|
extern |
Definition at line 17 of file main.cpp.
Referenced by CTextEditWindow::Create(), CMainWindow::DoCreate(), CMiniatureWindow::DoCreate(), CPaintToolBar::DoCreate(), CMainWindow::GetOpenFileName(), CMainWindow::GetSaveFileName(), CFontsDialog::InitToolbar(), CMainWindow::InsertSelectionFromHBITMAP(), CCanvasWindow::OnButtonDown(), CMainWindow::OnCommand(), CFullscreenWindow::OnCreate(), CMainWindow::OnCreate(), CToolSettingsWindow::OnCreate(), CFontsDialog::OnNotify(), CStretchSkewDialog::OnOk(), CCanvasWindow::OnSetCursor(), SetFileInfo(), CMainWindow::TrackPopupMenu(), and wWinMain().
|
extern |
Definition at line 23 of file main.cpp.
Referenced by CMainWindow::alignChildrenToMainWindow(), ToolsModel::DrawWithMouseTool(), CCanvasWindow::OnButtonUp(), CCanvasWindow::OnCaptureChanged(), CMainWindow::OnCommand(), CMainWindow::OnCreate(), CMainWindow::OnInitMenuPopup(), CCanvasWindow::OnMouseMove(), CMainWindow::OnSize(), and CToolSettingsWindow::OnVScroll().
|
extern |
Definition at line 21 of file main.cpp.
Referenced by ImageModel::ImageModel(), ImageModel::IsImageSaved(), CCanvasWindow::OnButtonUp(), ImageModel::PushDone(), SaveDIBToFile(), SetBitmapAndInfo(), and SetFileInfo().
|
extern |
Definition at line 20 of file main.cpp.
Referenced by CAttributesDialog::OnInitDialog(), CMainWindow::saveImage(), and SetFileInfo().
|
extern |
Definition at line 22 of file main.cpp.
Referenced by CCanvasWindow::DoDraw(), CMainWindow::OnCommand(), and CMainWindow::OnInitMenuPopup().
|
extern |
Definition at line 18 of file main.cpp.
Referenced by CMainWindow::ConfirmSave(), CMainWindow::DoCreate(), CMainWindow::OnCommand(), OpenMailer(), CMainWindow::saveImage(), and SetFileInfo().
|
extern |
Definition at line 11 of file dib.cpp.
Referenced by DoLoadImageFile(), InitializeImage(), CAttributesDialog::OnEdit1(), CAttributesDialog::OnInitDialog(), CAttributesDialog::OnRadioButton1(), CAttributesDialog::OnRadioButton2(), and SaveDIBToFile().
|
extern |
Definition at line 12 of file dib.cpp.
Referenced by DoLoadImageFile(), InitializeImage(), CAttributesDialog::OnEdit2(), CAttributesDialog::OnInitDialog(), CAttributesDialog::OnRadioButton1(), CAttributesDialog::OnRadioButton2(), and SaveDIBToFile().
|
extern |
Definition at line 11 of file history.cpp.
Referenced by ToolBase::beginEvent(), CMainWindow::CanRedo(), CMainWindow::CanUndo(), CMainWindow::ConfirmSave(), ImageModel::Crop(), SelectionModel::DeleteSelection(), CCanvasWindow::DoDraw(), DoLoadImageFile(), ToolsModel::DrawWithMouseTool(), ColorTool::fetchColor(), CCanvasWindow::GetImageRect(), SelectionModel::GetSelectionContents(), SelectionModel::HideSelection(), CMainWindow::InsertSelectionFromHBITMAP(), SelectionModel::Landing(), SelectionModel::NotifyContentChanged(), TwoPointDrawTool::OnButtonDown(), SmoothDrawTool::OnButtonDown(), SelectionBaseTool::OnButtonDown(), FillTool::OnButtonDown(), BezierTool::OnButtonDown(), ShapeTool::OnButtonDown(), TwoPointDrawTool::OnButtonUp(), SmoothDrawTool::OnButtonUp(), SelectionBaseTool::OnButtonUp(), TextTool::OnButtonUp(), BezierTool::OnButtonUp(), ShapeTool::OnButtonUp(), CCanvasWindow::OnButtonUp(), CMainWindow::OnCommand(), CAttributesDialog::OnDefault(), ToolBase::OnEndDraw(), TextTool::OnEndDraw(), BezierTool::OnEndDraw(), ShapeTool::OnEndDraw(), CAttributesDialog::OnInitDialog(), TwoPointDrawTool::OnMouseMove(), SmoothDrawTool::OnMouseMove(), SelectionBaseTool::OnMouseMove(), BezierTool::OnMouseMove(), ShapeTool::OnMouseMove(), CCanvasWindow::OnMouseMove(), CFullscreenWindow::OnPaint(), CMiniatureWindow::OnPaint(), CCanvasWindow::OnPaletteModelColorChanged(), OpenMailer(), CMainWindow::saveImage(), ToolsModel::selectAll(), ToolsModel::SetBackgroundTransparent(), SetBitmapAndInfo(), ToolsModel::SetBrushWidth(), ToolsModel::SetLineWidth(), ToolsModel::SetPenWidth(), RegistrySettings::SetWallpaper(), RegistrySettings::Store(), SelectionModel::StretchSelection(), SelectionModel::TakeOff(), TextTool::UpdatePoint(), and CCanvasWindow::updateScrollRange().
|
extern |
Definition at line 25 of file main.cpp.
Referenced by SelectionBaseTool::OnButtonDown(), TextTool::OnButtonUp(), CFullscreenWindow::OnCloseOrKeyDownOrLButtonDown(), CMainWindow::OnCommand(), CFullscreenWindow::OnGetText(), CPaletteWindow::OnLButtonDblClk(), CPaletteWindow::OnMouseMove(), CToolBox::OnMouseMove(), CPaletteWindow::OnRButtonDblClk(), SetFileInfo(), ShowError(), ShowOutOfMemory(), and wWinMain().
|
extern |
Definition at line 12 of file miniature.cpp.
Referenced by ImageModel::NotifyImageChanged(), CMainWindow::OnCommand(), and CMainWindow::OnCreate().
|
extern |
Definition at line 13 of file dialogs.cpp.
Referenced by CMainWindow::OnCommand().
|
extern |
Definition at line 11 of file palettemodel.cpp.
Referenced by ToolBase::beginEvent(), SelectionModel::DeleteSelection(), CTextEditWindow::DoFillBack(), ColorTool::fetchColor(), SelectionModel::GetSelectionContents(), CMainWindow::OnCommand(), CCanvasWindow::OnCtlColorEdit(), SelectionBaseTool::OnDrawOverlayOnImage(), CTextEditWindow::OnEraseBkGnd(), CMainWindow::OnInitMenuPopup(), CPaletteWindow::OnLButtonDblClk(), CPaletteWindow::OnLButtonDown(), CPaletteWindow::OnPaint(), CPaletteWindow::OnRButtonDblClk(), CPaletteWindow::OnRButtonDown(), and SelectionModel::TakeOff().
|
extern |
Definition at line 19 of file palette.cpp.
Referenced by CMainWindow::alignChildrenToMainWindow(), PaletteModel::NotifyColorChanged(), PaletteModel::NotifyPaletteChanged(), CMainWindow::OnCommand(), CMainWindow::OnCreate(), and CMainWindow::OnInitMenuPopup().
|
extern |
Definition at line 14 of file registry.cpp.
Referenced by CMainWindow::alignChildrenToMainWindow(), CMainWindow::DoCreate(), CMiniatureWindow::DoCreate(), CToolBox::DoCreate(), CFontsDialog::InitFontNames(), CFontsDialog::InitFontSizes(), InitializeImage(), CFontsDialog::InitToolbar(), TextTool::OnButtonUp(), CMiniatureWindow::OnClose(), CFontsDialog::OnCommand(), CMainWindow::OnCommand(), CMainWindow::OnCreate(), CMainWindow::OnDestroy(), CFontsDialog::OnFontName(), CFontsDialog::OnFontSize(), CFontsDialog::OnInitDialog(), CMainWindow::OnInitMenuPopup(), CPaletteWindow::OnMouseMove(), CToolBox::OnMouseMove(), CFontsDialog::OnMove(), CMiniatureWindow::OnMove(), CMiniatureWindow::OnSize(), CMainWindow::ProcessFileMenu(), SetFileInfo(), CTextEditWindow::UpdateFont(), and wWinMain().
|
extern |
Definition at line 11 of file selectionmodel.cpp.
Referenced by BuildMaskFromPoints(), CMainWindow::CanUndo(), CCanvasWindow::CanvasHitTest(), CCanvasWindow::DoDraw(), SelectionModel::GetSelectionContents(), ToolsModel::GetToolSize(), CMainWindow::InsertSelectionFromHBITMAP(), SelectionBaseTool::OnButtonDown(), CCanvasWindow::OnButtonDown(), SelectionBaseTool::OnButtonUp(), TextTool::OnButtonUp(), CMainWindow::OnCommand(), SelectionBaseTool::OnDrawOverlayOnCanvas(), SelectionBaseTool::OnDrawOverlayOnImage(), FreeSelTool::OnDrawOverlayOnImage(), RectSelTool::OnDrawOverlayOnImage(), TextTool::OnDrawOverlayOnImage(), SelectionBaseTool::OnEndDraw(), CMainWindow::OnInitMenuPopup(), CMainWindow::OnKeyDown(), SelectionBaseTool::OnMouseMove(), CCanvasWindow::OnSetCursor(), SelectionBaseTool::OnSpecialTweak(), CToolBox::OnToolsModelToolChanged(), TextTool::quit(), ImageModel::Redo(), ToolBase::reset(), ToolsModel::SetActiveTool(), ImageModel::Undo(), and TextTool::UpdatePoint().
|
extern |
Definition at line 15 of file dialogs.cpp.
Referenced by CMainWindow::OnCommand().
|
extern |
Definition at line 12 of file textedit.cpp.
Referenced by CMainWindow::CanPaste(), CMainWindow::CanRedo(), CMainWindow::CanUndo(), CCanvasWindow::CanvasHitTest(), CCanvasWindow::DoDraw(), TextTool::draw(), PaletteModel::NotifyColorChanged(), ToolsModel::NotifyToolChanged(), ToolsModel::NotifyToolSettingsChanged(), ToolsModel::NotifyZoomChanged(), TextTool::OnButtonDown(), TextTool::OnButtonUp(), CMainWindow::OnCommand(), TextTool::OnEndDraw(), CMainWindow::OnInitMenuPopup(), and TextTool::quit().
|
extern |
Definition at line 11 of file toolbox.cpp.
Referenced by CMainWindow::alignChildrenToMainWindow(), CToolSettingsWindow::DoCreate(), ToolsModel::NotifyToolChanged(), CMainWindow::OnCommand(), CMainWindow::OnCreate(), CMainWindow::OnInitMenuPopup(), and CMainWindow::OnSysColorChange().
|
extern |
Definition at line 28 of file toolsettings.cpp.
Referenced by ToolsModel::NotifyToolChanged(), ToolsModel::NotifyToolSettingsChanged(), ToolsModel::NotifyZoomChanged(), and CToolBox::OnCreate().
|
extern |
Definition at line 10 of file toolsmodel.cpp.
Referenced by CMainWindow::CanPaste(), CMainWindow::CanRedo(), CMainWindow::CanUndo(), CCanvasWindow::DoDraw(), CTextEditWindow::DoFillBack(), TextTool::draw(), CToolSettingsWindow::drawAirBrush(), SelectionModel::DrawBackground(), CToolSettingsWindow::drawBox(), CToolSettingsWindow::drawBrush(), CToolSettingsWindow::drawLine(), CToolSettingsWindow::drawRubber(), CToolSettingsWindow::drawTrans(), CCanvasWindow::getNewZoomRect(), CMainWindow::InsertSelectionFromHBITMAP(), SelectionBaseTool::isRectSelect(), SelectionModel::Landing(), nearlyEqualPoints(), CCanvasWindow::OnButtonDblClk(), SelectionBaseTool::OnButtonDown(), ZoomTool::OnButtonDown(), CCanvasWindow::OnButtonDown(), TwoPointDrawTool::OnButtonUp(), SmoothDrawTool::OnButtonUp(), SelectionBaseTool::OnButtonUp(), ColorTool::OnButtonUp(), ZoomTool::OnButtonUp(), CCanvasWindow::OnButtonUp(), CFontsDialog::OnCommand(), CMainWindow::OnCommand(), CToolBox::OnCommand(), RubberTool::OnDraw(), PenTool::OnDraw(), BrushTool::OnDraw(), AirBrushTool::OnDraw(), ZoomTool::OnDrawOverlayOnCanvas(), BezierTool::OnDrawOverlayOnImage(), ShapeTool::OnDrawOverlayOnImage(), SelectionBaseTool::OnDrawOverlayOnImage(), LineTool::OnDrawOverlayOnImage(), RectTool::OnDrawOverlayOnImage(), EllipseTool::OnDrawOverlayOnImage(), RRectTool::OnDrawOverlayOnImage(), CCanvasWindow::OnEndDraw(), ShapeTool::OnEndDraw(), CTextEditWindow::OnEraseBkGnd(), CFontsDialog::OnFontName(), CFontsDialog::OnFontSize(), CMainWindow::OnInitMenuPopup(), CTextEditWindow::OnKeyDown(), CToolSettingsWindow::OnLButtonDown(), SelectionBaseTool::OnMouseMove(), CCanvasWindow::OnMouseMove(), CMainWindow::OnMouseWheel(), CToolSettingsWindow::OnPaint(), CCanvasWindow::OnSetCursor(), TwoPointDrawTool::OnSpecialTweak(), RubberTool::OnSpecialTweak(), PenTool::OnSpecialTweak(), BrushTool::OnSpecialTweak(), AirBrushTool::OnSpecialTweak(), BezierTool::OnSpecialTweak(), ShapeTool::OnSpecialTweak(), CToolBox::OnToolsModelToolChanged(), CToolSettingsWindow::OnToolsModelZoomChanged(), CToolSettingsWindow::OnVScroll(), SelectionModel::TakeOff(), and CCanvasWindow::zoomTo().