Class

GntWidget

Description

class Gnt.Widget : Gnt.Bindable {
  parent_instance: GntBindable
}
No description available.

Ancestors

Instance methods

gnt_widget_activate

Activate a widget. This only applies to widgets that can be activated (eg. GntButton)

gnt_widget_clicked

Trigger the ‘click’ callback of a widget.

gnt_widget_confirm_size

Confirm a requested a size for a widget.

gnt_widget_destroy

Destroy a widget.

gnt_widget_draw

Draw a widget.

gnt_widget_get_disable_actions

Returns whether the widget actions are disabled.

Available since: 2.14.0

gnt_widget_get_drawing

Returns whether the widget is currently being drawn.

Available since: 2.14.0

gnt_widget_get_grow_x

Returns whether the widget should grow in the x direction.

Available since: 2.14.0

gnt_widget_get_grow_y

Returns whether the widget should grow in the y direction.

Available since: 2.14.0

gnt_widget_get_has_border

Returns the has-border property on widget.

Available since: 2.14.0

gnt_widget_get_has_focus

Check whether a widget has the focus flag.

gnt_widget_get_has_shadow

Returns the has-shadow property on widget. Note, this is a property of the widget, but does not necessarily mean the widget will have a shadow as that depends on its styling. Use gnt_widget_has_shadow() to determine whether the widget will actually have a shadow.

Available since: 2.14.0

gnt_widget_get_is_urgent

Returns whether the widget has the URGENT hint set.

Available since: 2.14.0

gnt_widget_get_mapped

Whether widget is mapped or not.

Available since: 2.14.0

gnt_widget_get_name

Get the name of a widget.

gnt_widget_get_parent

Get the parent of a widget.

Available since: 2.14.0

gnt_widget_get_position

Get the position of a widget.

gnt_widget_get_size

Get the size of a widget.

gnt_widget_get_take_focus

Get whether a widget can take focus or not.

Available since: 2.14.0

gnt_widget_get_toplevel

Get the toplevel parent of a widget in the container hierarchy. If widget has no parent widgets, it will be returned as the topmost widget.

Available since: 2.14.0

gnt_widget_get_transient

Returns whether the widget is transient.

Available since: 2.14.0

gnt_widget_get_visible

Get the visibility of a widget.

Available since: 2.14.0

gnt_widget_get_window

Get the Ncurses window of a widget.

Available since: 3.0.0

gnt_widget_has_focus

Check whether a widget has focus.

gnt_widget_has_shadow

Check whether the widget has shadows.

gnt_widget_hide

Hide a widget.

gnt_widget_in_destruction

Returns whether the widget is currently being destroyed.

Available since: 2.14.0

gnt_widget_key_pressed

Trigger the key-press callbacks for a widget.

gnt_widget_set_disable_actions

Whether widget actions should be disabled.

Available since: 2.14.0

gnt_widget_set_drawing

Marks the widget as being drawn (or not).

Available since: 2.14.0

gnt_widget_set_focus

Give or remove focus to a widget.

gnt_widget_set_grow_x

Whether widget should grow in the x direction.

Available since: 2.14.0

gnt_widget_set_grow_y

Whether widget should grow in the y direction.

Available since: 2.14.0

gnt_widget_set_has_border

Sets the has-border property on widget to has_border.

Available since: 2.14.0

gnt_widget_set_has_focus

Sets the has-focus flag on a widget. Note, setting this flag does not necessarily mean the widget will have focus.

Available since: 2.14.0

gnt_widget_set_has_shadow

Sets the has-shadow property on widget to has_shadow. Note, setting this property does not necessarily mean the widget will have a shadow, depending on its styling.

Available since: 2.14.0

gnt_widget_set_is_urgent

Set the URGENT hint for a widget.

Available since: 2.14.0

gnt_widget_set_mapped

Marks the widget as being mapped (or not).

Available since: 2.14.0

gnt_widget_set_name

Set the name of a widget.

gnt_widget_set_parent

Set the parent of a widget.

Available since: 3.0.0

gnt_widget_set_position

Set the position of a widget.

gnt_widget_set_size

Set the size of a widget.

gnt_widget_set_take_focus

Set whether a widget can take focus or not.

gnt_widget_set_transient

Whether the widget should be transient.

Available since: 2.14.0

gnt_widget_set_urgent

Set the URGENT hint for a widget.

gnt_widget_set_visible

Set the visibility of a widget.

gnt_widget_show

Show a widget. This should only be used for toplevel widgets. For the rest of the widgets, use #gnt_widget_draw instead.

gnt_widget_size_request

Request a widget to calculate its desired size.

Methods inherited from GntBindable (6)
gnt_bindable_bindings_view

Returns a GntTree populated with “key” -> “binding” for the widget.

Available since: 2.1.1

gnt_bindable_build_help_window

Builds a window that list the key bindings for a GntBindable object. From this window a user can select a listing to rebind a new key for the given action.

