RecentChooserMenu

#GtkRecentChooserMenu is a widget suitable for displaying recently used files inside a menu. It can be used to set a sub-menu of a #GtkMenuItem using gtk_menu_item_set_submenu(), or as the menu of a #GtkMenuToolButton.

Note that #GtkRecentChooserMenu does not have any methods of its own. Instead, you should use the functions that work on a #GtkRecentChooser.

Note also that #GtkRecentChooserMenu does not support multiple filters, as it has no way to let the user choose between them as the #GtkRecentChooserWidget and #GtkRecentChooserDialog widgets do. Thus using gtk_recent_chooser_add_filter() on a #GtkRecentChooserMenu widget will yield the same effects as using gtk_recent_chooser_set_filter(), replacing any currently set filter with the supplied filter; gtk_recent_chooser_remove_filter() will remove any currently set #GtkRecentFilter object and will unset the current filter; gtk_recent_chooser_list_filters() will return a list containing a single #GtkRecentFilter object.

Recently used files are supported since GTK+ 2.10.

Constructors

this
this(GtkRecentChooserMenu* gtkRecentChooserMenu, bool ownedRef)

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

this
this()

Creates a new #GtkRecentChooserMenu widget.

this
this(RecentManager manager)

Creates a new #GtkRecentChooserMenu widget using @manager as the underlying recently used resources manager.

Members

Functions

getRecentChooserMenuStruct
GtkRecentChooserMenu* getRecentChooserMenuStruct(bool transferOwnership)

Get the main Gtk struct

getShowNumbers
bool getShowNumbers()

Returns the value set by gtk_recent_chooser_menu_set_show_numbers().

getStruct
void* getStruct()

the main Gtk struct as a void*

setShowNumbers
void setShowNumbers(bool showNumbers)

Sets whether a number should be added to the items of @menu. The numbers are shown to provide a unique character for a mnemonic to be used inside ten menu item’s label. Only the first the items get a number to avoid clashes.

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin ActivatableT!(GtkRecentChooserMenu)
Undocumented in source.
__anonymous
mixin RecentChooserT!(GtkRecentChooserMenu)
Undocumented in source.

Static functions

getType
GType getType()

Variables

gtkRecentChooserMenu
GtkRecentChooserMenu* gtkRecentChooserMenu;

the main Gtk struct

Inherited Members

From Menu

gtkMenu
GtkMenu* gtkMenu;

the main Gtk struct

getMenuStruct
GtkMenu* getMenuStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
popup
void popup(uint button, uint activateTime)

Popups up this menu

appendSubmenu
Menu appendSubmenu(string label)

Creates and append a submenu to this menu. This menu item that actualy has the sub menu is also created.

appendSubmenu
void appendSubmenu(string label, Menu submenu)
prependSubmenu
Menu prependSubmenu(string label)
getType
GType getType()
getForAttachWidget
ListG getForAttachWidget(Widget widget)

Returns a list of the menus which are attached to this widget. This list is owned by GTK+ and must not be modified.

attach
void attach(Widget child, uint leftAttach, uint rightAttach, uint topAttach, uint bottomAttach)

Adds a new #GtkMenuItem to a (table) menu. The number of “cells” that an item will occupy is specified by @left_attach, @right_attach, @top_attach and @bottom_attach. These each represent the leftmost, rightmost, uppermost and lower column and row numbers of the table. (Columns and rows are indexed from zero).

attachToWidget
void attachToWidget(Widget attachWidget, GtkMenuDetachFunc detacher)

Attaches the menu to the widget and provides a callback function that will be invoked when the menu calls gtk_menu_detach() during its destruction.

detach
void detach()

Detaches the menu from the widget to which it had been attached. This function will call the callback function, @detacher, provided when the gtk_menu_attach_to_widget() function was called.

getAccelGroup
AccelGroup getAccelGroup()

Gets the #GtkAccelGroup which holds global accelerators for the menu. See gtk_menu_set_accel_group().

getAccelPath
string getAccelPath()

Retrieves the accelerator path set on the menu.

getActive
Widget getActive()

Returns the selected menu item from the menu. This is used by the #GtkComboBox.

getAttachWidget
Widget getAttachWidget()

Returns the #GtkWidget that the menu is attached to.

getMonitor
int getMonitor()

Retrieves the number of the monitor on which to show the menu.

getReserveToggleSize
bool getReserveToggleSize()

Returns whether the menu reserves space for toggles and icons, regardless of their actual presence.

getTearoffState
bool getTearoffState()

Returns whether the menu is torn off. See gtk_menu_set_tearoff_state().

getTitle
string getTitle()

Returns the title of the menu. See gtk_menu_set_title().

placeOnMonitor
void placeOnMonitor(MonitorG monitor)

Places @menu on the given monitor.

popdown
void popdown()

