X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3-doc.git;a=blobdiff_plain;f=ionconf%2Fnode5.html;h=dc5874a2a7283ac1292f525d322d757425505d28;hp=de5ae5ec4bc23893e205c9a005e7cc940289f971;hb=20080207;hpb=a35ba2541b8601953ae94f779a85ae70de19cd11 diff --git a/ionconf/node5.html b/ionconf/node5.html index de5ae5e..dc5874a 100644 --- a/ionconf/node5.html +++ b/ionconf/node5.html @@ -28,31 +28,31 @@ original version by: Nikos Drakos, CBLU, University of Leeds @@ -61,51 +61,53 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections
@@ -120,12 +122,13 @@ original version by: Nikos Drakos, CBLU, University of Leeds This chapter first gives in section 4.1 a general outline of how drawing engines are used, of style specifications and then in section 4.2 describes how to specify styles -for the default drawing engine. +for the default drawing engine. Some additional settings and +user attributes are explained in Sections 4.3.

- +
4.1 Drawing engines, style specifications and sub-styles

@@ -133,7 +136,7 @@ for the default drawing engine.

Ion's drawing routines are abstracted into so-called drawing engine modules that can, again depending on the system, be dynamically -loaded as needed. The drawing engine modules provide ''brushes'' +loaded as needed. The drawing engine modules provide ``brushes'' that objects can use to draw some high-level primitives such as borders and text boxes (in addition to simple text and rectangle drawing) on their windows and configure e.g. the shape and @@ -150,17 +153,17 @@ element1-element2-...-elementn

-An example of such a style specification is tab-frame; +An example of such a style specification is `tab-frame'; see the table in subsection 4.1.1 for more styles.

When an object asks for a brush of certain style, the selected drawing engine will attempt to find the closest match to this specification. The styles/brushes defined by the drawing engines -may have asterisks (*) as some of the elements indicating +may have asterisks (`*') as some of the elements indicating a match to anything. Exact matches are preferred to asterisk matches and longer matches to shorter. For example, let a brush -for style foo-bar-baz be queried, then the following +for style `foo-bar-baz' be queried, then the following brushes are in order of preference:

@@ -177,7 +180,7 @@ specified, also in the form

 attr1-attr2-...-attrn
 
-These extra attributes are called substyles +These extra attributes are called substyles and allow, for example, the state of the object to be indicated by different colour sets while keeping the interface at an abstract level and the drawing engine completely ignorant @@ -206,27 +209,27 @@ tag and drag states.) Style name Description -frame +`frame' Style for frames. - Substyle attributes: active/inactive - (mutually exclusive) and - quasiactive/not_quasiactive. + Substyle attributes: `active'/`inactive' + (mutually exclusive), and + `quasiactive'. A frame is ``quasiactive'' when an active region - has a backlink to it, such as a detached window. + has a back-link to it, such as a detached window. -frame-tiled +`frame-tiled' A more specific style for tiled frames. - Substyle attributes as for frame. + Substyle attributes as for `frame'. -frame-tiled-alt +`frame-tiled-alt' An alternative style for tiled frames. Often used to disable the tab-bar. -frame-floating +`frame-floating' A more specific style for floating frames. -frame-transient +`frame-transient' A more specific style for frames containing transient windows. @@ -243,39 +246,39 @@ tag and drag states.) Style name Description -tab +`tab' Style for frames' tabs and menu entries. Substyle attributes: - active/inactive and - selected/unselected + `active'/`inactive' and + `selected'/`unselected' -tab-frame +`tab-frame' A more specific style for frames' tabs. - Additional substyle attributes include: - tagged/not_tagged, - dragged/not_dragged, - activity/no_activity and - quasiactive/not_quasiactive. + Additional substyle attributes include those of + the `frame' style, as well as tab-specific + `tagged'/`not_tagged', + `dragged'/`not_dragged', and + `activity'/`no_activity'. -tab-frame-tiled, +`tab-frame-tiled',   -tab-frame-tiled-alt, +`tab-frame-tiled-alt',   -tab-frame-floating, +`tab-frame-floating',   -tab-frame-transient +`tab-frame-transient' More specific styles for frames in the different modes. -tab-menuentry +`tab-menuentry' A more specific style for entries in WMenus. - Additional substyle attributes include submenu and - occasionally also activity is used. + Additional substyle attributes include `submenu' and + occasionally also `activity' is used. -tab-menuentry-bigmenu +`tab-menuentry-bigmenu' An alternate style for entries in WMenus. @@ -291,30 +294,39 @@ tag and drag states.) Style name Description -input +`input' A style for WInputs. -input-edln +`input-edln' A more specific style for WEdlns. - Substyle attributes: selection for selected text and - cursor for the cursor indicating current editing point. + Substyle attributes: `selection' for selected text and + `cursor' for the cursor indicating current editing point. -input-message +`input-message' A more specific style for WMessages. -input-menu +`input-menu' A more specific style for WMenus. -input-menu-bigmenu +`input-menu-bigmenu' An alternate style for WMenus. -moveres_display +`moveres_display' The box displaying position/size when moving or resizing frames. -dock +`stdisp' +Any status display. + +`stdisp-dock' The dock. +`stdisp-statusbar' +The statusbar. Substyles include: + the name of any monitor/meter (such as `date'), and + the supplied hint. Typical hints are: `normal', + `important', and `critical'. +

