ReactOS 0.4.15-dev-6068-g8061a6f
history.h
Go to the documentation of this file.
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL
4 * FILE: base/applications/mspaint/history.h
5 * PURPOSE: Undo and redo functionality
6 * PROGRAMMERS: Benedikt Freisen
7 */
8
9#pragma once
10
11/* HISTORYSIZE = number of possible undo-steps + 1 */
12#define HISTORYSIZE 11
13
15{
16private:
18 void NotifyImageChanged();
20public:
22private:
26public:
27 ImageModel();
28 void CopyPrevious(void);
29 void Undo(BOOL bClearRedo = FALSE);
30 void Redo(void);
31 void ResetToPrevious(void);
32 void ClearHistory(void);
33 void Insert(HBITMAP hbm);
34 void Crop(int nWidth, int nHeight, int nOffsetX = 0, int nOffsetY = 0);
36 BOOL IsImageSaved() const;
37 BOOL HasUndoSteps() const;
38 BOOL HasRedoSteps() const;
39 void StretchSkew(int nStretchPercentX, int nStretchPercentY, int nSkewDegX = 0, int nSkewDegY = 0);
40 int GetWidth() const;
41 int GetHeight() const;
42 void InvertColors();
43 void Clear(COLORREF color = 0x00ffffff);
44 HDC GetDC();
45 void FlipHorizontally();
46 void FlipVertically();
47 void RotateNTimes90Degrees(int iN);
48 void DeleteSelection();
49 void Bound(POINT& pt);
50};
#define HISTORYSIZE
Definition: history.h:12
void ResetToPrevious(void)
Definition: history.cpp:100
BOOL HasRedoSteps() const
Definition: history.cpp:184
int GetWidth() const
Definition: history.cpp:215
void FlipVertically()
Definition: history.cpp:252
void CopyPrevious(void)
Definition: history.cpp:47
void FlipHorizontally()
Definition: history.cpp:244
HDC hDrawingDC
Definition: history.h:19
void DeleteSelection()
Definition: history.cpp:285
BOOL HasUndoSteps() const
Definition: history.cpp:179
void SaveImage(LPTSTR lpFileName)
Definition: history.cpp:169
void Insert(HBITMAP hbm)
Definition: history.cpp:115
ImageModel()
Definition: history.cpp:27
void InvertColors()
Definition: history.cpp:225
BOOL IsImageSaved() const
Definition: history.cpp:174
void Redo(void)
Definition: history.cpp:81
void NotifyImageChanged()
Definition: history.cpp:21
int currInd
Definition: history.h:23
void NotifyDimensionsChanged()
Definition: history.cpp:15
void RotateNTimes90Degrees(int iN)
Definition: history.cpp:260
void Crop(int nWidth, int nHeight, int nOffsetX=0, int nOffsetY=0)
Definition: history.cpp:131
int GetHeight() const
Definition: history.cpp:220
void Bound(POINT &pt)
Definition: history.cpp:297
HDC GetDC()
Definition: history.cpp:239
HBITMAP hBms[HISTORYSIZE]
Definition: history.h:21
int redoSteps
Definition: history.h:25
void ClearHistory(void)
Definition: history.cpp:109
void StretchSkew(int nStretchPercentX, int nStretchPercentY, int nSkewDegX=0, int nSkewDegY=0)
Definition: history.cpp:189
int undoSteps
Definition: history.h:24
#define FALSE
Definition: types.h:117
#define pt(x, y)
Definition: drawing.c:79
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint color
Definition: glext.h:6243
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:92
static void Clear(void)
Definition: treeview.c:386
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
void Undo(void)
Definition: solundo.cpp:53
_In_ LPCSTR lpFileName
Definition: winbase.h:3058
DWORD COLORREF
Definition: windef.h:300
CHAR * LPTSTR
Definition: xmlstorage.h:192