Gtk4 Types

Types

Gtk4.GdkMemoryTextureType
GdkMemoryTexture(img::Array, tp = true)

Creates a GdkMemoryTexture, copying an image array. If tp is set to true, the image will be transposed before copying so that the texture's orientation when displayed by GTK widgets like GtkPicture will match how the image is displayed in Julia apps like ImageShow.

source
Gtk4.GtkApplicationWindowMethod
GtkApplicationWindow(app::GtkApplication, title::AbstractString; kwargs...)

Create an empty GtkApplicationWindow for a GtkApplication app and a title. Keyword arguments can be used to set GObject properties.

GTK docs: GtkApplicationWindow

source
Gtk4.GtkBoxType
GtkBox(orientation::Symbol, spacing::Integer=0; kwargs...)

Create and return a GtkBox widget. The orientation argument can be :h for horizontal, or :v for vertical. The spacing argument controls the spacing between child widgets in pixels. Keyword arguments allow you to set GObject properties.

source
Gtk4.GtkBuilderType
GtkBuilder(; kwargs...)
GtkBuilder(filename::AbstractString; kwargs...)
GtkBuilder(string::AbstractString, _length::Integer; kwargs...)

Create a GtkBuilder object. If filename is given (the constructor with a single string argument), XML describing the user interface will be read from a file. If string and length are given (the constructor with a string and an integer), XML will be read from a string of a certain length. If length is -1 the full string will be used.

See the GTK docs.

source
Gtk4.GtkButtonMethod
GtkButton(w::GtkWidget)

Create a GtkButton and add a widget w as its child.

source
Gtk4.GtkButtonMethod
GtkButton(s::Symbol, str::AbstractString)

Create and return a GtkButton widget.

If s is :label, create a button with a string label.

If s is :mnemonic, create a button with a string label, where the first letter preceded by an underscore character defines a mnemonic. Pressing Alt and that letter activates the button.

If s is :icon_name, create a button with an icon from the current icon theme.

Related GTK functions: gtk_button_new_with_label(), gtk_button_new_with_mnemonic(), gtk_button_new_from_icon_name()

source
Gtk4.GtkCenterBoxMethod
GtkCenterBox(orientation::Symbol; kwargs...)

Create and return a GtkCenterBox widget. The orientation argument can be :h for horizontal, or :v for vertical. Keyword arguments allow you to set GObject properties.

source
Gtk4.GtkDropDownMethod
GtkDropDown(a::AbstractArray; kwargs...)

Create a dropdown widget with a GtkStringList as its model. The model will be populated with the elements of a converted to strings. Keyword arguments set GObject properties.

source
Gtk4.GtkDropDownMethod
GtkDropDown(; kwargs...)

Create a dropdown widget with no model (and thus no options to selected). A model can be added using model. Keyword arguments set GObject properties.

source
Gtk4.GtkFileDialogMethod
GtkFileDialog(; kwargs...)

Selected keyword arguments

  • accept_label: the text to show on the dialog's accept button
  • default_filter: the GtkFileFilter initially active in the file dialog
  • filters: a GListModel of file filters
  • initial_name: the filename or directory that is initially selected in the file chooser dialog
  • title: the title of the dialog
  • modal: whether the dialog is modal
source
Gtk4.GtkFrameType
GtkFrame(w::GtkWidget, label=nothing; kwargs...)

Create a GtkFrame with an optional string label and add w as its child. Keyword arguments allow you to set GObject properties.

source
Gtk4.GtkFrameMethod
GtkFrame(label=nothing; kwargs...)

Create a GtkFrame, a layout widget that can hold a single child widget, with an optional string label. Keyword arguments allow you to set GObject properties.

source
Gtk4.GtkGridViewType
GtkGridView(model=nothing; kwargs...)

Create a GtkGridView widget, optionally with a model. Keyword arguments set GObject properties.

source
Gtk4.GtkListViewType
GtkListView(model=nothing; kwargs...)

Create a GtkListView widget, optionally with a model. Keyword arguments set GObject properties.

source
Gtk4.GtkOverlayMethod
GtkOverlay(w=nothing; kwargs...)

Create a GtkOverlay, a layout widget that holds one main child and other child "overlay" widgets that are drawn on top of the main child. The main child can be set using the argument w.

source
Gtk4.GtkPanedMethod
GtkPaned(orientation::Symbol; kwargs...)

Create and return a GtkPaned widget. The orientation argument can be :h for horizontal, or :v for vertical. Keyword arguments allow you to set GObject properties.

source
Gtk4.GtkScaleMethod
GtkScale(orientation, [scale::AbstractRange]; kwargs...)

Create a scale widget with horizontal (:h) or vertical (:v) orientation and an optional range. Keyword arguments can be used to set properties.

source
Gtk4.GtkSignalListItemFactoryMethod
GtkSignalListItemFactory(setup_cb, bind_cb)

Create a GtkSignalListItemFactory and immediately connect "setup" and "bind" callback functions setup_cb and bind_cb, respectively.

source
Gtk4.GtkStringListMethod
GtkStringList()

Create an empty GtkStringList, which implements the GListModel interface and holds an array of strings.

source
Gtk4.GtkTextIterMethod
GtkTextIter(text::GtkTextBuffer, char_offset::Integer)

Creates a GtkTextIter with offset char_offset (one-based index).

source