RecentAction

A #GtkRecentAction represents a list of recently used files, which can be shown by widgets such as #GtkRecentChooserDialog or #GtkRecentChooserMenu.

To construct a submenu showing recently used files, use a #GtkRecentAction as the action for a <menuitem>. To construct a menu toolbutton showing the recently used files in the popup menu, use a #GtkRecentAction as the action for a <toolitem> element.

Constructors

this
this(GtkRecentAction* gtkRecentAction, bool ownedRef)

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

this
this(string name, string label, string tooltip, StockID stockID)

Creates a new RecentAction object. To add the action to a ActionGroup and set the accelerator for the action, call gtk.ActionGroup.ActionGroup.addActionwWithAccel().

this
this(string name, string label, string tooltip, StockID stockID, RecentManager manager)

Creates a new RecentAction object. To add the action to a ActionGroup and set the accelerator for the action, call gtk.ActionGroup.ActionGroup.addActionwWithAccel().

this
this(string name, string label, string tooltip, string stockId)

Creates a new #GtkRecentAction object. To add the action to a #GtkActionGroup and set the accelerator for the action, call gtk_action_group_add_action_with_accel().

this
this(string name, string label, string tooltip, string stockId, RecentManager manager)

Creates a new #GtkRecentAction object. To add the action to a #GtkActionGroup and set the accelerator for the action, call gtk_action_group_add_action_with_accel().

Members

Functions

getRecentActionStruct
GtkRecentAction* getRecentActionStruct()

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 shown by the widgets representing @action. The numbers are shown to provide a unique character for a mnemonic to be used inside the menu item's label. Only the first ten 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 RecentChooserT!(GtkRecentAction)
Undocumented in source.

Static functions

getType
GType getType()

Variables

gtkRecentAction
GtkRecentAction* gtkRecentAction;

the main Gtk struct

Inherited Members

From Action

gtkAction
GtkAction* gtkAction;

the main Gtk struct

getActionStruct
GtkAction* getActionStruct()

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.
__anonymous
mixin BuildableT!(GtkAction)
Undocumented in source.
getStockId
StockID getStockId()

Gets the stock id of action. Since 2.16

setStockId
void setStockId(StockID stockId)

Sets the stock id on action Since 2.16

createIcon
Image createIcon(GtkIconSize iconSize)

This function is intended for use by action implementations to create icons displayed in the proxy widgets. Since 2.4

createMenuItem
MenuItem createMenuItem()

Creates a menu item widget that proxies for the given action. Since 2.4

createToolItem
ToolItem createToolItem()

Creates a toolbar item widget that proxies for the given action. Since 2.4

createMenu
Menu createMenu()

If action provides a GtkMenu widget as a submenu for the menu item or the toolbar item it creates, this function returns an instance of that menu. Since 2.12

getType
GType getType()
activate
void activate()

Emits the “activate” signal on the specified action, if it isn't insensitive. This gets called by the proxy widgets when they get activated.

blockActivate
void blockActivate()

Disable activation signals from the action

connectAccelerator
void connectAccelerator()

Installs the accelerator for @action if @action has an accel path and group. See gtk_action_set_accel_path() and gtk_action_set_accel_group()

disconnectAccelerator
void disconnectAccelerator()

Undoes the effect of one call to gtk_action_connect_accelerator().

getAccelClosure
Closure getAccelClosure()

Returns the accel closure for this action.

getAccelPath
string getAccelPath()

Returns the accel path for this action.

getAlwaysShowImage
bool getAlwaysShowImage()

Returns whether @action's menu item proxies will always show their image, if available.

getGicon
IconIF getGicon()

Gets the gicon of @action.

getIconName
string getIconName()

Gets the icon name of @action.

getIsImportant
bool getIsImportant()

Checks whether @action is important or not

getLabel
string getLabel()

Gets the label text of @action.

getName
string getName()

Returns the name of the action.

getProxies
ListSG getProxies()

Returns the proxy widgets for an action. See also gtk_activatable_get_related_action().

getSensitive
bool getSensitive()

Returns whether the action itself is sensitive. Note that this doesn’t necessarily mean effective sensitivity. See gtk_action_is_sensitive() for that.

getShortLabel
string getShortLabel()

Gets the short label text of @action.

getTooltip
string getTooltip()

Gets the tooltip text of @action.

getVisible
bool getVisible()

Returns whether the action itself is visible. Note that this doesn’t necessarily mean effective visibility. See gtk_action_is_sensitive() for that.

getVisibleHorizontal
bool getVisibleHorizontal()

Checks whether @action is visible when horizontal

getVisibleVertical
bool getVisibleVertical()

Checks whether @action is visible when horizontal

isSensitive
bool isSensitive()

Returns whether the action is effectively sensitive.

isVisible
bool isVisible()

Returns whether the action is effectively visible.

setAccelGroup
void setAccelGroup(AccelGroup accelGroup)

Sets the #GtkAccelGroup in which the accelerator for this action will be installed.

setAccelPath
void setAccelPath(string accelPath)

Sets the accel path for this action. All proxy widgets associated with the action will have this accel path, so that their accelerators are consistent.

setAlwaysShowImage
void setAlwaysShowImage(bool alwaysShow)

Sets whether @action's menu item proxies will ignore the #GtkSettings:gtk-menu-images setting and always show their image, if available.

setGicon
void setGicon(IconIF icon)

Sets the icon of @action.

setIconName
void setIconName(string iconName)

Sets the icon name on @action

setIsImportant
void setIsImportant(bool isImportant)

Sets whether the action is important, this attribute is used primarily by toolbar items to decide whether to show a label or not.

setLabel
void setLabel(string label)

Sets the label of @action.

setSensitive
void setSensitive(bool sensitive)

Sets the :sensitive property of the action to @sensitive. Note that this doesn’t necessarily mean effective sensitivity. See gtk_action_is_sensitive() for that.

setShortLabel
void setShortLabel(string shortLabel)

Sets a shorter label text on @action.

setStockId
void setStockId(string stockId)

Sets the stock id on @action

setTooltip
void setTooltip(string tooltip)

Sets the tooltip text on @action

setVisible
void setVisible(bool visible)

Sets the :visible property of the action to @visible. Note that this doesn’t necessarily mean effective visibility. See gtk_action_is_visible() for that.

setVisibleHorizontal
void setVisibleHorizontal(bool visibleHorizontal)

Sets whether @action is visible when horizontal

setVisibleVertical
void setVisibleVertical(bool visibleVertical)

Sets whether @action is visible when vertical

unblockActivate
void unblockActivate()

Reenable activation signals from the action

OnActivateDelegateWrapper
class OnActivateDelegateWrapper
Undocumented in source.
onActivateListeners
OnActivateDelegateWrapper[] onActivateListeners;
Undocumented in source.
addOnActivate
gulong addOnActivate(void delegate(Action) dlg, ConnectFlags connectFlags)

The "activate" signal is emitted when the action is activated.

callBackActivate
void callBackActivate(GtkAction* actionStruct, OnActivateDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackActivateDestroy
void callBackActivateDestroy(OnActivateDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnActivate
void internalRemoveOnActivate(OnActivateDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.

From RecentChooserIF

getRecentChooserStruct
GtkRecentChooser* getRecentChooserStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

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