package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Popover_menu/index.html

Module Wrappers.Popover_menu

type t = [ `popover_menu | `popover | `widget | `initially_unowned | `object_ ] Gobject.obj
val new_from_model : Ocgtk_gio.Gio.Wrappers.Menu_model.t option -> t

Create a new PopoverMenu

Create a new PopoverMenu

val set_menu_model : t -> Ocgtk_gio.Gio.Wrappers.Menu_model.t option -> unit

Sets a new menu model on @popover.

The existing contents of @popover are removed, and the @popover is populated with new contents according to @model.

val set_flags : t -> Gtk_enums.popovermenuflags -> unit

Sets the flags that @popover uses to create/display a menu from its model.

If a model is set and the flags change, contents are rebuilt, so if setting properties individually, set flags before model to avoid a redundant rebuild.

val remove_child : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> bool

Removes a widget that has previously been added with method@Gtk.PopoverMenu.add_child()

val get_menu_model : t -> Ocgtk_gio.Gio.Wrappers.Menu_model.t option

Returns the menu model used to populate the popover.

val get_flags : t -> Gtk_enums.popovermenuflags

Returns the flags that @popover uses to create/display a menu from its model.

val add_child : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> string -> bool

Adds a custom widget to a generated menu.

For this to work, the menu model of @popover must have an item with a `custom` attribute that matches @id.

val get_visible_submenu : t -> string

Get property: visible-submenu

val set_visible_submenu : t -> string -> unit

Set property: visible-submenu