- Main Page
- Classes
- Files

- File List

# C:/Documents and Settings/Administrator/Desktop/woopsi-src-0.40/Woopsi/libwoopsi/include/dimmedscreen.h

    00001 #ifndef _DIMMED_SCREEN_H_
    00002 #define _DIMMED_SCREEN_H_
    00003
    00004 #include "screen.h"
    00005 #include "graphicsport.h"
    00006 #include "woopsi.h"
    00007
    00008 namespace WoopsiUI {
    00009
    00024         class DimmedScreen : public Screen {
    00025         public:
    00026
    00030                 DimmedScreen() : Screen("", 0) { };
    00031
    00038                 virtual void draw(Rect clipRect) {
    00039
    00040                         // Erase the gadget, thus redrawing everything underneath it
    00041                         _flags.erased = false;
    00042                         disableDrawing();
    00043                         woopsiApplication->eraseRect(clipRect);
    00044                         enableDrawing();
    00045                         _flags.erased = false;
    00046
    00047                         // Dim the screen
    00048                         GraphicsPort* port = newInternalGraphicsPort(clipRect);
    00049                         port->dim(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
    00050                         delete port;
    00051                 };
    00052
    00056                 virtual inline ~DimmedScreen() { };
    00057
    00061                 inline DimmedScreen(const DimmedScreen& dimmedScreen) : Screen(dimmedScreen) { };
    00062         };
    00063 }
    00064
    00065 #endif