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

GI.Gtk.Objects.AppChooserButton

Description

The AppChooserButton is a widget that lets the user select an application. It implements the AppChooser interface.

Initially, a AppChooserButton selects the first application in its list, which will either be the most-recently used application or, if AppChooserButton:show-default-item is True, the default application.

The list of applications shown in a AppChooserButton includes the recommended applications for the given content type. When AppChooserButton:show-default-item is set, the default application is also included. To let the user chooser other applications, you can set the AppChooserButton:show-dialog-item property, which allows to open a full AppChooserDialog.

It is possible to add custom items to the list, using appChooserButtonAppendCustomItem. These items cause the customItemActivated signal to be emitted when they are selected.

To track changes in the selected application, use the changed signal.

Synopsis

Exported types

newtype AppChooserButton Source #

Memory-managed wrapper type.

Constructors

AppChooserButton (ManagedPtr AppChooserButton) 

Instances

Instances details
Eq AppChooserButton Source # 
Instance details

Defined in GI.Gtk.Objects.AppChooserButton

GObject AppChooserButton Source # 
Instance details

Defined in GI.Gtk.Objects.AppChooserButton

ManagedPtrNewtype AppChooserButton Source # 
Instance details

Defined in GI.Gtk.Objects.AppChooserButton

TypedObject AppChooserButton Source # 
Instance details

Defined in GI.Gtk.Objects.AppChooserButton

Methods

glibType :: IO GType

HasParentTypes AppChooserButton Source # 
Instance details

Defined in GI.Gtk.Objects.AppChooserButton

IsGValue (Maybe AppChooserButton) Source #

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

Instance details

Defined in GI.Gtk.Objects.AppChooserButton

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes AppChooserButton Source # 
Instance details

Defined in GI.Gtk.Objects.AppChooserButton

class (GObject o, IsDescendantOf AppChooserButton o) => IsAppChooserButton o Source #

Type class for types which can be safely cast to AppChooserButton, for instance with toAppChooserButton.

Instances

Instances details
(GObject o, IsDescendantOf AppChooserButton o) => IsAppChooserButton o Source # 
Instance details

Defined in GI.Gtk.Objects.AppChooserButton

toAppChooserButton :: (MonadIO m, IsAppChooserButton o) => o -> m AppChooserButton Source #

Cast to AppChooserButton, 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, add, addAccelerator, addAttribute, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, appendCustomItem, appendSeparator, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, clear, clearAttributes, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, 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, editingDone, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, packEnd, packStart, parserFinished, path, popdown, popup, popupForDevice, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, refresh, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, removeWidget, renderIcon, renderIconPixbuf, reorder, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, startEditing, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.

Getters

getAccessible, getActionGroup, getActive, getActiveId, getActiveIter, getAddTearoffs, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppInfo, getAppPaintable, getArea, getBorderWidth, getButtonSensitivity, getCanDefault, getCanFocus, getCells, getChild, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getColumnSpanColumn, getCompositeName, getContentType, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEntryTextColumn, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasEntry, getHasTooltip, getHasWindow, getHeading, getHexpand, getHexpandSet, getIdColumn, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModel, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPopupAccessible, getPopupFixedWidth, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getRowSpanColumn, getScaleFactor, getScreen, getSensitive, getSettings, getShowDefaultItem, getShowDialogItem, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTitle, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow, getWrapWidth.

Setters

setAccelPath, setActive, setActiveCustomItem, setActiveId, setActiveIter, setAddTearoffs, setAllocation, setAppPaintable, setBorderWidth, setBuildableProperty, setButtonSensitivity, setCanDefault, setCanFocus, setCellDataFunc, setChildVisible, setClip, setColumnSpanColumn, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEntryTextColumn, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHeading, setHexpand, setHexpandSet, setIdColumn, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setModel, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setPopupFixedWidth, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setRowSeparatorFunc, setRowSpanColumn, setSensitive, setShowDefaultItem, setShowDialogItem, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTitle, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow, setWrapWidth.

appendCustomItem

appChooserButtonAppendCustomItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a, IsIcon b) 
=> a

self: a AppChooserButton

-> Text

name: the name of the custom item

-> Text

label: the label for the custom item

-> b

icon: the icon for the custom item

-> m () 

Appends a custom item to the list of applications that is shown in the popup; the item name must be unique per-widget. Clients can use the provided name as a detail for the customItemActivated signal, to add a callback for the activation of a particular custom item in the list. See also appChooserButtonAppendSeparator.

Since: 3.0

appendSeparator

appChooserButtonAppendSeparator Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> m () 

Appends a separator to the list of applications that is shown in the popup.

Since: 3.0

getHeading

appChooserButtonGetHeading Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> m (Maybe Text)

Returns: the text to display at the top of the dialog, or Nothing, in which case a default text is displayed

