Skip to content

Bar

geometry

MonitorGeometry

Wrapper around get_geometry

get_child_by_id

(method) Box:get_child_by_id(id: string, recursive?: boolean)
  -> Battery|Box|Clock|Cpu|Icon...(+4)

Gets the first item in the widget tree that has the identifier.

When recursive is set to true the search is performed breadth-first, then in order of components on the tree.

@param id — The identifier

@param recursive — Defaults to false

get_children

(method) Box:get_children()
  -> table<number, Battery|Box|Clock|Cpu|Icon...(+3)>

Get the children on the box.

get_class

(method) Base:get_class()
  -> table<number, string>

Get the css classes as an array of strings.

get_geometry

(method) Bar:get_geometry()
  -> MonitorGeometry

Get the geometry of the bar

get_halign

(method) Base:get_halign()
  -> 'Baseline'|'Center'|'End'|'Fill'|'Start'...(+1)

Gets the horizontal alignment of widget.

View gtk4 documentation

-- Links to Align in 'hitokage-core\src\common.rs'
return #1:
    | 'Fill'
    | 'Start'
    | 'End'
    | 'Center'
    | 'Baseline'

get_height

(method) Base:get_height()
  -> integer

Returns the content height of the widget.

To learn more about widget sizes, see the coordinate system overview.

View gtk4 documentation

get_height_request

(method) Base:get_height_request()
  -> integer

Gets the height request that was explicitly set for the widget using set_height_request or set_size_request.

A value of -1 stored in height indicates that it has not been set explicitly and the natural requisition of the widget will be used instead. To get the height a widget will actually request, call measure_height instead of this function.

See also: get_width_request, get_size_request.

View gtk4 documentation

get_hexpand

(method) Base:get_hexpand()
  -> boolean

Gets whether the widget would like any available extra horizontal space.

View gtk4 documentation

get_homogeneous

(method) Box:get_homogeneous()
  -> boolean

Returns whether the box is homogeneous (all children are the same size).

View gtk4 documentation

get_size_request

(method) Base:get_size_request()
  -> [integer, integer]

Gets the size request that was explicitly set for the widget using set_size_request.

A value of -1 stored in width or height indicates that that dimension has not been set explicitly and the natural requisition of the widget will be used instead. To get the size a widget will actually request, call measure instead of this function.

See also: get_width_request, get_height_request.

View gtk4 documentation

get_type

(method) Box:get_type()
  -> 'Box'

Get the type of widget

return #1:
    | 'Box'

get_valign

(method) Base:get_valign()
  -> 'Baseline'|'Center'|'End'|'Fill'|'Start'...(+1)

Gets the vertical alignment of widget.

View gtk4 documentation

-- Links to Align in 'hitokage-core\src\common.rs'
return #1:
    | 'Fill'
    | 'Start'
    | 'End'
    | 'Center'
    | 'Baseline'

get_vexpand

(method) Base:get_vexpand()
  -> boolean

Gets whether the widget would like any available extra vertical space.

View gtk4 documentation

get_widget_by_id

(method) Box:get_widget_by_id(id: string, recursive?: boolean)
  -> Battery|Box|Clock|Cpu|Icon...(+4)

Deprecated

Use get_child_by_id instead.

Gets the first item in the widget tree that has the identifier.

When recursive is set to true the search is performed breadth-first, then in order of components on the tree.

@param id — The identifier

@param recursive — Defaults to false

get_widgets

(method) Box:get_widgets()
  -> table<number, Battery|Box|Clock|Cpu|Icon...(+3)>

Deprecated

Use get_children instead.

Get the components on the box.

get_width

(method) Base:get_width()
  -> integer

Returns the content width of the widget.

To learn more about widget sizes, see the coordinate system overview.

View gtk4 documentation

get_width_request

(method) Base:get_width_request()
  -> integer

Gets the width request that was explicitly set for the widget using set_width_request or set_size_request.

A value of -1 stored in width indicates that it has not been set explicitly and the natural requisition of the widget will be used instead. To get the width a widget will actually request, call measure_width instead of this function.

See also: get_height_request, get_size_request.

View gtk4 documentation

is_ready

(method) Bar:is_ready()
  -> boolean

Checks if the bar has been instantiated in gtk4

ready

boolean

Wrapper around is_ready

set_class

(method) Base:set_class(...string)
  -> nil

Set the css classes either as a space delimited string or array of strings.

set_halign

(method) Base:set_halign(halign: 'Baseline'|'Center'|'End'|'Fill'|'Start'...(+1))
  -> nil

Sets the horizontal alignment of widget.

View gtk4 documentation

-- Links to Align in 'hitokage-core\src\common.rs'
halign:
    | 'Fill'
    | 'Start'
    | 'End'
    | 'Center'
    | 'Baseline'

set_height_request

(method) Base:set_height_request(height?: integer)
  -> nil

Sets the minimum height of a widget.

That is, the widget’s size request will be at least height. You can use this function to force a widget to be taller than it normally would be.

If the height request in a given direction is -1 (unset), then the “natural” height request of the widget will be used instead.

See also: set_width_request, set_size_request.

View gtk4 documentation

set_hexpand

(method) Base:set_hexpand(hexpand: boolean)
  -> nil

Sets whether the widget would like any available extra horizontal space.

View gtk4 documentation

set_homogeneous

(method) Box:set_homogeneous(homogeneous: boolean)
  -> nil

Sets whether or not all children of box are given equal space in the box.

View gtk4 documentation

set_size_request

(method) Base:set_size_request(size: [integer?, integer?])
  -> nil

Sets the minimum size of a widget.

That is, the widget’s size request will be at least width by height. You can use this function to force a widget to be larger than it normally would be.

If the size request in a given direction is -1 (unset), then the “natural” size request of the widget will be used instead.

See also: set_width_request, set_height_request.

View gtk4 documentation

set_valign

(method) Base:set_valign(valign: 'Baseline'|'Center'|'End'|'Fill'|'Start'...(+1))
  -> nil

Sets the vertical alignment of widget.

View gtk4 documentation

-- Links to Align in 'hitokage-core\src\common.rs'
valign:
    | 'Fill'
    | 'Start'
    | 'End'
    | 'Center'
    | 'Baseline'

set_vexpand

(method) Base:set_vexpand(vexpand: boolean)
  -> nil

Sets whether the widget would like any available extra vertical space.

View gtk4 documentation

set_width_request

(method) Base:set_width_request(width?: integer)
  -> nil

Sets the minimum width of a widget.

That is, the widget’s size request will be at least width. You can use this function to force a widget to be wider than it normally would be.

If the width request in a given direction is -1 (unset), then the “natural” width request of the widget will be used instead.

See also: set_height_request, set_size_request.

View gtk4 documentation

type

'Box'