Frame
=====

Frame is general thing that used to hold XWEM windows(see Window).  Usually Frame have something like titlebar which is used to display information related to manager state, such as names for XWEM Clients(see Client) or user defined information.

TODO: add some info about Frames properties, such as GCs list, root window, selected window, etc.

 -- Function: xwem-frame-p frame
     Returns non-nil if FRAME is XWEM Frame.

Basic Frames
------------

TODO: write me

Creating Frames
---------------

Here is describe functions which is used to create frames.  Also describe default bindings to create frames.  Describe side by side splits.

TODO: write me

Frame Properties
----------------

Each XWEM Frame have properties list, which is altered when creating Frame.

Here should be description of Frame's properties, default values, etc.

TODO: write me

Frame Title
-----------

Description of Frame tabber.

TODO: write me

Deleting Frames
---------------

You may easily delete any of XWEM Frame.  All clients that have Frame as parent window will be reparented to root window.

Here is should be description for default keybindings for frame deletion and functions description.

TODO: write me

Frames Operations
-----------------

Here is description about what you can do with Frame.  Switching, linkage switching, etc.

TODO: write me

Embedded Frames
---------------

Embedded Frame is Frame and CL at the same time.

Here is description on how to create embedded frames, how to unembed them and so on.

TODO: write me

Frames variables and functions
------------------------------

 -- Variable: xwem-frame-background
     This is symbol specifies background color used in XWEM Frame. This color should be in xwem-gc-syscolors or in xwem-gc-bonus-colors.

          xwem-frame-backgroud
          => "gray60"

 -- Variable: xwem-frame-cursor-shape
     This specifies shape of cursor when pointer is over XWEM Frame. It is value of one of X-XC-... variable.

          (eq xwem-frame-cursor-shape 'X-XC-left_ptr)
          => t

 -- Variable: xwem-frame-cursor-foreground-color
     Specifies cursor's foreground color when pointer is over XWEM Frame.

          xwem-frame-cursor-foreground-color
          => "#002800"

 -- Variable: xwem-frame-cursor-background-color
     Cursor's background color when pointer over XWEM Frame.

 -- Variable: xwem-frame-defprops
     Plist which is used to define default properties for newly created XWEM Frames.  Keys in this plist is symbols, you can use one of:

     title-height - Height in pixels to be used for title bar.

     inner-border-width - Width in pixels of XWEM Frame's inner border.

     otter-border-width - Width in pixels of XWEM Frame's otter border.

     title-thickness - Used for 3D view of title bar.

          xwem-frame-defprops
          =>
          (inner-border-width 0
           otter-border-width 0
           title-height 17
           title-thickness 2)

 -- Variable: xwem-face-frame-selected-win-selected
     Face used to outline selected Window in selected Frame.

 -- Variable: xwem-face-frame-selected-win-nonselected
     Face used to outline non-selected Window in selected Frame.

 -- Variable: xwem-face-frame-nonselected-win-selected
     Face to outline selected Window in non-selected Frame.

 -- Variable: xwem-face-frame-nonselected-win-nonselected
     Face to outline non-selected Window in non-selected Frame.

 -- Variable: xwem-face-win-delimeter
     Face to draw Window delimeter.

 -- Variable: xwem-face-win-delimeter-shadow
     Face to draw shadow of Window delimeter.

 -- Variable: xwem-frame-rolling-switch
     Non-nil mean that xwem-frame-next and xwem-frame-previous commands will always switch, even if there no next or previous Frame.

 -- Variable: xwem-frame-switch-hook
     Hooks to be called when Frame switching occurs (i.e. xwem-current-frame changes).  Function will receive two arguments OLD-FRAME and NEW-FRAME.

 -- Variable: xwem-frame-keymap
     Keymap used in Frames.

 -- Variable: xwem-frames-list
     List of all Frames.

 -- Variable: xwem-current-frame
     Refers to currently selected Frame.

 -- Function: xwem-frame-p frame
     Return non-nil if FRAME is valid XWEM Frame.

          (xwem-frame-p t)
          => nil

 -- Function: xwem-frame-alive-p frame
     Return non-nil if FRAME is alive frame, i.e. in xwem-frames-list.

 -- Function: xwem-frame-mapped-p frame
     Return non-nil if FRAME is mapped, i.e. its contents shown.

 -- Function: xwem-frame-map frame
     Map FRAME, i.e show it contents.

 -- Function: xwem-frame-selected
     Return currently selected Frame.

 -- Function: xwem-frame-selected-p frame
     Return non-nil if FRAME is selected Frame.

 -- Function: xwem-frame-select frame &optional dnr-hooks
     Make FRAME to be selected.  Runs xwem-frame-switch-hooks if FRAME is not already selected and DNR-HOOKS non-nil.

 -- Function: xwem-frame-select-defhook old-frame new-frame
     Default hook that present in xwem-frame-switch-hooks.

TODO: describe other functions ..

 -- Function: xwem-init-frames
     Initialise all stuff needed to manipulate with XWEM Frames.

 -- Function: xwem-make-frame props
     Creates new Frame with merged xwem-frame-defprops and PROPS together properties.

 -- Function: xwem-find-frame xwin
     Find Frame by X Window XWIN

 -- Function: xwem-frame-find how arg
     Find Frame according to HOW and ARG.  HOW can be one of xwin, win or cl.  ARG is X Window, XWEM Window or XWEM Client respectively.

 -- Function: xwem-frame-num frame
     Return index position of FRAME in xwem-frame-list.

 -- Function: xwem-frame-draw frame fully
     Draw FRAME.  If FULLY is non-nil then XClearArea Frame's X window before drawing.

 -- Function: xwem-frame-redraw frame
     Outlines Windows inside FRAME.

 -- Function: xwem-frame-switch-nth n
     Switch to N XWEM Frame in xwem-frame-list.

 -- Function: xwem-frame-del-win &optional frame window
     Removes XWEM WINDOW from XWEM FRAME.

 -- Function: xwem-frame-del-others &optional frame window
     Removes all XWEM Windows from XWEM FRAME other then WINDOW.

 -- Function: xwem-frame-split-horiz &optional frame
     Splits XWEM FRAME horizontally.

 -- Function: xwem-frame-split-vert &optional frame
     Splits XWEM FRAME vertically.

 -- Function: xwem-frame-win-enlarge-hor n
     Enlarges xwem-win-selected in xwem-frame-selected by n pixels horizontally.

 -- Function: xwem-frame-win-enlarge-ver n
     Enlarges xwem-win-selected in xwem-frame-selected by n pixels vertically.

 -- Function: xwem-frame-goto direction &optional frame
     Go to next XWEM Window in FRAME in DIRECTION.