Class
WebKit2OptionMenu
Description [src]
class WebKit2.OptionMenu : GObject.Object {
parent: GObject
}
Represents the dropdown menu of a select
element in a WebKitWebView
.
When a select element in a WebKitWebView
needs to display a dropdown menu, the signal
WebKitWebView::show-option-menu
is emitted, providing a WebKitOptionMenu with the
WebKitOptionMenuItem
s that should be displayed.
Available since: | 2.18 |
Instance methods
webkit_option_menu_activate_item
Activates the WebKitOptionMenuItem
at index
in menu
. Activating an item changes the value
of the element making the item the active one. You are expected to close the menu with
webkit_option_menu_close()
after activating an item, calling this function again will have no effect.
Available since: 2.18
webkit_option_menu_close
Request to close a WebKitOptionMenu
. This emits WebKitOptionMenu::close signal.
This function should always be called to notify WebKit that the associated
menu has been closed. If the menu is closed and neither webkit_option_menu_select_item()
nor webkit_option_menu_activate_item()
have been called, the element value remains unchanged.
Available since: 2.18
webkit_option_menu_get_item
Returns the WebKitOptionMenuItem
at index
in menu
.
Available since: 2.18
webkit_option_menu_select_item
Selects the WebKitOptionMenuItem
at index
in menu
. Selecting an item changes the
text shown by the combo button, but it doesn’t change the value of the element. You need to
explicitly activate the item with webkit_option_menu_select_item()
or close the menu with
webkit_option_menu_close()
in which case the currently selected item will be activated.
Available since: 2.18
Signals
WebKit2.OptionMenu::close
Emitted when closing a WebKitOptionMenu
is requested. This can happen
when the user explicitly calls webkit_option_menu_close()
or when the
element is detached from the current page.
Available since: 2.18
Signals inherited from GObject (1)
GObject.Object::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct WebKit2OptionMenuClass {
GObjectClass parent_class;
void (* _webkit_reserved0) (
void
);
void (* _webkit_reserved1) (
void
);
void (* _webkit_reserved2) (
void
);
void (* _webkit_reserved3) (
void
);
}
Class members
parent_class |
|
No description available. | |
_webkit_reserved0 |
|
No description available. | |
_webkit_reserved1 |
|
No description available. | |
_webkit_reserved2 |
|
No description available. | |
_webkit_reserved3 |
|
No description available. |