ClassyTcl

  Default

Home    Documentation    Screenshots    Binary distributions    Source distribution   

subclass of Class
The class Default is used to query and change default values in ClassyTk programs. This is done by calling methods from the class Classy::Default itself; the class is not intended to be instanciated.

Any list of default values in the Default system is identified by a type and a key. Two types are in use by ClassyTk Widgets:

app
to store default values set and queried using the DefaultMenu. These are typically used in all kinds of entries.
geometry
to keep the position and size of Dialogs.
Default get type ?key? ?notfound?
query the default system.
no arguments
return a list of all keys of type type and their values
?key?
return the defaults list associated with the key of type type
?key? ?notfound?
return the defaults list associated with the key of type type. If the key does not exists, return notfound.
Default set type key value
set the defaults list associated with key key of type type to value.
Default unset type key
unset the value associated with key key of type type.
Default add type key value
add value to the defaults list associated with key key of type type.
Default remove type key value
remove value from the defaults list associated with key key of type type.
Default names ?type? ?pattern?
returns a list of all keys of type $type that match $pattern (if given). If type is not given, it returns a list of all types.
Default load ?type? ?file?
Without arguments, all default values are reloaded. If type is given, only the defaults of type type will be reloaded. If file is specified, the values will be loaded from file rather than the normal loacation.
Default save ?type? ?file?
Without arguments, all default values are saved. If type is given, only the defaults of type type will be saved. If file is specified, the values will be saved to file rather than the normal location.
Default clear ?type?
remove all defaults. If the type argument is given, remove only defaults of type type.
Peter De Rijk
hosted at SourceForge.net Logo