package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Popover/index.html
Module Wrappers.Popover
type t = [ `popover | `widget | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new Popover
val set_position : t -> Gtk_enums.positiontype -> unitSets the preferred position for @popover to appear.
If the @popover is currently visible, it will be immediately updated.
This preference will be respected where possible, although on lack of space (eg. if close to the window edges), the `GtkPopover` may choose to appear on the opposite side.
val set_pointing_to : t -> Ocgtk_gdk.Gdk.Wrappers.Rectangle.t option -> unitSets the rectangle that @popover points to.
This is in the coordinate space of the @popover parent.
val set_offset : t -> int -> int -> unitSets the offset to use when calculating the position of the popover.
These values are used when preparing the struct@Gdk.PopupLayout for positioning the popover.
val set_mnemonics_visible : t -> bool -> unitSets whether mnemonics should be visible.
val set_has_arrow : t -> bool -> unitSets whether this popover should draw an arrow pointing at the widget it is relative to.
val set_default_widget :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj option ->
unitSets the default widget of a `GtkPopover`.
The default widget is the widget that’s activated when the user presses Enter in a dialog (for example). This function sets or unsets the default widget for a `GtkPopover`.
val set_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj option ->
unitSets the child widget of @popover.
val set_cascade_popdown : t -> bool -> unitIf @cascade_popdown is %TRUE, the popover will be closed when a child modal popover is closed.
If %FALSE, @popover will stay visible.
val set_autohide : t -> bool -> unitSets whether @popover is modal.
A modal popover will grab the keyboard focus on it when being displayed. Focus will wrap around within the popover. Clicking outside the popover area or pressing Esc will dismiss the popover.
Called this function on an already showing popup with a new autohide value different from the current one, will cause the popup to be hidden.
val present : t -> unitAllocate a size for the `GtkPopover`.
This function needs to be called in size-allocate by widgets who have a `GtkPopover` as child. When using a layout manager, this is happening automatically.
To make a popover appear on screen, use method@Gtk.Popover.popup.
val popup : t -> unitPops @popover up.
val popdown : t -> unitPops @popover down.
This may have the side-effect of closing a parent popover as well. See property@Gtk.Popover:cascade-popdown.
val get_position : t -> Gtk_enums.positiontypeReturns the preferred position of @popover.
val get_pointing_to : t -> bool * Ocgtk_gdk.Gdk.Wrappers.Rectangle.tGets the rectangle that the popover points to.
If a rectangle to point to has been set, this function will return %TRUE and fill in @rect with such rectangle, otherwise it will return %FALSE and fill in @rect with the parent widget coordinates.
val get_offset : t -> int * intGets the offset previous set with method@Gtk.Popover.set_offset().
val get_mnemonics_visible : t -> boolGets whether mnemonics are visible.
val get_has_arrow : t -> boolGets whether this popover is showing an arrow pointing at the widget that it is relative to.
val get_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj optionGets the child widget of @popover.
val get_cascade_popdown : t -> boolReturns whether the popover will close after a modal child is closed.
val get_autohide : t -> boolReturns whether the popover is modal.
See method@Gtk.Popover.set_autohide for the implications of this.
val on_activate_default :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_closed :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id