/*
   --------------------------------------------------------
   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.: 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) in Runtime _app.exename.ini.
         b) 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 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                 <bool>   false
      color                <char>   "black"
         use as if readOnly.
      colorStyle           <int>    0
         preference for color property format.
         0  =  java color name.
         1  =  dBASE color name.
         2  =  system color name.
         3  =  dBASE hex color.
      effects              <bool>   true
         allow color, underline, strikeout ?
      fontList             <int>    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             <char>   "Arial"
      fontType             <int>    0
         0  =  all types.
         1  =  trueType only.
         2  =  fixedPitch only.
      iniFile              <char>   _app.exename.ini
      italic               <bool>   false
      limitSize            <bool>   false
         restrict font selection to
         >= sizeMin and <= sizeMax.
      messages             <bool>   true
      noFaceSelect         <bool>   false
         display without font selected ?
      noScriptSelect       <bool>   true
         disable the script selection ?
      noSizeSelect         <bool>   false
         display without size selected ?
      noStyleSelect        <bool>   false
         display without style selected ?
      size                 <int>    10
      sizeMax              <int>    72
         requires limitSize.
      sizeMin              <int>    8
         requires limitSize.
      showHelp             <bool>   false
      strikeout            <bool>   false
      underline            <bool>   false
      value                <char>   Arial,10,Swiss
         use as if readOnly.
   --------------------------------------------------------
   Methods:
   --------------------------------------------------------
      assignColorNormal(<oRef> GUI object, [<bool> background])
                  assign color selection to object (oRef).
      assignColorHighLight(<oRef> GUI object, [<bool> background])
                  assign color selection to object (oRef).
      assignFont(<oRef> 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(<char> dbase color)
                  assign this.winColor with a dBASE color.
      show()      returns true/false (OK/Cancel selection).
   */