# Module `awful.titlebar`

### Info:

- Copyright: 2012 Uli Schlachter
- Release: v3.5.4
- Author: Uli Schlachter

## Functions

titlebar (c, args) | Get a client's titlebar
show (c, position) | Show a client's titlebar.
hide (c, position) | Hide a client's titlebar.
toggle (c, position) | Toggle a client's titlebar, hiding it if it is visible, otherwise showing it.
titlebar.widget.titlewidget (c) | Create a new titlewidget.
titlebar.widget.iconwidget (c) | Create a new icon widget.
titlebar.widget.button (c, name, selector, action) | Create a new button widget.
titlebar.widget.floatingbutton (c) | Create a new float button for a client.
titlebar.widget.maximizedbutton (c) | Create a new maximize button for a client.
titlebar.widget.minimizebutton (c) | Create a new minimize button for a client.
titlebar.widget.closebutton (c) | Create a new closing button for a client.
titlebar.widget.ontopbutton (c) | Create a new ontop button for a client.
titlebar.widget.stickybutton (c) | Create a new sticky button for a client.

## Functions

titlebar (c, args)
  Get a client's titlebar

  ### Parameters:

  - c The client for which a titlebar is wanted.
  - args An optional table with extra arguments for the titlebar. The "size" is the height of the titlebar. Available "position" values are top, left, right and bottom. Additionally, the foreground and background colors can be configured via e.g. "bg_normal" and "bg_focus".
show (c, position)
  Show a client's titlebar.

  ### Parameters:

  - c The client whose titlebar is modified
  - position Optional position of the titlebar. Must be one of "left", "right", "top", "bottom". Default is "top".
hide (c, position)
  Hide a client's titlebar.

  ### Parameters:

  - c The client whose titlebar is modified
  - position Optional position of the titlebar. Must be one of "left", "right", "top", "bottom". Default is "top".
toggle (c, position)
  Toggle a client's titlebar, hiding it if it is visible, otherwise showing it.

  ### Parameters:

  - c The client whose titlebar is modified
  - position Optional position of the titlebar. Must be one of "left", "right", "top", "bottom". Default is "top".
titlebar.widget.titlewidget (c)
  Create a new titlewidget. A title widget displays the name of a client. Please note that this returns a textbox and all of textbox' API is available. This way, you can e.g. modify the font that is used.

  ### Parameters:

  - c The client for which a titlewidget should be created.

  ### Returns:

  The title widget.
titlebar.widget.iconwidget (c)
  Create a new icon widget. An icon widget displays the icon of a client. Please note that this returns an imagebox and all of the imagebox' API is available. This way, you can e.g. disallow resizes.

  ### Parameters:

  - c The client for which an icon widget should be created.

  ### Returns:

  The icon widget.
titlebar.widget.button (c, name, selector, action)
  Create a new button widget. A button widget displays an image and reacts to mouse clicks. Please note that the caller has to make sure that this widget gets redrawn when needed by calling the returned widget's update() function. The selector function should return a value describing a state. If the value is a boolean, either "active" or "inactive" are used. The actual image is then found in the theme as "titlebar_[name]_button_[normal/focus]_[state]". If that value does not exist, the focused state is ignored for the next try.

  ### Parameters:

  - c The client for which a button is created.
  - name Name of the button, used for accessing the theme.
  - selector A function that selects the image that should be displayed.
  - action Function that is called when the button is clicked.

  ### Returns:

  The widget
titlebar.widget.floatingbutton (c)
  Create a new float button for a client.

  ### Parameters:

  - c The client for which the button is wanted.
titlebar.widget.maximizedbutton (c)
  Create a new maximize button for a client.

  ### Parameters:

  - c The client for which the button is wanted.
titlebar.widget.minimizebutton (c)
  Create a new minimize button for a client.

  ### Parameters:

  - c The client for which the button is wanted.
titlebar.widget.closebutton (c)
  Create a new closing button for a client.

  ### Parameters:

  - c The client for which the button is wanted.
titlebar.widget.ontopbutton (c)
  Create a new ontop button for a client.

  ### Parameters:

  - c The client for which the button is wanted.
titlebar.widget.stickybutton (c)
  Create a new sticky button for a client.

  ### Parameters:

  - c The client for which the button is wanted.

generated by LDoc 1.4.2