>  Docs Center  >  Libraries  >  Motley  >  MGHGRGLAXIS__DEFINE
Libraries

MGHGRGLAXIS__DEFINE

MGHGRGLAXIS__DEFINE

Class Name


  MGHgrGLaxis

Purpose


  This class implements an axis with optional labelling in the gaps
  between the major tick marks ("GL" = gaps labelled).
  An MGHgrGLaxis intercepts calls to the superclass's Draw method,
  at which point it fiddles around to put the gap labels in the
  right places & hide the tick labels. So it is called every time
  the axis is drawn (which is more often than you might think)
  nevertheless the run-time penalty does not seem to be
  significant. Subclassing Draw is necessary because some of the
  information needed to draw the gap labels is not known until draw
  time.

Category


  Object graphics.

Superclasses


  MGHgrAxis.

Properties


  The following properties (ie keywords to the Init, GetProperty &
  SetProperty methods) are supported in addition to those inherited
  from MGHgrAxis:
    LABEL_GAPS (Init, Get, Set)
      This property determines whether the gaps and/or tick marks are
      labelled. Valid values are:
        0 - Label tick marks and not gaps, just like MGHgrAxis. This
            is the default
        1 - Label gaps and not tick marks.
        2 - Label gaps and tick marks. This is intended mainly for
            debugging.
    GAPTEXT (Get)
      A string array containing the gap labels, as calculated last
      time the axis was drawn.
  The following properties are inherited from MGHgrAxis with
  additional functionality
    TICKFORMAT, TICKFRMTDATA (Init, Get, Set)
      If LABEL_GAPS is set to 1 or 2 then these are used for
      formatting the gap labels as well as the tick labels.
  Another note:
    MINOR (Init, Get, Set)
      This behaves in exactly the same way as in MGHgrAxis, but
      normally if gaps are labelled one would set it to 0.

To Do


  Make GAPTEXT a settable property? Do most of the gap-text
  calculations when relevant properties are changed, not when the axis
  is drawn?
###########################################################################
  This software is provided subject to the following conditions:
  1. NIWA makes no representations or warranties regarding the
    accuracy of the software, the use to which the software may
    be put or the results to be obtained from the use of the
    software. Accordingly NIWA accepts no liability for any loss
    or damage (whether direct of indirect) incurred by any person
    through the use of or reliance on the software.
  2. NIWA is to be acknowledged as the original author of the
    software where the software is used or presented in any form.
###########################################################################

Modification History


  Mark Hadfield, 1998-06:
    Written.
  Mark Hadfield, 2000-05:
    Changed method of suppressing the tick-mark labels in the Draw
    method. Previously it was done by retrieving the axis's TICKTEXT
    object, then setting its STRINGS property to a vector of blank
    strings. This was found not to work for vector-output devices,
    introduced in IDL 5.3. So, now the tick mark labels are
    suppressed by setting the axis's NOTEXT property.
  Mark Hadfield, 2000-07:
    Code for labelling gaps was overhauled, so that now the gap
    labels can be calculated dynamically from corresponding axis
    values & optionally formatted with the TICKFORMAT and
    TICKFRMTDATA properties.
  Mark Hadfield, 2001-11:
    - Updated for IDL 5.5.
    - Added support for TICKUNITS--only "years" is supported now but
      adding the remainder would be trivial.
  Mark Hadfield, 2002-04:
    - This class was made a subclass of MGHgrMSAxis, not MGHgrAxis.
    - Added a boolean value to the class structure to record whether
      the gap-text object should be protected from being recreated
      at every redraw.
  Mark Hadfield, 2004-07:
    - Modified to be consistent with the new axis classes. Now
      inherits from MGHgrAxis, which includes the master-slave
      functionality previously in MGHgrMSAxis.
    - GAPTEXT now a string property, as are TITLE and TICKTEXT,
      inherited from MGHgrAxis. The associated IDLgrText objects
      are handled behind the scenes.
    - Supports property sheets.
    - IDL 6.0 logical syntax.



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