Class: Gtk::Popover
- Inherits:
-
Object
- Object
- Gtk::Popover
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#bind_model(model, action_namespace) ⇒ nil
Establishes a binding between a Gtk::Popover and a #GMenuModel.
-
#constrain_to ⇒ Gtk::PopoverConstraint
Sets a constraint for the popover position.
-
#constrain_to=(constrain_to) ⇒ Gtk::PopoverConstraint
Sets a constraint for the popover position.
-
#default_widget ⇒ Gtk::Widget
Gets the widget that should be set as the default while the popover is shown.
-
#default_widget=(widget) ⇒ nil
Sets the widget that should be set as default widget while the popover is shown (see gtk_window_set_default()).
-
#get_pointing_to(rect) ⇒ TrueClass
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 attached widget coordinates.
-
#modal ⇒ TrueClass
Returns whether the popover is modal, see gtk_popover_set_modal to see the implications of this.
-
#modal=(modal) ⇒ TrueClass
Sets whether the popover is modal (so other elements in the window do not receive input while the popover is visible).
-
#modal? ⇒ TrueClass
Sets whether the popover is modal (so other elements in the window do not receive input while the popover is visible).
-
#new(relative_to) ⇒ Gtk::Widget
Creates a new popover to point to relative_to.
-
#new_from_model(relative_to, model) ⇒ Gtk::Widget
Creates a Gtk::Popover and populates it according to model.
-
#pointing_to ⇒ Gdk::Rectangle
Marks a specific rectangle to be pointed.
-
#pointing_to=(pointing_to) ⇒ Gdk::Rectangle
Marks a specific rectangle to be pointed.
-
#popdown ⇒ nil
Pops popover down.This is different than a gtk_widget_hide() call in that it shows the popover with a transition.
-
#popup ⇒ nil
Pops popover up.
-
#position ⇒ Gtk::PositionType
Sets the preferred position of the popover.
-
#position=(position) ⇒ Gtk::PositionType
Sets the preferred position of the popover.
-
#relative_to ⇒ Gtk::Widget
Sets the attached widget.
-
#relative_to=(relative_to) ⇒ Gtk::Widget
Sets the attached widget.
-
#transitions_enabled ⇒ TrueClass
Returns whether show/hide transitions are enabled on this popover.
-
#transitions_enabled=(transitions_enabled) ⇒ TrueClass
Whether show/hide transitions are enabled for this popover.
-
#transitions_enabled? ⇒ TrueClass
Whether show/hide transitions are enabled for this popover.
Instance Method Details
#bind_model(model, action_namespace) ⇒ nil
Establishes a binding between a Gtk::Popover and a #GMenuModel.
The contents of popover are removed and then refilled with menu items according to model. When model changes, popover is updated. Calling this function twice on popover with different model will cause the first binding to be replaced with a binding to the new model. If model is nil then any previous binding is undone and all children are removed.
If action_namespace is non-nil then the effect is as if all actions mentioned in the model have their names prefixed with the namespace, plus a dot. For example, if the action “quit” is mentioned and action_namespace is “app” then the effective action name is “app.quit”.
This function uses Gtk::Actionable to define the action name and target values on the created menu items. If you want to use an action group other than “app” and “win”, or if you want to use a Gtk::MenuShell outside of a #GtkApplicationWindow, then you will need to attach your own action group to the widget hierarchy using gtk_widget_insert_action_group(). As an example, if you created a group with a “quit” action and inserted it with the name “mygroup” then you would use the action name “mygroup.quit” in your GMenu::Model.
#constrain_to ⇒ Gtk::PopoverConstraint
Sets a constraint for the popover position.
#constrain_to=(constrain_to) ⇒ Gtk::PopoverConstraint
Sets a constraint for the popover position.
#default_widget ⇒ Gtk::Widget
Gets the widget that should be set as the default while the popover is shown. or nil if there is none
#default_widget=(widget) ⇒ nil
Sets the widget that should be set as default widget while the popover is shown (see gtk_window_set_default()). Gtk::Popover remembers the previous default widget and reestablishes it when the popover is dismissed.
#get_pointing_to(rect) ⇒ TrueClass
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 attached widget coordinates.
#modal ⇒ TrueClass
Returns whether the popover is modal, see gtk_popover_set_modal to see the implications of this.
#modal=(modal) ⇒ TrueClass
Sets whether the popover is modal (so other elements in the window do not receive input while the popover is visible).
#modal? ⇒ TrueClass
Sets whether the popover is modal (so other elements in the window do not receive input while the popover is visible).
#new(relative_to) ⇒ Gtk::Widget
Creates a new popover to point to relative_to
#new_from_model(relative_to, model) ⇒ Gtk::Widget
Creates a Gtk::Popover and populates it according to model. The popover is pointed to the relative_to widget.
The created buttons are connected to actions found in the Gtk::ApplicationWindow to which the popover belongs - typically by means of being attached to a widget that is contained within the Gtk::ApplicationWindows widget hierarchy.
Actions can also be added using gtk_widget_insert_action_group() on the menus attach widget or on any of its parent widgets.
#pointing_to ⇒ Gdk::Rectangle
Marks a specific rectangle to be pointed.
#pointing_to=(pointing_to) ⇒ Gdk::Rectangle
Marks a specific rectangle to be pointed.
#popdown ⇒ nil
Pops popover down.This is different than a gtk_widget_hide() call in that it shows the popover with a transition. If you want to hide the popover without a transition, use gtk_widget_hide().
#popup ⇒ nil
Pops popover up. This is different than a gtk_widget_show() call in that it shows the popover with a transition. If you want to show the popover without a transition, use gtk_widget_show().
#position ⇒ Gtk::PositionType
Sets the preferred position of the popover.
#position=(position) ⇒ Gtk::PositionType
Sets the preferred position of the popover.
#relative_to ⇒ Gtk::Widget
Sets the attached widget.
#relative_to=(relative_to) ⇒ Gtk::Widget
Sets the attached widget.
#transitions_enabled ⇒ TrueClass
Returns whether show/hide transitions are enabled on this popover.
#transitions_enabled=(transitions_enabled) ⇒ TrueClass
Whether show/hide transitions are enabled for this popover.
#transitions_enabled? ⇒ TrueClass
Whether show/hide transitions are enabled for this popover.