Removes the menu from the screen.

popup
void popup(Widget parentMenuShell, Widget parentMenuItem, GtkMenuPositionFunc func, void* data, uint button, uint activateTime)

Displays a menu and makes it available for selection.

popupAtPointer
void popupAtPointer(Event triggerEvent)

Displays @menu and makes it available for selection.

popupAtRect
void popupAtRect(Window rectWindow, GdkRectangle* rect, GdkGravity rectAnchor, GdkGravity menuAnchor, Event triggerEvent)

Displays @menu and makes it available for selection.

popupAtWidget
void popupAtWidget(Widget widget, GdkGravity widgetAnchor, GdkGravity menuAnchor, Event triggerEvent)

Displays @menu and makes it available for selection.

popupForDevice
void popupForDevice(Device device, Widget parentMenuShell, Widget parentMenuItem, GtkMenuPositionFunc func, void* data, GDestroyNotify destroy, uint button, uint activateTime)

Displays a menu and makes it available for selection.

reorderChild
void reorderChild(Widget child, int position)

Moves @child to a new @position in the list of @menu children.

reposition
void reposition()

Repositions the menu according to its position function.

setAccelGroup
void setAccelGroup(AccelGroup accelGroup)

Set the #GtkAccelGroup which holds global accelerators for the menu. This accelerator group needs to also be added to all windows that this menu is being used in with gtk_window_add_accel_group(), in order for those windows to support all the accelerators contained in this group.

setAccelPath
void setAccelPath(string accelPath)

Sets an accelerator path for this menu from which accelerator paths for its immediate children, its menu items, can be constructed. The main purpose of this function is to spare the programmer the inconvenience of having to call gtk_menu_item_set_accel_path() on each menu item that should support runtime user changable accelerators. Instead, by just calling gtk_menu_set_accel_path() on their parent, each menu item of this menu, that contains a label describing its purpose, automatically gets an accel path assigned.

setActive
void setActive(uint index)

Selects the specified menu item within the menu. This is used by the #GtkComboBox and should not be used by anyone else.

setMonitor
void setMonitor(int monitorNum)

Informs GTK+ on which monitor a menu should be popped up. See gdk_monitor_get_geometry().

setReserveToggleSize
void setReserveToggleSize(bool reserveToggleSize)

Sets whether the menu should reserve space for drawing toggles or icons, regardless of their actual presence.

setScreen
void setScreen(Screen screen)

Sets the #GdkScreen on which the menu will be displayed.

setTearoffState
void setTearoffState(bool tornOff)

Changes the tearoff state of the menu. A menu is normally displayed as drop down menu which persists as long as the menu is active. It can also be displayed as a tearoff menu which persists until it is closed or reattached.

setTitle
void setTitle(string title)

Sets the title string for the menu.

