Next: , Previous: , Up: Windows   [Contents][Index]


38.14 The Position of a Window

SXEmacs provides functions to determine the absolute location of windows within a frame, and the relative location of a window in comparison to other windows in the same frame.

Function: window-pixel-edges &optional window

This function returns a list of the pixel edge coordinates of window. If window is nil, the selected window is used.

The order of the list is (left top right bottom), all elements relative to 0, 0 at the top left corner of window’s frame. The element right of the value is one more than the rightmost pixel used by window (including any left margin, right margin, or vertical scrollbar displayed alongside it), and bottom is one more than the bottommost pixel used by window (including any modeline or horizontal scrollbar displayed above or below it). The frame area does not include any frame menubars, toolbars, or gutters that may be displayed; thus, for example, if there is only one window on the frame, the values for left and top will always be 0.

If window is at the upper left corner of its frame, right and bottom are the same as the values returned by (window-pixel-width) and (window-pixel-height) respectively, and left and top are zero.

There is no longer a function window-edges because it does not make sense in a world with variable-width and variable-height lines, as are allowed in SXEmacs.

Function: window-highest-p window

This function returns non-nil if window is along the top of its frame.

Function: window-lowest-p window

This function returns non-nil if window is along the bottom of its frame.

Function: window-text-area-pixel-edges &optional window

This function allows one to determine the location of the text-displaying portion of window, which defaults to the selected window, with respect to the top left corner of the window. It returns a list of integer pixel positions (left top right bottom), all relative to (0,0) at the top left corner of the window.


Next: , Previous: , Up: Windows   [Contents][Index]