#include <VScreen.h>
Inherited by BitmapScreen.
Public Methods | |
int | getScreenX () const |
int | getScreenY () const |
virtual bool | PointOnScreen (const int, const int) |
virtual void | paint (HDC)=0 |
Pure Virual function, hence abstract. | |
void | invalidate (HWND, bool=false) |
HRGN | getRgn () const |
RECT | getRgnRect () const |
int | getHeight () const |
int | getWidth () const |
void | moveScreen (const int, const int) |
VScreen (const int, const int, const int, const int) | |
Private Attributes | |
int | height |
signed height of the screen. | |
int | width |
width of the screen. | |
int | pointX |
x co-ordinate of top left corner. | |
int | pointY |
y co-ordinate of top left corner. | |
HRGN | screenRgn |
The screens region. | |
RECT | screenRect |
The screens region as a RECT. |
Definition at line 21 of file VScreen.h.
|
Definition at line 21 of file VScreen.cpp. References height, moveScreen(), pointX, pointY, and width.
00022 { 00023 pointX = 0; 00024 pointY = 0; 00025 width = abs(w); // ensure positive width 00026 height = h; 00027 moveScreen(tlX, tlY); 00028 } |
|
Returns the (signed) height of the VScreen Definition at line 116 of file VScreen.cpp. References height. Referenced by BitmapScreen::DoneWriting().
00117 { 00118 return height; 00119 } |
|
Gets the region (see MS Platform SDK) Definition at line 84 of file VScreen.cpp. References screenRgn.
00085 { 00086 return screenRgn; 00087 } |
|
Gets the regions Rectangle (see MS Platform SDK) Definition at line 76 of file VScreen.cpp. References screenRect. Referenced by BitmapScreen::paint().
00077 { 00078 return screenRect; 00079 } |
|
Returns the x co-ordinate of the last point on the screen Definition at line 100 of file VScreen.cpp. References pointX. Referenced by registerMouse().
00101 { 00102 return pointX; 00103 } |
|
Returns the y co-ordinate of the last point on the screen Definition at line 108 of file VScreen.cpp. References pointY. Referenced by registerMouse().
00109 { 00110 return pointY; 00111 } |
|
Returns the width of the VScreen Definition at line 124 of file VScreen.cpp. References width. Referenced by BitmapScreen::DoneWriting().
00125 { 00126 return width; 00127 } |
|
Invalidates the entire region (marks for painting) and sends a WM_PAINT message Definition at line 92 of file VScreen.cpp. References screenRgn. Referenced by UpdateHandler::update().
00093 { 00094 InvalidateRgn(hWnd, screenRgn, Erase); 00095 } |
|
Move the screen top left corner to the specified x, y co-ordinate Definition at line 37 of file VScreen.cpp. References height, screenRect, and screenRgn. Referenced by VScreen().
00038 { 00039 screenRgn = CreateRectRgn( 00040 tlX, tlY, 00041 this->width + tlX, 00042 abs(height) + tlY); 00043 00044 GetRgnBox(screenRgn, &screenRect); 00045 } |
|
This function takes a window co-ordinate and tests if it is in the screen region. The internal point is set to a VScreen co-ordinate iff it is.
Definition at line 57 of file VScreen.cpp. References height, pointX, pointY, screenRect, and screenRgn. Referenced by Cls_OnLButtonDown(), and Cls_OnLButtonUp().
00058 { 00059 if ( PtInRegion(screenRgn, x, y) ){ 00060 pointX = x - screenRect.left; 00061 00062 if( height < 0 ) 00063 pointY = -y + screenRect.top - (height + 1); 00064 else 00065 pointY = y - screenRect.top; 00066 00067 return true; 00068 } else { 00069 return false; 00070 } 00071 } |