It derives from <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 web-view:show-option-menu is emitted, providing a
WebKitOptionMenu with the
<WebKitOptionMenuItem><!– –>s that should
be displayed.
Activates the <WebKitOptionMenuItem> at
index in self.
Activating an item changes the value of the element making the item the
active one. You are expected to close the menu with
option-menu:close after activating an
item, calling this function again will have no effect.
Passed: a <WebKitOptionMenu>.
Passed: an unsigned 32-bit integer.
the index of the item
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 option-menu:select-item nor option-menu:activate-item have been called, the element
value remains unchanged.
Passed: a <WebKitOptionMenu>.
Gets the <GdkEvent> that triggered the dropdown
menu. If self was not triggered by a user interaction, like a
mouse click, #f is returned.
Passed: a <WebKitOptionMenu>.
Returned: a <GdkEvent>.
the menu event or #f.
Returns the <WebKitOptionMenuItem> at
index in self.
Passed: a <WebKitOptionMenu>.
Passed: an unsigned 32-bit integer.
the index of the item
Returned: a <WebKitOptionMenuItem>.
a <WebKitOptionMenuItem> of self.
Gets the length of the self.
Passed: a <WebKitOptionMenu>.
Returned: an unsigned 32-bit integer.
the number of <WebKitOptionMenuItem><!–
–>s in self
Selects the <WebKitOptionMenuItem> at
index in self.
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 option-menu:select-item or close the menu with
option-menu:close in which case the
currently selected item will be activated.
Passed: a <WebKitOptionMenu>.
Passed: an unsigned 32-bit integer.
the index of the item
Connect a handler with (connect object option-menu:close
handler). It is called as (handler self).
Emitted when closing a <WebKitOptionMenu> is
requested. This can happen when the user explicitly calls
option-menu:close or when the element is
detached from the current page.
Passed: a <WebKitOptionMenu>.