gi-gtk-3.0.41: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.ShortcutsWindow

Description

A GtkShortcutsWindow shows brief information about the keyboard shortcuts and gestures of an application. The shortcuts can be grouped, and you can have multiple sections in this window, corresponding to the major modes of your application.

Additionally, the shortcuts can be filtered by the current view, to avoid showing information that is not relevant in the current application context.

The recommended way to construct a GtkShortcutsWindow is with GtkBuilder, by populating a ShortcutsWindow with one or more ShortcutsSection objects, which contain GtkShortcutsGroups that in turn contain objects of class ShortcutsShortcut.

A simple example:

This example has as single section. As you can see, the shortcut groups are arranged in columns, and spread across several pages if there are too many to find on a single page.

The .ui file for this example can be found here.

An example with multiple views:

This example shows a ShortcutsWindow that has been configured to show only the shortcuts relevant to the "stopwatch" view.

The .ui file for this example can be found here.

An example with multiple sections:

This example shows a ShortcutsWindow with two sections, "Editor Shortcuts" and "Terminal Shortcuts".

The .ui file for this example can be found here.

Synopsis

Exported types

newtype ShortcutsWindow Source #

Memory-managed wrapper type.

Constructors

ShortcutsWindow (ManagedPtr ShortcutsWindow) 

Instances

Instances details
Eq ShortcutsWindow Source # 
Instance details

Defined in GI.Gtk.Objects.ShortcutsWindow

GObject ShortcutsWindow Source # 
Instance details

Defined in GI.Gtk.Objects.ShortcutsWindow

ManagedPtrNewtype ShortcutsWindow Source # 
Instance details

Defined in GI.Gtk.Objects.ShortcutsWindow

TypedObject ShortcutsWindow Source # 
Instance details

Defined in GI.Gtk.Objects.ShortcutsWindow

Methods

glibType :: IO GType

HasParentTypes ShortcutsWindow Source # 
Instance details

Defined in GI.Gtk.Objects.ShortcutsWindow

IsGValue (Maybe ShortcutsWindow) Source #

Convert ShortcutsWindow to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.ShortcutsWindow

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe ShortcutsWindow -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe ShortcutsWindow)

type ParentTypes ShortcutsWindow Source # 
Instance details

Defined in GI.Gtk.Objects.ShortcutsWindow

type ParentTypes ShortcutsWindow = '[Window, Bin, Container, Widget, Object, ImplementorIface, Buildable]

class (GObject o, IsDescendantOf ShortcutsWindow o) => IsShortcutsWindow o Source #

Type class for types which can be safely cast to ShortcutsWindow, for instance with toShortcutsWindow.

Instances

Instances details
(GObject o, IsDescendantOf ShortcutsWindow o) => IsShortcutsWindow o Source # 
Instance details

Defined in GI.Gtk.Objects.ShortcutsWindow

toShortcutsWindow :: (MonadIO m, IsShortcutsWindow o) => o -> m ShortcutsWindow Source #

Cast to ShortcutsWindow, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

activate, activateDefault, activateFocus, activateKey, add, addAccelGroup, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonic, addMnemonicLabel, addTickCallback, beginMoveDrag, beginResizeDrag, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, close, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, deiconify, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, fullscreen, fullscreenOnMonitor, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasGroup, hasRcStyle, hasScreen, hasToplevelFocus, hasVisibleFocus, hide, hideOnDelete, iconify, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isActive, isAncestor, isComposited, isDrawable, isFloating, isFocus, isMaximized, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, maximize, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, move, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parseGeometry, parserFinished, path, present, presentWithTime, propagateDraw, propagateKeyEvent, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelGroup, removeAccelerator, removeMnemonic, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, reshowWithInitialSize, resize, resizeChildren, resizeGripIsVisible, resizeToGeometry, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, stick, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unfullscreen, unmap, unmaximize, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, unstick, watchClosure.

Getters

getAcceptFocus, getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getApplication, getAttachedTo, getBorderWidth, getCanDefault, getCanFocus, getChild, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDecorated, getDefaultSize, getDefaultWidget, getDeletable, getDestroyWithParent, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocus, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusOnMap, getFocusVadjustment, getFocusVisible, getFontMap, getFontOptions, getFrameClock, getGravity, getGroup, getHalign, getHasResizeGrip, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getHideTitlebarWhenMaximized, getIcon, getIconList, getIconName, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getMnemonicModifier, getMnemonicsVisible, getModal, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPosition, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizable, getResizeGripArea, getResizeMode, getRole, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSize, getSizeRequest, getSkipPagerHint, getSkipTaskbarHint, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTitle, getTitlebar, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getTransientFor, getTypeHint, getUrgencyHint, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow, getWindowType.

