Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
A GtkShortcutsSection collects all the keyboard shortcuts and gestures
for a major application mode. If your application needs multiple sections,
you should give each section a unique ShortcutsSection
:section-name
and
a ShortcutsSection
:title
that can be shown in the section selector of
the GtkShortcutsWindow.
The ShortcutsSection
:max-height
property can be used to influence how
the groups in the section are distributed over pages and columns.
This widget is only meant to be used with ShortcutsWindow
.
Synopsis
- newtype ShortcutsSection = ShortcutsSection (ManagedPtr ShortcutsSection)
- class GObject o => IsShortcutsSection o
- toShortcutsSection :: (MonadIO m, IsShortcutsSection o) => o -> m ShortcutsSection
- noShortcutsSection :: Maybe ShortcutsSection
- constructShortcutsSectionMaxHeight :: IsShortcutsSection o => Word32 -> IO (GValueConstruct o)
- getShortcutsSectionMaxHeight :: (MonadIO m, IsShortcutsSection o) => o -> m Word32
- setShortcutsSectionMaxHeight :: (MonadIO m, IsShortcutsSection o) => o -> Word32 -> m ()
- clearShortcutsSectionSectionName :: (MonadIO m, IsShortcutsSection o) => o -> m ()
- constructShortcutsSectionSectionName :: IsShortcutsSection o => Text -> IO (GValueConstruct o)
- getShortcutsSectionSectionName :: (MonadIO m, IsShortcutsSection o) => o -> m (Maybe Text)
- setShortcutsSectionSectionName :: (MonadIO m, IsShortcutsSection o) => o -> Text -> m ()
- clearShortcutsSectionTitle :: (MonadIO m, IsShortcutsSection o) => o -> m ()
- constructShortcutsSectionTitle :: IsShortcutsSection o => Text -> IO (GValueConstruct o)
- getShortcutsSectionTitle :: (MonadIO m, IsShortcutsSection o) => o -> m (Maybe Text)
- setShortcutsSectionTitle :: (MonadIO m, IsShortcutsSection o) => o -> Text -> m ()
- clearShortcutsSectionViewName :: (MonadIO m, IsShortcutsSection o) => o -> m ()
- constructShortcutsSectionViewName :: IsShortcutsSection o => Text -> IO (GValueConstruct o)
- getShortcutsSectionViewName :: (MonadIO m, IsShortcutsSection o) => o -> m (Maybe Text)
- setShortcutsSectionViewName :: (MonadIO m, IsShortcutsSection o) => o -> Text -> m ()
- type C_ShortcutsSectionChangeCurrentPageCallback = Ptr () -> Int32 -> Ptr () -> IO CInt
- type ShortcutsSectionChangeCurrentPageCallback = Int32 -> IO Bool
- afterShortcutsSectionChangeCurrentPage :: (IsShortcutsSection a, MonadIO m) => a -> ShortcutsSectionChangeCurrentPageCallback -> m SignalHandlerId
- genClosure_ShortcutsSectionChangeCurrentPage :: ShortcutsSectionChangeCurrentPageCallback -> IO Closure
- mk_ShortcutsSectionChangeCurrentPageCallback :: C_ShortcutsSectionChangeCurrentPageCallback -> IO (FunPtr C_ShortcutsSectionChangeCurrentPageCallback)
- noShortcutsSectionChangeCurrentPageCallback :: Maybe ShortcutsSectionChangeCurrentPageCallback
- onShortcutsSectionChangeCurrentPage :: (IsShortcutsSection a, MonadIO m) => a -> ShortcutsSectionChangeCurrentPageCallback -> m SignalHandlerId
- wrap_ShortcutsSectionChangeCurrentPageCallback :: ShortcutsSectionChangeCurrentPageCallback -> C_ShortcutsSectionChangeCurrentPageCallback
Exported types
newtype ShortcutsSection Source #
Memory-managed wrapper type.
Instances
class GObject o => IsShortcutsSection o Source #
Type class for types which can be safely cast to ShortcutsSection
, for instance with toShortcutsSection
.
Instances
(GObject a, (UnknownAncestorError ShortcutsSection a :: Constraint)) => IsShortcutsSection a Source # | |
Defined in GI.Gtk.Objects.ShortcutsSection | |
IsShortcutsSection ShortcutsSection Source # | |
Defined in GI.Gtk.Objects.ShortcutsSection |
toShortcutsSection :: (MonadIO m, IsShortcutsSection o) => o -> m ShortcutsSection Source #
Cast to ShortcutsSection
, for types for which this is known to be safe. For general casts, use castTo
.
noShortcutsSection :: Maybe ShortcutsSection Source #
A convenience alias for Nothing
:: Maybe
ShortcutsSection
.
Properties
maxHeight
The maximum number of lines to allow per column. This property can be used to influence how the groups in this section are distributed across pages and columns. The default value of 15 should work in for most cases.
constructShortcutsSectionMaxHeight :: IsShortcutsSection o => Word32 -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “max-height
” property. This is rarely needed directly, but it is used by new
.
getShortcutsSectionMaxHeight :: (MonadIO m, IsShortcutsSection o) => o -> m Word32 Source #
Get the value of the “max-height
” property.
When overloading is enabled, this is equivalent to
get
shortcutsSection #maxHeight
setShortcutsSectionMaxHeight :: (MonadIO m, IsShortcutsSection o) => o -> Word32 -> m () Source #
Set the value of the “max-height
” property.
When overloading is enabled, this is equivalent to
set
shortcutsSection [ #maxHeight:=
value ]
sectionName
A unique name to identify this section among the sections
added to the GtkShortcutsWindow. Setting the ShortcutsWindow
:section-name
property to this string will make this section shown in the
GtkShortcutsWindow.
clearShortcutsSectionSectionName :: (MonadIO m, IsShortcutsSection o) => o -> m () Source #
Set the value of the “section-name
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#sectionName
constructShortcutsSectionSectionName :: IsShortcutsSection o => Text -> IO (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
.
getShortcutsSectionSectionName :: (MonadIO m, IsShortcutsSection o) => o -> m (Maybe Text) Source #
Get the value of the “section-name
” property.
When overloading is enabled, this is equivalent to
get
shortcutsSection #sectionName
setShortcutsSectionSectionName :: (MonadIO m, IsShortcutsSection o) => o -> Text -> m () Source #
Set the value of the “section-name
” property.
When overloading is enabled, this is equivalent to
set
shortcutsSection [ #sectionName:=
value ]
title
The string to show in the section selector of the GtkShortcutsWindow for this section. If there is only one section, you don't need to set a title, since the section selector will not be shown in this case.
clearShortcutsSectionTitle :: (MonadIO m, IsShortcutsSection o) => o -> m () Source #
Set the value of the “title
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#title
constructShortcutsSectionTitle :: IsShortcutsSection o => Text -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “title
” property. This is rarely needed directly, but it is used by new
.
getShortcutsSectionTitle :: (MonadIO m, IsShortcutsSection o) => o -> m (Maybe Text) Source #
Get the value of the “title
” property.
When overloading is enabled, this is equivalent to
get
shortcutsSection #title
setShortcutsSectionTitle :: (MonadIO m, IsShortcutsSection o) => o -> Text -> m () Source #
Set the value of the “title
” property.
When overloading is enabled, this is equivalent to
set
shortcutsSection [ #title:=
value ]
viewName
A view name to filter the groups in this section by.
See ShortcutsGroup
:view
.
Applications are expected to use the ShortcutsWindow
:view-name
property for this purpose.
clearShortcutsSectionViewName :: (MonadIO m, IsShortcutsSection o) => o -> m () Source #
Set the value of the “view-name
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#viewName
constructShortcutsSectionViewName :: IsShortcutsSection o => Text -> IO (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
.
getShortcutsSectionViewName :: (MonadIO m, IsShortcutsSection o) => o -> m (Maybe Text) Source #
Get the value of the “view-name
” property.
When overloading is enabled, this is equivalent to
get
shortcutsSection #viewName
setShortcutsSectionViewName :: (MonadIO m, IsShortcutsSection o) => o -> Text -> m () Source #
Set the value of the “view-name
” property.
When overloading is enabled, this is equivalent to
set
shortcutsSection [ #viewName:=
value ]
Signals
changeCurrentPage
type C_ShortcutsSectionChangeCurrentPageCallback = Ptr () -> Int32 -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
type ShortcutsSectionChangeCurrentPageCallback = Int32 -> IO Bool Source #
No description available in the introspection data.
afterShortcutsSectionChangeCurrentPage :: (IsShortcutsSection a, MonadIO m) => a -> ShortcutsSectionChangeCurrentPageCallback -> m SignalHandlerId Source #
Connect a signal handler for the “change-current-page
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
shortcutsSection #changeCurrentPage callback
genClosure_ShortcutsSectionChangeCurrentPage :: ShortcutsSectionChangeCurrentPageCallback -> IO Closure Source #
Wrap the callback into a Closure
.
mk_ShortcutsSectionChangeCurrentPageCallback :: C_ShortcutsSectionChangeCurrentPageCallback -> IO (FunPtr C_ShortcutsSectionChangeCurrentPageCallback) Source #
Generate a function pointer callable from C code, from a C_ShortcutsSectionChangeCurrentPageCallback
.
noShortcutsSectionChangeCurrentPageCallback :: Maybe ShortcutsSectionChangeCurrentPageCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ShortcutsSectionChangeCurrentPageCallback
onShortcutsSectionChangeCurrentPage :: (IsShortcutsSection a, MonadIO m) => a -> ShortcutsSectionChangeCurrentPageCallback -> m SignalHandlerId Source #
Connect a signal handler for the “change-current-page
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
shortcutsSection #changeCurrentPage callback