/*
   --------------------------------------------------------
   Filename.....: fontDlg.cc
   ClassName....: fontDlg
   Purpose......: ChooseFont dialog
                  with some properties exposed.
   Programmer...: Rick Miller -  http://www.treturn.com/dbase
   Date.........: December 03, 2004
   Notes........: See Notes below.
   Written for..: dBASE dB2K 0.1 and newer.
   Rev. History.: See Revisions below.
   Dependencies.: applicationIni.cc,
                  VStruct32Ex.cc
                  or VStruct.cc,
                  or VStruct.prg,
                  and VStruct.h.
   Usage........: set procedure to fontDlg.cc additive
   HelpFile.....: None.
   Example:.....: See Example below.
   SampleFile...: fontDlg.wfm.
   --------------------------------------------------------
   Example:
   --------------------------------------------------------
      oRef  =  new fontDlg()
      oRef.inspect()
      // assign property values as desired.
      // call methods as desired.
      // call to display the dialog:
      oRef.getFont()
      // make selections.
      // use properties and/or methods.
      oRef.release()
   --------------------------------------------------------
   Notes:
   --------------------------------------------------------
      1) the color and value properties are outputs.
      2) this.iniFile default is:
         a) _app.iniFile when available.
         b) in Runtime _app.exename.ini.
         c) in IDE _dbwinhome + className + .ini.
      3) iniFile assignments without a path default to:
         a) when in runtime = _dbwinhome.
         b) when in ide = set("directory").
      4) selection of OK auto-saves to this.iniFile.
   --------------------------------------------------------
   Revisions:
   --------------------------------------------------------
      February 18, 2011
         1) default ini file adapted to following
            Windows security model and a standard User
            with the use of applicationIni.cc.
      February 10, 2005
         1) renamed all external functions.
      January 05, 2005
         1) fix for the limitSize property not resetting.
         2) changed to default ini when in the IDE (see Notes).
      December 21, 2004
         1) changes to constant names.
         2) standardized the constructor area.
      December 17, 2004
         1) added reset method.
         2) added compatibility for VStruct.prg.
   --------------------------------------------------------
   Properties:
   --------------------------------------------------------
      Name:                Data:    Default:
      -----------------------------------------------------
      bold                    false
      color                   "black"
         use as if readOnly.
      colorStyle               0
         preference for color property format.
         0  =  java color name.
         1  =  dBASE color name.
         2  =  system color name.
         3  =  dBASE hex color.
      effects                 true
         allow color, underline, strikeout ?
      fontList                 0
         0  =  display screen and printer fonts.
         1  =  display screen fonts.
         2  =  display printer fonts.
         3  =  display scalable fonts.
         4  =  display fonts that are on both the
               screen and printer.
      fontName                "Arial"
      fontType                 0
         0  =  all types.
         1  =  trueType only.
         2  =  fixedPitch only.
      iniFile                 _app.exename.ini
      italic                  false
      limitSize               false
         restrict font selection to
         >= sizeMin and <= sizeMax.
      messages                true
      noFaceSelect            false
         display without font selected ?
      noScriptSelect          true
         disable the script selection ?
      noSizeSelect            false
         display without size selected ?
      noStyleSelect           false
         display without style selected ?
      size                     10
      sizeMax                  72
         requires limitSize.
      sizeMin                  8
         requires limitSize.
      showHelp                false
      strikeout               false
      underline               false
      value                   Arial,10,Swiss
         use as if readOnly.
      winColor                 0
   --------------------------------------------------------
   Methods:
   --------------------------------------------------------
      assignColorNormal( GUI object, [ background])
                  assign color selection to object (oRef).
      assignColorHighLight( GUI object, [ background])
                  assign color selection to object (oRef).
      assignFont( GUI object)
                  assign font selection to object (oRef).
      clearIni()  empty iniFile entries.
      getFont()   return is similar to dBASE getFont() function.
      loadIni()   assign properties from this.iniFile.
      refresh()   updates this.value and this.color properties.
      release()   destroys object, closes procedure files.
      reset()     load all default settings.
      saveIni()   save properties to this.iniFile.
      setColor( dbase color)
                  assign this.winColor with a dBASE color.
      show()      returns true/false (OK/Cancel selection).
*/