Returns the text to display at the top of the dialog.

getShowDefaultItem

appChooserButtonGetShowDefaultItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> m Bool

Returns: the value of AppChooserButton:show-default-item

Returns the current value of the AppChooserButton:show-default-item property.

Since: 3.2

getShowDialogItem

appChooserButtonGetShowDialogItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> m Bool

Returns: the value of AppChooserButton:show-dialog-item

Returns the current value of the AppChooserButton:show-dialog-item property.

Since: 3.0

new

appChooserButtonNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

contentType: the content type to show applications for

-> m AppChooserButton

Returns: a newly created AppChooserButton

Creates a new AppChooserButton for applications that can handle content of the given type.

Since: 3.0

setActiveCustomItem

appChooserButtonSetActiveCustomItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> Text

name: the name of the custom item

-> m () 

Selects a custom item previously added with appChooserButtonAppendCustomItem.

Use appChooserRefresh to bring the selection to its initial state.

Since: 3.0

setHeading

appChooserButtonSetHeading Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> Text

heading: a string containing Pango markup

-> m () 

Sets the text to display at the top of the dialog. If the heading is not set, the dialog displays a default text.

setShowDefaultItem

appChooserButtonSetShowDefaultItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> Bool

setting: the new value for AppChooserButton:show-default-item

-> m () 

Sets whether the dropdown menu of this button should show the default application for the given content type at top.

Since: 3.2

setShowDialogItem

appChooserButtonSetShowDialogItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAppChooserButton a) 
=> a

self: a AppChooserButton

-> Bool

setting: the new value for AppChooserButton:show-dialog-item

-> m () 

Sets whether the dropdown menu of this button should show an entry to trigger a AppChooserDialog.

Since: 3.0

Properties

heading

The text to show at the top of the dialog that can be opened from the button. The string may contain Pango markup.

constructAppChooserButtonHeading :: (IsAppChooserButton o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getAppChooserButtonHeading :: (MonadIO m, IsAppChooserButton o) => o -> m (Maybe Text) Source #

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

get appChooserButton #heading

setAppChooserButtonHeading :: (MonadIO m, IsAppChooserButton o) => o -> Text -> m () Source #

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

set appChooserButton [ #heading := value ]

showDefaultItem

The AppChooserButton:show-default-item property determines whether the dropdown menu should show the default application on top for the provided content type.

Since: 3.2

constructAppChooserButtonShowDefaultItem :: (IsAppChooserButton o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getAppChooserButtonShowDefaultItem :: (MonadIO m, IsAppChooserButton o) => o -> m Bool Source #

Get the value of the “show-default-item” property. When overloading is enabled, this is equivalent to

get appChooserButton #showDefaultItem

setAppChooserButtonShowDefaultItem :: (MonadIO m, IsAppChooserButton o) => o -> Bool -> m () Source #

Set the value of the “show-default-item” property. When overloading is enabled, this is equivalent to

set appChooserButton [ #showDefaultItem := value ]

showDialogItem

The AppChooserButton:show-dialog-item property determines whether the dropdown menu should show an item that triggers a AppChooserDialog when clicked.

constructAppChooserButtonShowDialogItem :: (IsAppChooserButton o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getAppChooserButtonShowDialogItem :: (MonadIO m, IsAppChooserButton o) => o -> m Bool Source #

Get the value of the “show-dialog-item” property. When overloading is enabled, this is equivalent to

get appChooserButton #showDialogItem

setAppChooserButtonShowDialogItem :: (MonadIO m, IsAppChooserButton o) => o -> Bool -> m () Source #

Set the value of the “show-dialog-item” property. When overloading is enabled, this is equivalent to

set appChooserButton [ #showDialogItem := value ]

Signals

customItemActivated

type AppChooserButtonCustomItemActivatedCallback Source #

Arguments

 = Text

itemName: the name of the activated item

-> IO () 

Emitted when a custom item, previously added with appChooserButtonAppendCustomItem, is activated from the dropdown menu.

type C_AppChooserButtonCustomItemActivatedCallback = Ptr () -> CString -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

afterAppChooserButtonCustomItemActivated :: (IsAppChooserButton a, MonadIO m) => a -> Maybe Text -> AppChooserButtonCustomItemActivatedCallback -> m SignalHandlerId Source #

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

after appChooserButton #customItemActivated callback

This signal admits a optional parameter detail. If it's not Nothing, we will connect to “custom-item-activated::detail” instead.

onAppChooserButtonCustomItemActivated :: (IsAppChooserButton a, MonadIO m) => a -> Maybe Text -> AppChooserButtonCustomItemActivatedCallback -> m SignalHandlerId Source #

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

on appChooserButton #customItemActivated callback

This signal admits a optional parameter detail. If it's not Nothing, we will connect to “custom-item-activated::detail” instead.