[PRINTING]
[reactos.git] / reactos / base / applications / mspaint / history.h
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 class ImageModel
10 {
11 private:
12 void NotifyDimensionsChanged();
13 void NotifyImageChanged();
14 HDC hDrawingDC;
15 public:
16 HBITMAP hBms[HISTORYSIZE];
17 private:
18 int currInd;
19 int undoSteps;
20 int redoSteps;
21 public:
22 BOOL imageSaved;
23
24 ImageModel();
25 void CopyPrevious(void);
26 void Undo(void);
27 void Redo(void);
28 void ResetToPrevious(void);
29 void ClearHistory(void);
30 void Insert(HBITMAP hbm);
31 void Crop(int nWidth, int nHeight, int nOffsetX = 0, int nOffsetY = 0);
32 void SaveImage(LPTSTR lpFileName);
33 BOOL IsImageSaved();
34 BOOL HasUndoSteps();
35 BOOL HasRedoSteps();
36 void StretchSkew(int nStretchPercentX, int nStretchPercentY, int nSkewDegX = 0, int nSkewDegY = 0);
37 int GetWidth();
38 int GetHeight();
39 void InvertColors();
40 void Clear(COLORREF color = 0x00ffffff);
41 HDC GetDC();
42 void FlipHorizontally();
43 void FlipVertically();
44 void RotateNTimes90Degrees(int iN);
45 };