Documentation ¶
Index ¶
- func EaseOutCubic(t float64) float64
- func EnumValueRowName(value *EnumValueObject) string
- func GetEnableAnimations(widget gtk.IWidget) bool
- func Init()
- type ActionRow
- func (a *ActionRow) Activate()
- func (a *ActionRow) AddPrefix(widget gtk.IWidget)
- func (a *ActionRow) GetActivatableWidget() gtk.IWidget
- func (a *ActionRow) GetIconName() string
- func (a *ActionRow) GetSubtitle() string
- func (a *ActionRow) GetSubtitleLines() int
- func (a *ActionRow) GetTitleLines() int
- func (a *ActionRow) GetUseUnderline() bool
- func (a *ActionRow) SetActivatableWidget(widget gtk.IWidget)
- func (a *ActionRow) SetIconName(iconName string)
- func (a *ActionRow) SetSubtitle(subtitle string)
- func (a *ActionRow) SetSubtitleLines(subtitleLines int)
- func (a *ActionRow) SetTitleLines(titleLines int)
- func (a *ActionRow) SetUseUnderline(useUnderline bool)
- type ApplicationWindow
- type Avatar
- func (a *Avatar) DrawToPixbuf(size int, scaleFactor int) *gdk.Pixbuf
- func (a *Avatar) GetIconName() string
- func (a *Avatar) GetShowInitials() bool
- func (a *Avatar) GetSize() int
- func (a *Avatar) GetText() string
- func (a *Avatar) SetIconName(iconName string)
- func (a *Avatar) SetImageLoadFunc(loadImage AvatarImageLoadFunc)
- func (a *Avatar) SetShowInitials(showInitials bool)
- func (a *Avatar) SetSize(size int)
- func (a *Avatar) SetText(text string)
- type AvatarImageLoadFunc
- type Carousel
- func (c *Carousel) GetAllowLongSwipes() bool
- func (c *Carousel) GetAllowMouseDrag() bool
- func (c *Carousel) GetAnimationDuration() uint
- func (c *Carousel) GetInteractive() bool
- func (c *Carousel) GetNPages() uint
- func (c *Carousel) GetPosition() float64
- func (c *Carousel) GetRevealDuration() uint
- func (c *Carousel) GetSpacing() uint
- func (c *Carousel) Insert(child gtk.IWidget, position int)
- func (c *Carousel) Prepend(child gtk.IWidget)
- func (c *Carousel) Reorder(child gtk.IWidget, position int)
- func (c *Carousel) ScrollTo(widget gtk.IWidget)
- func (c *Carousel) ScrollToFull(widget gtk.IWidget, duration int64)
- func (c *Carousel) SetAllowLongSwipes(allowLongSwipes bool)
- func (c *Carousel) SetAllowMouseDrag(allowMouseDrag bool)
- func (c *Carousel) SetAnimationDuration(duration uint)
- func (c *Carousel) SetInteractive(interactive bool)
- func (c *Carousel) SetRevealDuration(revealDuration uint)
- func (c *Carousel) SetSpacing(spacing uint)
- type CarouselIndicatorDots
- type CarouselIndicatorLines
- type Caster
- type CenteringPolicy
- type Clamp
- type ComboRow
- func (c *ComboRow) BindModel(model *glib.ListModel)
- func (c *ComboRow) BindNameModel(model *glib.ListModel, getNameFunc ComboRowGetNameFunc)
- func (c *ComboRow) GetModel() *glib.ListModel
- func (c *ComboRow) GetSelectedIndex() int
- func (c *ComboRow) GetUseSubtitle() bool
- func (c *ComboRow) SetForEnum(enumType glib.Type, getNameFunc ComboRowGetEnumValueNameFunc)
- func (c *ComboRow) SetGetNameFunc(getNameFunc ComboRowGetNameFunc)
- func (c *ComboRow) SetSelectedIndex(selectedIndex int)
- func (c *ComboRow) SetUseSubtitle(useSubtitle bool)
- type ComboRowGetEnumValueNameFunc
- type ComboRowGetNameFunc
- type Deck
- func (d *Deck) GetAdjacentChild(direction NavigationDirection) gtk.IWidget
- func (d *Deck) GetCanSwipeBack() bool
- func (d *Deck) GetCanSwipeForward() bool
- func (d *Deck) GetChildByName(name string) gtk.IWidget
- func (d *Deck) GetHomogeneous(orientation gtk.Orientation) bool
- func (d *Deck) GetInterpolateSize() bool
- func (d *Deck) GetTransitionDuration() uint
- func (d *Deck) GetTransitionRunning() bool
- func (d *Deck) GetTransitionType() DeckTransitionType
- func (d *Deck) GetVisibleChild() gtk.IWidget
- func (d *Deck) GetVisibleChildName() string
- func (d *Deck) InsertChildAfter(child gtk.IWidget, sibling gtk.IWidget)
- func (d *Deck) Navigate(direction NavigationDirection) bool
- func (d *Deck) Prepend(child gtk.IWidget)
- func (d *Deck) ReorderChildAfter(child gtk.IWidget, sibling gtk.IWidget)
- func (d *Deck) SetCanSwipeBack(canSwipeBack bool)
- func (d *Deck) SetCanSwipeForward(canSwipeForward bool)
- func (d *Deck) SetHomogeneous(orientation gtk.Orientation, homogeneous bool)
- func (d *Deck) SetInterpolateSize(interpolateSize bool)
- func (d *Deck) SetTransitionDuration(duration uint)
- func (d *Deck) SetTransitionType(transition DeckTransitionType)
- func (d *Deck) SetVisibleChild(visibleChild gtk.IWidget)
- func (d *Deck) SetVisibleChildName(name string)
- type DeckTransitionType
- type EnumValueObject
- type ExpanderRow
- func (e *ExpanderRow) AddAction(widget gtk.IWidget)
- func (e *ExpanderRow) AddPrefix(widget gtk.IWidget)
- func (e *ExpanderRow) GetEnableExpansion() bool
- func (e *ExpanderRow) GetExpanded() bool
- func (e *ExpanderRow) GetIconName() string
- func (e *ExpanderRow) GetShowEnableSwitch() bool
- func (e *ExpanderRow) GetSubtitle() string
- func (e *ExpanderRow) GetUseUnderline() bool
- func (e *ExpanderRow) SetEnableExpansion(enableExpansion bool)
- func (e *ExpanderRow) SetExpanded(expanded bool)
- func (e *ExpanderRow) SetIconName(iconName string)
- func (e *ExpanderRow) SetShowEnableSwitch(showEnableSwitch bool)
- func (e *ExpanderRow) SetSubtitle(subtitle string)
- func (e *ExpanderRow) SetUseUnderline(useUnderline bool)
- type Flap
- func (f *Flap) GetContent() gtk.IWidget
- func (f *Flap) GetFlap() gtk.IWidget
- func (f *Flap) GetFlapPosition() gtk.PackType
- func (f *Flap) GetFoldDuration() uint
- func (f *Flap) GetFoldPolicy() FlapFoldPolicy
- func (f *Flap) GetFolded() bool
- func (f *Flap) GetLocked() bool
- func (f *Flap) GetModal() bool
- func (f *Flap) GetRevealDuration() uint
- func (f *Flap) GetRevealFlap() bool
- func (f *Flap) GetRevealProgress() float64
- func (f *Flap) GetSeparator() gtk.IWidget
- func (f *Flap) GetSwipeToClose() bool
- func (f *Flap) GetSwipeToOpen() bool
- func (f *Flap) GetTransitionType() FlapTransitionType
- func (f *Flap) SetContent(content gtk.IWidget)
- func (f *Flap) SetFlap(flap gtk.IWidget)
- func (f *Flap) SetFlapPosition(position gtk.PackType)
- func (f *Flap) SetFoldDuration(duration uint)
- func (f *Flap) SetFoldPolicy(policy FlapFoldPolicy)
- func (f *Flap) SetLocked(locked bool)
- func (f *Flap) SetModal(modal bool)
- func (f *Flap) SetRevealDuration(duration uint)
- func (f *Flap) SetRevealFlap(revealFlap bool)
- func (f *Flap) SetSeparator(separator gtk.IWidget)
- func (f *Flap) SetSwipeToClose(swipeToClose bool)
- func (f *Flap) SetSwipeToOpen(swipeToOpen bool)
- func (f *Flap) SetTransitionType(transitionType FlapTransitionType)
- type FlapFoldPolicy
- type FlapTransitionType
- type HeaderBar
- func (h *HeaderBar) GetCenteringPolicy() CenteringPolicy
- func (h *HeaderBar) GetCustomTitle() gtk.IWidget
- func (h *HeaderBar) GetDecorationLayout() string
- func (h *HeaderBar) GetHasSubtitle() bool
- func (h *HeaderBar) GetInterpolateSize() bool
- func (h *HeaderBar) GetShowCloseButton() bool
- func (h *HeaderBar) GetSubtitle() string
- func (h *HeaderBar) GetTitle() string
- func (h *HeaderBar) GetTransitionDuration() uint
- func (h *HeaderBar) GetTransitionRunning() bool
- func (h *HeaderBar) PackEnd(child gtk.IWidget)
- func (h *HeaderBar) PackStart(child gtk.IWidget)
- func (h *HeaderBar) SetCenteringPolicy(centeringPolicy CenteringPolicy)
- func (h *HeaderBar) SetCustomTitle(titleWidget gtk.IWidget)
- func (h *HeaderBar) SetDecorationLayout(layout string)
- func (h *HeaderBar) SetHasSubtitle(setting bool)
- func (h *HeaderBar) SetInterpolateSize(interpolateSize bool)
- func (h *HeaderBar) SetShowCloseButton(setting bool)
- func (h *HeaderBar) SetSubtitle(subtitle string)
- func (h *HeaderBar) SetTitle(title string)
- func (h *HeaderBar) SetTransitionDuration(duration uint)
- type HeaderGroup
- func (h *HeaderGroup) AddGtkHeaderBar(headerBar *gtk.HeaderBar)
- func (h *HeaderGroup) AddHeaderBar(headerBar *HeaderBar)
- func (h *HeaderGroup) AddHeaderGroup(headerGroup *HeaderGroup)
- func (h *HeaderGroup) GetChildren() *glib.SList
- func (h *HeaderGroup) GetDecorateAll() bool
- func (h *HeaderGroup) RemoveChild(child *HeaderGroupChild)
- func (h *HeaderGroup) RemoveGtkHeaderBar(headerBar *gtk.HeaderBar)
- func (h *HeaderGroup) RemoveHeaderBar(headerBar *HeaderBar)
- func (h *HeaderGroup) RemoveHeaderGroup(headerGroup *HeaderGroup)
- func (h *HeaderGroup) SetDecorateAll(decorateAll bool)
- type HeaderGroupChild
- type HeaderGroupChildType
- type Keypad
- func (k *Keypad) GetColumnSpacing() uint
- func (k *Keypad) GetEndAction() gtk.IWidget
- func (k *Keypad) GetEntry() *gtk.Entry
- func (k *Keypad) GetLettersVisible() bool
- func (k *Keypad) GetRowSpacing() uint
- func (k *Keypad) GetStartAction() gtk.IWidget
- func (k *Keypad) GetSymbolsVisible() bool
- func (k *Keypad) SetColumnSpacing(spacing uint)
- func (k *Keypad) SetEndAction(endAction gtk.IWidget)
- func (k *Keypad) SetEntry(entry *gtk.Entry)
- func (k *Keypad) SetLettersVisible(lettersVisible bool)
- func (k *Keypad) SetRowSpacing(spacing uint)
- func (k *Keypad) SetStartAction(startAction gtk.IWidget)
- func (k *Keypad) SetSymbolsVisible(symbolsVisible bool)
- type Leaflet
- func (l *Leaflet) GetAdjacentChild(direction NavigationDirection) gtk.IWidget
- func (l *Leaflet) GetCanSwipeBack() bool
- func (l *Leaflet) GetCanSwipeForward() bool
- func (l *Leaflet) GetChildByName(name string) gtk.IWidget
- func (l *Leaflet) GetChildTransitionDuration() uint
- func (l *Leaflet) GetChildTransitionRunning() bool
- func (l *Leaflet) GetFolded() bool
- func (l *Leaflet) GetHomogeneous(folded bool, orientation gtk.Orientation) bool
- func (l *Leaflet) GetInterpolateSize() bool
- func (l *Leaflet) GetModeTransitionDuration() uint
- func (l *Leaflet) GetTransitionType() LeafletTransitionType
- func (l *Leaflet) GetVisibleChild() gtk.IWidget
- func (l *Leaflet) GetVisibleChildName() string
- func (l *Leaflet) InsertChildAfter(child gtk.IWidget, sibling gtk.IWidget)
- func (l *Leaflet) Navigate(direction NavigationDirection) bool
- func (l *Leaflet) Prepend(child gtk.IWidget)
- func (l *Leaflet) ReorderChildAfter(child gtk.IWidget, sibling gtk.IWidget)
- func (l *Leaflet) SetCanSwipeBack(canSwipeBack bool)
- func (l *Leaflet) SetCanSwipeForward(canSwipeForward bool)
- func (l *Leaflet) SetChildTransitionDuration(duration uint)
- func (l *Leaflet) SetHomogeneous(folded bool, orientation gtk.Orientation, homogeneous bool)
- func (l *Leaflet) SetInterpolateSize(interpolateSize bool)
- func (l *Leaflet) SetModeTransitionDuration(duration uint)
- func (l *Leaflet) SetTransitionType(transition LeafletTransitionType)
- func (l *Leaflet) SetVisibleChild(visibleChild gtk.IWidget)
- func (l *Leaflet) SetVisibleChildName(name string)
- type LeafletTransitionType
- type NavigationDirection
- type PreferencesGroup
- type PreferencesPage
- type PreferencesRow
- type PreferencesWindow
- func (p *PreferencesWindow) CloseSubpage()
- func (p *PreferencesWindow) GetCanSwipeBack() bool
- func (p *PreferencesWindow) GetSearchEnabled() bool
- func (p *PreferencesWindow) PresentSubpage(subpage gtk.IWidget)
- func (p *PreferencesWindow) SetCanSwipeBack(canSwipeBack bool)
- func (p *PreferencesWindow) SetSearchEnabled(searchEnabled bool)
- type SearchBar
- type Squeezer
- func (s *Squeezer) GetChildEnabled(child gtk.IWidget) bool
- func (s *Squeezer) GetHomogeneous() bool
- func (s *Squeezer) GetInterpolateSize() bool
- func (s *Squeezer) GetTransitionDuration() uint
- func (s *Squeezer) GetTransitionRunning() bool
- func (s *Squeezer) GetTransitionType() SqueezerTransitionType
- func (s *Squeezer) GetVisibleChild() gtk.IWidget
- func (s *Squeezer) GetXAlign() float32
- func (s *Squeezer) GetYAlign() float32
- func (s *Squeezer) SetChildEnabled(child gtk.IWidget, enabled bool)
- func (s *Squeezer) SetHomogeneous(homogeneous bool)
- func (s *Squeezer) SetInterpolateSize(interpolateSize bool)
- func (s *Squeezer) SetTransitionDuration(duration uint)
- func (s *Squeezer) SetTransitionType(transition SqueezerTransitionType)
- func (s *Squeezer) SetXAlign(xalign float32)
- func (s *Squeezer) SetYAlign(yalign float32)
- type SqueezerTransitionType
- type StatusPage
- type SwipeGroup
- type SwipeTracker
- func (s *SwipeTracker) GetAllowLongSwipes() bool
- func (s *SwipeTracker) GetAllowMouseDrag() bool
- func (s *SwipeTracker) GetEnabled() bool
- func (s *SwipeTracker) GetReversed() bool
- func (s *SwipeTracker) GetSwipeable() Swiper
- func (s *SwipeTracker) SetAllowLongSwipes(allowLongSwipes bool)
- func (s *SwipeTracker) SetAllowMouseDrag(allowMouseDrag bool)
- func (s *SwipeTracker) SetEnabled(enabled bool)
- func (s *SwipeTracker) SetReversed(reversed bool)
- func (s *SwipeTracker) ShiftPosition(delta float64)
- type Swipeable
- func (s *Swipeable) EmitChildSwitched(index uint, duration int64)
- func (s *Swipeable) GetCancelProgress() float64
- func (s *Swipeable) GetDistance() float64
- func (s *Swipeable) GetProgress() float64
- func (s *Swipeable) GetSwipeArea(navigationDirection NavigationDirection, isDrag bool, rect *gdk.Rectangle)
- func (s *Swipeable) GetSwipeTracker() *SwipeTracker
- func (s *Swipeable) SwitchChild(index uint, duration int64)
- type Swiper
- type TabBar
- func (t *TabBar) GetAutohide() bool
- func (t *TabBar) GetEndActionWidget() gtk.IWidget
- func (t *TabBar) GetExpandTabs() bool
- func (t *TabBar) GetInverted() bool
- func (t *TabBar) GetIsOverflowing() bool
- func (t *TabBar) GetStartActionWidget() gtk.IWidget
- func (t *TabBar) GetTabsRevealed() bool
- func (t *TabBar) GetView() *TabView
- func (t *TabBar) SetAutohide(autohide bool)
- func (t *TabBar) SetEndActionWidget(widget gtk.IWidget)
- func (t *TabBar) SetExpandTabs(expandTabs bool)
- func (t *TabBar) SetInverted(inverted bool)
- func (t *TabBar) SetStartActionWidget(widget gtk.IWidget)
- func (t *TabBar) SetView(view *TabView)
- type TabPage
- func (t *TabPage) GetChild() gtk.IWidget
- func (t *TabPage) GetIcon() *glib.Icon
- func (t *TabPage) GetIndicatorActivatable() bool
- func (t *TabPage) GetIndicatorIcon() *glib.Icon
- func (t *TabPage) GetLoading() bool
- func (t *TabPage) GetNeedsAttention() bool
- func (t *TabPage) GetParent() *TabPage
- func (t *TabPage) GetPinned() bool
- func (t *TabPage) GetSelected() bool
- func (t *TabPage) GetTitle() string
- func (t *TabPage) GetTooltip() string
- func (t *TabPage) SetIcon(icon *glib.Icon)
- func (t *TabPage) SetIndicatorActivatable(activatable bool)
- func (t *TabPage) SetIndicatorIcon(indicatorIcon *glib.Icon)
- func (t *TabPage) SetLoading(loading bool)
- func (t *TabPage) SetNeedsAttention(needsAttention bool)
- func (t *TabPage) SetTitle(title string)
- func (t *TabPage) SetTooltip(tooltip string)
- type TabView
- func (t *TabView) AddPage(child gtk.IWidget, parent *TabPage) *TabPage
- func (t *TabView) Append(child gtk.IWidget) *TabPage
- func (t *TabView) AppendPinned(child gtk.IWidget) *TabPage
- func (t *TabView) CloseOtherPages(page *TabPage)
- func (t *TabView) ClosePage(page *TabPage)
- func (t *TabView) ClosePageFinish(page *TabPage, confirm bool)
- func (t *TabView) ClosePagesAfter(page *TabPage)
- func (t *TabView) ClosePagesBefore(page *TabPage)
- func (t *TabView) GetDefaultIcon() *glib.Icon
- func (t *TabView) GetIsTransferringPage() bool
- func (t *TabView) GetMenuModel() *glib.MenuModel
- func (t *TabView) GetNPages() int
- func (t *TabView) GetNPinnedPages() int
- func (t *TabView) GetNthPage(position int) *TabPage
- func (t *TabView) GetPage(child gtk.IWidget) *TabPage
- func (t *TabView) GetPagePosition(page *TabPage) int
- func (t *TabView) GetPages() *glib.ListModel
- func (t *TabView) GetSelectedPage() *TabPage
- func (t *TabView) GetShortcutWidget() gtk.IWidget
- func (t *TabView) Insert(child gtk.IWidget, position int) *TabPage
- func (t *TabView) InsertPinned(child gtk.IWidget, position int) *TabPage
- func (t *TabView) Prepend(child gtk.IWidget) *TabPage
- func (t *TabView) PrependPinned(child gtk.IWidget) *TabPage
- func (t *TabView) ReorderBackward(page *TabPage) bool
- func (t *TabView) ReorderFirst(page *TabPage) bool
- func (t *TabView) ReorderForward(page *TabPage) bool
- func (t *TabView) ReorderLast(page *TabPage) bool
- func (t *TabView) ReorderPage(page *TabPage, position int) bool
- func (t *TabView) SelectNextPage() bool
- func (t *TabView) SelectPreviousPage() bool
- func (t *TabView) SetDefaultIcon(defaultIcon *glib.Icon)
- func (t *TabView) SetMenuModel(menuModel *glib.MenuModel)
- func (t *TabView) SetPagePinned(page *TabPage, pinned bool)
- func (t *TabView) SetSelectedPage(selectedPage *TabPage)
- func (t *TabView) SetShortcutWidget(widget gtk.IWidget)
- func (t *TabView) TransferPage(page *TabPage, otherView *TabView, position int)
- type TitleBar
- type ValueObject
- type ViewSwitcher
- func (v *ViewSwitcher) GetNarrowEllipsize() pango.EllipsizeMode
- func (v *ViewSwitcher) GetPolicy() ViewSwitcherPolicy
- func (v *ViewSwitcher) GetStack() *gtk.Stack
- func (v *ViewSwitcher) SetNarrowEllipsize(mode pango.EllipsizeMode)
- func (v *ViewSwitcher) SetPolicy(policy ViewSwitcherPolicy)
- func (v *ViewSwitcher) SetStack(stack *gtk.Stack)
- type ViewSwitcherBar
- func (v *ViewSwitcherBar) GetPolicy() ViewSwitcherPolicy
- func (v *ViewSwitcherBar) GetReveal() bool
- func (v *ViewSwitcherBar) GetStack() *gtk.Stack
- func (v *ViewSwitcherBar) SetPolicy(policy ViewSwitcherPolicy)
- func (v *ViewSwitcherBar) SetReveal(reveal bool)
- func (v *ViewSwitcherBar) SetStack(stack *gtk.Stack)
- type ViewSwitcherPolicy
- type ViewSwitcherTitle
- func (v *ViewSwitcherTitle) GetPolicy() ViewSwitcherPolicy
- func (v *ViewSwitcherTitle) GetStack() *gtk.Stack
- func (v *ViewSwitcherTitle) GetSubtitle() string
- func (v *ViewSwitcherTitle) GetTitle() string
- func (v *ViewSwitcherTitle) GetTitleVisible() bool
- func (v *ViewSwitcherTitle) GetViewSwitcherEnabled() bool
- func (v *ViewSwitcherTitle) SetPolicy(policy ViewSwitcherPolicy)
- func (v *ViewSwitcherTitle) SetStack(stack *gtk.Stack)
- func (v *ViewSwitcherTitle) SetSubtitle(subtitle string)
- func (v *ViewSwitcherTitle) SetTitle(title string)
- func (v *ViewSwitcherTitle) SetViewSwitcherEnabled(enabled bool)
- type Window
- type WindowHandle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnumValueRowName ¶
func EnumValueRowName(value *EnumValueObject) string
EnumValueRowName is a default implementation of ComboRowGetEnumValueNameFunc to be used with (*ComboRow).SetForEnum(). If the enumeration has a nickname, it will return it, otherwise it will return its name.
func GetEnableAnimations ¶
GetEnableAnimations returns whether animations are enabled for that widget. This should be used when implementing an animated widget to know whether to animate it or not.
func Init ¶
func Init()
Init call this function just after initializing GTK, if you are using Application it means it must be called when the #GApplication::startup signal is emitted. If libhandy has already been initialized, the function will simply return.
This makes sure translations, types, themes, and icons for the Handy library are set up properly.
Types ¶
type ActionRow ¶
type ActionRow struct { PreferencesRow // Interfaces gtk.Actionable }
func (*ActionRow) GetActivatableWidget ¶
GetActivatableWidget gets the widget activated when a is activated.
func (*ActionRow) GetIconName ¶
GetIconName gets the icon name for a.
func (*ActionRow) GetSubtitle ¶
GetSubtitle gets the subtitle for a.
func (*ActionRow) GetSubtitleLines ¶
GetSubtitleLines gets the number of lines at the end of which the subtitle label will be ellipsized. If the value is 0, the number of lines won't be limited.
func (*ActionRow) GetTitleLines ¶
GetTitleLines gets the number of lines at the end of which the title label will be ellipsized. If the value is 0, the number of lines won't be limited.
func (*ActionRow) GetUseUnderline ¶
GetUseUnderline gets whether an embedded underline in the text of the title and subtitle labels indicates a mnemonic. See (*ActionRow).SetUseUnderline().
func (*ActionRow) SetActivatableWidget ¶
SetActivatableWidget sets the widget to activate when a is activated, either by clicking on it, by calling (*ActionRow).Activate(), or via mnemonics in the title or the subtitle. See the “use_underline” property to enable mnemonics.
The target widget will be activated by emitting the GtkWidget::mnemonic-activate signal on it.
func (*ActionRow) SetIconName ¶
SetIconName sets the icon name for a.
func (*ActionRow) SetSubtitle ¶
SetSubtitle sets the subtitle for a.
func (*ActionRow) SetSubtitleLines ¶
SetSubtitleLines sets the number of lines at the end of which the subtitle label will be ellipsized. If the value is 0, the number of lines won't be limited.
func (*ActionRow) SetTitleLines ¶
SetTitleLines sets the number of lines at the end of which the title label will be ellipsized. If the value is 0, the number of lines won't be limited.
func (*ActionRow) SetUseUnderline ¶
SetUseUnderline if true, an underline in the text of the title and subtitle labels indicates the next character should be used for the mnemonic accelerator key.
type ApplicationWindow ¶
type ApplicationWindow struct { gtk.ApplicationWindow // Interfaces glib.ActionGroup glib.ActionMap }
func ApplicationWindowNew ¶
func ApplicationWindowNew() *ApplicationWindow
ApplicationWindowNew creates a new ApplicationWindow.
type Avatar ¶
type Avatar struct {
gtk.DrawingArea
}
func (*Avatar) DrawToPixbuf ¶
DrawToPixbuf renders a into a pixbuf at size and scale_factor. This can be used to export the fallback avatar.
func (*Avatar) GetIconName ¶
GetIconName gets the name of the icon in the icon theme to use when the icon should be displayed.
func (*Avatar) GetShowInitials ¶
GetShowInitials returns whether initials are used for the fallback or the icon.
func (*Avatar) SetIconName ¶
SetIconName sets the name of the icon in the icon theme to use when the icon should be displayed. If no name is set, the avatar-default-symbolic icon will be used. If the name doesn't match a valid icon, it is an error and no icon will be displayed. If the icon theme is changed, the image will be updated automatically.
func (*Avatar) SetImageLoadFunc ¶
func (a *Avatar) SetImageLoadFunc(loadImage AvatarImageLoadFunc)
SetImageLoadFunc a callback which is called when the custom image need to be reloaded for some reason (e.g. scale-factor changes).
This method is deprecated since version 1.2.
func (*Avatar) SetShowInitials ¶
SetShowInitials sets whether the initials should be shown on the fallback avatar or the icon.
type AvatarImageLoadFunc ¶
AvatarImageLoadFunc the returned Pixbuf is expected to be square with width and height set to size. The image is cropped to a circle without any scaling or transformation.
type Carousel ¶
type Carousel struct { gtk.EventBox // Interfaces gtk.Orientable Swiper }
func (*Carousel) GetAllowLongSwipes ¶
GetAllowLongSwipes whether to allow swiping for more than one page at a time. If the value is false, each swipe can only move to the adjacent pages.
func (*Carousel) GetAllowMouseDrag ¶
GetAllowMouseDrag sets whether c can be dragged with mouse pointer
func (*Carousel) GetAnimationDuration ¶
GetAnimationDuration gets animation duration used by (*Carousel).ScrollTo().
func (*Carousel) GetInteractive ¶
GetInteractive gets whether c can be navigated.
func (*Carousel) GetPosition ¶
GetPosition gets current scroll position in c. It's unitless, 1 matches 1 page.
func (*Carousel) GetRevealDuration ¶
GetRevealDuration gets duration of the animation used when adding or removing pages in milliseconds.
func (*Carousel) GetSpacing ¶
GetSpacing gets spacing between pages in pixels.
func (*Carousel) Insert ¶
Insert inserts child into c at position position.
If position is -1, or larger than the number of pages, child will be appended to the end.
func (*Carousel) Reorder ¶
Reorder moves child into position position.
If position is -1, or larger than the number of pages, child will be moved to the end.
func (*Carousel) ScrollTo ¶
ScrollTo scrolls to widget position with an animation. Carousel:animation-duration property can be used for controlling the duration.
func (*Carousel) ScrollToFull ¶
ScrollToFull scrolls to widget position with an animation.
func (*Carousel) SetAllowLongSwipes ¶
SetAllowLongSwipes sets whether to allow swiping for more than one page at a time. If the value is false, each swipe can only move to the adjacent pages.
func (*Carousel) SetAllowMouseDrag ¶
SetAllowMouseDrag sets whether c can be dragged with mouse pointer. If allow_mouse_drag is false, dragging is only available on touch.
func (*Carousel) SetAnimationDuration ¶
SetAnimationDuration sets animation duration used by (*Carousel).ScrollTo().
func (*Carousel) SetInteractive ¶
SetInteractive sets whether c can be navigated. This can be used to temporarily disable a Carousel to only allow swiping in a certain state.
func (*Carousel) SetRevealDuration ¶
SetRevealDuration sets duration of the animation used when adding or removing pages in milliseconds.
func (*Carousel) SetSpacing ¶
SetSpacing sets spacing between pages in pixels.
type CarouselIndicatorDots ¶
type CarouselIndicatorDots struct { gtk.DrawingArea // Interfaces gtk.Orientable }
func CarouselIndicatorDotsNew ¶
func CarouselIndicatorDotsNew() *CarouselIndicatorDots
CarouselIndicatorDotsNew create a new CarouselIndicatorDots widget.
func (*CarouselIndicatorDots) GetCarousel ¶
func (c *CarouselIndicatorDots) GetCarousel() *Carousel
GetCarousel get the Carousel the indicator uses.
See: (*CarouselIndicatorDots).SetCarousel()
func (*CarouselIndicatorDots) SetCarousel ¶
func (c *CarouselIndicatorDots) SetCarousel(carousel *Carousel)
SetCarousel sets the Carousel to use.
type CarouselIndicatorLines ¶
type CarouselIndicatorLines struct { gtk.DrawingArea // Interfaces gtk.Orientable }
func CarouselIndicatorLinesNew ¶
func CarouselIndicatorLinesNew() *CarouselIndicatorLines
CarouselIndicatorLinesNew create a new CarouselIndicatorLines widget.
func (*CarouselIndicatorLines) GetCarousel ¶
func (c *CarouselIndicatorLines) GetCarousel() *Carousel
GetCarousel get the Carousel the indicator uses.
See: (*CarouselIndicatorLines).SetCarousel()
func (*CarouselIndicatorLines) SetCarousel ¶
func (c *CarouselIndicatorLines) SetCarousel(carousel *Carousel)
SetCarousel sets the Carousel to use.
type CenteringPolicy ¶
type CenteringPolicy int
const ( // CenteringPolicyLoose keep the title centered when possible CenteringPolicyLoose CenteringPolicy = 0 // CenteringPolicyStrict keep the title centered at all cost CenteringPolicyStrict CenteringPolicy = 1 )
type Clamp ¶
type Clamp struct { gtk.Bin // Interfaces gtk.Orientable }
func (*Clamp) GetMaximumSize ¶
GetMaximumSize gets the maximum size to allocate to the contained child. It is the width if c is horizontal, or the height if it is vertical.
func (*Clamp) GetTighteningThreshold ¶
GetTighteningThreshold gets the size starting from which the clamp will tighten its grip on the child.
func (*Clamp) SetMaximumSize ¶
SetMaximumSize sets the maximum size to allocate to the contained child. It is the width if c is horizontal, or the height if it is vertical.
func (*Clamp) SetTighteningThreshold ¶
SetTighteningThreshold sets the size starting from which the clamp will tighten its grip on the child.
type ComboRow ¶
type ComboRow struct { ActionRow // Interfaces gtk.Actionable }
func (*ComboRow) BindModel ¶
BindModel binds model to c.
If c was already bound to a model, that previous binding is destroyed.
The contents of c are cleared and then filled with widgets that represent items from model. c is updated whenever model changes. If model is nil, c is left empty.
func (*ComboRow) BindNameModel ¶
func (c *ComboRow) BindNameModel(model *glib.ListModel, getNameFunc ComboRowGetNameFunc)
BindNameModel binds model to c.
If c was already bound to a model, that previous binding is destroyed.
The contents of c are cleared and then filled with widgets that represent items from model. c is updated whenever model changes. If model is nil, c is left empty.
This is more convenient to use than (*ComboRow).BindModel() if you want to represent items of the model with names.
func (*ComboRow) GetSelectedIndex ¶
GetSelectedIndex gets the index of the selected item in its Model.
func (*ComboRow) GetUseSubtitle ¶
GetUseSubtitle gets whether the current value of c should be displayed as its subtitle.
func (*ComboRow) SetForEnum ¶
func (c *ComboRow) SetForEnum(enumType glib.Type, getNameFunc ComboRowGetEnumValueNameFunc)
SetForEnum creates a model for enum_type and binds it to c. The items of the model will be EnumValueObject objects.
If c was already bound to a model, that previous binding is destroyed.
The contents of c are cleared and then filled with widgets that represent items from model. c is updated whenever model changes. If model is nil, c is left empty.
This is more convenient to use than (*ComboRow).BindNameModel() if you want to represent values of an enumeration with names.
See EnumValueRowName().
func (*ComboRow) SetGetNameFunc ¶
func (c *ComboRow) SetGetNameFunc(getNameFunc ComboRowGetNameFunc)
SetGetNameFunc sets a closure to convert items into names. See HdyComboRow:use-subtitle.
func (*ComboRow) SetSelectedIndex ¶
SetSelectedIndex sets the index of the selected item in its Model.
func (*ComboRow) SetUseSubtitle ¶
SetUseSubtitle sets whether the current value of c should be displayed as its subtitle.
If true, you should not access HdyActionRow:subtitle.
type ComboRowGetEnumValueNameFunc ¶
type ComboRowGetEnumValueNameFunc func(value *EnumValueObject) string
ComboRowGetEnumValueNameFunc called for combo rows that are bound to an enumeration with (*ComboRow).SetForEnum() for each value from that enumeration.
type ComboRowGetNameFunc ¶
ComboRowGetNameFunc called for combo rows that are bound to a Model with (*ComboRow).BindNameModel() for each item that gets added to the model.
type Deck ¶
type Deck struct { gtk.Container // Interfaces gtk.Orientable Swiper }
func (*Deck) GetAdjacentChild ¶
func (d *Deck) GetAdjacentChild(direction NavigationDirection) gtk.IWidget
GetAdjacentChild gets the previous or next child, or nil if it doesn't exist. This will be the same widget (*Deck).Navigate() will navigate to.
func (*Deck) GetCanSwipeBack ¶
GetCanSwipeBack returns whether the Deck allows swiping to the previous child.
func (*Deck) GetCanSwipeForward ¶
GetCanSwipeForward returns whether the Deck allows swiping to the next child.
func (*Deck) GetChildByName ¶
GetChildByName finds the child of d with the name given as the argument. Returns nil if there is no child with this name.
func (*Deck) GetHomogeneous ¶
func (d *Deck) GetHomogeneous(orientation gtk.Orientation) bool
GetHomogeneous gets whether d is homogeneous for the given orientation. See (*Deck).SetHomogeneous().
func (*Deck) GetInterpolateSize ¶
GetInterpolateSize returns whether the Deck is set up to interpolate between the sizes of children on page switch.
func (*Deck) GetTransitionDuration ¶
GetTransitionDuration returns the amount of time (in milliseconds) that transitions between children in d will take.
func (*Deck) GetTransitionRunning ¶
GetTransitionRunning returns whether d is currently in a transition from one page to another.
func (*Deck) GetTransitionType ¶
func (d *Deck) GetTransitionType() DeckTransitionType
GetTransitionType gets the type of animation that will be used for transitions between children in d.
func (*Deck) GetVisibleChild ¶
GetVisibleChild gets the visible child widget.
func (*Deck) GetVisibleChildName ¶
GetVisibleChildName gets the name of the currently visible child widget.
func (*Deck) InsertChildAfter ¶
InsertChildAfter inserts child in the position after sibling in the list of children. If sibling is nil, insert child at the first position.
func (*Deck) Navigate ¶
func (d *Deck) Navigate(direction NavigationDirection) bool
Navigate switches to the previous or next child, similar to performing a swipe gesture to go in direction.
func (*Deck) ReorderChildAfter ¶
ReorderChildAfter moves child to the position after sibling in the list of children. If sibling is nil, move child to the first position.
func (*Deck) SetCanSwipeBack ¶
SetCanSwipeBack sets whether or not d allows switching to the previous child via a swipe gesture.
func (*Deck) SetCanSwipeForward ¶
SetCanSwipeForward sets whether or not d allows switching to the next child via a swipe gesture.
func (*Deck) SetHomogeneous ¶
func (d *Deck) SetHomogeneous(orientation gtk.Orientation, homogeneous bool)
SetHomogeneous sets the Deck to be homogeneous or not for the given orientation. If it is homogeneous, the Deck will request the same width or height for all its children depending on the orientation. If it isn't, the deck may change width or height when a different child becomes visible.
func (*Deck) SetInterpolateSize ¶
SetInterpolateSize sets whether or not d will interpolate its size when changing the visible child. If the Deck:interpolate-size property is set to true, d will interpolate its size between the current one and the one it'll take after changing the visible child, according to the set transition duration.
func (*Deck) SetTransitionDuration ¶
SetTransitionDuration sets the duration that transitions between children in d will take.
func (*Deck) SetTransitionType ¶
func (d *Deck) SetTransitionType(transition DeckTransitionType)
SetTransitionType sets the type of animation that will be used for transitions between children in d.
The transition type can be changed without problems at runtime, so it is possible to change the animation based on the child that is about to become current.
func (*Deck) SetVisibleChild ¶
SetVisibleChild makes visible_child visible using a transition determined by HdyDeck:transition-type and HdyDeck:transition-duration. The transition can be cancelled by the user, in which case visible child will change back to the previously visible child.
func (*Deck) SetVisibleChildName ¶
SetVisibleChildName makes the child with the name name visible.
See (*Deck).SetVisibleChild() for more details.
type DeckTransitionType ¶
type DeckTransitionType int
DeckTransitionType enumeration value describes the possible transitions between children in a Deck widget.
New values may be added to this enumeration over time.
const ( // DeckTransitionTypeOver cover the old page or uncover the new page, // sliding from or towards the end according to orientation, text direction // and children order DeckTransitionTypeOver DeckTransitionType = 0 // DeckTransitionTypeUnder uncover the new page or cover the old page, // sliding from or towards the start according to orientation, text // direction and children order DeckTransitionTypeUnder DeckTransitionType = 1 // DeckTransitionTypeSlide slide from left, right, up or down according to // the orientation, text direction and the children order DeckTransitionTypeSlide DeckTransitionType = 2 )
type EnumValueObject ¶
func (*EnumValueObject) GetName ¶
func (e *EnumValueObject) GetName() string
func (*EnumValueObject) GetNick ¶
func (e *EnumValueObject) GetNick() string
func (*EnumValueObject) GetValue ¶
func (e *EnumValueObject) GetValue() int
type ExpanderRow ¶
type ExpanderRow struct { PreferencesRow // Interfaces gtk.Actionable }
func (*ExpanderRow) AddAction ¶
func (e *ExpanderRow) AddAction(widget gtk.IWidget)
AddAction adds an action widget to e.
func (*ExpanderRow) AddPrefix ¶
func (e *ExpanderRow) AddPrefix(widget gtk.IWidget)
AddPrefix adds a prefix widget to e.
func (*ExpanderRow) GetEnableExpansion ¶
func (e *ExpanderRow) GetEnableExpansion() bool
GetEnableExpansion gets whether the expansion of e is enabled.
func (*ExpanderRow) GetExpanded ¶
func (e *ExpanderRow) GetExpanded() bool
func (*ExpanderRow) GetIconName ¶
func (e *ExpanderRow) GetIconName() string
GetIconName gets the icon name for e.
func (*ExpanderRow) GetShowEnableSwitch ¶
func (e *ExpanderRow) GetShowEnableSwitch() bool
GetShowEnableSwitch gets whether the switch enabling the expansion of e is visible.
func (*ExpanderRow) GetSubtitle ¶
func (e *ExpanderRow) GetSubtitle() string
GetSubtitle gets the subtitle for e.
func (*ExpanderRow) GetUseUnderline ¶
func (e *ExpanderRow) GetUseUnderline() bool
GetUseUnderline gets whether an embedded underline in the text of the title and subtitle labels indicates a mnemonic. See (*ExpanderRow).SetUseUnderline().
func (*ExpanderRow) SetEnableExpansion ¶
func (e *ExpanderRow) SetEnableExpansion(enableExpansion bool)
SetEnableExpansion sets whether the expansion of e is enabled.
func (*ExpanderRow) SetExpanded ¶
func (e *ExpanderRow) SetExpanded(expanded bool)
func (*ExpanderRow) SetIconName ¶
func (e *ExpanderRow) SetIconName(iconName string)
SetIconName sets the icon name for e.
func (*ExpanderRow) SetShowEnableSwitch ¶
func (e *ExpanderRow) SetShowEnableSwitch(showEnableSwitch bool)
SetShowEnableSwitch sets whether the switch enabling the expansion of e is visible.
func (*ExpanderRow) SetSubtitle ¶
func (e *ExpanderRow) SetSubtitle(subtitle string)
SetSubtitle sets the subtitle for e.
func (*ExpanderRow) SetUseUnderline ¶
func (e *ExpanderRow) SetUseUnderline(useUnderline bool)
SetUseUnderline if true, an underline in the text of the title and subtitle labels indicates the next character should be used for the mnemonic accelerator key.
type Flap ¶
type Flap struct { gtk.Container // Interfaces gtk.Orientable Swiper }
func (*Flap) GetContent ¶
GetContent gets the content widget for f
func (*Flap) GetFlapPosition ¶
GetFlapPosition gets the flap position for f.
func (*Flap) GetFoldDuration ¶
GetFoldDuration returns the amount of time (in milliseconds) that fold transitions in f will take.
func (*Flap) GetFoldPolicy ¶
func (f *Flap) GetFoldPolicy() FlapFoldPolicy
GetFoldPolicy gets the current fold policy of f. See (*Flap).SetFoldPolicy().
func (*Flap) GetRevealDuration ¶
GetRevealDuration returns the amount of time (in milliseconds) that reveal transitions in f will take.
func (*Flap) GetRevealFlap ¶
GetRevealFlap gets whether the flap widget is revealed for f.
func (*Flap) GetRevealProgress ¶
GetRevealProgress gets the current reveal transition progress for f. 0 means fully hidden, 1 means fully revealed. See Flap:reveal-flap.
func (*Flap) GetSeparator ¶
GetSeparator gets the separator widget for f.
func (*Flap) GetSwipeToClose ¶
GetSwipeToClose gets whether f can be closed with a swipe gesture.
func (*Flap) GetSwipeToOpen ¶
GetSwipeToOpen gets whether f can be opened with a swipe gesture.
func (*Flap) GetTransitionType ¶
func (f *Flap) GetTransitionType() FlapTransitionType
GetTransitionType gets the type of animation that will be used for reveal and fold transitions in f.
func (*Flap) SetContent ¶
SetContent sets the content widget for f, always displayed when unfolded, and partially visible when folded.
func (*Flap) SetFlap ¶
SetFlap sets the flap widget for f, only visible when Flap:reveal-progress is greater than 0.
func (*Flap) SetFlapPosition ¶
SetFlapPosition sets the flap position for f. If GTK_PACK_START, the flap is displayed before the content, if GTK_PACK_END, it's displayed after the content.
func (*Flap) SetFoldDuration ¶
SetFoldDuration sets the duration that fold transitions in f will take.
func (*Flap) SetFoldPolicy ¶
func (f *Flap) SetFoldPolicy(policy FlapFoldPolicy)
SetFoldPolicy sets the current fold policy for f. See FlapFoldPolicy for available policies.
func (*Flap) SetLocked ¶
SetLocked sets whether f is locked.
If false, folding f when the flap is revealed automatically closes it, and unfolding it when the flap is not revealed opens it. If true, Flap:reveal-flap value never changes on its own.
func (*Flap) SetModal ¶
SetModal sets whether the f can be closed with a click.
If modal is true, clicking the content widget while flap is revealed, or pressing Escape key, will close the flap. If false, clicks are passed through to the content widget.
func (*Flap) SetRevealDuration ¶
SetRevealDuration sets the duration that reveal transitions in f will take.
func (*Flap) SetRevealFlap ¶
SetRevealFlap sets whether the flap widget is revealed for f.
func (*Flap) SetSeparator ¶
SetSeparator sets the separator widget for f, displayed between content and flap when there's no shadow to display. When exactly it's visible depends on the Flap:transition-type value. If nil, no separator will be used.
func (*Flap) SetSwipeToClose ¶
SetSwipeToClose sets whether f can be closed with a swipe gesture.
The area that can be swiped depends on the Flap:transition-type value.
func (*Flap) SetSwipeToOpen ¶
SetSwipeToOpen sets whether f can be opened with a swipe gesture.
The area that can be swiped depends on the Flap:transition-type value.
func (*Flap) SetTransitionType ¶
func (f *Flap) SetTransitionType(transitionType FlapTransitionType)
SetTransitionType sets the type of animation that will be used for reveal and fold transitions in f.
Flap:flap is transparent by default, which means the content will be seen through it with HDY_FLAP_TRANSITION_TYPE_OVER transitions; add the .background style class to it if this is unwanted.
type FlapFoldPolicy ¶
type FlapFoldPolicy int
FlapFoldPolicy these enumeration values describe the possible folding behavior in a Flap widget.
const ( // FlapFoldPolicyNever disable folding, the flap cannot reach narrow // sizes. FlapFoldPolicyNever FlapFoldPolicy = 0 // FlapFoldPolicyAlways keep the flap always folded. FlapFoldPolicyAlways FlapFoldPolicy = 1 // FlapFoldPolicyAuto fold and unfold the flap based on available space. FlapFoldPolicyAuto FlapFoldPolicy = 2 )
type FlapTransitionType ¶
type FlapTransitionType int
FlapTransitionType these enumeration values describe the possible transitions between children in a Flap widget, as well as which areas can be swiped via Flap:swipe-to-open and Flap:swipe-to-close.
New values may be added to this enum over time.
const ( // FlapTransitionTypeOver the flap slides over the content, which is // dimmed. When folded, only the flap can be swiped. FlapTransitionTypeOver FlapTransitionType = 0 // FlapTransitionTypeUnder the content slides over the flap. Only the // content can be swiped. FlapTransitionTypeUnder FlapTransitionType = 1 // FlapTransitionTypeSlide the flap slides offscreen when hidden, neither // the flap nor content overlap each other. Both widgets can be swiped. FlapTransitionTypeSlide FlapTransitionType = 2 )
type HeaderBar ¶
func (*HeaderBar) GetCenteringPolicy ¶
func (h *HeaderBar) GetCenteringPolicy() CenteringPolicy
GetCenteringPolicy gets the policy h follows to horizontally align its center widget.
func (*HeaderBar) GetCustomTitle ¶
GetCustomTitle retrieves the custom title widget of the header. See (*HeaderBar).SetCustomTitle().
func (*HeaderBar) GetDecorationLayout ¶
GetDecorationLayout gets the decoration layout set with (*HeaderBar).SetDecorationLayout().
func (*HeaderBar) GetHasSubtitle ¶
GetHasSubtitle retrieves whether the header bar reserves space for a subtitle, regardless if one is currently set or not.
func (*HeaderBar) GetInterpolateSize ¶
GetInterpolateSize gets whether h should interpolate its size on visible child change.
See (*HeaderBar).SetInterpolateSize().
func (*HeaderBar) GetShowCloseButton ¶
GetShowCloseButton returns whether this header bar shows the standard window decorations.
func (*HeaderBar) GetSubtitle ¶
GetSubtitle retrieves the subtitle of the header. See (*HeaderBar).SetSubtitle().
func (*HeaderBar) GetTitle ¶
GetTitle retrieves the title of the header. See (*HeaderBar).SetTitle().
func (*HeaderBar) GetTransitionDuration ¶
GetTransitionDuration returns the amount of time (in milliseconds) that transitions between pages in h will take.
func (*HeaderBar) GetTransitionRunning ¶
GetTransitionRunning returns whether the h is currently in a transition from one page to another.
func (*HeaderBar) PackStart ¶
PackStart adds child to h:, packed with reference to the start of the h:.
func (*HeaderBar) SetCenteringPolicy ¶
func (h *HeaderBar) SetCenteringPolicy(centeringPolicy CenteringPolicy)
SetCenteringPolicy sets the policy h must follow to horizontally align its center widget.
func (*HeaderBar) SetCustomTitle ¶
SetCustomTitle sets a custom title for the HeaderBar.
The title should help a user identify the current view. This supersedes any title set by (*HeaderBar).SetTitle() or (*HeaderBar).SetSubtitle(). To achieve the same style as the builtin title and subtitle, use the “title” and “subtitle” style classes.
You should set the custom title to nil, for the header title label to be visible again.
func (*HeaderBar) SetDecorationLayout ¶
SetDecorationLayout sets the decoration layout for this header bar, overriding the Settings:gtk-decoration-layout setting.
There can be valid reasons for overriding the setting, such as a header bar design that does not allow for buttons to take room on the right, or only offers room for a single close button. Split header bars are another example for overriding the setting.
The format of the string is button names, separated by commas. A colon separates the buttons that should appear on the left from those on the right. Recognized button names are minimize, maximize, close, icon (the window icon) and menu (a menu button for the fallback app menu).
For example, “menu:minimize,maximize,close” specifies a menu on the left, and minimize, maximize and close buttons on the right.
func (*HeaderBar) SetHasSubtitle ¶
SetHasSubtitle sets whether the header bar should reserve space for a subtitle, even if none is currently set.
func (*HeaderBar) SetInterpolateSize ¶
SetInterpolateSize sets whether or not h will interpolate the size of its opposing orientation when changing the visible child. If true, h will interpolate its size between the one of the previous visible child and the one of the new visible child, according to the set transition duration and the orientation, e.g. if h is horizontal, it will interpolate the its height.
func (*HeaderBar) SetShowCloseButton ¶
SetShowCloseButton sets whether this header bar shows the standard window decorations, including close, maximize, and minimize.
func (*HeaderBar) SetSubtitle ¶
SetSubtitle sets the subtitle of the HeaderBar. The title should give a user an additional detail to help them identify the current view.
Note that HdyHeaderBar by default reserves room for the subtitle, even if none is currently set. If this is not desired, set the HeaderBar:has-subtitle property to false.
func (*HeaderBar) SetTitle ¶
SetTitle sets the title of the HeaderBar. The title should help a user identify the current view. A good title should not include the application name.
func (*HeaderBar) SetTransitionDuration ¶
SetTransitionDuration sets the duration that transitions between pages in h will take.
type HeaderGroup ¶
func (*HeaderGroup) AddGtkHeaderBar ¶
func (h *HeaderGroup) AddGtkHeaderBar(headerBar *gtk.HeaderBar)
AddGtkHeaderBar adds header_bar to h. When the widget is destroyed or no longer referenced elsewhere, it will be removed from the header group.
func (*HeaderGroup) AddHeaderBar ¶
func (h *HeaderGroup) AddHeaderBar(headerBar *HeaderBar)
AddHeaderBar adds header_bar to h. When the widget is destroyed or no longer referenced elsewhere, it will be removed from the header group.
func (*HeaderGroup) AddHeaderGroup ¶
func (h *HeaderGroup) AddHeaderGroup(headerGroup *HeaderGroup)
AddHeaderGroup adds header_group to h. When the nested group is no longer referenced elsewhere, it will be removed from the header group.
func (*HeaderGroup) GetChildren ¶
func (h *HeaderGroup) GetChildren() *glib.SList
GetChildren returns the list of children associated with h.
func (*HeaderGroup) GetDecorateAll ¶
func (h *HeaderGroup) GetDecorateAll() bool
GetDecorateAll gets whether the elements of the group should all receive the full decoration.
func (*HeaderGroup) RemoveChild ¶
func (h *HeaderGroup) RemoveChild(child *HeaderGroupChild)
RemoveChild removes child from h.
func (*HeaderGroup) RemoveGtkHeaderBar ¶
func (h *HeaderGroup) RemoveGtkHeaderBar(headerBar *gtk.HeaderBar)
RemoveGtkHeaderBar removes header_bar from h.
func (*HeaderGroup) RemoveHeaderBar ¶
func (h *HeaderGroup) RemoveHeaderBar(headerBar *HeaderBar)
RemoveHeaderBar removes header_bar from h.
func (*HeaderGroup) RemoveHeaderGroup ¶
func (h *HeaderGroup) RemoveHeaderGroup(headerGroup *HeaderGroup)
RemoveHeaderGroup removes a nested HeaderGroup from a HeaderGroup
func (*HeaderGroup) SetDecorateAll ¶
func (h *HeaderGroup) SetDecorateAll(decorateAll bool)
SetDecorateAll sets whether the elements of the group should all receive the full decoration.
type HeaderGroupChild ¶
func (*HeaderGroupChild) GetChildType ¶
func (h *HeaderGroupChild) GetChildType() HeaderGroupChildType
GetChildType gets the child type.
func (*HeaderGroupChild) GetGtkHeaderBar ¶
func (h *HeaderGroupChild) GetGtkHeaderBar() *gtk.HeaderBar
GetGtkHeaderBar gets the child HeaderBar. Use (*HeaderGroupChild).GetChildType() to check the child type.
func (*HeaderGroupChild) GetHeaderBar ¶
func (h *HeaderGroupChild) GetHeaderBar() *HeaderBar
GetHeaderBar gets the child HeaderBar. Use (*HeaderGroupChild).GetChildType() to check the child type.
func (*HeaderGroupChild) GetHeaderGroup ¶
func (h *HeaderGroupChild) GetHeaderGroup() *HeaderGroup
GetHeaderGroup gets the child HeaderGroup. Use (*HeaderGroupChild).GetChildType() to check the child type.
type HeaderGroupChildType ¶
type HeaderGroupChildType int
HeaderGroupChildType enumeration value describes the child types handled by HeaderGroup.
New values may be added to this enumeration over time.
const ( // HeaderGroupChildTypeHeaderBar the child is a HeaderBar HeaderGroupChildTypeHeaderBar HeaderGroupChildType = 0 // HeaderGroupChildTypeGtkHeaderBar the child is a HeaderBar HeaderGroupChildTypeGtkHeaderBar HeaderGroupChildType = 1 // HeaderGroupChildTypeHeaderGroup the child is a HeaderGroup HeaderGroupChildTypeHeaderGroup HeaderGroupChildType = 2 )
type Keypad ¶
func (*Keypad) GetColumnSpacing ¶
GetColumnSpacing returns the amount of space between the columns of k.
func (*Keypad) GetEndAction ¶
GetEndAction returns the widget for the lower right corner (or left, in RTL locales) of k.
func (*Keypad) GetLettersVisible ¶
GetLettersVisible returns whether k should display the standard letters below the digits on its buttons.
func (*Keypad) GetRowSpacing ¶
GetRowSpacing returns the amount of space between the rows of k.
func (*Keypad) GetStartAction ¶
GetStartAction returns the widget for the lower left corner (or right, in RTL locales) of k.
func (*Keypad) GetSymbolsVisible ¶
GetSymbolsVisible returns whether k should display the standard letters below the digits on its buttons.
Returns Whether k should display the hash and asterisk buttons, and should display the plus symbol at the bottom of its 0 button.
func (*Keypad) SetColumnSpacing ¶
SetColumnSpacing sets the amount of space between columns of k.
func (*Keypad) SetEndAction ¶
SetEndAction sets the widget for the lower right corner (or left, in RTL locales) of k.
func (*Keypad) SetEntry ¶
SetEntry binds entry to k and blocks any input which wouldn't be possible to type with with the keypad.
func (*Keypad) SetLettersVisible ¶
SetLettersVisible sets whether k should display the standard letters below the digits on its buttons.
func (*Keypad) SetRowSpacing ¶
SetRowSpacing sets the amount of space between rows of k.
func (*Keypad) SetStartAction ¶
SetStartAction sets the widget for the lower left corner (or right, in RTL locales) of k.
func (*Keypad) SetSymbolsVisible ¶
SetSymbolsVisible sets whether k should display the hash and asterisk buttons, and should display the plus symbol at the bottom of its 0 button.
type Leaflet ¶
type Leaflet struct { gtk.Container // Interfaces gtk.Orientable Swiper }
func (*Leaflet) GetAdjacentChild ¶
func (l *Leaflet) GetAdjacentChild(direction NavigationDirection) gtk.IWidget
GetAdjacentChild gets the previous or next child that doesn't have 'navigatable' child property set to false, or nil if it doesn't exist. This will be the same widget (*Leaflet).Navigate() will navigate to.
func (*Leaflet) GetCanSwipeBack ¶
GetCanSwipeBack returns whether the Leaflet allows swiping to the previous child.
func (*Leaflet) GetCanSwipeForward ¶
GetCanSwipeForward returns whether the Leaflet allows swiping to the next child.
func (*Leaflet) GetChildByName ¶
GetChildByName finds the child of l with the name given as the argument. Returns nil if there is no child with this name.
func (*Leaflet) GetChildTransitionDuration ¶
GetChildTransitionDuration returns the amount of time (in milliseconds) that transitions between children in l will take.
func (*Leaflet) GetChildTransitionRunning ¶
GetChildTransitionRunning returns whether l is currently in a transition from one page to another.
func (*Leaflet) GetHomogeneous ¶
func (l *Leaflet) GetHomogeneous(folded bool, orientation gtk.Orientation) bool
GetHomogeneous gets whether l is homogeneous for the given fold and orientation. See (*Leaflet).SetHomogeneous().
func (*Leaflet) GetInterpolateSize ¶
GetInterpolateSize returns whether the Leaflet is set up to interpolate between the sizes of children on page switch.
func (*Leaflet) GetModeTransitionDuration ¶
GetModeTransitionDuration returns the amount of time (in milliseconds) that transitions between modes in l will take.
func (*Leaflet) GetTransitionType ¶
func (l *Leaflet) GetTransitionType() LeafletTransitionType
GetTransitionType gets the type of animation that will be used for transitions between modes and children in l.
func (*Leaflet) GetVisibleChild ¶
GetVisibleChild gets the visible child widget.
func (*Leaflet) GetVisibleChildName ¶
GetVisibleChildName gets the name of the currently visible child widget.
func (*Leaflet) InsertChildAfter ¶
InsertChildAfter inserts child in the position after sibling in the list of children. If sibling is nil, insert child at the first position.
func (*Leaflet) Navigate ¶
func (l *Leaflet) Navigate(direction NavigationDirection) bool
Navigate switches to the previous or next child that doesn't have 'navigatable' child property set to false, similar to performing a swipe gesture to go in direction.
func (*Leaflet) ReorderChildAfter ¶
ReorderChildAfter moves child to the position after sibling in the list of children. If sibling is nil, move child to the first position.
func (*Leaflet) SetCanSwipeBack ¶
SetCanSwipeBack sets whether or not l allows switching to the previous child that has 'navigatable' child property set to true via a swipe gesture
func (*Leaflet) SetCanSwipeForward ¶
SetCanSwipeForward sets whether or not l allows switching to the next child that has 'navigatable' child property set to true via a swipe gesture.
func (*Leaflet) SetChildTransitionDuration ¶
SetChildTransitionDuration sets the duration that transitions between children in l will take.
func (*Leaflet) SetHomogeneous ¶
func (l *Leaflet) SetHomogeneous(folded bool, orientation gtk.Orientation, homogeneous bool)
SetHomogeneous sets the Leaflet to be homogeneous or not for the given fold and orientation. If it is homogeneous, the Leaflet will request the same width or height for all its children depending on the orientation. If it isn't and it is folded, the leaflet may change width or height when a different child becomes visible.
func (*Leaflet) SetInterpolateSize ¶
SetInterpolateSize sets whether or not l will interpolate its size when changing the visible child. If the Leaflet:interpolate-size property is set to true, l will interpolate its size between the current one and the one it'll take after changing the visible child, according to the set transition duration.
func (*Leaflet) SetModeTransitionDuration ¶
SetModeTransitionDuration sets the duration that transitions between modes in l will take.
func (*Leaflet) SetTransitionType ¶
func (l *Leaflet) SetTransitionType(transition LeafletTransitionType)
SetTransitionType sets the type of animation that will be used for transitions between modes and children in l.
The transition type can be changed without problems at runtime, so it is possible to change the animation based on the mode or child that is about to become current.
func (*Leaflet) SetVisibleChild ¶
SetVisibleChild makes visible_child visible using a transition determined by HdyLeaflet:transition-type and HdyLeaflet:child-transition-duration. The transition can be cancelled by the user, in which case visible child will change back to the previously visible child.
func (*Leaflet) SetVisibleChildName ¶
SetVisibleChildName makes the child with the name name visible.
See (*Leaflet).SetVisibleChild() for more details.
type LeafletTransitionType ¶
type LeafletTransitionType int
LeafletTransitionType enumeration value describes the possible transitions between modes and children in a Leaflet widget.
New values may be added to this enumeration over time.
const ( // LeafletTransitionTypeOver cover the old page or uncover the new page, // sliding from or towards the end according to orientation, text direction // and children order LeafletTransitionTypeOver LeafletTransitionType = 0 // LeafletTransitionTypeUnder uncover the new page or cover the old page, // sliding from or towards the start according to orientation, text // direction and children order LeafletTransitionTypeUnder LeafletTransitionType = 1 // LeafletTransitionTypeSlide slide from left, right, up or down according // to the orientation, text direction and the children order LeafletTransitionTypeSlide LeafletTransitionType = 2 )
type NavigationDirection ¶
type NavigationDirection int
NavigationDirection represents direction of a swipe navigation gesture in Deck and Leaflet.
const ( // orientation and text direction NavigationDirectionBack NavigationDirection = 0 // orientation and text direction NavigationDirectionForward NavigationDirection = 1 )
type PreferencesGroup ¶
func PreferencesGroupNew ¶
func PreferencesGroupNew() *PreferencesGroup
PreferencesGroupNew creates a new PreferencesGroup.
func (*PreferencesGroup) GetDescription ¶
func (p *PreferencesGroup) GetDescription() string
func (*PreferencesGroup) GetTitle ¶
func (p *PreferencesGroup) GetTitle() string
GetTitle gets the title of p.
func (*PreferencesGroup) SetDescription ¶
func (p *PreferencesGroup) SetDescription(description string)
SetDescription sets the description for p.
func (*PreferencesGroup) SetTitle ¶
func (p *PreferencesGroup) SetTitle(title string)
SetTitle sets the title for p.
type PreferencesPage ¶
func PreferencesPageNew ¶
func PreferencesPageNew() *PreferencesPage
PreferencesPageNew creates a new PreferencesPage.
func (*PreferencesPage) GetIconName ¶
func (p *PreferencesPage) GetIconName() string
GetIconName gets the icon name for p, or nil.
func (*PreferencesPage) GetTitle ¶
func (p *PreferencesPage) GetTitle() string
GetTitle gets the title of p, or nil.
func (*PreferencesPage) SetIconName ¶
func (p *PreferencesPage) SetIconName(iconName string)
SetIconName sets the icon name for p.
func (*PreferencesPage) SetTitle ¶
func (p *PreferencesPage) SetTitle(title string)
SetTitle sets the title of p.
type PreferencesRow ¶
type PreferencesRow struct { gtk.ListBoxRow // Interfaces gtk.Actionable }
func PreferencesRowNew ¶
func PreferencesRowNew() *PreferencesRow
PreferencesRowNew creates a new PreferencesRow.
func (*PreferencesRow) GetTitle ¶
func (p *PreferencesRow) GetTitle() string
GetTitle gets the title of the preference represented by p.
func (*PreferencesRow) GetUseUnderline ¶
func (p *PreferencesRow) GetUseUnderline() bool
GetUseUnderline gets whether an embedded underline in the text of the title indicates a mnemonic. See (*PreferencesRow).SetUseUnderline().
func (*PreferencesRow) SetTitle ¶
func (p *PreferencesRow) SetTitle(title string)
SetTitle sets the title of the preference represented by p.
func (*PreferencesRow) SetUseUnderline ¶
func (p *PreferencesRow) SetUseUnderline(useUnderline bool)
SetUseUnderline if true, an underline in the text of the title indicates the next character should be used for the mnemonic accelerator key.
type PreferencesWindow ¶
type PreferencesWindow struct {
Window
}
func PreferencesWindowNew ¶
func PreferencesWindowNew() *PreferencesWindow
PreferencesWindowNew creates a new PreferencesWindow.
func (*PreferencesWindow) CloseSubpage ¶
func (p *PreferencesWindow) CloseSubpage()
CloseSubpage closes the current subpage to return back to the preferences, if there is no presented subpage, this does nothing.
func (*PreferencesWindow) GetCanSwipeBack ¶
func (p *PreferencesWindow) GetCanSwipeBack() bool
GetCanSwipeBack returns whether or not p allows switching from a subpage to the preferences via a swipe gesture.
func (*PreferencesWindow) GetSearchEnabled ¶
func (p *PreferencesWindow) GetSearchEnabled() bool
GetSearchEnabled gets whether search is enabled for p.
func (*PreferencesWindow) PresentSubpage ¶
func (p *PreferencesWindow) PresentSubpage(subpage gtk.IWidget)
PresentSubpage sets subpage as the window's subpage and present it. The transition can be cancelled by the user, in which case visible child will change back to the previously visible child.
func (*PreferencesWindow) SetCanSwipeBack ¶
func (p *PreferencesWindow) SetCanSwipeBack(canSwipeBack bool)
SetCanSwipeBack sets whether or not p allows switching from a subpage to the preferences via a swipe gesture.
func (*PreferencesWindow) SetSearchEnabled ¶
func (p *PreferencesWindow) SetSearchEnabled(searchEnabled bool)
SetSearchEnabled sets whether search is enabled for p.
type SearchBar ¶
func SearchBarNew ¶
func SearchBarNew() *SearchBar
SearchBarNew creates a SearchBar. You will need to tell it about which widget is going to be your text entry using (*SearchBar).ConnectEntry().
func (*SearchBar) ConnectEntry ¶
ConnectEntry connects the Entry widget passed as the one to be used in this search bar. The entry should be a descendant of the search bar. This is only required if the entry isn’t the direct child of the search bar (as in our main example).
func (*SearchBar) GetSearchMode ¶
GetSearchMode returns whether the search mode is on or off.
func (*SearchBar) GetShowCloseButton ¶
GetShowCloseButton returns whether the close button is shown.
func (*SearchBar) HandleEvent ¶
HandleEvent function should be called when the top-level window which contains the search bar received a key event.
If the key event is handled by the search bar, the bar will be shown, the entry populated with the entered text and GDK_EVENT_STOP will be returned. The caller should ensure that events are not propagated further.
If no entry has been connected to the search bar, using (*SearchBar).ConnectEntry(), this function will return immediately with a warning.
Showing the search bar on key presses
static gboolean on_key_press_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) { HdySearchBar *bar = HDY_SEARCH_BAR (user_data); return hdy_search_bar_handle_event (self, event); } static void create_toplevel (void) { GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL); GtkWindow *search_bar = hdy_search_bar_new (); // Add more widgets to the window... g_signal_connect (window, "key-press-event", G_CALLBACK (on_key_press_event), search_bar); }
func (*SearchBar) SetSearchMode ¶
SetSearchMode switches the search mode on or off.
func (*SearchBar) SetShowCloseButton ¶
SetShowCloseButton shows or hides the close button. Applications that already have a “search” toggle button should not show a close button in their search bar, as it duplicates the role of the toggle button.
type Squeezer ¶
type Squeezer struct { gtk.Container // Interfaces gtk.Orientable }
func (*Squeezer) GetChildEnabled ¶
GetChildEnabled gets whether child is enabled.
See (*Squeezer).SetChildEnabled().
func (*Squeezer) GetHomogeneous ¶
GetHomogeneous gets whether s is homogeneous.
See (*Squeezer).SetHomogeneous().
func (*Squeezer) GetInterpolateSize ¶
GetInterpolateSize gets whether s should interpolate its size on visible child change.
See (*Squeezer).SetInterpolateSize().
func (*Squeezer) GetTransitionDuration ¶
GetTransitionDuration gets the amount of time (in milliseconds) that transitions between children in s will take.
func (*Squeezer) GetTransitionRunning ¶
GetTransitionRunning gets whether s is currently in a transition from one child to another.
func (*Squeezer) GetTransitionType ¶
func (s *Squeezer) GetTransitionType() SqueezerTransitionType
GetTransitionType gets the type of animation that will be used for transitions between children in s.
func (*Squeezer) GetVisibleChild ¶
GetVisibleChild gets the currently visible child of s, or nil if there are no visible children.
func (*Squeezer) SetChildEnabled ¶
SetChildEnabled make s enable or disable child. If a child is disabled, it will be ignored when looking for the child fitting the available size best. This allows to programmatically and prematurely hide a child of s even if it fits in the available space.
This can be used e.g. to ensure a certain child is hidden below a certain window width, or any other constraint you find suitable.
func (*Squeezer) SetHomogeneous ¶
SetHomogeneous sets s to be homogeneous or not. If it is homogeneous, s will request the same size for all its children for its opposite orientation, e.g. if s is oriented horizontally and is homogeneous, it will request the same height for all its children. If it isn't, s may change size when a different child becomes visible.
func (*Squeezer) SetInterpolateSize ¶
SetInterpolateSize sets whether or not s will interpolate the size of its opposing orientation when changing the visible child. If true, s will interpolate its size between the one of the previous visible child and the one of the new visible child, according to the set transition duration and the orientation, e.g. if s is horizontal, it will interpolate the its height.
func (*Squeezer) SetTransitionDuration ¶
SetTransitionDuration sets the duration that transitions between children in s will take.
func (*Squeezer) SetTransitionType ¶
func (s *Squeezer) SetTransitionType(transition SqueezerTransitionType)
SetTransitionType sets the type of animation that will be used for transitions between children in s. Available types include various kinds of fades and slides.
The transition type can be changed without problems at runtime, so it is possible to change the animation based on the child that is about to become current.
type SqueezerTransitionType ¶
type SqueezerTransitionType int
SqueezerTransitionType these enumeration values describe the possible transitions between children in a Squeezer widget.
const ( // SqueezerTransitionTypeNone no transition SqueezerTransitionTypeNone SqueezerTransitionType = 0 // SqueezerTransitionTypeCrossfade a cross-fade SqueezerTransitionTypeCrossfade SqueezerTransitionType = 1 )
type StatusPage ¶
func (*StatusPage) GetDescription ¶
func (s *StatusPage) GetDescription() string
GetDescription gets the description for s.
func (*StatusPage) GetIconName ¶
func (s *StatusPage) GetIconName() string
GetIconName gets the icon name for s.
func (*StatusPage) SetDescription ¶
func (s *StatusPage) SetDescription(description string)
SetDescription sets the description for s.
func (*StatusPage) SetIconName ¶
func (s *StatusPage) SetIconName(iconName string)
SetIconName sets the icon name for s.
func (*StatusPage) SetTitle ¶
func (s *StatusPage) SetTitle(title string)
SetTitle sets the title for s.
type SwipeGroup ¶
func (*SwipeGroup) AddSwipeable ¶
func (s *SwipeGroup) AddSwipeable(swipeable Swiper)
AddSwipeable when the widget is destroyed or no longer referenced elsewhere, it will be removed from the swipe group.
func (*SwipeGroup) GetSwipeables ¶
func (s *SwipeGroup) GetSwipeables() *glib.SList
GetSwipeables returns the list of swipeables associated with s.
func (*SwipeGroup) RemoveSwipeable ¶
func (s *SwipeGroup) RemoveSwipeable(swipeable Swiper)
RemoveSwipeable removes a widget from a SwipeGroup.
type SwipeTracker ¶
type SwipeTracker struct { *glib.Object // Interfaces gtk.Orientable }
func SwipeTrackerNew ¶
func SwipeTrackerNew(swipeable Swipeable) *SwipeTracker
SwipeTrackerNew create a new SwipeTracker object on widget.
func (*SwipeTracker) GetAllowLongSwipes ¶
func (s *SwipeTracker) GetAllowLongSwipes() bool
GetAllowLongSwipes whether to allow swiping for more than one snap point at a time. If the value is false, each swipe can only move to the adjacent snap points.
func (*SwipeTracker) GetAllowMouseDrag ¶
func (s *SwipeTracker) GetAllowMouseDrag() bool
GetAllowMouseDrag get whether s can be dragged with mouse pointer.
func (*SwipeTracker) GetEnabled ¶
func (s *SwipeTracker) GetEnabled() bool
GetEnabled get whether s is enabled. When it's not enabled, no events will be processed. Generally widgets will want to expose this via a property.
func (*SwipeTracker) GetReversed ¶
func (s *SwipeTracker) GetReversed() bool
GetReversed get whether s is reversing the swipe direction.
func (*SwipeTracker) GetSwipeable ¶
func (s *SwipeTracker) GetSwipeable() Swiper
GetSwipeable get s's swipeable widget.
func (*SwipeTracker) SetAllowLongSwipes ¶
func (s *SwipeTracker) SetAllowLongSwipes(allowLongSwipes bool)
SetAllowLongSwipes sets whether to allow swiping for more than one snap point at a time. If the value is false, each swipe can only move to the adjacent snap points.
func (*SwipeTracker) SetAllowMouseDrag ¶
func (s *SwipeTracker) SetAllowMouseDrag(allowMouseDrag bool)
SetAllowMouseDrag set whether s can be dragged with mouse pointer. This should usually be false.
func (*SwipeTracker) SetEnabled ¶
func (s *SwipeTracker) SetEnabled(enabled bool)
SetEnabled set whether s is enabled. When it's not enabled, no events will be processed. Usually widgets will want to expose this via a property.
func (*SwipeTracker) SetReversed ¶
func (s *SwipeTracker) SetReversed(reversed bool)
SetReversed set whether to reverse the swipe direction. If s is horizontal, can be used for supporting RTL text direction.
func (*SwipeTracker) ShiftPosition ¶
func (s *SwipeTracker) ShiftPosition(delta float64)
ShiftPosition move the current progress value by delta. This can be used to adjust the current position if snap points move during the gesture.
type Swipeable ¶
type Swipeable struct {
Caster
}
func (*Swipeable) EmitChildSwitched ¶
EmitChildSwitched emits HdySwipeable::child-switched signal. This should be called when the widget switches visible child widget.
duration can be 0 if the child is switched without animation.
func (*Swipeable) GetCancelProgress ¶
GetCancelProgress gets the progress s will snap back to after the gesture is canceled.
func (*Swipeable) GetDistance ¶
GetDistance gets the swipe distance of s. This corresponds to how many pixels 1 unit represents.
func (*Swipeable) GetProgress ¶
GetProgress gets the current progress of s
func (*Swipeable) GetSwipeArea ¶
func (s *Swipeable) GetSwipeArea(navigationDirection NavigationDirection, isDrag bool, rect *gdk.Rectangle)
GetSwipeArea gets the area s can start a swipe from for the given direction and gesture type. This can be used to restrict swipes to only be possible from a certain area, for example, to only allow edge swipes, or to have a draggable element and ignore swipes elsewhere.
Swipe area is only considered for direct swipes (as in, not initiated by SwipeGroup).
If not implemented, the default implementation returns the allocation of s, allowing swipes from anywhere.
func (*Swipeable) GetSwipeTracker ¶
func (s *Swipeable) GetSwipeTracker() *SwipeTracker
GetSwipeTracker gets the SwipeTracker used by this swipeable widget.
func (*Swipeable) SwitchChild ¶
SwitchChild see HdySwipeable::child-switched.
type Swiper ¶
type Swiper interface { Caster // EmitChildSwitched emits HdySwipeable::child-switched signal. This should be // called when the widget switches visible child widget. // // duration can be 0 if the child is switched without animation. EmitChildSwitched(index uint, duration int64) // GetCancelProgress gets the progress Swiper will snap back to after the // gesture is canceled. GetCancelProgress() float64 // GetDistance gets the swipe distance of Swiper. This corresponds to how many // pixels 1 unit represents. GetDistance() float64 // GetProgress gets the current progress of Swiper GetProgress() float64 // GetSwipeArea gets the area Swiper can start a swipe from for the given // direction and gesture type. This can be used to restrict swipes to only be // possible from a certain area, for example, to only allow edge swipes, or to // have a draggable element and ignore swipes elsewhere. // // Swipe area is only considered for direct swipes (as in, not initiated by // SwipeGroup). // // If not implemented, the default implementation returns the allocation of // Swiper, allowing swipes from anywhere. GetSwipeArea(navigationDirection NavigationDirection, isDrag bool, rect *gdk.Rectangle) // GetSwipeTracker gets the SwipeTracker used by this swipeable widget. GetSwipeTracker() *SwipeTracker // SwitchChild see HdySwipeable::child-switched. SwitchChild(index uint, duration int64) }
type TabBar ¶
func (*TabBar) GetAutohide ¶
GetAutohide gets whether the tabs automatically hide, see (*TabBar).SetAutohide().
func (*TabBar) GetEndActionWidget ¶
GetEndActionWidget gets the widget shown after the tabs.
func (*TabBar) GetExpandTabs ¶
GetExpandTabs gets whether tabs should expand, see (*TabBar).SetExpandTabs().
func (*TabBar) GetInverted ¶
GetInverted gets whether tabs use inverted layout, see (*TabBar).SetInverted().
func (*TabBar) GetIsOverflowing ¶
GetIsOverflowing gets whether t is overflowing.
func (*TabBar) GetStartActionWidget ¶
GetStartActionWidget gets the widget shown before the tabs.
func (*TabBar) GetTabsRevealed ¶
GetTabsRevealed gets the value of the TabBar:tabs-revealed property.
func (*TabBar) SetAutohide ¶
SetAutohide sets whether the tabs automatically hide.
If autohide is true, the tab bar disappears when the associated TabView has 0 or 1 tab, no pinned tabs, and no tab is being transferred.
Autohide is enabled by default.
See TabBar:tabs-revealed.
func (*TabBar) SetEndActionWidget ¶
SetEndActionWidget sets the widget to show after the tabs.
func (*TabBar) SetExpandTabs ¶
SetExpandTabs sets whether tabs should expand.
If expand_tabs is true, the tabs will always vary width filling the whole width when possible, otherwise tabs will always have the minimum possible size.
Expand is enabled by default.
func (*TabBar) SetInverted ¶
SetInverted sets whether tabs tabs use inverted layout.
If inverted is true, non-pinned tabs will have the close button at the beginning and the indicator at the end rather than the opposite.
func (*TabBar) SetStartActionWidget ¶
SetStartActionWidget sets the widget to show before the tabs.
type TabPage ¶
func (*TabPage) GetIndicatorActivatable ¶
GetIndicatorActivatable gets whether the indicator of t is activatable, see (*TabPage).SetIndicatorActivatable().
func (*TabPage) GetIndicatorIcon ¶
GetIndicatorIcon gets the indicator icon of t, see (*TabPage).SetIndicatorIcon().
func (*TabPage) GetLoading ¶
GetLoading gets whether t is loading, see (*TabPage).SetLoading().
func (*TabPage) GetNeedsAttention ¶
GetNeedsAttention gets whether t needs attention, see (*TabPage).SetNeedsAttention().
func (*TabPage) GetParent ¶
GetParent gets the parent page of t, or nil if the t does not have a parent.
See (*TabView).AddPage() and (*TabView).ClosePage().
func (*TabPage) GetSelected ¶
GetSelected gets whether t is selected. See (*TabView).SetSelectedPage().
func (*TabPage) GetTooltip ¶
GetTooltip gets the tooltip of t, see (*TabPage).SetTooltip().
func (*TabPage) SetIcon ¶
SetIcon sets the icon of t, displayed next to the title.
TabBar will not show the icon if TabPage:loading is set to true, or if t is pinned and TabPage:indicator-icon is set.
func (*TabPage) SetIndicatorActivatable ¶
SetIndicatorActivatable sets whether the indicator of t is activatable.
If set to true, TabView::indicator-activated will be emitted when the indicator is clicked.
If TabPage:indicator-icon is not set, does nothing.
func (*TabPage) SetIndicatorIcon ¶
SetIndicatorIcon sets the indicator icon of t.
A common use case is an audio or camera indicator in a web browser.
TabPage will show it at the beginning of the tab, alongside icon representing TabPage:icon or loading spinner.
If the page is pinned, the indicator will be shown instead of icon or spinner.
If TabPage:indicator-activatable is set to true, indicator icon can act as a button.
func (*TabPage) SetLoading ¶
SetLoading sets wether t is loading.
If set to true, TabBar will display a spinner in place of icon.
If t is pinned and TabPage:indicator-icon is set, the loading status will not be visible.
func (*TabPage) SetNeedsAttention ¶
SetNeedsAttention sets whether t needs attention.
TabBar will display a glow under the tab representing t if set to true. If the tab is not visible, the corresponding edge of the tab bar will be highlighted.
func (*TabPage) SetTitle ¶
SetTitle sets the title of t.
TabBar will display it in the center of the tab representing t unless it's pinned, and will use it as a tooltip unless TabPage:tooltip is set.
func (*TabPage) SetTooltip ¶
SetTooltip sets the tooltip of t, marked up with the Pango text markup language.
If not set, TabBar will use TabPage:title as a tooltip instead.
type TabView ¶
func (*TabView) AddPage ¶
AddPage adds child to t with parent as the parent.
This function can be used to automatically position new pages, and to select the correct page when this page is closed while being selected (see (*TabView).ClosePage()).
If parent is nil, this function is equivalent to (*TabView).Append().
func (*TabView) AppendPinned ¶
AppendPinned inserts child as the last pinned page.
func (*TabView) CloseOtherPages ¶
CloseOtherPages requests to close all pages other than page.
func (*TabView) ClosePage ¶
ClosePage requests to close page.
Calling this function will result in TabView::close-page signal being emitted for page. Closing the page can then be confirmed or denied via (*TabView).ClosePageFinish().
If the page is waiting for a (*TabView).ClosePageFinish() call, this function will do nothing.
The default handler for TabView::close-page will immediately confirm closing the page if it's non-pinned, or reject it if it's pinned. This behavior can be changed by registering your own handler for that signal.
If page was selected, another page will be selected instead:
If the TabPage:parent value is nil, the next page will be selected when possible, or if the page was already last, the previous page will be selected instead.
If it's not nil, the previous page will be selected if it's a descendant (possibly indirect) of the parent. If both the previous page and the parent are pinned, the parent will be selected instead.
func (*TabView) ClosePageFinish ¶
ClosePageFinish completes a (*TabView).ClosePage() call for page.
If confirm is true, page will be closed. If it's false, ite will be reverted to its previous state and (*TabView).ClosePage() can be called for it again.
This function should not be called unless a custom handler for TabView::close-page is used.
func (*TabView) ClosePagesAfter ¶
ClosePagesAfter requests to close all pages after page.
func (*TabView) ClosePagesBefore ¶
ClosePagesBefore requests to close all pages before page.
func (*TabView) GetDefaultIcon ¶
GetDefaultIcon gets default icon of t, see (*TabView).SetDefaultIcon().
func (*TabView) GetIsTransferringPage ¶
GetIsTransferringPage whether a page is being transferred.
Gets the value of TabView:is-transferring-page property.
func (*TabView) GetMenuModel ¶
GetMenuModel gets the tab context menu model for t, see (*TabView).SetMenuModel().
func (*TabView) GetNPinnedPages ¶
GetNPinnedPages gets the number of pinned pages in t.
See (*TabView).SetPagePinned().
func (*TabView) GetNthPage ¶
GetNthPage gets the TabPage representing the child at position.
func (*TabView) GetPagePosition ¶
GetPagePosition finds the position of page in t, starting from 0.
func (*TabView) GetPages ¶
GetPages returns a Model containing the pages of t. This model can be used to keep an up to date view of the pages.
func (*TabView) GetSelectedPage ¶
GetSelectedPage gets the currently selected page in t.
func (*TabView) GetShortcutWidget ¶
GetShortcutWidget gets the shortcut widget for t, see (*TabView).SetShortcutWidget().
func (*TabView) Insert ¶
Insert inserts a non-pinned page at position.
It's an error to try to insert a page before a pinned page, in that case (*TabView).InsertPinned() should be used instead.
func (*TabView) InsertPinned ¶
InsertPinned inserts a pinned page at position.
It's an error to try to insert a pinned page after a non-pinned page, in that case (*TabView).Insert() should be used instead.
func (*TabView) PrependPinned ¶
PrependPinned inserts child as the first pinned page.
func (*TabView) ReorderBackward ¶
ReorderBackward reorders page to before its previous page if possible.
func (*TabView) ReorderFirst ¶
ReorderFirst reorders page to the first possible position.
func (*TabView) ReorderForward ¶
ReorderForward reorders page to after its next page if possible.
func (*TabView) ReorderLast ¶
ReorderLast reorders page to the last possible position.
func (*TabView) ReorderPage ¶
ReorderPage reorders page to position.
It's a programmer error to try to reorder a pinned page after a non-pinned one, or a non-pinned page before a pinned one.
func (*TabView) SelectNextPage ¶
SelectNextPage selects the page after the currently selected page.
If the last page was already selected, this function does nothing.
func (*TabView) SelectPreviousPage ¶
SelectPreviousPage selects the page before the currently selected page.
If the first page was already selected, this function does nothing.
func (*TabView) SetDefaultIcon ¶
SetDefaultIcon sets default page icon for t.
If a page doesn't provide its own icon via TabPage:icon, default icon may be used instead for contexts where having an icon is necessary.
TabBar will use default icon for pinned tabs in case the page is not loading, doesn't have an icon and an indicator. Default icon is never used for tabs that aren't pinned.
By default, 'hdy-tab-icon-missing-symbolic' icon is used.
func (*TabView) SetMenuModel ¶
SetMenuModel sets the tab context menu model for t.
When a context menu is shown for a tab, it will be constructed from the provided menu model. Use TabView::setup-menu signal to set up the menu actions for the particular tab.
func (*TabView) SetPagePinned ¶
SetPagePinned pins or unpins page.
Pinned pages are guaranteed to be placed before all non-pinned pages; at any given moment the first TabView:n-pinned-pages pages in t are guaranteed to be pinned.
When a page is pinned or unpinned, it's automatically reordered: pinning a page moves it after other pinned pages; unpinning a page moves it before other non-pinned pages.
Pinned pages can still be reordered between each other.
TabBar will display pinned pages in a compact form, never showing the title or close button, and only showing a single icon, selected in the following order:
1. TabPage:indicator-icon 2. A spinner if TabPage:loading is true 3. TabPage:icon 4. TabView:default-icon
Pinned pages cannot be closed by default, see TabView::close-page for how to override that behavior.
func (*TabView) SetSelectedPage ¶
SetSelectedPage sets the currently selected page in t.
func (*TabView) SetShortcutWidget ¶
SetShortcutWidget sets the shortcut widget for t.
Registers the following shortcuts on widget: * Ctrl+Page Up - switch to the previous page * Ctrl+Page Down - switch to the next page * Ctrl+Home - switch to the first page * Ctrl+End - switch to the last page * Ctrl+Shift+Page Up - move the current page backward * Ctrl+Shift+Page Down - move the current page forward * Ctrl+Shift+Home - move the current page at the start * Ctrl+Shift+End - move the current page at the end * Ctrl+Tab - switch to the next page, with looping * Ctrl+Shift+Tab - switch to the previous page, with looping * Alt+1-9 - switch to pages 1-9 * Alt+0 - switch to page 10
These shortcuts are always available on t, this function is useful if they should be available globally.
func (*TabView) TransferPage ¶
TransferPage transfers page from t to other_view. The page object will be reused.
It's a programmer error to try to insert a pinned page after a non-pinned one, or a non-pinned page before a pinned one.
type TitleBar ¶
func (*TitleBar) GetSelectionMode ¶
GetSelectionMode returns whether whether t is in selection mode.
func (*TitleBar) SetSelectionMode ¶
SetSelectionMode sets whether t is in selection mode.
type ValueObject ¶
func ValueObjectNew ¶
func ValueObjectNew(value *glib.Value) *ValueObject
ValueObjectNew create a new ValueObject.
func ValueObjectNewString ¶
func ValueObjectNewString(string string) *ValueObject
ValueObjectNewString creates a new ValueObject. This is a convenience method to create a ValueObject that stores a string.
func ValueObjectNewTakeString ¶
func ValueObjectNewTakeString(string string) *ValueObject
ValueObjectNewTakeString creates a new ValueObject. This is a convenience method to create a ValueObject that stores a string taking ownership of it.
func (*ValueObject) CopyValue ¶
func (v *ValueObject) CopyValue(dest *glib.Value)
CopyValue copy data from the contained #GValue into dest.
func (*ValueObject) DupString ¶
func (v *ValueObject) DupString() string
DupString returns a copy of the contained string if the value is of type TYPE_STRING.
func (*ValueObject) GetString ¶
func (v *ValueObject) GetString() string
GetString returns the contained string if the value is of type TYPE_STRING.
func (*ValueObject) GetValue ¶
func (v *ValueObject) GetValue() *glib.Value
GetValue return the contained value.
type ViewSwitcher ¶
func ViewSwitcherNew ¶
func ViewSwitcherNew() *ViewSwitcher
ViewSwitcherNew creates a new ViewSwitcher widget.
func (*ViewSwitcher) GetNarrowEllipsize ¶
func (v *ViewSwitcher) GetNarrowEllipsize() pango.EllipsizeMode
GetNarrowEllipsize get the ellipsizing position of the narrow mode label. See (*ViewSwitcher).SetNarrowEllipsize().
func (*ViewSwitcher) GetPolicy ¶
func (v *ViewSwitcher) GetPolicy() ViewSwitcherPolicy
GetPolicy gets the policy of v.
func (*ViewSwitcher) GetStack ¶
func (v *ViewSwitcher) GetStack() *gtk.Stack
GetStack get the Stack being controlled by the ViewSwitcher.
See: (*ViewSwitcher).SetStack()
func (*ViewSwitcher) SetNarrowEllipsize ¶
func (v *ViewSwitcher) SetNarrowEllipsize(mode pango.EllipsizeMode)
SetNarrowEllipsize set the mode used to ellipsize the text in narrow mode if there is not enough space to render the entire string.
func (*ViewSwitcher) SetPolicy ¶
func (v *ViewSwitcher) SetPolicy(policy ViewSwitcherPolicy)
SetPolicy sets the policy of v.
func (*ViewSwitcher) SetStack ¶
func (v *ViewSwitcher) SetStack(stack *gtk.Stack)
SetStack sets the Stack to control.
type ViewSwitcherBar ¶
func ViewSwitcherBarNew ¶
func ViewSwitcherBarNew() *ViewSwitcherBar
ViewSwitcherBarNew creates a new ViewSwitcherBar widget.
func (*ViewSwitcherBar) GetPolicy ¶
func (v *ViewSwitcherBar) GetPolicy() ViewSwitcherPolicy
GetPolicy gets the policy of v.
func (*ViewSwitcherBar) GetReveal ¶
func (v *ViewSwitcherBar) GetReveal() bool
GetReveal gets whether v should be revealed or not.
func (*ViewSwitcherBar) GetStack ¶
func (v *ViewSwitcherBar) GetStack() *gtk.Stack
GetStack get the Stack being controlled by the ViewSwitcher.
func (*ViewSwitcherBar) SetPolicy ¶
func (v *ViewSwitcherBar) SetPolicy(policy ViewSwitcherPolicy)
SetPolicy sets the policy of v.
func (*ViewSwitcherBar) SetReveal ¶
func (v *ViewSwitcherBar) SetReveal(reveal bool)
SetReveal sets whether v should be revealed or not.
func (*ViewSwitcherBar) SetStack ¶
func (v *ViewSwitcherBar) SetStack(stack *gtk.Stack)
SetStack sets the Stack to control.
type ViewSwitcherPolicy ¶
type ViewSwitcherPolicy int
const ( // ViewSwitcherPolicyAuto automatically adapt to the best fitting mode ViewSwitcherPolicyAuto ViewSwitcherPolicy = 0 // ViewSwitcherPolicyNarrow force the narrow mode ViewSwitcherPolicyNarrow ViewSwitcherPolicy = 1 // ViewSwitcherPolicyWide force the wide mode ViewSwitcherPolicyWide ViewSwitcherPolicy = 2 )
type ViewSwitcherTitle ¶
func ViewSwitcherTitleNew ¶
func ViewSwitcherTitleNew() *ViewSwitcherTitle
ViewSwitcherTitleNew creates a new ViewSwitcherTitle widget.
func (*ViewSwitcherTitle) GetPolicy ¶
func (v *ViewSwitcherTitle) GetPolicy() ViewSwitcherPolicy
GetPolicy gets the policy of v.
func (*ViewSwitcherTitle) GetStack ¶
func (v *ViewSwitcherTitle) GetStack() *gtk.Stack
GetStack get the Stack being controlled by the ViewSwitcher.
func (*ViewSwitcherTitle) GetSubtitle ¶
func (v *ViewSwitcherTitle) GetSubtitle() string
GetSubtitle gets the subtitle of v. See (*ViewSwitcherTitle).SetSubtitle().
func (*ViewSwitcherTitle) GetTitle ¶
func (v *ViewSwitcherTitle) GetTitle() string
GetTitle gets the title of v. See (*ViewSwitcherTitle).SetTitle().
func (*ViewSwitcherTitle) GetTitleVisible ¶
func (v *ViewSwitcherTitle) GetTitleVisible() bool
GetTitleVisible get whether the title label of v is visible.
func (*ViewSwitcherTitle) GetViewSwitcherEnabled ¶
func (v *ViewSwitcherTitle) GetViewSwitcherEnabled() bool
GetViewSwitcherEnabled gets whether v's view switcher is enabled.
See (*ViewSwitcherTitle).SetViewSwitcherEnabled().
func (*ViewSwitcherTitle) SetPolicy ¶
func (v *ViewSwitcherTitle) SetPolicy(policy ViewSwitcherPolicy)
SetPolicy sets the policy of v.
func (*ViewSwitcherTitle) SetStack ¶
func (v *ViewSwitcherTitle) SetStack(stack *gtk.Stack)
SetStack sets the Stack to control.
func (*ViewSwitcherTitle) SetSubtitle ¶
func (v *ViewSwitcherTitle) SetSubtitle(subtitle string)
SetSubtitle sets the subtitle of v. The subtitle should give a user additional details.
func (*ViewSwitcherTitle) SetTitle ¶
func (v *ViewSwitcherTitle) SetTitle(title string)
SetTitle sets the title of v. The title should give a user additional details. A good title should not include the application name.
func (*ViewSwitcherTitle) SetViewSwitcherEnabled ¶
func (v *ViewSwitcherTitle) SetViewSwitcherEnabled(enabled bool)
SetViewSwitcherEnabled make v enable or disable its view switcher. If it is disabled, the title will be displayed instead. This allows to programmatically and prematurely hide the view switcher of v even if it fits in the available space.
This can be used e.g. to ensure the view switcher is hidden below a certain window width, or any other constraint you find suitable.
type WindowHandle ¶
func WindowHandleNew ¶
func WindowHandleNew() *WindowHandle
WindowHandleNew creates a new WindowHandle.