1 @node Window, Client, Frame, Primitives
5 In this chapter we will discuss thing related to XWEM's Windows.
8 * Basic Windows:: Basic information on Windows.
9 * Splitting Windows:: Splitting Window into two.
10 * Deleting Windows:: How you should delete Windows.
11 * Selecting Windows:: Selected Window.
12 * Cycling Windows:: Moving around Windows.
13 * Resizing Windows:: Changing size of Windows.
14 * Window Configurations:: Saving and restoring layout of Windows.
15 * Drawing Windows:: How Windows stuff are drawed.
16 * Window Expectances:: Window can wait for a particular client.
19 @node Basic Windows, Splitting Windows, Window, Window
20 @comment node-name, next, previous, up
21 @subsection Basic Windows
24 @dfn{Window} is subpart of Frame(@pxref{Frame}) that holds Clients
25 (@pxref{Client}). Each Frame always contain at least one Window, but
26 you con divide it vertically or horizontally to obtain new Windows.
27 Windows never overlaps. There is always selected Window in each Frame,
28 but it is not guaranties that Client in selected Window will have input
32 Initilizes all stuff we will need.
35 @defvar xwem-win-default-properties
36 Plist of default properties for newly created Windows. Keys in list is
39 @item @code{dead} Window referenced but not workable.
40 @item @code{deleted} Deleted Windows have this non-@code{nil}.
41 @item @code{frame} Reference to XWEM Frame.
42 @item @code{next} Next window in windows double linked list.
43 @item @code{prev} Previous window in windows double linked list.
44 @item @code{hchild} Horizontal child.
45 @item @code{vchild} Vertical child.
46 @item @code{client} Link to XWEM Client that is in XWEM Window or @code{nil}.
47 @item @code{expectances} Expectances plist for XWEM Window.
52 Return non-@code{nil} if @var{win} is Window.
55 @node Splitting Windows, Deleting Windows, Basic Windows, Window
56 @comment node-name, next, previous, up
57 @subsection Splitting Windows
60 Functions described here is used in way to split XWEM's window or get
61 information about split.
63 @defvar xwem-win-min-width
64 Minimal width in pixels that XWEM Window may have after spliting.
72 @defvar xwem-win-min-height
73 Minimal height in pixels that XWEM Window may have after spliting.
81 @defun xwem-win-split &optional window how new-size
82 Splits XWEM @var{window}, @var{how} is one of @code{vertical} or
83 @code{horizontal}(default is @code{horizontal}). @var{new-size} is size
84 in pixels which should have @var{window} after split.
87 @defun xwem-win-only-one-p &optional window
88 Returns non-@code{nil} if @var{window} is only one in XWEM Windows chain.
91 @node Deleting Windows, Selecting Windows, Splitting Windows, Window
92 @comment node-name, next, previous, up
93 @subsection Deleting Windows
96 @defun xwem-window-delete &optional window
97 Deletes XWEM @var{window}. If ommited than @code{xwem-win-selected} will
101 @defun xwem-window-delete-others &optional window
102 Deletes all XWEM Windows other then @var{window}.
105 @defun xwem-win-delete-subwindows window
106 Mark all child of XWEM @var{window} as deleted.
109 @defun xwem-win-mark-deleted window
112 @node Selecting Windows, Cycling Windows, Deleting Windows, Window
113 @comment node-name, next, previous, up
114 @subsection Selecting Windows
117 Select a window means that client currently in than window receives
120 @defvar xwem-win-switch-hook
121 Hooks that will be runned when selected window changes. Functions in
122 should accept two arguments - @code{old-win} and @code{new-win}.
126 @result{} (xwem-win-focus xwem-win-title)
130 @defun xwem-win-selected
131 Returns selected XWEM Window.
134 @defun xwem-win-selected-p window
135 Return non-@code{nil} if @var{window} is selected.
138 @defun xwem-window-select window
139 Select @var{window} as current XWEM Window. Runs @code{xwem-win-switch-hooks}.
142 @node Cycling Windows, Resizing Windows, Selecting Windows, Window
143 @comment node-name, next, previous, up
144 @subsection Cycling Windows
147 @defun xwem-win-make-list-by-next window
148 Creates list of XWEM Windows using @code{next} property.
151 @defun xwem-win-new props
152 Creates new XWEM Window using properties obtained after merging
153 @code{xwem-window-defprops} and @var{props} together.
156 @defun xwem-win-replace oldw neww
157 Replace @var{oldw} XWEM Window with contents of @var{neww} XWEM Window.
160 @defun xwem-win-make-parent window
161 Creates dummy parent XWEM Window for @var{window}.
164 @defun xwem-window-next &optional window
165 Returns next XWEM Window after @var{window} in canonical ordering.
168 @defun xwem-window-next-vertical &optional window
169 Returns XWEM Window which is vertically after @var{window}.
172 @defun xwem-window-prev &optional window
173 Returns previous XWEM Window before @var{window} in canonical ordering
177 @defun xwem-win-map fn &optional window
178 Apply @var{fn} function to @var{window} and each child of it. @var{fn}
179 will be called with an XWEM Window as argument.
182 @defun xwem-win-count &optional window
183 Count childs in @var{window}.
186 @defun xwem-window-list &optional frame
190 Here is somelike windmove package.
192 @defun xwem-winmove-left &optional arg
194 TODO: describe @var{arg}.
197 @defun xwem-winmove-right &optional arg
199 TODO: describe @var{arg}.
202 @defun xwem-winmove-up &optional arg
204 TODO: describe @var{arg}.
207 @defun xwem-winmove-down &optional arg
209 TODO: describe @var{arg}.
214 @node Resizing Windows, Window Configurations, Cycling Windows, Window
215 @comment node-name, next, previous, up
216 @subsection Resizing Windows
219 Here functions that operations on window's sizes.
221 @defun xwem-window-set-pixsize window nsize nodelete is-height
222 Sets size of @var{window} to @var{nsize} in pixels.
223 If @var{is-height} is non-@code{nil} then nsize is new @var{window}
227 @defun xwem-window-change-size window delta height-p
228 Changes XWEM @var{window} size to old-size plus
229 @var{delta}. @var{height-p} is non-@code{nil} if height changes.
232 TODO: add shrink and enlarge
234 @node Window Configurations, Drawing Windows, Resizing Windows, Window
235 @comment node-name, next, previous, up
236 @subsection Window Configurations
237 @cindex window configurations
239 @defun xwem-window-configuration &optional frame
240 Return current Windows configuration for @var{frame}. You can restore
241 it than using @code{xwem-set-window-configuration}.
244 @defun xwem-set-window-configuration win-config
245 Restore window configuration @var{win-config}, returned by
246 @code{xwem-window-configuration}.
249 @node Drawing Windows, Window Expectances, Window Configurations, Window
250 @comment node-name, next, previous, up
251 @subsection Drawing Windows
254 @defvar xwem-win-delim-width
255 XWEM Window delimeter width in pixels, including shadow.
258 @defvar xwem-win-delim-shadow-thicksness
259 When drawing 3D shadows for XWEM Window delimeters, this variable used.
262 @defun xwem-win-draw-delims window
263 Draws delimeters in XWEM @var{window}.
266 @node Window Expectances, , Drawing Windows, Window
267 @comment node-name, next, previous, up
268 @subsection Window Expectances
271 @dfn{Expectances} is thing describes which clients cirtain XWEM Window