'**SUMMARY**
This is the generic display object.  You are able to set the display type.
The standard display type will pop up a window
The notebook display type is to be used in conjunction with IPython Notebooks
this is so it is web based.  If you have IPython Notebooks installed
you just need to start IPython Notebooks and open in your browser.
**PARAMETERS**
* *resolution* - the size of the diplay in pixels.
* *flags* - ???
* *title* - the title bar on the display.
* *displaytype* - The type of display. Options are as follows:
* \'standard\' - A pygame window.
* \'notebook\' - Ipython Web Notebook output
* *headless* - If False we ignore healess mode. If true all rendering is suspended.
**EXAMPLE**
Once in IPython you can do the following:
>>> from SimpleCV import *
>>> disp = Display(displaytype=\'notebook\')
>>> img = Image(\'simplecv\')
>>> img.save(disp)'

def __init__(self, resolution=(640, 480), flags=0, title='SimpleCV', displaytype='standard', headless=False):

    global PYGAME_INITIALIZED
    if headless:
        os.environ['SDL_VIDEODRIVER'] = 'dummy'
    if (not PYGAME_INITIALIZED):
        if (not (displaytype == 'notebook')):
            pg.init()
        PYGAME_INITIALIZED = True
    self.xscale = 1.0
    self.yscale = 1.0
    self.xoffset = 0
    self.yoffset = 0
    self.lastLeftButton = 0
    self.lastRightButton = 0
    self.leftButtonDown = None
    self.leftButtonUp = None
    self.rightButtonDown = None
    self.rightButtonUp = None
    self.pressed = None
    self.displaytype = displaytype
    self.mouseRawX = 0
    self.mouseRawY = 0
    self.resolution = resolution
    if (not (displaytype == 'notebook')):
        self.screen = pg.display.set_mode(resolution, flags)
    if os.path.isfile(os.path.join(LAUNCH_PATH, 'sampleimages', 'simplecv.png')):
        scvLogo = SimpleCV.Image('simplecv').scale(32, 32)
        pg.display.set_icon(scvLogo.getPGSurface())
    if ((flags != pg.FULLSCREEN) and (flags != pg.NOFRAME)):
        pg.display.set_caption(title)
