Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /eXene/releases/release-110.72/styles/Notes
ViewVC logotype

View of /eXene/releases/release-110.72/styles/Notes

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3483 - (download) (annotate)
Wed Feb 3 16:54:44 2010 UTC (9 years, 6 months ago) by jriehl
File size: 2457 byte(s)
Release 110.72
RESOURCE SPECIFICATIONS

A resource specification has the following format:

    <ResourceSpec>	::= <WhiteSp> <ResourceName> <WhiteSp> ":" <Value>

    <ResourceName>	::= (<Binding>)? (<Component> <Binding>)* <ComponentName>

    <Binding>		::= "." | "*"

    <Component>		::= "?" | <ComponentName>

    <ComponentName>	::= <NameChar> (<NameChar>)*

    <NameChar>		::= "a" ... "z" | "A" ... "Z" | "0" ... "9" | "_" | "-"

    <Value>		::= (any character other than null or an unescaped newline)*

Note that the last component in a resource name is the name of the attribute.


STYLES

A style is a database of resource specifications.


STYLE VIEWS

A style view defines a search key for a style database.  A search key consists
of a "name" and a list of aliases.  Both the name and aliases are called
``style names,'' and have the following string format:

    <StyleName>		::= <ComponentName> ("." <ComponentName>)*


MATCHING RULES

When using a style view to search for an attribute in a style database, we first
search using the name, and then each alias in order until a match is found.
We use the following algorithm (taken from X11R5) to determine if a style name
matches an entry in the style database:

The name is scanned from left to right one component at a time.  For each
component, the matching components/bindings in the style are determined,
and these are compared according to the following precedence rules:

    1)	An entry that contains a matching component (component name or "?")
	takes precedence over entries that elide the component (i.e., with
	a loose binding).

    2)	An entry with a matching name takes precedence over "?".

    3)  An entry preceeded by a tight binding takes precedence over an
	entry preceeded by a loose binding.


THINGS TO THINK ABOUT

In the current plan, a style is assumed to be a mutable data structure which
is maintained by a thread.  Searching for attributes, or adding new attributes
is done by comunicating with the style server.  In addition, attributes (at
least mutable ones) must be represented as active objects, since they are
responsible for broadcasting changes to their state to any listeners.

A style could be represented as a functional search structure, with the attributes
being active objects (i.e., threads).  This means that adding attributes to
a style creates a new style; on the other hand, it reduces the synchronization
required during lookup, which could be important.


root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0