>  Docs Center  >  Libraries  >  CATALYST  >  PIXMAPWIDGET__DEFINE
Libraries

PIXMAPWIDGET__DEFINE

PIXMAPWIDGET__DEFINE

Name


      PIXMAPWIDGET

Purpose



      The purpose of this routine is to implement a pixmap window as a
      widget object.
      Putting this widget into a hierarchy will cause the display generated
      by drawing the child widgets to be buffered through the pixmap to the
      target window. For this reason, invoking the DRAW method on the pixmap
      simply does a copy to the target window (or current window, if the target
      window is undefined). If you wish to simple draw the child widgets on the
      pixmap without affecting the target window, use the REFRESH method.
     
      The pixmap actually exists in an unmapped TopLevelBaseWidget. This is
      super convenient, because if you need to see the pixmap for debugging
      purposes, all you need to is set the MAP=1 keyword on its SetProperty
      method. To make the pixmap disappear again, set MAP=0.

Author



        FANNING SOFTWARE CONSULTING BURRIDGE COMPUTING
        1645 Sheely Drive 18 The Green South
        Fort Collins Warborough, Oxon
        CO 80526 USA OX10 7DN, ENGLAND
        Phone: 970-221-0438 Phone: +44 (0)1865 858279
        E-mail: davidf@dfanning.com E-mail: davidb@burridgecomputing.co.uk

Category



      Object widgets.

Syntax



      pixmapWidget = Obj_New("PixmapWidget", theParent)

Superclasses



      TOPLEVELBASE
      BASEWIDGET
      WIDGETATOM
      CATATOM
      CATCONTAINER
      IDL_CONTAINER

Class Structure



  class = { PixmapWidget, $
            _backgroundColor: "", $ ; The name of the background color.
            _drawWidget: 0L, $ ; The Widget ID of the draw widget.
            _keep: 0B, $ ; To conserve pixmap memory, KEEP=1 retains the pixmap, KEEP=0 does not.
            _isReady: 0B, $ ; A flag to show if the window needs updating before copy.
            _noDraw: 0B, $ ; A flag to inhibit drawing operation.
            _snapshot: OBJ_NEW(), $ ; For KEEP=0, a snapshot of the required pixmap
            _targetWindow: OBJ_NEW(), $ ; A window object that is to be the target of the pixmap.
            _xsize: 0L, $ ; The X size of the pixmap window.
            _ysize: 0L, $ ; The Y size of the pixmap window.
            INHERITS TOPLEVELBASE }

Notes



      Note that unless the PIXMAPWIDGET is a child of another widget, that
      the user will be responsible for destroying the PIXMAPWIDGET. Failure to
      do this will result in memory leakage. In other words, if the PIXMAPWIDGET
      exists in its own unmapped TOPLEVELBASE, it will NOT be automatically destroyed
      when the program that uses it is destroyed. This must be done *explicitly*.

Modification History



      Written by: David Burridge, 13th July 2002.
      Small change to SetProperty and GetProperty methods to get READY status. 28 Oct 2004. DWF.
      Added response to RESIZEDRAWWIDGET message in MessageHandler method. 7 Dec 2004. DWF.
      I made the default BACKGROUND_COLOR for pixmaps white to facilitate PostScript
          output and conform to draw widgets. 12 Dec 2004. DWF
      Removed the "overlay" capability, which we were not using. 23 January 2005. DWF.
      Changed the BACKGROUND_COLOR back to "black". Tired of fighting it... 5 July 2005. DWF.
      Renamed the former RETAIN keyword to KEEP, so that RETAIN can be used in its normal
          IDL window definition. 21 August 2006. DWF.
      Changed BACKGROUND_COLOR to BACKGROUNDCOLOR to remain consistent with GET/SET methods. And
          removed DRAW_COLOR keyword, which was used for overlays. 21 August 2006. DWF.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us