Class Fox::FXSettings
In: FXSettings.rb
../lib/fox/core.rb
Parent: FXDict

FXSettings is a key-value database. This is normally used as part of FXRegistry, but can also be used separately in application that need to maintain a key-value database of their own.

Methods
data    deleteEntry    deleteSection    each_section    existingEntry?    existingSection?    find    modified=    modified?    new    parseFile    readBoolEntry    readColorEntry    readIntEntry    readRealEntry    readStringEntry    readUnsignedEntry    unparseFile    writeBoolEntry    writeColorEntry    writeIntEntry    writeRealEntry    writeStringEntry    writeUnsignedEntry   
Public Class methods
new()

Construct settings database.

Public Instance methods
parseFile(filename, mark)

Parse a file containing a settings database.

unparseFile(filename)

Unparse settings database into given file.

data(pos)

Obtain the string dictionary for the given section.

find(section)

Find string dictionary for the given section.

each_section() {|aStringDict| ...}

Iterate over sections (where each section is a dictionary).

readStringEntry(section, key, default="")

Read a string registry entry from the specified section and key. If no value is found, the default value is returned.

readIntEntry(section, key, default=0)

Read an integer registry entry from the specified section and key. If no value is found, the default value is returned.

readUnsignedEntry(section, key, default=0)

Read an unsigned integer registry entry from the specified section and key. If no value is found, the default value is returned.

readRealEntry(section, key, default=0.0)

Read a double-precision floating point registry entry from the specified section and key. If no value is found, the default value is returned.

readColorEntry(section, key, default=0)

Read a color value registry entry from the specified section and key. If no value is found, the default value is returned.

writeStringEntry(section, key, value)

Write a string registry value to the specified section and key.

writeIntEntry(section, key, value)

Write an integer registry value to the specified section and key.

writeUnsignedEntry(section, key, value)

Write an unsigned integer registry value to the specified section and key.

writeRealEntry(section, key, value)

Write a double-precision floating point registry value to the specified section and key.

writeColorEntry(section, key, value)

Write a color registry value to the specified section and key.

deleteEntry(section, key)

Delete the registry entry for thr specified section and key.

existingEntry?(section, key)

Returns true if a registry entry exists for the specified section and key.

deleteSection(section)

Delete the entire section.

existingSection?(section)

Returns true if the named section exists.

modified=(mdfy=true)

Mark as changed.

modified?()

Returns true if this settings object has been modified.

readBoolEntry(section, key, default=false)

Read a boolean registry entry from the specified section and key. If no value is found, the default value is returned.

writeBoolEntry(section, key, value)

Write a boolean registry value to the specified section and key.