이전: , 상위 문서: GUI Development   [차례][찾아보기]


35.5 User-Defined Preferences

= getpref ("group", "pref")
= 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.

같이 보기: addpref, setpref, ispref, rmpref.

setpref ("group", "pref", )
setpref ("group", {"pref1", "pref2", …}, {val1, val2, …})

Set the preference pref to the given 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 may be any Octave value, .e.g., double, struct, cell array, object, etc. Or, if pref is a cell array of strings then 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.

같이 보기: addpref, getpref, ispref, rmpref.

addpref ("group", "pref", )
addpref ("group", {"pref1", "pref2", …}, {val1, val2, …})

Add the preference pref and associated value 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 may be any Octave value, .e.g., double, struct, cell array, object, etc. Or, if pref is a cell array of strings then must be a cell array of values with the same size as pref.

같이 보기: setpref, getpref, ispref, rmpref.

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.

같이 보기: addpref, ispref, setpref, getpref.

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.

같이 보기: getpref, addpref, setpref, rmpref.

prefdir
prefdir (1)
자료방 = 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.

같이 보기: getpref, setpref, addpref, rmpref, ispref.

preferences

Display the GUI preferences dialog window for Octave.


이전: , 상위 문서: GUI Development   [차례][찾아보기]