xwem frame looks like:
_________________________________________________________________oooo______
|.-------------------------------------------------OOOO-----------oooo-----.|
|| +------------------+-------------+--------------OOOO-+----------------+ ||
|| |######active######I//inactive///I//////inactive/////I////inactive////| ||
|| |------------------+-------------+-------------------+----------------| ||
|| |********************************][...................................| ||
|| |* *][. .| ||
|| |* *][. .| ||
|| |* [1] *][. [2] .| ||
|| |* *][. .| ||
|| |* *][. .| ||
|| |* *][. .| ||
|| |* *][. .| ||
|| |* *][. .| ||
|| |* *][. .| ||
|| |* *][. .| ||
|| |* *][. .| ||
|| |* *][. .| ||
|| |********************************][...................................| ||
|| |=====================================================================| ||
|| |.....................................................................| ||
|| |. .| ||
|| |. [3] .| ||
|| |. .| ||
|| |. .| ||
|| |. .| ||
|| |. .| ||
|| |. .| ||
|| |. .| ||
|| |. .| ||
|| |. .| ||
|| |.....................................................................| ||
|| +---------------------------------------------------------------------+ ||
||_________________________________________________________________________||
`---------------------------------------------------------------------------'
Pic1. XWEM frame layout:
oooo - outer frame border
OOOO - inner frame border
== and ][ - window delimiters vertical and horizontal
### - active tab
/// - inactive tab
I - tab delimiter
*** - selected window border
... - non-selected window border
-- Frame has a background. Background is viewed when there are parts
of frame that are not filled with something else. For example in
empty frame most of what you see is frame background. Frame
background colour is controled by 'background frame property. To
change background colour to say "peru", use something like:
(xwem-frame-set-property nil 'background "peru")
or in terms of theme
(setq xwem-theme-test0
'((frame-property background "peru")))
;; Apply theme for selected frame only
(xwem-theme-apply xwem-theme-test0 (xwem-frame-selected))
-- Very outer layer (edges marked with 'oooo') is outer frame border -
it is normal X11 window border. Width determined by
'outer-border-width frame property and color used to draw it
defined by frame property - 'outer-border-color. So to change
width/color you should use something like:
;; Set selected frame outer border width to 4
(xwem-frame-set-property nil 'outer-border-width 4)
;; Set selected frame outer border color to green
(xwem-frame-set-property nil 'outer-border-color "green")
Or in terms of theme it will look like:
(setq xwem-theme-test
'((frame-property outer-border-width 4)
(frame-property outer-border-color "green")))
;; And apply it globally
(xwem-theme-apply xwem-theme-test)
-- Next to outer border, there is an inner border (edges marked with
'OOOO'). Inner border is part of xwem frame and has a 3D look like
this:
_____________________
|\-------------------/*
||...................**
||.**************** .**
||.*\*************/|.**
||.** ||.**
||.** ||.**
||.** ||.**
||.** ||.**
||.** ||.**
||.**_____________||.**
||.*/_____________\|.**
||...................**
|/*******************\*
***********************
i.e. it has 3 layers: dark (marked with '*'), light (marked with
'|' or '-') and medium (marked with '.')
Sizes of inner border controled by 'inner-border-width and
'inner-border-thickness frame properties. Inner border width is a
sum of widths of all layers - dark, light and medium. Inner border
thickness is a width for light and dark layers. So thickness must
be less or equal to half of inner border width.
;; Set selected frame inner border width to 20
(xwem-frame-set-property nil 'inner-border-width 20)
;; Set selected frame inner border 3d thickness to 4
(xwem-frame-set-property nil 'inner-border-thickness 4)
Or in terms of themes:
(setq xwem-theme-test1
'((frame-property inner-border-width 20)
(frame-property inner-border-thickness 4)))
;; And apply it globally
(xwem-theme-apply xwem-theme-test1)
Coloring of inner border is defined by
`xwem-frame-inner-border-face' which has predefined tag-sets for
light, dark and medium layers:
If frame is selected(active) these tag-sets are used:
'(light selected) - for '-' and '|'
'(dark selected) - for '*'
'(medium selected) - for '.'
If frame is non-selected(inactive) these tag-sets are used:
'(light nonselected) - for '-' and '|'
'(dark nonselected) - for '*'
'(medium nonselected) - for '.'
So, for example to change inner border color for selected frame use
something like:
(xwem-set-face-foreground 'xwem-frame-inner-border-face
"green1" '(light selected))
(xwem-set-face-foreground 'xwem-frame-inner-border-face
"green4" '(dark selected))
(xwem-set-face-foreground 'xwem-frame-inner-border-face
"green3" '(medium selected))
And for non-selected:
(xwem-set-face-foreground 'xwem-frame-inner-border-face
"#006600" '(light nonselected))
(xwem-set-face-foreground 'xwem-frame-inner-border-face
"#002200" '(dark nonselected))
(xwem-set-face-foreground 'xwem-frame-inner-border-face
"#004400" '(medium nonselected))
Or in terms of theme:
(setq xwem-theme-test2
'((face xwem-frame-inner-border-face
(((light selected) (:foreground "green1"))
((dark selected) (:foreground "green4"))
((medium selected) (:foreground "green3"))
((light nonselected) (:foreground "#006600"))
((dark nonselected) (:foreground "#002200"))
((medium nonselected) (:foreground "#004400"))))))
;; Apply it globally
(xwem-theme-apply xwem-theme-test2)
!!!NOTE!!![1]: Colors for inner borders for frames will be aplied
only on next frame redisplay time (i.e. frame switch, etc).
-- On Pic1 at the top of the frame below the inner border - here is
frame title. Frame title appearance on frame is controled by
'title-layout frame property, there are five layouts for title:
top - as shown on Pic1
bottom - at the bottom of frame (just above the inner border)
left - at the left of frame (just right the inner border)
right - at the right of frame (just left the inner border)
none - Frame has no title
To change title layout for selected frame to bottom use:
(xwem-frame-set-property nil 'title-layout 'bottom)
or in terms of theme:
;; Test theme
(setq xwem-theme-test3
'((frame-property title-layout bottom)))
;; And apply it for selected frame only
(xwem-theme-apply xwem-theme-test3 (xwem-frame-selected))
Height or width(according to title layout) of frame title is
controled by 'title-height frame propery.
To change title height for selected frame to 24 use:
(xwem-frame-set-property nil 'title-height 24)
* Frame title normally occupied with tabs. Each tab delimited from
other tab with tab delimiter. Tab can be in 4 states:
active in selected frame (1)
inactive in selected frame (2)
active in non-selected frame (3)
inactive in non-selected frame (4)
Colors of text in tab and background of tab is controled by
`xwem-tabber-face', which has these tag-sets for states:
(1) - '(frame-selected tab-selected)
(2) - '(frame-selected tab-nonselected)
(3) - '(frame-nonselected tab-selected)
(4) - '(frame-nonselected tab-nonselected)
So to change background of active tab in selected frame to cyan,
you should use:
(xwem-set-face-background 'xwem-tabber-face "cyan3"
'(frame-selected tab-selected))
Or to change font for inactive tab in selected frame to italic,
use something like:
(xwem-set-face-italic 'xwem-tabber-face t
'(frame-selected tab-nonselected))
Or in terms of theme:
(setq xwem-theme-test4
'((face xwem-tabber-face
(((frame-selected tab-selected) (:background "cyan3"))
((frame-selected tab-nonselected) (:italic t))))))
;; Apply it globally
(xwem-theme-apply xwem-theme-test4)
Note: same as !!!NOTE!!![1]
* Tab delimiter is constructed from two parts - left and right.
Consider we have two tabs:
+------------++------------+
[ t1 ][ t2 ]
+------------++------------+
^^
delimiter
t1 holds right part of the delimiter and t2 holds left part of
the delimiter.
Delemiter is 2 pixels width (xwem-tab BUG). If you will set
delimiter width to non-2 pixels delimiter will render
incorrectly.
Colors for left and right part of the delimiter is also controled
by `xwem-tabber-face' but with different tag-set, here are
tag-sets for the delimiter:
'(delimiter-left frame-selected tab-selected) tab in (1) state
'(delimiter-right frame-selected tab-selected)
'(delimiter-left frame-selected tab-nonselected) tab in (2) state
'(delimiter-right frame-selected tab-nonselected)
'(delimiter-left frame-nonselected tab-selected) tab in (3) state
'(delimiter-right frame-nonselected tab-selected)
'(delimiter-left frame-nonselected tab-nonselected) tab in (4) state
'(delimiter-right frame-nonselected tab-nonselected)
-- Window. Next to the frame title - here is frame windows. Every
frame always has root window. Every frame always has selected
window in the frame. Selected window and the root window may be
the same window. Windows has a tree layout when splitting,
consider this picture:
.--[1]----------------------------. Pic2. Simple windows
|******[2]************************| split.
|* *|
|* *|
|* *|
|* *|
|*********************************|
|=================================|
|..........[3]....................|
|. .|
|. .|
|. .|
|. .|
|.................................|
`---------------------------------'
We have 3 windows here - first outlined with '-' and '|', second
outlined with '*' and third outlined with '.'. First[1] window is
the parent window for second[2] and third[3]. And [1] has two
vertical children windows - [2], [3]. For example we split [3]
window to two windows:
.--[1]----------------------------. Pic3. Double split.
|******[2]************************|
|* *|
|* *|
|* *|
|* *|
|*********************************|
|=================================|
|..........[3]....................|
|.ooo[4]ooooooo][eeeeeee[5]eeeeee.|
|.o o][e e.|
|.o o][e e.|
|.ooooooooooooo][eeeeeeeeeeeeeeee.|
|.................................|
`---------------------------------'
Now we will have 5 windows, and [3] window will became a parent
for [4] and [5] windows. In terms of xwem, parent windows can't
be selected.
Window can be in 4 states:
selected in selected frame (1)
selected in non-selected frame (2)
non-selected in selected frame (3)
non-selected in non-selected frame (4)
Colors for outlining windows defined by `xwem-window-outline-face'
which supports these tag-sets:
(1) - '(frame-selected win-selected)
(2) - '(frame-nonselected win-selected)
(3) - '(frame-selected win-nonselected)
(4) - '(frame-nonselected win-nonselected)
So to change color of selected window in selected frame use
something like:
(xwem-set-face-foreground 'xwem-window-outline-face "cyan"
'(frame-selected win-selected))
If you want you can change line style for windows outlining, to
set it to dashing use something like:
(xwem-set-face-line-style 'xwem-window-outline-face X-LineDoubleDash
'(frame-selected win-selected))
(xwem-set-face-background 'xwem-window-outline-face "cyan4"
'(frame-selected win-selected))
* Window delimiters. On the Pic1, Pic2 and Pic3 windows delimited
with '=' and '][' from each other. These stuff is window
delimiters.
Note: delimters marked with '=' are vertical delimiters, not
horizontal, because they delimit windows that are in vertical
split. And horizontal delimiters marked with ']['.
Delimiter in close view has such 3D look like this:
*******************************o
*..............................o
*ooooooooooooooooooooooooooooooo
Where '*' is dark part, 'o' is light part and '.' is medium
part. So each part for any delimiter can be in such states:
light part of vertical delimiter (1)
dark part of vertical delimiter (2)
medium part of vertical delimiter (3)
light part of horizontal delimiter (4)
dark part of horizontal delimiter (5)
medium part of horizontal delimiter (6)
Colors for each delemiter part determined by
`xwem-window-delimiter-face', which support these tag-sets:
(1) - '(light shadow vertical)
(2) - '(shadow vertical)
(3) - '(vertical)
(4) - '(horizontal light shadow)
(5) - '(horizontal shadow)
(6) - '(horizontal)
Delimiter width and thickness are controled by
`xwem-win-vertical-delim-width' and
`xwem-win-horizontal-delim-width' variables.
To change `xwem-win-horizontal-delim-width' in terms of theme
use something like:
(setq xwem-theme-test5
'((custom xwem-win-horizontal-delim-width (16 . 4))
(custom xwem-win-vertical-delim-width (8 . 2))))
(xwem-theme-apply xwem-theme-test5)
----
To be continued.
--
XWEM - Don't leave home without it.
|