Setters

setAccelPath, setAcceptFocus, setAllocation, setAppPaintable, setApplication, setAttachedTo, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDecorated, setDefault, setDefaultGeometry, setDefaultSize, setDeletable, setDestroyWithParent, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocus, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusOnMap, setFocusVadjustment, setFocusVisible, setFontMap, setFontOptions, setGeometryHints, setGravity, setHalign, setHasResizeGrip, setHasTooltip, setHasUserRefCount, setHasWindow, setHexpand, setHexpandSet, setHideTitlebarWhenMaximized, setIcon, setIconFromFile, setIconList, setIconName, setKeepAbove, setKeepBelow, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setMnemonicModifier, setMnemonicsVisible, setModal, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setPosition, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizable, setResizeMode, setRole, setScreen, setSensitive, setSizeRequest, setSkipPagerHint, setSkipTaskbarHint, setStartupId, setState, setStateFlags, setStyle, setSupportMultidevice, setTitle, setTitlebar, setTooltipMarkup, setTooltipText, setTooltipWindow, setTransientFor, setTypeHint, setUrgencyHint, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow, setWmclass.

Properties

sectionName

The name of the section to show.

This should be the section-name of one of the ShortcutsSection objects that are in this shortcuts window.

clearShortcutsWindowSectionName :: (MonadIO m, IsShortcutsWindow o) => o -> m () Source #

Set the value of the “section-name” property to Nothing. When overloading is enabled, this is equivalent to

clear #sectionName

constructShortcutsWindowSectionName :: (IsShortcutsWindow o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “section-name” property. This is rarely needed directly, but it is used by new.

getShortcutsWindowSectionName :: (MonadIO m, IsShortcutsWindow o) => o -> m (Maybe Text) Source #

Get the value of the “section-name” property. When overloading is enabled, this is equivalent to

get shortcutsWindow #sectionName

setShortcutsWindowSectionName :: (MonadIO m, IsShortcutsWindow o) => o -> Text -> m () Source #

Set the value of the “section-name” property. When overloading is enabled, this is equivalent to

set shortcutsWindow [ #sectionName := value ]

viewName

The view name by which to filter the contents.

This should correspond to the ShortcutsGroup:view property of some of the ShortcutsGroup objects that are inside this shortcuts window.

Set this to Nothing to show all groups.

clearShortcutsWindowViewName :: (MonadIO m, IsShortcutsWindow o) => o -> m () Source #

Set the value of the “view-name” property to Nothing. When overloading is enabled, this is equivalent to

clear #viewName

constructShortcutsWindowViewName :: (IsShortcutsWindow o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “view-name” property. This is rarely needed directly, but it is used by new.

getShortcutsWindowViewName :: (MonadIO m, IsShortcutsWindow o) => o -> m (Maybe Text) Source #

Get the value of the “view-name” property. When overloading is enabled, this is equivalent to

get shortcutsWindow #viewName

setShortcutsWindowViewName :: (MonadIO m, IsShortcutsWindow o) => o -> Text -> m () Source #

Set the value of the “view-name” property. When overloading is enabled, this is equivalent to

set shortcutsWindow [ #viewName := value ]

Signals

close

type ShortcutsWindowCloseCallback = IO () Source #

The close signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user uses a keybinding to close the window.

The default binding for this signal is the Escape key.

afterShortcutsWindowClose :: (IsShortcutsWindow a, MonadIO m) => a -> ((?self :: a) => ShortcutsWindowCloseCallback) -> m SignalHandlerId Source #

Connect a signal handler for the close signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after shortcutsWindow #close callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onShortcutsWindowClose :: (IsShortcutsWindow a, MonadIO m) => a -> ((?self :: a) => ShortcutsWindowCloseCallback) -> m SignalHandlerId Source #

Connect a signal handler for the close signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on shortcutsWindow #close callback

search

type ShortcutsWindowSearchCallback = IO () Source #

The search signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user uses a keybinding to start a search.

The default binding for this signal is Control-F.

afterShortcutsWindowSearch :: (IsShortcutsWindow a, MonadIO m) => a -> ((?self :: a) => ShortcutsWindowSearchCallback) -> m SignalHandlerId Source #

Connect a signal handler for the search signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after shortcutsWindow #search callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onShortcutsWindowSearch :: (IsShortcutsWindow a, MonadIO m) => a -> ((?self :: a) => ShortcutsWindowSearchCallback) -> m SignalHandlerId Source #

Connect a signal handler for the search signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on shortcutsWindow #search callback