OptionMenu

WebKitOptionMenu 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.

Constructors

this
this(WebKitOptionMenu* webKitOptionMenu, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

activateItem
void activateItem(uint index)

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.

addOnClose
gulong addOnClose(void delegate(OptionMenu) dlg, ConnectFlags connectFlags)

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.

close
void 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.

getItem
OptionMenuItem getItem(uint index)

Returns the #WebKitOptionMenuItem at @index in @menu.

getNItems
uint getNItems()

Gets the length of the @menu.

getOptionMenuStruct
WebKitOptionMenu* getOptionMenuStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

selectItem
void selectItem(uint index)

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.

Static functions

getType
GType getType()

Variables

webKitOptionMenu
WebKitOptionMenu* webKitOptionMenu;

the main Gtk struct

Meta

Since

2.18