Class wibox.widget.textbox

Usage:

    wibox.widget{
        markup = 'This <i>is</i> a <b>textbox</b>!!!',
        align  = 'center',
        valign = 'center',
        widget = wibox.widget.textbox
    }

Info:

  • Copyright: 2010, 2011 Uli Schlachter, dodo
  • Author: Uli Schlachter,dodo

Functions

textbox:get_preferred_size (s) Get the preferred size of a textbox.
textbox:get_height_for_width (width, s) Get the preferred height of a textbox at a given width.
textbox:get_preferred_size_at_dpi (dpi) Get the preferred size of a textbox.
textbox:get_height_for_width_at_dpi (width, dpi) Get the preferred height of a textbox at a given width.
textbox:set_markup_silently (text) Set the text of the textbox (with [Pango markup](https://developer.gnome.org/pango/stable/PangoMarkupFormat.html)).
wibox.widget.textbox ([text=""[, ignore_markup=false]]) Create a new textbox.

Object properties

wibox.widget.textbox.markup Set the text of the textbox (with [Pango markup](https://developer.gnome.org/pango/stable/PangoMarkupFormat.html)).
wibox.widget.textbox.text Set a textbox' text.
wibox.widget.textbox.ellipsize Set a textbox' ellipsize mode.
wibox.widget.textbox.wrap Set a textbox' wrap mode.
wibox.widget.textbox.valign The textbox' vertical alignment
wibox.widget.textbox.align Set a textbox' horizontal alignment.
wibox.widget.textbox.font Set a textbox' font

Theme variables

beautiful.font The textbox font.


Functions

textbox:get_preferred_size (s)
Get the preferred size of a textbox. This returns the size that the textbox would use if infinite space were available.
  • s integer or screen The screen on which the textbox will be displayed.

Returns:

  1. number The preferred width.
  2. number The preferred height.
textbox:get_height_for_width (width, s)
Get the preferred height of a textbox at a given width. This returns the height that the textbox would use when it is limited to the given width.
  • width number The available width.
  • s integer or screen The screen on which the textbox will be displayed.

Returns:

    number The needed height.
textbox:get_preferred_size_at_dpi (dpi)
Get the preferred size of a textbox. This returns the size that the textbox would use if infinite space were available.
  • dpi number The DPI value to render at.

Returns:

  1. number The preferred width.
  2. number The preferred height.
textbox:get_height_for_width_at_dpi (width, dpi)
Get the preferred height of a textbox at a given width. This returns the height that the textbox would use when it is limited to the given width.
  • width number The available width.
  • dpi number The DPI value to render at.

Returns:

    number The needed height.
textbox:set_markup_silently (text)
Set the text of the textbox (with [Pango markup](https://developer.gnome.org/pango/stable/PangoMarkupFormat.html)).
  • text string The text to set. This can contain pango markup (e.g. bold). You can use awful.util.escape to escape parts of it.

Returns:

    boolean true

Or

  1. boolean false
  2. string Error message explaining why the markup was invalid.
wibox.widget.textbox ([text=""[, ignore_markup=false]])
Create a new textbox.
  • text string The textbox content (default "")
  • ignore_markup boolean Ignore the pango/HTML markup (default false)

Returns:

    table A new textbox widget

Object properties

wibox.widget.textbox.markup
Set the text of the textbox (with [Pango markup](https://developer.gnome.org/pango/stable/PangoMarkupFormat.html)).

Type:

  • text string The text to set. This can contain pango markup (e.g. bold). You can use awful.util.escape to escape parts of it.

See also:

wibox.widget.textbox.text
Set a textbox' text.

Type:

  • text The text to display. Pango markup is ignored and shown as-is.

See also:

wibox.widget.textbox.ellipsize
Set a textbox' ellipsize mode.

Type:

  • mode Where should long lines be shortened? "start", "middle" or "end"
wibox.widget.textbox.wrap
Set a textbox' wrap mode.

Type:

  • mode Where to wrap? After "word", "char" or "word_char"
wibox.widget.textbox.valign
The textbox' vertical alignment

Type:

  • mode Where should the textbox be drawn? "top", "center" or "bottom"
wibox.widget.textbox.align
Set a textbox' horizontal alignment.

Type:

  • mode Where should the textbox be drawn? "left", "center" or "right"
wibox.widget.textbox.font
Set a textbox' font

Type:

  • font The font description as string

Theme variables

beautiful.font
The textbox font.
generated by LDoc 1.4.2