OnMoveScrollDelegateWrapper
class OnMoveScrollDelegateWrapper
Undocumented in source.
onMoveScrollListeners
OnMoveScrollDelegateWrapper[] onMoveScrollListeners;
Undocumented in source.
addOnMoveScroll
gulong addOnMoveScroll(void delegate(GtkScrollType, Menu) dlg, ConnectFlags connectFlags)
callBackMoveScroll
void callBackMoveScroll(GtkMenu* menuStruct, GtkScrollType scrollType, OnMoveScrollDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackMoveScrollDestroy
void callBackMoveScrollDestroy(OnMoveScrollDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
OnPoppedUpDelegateWrapper
class OnPoppedUpDelegateWrapper
Undocumented in source.
onPoppedUpListeners
OnPoppedUpDelegateWrapper[] onPoppedUpListeners;
Undocumented in source.
addOnPoppedUp
gulong addOnPoppedUp(void delegate(void*, void*, bool, bool, Menu) dlg, ConnectFlags connectFlags)

Emitted when the position of @menu is finalized after being popped up using gtk_menu_popup_at_rect (), gtk_menu_popup_at_widget (), or gtk_menu_popup_at_pointer ().

callBackPoppedUp
void callBackPoppedUp(GtkMenu* menuStruct, void* flippedRect, void* finalRect, bool flippedX, bool flippedY, OnPoppedUpDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackPoppedUpDestroy
void callBackPoppedUpDestroy(OnPoppedUpDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.

From ActivatableIF

getActivatableStruct
GtkActivatable* getActivatableStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
doSetRelatedAction
void doSetRelatedAction(Action action)

This is a utility function for #GtkActivatable implementors.

getRelatedAction
Action getRelatedAction()

Gets the related #GtkAction for @activatable.

getUseActionAppearance
bool getUseActionAppearance()

Gets whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance.

setRelatedAction
void setRelatedAction(Action action)

Sets the related action on the @activatable object.

setUseActionAppearance
void setUseActionAppearance(bool useAppearance)

Sets whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance

syncActionProperties
void syncActionProperties(Action action)

This is called to update the activatable completely, this is called internally when the #GtkActivatable:related-action property is set or unset and by the implementing class when #GtkActivatable:use-action-appearance changes.

From RecentChooserIF

getRecentChooserStruct
GtkRecentChooser* getRecentChooserStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
addFilter
void addFilter(RecentFilter filter)

Adds @filter to the list of #GtkRecentFilter objects held by @chooser.

getCurrentItem
RecentInfo getCurrentItem()

Gets the #GtkRecentInfo currently selected by @chooser.

getCurrentUri
string getCurrentUri()

Gets the URI currently selected by @chooser.

getFilter
RecentFilter getFilter()

Gets the #GtkRecentFilter object currently used by @chooser to affect the display of the recently used resources.

getItems
ListG getItems()

Gets the list of recently used resources in form of #GtkRecentInfo objects.

getLimit
int getLimit()

Gets the number of items returned by gtk_recent_chooser_get_items() and gtk_recent_chooser_get_uris().

getLocalOnly
bool getLocalOnly()

Gets whether only local resources should be shown in the recently used resources selector. See gtk_recent_chooser_set_local_only()

getSelectMultiple
bool getSelectMultiple()

Gets whether @chooser can select multiple items.

getShowIcons
bool getShowIcons()

Retrieves whether @chooser should show an icon near the resource.

getShowNotFound
bool getShowNotFound()

Retrieves whether @chooser should show the recently used resources that were not found.

getShowPrivate
bool getShowPrivate()

Returns whether @chooser should display recently used resources registered as private.

getShowTips
bool getShowTips()

Gets whether @chooser should display tooltips containing the full path of a recently user resource.

getSortType
GtkRecentSortType getSortType()

Gets the value set by gtk_recent_chooser_set_sort_type().

getUris
string[] getUris()

Gets the URI of the recently used resources.

listFilters
ListSG listFilters()

Gets the #GtkRecentFilter objects held by @chooser.

removeFilter
void removeFilter(RecentFilter filter)

Removes @filter from the list of #GtkRecentFilter objects held by @chooser.

selectAll
void selectAll()

Selects all the items inside @chooser, if the @chooser supports multiple selection.

selectUri
bool selectUri(string uri)

Selects @uri inside @chooser.

setCurrentUri
bool setCurrentUri(string uri)

Sets @uri as the current URI for @chooser.

setFilter
void setFilter(RecentFilter filter)

Sets @filter as the current #GtkRecentFilter object used by @chooser to affect the displayed recently used resources.

setLimit
void setLimit(int limit)

Sets the number of items that should be returned by gtk_recent_chooser_get_items() and gtk_recent_chooser_get_uris().

setLocalOnly
void setLocalOnly(bool localOnly)

Sets whether only local resources, that is resources using the file:// URI scheme, should be shown in the recently used resources selector. If @local_only is %TRUE (the default) then the shown resources are guaranteed to be accessible through the operating system native file system.

setSelectMultiple
void setSelectMultiple(bool selectMultiple)

Sets whether @chooser can select multiple items.

setShowIcons
void setShowIcons(bool showIcons)

Sets whether @chooser should show an icon near the resource when displaying it.

setShowNotFound
void setShowNotFound(bool showNotFound)

Sets whether @chooser should display the recently used resources that it didn’t find. This only applies to local resources.

setShowPrivate
void setShowPrivate(bool showPrivate)

Whether to show recently used resources marked registered as private.

setShowTips
void setShowTips(bool showTips)

Sets whether to show a tooltips containing the full path of each recently used resource in a #GtkRecentChooser widget.

setSortFunc
void setSortFunc(GtkRecentSortFunc sortFunc, void* sortData, GDestroyNotify dataDestroy)

Sets the comparison function used when sorting to be @sort_func. If the @chooser has the sort type set to #GTK_RECENT_SORT_CUSTOM then the chooser will sort using this function.

setSortType
void setSortType(GtkRecentSortType sortType)

Changes the sorting order of the recently used resources list displayed by @chooser.

unselectAll
void unselectAll()

Unselects all the items inside @chooser.

unselectUri
void unselectUri(string uri)

Unselects @uri inside @chooser.

addOnItemActivated
gulong addOnItemActivated(void delegate(RecentChooserIF) dlg, ConnectFlags connectFlags)

This signal is emitted when the user "activates" a recent item in the recent chooser. This can happen by double-clicking on an item in the recently used resources list, or by pressing Enter.

addOnSelectionChanged
gulong addOnSelectionChanged(void delegate(RecentChooserIF) dlg, ConnectFlags connectFlags)

This signal is emitted when there is a change in the set of selected recently used resources. This can happen when a user modifies the selection with the mouse or the keyboard, or when explicitly calling functions to change the selection.

Meta