@@ -354,13 +366,13 @@ end

The gr.select_engine function sees if the engine given as argument is registered (the default drawing engine is -simply called ''de''). If the engine could not be found, it +simply called ``de''). If the engine could not be found, it tries to load a module of the same name. If the engine still -is not registered, gr.select_engine returns false +is not registered, gr.select_engine returns `false' and in this case we also exit the style setup script. If the engine was found, gr.select_engine sees that further requests for brushes are forwarded to that engine -and returns true. +and returns `true'.

Before defining new styles it may be a good idea to clear old @@ -412,7 +424,7 @@ border elements and styles referred to there are explained in Figure

-

+
@@ -450,10 +462,10 @@ in /usr/X11R6/lib/X11/rgb.txt (exact path varying). - + - + @@ -463,7 +475,7 @@ in /usr/X11R6/lib/X11/rgb.txt (exact path varying). background colour boxes. -
Figure 4.1: Sketch of different border styles and elements
Description
highlight_colourColour for the ''highlight'' part of a border.Colour for the ``highlight'' part of a border.
shadow_colourColour for the ''highlight'' part of a border.Colour for the ``shadow'' part of a border.
foreground_colour Colour for the normal drawing operations, e.g. text.
padding_colourColour for the ''padding'' part of a border border. Set to +Colour for the ``padding'' part of a border border. Set to background_colour if unset.
@@ -485,14 +497,14 @@ indicating a number of pixels. border_style A string indicating the style of border; one of - elevated/inlaid/ridge/groove as seen in the - above sketch. + `elevated'/`inlaid'/`ridge'/`groove' + as seen in the above sketch. border_sides A string indicating which sides of the border - to draw: all/tb/lr for all, top and bottom, and - left and right. To control between left/right - and top/bottom, use the pixel options below. + to draw: `all'/`tb'/`lr' for all, + top and bottom, and left and right. To control between + left/right and top/bottom, use the pixel options below. highlight_pixels Width of the highlight part of the border in pixels. @@ -525,7 +537,7 @@ indicating a number of pixels. text_align How text is to be aligned in text boxes/tabs; one of - the strings left/right/center. + the strings `left'/`right'/`center'. @@ -558,13 +570,13 @@ indicating a number of pixels.

As discussed in previous sections, styles may have substyles to e.g. -indicate different states of the object being drawn. The ''de'' engine +indicate different states of the object being drawn. The ``de'' engine limits what can be configured in substyles to the set of colours in the first table above, but also specifically interprets for the main style -tab-frame the substyles *-*-tagged and *-*-*-dragged +`tab-frame' the substyles `*-*-tagged' and `*-*-*-dragged' by, respectively, drawing a right angle shape at the top right corner of a tab and by shading the tab with a stipple pattern. Also for -menus the substyles *-*-submenu are handled as a special case. +menus the substyles `*-*-submenu' are handled as a special case.

Substyles are defined with the function de.substyle within the @@ -629,21 +641,39 @@ de.defstyle("tab-frame", {

-

-4.3 Miscellaneous settings +

+ +
+4.3 Miscellaneous settings

-The following style fields are independent of the drawing engine used, -but are related to objects' styles and therefore configured in the drawing -engine configuration file. + +

+4.3.1 Frame user attributes +

+The function WFrame.set_grattr may be used to give frames +(and their tabs) arbitrary extra attributes to be passed to the +drawing engine. Hence, by configuring such substyles in the style +configuration files, and turning on the attribute when needed, +scripts may display visual cues related to the frame. There is +also one extra attribute specially interpreted by the default +drawing engine: the `numbered' attribute, which causes +numbers to be displayed on the tabs. -

-4.3.1 Extra fields for style frame +

+ +

+4.3.2 Extra fields for style `frame'

+

+The following style fields are independent of the drawing engine used, +but are related to objects' styles and therefore configured in the drawing +engine configuration file. +

@@ -651,8 +681,8 @@ engine configuration file. @@ -663,14 +693,17 @@ engine configuration file. + interval $(0, 1]$.
Field
bar Controls the style of the tab-bar. Possible values - are the strings "none", "inside", "outside" - and "shaped", with the last providing the PWM-style + are the strings `none', `inside', `outside' + and `shaped', with the last providing the PWM-style tab-bars for floating frames.
floatframe_tab_min_w
floatframe_bar_max_w_q Maximum tab-bar width quotient of frame width for the shaped styles. A number in the - interval .

-

-4.3.2 Extra fields for style dock +

+4.3.3 Extra fields for style `dock'

@@ -680,12 +713,12 @@ engine configuration file. outline_style How borders are drawn: - "none" - no border, - "all" - border around whole dock, - "each" - border around each dockapp. + `none' - no border, + `all' - border around whole dock, + `each' - border around each dockapp. tile_size -A table with entries width and height, +A table with entries `width' and `height', indicating the width and height of tiles in pixels. @@ -699,31 +732,31 @@ style configuration files.