Available since: 2.1.1

gnt_bindable_check_key

Discover if a key is bound.

Available since: 2.4.2

gnt_bindable_perform_action_key

Perform an action from a keybinding.

gnt_bindable_perform_action_named

Perform an action on a bindable object.

gnt_bindable_remap_keys
No description available.
Methods inherited from GObject (42)

Please see GObject for a full list of methods.

Signals

Gnt.Widget::activate
No description available.
Gnt.Widget::clicked
No description available.
Gnt.Widget::confirm-size
No description available.
Gnt.Widget::context-menu
No description available.
Gnt.Widget::destroy
No description available.
Gnt.Widget::draw
No description available.
Gnt.Widget::expose
No description available.
Gnt.Widget::gained-focus
No description available.
Gnt.Widget::hide
No description available.
Gnt.Widget::key-pressed
No description available.
Gnt.Widget::lost-focus
No description available.
Gnt.Widget::map
No description available.
Gnt.Widget::position-set
No description available.
Gnt.Widget::size-changed
No description available.
Gnt.Widget::size-request
No description available.
Signals inherited from GObject (1)
GObject.Object::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct GntWidgetClass {
  void (* map) (
    GntWidget* widget
  );
  void (* show) (
    GntWidget* widget
  );
  void (* destroy) (
    GntWidget* widget
  );
  void (* draw) (
    GntWidget* widget
  );
  void (* hide) (
    GntWidget* widget
  );
  void (* expose) (
    GntWidget* widget,
    int x,
    int y,
    int width,
    int height
  );
  void (* gained_focus) (
    GntWidget* widget
  );
  void (* lost_focus) (
    GntWidget* widget
  );
  void (* size_request) (
    GntWidget* widget
  );
  gboolean (* confirm_size) (
    GntWidget* widget,
    int width,
    int height
  );
  void (* size_changed) (
    GntWidget* widget,
    int w,
    int h
  );
  void (* set_position) (
    GntWidget* widget,
    int x,
    int y
  );
  gboolean (* key_pressed) (
    GntWidget* widget,
    const char* keys
  );
  void (* activate) (
    GntWidget* widget
  );
  gboolean (* clicked) (
    GntWidget* widget,
    GntMouseEvent event,
    int x,
    int y
  );
  
}

The class structure for GntWidget.

Class members
map
void (* map) (
    GntWidget* widget
  )
  No description available.
show
void (* show) (
    GntWidget* widget
  )
  No description available.
destroy
void (* destroy) (
    GntWidget* widget
  )
  No description available.
draw
void (* draw) (
    GntWidget* widget
  )
  No description available.
hide
void (* hide) (
    GntWidget* widget
  )
  No description available.
expose
void (* expose) (
    GntWidget* widget,
    int x,
    int y,
    int width,
    int height
  )
  No description available.
gained_focus
void (* gained_focus) (
    GntWidget* widget
  )
  No description available.
lost_focus
void (* lost_focus) (
    GntWidget* widget
  )
  No description available.
size_request
void (* size_request) (
    GntWidget* widget
  )
  No description available.
confirm_size
gboolean (* confirm_size) (
    GntWidget* widget,
    int width,
    int height
  )
  No description available.
size_changed
void (* size_changed) (
    GntWidget* widget,
    int w,
    int h
  )
  No description available.
set_position
void (* set_position) (
    GntWidget* widget,
    int x,
    int y
  )
  No description available.
key_pressed
gboolean (* key_pressed) (
    GntWidget* widget,
    const char* keys
  )
  No description available.
activate
void (* activate) (
    GntWidget* widget
  )
  No description available.
clicked
gboolean (* clicked) (
    GntWidget* widget,
    GntMouseEvent event,
    int x,
    int y
  )
  No description available.

Virtual methods

Gnt.WidgetClass.activate

Activate a widget. This only applies to widgets that can be activated (eg. GntButton)

Gnt.WidgetClass.clicked

Trigger the ‘click’ callback of a widget.

Gnt.WidgetClass.confirm_size

Confirm a requested a size for a widget.

Gnt.WidgetClass.destroy

Destroy a widget.

Gnt.WidgetClass.draw

Draw a widget.

Gnt.WidgetClass.expose
No description available.
Gnt.WidgetClass.gained_focus
No description available.
Gnt.WidgetClass.hide

Hide a widget.

Gnt.WidgetClass.key_pressed

Trigger the key-press callbacks for a widget.

Gnt.WidgetClass.lost_focus
No description available.
Gnt.WidgetClass.map
No description available.
Gnt.WidgetClass.set_position

Set the position of a widget.

Gnt.WidgetClass.show

Show a widget. This should only be used for toplevel widgets. For the rest of the widgets, use #gnt_widget_draw instead.

Gnt.WidgetClass.size_changed
No description available.
Gnt.WidgetClass.size_request

Request a widget to calculate its desired size.