The RTL based option creator is used
to instantiate the template gfilter with a
Tk Window. The used creator window must have a
-class
property.
Acceptable Tk Windows are: toplevel for floating windows, and frame for embedded windows.
See the options manual entry for details on the standard options.
The filter set. »items« is a list of property names.
format script; this »command« is executed whenever the local filter is applied.
Example 3.4. Gfilter Usage
gfilter .inspector.filter \ -command [list .inspector setfilter %s] \ -group [.inspector get-action collect] \ -items [.inspector get-action \ [get-inspector .inspector],options];
In Example 3.4, “Gfilter Usage” A new filter dialog
is created and filled with a filter set specified with
»-items«. All available items –for the current window–
are provided via »-group«. The .inspector setfilter
script is executed after a new filter set was composed,
»%s« is expanded with all items inside the filter set.
»group« are the properties displayed inside the top listbox. »group« usually contains all the property names supported by the inspected window. Duplicated properties such as »bg«, »fg« and »bd« are omitted.
The »gfilter« command creates a »gfilter window.«
Graphical User Interface for the »positive« filter Dialog. This dialog is available from within the Inspector(n)’s context menu to the right.
The gfilter dialog is thought of as a quick and dirty filter mechanism. In usual circumstances these filters will not be used together with global filters. There is a »Disable Global Filters« entry inside the Inspector(n) context menu, which does temporarily disable the global filter. Use it, when working with local filters.
Global –negative– Filters are defined by »gfilter«’s preference counterpart: Greffilters(n).
A Window created through the gfilter command exposes various functions. Using these functions has the following general form:
pathName option ?arg arg ...?
PathName is the same as the window path name. Option and the args determine the exact behavior of the command. The following commands are possible for this window:
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the gfilter command.
Query or modify the configuration options of the window. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given window option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the gfilter command.
Choose an item from one listbox and apply this items to the gistbox.
Initialize the filter dialog. By applying stripes, make the correct transient wm setting and resize the »extender« (remembered).
Rewritten : 05/22/2008, Roger -- removed what is handled through the code generation.
Apply selected filter set, using the given call-back »-command«.
Apply an empty filter set, to the given call-back »-command«.