ReactOS  0.4.12-dev-18-gf469aca
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 
12 {
13 private:
15  void NotifyImageChanged();
17 public:
19 private:
20  int currInd;
21  int undoSteps;
22  int redoSteps;
23 public:
25 
26  ImageModel();
27  void CopyPrevious(void);
28  void Undo(void);
29  void Redo(void);
30  void ResetToPrevious(void);
31  void ClearHistory(void);
32  void Insert(HBITMAP hbm);
33  void Crop(int nWidth, int nHeight, int nOffsetX = 0, int nOffsetY = 0);
38  void StretchSkew(int nStretchPercentX, int nStretchPercentY, int nSkewDegX = 0, int nSkewDegY = 0);
39  int GetWidth();
40  int GetHeight();
41  void InvertColors();
42  void Clear(COLORREF color = 0x00ffffff);
43  HDC GetDC();
44  void FlipHorizontally();
45  void FlipVertically();
46  void RotateNTimes90Degrees(int iN);
47 };
int redoSteps
Definition: history.h:22
#define HDC
Definition: msvc.h:22
void FlipHorizontally()
Definition: history.cpp:224
void SaveImage(LPTSTR lpFileName)
Definition: history.cpp:162
ImageModel()
Definition: history.cpp:25
void CopyPrevious(void)
Definition: history.cpp:45
#define HBITMAP
Definition: msvc.h:28
int currInd
Definition: history.h:20
HDC hDrawingDC
Definition: history.h:16
void InvertColors()
Definition: history.cpp:205
BOOL IsImageSaved()
Definition: history.cpp:168
BOOL HasRedoSteps()
Definition: history.cpp:178
void Redo(void)
Definition: history.cpp:75
CHAR * LPTSTR
Definition: xmlstorage.h:192
void Crop(int nWidth, int nHeight, int nOffsetX=0, int nOffsetY=0)
Definition: history.cpp:124
void ClearHistory(void)
Definition: history.cpp:102
GLuint color
Definition: glext.h:6243
HDC GetDC()
Definition: history.cpp:219
void Insert(HBITMAP hbm)
Definition: history.cpp:108
void Clear(COLORREF color=0x00ffffff)
Definition: history.cpp:213
unsigned int BOOL
Definition: ntddk_ex.h:94
int undoSteps
Definition: history.h:21
void StretchSkew(int nStretchPercentX, int nStretchPercentY, int nSkewDegX=0, int nSkewDegY=0)
Definition: history.cpp:183
void RotateNTimes90Degrees(int iN)
Definition: history.cpp:240
BOOL imageSaved
Definition: history.h:24
int GetWidth()
Definition: history.cpp:195
int GetHeight()
Definition: history.cpp:200
BOOL HasUndoSteps()
Definition: history.cpp:173
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
void NotifyDimensionsChanged()
Definition: history.cpp:15
void Undo(void)
Definition: history.cpp:57
void FlipVertically()
Definition: history.cpp:232
void NotifyImageChanged()
Definition: history.cpp:20
#define HISTORYSIZE
Definition: definitions.h:13
DWORD COLORREF
Definition: windef.h:290
void ResetToPrevious(void)
Definition: history.cpp:93
HBITMAP hBms[HISTORYSIZE]
Definition: history.h:18
_In_ LPCSTR lpFileName
Definition: winbase.h:3011