octave: User-Defined Preferences

 
 35.5 User-Defined Preferences
 =============================
 
  -- : VAL = getpref ("GROUP", "PREF")
  -- : VAL = getpref ("GROUP", "PREF", DEFAULT)
  -- : {VAL1, VAL2, ...} = getpref ("GROUP", {"PREF1", "PREF2", ...})
  -- : PREFSTRUCT = getpref ("GROUP")
  -- : PREFSTRUCT = getpref ()
      Return the preference value corresponding to the named preference
      PREF in the preference group GROUP.
 
      The named preference group must be a string.
 
      If PREF does not exist in GROUP and DEFAULT is specified, create
      the preference with value DEFAULT and return DEFAULT.
 
      The preference PREF may be a string or cell array of strings.  If
      it is a cell array of strings then a cell array of preferences is
      returned.
 
      The corresponding default value DEFAULT may be any Octave value,
      .e.g., double, struct, cell array, object, etc.  Or, if PREF is a
      cell array of strings then DEFAULT must be a cell array of values
      with the same size as PREF.
 
      If neither PREF nor DEFAULT are specified, return a structure of
      preferences for the preference group GROUP.
 
      If no arguments are specified, return a structure containing all
      groups of preferences and their values.
 
      See also: Seeaddpref XREFaddpref, Seesetpref XREFsetpref,
      Seeispref XREFispref, Seermpref XREFrmpref.
 
  -- : setpref ("GROUP", "PREF", VAL)
  -- : setpref ("GROUP", {"PREF1", "PREF2", ...}, {VAL1, VAL2, ...})
      Set the preference PREF to the given VAL in the named preference
      group GROUP.
 
      The named preference group must be a string.
 
      The preference PREF may be a string or a cell array of strings.
 
      The corresponding value VAL may be any Octave value, .e.g., double,
      struct, cell array, object, etc.  Or, if PREF is a cell array of
      strings then VAL must be a cell array of values with the same size
      as PREF.
 
      If the named preference or group does not exist, it is added.
 
      See also: Seeaddpref XREFaddpref, Seegetpref XREFgetpref,
      Seeispref XREFispref, Seermpref XREFrmpref.
 
  -- : addpref ("GROUP", "PREF", VAL)
  -- : addpref ("GROUP", {"PREF1", "PREF2", ...}, {VAL1, VAL2, ...})
      Add the preference PREF and associated value VAL to the named
      preference group GROUP.
 
      The named preference group must be a string.
 
      The preference PREF may be a string or a cell array of strings.  An
      error will be issued if the preference already exists.
 
      The corresponding value VAL may be any Octave value, .e.g., double,
      struct, cell array, object, etc.  Or, if PREF is a cell array of
      strings then VAL must be a cell array of values with the same size
      as PREF.
 
      See also: Seesetpref XREFsetpref, Seegetpref XREFgetpref,
      Seeispref XREFispref, Seermpref XREFrmpref.
 
  -- : rmpref ("GROUP", "PREF")
  -- : rmpref ("GROUP", {"PREF1", "PREF2", ...})
  -- : rmpref ("GROUP")
      Remove the named preference PREF from the preference group GROUP.
 
      The named preference group must be a string.
 
      The preference PREF may be a string or cell array of strings.
 
      If PREF is not specified, remove the preference group GROUP.
 
      It is an error to remove a nonexistent preference or group.
 
      See also: Seeaddpref XREFaddpref, Seeispref XREFispref,
      Seesetpref XREFsetpref, Seegetpref XREFgetpref.
 
  -- : ispref ("GROUP", "PREF")
  -- : ispref ("GROUP", {"PREF1", "PREF2", ...})
  -- : ispref ("GROUP")
      Return true if the named preference PREF exists in the preference
      group GROUP.
 
      The named preference group must be a string.
 
      The preference PREF may be a string or a cell array of strings.
 
      If PREF is not specified, return true if the preference group GROUP
      exists.
 
      See also: Seegetpref XREFgetpref, Seeaddpref XREFaddpref,
      Seesetpref XREFsetpref, Seermpref XREFrmpref.
 
  -- : prefdir
  -- : prefdir (1)
  -- : DIR = prefdir
      Return the directory that holds the preferences for Octave.
 
      Examples:
 
      Display the preferences directory
 
           prefdir
 
      Change to the preferences folder
 
           cd (prefdir)
 
      If called with an argument, the preferences directory is created if
      it doesn’t already exist.
 
      See also: Seegetpref XREFgetpref, Seesetpref XREFsetpref,
DONTPRINTYET       Seeaddpref XREFaddpref, Seermpref XREFrmpref, *noteispref:
DONTPRINTYET       Seeaddpref XREFaddpref, Seermpref XREFrmpref, Seeispref

      XREFispref.
 
  -- : preferences
      Display the GUI preferences dialog window for Octave.