2 * PROJECT: PAINT for ReactOS
4 * FILE: base/applications/mspaint/selectionmodel.h
5 * PURPOSE: Keep track of selection parameters, notify listeners
6 * PROGRAMMERS: Benedikt Freisen
9 /* DEFINES **********************************************************/
12 #define ACTION_RESIZE_TOP_LEFT 1
13 #define ACTION_RESIZE_TOP 2
14 #define ACTION_RESIZE_TOP_RIGHT 3
15 #define ACTION_RESIZE_LEFT 4
16 #define ACTION_RESIZE_RIGHT 5
17 #define ACTION_RESIZE_BOTTOM_LEFT 6
18 #define ACTION_RESIZE_BOTTOM 7
19 #define ACTION_RESIZE_BOTTOM_RIGHT 8
21 /* CLASSES **********************************************************/
34 // void NotifySelectionChanging();
35 // void NotifySelectionChanged();
36 void NotifyRefreshNeeded();
41 void PushToPtStack(LONG x
, LONG y
);
42 void CalculateBoundingBoxAndContents(HDC hDCImage
);
43 void CalculateContents(HDC hDCImage
);
44 void DrawBackgroundPoly(HDC hDCImage
, COLORREF crBg
);
45 void DrawBackgroundRect(HDC hDCImage
, COLORREF crBg
);
46 void DrawSelection(HDC hDCImage
, COLORREF crBg
= 0, BOOL bBgTransparent
= FALSE
);
47 void DrawSelectionStretched(HDC hDCImage
);
48 void ScaleContentsToFit();
49 void InsertFromHBITMAP(HBITMAP hBm
);
50 void FlipHorizontally();
51 void FlipVertically();
52 void RotateNTimes90Degrees(int iN
);
55 void DrawFramePoly(HDC hDCImage
);
56 void SetSrcAndDestRectFromPoints(POINT
& ptFrom
, POINT
& ptTo
);
57 void SetSrcRectSizeToZero();
58 BOOL
IsSrcRectSizeNonzero();
59 void ModifyDestRect(POINT
& ptDelta
, int iAction
);
60 LONG
GetDestRectWidth();
61 LONG
GetDestRectHeight();
62 LONG
GetDestRectLeft();
63 LONG
GetDestRectTop();
64 void DrawTextToolText(HDC hDCImage
, COLORREF crFg
, COLORREF crBg
, BOOL bBgTransparent
= FALSE
);