Documentation ¶
Index ¶
- Constants
- Variables
- func EasingEase(self Easing, value float64) float64
- func GetEnableAnimations(widget gtk.Widgetter) bool
- func GetMajorVersion() uint
- func GetMicroVersion() uint
- func GetMinorVersion() uint
- func Init()
- func IsInitialized() bool
- func LengthUnitFromPx(unit LengthUnit, value float64, settings *gtk.Settings) float64
- func LengthUnitToPx(unit LengthUnit, value float64, settings *gtk.Settings) float64
- func Lerp(a, b, t float64) float64
- type AboutDialog
- func (self *AboutDialog) AddAcknowledgementSection(name string, people []string)
- func (self *AboutDialog) AddCreditSection(name string, people []string)
- func (self *AboutDialog) AddLegalSection(title, copyright string, licenseType gtk.License, license string)
- func (self *AboutDialog) AddLink(title, url string)
- func (self *AboutDialog) ApplicationIcon() string
- func (self *AboutDialog) ApplicationName() string
- func (self *AboutDialog) Artists() []string
- func (self *AboutDialog) Comments() string
- func (self *AboutDialog) ConnectActivateLink(f func(uri string) (ok bool)) coreglib.SignalHandle
- func (self *AboutDialog) Copyright() string
- func (self *AboutDialog) DebugInfo() string
- func (self *AboutDialog) DebugInfoFilename() string
- func (self *AboutDialog) Designers() []string
- func (self *AboutDialog) DeveloperName() string
- func (self *AboutDialog) Developers() []string
- func (self *AboutDialog) Documenters() []string
- func (self *AboutDialog) IssueURL() string
- func (self *AboutDialog) License() string
- func (self *AboutDialog) LicenseType() gtk.License
- func (self *AboutDialog) ReleaseNotes() string
- func (self *AboutDialog) ReleaseNotesVersion() string
- func (self *AboutDialog) SetApplicationIcon(applicationIcon string)
- func (self *AboutDialog) SetApplicationName(applicationName string)
- func (self *AboutDialog) SetArtists(artists []string)
- func (self *AboutDialog) SetComments(comments string)
- func (self *AboutDialog) SetCopyright(copyright string)
- func (self *AboutDialog) SetDebugInfo(debugInfo string)
- func (self *AboutDialog) SetDebugInfoFilename(filename string)
- func (self *AboutDialog) SetDesigners(designers []string)
- func (self *AboutDialog) SetDeveloperName(developerName string)
- func (self *AboutDialog) SetDevelopers(developers []string)
- func (self *AboutDialog) SetDocumenters(documenters []string)
- func (self *AboutDialog) SetIssueURL(issueUrl string)
- func (self *AboutDialog) SetLicense(license string)
- func (self *AboutDialog) SetLicenseType(licenseType gtk.License)
- func (self *AboutDialog) SetReleaseNotes(releaseNotes string)
- func (self *AboutDialog) SetReleaseNotesVersion(version string)
- func (self *AboutDialog) SetSupportURL(supportUrl string)
- func (self *AboutDialog) SetTranslatorCredits(translatorCredits string)
- func (self *AboutDialog) SetVersion(version string)
- func (self *AboutDialog) SetWebsite(website string)
- func (self *AboutDialog) SupportURL() string
- func (self *AboutDialog) TranslatorCredits() string
- func (self *AboutDialog) Version() string
- func (self *AboutDialog) Website() string
- type AboutDialogClass
- type AboutDialogOverrides
- type AboutWindow
- func (self *AboutWindow) AddAcknowledgementSection(name string, people []string)
- func (self *AboutWindow) AddCreditSection(name string, people []string)
- func (self *AboutWindow) AddLegalSection(title, copyright string, licenseType gtk.License, license string)
- func (self *AboutWindow) AddLink(title, url string)
- func (self *AboutWindow) ApplicationIcon() string
- func (self *AboutWindow) ApplicationName() string
- func (self *AboutWindow) Artists() []string
- func (self *AboutWindow) Comments() string
- func (self *AboutWindow) ConnectActivateLink(f func(uri string) (ok bool)) coreglib.SignalHandle
- func (self *AboutWindow) Copyright() string
- func (self *AboutWindow) DebugInfo() string
- func (self *AboutWindow) DebugInfoFilename() string
- func (self *AboutWindow) Designers() []string
- func (self *AboutWindow) DeveloperName() string
- func (self *AboutWindow) Developers() []string
- func (self *AboutWindow) Documenters() []string
- func (self *AboutWindow) IssueURL() string
- func (self *AboutWindow) License() string
- func (self *AboutWindow) LicenseType() gtk.License
- func (self *AboutWindow) ReleaseNotes() string
- func (self *AboutWindow) ReleaseNotesVersion() string
- func (self *AboutWindow) SetApplicationIcon(applicationIcon string)
- func (self *AboutWindow) SetApplicationName(applicationName string)
- func (self *AboutWindow) SetArtists(artists []string)
- func (self *AboutWindow) SetComments(comments string)
- func (self *AboutWindow) SetCopyright(copyright string)
- func (self *AboutWindow) SetDebugInfo(debugInfo string)
- func (self *AboutWindow) SetDebugInfoFilename(filename string)
- func (self *AboutWindow) SetDesigners(designers []string)
- func (self *AboutWindow) SetDeveloperName(developerName string)
- func (self *AboutWindow) SetDevelopers(developers []string)
- func (self *AboutWindow) SetDocumenters(documenters []string)
- func (self *AboutWindow) SetIssueURL(issueUrl string)
- func (self *AboutWindow) SetLicense(license string)
- func (self *AboutWindow) SetLicenseType(licenseType gtk.License)
- func (self *AboutWindow) SetReleaseNotes(releaseNotes string)
- func (self *AboutWindow) SetReleaseNotesVersion(version string)
- func (self *AboutWindow) SetSupportURL(supportUrl string)
- func (self *AboutWindow) SetTranslatorCredits(translatorCredits string)
- func (self *AboutWindow) SetVersion(version string)
- func (self *AboutWindow) SetWebsite(website string)
- func (self *AboutWindow) SupportURL() string
- func (self *AboutWindow) TranslatorCredits() string
- func (self *AboutWindow) Version() string
- func (self *AboutWindow) Website() string
- type AboutWindowClass
- type AboutWindowOverrides
- type ActionRow
- func (self *ActionRow) ActivatableWidget() gtk.Widgetter
- func (self *ActionRow) Activate()
- func (self *ActionRow) AddPrefix(widget gtk.Widgetter)
- func (self *ActionRow) AddSuffix(widget gtk.Widgetter)
- func (self *ActionRow) ConnectActivated(f func()) coreglib.SignalHandle
- func (self *ActionRow) IconName() stringdeprecated
- func (self *ActionRow) Remove(widget gtk.Widgetter)
- func (self *ActionRow) SetActivatableWidget(widget gtk.Widgetter)
- func (self *ActionRow) SetIconName(iconName string)deprecated
- func (self *ActionRow) SetSubtitle(subtitle string)
- func (self *ActionRow) SetSubtitleLines(subtitleLines int)
- func (self *ActionRow) SetSubtitleSelectable(subtitleSelectable bool)
- func (self *ActionRow) SetTitleLines(titleLines int)
- func (self *ActionRow) Subtitle() string
- func (self *ActionRow) SubtitleLines() int
- func (self *ActionRow) SubtitleSelectable() bool
- func (self *ActionRow) TitleLines() int
- type ActionRowClass
- type ActionRowOverrides
- type AlertDialog
- func (self *AlertDialog) AddResponse(id, label string)
- func (self *AlertDialog) Body() string
- func (self *AlertDialog) BodyUseMarkup() bool
- func (self *AlertDialog) ChooseFinish(result gio.AsyncResulter) string
- func (self *AlertDialog) CloseResponse() string
- func (self *AlertDialog) ConnectResponse(f func(response string)) coreglib.SignalHandle
- func (self *AlertDialog) DefaultResponse() string
- func (self *AlertDialog) ExtraChild() gtk.Widgetter
- func (self *AlertDialog) HasResponse(response string) bool
- func (self *AlertDialog) Heading() string
- func (self *AlertDialog) HeadingUseMarkup() bool
- func (self *AlertDialog) RemoveResponse(id string)
- func (self *AlertDialog) ResponseAppearance(response string) ResponseAppearance
- func (self *AlertDialog) ResponseEnabled(response string) bool
- func (self *AlertDialog) ResponseLabel(response string) string
- func (self *AlertDialog) SetBody(body string)
- func (self *AlertDialog) SetBodyUseMarkup(useMarkup bool)
- func (self *AlertDialog) SetCloseResponse(response string)
- func (self *AlertDialog) SetDefaultResponse(response string)
- func (self *AlertDialog) SetExtraChild(child gtk.Widgetter)
- func (self *AlertDialog) SetHeading(heading string)
- func (self *AlertDialog) SetHeadingUseMarkup(useMarkup bool)
- func (self *AlertDialog) SetResponseAppearance(response string, appearance ResponseAppearance)
- func (self *AlertDialog) SetResponseEnabled(response string, enabled bool)
- func (self *AlertDialog) SetResponseLabel(response, label string)
- type AlertDialogClass
- type AlertDialogOverrides
- type Animation
- func (self *Animation) ConnectDone(f func()) coreglib.SignalHandle
- func (self *Animation) FollowEnableAnimationsSetting() bool
- func (self *Animation) Pause()
- func (self *Animation) Play()
- func (self *Animation) Reset()
- func (self *Animation) Resume()
- func (self *Animation) SetFollowEnableAnimationsSetting(setting bool)
- func (self *Animation) SetTarget(target AnimationTargetter)
- func (self *Animation) Skip()
- func (self *Animation) State() AnimationState
- func (self *Animation) Target() AnimationTargetter
- func (self *Animation) Value() float64
- func (self *Animation) Widget() gtk.Widgetter
- type AnimationState
- type AnimationTarget
- type AnimationTargetFunc
- type AnimationTargetter
- type Animationer
- type Application
- type ApplicationClass
- type ApplicationOverrides
- type ApplicationWindow
- func (self *ApplicationWindow) AddBreakpoint(breakpoint *Breakpoint)
- func (self *ApplicationWindow) Content() gtk.Widgetter
- func (self *ApplicationWindow) CurrentBreakpoint() *Breakpoint
- func (self *ApplicationWindow) Dialogs() *gio.ListModel
- func (self *ApplicationWindow) SetContent(content gtk.Widgetter)
- func (self *ApplicationWindow) VisibleDialog() *Dialog
- type ApplicationWindowClass
- type ApplicationWindowOverrides
- type Avatar
- func (self *Avatar) CustomImage() *gdk.Paintable
- func (self *Avatar) DrawToTexture(scaleFactor int) gdk.Texturer
- func (self *Avatar) IconName() string
- func (self *Avatar) SetCustomImage(customImage gdk.Paintabler)
- func (self *Avatar) SetIconName(iconName string)
- func (self *Avatar) SetShowInitials(showInitials bool)
- func (self *Avatar) SetSize(size int)
- func (self *Avatar) SetText(text string)
- func (self *Avatar) ShowInitials() bool
- func (self *Avatar) Size() int
- func (self *Avatar) Text() string
- type AvatarClass
- type AvatarOverrides
- type Banner
- func (self *Banner) ButtonLabel() string
- func (self *Banner) ConnectButtonClicked(f func()) coreglib.SignalHandle
- func (self *Banner) Revealed() bool
- func (self *Banner) SetButtonLabel(label string)
- func (self *Banner) SetRevealed(revealed bool)
- func (self *Banner) SetTitle(title string)
- func (self *Banner) SetUseMarkup(useMarkup bool)
- func (self *Banner) Title() string
- func (self *Banner) UseMarkup() bool
- type BannerClass
- type BannerOverrides
- type Bin
- type BinClass
- type BinOverrides
- type Breakpoint
- func (self *Breakpoint) AddSetter(object glib.Objector, property string, value any)
- func (self *Breakpoint) AddSetterDirect(object *coreglib.Object, property string, value *coreglib.Value)
- func (self *Breakpoint) AddSetters(objects []*coreglib.Object, names []string, values []*coreglib.Value)
- func (self *Breakpoint) Condition() *BreakpointCondition
- func (self *Breakpoint) ConnectApply(f func()) coreglib.SignalHandle
- func (self *Breakpoint) ConnectUnapply(f func()) coreglib.SignalHandle
- func (self *Breakpoint) SetCondition(condition *BreakpointCondition)
- type BreakpointBin
- type BreakpointBinClass
- type BreakpointBinOverrides
- type BreakpointClass
- type BreakpointCondition
- func BreakpointConditionParse(str string) *BreakpointCondition
- func NewBreakpointConditionAnd(condition1 *BreakpointCondition, condition2 *BreakpointCondition) *BreakpointCondition
- func NewBreakpointConditionLength(typ BreakpointConditionLengthType, value float64, unit LengthUnit) *BreakpointCondition
- func NewBreakpointConditionOr(condition1 *BreakpointCondition, condition2 *BreakpointCondition) *BreakpointCondition
- func NewBreakpointConditionRatio(typ BreakpointConditionRatioType, width int, height int) *BreakpointCondition
- type BreakpointConditionLengthType
- type BreakpointConditionRatioType
- type BreakpointOverrides
- type ButtonContent
- func (self *ButtonContent) CanShrink() bool
- func (self *ButtonContent) IconName() string
- func (self *ButtonContent) Label() string
- func (self *ButtonContent) SetCanShrink(canShrink bool)
- func (self *ButtonContent) SetIconName(iconName string)
- func (self *ButtonContent) SetLabel(label string)
- func (self *ButtonContent) SetUseUnderline(useUnderline bool)
- func (self *ButtonContent) UseUnderline() bool
- type ButtonContentClass
- type ButtonContentOverrides
- type CallbackAnimationTarget
- type Carousel
- func (self *Carousel) AllowLongSwipes() bool
- func (self *Carousel) AllowMouseDrag() bool
- func (self *Carousel) AllowScrollWheel() bool
- func (self *Carousel) Append(child gtk.Widgetter)
- func (self *Carousel) ConnectPageChanged(f func(index uint)) coreglib.SignalHandle
- func (self *Carousel) Insert(child gtk.Widgetter, position int)
- func (self *Carousel) Interactive() bool
- func (self *Carousel) NPages() uint
- func (self *Carousel) NthPage(n uint) gtk.Widgetter
- func (self *Carousel) Position() float64
- func (self *Carousel) Prepend(child gtk.Widgetter)
- func (self *Carousel) Remove(child gtk.Widgetter)
- func (self *Carousel) Reorder(child gtk.Widgetter, position int)
- func (self *Carousel) RevealDuration() uint
- func (self *Carousel) ScrollParams() *SpringParams
- func (self *Carousel) ScrollTo(widget gtk.Widgetter, animate bool)
- func (self *Carousel) SetAllowLongSwipes(allowLongSwipes bool)
- func (self *Carousel) SetAllowMouseDrag(allowMouseDrag bool)
- func (self *Carousel) SetAllowScrollWheel(allowScrollWheel bool)
- func (self *Carousel) SetInteractive(interactive bool)
- func (self *Carousel) SetRevealDuration(revealDuration uint)
- func (self *Carousel) SetScrollParams(params *SpringParams)
- func (self *Carousel) SetSpacing(spacing uint)
- func (self *Carousel) Spacing() uint
- type CarouselClass
- type CarouselIndicatorDots
- type CarouselIndicatorDotsClass
- type CarouselIndicatorDotsOverrides
- type CarouselIndicatorLines
- type CarouselIndicatorLinesClass
- type CarouselIndicatorLinesOverrides
- type CarouselOverrides
- type CenteringPolicy
- type Clamp
- func (self *Clamp) Child() gtk.Widgetter
- func (self *Clamp) MaximumSize() int
- func (self *Clamp) SetChild(child gtk.Widgetter)
- func (self *Clamp) SetMaximumSize(maximumSize int)
- func (self *Clamp) SetTighteningThreshold(tighteningThreshold int)
- func (self *Clamp) SetUnit(unit LengthUnit)
- func (self *Clamp) TighteningThreshold() int
- func (self *Clamp) Unit() LengthUnit
- type ClampClass
- type ClampLayout
- func (self *ClampLayout) MaximumSize() int
- func (self *ClampLayout) SetMaximumSize(maximumSize int)
- func (self *ClampLayout) SetTighteningThreshold(tighteningThreshold int)
- func (self *ClampLayout) SetUnit(unit LengthUnit)
- func (self *ClampLayout) TighteningThreshold() int
- func (self *ClampLayout) Unit() LengthUnit
- type ClampLayoutClass
- type ClampLayoutOverrides
- type ClampOverrides
- type ClampScrollable
- func (self *ClampScrollable) Child() gtk.Widgetter
- func (self *ClampScrollable) MaximumSize() int
- func (self *ClampScrollable) SetChild(child gtk.Widgetter)
- func (self *ClampScrollable) SetMaximumSize(maximumSize int)
- func (self *ClampScrollable) SetTighteningThreshold(tighteningThreshold int)
- func (self *ClampScrollable) SetUnit(unit LengthUnit)
- func (self *ClampScrollable) TighteningThreshold() int
- func (self *ClampScrollable) Unit() LengthUnit
- type ClampScrollableClass
- type ClampScrollableOverrides
- type ColorScheme
- type ComboRow
- func (self *ComboRow) EnableSearch() bool
- func (self *ComboRow) Expression() gtk.Expressioner
- func (self *ComboRow) Factory() *gtk.ListItemFactory
- func (self *ComboRow) ListFactory() *gtk.ListItemFactory
- func (self *ComboRow) Model() *gio.ListModel
- func (self *ComboRow) Selected() uint
- func (self *ComboRow) SelectedItem() *coreglib.Object
- func (self *ComboRow) SetEnableSearch(enableSearch bool)
- func (self *ComboRow) SetExpression(expression gtk.Expressioner)
- func (self *ComboRow) SetFactory(factory *gtk.ListItemFactory)
- func (self *ComboRow) SetListFactory(factory *gtk.ListItemFactory)
- func (self *ComboRow) SetModel(model gio.ListModeller)
- func (self *ComboRow) SetSelected(position uint)
- func (self *ComboRow) SetUseSubtitle(useSubtitle bool)
- func (self *ComboRow) UseSubtitle() bool
- type ComboRowClass
- type ComboRowOverrides
- type Dialog
- func (self *Dialog) AddBreakpoint(breakpoint *Breakpoint)
- func (self *Dialog) CanClose() bool
- func (self *Dialog) Child() gtk.Widgetter
- func (self *Dialog) Close() bool
- func (self *Dialog) ConnectCloseAttempt(f func()) coreglib.SignalHandle
- func (self *Dialog) ConnectClosed(f func()) coreglib.SignalHandle
- func (self *Dialog) ContentHeight() int
- func (self *Dialog) ContentWidth() int
- func (self *Dialog) CurrentBreakpoint() *Breakpoint
- func (self *Dialog) DefaultWidget() gtk.Widgetter
- func (self *Dialog) Focus() gtk.Widgetter
- func (self *Dialog) FollowsContentSize() bool
- func (self *Dialog) ForceClose()
- func (self *Dialog) Present(parent gtk.Widgetter)
- func (self *Dialog) PresentationMode() DialogPresentationMode
- func (self *Dialog) SetCanClose(canClose bool)
- func (self *Dialog) SetChild(child gtk.Widgetter)
- func (self *Dialog) SetContentHeight(contentHeight int)
- func (self *Dialog) SetContentWidth(contentWidth int)
- func (self *Dialog) SetDefaultWidget(defaultWidget gtk.Widgetter)
- func (self *Dialog) SetFocus(focus gtk.Widgetter)
- func (self *Dialog) SetFollowsContentSize(followsContentSize bool)
- func (self *Dialog) SetPresentationMode(presentationMode DialogPresentationMode)
- func (self *Dialog) SetTitle(title string)
- func (self *Dialog) Title() string
- type DialogClass
- type DialogOverrides
- type DialogPresentationMode
- type Easing
- type EntryRow
- func (self *EntryRow) ActivatesDefault() bool
- func (self *EntryRow) AddPrefix(widget gtk.Widgetter)
- func (self *EntryRow) AddSuffix(widget gtk.Widgetter)
- func (self *EntryRow) Attributes() *pango.AttrList
- func (self *EntryRow) ConnectApply(f func()) coreglib.SignalHandle
- func (self *EntryRow) ConnectEntryActivated(f func()) coreglib.SignalHandle
- func (self *EntryRow) EnableEmojiCompletion() bool
- func (self *EntryRow) GrabFocusWithoutSelecting() bool
- func (self *EntryRow) InputHints() gtk.InputHints
- func (self *EntryRow) InputPurpose() gtk.InputPurpose
- func (self *EntryRow) Remove(widget gtk.Widgetter)
- func (self *EntryRow) SetActivatesDefault(activates bool)
- func (self *EntryRow) SetAttributes(attributes *pango.AttrList)
- func (self *EntryRow) SetEnableEmojiCompletion(enableEmojiCompletion bool)
- func (self *EntryRow) SetInputHints(hints gtk.InputHints)
- func (self *EntryRow) SetInputPurpose(purpose gtk.InputPurpose)
- func (self *EntryRow) SetShowApplyButton(showApplyButton bool)
- func (self *EntryRow) ShowApplyButton() bool
- func (self *EntryRow) TextLength() uint
- type EntryRowClass
- type EntryRowOverrides
- type EnumListItem
- type EnumListItemClass
- type EnumListItemOverrides
- type EnumListModel
- type EnumListModelClass
- type EnumListModelOverrides
- type ExpanderRow
- func (self *ExpanderRow) AddAction(widget gtk.Widgetter)deprecated
- func (self *ExpanderRow) AddPrefix(widget gtk.Widgetter)
- func (self *ExpanderRow) AddRow(child gtk.Widgetter)
- func (self *ExpanderRow) AddSuffix(widget gtk.Widgetter)
- func (self *ExpanderRow) EnableExpansion() bool
- func (self *ExpanderRow) Expanded() bool
- func (self *ExpanderRow) IconName() stringdeprecated
- func (self *ExpanderRow) Remove(child gtk.Widgetter)
- func (self *ExpanderRow) SetEnableExpansion(enableExpansion bool)
- func (self *ExpanderRow) SetExpanded(expanded bool)
- func (self *ExpanderRow) SetIconName(iconName string)deprecated
- func (self *ExpanderRow) SetShowEnableSwitch(showEnableSwitch bool)
- func (self *ExpanderRow) SetSubtitle(subtitle string)
- func (self *ExpanderRow) SetSubtitleLines(subtitleLines int)
- func (self *ExpanderRow) SetTitleLines(titleLines int)
- func (self *ExpanderRow) ShowEnableSwitch() bool
- func (self *ExpanderRow) Subtitle() string
- func (self *ExpanderRow) SubtitleLines() int
- func (self *ExpanderRow) TitleLines() int
- type ExpanderRowClass
- type ExpanderRowOverrides
- type Flapdeprecated
- func NewFlap() *Flapdeprecated
- func (self *Flap) Content() gtk.Widgetterdeprecated
- func (self *Flap) Flap() gtk.Widgetterdeprecated
- func (self *Flap) FlapPosition() gtk.PackTypedeprecated
- func (self *Flap) FoldDuration() uintdeprecated
- func (self *Flap) FoldPolicy() FlapFoldPolicydeprecated
- func (self *Flap) FoldThresholdPolicy() FoldThresholdPolicydeprecated
- func (self *Flap) Folded() booldeprecated
- func (self *Flap) Locked() booldeprecated
- func (self *Flap) Modal() booldeprecated
- func (self *Flap) RevealFlap() booldeprecated
- func (self *Flap) RevealParams() *SpringParamsdeprecated
- func (self *Flap) RevealProgress() float64deprecated
- func (self *Flap) Separator() gtk.Widgetterdeprecated
- func (self *Flap) SetContent(content gtk.Widgetter)deprecated
- func (self *Flap) SetFlap(flap gtk.Widgetter)deprecated
- func (self *Flap) SetFlapPosition(position gtk.PackType)deprecated
- func (self *Flap) SetFoldDuration(duration uint)deprecated
- func (self *Flap) SetFoldPolicy(policy FlapFoldPolicy)deprecated
- func (self *Flap) SetFoldThresholdPolicy(policy FoldThresholdPolicy)deprecated
- func (self *Flap) SetLocked(locked bool)deprecated
- func (self *Flap) SetModal(modal bool)deprecated
- func (self *Flap) SetRevealFlap(revealFlap bool)deprecated
- func (self *Flap) SetRevealParams(params *SpringParams)deprecated
- func (self *Flap) SetSeparator(separator gtk.Widgetter)deprecated
- func (self *Flap) SetSwipeToClose(swipeToClose bool)deprecated
- func (self *Flap) SetSwipeToOpen(swipeToOpen bool)deprecated
- func (self *Flap) SetTransitionType(transitionType FlapTransitionType)deprecated
- func (self *Flap) SwipeToClose() booldeprecated
- func (self *Flap) SwipeToOpen() booldeprecated
- func (self *Flap) TransitionType() FlapTransitionTypedeprecated
- type FlapClass
- type FlapFoldPolicydeprecated
- type FlapOverrides
- type FlapTransitionTypedeprecated
- type FoldThresholdPolicydeprecated
- type HeaderBar
- func (self *HeaderBar) CenteringPolicy() CenteringPolicy
- func (self *HeaderBar) DecorationLayout() string
- func (self *HeaderBar) PackEnd(child gtk.Widgetter)
- func (self *HeaderBar) PackStart(child gtk.Widgetter)
- func (self *HeaderBar) Remove(child gtk.Widgetter)
- func (self *HeaderBar) SetCenteringPolicy(centeringPolicy CenteringPolicy)
- func (self *HeaderBar) SetDecorationLayout(layout string)
- func (self *HeaderBar) SetShowBackButton(showBackButton bool)
- func (self *HeaderBar) SetShowEndTitleButtons(setting bool)
- func (self *HeaderBar) SetShowStartTitleButtons(setting bool)
- func (self *HeaderBar) SetShowTitle(showTitle bool)
- func (self *HeaderBar) SetTitleWidget(titleWidget gtk.Widgetter)
- func (self *HeaderBar) ShowBackButton() bool
- func (self *HeaderBar) ShowEndTitleButtons() bool
- func (self *HeaderBar) ShowStartTitleButtons() bool
- func (self *HeaderBar) ShowTitle() bool
- func (self *HeaderBar) TitleWidget() gtk.Widgetter
- type HeaderBarClass
- type HeaderBarOverrides
- type Leafletdeprecated
- func NewLeaflet() *Leafletdeprecated
- func (self *Leaflet) AdjacentChild(direction NavigationDirection) gtk.Widgetterdeprecated
- func (self *Leaflet) Append(child gtk.Widgetter) *LeafletPagedeprecated
- func (self *Leaflet) CanNavigateBack() booldeprecated
- func (self *Leaflet) CanNavigateForward() booldeprecated
- func (self *Leaflet) CanUnfold() booldeprecated
- func (self *Leaflet) ChildByName(name string) gtk.Widgetterdeprecated
- func (self *Leaflet) ChildTransitionParams() *SpringParamsdeprecated
- func (self *Leaflet) ChildTransitionRunning() booldeprecated
- func (self *Leaflet) FoldThresholdPolicy() FoldThresholdPolicydeprecated
- func (self *Leaflet) Folded() booldeprecated
- func (self *Leaflet) Homogeneous() booldeprecated
- func (self *Leaflet) InsertChildAfter(child, sibling gtk.Widgetter) *LeafletPagedeprecated
- func (self *Leaflet) ModeTransitionDuration() uintdeprecated
- func (self *Leaflet) Navigate(direction NavigationDirection) booldeprecated
- func (self *Leaflet) Page(child gtk.Widgetter) *LeafletPagedeprecated
- func (self *Leaflet) Pages() *gtk.SelectionModeldeprecated
- func (self *Leaflet) Prepend(child gtk.Widgetter) *LeafletPagedeprecated
- func (self *Leaflet) Remove(child gtk.Widgetter)deprecated
- func (self *Leaflet) ReorderChildAfter(child, sibling gtk.Widgetter)deprecated
- func (self *Leaflet) SetCanNavigateBack(canNavigateBack bool)deprecated
- func (self *Leaflet) SetCanNavigateForward(canNavigateForward bool)deprecated
- func (self *Leaflet) SetCanUnfold(canUnfold bool)deprecated
- func (self *Leaflet) SetChildTransitionParams(params *SpringParams)deprecated
- func (self *Leaflet) SetFoldThresholdPolicy(policy FoldThresholdPolicy)deprecated
- func (self *Leaflet) SetHomogeneous(homogeneous bool)deprecated
- func (self *Leaflet) SetModeTransitionDuration(duration uint)deprecated
- func (self *Leaflet) SetTransitionType(transition LeafletTransitionType)deprecated
- func (self *Leaflet) SetVisibleChild(visibleChild gtk.Widgetter)deprecated
- func (self *Leaflet) SetVisibleChildName(name string)deprecated
- func (self *Leaflet) TransitionType() LeafletTransitionTypedeprecated
- func (self *Leaflet) VisibleChild() gtk.Widgetterdeprecated
- func (self *Leaflet) VisibleChildName() stringdeprecated
- type LeafletClass
- type LeafletOverrides
- type LeafletPagedeprecated
- type LeafletPageClass
- type LeafletPageOverrides
- type LeafletTransitionTypedeprecated
- type LengthUnit
- type MessageDialog
- func (self *MessageDialog) AddResponse(id, label string)
- func (self *MessageDialog) Body() string
- func (self *MessageDialog) BodyUseMarkup() bool
- func (self *MessageDialog) ChooseFinish(result gio.AsyncResulter) string
- func (self *MessageDialog) CloseResponse() string
- func (self *MessageDialog) ConnectResponse(f func(response string)) coreglib.SignalHandle
- func (self *MessageDialog) DefaultResponse() string
- func (self *MessageDialog) ExtraChild() gtk.Widgetter
- func (self *MessageDialog) HasResponse(response string) bool
- func (self *MessageDialog) Heading() string
- func (self *MessageDialog) HeadingUseMarkup() bool
- func (self *MessageDialog) RemoveResponse(id string)
- func (self *MessageDialog) Response(response string)
- func (self *MessageDialog) ResponseAppearance(response string) ResponseAppearance
- func (self *MessageDialog) ResponseEnabled(response string) bool
- func (self *MessageDialog) ResponseLabel(response string) string
- func (self *MessageDialog) SetBody(body string)
- func (self *MessageDialog) SetBodyUseMarkup(useMarkup bool)
- func (self *MessageDialog) SetCloseResponse(response string)
- func (self *MessageDialog) SetDefaultResponse(response string)
- func (self *MessageDialog) SetExtraChild(child gtk.Widgetter)
- func (self *MessageDialog) SetHeading(heading string)
- func (self *MessageDialog) SetHeadingUseMarkup(useMarkup bool)
- func (self *MessageDialog) SetResponseAppearance(response string, appearance ResponseAppearance)
- func (self *MessageDialog) SetResponseEnabled(response string, enabled bool)
- func (self *MessageDialog) SetResponseLabel(response, label string)
- type MessageDialogClass
- type MessageDialogOverrides
- type NavigationDirection
- type NavigationPage
- func (self *NavigationPage) CanPop() bool
- func (self *NavigationPage) Child() gtk.Widgetter
- func (self *NavigationPage) ConnectHidden(f func()) coreglib.SignalHandle
- func (self *NavigationPage) ConnectHiding(f func()) coreglib.SignalHandle
- func (self *NavigationPage) ConnectShowing(f func()) coreglib.SignalHandle
- func (self *NavigationPage) ConnectShown(f func()) coreglib.SignalHandle
- func (self *NavigationPage) SetCanPop(canPop bool)
- func (self *NavigationPage) SetChild(child gtk.Widgetter)
- func (self *NavigationPage) SetTag(tag string)
- func (self *NavigationPage) SetTitle(title string)
- func (self *NavigationPage) Tag() string
- func (self *NavigationPage) Title() string
- type NavigationPageClass
- type NavigationPageOverrides
- type NavigationSplitView
- func (self *NavigationSplitView) Collapsed() bool
- func (self *NavigationSplitView) Content() *NavigationPage
- func (self *NavigationSplitView) MaxSidebarWidth() float64
- func (self *NavigationSplitView) MinSidebarWidth() float64
- func (self *NavigationSplitView) SetCollapsed(collapsed bool)
- func (self *NavigationSplitView) SetContent(content *NavigationPage)
- func (self *NavigationSplitView) SetMaxSidebarWidth(width float64)
- func (self *NavigationSplitView) SetMinSidebarWidth(width float64)
- func (self *NavigationSplitView) SetShowContent(showContent bool)
- func (self *NavigationSplitView) SetSidebar(sidebar *NavigationPage)
- func (self *NavigationSplitView) SetSidebarWidthFraction(fraction float64)
- func (self *NavigationSplitView) SetSidebarWidthUnit(unit LengthUnit)
- func (self *NavigationSplitView) ShowContent() bool
- func (self *NavigationSplitView) Sidebar() *NavigationPage
- func (self *NavigationSplitView) SidebarWidthFraction() float64
- func (self *NavigationSplitView) SidebarWidthUnit() LengthUnit
- type NavigationSplitViewClass
- type NavigationSplitViewOverrides
- type NavigationView
- func (self *NavigationView) Add(page *NavigationPage)
- func (self *NavigationView) AnimateTransitions() bool
- func (self *NavigationView) ConnectGetNextPage(f func() (navigationPage *NavigationPage)) coreglib.SignalHandle
- func (self *NavigationView) ConnectPopped(f func(page *NavigationPage)) coreglib.SignalHandle
- func (self *NavigationView) ConnectPushed(f func()) coreglib.SignalHandle
- func (self *NavigationView) ConnectReplaced(f func()) coreglib.SignalHandle
- func (self *NavigationView) FindPage(tag string) *NavigationPage
- func (self *NavigationView) NavigationStack() *gio.ListModel
- func (self *NavigationView) Pop() bool
- func (self *NavigationView) PopOnEscape() bool
- func (self *NavigationView) PopToPage(page *NavigationPage) bool
- func (self *NavigationView) PopToTag(tag string) bool
- func (self *NavigationView) PreviousPage(page *NavigationPage) *NavigationPage
- func (self *NavigationView) Push(page *NavigationPage)
- func (self *NavigationView) PushByTag(tag string)
- func (self *NavigationView) Remove(page *NavigationPage)
- func (self *NavigationView) Replace(pages []*NavigationPage)
- func (self *NavigationView) ReplaceWithTags(tags []string)
- func (self *NavigationView) SetAnimateTransitions(animateTransitions bool)
- func (self *NavigationView) SetPopOnEscape(popOnEscape bool)
- func (self *NavigationView) VisiblePage() *NavigationPage
- type NavigationViewClass
- type NavigationViewOverrides
- type OverlaySplitView
- func (self *OverlaySplitView) Collapsed() bool
- func (self *OverlaySplitView) Content() gtk.Widgetter
- func (self *OverlaySplitView) EnableHideGesture() bool
- func (self *OverlaySplitView) EnableShowGesture() bool
- func (self *OverlaySplitView) MaxSidebarWidth() float64
- func (self *OverlaySplitView) MinSidebarWidth() float64
- func (self *OverlaySplitView) PINSidebar() bool
- func (self *OverlaySplitView) SetCollapsed(collapsed bool)
- func (self *OverlaySplitView) SetContent(content gtk.Widgetter)
- func (self *OverlaySplitView) SetEnableHideGesture(enableHideGesture bool)
- func (self *OverlaySplitView) SetEnableShowGesture(enableShowGesture bool)
- func (self *OverlaySplitView) SetMaxSidebarWidth(width float64)
- func (self *OverlaySplitView) SetMinSidebarWidth(width float64)
- func (self *OverlaySplitView) SetPINSidebar(pinSidebar bool)
- func (self *OverlaySplitView) SetShowSidebar(showSidebar bool)
- func (self *OverlaySplitView) SetSidebar(sidebar gtk.Widgetter)
- func (self *OverlaySplitView) SetSidebarPosition(position gtk.PackType)
- func (self *OverlaySplitView) SetSidebarWidthFraction(fraction float64)
- func (self *OverlaySplitView) SetSidebarWidthUnit(unit LengthUnit)
- func (self *OverlaySplitView) ShowSidebar() bool
- func (self *OverlaySplitView) Sidebar() gtk.Widgetter
- func (self *OverlaySplitView) SidebarPosition() gtk.PackType
- func (self *OverlaySplitView) SidebarWidthFraction() float64
- func (self *OverlaySplitView) SidebarWidthUnit() LengthUnit
- type OverlaySplitViewClass
- type OverlaySplitViewOverrides
- type PasswordEntryRow
- type PasswordEntryRowClass
- type PasswordEntryRowOverrides
- type PreferencesDialog
- func (self *PreferencesDialog) Add(page *PreferencesPage)
- func (self *PreferencesDialog) AddToast(toast *Toast)
- func (self *PreferencesDialog) PopSubpage() bool
- func (self *PreferencesDialog) PushSubpage(page *NavigationPage)
- func (self *PreferencesDialog) Remove(page *PreferencesPage)
- func (self *PreferencesDialog) SearchEnabled() bool
- func (self *PreferencesDialog) SetSearchEnabled(searchEnabled bool)
- func (self *PreferencesDialog) SetVisiblePage(page *PreferencesPage)
- func (self *PreferencesDialog) SetVisiblePageName(name string)
- func (self *PreferencesDialog) VisiblePage() *PreferencesPage
- func (self *PreferencesDialog) VisiblePageName() string
- type PreferencesDialogClass
- type PreferencesDialogOverrides
- type PreferencesGroup
- func (self *PreferencesGroup) Add(child gtk.Widgetter)
- func (self *PreferencesGroup) Description() string
- func (self *PreferencesGroup) HeaderSuffix() gtk.Widgetter
- func (self *PreferencesGroup) Remove(child gtk.Widgetter)
- func (self *PreferencesGroup) SetDescription(description string)
- func (self *PreferencesGroup) SetHeaderSuffix(suffix gtk.Widgetter)
- func (self *PreferencesGroup) SetTitle(title string)
- func (self *PreferencesGroup) Title() string
- type PreferencesGroupClass
- type PreferencesGroupOverrides
- type PreferencesPage
- func (self *PreferencesPage) Add(group *PreferencesGroup)
- func (self *PreferencesPage) Description() string
- func (self *PreferencesPage) IconName() string
- func (self *PreferencesPage) Name() string
- func (self *PreferencesPage) Remove(group *PreferencesGroup)
- func (self *PreferencesPage) ScrollToTop()
- func (self *PreferencesPage) SetDescription(description string)
- func (self *PreferencesPage) SetIconName(iconName string)
- func (self *PreferencesPage) SetName(name string)
- func (self *PreferencesPage) SetTitle(title string)
- func (self *PreferencesPage) SetUseUnderline(useUnderline bool)
- func (self *PreferencesPage) Title() string
- func (self *PreferencesPage) UseUnderline() bool
- type PreferencesPageClass
- type PreferencesPageOverrides
- type PreferencesRow
- func (self *PreferencesRow) SetTitle(title string)
- func (self *PreferencesRow) SetTitleSelectable(titleSelectable bool)
- func (self *PreferencesRow) SetUseMarkup(useMarkup bool)
- func (self *PreferencesRow) SetUseUnderline(useUnderline bool)
- func (self *PreferencesRow) Title() string
- func (self *PreferencesRow) TitleSelectable() bool
- func (self *PreferencesRow) UseMarkup() bool
- func (self *PreferencesRow) UseUnderline() bool
- type PreferencesRowClass
- type PreferencesRowOverrides
- type PreferencesWindow
- func (self *PreferencesWindow) Add(page *PreferencesPage)
- func (self *PreferencesWindow) AddToast(toast *Toast)
- func (self *PreferencesWindow) CanNavigateBack() booldeprecated
- func (self *PreferencesWindow) CloseSubpage()deprecated
- func (self *PreferencesWindow) PopSubpage() bool
- func (self *PreferencesWindow) PresentSubpage(subpage gtk.Widgetter)deprecated
- func (self *PreferencesWindow) PushSubpage(page *NavigationPage)
- func (self *PreferencesWindow) Remove(page *PreferencesPage)
- func (self *PreferencesWindow) SearchEnabled() bool
- func (self *PreferencesWindow) SetCanNavigateBack(canNavigateBack bool)deprecated
- func (self *PreferencesWindow) SetSearchEnabled(searchEnabled bool)
- func (self *PreferencesWindow) SetVisiblePage(page *PreferencesPage)
- func (self *PreferencesWindow) SetVisiblePageName(name string)
- func (self *PreferencesWindow) VisiblePage() *PreferencesPage
- func (self *PreferencesWindow) VisiblePageName() string
- type PreferencesWindowClass
- type PreferencesWindowOverrides
- type PropertyAnimationTarget
- type ResponseAppearance
- type SpinRow
- func (self *SpinRow) Adjustment() *gtk.Adjustment
- func (self *SpinRow) ClimbRate() float64
- func (self *SpinRow) Configure(adjustment *gtk.Adjustment, climbRate float64, digits uint)
- func (self *SpinRow) ConnectOutput(f func() (ok bool)) coreglib.SignalHandle
- func (self *SpinRow) ConnectWrapped(f func()) coreglib.SignalHandle
- func (self *SpinRow) Digits() uint
- func (self *SpinRow) Numeric() bool
- func (self *SpinRow) SetAdjustment(adjustment *gtk.Adjustment)
- func (self *SpinRow) SetClimbRate(climbRate float64)
- func (self *SpinRow) SetDigits(digits uint)
- func (self *SpinRow) SetNumeric(numeric bool)
- func (self *SpinRow) SetRange(min, max float64)
- func (self *SpinRow) SetSnapToTicks(snapToTicks bool)
- func (self *SpinRow) SetUpdatePolicy(policy gtk.SpinButtonUpdatePolicy)
- func (self *SpinRow) SetValue(value float64)
- func (self *SpinRow) SetWrap(wrap bool)
- func (self *SpinRow) SnapToTicks() bool
- func (self *SpinRow) Update()
- func (self *SpinRow) UpdatePolicy() gtk.SpinButtonUpdatePolicy
- func (self *SpinRow) Value() float64
- func (self *SpinRow) Wrap() bool
- type SpinRowClass
- type SpinRowOverrides
- type SplitButton
- func (self *SplitButton) CanShrink() bool
- func (self *SplitButton) Child() gtk.Widgetter
- func (self *SplitButton) ConnectActivate(f func()) coreglib.SignalHandle
- func (self *SplitButton) ConnectClicked(f func()) coreglib.SignalHandle
- func (self *SplitButton) Direction() gtk.ArrowType
- func (self *SplitButton) DropdownTooltip() string
- func (self *SplitButton) IconName() string
- func (self *SplitButton) Label() string
- func (self *SplitButton) MenuModel() gio.MenuModeller
- func (self *SplitButton) Popdown()
- func (self *SplitButton) Popover() *gtk.Popover
- func (self *SplitButton) Popup()
- func (self *SplitButton) SetCanShrink(canShrink bool)
- func (self *SplitButton) SetChild(child gtk.Widgetter)
- func (self *SplitButton) SetDirection(direction gtk.ArrowType)
- func (self *SplitButton) SetDropdownTooltip(tooltip string)
- func (self *SplitButton) SetIconName(iconName string)
- func (self *SplitButton) SetLabel(label string)
- func (self *SplitButton) SetMenuModel(menuModel gio.MenuModeller)
- func (self *SplitButton) SetPopover(popover *gtk.Popover)
- func (self *SplitButton) SetUseUnderline(useUnderline bool)
- func (self *SplitButton) UseUnderline() bool
- type SplitButtonClass
- type SplitButtonOverrides
- type SpringAnimation
- func (self *SpringAnimation) CalculateValue(time uint) float64
- func (self *SpringAnimation) CalculateVelocity(time uint) float64
- func (self *SpringAnimation) Clamp() bool
- func (self *SpringAnimation) Epsilon() float64
- func (self *SpringAnimation) EstimatedDuration() uint
- func (self *SpringAnimation) InitialVelocity() float64
- func (self *SpringAnimation) SetClamp(clamp bool)
- func (self *SpringAnimation) SetEpsilon(epsilon float64)
- func (self *SpringAnimation) SetInitialVelocity(velocity float64)
- func (self *SpringAnimation) SetSpringParams(springParams *SpringParams)
- func (self *SpringAnimation) SetValueFrom(value float64)
- func (self *SpringAnimation) SetValueTo(value float64)
- func (self *SpringAnimation) SpringParams() *SpringParams
- func (self *SpringAnimation) ValueFrom() float64
- func (self *SpringAnimation) ValueTo() float64
- func (self *SpringAnimation) Velocity() float64
- type SpringParams
- type Squeezerdeprecated
- func NewSqueezer() *Squeezerdeprecated
- func (self *Squeezer) Add(child gtk.Widgetter) *SqueezerPagedeprecated
- func (self *Squeezer) AllowNone() booldeprecated
- func (self *Squeezer) Homogeneous() booldeprecated
- func (self *Squeezer) InterpolateSize() booldeprecated
- func (self *Squeezer) Page(child gtk.Widgetter) *SqueezerPagedeprecated
- func (self *Squeezer) Pages() *gtk.SelectionModeldeprecated
- func (self *Squeezer) Remove(child gtk.Widgetter)deprecated
- func (self *Squeezer) SetAllowNone(allowNone bool)deprecated
- func (self *Squeezer) SetHomogeneous(homogeneous bool)deprecated
- func (self *Squeezer) SetInterpolateSize(interpolateSize bool)deprecated
- func (self *Squeezer) SetSwitchThresholdPolicy(policy FoldThresholdPolicy)deprecated
- func (self *Squeezer) SetTransitionDuration(duration uint)deprecated
- func (self *Squeezer) SetTransitionType(transition SqueezerTransitionType)deprecated
- func (self *Squeezer) SetXAlign(xalign float32)deprecated
- func (self *Squeezer) SetYAlign(yalign float32)deprecated
- func (self *Squeezer) SwitchThresholdPolicy() FoldThresholdPolicydeprecated
- func (self *Squeezer) TransitionDuration() uintdeprecated
- func (self *Squeezer) TransitionRunning() booldeprecated
- func (self *Squeezer) TransitionType() SqueezerTransitionTypedeprecated
- func (self *Squeezer) VisibleChild() gtk.Widgetterdeprecated
- func (self *Squeezer) XAlign() float32deprecated
- func (self *Squeezer) YAlign() float32deprecated
- type SqueezerClass
- type SqueezerOverrides
- type SqueezerPagedeprecated
- type SqueezerPageClass
- type SqueezerPageOverrides
- type SqueezerTransitionTypedeprecated
- type StatusPage
- func (self *StatusPage) Child() gtk.Widgetter
- func (self *StatusPage) Description() string
- func (self *StatusPage) IconName() string
- func (self *StatusPage) Paintable() *gdk.Paintable
- func (self *StatusPage) SetChild(child gtk.Widgetter)
- func (self *StatusPage) SetDescription(description string)
- func (self *StatusPage) SetIconName(iconName string)
- func (self *StatusPage) SetPaintable(paintable gdk.Paintabler)
- func (self *StatusPage) SetTitle(title string)
- func (self *StatusPage) Title() string
- type StatusPageClass
- type StatusPageOverrides
- type StyleManager
- func (self *StyleManager) ColorScheme() ColorScheme
- func (self *StyleManager) Dark() bool
- func (self *StyleManager) Display() *gdk.Display
- func (self *StyleManager) HighContrast() bool
- func (self *StyleManager) SetColorScheme(colorScheme ColorScheme)
- func (self *StyleManager) SystemSupportsColorSchemes() bool
- type StyleManagerClass
- type StyleManagerOverrides
- type SwipeTracker
- func (self *SwipeTracker) AllowLongSwipes() bool
- func (self *SwipeTracker) AllowMouseDrag() bool
- func (self *SwipeTracker) AllowWindowHandle() bool
- func (self *SwipeTracker) ConnectBeginSwipe(f func()) coreglib.SignalHandle
- func (self *SwipeTracker) ConnectEndSwipe(f func(velocity, to float64)) coreglib.SignalHandle
- func (self *SwipeTracker) ConnectPrepare(f func(direction NavigationDirection)) coreglib.SignalHandle
- func (self *SwipeTracker) ConnectUpdateSwipe(f func(progress float64)) coreglib.SignalHandle
- func (self *SwipeTracker) Enabled() bool
- func (self *SwipeTracker) LowerOvershoot() bool
- func (self *SwipeTracker) Reversed() bool
- func (self *SwipeTracker) SetAllowLongSwipes(allowLongSwipes bool)
- func (self *SwipeTracker) SetAllowMouseDrag(allowMouseDrag bool)
- func (self *SwipeTracker) SetAllowWindowHandle(allowWindowHandle bool)
- func (self *SwipeTracker) SetEnabled(enabled bool)
- func (self *SwipeTracker) SetLowerOvershoot(overshoot bool)
- func (self *SwipeTracker) SetReversed(reversed bool)
- func (self *SwipeTracker) SetUpperOvershoot(overshoot bool)
- func (self *SwipeTracker) ShiftPosition(delta float64)
- func (self *SwipeTracker) Swipeable() *Swipeable
- func (self *SwipeTracker) UpperOvershoot() bool
- type SwipeTrackerClass
- type SwipeTrackerOverrides
- type Swipeable
- type SwipeableInterface
- type Swipeabler
- type SwitchRow
- type SwitchRowClass
- type SwitchRowOverrides
- type TabBar
- func (self *TabBar) Autohide() bool
- func (self *TabBar) ConnectExtraDragDrop(f func(page *TabPage, value *coreglib.Value) (ok bool)) coreglib.SignalHandle
- func (self *TabBar) ConnectExtraDragValue(f func(page *TabPage, value *coreglib.Value) (dragAction gdk.DragAction)) coreglib.SignalHandle
- func (self *TabBar) EndActionWidget() gtk.Widgetter
- func (self *TabBar) ExpandTabs() bool
- func (self *TabBar) ExtraDragPreferredAction() gdk.DragAction
- func (self *TabBar) ExtraDragPreload() bool
- func (self *TabBar) Inverted() bool
- func (self *TabBar) IsOverflowing() bool
- func (self *TabBar) SetAutohide(autohide bool)
- func (self *TabBar) SetEndActionWidget(widget gtk.Widgetter)
- func (self *TabBar) SetExpandTabs(expandTabs bool)
- func (self *TabBar) SetExtraDragPreload(preload bool)
- func (self *TabBar) SetInverted(inverted bool)
- func (self *TabBar) SetStartActionWidget(widget gtk.Widgetter)
- func (self *TabBar) SetView(view *TabView)
- func (self *TabBar) SetupExtraDropTarget(actions gdk.DragAction, types []coreglib.Type)
- func (self *TabBar) StartActionWidget() gtk.Widgetter
- func (self *TabBar) TabsRevealed() bool
- func (self *TabBar) View() *TabView
- type TabBarClass
- type TabBarOverrides
- type TabButton
- type TabButtonClass
- type TabButtonOverrides
- type TabOverview
- func (self *TabOverview) Child() gtk.Widgetter
- func (self *TabOverview) ConnectCreateTab(f func() (tabPage *TabPage)) coreglib.SignalHandle
- func (self *TabOverview) ConnectExtraDragDrop(f func(page *TabPage, value *coreglib.Value) (ok bool)) coreglib.SignalHandle
- func (self *TabOverview) ConnectExtraDragValue(f func(page *TabPage, value *coreglib.Value) (dragAction gdk.DragAction)) coreglib.SignalHandle
- func (self *TabOverview) EnableNewTab() bool
- func (self *TabOverview) EnableSearch() bool
- func (self *TabOverview) ExtraDragPreferredAction() gdk.DragAction
- func (self *TabOverview) ExtraDragPreload() bool
- func (self *TabOverview) Inverted() bool
- func (self *TabOverview) Open() bool
- func (self *TabOverview) SearchActive() bool
- func (self *TabOverview) SecondaryMenu() gio.MenuModeller
- func (self *TabOverview) SetChild(child gtk.Widgetter)
- func (self *TabOverview) SetEnableNewTab(enableNewTab bool)
- func (self *TabOverview) SetEnableSearch(enableSearch bool)
- func (self *TabOverview) SetExtraDragPreload(preload bool)
- func (self *TabOverview) SetInverted(inverted bool)
- func (self *TabOverview) SetOpen(open bool)
- func (self *TabOverview) SetSecondaryMenu(secondaryMenu gio.MenuModeller)
- func (self *TabOverview) SetShowEndTitleButtons(showEndTitleButtons bool)
- func (self *TabOverview) SetShowStartTitleButtons(showStartTitleButtons bool)
- func (self *TabOverview) SetView(view *TabView)
- func (self *TabOverview) SetupExtraDropTarget(actions gdk.DragAction, types []coreglib.Type)
- func (self *TabOverview) ShowEndTitleButtons() bool
- func (self *TabOverview) ShowStartTitleButtons() bool
- func (self *TabOverview) View() *TabView
- type TabOverviewClass
- type TabOverviewOverrides
- type TabPage
- func (self *TabPage) Child() gtk.Widgetter
- func (self *TabPage) Icon() *gio.Icon
- func (self *TabPage) IndicatorActivatable() bool
- func (self *TabPage) IndicatorIcon() *gio.Icon
- func (self *TabPage) IndicatorTooltip() string
- func (self *TabPage) InvalidateThumbnail()
- func (self *TabPage) Keyword() string
- func (self *TabPage) LiveThumbnail() bool
- func (self *TabPage) Loading() bool
- func (self *TabPage) NeedsAttention() bool
- func (self *TabPage) Parent() *TabPage
- func (self *TabPage) Pinned() bool
- func (self *TabPage) Selected() bool
- func (self *TabPage) SetIcon(icon gio.Iconner)
- func (self *TabPage) SetIndicatorActivatable(activatable bool)
- func (self *TabPage) SetIndicatorIcon(indicatorIcon gio.Iconner)
- func (self *TabPage) SetIndicatorTooltip(tooltip string)
- func (self *TabPage) SetKeyword(keyword string)
- func (self *TabPage) SetLiveThumbnail(liveThumbnail bool)
- func (self *TabPage) SetLoading(loading bool)
- func (self *TabPage) SetNeedsAttention(needsAttention bool)
- func (self *TabPage) SetThumbnailXAlign(xalign float32)
- func (self *TabPage) SetThumbnailYAlign(yalign float32)
- func (self *TabPage) SetTitle(title string)
- func (self *TabPage) SetTooltip(tooltip string)
- func (self *TabPage) ThumbnailXAlign() float32
- func (self *TabPage) ThumbnailYAlign() float32
- func (self *TabPage) Title() string
- func (self *TabPage) Tooltip() string
- type TabPageClass
- type TabPageOverrides
- type TabView
- func (self *TabView) AddPage(child gtk.Widgetter, parent *TabPage) *TabPage
- func (self *TabView) AddShortcuts(shortcuts TabViewShortcuts)
- func (self *TabView) Append(child gtk.Widgetter) *TabPage
- func (self *TabView) AppendPinned(child gtk.Widgetter) *TabPage
- func (self *TabView) CloseOtherPages(page *TabPage)
- func (self *TabView) ClosePage(page *TabPage)
- func (self *TabView) ClosePageFinish(page *TabPage, confirm bool)
- func (self *TabView) ClosePagesAfter(page *TabPage)
- func (self *TabView) ClosePagesBefore(page *TabPage)
- func (self *TabView) ConnectClosePage(f func(page *TabPage) (ok bool)) coreglib.SignalHandle
- func (self *TabView) ConnectCreateWindow(f func() (tabView *TabView)) coreglib.SignalHandle
- func (self *TabView) ConnectIndicatorActivated(f func(page *TabPage)) coreglib.SignalHandle
- func (self *TabView) ConnectPageAttached(f func(page *TabPage, position int)) coreglib.SignalHandle
- func (self *TabView) ConnectPageDetached(f func(page *TabPage, position int)) coreglib.SignalHandle
- func (self *TabView) ConnectPageReordered(f func(page *TabPage, position int)) coreglib.SignalHandle
- func (self *TabView) ConnectSetupMenu(f func(page *TabPage)) coreglib.SignalHandle
- func (self *TabView) DefaultIcon() *gio.Icon
- func (self *TabView) Insert(child gtk.Widgetter, position int) *TabPage
- func (self *TabView) InsertPinned(child gtk.Widgetter, position int) *TabPage
- func (self *TabView) InvalidateThumbnails()
- func (self *TabView) IsTransferringPage() bool
- func (self *TabView) MenuModel() gio.MenuModeller
- func (self *TabView) NPages() int
- func (self *TabView) NPinnedPages() int
- func (self *TabView) NthPage(position int) *TabPage
- func (self *TabView) Page(child gtk.Widgetter) *TabPage
- func (self *TabView) PagePosition(page *TabPage) int
- func (self *TabView) Pages() *gtk.SelectionModel
- func (self *TabView) Prepend(child gtk.Widgetter) *TabPage
- func (self *TabView) PrependPinned(child gtk.Widgetter) *TabPage
- func (self *TabView) RemoveShortcuts(shortcuts TabViewShortcuts)
- func (self *TabView) ReorderBackward(page *TabPage) bool
- func (self *TabView) ReorderFirst(page *TabPage) bool
- func (self *TabView) ReorderForward(page *TabPage) bool
- func (self *TabView) ReorderLast(page *TabPage) bool
- func (self *TabView) ReorderPage(page *TabPage, position int) bool
- func (self *TabView) SelectNextPage() bool
- func (self *TabView) SelectPreviousPage() bool
- func (self *TabView) SelectedPage() *TabPage
- func (self *TabView) SetDefaultIcon(defaultIcon gio.Iconner)
- func (self *TabView) SetMenuModel(menuModel gio.MenuModeller)
- func (self *TabView) SetPagePinned(page *TabPage, pinned bool)
- func (self *TabView) SetSelectedPage(selectedPage *TabPage)
- func (self *TabView) SetShortcuts(shortcuts TabViewShortcuts)
- func (self *TabView) Shortcuts() TabViewShortcuts
- func (self *TabView) TransferPage(page *TabPage, otherView *TabView, position int)
- type TabViewClass
- type TabViewOverrides
- type TabViewShortcuts
- type TimedAnimation
- func (self *TimedAnimation) Alternate() bool
- func (self *TimedAnimation) Duration() uint
- func (self *TimedAnimation) Easing() Easing
- func (self *TimedAnimation) RepeatCount() uint
- func (self *TimedAnimation) Reverse() bool
- func (self *TimedAnimation) SetAlternate(alternate bool)
- func (self *TimedAnimation) SetDuration(duration uint)
- func (self *TimedAnimation) SetEasing(easing Easing)
- func (self *TimedAnimation) SetRepeatCount(repeatCount uint)
- func (self *TimedAnimation) SetReverse(reverse bool)
- func (self *TimedAnimation) SetValueFrom(value float64)
- func (self *TimedAnimation) SetValueTo(value float64)
- func (self *TimedAnimation) ValueFrom() float64
- func (self *TimedAnimation) ValueTo() float64
- type Toast
- func (self *Toast) ActionName() string
- func (self *Toast) ActionTargetValue() *glib.Variant
- func (self *Toast) ButtonLabel() string
- func (self *Toast) ConnectButtonClicked(f func()) coreglib.SignalHandle
- func (self *Toast) ConnectDismissed(f func()) coreglib.SignalHandle
- func (self *Toast) CustomTitle() gtk.Widgetter
- func (self *Toast) Dismiss()
- func (self *Toast) Priority() ToastPriority
- func (self *Toast) SetActionName(actionName string)
- func (self *Toast) SetActionTargetValue(actionTarget *glib.Variant)
- func (self *Toast) SetButtonLabel(buttonLabel string)
- func (self *Toast) SetCustomTitle(widget gtk.Widgetter)
- func (self *Toast) SetDetailedActionName(detailedActionName string)
- func (self *Toast) SetPriority(priority ToastPriority)
- func (self *Toast) SetTimeout(timeout uint)
- func (self *Toast) SetTitle(title string)
- func (self *Toast) SetUseMarkup(useMarkup bool)
- func (self *Toast) Timeout() uint
- func (self *Toast) Title() string
- func (self *Toast) UseMarkup() bool
- type ToastClass
- type ToastOverlay
- type ToastOverlayClass
- type ToastOverlayOverrides
- type ToastOverrides
- type ToastPriority
- type ToolbarStyle
- type ToolbarView
- func (self *ToolbarView) AddBottomBar(widget gtk.Widgetter)
- func (self *ToolbarView) AddTopBar(widget gtk.Widgetter)
- func (self *ToolbarView) BottomBarHeight() int
- func (self *ToolbarView) BottomBarStyle() ToolbarStyle
- func (self *ToolbarView) Content() gtk.Widgetter
- func (self *ToolbarView) ExtendContentToBottomEdge() bool
- func (self *ToolbarView) ExtendContentToTopEdge() bool
- func (self *ToolbarView) Remove(widget gtk.Widgetter)
- func (self *ToolbarView) RevealBottomBars() bool
- func (self *ToolbarView) RevealTopBars() bool
- func (self *ToolbarView) SetBottomBarStyle(style ToolbarStyle)
- func (self *ToolbarView) SetContent(content gtk.Widgetter)
- func (self *ToolbarView) SetExtendContentToBottomEdge(extend bool)
- func (self *ToolbarView) SetExtendContentToTopEdge(extend bool)
- func (self *ToolbarView) SetRevealBottomBars(reveal bool)
- func (self *ToolbarView) SetRevealTopBars(reveal bool)
- func (self *ToolbarView) SetTopBarStyle(style ToolbarStyle)
- func (self *ToolbarView) TopBarHeight() int
- func (self *ToolbarView) TopBarStyle() ToolbarStyle
- type ToolbarViewClass
- type ToolbarViewOverrides
- type ViewStack
- func (self *ViewStack) Add(child gtk.Widgetter) *ViewStackPage
- func (self *ViewStack) AddNamed(child gtk.Widgetter, name string) *ViewStackPage
- func (self *ViewStack) AddTitled(child gtk.Widgetter, name, title string) *ViewStackPage
- func (self *ViewStack) AddTitledWithIcon(child gtk.Widgetter, name, title, iconName string) *ViewStackPage
- func (self *ViewStack) ChildByName(name string) gtk.Widgetter
- func (self *ViewStack) Hhomogeneous() bool
- func (self *ViewStack) Page(child gtk.Widgetter) *ViewStackPage
- func (self *ViewStack) Pages() *gtk.SelectionModel
- func (self *ViewStack) Remove(child gtk.Widgetter)
- func (self *ViewStack) SetHhomogeneous(hhomogeneous bool)
- func (self *ViewStack) SetVhomogeneous(vhomogeneous bool)
- func (self *ViewStack) SetVisibleChild(child gtk.Widgetter)
- func (self *ViewStack) SetVisibleChildName(name string)
- func (self *ViewStack) Vhomogeneous() bool
- func (self *ViewStack) VisibleChild() gtk.Widgetter
- func (self *ViewStack) VisibleChildName() string
- type ViewStackClass
- type ViewStackOverrides
- type ViewStackPage
- func (self *ViewStackPage) BadgeNumber() uint
- func (self *ViewStackPage) Child() gtk.Widgetter
- func (self *ViewStackPage) IconName() string
- func (self *ViewStackPage) Name() string
- func (self *ViewStackPage) NeedsAttention() bool
- func (self *ViewStackPage) SetBadgeNumber(badgeNumber uint)
- func (self *ViewStackPage) SetIconName(iconName string)
- func (self *ViewStackPage) SetName(name string)
- func (self *ViewStackPage) SetNeedsAttention(needsAttention bool)
- func (self *ViewStackPage) SetTitle(title string)
- func (self *ViewStackPage) SetUseUnderline(useUnderline bool)
- func (self *ViewStackPage) SetVisible(visible bool)
- func (self *ViewStackPage) Title() string
- func (self *ViewStackPage) UseUnderline() bool
- func (self *ViewStackPage) Visible() bool
- type ViewStackPageClass
- type ViewStackPageOverrides
- type ViewStackPages
- type ViewStackPagesClass
- type ViewStackPagesOverrides
- type ViewSwitcher
- type ViewSwitcherBar
- type ViewSwitcherBarClass
- type ViewSwitcherBarOverrides
- type ViewSwitcherClass
- type ViewSwitcherOverrides
- type ViewSwitcherPolicy
- type ViewSwitcherTitledeprecated
- func (self *ViewSwitcherTitle) SetStack(stack *ViewStack)deprecated
- func (self *ViewSwitcherTitle) SetSubtitle(subtitle string)deprecated
- func (self *ViewSwitcherTitle) SetTitle(title string)deprecated
- func (self *ViewSwitcherTitle) SetViewSwitcherEnabled(enabled bool)deprecated
- func (self *ViewSwitcherTitle) Stack() *ViewStackdeprecated
- func (self *ViewSwitcherTitle) Subtitle() stringdeprecated
- func (self *ViewSwitcherTitle) Title() stringdeprecated
- func (self *ViewSwitcherTitle) TitleVisible() booldeprecated
- func (self *ViewSwitcherTitle) ViewSwitcherEnabled() booldeprecated
- type ViewSwitcherTitleClass
- type ViewSwitcherTitleOverrides
- type Window
- type WindowClass
- type WindowOverrides
- type WindowTitle
- type WindowTitleClass
- type WindowTitleOverrides
Constants ¶
const DURATION_INFINITE = 4294967295
DURATION_INFINITE indicates an animation with an infinite duration.
This value is mostly used internally.
const MAJOR_VERSION = 1
MAJOR_VERSION: adwaita major version component (e.g. 1 if the version is 1.2.3).
const MICRO_VERSION = 1
MICRO_VERSION: adwaita micro version component (e.g. 3 if the version is 1.2.3).
const MINOR_VERSION = 5
MINOR_VERSION: adwaita minor version component (e.g. 2 if the version is 1.2.3).
const VERSION_S = "1.5.1"
VERSION_S: adwaita version, encoded as a string, useful for printing and concatenation.
Variables ¶
var ( GTypeAnimationTarget = coreglib.Type(C.adw_animation_target_get_type()) GTypeCallbackAnimationTarget = coreglib.Type(C.adw_callback_animation_target_get_type()) )
GType values.
var ( GTypeAnimationState = coreglib.Type(C.adw_animation_state_get_type()) GTypeAnimation = coreglib.Type(C.adw_animation_get_type()) )
GType values.
var ( GTypeBreakpointConditionLengthType = coreglib.Type(C.adw_breakpoint_condition_length_type_get_type()) GTypeBreakpointConditionRatioType = coreglib.Type(C.adw_breakpoint_condition_ratio_type_get_type()) GTypeBreakpoint = coreglib.Type(C.adw_breakpoint_get_type()) GTypeBreakpointCondition = coreglib.Type(C.adw_breakpoint_condition_get_type()) )
GType values.
var ( GTypeDialogPresentationMode = coreglib.Type(C.adw_dialog_presentation_mode_get_type()) GTypeDialog = coreglib.Type(C.adw_dialog_get_type()) )
GType values.
var ( GTypeEnumListItem = coreglib.Type(C.adw_enum_list_item_get_type()) GTypeEnumListModel = coreglib.Type(C.adw_enum_list_model_get_type()) )
GType values.
var ( GTypeFlapFoldPolicy = coreglib.Type(C.adw_flap_fold_policy_get_type()) GTypeFlapTransitionType = coreglib.Type(C.adw_flap_transition_type_get_type()) GTypeFlap = coreglib.Type(C.adw_flap_get_type()) )
GType values.
var ( GTypeCenteringPolicy = coreglib.Type(C.adw_centering_policy_get_type()) GTypeHeaderBar = coreglib.Type(C.adw_header_bar_get_type()) )
GType values.
var ( GTypeLeafletTransitionType = coreglib.Type(C.adw_leaflet_transition_type_get_type()) GTypeLeaflet = coreglib.Type(C.adw_leaflet_get_type()) GTypeLeafletPage = coreglib.Type(C.adw_leaflet_page_get_type()) )
GType values.
var ()
GType values.
var ( GTypeSqueezerTransitionType = coreglib.Type(C.adw_squeezer_transition_type_get_type()) GTypeSqueezer = coreglib.Type(C.adw_squeezer_get_type()) GTypeSqueezerPage = coreglib.Type(C.adw_squeezer_page_get_type()) )
GType values.
var ( GTypeColorScheme = coreglib.Type(C.adw_color_scheme_get_type()) GTypeStyleManager = coreglib.Type(C.adw_style_manager_get_type()) )
GType values.
var ( GTypeTabPage = coreglib.Type(C.adw_tab_page_get_type()) GTypeTabView = coreglib.Type(C.adw_tab_view_get_type()) )
GType values.
var ( GTypeToastPriority = coreglib.Type(C.adw_toast_priority_get_type()) GTypeToast = coreglib.Type(C.adw_toast_get_type()) )
GType values.
var ( GTypeToolbarStyle = coreglib.Type(C.adw_toolbar_style_get_type()) GTypeToolbarView = coreglib.Type(C.adw_toolbar_view_get_type()) )
GType values.
var ( GTypeViewStack = coreglib.Type(C.adw_view_stack_get_type()) GTypeViewStackPage = coreglib.Type(C.adw_view_stack_page_get_type()) )
GType values.
var ( GTypeViewSwitcherPolicy = coreglib.Type(C.adw_view_switcher_policy_get_type()) GTypeViewSwitcher = coreglib.Type(C.adw_view_switcher_get_type()) )
GType values.
var (
GTypeAboutDialog = coreglib.Type(C.adw_about_dialog_get_type())
)
GType values.
var (
GTypeAboutWindow = coreglib.Type(C.adw_about_window_get_type())
)
GType values.
var (
GTypeActionRow = coreglib.Type(C.adw_action_row_get_type())
)
GType values.
var (
GTypeAlertDialog = coreglib.Type(C.adw_alert_dialog_get_type())
)
GType values.
var (
GTypeApplication = coreglib.Type(C.adw_application_get_type())
)
GType values.
var (
GTypeApplicationWindow = coreglib.Type(C.adw_application_window_get_type())
)
GType values.
var (
GTypeAvatar = coreglib.Type(C.adw_avatar_get_type())
)
GType values.
var (
GTypeBanner = coreglib.Type(C.adw_banner_get_type())
)
GType values.
var (
GTypeBin = coreglib.Type(C.adw_bin_get_type())
)
GType values.
var (
GTypeBreakpointBin = coreglib.Type(C.adw_breakpoint_bin_get_type())
)
GType values.
var (
GTypeButtonContent = coreglib.Type(C.adw_button_content_get_type())
)
GType values.
var (
GTypeCarousel = coreglib.Type(C.adw_carousel_get_type())
)
GType values.
var (
GTypeCarouselIndicatorDots = coreglib.Type(C.adw_carousel_indicator_dots_get_type())
)
GType values.
var (
GTypeCarouselIndicatorLines = coreglib.Type(C.adw_carousel_indicator_lines_get_type())
)
GType values.
var (
GTypeClamp = coreglib.Type(C.adw_clamp_get_type())
)
GType values.
var (
GTypeClampLayout = coreglib.Type(C.adw_clamp_layout_get_type())
)
GType values.
var (
GTypeClampScrollable = coreglib.Type(C.adw_clamp_scrollable_get_type())
)
GType values.
var (
GTypeComboRow = coreglib.Type(C.adw_combo_row_get_type())
)
GType values.
var (
GTypeEasing = coreglib.Type(C.adw_easing_get_type())
)
GType values.
var (
GTypeEntryRow = coreglib.Type(C.adw_entry_row_get_type())
)
GType values.
var (
GTypeExpanderRow = coreglib.Type(C.adw_expander_row_get_type())
)
GType values.
var (
GTypeFoldThresholdPolicy = coreglib.Type(C.adw_fold_threshold_policy_get_type())
)
GType values.
var (
GTypeLengthUnit = coreglib.Type(C.adw_length_unit_get_type())
)
GType values.
var (
GTypeMessageDialog = coreglib.Type(C.adw_message_dialog_get_type())
)
GType values.
var (
)GType values.
var (
)GType values.
var (
GTypeOverlaySplitView = coreglib.Type(C.adw_overlay_split_view_get_type())
)
GType values.
var (
GTypePasswordEntryRow = coreglib.Type(C.adw_password_entry_row_get_type())
)
GType values.
var (
GTypePreferencesDialog = coreglib.Type(C.adw_preferences_dialog_get_type())
)
GType values.
var (
GTypePreferencesGroup = coreglib.Type(C.adw_preferences_group_get_type())
)
GType values.
var (
GTypePreferencesPage = coreglib.Type(C.adw_preferences_page_get_type())
)
GType values.
var (
GTypePreferencesRow = coreglib.Type(C.adw_preferences_row_get_type())
)
GType values.
var (
GTypePreferencesWindow = coreglib.Type(C.adw_preferences_window_get_type())
)
GType values.
var (
GTypePropertyAnimationTarget = coreglib.Type(C.adw_property_animation_target_get_type())
)
GType values.
var (
GTypeResponseAppearance = coreglib.Type(C.adw_response_appearance_get_type())
)
GType values.
var (
GTypeSpinRow = coreglib.Type(C.adw_spin_row_get_type())
)
GType values.
var (
GTypeSplitButton = coreglib.Type(C.adw_split_button_get_type())
)
GType values.
var (
GTypeSpringAnimation = coreglib.Type(C.adw_spring_animation_get_type())
)
GType values.
var (
GTypeSpringParams = coreglib.Type(C.adw_spring_params_get_type())
)
GType values.
var (
GTypeStatusPage = coreglib.Type(C.adw_status_page_get_type())
)
GType values.
var (
GTypeSwipeTracker = coreglib.Type(C.adw_swipe_tracker_get_type())
)
GType values.
var (
GTypeSwipeable = coreglib.Type(C.adw_swipeable_get_type())
)
GType values.
var (
GTypeSwitchRow = coreglib.Type(C.adw_switch_row_get_type())
)
GType values.
var (
GTypeTabBar = coreglib.Type(C.adw_tab_bar_get_type())
)
GType values.
var (
GTypeTabButton = coreglib.Type(C.adw_tab_button_get_type())
)
GType values.
var (
GTypeTabOverview = coreglib.Type(C.adw_tab_overview_get_type())
)
GType values.
var (
GTypeTabViewShortcuts = coreglib.Type(C.adw_tab_view_shortcuts_get_type())
)
GType values.
var (
GTypeTimedAnimation = coreglib.Type(C.adw_timed_animation_get_type())
)
GType values.
var (
GTypeToastOverlay = coreglib.Type(C.adw_toast_overlay_get_type())
)
GType values.
var (
GTypeViewStackPages = coreglib.Type(C.adw_view_stack_pages_get_type())
)
GType values.
var (
GTypeViewSwitcherBar = coreglib.Type(C.adw_view_switcher_bar_get_type())
)
GType values.
var (
GTypeViewSwitcherTitle = coreglib.Type(C.adw_view_switcher_title_get_type())
)
GType values.
var (
GTypeWindow = coreglib.Type(C.adw_window_get_type())
)
GType values.
var (
GTypeWindowTitle = coreglib.Type(C.adw_window_title_get_type())
)
GType values.
Functions ¶
func EasingEase ¶
EasingEase computes easing with easing for value.
value should generally be in the [0, 1] range.
The function takes the following parameters:
- self: easing value.
- value to ease.
The function returns the following values:
- gdouble: easing for value.
func GetEnableAnimations ¶
func GetEnableAnimations(widget gtk.Widgetter) bool
GetEnableAnimations checks whether animations are enabled for widget.
This should be used when implementing an animated widget to know whether to animate it or not.
The function takes the following parameters:
- widget: GtkWidget.
The function returns the following values:
- ok: whether animations are enabled for widget.
func GetMajorVersion ¶
func GetMajorVersion() uint
GetMajorVersion returns the major version number of the Adwaita library.
For example, in libadwaita version 1.2.3 this is 1.
This function is in the library, so it represents the libadwaita library your code is running against. Contrast with the major_version constant, which represents the major version of the libadwaita headers you have included when compiling your code.
The function returns the following values:
- guint: major version number of the Adwaita library.
func GetMicroVersion ¶
func GetMicroVersion() uint
GetMicroVersion returns the micro version number of the Adwaita library.
For example, in libadwaita version 1.2.3 this is 3.
This function is in the library, so it represents the libadwaita library your code is running against. Contrast with the major_version constant, which represents the micro version of the libadwaita headers you have included when compiling your code.
The function returns the following values:
- guint: micro version number of the Adwaita library.
func GetMinorVersion ¶
func GetMinorVersion() uint
GetMinorVersion returns the minor version number of the Adwaita library.
For example, in libadwaita version 1.2.3 this is 2.
This function is in the library, so it represents the libadwaita library your code is running against. Contrast with the major_version constant, which represents the minor version of the libadwaita headers you have included when compiling your code.
The function returns the following values:
- guint: minor version number of the Adwaita library.
func Init ¶
func Init()
Init initializes Libadwaita.
This function can be used instead of gtk.Init() as it initializes GTK implicitly.
There's no need to call this function if you're using application.
If Libadwaita has already been initialized, the function will simply return.
This makes sure translations, types, themes, and icons for the Adwaita library are set up properly.
func IsInitialized ¶
func IsInitialized() bool
IsInitialized: use this function to check if libadwaita has been initialized with init.
The function returns the following values:
- ok: initialization status.
func LengthUnitFromPx ¶
func LengthUnitFromPx(unit LengthUnit, value float64, settings *gtk.Settings) float64
LengthUnitFromPx converts value from pixels to unit.
The function takes the following parameters:
- unit: length unit.
- value in pixels.
- settings (optional) to use, or NULL for default settings.
The function returns the following values:
- gdouble: length in unit.
func LengthUnitToPx ¶
func LengthUnitToPx(unit LengthUnit, value float64, settings *gtk.Settings) float64
LengthUnitToPx converts value from unit to pixels.
The function takes the following parameters:
- unit: length unit.
- value in unit.
- settings (optional) to use, or NULL for default settings.
The function returns the following values:
- gdouble: length in pixels.
Types ¶
type AboutDialog ¶
type AboutDialog struct { Dialog // contains filtered or unexported fields }
AboutDialog: dialog showing information about the application.
<picture> <source srcset="about-dialog-dark.png" media="(prefers-color-scheme: dark)"> <img src="about-dialog.png" alt="about-dialog"> </picture>
an about dialog is typically opened when the user activates the About … item in the application's primary menu. All parts of the dialog are optional.
Main page ¶
AdwAboutDialog prominently displays the application's icon, name, developer name and version. They can be set with the aboutdialog:application-icon, aboutdialog:application-name, aboutdialog:developer-name and aboutdialog:version respectively.
What's New ¶
AdwAboutDialog provides a way for applications to display their release notes, set with the aboutdialog:release-notes property.
Release notes are formatted the same way as AppStream descriptions (https://freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-description).
The supported formatting options are:
* Paragraph (<p>) * Ordered list (<ol>), with list items (<li>) * Unordered list (<ul>), with list items (<li>)
Within paragraphs and list items, emphasis (<em>) and inline code (<code>) text styles are supported. The emphasis is rendered in italic, while inline code is shown in a monospaced font.
Any text outside paragraphs or list items is ignored.
Nested lists are not supported.
Only one version can be shown at a time. By default, the displayed version number matches aboutdialog:version. Use aboutdialog:release-notes-version to override it.
Details ¶
The Details page displays the application comments and links.
The comments can be set with the aboutdialog:comments property. Unlike gtk.AboutDialog:comments, this string can be long and detailed. It can also contain links and Pango markup.
To set the application website, use aboutdialog:website. To add extra links below the website, use aboutdialog.AddLink.
If the Details page doesn't have any other content besides website, the website will be displayed on the main page instead.
Troubleshooting ¶
AdwAboutDialog displays the following two links on the main page:
* Support Questions, set with the aboutdialog:support-url property, * Report an Issue, set with the aboutdialog:issue-url property.
Additionally, applications can provide debugging information. It will be shown separately on the Troubleshooting page. Use the aboutdialog:debug-info property to specify it.
It's intended to be attached to issue reports when reporting issues against the application. As such, it cannot contain markup or links.
AdwAboutDialog provides a quick way to save debug information to a file. When saving, aboutdialog:debug-info-filename would be used as the suggested filename.
Credits and Acknowledgements ¶
The Credits page has the following default sections:
* Developers, set with the aboutdialog:developers property, * Designers, set with the aboutdialog:designers property, * Artists, set with the aboutdialog:artists property, * Documenters, set with the aboutdialog:documenters property, * Translators, set with the aboutdialog:translator-credits property.
When setting translator credits, use the strings "translator-credits" or "translator_credits" and mark them as translatable.
The default sections that don't contain any names won't be displayed.
The Credits page can also contain an arbitrary number of extra sections below the default ones. Use aboutdialog.AddCreditSection to add them.
The Acknowledgements page can be used to acknowledge additional people and organizations for their non-development contributions. Use aboutdialog.AddAcknowledgementSection to add sections to it. For example, it can be used to list backers in a crowdfunded project or to give special thanks.
Each of the people or organizations can have an email address or a website specified. To add a email address, use a string like Edgar Allan Poe <edgarpoe.com>. To specify a website with a title, use a string like The GNOME Project https://www.gnome.org:
<picture> <source srcset="about-dialog-credits-dark.png" media="(prefers-color-scheme: dark)"> <img src="about-dialog-credits.png" alt="about-dialog-credits"> </picture>
Legal ¶
The Legal page displays the copyright and licensing information for the application and other modules.
The copyright string is set with the aboutdialog:copyright property and should be a short string of one or two lines, for example: © 2022 Example.
Licensing information can be quickly set from a list of known licenses with the aboutdialog:license-type property. If the application's license is not in the list, aboutdialog:license can be used instead.
To add information about other modules, such as application dependencies or data, use aboutdialog.AddLegalSection.
Constructing ¶
To make constructing an AdwAboutDialog as convenient as possible, you can use the function show_about_dialog which constructs and shows a dialog.
static void show_about (GtkApplication *app) { const char *developers[] = { "Angela Avery", NULL }; const char *designers[] = { "GNOME Design Team", NULL }; adw_show_about_dialog (GTK_WIDGET (gtk_application_get_active_window (app)), "application-name", _("Example"), "application-icon", "org.example.App", "version", "1.2.3", "copyright", "© 2022 Angela Avery", "issue-url", "https://gitlab.gnome.org/example/example/-/issues/new", "license-type", GTK_LICENSE_GPL_3_0, "developers", developers, "designers", designers, "translator-credits", _("translator-credits"), NULL); }
CSS nodes ¶
AdwAboutDialog has a main CSS node with the name dialog and the style class .about.
func NewAboutDialog ¶
func NewAboutDialog() *AboutDialog
NewAboutDialog creates a new AdwAboutDialog.
The function returns the following values:
- aboutDialog: newly created AdwAboutDialog.
func NewAboutDialogFromAppdata ¶
func NewAboutDialogFromAppdata(resourcePath, releaseNotesVersion string) *AboutDialog
NewAboutDialogFromAppdata creates a new AdwAboutDialog using AppStream metadata.
This automatically sets the following properties with the following AppStream values:
* aboutdialog:application-icon is set from the <id> * aboutdialog:application-name is set from the <name> * aboutdialog:developer-name is set from the <name> within <developer> * aboutdialog:version is set from the version of the latest release * aboutdialog:website is set from the <url type="homepage"> * aboutdialog:support-url is set from the <url type="help"> * aboutdialog:issue-url is set from the <url type="bugtracker"> * aboutdialog:license-type is set from the <project_license>. If the license type retrieved from AppStream is not listed in gtk.License, it will be set to GTK_LICENCE_CUSTOM.
If release_notes_version is not NULL, aboutdialog:release-notes-version is set to match it, while aboutdialog:release-notes is set from the AppStream release description for that version.
The function takes the following parameters:
- resourcePath: resource to use.
- releaseNotesVersion (optional): version to retrieve release notes for.
The function returns the following values:
- aboutDialog: newly created AdwAboutDialog.
func (*AboutDialog) AddAcknowledgementSection ¶
func (self *AboutDialog) AddAcknowledgementSection(name string, people []string)
AddAcknowledgementSection adds a section to the Acknowledgements page.
This can be used to acknowledge additional people and organizations for their non-development contributions - for example, backers in a crowdfunded project.
Each name may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutdialog:developers * aboutdialog:designers * aboutdialog:artists * aboutdialog:documenters * aboutdialog:translator-credits * aboutdialog.AddCreditSection.
The function takes the following parameters:
- name (optional): section name.
- people: list of names.
func (*AboutDialog) AddCreditSection ¶
func (self *AboutDialog) AddCreditSection(name string, people []string)
AddCreditSection adds an extra section to the Credits page.
Extra sections are displayed below the standard categories.
Each name may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutdialog:developers * aboutdialog:designers * aboutdialog:artists * aboutdialog:documenters * aboutdialog:translator-credits * aboutdialog.AddAcknowledgementSection.
The function takes the following parameters:
- name (optional): section name.
- people: list of names.
func (*AboutDialog) AddLegalSection ¶
func (self *AboutDialog) AddLegalSection(title, copyright string, licenseType gtk.License, license string)
AddLegalSection adds an extra section to the Legal page.
Extra sections will be displayed below the application's own information.
The parameters copyright, license_type and license will be used to present the it the same way as aboutdialog:copyright, aboutdialog:license-type and aboutdialog:license are for the application's own information.
See those properties for more details.
This can be useful to attribute the application dependencies or data.
Examples:
adw_about_dialog_add_legal_section (ADW_ABOUT_DIALOG (about), _("Copyright and a known license"), "© 2022 Example", GTK_LICENSE_LGPL_2_1, NULL); adw_about_dialog_add_legal_section (ADW_ABOUT_DIALOG (about), _("Copyright and custom license"), "© 2022 Example", GTK_LICENSE_CUSTOM, "Custom license text"); adw_about_dialog_add_legal_section (ADW_ABOUT_DIALOG (about), _("Copyright only"), "© 2022 Example", GTK_LICENSE_UNKNOWN, NULL); adw_about_dialog_add_legal_section (ADW_ABOUT_DIALOG (about), _("Custom license only"), NULL, GTK_LICENSE_CUSTOM, "Something completely custom here.");.
The function takes the following parameters:
- title: name of the section.
- copyright (optional) string.
- licenseType: type of license.
- license (optional): custom license information.
func (*AboutDialog) AddLink ¶
func (self *AboutDialog) AddLink(title, url string)
AddLink adds an extra link to the Details page.
Extra links are displayed under the comment and website.
Underlines in title will be interpreted as indicating a mnemonic.
See aboutdialog:website.
The function takes the following parameters:
- title: link title.
- url: link URL.
func (*AboutDialog) ApplicationIcon ¶
func (self *AboutDialog) ApplicationIcon() string
ApplicationIcon gets the name of the application icon for self.
The function returns the following values:
- utf8: application icon name.
func (*AboutDialog) ApplicationName ¶
func (self *AboutDialog) ApplicationName() string
ApplicationName gets the application name for self.
The function returns the following values:
- utf8: application name.
func (*AboutDialog) Artists ¶
func (self *AboutDialog) Artists() []string
Artists gets the list of artists of the application.
The function returns the following values:
- utf8s (optional): list of artists.
func (*AboutDialog) Comments ¶
func (self *AboutDialog) Comments() string
Comments gets the comments about the application.
The function returns the following values:
- utf8: comments.
func (*AboutDialog) ConnectActivateLink ¶
func (self *AboutDialog) ConnectActivateLink(f func(uri string) (ok bool)) coreglib.SignalHandle
ConnectActivateLink is emitted when a URL is activated.
Applications may connect to it to override the default behavior, which is to call gtk.ShowURI().
func (*AboutDialog) Copyright ¶
func (self *AboutDialog) Copyright() string
Copyright gets the copyright information for self.
The function returns the following values:
- utf8: copyright information.
func (*AboutDialog) DebugInfo ¶
func (self *AboutDialog) DebugInfo() string
DebugInfo gets the debug information for self.
The function returns the following values:
- utf8: debug information.
func (*AboutDialog) DebugInfoFilename ¶
func (self *AboutDialog) DebugInfoFilename() string
DebugInfoFilename gets the debug information filename for self.
The function returns the following values:
- utf8: debug information filename.
func (*AboutDialog) Designers ¶
func (self *AboutDialog) Designers() []string
Designers gets the list of designers of the application.
The function returns the following values:
- utf8s (optional): list of designers.
func (*AboutDialog) DeveloperName ¶
func (self *AboutDialog) DeveloperName() string
DeveloperName gets the developer name for self.
The function returns the following values:
- utf8: developer_name.
func (*AboutDialog) Developers ¶
func (self *AboutDialog) Developers() []string
Developers gets the list of developers of the application.
The function returns the following values:
- utf8s (optional): list of developers.
func (*AboutDialog) Documenters ¶
func (self *AboutDialog) Documenters() []string
Documenters gets the list of documenters of the application.
The function returns the following values:
- utf8s (optional): list of documenters.
func (*AboutDialog) IssueURL ¶
func (self *AboutDialog) IssueURL() string
IssueURL gets the issue tracker URL for self.
The function returns the following values:
- utf8: issue tracker URL.
func (*AboutDialog) License ¶
func (self *AboutDialog) License() string
License gets the license for self.
The function returns the following values:
- utf8: license.
func (*AboutDialog) LicenseType ¶
func (self *AboutDialog) LicenseType() gtk.License
LicenseType gets the license type for self.
The function returns the following values:
- license type.
func (*AboutDialog) ReleaseNotes ¶
func (self *AboutDialog) ReleaseNotes() string
ReleaseNotes gets the release notes for self.
The function returns the following values:
- utf8: release notes.
func (*AboutDialog) ReleaseNotesVersion ¶
func (self *AboutDialog) ReleaseNotesVersion() string
ReleaseNotesVersion gets the version described by the application's release notes.
The function returns the following values:
- utf8: release notes version.
func (*AboutDialog) SetApplicationIcon ¶
func (self *AboutDialog) SetApplicationIcon(applicationIcon string)
SetApplicationIcon sets the name of the application icon for self.
The icon is displayed at the top of the main page.
The function takes the following parameters:
- applicationIcon: application icon name.
func (*AboutDialog) SetApplicationName ¶
func (self *AboutDialog) SetApplicationName(applicationName string)
SetApplicationName sets the application name for self.
The name is displayed at the top of the main page.
The function takes the following parameters:
- applicationName: application name.
func (*AboutDialog) SetArtists ¶
func (self *AboutDialog) SetArtists(artists []string)
SetArtists sets the list of artists of the application.
It will be displayed on the Credits page.
Each name may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutdialog:developers * aboutdialog:designers * aboutdialog:documenters * aboutdialog:translator-credits * aboutdialog.AddCreditSection * aboutdialog.AddAcknowledgementSection.
The function takes the following parameters:
- artists (optional): list of artists.
func (*AboutDialog) SetComments ¶
func (self *AboutDialog) SetComments(comments string)
SetComments sets the comments about the application.
Comments will be shown on the Details page, above links.
Unlike gtk.AboutDialog:comments, this string can be long and detailed. It can also contain links and Pango markup.
The function takes the following parameters:
- comments: comments.
func (*AboutDialog) SetCopyright ¶
func (self *AboutDialog) SetCopyright(copyright string)
SetCopyright sets the copyright information for self.
This should be a short string of one or two lines, for example: © 2022 Example.
The copyright information will be displayed on the Legal page, before the application license.
aboutdialog.AddLegalSection can be used to add copyright information for the application dependencies or other components.
The function takes the following parameters:
- copyright information.
func (*AboutDialog) SetDebugInfo ¶
func (self *AboutDialog) SetDebugInfo(debugInfo string)
SetDebugInfo sets the debug information for self.
Debug information will be shown on the Troubleshooting page. It's intended to be attached to issue reports when reporting issues against the application.
AdwAboutDialog provides a quick way to save debug information to a file. When saving, aboutdialog:debug-info-filename would be used as the suggested filename.
Debug information cannot contain markup or links.
The function takes the following parameters:
- debugInfo: debug information.
func (*AboutDialog) SetDebugInfoFilename ¶
func (self *AboutDialog) SetDebugInfoFilename(filename string)
SetDebugInfoFilename sets the debug information filename for self.
It will be used as the suggested filename when saving debug information to a file.
See aboutdialog:debug-info.
The function takes the following parameters:
- filename: debug info filename.
func (*AboutDialog) SetDesigners ¶
func (self *AboutDialog) SetDesigners(designers []string)
SetDesigners sets the list of designers of the application.
It will be displayed on the Credits page.
Each name may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutdialog:developers * aboutdialog:artists * aboutdialog:documenters * aboutdialog:translator-credits * aboutdialog.AddCreditSection * aboutdialog.AddAcknowledgementSection.
The function takes the following parameters:
- designers (optional): list of designers.
func (*AboutDialog) SetDeveloperName ¶
func (self *AboutDialog) SetDeveloperName(developerName string)
SetDeveloperName sets the developer name for self.
The developer name is displayed on the main page, under the application name.
If the application is developed by multiple people, the developer name can be set to values like "AppName team", "AppName developers" or "The AppName project", and the individual contributors can be listed on the Credits page, with aboutdialog:developers and related properties.
The function takes the following parameters:
- developerName: developer name.
func (*AboutDialog) SetDevelopers ¶
func (self *AboutDialog) SetDevelopers(developers []string)
SetDevelopers sets the list of developers of the application.
It will be displayed on the Credits page.
Each name may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutdialog:designers * aboutdialog:artists * aboutdialog:documenters * aboutdialog:translator-credits * aboutdialog.AddCreditSection * aboutdialog.AddAcknowledgementSection.
The function takes the following parameters:
- developers (optional): list of developers.
func (*AboutDialog) SetDocumenters ¶
func (self *AboutDialog) SetDocumenters(documenters []string)
SetDocumenters sets the list of documenters of the application.
It will be displayed on the Credits page.
Each name may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutdialog:developers * aboutdialog:designers * aboutdialog:artists * aboutdialog:translator-credits * aboutdialog.AddCreditSection * aboutdialog.AddAcknowledgementSection.
The function takes the following parameters:
- documenters (optional): list of documenters.
func (*AboutDialog) SetIssueURL ¶
func (self *AboutDialog) SetIssueURL(issueUrl string)
SetIssueURL sets the issue tracker URL for self.
The issue tracker link is displayed on the main page.
The function takes the following parameters:
- issueUrl: issue tracker URL.
func (*AboutDialog) SetLicense ¶
func (self *AboutDialog) SetLicense(license string)
SetLicense sets the license for self.
This can be used to set a custom text for the license if it can't be set via aboutdialog:license-type.
When set, aboutdialog:license-type will be set to GTK_LICENSE_CUSTOM.
The license text will be displayed on the Legal page, below the copyright information.
License text can contain Pango markup and links.
aboutdialog.AddLegalSection can be used to add license information for the application dependencies or other components.
The function takes the following parameters:
- license: license.
func (*AboutDialog) SetLicenseType ¶
func (self *AboutDialog) SetLicenseType(licenseType gtk.License)
SetLicenseType sets the license for self from a list of known licenses.
If the application's license is not in the list, aboutdialog:license can be used instead. The license type will be automatically set to GTK_LICENSE_CUSTOM in that case.
If license_type is GTK_LICENSE_UNKNOWN, no information will be displayed.
If license_type is different from GTK_LICENSE_CUSTOM. aboutdialog:license will be cleared out.
The license description will be displayed on the Legal page, below the copyright information.
aboutdialog.AddLegalSection can be used to add license information for the application dependencies or other components.
The function takes the following parameters:
- licenseType: license type.
func (*AboutDialog) SetReleaseNotes ¶
func (self *AboutDialog) SetReleaseNotes(releaseNotes string)
SetReleaseNotes sets the release notes for self.
Release notes are displayed on the the What's New page.
Release notes are formatted the same way as AppStream descriptions (https://freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-description).
The supported formatting options are:
* Paragraph (<p>) * Ordered list (<ol>), with list items (<li>) * Unordered list (<ul>), with list items (<li>)
Within paragraphs and list items, emphasis (<em>) and inline code (<code>) text styles are supported. The emphasis is rendered in italic, while inline code is shown in a monospaced font.
Any text outside paragraphs or list items is ignored.
Nested lists are not supported.
AdwAboutDialog displays the version above the release notes. If set, the aboutdialog:release-notes-version of the property will be used as the version; otherwise, aboutdialog:version is used.
The function takes the following parameters:
- releaseNotes: release notes.
func (*AboutDialog) SetReleaseNotesVersion ¶
func (self *AboutDialog) SetReleaseNotesVersion(version string)
SetReleaseNotesVersion sets the version described by the application's release notes.
The release notes version is displayed on the What's New page, above the release notes.
If not set, aboutdialog:version will be used instead.
For example, an application with the current version 2.0.2 might want to keep the release notes from 2.0.0, and set the release notes version accordingly.
See aboutdialog:release-notes.
The function takes the following parameters:
- version: release notes version.
func (*AboutDialog) SetSupportURL ¶
func (self *AboutDialog) SetSupportURL(supportUrl string)
SetSupportURL sets the URL of the support page for self.
The support page link is displayed on the main page.
The function takes the following parameters:
- supportUrl: support page URL.
func (*AboutDialog) SetTranslatorCredits ¶
func (self *AboutDialog) SetTranslatorCredits(translatorCredits string)
SetTranslatorCredits sets the translator credits string.
It will be displayed on the Credits page.
This string should be "translator-credits" or "translator_credits" and should be marked as translatable.
The string may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutdialog:developers * aboutdialog:designers * aboutdialog:artists * aboutdialog:documenters * aboutdialog.AddCreditSection * aboutdialog.AddAcknowledgementSection.
The function takes the following parameters:
- translatorCredits: translator credits.
func (*AboutDialog) SetVersion ¶
func (self *AboutDialog) SetVersion(version string)
SetVersion sets the version for self.
The version is displayed on the main page.
If aboutdialog:release-notes-version is not set, the version will also be displayed above the release notes on the What's New page.
The function takes the following parameters:
- version: version.
func (*AboutDialog) SetWebsite ¶
func (self *AboutDialog) SetWebsite(website string)
SetWebsite sets the application website URL for self.
Website is displayed on the Details page, below comments, or on the main page if the Details page doesn't have any other content.
Applications can add other links below, see aboutdialog.AddLink.
The function takes the following parameters:
- website URL.
func (*AboutDialog) SupportURL ¶
func (self *AboutDialog) SupportURL() string
SupportURL gets the URL of the support page for self.
The function returns the following values:
- utf8: support page URL.
func (*AboutDialog) TranslatorCredits ¶
func (self *AboutDialog) TranslatorCredits() string
TranslatorCredits gets the translator credits string.
The function returns the following values:
- utf8: translator credits string.
func (*AboutDialog) Version ¶
func (self *AboutDialog) Version() string
Version gets the version for self.
The function returns the following values:
- utf8: version.
func (*AboutDialog) Website ¶
func (self *AboutDialog) Website() string
Website gets the application website URL for self.
The function returns the following values:
- utf8: website URL.
type AboutDialogClass ¶
type AboutDialogClass struct {
// contains filtered or unexported fields
}
AboutDialogClass: instance of this type is always passed by reference.
func (*AboutDialogClass) ParentClass ¶
func (a *AboutDialogClass) ParentClass() *DialogClass
type AboutDialogOverrides ¶
type AboutDialogOverrides struct { }
AboutDialogOverrides contains methods that are overridable.
type AboutWindow ¶
type AboutWindow struct { Window // contains filtered or unexported fields }
AboutWindow: window showing information about the application.
<picture> <source srcset="about-window-dark.png" media="(prefers-color-scheme: dark)"> <img src="about-window.png" alt="about-window"> </picture>
An about window is typically opened when the user activates the About … item in the application's primary menu. All parts of the window are optional.
Main page ¶
AdwAboutWindow prominently displays the application's icon, name, developer name and version. They can be set with the aboutwindow:application-icon, aboutwindow:application-name, aboutwindow:developer-name and aboutwindow:version respectively.
What's New ¶
AdwAboutWindow provides a way for applications to display their release notes, set with the aboutwindow:release-notes property.
Release notes are formatted the same way as AppStream descriptions (https://freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-description).
The supported formatting options are:
* Paragraph (<p>) * Ordered list (<ol>), with list items (<li>) * Unordered list (<ul>), with list items (<li>)
Within paragraphs and list items, emphasis (<em>) and inline code (<code>) text styles are supported. The emphasis is rendered in italic, while inline code is shown in a monospaced font.
Any text outside paragraphs or list items is ignored.
Nested lists are not supported.
Only one version can be shown at a time. By default, the displayed version number matches aboutwindow:version. Use aboutwindow:release-notes-version to override it.
Details ¶
The Details page displays the application comments and links.
The comments can be set with the aboutwindow:comments property. Unlike gtk.AboutDialog:comments, this string can be long and detailed. It can also contain links and Pango markup.
To set the application website, use aboutwindow:website. To add extra links below the website, use aboutwindow.AddLink.
If the Details page doesn't have any other content besides website, the website will be displayed on the main page instead.
Troubleshooting ¶
AdwAboutWindow displays the following two links on the main page:
* Support Questions, set with the aboutwindow:support-url property, * Report an Issue, set with the aboutwindow:issue-url property.
Additionally, applications can provide debugging information. It will be shown separately on the Troubleshooting page. Use the aboutwindow:debug-info property to specify it.
It's intended to be attached to issue reports when reporting issues against the application. As such, it cannot contain markup or links.
AdwAboutWindow provides a quick way to save debug information to a file. When saving, aboutwindow:debug-info-filename would be used as the suggested filename.
Credits and Acknowledgements ¶
The Credits page has the following default sections:
* Developers, set with the aboutwindow:developers property, * Designers, set with the aboutwindow:designers property, * Artists, set with the aboutwindow:artists property, * Documenters, set with the aboutwindow:documenters property, * Translators, set with the aboutwindow:translator-credits property.
When setting translator credits, use the strings "translator-credits" or "translator_credits" and mark them as translatable.
The default sections that don't contain any names won't be displayed.
The Credits page can also contain an arbitrary number of extra sections below the default ones. Use aboutwindow.AddCreditSection to add them.
The Acknowledgements page can be used to acknowledge additional people and organizations for their non-development contributions. Use aboutwindow.AddAcknowledgementSection to add sections to it. For example, it can be used to list backers in a crowdfunded project or to give special thanks.
Each of the people or organizations can have an email address or a website specified. To add a email address, use a string like Edgar Allan Poe <edgarpoe.com>. To specify a website with a title, use a string like The GNOME Project https://www.gnome.org:
<picture> <source srcset="about-window-credits-dark.png" media="(prefers-color-scheme: dark)"> <img src="about-window-credits.png" alt="about-window-credits"> </picture>
Legal ¶
The Legal page displays the copyright and licensing information for the application and other modules.
The copyright string is set with the aboutwindow:copyright property and should be a short string of one or two lines, for example: © 2022 Example.
Licensing information can be quickly set from a list of known licenses with the aboutwindow:license-type property. If the application's license is not in the list, aboutwindow:license can be used instead.
To add information about other modules, such as application dependencies or data, use aboutwindow.AddLegalSection.
Constructing ¶
To make constructing an AdwAboutWindow as convenient as possible, you can use the function show_about_window which constructs and shows a window.
static void show_about (GtkApplication *app) { const char *developers[] = { "Angela Avery", NULL }; const char *designers[] = { "GNOME Design Team", NULL }; adw_show_about_window (gtk_application_get_active_window (app), "application-name", _("Example"), "application-icon", "org.example.App", "version", "1.2.3", "copyright", "© 2022 Angela Avery", "issue-url", "https://gitlab.gnome.org/example/example/-/issues/new", "license-type", GTK_LICENSE_GPL_3_0, "developers", developers, "designers", designers, "translator-credits", _("translator-credits"), NULL); }
CSS nodes ¶
AdwAboutWindow has a main CSS node with the name window and the style class .about.
func NewAboutWindow ¶
func NewAboutWindow() *AboutWindow
NewAboutWindow creates a new AdwAboutWindow.
The function returns the following values:
- aboutWindow: newly created AdwAboutWindow.
func NewAboutWindowFromAppdata ¶
func NewAboutWindowFromAppdata(resourcePath, releaseNotesVersion string) *AboutWindow
NewAboutWindowFromAppdata creates a new AdwAboutWindow using AppStream metadata.
This automatically sets the following properties with the following AppStream values:
* aboutwindow:application-icon is set from the <id> * aboutwindow:application-name is set from the <name> * aboutwindow:developer-name is set from the <name> within <developer> * aboutwindow:version is set from the version of the latest release * aboutwindow:website is set from the <url type="homepage"> * aboutwindow:support-url is set from the <url type="help"> * aboutwindow:issue-url is set from the <url type="bugtracker"> * aboutwindow:license-type is set from the <project_license>. If the license type retrieved from AppStream is not listed in gtk.License, it will be set to GTK_LICENCE_CUSTOM.
If release_notes_version is not NULL, aboutwindow:release-notes-version is set to match it, while aboutwindow:release-notes is set from the AppStream release description for that version.
The function takes the following parameters:
- resourcePath: resource to use.
- releaseNotesVersion (optional): version to retrieve release notes for.
The function returns the following values:
- aboutWindow: newly created AdwAboutWindow.
func (*AboutWindow) AddAcknowledgementSection ¶
func (self *AboutWindow) AddAcknowledgementSection(name string, people []string)
AddAcknowledgementSection adds a section to the Acknowledgements page.
This can be used to acknowledge additional people and organizations for their non-development contributions - for example, backers in a crowdfunded project.
Each name may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutwindow:developers * aboutwindow:designers * aboutwindow:artists * aboutwindow:documenters * aboutwindow:translator-credits * aboutwindow.AddCreditSection.
The function takes the following parameters:
- name (optional): section name.
- people: list of names.
func (*AboutWindow) AddCreditSection ¶
func (self *AboutWindow) AddCreditSection(name string, people []string)
AddCreditSection adds an extra section to the Credits page.
Extra sections are displayed below the standard categories.
Each name may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutwindow:developers * aboutwindow:designers * aboutwindow:artists * aboutwindow:documenters * aboutwindow:translator-credits * aboutwindow.AddAcknowledgementSection.
The function takes the following parameters:
- name (optional): section name.
- people: list of names.
func (*AboutWindow) AddLegalSection ¶
func (self *AboutWindow) AddLegalSection(title, copyright string, licenseType gtk.License, license string)
AddLegalSection adds an extra section to the Legal page.
Extra sections will be displayed below the application's own information.
The parameters copyright, license_type and license will be used to present the it the same way as aboutwindow:copyright, aboutwindow:license-type and aboutwindow:license are for the application's own information.
See those properties for more details.
This can be useful to attribute the application dependencies or data.
Examples:
adw_about_window_add_legal_section (ADW_ABOUT_WINDOW (about), _("Copyright and a known license"), "© 2022 Example", GTK_LICENSE_LGPL_2_1, NULL); adw_about_window_add_legal_section (ADW_ABOUT_WINDOW (about), _("Copyright and custom license"), "© 2022 Example", GTK_LICENSE_CUSTOM, "Custom license text"); adw_about_window_add_legal_section (ADW_ABOUT_WINDOW (about), _("Copyright only"), "© 2022 Example", GTK_LICENSE_UNKNOWN, NULL); adw_about_window_add_legal_section (ADW_ABOUT_WINDOW (about), _("Custom license only"), NULL, GTK_LICENSE_CUSTOM, "Something completely custom here.");.
The function takes the following parameters:
- title: name of the section.
- copyright (optional) string.
- licenseType: type of license.
- license (optional): custom license information.
func (*AboutWindow) AddLink ¶
func (self *AboutWindow) AddLink(title, url string)
AddLink adds an extra link to the Details page.
Extra links are displayed under the comment and website.
Underlines in title will be interpreted as indicating a mnemonic.
See aboutwindow:website.
The function takes the following parameters:
- title: link title.
- url: link URL.
func (*AboutWindow) ApplicationIcon ¶
func (self *AboutWindow) ApplicationIcon() string
ApplicationIcon gets the name of the application icon for self.
The function returns the following values:
- utf8: application icon name.
func (*AboutWindow) ApplicationName ¶
func (self *AboutWindow) ApplicationName() string
ApplicationName gets the application name for self.
The function returns the following values:
- utf8: application name.
func (*AboutWindow) Artists ¶
func (self *AboutWindow) Artists() []string
Artists gets the list of artists of the application.
The function returns the following values:
- utf8s (optional): list of artists.
func (*AboutWindow) Comments ¶
func (self *AboutWindow) Comments() string
Comments gets the comments about the application.
The function returns the following values:
- utf8: comments.
func (*AboutWindow) ConnectActivateLink ¶
func (self *AboutWindow) ConnectActivateLink(f func(uri string) (ok bool)) coreglib.SignalHandle
ConnectActivateLink is emitted when a URL is activated.
Applications may connect to it to override the default behavior, which is to call gtk.ShowURI().
func (*AboutWindow) Copyright ¶
func (self *AboutWindow) Copyright() string
Copyright gets the copyright information for self.
The function returns the following values:
- utf8: copyright information.
func (*AboutWindow) DebugInfo ¶
func (self *AboutWindow) DebugInfo() string
DebugInfo gets the debug information for self.
The function returns the following values:
- utf8: debug information.
func (*AboutWindow) DebugInfoFilename ¶
func (self *AboutWindow) DebugInfoFilename() string
DebugInfoFilename gets the debug information filename for self.
The function returns the following values:
- utf8: debug information filename.
func (*AboutWindow) Designers ¶
func (self *AboutWindow) Designers() []string
Designers gets the list of designers of the application.
The function returns the following values:
- utf8s (optional): list of designers.
func (*AboutWindow) DeveloperName ¶
func (self *AboutWindow) DeveloperName() string
DeveloperName gets the developer name for self.
The function returns the following values:
- utf8: developer_name.
func (*AboutWindow) Developers ¶
func (self *AboutWindow) Developers() []string
Developers gets the list of developers of the application.
The function returns the following values:
- utf8s (optional): list of developers.
func (*AboutWindow) Documenters ¶
func (self *AboutWindow) Documenters() []string
Documenters gets the list of documenters of the application.
The function returns the following values:
- utf8s (optional): list of documenters.
func (*AboutWindow) IssueURL ¶
func (self *AboutWindow) IssueURL() string
IssueURL gets the issue tracker URL for self.
The function returns the following values:
- utf8: issue tracker URL.
func (*AboutWindow) License ¶
func (self *AboutWindow) License() string
License gets the license for self.
The function returns the following values:
- utf8: license.
func (*AboutWindow) LicenseType ¶
func (self *AboutWindow) LicenseType() gtk.License
LicenseType gets the license type for self.
The function returns the following values:
- license type.
func (*AboutWindow) ReleaseNotes ¶
func (self *AboutWindow) ReleaseNotes() string
ReleaseNotes gets the release notes for self.
The function returns the following values:
- utf8: release notes.
func (*AboutWindow) ReleaseNotesVersion ¶
func (self *AboutWindow) ReleaseNotesVersion() string
ReleaseNotesVersion gets the version described by the application's release notes.
The function returns the following values:
- utf8: release notes version.
func (*AboutWindow) SetApplicationIcon ¶
func (self *AboutWindow) SetApplicationIcon(applicationIcon string)
SetApplicationIcon sets the name of the application icon for self.
The icon is displayed at the top of the main page.
The function takes the following parameters:
- applicationIcon: application icon name.
func (*AboutWindow) SetApplicationName ¶
func (self *AboutWindow) SetApplicationName(applicationName string)
SetApplicationName sets the application name for self.
The name is displayed at the top of the main page.
The function takes the following parameters:
- applicationName: application name.
func (*AboutWindow) SetArtists ¶
func (self *AboutWindow) SetArtists(artists []string)
SetArtists sets the list of artists of the application.
It will be displayed on the Credits page.
Each name may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutwindow:developers * aboutwindow:designers * aboutwindow:documenters * aboutwindow:translator-credits * aboutwindow.AddCreditSection * aboutwindow.AddAcknowledgementSection.
The function takes the following parameters:
- artists (optional): list of artists.
func (*AboutWindow) SetComments ¶
func (self *AboutWindow) SetComments(comments string)
SetComments sets the comments about the application.
Comments will be shown on the Details page, above links.
Unlike gtk.AboutDialog:comments, this string can be long and detailed. It can also contain links and Pango markup.
The function takes the following parameters:
- comments: comments.
func (*AboutWindow) SetCopyright ¶
func (self *AboutWindow) SetCopyright(copyright string)
SetCopyright sets the copyright information for self.
This should be a short string of one or two lines, for example: © 2022 Example.
The copyright information will be displayed on the Legal page, before the application license.
aboutwindow.AddLegalSection can be used to add copyright information for the application dependencies or other components.
The function takes the following parameters:
- copyright information.
func (*AboutWindow) SetDebugInfo ¶
func (self *AboutWindow) SetDebugInfo(debugInfo string)
SetDebugInfo sets the debug information for self.
Debug information will be shown on the Troubleshooting page. It's intended to be attached to issue reports when reporting issues against the application.
AdwAboutWindow provides a quick way to save debug information to a file. When saving, aboutwindow:debug-info-filename would be used as the suggested filename.
Debug information cannot contain markup or links.
The function takes the following parameters:
- debugInfo: debug information.
func (*AboutWindow) SetDebugInfoFilename ¶
func (self *AboutWindow) SetDebugInfoFilename(filename string)
SetDebugInfoFilename sets the debug information filename for self.
It will be used as the suggested filename when saving debug information to a file.
See aboutwindow:debug-info.
The function takes the following parameters:
- filename: debug info filename.
func (*AboutWindow) SetDesigners ¶
func (self *AboutWindow) SetDesigners(designers []string)
SetDesigners sets the list of designers of the application.
It will be displayed on the Credits page.
Each name may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutwindow:developers * aboutwindow:artists * aboutwindow:documenters * aboutwindow:translator-credits * aboutwindow.AddCreditSection * aboutwindow.AddAcknowledgementSection.
The function takes the following parameters:
- designers (optional): list of designers.
func (*AboutWindow) SetDeveloperName ¶
func (self *AboutWindow) SetDeveloperName(developerName string)
SetDeveloperName sets the developer name for self.
The developer name is displayed on the main page, under the application name.
If the application is developed by multiple people, the developer name can be set to values like "AppName team", "AppName developers" or "The AppName project", and the individual contributors can be listed on the Credits page, with aboutwindow:developers and related properties.
The function takes the following parameters:
- developerName: developer name.
func (*AboutWindow) SetDevelopers ¶
func (self *AboutWindow) SetDevelopers(developers []string)
SetDevelopers sets the list of developers of the application.
It will be displayed on the Credits page.
Each name may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutwindow:designers * aboutwindow:artists * aboutwindow:documenters * aboutwindow:translator-credits * aboutwindow.AddCreditSection * aboutwindow.AddAcknowledgementSection.
The function takes the following parameters:
- developers (optional): list of developers.
func (*AboutWindow) SetDocumenters ¶
func (self *AboutWindow) SetDocumenters(documenters []string)
SetDocumenters sets the list of documenters of the application.
It will be displayed on the Credits page.
Each name may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutwindow:developers * aboutwindow:designers * aboutwindow:artists * aboutwindow:translator-credits * aboutwindow.AddCreditSection * aboutwindow.AddAcknowledgementSection.
The function takes the following parameters:
- documenters (optional): list of documenters.
func (*AboutWindow) SetIssueURL ¶
func (self *AboutWindow) SetIssueURL(issueUrl string)
SetIssueURL sets the issue tracker URL for self.
The issue tracker link is displayed on the main page.
The function takes the following parameters:
- issueUrl: issue tracker URL.
func (*AboutWindow) SetLicense ¶
func (self *AboutWindow) SetLicense(license string)
SetLicense sets the license for self.
This can be used to set a custom text for the license if it can't be set via aboutwindow:license-type.
When set, aboutwindow:license-type will be set to GTK_LICENSE_CUSTOM.
The license text will be displayed on the Legal page, below the copyright information.
License text can contain Pango markup and links.
aboutwindow.AddLegalSection can be used to add license information for the application dependencies or other components.
The function takes the following parameters:
- license: license.
func (*AboutWindow) SetLicenseType ¶
func (self *AboutWindow) SetLicenseType(licenseType gtk.License)
SetLicenseType sets the license for self from a list of known licenses.
If the application's license is not in the list, aboutwindow:license can be used instead. The license type will be automatically set to GTK_LICENSE_CUSTOM in that case.
If license_type is GTK_LICENSE_UNKNOWN, no information will be displayed.
If license_type is different from GTK_LICENSE_CUSTOM. aboutwindow:license will be cleared out.
The license description will be displayed on the Legal page, below the copyright information.
aboutwindow.AddLegalSection can be used to add license information for the application dependencies or other components.
The function takes the following parameters:
- licenseType: license type.
func (*AboutWindow) SetReleaseNotes ¶
func (self *AboutWindow) SetReleaseNotes(releaseNotes string)
SetReleaseNotes sets the release notes for self.
Release notes are displayed on the the What's New page.
Release notes are formatted the same way as AppStream descriptions (https://freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-description).
The supported formatting options are:
* Paragraph (<p>) * Ordered list (<ol>), with list items (<li>) * Unordered list (<ul>), with list items (<li>)
Within paragraphs and list items, emphasis (<em>) and inline code (<code>) text styles are supported. The emphasis is rendered in italic, while inline code is shown in a monospaced font.
Any text outside paragraphs or list items is ignored.
Nested lists are not supported.
AdwAboutWindow displays the version above the release notes. If set, the aboutwindow:release-notes-version of the property will be used as the version; otherwise, aboutwindow:version is used.
The function takes the following parameters:
- releaseNotes: release notes.
func (*AboutWindow) SetReleaseNotesVersion ¶
func (self *AboutWindow) SetReleaseNotesVersion(version string)
SetReleaseNotesVersion sets the version described by the application's release notes.
The release notes version is displayed on the What's New page, above the release notes.
If not set, aboutwindow:version will be used instead.
For example, an application with the current version 2.0.2 might want to keep the release notes from 2.0.0, and set the release notes version accordingly.
See aboutwindow:release-notes.
The function takes the following parameters:
- version: release notes version.
func (*AboutWindow) SetSupportURL ¶
func (self *AboutWindow) SetSupportURL(supportUrl string)
SetSupportURL sets the URL of the support page for self.
The support page link is displayed on the main page.
The function takes the following parameters:
- supportUrl: support page URL.
func (*AboutWindow) SetTranslatorCredits ¶
func (self *AboutWindow) SetTranslatorCredits(translatorCredits string)
SetTranslatorCredits sets the translator credits string.
It will be displayed on the Credits page.
This string should be "translator-credits" or "translator_credits" and should be marked as translatable.
The string may contain email addresses and URLs, see the introduction for more details.
See also:
* aboutwindow:developers * aboutwindow:designers * aboutwindow:artists * aboutwindow:documenters * aboutwindow.AddCreditSection * aboutwindow.AddAcknowledgementSection.
The function takes the following parameters:
- translatorCredits: translator credits.
func (*AboutWindow) SetVersion ¶
func (self *AboutWindow) SetVersion(version string)
SetVersion sets the version for self.
The version is displayed on the main page.
If aboutwindow:release-notes-version is not set, the version will also be displayed above the release notes on the What's New page.
The function takes the following parameters:
- version: version.
func (*AboutWindow) SetWebsite ¶
func (self *AboutWindow) SetWebsite(website string)
SetWebsite sets the application website URL for self.
Website is displayed on the Details page, below comments, or on the main page if the Details page doesn't have any other content.
Applications can add other links below, see aboutwindow.AddLink.
The function takes the following parameters:
- website URL.
func (*AboutWindow) SupportURL ¶
func (self *AboutWindow) SupportURL() string
SupportURL gets the URL of the support page for self.
The function returns the following values:
- utf8: support page URL.
func (*AboutWindow) TranslatorCredits ¶
func (self *AboutWindow) TranslatorCredits() string
TranslatorCredits gets the translator credits string.
The function returns the following values:
- utf8: translator credits string.
func (*AboutWindow) Version ¶
func (self *AboutWindow) Version() string
Version gets the version for self.
The function returns the following values:
- utf8: version.
func (*AboutWindow) Website ¶
func (self *AboutWindow) Website() string
Website gets the application website URL for self.
The function returns the following values:
- utf8: website URL.
type AboutWindowClass ¶
type AboutWindowClass struct {
// contains filtered or unexported fields
}
AboutWindowClass: instance of this type is always passed by reference.
func (*AboutWindowClass) ParentClass ¶
func (a *AboutWindowClass) ParentClass() *WindowClass
type AboutWindowOverrides ¶
type AboutWindowOverrides struct { }
AboutWindowOverrides contains methods that are overridable.
type ActionRow ¶
type ActionRow struct { PreferencesRow // contains filtered or unexported fields }
ActionRow: gtk.ListBoxRow used to present actions.
<picture> <source srcset="action-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="action-row.png" alt="action-row"> </picture>
The AdwActionRow widget can have a title, a subtitle and an icon. The row can receive additional widgets at its end, or prefix widgets at its start.
It is convenient to present a preference and its related actions.
AdwActionRow is unactivatable by default, giving it an activatable widget will automatically make it activatable, but unsetting it won't change the row's activatability.
AdwActionRow as GtkBuildable ¶
The AdwActionRow implementation of the gtk.Buildable interface supports adding a child at its end by specifying “suffix” or omitting the “type” attribute of a <child> element.
It also supports adding a child as a prefix widget by specifying “prefix” as the “type” attribute of a <child> element.
CSS nodes ¶
AdwActionRow has a main CSS node with name row.
It contains the subnode box.header for its main horizontal box, and box.title for the vertical box containing the title and subtitle labels.
It contains subnodes label.title and label.subtitle representing respectively the title label and subtitle label.
AdwActionRow can use the .property (style-classes.html#property-rows) style class to emphasize the row subtitle instead of the row title, which is useful for displaying read-only properties.
func NewActionRow ¶
func NewActionRow() *ActionRow
NewActionRow creates a new AdwActionRow.
The function returns the following values:
- actionRow: newly created AdwActionRow.
func (*ActionRow) ActivatableWidget ¶
func (self *ActionRow) ActivatableWidget() gtk.Widgetter
ActivatableWidget gets the widget activated when self is activated.
The function returns the following values:
- widget (optional): activatable widget for self.
func (*ActionRow) AddPrefix ¶
func (self *ActionRow) AddPrefix(widget gtk.Widgetter)
AddPrefix adds a prefix widget to self.
The function takes the following parameters:
- widget: widget.
func (*ActionRow) AddSuffix ¶
func (self *ActionRow) AddSuffix(widget gtk.Widgetter)
AddSuffix adds a suffix widget to self.
The function takes the following parameters:
- widget: widget.
func (*ActionRow) ConnectActivated ¶
func (self *ActionRow) ConnectActivated(f func()) coreglib.SignalHandle
ConnectActivated: this signal is emitted after the row has been activated.
func (*ActionRow) Remove ¶
func (self *ActionRow) Remove(widget gtk.Widgetter)
Remove removes a child from self.
The function takes the following parameters:
- widget: child to be removed.
func (*ActionRow) SetActivatableWidget ¶
func (self *ActionRow) SetActivatableWidget(widget gtk.Widgetter)
SetActivatableWidget sets the widget to activate when self is activated.
The row can be activated either by clicking on it, calling actionrow.Activate, or via mnemonics in the title. See the preferencesrow:use-underline property to enable mnemonics.
The target widget will be activated by emitting the gtk.Widget::mnemonic-activate signal on it.
The function takes the following parameters:
- widget (optional): target widget.
func (*ActionRow) SetIconName
deprecated
func (*ActionRow) SetSubtitle ¶
SetSubtitle sets the subtitle for self.
The subtitle is interpreted as Pango markup unless preferencesrow:use-markup is set to FALSE.
The function takes the following parameters:
- subtitle: subtitle.
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.
The function takes the following parameters:
- subtitleLines: number of lines at the end of which the subtitle label will be ellipsized.
func (*ActionRow) SetSubtitleSelectable ¶
SetSubtitleSelectable sets whether the user can copy the subtitle from the label
See also gtk.Label:selectable.
The function takes the following parameters:
- subtitleSelectable: TRUE if the user can copy the subtitle from the label.
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.
The function takes the following parameters:
- titleLines: number of lines at the end of which the title label will be ellipsized.
func (*ActionRow) Subtitle ¶
Subtitle gets the subtitle for self.
The function returns the following values:
- utf8 (optional): subtitle for self.
func (*ActionRow) SubtitleLines ¶
SubtitleLines gets the number of lines at the end of which the subtitle label will be ellipsized.
The function returns the following values:
- gint: number of lines at the end of which the subtitle label will be ellipsized.
func (*ActionRow) SubtitleSelectable ¶
SubtitleSelectable gets whether the user can copy the subtitle from the label.
The function returns the following values:
- ok: whether the user can copy the subtitle from the label.
func (*ActionRow) TitleLines ¶
TitleLines gets the number of lines at the end of which the title label will be ellipsized.
The function returns the following values:
- gint: number of lines at the end of which the title label will be ellipsized.
type ActionRowClass ¶
type ActionRowClass struct {
// contains filtered or unexported fields
}
ActionRowClass: instance of this type is always passed by reference.
func (*ActionRowClass) ParentClass ¶
func (a *ActionRowClass) ParentClass() *PreferencesRowClass
ParentClass: parent class.
type ActionRowOverrides ¶
type ActionRowOverrides struct {
// Activate activates self.
Activate func()
}
ActionRowOverrides contains methods that are overridable.
type AlertDialog ¶
type AlertDialog struct { Dialog // contains filtered or unexported fields }
AlertDialog: dialog presenting a message or a question.
<picture> <source srcset="alert-dialog-dark.png" media="(prefers-color-scheme: dark)"> <img src="alert-dialog.png" alt="alert-dialog"> </picture>
Alert dialogs have a heading, a body, an optional child widget, and one or multiple responses, each presented as a button.
Each response has a unique string ID, and a button label. Additionally, each response can be enabled or disabled, and can have a suggested or destructive appearance.
When one of the responses is activated, or the dialog is closed, the alertdialog::response signal will be emitted. This signal is detailed, and the detail, as well as the response parameter will be set to the ID of the activated response, or to the value of the alertdialog:close-response property if the dialog had been closed without activating any of the responses.
Response buttons can be presented horizontally or vertically depending on available space.
When a response is activated, AdwAlertDialog is closed automatically.
An example of using an alert dialog:
AdwDialog *dialog; dialog = adw_alert_dialog_new (_("Replace File?"), NULL); adw_alert_dialog_format_body (ADW_ALERT_DIALOG (dialog), _("A file named “s” already exists. Do you want to replace it?"), filename); adw_alert_dialog_add_responses (ADW_ALERT_DIALOG (dialog), "cancel", _("_Cancel"), "replace", _("_Replace"), NULL); adw_alert_dialog_set_response_appearance (ADW_ALERT_DIALOG (dialog), "replace", ADW_RESPONSE_DESTRUCTIVE); adw_alert_dialog_set_default_response (ADW_ALERT_DIALOG (dialog), "cancel"); adw_alert_dialog_set_close_response (ADW_ALERT_DIALOG (dialog), "cancel"); g_signal_connect (dialog, "response", G_CALLBACK (response_cb), self); adw_dialog_present (dialog, parent);
Async API ¶
AdwAlertDialog can also be used via the alertdialog.Choose method. This API follows the GIO async pattern, and the result can be obtained by calling alertdialog.ChooseFinish, for example:
static void dialog_cb (AdwAlertDialog *dialog, GAsyncResult *result, MyWindow *self) { const char *response = adw_alert_dialog_choose_finish (dialog, result); // ... } static void show_dialog (MyWindow *self) { AdwDialog *dialog; dialog = adw_alert_dialog_new (_("Replace File?"), NULL); adw_alert_dialog_format_body (ADW_ALERT_DIALOG (dialog), _("A file named “s” already exists. Do you want to replace it?"), filename); adw_alert_dialog_add_responses (ADW_ALERT_DIALOG (dialog), "cancel", _("_Cancel"), "replace", _("_Replace"), NULL); adw_alert_dialog_set_response_appearance (ADW_ALERT_DIALOG (dialog), "replace", ADW_RESPONSE_DESTRUCTIVE); adw_alert_dialog_set_default_response (ADW_ALERT_DIALOG (dialog), "cancel"); adw_alert_dialog_set_close_response (ADW_ALERT_DIALOG (dialog), "cancel"); adw_alert_dialog_choose (ADW_ALERT_DIALOG (dialog), GTK_WIDGET (self), NULL, (GAsyncReadyCallback) dialog_cb, self); }
AdwAlertDialog as GtkBuildable ¶
AdwAlertDialog supports adding responses in UI definitions by via the <responses> element that may contain multiple <response> elements, each respresenting a response.
Each of the <response> elements must have the id attribute specifying the response ID. The contents of the element are used as the response label.
Response labels can be translated with the usual translatable, context and comments attributes.
The <response> elements can also have enabled and/or appearance attributes. See alertdialog.SetResponseEnabled and alertdialog.SetResponseAppearance for details.
Example of an AdwAlertDialog UI definition:
<object class="AdwAlertDialog" id="dialog"> <property name="heading" translatable="yes">Save Changes?</property> <property name="body" translatable="yes">Open documents contain unsaved changes. Changes which are not saved will be permanently lost.</property> <property name="default-response">save</property> <property name="close-response">cancel</property> <signal name="response" handler="response_cb"/> <responses> <response id="cancel" translatable="yes">_Cancel</response> <response id="discard" translatable="yes" appearance="destructive">_Discard</response> <response id="save" translatable="yes" appearance="suggested" enabled="false">_Save</response> </responses> </object>.
func NewAlertDialog ¶
func NewAlertDialog(heading, body string) *AlertDialog
NewAlertDialog creates a new AdwAlertDialog.
heading and body can be set to NULL. This can be useful if they need to be formatted or use markup. In that case, set them to NULL and call alertdialog.FormatBody or similar methods afterwards:
AdwDialog *dialog; dialog = adw_alert_dialog_new (_("Replace File?"), NULL); adw_alert_dialog_format_body (ADW_ALERT_DIALOG (dialog), _("A file named “s” already exists. Do you want to replace it?"), filename);.
The function takes the following parameters:
- heading (optional): heading.
- body (optional) text.
The function returns the following values:
- alertDialog: newly created AdwAlertDialog.
func (*AlertDialog) AddResponse ¶
func (self *AlertDialog) AddResponse(id, label string)
AddResponse adds a response with id and label to self.
Responses are represented as buttons in the dialog.
Response ID must be unique. It will be used in alertdialog::response to tell which response had been activated, as well as to inspect and modify the response later.
An embedded underline in label indicates a mnemonic.
alertdialog.SetResponseLabel can be used to change the response label after it had been added.
alertdialog.SetResponseEnabled and alertdialog.SetResponseAppearance can be used to customize the responses further.
The function takes the following parameters:
- id: response ID.
- label: response label.
func (*AlertDialog) Body ¶
func (self *AlertDialog) Body() string
Body gets the body text of self.
The function returns the following values:
- utf8: body of self.
func (*AlertDialog) BodyUseMarkup ¶
func (self *AlertDialog) BodyUseMarkup() bool
BodyUseMarkup gets whether the body text of self includes Pango markup.
The function returns the following values:
- ok: whether self uses markup for body text.
func (*AlertDialog) ChooseFinish ¶
func (self *AlertDialog) ChooseFinish(result gio.AsyncResulter) string
ChooseFinish finishes the alertdialog.Choose call and returns the response ID.
The function takes the following parameters:
- result: GAsyncResult.
The function returns the following values:
- utf8: ID of the response that was selected, or alertdialog:close-response if the call was cancelled.
func (*AlertDialog) CloseResponse ¶
func (self *AlertDialog) CloseResponse() string
CloseResponse gets the ID of the close response of self.
The function returns the following values:
- utf8: close response ID.
func (*AlertDialog) ConnectResponse ¶
func (self *AlertDialog) ConnectResponse(f func(response string)) coreglib.SignalHandle
ConnectResponse: this signal is emitted when the dialog is closed.
response will be set to the response ID of the button that had been activated.
if the dialog was closed by pressing <kbd>Escape</kbd> or with a system action, response will be set to the value of alertdialog:close-response.
func (*AlertDialog) DefaultResponse ¶
func (self *AlertDialog) DefaultResponse() string
DefaultResponse gets the ID of the default response of self.
The function returns the following values:
- utf8 (optional): default response ID.
func (*AlertDialog) ExtraChild ¶
func (self *AlertDialog) ExtraChild() gtk.Widgetter
ExtraChild gets the child widget of self.
The function returns the following values:
- widget (optional): child widget of self.
func (*AlertDialog) HasResponse ¶
func (self *AlertDialog) HasResponse(response string) bool
HasResponse gets whether self has a response with the ID response.
The function takes the following parameters:
- response ID.
The function returns the following values:
- ok: whether self has a response with the ID response.
func (*AlertDialog) Heading ¶
func (self *AlertDialog) Heading() string
Heading gets the heading of self.
The function returns the following values:
- utf8 (optional): heading of self.
func (*AlertDialog) HeadingUseMarkup ¶
func (self *AlertDialog) HeadingUseMarkup() bool
HeadingUseMarkup gets whether the heading of self includes Pango markup.
The function returns the following values:
- ok: whether self uses markup for heading.
func (*AlertDialog) RemoveResponse ¶
func (self *AlertDialog) RemoveResponse(id string)
RemoveResponse removes a response from self.
The function takes the following parameters:
- id: response ID.
func (*AlertDialog) ResponseAppearance ¶
func (self *AlertDialog) ResponseAppearance(response string) ResponseAppearance
ResponseAppearance gets the appearance of response.
See alertdialog.SetResponseAppearance.
The function takes the following parameters:
- response ID.
The function returns the following values:
- responseAppearance: appearance of response.
func (*AlertDialog) ResponseEnabled ¶
func (self *AlertDialog) ResponseEnabled(response string) bool
ResponseEnabled gets whether response is enabled.
See alertdialog.SetResponseEnabled.
The function takes the following parameters:
- response ID.
The function returns the following values:
- ok: whether response is enabled.
func (*AlertDialog) ResponseLabel ¶
func (self *AlertDialog) ResponseLabel(response string) string
ResponseLabel gets the label of response.
See alertdialog.SetResponseLabel.
The function takes the following parameters:
- response ID.
The function returns the following values:
- utf8: label of response.
func (*AlertDialog) SetBody ¶
func (self *AlertDialog) SetBody(body string)
SetBody sets the body text of self.
The function takes the following parameters:
- body of self.
func (*AlertDialog) SetBodyUseMarkup ¶
func (self *AlertDialog) SetBodyUseMarkup(useMarkup bool)
SetBodyUseMarkup sets whether the body text of self includes Pango markup.
See pango.ParseMarkup().
The function takes the following parameters:
- useMarkup: whether to use markup for body text.
func (*AlertDialog) SetCloseResponse ¶
func (self *AlertDialog) SetCloseResponse(response string)
SetCloseResponse sets the ID of the close response of self.
It will be passed to alertdialog::response if the dialog is closed by pressing <kbd>Escape</kbd> or with a system action.
It doesn't have to correspond to any of the responses in the dialog.
The default close response is close.
The function takes the following parameters:
- response: close response ID.
func (*AlertDialog) SetDefaultResponse ¶
func (self *AlertDialog) SetDefaultResponse(response string)
SetDefaultResponse sets the ID of the default response of self.
If set, pressing <kbd>Enter</kbd> will activate the corresponding button.
If set to NULL or to a non-existent response ID, pressing <kbd>Enter</kbd> will do nothing.
The function takes the following parameters:
- response (optional): default response ID.
func (*AlertDialog) SetExtraChild ¶
func (self *AlertDialog) SetExtraChild(child gtk.Widgetter)
SetExtraChild sets the child widget of self.
The child widget is displayed below the heading and body.
The function takes the following parameters:
- child (optional) widget.
func (*AlertDialog) SetHeading ¶
func (self *AlertDialog) SetHeading(heading string)
SetHeading sets the heading of self.
The function takes the following parameters:
- heading (optional) of self.
func (*AlertDialog) SetHeadingUseMarkup ¶
func (self *AlertDialog) SetHeadingUseMarkup(useMarkup bool)
SetHeadingUseMarkup sets whether the heading of self includes Pango markup.
See pango.ParseMarkup().
The function takes the following parameters:
- useMarkup: whether to use markup for heading.
func (*AlertDialog) SetResponseAppearance ¶
func (self *AlertDialog) SetResponseAppearance(response string, appearance ResponseAppearance)
SetResponseAppearance sets the appearance for response.
<picture> <source srcset="alert-dialog-appearance-dark.png" media="(prefers-color-scheme: dark)"> <img src="alert-dialog-appearance.png" alt="alert-dialog-appearance"> </picture>
Use ADW_RESPONSE_SUGGESTED to mark important responses such as the affirmative action, like the Save button in the example.
Use ADW_RESPONSE_DESTRUCTIVE to draw attention to the potentially damaging consequences of using response. This appearance acts as a warning to the user. The Discard button in the example is using this appearance.
The default appearance is ADW_RESPONSE_DEFAULT.
Negative responses like Cancel or Close should use the default appearance.
The function takes the following parameters:
- response ID.
- appearance for response.
func (*AlertDialog) SetResponseEnabled ¶
func (self *AlertDialog) SetResponseEnabled(response string, enabled bool)
SetResponseEnabled sets whether response is enabled.
If response is not enabled, the corresponding button will have gtk.Widget:sensitive set to FALSE and it can't be activated as a default response.
response can still be used as alertdialog:close-response while it's not enabled.
Responses are enabled by default.
The function takes the following parameters:
- response ID.
- enabled: whether to enable response.
func (*AlertDialog) SetResponseLabel ¶
func (self *AlertDialog) SetResponseLabel(response, label string)
SetResponseLabel sets the label of response to label.
Labels are displayed on the dialog buttons. An embedded underline in label indicates a mnemonic.
The function takes the following parameters:
- response ID.
- label of response.
type AlertDialogClass ¶
type AlertDialogClass struct {
// contains filtered or unexported fields
}
AlertDialogClass: instance of this type is always passed by reference.
func (*AlertDialogClass) ParentClass ¶
func (a *AlertDialogClass) ParentClass() *DialogClass
type AlertDialogOverrides ¶
type AlertDialogOverrides struct {
Response func(response string)
}
AlertDialogOverrides contains methods that are overridable.
type Animation ¶
Animation: base class for animations.
AdwAnimation represents an animation on a widget. It has a target that provides a value to animate, and a state indicating whether the animation hasn't been started yet, is playing, paused or finished.
Currently there are two concrete animation types: timedanimation and springanimation.
AdwAnimation will automatically skip the animation if animation:widget is unmapped, or if gtk.Settings:gtk-enable-animations is FALSE.
The animation::done signal can be used to perform an action after the animation ends, for example hiding a widget after animating its gtk.Widget:opacity to 0.
AdwAnimation will be kept alive while the animation is playing. As such, it's safe to create an animation, start it and immediately unref it: A fire-and-forget animation:
static void animation_cb (double value, MyObject *self) { // Do something with value } static void my_object_animate (MyObject *self) { AdwAnimationTarget *target = adw_callback_animation_target_new ((AdwAnimationTargetFunc) animation_cb, self, NULL); g_autoptr (AdwAnimation) animation = adw_timed_animation_new (widget, 0, 1, 250, target); adw_animation_play (animation); }
If there's a chance the previous animation for the same target hasn't yet finished, the previous animation should be stopped first, or the existing AdwAnimation object can be reused.
func BaseAnimation ¶
func BaseAnimation(obj Animationer) *Animation
BaseAnimation returns the underlying base object.
func (*Animation) ConnectDone ¶
func (self *Animation) ConnectDone(f func()) coreglib.SignalHandle
ConnectDone: this signal is emitted when the animation has been completed, either on its own or via calling animation.Skip.
func (*Animation) FollowEnableAnimationsSetting ¶
FollowEnableAnimationsSetting gets whether self should be skipped when animations are globally disabled.
The function returns the following values:
- ok: whether to follow the global setting.
func (*Animation) Pause ¶
func (self *Animation) Pause()
Pause pauses a playing animation for self.
Does nothing if the current state of self isn't ADW_ANIMATION_PLAYING.
Sets animation:state to ADW_ANIMATION_PAUSED.
func (*Animation) Play ¶
func (self *Animation) Play()
Play starts the animation for self.
If the animation is playing, paused or has been completed, restarts it from the beginning. This allows to easily play an animation regardless of whether it's already playing or not.
Sets animation:state to ADW_ANIMATION_PLAYING.
The animation will be automatically skipped if animation:widget is unmapped, or if gtk.Settings:gtk-enable-animations is FALSE.
As such, it's not guaranteed that the animation will actually run. For example, when using glib.IdleAdd() and starting an animation immediately afterwards, it's entirely possible that the idle callback will run after the animation has already finished, and not while it's playing.
func (*Animation) Reset ¶
func (self *Animation) Reset()
Reset resets the animation for self.
Sets animation:state to ADW_ANIMATION_IDLE.
func (*Animation) Resume ¶
func (self *Animation) Resume()
Resume resumes a paused animation for self.
This function must only be used if the animation has been paused with animation.Pause.
Sets animation:state to ADW_ANIMATION_PLAYING.
func (*Animation) SetFollowEnableAnimationsSetting ¶
SetFollowEnableAnimationsSetting sets whether to skip self when animations are globally disabled.
The default behavior is to skip the animation. Set to FALSE to disable this behavior.
This can be useful for cases where animation is essential, like spinners, or in demo applications. Most other animations should keep it enabled.
See gtk.Settings:gtk-enable-animations.
The function takes the following parameters:
- setting: whether to follow the global setting.
func (*Animation) SetTarget ¶
func (self *Animation) SetTarget(target AnimationTargetter)
SetTarget sets the target self animates to target.
The function takes the following parameters:
- target: animation target.
func (*Animation) Skip ¶
func (self *Animation) Skip()
Skip skips the animation for self.
If the animation hasn't been started yet, is playing, or is paused, instantly skips the animation to the end and causes animation::done to be emitted.
Sets animation:state to ADW_ANIMATION_FINISHED.
func (*Animation) State ¶
func (self *Animation) State() AnimationState
State gets the current value of self.
The state indicates whether self is currently playing, paused, finished or hasn't been started yet.
The function returns the following values:
- animationState: animation value.
func (*Animation) Target ¶
func (self *Animation) Target() AnimationTargetter
Target gets the target self animates.
The function returns the following values:
- animationTarget: animation target.
func (*Animation) Value ¶
Value gets the current value of self.
The function returns the following values:
- gdouble: current value.
func (*Animation) Widget ¶
func (self *Animation) Widget() gtk.Widgetter
Widget gets the widget self was created for.
It provides the frame clock for the animation. It's not strictly necessary for this widget to be same as the one being animated.
The widget must be mapped in order for the animation to work. If it's not mapped, or if it gets unmapped during an ongoing animation, the animation will be automatically skipped.
The function returns the following values:
- widget: animation widget.
type AnimationState ¶
AnimationState describes the possible states of an animation.
The state can be controlled with animation.Play, animation.Pause, animation.Resume, animation.Reset and animation.Skip.
const ( // AnimationIdle: animation hasn't started yet. AnimationIdle AnimationState = iota // AnimationPaused: animation has been paused. AnimationPaused // AnimationPlaying: animation is currently playing. AnimationPlaying // AnimationFinished: animation has finished. AnimationFinished )
func (AnimationState) String ¶
func (a AnimationState) String() string
String returns the name in string for AnimationState.
type AnimationTarget ¶
AnimationTarget represents a value animation can animate.
func BaseAnimationTarget ¶
func BaseAnimationTarget(obj AnimationTargetter) *AnimationTarget
BaseAnimationTarget returns the underlying base object.
type AnimationTargetFunc ¶
type AnimationTargetFunc func(value float64)
AnimationTargetFunc: prototype for animation targets based on user callbacks.
type AnimationTargetter ¶
AnimationTargetter describes types inherited from class AnimationTarget.
To get the original type, the caller must assert this to an interface or another type.
type Animationer ¶
Animationer describes types inherited from class Animation.
To get the original type, the caller must assert this to an interface or another type.
type Application ¶
type Application struct { gtk.Application // contains filtered or unexported fields }
Application: base class for Adwaita applications.
AdwApplication handles library initialization by calling init in the default gio.Application::startup signal handler, in turn chaining up as required by gtk.Application. Therefore, any subclass of AdwApplication should always chain up its startup handler before using any Adwaita or GTK API.
Automatic Resources ¶
AdwApplication will automatically load stylesheets located in the application's resource base path (see gio.Application.SetResourceBasePath(), if they're present.
They can be used to add custom styles to the application, as follows:
- style.css contains styles that are always present.
- style-dark.css contains styles only used when stylemanager:dark is TRUE.
- style-hc.css contains styles used when the system high contrast preference is enabled.
- style-hc-dark.css contains styles used when the system high contrast preference is enabled and stylemanager:dark is TRUE.
func NewApplication ¶
func NewApplication(applicationId string, flags gio.ApplicationFlags) *Application
NewApplication creates a new AdwApplication.
If application_id is not NULL, then it must be valid. See gio.Application().IDIsValid.
If no application ID is given then some features (most notably application uniqueness) will be disabled.
The function takes the following parameters:
- applicationId (optional): application ID.
- flags: application flags.
The function returns the following values:
- application: newly created AdwApplication.
func (*Application) StyleManager ¶
func (self *Application) StyleManager() *StyleManager
StyleManager gets the style manager for self.
This is a convenience property allowing to access AdwStyleManager through property bindings or expressions.
The function returns the following values:
- styleManager: style manager.
type ApplicationClass ¶
type ApplicationClass struct {
// contains filtered or unexported fields
}
ApplicationClass: instance of this type is always passed by reference.
func (*ApplicationClass) ParentClass ¶
func (a *ApplicationClass) ParentClass() *gtk.ApplicationClass
ParentClass: parent class.
type ApplicationOverrides ¶
type ApplicationOverrides struct { }
ApplicationOverrides contains methods that are overridable.
type ApplicationWindow ¶
type ApplicationWindow struct { gtk.ApplicationWindow // contains filtered or unexported fields }
ApplicationWindow: freeform application window.
<picture> <source srcset="application-window-dark.png" media="(prefers-color-scheme: dark)"> <img src="application-window.png" alt="application-window"> </picture>
AdwApplicationWindow is a gtk.ApplicationWindow subclass providing the same features as window.
See window for details.
Example of an AdwApplicationWindow UI definition:
<object class="AdwApplicationWindow"> <property name="content"> <object class="AdwToolbarView"> <child type="top"> <object class="AdwHeaderBar"/> </child> <property name="content"> <!-- ... --> </property> </object> </property> </object>
Using gtk.Application:menubar is not supported and may result in visual glitches.
func NewApplicationWindow ¶
func NewApplicationWindow(app *gtk.Application) *ApplicationWindow
NewApplicationWindow creates a new AdwApplicationWindow for app.
The function takes the following parameters:
- app: application instance.
The function returns the following values:
- applicationWindow: newly created AdwApplicationWindow.
func (*ApplicationWindow) AddBreakpoint ¶
func (self *ApplicationWindow) AddBreakpoint(breakpoint *Breakpoint)
AddBreakpoint adds breakpoint to self.
The function takes the following parameters:
- breakpoint to add.
func (*ApplicationWindow) Content ¶
func (self *ApplicationWindow) Content() gtk.Widgetter
Content gets the content widget of self.
This method should always be used instead of gtk.Window.GetChild().
The function returns the following values:
- widget (optional): content widget of self.
func (*ApplicationWindow) CurrentBreakpoint ¶
func (self *ApplicationWindow) CurrentBreakpoint() *Breakpoint
CurrentBreakpoint gets the current breakpoint.
The function returns the following values:
- breakpoint (optional): current breakpoint.
func (*ApplicationWindow) Dialogs ¶
func (self *ApplicationWindow) Dialogs() *gio.ListModel
Dialogs returns a gio.ListModel that contains the open dialogs of self.
This can be used to keep an up-to-date view.
The function returns the following values:
- listModel: list model for the dialogs of self.
func (*ApplicationWindow) SetContent ¶
func (self *ApplicationWindow) SetContent(content gtk.Widgetter)
SetContent sets the content widget of self.
This method should always be used instead of gtk.Window.SetChild().
The function takes the following parameters:
- content (optional) widget.
func (*ApplicationWindow) VisibleDialog ¶
func (self *ApplicationWindow) VisibleDialog() *Dialog
VisibleDialog returns the currently visible dialog in self, if there's one.
The function returns the following values:
- dialog (optional): visible dialog.
type ApplicationWindowClass ¶
type ApplicationWindowClass struct {
// contains filtered or unexported fields
}
ApplicationWindowClass: instance of this type is always passed by reference.
func (*ApplicationWindowClass) ParentClass ¶
func (a *ApplicationWindowClass) ParentClass() *gtk.ApplicationWindowClass
type ApplicationWindowOverrides ¶
type ApplicationWindowOverrides struct { }
ApplicationWindowOverrides contains methods that are overridable.
type Avatar ¶
type Avatar struct { gtk.Widget // contains filtered or unexported fields }
Avatar: widget displaying an image, with a generated fallback.
<picture> <source srcset="avatar-dark.png" media="(prefers-color-scheme: dark)"> <img src="avatar.png" alt="avatar"> </picture>
AdwAvatar is a widget that shows a round avatar.
AdwAvatar generates an avatar with the initials of the avatar:text on top of a colored background.
The color is picked based on the hash of the avatar:text.
If avatar:show-initials is set to FALSE, avatar:icon-name or avatar-default-symbolic is shown instead of the initials.
Use avatar:custom-image to set a custom image.
CSS nodes ¶
AdwAvatar has a single CSS node with name avatar.
func NewAvatar ¶
NewAvatar creates a new AdwAvatar.
The function takes the following parameters:
- size of the avatar.
- text (optional) used to get the initials and color.
- showInitials: whether to use initials instead of an icon as fallback.
The function returns the following values:
- avatar: newly created AdwAvatar.
func (*Avatar) CustomImage ¶
func (self *Avatar) CustomImage() *gdk.Paintable
CustomImage gets the custom image paintable.
The function returns the following values:
- paintable (optional): custom image.
func (*Avatar) DrawToTexture ¶
DrawToTexture renders self into a gdk.Texture at scale_factor.
This can be used to export the fallback avatar.
The function takes the following parameters:
- scaleFactor: scale factor.
The function returns the following values:
- texture: texture.
func (*Avatar) IconName ¶
IconName gets the name of an icon to use as a fallback.
The function returns the following values:
- utf8 (optional): icon name.
func (*Avatar) SetCustomImage ¶
func (self *Avatar) SetCustomImage(customImage gdk.Paintabler)
SetCustomImage sets the custom image paintable.
Custom image is displayed instead of initials or icon.
The function takes the following parameters:
- customImage (optional): custom image.
func (*Avatar) SetIconName ¶
SetIconName sets the name of an icon to use as a fallback.
If no name is set, avatar-default-symbolic will be used.
The function takes the following parameters:
- iconName (optional): icon name.
func (*Avatar) SetShowInitials ¶
SetShowInitials sets whether to use initials instead of an icon on the fallback avatar.
See avatar:icon-name for how to change the fallback icon.
The function takes the following parameters:
- showInitials: whether to use initials instead of an icon as fallback.
func (*Avatar) SetSize ¶
SetSize sets the size of the avatar.
The function takes the following parameters:
- size of the avatar.
func (*Avatar) SetText ¶
SetText sets the text used to generate the fallback initials and color.
It's only used to generate the color if avatar:show-initials is FALSE.
The function takes the following parameters:
- text (optional) used to get the initials and color.
func (*Avatar) ShowInitials ¶
ShowInitials gets whether initials are used instead of an icon on the fallback avatar.
The function returns the following values:
- ok: whether initials are used instead of an icon as fallback.
type AvatarClass ¶
type AvatarClass struct {
// contains filtered or unexported fields
}
AvatarClass: instance of this type is always passed by reference.
func (*AvatarClass) ParentClass ¶
func (a *AvatarClass) ParentClass() *gtk.WidgetClass
type AvatarOverrides ¶
type AvatarOverrides struct { }
AvatarOverrides contains methods that are overridable.
type Banner ¶
type Banner struct { gtk.Widget *coreglib.Object gtk.Actionable // contains filtered or unexported fields }
Banner: bar with contextual information.
<picture> <source srcset="banner-dark.png" media="(prefers-color-scheme: dark)"> <img src="banner.png" alt="banner"> </picture>
Banners are hidden by default, use banner:revealed to show them.
Banners have a title, set with banner:title. Titles can be marked up with Pango markup, use banner:use-markup to enable it.
The title will be shown centered or left-aligned depending on available space.
Banners can optionally have a button with text on it, set through banner:button-label. The button can be used with a GAction, or with the banner::button-clicked signal.
CSS nodes ¶
AdwBanner has a main CSS node with the name banner.
func NewBanner ¶
NewBanner creates a new AdwBanner.
The function takes the following parameters:
- title: banner title.
The function returns the following values:
- banner: newly created AdwBanner.
func (*Banner) ButtonLabel ¶
ButtonLabel gets the button label for self.
The function returns the following values:
- utf8 (optional): button label for self.
func (*Banner) ConnectButtonClicked ¶
func (self *Banner) ConnectButtonClicked(f func()) coreglib.SignalHandle
ConnectButtonClicked: this signal is emitted after the action button has been clicked.
It can be used as an alternative to setting an action.
func (*Banner) Revealed ¶
Revealed gets if a banner is revealed.
The function returns the following values:
- ok: whether a banner is revealed.
func (*Banner) SetButtonLabel ¶
SetButtonLabel sets the button label for self.
If set to "" or NULL, the button won't be shown.
The button can be used with a GAction, or with the banner::button-clicked signal.
The function takes the following parameters:
- label (optional): label.
func (*Banner) SetRevealed ¶
SetRevealed sets whether a banner should be revealed.
The function takes the following parameters:
- revealed: whether a banner should be revealed.
func (*Banner) SetTitle ¶
SetTitle sets the title for this banner.
See also: banner:use-markup.
The function takes the following parameters:
- title: title.
func (*Banner) SetUseMarkup ¶
SetUseMarkup sets whether to use Pango markup for the banner title.
See also pango.ParseMarkup().
The function takes the following parameters:
- useMarkup: whether to use markup.
type BannerClass ¶
type BannerClass struct {
// contains filtered or unexported fields
}
BannerClass: instance of this type is always passed by reference.
func (*BannerClass) ParentClass ¶
func (b *BannerClass) ParentClass() *gtk.WidgetClass
type BannerOverrides ¶
type BannerOverrides struct { }
BannerOverrides contains methods that are overridable.
type Bin ¶
type Bin struct { gtk.Widget // contains filtered or unexported fields }
Bin: widget with one child.
<picture> <source srcset="bin-dark.png" media="(prefers-color-scheme: dark)"> <img src="bin.png" alt="bin"> </picture>
The AdwBin widget has only one child, set with the bin:child property.
It is useful for deriving subclasses, since it provides common code needed for handling a single child widget.
func NewBin ¶
func NewBin() *Bin
NewBin creates a new AdwBin.
The function returns the following values:
- bin: new created AdwBin.
type BinClass ¶
type BinClass struct {
// contains filtered or unexported fields
}
BinClass: instance of this type is always passed by reference.
func (*BinClass) ParentClass ¶
func (b *BinClass) ParentClass() *gtk.WidgetClass
type BinOverrides ¶
type BinOverrides struct { }
BinOverrides contains methods that are overridable.
type Breakpoint ¶
Breakpoint describes a breakpoint for window or dialog.
Breakpoints are used to create adaptive UI, allowing to change the layout depending on available size.
Breakpoint is a size threshold, specified by its condition, as well as one or more setters.
Each setter has a target object, a property and a value. When a breakpoint is applied, each setter sets the target property on their target object to the specified value, and reset it back to the original value when it's unapplied.
For more complicated scenarios, breakpoint::apply and breakpoint::unapply can be used instead.
Breakpoints can be used within window, applicationwindow, dialog or breakpointbin.
AdwBreakpoint as GtkBuildable:
AdwBreakpoint supports specifying its condition via the <condition> element. The contents of the element must be a string in a format accepted by breakpointcondition.Parse().
It also supports adding setters via the <setter> element. Each <setter> element must have the object attribute specifying the target object, and the property attribute specifying the property name. The contents of the element are used as the setter value.
For G_TYPE_OBJECT and G_TYPE_BOXED derived properties, empty contents are treated as NULL.
Setter values can be translated with the usual translatable, context and comments attributes.
Example of an AdwBreakpoint UI definition:
<object class="AdwBreakpoint"> <condition>max-width: 400px</condition> <setter object="button" property="visible">True</setter> <setter object="box" property="orientation">vertical</setter> <setter object="page" property="title" translatable="yes">Example</setter> </object>.
func NewBreakpoint ¶
func NewBreakpoint(condition *BreakpointCondition) *Breakpoint
NewBreakpoint creates a new AdwBreakpoint with condition.
The function takes the following parameters:
- condition: condition.
The function returns the following values:
- breakpoint: newly created AdwBreakpoint.
func (*Breakpoint) AddSetter ¶
func (self *Breakpoint) AddSetter(object glib.Objector, property string, value any)
AddSetter adds a setter to self.
The setter will automatically set property on object to value when applying the breakpoint, and set it back to its original value upon unapplying it.
Note that setting properties to their original values does not work for properties that have irreversible side effects. For example, changing gtk.Button:label while gtk.Button:icon-name is set will reset the icon. However, resetting the label will not set icon-name to its original value.
Use the breakpoint::apply and breakpoint::unapply signals for those properties instead.
The function takes the following parameters:
- object: target object.
- property: target property.
- value to set.
func (*Breakpoint) AddSetterDirect ¶
func (self *Breakpoint) AddSetterDirect(object *coreglib.Object, property string, value *coreglib.Value)
AddSetterDirect adds a setter to self.
The setter will automatically set property on object to value when applying the breakpoint, and set it back to its original value upon unapplying it.
::: note Setting properties to their original values does not work for properties that have irreversible side effects. For example, changing gtk.Button:label while gtk.Button:icon-name is set will reset the icon. However, resetting the label will not set icon-name to its original value.
Use the breakpoint::apply and breakpoint::unapply signals for those properties instead, as follows:
static void breakpoint_apply_cb (MyWidget *self) { gtk_button_set_icon_name (self->button, "go-previous-symbolic"); } static void breakpoint_apply_cb (MyWidget *self) { gtk_button_set_label (self->button, _("_Back")); } // ... g_signal_connect_swapped (breakpoint, "apply", G_CALLBACK (breakpoint_apply_cb), self); g_signal_connect_swapped (breakpoint, "unapply", G_CALLBACK (breakpoint_unapply_cb), self);.
The function takes the following parameters:
- object: target object.
- property: target property.
- value (optional) to set.
func (*Breakpoint) AddSetters ¶
func (self *Breakpoint) AddSetters(objects []*coreglib.Object, names []string, values []*coreglib.Value)
AddSetters adds n_setters setters to self.
This is a convenience function for adding multiple setters at once.
See breakpoint.AddSetter.
This function is meant to be used by language bindings.
The function takes the following parameters:
- objects: setter target object.
- names: setter target properties.
- values: setter values.
func (*Breakpoint) Condition ¶
func (self *Breakpoint) Condition() *BreakpointCondition
Condition gets the condition for self.
The function returns the following values:
- breakpointCondition (optional): condition.
func (*Breakpoint) ConnectApply ¶
func (self *Breakpoint) ConnectApply(f func()) coreglib.SignalHandle
ConnectApply is emitted when the breakpoint is applied.
This signal is emitted after the setters have been applied.
func (*Breakpoint) ConnectUnapply ¶
func (self *Breakpoint) ConnectUnapply(f func()) coreglib.SignalHandle
ConnectUnapply is emitted when the breakpoint is unapplied.
This signal is emitted before resetting the setter values.
func (*Breakpoint) SetCondition ¶
func (self *Breakpoint) SetCondition(condition *BreakpointCondition)
SetCondition sets the condition for self.
The function takes the following parameters:
- condition (optional): new condition.
type BreakpointBin ¶
type BreakpointBin struct { gtk.Widget // contains filtered or unexported fields }
BreakpointBin: widget that changes layout based on available size.
<picture> <source srcset="breakpoint-bin-dark.png" media="(prefers-color-scheme: dark)"> <img src="breakpoint-bin.png" alt="breakpoint-bin"> </picture>
AdwBreakpointBin provides a way to use breakpoints without window, applicationwindow or dialog. It can be useful for limiting breakpoints to a single page and similar purposes. Most applications shouldn't need it.
AdwBreakpointBin is similar to bin. It has one child, set via the breakpointbin:child property.
When AdwBreakpointBin is resized, its child widget can rearrange its layout at specific thresholds.
The thresholds and layout changes are defined via breakpoint objects. They can be added using breakpointbin.AddBreakpoint.
Each breakpoint has a condition, specifying the bin's size and/or aspect ratio, and setters that automatically set object properties when that happens. The breakpoint::apply and breakpoint::unapply can be used instead for more complex scenarios.
Breakpoints are only allowed to modify widgets inside the AdwBreakpointBin, but not on the AdwBreakpointBin itself or any other widgets.
If multiple breakpoints can be used for the current size, the last one is always picked. The current breakpoint can be tracked using the breakpointbin:current-breakpoint property.
If none of the breakpoints can be used, that property will be set to NULL, and the original property values will be used instead.
Minimum Size ¶
Adding a breakpoint to AdwBreakpointBin will result in it having no minimum size. The gtk.Widget:width-request and gtk.Widget:height-request properties must always be set when using breakpoints, indicating the smallest size you want to support.
The minimum size and breakpoint conditions must be carefully selected so that the child widget completely fits. If it doesn't, it will overflow and a warning message will be printed.
When choosing minimum size, consider translations and text scale factor changes. Make sure to leave enough space for text labels, and enable ellipsizing or wrapping if they might not fit.
For gtk.Label this can be done via gtk.Label:ellipsize, or via gtk.Label:wrap together with gtk.Label:wrap-mode.
For buttons, use gtk.Button:can-shrink, gtk.MenuButton:can-shrink, adw.SplitButton:can-shrink, or adw.ButtonContent:can-shrink.
Example
GtkWidget *bin, *child; AdwBreakpoint *breakpoint; bin = adw_breakpoint_bin_new (); gtk_widget_set_size_request (bin, 150, 150); child = gtk_label_new ("Wide"); gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); gtk_widget_add_css_class (child, "title-1"); adw_breakpoint_bin_set_child (ADW_BREAKPOINT_BIN (bin), child); breakpoint = adw_breakpoint_new (adw_breakpoint_condition_parse ("max-width: 200px")); adw_breakpoint_add_setters (breakpoint, G_OBJECT (child), "label", "Narrow", NULL); adw_breakpoint_bin_add_breakpoint (ADW_BREAKPOINT_BIN (bin), breakpoint);
The bin has a single label inside it, displaying "Wide". When the bin's width is smaller than or equal to 200px, it changes to "Narrow".
AdwBreakpointBin as GtkBuildable ¶
AdwBreakpointBin allows adding AdwBreakpoint objects as children.
Example of an AdwBreakpointBin UI definition:
<object class="AdwBreakpointBin"> <property name="width-request">150</property> <property name="height-request">150</property> <property name="child"> <object class="GtkLabel" id="child"> <property name="label">Wide</property> <property name="ellipsize">end</property> <style> <class name="title-1"/> </style> </object> </property> <child> <object class="AdwBreakpoint"> <condition>max-width: 200px</condition> <setter object="child" property="label">Narrow</setter> </object> </child> </object>
See breakpoint documentation for details.
func NewBreakpointBin ¶
func NewBreakpointBin() *BreakpointBin
NewBreakpointBin creates a new AdwBreakpointBin.
The function returns the following values:
- breakpointBin: newly created AdwBreakpointBin.
func (*BreakpointBin) AddBreakpoint ¶
func (self *BreakpointBin) AddBreakpoint(breakpoint *Breakpoint)
AddBreakpoint adds breakpoint to self.
The function takes the following parameters:
- breakpoint to add.
func (*BreakpointBin) Child ¶
func (self *BreakpointBin) Child() gtk.Widgetter
Child gets the child widget of self.
The function returns the following values:
- widget (optional): child widget of self.
func (*BreakpointBin) CurrentBreakpoint ¶
func (self *BreakpointBin) CurrentBreakpoint() *Breakpoint
CurrentBreakpoint gets the current breakpoint.
The function returns the following values:
- breakpoint (optional): current breakpoint.
func (*BreakpointBin) RemoveBreakpoint ¶
func (self *BreakpointBin) RemoveBreakpoint(breakpoint *Breakpoint)
RemoveBreakpoint removes breakpoint from self.
The function takes the following parameters:
- breakpoint to remove.
func (*BreakpointBin) SetChild ¶
func (self *BreakpointBin) SetChild(child gtk.Widgetter)
SetChild sets the child widget of self.
The function takes the following parameters:
- child (optional) widget.
type BreakpointBinClass ¶
type BreakpointBinClass struct {
// contains filtered or unexported fields
}
BreakpointBinClass: instance of this type is always passed by reference.
func (*BreakpointBinClass) ParentClass ¶
func (b *BreakpointBinClass) ParentClass() *gtk.WidgetClass
type BreakpointBinOverrides ¶
type BreakpointBinOverrides struct { }
BreakpointBinOverrides contains methods that are overridable.
type BreakpointClass ¶
type BreakpointClass struct {
// contains filtered or unexported fields
}
BreakpointClass: instance of this type is always passed by reference.
type BreakpointCondition ¶
type BreakpointCondition struct {
// contains filtered or unexported fields
}
BreakpointCondition describes condition for an breakpoint.
An instance of this type is always passed by reference.
func BreakpointConditionParse ¶
func BreakpointConditionParse(str string) *BreakpointCondition
BreakpointConditionParse parses a condition from a string.
Length conditions are specified as <type>: <value>[<unit>], where:
- <type> can be min-width, max-width, min-height or max-height
- <value> is a fractional number
- <unit> can be px, pt or sp
If the unit is omitted, px is assumed.
See breakpointcondition.NewLength.
Examples:
- min-width: 500px
- min-height: 400pt
- max-width: 100sp
- max-height: 500
Ratio conditions are specified as <type>: <width>[/<height>], where:
- <type> can be min-aspect-ratio or max-aspect-ratio
- <width> and <height> are integer numbers
See breakpointcondition.NewRatio.
The ratio is represented as <width> divided by <height>.
If <height> is omitted, it's assumed to be 1.
Examples:
- min-aspect-ratio: 4/3
- max-aspect-ratio: 1
The logical operators and, or can be used to compose a complex condition as follows:
- <condition> and <condition>: the condition is true when both <condition>s are true, same as when using breakpointcondition.NewAnd
- <condition> or <condition>: the condition is true when either of the <condition>s is true, same as when using breakpointcondition.NewOr
Examples:
- min-width: 400px and max-aspect-ratio: 4/3
- max-width: 360sp or max-width: 360px
Conditions can be further nested using parentheses, for example:
- min-width: 400px and (max-aspect-ratio: 4/3 or max-height: 400px)
If parentheses are omitted, the first operator takes priority.
The function takes the following parameters:
- str: string specifying the condition.
The function returns the following values:
- breakpointCondition: parsed condition.
func NewBreakpointConditionAnd ¶
func NewBreakpointConditionAnd(condition1 *BreakpointCondition, condition2 *BreakpointCondition) *BreakpointCondition
NewBreakpointConditionAnd constructs a struct BreakpointCondition.
func NewBreakpointConditionLength ¶
func NewBreakpointConditionLength(typ BreakpointConditionLengthType, value float64, unit LengthUnit) *BreakpointCondition
NewBreakpointConditionLength constructs a struct BreakpointCondition.
func NewBreakpointConditionOr ¶
func NewBreakpointConditionOr(condition1 *BreakpointCondition, condition2 *BreakpointCondition) *BreakpointCondition
NewBreakpointConditionOr constructs a struct BreakpointCondition.
func NewBreakpointConditionRatio ¶
func NewBreakpointConditionRatio(typ BreakpointConditionRatioType, width int, height int) *BreakpointCondition
NewBreakpointConditionRatio constructs a struct BreakpointCondition.
func (*BreakpointCondition) Copy ¶
func (self *BreakpointCondition) Copy() *BreakpointCondition
Copy copies self.
The function returns the following values:
- breakpointCondition: copy of self.
func (*BreakpointCondition) String ¶
func (self *BreakpointCondition) String() string
String returns a textual representation of self.
The returned string can be parsed by breakpointcondition.Parse().
The function returns the following values:
- utf8: newly allocated text string.
type BreakpointConditionLengthType ¶
BreakpointConditionLengthType describes length types for breakpointcondition.
See breakpointcondition.NewLength.
New values may be added to this enumeration over time.
const ( // BreakpointConditionMinWidth: true if the width is greater than or equal // to the condition value. BreakpointConditionMinWidth BreakpointConditionLengthType = iota // BreakpointConditionMaxWidth: true if the width is less than or equal to // the condition value. BreakpointConditionMaxWidth // BreakpointConditionMinHeight: true if the height is greater than or equal // to the condition value. BreakpointConditionMinHeight // BreakpointConditionMaxHeight: true if the height is less than or equal to // the condition value. BreakpointConditionMaxHeight )
func (BreakpointConditionLengthType) String ¶
func (b BreakpointConditionLengthType) String() string
String returns the name in string for BreakpointConditionLengthType.
type BreakpointConditionRatioType ¶
BreakpointConditionRatioType describes ratio types for breakpointcondition.
See breakpointcondition.NewRatio.
New values may be added to this enumeration over time.
const ( // BreakpointConditionMinAspectRatio: true if the aspect ratio is greater // than or equal to the condition value. BreakpointConditionMinAspectRatio BreakpointConditionRatioType = iota // BreakpointConditionMaxAspectRatio: true if the aspect ratio is less than // or equal to the condition value. BreakpointConditionMaxAspectRatio )
func (BreakpointConditionRatioType) String ¶
func (b BreakpointConditionRatioType) String() string
String returns the name in string for BreakpointConditionRatioType.
type BreakpointOverrides ¶
type BreakpointOverrides struct { }
BreakpointOverrides contains methods that are overridable.
type ButtonContent ¶
type ButtonContent struct { gtk.Widget // contains filtered or unexported fields }
ButtonContent: helper widget for creating buttons.
<picture> <source srcset="button-content-dark.png" media="(prefers-color-scheme: dark)"> <img src="button-content.png" alt="button-content"> </picture>
AdwButtonContent is a box-like widget with an icon and a label.
It's intended to be used as a direct child of gtk.Button, gtk.MenuButton or splitbutton, when they need to have both an icon and a label, as follows:
<object class="GtkButton"> <property name="child"> <object class="AdwButtonContent"> <property name="icon-name">document-open-symbolic</property> <property name="label" translatable="yes">_Open</property> <property name="use-underline">True</property> </object> </property> </object>
AdwButtonContent handles style classes and connecting the mnemonic to the button automatically.
CSS nodes
buttoncontent ╰── box ├── image ╰── label
AdwButtonContent's CSS node is called buttoncontent. It contains a box subnode that serves as a container for the image and label nodes.
When inside a GtkButton or AdwSplitButton, the button will receive the .image-text-button style class. When inside a GtkMenuButton, the internal GtkButton will receive it instead.
Accessibility ¶
AdwButtonContent uses the GTK_ACCESSIBLE_ROLE_GROUP role.
func NewButtonContent ¶
func NewButtonContent() *ButtonContent
NewButtonContent creates a new AdwButtonContent.
The function returns the following values:
- buttonContent: new created AdwButtonContent.
func (*ButtonContent) CanShrink ¶
func (self *ButtonContent) CanShrink() bool
CanShrink gets whether the button can be smaller than the natural size of its contents.
The function returns the following values:
- ok: whether the button can shrink.
func (*ButtonContent) IconName ¶
func (self *ButtonContent) IconName() string
IconName gets the name of the displayed icon.
The function returns the following values:
- utf8: icon name.
func (*ButtonContent) Label ¶
func (self *ButtonContent) Label() string
Label gets the displayed label.
The function returns the following values:
- utf8: label.
func (*ButtonContent) SetCanShrink ¶
func (self *ButtonContent) SetCanShrink(canShrink bool)
SetCanShrink sets whether the button can be smaller than the natural size of its contents.
If set to TRUE, the label will ellipsize.
See gtk.Button.SetCanShrink().
The function takes the following parameters:
- canShrink: whether the button can shrink.
func (*ButtonContent) SetIconName ¶
func (self *ButtonContent) SetIconName(iconName string)
SetIconName sets the name of the displayed icon.
If empty, the icon is not shown.
The function takes the following parameters:
- iconName: new icon name.
func (*ButtonContent) SetLabel ¶
func (self *ButtonContent) SetLabel(label string)
SetLabel sets the displayed label.
The function takes the following parameters:
- label: new label.
func (*ButtonContent) SetUseUnderline ¶
func (self *ButtonContent) SetUseUnderline(useUnderline bool)
SetUseUnderline sets whether an underline in the text indicates a mnemonic.
The mnemonic can be used to activate the parent button.
See buttoncontent:label.
The function takes the following parameters:
- useUnderline: whether an underline in the text indicates a mnemonic.
func (*ButtonContent) UseUnderline ¶
func (self *ButtonContent) UseUnderline() bool
UseUnderline gets whether an underline in the text indicates a mnemonic.
The function returns the following values:
- ok: whether an underline in the text indicates a mnemonic.
type ButtonContentClass ¶
type ButtonContentClass struct {
// contains filtered or unexported fields
}
ButtonContentClass: instance of this type is always passed by reference.
func (*ButtonContentClass) ParentClass ¶
func (b *ButtonContentClass) ParentClass() *gtk.WidgetClass
type ButtonContentOverrides ¶
type ButtonContentOverrides struct { }
ButtonContentOverrides contains methods that are overridable.
type CallbackAnimationTarget ¶
type CallbackAnimationTarget struct { AnimationTarget // contains filtered or unexported fields }
CallbackAnimationTarget: animationtarget that calls a given callback during the animation.
func NewCallbackAnimationTarget ¶
func NewCallbackAnimationTarget(callback AnimationTargetFunc) *CallbackAnimationTarget
NewCallbackAnimationTarget creates a new AdwAnimationTarget that calls the given callback during the animation.
The function takes the following parameters:
- callback to call.
The function returns the following values:
- callbackAnimationTarget: newly created callback target.
type Carousel ¶
type Carousel struct { gtk.Widget *coreglib.Object Swipeable gtk.Orientable // contains filtered or unexported fields }
Carousel: paginated scrolling widget.
<picture> <source srcset="carousel-dark.png" media="(prefers-color-scheme: dark)"> <img src="carousel.png" alt="carousel"> </picture>
The AdwCarousel widget can be used to display a set of pages with swipe-based navigation between them.
carouselindicatordots and carouselindicatorlines can be used to provide page indicators for AdwCarousel.
CSS nodes ¶
AdwCarousel has a single CSS node with name carousel.
func NewCarousel ¶
func NewCarousel() *Carousel
NewCarousel creates a new AdwCarousel.
The function returns the following values:
- carousel: newly created AdwCarousel.
func (*Carousel) AllowLongSwipes ¶
AllowLongSwipes gets whether to allow swiping for more than one page at a time.
The function returns the following values:
- ok: TRUE if long swipes are allowed.
func (*Carousel) AllowMouseDrag ¶
AllowMouseDrag sets whether self can be dragged with mouse pointer.
The function returns the following values:
- ok: whether self can be dragged with mouse pointer.
func (*Carousel) AllowScrollWheel ¶
AllowScrollWheel gets whether self will respond to scroll wheel events.
The function returns the following values:
- ok: TRUE if self will respond to scroll wheel events.
func (*Carousel) Append ¶
func (self *Carousel) Append(child gtk.Widgetter)
Append appends child to self.
The function takes the following parameters:
- child: widget to add.
func (*Carousel) ConnectPageChanged ¶
func (self *Carousel) ConnectPageChanged(f func(index uint)) coreglib.SignalHandle
ConnectPageChanged: this signal is emitted after a page has been changed.
It can be used to implement "infinite scrolling" by amending the pages after every scroll.
::: note An empty carousel is indicated by (int)index == -1.
func (*Carousel) Insert ¶
Insert inserts child into self at position position.
If position is -1, or larger than the number of pages, child will be appended to the end.
The function takes the following parameters:
- child: widget to add.
- position to insert child at.
func (*Carousel) Interactive ¶
Interactive gets whether self can be navigated.
The function returns the following values:
- ok: whether self can be navigated.
func (*Carousel) NPages ¶
NPages gets the number of pages in self.
The function returns the following values:
- guint: number of pages in self.
func (*Carousel) NthPage ¶
NthPage gets the page at position n.
The function takes the following parameters:
- n: index of the page.
The function returns the following values:
- widget: page.
func (*Carousel) Position ¶
Position gets current scroll position in self, unitless.
1 matches 1 page. Use carousel.ScrollTo for changing it.
The function returns the following values:
- gdouble: scroll position.
func (*Carousel) Prepend ¶
func (self *Carousel) Prepend(child gtk.Widgetter)
Prepend prepends child to self.
The function takes the following parameters:
- child: widget to add.
func (*Carousel) Remove ¶
func (self *Carousel) Remove(child gtk.Widgetter)
Remove removes child from self.
The function takes the following parameters:
- child: widget to remove.
func (*Carousel) Reorder ¶
Reorder moves child into position position.
If position is -1, or larger than the number of pages, child will be moved at the end.
The function takes the following parameters:
- child: widget to add.
- position to move child to.
func (*Carousel) RevealDuration ¶
RevealDuration gets the page reveal duration, in milliseconds.
The function returns the following values:
- guint: duration.
func (*Carousel) ScrollParams ¶
func (self *Carousel) ScrollParams() *SpringParams
ScrollParams gets the scroll animation spring parameters for self.
The function returns the following values:
- springParams: animation parameters.
func (*Carousel) ScrollTo ¶
ScrollTo scrolls to widget.
If animate is TRUE, the transition will be animated.
The function takes the following parameters:
- widget: child of self.
- animate: whether to animate the transition.
func (*Carousel) SetAllowLongSwipes ¶
SetAllowLongSwipes sets whether to allow swiping for more than one page at a time.
If allow_long_swipes is FALSE, each swipe can only move to the adjacent pages.
The function takes the following parameters:
- allowLongSwipes: whether to allow long swipes.
func (*Carousel) SetAllowMouseDrag ¶
SetAllowMouseDrag sets whether self can be dragged with mouse pointer.
If allow_mouse_drag is FALSE, dragging is only available on touch.
The function takes the following parameters:
- allowMouseDrag: whether self can be dragged with mouse pointer.
func (*Carousel) SetAllowScrollWheel ¶
SetAllowScrollWheel sets whether self will respond to scroll wheel events.
If allow_scroll_wheel is FALSE, wheel events will be ignored.
The function takes the following parameters:
- allowScrollWheel: whether self will respond to scroll wheel events.
func (*Carousel) SetInteractive ¶
SetInteractive sets whether self can be navigated.
This can be used to temporarily disable the carousel to only allow navigating it in a certain state.
The function takes the following parameters:
- interactive: whether self can be navigated.
func (*Carousel) SetRevealDuration ¶
SetRevealDuration sets the page reveal duration, in milliseconds.
Reveal duration is used when animating adding or removing pages.
The function takes the following parameters:
- revealDuration: new reveal duration value.
func (*Carousel) SetScrollParams ¶
func (self *Carousel) SetScrollParams(params *SpringParams)
SetScrollParams sets the scroll animation spring parameters for self.
The default value is equivalent to:
adw_spring_params_new (1, 0.5, 500).
The function takes the following parameters:
- params: new parameters.
func (*Carousel) SetSpacing ¶
SetSpacing sets spacing between pages in pixels.
The function takes the following parameters:
- spacing: new spacing value.
type CarouselClass ¶
type CarouselClass struct {
// contains filtered or unexported fields
}
CarouselClass: instance of this type is always passed by reference.
func (*CarouselClass) ParentClass ¶
func (c *CarouselClass) ParentClass() *gtk.WidgetClass
type CarouselIndicatorDots ¶
type CarouselIndicatorDots struct { gtk.Widget *coreglib.Object gtk.Orientable // contains filtered or unexported fields }
CarouselIndicatorDots dots indicator for carousel.
<picture> <source srcset="carousel-indicator-dots-dark.png" media="(prefers-color-scheme: dark)"> <img src="carousel-indicator-dots.png" alt="carousel-indicator-dots"> </picture>
The AdwCarouselIndicatorDots widget shows a set of dots for each page of a given carousel. The dot representing the carousel's active page is larger and more opaque than the others, the transition to the active and inactive state is gradual to match the carousel's position.
See also carouselindicatorlines.
CSS nodes ¶
AdwCarouselIndicatorDots has a single CSS node with name carouselindicatordots.
func NewCarouselIndicatorDots ¶
func NewCarouselIndicatorDots() *CarouselIndicatorDots
NewCarouselIndicatorDots creates a new AdwCarouselIndicatorDots.
The function returns the following values:
- carouselIndicatorDots: newly created AdwCarouselIndicatorDots.
func (*CarouselIndicatorDots) Carousel ¶
func (self *CarouselIndicatorDots) Carousel() *Carousel
Carousel gets the displayed carousel.
The function returns the following values:
- carousel (optional): displayed carousel.
func (*CarouselIndicatorDots) SetCarousel ¶
func (self *CarouselIndicatorDots) SetCarousel(carousel *Carousel)
SetCarousel sets the displayed carousel.
The function takes the following parameters:
- carousel (optional): carousel.
type CarouselIndicatorDotsClass ¶
type CarouselIndicatorDotsClass struct {
// contains filtered or unexported fields
}
CarouselIndicatorDotsClass: instance of this type is always passed by reference.
func (*CarouselIndicatorDotsClass) ParentClass ¶
func (c *CarouselIndicatorDotsClass) ParentClass() *gtk.WidgetClass
type CarouselIndicatorDotsOverrides ¶
type CarouselIndicatorDotsOverrides struct { }
CarouselIndicatorDotsOverrides contains methods that are overridable.
type CarouselIndicatorLines ¶
type CarouselIndicatorLines struct { gtk.Widget *coreglib.Object gtk.Orientable // contains filtered or unexported fields }
CarouselIndicatorLines lines indicator for carousel.
<picture> <source srcset="carousel-indicator-dots-lines.png" media="(prefers-color-scheme: dark)"> <img src="carousel-indicator-lines.png" alt="carousel-indicator-lines"> </picture>
The AdwCarouselIndicatorLines widget shows a set of lines for each page of a given carousel. The carousel's active page is shown as another line that moves between them to match the carousel's position.
See also carouselindicatordots.
CSS nodes ¶
AdwCarouselIndicatorLines has a single CSS node with name carouselindicatorlines.
func NewCarouselIndicatorLines ¶
func NewCarouselIndicatorLines() *CarouselIndicatorLines
NewCarouselIndicatorLines creates a new AdwCarouselIndicatorLines.
The function returns the following values:
- carouselIndicatorLines: newly created AdwCarouselIndicatorLines.
func (*CarouselIndicatorLines) Carousel ¶
func (self *CarouselIndicatorLines) Carousel() *Carousel
Carousel gets the displayed carousel.
The function returns the following values:
- carousel (optional): displayed carousel.
func (*CarouselIndicatorLines) SetCarousel ¶
func (self *CarouselIndicatorLines) SetCarousel(carousel *Carousel)
SetCarousel sets the displayed carousel.
The function takes the following parameters:
- carousel (optional): carousel.
type CarouselIndicatorLinesClass ¶
type CarouselIndicatorLinesClass struct {
// contains filtered or unexported fields
}
CarouselIndicatorLinesClass: instance of this type is always passed by reference.
func (*CarouselIndicatorLinesClass) ParentClass ¶
func (c *CarouselIndicatorLinesClass) ParentClass() *gtk.WidgetClass
type CarouselIndicatorLinesOverrides ¶
type CarouselIndicatorLinesOverrides struct { }
CarouselIndicatorLinesOverrides contains methods that are overridable.
type CarouselOverrides ¶
type CarouselOverrides struct { }
CarouselOverrides contains methods that are overridable.
type CenteringPolicy ¶
CenteringPolicy describes title centering behavior of a headerbar widget.
const ( // CenteringPolicyLoose: keep the title centered when possible. CenteringPolicyLoose CenteringPolicy = iota // CenteringPolicyStrict: keep the title centered at all cost. CenteringPolicyStrict )
func (CenteringPolicy) String ¶
func (c CenteringPolicy) String() string
String returns the name in string for CenteringPolicy.
type Clamp ¶
type Clamp struct { gtk.Widget *coreglib.Object gtk.Orientable // contains filtered or unexported fields }
Clamp: widget constraining its child to a given size.
<picture> <source srcset="clamp-wide-dark.png" media="(prefers-color-scheme: dark)"> <img src="clamp-wide.png" alt="clamp-wide"> </picture> <picture> <source srcset="clamp-narrow-dark.png" media="(prefers-color-scheme: dark)"> <img src="clamp-narrow.png" alt="clamp-narrow"> </picture>
The AdwClamp widget constrains the size of the widget it contains to a given maximum size. It will constrain the width if it is horizontal, or the height if it is vertical. The expansion of the child from its minimum to its maximum size is eased out for a smooth transition.
If the child requires more than the requested maximum size, it will be allocated the minimum size it can fit in instead.
AdwClamp can scale with the text scale factor, use the clamplayout:unit property to enable that behavior.
CSS nodes ¶
AdwClamp has a single CSS node with name clamp.
func NewClamp ¶
func NewClamp() *Clamp
NewClamp creates a new AdwClamp.
The function returns the following values:
- clamp: newly created AdwClamp.
func (*Clamp) Child ¶
func (self *Clamp) Child() gtk.Widgetter
Child gets the child widget of self.
The function returns the following values:
- widget (optional): child widget of self.
func (*Clamp) MaximumSize ¶
MaximumSize gets the maximum size allocated to the child.
The function returns the following values:
- gint: maximum size to allocate to the child.
func (*Clamp) SetChild ¶
func (self *Clamp) SetChild(child gtk.Widgetter)
SetChild sets the child widget of self.
The function takes the following parameters:
- child (optional) widget.
func (*Clamp) SetMaximumSize ¶
SetMaximumSize sets the maximum size allocated to the child.
It is the width if the clamp is horizontal, or the height if it is vertical.
The function takes the following parameters:
- maximumSize: maximum size.
func (*Clamp) SetTighteningThreshold ¶
SetTighteningThreshold sets the size above which the child is clamped.
Starting from this size, the clamp will tighten its grip on the child, slowly allocating less and less of the available size up to the maximum allocated size. Below that threshold and below the maximum size, the child will be allocated all the available size.
If the threshold is greater than the maximum size to allocate to the child, the child will be allocated all the size up to the maximum. If the threshold is lower than the minimum size to allocate to the child, that size will be used as the tightening threshold.
Effectively, tightening the grip on the child before it reaches its maximum size makes transitions to and from the maximum size smoother when resizing.
The function takes the following parameters:
- tighteningThreshold: tightening threshold.
func (*Clamp) SetUnit ¶
func (self *Clamp) SetUnit(unit LengthUnit)
SetUnit sets the length unit for maximum size and tightening threshold.
Allows the sizes to vary depending on the text scale factor.
The function takes the following parameters:
- unit: length unit.
func (*Clamp) TighteningThreshold ¶
TighteningThreshold gets the size above which the child is clamped.
The function returns the following values:
- gint: size above which the child is clamped.
func (*Clamp) Unit ¶
func (self *Clamp) Unit() LengthUnit
Unit gets the length unit for maximum size and tightening threshold.
The function returns the following values:
- lengthUnit: length unit.
type ClampClass ¶
type ClampClass struct {
// contains filtered or unexported fields
}
ClampClass: instance of this type is always passed by reference.
func (*ClampClass) ParentClass ¶
func (c *ClampClass) ParentClass() *gtk.WidgetClass
type ClampLayout ¶
type ClampLayout struct { gtk.LayoutManager *coreglib.Object gtk.Orientable // contains filtered or unexported fields }
ClampLayout: layout manager constraining its children to a given size.
<picture> <source srcset="clamp-wide-dark.png" media="(prefers-color-scheme: dark)"> <img src="clamp-wide.png" alt="clamp-wide"> </picture> <picture> <source srcset="clamp-narrow-dark.png" media="(prefers-color-scheme: dark)"> <img src="clamp-narrow.png" alt="clamp-narrow"> </picture>
AdwClampLayout constraints the size of the widgets it contains to a given maximum size. It will constrain the width if it is horizontal, or the height if it is vertical. The expansion of the children from their minimum to their maximum size is eased out for a smooth transition.
If a child requires more than the requested maximum size, it will be allocated the minimum size it can fit in instead.
AdwClampLayout can scale with the text scale factor, use the clamplayout:unit property to enable that behavior.
func NewClampLayout ¶
func NewClampLayout() *ClampLayout
NewClampLayout creates a new AdwClampLayout.
The function returns the following values:
- clampLayout: newly created AdwClampLayout.
func (*ClampLayout) MaximumSize ¶
func (self *ClampLayout) MaximumSize() int
MaximumSize gets the maximum size allocated to the children.
The function returns the following values:
- gint: maximum size to allocate to the children.
func (*ClampLayout) SetMaximumSize ¶
func (self *ClampLayout) SetMaximumSize(maximumSize int)
SetMaximumSize sets the maximum size allocated to the children.
It is the width if the layout is horizontal, or the height if it is vertical.
The function takes the following parameters:
- maximumSize: maximum size.
func (*ClampLayout) SetTighteningThreshold ¶
func (self *ClampLayout) SetTighteningThreshold(tighteningThreshold int)
SetTighteningThreshold sets the size above which the children are clamped.
Starting from this size, the layout will tighten its grip on the children, slowly allocating less and less of the available size up to the maximum allocated size. Below that threshold and below the maximum size, the children will be allocated all the available size.
If the threshold is greater than the maximum size to allocate to the children, they will be allocated the whole size up to the maximum. If the threshold is lower than the minimum size to allocate to the children, that size will be used as the tightening threshold.
Effectively, tightening the grip on a child before it reaches its maximum size makes transitions to and from the maximum size smoother when resizing.
The function takes the following parameters:
- tighteningThreshold: tightening threshold.
func (*ClampLayout) SetUnit ¶
func (self *ClampLayout) SetUnit(unit LengthUnit)
SetUnit sets the length unit for maximum size and tightening threshold.
Allows the sizes to vary depending on the text scale factor.
The function takes the following parameters:
- unit: length unit.
func (*ClampLayout) TighteningThreshold ¶
func (self *ClampLayout) TighteningThreshold() int
TighteningThreshold gets the size above which the children are clamped.
The function returns the following values:
- gint: size above which the children are clamped.
func (*ClampLayout) Unit ¶
func (self *ClampLayout) Unit() LengthUnit
Unit gets the length unit for maximum size and tightening threshold.
The function returns the following values:
- lengthUnit: length unit.
type ClampLayoutClass ¶
type ClampLayoutClass struct {
// contains filtered or unexported fields
}
ClampLayoutClass: instance of this type is always passed by reference.
func (*ClampLayoutClass) ParentClass ¶
func (c *ClampLayoutClass) ParentClass() *gtk.LayoutManagerClass
type ClampLayoutOverrides ¶
type ClampLayoutOverrides struct { }
ClampLayoutOverrides contains methods that are overridable.
type ClampOverrides ¶
type ClampOverrides struct { }
ClampOverrides contains methods that are overridable.
type ClampScrollable ¶
type ClampScrollable struct { gtk.Widget *coreglib.Object gtk.Orientable gtk.Scrollable // contains filtered or unexported fields }
ClampScrollable: scrollable clamp.
AdwClampScrollable is a variant of clamp that implements the gtk.Scrollable interface.
The primary use case for AdwClampScrollable is clamping gtk.ListView.
func NewClampScrollable ¶
func NewClampScrollable() *ClampScrollable
NewClampScrollable creates a new AdwClampScrollable.
The function returns the following values:
- clampScrollable: newly created AdwClampScrollable.
func (*ClampScrollable) Child ¶
func (self *ClampScrollable) Child() gtk.Widgetter
Child gets the child widget of self.
The function returns the following values:
- widget (optional): child widget of self.
func (*ClampScrollable) MaximumSize ¶
func (self *ClampScrollable) MaximumSize() int
MaximumSize gets the maximum size allocated to the child.
The function returns the following values:
- gint: maximum size to allocate to the child.
func (*ClampScrollable) SetChild ¶
func (self *ClampScrollable) SetChild(child gtk.Widgetter)
SetChild sets the child widget of self.
The function takes the following parameters:
- child (optional) widget.
func (*ClampScrollable) SetMaximumSize ¶
func (self *ClampScrollable) SetMaximumSize(maximumSize int)
SetMaximumSize sets the maximum size allocated to the child.
It is the width if the clamp is horizontal, or the height if it is vertical.
The function takes the following parameters:
- maximumSize: maximum size.
func (*ClampScrollable) SetTighteningThreshold ¶
func (self *ClampScrollable) SetTighteningThreshold(tighteningThreshold int)
SetTighteningThreshold sets the size above which the child is clamped.
Starting from this size, the clamp will tighten its grip on the child, slowly allocating less and less of the available size up to the maximum allocated size. Below that threshold and below the maximum width, the child will be allocated all the available size.
If the threshold is greater than the maximum size to allocate to the child, the child will be allocated all the width up to the maximum. If the threshold is lower than the minimum size to allocate to the child, that size will be used as the tightening threshold.
Effectively, tightening the grip on the child before it reaches its maximum size makes transitions to and from the maximum size smoother when resizing.
The function takes the following parameters:
- tighteningThreshold: tightening threshold.
func (*ClampScrollable) SetUnit ¶
func (self *ClampScrollable) SetUnit(unit LengthUnit)
SetUnit sets the length unit for maximum size and tightening threshold.
Allows the sizes to vary depending on the text scale factor.
The function takes the following parameters:
- unit: length unit.
func (*ClampScrollable) TighteningThreshold ¶
func (self *ClampScrollable) TighteningThreshold() int
TighteningThreshold gets the size above which the child is clamped.
The function returns the following values:
- gint: size above which the child is clamped.
func (*ClampScrollable) Unit ¶
func (self *ClampScrollable) Unit() LengthUnit
Unit gets the length unit for maximum size and tightening threshold.
The function returns the following values:
- lengthUnit: length unit.
type ClampScrollableClass ¶
type ClampScrollableClass struct {
// contains filtered or unexported fields
}
ClampScrollableClass: instance of this type is always passed by reference.
func (*ClampScrollableClass) ParentClass ¶
func (c *ClampScrollableClass) ParentClass() *gtk.WidgetClass
type ClampScrollableOverrides ¶
type ClampScrollableOverrides struct { }
ClampScrollableOverrides contains methods that are overridable.
type ColorScheme ¶
ColorScheme: application color schemes for stylemanager:color-scheme.
const ( // ColorSchemeDefault: inherit the parent color-scheme. When set on the // AdwStyleManager returned by stylemanager.GetDefault(), it's equivalent to // ADW_COLOR_SCHEME_PREFER_LIGHT. ColorSchemeDefault ColorScheme = iota // ColorSchemeForceLight always use light appearance. ColorSchemeForceLight // ColorSchemePreferLight: use light appearance unless the system prefers // dark colors. ColorSchemePreferLight // ColorSchemePreferDark: use dark appearance unless the system prefers // prefers light colors. ColorSchemePreferDark // ColorSchemeForceDark always use dark appearance. ColorSchemeForceDark )
func (ColorScheme) String ¶
func (c ColorScheme) String() string
String returns the name in string for ColorScheme.
type ComboRow ¶
type ComboRow struct { ActionRow // contains filtered or unexported fields }
ComboRow: gtk.ListBoxRow used to choose from a list of items.
<picture> <source srcset="combo-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="combo-row.png" alt="combo-row"> </picture>
The AdwComboRow widget allows the user to choose from a list of valid choices. The row displays the selected choice. When activated, the row displays a popover which allows the user to make a new choice.
Example of an AdwComboRow UI definition:
<object class="AdwComboRow"> <property name="title" translatable="yes">Combo Row</property> <property name="model"> <object class="GtkStringList"> <items> <item translatable="yes">Foo</item> <item translatable="yes">Bar</item> <item translatable="yes">Baz</item> </items> </object> </property> </object>
The comborow:selected and comborow:selected-item properties can be used to keep track of the selected item and react to their changes.
AdwComboRow mirrors gtk.DropDown, see that widget for details.
AdwComboRow is gtk.ListBoxRow:activatable if a model is set.
CSS nodes ¶
AdwComboRow has a main CSS node with name row and the .combo style class.
Its popover has the node named popover with the .menu style class, it contains a gtk.ScrolledWindow, which in turn contains a gtk.ListView, both are accessible via their regular nodes.
Accessibility ¶
AdwComboRow uses the GTK_ACCESSIBLE_ROLE_COMBO_BOX role.
func NewComboRow ¶
func NewComboRow() *ComboRow
NewComboRow creates a new AdwComboRow.
The function returns the following values:
- comboRow: newly created AdwComboRow.
func (*ComboRow) EnableSearch ¶
EnableSearch gets whether search is enabled.
If set to TRUE, a search entry will be shown in the popup that allows to search for items in the list.
Search requires comborow:expression to be set.
The function returns the following values:
- ok: whether the popup includes a search entry.
func (*ComboRow) Expression ¶
func (self *ComboRow) Expression() gtk.Expressioner
Expression gets the expression used to obtain strings from items.
The function returns the following values:
- expression (optional) used to obtain strings from items.
func (*ComboRow) Factory ¶
func (self *ComboRow) Factory() *gtk.ListItemFactory
Factory gets the factory for populating list items.
The function returns the following values:
- listItemFactory (optional): factory in use.
func (*ComboRow) ListFactory ¶
func (self *ComboRow) ListFactory() *gtk.ListItemFactory
ListFactory gets the factory for populating list items in the popup.
The function returns the following values:
- listItemFactory (optional): factory in use.
func (*ComboRow) Model ¶
func (self *ComboRow) Model() *gio.ListModel
Model gets the model that provides the displayed items.
The function returns the following values:
- listModel (optional): model in use.
func (*ComboRow) Selected ¶
Selected gets the position of the selected item.
The function returns the following values:
- guint: position of the selected item, or gtk.INVALIDLISTPOSITION if no item is selected.
func (*ComboRow) SelectedItem ¶
SelectedItem gets the selected item.
The function returns the following values:
- object (optional): selected item.
func (*ComboRow) SetEnableSearch ¶
SetEnableSearch sets whether to enable search.
If set to TRUE, a search entry will be shown in the popup that allows to search for items in the list.
Search requires comborow:expression to be set.
The function takes the following parameters:
- enableSearch: whether to enable search.
func (*ComboRow) SetExpression ¶
func (self *ComboRow) SetExpression(expression gtk.Expressioner)
SetExpression sets the expression used to obtain strings from items.
The expression must have a value type of G_TYPE_STRING.
It's used to bind strings to labels produced by the default factory if comborow:factory is not set, or when comborow:use-subtitle is set to TRUE.
The function takes the following parameters:
- expression (optional): expression.
func (*ComboRow) SetFactory ¶
func (self *ComboRow) SetFactory(factory *gtk.ListItemFactory)
SetFactory sets the factory for populating list items.
This factory is always used for the item in the row. It is also used for items in the popup unless comborow:list-factory is set.
The function takes the following parameters:
- factory (optional) to use.
func (*ComboRow) SetListFactory ¶
func (self *ComboRow) SetListFactory(factory *gtk.ListItemFactory)
SetListFactory sets the factory for populating list items in the popup.
If this is not set, comborow:factory is used.
The function takes the following parameters:
- factory (optional) to use.
func (*ComboRow) SetModel ¶
func (self *ComboRow) SetModel(model gio.ListModeller)
SetModel sets the model that provides the displayed items.
The function takes the following parameters:
- model (optional) to use.
func (*ComboRow) SetSelected ¶
SetSelected selects the item at the given position.
The function takes the following parameters:
- position of the item to select, or gtk.INVALIDLISTPOSITION.
func (*ComboRow) SetUseSubtitle ¶
SetUseSubtitle sets whether to use the current value as the subtitle.
If you use a custom list item factory, you will need to give the row a name conversion expression with comborow:expression.
If set to TRUE, you should not access actionrow:subtitle.
The subtitle is interpreted as Pango markup if preferencesrow:use-markup is set to TRUE.
The function takes the following parameters:
- useSubtitle: whether to use the current value as the subtitle.
func (*ComboRow) UseSubtitle ¶
UseSubtitle gets whether to use the current value as the subtitle.
The function returns the following values:
- ok: whether to use the current value as the subtitle.
type ComboRowClass ¶
type ComboRowClass struct {
// contains filtered or unexported fields
}
ComboRowClass: instance of this type is always passed by reference.
func (*ComboRowClass) ParentClass ¶
func (c *ComboRowClass) ParentClass() *ActionRowClass
ParentClass: parent class.
type ComboRowOverrides ¶
type ComboRowOverrides struct { }
ComboRowOverrides contains methods that are overridable.
type Dialog ¶
type Dialog struct { gtk.Widget // contains filtered or unexported fields }
Dialog: adaptive dialog container.
<picture> <source srcset="dialog-floating-dark.png" media="(prefers-color-scheme: dark)"> <img src="dialog-floating.png" alt="dialog-floating"> </picture> <picture> <source srcset="dialog-bottom-dark.png" media="(prefers-color-scheme: dark)"> <img src="dialog-bottom.png" alt="dialog-bottom"> </picture>
AdwDialog is similar to a window, but is shown within another window. It can be used with window and applicationwindow, use dialog.Present to show it.
AdwDialog is not resizable. Use the dialog:content-width and dialog:content-height properties to set its size, or set dialog:follows-content-size to TRUE to make the dialog track the content's size as it changes. AdwDialog can never be larger than its parent window.
AdwDialog can be presented as a centered floating window or a bottom sheet. By default it's automatic depending on the available size. dialog:presentation-mode can be used to change that.
AdwDialog can be closed via dialog.Close.
When presented as a bottom sheet, AdwDialog can also be closed via swiping it down.
The dialog:can-close can be used to prevent closing. In that case, dialog::close-attempt gets emitted instead.
Use dialog.ForceClose to close the dialog even when can-close is set to FALSE.
Header Bar Integration ¶
When placed inside an AdwDialog, headerbar will display the dialog title instead of window title. It will also adjust the decoration layout to ensure it always has a close button and nothing else. Set headerbar:show-start-title-buttons and headerbar:show-end-title-buttons to FALSE to remove it if it's unwanted.
Breakpoints ¶
AdwDialog can be used with breakpoint the same way as breakpointbin. Refer to that widget's documentation for details.
Like AdwBreakpointBin, if breakpoints are used, AdwDialog doesn't have a minimum size, and gtk.Widget:width-request and gtk.Widget:height-request properties must be set manually.
func NewDialog ¶
func NewDialog() *Dialog
NewDialog creates a new AdwDialog.
The function returns the following values:
- dialog: new created AdwDialog.
func (*Dialog) AddBreakpoint ¶
func (self *Dialog) AddBreakpoint(breakpoint *Breakpoint)
AddBreakpoint adds breakpoint to self.
The function takes the following parameters:
- breakpoint to add.
func (*Dialog) CanClose ¶
CanClose gets whether self can be closed.
The function returns the following values:
- ok: whether the dialog can be closed.
func (*Dialog) Child ¶
func (self *Dialog) Child() gtk.Widgetter
Child gets the child widget of self.
The function returns the following values:
- widget (optional): child widget of self.
func (*Dialog) Close ¶
Close attempts to close self.
If the dialog:can-close property is set to FALSE, the dialog::close-attempt signal is emitted.
See also: dialog.ForceClose.
The function returns the following values:
- ok: whether self was successfully closed.
func (*Dialog) ConnectCloseAttempt ¶
func (self *Dialog) ConnectCloseAttempt(f func()) coreglib.SignalHandle
ConnectCloseAttempt is emitted when the close button or shortcut is used, or dialog.Close is called while dialog:can-close is set to FALSE.
func (*Dialog) ConnectClosed ¶
func (self *Dialog) ConnectClosed(f func()) coreglib.SignalHandle
ConnectClosed is emitted when the dialog is successfully closed.
func (*Dialog) ContentHeight ¶
ContentHeight gets the height of the dialog's contents.
The function returns the following values:
- gint: content height.
func (*Dialog) ContentWidth ¶
ContentWidth gets the width of the dialog's contents.
The function returns the following values:
- gint: content width.
func (*Dialog) CurrentBreakpoint ¶
func (self *Dialog) CurrentBreakpoint() *Breakpoint
CurrentBreakpoint gets the current breakpoint.
The function returns the following values:
- breakpoint (optional): current breakpoint.
func (*Dialog) DefaultWidget ¶
func (self *Dialog) DefaultWidget() gtk.Widgetter
DefaultWidget gets the default widget for self.
The function returns the following values:
- widget (optional): default widget.
func (*Dialog) Focus ¶
func (self *Dialog) Focus() gtk.Widgetter
Focus gets the focus widget for self.
The function returns the following values:
- widget (optional) focus widget.
func (*Dialog) FollowsContentSize ¶
FollowsContentSize gets whether to size content of self automatically.
The function returns the following values:
- ok: whether to size content automatically.
func (*Dialog) ForceClose ¶
func (self *Dialog) ForceClose()
ForceClose closes self.
Unlike dialog.Close, it succeeds even if dialog:can-close is set to FALSE.
func (*Dialog) Present ¶
func (self *Dialog) Present(parent gtk.Widgetter)
Present presents self within parent's window.
If self is already shown, raises it to the top instead.
If the window is an window or applicationwindow, the dialog will be shown within it. Otherwise, it will be a separate window.
The function takes the following parameters:
- parent (optional): widget within the toplevel.
func (*Dialog) PresentationMode ¶
func (self *Dialog) PresentationMode() DialogPresentationMode
PresentationMode gets presentation mode for self.
The function returns the following values:
- dialogPresentationMode: presentation mode.
func (*Dialog) SetCanClose ¶
SetCanClose sets whether self can be closed.
If set to FALSE, the close button, shortcuts and dialog.Close will result in dialog::close-attempt being emitted instead, and bottom sheet close swipe will be disabled. dialog.ForceClose still works.
The function takes the following parameters:
- canClose: whether to allow closing.
func (*Dialog) SetChild ¶
func (self *Dialog) SetChild(child gtk.Widgetter)
SetChild sets the child widget of self.
The function takes the following parameters:
- child (optional) widget.
func (*Dialog) SetContentHeight ¶
SetContentHeight sets the height of the dialog's contents.
Set it to -1 to reset it to the content's natural height.
See also: gtk.Window:default-height.
The function takes the following parameters:
- contentHeight: content height.
func (*Dialog) SetContentWidth ¶
SetContentWidth sets the width of the dialog's contents.
Set it to -1 to reset it to the content's natural width.
See also: gtk.Window:default-width.
The function takes the following parameters:
- contentWidth: content width.
func (*Dialog) SetDefaultWidget ¶
func (self *Dialog) SetDefaultWidget(defaultWidget gtk.Widgetter)
SetDefaultWidget sets the default widget for self.
It's activated when the user presses Enter.
The function takes the following parameters:
- defaultWidget (optional): default widget.
func (*Dialog) SetFocus ¶
func (self *Dialog) SetFocus(focus gtk.Widgetter)
SetFocus sets the focus widget for self.
If focus is not the current focus widget, and is focusable, sets it as the focus widget for the dialog.
If focus is NULL, unsets the focus widget for this dialog. To set the focus to a particular widget in the dialog, it is usually more convenient to use gtk.Widget.GrabFocus() instead of this function.
The function takes the following parameters:
- focus (optional) widget.
func (*Dialog) SetFollowsContentSize ¶
SetFollowsContentSize sets whether to size content of self automatically.
If set to TRUE, always use the content's natural size instead of dialog:content-width and dialog:content-height. If the content resizes, the dialog will immediately resize as well.
See also: gtk.Window:resizable.
The function takes the following parameters:
- followsContentSize: whether to size content automatically.
func (*Dialog) SetPresentationMode ¶
func (self *Dialog) SetPresentationMode(presentationMode DialogPresentationMode)
SetPresentationMode sets presentation mode for self.
When set to ADW_DIALOG_AUTO, the dialog appears as a bottom sheet when the following condition is met: max-width: 450px or max-height: 360px, and as a floating window otherwise.
Set it to ADW_DIALOG_FLOATING or ADW_DIALOG_BOTTOM_SHEET to always present it a floating window or a bottom sheet respectively, regardless of available size.
Presentation mode does nothing for dialogs presented as a window.
The function takes the following parameters:
- presentationMode: new presentation mode.
type DialogClass ¶
type DialogClass struct {
// contains filtered or unexported fields
}
DialogClass: instance of this type is always passed by reference.
func (*DialogClass) ParentClass ¶
func (d *DialogClass) ParentClass() *gtk.WidgetClass
type DialogOverrides ¶
type DialogOverrides struct { CloseAttempt func() Closed func() }
DialogOverrides contains methods that are overridable.
type DialogPresentationMode ¶
DialogPresentationMode describes the available presentation modes for dialog.
New values may be added to this enumeration over time.
See dialog:presentation-mode.
const ( // DialogAuto: switch between ADW_DIALOG_FLOATING and // ADW_DIALOG_BOTTOM_SHEET depending on available size. DialogAuto DialogPresentationMode = iota // DialogFloating: present dialog as a centered floating window. DialogFloating // DialogBottomSheet: present dialog as a bottom sheet. DialogBottomSheet )
func (DialogPresentationMode) String ¶
func (d DialogPresentationMode) String() string
String returns the name in string for DialogPresentationMode.
type Easing ¶
Easing describes the available easing functions for use with timedanimation.
New values may be added to this enumeration over time.
const ( // Linear: linear tweening. Linear Easing = iota // EaseInQuad: quadratic tweening. EaseInQuad // EaseOutQuad: quadratic tweening, inverse of ADW_EASE_IN_QUAD. EaseOutQuad // EaseInOutQuad: quadratic tweening, combining ADW_EASE_IN_QUAD and // ADW_EASE_OUT_QUAD. EaseInOutQuad // EaseInCubic: cubic tweening. EaseInCubic // EaseOutCubic: cubic tweening, inverse of ADW_EASE_IN_CUBIC. EaseOutCubic // EaseInOutCubic: cubic tweening, combining ADW_EASE_IN_CUBIC and // ADW_EASE_OUT_CUBIC. EaseInOutCubic // EaseInQuart: quartic tweening. EaseInQuart // EaseOutQuart: quartic tweening, inverse of ADW_EASE_IN_QUART. EaseOutQuart // EaseInOutQuart: quartic tweening, combining ADW_EASE_IN_QUART and // ADW_EASE_OUT_QUART. EaseInOutQuart // EaseInQuint: quintic tweening. EaseInQuint // EaseOutQuint: quintic tweening, inverse of ADW_EASE_IN_QUINT. EaseOutQuint // EaseInOutQuint: quintic tweening, combining ADW_EASE_IN_QUINT and // ADW_EASE_OUT_QUINT. EaseInOutQuint // EaseInSine: sine wave tweening. EaseInSine // EaseOutSine: sine wave tweening, inverse of ADW_EASE_IN_SINE. EaseOutSine // EaseInOutSine: sine wave tweening, combining ADW_EASE_IN_SINE and // ADW_EASE_OUT_SINE. EaseInOutSine // EaseInExpo: exponential tweening. EaseInExpo // EaseOutExpo: exponential tweening, inverse of ADW_EASE_IN_EXPO. EaseOutExpo // EaseInOutExpo: exponential tweening, combining ADW_EASE_IN_EXPO and // ADW_EASE_OUT_EXPO. EaseInOutExpo // EaseInCirc: circular tweening. EaseInCirc // EaseOutCirc: circular tweening, inverse of ADW_EASE_IN_CIRC. EaseOutCirc // EaseInOutCirc: circular tweening, combining ADW_EASE_IN_CIRC and // ADW_EASE_OUT_CIRC. EaseInOutCirc // EaseInElastic: elastic tweening, with offshoot on start. EaseInElastic // EaseOutElastic: elastic tweening, with offshoot on end, inverse of // ADW_EASE_IN_ELASTIC. EaseOutElastic // EaseInOutElastic: elastic tweening, with offshoot on both ends, combining // ADW_EASE_IN_ELASTIC and ADW_EASE_OUT_ELASTIC. EaseInOutElastic // EaseInBack: overshooting cubic tweening, with backtracking on start. EaseInBack // EaseOutBack: overshooting cubic tweening, with backtracking on end, // inverse of ADW_EASE_IN_BACK. EaseOutBack // EaseInOutBack: overshooting cubic tweening, with backtracking on both // ends, combining ADW_EASE_IN_BACK and ADW_EASE_OUT_BACK. EaseInOutBack // EaseInBounce: exponentially decaying parabolic (bounce) tweening, // on start. EaseInBounce // EaseOutBounce: exponentially decaying parabolic (bounce) tweening, // with bounce on end, inverse of ADW_EASE_IN_BOUNCE. EaseOutBounce // EaseInOutBounce: exponentially decaying parabolic (bounce) tweening, // with bounce on both ends, combining ADW_EASE_IN_BOUNCE and // ADW_EASE_OUT_BOUNCE. EaseInOutBounce )
type EntryRow ¶
type EntryRow struct { PreferencesRow *coreglib.Object gtk.EditableTextWidget // contains filtered or unexported fields }
EntryRow: gtk.ListBoxRow with an embedded text entry.
<picture> <source srcset="entry-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="entry-row.png" alt="entry-row"> </picture>
AdwEntryRow has a title that doubles as placeholder text. It shows an icon indicating that it's editable and can receive additional widgets before or after the editable part.
If entryrow:show-apply-button is set to TRUE, AdwEntryRow can show an apply button when editing its contents. This can be useful if changing its contents can result in an expensive operation, such as network activity.
AdwEntryRow provides only minimal API and should be used with the gtk.Editable API.
See also passwordentryrow.
AdwEntryRow as GtkBuildable ¶
The AdwEntryRow implementation of the gtk.Buildable interface supports adding a child at its end by specifying “suffix” or omitting the “type” attribute of a <child> element.
It also supports adding a child as a prefix widget by specifying “prefix” as the “type” attribute of a <child> element.
CSS nodes ¶
AdwEntryRow has a single CSS node with name row and the .entry style class.
func NewEntryRow ¶
func NewEntryRow() *EntryRow
NewEntryRow creates a new AdwEntryRow.
The function returns the following values:
- entryRow: newly created AdwEntryRow.
func (*EntryRow) ActivatesDefault ¶
ActivatesDefault gets whether activating the embedded entry can activate the default widget.
The function returns the following values:
- ok: whether to activate the default widget.
func (*EntryRow) AddPrefix ¶
func (self *EntryRow) AddPrefix(widget gtk.Widgetter)
AddPrefix adds a prefix widget to self.
The function takes the following parameters:
- widget: widget.
func (*EntryRow) AddSuffix ¶
func (self *EntryRow) AddSuffix(widget gtk.Widgetter)
AddSuffix adds a suffix widget to self.
The function takes the following parameters:
- widget: widget.
func (*EntryRow) Attributes ¶
Attributes gets Pango attributes applied to the text of the embedded entry.
The function returns the following values:
- attrList (optional): list of attributes.
func (*EntryRow) ConnectApply ¶
func (self *EntryRow) ConnectApply(f func()) coreglib.SignalHandle
ConnectApply is emitted when the apply button is pressed.
See entryrow:show-apply-button.
func (*EntryRow) ConnectEntryActivated ¶
func (self *EntryRow) ConnectEntryActivated(f func()) coreglib.SignalHandle
ConnectEntryActivated is emitted when the embedded entry is activated.
func (*EntryRow) EnableEmojiCompletion ¶
EnableEmojiCompletion gets whether to suggest emoji replacements on self.
The function returns the following values:
- ok: whether or not emoji completion is enabled.
func (*EntryRow) GrabFocusWithoutSelecting ¶
GrabFocusWithoutSelecting causes self to have keyboard focus without selecting the text.
See gtk.Text.GrabFocusWithoutSelecting() for more information.
The function returns the following values:
- ok: whether the focus is now inside self.
func (*EntryRow) InputHints ¶
func (self *EntryRow) InputHints() gtk.InputHints
InputHints gets the additional input hints of self.
The function returns the following values:
- inputHints: input hints.
func (*EntryRow) InputPurpose ¶
func (self *EntryRow) InputPurpose() gtk.InputPurpose
InputPurpose gets the input purpose of self.
The function returns the following values:
- inputPurpose: input purpose.
func (*EntryRow) Remove ¶
func (self *EntryRow) Remove(widget gtk.Widgetter)
Remove removes a child from self.
The function takes the following parameters:
- widget: child to be removed.
func (*EntryRow) SetActivatesDefault ¶
SetActivatesDefault sets whether activating the embedded entry can activate the default widget.
The function takes the following parameters:
- activates: whether to activate the default widget.
func (*EntryRow) SetAttributes ¶
SetAttributes sets Pango attributes to apply to the text of the embedded entry.
The pango.Attribute's start_index and end_index must refer to the gtk.EntryBuffer text, i.e. without the preedit string.
The function takes the following parameters:
- attributes (optional): list of attributes.
func (*EntryRow) SetEnableEmojiCompletion ¶
SetEnableEmojiCompletion sets whether to suggest emoji replacements on self.
Emoji replacement is done with :-delimited names, like :heart:.
The function takes the following parameters:
- enableEmojiCompletion: whether emoji completion should be enabled or not.
func (*EntryRow) SetInputHints ¶
func (self *EntryRow) SetInputHints(hints gtk.InputHints)
SetInputHints: set additional input hints for self.
Input hints allow input methods to fine-tune their behavior.
See also: adwentryrow:input-purpose.
The function takes the following parameters:
- hints: hints.
func (*EntryRow) SetInputPurpose ¶
func (self *EntryRow) SetInputPurpose(purpose gtk.InputPurpose)
SetInputPurpose sets the input purpose of self.
The input purpose can be used by input methods to adjust their behavior.
The function takes the following parameters:
- purpose: purpose.
func (*EntryRow) SetShowApplyButton ¶
SetShowApplyButton sets whether self can show the apply button.
When set to TRUE, typing text in the entry will reveal an apply button. Clicking it or pressing the <kbd>Enter</kbd> key will hide the button and emit the entryrow::apply signal.
This is useful if changing the entry contents can trigger an expensive operation, e.g. network activity, to avoid triggering it after typing every character.
The function takes the following parameters:
- showApplyButton: whether to show the apply button.
func (*EntryRow) ShowApplyButton ¶
ShowApplyButton gets whether self can show the apply button.
The function returns the following values:
- ok: whether to show the apply button.
func (*EntryRow) TextLength ¶
TextLength retrieves the current length of the text in self.
The function returns the following values:
- guint: current number of characters in self, or 0 if there are none.
type EntryRowClass ¶
type EntryRowClass struct {
// contains filtered or unexported fields
}
EntryRowClass: instance of this type is always passed by reference.
func (*EntryRowClass) ParentClass ¶
func (e *EntryRowClass) ParentClass() *PreferencesRowClass
ParentClass: parent class.
type EntryRowOverrides ¶
type EntryRowOverrides struct { }
EntryRowOverrides contains methods that are overridable.
type EnumListItem ¶
EnumListItem: AdwEnumListItem is the type of items in a enumlistmodel.
func (*EnumListItem) Name ¶
func (self *EnumListItem) Name() string
Name gets the enum value name.
The function returns the following values:
- utf8: enum value name.
func (*EnumListItem) Nick ¶
func (self *EnumListItem) Nick() string
Nick gets the enum value nick.
The function returns the following values:
- utf8: enum value nick.
func (*EnumListItem) Value ¶
func (self *EnumListItem) Value() int
Value gets the enum value.
The function returns the following values:
- gint: enum value.
type EnumListItemClass ¶
type EnumListItemClass struct {
// contains filtered or unexported fields
}
EnumListItemClass: instance of this type is always passed by reference.
type EnumListItemOverrides ¶
type EnumListItemOverrides struct { }
EnumListItemOverrides contains methods that are overridable.
type EnumListModel ¶
type EnumListModel struct { *coreglib.Object gio.ListModel // contains filtered or unexported fields }
EnumListModel: gio.ListModel representing values of a given enum.
AdwEnumListModel contains objects of type enumlistitem.
func NewEnumListModel ¶
func NewEnumListModel(enumType coreglib.Type) *EnumListModel
NewEnumListModel creates a new AdwEnumListModel for enum_type.
The function takes the following parameters:
- enumType: type of the enum to construct the model from.
The function returns the following values:
- enumListModel: newly created AdwEnumListModel.
func (*EnumListModel) EnumType ¶
func (self *EnumListModel) EnumType() coreglib.Type
EnumType gets the type of the enum represented by self.
The function returns the following values:
- gType: enum type.
func (*EnumListModel) FindPosition ¶
func (self *EnumListModel) FindPosition(value int) uint
FindPosition finds the position of a given enum value in self.
If the value is not found, GTK_INVALID_LIST_POSITION is returned.
The function takes the following parameters:
- value: enum value.
The function returns the following values:
- guint: position of the value.
type EnumListModelClass ¶
type EnumListModelClass struct {
// contains filtered or unexported fields
}
EnumListModelClass: instance of this type is always passed by reference.
type EnumListModelOverrides ¶
type EnumListModelOverrides struct { }
EnumListModelOverrides contains methods that are overridable.
type ExpanderRow ¶
type ExpanderRow struct { PreferencesRow // contains filtered or unexported fields }
ExpanderRow: gtk.ListBoxRow used to reveal widgets.
<picture> <source srcset="expander-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="expander-row.png" alt="expander-row"> </picture>
The AdwExpanderRow widget allows the user to reveal or hide widgets below it. It also allows the user to enable the expansion of the row, allowing to disable all that the row contains.
AdwExpanderRow as GtkBuildable ¶
The AdwExpanderRow implementation of the gtk.Buildable interface supports adding a child as an suffix widget by specifying “suffix” as the “type” attribute of a <child> element.
It also supports adding it as a prefix widget by specifying “prefix” as the “type” attribute of a <child> element.
CSS nodes ¶
AdwExpanderRow has a main CSS node with name row and the .expander style class. It has the .empty style class when it contains no children.
It contains the subnodes row.header for its main embedded row, list.nested for the list it can expand, and image.expander-row-arrow for its arrow.
func NewExpanderRow ¶
func NewExpanderRow() *ExpanderRow
NewExpanderRow creates a new AdwExpanderRow.
The function returns the following values:
- expanderRow: newly created AdwExpanderRow.
func (*ExpanderRow) AddAction
deprecated
func (self *ExpanderRow) AddAction(widget gtk.Widgetter)
AddAction adds an action widget to self.
Deprecated: Use expanderrow.AddSuffix to add a suffix.
The function takes the following parameters:
- widget: widget.
func (*ExpanderRow) AddPrefix ¶
func (self *ExpanderRow) AddPrefix(widget gtk.Widgetter)
AddPrefix adds a prefix widget to self.
The function takes the following parameters:
- widget: widget.
func (*ExpanderRow) AddRow ¶
func (self *ExpanderRow) AddRow(child gtk.Widgetter)
AddRow adds a widget to self.
The widget will appear in the expanding list below self.
The function takes the following parameters:
- child: widget.
func (*ExpanderRow) AddSuffix ¶
func (self *ExpanderRow) AddSuffix(widget gtk.Widgetter)
AddSuffix adds an suffix widget to self.
The function takes the following parameters:
- widget: widget.
func (*ExpanderRow) EnableExpansion ¶
func (self *ExpanderRow) EnableExpansion() bool
EnableExpansion gets whether the expansion of self is enabled.
The function returns the following values:
- ok: whether the expansion of self is enabled.
func (*ExpanderRow) Expanded ¶
func (self *ExpanderRow) Expanded() bool
Expanded gets whether self is expanded.
The function returns the following values:
- ok: whether self is expanded.
func (*ExpanderRow) IconName
deprecated
func (self *ExpanderRow) IconName() string
IconName gets the icon name for self.
Deprecated: Use expanderrow.AddPrefix to add an icon.
The function returns the following values:
- utf8 (optional): icon name for self.
func (*ExpanderRow) Remove ¶
func (self *ExpanderRow) Remove(child gtk.Widgetter)
Remove removes a child from self.
The function takes the following parameters:
- child to be removed.
func (*ExpanderRow) SetEnableExpansion ¶
func (self *ExpanderRow) SetEnableExpansion(enableExpansion bool)
SetEnableExpansion sets whether the expansion of self is enabled.
The function takes the following parameters:
- enableExpansion: whether to enable the expansion.
func (*ExpanderRow) SetExpanded ¶
func (self *ExpanderRow) SetExpanded(expanded bool)
SetExpanded sets whether self is expanded.
The function takes the following parameters:
- expanded: whether to expand the row.
func (*ExpanderRow) SetIconName
deprecated
func (self *ExpanderRow) SetIconName(iconName string)
SetIconName sets the icon name for self.
Deprecated: Use expanderrow.AddPrefix to add an icon.
The function takes the following parameters:
- iconName (optional): icon name.
func (*ExpanderRow) SetShowEnableSwitch ¶
func (self *ExpanderRow) SetShowEnableSwitch(showEnableSwitch bool)
SetShowEnableSwitch sets whether the switch enabling the expansion of self is visible.
The function takes the following parameters:
- showEnableSwitch: whether to show the switch enabling the expansion.
func (*ExpanderRow) SetSubtitle ¶
func (self *ExpanderRow) SetSubtitle(subtitle string)
SetSubtitle sets the subtitle for self.
The subtitle is interpreted as Pango markup unless preferencesrow:use-markup is set to FALSE.
The function takes the following parameters:
- subtitle: subtitle.
func (*ExpanderRow) SetSubtitleLines ¶
func (self *ExpanderRow) SetSubtitleLines(subtitleLines int)
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.
The function takes the following parameters:
- subtitleLines: number of lines at the end of which the subtitle label will be ellipsized.
func (*ExpanderRow) SetTitleLines ¶
func (self *ExpanderRow) SetTitleLines(titleLines int)
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.
The function takes the following parameters:
- titleLines: number of lines at the end of which the title label will be ellipsized.
func (*ExpanderRow) ShowEnableSwitch ¶
func (self *ExpanderRow) ShowEnableSwitch() bool
ShowEnableSwitch gets whether the switch enabling the expansion of self is visible.
The function returns the following values:
- ok: whether the switch enabling the expansion is visible.
func (*ExpanderRow) Subtitle ¶
func (self *ExpanderRow) Subtitle() string
Subtitle gets the subtitle for self.
The function returns the following values:
- utf8: subtitle for self.
func (*ExpanderRow) SubtitleLines ¶
func (self *ExpanderRow) SubtitleLines() int
SubtitleLines gets the number of lines at the end of which the subtitle label will be ellipsized.
The function returns the following values:
- gint: number of lines at the end of which the subtitle label will be ellipsized.
func (*ExpanderRow) TitleLines ¶
func (self *ExpanderRow) TitleLines() int
TitleLines gets the number of lines at the end of which the title label will be ellipsized.
The function returns the following values:
- gint: number of lines at the end of which the title label will be ellipsized.
type ExpanderRowClass ¶
type ExpanderRowClass struct {
// contains filtered or unexported fields
}
ExpanderRowClass: instance of this type is always passed by reference.
func (*ExpanderRowClass) ParentClass ¶
func (e *ExpanderRowClass) ParentClass() *PreferencesRowClass
ParentClass: parent class.
type ExpanderRowOverrides ¶
type ExpanderRowOverrides struct { }
ExpanderRowOverrides contains methods that are overridable.
type Flap
deprecated
type Flap struct { gtk.Widget *coreglib.Object Swipeable gtk.Orientable // contains filtered or unexported fields }
Flap: adaptive container acting like a box or an overlay.
<picture> <source srcset="flap-wide-dark.png" media="(prefers-color-scheme: dark)"> <img src="flap-wide.png" alt="flap-wide"> </picture> <picture> <source srcset="flap-narrow-dark.png" media="(prefers-color-scheme: dark)"> <img src="flap-narrow.png" alt="flap-narrow"> </picture>
The AdwFlap widget can display its children like a gtk.Box does or like a gtk.Overlay does, according to the flap:fold-policy value.
AdwFlap has at most three children: flap:content, flap:flap and flap:separator. Content is the primary child, flap is displayed next to it when unfolded, or overlays it when folded. Flap can be shown or hidden by changing the flap:reveal-flap value, as well as via swipe gestures if flap:swipe-to-open and/or flap:swipe-to-close are set to TRUE.
Optionally, a separator can be provided, which would be displayed between the content and the flap when there's no shadow to separate them, depending on the transition type.
flap:flap is transparent by default; add the .background (style-classes.html#background) style class to it if this is unwanted.
If flap:modal is set to TRUE, content becomes completely inaccessible when the flap is revealed while folded.
The position of the flap and separator children relative to the content is determined by orientation, as well as the flap:flap-position value.
Folding the flap will automatically hide the flap widget, and unfolding it will automatically reveal it. If this behavior is not desired, the flap:locked property can be used to override it.
Common use cases include sidebars, header bars that need to be able to overlap the window content (for example, in fullscreen mode) and bottom sheets.
AdwFlap as GtkBuildable ¶
The AdwFlap implementation of the gtk.Buildable interface supports setting the flap child by specifying “flap” as the “type” attribute of a <child> element, and separator by specifying “separator”. Specifying “content” child type or omitting it results in setting the content child.
CSS nodes ¶
AdwFlap has a single CSS node with name flap. The node will get the style classes .folded when it is folded, and .unfolded when it's not.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
func (*Flap) FlapPosition
deprecated
func (self *Flap) FlapPosition() gtk.PackType
FlapPosition gets the flap position for self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function returns the following values:
- packType: flap position for self.
func (*Flap) FoldDuration
deprecated
func (*Flap) FoldPolicy
deprecated
func (self *Flap) FoldPolicy() FlapFoldPolicy
FoldPolicy gets the fold policy for self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function returns the following values:
- flapFoldPolicy: fold policy for self.
func (*Flap) FoldThresholdPolicy
deprecated
func (self *Flap) FoldThresholdPolicy() FoldThresholdPolicy
FoldThresholdPolicy gets the fold threshold policy for self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function returns the following values:
- foldThresholdPolicy: fold threshold policy.
func (*Flap) RevealFlap
deprecated
func (*Flap) RevealParams
deprecated
func (self *Flap) RevealParams() *SpringParams
RevealParams gets the reveal animation spring parameters for self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function returns the following values:
- springParams: reveal animation parameters.
func (*Flap) RevealProgress
deprecated
RevealProgress gets the current reveal progress for self.
0 means fully hidden, 1 means fully revealed.
See flap:reveal-flap.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function returns the following values:
- gdouble: current reveal progress for self.
func (*Flap) SetContent
deprecated
func (self *Flap) SetContent(content gtk.Widgetter)
SetContent sets the content widget for self.
It's always displayed when unfolded, and partially visible when folded.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function takes the following parameters:
- content (optional) widget.
func (*Flap) SetFlap
deprecated
func (self *Flap) SetFlap(flap gtk.Widgetter)
SetFlap sets the flap widget for self.
It's only visible when flap:reveal-progress is greater than 0.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function takes the following parameters:
- flap (optional) widget.
func (*Flap) SetFlapPosition
deprecated
func (self *Flap) SetFlapPosition(position gtk.PackType)
SetFlapPosition sets the flap position for self.
If it's set to GTK_PACK_START, the flap is displayed before the content, if GTK_PACK_END, it's displayed after the content.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function takes the following parameters:
- position: new value.
func (*Flap) SetFoldDuration
deprecated
SetFoldDuration sets the fold transition animation duration for self, in milliseconds.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function takes the following parameters:
- duration: new duration, in milliseconds.
func (*Flap) SetFoldPolicy
deprecated
func (self *Flap) SetFoldPolicy(policy FlapFoldPolicy)
SetFoldPolicy sets the fold policy for self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function takes the following parameters:
- policy: fold policy.
func (*Flap) SetFoldThresholdPolicy
deprecated
func (self *Flap) SetFoldThresholdPolicy(policy FoldThresholdPolicy)
SetFoldThresholdPolicy sets the fold threshold policy for self.
If set to ADW_FOLD_THRESHOLD_POLICY_MINIMUM, flap will only fold when the children cannot fit anymore. With ADW_FOLD_THRESHOLD_POLICY_NATURAL, it will fold as soon as children don't get their natural size.
This can be useful if you have a long ellipsizing label and want to let it ellipsize instead of immediately folding.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function takes the following parameters:
- policy to use.
func (*Flap) SetLocked
deprecated
SetLocked sets whether self is locked.
If FALSE, folding 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.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function takes the following parameters:
- locked: new value.
func (*Flap) SetModal
deprecated
SetModal sets whether self is modal.
If TRUE, clicking the content widget while flap is revealed, as well as pressing the <kbd>Esc</kbd> key, will close the flap. If FALSE, clicks are passed through to the content widget.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function takes the following parameters:
- modal: whether self is modal.
func (*Flap) SetRevealFlap
deprecated
func (*Flap) SetRevealParams
deprecated
func (self *Flap) SetRevealParams(params *SpringParams)
SetRevealParams sets the reveal animation spring parameters for self.
The default value is equivalent to:
adw_spring_params_new (1, 0.5, 500)
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function takes the following parameters:
- params: new parameters.
func (*Flap) SetSeparator
deprecated
func (self *Flap) SetSeparator(separator gtk.Widgetter)
SetSeparator sets the separator widget for self.
It's displayed between content and flap when there's no shadow to display. When exactly it's visible depends on the flap:transition-type value.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function takes the following parameters:
- separator (optional) widget.
func (*Flap) SetSwipeToClose
deprecated
SetSwipeToClose sets whether self can be closed with a swipe gesture.
The area that can be swiped depends on the flap:transition-type value.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function takes the following parameters:
- swipeToClose: whether self can be closed with a swipe gesture.
func (*Flap) SetSwipeToOpen
deprecated
SetSwipeToOpen sets whether self can be opened with a swipe gesture.
The area that can be swiped depends on the flap:transition-type value.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function takes the following parameters:
- swipeToOpen: whether self can be opened with a swipe gesture.
func (*Flap) SetTransitionType
deprecated
func (self *Flap) SetTransitionType(transitionType FlapTransitionType)
SetTransitionType sets the type of animation used for reveal and fold transitions in self.
flap:flap is transparent by default, which means the content will be seen through it with ADW_FLAP_TRANSITION_TYPE_OVER transitions; add the .background (style-classes.html#background) style class to it if this is unwanted.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function takes the following parameters:
- transitionType: new transition type.
func (*Flap) SwipeToClose
deprecated
func (*Flap) SwipeToOpen
deprecated
func (*Flap) TransitionType
deprecated
func (self *Flap) TransitionType() FlapTransitionType
TransitionType gets the type of animation used for reveal and fold transitions in self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
The function returns the following values:
- flapTransitionType: current transition type of self.
type FlapClass ¶
type FlapClass struct {
// contains filtered or unexported fields
}
FlapClass: instance of this type is always passed by reference.
func (*FlapClass) ParentClass ¶
func (f *FlapClass) ParentClass() *gtk.WidgetClass
type FlapFoldPolicy
deprecated
FlapFoldPolicy describes the possible folding behavior of a flap widget.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
const ( // FlapFoldPolicyNever: disable folding, the flap cannot reach narrow sizes. FlapFoldPolicyNever FlapFoldPolicy = iota // FlapFoldPolicyAlways: keep the flap always folded. FlapFoldPolicyAlways // FlapFoldPolicyAuto: fold and unfold the flap based on available space. FlapFoldPolicyAuto )
func (FlapFoldPolicy) String ¶
func (f FlapFoldPolicy) String() string
String returns the name in string for FlapFoldPolicy.
type FlapOverrides ¶
type FlapOverrides struct { }
FlapOverrides contains methods that are overridable.
type FlapTransitionType
deprecated
FlapTransitionType describes transitions types of a flap widget.
It determines the type of animation when transitioning between children in a flap widget, as well as which areas can be swiped via flap:swipe-to-open and flap:swipe-to-close.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwflap).
const ( // FlapTransitionTypeOver: flap slides over the content, which is dimmed. // When folded, only the flap can be swiped. FlapTransitionTypeOver FlapTransitionType = iota // FlapTransitionTypeUnder: content slides over the flap. Only the content // can be swiped. FlapTransitionTypeUnder // FlapTransitionTypeSlide: flap slides offscreen when hidden, neither the // flap nor content overlap each other. Both widgets can be swiped. FlapTransitionTypeSlide )
func (FlapTransitionType) String ¶
func (f FlapTransitionType) String() string
String returns the name in string for FlapTransitionType.
type FoldThresholdPolicy
deprecated
FoldThresholdPolicy determines when flap and leaflet will fold.
Deprecated: Stop using AdwLeaflet and AdwFlap.
const ( // FoldThresholdPolicyMinimum: folding is based on the minimum size. FoldThresholdPolicyMinimum FoldThresholdPolicy = iota // FoldThresholdPolicyNatural: folding is based on the natural size. FoldThresholdPolicyNatural )
func (FoldThresholdPolicy) String ¶
func (f FoldThresholdPolicy) String() string
String returns the name in string for FoldThresholdPolicy.
type HeaderBar ¶
type HeaderBar struct { gtk.Widget // contains filtered or unexported fields }
HeaderBar: title bar widget.
<picture> <source srcset="header-bar-dark.png" media="(prefers-color-scheme: dark)"> <img src="header-bar.png" alt="header-bar"> </picture>
AdwHeaderBar is similar to gtk.HeaderBar, but provides additional features compared to it. Refer to GtkHeaderBar for details. It is typically used as a top bar within toolbarview.
Dialog Integration ¶
When placed inside an dialog, AdwHeaderBar will display the dialog title intead of window title. It will also adjust the decoration layout to ensure it always has a close button and nothing else. Set headerbar:show-start-title-buttons and headerbar:show-end-title-buttons to FALSE to remove it if it's unwanted.
Navigation View Integration ¶
When placed inside an navigationpage, AdwHeaderBar will display the page title instead of window title.
When used together with navigationview or navigationsplitview, it will also display a back button that can be used to go back to the previous page. The button also has a context menu, allowing to pop multiple pages at once, potentially across multiple navigation views.
Set headerbar:show-back-button to FALSE to disable this behavior in rare scenarios where it's unwanted.
Split View Integration ¶
When placed inside AdwNavigationSplitView or AdwOverlaySplitView, AdwHeaderBar will automatically hide the title buttons other than at the edges of the window.
Centering Policy ¶
headerbar:centering-policy allows to enforce strict centering of the title widget. This can be useful for entries inside clamp.
Title Buttons ¶
Unlike GtkHeaderBar, AdwHeaderBar allows to toggle title button visibility for each side individually, using the headerbar:show-start-title-buttons and headerbar:show-end-title-buttons properties.
CSS nodes
headerbar ╰── windowhandle ╰── box ├── widget │ ╰── box.start │ ├── windowcontrols.start │ ├── widget │ │ ╰── [button.back] │ ╰── [other children] ├── widget │ ╰── [Title Widget] ╰── widget ╰── box.end ├── [other children] ╰── windowcontrols.end
AdwHeaderBar's CSS node is called headerbar. It contains a windowhandle subnode, which contains a box subnode, which contains three widget subnodes at the start, center and end of the header bar. The start and end subnotes contain a box subnode with the .start and .end style classes respectively, and the center node contains a node that represents the title.
Each of the boxes contains a windowcontrols subnode, see gtk.WindowControls for details, as well as other children.
When headerbar:show-back-button is TRUE, the start box also contains a node with the name widget that contains a node with the name button and .back style class.
Accessibility ¶
AdwHeaderBar uses the GTK_ACCESSIBLE_ROLE_GROUP role.
func NewHeaderBar ¶
func NewHeaderBar() *HeaderBar
NewHeaderBar creates a new AdwHeaderBar.
The function returns the following values:
- headerBar: newly created AdwHeaderBar.
func (*HeaderBar) CenteringPolicy ¶
func (self *HeaderBar) CenteringPolicy() CenteringPolicy
CenteringPolicy gets the policy for aligning the center widget.
The function returns the following values:
- centeringPolicy: centering policy.
func (*HeaderBar) DecorationLayout ¶
DecorationLayout gets the decoration layout for self.
The function returns the following values:
- utf8 (optional): decoration layout.
func (*HeaderBar) PackEnd ¶
func (self *HeaderBar) PackEnd(child gtk.Widgetter)
PackEnd adds child to self, packed with reference to the end of self.
The function takes the following parameters:
- child: widget to be added to self.
func (*HeaderBar) PackStart ¶
func (self *HeaderBar) PackStart(child gtk.Widgetter)
PackStart adds child to self, packed with reference to the start of the self.
The function takes the following parameters:
- child: widget to be added to self.
func (*HeaderBar) Remove ¶
func (self *HeaderBar) Remove(child gtk.Widgetter)
Remove removes a child from self.
The child must have been added with headerbar.PackStart, headerbar.PackEnd or headerbar:title-widget.
The function takes the following parameters:
- child to remove.
func (*HeaderBar) SetCenteringPolicy ¶
func (self *HeaderBar) SetCenteringPolicy(centeringPolicy CenteringPolicy)
SetCenteringPolicy sets the policy for aligning the center widget.
The function takes the following parameters:
- centeringPolicy: centering policy.
func (*HeaderBar) SetDecorationLayout ¶
SetDecorationLayout sets the decoration layout for self.
If this property is not set, the gtk.Settings:gtk-decoration-layout setting is used.
The format of the string is button names, separated by commas. A colon separates the buttons that should appear at the start from those at the end. Recognized button names are minimize, maximize, close and icon (the window icon).
For example, “icon:minimize,maximize,close” specifies an icon at the start, and minimize, maximize and close buttons at the end.
The function takes the following parameters:
- layout (optional): decoration layout.
func (*HeaderBar) SetShowBackButton ¶
SetShowBackButton sets whether self can show the back button.
The back button will never be shown unless the header bar is placed inside an navigationview. Usually, there is no reason to set it to FALSE.
The function takes the following parameters:
- showBackButton: whether to show the back button.
func (*HeaderBar) SetShowEndTitleButtons ¶
SetShowEndTitleButtons sets whether to show title buttons at the end of self.
See headerbar:show-start-title-buttons for the other side.
Which buttons are actually shown and where is determined by the headerbar:decoration-layout property, and by the state of the window (e.g. a close button will not be shown if the window can't be closed).
The function takes the following parameters:
- setting: TRUE to show standard title buttons.
func (*HeaderBar) SetShowStartTitleButtons ¶
SetShowStartTitleButtons sets whether to show title buttons at the start of self.
See headerbar:show-end-title-buttons for the other side.
Which buttons are actually shown and where is determined by the headerbar:decoration-layout property, and by the state of the window (e.g. a close button will not be shown if the window can't be closed).
The function takes the following parameters:
- setting: TRUE to show standard title buttons.
func (*HeaderBar) SetShowTitle ¶
SetShowTitle sets whether the title widget should be shown.
The function takes the following parameters:
- showTitle: whether the title widget is visible.
func (*HeaderBar) SetTitleWidget ¶
func (self *HeaderBar) SetTitleWidget(titleWidget gtk.Widgetter)
SetTitleWidget sets the title widget for self.
When set to NULL, the header bar will display the title of the window it is contained in.
To use a different title, use windowtitle:
<object class="AdwHeaderBar"> <property name="title-widget"> <object class="AdwWindowTitle"> <property name="title" translatable="yes">Title</property> </object> </property> </object>.
The function takes the following parameters:
- titleWidget (optional): widget to use for a title.
func (*HeaderBar) ShowBackButton ¶
ShowBackButton gets whether self can show the back button.
The function returns the following values:
- ok: whether to show the back button.
func (*HeaderBar) ShowEndTitleButtons ¶
ShowEndTitleButtons gets whether to show title buttons at the end of self.
The function returns the following values:
- ok: TRUE if title buttons at the end are shown.
func (*HeaderBar) ShowStartTitleButtons ¶
ShowStartTitleButtons gets whether to show title buttons at the start of self.
The function returns the following values:
- ok: TRUE if title buttons at the start are shown.
func (*HeaderBar) ShowTitle ¶
ShowTitle gets whether the title widget should be shown.
The function returns the following values:
- ok: whether the title widget should be shown.
func (*HeaderBar) TitleWidget ¶
func (self *HeaderBar) TitleWidget() gtk.Widgetter
TitleWidget gets the title widget widget of self.
The function returns the following values:
- widget (optional): title widget.
type HeaderBarClass ¶
type HeaderBarClass struct {
// contains filtered or unexported fields
}
HeaderBarClass: instance of this type is always passed by reference.
func (*HeaderBarClass) ParentClass ¶
func (h *HeaderBarClass) ParentClass() *gtk.WidgetClass
type HeaderBarOverrides ¶
type HeaderBarOverrides struct { }
HeaderBarOverrides contains methods that are overridable.
type Leaflet
deprecated
type Leaflet struct { gtk.Widget *coreglib.Object Swipeable gtk.Orientable // contains filtered or unexported fields }
Leaflet: adaptive container acting like a box or a stack.
<picture> <source srcset="leaflet-wide-dark.png" media="(prefers-color-scheme: dark)"> <img src="leaflet-wide.png" alt="leaflet-wide"> </picture> <picture> <source srcset="leaflet-narrow-dark.png" media="(prefers-color-scheme: dark)"> <img src="leaflet-narrow.png" alt="leaflet-narrow"> </picture>
The AdwLeaflet widget can display its children like a gtk.Box does or like a gtk.Stack does, adapting to size changes by switching between the two modes.
When there is enough space the children are displayed side by side, otherwise only one is displayed and the leaflet is said to be “folded”. The threshold is dictated by the preferred minimum sizes of the children. When a leaflet is folded, the children can be navigated using swipe gestures.
The “over” and “under” transition types stack the children one on top of the other, while the “slide” transition puts the children side by side. While navigating to a child on the side or below can be performed by swiping the current child away, navigating to an upper child requires dragging it from the edge where it resides. This doesn't affect non-dragging swipes.
CSS nodes ¶
AdwLeaflet has a single CSS node with name leaflet. The node will get the style classes .folded when it is folded, .unfolded when it's not, or none if it hasn't computed its fold yet.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
func NewLeaflet
deprecated
func NewLeaflet() *Leaflet
NewLeaflet creates a new AdwLeaflet.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- leaflet: new created AdwLeaflet.
func (*Leaflet) AdjacentChild
deprecated
func (self *Leaflet) AdjacentChild(direction NavigationDirection) gtk.Widgetter
AdjacentChild finds the previous or next navigatable child.
This will be the same child leaflet.Navigate or swipe gestures will navigate to.
If there's no child to navigate to, NULL will be returned instead.
See leafletpage:navigatable.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- direction: direction.
The function returns the following values:
- widget (optional) previous or next child.
func (*Leaflet) Append
deprecated
func (self *Leaflet) Append(child gtk.Widgetter) *LeafletPage
Append adds a child to self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- child: widget to add.
The function returns the following values:
- leafletPage: leafletpage for child.
func (*Leaflet) CanNavigateBack
deprecated
CanNavigateBack gets whether gestures and shortcuts for navigating backward are enabled.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- ok: whether gestures and shortcuts are enabled.
func (*Leaflet) CanNavigateForward
deprecated
CanNavigateForward gets whether gestures and shortcuts for navigating forward are enabled.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- ok: whether gestures and shortcuts are enabled.
func (*Leaflet) ChildByName
deprecated
ChildByName finds the child of self with name.
Returns NULL if there is no child with this name.
See leafletpage:name.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- name of the child to find.
The function returns the following values:
- widget (optional): requested child of self.
func (*Leaflet) ChildTransitionParams
deprecated
func (self *Leaflet) ChildTransitionParams() *SpringParams
ChildTransitionParams gets the child transition spring parameters for self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- springParams: child transition parameters.
func (*Leaflet) ChildTransitionRunning
deprecated
ChildTransitionRunning gets whether a child transition is currently running for self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- ok: whether a transition is currently running.
func (*Leaflet) FoldThresholdPolicy
deprecated
func (self *Leaflet) FoldThresholdPolicy() FoldThresholdPolicy
FoldThresholdPolicy gets the fold threshold policy for self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- foldThresholdPolicy: fold threshold policy.
func (*Leaflet) Folded
deprecated
Folded gets whether self is folded.
The leaflet will be folded if the size allocated to it is smaller than the sum of the minimum or natural sizes of the children (see leaflet:fold-threshold-policy), it will be unfolded otherwise.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- ok: whether self is folded.
func (*Leaflet) Homogeneous
deprecated
func (*Leaflet) InsertChildAfter
deprecated
func (self *Leaflet) InsertChildAfter(child, sibling gtk.Widgetter) *LeafletPage
InsertChildAfter inserts child in the position after sibling in the list of children.
If sibling is NULL, inserts child at the first position.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- child: widget to insert.
- sibling (optional) after which to insert child.
The function returns the following values:
- leafletPage: leafletpage for child.
func (*Leaflet) ModeTransitionDuration
deprecated
ModeTransitionDuration gets the mode transition animation duration for self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- guint: mode transition duration, in milliseconds.
func (*Leaflet) Navigate
deprecated
func (self *Leaflet) Navigate(direction NavigationDirection) bool
Navigate navigates to the previous or next child.
The child must have the leafletpage:navigatable property set to TRUE, otherwise it will be skipped.
This will be the same child as returned by leaflet.GetAdjacentChild or navigated to via swipe gestures.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- direction: direction.
The function returns the following values:
- ok: whether the visible child was changed.
func (*Leaflet) Page
deprecated
func (self *Leaflet) Page(child gtk.Widgetter) *LeafletPage
Page returns the leafletpage object for child.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- child of self.
The function returns the following values:
- leafletPage: page object for child.
func (*Leaflet) Pages
deprecated
func (self *Leaflet) Pages() *gtk.SelectionModel
Pages returns a gio.ListModel that contains the pages of the leaflet.
This can be used to keep an up-to-date view. The model also implements gtk.SelectionModel and can be used to track and change the visible page.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- selectionModel: GtkSelectionModel for the leaflet's children.
func (*Leaflet) Prepend
deprecated
func (self *Leaflet) Prepend(child gtk.Widgetter) *LeafletPage
Prepend inserts child at the first position in self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- child: widget to prepend.
The function returns the following values:
- leafletPage: leafletpage for child.
func (*Leaflet) ReorderChildAfter
deprecated
func (self *Leaflet) ReorderChildAfter(child, sibling gtk.Widgetter)
ReorderChildAfter moves child to the position after sibling in the list of children.
If sibling is NULL, moves child to the first position.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- child: widget to move, must be a child of self.
- sibling (optional) to move child after.
func (*Leaflet) SetCanNavigateBack
deprecated
SetCanNavigateBack sets whether gestures and shortcuts for navigating backward are enabled.
The supported gestures are:
- One-finger swipe on touchscreens
- Horizontal scrolling on touchpads (usually two-finger swipe)
- Back/forward mouse buttons
The keyboard back/forward keys are also supported, as well as the <kbd>Alt</kbd>+<kbd>←</kbd> shortcut for horizontal orientation, or <kbd>Alt</kbd>+<kbd>↑</kbd> for vertical orientation.
If the orientation is horizontal, for right-to-left locales, gestures and shortcuts are reversed.
Only children that have leafletpage:navigatable set to TRUE can be navigated to.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- canNavigateBack: new value.
func (*Leaflet) SetCanNavigateForward
deprecated
SetCanNavigateForward sets whether gestures and shortcuts for navigating forward are enabled.
The supported gestures are:
- One-finger swipe on touchscreens
- Horizontal scrolling on touchpads (usually two-finger swipe)
- Back/forward mouse buttons
The keyboard back/forward keys are also supported, as well as the <kbd>Alt</kbd>+<kbd>→</kbd> shortcut for horizontal orientation, or <kbd>Alt</kbd>+<kbd>↓</kbd> for vertical orientation.
If the orientation is horizontal, for right-to-left locales, gestures and shortcuts are reversed.
Only children that have leafletpage:navigatable set to TRUE can be navigated to.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- canNavigateForward: new value.
func (*Leaflet) SetCanUnfold
deprecated
func (*Leaflet) SetChildTransitionParams
deprecated
func (self *Leaflet) SetChildTransitionParams(params *SpringParams)
SetChildTransitionParams sets the child transition spring parameters for self.
The default value is equivalent to:
adw_spring_params_new (1, 0.5, 500)
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- params: new parameters.
func (*Leaflet) SetFoldThresholdPolicy
deprecated
func (self *Leaflet) SetFoldThresholdPolicy(policy FoldThresholdPolicy)
SetFoldThresholdPolicy sets the fold threshold policy for self.
If set to ADW_FOLD_THRESHOLD_POLICY_MINIMUM, it will only fold when the children cannot fit anymore. With ADW_FOLD_THRESHOLD_POLICY_NATURAL, it will fold as soon as children don't get their natural size.
This can be useful if you have a long ellipsizing label and want to let it ellipsize instead of immediately folding.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- policy to use.
func (*Leaflet) SetHomogeneous
deprecated
SetHomogeneous sets self to be homogeneous or not.
If set to FALSE, different children can have different size along the opposite orientation.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- homogeneous: whether to make self homogeneous.
func (*Leaflet) SetModeTransitionDuration
deprecated
SetModeTransitionDuration sets the mode transition animation duration for self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- duration: new duration, in milliseconds.
func (*Leaflet) SetTransitionType
deprecated
func (self *Leaflet) SetTransitionType(transition LeafletTransitionType)
SetTransitionType sets the type of animation used for transitions between modes and children.
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.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- transition: new transition type.
func (*Leaflet) SetVisibleChild
deprecated
func (self *Leaflet) SetVisibleChild(visibleChild gtk.Widgetter)
SetVisibleChild sets the widget currently visible when the leaflet is folded.
The transition is determined by leaflet:transition-type and leaflet:child-transition-params. The transition can be cancelled by the user, in which case visible child will change back to the previously visible child.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- visibleChild: new child.
func (*Leaflet) SetVisibleChildName
deprecated
func (*Leaflet) TransitionType
deprecated
func (self *Leaflet) TransitionType() LeafletTransitionType
TransitionType gets the type of animation used for transitions between modes and children.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- leafletTransitionType: current transition type of self.
func (*Leaflet) VisibleChild
deprecated
func (self *Leaflet) VisibleChild() gtk.Widgetter
VisibleChild gets the widget currently visible when the leaflet is folded.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- widget (optional): visible child.
func (*Leaflet) VisibleChildName
deprecated
type LeafletClass ¶
type LeafletClass struct {
// contains filtered or unexported fields
}
LeafletClass: instance of this type is always passed by reference.
func (*LeafletClass) ParentClass ¶
func (l *LeafletClass) ParentClass() *gtk.WidgetClass
type LeafletOverrides ¶
type LeafletOverrides struct { }
LeafletOverrides contains methods that are overridable.
type LeafletPage
deprecated
LeafletPage: auxiliary class used by leaflet.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
func (*LeafletPage) Child
deprecated
func (self *LeafletPage) Child() gtk.Widgetter
Child gets the leaflet child to which self belongs.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- widget: child to which self belongs.
func (*LeafletPage) Name
deprecated
func (self *LeafletPage) Name() string
Name gets the name of self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- utf8 (optional): name of self.
func (*LeafletPage) Navigatable
deprecated
func (self *LeafletPage) Navigatable() bool
Navigatable gets whether the child can be navigated to when folded.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function returns the following values:
- ok: whether self can be navigated to when folded.
func (*LeafletPage) SetName
deprecated
func (self *LeafletPage) SetName(name string)
SetName sets the name of the self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- name (optional): new value to set.
func (*LeafletPage) SetNavigatable
deprecated
func (self *LeafletPage) SetNavigatable(navigatable bool)
SetNavigatable sets whether self can be navigated to when folded.
If FALSE, the child will be ignored by leaflet.GetAdjacentChild, leaflet.Navigate, and swipe gestures.
This can be used used to prevent switching to widgets like separators.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
The function takes the following parameters:
- navigatable: whether self can be navigated to when folded.
type LeafletPageClass ¶
type LeafletPageClass struct {
// contains filtered or unexported fields
}
LeafletPageClass: instance of this type is always passed by reference.
type LeafletPageOverrides ¶
type LeafletPageOverrides struct { }
LeafletPageOverrides contains methods that are overridable.
type LeafletTransitionType
deprecated
LeafletTransitionType describes the possible transitions in a leaflet widget.
New values may be added to this enumeration over time.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwleaflet).
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 = iota // 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 // LeafletTransitionTypeSlide: slide from left, right, up or down according // to the orientation, text direction and the children order. LeafletTransitionTypeSlide )
func (LeafletTransitionType) String ¶
func (l LeafletTransitionType) String() string
String returns the name in string for LeafletTransitionType.
type LengthUnit ¶
LengthUnit describes length units.
| Unit | Regular Text | Large Text | | ---- | ------------ | ---------- | | 1px | 1px | 1px | | 1pt | 1.333333px | 1.666667px | | 1sp | 1px | 1.25px |
New values may be added to this enumeration over time.
const ( // LengthUnitPx: pixels. LengthUnitPx LengthUnit = iota // LengthUnitPt: points, changes with text scale factor. LengthUnitPt // LengthUnitSp: scale independent pixels, changes with text scale factor. LengthUnitSp )
func (LengthUnit) String ¶
func (l LengthUnit) String() string
String returns the name in string for LengthUnit.
type MessageDialog ¶
type MessageDialog struct { gtk.Window // contains filtered or unexported fields }
MessageDialog: dialog presenting a message or a question.
<picture> <source srcset="message-dialog-dark.png" media="(prefers-color-scheme: dark)"> <img src="message-dialog.png" alt="message-dialog"> </picture>
Message dialogs have a heading, a body, an optional child widget, and one or multiple responses, each presented as a button.
Each response has a unique string ID, and a button label. Additionally, each response can be enabled or disabled, and can have a suggested or destructive appearance.
When one of the responses is activated, or the dialog is closed, the messagedialog::response signal will be emitted. This signal is detailed, and the detail, as well as the response parameter will be set to the ID of the activated response, or to the value of the messagedialog:close-response property if the dialog had been closed without activating any of the responses.
Response buttons can be presented horizontally or vertically depending on available space.
When a response is activated, AdwMessageDialog is closed automatically.
An example of using a message dialog:
GtkWidget *dialog; dialog = adw_message_dialog_new (parent, _("Replace File?"), NULL); adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog), _("A file named “s” already exists. Do you want to replace it?"), filename); adw_message_dialog_add_responses (ADW_MESSAGE_DIALOG (dialog), "cancel", _("_Cancel"), "replace", _("_Replace"), NULL); adw_message_dialog_set_response_appearance (ADW_MESSAGE_DIALOG (dialog), "replace", ADW_RESPONSE_DESTRUCTIVE); adw_message_dialog_set_default_response (ADW_MESSAGE_DIALOG (dialog), "cancel"); adw_message_dialog_set_close_response (ADW_MESSAGE_DIALOG (dialog), "cancel"); g_signal_connect (dialog, "response", G_CALLBACK (response_cb), self); gtk_window_present (GTK_WINDOW (dialog));
Async API ¶
AdwMessageDialog can also be used via the messagedialog.Choose method. This API follows the GIO async pattern, and the result can be obtained by calling messagedialog.ChooseFinish, for example:
static void dialog_cb (AdwMessageDialog *dialog, GAsyncResult *result, MyWindow *self) { const char *response = adw_message_dialog_choose_finish (dialog, result); // ... } static void show_dialog (MyWindow *self) { GtkWidget *dialog; dialog = adw_message_dialog_new (GTK_WINDOW (self), _("Replace File?"), NULL); adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog), _("A file named “s” already exists. Do you want to replace it?"), filename); adw_message_dialog_add_responses (ADW_MESSAGE_DIALOG (dialog), "cancel", _("_Cancel"), "replace", _("_Replace"), NULL); adw_message_dialog_set_response_appearance (ADW_MESSAGE_DIALOG (dialog), "replace", ADW_RESPONSE_DESTRUCTIVE); adw_message_dialog_set_default_response (ADW_MESSAGE_DIALOG (dialog), "cancel"); adw_message_dialog_set_close_response (ADW_MESSAGE_DIALOG (dialog), "cancel"); adw_message_dialog_choose (ADW_MESSAGE_DIALOG (dialog), NULL, (GAsyncReadyCallback) dialog_cb, self); }
AdwMessageDialog as GtkBuildable ¶
AdwMessageDialog supports adding responses in UI definitions by via the <responses> element that may contain multiple <response> elements, each respresenting a response.
Each of the <response> elements must have the id attribute specifying the response ID. The contents of the element are used as the response label.
Response labels can be translated with the usual translatable, context and comments attributes.
The <response> elements can also have enabled and/or appearance attributes. See messagedialog.SetResponseEnabled and messagedialog.SetResponseAppearance for details.
Example of an AdwMessageDialog UI definition:
<object class="AdwMessageDialog" id="dialog"> <property name="heading" translatable="yes">Save Changes?</property> <property name="body" translatable="yes">Open documents contain unsaved changes. Changes which are not saved will be permanently lost.</property> <property name="default-response">save</property> <property name="close-response">cancel</property> <signal name="response" handler="response_cb"/> <responses> <response id="cancel" translatable="yes">_Cancel</response> <response id="discard" translatable="yes" appearance="destructive">_Discard</response> <response id="save" translatable="yes" appearance="suggested" enabled="false">_Save</response> </responses> </object>
Accessibility ¶
AdwMessageDialog uses the GTK_ACCESSIBLE_ROLE_DIALOG role.
func NewMessageDialog ¶
func NewMessageDialog(parent *gtk.Window, heading, body string) *MessageDialog
NewMessageDialog creates a new AdwMessageDialog.
heading and body can be set to NULL. This can be useful if they need to be formatted or use markup. In that case, set them to NULL and call messagedialog.FormatBody or similar methods afterwards:
GtkWidget *dialog; dialog = adw_message_dialog_new (parent, _("Replace File?"), NULL); adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog), _("A file named “s” already exists. Do you want to replace it?"), filename);.
The function takes the following parameters:
- parent (optional): transient parent.
- heading (optional): heading.
- body (optional) text.
The function returns the following values:
- messageDialog: newly created AdwMessageDialog.
func (*MessageDialog) AddResponse ¶
func (self *MessageDialog) AddResponse(id, label string)
AddResponse adds a response with id and label to self.
Responses are represented as buttons in the dialog.
Response ID must be unique. It will be used in messagedialog::response to tell which response had been activated, as well as to inspect and modify the response later.
An embedded underline in label indicates a mnemonic.
messagedialog.SetResponseLabel can be used to change the response label after it had been added.
messagedialog.SetResponseEnabled and messagedialog.SetResponseAppearance can be used to customize the responses further.
The function takes the following parameters:
- id: response ID.
- label: response label.
func (*MessageDialog) Body ¶
func (self *MessageDialog) Body() string
Body gets the body text of self.
The function returns the following values:
- utf8: body of self.
func (*MessageDialog) BodyUseMarkup ¶
func (self *MessageDialog) BodyUseMarkup() bool
BodyUseMarkup gets whether the body text of self includes Pango markup.
The function returns the following values:
- ok: whether self uses markup for body text.
func (*MessageDialog) ChooseFinish ¶
func (self *MessageDialog) ChooseFinish(result gio.AsyncResulter) string
ChooseFinish finishes the messagedialog.Choose call and returns the response ID.
The function takes the following parameters:
- result: GAsyncResult.
The function returns the following values:
- utf8: ID of the response that was selected, or messagedialog:close-response if the call was cancelled.
func (*MessageDialog) CloseResponse ¶
func (self *MessageDialog) CloseResponse() string
CloseResponse gets the ID of the close response of self.
The function returns the following values:
- utf8: close response ID.
func (*MessageDialog) ConnectResponse ¶
func (self *MessageDialog) ConnectResponse(f func(response string)) coreglib.SignalHandle
ConnectResponse: this signal is emitted when the dialog is closed.
response will be set to the response ID of the button that had been activated.
if the dialog was closed by pressing <kbd>Escape</kbd> or with a system action, response will be set to the value of messagedialog:close-response.
func (*MessageDialog) DefaultResponse ¶
func (self *MessageDialog) DefaultResponse() string
DefaultResponse gets the ID of the default response of self.
The function returns the following values:
- utf8 (optional): default response ID.
func (*MessageDialog) ExtraChild ¶
func (self *MessageDialog) ExtraChild() gtk.Widgetter
ExtraChild gets the child widget of self.
The function returns the following values:
- widget (optional): child widget of self.
func (*MessageDialog) HasResponse ¶
func (self *MessageDialog) HasResponse(response string) bool
HasResponse gets whether self has a response with the ID response.
The function takes the following parameters:
- response ID.
The function returns the following values:
- ok: whether self has a response with the ID response.
func (*MessageDialog) Heading ¶
func (self *MessageDialog) Heading() string
Heading gets the heading of self.
The function returns the following values:
- utf8 (optional): heading of self.
func (*MessageDialog) HeadingUseMarkup ¶
func (self *MessageDialog) HeadingUseMarkup() bool
HeadingUseMarkup gets whether the heading of self includes Pango markup.
The function returns the following values:
- ok: whether self uses markup for heading.
func (*MessageDialog) RemoveResponse ¶
func (self *MessageDialog) RemoveResponse(id string)
RemoveResponse removes a response from self.
The function takes the following parameters:
- id: response ID.
func (*MessageDialog) Response ¶
func (self *MessageDialog) Response(response string)
Response emits the messagedialog::response signal with the given response ID.
Used to indicate that the user has responded to the dialog in some way.
The function takes the following parameters:
- response ID.
func (*MessageDialog) ResponseAppearance ¶
func (self *MessageDialog) ResponseAppearance(response string) ResponseAppearance
ResponseAppearance gets the appearance of response.
See messagedialog.SetResponseAppearance.
The function takes the following parameters:
- response ID.
The function returns the following values:
- responseAppearance: appearance of response.
func (*MessageDialog) ResponseEnabled ¶
func (self *MessageDialog) ResponseEnabled(response string) bool
ResponseEnabled gets whether response is enabled.
See messagedialog.SetResponseEnabled.
The function takes the following parameters:
- response ID.
The function returns the following values:
- ok: whether response is enabled.
func (*MessageDialog) ResponseLabel ¶
func (self *MessageDialog) ResponseLabel(response string) string
ResponseLabel gets the label of response.
See messagedialog.SetResponseLabel.
The function takes the following parameters:
- response ID.
The function returns the following values:
- utf8: label of response.
func (*MessageDialog) SetBody ¶
func (self *MessageDialog) SetBody(body string)
SetBody sets the body text of self.
The function takes the following parameters:
- body of self.
func (*MessageDialog) SetBodyUseMarkup ¶
func (self *MessageDialog) SetBodyUseMarkup(useMarkup bool)
SetBodyUseMarkup sets whether the body text of self includes Pango markup.
See pango.ParseMarkup().
The function takes the following parameters:
- useMarkup: whether to use markup for body text.
func (*MessageDialog) SetCloseResponse ¶
func (self *MessageDialog) SetCloseResponse(response string)
SetCloseResponse sets the ID of the close response of self.
It will be passed to messagedialog::response if the window is closed by pressing <kbd>Escape</kbd> or with a system action.
It doesn't have to correspond to any of the responses in the dialog.
The default close response is close.
The function takes the following parameters:
- response: close response ID.
func (*MessageDialog) SetDefaultResponse ¶
func (self *MessageDialog) SetDefaultResponse(response string)
SetDefaultResponse sets the ID of the default response of self.
If set, pressing <kbd>Enter</kbd> will activate the corresponding button.
If set to NULL or to a non-existent response ID, pressing <kbd>Enter</kbd> will do nothing.
The function takes the following parameters:
- response (optional): default response ID.
func (*MessageDialog) SetExtraChild ¶
func (self *MessageDialog) SetExtraChild(child gtk.Widgetter)
SetExtraChild sets the child widget of self.
The child widget is displayed below the heading and body.
The function takes the following parameters:
- child (optional) widget.
func (*MessageDialog) SetHeading ¶
func (self *MessageDialog) SetHeading(heading string)
SetHeading sets the heading of self.
The function takes the following parameters:
- heading (optional) of self.
func (*MessageDialog) SetHeadingUseMarkup ¶
func (self *MessageDialog) SetHeadingUseMarkup(useMarkup bool)
SetHeadingUseMarkup sets whether the heading of self includes Pango markup.
See pango.ParseMarkup().
The function takes the following parameters:
- useMarkup: whether to use markup for heading.
func (*MessageDialog) SetResponseAppearance ¶
func (self *MessageDialog) SetResponseAppearance(response string, appearance ResponseAppearance)
SetResponseAppearance sets the appearance for response.
<picture> <source srcset="message-dialog-appearance-dark.png" media="(prefers-color-scheme: dark)"> <img src="message-dialog-appearance.png" alt="message-dialog-appearance"> </picture>
Use ADW_RESPONSE_SUGGESTED to mark important responses such as the affirmative action, like the Save button in the example.
Use ADW_RESPONSE_DESTRUCTIVE to draw attention to the potentially damaging consequences of using response. This appearance acts as a warning to the user. The Discard button in the example is using this appearance.
The default appearance is ADW_RESPONSE_DEFAULT.
Negative responses like Cancel or Close should use the default appearance.
The function takes the following parameters:
- response ID.
- appearance for response.
func (*MessageDialog) SetResponseEnabled ¶
func (self *MessageDialog) SetResponseEnabled(response string, enabled bool)
SetResponseEnabled sets whether response is enabled.
If response is not enabled, the corresponding button will have gtk.Widget:sensitive set to FALSE and it can't be activated as a default response.
response can still be used as messagedialog:close-response while it's not enabled.
Responses are enabled by default.
The function takes the following parameters:
- response ID.
- enabled: whether to enable response.
func (*MessageDialog) SetResponseLabel ¶
func (self *MessageDialog) SetResponseLabel(response, label string)
SetResponseLabel sets the label of response to label.
Labels are displayed on the dialog buttons. An embedded underline in label indicates a mnemonic.
The function takes the following parameters:
- response ID.
- label of response.
type MessageDialogClass ¶
type MessageDialogClass struct {
// contains filtered or unexported fields
}
MessageDialogClass: instance of this type is always passed by reference.
func (*MessageDialogClass) ParentClass ¶
func (m *MessageDialogClass) ParentClass() *gtk.WindowClass
type MessageDialogOverrides ¶
type MessageDialogOverrides struct { // Response emits the messagedialog::response signal with the given response // ID. // // Used to indicate that the user has responded to the dialog in some way. // // The function takes the following parameters: // // - response ID. Response func(response string) }
MessageDialogOverrides contains methods that are overridable.
type NavigationDirection ¶
NavigationDirection describes the direction of a swipe navigation gesture.
const ( // orientation and text direction. NavigationDirectionBack NavigationDirection = iota // orientation and text direction. NavigationDirectionForward )
func (NavigationDirection) String ¶
func (n NavigationDirection) String() string
String returns the name in string for NavigationDirection.
type NavigationPage ¶
type NavigationPage struct { // contains filtered or unexported fields }
NavigationPage: page within navigationview or navigationsplitview.
Each page has a child widget, a title and optionally a tag.
The navigationpage::showing, navigationpage::shown, navigationpage::hiding and navigationpage::hidden signals can be used to track the page's visibility within its AdwNavigationView.
Header Bar Integration ¶
When placed inside AdwNavigationPage, headerbar will display the page title instead of window title.
When used together with navigationview, it will also display a back button that can be used to go back to the previous page. Set headerbar:show-back-button to FALSE to disable that behavior if it's unwanted.
CSS Nodes ¶
AdwNavigationPage has a single CSS node with name navigation-view-page.
Accessibility ¶
AdwNavigationPage uses the GTK_ACCESSIBLE_ROLE_GROUP role.
func NewNavigationPage ¶
func NewNavigationPage(child gtk.Widgetter, title string) *NavigationPage
NewNavigationPage creates a new AdwNavigationPage.
The function takes the following parameters:
- child widget.
- title: page title.
The function returns the following values:
- navigationPage: new created AdwNavigationPage.
func NewNavigationPageWithTag ¶
func NewNavigationPageWithTag(child gtk.Widgetter, title, tag string) *NavigationPage
NewNavigationPageWithTag creates a new AdwNavigationPage with provided tag.
The function takes the following parameters:
- child widget.
- title: page title.
- tag: page tag.
The function returns the following values:
- navigationPage: new created AdwNavigationPage.
func (*NavigationPage) CanPop ¶
func (self *NavigationPage) CanPop() bool
CanPop gets whether self can be popped from navigation stack.
The function returns the following values:
- ok: whether the page can be popped from navigation stack.
func (*NavigationPage) Child ¶
func (self *NavigationPage) Child() gtk.Widgetter
Child gets the child widget of self.
The function returns the following values:
- widget (optional): child widget of self.
func (*NavigationPage) ConnectHidden ¶
func (self *NavigationPage) ConnectHidden(f func()) coreglib.SignalHandle
ConnectHidden is emitted when the navigation view transition has been completed and the page is fully hidden.
It will always be preceded by navigationpage::hiding or navigationpage::showing.
func (*NavigationPage) ConnectHiding ¶
func (self *NavigationPage) ConnectHiding(f func()) coreglib.SignalHandle
ConnectHiding is emitted when the page starts hiding at the beginning of the navigation view transition.
It will always be followed by navigationpage::hidden or navigationpage::shown.
func (*NavigationPage) ConnectShowing ¶
func (self *NavigationPage) ConnectShowing(f func()) coreglib.SignalHandle
ConnectShowing is emitted when the page shows at the beginning of the navigation view transition.
It will always be followed by navigationpage::shown or navigationpage::hidden.
func (*NavigationPage) ConnectShown ¶
func (self *NavigationPage) ConnectShown(f func()) coreglib.SignalHandle
ConnectShown is emitted when the navigation view transition has been completed and the page is fully shown.
It will always be preceded by navigationpage::showing or navigationpage::hiding.
func (*NavigationPage) SetCanPop ¶
func (self *NavigationPage) SetCanPop(canPop bool)
SetCanPop sets whether self can be popped from navigation stack.
Set it to FALSE to disable shortcuts and gestures, as well as remove the back button from headerbar.
Manually calling navigationview.Pop or using the navigation.pop action will still work.
See headerbar:show-back-button for removing only the back button, but not shortcuts.
The function takes the following parameters:
- canPop: whether the page can be popped from navigation stack.
func (*NavigationPage) SetChild ¶
func (self *NavigationPage) SetChild(child gtk.Widgetter)
SetChild sets the child widget of self.
The function takes the following parameters:
- child (optional) widget.
func (*NavigationPage) SetTag ¶
func (self *NavigationPage) SetTag(tag string)
SetTag sets the tag for self.
The tag can be used to retrieve the page with navigationview.FindPage, as well as with navigationview.PushByTag, navigationview.PopToTag or navigationview.ReplaceWithTags.
Tags must be unique within each navigationview.
The tag also must be set to use the navigation.push action.
The function takes the following parameters:
- tag (optional): page tag.
func (*NavigationPage) SetTitle ¶
func (self *NavigationPage) SetTitle(title string)
SetTitle sets the title of self.
It's displayed in headerbar instead of the window title, and used as the tooltip on the next page's back button, as well as by screen reader.
The function takes the following parameters:
- title: title.
func (*NavigationPage) Tag ¶
func (self *NavigationPage) Tag() string
Tag gets the tag of self.
The function returns the following values:
- utf8 (optional): page tag.
func (*NavigationPage) Title ¶
func (self *NavigationPage) Title() string
Title gets the title of self.
The function returns the following values:
- utf8: title of self.
type NavigationPageClass ¶
type NavigationPageClass struct {
// contains filtered or unexported fields
}
NavigationPageClass: instance of this type is always passed by reference.
func (*NavigationPageClass) ParentClass ¶
func (n *NavigationPageClass) ParentClass() *gtk.WidgetClass
type NavigationPageOverrides ¶
type NavigationPageOverrides struct { // the page is fully hidden. Hidden func() // navigation view transition. Hiding func() // view transition. Showing func() // the page is fully shown. Shown func() }
NavigationPageOverrides contains methods that are overridable.
type NavigationSplitView ¶
type NavigationSplitView struct { // contains filtered or unexported fields }
NavigationSplitView: widget presenting sidebar and content side by side or as a navigation view.
<picture> <source srcset="navigation-split-view-dark.png" media="(prefers-color-scheme: dark)"> <img src="navigation-split-view.png" alt="navigation-split-view"> </picture> <picture> <source srcset="navigation-split-view-collapsed-dark.png" media="(prefers-color-scheme: dark)"> <img src="navigation-split-view-collapsed.png" alt="navigation-split-view-collapsed"> </picture>
AdwNavigationSplitView has two navigationpage children: sidebar and content, and displays them side by side.
When navigationsplitview:collapsed is set to TRUE, it instead puts both children inside an navigationview. The navigationsplitview:show-content controls which child is visible while collapsed.
See also overlaysplitview.
AdwNavigationSplitView is typically used together with an breakpoint setting the collapsed property to TRUE on small widths, as follows:
<object class="AdwWindow"> <property name="width-request">280</property> <property name="height-request">200</property> <property name="default-width">800</property> <property name="default-height">800</property> <child> <object class="AdwBreakpoint"> <condition>max-width: 400sp</condition> <setter object="split_view" property="collapsed">True</setter> </object> </child> <property name="content"> <object class="AdwNavigationSplitView" id="split_view"> <property name="sidebar"> <object class="AdwNavigationPage"> <property name="title" translatable="yes">Sidebar</property> <property name="child"> <!-- ... --> </property> </object> </property> <property name="content"> <object class="AdwNavigationPage"> <property name="title" translatable="yes">Content</property> <property name="child"> <!-- ... --> </property> </object> </property> </object> </property> </object>
Sizing ¶
When not collapsed, AdwNavigationSplitView changes the sidebar width depending on its own width.
If possible, it tries to allocate a fraction of the total width, controlled with the navigationsplitview:sidebar-width-fraction property.
The sidebar also has minimum and maximum sizes, controlled with the navigationsplitview:min-sidebar-width and navigationsplitview:max-sidebar-width properties.
The minimum and maximum sizes are using the length unit specified with the navigationsplitview:sidebar-width-unit.
By default, sidebar is using 25% of the total width, with 180sp as the minimum size and 280sp as the maximum size.
Header Bar Integration ¶
When used inside AdwNavigationSplitView, headerbar will automatically hide the window buttons in the middle.
When collapsed, it also displays a back button for the content widget, as well as the page titles. See navigationview documentation for details.
Actions ¶
AdwNavigationSplitView defines the same actions as AdwNavigationView, but they can be used even when the split view is not collapsed:
- navigation.push takes a string parameter specifying the tag of the page to push. If it matches the tag of the content widget, it sets navigationsplitview:show-content to TRUE.
- navigation.pop doesn't take any parameters and sets navigationsplitview:show-content to FALSE.
AdwNavigationSplitView as GtkBuildable ¶
The AdwNavigationSplitView implementation of the gtk.Buildable interface supports setting the sidebar widget by specifying “sidebar” as the “type” attribute of a <child> element, Specifying “content” child type or omitting it results in setting the content widget.
CSS nodes ¶
AdwNavigationSplitView has a single CSS node with the name navigation-split-view.
When collapsed, it contains a child node with the name navigation-view containing both children.
navigation-split-view ╰── navigation-view ├── [sidebar child] ╰── [content child]
When not collapsed, it contains two nodes with the name widget, one with the .sidebar-pane style class, the other one with .content-view style class, containing the sidebar and content children respectively.
navigation-split-view ├── widget.sidebar-pane │ ╰── [sidebar child] ╰── widget.content-pane ╰── [content child]
Accessibility ¶
AdwNavigationSplitView uses the GTK_ACCESSIBLE_ROLE_GROUP role.
func NewNavigationSplitView ¶
func NewNavigationSplitView() *NavigationSplitView
NewNavigationSplitView creates a new AdwNavigationSplitView.
The function returns the following values:
- navigationSplitView: newly created AdwNavigationSplitView.
func (*NavigationSplitView) Collapsed ¶
func (self *NavigationSplitView) Collapsed() bool
Collapsed gets whether self is collapsed.
The function returns the following values:
- ok: whether self is collapsed.
func (*NavigationSplitView) Content ¶
func (self *NavigationSplitView) Content() *NavigationPage
Content sets the content widget for self.
The function returns the following values:
- navigationPage (optional): content widget.
func (*NavigationSplitView) MaxSidebarWidth ¶
func (self *NavigationSplitView) MaxSidebarWidth() float64
MaxSidebarWidth gets the maximum sidebar width for self.
The function returns the following values:
- gdouble: maximum width.
func (*NavigationSplitView) MinSidebarWidth ¶
func (self *NavigationSplitView) MinSidebarWidth() float64
MinSidebarWidth gets the minimum sidebar width for self.
The function returns the following values:
- gdouble: minimum width.
func (*NavigationSplitView) SetCollapsed ¶
func (self *NavigationSplitView) SetCollapsed(collapsed bool)
SetCollapsed sets whether self is collapsed.
When collapsed, the children are put inside an navigationview, otherwise they are displayed side by side.
The navigationsplitview:show-content controls which child is visible while collapsed.
The function takes the following parameters:
- collapsed: whether self is collapsed.
func (*NavigationSplitView) SetContent ¶
func (self *NavigationSplitView) SetContent(content *NavigationPage)
SetContent sets the content widget for self.
The function takes the following parameters:
- content (optional) widget.
func (*NavigationSplitView) SetMaxSidebarWidth ¶
func (self *NavigationSplitView) SetMaxSidebarWidth(width float64)
SetMaxSidebarWidth sets the maximum sidebar width for self.
Maximum width is affected by navigationsplitview:sidebar-width-unit.
The sidebar widget can still be allocated with larger width if its own minimum width exceeds it.
The function takes the following parameters:
- width: maximum width.
func (*NavigationSplitView) SetMinSidebarWidth ¶
func (self *NavigationSplitView) SetMinSidebarWidth(width float64)
SetMinSidebarWidth sets the minimum sidebar width for self.
Minimum width is affected by navigationsplitview:sidebar-width-unit.
The sidebar widget can still be allocated with larger width if its own minimum width exceeds it.
The function takes the following parameters:
- width: minimum width.
func (*NavigationSplitView) SetShowContent ¶
func (self *NavigationSplitView) SetShowContent(showContent bool)
SetShowContent sets which page is visible when self is collapsed.
If set to TRUE, the content widget will be the visible page when navigationsplitview:collapsed is TRUE; otherwise the sidebar widget will be visible.
If the split view is already collapsed, the visible page changes immediately.
The function takes the following parameters:
- showContent: whether to show content when collapsed.
func (*NavigationSplitView) SetSidebar ¶
func (self *NavigationSplitView) SetSidebar(sidebar *NavigationPage)
SetSidebar sets the sidebar widget for self.
The function takes the following parameters:
- sidebar (optional) widget.
func (*NavigationSplitView) SetSidebarWidthFraction ¶
func (self *NavigationSplitView) SetSidebarWidthFraction(fraction float64)
SetSidebarWidthFraction sets the preferred sidebar width as a fraction of the total width of self.
The preferred width is additionally limited by navigationsplitview:min-sidebar-width and navigationsplitview:max-sidebar-width.
The sidebar widget can be allocated with larger width if its own minimum width exceeds the preferred width.
The function takes the following parameters:
- fraction: preferred width fraction.
func (*NavigationSplitView) SetSidebarWidthUnit ¶
func (self *NavigationSplitView) SetSidebarWidthUnit(unit LengthUnit)
SetSidebarWidthUnit sets the length unit for minimum and maximum sidebar widths.
See navigationsplitview:min-sidebar-width and navigationsplitview:max-sidebar-width.
The function takes the following parameters:
- unit: length unit.
func (*NavigationSplitView) ShowContent ¶
func (self *NavigationSplitView) ShowContent() bool
ShowContent gets which page is visible when self is collapsed.
The function returns the following values:
- ok: whether to show content when collapsed.
func (*NavigationSplitView) Sidebar ¶
func (self *NavigationSplitView) Sidebar() *NavigationPage
Sidebar gets the sidebar widget for self.
The function returns the following values:
- navigationPage (optional): sidebar widget.
func (*NavigationSplitView) SidebarWidthFraction ¶
func (self *NavigationSplitView) SidebarWidthFraction() float64
SidebarWidthFraction gets the preferred sidebar width fraction for self.
The function returns the following values:
- gdouble: preferred width fraction.
func (*NavigationSplitView) SidebarWidthUnit ¶
func (self *NavigationSplitView) SidebarWidthUnit() LengthUnit
SidebarWidthUnit gets the length unit for minimum and maximum sidebar widths.
The function returns the following values:
- lengthUnit: length unit.
type NavigationSplitViewClass ¶
type NavigationSplitViewClass struct {
// contains filtered or unexported fields
}
NavigationSplitViewClass: instance of this type is always passed by reference.
func (*NavigationSplitViewClass) ParentClass ¶
func (n *NavigationSplitViewClass) ParentClass() *gtk.WidgetClass
type NavigationSplitViewOverrides ¶
type NavigationSplitViewOverrides struct { }
NavigationSplitViewOverrides contains methods that are overridable.
type NavigationView ¶
type NavigationView struct { // contains filtered or unexported fields }
NavigationView: page-based navigation container.
<picture> <source srcset="navigation-view-dark.png" media="(prefers-color-scheme: dark)"> <img src="navigation-view.png" alt="navigation-view"> </picture>
AdwNavigationView presents one child at a time, similar to gtk.Stack.
AdwNavigationView can only contain navigationpage children.
It maintains a navigation stack that can be controlled with navigationview.Push and navigationview.Pop. The whole navigation stack can also be replaced using navigationview.Replace.
AdwNavigationView allows to manage pages statically or dynamically.
Static pages can be added using the navigationview.Add method. The AdwNavigationView will keep a reference to these pages, but they aren't accessible to the user until navigationview.Push is called (except for the first page, which is pushed automatically). Use the navigationview.Remove method to remove them. This is useful for applications that have a small number of unique pages and just need navigation between them.
Dynamic pages are automatically destroyed once they are popped off the navigation stack. To add a page like this, push it using the navigationview.Push method without calling navigationview.Add first.
Tags ¶
Static pages, as well as any pages in the navigation stack, can be accessed by their navigationpage:tag. For example, navigationview.PushByTag can be used to push a static page that's not in the navigation stack without having to keep a reference to it manually.
Header Bar Integration ¶
When used inside AdwNavigationView, headerbar will automatically display a back button that can be used to go back to the previous page when possible. The button also has a context menu, allowing to pop multiple pages at once, potentially across multiple navigation views.
Set headerbar:show-back-button to FALSE to disable this behavior in rare scenarios where it's unwanted.
AdwHeaderBar will also display the title of the AdwNavigationPage it's placed into, so most applications shouldn't need to customize it at all.
Shortcuts and Gestures ¶
AdwNavigationView supports the following shortcuts for going to the previous page:
- <kbd>Escape</kbd> (unless navigationview:pop-on-escape is set to FALSE)
- <kbd>Alt</kbd>+<kbd>←</kbd>
- Back mouse button
Additionally, it supports interactive gestures:
- One-finger swipe towards the right on touchscreens
- Scrolling towards the right on touchpads (usually two-finger swipe)
These gestures have transitions enabled regardless of the navigationview:animate-transitions value.
Applications can also enable shortcuts for pushing another page onto the navigation stack via connecting to the navigationview::get-next-page signal, in that case the following shortcuts are supported:
- <kbd>Alt</kbd>+<kbd>→</kbd>
- Forward mouse button
- Swipe/scrolling towards the left
For right-to-left locales, the gestures and shortcuts are reversed.
navigationpage:can-pop can be used to disable them, along with the header bar back buttons.
Actions ¶
AdwNavigationView defines actions for controlling the navigation stack. actions for controlling the navigation stack:
- navigation.push takes a string parameter specifying the tag of the page to push, and is equivalent to calling navigationview.PushByTag.
- navigation.pop doesn't take any parameters and pops the current page from the navigation stack, equivalent to calling navigationview.Pop.
AdwNavigationView as GtkBuildable ¶
AdwNavigationView allows to add pages as children, equivalent to using the navigationview.Add method.
Example of an AdwNavigationView UI definition:
<object class="AdwNavigationView"> <child> <object class="AdwNavigationPage"> <property name="title" translatable="yes">Page 1</property> <property name="child"> <object class="AdwToolbarView"> <child type="top"> <object class="AdwHeaderBar"/> </child> <property name="content"> <object class="GtkButton"> <property name="label" translatable="yes">Open Page 2</property> <property name="halign">center</property> <property name="valign">center</property> <property name="action-name">navigation.push</property> <property name="action-target">'page-2'</property> <style> <class name="pill"/> </style> </object> </property> </object> </property> </object> </child> <child> <object class="AdwNavigationPage"> <property name="title" translatable="yes">Page 2</property> <property name="tag">page-2</property> <property name="child"> <object class="AdwToolbarView"> <child type="top"> <object class="AdwHeaderBar"/> </child> <property name="content"> <!-- ... --> </property> </object> </property> </object> </child> </object>
<picture> <source srcset="navigation-view-example-dark.png" media="(prefers-color-scheme: dark)"> <img src="navigation-view-example.png" alt="navigation-view-example"> </picture>
CSS nodes ¶
AdwNavigationView has a single CSS node with the name navigation-view.
Accessibility ¶
AdwNavigationView uses the GTK_ACCESSIBLE_ROLE_GROUP role.
func NewNavigationView ¶
func NewNavigationView() *NavigationView
NewNavigationView creates a new AdwNavigationView.
The function returns the following values:
- navigationView: new created AdwNavigationView.
func (*NavigationView) Add ¶
func (self *NavigationView) Add(page *NavigationPage)
Add: permanently adds page to self.
Any page that has been added will stay in self even after being popped from the navigation stack.
Adding a page while no page is visible will automatically push it to the navigation stack.
See navigationview.Remove.
The function takes the following parameters:
- page to add.
func (*NavigationView) AnimateTransitions ¶
func (self *NavigationView) AnimateTransitions() bool
AnimateTransitions gets whether self animates page transitions.
The function returns the following values:
- ok: whether to animate page transitions.
func (*NavigationView) ConnectGetNextPage ¶
func (self *NavigationView) ConnectGetNextPage(f func() (navigationPage *NavigationPage)) coreglib.SignalHandle
ConnectGetNextPage is emitted when a push shortcut or a gesture is triggered.
To support the push shortcuts and gestures, the application is expected to return the page to push in the handler.
This signal can be emitted multiple times for the gestures, for example when the gesture is cancelled by the user. As such, the application must not make any irreversible changes in the handler, such as removing the page from a forward stack.
Instead, it should be done in the navigationview::pushed handler.
func (*NavigationView) ConnectPopped ¶
func (self *NavigationView) ConnectPopped(f func(page *NavigationPage)) coreglib.SignalHandle
ConnectPopped is emitted after page has been popped from the navigation stack.
See navigationview.Pop.
When using navigationview.PopToPage or navigationview.PopToTag, this signal is emitted for each of the popped pages.
func (*NavigationView) ConnectPushed ¶
func (self *NavigationView) ConnectPushed(f func()) coreglib.SignalHandle
ConnectPushed is emitted after a page has been pushed to the navigation stack.
See navigationview.Push.
func (*NavigationView) ConnectReplaced ¶
func (self *NavigationView) ConnectReplaced(f func()) coreglib.SignalHandle
ConnectReplaced is emitted after the navigation stack has been replaced.
See navigationview.Replace.
func (*NavigationView) FindPage ¶
func (self *NavigationView) FindPage(tag string) *NavigationPage
FindPage finds a page in self by its tag.
See navigationpage:tag.
The function takes the following parameters:
- tag: page tag.
The function returns the following values:
- navigationPage (optional): page with the given tag.
func (*NavigationView) NavigationStack ¶
func (self *NavigationView) NavigationStack() *gio.ListModel
NavigationStack returns a gio.ListModel that contains the pages in navigation stack.
The pages are sorted from root page to visible page.
This can be used to keep an up-to-date view.
The function returns the following values:
- listModel: list model for the navigation stack.
func (*NavigationView) Pop ¶
func (self *NavigationView) Pop() bool
Pop pops the visible page from the navigation stack.
Does nothing if the navigation stack contains less than two pages.
If navigationview.Add hasn't been called, the page is automatically removed.
navigationview::popped will be emitted for the current visible page.
See navigationview.PopToPage and navigationview.PopToTag.
The function returns the following values:
- ok: TRUE if a page has been popped.
func (*NavigationView) PopOnEscape ¶
func (self *NavigationView) PopOnEscape() bool
PopOnEscape gets whether pressing Escape pops the current page on self.
The function returns the following values:
- ok: whether to pop the current page.
func (*NavigationView) PopToPage ¶
func (self *NavigationView) PopToPage(page *NavigationPage) bool
PopToPage pops pages from the navigation stack until page is visible.
page must be in the navigation stack.
If navigationview.Add hasn't been called for any of the popped pages, they are automatically removed.
navigationview::popped will be be emitted for each of the popped pages.
See navigationview.Pop and navigationview.PopToTag.
The function takes the following parameters:
- page to pop to.
The function returns the following values:
- ok: TRUE if any pages have been popped.
func (*NavigationView) PopToTag ¶
func (self *NavigationView) PopToTag(tag string) bool
PopToTag pops pages from the navigation stack until page with the tag tag is visible.
The page must be in the navigation stack.
If navigationview.Add hasn't been called for any of the popped pages, they are automatically removed.
navigationview::popped will be emitted for each of the popped pages.
See navigationview.PopToPage and navigationpage:tag.
The function takes the following parameters:
- tag: page tag.
The function returns the following values:
- ok: TRUE if any pages have been popped.
func (*NavigationView) PreviousPage ¶
func (self *NavigationView) PreviousPage(page *NavigationPage) *NavigationPage
PreviousPage gets the previous page for page.
If page is in the navigation stack, returns the page popping page will reveal.
If page is the root page or is not in the navigation stack, returns NULL.
The function takes the following parameters:
- page in self.
The function returns the following values:
- navigationPage (optional) previous page.
func (*NavigationView) Push ¶
func (self *NavigationView) Push(page *NavigationPage)
Push pushes page onto the navigation stack.
If navigationview.Add hasn't been called, the page is automatically removed once it's popped.
navigationview::pushed will be emitted for page.
See navigationview.PushByTag.
The function takes the following parameters:
- page to push.
func (*NavigationView) PushByTag ¶
func (self *NavigationView) PushByTag(tag string)
PushByTag pushes the page with the tag tag onto the navigation stack.
If navigationview.Add hasn't been called, the page is automatically removed once it's popped.
navigationview::pushed will be emitted for the page.
See navigationview.Push and navigationpage:tag.
The function takes the following parameters:
- tag: page tag.
func (*NavigationView) Remove ¶
func (self *NavigationView) Remove(page *NavigationPage)
Remove removes page from self.
If page is currently in the navigation stack, it will be removed once it's popped. Otherwise, it's removed immediately.
See navigationview.Add.
The function takes the following parameters:
- page to remove.
func (*NavigationView) Replace ¶
func (self *NavigationView) Replace(pages []*NavigationPage)
Replace replaces the current navigation stack with pages.
The last page becomes the visible page.
Replacing the navigation stack has no animation.
If navigationview.Add hasn't been called for any pages that are no longer in the navigation stack, they are automatically removed.
n_pages can be 0, in that case no page will be visible after calling this method. This can be useful for removing all pages from self.
The navigationview::replaced signal will be emitted.
See navigationview.ReplaceWithTags.
The function takes the following parameters:
- pages: new navigation stack.
func (*NavigationView) ReplaceWithTags ¶
func (self *NavigationView) ReplaceWithTags(tags []string)
ReplaceWithTags replaces the current navigation stack with pages with the tags tags.
The last page becomes the visible page.
Replacing the navigation stack has no animation.
If navigationview.Add hasn't been called for any pages that are no longer in the navigation stack, they are automatically removed.
n_tags can be 0, in that case no page will be visible after calling this method. This can be useful for removing all pages from self.
The navigationview::replaced signal will be emitted.
See navigationview.Replace and navigationpage:tag.
The function takes the following parameters:
- tags of the pages in the navigation stack.
func (*NavigationView) SetAnimateTransitions ¶
func (self *NavigationView) SetAnimateTransitions(animateTransitions bool)
SetAnimateTransitions sets whether self should animate page transitions.
Gesture-based transitions are always animated.
The function takes the following parameters:
- animateTransitions: whether to animate page transitions.
func (*NavigationView) SetPopOnEscape ¶
func (self *NavigationView) SetPopOnEscape(popOnEscape bool)
SetPopOnEscape sets whether pressing Escape pops the current page on self.
Applications using AdwNavigationView to implement a browser may want to disable it.
The function takes the following parameters:
- popOnEscape: whether to pop the current page when pressing Escape.
func (*NavigationView) VisiblePage ¶
func (self *NavigationView) VisiblePage() *NavigationPage
VisiblePage gets the currently visible page in self.
The function returns the following values:
- navigationPage (optional): currently visible page.
type NavigationViewClass ¶
type NavigationViewClass struct {
// contains filtered or unexported fields
}
NavigationViewClass: instance of this type is always passed by reference.
func (*NavigationViewClass) ParentClass ¶
func (n *NavigationViewClass) ParentClass() *gtk.WidgetClass
type NavigationViewOverrides ¶
type NavigationViewOverrides struct { }
NavigationViewOverrides contains methods that are overridable.
type OverlaySplitView ¶
type OverlaySplitView struct { gtk.Widget *coreglib.Object Swipeable // contains filtered or unexported fields }
OverlaySplitView: widget presenting sidebar and content side by side or as an overlay.
<picture> <source srcset="overlay-split-view-dark.png" media="(prefers-color-scheme: dark)"> <img src="overlay-split-view.png" alt="overlay-split-view"> </picture> <picture> <source srcset="overlay-split-view-collapsed-dark.png" media="(prefers-color-scheme: dark)"> <img src="overlay-split-view-collapsed.png" alt="overlay-split-view-collapsed"> </picture>
AdwOverlaySplitView has two children: sidebar and content, and displays them side by side.
When overlaysplitview:collapsed is set to TRUE, the sidebar is instead shown as an overlay above the content widget.
The sidebar can be hidden or shown using the overlaysplitview:show-sidebar property.
Sidebar can be displayed before or after the content, this can be controlled with the overlaysplitview:sidebar-position property.
Collapsing the split view automatically hides the sidebar widget, and uncollapsing it shows the sidebar. If this behavior is not desired, the overlaysplitview:pin-sidebar property can be used to override it.
AdwOverlaySplitView supports an edge swipe gesture for showing the sidebar, and a swipe from the sidebar for hiding it. Gestures are only supported on touchscreen, but not touchpad. Gestures can be controlled with the overlaysplitview:enable-show-gesture and overlaysplitview:enable-hide-gesture properties.
See also navigationsplitview.
AdwOverlaySplitView is typically used together with an breakpoint setting the collapsed property to TRUE on small widths, as follows:
<object class="AdwWindow"> <property name="width-request">360</property> <property name="height-request">200</property> <property name="default-width">800</property> <property name="default-height">800</property> <child> <object class="AdwBreakpoint"> <condition>max-width: 400sp</condition> <setter object="split_view" property="collapsed">True</setter> </object> </child> <property name="content"> <object class="AdwOverlaySplitView" id="split_view"> <property name="sidebar"> <!-- ... --> </property> <property name="content"> <!-- ... --> </property> </object> </property> </object>
AdwOverlaySplitView is often used for implementing the utility pane (https://developer.gnome.org/hig/patterns/containers/utility-panes.html) pattern.
Sizing ¶
When not collapsed, AdwOverlaySplitView changes the sidebar width depending on its own width.
If possible, it tries to allocate a fraction of the total width, controlled with the overlaysplitview:sidebar-width-fraction property.
The sidebar also has minimum and maximum sizes, controlled with the overlaysplitview:min-sidebar-width and overlaysplitview:max-sidebar-width properties.
The minimum and maximum sizes are using the length unit specified with the overlaysplitview:sidebar-width-unit.
By default, sidebar is using 25% of the total width, with 180sp as the minimum size and 280sp as the maximum size.
When collapsed, the preferred width fraction is ignored and the sidebar uses overlaysplitview:max-sidebar-width when possible.
Header Bar Integration ¶
When used inside AdwOverlaySplitView, headerbar will automatically hide the window buttons in the middle.
AdwOverlaySplitView as GtkBuildable ¶
The AdwOverlaySplitView implementation of the gtk.Buildable interface supports setting the sidebar widget by specifying “sidebar” as the “type” attribute of a <child> element, Specifying “content” child type or omitting it results in setting the content widget.
CSS nodes ¶
AdwOverlaySplitView has a single CSS node with the name overlay-split-view.
It contains two nodes with the name widget, containing the sidebar and content children.
When not collapsed, they have the .sidebar-view and .content-view style classes respectively.
overlay-split-view ├── widget.sidebar-pane │ ╰── [sidebar child] ╰── widget.content-pane ╰── [content child]
When collapsed, the one containing the sidebar child has the .background style class and the other one has no style classes.
overlay-split-view ├── widget.background │ ╰── [sidebar child] ╰── widget ╰── [content child]
Accessibility ¶
AdwOverlaySplitView uses the GTK_ACCESSIBLE_ROLE_GROUP role.
func NewOverlaySplitView ¶
func NewOverlaySplitView() *OverlaySplitView
NewOverlaySplitView creates a new AdwOverlaySplitView.
The function returns the following values:
- overlaySplitView: newly created AdwOverlaySplitView.
func (*OverlaySplitView) Collapsed ¶
func (self *OverlaySplitView) Collapsed() bool
Collapsed gets whether self is collapsed.
The function returns the following values:
- ok: whether self is collapsed.
func (*OverlaySplitView) Content ¶
func (self *OverlaySplitView) Content() gtk.Widgetter
Content gets the content widget for self.
The function returns the following values:
- widget (optional): content widget for self.
func (*OverlaySplitView) EnableHideGesture ¶
func (self *OverlaySplitView) EnableHideGesture() bool
EnableHideGesture gets whether self can be closed with a swipe gesture.
The function returns the following values:
- ok: TRUE if self can be closed with a swipe gesture.
func (*OverlaySplitView) EnableShowGesture ¶
func (self *OverlaySplitView) EnableShowGesture() bool
EnableShowGesture gets whether self can be opened with an edge swipe gesture.
The function returns the following values:
- ok: TRUE if self can be opened with a swipe gesture.
func (*OverlaySplitView) MaxSidebarWidth ¶
func (self *OverlaySplitView) MaxSidebarWidth() float64
MaxSidebarWidth gets the maximum sidebar width for self.
The function returns the following values:
- gdouble: maximum width.
func (*OverlaySplitView) MinSidebarWidth ¶
func (self *OverlaySplitView) MinSidebarWidth() float64
MinSidebarWidth gets the minimum sidebar width for self.
The function returns the following values:
- gdouble: minimum width.
func (*OverlaySplitView) PINSidebar ¶
func (self *OverlaySplitView) PINSidebar() bool
PINSidebar gets whether the sidebar widget is pinned for self.
The function returns the following values:
- ok: whether if the sidebar widget is pinned.
func (*OverlaySplitView) SetCollapsed ¶
func (self *OverlaySplitView) SetCollapsed(collapsed bool)
SetCollapsed sets whether self view is collapsed.
When collapsed, the sidebar widget is presented as an overlay above the content widget, otherwise they are displayed side by side.
The function takes the following parameters:
- collapsed: whether self is collapsed.
func (*OverlaySplitView) SetContent ¶
func (self *OverlaySplitView) SetContent(content gtk.Widgetter)
SetContent sets the content widget for self.
The function takes the following parameters:
- content (optional) widget.
func (*OverlaySplitView) SetEnableHideGesture ¶
func (self *OverlaySplitView) SetEnableHideGesture(enableHideGesture bool)
SetEnableHideGesture sets whether self can be closed with a swipe gesture.
Only touchscreen swipes are supported.
The function takes the following parameters:
- enableHideGesture: whether self can be closed with a swipe gesture.
func (*OverlaySplitView) SetEnableShowGesture ¶
func (self *OverlaySplitView) SetEnableShowGesture(enableShowGesture bool)
SetEnableShowGesture sets whether self can be opened with an edge swipe gesture.
Only touchscreen swipes are supported.
The function takes the following parameters:
- enableShowGesture: whether self can be opened with a swipe gesture.
func (*OverlaySplitView) SetMaxSidebarWidth ¶
func (self *OverlaySplitView) SetMaxSidebarWidth(width float64)
SetMaxSidebarWidth sets the maximum sidebar width for self.
Maximum width is affected by overlaysplitview:sidebar-width-unit.
The sidebar widget can still be allocated with larger width if its own minimum width exceeds it.
The function takes the following parameters:
- width: maximum width.
func (*OverlaySplitView) SetMinSidebarWidth ¶
func (self *OverlaySplitView) SetMinSidebarWidth(width float64)
SetMinSidebarWidth sets the minimum sidebar width for self.
Minimum width is affected by overlaysplitview:sidebar-width-unit.
The sidebar widget can still be allocated with larger width if its own minimum width exceeds it.
The function takes the following parameters:
- width: minimum width.
func (*OverlaySplitView) SetPINSidebar ¶
func (self *OverlaySplitView) SetPINSidebar(pinSidebar bool)
SetPINSidebar sets whether the sidebar widget is pinned for self.
By default, collapsing self automatically hides the sidebar widget, and uncollapsing it shows the sidebar. If set to TRUE, sidebar visibility never changes on its own.
The function takes the following parameters:
- pinSidebar: whether to pin the sidebar widget.
func (*OverlaySplitView) SetShowSidebar ¶
func (self *OverlaySplitView) SetShowSidebar(showSidebar bool)
SetShowSidebar sets whether the sidebar widget is shown for self.
The function takes the following parameters:
- showSidebar: whether to show the sidebar widget.
func (*OverlaySplitView) SetSidebar ¶
func (self *OverlaySplitView) SetSidebar(sidebar gtk.Widgetter)
SetSidebar sets the sidebar widget for self.
The function takes the following parameters:
- sidebar (optional) widget.
func (*OverlaySplitView) SetSidebarPosition ¶
func (self *OverlaySplitView) SetSidebarPosition(position gtk.PackType)
SetSidebarPosition sets the sidebar position for self.
If it's set to GTK_PACK_START, the sidebar is displayed before the content, if GTK_PACK_END, it's displayed after the content.
The function takes the following parameters:
- position: new position.
func (*OverlaySplitView) SetSidebarWidthFraction ¶
func (self *OverlaySplitView) SetSidebarWidthFraction(fraction float64)
SetSidebarWidthFraction sets the preferred sidebar width as a fraction of the total width of self.
The preferred width is additionally limited by overlaysplitview:min-sidebar-width and overlaysplitview:max-sidebar-width.
The sidebar widget can be allocated with larger width if its own minimum width exceeds the preferred width.
The function takes the following parameters:
- fraction: preferred width fraction.
func (*OverlaySplitView) SetSidebarWidthUnit ¶
func (self *OverlaySplitView) SetSidebarWidthUnit(unit LengthUnit)
SetSidebarWidthUnit sets the length unit for minimum and maximum sidebar widths.
See overlaysplitview:min-sidebar-width and overlaysplitview:max-sidebar-width.
The function takes the following parameters:
- unit: length unit.
func (*OverlaySplitView) ShowSidebar ¶
func (self *OverlaySplitView) ShowSidebar() bool
ShowSidebar gets whether the sidebar widget is shown for self.
The function returns the following values:
- ok: TRUE if the sidebar widget is shown.
func (*OverlaySplitView) Sidebar ¶
func (self *OverlaySplitView) Sidebar() gtk.Widgetter
Sidebar gets the sidebar widget for self.
The function returns the following values:
- widget (optional): sidebar widget for self.
func (*OverlaySplitView) SidebarPosition ¶
func (self *OverlaySplitView) SidebarPosition() gtk.PackType
SidebarPosition gets the sidebar position for self.
The function returns the following values:
- packType: sidebar position for self.
func (*OverlaySplitView) SidebarWidthFraction ¶
func (self *OverlaySplitView) SidebarWidthFraction() float64
SidebarWidthFraction gets the preferred sidebar width fraction for self.
The function returns the following values:
- gdouble: preferred width fraction.
func (*OverlaySplitView) SidebarWidthUnit ¶
func (self *OverlaySplitView) SidebarWidthUnit() LengthUnit
SidebarWidthUnit gets the length unit for minimum and maximum sidebar widths.
The function returns the following values:
- lengthUnit: length unit.
type OverlaySplitViewClass ¶
type OverlaySplitViewClass struct {
// contains filtered or unexported fields
}
OverlaySplitViewClass: instance of this type is always passed by reference.
func (*OverlaySplitViewClass) ParentClass ¶
func (o *OverlaySplitViewClass) ParentClass() *gtk.WidgetClass
type OverlaySplitViewOverrides ¶
type OverlaySplitViewOverrides struct { }
OverlaySplitViewOverrides contains methods that are overridable.
type PasswordEntryRow ¶
type PasswordEntryRow struct { EntryRow // contains filtered or unexported fields }
PasswordEntryRow: entryrow tailored for entering secrets.
<picture> <source srcset="password-entry-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="password-entry-row.png" alt="password-entry-row"> </picture>
It does not show its contents in clear text, does not allow to copy it to the clipboard, and shows a warning when Caps Lock is engaged. If the underlying platform allows it, AdwPasswordEntryRow will also place the text in a non-pageable memory area, to avoid it being written out to disk by the operating system.
It offer a way to reveal the contents in clear text.
CSS Nodes ¶
AdwPasswordEntryRow has a single CSS node with name row that carries .entry and .password style classes.
func NewPasswordEntryRow ¶
func NewPasswordEntryRow() *PasswordEntryRow
NewPasswordEntryRow creates a new AdwPasswordEntryRow.
The function returns the following values:
- passwordEntryRow: newly created AdwPasswordEntryRow.
type PasswordEntryRowClass ¶
type PasswordEntryRowClass struct {
// contains filtered or unexported fields
}
PasswordEntryRowClass: instance of this type is always passed by reference.
func (*PasswordEntryRowClass) ParentClass ¶
func (p *PasswordEntryRowClass) ParentClass() *EntryRowClass
type PasswordEntryRowOverrides ¶
type PasswordEntryRowOverrides struct { }
PasswordEntryRowOverrides contains methods that are overridable.
type PreferencesDialog ¶
type PreferencesDialog struct { Dialog // contains filtered or unexported fields }
PreferencesDialog: dialog showing application's preferences.
<picture> <source srcset="preferences-dialog-dark.png" media="(prefers-color-scheme: dark)"> <img src="preferences-dialog.png" alt="preferences-dialog"> </picture>
The AdwPreferencesDialog widget presents an application's preferences gathered into pages and groups. The preferences are searchable by the user.
CSS nodes ¶
AdwPreferencesDialog has a main CSS node with the name dialog and the style class .preferences.
func NewPreferencesDialog ¶
func NewPreferencesDialog() *PreferencesDialog
NewPreferencesDialog creates a new AdwPreferencesDialog.
The function returns the following values:
- preferencesDialog: newly created AdwPreferencesDialog.
func (*PreferencesDialog) Add ¶
func (self *PreferencesDialog) Add(page *PreferencesPage)
Add adds a preferences page to self.
The function takes the following parameters:
- page to add.
func (*PreferencesDialog) AddToast ¶
func (self *PreferencesDialog) AddToast(toast *Toast)
AddToast displays toast.
See toastoverlay.AddToast.
The function takes the following parameters:
- toast: toast.
func (*PreferencesDialog) PopSubpage ¶
func (self *PreferencesDialog) PopSubpage() bool
PopSubpage: pop the visible page from the subpage stack of self.
The function returns the following values:
- ok: TRUE if a page has been popped.
func (*PreferencesDialog) PushSubpage ¶
func (self *PreferencesDialog) PushSubpage(page *NavigationPage)
PushSubpage pushes page onto the subpage stack of self.
The page will be automatically removed when popped.
The function takes the following parameters:
- page: subpage.
func (*PreferencesDialog) Remove ¶
func (self *PreferencesDialog) Remove(page *PreferencesPage)
Remove removes a page from self.
The function takes the following parameters:
- page to remove.
func (*PreferencesDialog) SearchEnabled ¶
func (self *PreferencesDialog) SearchEnabled() bool
SearchEnabled gets whether search is enabled for self.
The function returns the following values:
- ok: whether search is enabled for self.
func (*PreferencesDialog) SetSearchEnabled ¶
func (self *PreferencesDialog) SetSearchEnabled(searchEnabled bool)
SetSearchEnabled sets whether search is enabled for self.
The function takes the following parameters:
- searchEnabled: whether search is enabled.
func (*PreferencesDialog) SetVisiblePage ¶
func (self *PreferencesDialog) SetVisiblePage(page *PreferencesPage)
SetVisiblePage makes page the visible page of self.
The function takes the following parameters:
- page of self.
func (*PreferencesDialog) SetVisiblePageName ¶
func (self *PreferencesDialog) SetVisiblePageName(name string)
SetVisiblePageName makes the page with the given name visible.
See preferencesdialog:visible-page.
The function takes the following parameters:
- name of the page to make visible.
func (*PreferencesDialog) VisiblePage ¶
func (self *PreferencesDialog) VisiblePage() *PreferencesPage
VisiblePage gets the currently visible page of self.
The function returns the following values:
- preferencesPage (optional): visible page.
func (*PreferencesDialog) VisiblePageName ¶
func (self *PreferencesDialog) VisiblePageName() string
VisiblePageName gets the name of currently visible page of self.
The function returns the following values:
- utf8 (optional): name of the visible page.
type PreferencesDialogClass ¶
type PreferencesDialogClass struct {
// contains filtered or unexported fields
}
PreferencesDialogClass: instance of this type is always passed by reference.
func (*PreferencesDialogClass) ParentClass ¶
func (p *PreferencesDialogClass) ParentClass() *DialogClass
ParentClass: parent class.
type PreferencesDialogOverrides ¶
type PreferencesDialogOverrides struct { }
PreferencesDialogOverrides contains methods that are overridable.
type PreferencesGroup ¶
type PreferencesGroup struct { gtk.Widget // contains filtered or unexported fields }
PreferencesGroup: group of preference rows.
<picture> <source srcset="preferences-group-dark.png" media="(prefers-color-scheme: dark)"> <img src="preferences-group.png" alt="preferences-group"> </picture>
An AdwPreferencesGroup represents a group or tightly related preferences, which in turn are represented by preferencesrow.
To summarize the role of the preferences it gathers, a group can have both a title and a description. The title will be used by preferencesdialog to let the user look for a preference.
AdwPreferencesGroup as GtkBuildable ¶
The AdwPreferencesGroup implementation of the gtk.Buildable interface supports adding preferencesrows to the list by omitting "type". If "type" is omitted and the widget isn't a preferencesrow the child is added to a box below the list.
When the "type" attribute of a child is header-suffix, the child is set as the suffix on the end of the title and description.
CSS nodes ¶
AdwPreferencesGroup has a single CSS node with name preferencesgroup.
Accessibility ¶
AdwPreferencesGroup uses the GTK_ACCESSIBLE_ROLE_GROUP role.
func NewPreferencesGroup ¶
func NewPreferencesGroup() *PreferencesGroup
NewPreferencesGroup creates a new AdwPreferencesGroup.
The function returns the following values:
- preferencesGroup: newly created AdwPreferencesGroup.
func (*PreferencesGroup) Add ¶
func (self *PreferencesGroup) Add(child gtk.Widgetter)
Add adds a child to self.
The function takes the following parameters:
- child: widget to add.
func (*PreferencesGroup) Description ¶
func (self *PreferencesGroup) Description() string
Description gets the description of self.
The function returns the following values:
- utf8 (optional): description of self.
func (*PreferencesGroup) HeaderSuffix ¶
func (self *PreferencesGroup) HeaderSuffix() gtk.Widgetter
HeaderSuffix gets the suffix for self's header.
The function returns the following values:
- widget (optional): suffix for self's header.
func (*PreferencesGroup) Remove ¶
func (self *PreferencesGroup) Remove(child gtk.Widgetter)
Remove removes a child from self.
The function takes the following parameters:
- child to remove.
func (*PreferencesGroup) SetDescription ¶
func (self *PreferencesGroup) SetDescription(description string)
SetDescription sets the description for self.
The function takes the following parameters:
- description (optional): description.
func (*PreferencesGroup) SetHeaderSuffix ¶
func (self *PreferencesGroup) SetHeaderSuffix(suffix gtk.Widgetter)
SetHeaderSuffix sets the suffix for self's header.
Displayed above the list, next to the title and description.
Suffixes are commonly used to show a button or a spinner for the whole group.
The function takes the following parameters:
- suffix (optional) to set.
func (*PreferencesGroup) SetTitle ¶
func (self *PreferencesGroup) SetTitle(title string)
SetTitle sets the title for self.
The function takes the following parameters:
- title: title.
func (*PreferencesGroup) Title ¶
func (self *PreferencesGroup) Title() string
Title gets the title of self.
The function returns the following values:
- utf8: title of self.
type PreferencesGroupClass ¶
type PreferencesGroupClass struct {
// contains filtered or unexported fields
}
PreferencesGroupClass: instance of this type is always passed by reference.
func (*PreferencesGroupClass) ParentClass ¶
func (p *PreferencesGroupClass) ParentClass() *gtk.WidgetClass
ParentClass: parent class.
type PreferencesGroupOverrides ¶
type PreferencesGroupOverrides struct { }
PreferencesGroupOverrides contains methods that are overridable.
type PreferencesPage ¶
type PreferencesPage struct { gtk.Widget // contains filtered or unexported fields }
PreferencesPage: page from preferencesdialog.
<picture> <source srcset="preferences-page-dark.png" media="(prefers-color-scheme: dark)"> <img src="preferences-page.png" alt="preferences-page"> </picture>
The AdwPreferencesPage widget gathers preferences groups into a single page of a preferences window.
CSS nodes ¶
AdwPreferencesPage has a single CSS node with name preferencespage.
Accessibility ¶
AdwPreferencesPage uses the GTK_ACCESSIBLE_ROLE_GROUP role.
func NewPreferencesPage ¶
func NewPreferencesPage() *PreferencesPage
NewPreferencesPage creates a new AdwPreferencesPage.
The function returns the following values:
- preferencesPage: newly created AdwPreferencesPage.
func (*PreferencesPage) Add ¶
func (self *PreferencesPage) Add(group *PreferencesGroup)
Add adds a preferences group to self.
The function takes the following parameters:
- group to add.
func (*PreferencesPage) Description ¶
func (self *PreferencesPage) Description() string
Description gets the description of self.
The function returns the following values:
- utf8: description of self.
func (*PreferencesPage) IconName ¶
func (self *PreferencesPage) IconName() string
IconName gets the icon name for self.
The function returns the following values:
- utf8 (optional): icon name for self.
func (*PreferencesPage) Name ¶
func (self *PreferencesPage) Name() string
Name gets the name of self.
The function returns the following values:
- utf8 (optional): name of self.
func (*PreferencesPage) Remove ¶
func (self *PreferencesPage) Remove(group *PreferencesGroup)
Remove removes a group from self.
The function takes the following parameters:
- group to remove.
func (*PreferencesPage) ScrollToTop ¶
func (self *PreferencesPage) ScrollToTop()
ScrollToTop scrolls the scrolled window of self to the top.
func (*PreferencesPage) SetDescription ¶
func (self *PreferencesPage) SetDescription(description string)
SetDescription sets the description of self.
The description is displayed at the top of the page.
The function takes the following parameters:
- description: description.
func (*PreferencesPage) SetIconName ¶
func (self *PreferencesPage) SetIconName(iconName string)
SetIconName sets the icon name for self.
The function takes the following parameters:
- iconName (optional): icon name.
func (*PreferencesPage) SetName ¶
func (self *PreferencesPage) SetName(name string)
SetName sets the name of self.
The function takes the following parameters:
- name (optional): name.
func (*PreferencesPage) SetTitle ¶
func (self *PreferencesPage) SetTitle(title string)
SetTitle sets the title of self.
The function takes the following parameters:
- title: title.
func (*PreferencesPage) SetUseUnderline ¶
func (self *PreferencesPage) SetUseUnderline(useUnderline bool)
SetUseUnderline sets whether an embedded underline in the title indicates a mnemonic.
The function takes the following parameters:
- useUnderline: TRUE if underlines in the text indicate mnemonics.
func (*PreferencesPage) Title ¶
func (self *PreferencesPage) Title() string
Title gets the title of self.
The function returns the following values:
- utf8: title of self.
func (*PreferencesPage) UseUnderline ¶
func (self *PreferencesPage) UseUnderline() bool
UseUnderline gets whether an embedded underline in the title indicates a mnemonic.
The function returns the following values:
- ok: whether an embedded underline in the title indicates a mnemonic.
type PreferencesPageClass ¶
type PreferencesPageClass struct {
// contains filtered or unexported fields
}
PreferencesPageClass: instance of this type is always passed by reference.
func (*PreferencesPageClass) ParentClass ¶
func (p *PreferencesPageClass) ParentClass() *gtk.WidgetClass
ParentClass: parent class.
type PreferencesPageOverrides ¶
type PreferencesPageOverrides struct { }
PreferencesPageOverrides contains methods that are overridable.
type PreferencesRow ¶
type PreferencesRow struct { gtk.ListBoxRow // contains filtered or unexported fields }
PreferencesRow: gtk.ListBoxRow used to present preferences.
The AdwPreferencesRow widget has a title that preferencesdialog will use to let the user look for a preference. It doesn't present the title in any way and lets you present the preference as you please.
actionrow and its derivatives are convenient to use as preference rows as they take care of presenting the preference's title while letting you compose the inputs of the preference around it.
func NewPreferencesRow ¶
func NewPreferencesRow() *PreferencesRow
NewPreferencesRow creates a new AdwPreferencesRow.
The function returns the following values:
- preferencesRow: newly created AdwPreferencesRow.
func (*PreferencesRow) SetTitle ¶
func (self *PreferencesRow) SetTitle(title string)
SetTitle sets the title of the preference represented by self.
The title is interpreted as Pango markup unless preferencesrow:use-markup is set to FALSE.
The function takes the following parameters:
- title: title.
func (*PreferencesRow) SetTitleSelectable ¶
func (self *PreferencesRow) SetTitleSelectable(titleSelectable bool)
SetTitleSelectable sets whether the user can copy the title from the label
See also gtk.Label:selectable.
The function takes the following parameters:
- titleSelectable: TRUE if the user can copy the title from the label.
func (*PreferencesRow) SetUseMarkup ¶
func (self *PreferencesRow) SetUseMarkup(useMarkup bool)
SetUseMarkup sets whether to use Pango markup for the title label.
Subclasses may also use it for other labels, such as subtitle.
See also pango.ParseMarkup().
The function takes the following parameters:
- useMarkup: whether to use markup.
func (*PreferencesRow) SetUseUnderline ¶
func (self *PreferencesRow) SetUseUnderline(useUnderline bool)
SetUseUnderline sets whether an embedded underline in the title indicates a mnemonic.
The function takes the following parameters:
- useUnderline: TRUE if underlines in the text indicate mnemonics.
func (*PreferencesRow) Title ¶
func (self *PreferencesRow) Title() string
Title gets the title of the preference represented by self.
The function returns the following values:
- utf8: title.
func (*PreferencesRow) TitleSelectable ¶
func (self *PreferencesRow) TitleSelectable() bool
TitleSelectable gets whether the user can copy the title from the label.
The function returns the following values:
- ok: whether the user can copy the title from the label.
func (*PreferencesRow) UseMarkup ¶
func (self *PreferencesRow) UseMarkup() bool
UseMarkup gets whether to use Pango markup for the title label.
The function returns the following values:
- ok: whether to use markup.
func (*PreferencesRow) UseUnderline ¶
func (self *PreferencesRow) UseUnderline() bool
UseUnderline gets whether an embedded underline in the title indicates a mnemonic.
The function returns the following values:
- ok: whether an embedded underline in the title indicates a mnemonic.
type PreferencesRowClass ¶
type PreferencesRowClass struct {
// contains filtered or unexported fields
}
PreferencesRowClass: instance of this type is always passed by reference.
func (*PreferencesRowClass) ParentClass ¶
func (p *PreferencesRowClass) ParentClass() *gtk.ListBoxRowClass
ParentClass: parent class.
type PreferencesRowOverrides ¶
type PreferencesRowOverrides struct { }
PreferencesRowOverrides contains methods that are overridable.
type PreferencesWindow ¶
type PreferencesWindow struct { Window // contains filtered or unexported fields }
PreferencesWindow: window to present an application's preferences.
<picture> <source srcset="preferences-window-dark.png" media="(prefers-color-scheme: dark)"> <img src="preferences-window.png" alt="preferences-window"> </picture>
The AdwPreferencesWindow widget presents an application's preferences gathered into pages and groups. The preferences are searchable by the user.
CSS nodes ¶
AdwPreferencesWindow has a main CSS node with the name window and the style class .preferences.
func NewPreferencesWindow ¶
func NewPreferencesWindow() *PreferencesWindow
NewPreferencesWindow creates a new AdwPreferencesWindow.
The function returns the following values:
- preferencesWindow: newly created AdwPreferencesWindow.
func (*PreferencesWindow) Add ¶
func (self *PreferencesWindow) Add(page *PreferencesPage)
Add adds a preferences page to self.
The function takes the following parameters:
- page to add.
func (*PreferencesWindow) AddToast ¶
func (self *PreferencesWindow) AddToast(toast *Toast)
AddToast displays toast.
See toastoverlay.AddToast.
The function takes the following parameters:
- toast: toast.
func (*PreferencesWindow) CanNavigateBack
deprecated
func (self *PreferencesWindow) CanNavigateBack() bool
CanNavigateBack gets whether gestures and shortcuts for closing subpages are enabled.
Deprecated: Use navigationpage.GetCanPop instead.
The function returns the following values:
- ok: whether gestures and shortcuts are enabled.
func (*PreferencesWindow) CloseSubpage
deprecated
func (self *PreferencesWindow) CloseSubpage()
CloseSubpage closes the current subpage.
If there is no presented subpage, this does nothing.
Deprecated: Use preferenceswindow.PopSubpage instead.
func (*PreferencesWindow) PopSubpage ¶
func (self *PreferencesWindow) PopSubpage() bool
PopSubpage: pop the visible page from the subpage stack of self.
The function returns the following values:
- ok: TRUE if a page has been popped.
func (*PreferencesWindow) PresentSubpage
deprecated
func (self *PreferencesWindow) PresentSubpage(subpage gtk.Widgetter)
PresentSubpage sets subpage as the window's subpage and opens it.
The transition can be cancelled by the user, in which case visible child will change back to the previously visible child.
Deprecated: Use preferenceswindow.PushSubpage instead.
The function takes the following parameters:
- subpage: subpage.
func (*PreferencesWindow) PushSubpage ¶
func (self *PreferencesWindow) PushSubpage(page *NavigationPage)
PushSubpage pushes page onto the subpage stack of self.
The page will be automatically removed when popped.
The function takes the following parameters:
- page: subpage.
func (*PreferencesWindow) Remove ¶
func (self *PreferencesWindow) Remove(page *PreferencesPage)
Remove removes a page from self.
The function takes the following parameters:
- page to remove.
func (*PreferencesWindow) SearchEnabled ¶
func (self *PreferencesWindow) SearchEnabled() bool
SearchEnabled gets whether search is enabled for self.
The function returns the following values:
- ok: whether search is enabled for self.
func (*PreferencesWindow) SetCanNavigateBack
deprecated
func (self *PreferencesWindow) SetCanNavigateBack(canNavigateBack bool)
SetCanNavigateBack sets whether gestures and shortcuts for closing subpages are enabled.
The supported gestures are:
- One-finger swipe on touchscreens
- Horizontal scrolling on touchpads (usually two-finger swipe)
- Back mouse button
The keyboard back key is also supported, as well as the <kbd>Alt</kbd>+<kbd>←</kbd> shortcut.
For right-to-left locales, gestures and shortcuts are reversed.
Deprecated: Use navigationpage.SetCanPop instead.
Has no effect for subpages added with preferenceswindow.PushSubpage.
The function takes the following parameters:
- canNavigateBack: new value.
func (*PreferencesWindow) SetSearchEnabled ¶
func (self *PreferencesWindow) SetSearchEnabled(searchEnabled bool)
SetSearchEnabled sets whether search is enabled for self.
The function takes the following parameters:
- searchEnabled: whether search is enabled.
func (*PreferencesWindow) SetVisiblePage ¶
func (self *PreferencesWindow) SetVisiblePage(page *PreferencesPage)
SetVisiblePage makes page the visible page of self.
The function takes the following parameters:
- page of self.
func (*PreferencesWindow) SetVisiblePageName ¶
func (self *PreferencesWindow) SetVisiblePageName(name string)
SetVisiblePageName makes the page with the given name visible.
See preferenceswindow:visible-page.
The function takes the following parameters:
- name of the page to make visible.
func (*PreferencesWindow) VisiblePage ¶
func (self *PreferencesWindow) VisiblePage() *PreferencesPage
VisiblePage gets the currently visible page of self.
The function returns the following values:
- preferencesPage (optional): visible page.
func (*PreferencesWindow) VisiblePageName ¶
func (self *PreferencesWindow) VisiblePageName() string
VisiblePageName gets the name of currently visible page of self.
The function returns the following values:
- utf8 (optional): name of the visible page.
type PreferencesWindowClass ¶
type PreferencesWindowClass struct {
// contains filtered or unexported fields
}
PreferencesWindowClass: instance of this type is always passed by reference.
func (*PreferencesWindowClass) ParentClass ¶
func (p *PreferencesWindowClass) ParentClass() *WindowClass
ParentClass: parent class.
type PreferencesWindowOverrides ¶
type PreferencesWindowOverrides struct { }
PreferencesWindowOverrides contains methods that are overridable.
type PropertyAnimationTarget ¶
type PropertyAnimationTarget struct { AnimationTarget // contains filtered or unexported fields }
PropertyAnimationTarget: animationtarget changing the value of a property of a gobject.Object instance.
func NewPropertyAnimationTarget ¶
func NewPropertyAnimationTarget(object *coreglib.Object, propertyName string) *PropertyAnimationTarget
NewPropertyAnimationTarget creates a new AdwPropertyAnimationTarget for the property_name property on object.
The function takes the following parameters:
- object to be animated.
- propertyName: name of the property on object to animate.
The function returns the following values:
- propertyAnimationTarget: newly created AdwPropertyAnimationTarget.
func (*PropertyAnimationTarget) Object ¶
func (self *PropertyAnimationTarget) Object() *coreglib.Object
Object gets the object animated by self.
The AdwPropertyAnimationTarget instance does not hold a strong reference on the object; make sure the object is kept alive throughout the target's lifetime.
The function returns the following values:
- object: animated object.
type ResponseAppearance ¶
ResponseAppearance describes the possible styles of alertdialog response buttons.
See alertdialog.SetResponseAppearance.
const ( // ResponseDefault: default appearance. ResponseDefault ResponseAppearance = iota // ResponseSuggested: used to denote important responses such as the // affirmative action. ResponseSuggested // ResponseDestructive: used to draw attention to the potentially damaging // consequences of using the response. This appearance acts as a warning to // the user. ResponseDestructive )
func (ResponseAppearance) String ¶
func (r ResponseAppearance) String() string
String returns the name in string for ResponseAppearance.
type SpinRow ¶
type SpinRow struct { ActionRow *coreglib.Object gtk.EditableTextWidget // contains filtered or unexported fields }
SpinRow: actionrow with an embedded spin button.
<picture> <source srcset="spin-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="spin-row.png" alt="spin-row"> </picture>
Example of an AdwSpinRow UI definition:
<object class="AdwSpinRow"> <property name="title" translatable="yes">Spin Row</property> <property name="adjustment"> <object class="GtkAdjustment"> <property name="lower">0</property> <property name="upper">100</property> <property name="value">50</property> <property name="page-increment">10</property> <property name="step-increment">1</property> </object> </property> </object>
See gtk.SpinButton for details.
CSS nodes ¶
AdwSpinRow has the same structure as actionrow, as well as the .spin style class on the main node.
func NewSpinRow ¶
NewSpinRow creates a new AdwSpinRow.
The function takes the following parameters:
- adjustment (optional) that this spin row should use.
- climbRate: rate the value changes when holding a button or key.
- digits: number of decimal places to display.
The function returns the following values:
- spinRow: newly created AdwSpinRow.
func NewSpinRowWithRange ¶
NewSpinRowWithRange creates a new AdwSpinRow with the given properties.
This is a convenience constructor that allows creation of a numeric AdwSpinRow without manually creating an adjustment. The value is initially set to the minimum value and a page increment of 10 * step is the default. The precision of the spin row is equivalent to the precisions of step.
::: note The way in which the precision is derived works best if step is a power of ten. If the resulting precision is not suitable for your needs, use spinrow.SetDigits to correct it.
The function takes the following parameters:
- min: minimum allowable value.
- max: maximum allowable value.
- step: increment added or subtracted by spinning the widget.
The function returns the following values:
- spinRow: new AdwSpinRow.
func (*SpinRow) Adjustment ¶
func (self *SpinRow) Adjustment() *gtk.Adjustment
Adjustment gets the adjustment that holds the value for the spin row.
The function returns the following values:
- adjustment that holds the spin row's value.
func (*SpinRow) ClimbRate ¶
ClimbRate gets the acceleration rate when you hold down a button or key.
The function returns the following values:
- gdouble: acceleration rate when you hold down a button or key.
func (*SpinRow) Configure ¶
Configure changes the properties of an existing spin row.
The adjustment, climb rate, and number of decimal places are updated accordingly.
The function takes the following parameters:
- adjustment (optional) that this spin row should use.
- climbRate: new climb rate.
- digits: number of decimal places to display.
func (*SpinRow) ConnectOutput ¶
func (self *SpinRow) ConnectOutput(f func() (ok bool)) coreglib.SignalHandle
ConnectOutput is emitted to tweak the formatting of the value for display.
See gtk.SpinButton::output.
func (*SpinRow) ConnectWrapped ¶
func (self *SpinRow) ConnectWrapped(f func()) coreglib.SignalHandle
ConnectWrapped is emitted right after the spinbutton wraps.
See gtk.SpinButton::wrapped.
func (*SpinRow) Digits ¶
Digits gets the number of decimal places to display.
The function returns the following values:
- guint: number of decimal places to display.
func (*SpinRow) Numeric ¶
Numeric gets whether non-numeric characters should be ignored.
The function returns the following values:
- ok: whether non-numeric characters should be ignored.
func (*SpinRow) SetAdjustment ¶
func (self *SpinRow) SetAdjustment(adjustment *gtk.Adjustment)
SetAdjustment sets the adjustment that holds the value for the spin row.
The function takes the following parameters:
- adjustment (optional): adjustment.
func (*SpinRow) SetClimbRate ¶
SetClimbRate sets the acceleration rate when you hold down a button or key.
The function takes the following parameters:
- climbRate: acceleration rate when you hold down a button or key.
func (*SpinRow) SetDigits ¶
SetDigits sets the number of decimal places to display.
The function takes the following parameters:
- digits: number of decimal places to display.
func (*SpinRow) SetNumeric ¶
SetNumeric sets whether non-numeric characters should be ignored.
The function takes the following parameters:
- numeric: whether non-numeric characters should be ignored.
func (*SpinRow) SetRange ¶
SetRange sets the minimum and maximum allowable values for self.
If the current value is outside this range, it will be adjusted to fit within the range, otherwise it will remain unchanged.
The function takes the following parameters:
- min: minimum allowable value.
- max: maximum allowable value.
func (*SpinRow) SetSnapToTicks ¶
SetSnapToTicks sets whether invalid values are snapped to the nearest step increment.
The function takes the following parameters:
- snapToTicks: whether invalid values are snapped to the nearest step increment.
func (*SpinRow) SetUpdatePolicy ¶
func (self *SpinRow) SetUpdatePolicy(policy gtk.SpinButtonUpdatePolicy)
SetUpdatePolicy sets the policy for updating the spin row.
The options are always, or only when the value is invalid.
The function takes the following parameters:
- policy for updating the spin row.
func (*SpinRow) SetValue ¶
SetValue sets the current value.
The function takes the following parameters:
- value: new value.
func (*SpinRow) SetWrap ¶
SetWrap sets whether the spin row should wrap upon reaching its limits.
The function takes the following parameters:
- wrap: whether the spin row should wrap upon reaching its limits.
func (*SpinRow) SnapToTicks ¶
SnapToTicks gets whether invalid values are snapped to nearest step increment.
The function returns the following values:
- ok: whether invalid values are snapped to the nearest step increment.
func (*SpinRow) Update ¶
func (self *SpinRow) Update()
Update: manually force an update of the spin row.
func (*SpinRow) UpdatePolicy ¶
func (self *SpinRow) UpdatePolicy() gtk.SpinButtonUpdatePolicy
UpdatePolicy gets the policy for updating the spin row.
The function returns the following values:
- spinButtonUpdatePolicy: policy for updating the spin row.
type SpinRowClass ¶
type SpinRowClass struct {
// contains filtered or unexported fields
}
SpinRowClass: instance of this type is always passed by reference.
func (*SpinRowClass) ParentClass ¶
func (s *SpinRowClass) ParentClass() *ActionRowClass
type SpinRowOverrides ¶
type SpinRowOverrides struct { }
SpinRowOverrides contains methods that are overridable.
type SplitButton ¶
type SplitButton struct { gtk.Widget *coreglib.Object gtk.Actionable // contains filtered or unexported fields }
SplitButton: combined button and dropdown widget.
<picture> <source srcset="split-button-dark.png" media="(prefers-color-scheme: dark)"> <img src="split-button.png" alt="split-button"> </picture>
AdwSplitButton is typically used to present a set of actions in a menu, but allow access to one of them with a single click.
The API is very similar to gtk.Button and gtk.MenuButton, see their documentation for details.
CSS nodes
splitbutton[.image-button][.text-button] ├── button │ ╰── <content> ├── separator ╰── menubutton ╰── button.toggle ╰── arrow
AdwSplitButton's CSS node is called splitbutton. It contains the css nodes: button, separator, menubutton. See gtk.MenuButton documentation for the menubutton contents.
The main CSS node will contain the .image-button or .text-button style classes matching the button contents. The nested button nodes will never contain them.
Accessibility ¶
AdwSplitButton uses the GTK_ACCESSIBLE_ROLE_GROUP role.
func NewSplitButton ¶
func NewSplitButton() *SplitButton
NewSplitButton creates a new AdwSplitButton.
The function returns the following values:
- splitButton: newly created AdwSplitButton.
func (*SplitButton) CanShrink ¶
func (self *SplitButton) CanShrink() bool
CanShrink gets whether the button can be smaller than the natural size of its contents.
The function returns the following values:
- ok: whether the button can shrink.
func (*SplitButton) Child ¶
func (self *SplitButton) Child() gtk.Widgetter
Child gets the child widget.
The function returns the following values:
- widget (optional): child widget.
func (*SplitButton) ConnectActivate ¶
func (self *SplitButton) ConnectActivate(f func()) coreglib.SignalHandle
ConnectActivate is emitted to animate press then release.
This is an action signal. Applications should never connect to this signal, but use the splitbutton::clicked signal.
func (*SplitButton) ConnectClicked ¶
func (self *SplitButton) ConnectClicked(f func()) coreglib.SignalHandle
ConnectClicked is emitted when the button has been activated (pressed and released).
func (*SplitButton) Direction ¶
func (self *SplitButton) Direction() gtk.ArrowType
Direction gets the direction in which the popup will be popped up.
The function returns the following values:
- arrowType: direction.
func (*SplitButton) DropdownTooltip ¶
func (self *SplitButton) DropdownTooltip() string
DropdownTooltip gets the tooltip of the dropdown button of self.
The function returns the following values:
- utf8: dropdown tooltip of self.
func (*SplitButton) IconName ¶
func (self *SplitButton) IconName() string
IconName gets the name of the icon used to automatically populate the button.
The function returns the following values:
- utf8 (optional): icon name.
func (*SplitButton) Label ¶
func (self *SplitButton) Label() string
Label gets the label for self.
The function returns the following values:
- utf8 (optional): label for self.
func (*SplitButton) MenuModel ¶
func (self *SplitButton) MenuModel() gio.MenuModeller
MenuModel gets the menu model from which the popup will be created.
The function returns the following values:
- menuModel (optional): menu model.
func (*SplitButton) Popover ¶
func (self *SplitButton) Popover() *gtk.Popover
Popover gets the popover that will be popped up when the dropdown is clicked.
The function returns the following values:
- popover (optional): popover.
func (*SplitButton) SetCanShrink ¶
func (self *SplitButton) SetCanShrink(canShrink bool)
SetCanShrink sets whether the button can be smaller than the natural size of its contents.
If set to TRUE, the label will ellipsize.
See gtk.Button.SetCanShrink() and gtk.MenuButton.SetCanShrink().
The function takes the following parameters:
- canShrink: whether the button can shrink.
func (*SplitButton) SetChild ¶
func (self *SplitButton) SetChild(child gtk.Widgetter)
SetChild sets the child widget.
Setting the child widget will set splitbutton:label and splitbutton:icon-name to NULL.
The function takes the following parameters:
- child (optional): new child widget.
func (*SplitButton) SetDirection ¶
func (self *SplitButton) SetDirection(direction gtk.ArrowType)
SetDirection sets the direction in which the popup will be popped up.
The dropdown arrow icon will point at the same direction.
If the does not fit in the available space in the given direction, GTK will try its best to keep it inside the screen and fully visible.
If you pass GTK_ARROW_NONE, it's equivalent to GTK_ARROW_DOWN.
The function takes the following parameters:
- direction: direction.
func (*SplitButton) SetDropdownTooltip ¶
func (self *SplitButton) SetDropdownTooltip(tooltip string)
SetDropdownTooltip sets the tooltip of the dropdown button of self.
The tooltip can be marked up with the Pango text markup language.
The function takes the following parameters:
- tooltip: dropdown tooltip of self.
func (*SplitButton) SetIconName ¶
func (self *SplitButton) SetIconName(iconName string)
SetIconName sets the name of the icon used to automatically populate the button.
Setting the icon name will set splitbutton:label and splitbutton:child to NULL.
The function takes the following parameters:
- iconName: icon name to set.
func (*SplitButton) SetLabel ¶
func (self *SplitButton) SetLabel(label string)
SetLabel sets the label for self.
Setting the label will set splitbutton:icon-name and splitbutton:child to NULL.
The function takes the following parameters:
- label to set.
func (*SplitButton) SetMenuModel ¶
func (self *SplitButton) SetMenuModel(menuModel gio.MenuModeller)
SetMenuModel sets the menu model from which the popup will be created.
If the menu model is NULL, the dropdown is disabled.
A gtk.Popover will be created from the menu model with gtk.PopoverMenu.NewFromModel. Actions will be connected as documented for this function.
If splitbutton:popover is already set, it will be dissociated from the button, and the property is set to NULL.
The function takes the following parameters:
- menuModel (optional): menu model.
func (*SplitButton) SetPopover ¶
func (self *SplitButton) SetPopover(popover *gtk.Popover)
SetPopover sets the popover that will be popped up when the dropdown is clicked.
If the popover is NULL, the dropdown is disabled.
If splitbutton:menu-model is set, the menu model is dissociated from the button, and the property is set to NULL.
The function takes the following parameters:
- popover (optional): popover.
func (*SplitButton) SetUseUnderline ¶
func (self *SplitButton) SetUseUnderline(useUnderline bool)
SetUseUnderline sets whether an underline in the text indicates a mnemonic.
See splitbutton:label.
The function takes the following parameters:
- useUnderline: whether an underline in the text indicates a mnemonic.
func (*SplitButton) UseUnderline ¶
func (self *SplitButton) UseUnderline() bool
UseUnderline gets whether an underline in the text indicates a mnemonic.
The function returns the following values:
- ok: whether an underline in the text indicates a mnemonic.
type SplitButtonClass ¶
type SplitButtonClass struct {
// contains filtered or unexported fields
}
SplitButtonClass: instance of this type is always passed by reference.
func (*SplitButtonClass) ParentClass ¶
func (s *SplitButtonClass) ParentClass() *gtk.WidgetClass
type SplitButtonOverrides ¶
type SplitButtonOverrides struct { }
SplitButtonOverrides contains methods that are overridable.
type SpringAnimation ¶
type SpringAnimation struct { Animation // contains filtered or unexported fields }
SpringAnimation: spring-based animation.
AdwSpringAnimation implements an animation driven by a physical model of a spring described by springparams, with a resting position in springanimation:value-to, stretched to springanimation:value-from.
Since the animation is physically simulated, spring animations don't have a fixed duration. The animation will stop when the simulated spring comes to a rest - when the amplitude of the oscillations becomes smaller than springanimation:epsilon, or immediately when it reaches springanimation:value-to if springanimation:clamp is set to TRUE. The estimated duration can be obtained with springanimation:estimated-duration.
Due to the nature of spring-driven motion the animation can overshoot springanimation:value-to before coming to a rest. Whether the animation will overshoot or not depends on the damping ratio of the spring. See springparams for more information about specific damping ratio values.
If springanimation:clamp is TRUE, the animation will abruptly end as soon as it reaches the final value, preventing overshooting.
Animations can have an initial velocity value, set via springanimation:initial-velocity, which adjusts the curve without changing the duration. This makes spring animations useful for deceleration at the end of gestures.
If the initial and final values are equal, and the initial velocity is not 0, the animation value will bounce and return to its resting position.
func NewSpringAnimation ¶
func NewSpringAnimation(widget gtk.Widgetter, from, to float64, springParams *SpringParams, target AnimationTargetter) *SpringAnimation
NewSpringAnimation creates a new AdwSpringAnimation on widget.
The animation will animate target from from to to with the dynamics of a spring described by spring_params.
The function takes the following parameters:
- widget to create animation on.
- from: value to animate from.
- to: value to animate to.
- springParams: physical parameters of the spring.
- target value to animate.
The function returns the following values:
- springAnimation: newly created animation.
func (*SpringAnimation) CalculateValue ¶
func (self *SpringAnimation) CalculateValue(time uint) float64
CalculateValue calculates the value self will have at time.
The time starts at 0 and ends at springanimation:estimated_duration.
See also springanimation.CalculateVelocity.
The function takes the following parameters:
- time: elapsed time, in milliseconds.
The function returns the following values:
- gdouble: value at time.
func (*SpringAnimation) CalculateVelocity ¶
func (self *SpringAnimation) CalculateVelocity(time uint) float64
CalculateVelocity calculates the velocity self will have at time.
The time starts at 0 and ends at springanimation:estimated_duration.
See also springanimation.CalculateValue.
The function takes the following parameters:
- time: elapsed time, in milliseconds.
The function returns the following values:
- gdouble: velocity at time.
func (*SpringAnimation) Clamp ¶
func (self *SpringAnimation) Clamp() bool
Clamp gets whether self should be clamped.
The function returns the following values:
- ok: whether self is clamped.
func (*SpringAnimation) Epsilon ¶
func (self *SpringAnimation) Epsilon() float64
Epsilon gets the precision of the spring.
The function returns the following values:
- gdouble: epsilon value.
func (*SpringAnimation) EstimatedDuration ¶
func (self *SpringAnimation) EstimatedDuration() uint
EstimatedDuration gets the estimated duration of self, in milliseconds.
Can be duration_infinite if the spring damping is set to 0.
The function returns the following values:
- guint: estimated duration.
func (*SpringAnimation) InitialVelocity ¶
func (self *SpringAnimation) InitialVelocity() float64
InitialVelocity gets the initial velocity of self.
The function returns the following values:
- gdouble: initial velocity.
func (*SpringAnimation) SetClamp ¶
func (self *SpringAnimation) SetClamp(clamp bool)
SetClamp sets whether self should be clamped.
If set to TRUE, the animation will abruptly end as soon as it reaches the final value, preventing overshooting.
It won't prevent overshooting springanimation:value-from if a relative negative springanimation:initial-velocity is set.
The function takes the following parameters:
- clamp: new value.
func (*SpringAnimation) SetEpsilon ¶
func (self *SpringAnimation) SetEpsilon(epsilon float64)
SetEpsilon sets the precision of the spring.
The level of precision used to determine when the animation has come to a rest, that is, when the amplitude of the oscillations becomes smaller than this value.
If the epsilon value is too small, the animation will take a long time to stop after the animated value has stopped visibly changing.
If the epsilon value is too large, the animation will end prematurely.
The default value is 0.001.
The function takes the following parameters:
- epsilon: new value.
func (*SpringAnimation) SetInitialVelocity ¶
func (self *SpringAnimation) SetInitialVelocity(velocity float64)
SetInitialVelocity sets the initial velocity of self.
Initial velocity affects only the animation curve, but not its duration.
The function takes the following parameters:
- velocity: initial velocity.
func (*SpringAnimation) SetSpringParams ¶
func (self *SpringAnimation) SetSpringParams(springParams *SpringParams)
SetSpringParams sets the physical parameters of the spring of self.
The function takes the following parameters:
- springParams: new spring parameters.
func (*SpringAnimation) SetValueFrom ¶
func (self *SpringAnimation) SetValueFrom(value float64)
SetValueFrom sets the value self will animate from.
The animation will start at this value and end at springanimation:value-to.
The function takes the following parameters:
- value to animate from.
func (*SpringAnimation) SetValueTo ¶
func (self *SpringAnimation) SetValueTo(value float64)
SetValueTo sets the value self will animate to.
The animation will start at springanimation:value-from and end at this value.
The function takes the following parameters:
- value to animate to.
func (*SpringAnimation) SpringParams ¶
func (self *SpringAnimation) SpringParams() *SpringParams
SpringParams gets the physical parameters of the spring of self.
The function returns the following values:
- springParams: spring parameters.
func (*SpringAnimation) ValueFrom ¶
func (self *SpringAnimation) ValueFrom() float64
ValueFrom gets the value self will animate from.
The function returns the following values:
- gdouble: value to animate from.
func (*SpringAnimation) ValueTo ¶
func (self *SpringAnimation) ValueTo() float64
ValueTo gets the value self will animate to.
The function returns the following values:
- gdouble: value to animate to.
func (*SpringAnimation) Velocity ¶
func (self *SpringAnimation) Velocity() float64
Velocity gets the current velocity of self.
The function returns the following values:
- gdouble: current velocity.
type SpringParams ¶
type SpringParams struct {
// contains filtered or unexported fields
}
SpringParams: physical parameters of a spring for springanimation.
Any spring can be described by three parameters: mass, stiffness and damping.
An undamped spring will produce an oscillatory motion which will go on forever.
The frequency and amplitude of the oscillations will be determined by the stiffness (how "strong" the spring is) and its mass (how much "inertia" it has).
If damping is larger than 0, the amplitude of that oscillating motion will exponientally decrease over time. If that damping is strong enough that the spring can't complete a full oscillation, it's called an overdamped spring.
If we the spring can oscillate, it's called an underdamped spring.
The value between these two behaviors is called critical damping; a critically damped spring will comes to rest in the minimum possible time without producing oscillations.
The damping can be replaced by damping ratio, which produces the following springs:
* 0: an undamped spring. * Between 0 and 1: an underdamped spring. * 1: a critically damped spring. * Larger than 1: an overdamped spring.
As such ¶
An instance of this type is always passed by reference.
func NewSpringParams ¶
func NewSpringParams(dampingRatio float64, mass float64, stiffness float64) *SpringParams
NewSpringParams constructs a struct SpringParams.
func NewSpringParamsFull ¶
func NewSpringParamsFull(damping float64, mass float64, stiffness float64) *SpringParams
NewSpringParamsFull constructs a struct SpringParams.
func (*SpringParams) Damping ¶
func (self *SpringParams) Damping() float64
Damping gets the damping of self.
The function returns the following values:
- gdouble: damping.
func (*SpringParams) DampingRatio ¶
func (self *SpringParams) DampingRatio() float64
DampingRatio gets the damping ratio of self.
The function returns the following values:
- gdouble: damping ratio.
func (*SpringParams) Mass ¶
func (self *SpringParams) Mass() float64
Mass gets the mass of self.
The function returns the following values:
- gdouble: mass.
func (*SpringParams) Stiffness ¶
func (self *SpringParams) Stiffness() float64
Stiffness gets the stiffness of self.
The function returns the following values:
- gdouble: stiffness.
type Squeezer
deprecated
type Squeezer struct { gtk.Widget *coreglib.Object gtk.Orientable // contains filtered or unexported fields }
Squeezer: best fit container.
<picture> <source srcset="squeezer-wide-dark.png" media="(prefers-color-scheme: dark)"> <img src="squeezer-wide.png" alt="squeezer-wide"> </picture> <picture> <source srcset="squeezer-narrow-dark.png" media="(prefers-color-scheme: dark)"> <img src="squeezer-narrow.png" alt="squeezer-narrow"> </picture>
The AdwSqueezer widget is a container which only shows the first of its children that fits in the available size. It is convenient to offer different widgets to represent the same data with different levels of detail, making the widget seem to squeeze itself to fit in the available space.
Transitions between children can be animated as fades. This can be controlled with squeezer:transition-type.
CSS nodes ¶
AdwSqueezer has a single CSS node with name squeezer.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
func NewSqueezer
deprecated
func NewSqueezer() *Squeezer
NewSqueezer creates a new AdwSqueezer.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function returns the following values:
- squeezer: newly created AdwSqueezer.
func (*Squeezer) Add
deprecated
func (self *Squeezer) Add(child gtk.Widgetter) *SqueezerPage
Add adds a child to self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function takes the following parameters:
- child: widget to add.
The function returns the following values:
- squeezerPage: squeezerpage for child.
func (*Squeezer) AllowNone
deprecated
AllowNone gets whether to allow squeezing beyond the last child's minimum size.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function returns the following values:
- ok: whether self allows squeezing beyond the last child.
func (*Squeezer) Homogeneous
deprecated
func (*Squeezer) InterpolateSize
deprecated
InterpolateSize gets whether self interpolates its size when changing the visible child.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function returns the following values:
- ok: whether the size is interpolated.
func (*Squeezer) Page
deprecated
func (self *Squeezer) Page(child gtk.Widgetter) *SqueezerPage
Page returns the squeezerpage object for child.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function takes the following parameters:
- child of self.
The function returns the following values:
- squeezerPage: page object for child.
func (*Squeezer) Pages
deprecated
func (self *Squeezer) Pages() *gtk.SelectionModel
Pages returns a gio.ListModel that contains the pages of self.
This can be used to keep an up-to-date view. The model also implements gtk.SelectionModel and can be used to track the visible page.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function returns the following values:
- selectionModel: GtkSelectionModel for the squeezer's children.
func (*Squeezer) SetAllowNone
deprecated
SetAllowNone sets whether to allow squeezing beyond the last child's minimum size.
If set to TRUE, the squeezer can shrink to the point where no child can be shown. This is functionally equivalent to appending a widget with 0×0 minimum size.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function takes the following parameters:
- allowNone: whether self allows squeezing beyond the last child.
func (*Squeezer) SetHomogeneous
deprecated
SetHomogeneous sets whether all children have the same size for the opposite orientation.
For example, if a squeezer is horizontal and is homogeneous, it will request the same height for all its children. If it isn't, the squeezer may change size when a different child becomes visible.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function takes the following parameters:
- homogeneous: whether self is homogeneous.
func (*Squeezer) SetInterpolateSize
deprecated
SetInterpolateSize sets whether self interpolates its size when changing the visible child.
If TRUE, the squeezer 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 the squeezer is horizontal, it will interpolate the its height.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function takes the following parameters:
- interpolateSize: whether to interpolate the size.
func (*Squeezer) SetSwitchThresholdPolicy
deprecated
func (self *Squeezer) SetSwitchThresholdPolicy(policy FoldThresholdPolicy)
SetSwitchThresholdPolicy sets the switch threshold policy for self.
Determines when the squeezer will switch children.
If set to ADW_FOLD_THRESHOLD_POLICY_MINIMUM, it will only switch when the visible child cannot fit anymore. With ADW_FOLD_THRESHOLD_POLICY_NATURAL, it will switch as soon as the visible child doesn't get their natural size.
This can be useful if you have a long ellipsizing label and want to let it ellipsize instead of immediately switching.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function takes the following parameters:
- policy to use.
func (*Squeezer) SetTransitionDuration
deprecated
SetTransitionDuration sets the transition animation duration for self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function takes the following parameters:
- duration: new duration, in milliseconds.
func (*Squeezer) SetTransitionType
deprecated
func (self *Squeezer) SetTransitionType(transition SqueezerTransitionType)
SetTransitionType sets the type of animation used for transitions between children in self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function takes the following parameters:
- transition: new transition type.
func (*Squeezer) SetXAlign
deprecated
SetXAlign sets the horizontal alignment, from 0 (start) to 1 (end).
This affects the children allocation during transitions, when they exceed the size of the squeezer.
For example, 0.5 means the child will be centered, 0 means it will keep the start side aligned and overflow the end side, and 1 means the opposite.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function takes the following parameters:
- xalign: new alignment value.
func (*Squeezer) SetYAlign
deprecated
SetYAlign sets the vertical alignment, from 0 (top) to 1 (bottom).
This affects the children allocation during transitions, when they exceed the size of the squeezer.
For example, 0.5 means the child will be centered, 0 means it will keep the top side aligned and overflow the bottom side, and 1 means the opposite.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function takes the following parameters:
- yalign: new alignment value.
func (*Squeezer) SwitchThresholdPolicy
deprecated
func (self *Squeezer) SwitchThresholdPolicy() FoldThresholdPolicy
SwitchThresholdPolicy gets the switch threshold policy for self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function returns the following values:
- foldThresholdPolicy: fold threshold policy.
func (*Squeezer) TransitionDuration
deprecated
func (*Squeezer) TransitionRunning
deprecated
TransitionRunning gets whether a transition is currently running for self.
If a transition is impossible, the property value will be set to TRUE and then immediately to FALSE, so it's possible to rely on its notifications to know that a transition has happened.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function returns the following values:
- ok: whether a transition is currently running.
func (*Squeezer) TransitionType
deprecated
func (self *Squeezer) TransitionType() SqueezerTransitionType
TransitionType gets the type of animation used for transitions between children in self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function returns the following values:
- squeezerTransitionType: current transition type of self.
func (*Squeezer) VisibleChild
deprecated
func (self *Squeezer) VisibleChild() gtk.Widgetter
VisibleChild gets the currently visible child of self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function returns the following values:
- widget (optional): visible child.
type SqueezerClass ¶
type SqueezerClass struct {
// contains filtered or unexported fields
}
SqueezerClass: instance of this type is always passed by reference.
func (*SqueezerClass) ParentClass ¶
func (s *SqueezerClass) ParentClass() *gtk.WidgetClass
type SqueezerOverrides ¶
type SqueezerOverrides struct { }
SqueezerOverrides contains methods that are overridable.
type SqueezerPage
deprecated
SqueezerPage: auxiliary class used by squeezer.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
func (*SqueezerPage) Child
deprecated
func (self *SqueezerPage) Child() gtk.Widgetter
Child returns the squeezer child to which self belongs.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function returns the following values:
- widget: child to which self belongs.
func (*SqueezerPage) Enabled
deprecated
func (self *SqueezerPage) Enabled() bool
Enabled gets whether self is enabled.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function returns the following values:
- ok: whether self is enabled.
func (*SqueezerPage) SetEnabled
deprecated
func (self *SqueezerPage) SetEnabled(enabled bool)
SetEnabled sets whether self is enabled.
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 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.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
The function takes the following parameters:
- enabled: whether self is enabled.
type SqueezerPageClass ¶
type SqueezerPageClass struct {
// contains filtered or unexported fields
}
SqueezerPageClass: instance of this type is always passed by reference.
type SqueezerPageOverrides ¶
type SqueezerPageOverrides struct { }
SqueezerPageOverrides contains methods that are overridable.
type SqueezerTransitionType
deprecated
SqueezerTransitionType describes the possible transitions in a squeezer widget.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwsqueezer).
const ( // SqueezerTransitionTypeNone: no transition. SqueezerTransitionTypeNone SqueezerTransitionType = iota // SqueezerTransitionTypeCrossfade: cross-fade. SqueezerTransitionTypeCrossfade )
func (SqueezerTransitionType) String ¶
func (s SqueezerTransitionType) String() string
String returns the name in string for SqueezerTransitionType.
type StatusPage ¶
type StatusPage struct { gtk.Widget // contains filtered or unexported fields }
StatusPage: page used for empty/error states and similar use-cases.
<picture> <source srcset="status-page-dark.png" media="(prefers-color-scheme: dark)"> <img src="status-page.png" alt="status-page"> </picture>
The AdwStatusPage widget can have an icon, a title, a description and a custom widget which is displayed below them.
CSS nodes ¶
AdwStatusPage has a main CSS node with name statuspage.
AdwStatusPage can use the .compact (style-classes.html#compact-status-page) style class for when it needs to fit into a small space such a sidebar or a popover.
func NewStatusPage ¶
func NewStatusPage() *StatusPage
NewStatusPage creates a new AdwStatusPage.
The function returns the following values:
- statusPage: newly created AdwStatusPage.
func (*StatusPage) Child ¶
func (self *StatusPage) Child() gtk.Widgetter
Child gets the child widget of self.
The function returns the following values:
- widget (optional): child widget of self.
func (*StatusPage) Description ¶
func (self *StatusPage) Description() string
Description gets the description markup for self.
The function returns the following values:
- utf8 (optional): description.
func (*StatusPage) IconName ¶
func (self *StatusPage) IconName() string
IconName gets the icon name for self.
The function returns the following values:
- utf8 (optional): icon name.
func (*StatusPage) Paintable ¶
func (self *StatusPage) Paintable() *gdk.Paintable
Paintable gets the paintable for self.
The function returns the following values:
- paintable (optional): paintable.
func (*StatusPage) SetChild ¶
func (self *StatusPage) SetChild(child gtk.Widgetter)
SetChild sets the child widget of self.
The function takes the following parameters:
- child (optional) widget.
func (*StatusPage) SetDescription ¶
func (self *StatusPage) SetDescription(description string)
SetDescription sets the description markup for self.
The description is displayed below the title. It is parsed as Pango markup.
The function takes the following parameters:
- description (optional): description.
func (*StatusPage) SetIconName ¶
func (self *StatusPage) SetIconName(iconName string)
SetIconName sets the icon name for self.
Changing this will set statuspage:paintable to NULL.
The function takes the following parameters:
- iconName (optional): icon name.
func (*StatusPage) SetPaintable ¶
func (self *StatusPage) SetPaintable(paintable gdk.Paintabler)
SetPaintable sets the paintable for self.
Changing this will set statuspage:icon-name to NULL.
The function takes the following parameters:
- paintable (optional): paintable.
func (*StatusPage) SetTitle ¶
func (self *StatusPage) SetTitle(title string)
SetTitle sets the title for self.
The title is displayed below the icon. It is not parsed as Pango markup.
The function takes the following parameters:
- title: title.
func (*StatusPage) Title ¶
func (self *StatusPage) Title() string
Title gets the title for self.
The function returns the following values:
- utf8: title.
type StatusPageClass ¶
type StatusPageClass struct {
// contains filtered or unexported fields
}
StatusPageClass: instance of this type is always passed by reference.
func (*StatusPageClass) ParentClass ¶
func (s *StatusPageClass) ParentClass() *gtk.WidgetClass
type StatusPageOverrides ¶
type StatusPageOverrides struct { }
StatusPageOverrides contains methods that are overridable.
type StyleManager ¶
StyleManager class for managing application-wide styling.
AdwStyleManager provides a way to query and influence the application styles, such as whether to use dark or high contrast appearance.
It allows to set the color scheme via the stylemanager:color-scheme property, and to query the current appearance, as well as whether a system-wide color scheme preference exists.
func StyleManagerGetDefault ¶
func StyleManagerGetDefault() *StyleManager
StyleManagerGetDefault gets the default AdwStyleManager instance.
It manages all gdk.Display instances unless the style manager for that display has an override.
See stylemanager.GetForDisplay().
The function returns the following values:
- styleManager: default style manager.
func StyleManagerGetForDisplay ¶
func StyleManagerGetForDisplay(display *gdk.Display) *StyleManager
StyleManagerGetForDisplay gets the AdwStyleManager instance managing display.
It can be used to override styles for that specific display instead of the whole application.
Most applications should use stylemanager.GetDefault() instead.
The function takes the following parameters:
- display: GdkDisplay.
The function returns the following values:
- styleManager: style manager for display.
func (*StyleManager) ColorScheme ¶
func (self *StyleManager) ColorScheme() ColorScheme
ColorScheme gets the requested application color scheme.
The function returns the following values:
- colorScheme: color scheme.
func (*StyleManager) Dark ¶
func (self *StyleManager) Dark() bool
Dark gets whether the application is using dark appearance.
This can be used to query the current appearance, as requested via stylemanager:color-scheme.
The function returns the following values:
- ok: whether the application is using dark appearance.
func (*StyleManager) Display ¶
func (self *StyleManager) Display() *gdk.Display
Display gets the display the style manager is associated with.
The display will be NULL for the style manager returned by stylemanager.GetDefault().
The function returns the following values:
- display (optional): display.
func (*StyleManager) HighContrast ¶
func (self *StyleManager) HighContrast() bool
HighContrast gets whether the application is using high contrast appearance.
This cannot be overridden by applications.
The function returns the following values:
- ok: whether the application is using high contrast appearance.
func (*StyleManager) SetColorScheme ¶
func (self *StyleManager) SetColorScheme(colorScheme ColorScheme)
SetColorScheme sets the requested application color scheme.
The effective appearance will be decided based on the application color scheme and the system preferred color scheme. The stylemanager:dark property can be used to query the current effective appearance.
The ADW_COLOR_SCHEME_PREFER_LIGHT color scheme results in the application using light appearance unless the system prefers dark colors. This is the default value.
The ADW_COLOR_SCHEME_PREFER_DARK color scheme results in the application using dark appearance, but can still switch to the light appearance if the system can prefers it, for example, when the high contrast preference is enabled.
The ADW_COLOR_SCHEME_FORCE_LIGHT and ADW_COLOR_SCHEME_FORCE_DARK values ignore the system preference entirely. They are useful if the application wants to match its UI to its content or to provide a separate color scheme switcher.
If a per-gdk.Display style manager has its color scheme set to ADW_COLOR_SCHEME_DEFAULT, it will inherit the color scheme from the default style manager.
For the default style manager, ADW_COLOR_SCHEME_DEFAULT is equivalent to ADW_COLOR_SCHEME_PREFER_LIGHT.
The stylemanager:system-supports-color-schemes property can be used to check if the current environment provides a color scheme preference.
The function takes the following parameters:
- colorScheme: color scheme.
func (*StyleManager) SystemSupportsColorSchemes ¶
func (self *StyleManager) SystemSupportsColorSchemes() bool
SystemSupportsColorSchemes gets whether the system supports color schemes.
This can be used to check if the current environment provides a color scheme preference. For example, applications might want to show a separate appearance switcher if it's set to FALSE.
The function returns the following values:
- ok: whether the system supports color schemes.
type StyleManagerClass ¶
type StyleManagerClass struct {
// contains filtered or unexported fields
}
StyleManagerClass: instance of this type is always passed by reference.
type StyleManagerOverrides ¶
type StyleManagerOverrides struct { }
StyleManagerOverrides contains methods that are overridable.
type SwipeTracker ¶
type SwipeTracker struct { *coreglib.Object gtk.Orientable // contains filtered or unexported fields }
SwipeTracker: swipe tracker used in carousel, navigationview and overlaysplitview.
The AdwSwipeTracker object can be used for implementing widgets with swipe gestures. It supports touch-based swipes, pointer dragging, and touchpad scrolling.
The widgets will probably want to expose the swipetracker:enabled property. If they expect to use horizontal orientation, swipetracker:reversed can be used for supporting RTL text direction.
func NewSwipeTracker ¶
func NewSwipeTracker(swipeable Swipeabler) *SwipeTracker
NewSwipeTracker creates a new AdwSwipeTracker for widget.
The function takes the following parameters:
- swipeable: widget to add the tracker on.
The function returns the following values:
- swipeTracker: newly created AdwSwipeTracker.
func (*SwipeTracker) AllowLongSwipes ¶
func (self *SwipeTracker) AllowLongSwipes() bool
AllowLongSwipes gets whether to allow swiping for more than one snap point at a time.
The function returns the following values:
- ok: whether long swipes are allowed.
func (*SwipeTracker) AllowMouseDrag ¶
func (self *SwipeTracker) AllowMouseDrag() bool
AllowMouseDrag gets whether self can be dragged with mouse pointer.
The function returns the following values:
- ok: whether mouse dragging is allowed.
func (*SwipeTracker) AllowWindowHandle ¶
func (self *SwipeTracker) AllowWindowHandle() bool
AllowWindowHandle gets whether to allow touchscreen swiping from GtkWindowHandle.
The function returns the following values:
- ok: whether swiping from window handles is allowed.
func (*SwipeTracker) ConnectBeginSwipe ¶
func (self *SwipeTracker) ConnectBeginSwipe(f func()) coreglib.SignalHandle
ConnectBeginSwipe: this signal is emitted right before a swipe will be started, after the drag threshold has been passed.
func (*SwipeTracker) ConnectEndSwipe ¶
func (self *SwipeTracker) ConnectEndSwipe(f func(velocity, to float64)) coreglib.SignalHandle
ConnectEndSwipe: this signal is emitted as soon as the gesture has stopped.
The user is expected to animate the deceleration from the current progress value to to with an animation using velocity as the initial velocity, provided in pixels per second. springanimation is usually a good fit for this.
func (*SwipeTracker) ConnectPrepare ¶
func (self *SwipeTracker) ConnectPrepare(f func(direction NavigationDirection)) coreglib.SignalHandle
ConnectPrepare: this signal is emitted when a possible swipe is detected.
The direction value can be used to restrict the swipe to a certain direction.
func (*SwipeTracker) ConnectUpdateSwipe ¶
func (self *SwipeTracker) ConnectUpdateSwipe(f func(progress float64)) coreglib.SignalHandle
ConnectUpdateSwipe: this signal is emitted every time the progress value changes.
func (*SwipeTracker) Enabled ¶
func (self *SwipeTracker) Enabled() bool
Enabled gets whether self is enabled.
The function returns the following values:
- ok: whether self is enabled.
func (*SwipeTracker) LowerOvershoot ¶
func (self *SwipeTracker) LowerOvershoot() bool
LowerOvershoot gets whether to allow swiping past the first available snap point.
The function returns the following values:
- ok: whether to allow swiping past the first available snap point.
func (*SwipeTracker) Reversed ¶
func (self *SwipeTracker) Reversed() bool
Reversed gets whether self is reversing the swipe direction.
The function returns the following values:
- ok: whether the direction is reversed.
func (*SwipeTracker) SetAllowLongSwipes ¶
func (self *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.
The function takes the following parameters:
- allowLongSwipes: whether to allow long swipes.
func (*SwipeTracker) SetAllowMouseDrag ¶
func (self *SwipeTracker) SetAllowMouseDrag(allowMouseDrag bool)
SetAllowMouseDrag sets whether self can be dragged with mouse pointer.
The function takes the following parameters:
- allowMouseDrag: whether to allow mouse dragging.
func (*SwipeTracker) SetAllowWindowHandle ¶
func (self *SwipeTracker) SetAllowWindowHandle(allowWindowHandle bool)
SetAllowWindowHandle sets whether to allow touchscreen swiping from GtkWindowHandle.
Setting it to TRUE will make dragging the window impossible.
The function takes the following parameters:
- allowWindowHandle: whether to allow swiping from window handles.
func (*SwipeTracker) SetEnabled ¶
func (self *SwipeTracker) SetEnabled(enabled bool)
SetEnabled sets whether self is enabled.
When it's not enabled, no events will be processed. Usually widgets will want to expose this via a property.
The function takes the following parameters:
- enabled: whether self is enabled.
func (*SwipeTracker) SetLowerOvershoot ¶
func (self *SwipeTracker) SetLowerOvershoot(overshoot bool)
SetLowerOvershoot sets whether to allow swiping past the first available snap point.
The function takes the following parameters:
- overshoot: whether to allow swiping past the first available snap point.
func (*SwipeTracker) SetReversed ¶
func (self *SwipeTracker) SetReversed(reversed bool)
SetReversed sets whether to reverse the swipe direction.
If the swipe tracker is horizontal, it can be used for supporting RTL text direction.
The function takes the following parameters:
- reversed: whether to reverse the swipe direction.
func (*SwipeTracker) SetUpperOvershoot ¶
func (self *SwipeTracker) SetUpperOvershoot(overshoot bool)
SetUpperOvershoot sets whether to allow swiping past the last available snap point.
The function takes the following parameters:
- overshoot: whether to allow swiping past the last available snap point.
func (*SwipeTracker) ShiftPosition ¶
func (self *SwipeTracker) ShiftPosition(delta float64)
ShiftPosition moves the current progress value by delta.
This can be used to adjust the current position if snap points move during the gesture.
The function takes the following parameters:
- delta: position delta.
func (*SwipeTracker) Swipeable ¶
func (self *SwipeTracker) Swipeable() *Swipeable
Swipeable: get the widget self is attached to.
The function returns the following values:
- swipeable widget.
func (*SwipeTracker) UpperOvershoot ¶
func (self *SwipeTracker) UpperOvershoot() bool
UpperOvershoot gets whether to allow swiping past the last available snap point.
The function returns the following values:
- ok: whether to allow swiping past the last available snap point.
type SwipeTrackerClass ¶
type SwipeTrackerClass struct {
// contains filtered or unexported fields
}
SwipeTrackerClass: instance of this type is always passed by reference.
type SwipeTrackerOverrides ¶
type SwipeTrackerOverrides struct { }
SwipeTrackerOverrides contains methods that are overridable.
type Swipeable ¶
type Swipeable struct { gtk.Widget // contains filtered or unexported fields }
Swipeable: interface for swipeable widgets.
The AdwSwipeable interface is implemented by all swipeable widgets.
See swipetracker for details about implementing it.
Swipeable wraps an interface. This means the user can get the underlying type by calling Cast().
func (*Swipeable) CancelProgress ¶
CancelProgress gets the progress self will snap back to after the gesture is canceled.
The function returns the following values:
- gdouble: cancel progress, unitless.
func (*Swipeable) Distance ¶
Distance gets the swipe distance of self.
This corresponds to how many pixels 1 unit represents.
The function returns the following values:
- gdouble: swipe distance in pixels.
func (*Swipeable) Progress ¶
Progress gets the current progress of self.
The function returns the following values:
- gdouble: current progress, unitless.
func (*Swipeable) SnapPoints ¶
SnapPoints gets the snap points of self.
Each snap point represents a progress value that is considered acceptable to end the swipe on.
The function returns the following values:
- gdoubles: snap points.
func (*Swipeable) SwipeArea ¶
func (self *Swipeable) SwipeArea(navigationDirection NavigationDirection, isDrag bool) *gdk.Rectangle
SwipeArea gets the area self 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.
If not implemented, the default implementation returns the allocation of self, allowing swipes from anywhere.
The function takes the following parameters:
- navigationDirection: direction of the swipe.
- isDrag: whether the swipe is caused by a dragging gesture.
The function returns the following values:
- rect: pointer to a rectangle to store the swipe area.
type SwipeableInterface ¶
type SwipeableInterface struct {
// contains filtered or unexported fields
}
SwipeableInterface: interface for swipeable widgets.
An instance of this type is always passed by reference.
type Swipeabler ¶
type Swipeabler interface { coreglib.Objector // CancelProgress gets the progress self will snap back to after the gesture // is canceled. CancelProgress() float64 // Distance gets the swipe distance of self. Distance() float64 // Progress gets the current progress of self. Progress() float64 // SnapPoints gets the snap points of self. SnapPoints() []float64 // SwipeArea gets the area self can start a swipe from for the given // direction and gesture type. SwipeArea(navigationDirection NavigationDirection, isDrag bool) *gdk.Rectangle }
Swipeabler describes Swipeable's interface methods.
type SwitchRow ¶
type SwitchRow struct { ActionRow // contains filtered or unexported fields }
SwitchRow: gtk.ListBoxRow used to represent two states.
<picture> <source srcset="switch-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="switch-row.png" alt="switch-row"> </picture>
The AdwSwitchRow widget contains a gtk.Switch that allows the user to select between two states: "on" or "off". When activated, the row will invert its active state.
The user can control the switch by activating the row or by dragging on the switch handle.
See gtk.Switch for details.
Example of an AdwSwitchRow UI definition:
<object class="AdwSwitchRow"> <property name="title" translatable="yes">Switch Row</property> <signal name="notify::active" handler="switch_row_notify_active_cb"/> </object>
The switchrow:active property should be connected to in order to monitor changes to the active state.
func NewSwitchRow ¶
func NewSwitchRow() *SwitchRow
NewSwitchRow creates a new AdwSwitchRow.
The function returns the following values:
- switchRow: newly created AdwSwitchRow.
type SwitchRowClass ¶
type SwitchRowClass struct {
// contains filtered or unexported fields
}
SwitchRowClass: instance of this type is always passed by reference.
func (*SwitchRowClass) ParentClass ¶
func (s *SwitchRowClass) ParentClass() *ActionRowClass
type SwitchRowOverrides ¶
type SwitchRowOverrides struct { }
SwitchRowOverrides contains methods that are overridable.
type TabBar ¶
type TabBar struct { gtk.Widget // contains filtered or unexported fields }
TabBar: tab bar for tabview.
<picture> <source srcset="tab-bar-dark.png" media="(prefers-color-scheme: dark)"> <img src="tab-bar.png" alt="tab-bar"> </picture>
The AdwTabBar widget is a tab bar that can be used with conjunction with AdwTabView. It is typically used as a top bar within toolbarview.
AdwTabBar can autohide and can optionally contain action widgets on both sides of the tabs.
When there's not enough space to show all the tabs, AdwTabBar will scroll them. Pinned tabs always stay visible and aren't a part of the scrollable area.
CSS nodes ¶
AdwTabBar has a single CSS node with name tabbar.
func NewTabBar ¶
func NewTabBar() *TabBar
NewTabBar creates a new AdwTabBar.
The function returns the following values:
- tabBar: newly created AdwTabBar.
func (*TabBar) Autohide ¶
Autohide gets whether the tabs automatically hide.
The function returns the following values:
- ok: whether the tabs automatically hide.
func (*TabBar) ConnectExtraDragDrop ¶
func (self *TabBar) ConnectExtraDragDrop(f func(page *TabPage, value *coreglib.Value) (ok bool)) coreglib.SignalHandle
ConnectExtraDragDrop: this signal is emitted when content is dropped onto a tab.
The content must be of one of the types set up via tabbar.SetupExtraDropTarget.
See gtk.DropTarget::drop.
func (*TabBar) ConnectExtraDragValue ¶
func (self *TabBar) ConnectExtraDragValue(f func(page *TabPage, value *coreglib.Value) (dragAction gdk.DragAction)) coreglib.SignalHandle
ConnectExtraDragValue: this signal is emitted when the dropped content is preloaded.
In order for data to be preloaded, tabbar:extra-drag-preload must be set to TRUE.
The content must be of one of the types set up via tabbar.SetupExtraDropTarget.
See gtk.DropTarget:value.
func (*TabBar) EndActionWidget ¶
func (self *TabBar) EndActionWidget() gtk.Widgetter
EndActionWidget gets the widget shown after the tabs.
The function returns the following values:
- widget (optional) shown after the tabs.
func (*TabBar) ExpandTabs ¶
ExpandTabs gets whether tabs expand to full width.
The function returns the following values:
- ok: whether tabs expand to full width.
func (*TabBar) ExtraDragPreferredAction ¶
func (self *TabBar) ExtraDragPreferredAction() gdk.DragAction
ExtraDragPreferredAction gets the current action during a drop on the extra_drop_target.
The function returns the following values:
- dragAction: drag action of the current drop.
func (*TabBar) ExtraDragPreload ¶
ExtraDragPreload gets whether drop data should be preloaded on hover.
The function returns the following values:
- ok: whether drop data should be preloaded on hover.
func (*TabBar) Inverted ¶
Inverted gets whether tabs use inverted layout.
The function returns the following values:
- ok: whether tabs use inverted layout.
func (*TabBar) IsOverflowing ¶
IsOverflowing gets whether self is overflowing.
If TRUE, all tabs cannot be displayed at once and require scrolling.
The function returns the following values:
- ok: whether self is overflowing.
func (*TabBar) SetAutohide ¶
SetAutohide sets whether the tabs automatically hide.
If set to TRUE, the tab bar disappears when tabbar:view has 0 or 1 tab, no pinned tabs, and no tab is being transferred.
See tabbar:tabs-revealed.
The function takes the following parameters:
- autohide: whether the tabs automatically hide.
func (*TabBar) SetEndActionWidget ¶
func (self *TabBar) SetEndActionWidget(widget gtk.Widgetter)
SetEndActionWidget sets the widget to show after the tabs.
The function takes the following parameters:
- widget (optional) to show after the tabs.
func (*TabBar) SetExpandTabs ¶
SetExpandTabs sets whether tabs expand to full width.
If set to TRUE, the tabs will always vary width filling the whole width when possible, otherwise tabs will always have the minimum possible size.
The function takes the following parameters:
- expandTabs: whether to expand tabs.
func (*TabBar) SetExtraDragPreload ¶
SetExtraDragPreload sets whether drop data should be preloaded on hover.
See gtk.DropTarget:preload.
The function takes the following parameters:
- preload: whether to preload drop data.
func (*TabBar) SetInverted ¶
SetInverted sets whether tabs tabs use inverted layout.
If set to TRUE, non-pinned tabs will have the close button at the beginning and the indicator at the end rather than the opposite.
The function takes the following parameters:
- inverted: whether tabs use inverted layout.
func (*TabBar) SetStartActionWidget ¶
func (self *TabBar) SetStartActionWidget(widget gtk.Widgetter)
SetStartActionWidget sets the widget to show before the tabs.
The function takes the following parameters:
- widget (optional) to show before the tabs.
func (*TabBar) SetView ¶
SetView sets the tab view self controls.
The function takes the following parameters:
- view (optional): tab view.
func (*TabBar) SetupExtraDropTarget ¶
SetupExtraDropTarget sets the supported types for this drop target.
Sets up an extra drop target on tabs.
This allows to drag arbitrary content onto tabs, for example URLs in a web browser.
If a tab is hovered for a certain period of time while dragging the content, it will be automatically selected.
The tabbar::extra-drag-drop signal can be used to handle the drop.
The function takes the following parameters:
- actions: supported actions.
- types (optional): all supported GTypes that can be dropped.
func (*TabBar) StartActionWidget ¶
func (self *TabBar) StartActionWidget() gtk.Widgetter
StartActionWidget gets the widget shown before the tabs.
The function returns the following values:
- widget (optional) shown before the tabs.
func (*TabBar) TabsRevealed ¶
TabsRevealed gets whether the tabs are currently revealed.
See tabbar:autohide.
The function returns the following values:
- ok: whether the tabs are currently revealed.
type TabBarClass ¶
type TabBarClass struct {
// contains filtered or unexported fields
}
TabBarClass: instance of this type is always passed by reference.
func (*TabBarClass) ParentClass ¶
func (t *TabBarClass) ParentClass() *gtk.WidgetClass
type TabBarOverrides ¶
type TabBarOverrides struct { }
TabBarOverrides contains methods that are overridable.
type TabButton ¶
type TabButton struct { gtk.Widget *coreglib.Object gtk.Actionable // contains filtered or unexported fields }
TabButton: button that displays the number of tabview pages.
<picture> <source srcset="tab-button-dark.png" media="(prefers-color-scheme: dark)"> <img src="tab-button.png" alt="tab-button"> </picture>
AdwTabButton is a button that displays the number of pages in a given AdwTabView, as well as whether one of the inactive pages needs attention.
It's intended to be used as a visible indicator when there's no visible tab bar, typically opening an taboverview on click, e.g. via the overview.open action name:
<object class="AdwTabButton"> <property name="view">view</property> <property name="action-name">overview.open</property> </object>
CSS nodes ¶
AdwTabButton has a main CSS node with name tabbutton.
Accessibility ¶
AdwTabButton uses the GTK_ACCESSIBLE_ROLE_BUTTON role.
func NewTabButton ¶
func NewTabButton() *TabButton
NewTabButton creates a new AdwTabButton.
The function returns the following values:
- tabButton: newly created AdwTabButton.
func (*TabButton) ConnectActivate ¶
func (self *TabButton) ConnectActivate(f func()) coreglib.SignalHandle
ConnectActivate is emitted to animate press then release.
This is an action signal. Applications should never connect to this signal, but use the tabbutton::clicked signal.
func (*TabButton) ConnectClicked ¶
func (self *TabButton) ConnectClicked(f func()) coreglib.SignalHandle
ConnectClicked is emitted when the button has been activated (pressed and released).
type TabButtonClass ¶
type TabButtonClass struct {
// contains filtered or unexported fields
}
TabButtonClass: instance of this type is always passed by reference.
func (*TabButtonClass) ParentClass ¶
func (t *TabButtonClass) ParentClass() *gtk.WidgetClass
type TabButtonOverrides ¶
type TabButtonOverrides struct { }
TabButtonOverrides contains methods that are overridable.
type TabOverview ¶
type TabOverview struct { gtk.Widget // contains filtered or unexported fields }
TabOverview: tab overview for tabview.
<picture> <source srcset="tab-overview-dark.png" media="(prefers-color-scheme: dark)"> <img src="tab-overview.png" alt="tab-overview"> </picture>
AdwTabOverview is a widget that can display tabs from an AdwTabView in a grid.
AdwTabOverview shows a thumbnail for each tab. By default thumbnails are static for all pages except the selected one. They can be made always live by setting tabpage:live-thumbnail to TRUE, or refreshed with tabpage.InvalidateThumbnail or tabview.InvalidateThumbnails otherwise.
If the pages are too tall or too wide, the thumbnails will be cropped; use tabpage:thumbnail-xalign and tabpage:thumbnail-yalign to control which part of the page should be visible in this case.
Pinned tabs are shown as smaller cards without thumbnails above the other tabs. Unlike in tabbar, they still have titles, as well as an unpin button.
AdwTabOverview provides search in open tabs. It searches in tab titles and tooltips, as well as tabpage:keyword.
If taboverview:enable-new-tab is set to TRUE, a new tab button will be shown. Connect to the taboverview::create-tab signal to use it.
taboverview:secondary-menu can be used to provide a secondary menu for the overview. Use it to add extra actions, e.g. to open a new window or undo closed tab.
AdwTabOverview is intended to be used as the direct child of the window, with the rest of the window contents set as the taboverview:child. The child is expected to contain an tabview.
AdwTabOverview shows window buttons by default. They can be disabled by setting taboverview:show-start-title-buttons and/or taboverview:show-start-title-buttons and/or taboverview:show-end-title-buttons to FALSE.
If search and window buttons are disabled, and secondary menu is not set, the header bar will be hidden.
Actions ¶
AdwTabOverview defines the overview.open and overview.close actions for opening and closing itself. They can be convenient when used together with tabbutton.
CSS nodes ¶
AdwTabOverview has a single CSS node with name taboverview.
func NewTabOverview ¶
func NewTabOverview() *TabOverview
NewTabOverview creates a new AdwTabOverview.
The function returns the following values:
- tabOverview: newly created AdwTabOverview.
func (*TabOverview) Child ¶
func (self *TabOverview) Child() gtk.Widgetter
Child gets the child widget of self.
The function returns the following values:
- widget (optional): child widget of self.
func (*TabOverview) ConnectCreateTab ¶
func (self *TabOverview) ConnectCreateTab(f func() (tabPage *TabPage)) coreglib.SignalHandle
ConnectCreateTab is emitted when a tab needs to be created;
This can happen after the new tab button has been pressed, see taboverview:enable-new-tab.
The signal handler is expected to create a new page in the corresponding tabview and return it.
func (*TabOverview) ConnectExtraDragDrop ¶
func (self *TabOverview) ConnectExtraDragDrop(f func(page *TabPage, value *coreglib.Value) (ok bool)) coreglib.SignalHandle
ConnectExtraDragDrop: this signal is emitted when content is dropped onto a tab.
The content must be of one of the types set up via taboverview.SetupExtraDropTarget.
See gtk.DropTarget::drop.
func (*TabOverview) ConnectExtraDragValue ¶
func (self *TabOverview) ConnectExtraDragValue(f func(page *TabPage, value *coreglib.Value) (dragAction gdk.DragAction)) coreglib.SignalHandle
ConnectExtraDragValue: this signal is emitted when the dropped content is preloaded.
In order for data to be preloaded, taboverview:extra-drag-preload must be set to TRUE.
The content must be of one of the types set up via taboverview.SetupExtraDropTarget.
See gtk.DropTarget:value.
func (*TabOverview) EnableNewTab ¶
func (self *TabOverview) EnableNewTab() bool
EnableNewTab gets whether to new tab button is enabled for self.
The function returns the following values:
- ok: whether new tab button is enabled.
func (*TabOverview) EnableSearch ¶
func (self *TabOverview) EnableSearch() bool
EnableSearch gets whether search in tabs is enabled for self.
The function returns the following values:
- ok: whether search is enabled.
func (*TabOverview) ExtraDragPreferredAction ¶
func (self *TabOverview) ExtraDragPreferredAction() gdk.DragAction
ExtraDragPreferredAction gets the current action during a drop on the extra_drop_target.
The function returns the following values:
- dragAction: drag action of the current drop.
func (*TabOverview) ExtraDragPreload ¶
func (self *TabOverview) ExtraDragPreload() bool
ExtraDragPreload gets whether drop data should be preloaded on hover.
The function returns the following values:
- ok: whether drop data should be preloaded on hover.
func (*TabOverview) Inverted ¶
func (self *TabOverview) Inverted() bool
Inverted gets whether thumbnails use inverted layout.
The function returns the following values:
- ok: whether thumbnails use inverted layout.
func (*TabOverview) Open ¶
func (self *TabOverview) Open() bool
Open gets whether self is open.
The function returns the following values:
- ok: whether the overview is open.
func (*TabOverview) SearchActive ¶
func (self *TabOverview) SearchActive() bool
SearchActive gets whether search is currently active for self.
See taboverview:enable-search.
The function returns the following values:
- ok: whether search is active.
func (*TabOverview) SecondaryMenu ¶
func (self *TabOverview) SecondaryMenu() gio.MenuModeller
SecondaryMenu gets the secondary menu model for self.
The function returns the following values:
- menuModel (optional): secondary menu model.
func (*TabOverview) SetChild ¶
func (self *TabOverview) SetChild(child gtk.Widgetter)
SetChild sets the child widget of self.
The function takes the following parameters:
- child (optional) widget.
func (*TabOverview) SetEnableNewTab ¶
func (self *TabOverview) SetEnableNewTab(enableNewTab bool)
SetEnableNewTab sets whether to enable new tab button for self.
Connect to the taboverview::create-tab signal to use it.
The function takes the following parameters:
- enableNewTab: whether to enable new tab button.
func (*TabOverview) SetEnableSearch ¶
func (self *TabOverview) SetEnableSearch(enableSearch bool)
SetEnableSearch sets whether to enable search in tabs for self.
Search matches tab titles and tooltips, as well as keywords, set via tabpage:keyword. Use keywords to search in e.g. page URLs in a web browser.
During search, tab reordering and drag-n-drop are disabled.
Use taboverview:search-active to check out if search is currently active.
The function takes the following parameters:
- enableSearch: whether to enable search.
func (*TabOverview) SetExtraDragPreload ¶
func (self *TabOverview) SetExtraDragPreload(preload bool)
SetExtraDragPreload sets whether drop data should be preloaded on hover.
See gtk.DropTarget:preload.
The function takes the following parameters:
- preload: whether to preload drop data.
func (*TabOverview) SetInverted ¶
func (self *TabOverview) SetInverted(inverted bool)
SetInverted sets whether thumbnails use inverted layout.
If set to TRUE, thumbnails will have the close or unpin button at the beginning and the indicator at the end rather than the other way around.
The function takes the following parameters:
- inverted: whether thumbnails use inverted layout.
func (*TabOverview) SetOpen ¶
func (self *TabOverview) SetOpen(open bool)
SetOpen sets whether the to open self.
The function takes the following parameters:
- open: whether the overview is open.
func (*TabOverview) SetSecondaryMenu ¶
func (self *TabOverview) SetSecondaryMenu(secondaryMenu gio.MenuModeller)
SetSecondaryMenu sets the secondary menu model for self.
Use it to add extra actions, e.g. to open a new window or undo closed tab.
The function takes the following parameters:
- secondaryMenu (optional): menu model.
func (*TabOverview) SetShowEndTitleButtons ¶
func (self *TabOverview) SetShowEndTitleButtons(showEndTitleButtons bool)
SetShowEndTitleButtons sets whether to show end title buttons in self's header bar.
See headerbar:show-start-title-buttons for the other side.
The function takes the following parameters:
- showEndTitleButtons: whether to show end title buttons.
func (*TabOverview) SetShowStartTitleButtons ¶
func (self *TabOverview) SetShowStartTitleButtons(showStartTitleButtons bool)
SetShowStartTitleButtons sets whether to show start title buttons in self's header bar.
See headerbar:show-end-title-buttons for the other side.
The function takes the following parameters:
- showStartTitleButtons: whether to show start title buttons.
func (*TabOverview) SetView ¶
func (self *TabOverview) SetView(view *TabView)
SetView sets the tab view to control.
The view must be inside self, see taboverview:child.
The function takes the following parameters:
- view (optional): tab view.
func (*TabOverview) SetupExtraDropTarget ¶
func (self *TabOverview) SetupExtraDropTarget(actions gdk.DragAction, types []coreglib.Type)
SetupExtraDropTarget sets the supported types for this drop target.
Sets up an extra drop target on tabs.
This allows to drag arbitrary content onto tabs, for example URLs in a web browser.
If a tab is hovered for a certain period of time while dragging the content, it will be automatically selected.
The taboverview::extra-drag-drop signal can be used to handle the drop.
The function takes the following parameters:
- actions: supported actions.
- types (optional): all supported GTypes that can be dropped.
func (*TabOverview) ShowEndTitleButtons ¶
func (self *TabOverview) ShowEndTitleButtons() bool
ShowEndTitleButtons gets whether end title buttons are shown in self's header bar.
The function returns the following values:
- ok: whether end title buttons are shown.
func (*TabOverview) ShowStartTitleButtons ¶
func (self *TabOverview) ShowStartTitleButtons() bool
ShowStartTitleButtons gets whether start title buttons are shown in self's header bar.
The function returns the following values:
- ok: whether start title buttons are shown.
func (*TabOverview) View ¶
func (self *TabOverview) View() *TabView
View gets the tab view self controls.
The function returns the following values:
- tabView (optional): tab view.
type TabOverviewClass ¶
type TabOverviewClass struct {
// contains filtered or unexported fields
}
TabOverviewClass: instance of this type is always passed by reference.
func (*TabOverviewClass) ParentClass ¶
func (t *TabOverviewClass) ParentClass() *gtk.WidgetClass
type TabOverviewOverrides ¶
type TabOverviewOverrides struct { }
TabOverviewOverrides contains methods that are overridable.
type TabPage ¶
TabPage: auxiliary class used by tabview.
func (*TabPage) Child ¶
func (self *TabPage) Child() gtk.Widgetter
Child gets the child of self.
The function returns the following values:
- widget: child of self.
func (*TabPage) Icon ¶
func (self *TabPage) Icon() *gio.Icon
Icon gets the icon of self.
The function returns the following values:
- icon (optional) of self.
func (*TabPage) IndicatorActivatable ¶
IndicatorActivatable gets whether the indicator of self is activatable.
The function returns the following values:
- ok: whether the indicator is activatable.
func (*TabPage) IndicatorIcon ¶
func (self *TabPage) IndicatorIcon() *gio.Icon
IndicatorIcon gets the indicator icon of self.
The function returns the following values:
- icon (optional): indicator icon of self.
func (*TabPage) IndicatorTooltip ¶
IndicatorTooltip gets the tooltip of the indicator icon of self.
The function returns the following values:
- utf8: indicator tooltip of self.
func (*TabPage) InvalidateThumbnail ¶
func (self *TabPage) InvalidateThumbnail()
InvalidateThumbnail invalidates thumbnail for self.
If an taboverview is open, the thumbnail representing self will be immediately updated. Otherwise it will be update when opening the overview.
Does nothing if tabpage:live-thumbnail is set to TRUE.
See also tabview.InvalidateThumbnails.
func (*TabPage) Keyword ¶
Keyword gets the search keyword of self.
The function returns the following values:
- utf8 (optional): search keyword of self.
func (*TabPage) LiveThumbnail ¶
LiveThumbnail gets whether to live thumbnail is enabled self.
The function returns the following values:
- ok: whether live thumbnail is enabled.
func (*TabPage) Loading ¶
Loading gets whether self is loading.
The function returns the following values:
- ok: whether self is loading.
func (*TabPage) NeedsAttention ¶
NeedsAttention gets whether self needs attention.
The function returns the following values:
- ok: whether self needs attention.
func (*TabPage) Parent ¶
Parent gets the parent page of self.
See tabview.AddPage and tabview.ClosePage.
The function returns the following values:
- tabPage (optional): parent page.
func (*TabPage) Pinned ¶
Pinned gets whether self is pinned.
See tabview.SetPagePinned.
The function returns the following values:
- ok: whether self is pinned.
func (*TabPage) Selected ¶
Selected gets whether self is selected.
The function returns the following values:
- ok: whether self is selected.
func (*TabPage) SetIcon ¶
func (self *TabPage) SetIcon(icon gio.Iconner)
SetIcon sets the icon of self.
tabbar and taboverview display the icon next to the title, unless tabpage:loading is set to TRUE.
AdwTabBar also won't show the icon if the page is pinned and [propertyTabPage:indicator-icon] is set.
The function takes the following parameters:
- icon (optional) of self.
func (*TabPage) SetIndicatorActivatable ¶
SetIndicatorActivatable sets whether the indicator of self is activatable.
If set to TRUE, tabview::indicator-activated will be emitted when the indicator icon is clicked.
If tabpage:indicator-icon is not set, does nothing.
The function takes the following parameters:
- activatable: whether the indicator is activatable.
func (*TabPage) SetIndicatorIcon ¶
func (self *TabPage) SetIndicatorIcon(indicatorIcon gio.Iconner)
SetIndicatorIcon sets the indicator icon of self.
A common use case is an audio or camera indicator in a web browser.
tabbar 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.
taboverview will show it at the at the top part of the thumbnail.
tabpage:indicator-tooltip can be used to set the tooltip on the indicator icon.
If tabpage:indicator-activatable is set to TRUE, the indicator icon can act as a button.
The function takes the following parameters:
- indicatorIcon (optional): indicator icon of self.
func (*TabPage) SetIndicatorTooltip ¶
SetIndicatorTooltip sets the tooltip of the indicator icon of self.
The tooltip can be marked up with the Pango text markup language.
See tabpage:indicator-icon.
The function takes the following parameters:
- tooltip: indicator tooltip of self.
func (*TabPage) SetKeyword ¶
SetKeyword sets the search keyword for self.
taboverview can search pages by their keywords in addition to their titles and tooltips.
Keywords allow to include e.g. page URLs into tab search in a web browser.
The function takes the following parameters:
- keyword: search keyword.
func (*TabPage) SetLiveThumbnail ¶
SetLiveThumbnail sets whether to enable live thumbnail for self.
When set to TRUE, self's thumbnail in taboverview will update immediately when self is redrawn or resized.
If it's set to FALSE, the thumbnail will only be live when the self is selected, and otherwise it will be static and will only update when tabpage.InvalidateThumbnail or tabview.InvalidateThumbnails is called.
The function takes the following parameters:
- liveThumbnail: whether to enable live thumbnail.
func (*TabPage) SetLoading ¶
SetLoading sets whether self is loading.
If set to TRUE, tabbar and taboverview will display a spinner in place of icon.
If the page is pinned and tabpage:indicator-icon is set, loading status will not be visible with AdwTabBar.
The function takes the following parameters:
- loading: whether self is loading.
func (*TabPage) SetNeedsAttention ¶
SetNeedsAttention sets whether self needs attention.
tabbar will display a line under the tab representing the page if set to TRUE. If the tab is not visible, the corresponding edge of the tab bar will be highlighted.
taboverview will display a dot in the corner of the thumbnail if set to TRUE.
tabbutton will display a dot if any of the pages that aren't selected have tabpage:needs-attention set to TRUE.
The function takes the following parameters:
- needsAttention: whether self needs attention.
func (*TabPage) SetThumbnailXAlign ¶
SetThumbnailXAlign sets the horizontal alignment of the thumbnail for self.
If the page is so wide that taboverview can't display it completely and has to crop it, horizontal alignment will determine which part of the page will be visible.
For example, 0.5 means the center of the page will be visible, 0 means the start edge will be visible and 1 means the end edge will be visible.
The default horizontal alignment is 0.
The function takes the following parameters:
- xalign: new value.
func (*TabPage) SetThumbnailYAlign ¶
SetThumbnailYAlign sets the vertical alignment of the thumbnail for self.
If the page is so tall that taboverview can't display it completely and has to crop it, vertical alignment will determine which part of the page will be visible.
For example, 0.5 means the center of the page will be visible, 0 means the top edge will be visible and 1 means the bottom edge will be visible.
The default vertical alignment is 0.
The function takes the following parameters:
- yalign: new value.
func (*TabPage) SetTitle ¶
SetTitle: tabbar will display it in the center of the tab unless it's pinned, and will use it as a tooltip unless tabpage:tooltip is set.
taboverview will display it below the thumbnail unless it's pinned, or inside the card otherwise, and will use it as a tooltip unless tabpage:tooltip is set.
Sets the title of self.
The function takes the following parameters:
- title of self.
func (*TabPage) SetTooltip ¶
SetTooltip sets the tooltip of self.
The tooltip can be marked up with the Pango text markup language.
If not set, tabbar and taboverview will use tabpage:title as a tooltip instead.
The function takes the following parameters:
- tooltip of self.
func (*TabPage) ThumbnailXAlign ¶
ThumbnailXAlign gets the horizontal alignment of the thumbnail for self.
The function returns the following values:
- gfloat: horizontal alignment.
func (*TabPage) ThumbnailYAlign ¶
ThumbnailYAlign gets the vertical alignment of the thumbnail for self.
The function returns the following values:
- gfloat: vertical alignment.
type TabPageClass ¶
type TabPageClass struct {
// contains filtered or unexported fields
}
TabPageClass: instance of this type is always passed by reference.
type TabPageOverrides ¶
type TabPageOverrides struct { }
TabPageOverrides contains methods that are overridable.
type TabView ¶
type TabView struct { gtk.Widget // contains filtered or unexported fields }
TabView: dynamic tabbed container.
AdwTabView is a container which shows one child at a time. While it provides keyboard shortcuts for switching between pages, it does not provide a visible tab switcher and relies on external widgets for that, such as tabbar, taboverview and tabbutton.
AdwTabView maintains a tabpage object for each page, which holds additional per-page properties. You can obtain the AdwTabPage for a page with tabview.GetPage, and as the return value for tabview.Append and other functions for adding children.
AdwTabView only aims to be useful for dynamic tabs in multi-window document-based applications, such as web browsers, file managers, text editors or terminals. It does not aim to replace gtk.Notebook for use cases such as tabbed dialogs.
As such, it does not support disabling page reordering or detaching.
AdwTabView adds a number of global page switching and reordering shortcuts. The tabview:shortcuts property can be used to manage them.
See tabviewshortcuts for the list of the available shortcuts. All of the shortcuts are enabled by default.
tabview.AddShortcuts and tabview.RemoveShortcuts can be used to manage shortcuts in a convenient way, for example:
adw_tab_view_remove_shortcuts (view, ADW_TAB_VIEW_SHORTCUT_CONTROL_HOME | ADW_TAB_VIEW_SHORTCUT_CONTROL_END);
CSS nodes ¶
AdwTabView has a main CSS node with the name tabview.
Accessibility ¶
AdwTabView uses the GTK_ACCESSIBLE_ROLE_TAB_PANEL for the tab pages which are the accessible parent objects of the child widgets.
func NewTabView ¶
func NewTabView() *TabView
NewTabView creates a new AdwTabView.
The function returns the following values:
- tabView: newly created AdwTabView.
func (*TabView) AddPage ¶
AddPage adds child to self 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 NULL, this function is equivalent to tabview.Append.
The function takes the following parameters:
- child: widget to add.
- parent (optional) page for child.
The function returns the following values:
- tabPage: page object representing child.
func (*TabView) AddShortcuts ¶
func (self *TabView) AddShortcuts(shortcuts TabViewShortcuts)
AddShortcuts adds shortcuts for self.
See tabview:shortcuts for details.
The function takes the following parameters:
- shortcuts to add.
func (*TabView) Append ¶
Append inserts child as the last non-pinned page.
The function takes the following parameters:
- child: widget to add.
The function returns the following values:
- tabPage: page object representing child.
func (*TabView) AppendPinned ¶
AppendPinned inserts child as the last pinned page.
The function takes the following parameters:
- child: widget to add.
The function returns the following values:
- tabPage: page object representing child.
func (*TabView) CloseOtherPages ¶
CloseOtherPages requests to close all pages other than page.
The function takes the following parameters:
- page of self.
func (*TabView) ClosePage ¶
ClosePage requests to close page.
Calling this function will result in the 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 NULL, 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 NULL, 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.
The function takes the following parameters:
- page of self.
func (*TabView) ClosePageFinish ¶
ClosePageFinish completes a tabview.ClosePage call for page.
If confirm is TRUE, page will be closed. If it's FALSE, it 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.
The function takes the following parameters:
- page of self.
- confirm: whether to confirm or deny closing page.
func (*TabView) ClosePagesAfter ¶
ClosePagesAfter requests to close all pages after page.
The function takes the following parameters:
- page of self.
func (*TabView) ClosePagesBefore ¶
ClosePagesBefore requests to close all pages before page.
The function takes the following parameters:
- page of self.
func (*TabView) ConnectClosePage ¶
func (self *TabView) ConnectClosePage(f func(page *TabPage) (ok bool)) coreglib.SignalHandle
ConnectClosePage is emitted after tabview.ClosePage has been called for page.
The handler is expected to call tabview.ClosePageFinish to confirm or reject the closing.
The default handler will immediately confirm closing for non-pinned pages, or reject it for pinned pages, equivalent to the following example:
static gboolean close_page_cb (AdwTabView *view, AdwTabPage *page, gpointer user_data) { adw_tab_view_close_page_finish (view, page, !adw_tab_page_get_pinned (page)); return GDK_EVENT_STOP; }
The tabview.ClosePageFinish call doesn't have to happen inside the handler, so can be used to do asynchronous checks before confirming the closing.
A typical reason to connect to this signal is to show a confirmation dialog for closing a tab.
The signal handler should return GDK_EVENT_STOP to stop propagation or GDK_EVENT_CONTINUE to invoke the default handler.
func (*TabView) ConnectCreateWindow ¶
func (self *TabView) ConnectCreateWindow(f func() (tabView *TabView)) coreglib.SignalHandle
ConnectCreateWindow is emitted when a tab should be transferred into a new window.
This can happen after a tab has been dropped on desktop.
The signal handler is expected to create a new window, position it as needed and return its AdwTabView that the page will be transferred into.
func (*TabView) ConnectIndicatorActivated ¶
func (self *TabView) ConnectIndicatorActivated(f func(page *TabPage)) coreglib.SignalHandle
ConnectIndicatorActivated is emitted after the indicator icon on page has been activated.
See tabpage:indicator-icon and tabpage:indicator-activatable.
func (*TabView) ConnectPageAttached ¶
func (self *TabView) ConnectPageAttached(f func(page *TabPage, position int)) coreglib.SignalHandle
ConnectPageAttached is emitted when a page has been created or transferred to self.
A typical reason to connect to this signal would be to connect to page signals for things such as updating window title.
func (*TabView) ConnectPageDetached ¶
func (self *TabView) ConnectPageDetached(f func(page *TabPage, position int)) coreglib.SignalHandle
ConnectPageDetached is emitted when a page has been removed or transferred to another view.
A typical reason to connect to this signal would be to disconnect signal handlers connected in the tabview::page-attached handler.
It is important not to try and destroy the page child in the handler of this function as the child might merely be moved to another window; use child dispose handler for that or do it in sync with your tabview.ClosePageFinish calls.
func (*TabView) ConnectPageReordered ¶
func (self *TabView) ConnectPageReordered(f func(page *TabPage, position int)) coreglib.SignalHandle
ConnectPageReordered is emitted after page has been reordered to position.
func (*TabView) ConnectSetupMenu ¶
func (self *TabView) ConnectSetupMenu(f func(page *TabPage)) coreglib.SignalHandle
ConnectSetupMenu is emitted when a context menu is opened or closed for page.
If the menu has been closed, page will be set to NULL.
It can be used to set up menu actions before showing the menu, for example disable actions not applicable to page.
func (*TabView) DefaultIcon ¶
func (self *TabView) DefaultIcon() *gio.Icon
DefaultIcon gets the default icon of self.
The function returns the following values:
- icon: default icon of self.
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.
The function takes the following parameters:
- child: widget to add.
- position to add child at, starting from 0.
The function returns the following values:
- tabPage: page object representing child.
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.
The function takes the following parameters:
- child: widget to add.
- position to add child at, starting from 0.
The function returns the following values:
- tabPage: page object representing child.
func (*TabView) InvalidateThumbnails ¶
func (self *TabView) InvalidateThumbnails()
InvalidateThumbnails invalidates thumbnails for all pages in self.
This is a convenience method, equivalent to calling tabpage.InvalidateThumbnail on each page.
func (*TabView) IsTransferringPage ¶
IsTransferringPage: whether a page is being transferred.
The corresponding property will be set to TRUE when a drag-n-drop tab transfer starts on any AdwTabView, and to FALSE after it ends.
During the transfer, children cannot receive pointer input and a tab can be safely dropped on the tab view.
The function returns the following values:
- ok: whether a page is being transferred.
func (*TabView) MenuModel ¶
func (self *TabView) MenuModel() gio.MenuModeller
MenuModel gets the tab context menu model for self.
The function returns the following values:
- menuModel (optional): tab context menu model for self.
func (*TabView) NPages ¶
NPages gets the number of pages in self.
The function returns the following values:
- gint: number of pages in self.
func (*TabView) NPinnedPages ¶
NPinnedPages gets the number of pinned pages in self.
See tabview.SetPagePinned.
The function returns the following values:
- gint: number of pinned pages in self.
func (*TabView) NthPage ¶
NthPage gets the tabpage representing the child at position.
The function takes the following parameters:
- position: index of the page in self, starting from 0.
The function returns the following values:
- tabPage: page object at position.
func (*TabView) Page ¶
Page gets the tabpage object representing child.
The function takes the following parameters:
- child in self.
The function returns the following values:
- tabPage: page object for child.
func (*TabView) PagePosition ¶
PagePosition finds the position of page in self, starting from 0.
The function takes the following parameters:
- page of self.
The function returns the following values:
- gint: position of page in self.
func (*TabView) Pages ¶
func (self *TabView) Pages() *gtk.SelectionModel
Pages returns a gio.ListModel that contains the pages of self.
This can be used to keep an up-to-date view. The model also implements gtk.SelectionModel and can be used to track and change the selected page.
The function returns the following values:
- selectionModel: GtkSelectionModel for the pages of self.
func (*TabView) Prepend ¶
Prepend inserts child as the first non-pinned page.
The function takes the following parameters:
- child: widget to add.
The function returns the following values:
- tabPage: page object representing child.
func (*TabView) PrependPinned ¶
PrependPinned inserts child as the first pinned page.
The function takes the following parameters:
- child: widget to add.
The function returns the following values:
- tabPage: page object representing child.
func (*TabView) RemoveShortcuts ¶
func (self *TabView) RemoveShortcuts(shortcuts TabViewShortcuts)
RemoveShortcuts removes shortcuts from self.
See tabview:shortcuts for details.
The function takes the following parameters:
- shortcuts to reomve.
func (*TabView) ReorderBackward ¶
ReorderBackward reorders page to before its previous page if possible.
The function takes the following parameters:
- page of self.
The function returns the following values:
- ok: whether page was moved.
func (*TabView) ReorderFirst ¶
ReorderFirst reorders page to the first possible position.
The function takes the following parameters:
- page of self.
The function returns the following values:
- ok: whether page was moved.
func (*TabView) ReorderForward ¶
ReorderForward reorders page to after its next page if possible.
The function takes the following parameters:
- page of self.
The function returns the following values:
- ok: whether page was moved.
func (*TabView) ReorderLast ¶
ReorderLast reorders page to the last possible position.
The function takes the following parameters:
- page of self.
The function returns the following values:
- ok: whether page was moved.
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.
The function takes the following parameters:
- page of self.
- position to insert the page at, starting at 0.
The function returns the following values:
- ok: whether page was moved.
func (*TabView) SelectNextPage ¶
SelectNextPage selects the page after the currently selected page.
If the last page was already selected, this function does nothing.
The function returns the following values:
- ok: whether the selected page was changed.
func (*TabView) SelectPreviousPage ¶
SelectPreviousPage selects the page before the currently selected page.
If the first page was already selected, this function does nothing.
The function returns the following values:
- ok: whether the selected page was changed.
func (*TabView) SelectedPage ¶
SelectedPage gets the currently selected page in self.
The function returns the following values:
- tabPage (optional): selected page.
func (*TabView) SetDefaultIcon ¶
func (self *TabView) SetDefaultIcon(defaultIcon gio.Iconner)
SetDefaultIcon sets the default page icon for self.
If a page doesn't provide its own icon via tabpage:icon, a 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.
taboverview will use default icon for pages with missing thumbnails.
By default, the adw-tab-icon-missing-symbolic icon is used.
The function takes the following parameters:
- defaultIcon: default icon.
func (*TabView) SetMenuModel ¶
func (self *TabView) SetMenuModel(menuModel gio.MenuModeller)
SetMenuModel sets the tab context menu model for self.
When a context menu is shown for a tab, it will be constructed from the provided menu model. Use the tabview::setup-menu signal to set up the menu actions for the particular tab.
The function takes the following parameters:
- menuModel (optional): menu model.
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 self 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
taboverview will not show a thumbnail for pinned pages, and replace the close button with an unpin button. Unlike AdwTabBar, it will still display the page's title, icon and indicator separately.
Pinned pages cannot be closed by default, see tabview::close-page for how to override that behavior.
Changes the value of the tabpage:pinned property.
The function takes the following parameters:
- page of self.
- pinned: whether page should be pinned.
func (*TabView) SetSelectedPage ¶
SetSelectedPage sets the currently selected page in self.
The function takes the following parameters:
- selectedPage: page in self.
func (*TabView) SetShortcuts ¶
func (self *TabView) SetShortcuts(shortcuts TabViewShortcuts)
SetShortcuts sets the enabled shortcuts for self.
See tabviewshortcuts for the list of the available shortcuts. All of the shortcuts are enabled by default.
tabview.AddShortcuts and tabview.RemoveShortcuts provide a convenient way to manage individual shortcuts.
The function takes the following parameters:
- shortcuts: new shortcuts.
func (*TabView) Shortcuts ¶
func (self *TabView) Shortcuts() TabViewShortcuts
Shortcuts gets the enabled shortcuts for self.
The function returns the following values:
- tabViewShortcuts: shortcut mask.
func (*TabView) TransferPage ¶
TransferPage transfers page from self 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.
The function takes the following parameters:
- page of self.
- otherView: tab view to transfer the page to.
- position to insert the page at, starting at 0.
type TabViewClass ¶
type TabViewClass struct {
// contains filtered or unexported fields
}
TabViewClass: instance of this type is always passed by reference.
func (*TabViewClass) ParentClass ¶
func (t *TabViewClass) ParentClass() *gtk.WidgetClass
type TabViewOverrides ¶
type TabViewOverrides struct { }
TabViewOverrides contains methods that are overridable.
type TabViewShortcuts ¶
TabViewShortcuts describes available shortcuts in an tabview.
Shortcuts can be set with tabview:shortcuts, or added/removed individually with tabview.AddShortcuts and tabview.RemoveShortcuts.
New values may be added to this enumeration over time.
const ( // TabViewShortcutNone: no shortcuts. TabViewShortcutNone TabViewShortcuts = 0b0 // TabViewShortcutControlTab: <kbd>Ctrl</kbd>+<kbd>Tab</kbd> - switch to the // next page. TabViewShortcutControlTab TabViewShortcuts = 0b1 // TabViewShortcutControlShiftTab: // <kbd>Shift</kbd>+<kbd>Ctrl</kbd>+<kbd>Tab</kbd> - switch to the previous // page. TabViewShortcutControlShiftTab TabViewShortcuts = 0b10 // TabViewShortcutControlPageUp: <kbd>Ctrl</kbd>+<kbd>Page Up</kbd> - switch // to the previous page. TabViewShortcutControlPageUp TabViewShortcuts = 0b100 // TabViewShortcutControlPageDown: <kbd>Ctrl</kbd>+<kbd>Page Down</kbd> - // switch to the next page. TabViewShortcutControlPageDown TabViewShortcuts = 0b1000 // TabViewShortcutControlHome: <kbd>Ctrl</kbd>+<kbd>Home</kbd> - switch to // the first page. TabViewShortcutControlHome TabViewShortcuts = 0b10000 // TabViewShortcutControlEnd: <kbd>Ctrl</kbd>+<kbd>End</kbd> - switch to the // last page. TabViewShortcutControlEnd TabViewShortcuts = 0b100000 // TabViewShortcutControlShiftPageUp: // <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Page Up</kbd> - move the selected // page backward. TabViewShortcutControlShiftPageUp TabViewShortcuts = 0b1000000 // TabViewShortcutControlShiftPageDown: // <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Page Down</kbd> - move the selected // page forward. TabViewShortcutControlShiftPageDown TabViewShortcuts = 0b10000000 // TabViewShortcutControlShiftHome: // <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Home</kbd> - move the selected page // at the start. TabViewShortcutControlShiftHome TabViewShortcuts = 0b100000000 // TabViewShortcutControlShiftEnd: // <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>End</kbd> - move the current page // at the end. TabViewShortcutControlShiftEnd TabViewShortcuts = 0b1000000000 // TabViewShortcutAltDigits: <kbd>Alt</kbd>+<kbd>1</kbd>⋯<kbd>9</kbd> - // switch to pages 1-9. TabViewShortcutAltDigits TabViewShortcuts = 0b10000000000 // TabViewShortcutAltZero: <kbd>Alt</kbd>+<kbd>0</kbd> - switch to page 10. TabViewShortcutAltZero TabViewShortcuts = 0b100000000000 // TabViewShortcutAllShortcuts: all of the shortcuts. TabViewShortcutAllShortcuts TabViewShortcuts = 0b111111111111 )
func (TabViewShortcuts) Has ¶
func (t TabViewShortcuts) Has(other TabViewShortcuts) bool
Has returns true if t contains other.
func (TabViewShortcuts) String ¶
func (t TabViewShortcuts) String() string
String returns the names in string for TabViewShortcuts.
type TimedAnimation ¶
type TimedAnimation struct { Animation // contains filtered or unexported fields }
TimedAnimation: time-based animation.
AdwTimedAnimation implements a simple animation interpolating the given value from timedanimation:value-from to timedanimation:value-to over timedanimation:duration milliseconds using the curve described by timedanimation:easing.
If timedanimation:reverse is set to TRUE, AdwTimedAnimation will instead animate from timedanimation:value-to to timedanimation:value-from, and the easing curve will be inverted.
The animation can repeat a certain amount of times, or endlessly, depending on the timedanimation:repeat-count value. If timedanimation:alternate is set to TRUE, it will also change the direction every other iteration.
func NewTimedAnimation ¶
func NewTimedAnimation(widget gtk.Widgetter, from, to float64, duration uint, target AnimationTargetter) *TimedAnimation
NewTimedAnimation creates a new AdwTimedAnimation on widget to animate target from from to to.
The function takes the following parameters:
- widget to create animation on.
- from: value to animate from.
- to: value to animate to.
- duration for the animation.
- target value to animate.
The function returns the following values:
- timedAnimation: newly created animation.
func (*TimedAnimation) Alternate ¶
func (self *TimedAnimation) Alternate() bool
Alternate gets whether self changes direction on every iteration.
The function returns the following values:
- ok: whether self alternates.
func (*TimedAnimation) Duration ¶
func (self *TimedAnimation) Duration() uint
Duration gets the duration of self.
The function returns the following values:
- guint: duration of self, in milliseconds.
func (*TimedAnimation) Easing ¶
func (self *TimedAnimation) Easing() Easing
Easing gets the easing function self uses.
The function returns the following values:
- easing function self uses.
func (*TimedAnimation) RepeatCount ¶
func (self *TimedAnimation) RepeatCount() uint
RepeatCount gets the number of times self will play.
The function returns the following values:
- guint: number of times self will play.
func (*TimedAnimation) Reverse ¶
func (self *TimedAnimation) Reverse() bool
Reverse gets whether self plays backwards.
The function returns the following values:
- ok: whether self plays backwards.
func (*TimedAnimation) SetAlternate ¶
func (self *TimedAnimation) SetAlternate(alternate bool)
SetAlternate sets whether self changes direction on every iteration.
The function takes the following parameters:
- alternate: whether self alternates.
func (*TimedAnimation) SetDuration ¶
func (self *TimedAnimation) SetDuration(duration uint)
SetDuration sets the duration of self.
If the animation repeats more than once, sets the duration of one iteration.
The function takes the following parameters:
- duration to use, in milliseconds.
func (*TimedAnimation) SetEasing ¶
func (self *TimedAnimation) SetEasing(easing Easing)
SetEasing sets the easing function self will use.
See easing for the description of specific easing functions.
The function takes the following parameters:
- easing function to use.
func (*TimedAnimation) SetRepeatCount ¶
func (self *TimedAnimation) SetRepeatCount(repeatCount uint)
SetRepeatCount sets the number of times self will play.
If set to 0, self will repeat endlessly.
The function takes the following parameters:
- repeatCount: number of times self will play.
func (*TimedAnimation) SetReverse ¶
func (self *TimedAnimation) SetReverse(reverse bool)
SetReverse sets whether self plays backwards.
The function takes the following parameters:
- reverse: whether self plays backwards.
func (*TimedAnimation) SetValueFrom ¶
func (self *TimedAnimation) SetValueFrom(value float64)
SetValueFrom sets the value self will animate from.
The animation will start at this value and end at timedanimation:value-to.
If timedanimation:reverse is TRUE, the animation will end at this value instead.
The function takes the following parameters:
- value to animate from.
func (*TimedAnimation) SetValueTo ¶
func (self *TimedAnimation) SetValueTo(value float64)
SetValueTo sets the value self will animate to.
The animation will start at timedanimation:value-from and end at this value.
If timedanimation:reverse is TRUE, the animation will start at this value instead.
The function takes the following parameters:
- value to animate to.
func (*TimedAnimation) ValueFrom ¶
func (self *TimedAnimation) ValueFrom() float64
ValueFrom gets the value self will animate from.
The function returns the following values:
- gdouble: value to animate from.
func (*TimedAnimation) ValueTo ¶
func (self *TimedAnimation) ValueTo() float64
ValueTo gets the value self will animate to.
The function returns the following values:
- gdouble: value to animate to.
type Toast ¶
Toast: helper object for toastoverlay.
Toasts are meant to be passed into toastoverlay.AddToast as follows:
adw_toast_overlay_add_toast (overlay, adw_toast_new (_("Simple Toast")));
<picture> <source srcset="toast-simple-dark.png" media="(prefers-color-scheme: dark)"> <img src="toast-simple.png" alt="toast-simple"> </picture>
Toasts always have a close button. They emit the toast::dismissed signal when disappearing.
toast:timeout determines how long the toast stays on screen, while toast:priority determines how it behaves if another toast is already being displayed.
Toast titles use Pango markup by default, set toast:use-markup to FALSE if this is unwanted.
toast:custom-title can be used to replace the title label with a custom widget.
Actions ¶
Toasts can have one button on them, with a label and an attached gio.Action.
AdwToast *toast = adw_toast_new (_("Toast with Action")); adw_toast_set_button_label (toast, _("_Example")); adw_toast_set_action_name (toast, "win.example"); adw_toast_overlay_add_toast (overlay, toast);
<picture> <source srcset="toast-action-dark.png" media="(prefers-color-scheme: dark)"> <img src="toast-action.png" alt="toast-action"> </picture>
Modifying toasts ¶
Toasts can be modified after they have been shown. For this, an AdwToast reference must be kept around while the toast is visible.
A common use case for this is using toasts as undo prompts that stack with each other, allowing to batch undo the last deleted items:
static void toast_undo_cb (GtkWidget *sender, const char *action, GVariant *param) { // Undo the deletion } static void dismissed_cb (MyWindow *self) { self->undo_toast = NULL; // Permanently delete the items } static void delete_item (MyWindow *self, MyItem *item) { g_autofree char *title = NULL; int n_items; // Mark the item as waiting for deletion n_items = ... // The number of waiting items if (!self->undo_toast) { self->undo_toast = adw_toast_new_format (_("‘s’ deleted"), ...); adw_toast_set_priority (self->undo_toast, ADW_TOAST_PRIORITY_HIGH); adw_toast_set_button_label (self->undo_toast, _("_Undo")); adw_toast_set_action_name (self->undo_toast, "toast.undo"); g_signal_connect_swapped (self->undo_toast, "dismissed", G_CALLBACK (dismissed_cb), self); adw_toast_overlay_add_toast (self->toast_overlay, self->undo_toast); return; } title = g_strdup_printf (ngettext ("<span font_features='tnum=1'>d</span> item deleted", "<span font_features='tnum=1'>d</span> items deleted", n_items), n_items); adw_toast_set_title (self->undo_toast, title); // Bump the toast timeout adw_toast_overlay_add_toast (self->toast_overlay, g_object_ref (self->undo_toast)); } static void my_window_class_init (MyWindowClass *klass) { GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); gtk_widget_class_install_action (widget_class, "toast.undo", NULL, toast_undo_cb); }
<picture> <source srcset="toast-undo-dark.png" media="(prefers-color-scheme: dark)"> <img src="toast-undo.png" alt="toast-undo"> </picture>.
func NewToast ¶
NewToast creates a new AdwToast.
The toast will use title as its title.
title can be marked up with the Pango text markup language.
The function takes the following parameters:
- title to be displayed.
The function returns the following values:
- toast: new created AdwToast.
func (*Toast) ActionName ¶
ActionName gets the name of the associated action.
The function returns the following values:
- utf8 (optional): action name.
func (*Toast) ActionTargetValue ¶
func (self *Toast) ActionTargetValue() *glib.Variant
ActionTargetValue gets the parameter for action invocations.
The function returns the following values:
- variant (optional): action target.
func (*Toast) ButtonLabel ¶
ButtonLabel gets the label to show on the button.
The function returns the following values:
- utf8 (optional): button label.
func (*Toast) ConnectButtonClicked ¶
func (self *Toast) ConnectButtonClicked(f func()) coreglib.SignalHandle
ConnectButtonClicked is emitted after the button has been clicked.
It can be used as an alternative to setting an action.
func (*Toast) ConnectDismissed ¶
func (self *Toast) ConnectDismissed(f func()) coreglib.SignalHandle
ConnectDismissed is emitted when the toast has been dismissed.
func (*Toast) CustomTitle ¶
func (self *Toast) CustomTitle() gtk.Widgetter
CustomTitle gets the custom title widget of self.
The function returns the following values:
- widget (optional): custom title widget.
func (*Toast) Dismiss ¶
func (self *Toast) Dismiss()
Dismiss dismisses self.
Does nothing if self has already been dismissed, or hasn't been added to an toastoverlay.
func (*Toast) Priority ¶
func (self *Toast) Priority() ToastPriority
Priority gets priority for self.
The function returns the following values:
- toastPriority: priority.
func (*Toast) SetActionName ¶
SetActionName sets the name of the associated action.
It will be activated when clicking the button.
See toast:action-target.
The function takes the following parameters:
- actionName (optional): action name.
func (*Toast) SetActionTargetValue ¶
func (self *Toast) SetActionTargetValue(actionTarget *glib.Variant)
SetActionTargetValue sets the parameter for action invocations.
If the action_target variant has a floating reference this function will sink it.
The function takes the following parameters:
- actionTarget (optional): action target.
func (*Toast) SetButtonLabel ¶
SetButtonLabel sets the label to show on the button.
Underlines in the button text can be used to indicate a mnemonic.
If set to NULL, the button won't be shown.
See toast:action-name.
The function takes the following parameters:
- buttonLabel (optional): button label.
func (*Toast) SetCustomTitle ¶
func (self *Toast) SetCustomTitle(widget gtk.Widgetter)
SetCustomTitle sets the custom title widget of self.
It will be displayed instead of the title if set. In this case, toast:title is ignored.
Setting a custom title will unset toast:title.
The function takes the following parameters:
- widget (optional): custom title widget.
func (*Toast) SetDetailedActionName ¶
SetDetailedActionName sets the action name and its parameter.
detailed_action_name is a string in the format accepted by gio.Action().ParseDetailedName.
The function takes the following parameters:
- detailedActionName (optional): detailed action name.
func (*Toast) SetPriority ¶
func (self *Toast) SetPriority(priority ToastPriority)
SetPriority sets priority for self.
Priority controls how the toast behaves when another toast is already being displayed.
If priority is ADW_TOAST_PRIORITY_NORMAL, the toast will be queued.
If priority is ADW_TOAST_PRIORITY_HIGH, the toast will be displayed immediately, pushing the previous toast into the queue instead.
The function takes the following parameters:
- priority: priority.
func (*Toast) SetTimeout ¶
SetTimeout sets timeout for self.
If timeout is 0, the toast is displayed indefinitely until manually dismissed.
Toasts cannot disappear while being hovered, pressed (on touchscreen), or have keyboard focus inside them.
The function takes the following parameters:
- timeout: timeout.
func (*Toast) SetTitle ¶
SetTitle sets the title that will be displayed on the toast.
The title can be marked up with the Pango text markup language.
Setting a title will unset toast:custom-title.
If toast:custom-title is set, it will be used instead.
The function takes the following parameters:
- title: title.
func (*Toast) SetUseMarkup ¶
SetUseMarkup: whether to use Pango markup for the toast title.
See also pango.ParseMarkup().
The function takes the following parameters:
- useMarkup: whether to use markup.
func (*Toast) Timeout ¶
Timeout gets timeout for self.
The function returns the following values:
- guint: timeout.
type ToastClass ¶
type ToastClass struct {
// contains filtered or unexported fields
}
ToastClass: instance of this type is always passed by reference.
type ToastOverlay ¶
type ToastOverlay struct { gtk.Widget // contains filtered or unexported fields }
ToastOverlay: widget showing toasts above its content.
<picture> <source srcset="toast-overlay-dark.png" media="(prefers-color-scheme: dark)"> <img src="toast-overlay.png" alt="toast-overlay"> </picture>
Much like gtk.Overlay, AdwToastOverlay is a container with a single main child, on top of which it can display a toast, overlaid. Toasts can be shown with toastoverlay.AddToast.
See toast for details.
CSS nodes
toastoverlay ├── [child] ├── toast ┊ ├── widget ┊ │ ├── [label.heading] │ ╰── [custom title] ├── [button] ╰── button.circular.flat
AdwToastOverlay's CSS node is called toastoverlay. It contains the child, as well as zero or more toast subnodes.
Each of the toast nodes contains a widget subnode, optionally a button subnode, and another button subnode with .circular and .flat style classes.
The widget subnode contains a label subnode with the .heading style class, or a custom widget provided by the application.
Accessibility ¶
AdwToastOverlay uses the GTK_ACCESSIBLE_ROLE_TAB_GROUP role.
func NewToastOverlay ¶
func NewToastOverlay() *ToastOverlay
NewToastOverlay creates a new AdwToastOverlay.
The function returns the following values:
- toastOverlay: new created AdwToastOverlay.
func (*ToastOverlay) AddToast ¶
func (self *ToastOverlay) AddToast(toast *Toast)
AddToast displays toast.
Only one toast can be shown at a time; if a toast is already being displayed, either toast or the original toast will be placed in a queue, depending on the priority of toast. See toast:priority.
If called on a toast that's already displayed, its timeout will be reset.
If called on a toast currently in the queue, the toast will be bumped forward to be shown as soon as possible.
The function takes the following parameters:
- toast: toast.
func (*ToastOverlay) Child ¶
func (self *ToastOverlay) Child() gtk.Widgetter
Child gets the child widget of self.
The function returns the following values:
- widget (optional): child widget of self.
func (*ToastOverlay) SetChild ¶
func (self *ToastOverlay) SetChild(child gtk.Widgetter)
SetChild sets the child widget of self.
The function takes the following parameters:
- child (optional) widget.
type ToastOverlayClass ¶
type ToastOverlayClass struct {
// contains filtered or unexported fields
}
ToastOverlayClass: instance of this type is always passed by reference.
func (*ToastOverlayClass) ParentClass ¶
func (t *ToastOverlayClass) ParentClass() *gtk.WidgetClass
type ToastOverlayOverrides ¶
type ToastOverlayOverrides struct { }
ToastOverlayOverrides contains methods that are overridable.
type ToastOverrides ¶
type ToastOverrides struct { }
ToastOverrides contains methods that are overridable.
type ToastPriority ¶
ToastPriority: toast behavior when another toast is already displayed.
const ( // ToastPriorityNormal: toast will be queued if another toast is already // displayed. ToastPriorityNormal ToastPriority = iota // ToastPriorityHigh: toast will be displayed immediately, pushing the // previous toast into the queue instead. ToastPriorityHigh )
func (ToastPriority) String ¶
func (t ToastPriority) String() string
String returns the name in string for ToastPriority.
type ToolbarStyle ¶
ToolbarStyle describes the possible top or bottom bar styles in an toolbarview widget.
ADW_TOOLBAR_FLAT is suitable for simple content, such as statuspage or preferencespage, where the background at the top and bottom parts of the page is uniform. Additionally, windows with sidebars should always use this style.
<picture style="min-width: 33%; display: inline-block;"> <source srcset="toolbar-view-flat-1-dark.png" media="(prefers-color-scheme: dark)"> <img src="toolbar-view-flat-1.png" alt="toolbar-view-flat-1"> </picture> <picture style="min-width: 33%; display: inline-block;"> <source srcset="toolbar-view-flat-2-dark.png" media="(prefers-color-scheme: dark)"> <img src="toolbar-view-flat-2.png" alt="toolbar-view-flat-2"> </picture>
ADW_TOOLBAR_RAISED style is suitable for content such as utility panes (https://developer.gnome.org/hig/patterns/containers/utility-panes.html), where some elements are directly adjacent to the top/bottom bars, or tabview, where each page can have a different background.
ADW_TOOLBAR_RAISED_BORDER style is similar to ADW_TOOLBAR_RAISED, but with the shadow replaced with a more subtle border. It's intended to be used in applications like image viewers, where a shadow over the content might be undesired.
<picture style="min-width: 33%; display: inline-block;"> <source srcset="toolbar-view-raised-dark.png" media="(prefers-color-scheme: dark)"> <img src="toolbar-view-raised.png" alt="toolbar-view-raised"> </picture> <picture style="min-width: 33%; display: inline-block;"> <source srcset="toolbar-view-raised-border-dark.png" media="(prefers-color-scheme: dark)"> <img src="toolbar-view-raised-border.png" alt="toolbar-view-raised-border"> </picture>
See toolbarview:top-bar-style and toolbarview:bottom-bar-style.
New values may be added to this enumeration over time.
const ( // ToolbarFlat: no background, shadow only for scrolled content. ToolbarFlat ToolbarStyle = iota // ToolbarRaised: opaque background with a persistent shadow. ToolbarRaised // ToolbarRaisedBorder: opaque background with a persistent border. ToolbarRaisedBorder )
func (ToolbarStyle) String ¶
func (t ToolbarStyle) String() string
String returns the name in string for ToolbarStyle.
type ToolbarView ¶
type ToolbarView struct { gtk.Widget // contains filtered or unexported fields }
ToolbarView: widget containing a page, as well as top and/or bottom bars.
<picture> <source srcset="toolbar-view-dark.png" media="(prefers-color-scheme: dark)"> <img src="toolbar-view.png" alt="toolbar-view"> </picture>
AdwToolbarView has a single content widget and one or multiple top and bottom bars, shown at the top and bottom sides respectively.
Example of an AdwToolbarView UI definition:
<object class="AdwToolbarView"> <child type="top"> <object class="AdwHeaderBar"/> </child> <property name="content"> <object class="AdwPreferencesPage"> <!-- ... --> </object> </property> </object>
The following kinds of top and bottom bars are supported:
- headerbar
- tabbar
- viewswitcherbar
- gtk.ActionBar
- gtk.HeaderBar
- gtk.PopoverMenuBar
- gtk.SearchBar
- Any gtk.Box or a similar widget with the .toolbar (style-classes.html#toolbars) style class
By default, top and bottom bars are flat and scrolling content has a subtle undershoot shadow, same as when using the .undershoot-top (style-classes.html#undershoot-indicators) and .undershoot-bottom (style-classes.html#undershoot-indicators) style classes. This works well in most cases, e.g. with statuspage or preferencespage, where the background at the top and bottom parts of the page is uniform. Additionally, windows with sidebars should always use this style.
toolbarview:top-bar-style and toolbarview:bottom-bar-style properties can be used add an opaque background and a persistent shadow to top and bottom bars, this can be useful for content such as utility panes (https://developer.gnome.org/hig/patterns/containers/utility-panes.html), where some elements are adjacent to the top/bottom bars, or tabview, where each page can have a different background.
<picture style="min-width: 33%; display: inline-block;"> <source srcset="toolbar-view-flat-1-dark.png" media="(prefers-color-scheme: dark)"> <img src="toolbar-view-flat-1.png" alt="toolbar-view-flat-1"> </picture> <picture style="min-width: 33%; display: inline-block;"> <source srcset="toolbar-view-flat-2-dark.png" media="(prefers-color-scheme: dark)"> <img src="toolbar-view-flat-2.png" alt="toolbar-view-flat-2"> </picture> <picture style="min-width: 33%; display: inline-block;"> <source srcset="toolbar-view-raised-dark.png" media="(prefers-color-scheme: dark)"> <img src="toolbar-view-raised.png" alt="toolbar-view-raised"> </picture>
AdwToolbarView ensures the top and bottom bars have consistent backdrop styles and vertical spacing. For comparison:
<picture style="min-width: 40%; display: inline-block;"> <source srcset="toolbar-view-spacing-dark.png" media="(prefers-color-scheme: dark)"> <img src="toolbar-view-spacing.png" alt="toolbar-view-spacing"> </picture> <picture style="min-width: 40%; display: inline-block;"> <source srcset="toolbar-view-spacing-box-dark.png" media="(prefers-color-scheme: dark)"> <img src="toolbar-view-spacing-box.png" alt="toolbar-view-spacing-box"> </picture>
Any top and bottom bars can also be dragged to move the window, equivalent to putting them into a gtk.WindowHandle.
Content is typically place between top and bottom bars, but can also extend behind them. This is controlled with the toolbarview:extend-content-to-top-edge and toolbarview:extend-content-to-bottom-edge properties.
Top and bottom bars can be hidden and revealed with an animation using the toolbarview:reveal-top-bars and toolbarview:reveal-bottom-bars properties.
AdwToolbarView as GtkBuildable ¶
The AdwToolbarView implementation of the gtk.Buildable interface supports adding a top bar by specifying “top” as the “type” attribute of a <child> element, or adding a bottom bar by specifying “bottom”.
Accessibility ¶
AdwToolbarView uses the GTK_ACCESSIBLE_ROLE_GROUP role.
func NewToolbarView ¶
func NewToolbarView() *ToolbarView
NewToolbarView creates a new AdwToolbarView.
The function returns the following values:
- toolbarView: newly created AdwToolbarView.
func (*ToolbarView) AddBottomBar ¶
func (self *ToolbarView) AddBottomBar(widget gtk.Widgetter)
AddBottomBar adds a bottom bar to self.
The function takes the following parameters:
- widget: widget.
func (*ToolbarView) AddTopBar ¶
func (self *ToolbarView) AddTopBar(widget gtk.Widgetter)
AddTopBar adds a top bar to self.
The function takes the following parameters:
- widget: widget.
func (*ToolbarView) BottomBarHeight ¶
func (self *ToolbarView) BottomBarHeight() int
BottomBarHeight gets the current bottom bar height for self.
Bottom bar height does change depending on toolbarview:reveal-bottom-bars, including during the transition.
See toolbarview.GetTopBarHeight.
The function returns the following values:
- gint: current bottom bar height.
func (*ToolbarView) BottomBarStyle ¶
func (self *ToolbarView) BottomBarStyle() ToolbarStyle
BottomBarStyle gets appearance of the botom bars for self.
The function returns the following values:
- toolbarStyle: bottom bar style.
func (*ToolbarView) Content ¶
func (self *ToolbarView) Content() gtk.Widgetter
Content gets the content widget for self.
The function returns the following values:
- widget (optional): content widget.
func (*ToolbarView) ExtendContentToBottomEdge ¶
func (self *ToolbarView) ExtendContentToBottomEdge() bool
ExtendContentToBottomEdge gets whether the content widget can extend behind bottom bars.
The function returns the following values:
- ok: whether content extends behind bottom bars.
func (*ToolbarView) ExtendContentToTopEdge ¶
func (self *ToolbarView) ExtendContentToTopEdge() bool
ExtendContentToTopEdge gets whether the content widget can extend behind top bars.
The function returns the following values:
- ok: whether content extends behind top bars.
func (*ToolbarView) Remove ¶
func (self *ToolbarView) Remove(widget gtk.Widgetter)
Remove removes a child from self.
The function takes the following parameters:
- widget: child to be removed.
func (*ToolbarView) RevealBottomBars ¶
func (self *ToolbarView) RevealBottomBars() bool
RevealBottomBars gets whether bottom bars are revealed for self.
The function returns the following values:
- ok: whether bottom bars are revealed.
func (*ToolbarView) RevealTopBars ¶
func (self *ToolbarView) RevealTopBars() bool
RevealTopBars gets whether top bars are revealed for self.
The function returns the following values:
- ok: whether top bars are revealed.
func (*ToolbarView) SetBottomBarStyle ¶
func (self *ToolbarView) SetBottomBarStyle(style ToolbarStyle)
SetBottomBarStyle sets appearance of the bottom bars for self.
If set to ADW_TOOLBAR_FLAT, bottom bars are flat and scrolling content has a subtle undershoot shadow when touching them, same as the .undershoot-bottom (style-classes.html#undershoot-indicators) style class. This works well for simple content, e.g. statuspage or preferencespage, where the background at the bottom of the page is uniform. Additionally, windows with sidebars should always use this style.
Undershoot shadow is only present if a bottom bar is actually present and visible. It is also never present if toolbarview:extend-content-to-bottom-edge is set to TRUE.
If set to ADW_TOOLBAR_RAISED, bottom bars have an opaque background and a persistent shadow, this is suitable for content such as utility panes (https://developer.gnome.org/hig/patterns/containers/utility-panes.html), where some elements are directly adjacent to the bottom bars, or tabview, where each page can have a different background.
ADW_TOOLBAR_RAISED_BORDER is similar to ADW_TOOLBAR_RAISED, but the shadow is replaced with a more subtle border. This can be useful for applications like image viewers.
See also toolbarview.SetTopBarStyle.
The function takes the following parameters:
- style: bottom bar style.
func (*ToolbarView) SetContent ¶
func (self *ToolbarView) SetContent(content gtk.Widgetter)
SetContent sets the content widget for self.
The function takes the following parameters:
- content (optional) widget.
func (*ToolbarView) SetExtendContentToBottomEdge ¶
func (self *ToolbarView) SetExtendContentToBottomEdge(extend bool)
SetExtendContentToBottomEdge sets whether the content widget can extend behind bottom bars.
This can be used in combination with toolbarview:reveal-bottom-bars to show and hide toolbars in fullscreen.
See toolbarview.SetExtendContentToTopEdge.
The function takes the following parameters:
- extend: whether content extends behind bottom bars.
func (*ToolbarView) SetExtendContentToTopEdge ¶
func (self *ToolbarView) SetExtendContentToTopEdge(extend bool)
SetExtendContentToTopEdge sets whether the content widget can extend behind top bars.
This can be used in combination with toolbarview:reveal-top-bars to show and hide toolbars in fullscreen.
See toolbarview.SetExtendContentToBottomEdge.
The function takes the following parameters:
- extend: whether content extends behind top bars.
func (*ToolbarView) SetRevealBottomBars ¶
func (self *ToolbarView) SetRevealBottomBars(reveal bool)
SetRevealBottomBars sets whether bottom bars are revealed for self.
The transition will be animated.
This can be used in combination with toolbarview:extend-content-to-bottom-edge to show and hide toolbars in fullscreen.
See toolbarview.SetRevealTopBars.
The function takes the following parameters:
- reveal: whether to reveal bottom bars.
func (*ToolbarView) SetRevealTopBars ¶
func (self *ToolbarView) SetRevealTopBars(reveal bool)
SetRevealTopBars sets whether top bars are revealed for self.
The transition will be animated.
This can be used in combination with toolbarview:extend-content-to-top-edge to show and hide toolbars in fullscreen.
See toolbarview.SetRevealBottomBars.
The function takes the following parameters:
- reveal: whether to reveal top bars.
func (*ToolbarView) SetTopBarStyle ¶
func (self *ToolbarView) SetTopBarStyle(style ToolbarStyle)
SetTopBarStyle sets appearance of the top bars for self.
If set to ADW_TOOLBAR_FLAT, top bars are flat and scrolling content has a subtle undershoot shadow when touching them, same as the .undershoot-top (style-classes.html#undershoot-indicators) style class. This works well for simple content, e.g. statuspage or preferencespage, where the background at the top of the page is uniform. Additionally, windows with sidebars should always use this style.
Undershoot shadow is only present if a top bar is actually present and visible. It is also never present if toolbarview:extend-content-to-top-edge is set to TRUE.
If set to ADW_TOOLBAR_RAISED, top bars have an opaque background and a persistent shadow, this is suitable for content such as utility panes (https://developer.gnome.org/hig/patterns/containers/utility-panes.html), where some elements are directly adjacent to the top bars, or tabview, where each page can have a different background.
ADW_TOOLBAR_RAISED_BORDER is similar to ADW_TOOLBAR_RAISED, but the shadow is replaced with a more subtle border. This can be useful for applications like image viewers.
See also toolbarview.SetBottomBarStyle.
The function takes the following parameters:
- style: top bar style.
func (*ToolbarView) TopBarHeight ¶
func (self *ToolbarView) TopBarHeight() int
TopBarHeight gets the current top bar height for self.
Top bar height does change depending on toolbarview:reveal-top-bars, including during the transition.
See toolbarview.GetBottomBarHeight.
The function returns the following values:
- gint: current top bar height.
func (*ToolbarView) TopBarStyle ¶
func (self *ToolbarView) TopBarStyle() ToolbarStyle
TopBarStyle gets appearance of the top bars for self.
The function returns the following values:
- toolbarStyle: top bar style.
type ToolbarViewClass ¶
type ToolbarViewClass struct {
// contains filtered or unexported fields
}
ToolbarViewClass: instance of this type is always passed by reference.
func (*ToolbarViewClass) ParentClass ¶
func (t *ToolbarViewClass) ParentClass() *gtk.WidgetClass
type ToolbarViewOverrides ¶
type ToolbarViewOverrides struct { }
ToolbarViewOverrides contains methods that are overridable.
type ViewStack ¶
type ViewStack struct { gtk.Widget // contains filtered or unexported fields }
ViewStack: view container for viewswitcher.
AdwViewStack is a container which only shows one page at a time. It is typically used to hold an application's main views.
It doesn't provide a way to transition between pages. Instead, a separate widget such as viewswitcher can be used with AdwViewStack to provide this functionality.
AdwViewStack pages can have a title, an icon, an attention request, and a numbered badge that viewswitcher will use to let users identify which page is which. Set them using the viewstackpage:title, viewstackpage:icon-name, viewstackpage:needs-attention, and viewstackpage:badge-number properties.
Unlike gtk.Stack, transitions between views are not animated.
AdwViewStack maintains a viewstackpage object for each added child, which holds additional per-child properties. You obtain the viewstackpage for a child with viewstack.GetPage and you can obtain a gtk.SelectionModel containing all the pages with viewstack.GetPages.
AdwViewStack as GtkBuildable ¶
To set child-specific properties in a .ui file, create viewstackpage objects explicitly, and set the child widget as a property on it:
<object class="AdwViewStack" id="stack"> <child> <object class="AdwViewStackPage"> <property name="name">overview</property> <property name="title">Overview</property> <property name="child"> <object class="AdwStatusPage"> <property name="title">Welcome!</property> </object> </property> </object> </child> </object>
CSS nodes ¶
AdwViewStack has a single CSS node named stack.
Accessibility ¶
AdwViewStack uses the GTK_ACCESSIBLE_ROLE_TAB_PANEL for the stack pages which are the accessible parent objects of the child widgets.
func NewViewStack ¶
func NewViewStack() *ViewStack
NewViewStack creates a new AdwViewStack.
The function returns the following values:
- viewStack: newly created AdwViewStack.
func (*ViewStack) Add ¶
func (self *ViewStack) Add(child gtk.Widgetter) *ViewStackPage
Add adds a child to self.
The function takes the following parameters:
- child: widget to add.
The function returns the following values:
- viewStackPage: viewstackpage for child.
func (*ViewStack) AddNamed ¶
func (self *ViewStack) AddNamed(child gtk.Widgetter, name string) *ViewStackPage
AddNamed adds a child to self.
The child is identified by the name.
The function takes the following parameters:
- child: widget to add.
- name (optional) for child.
The function returns the following values:
- viewStackPage: AdwViewStackPage for child.
func (*ViewStack) AddTitled ¶
func (self *ViewStack) AddTitled(child gtk.Widgetter, name, title string) *ViewStackPage
AddTitled adds a child to self.
The child is identified by the name. The title will be used by viewswitcher to represent child, so it should be short.
The function takes the following parameters:
- child: widget to add.
- name (optional) for child.
- title: human-readable title for child.
The function returns the following values:
- viewStackPage: AdwViewStackPage for child.
func (*ViewStack) AddTitledWithIcon ¶
func (self *ViewStack) AddTitledWithIcon(child gtk.Widgetter, name, title, iconName string) *ViewStackPage
AddTitledWithIcon adds a child to self.
The child is identified by the name. The title and icon_name will be used by viewswitcher to represent child.
The function takes the following parameters:
- child: widget to add.
- name (optional) for child.
- title: human-readable title for child.
- iconName: icon name for child.
The function returns the following values:
- viewStackPage: AdwViewStackPage for child.
func (*ViewStack) ChildByName ¶
ChildByName finds the child with name in self.
The function takes the following parameters:
- name of the child to find.
The function returns the following values:
- widget (optional): requested child.
func (*ViewStack) Hhomogeneous ¶
Hhomogeneous gets whether self is horizontally homogeneous.
The function returns the following values:
- ok: whether self is horizontally homogeneous.
func (*ViewStack) Page ¶
func (self *ViewStack) Page(child gtk.Widgetter) *ViewStackPage
Page gets the viewstackpage object for child.
The function takes the following parameters:
- child of self.
The function returns the following values:
- viewStackPage: page object for child.
func (*ViewStack) Pages ¶
func (self *ViewStack) Pages() *gtk.SelectionModel
Pages returns a gio.ListModel that contains the pages of the stack.
This can be used to keep an up-to-date view. The model also implements gtk.SelectionModel and can be used to track and change the visible page.
The function returns the following values:
- selectionModel: GtkSelectionModel for the stack's children.
func (*ViewStack) Remove ¶
func (self *ViewStack) Remove(child gtk.Widgetter)
Remove removes a child widget from self.
The function takes the following parameters:
- child to remove.
func (*ViewStack) SetHhomogeneous ¶
SetHhomogeneous sets self to be horizontally homogeneous or not.
If the stack is horizontally homogeneous, it allocates the same width for all children.
If it's FALSE, the stack may change width when a different child becomes visible.
The function takes the following parameters:
- hhomogeneous: whether to make self horizontally homogeneous.
func (*ViewStack) SetVhomogeneous ¶
SetVhomogeneous sets self to be vertically homogeneous or not.
If the stack is vertically homogeneous, it allocates the same height for all children.
If it's FALSE, the stack may change height when a different child becomes visible.
The function takes the following parameters:
- vhomogeneous: whether to make self vertically homogeneous.
func (*ViewStack) SetVisibleChild ¶
func (self *ViewStack) SetVisibleChild(child gtk.Widgetter)
SetVisibleChild makes child the visible child of self.
The function takes the following parameters:
- child of self.
func (*ViewStack) SetVisibleChildName ¶
SetVisibleChildName makes the child with name visible.
See viewstack:visible-child.
The function takes the following parameters:
- name of the child.
func (*ViewStack) Vhomogeneous ¶
Vhomogeneous gets whether self is vertically homogeneous.
The function returns the following values:
- ok: whether self is vertically homogeneous.
func (*ViewStack) VisibleChild ¶
func (self *ViewStack) VisibleChild() gtk.Widgetter
VisibleChild gets the currently visible child of self.
The function returns the following values:
- widget (optional): visible child.
func (*ViewStack) VisibleChildName ¶
VisibleChildName returns the name of the currently visible child of self.
The function returns the following values:
- utf8 (optional): name of the visible child.
type ViewStackClass ¶
type ViewStackClass struct {
// contains filtered or unexported fields
}
ViewStackClass: instance of this type is always passed by reference.
func (*ViewStackClass) ParentClass ¶
func (v *ViewStackClass) ParentClass() *gtk.WidgetClass
type ViewStackOverrides ¶
type ViewStackOverrides struct { }
ViewStackOverrides contains methods that are overridable.
type ViewStackPage ¶
type ViewStackPage struct { *coreglib.Object gtk.Accessible // contains filtered or unexported fields }
ViewStackPage: auxiliary class used by viewstack.
func (*ViewStackPage) BadgeNumber ¶
func (self *ViewStackPage) BadgeNumber() uint
BadgeNumber gets the badge number for this page.
The function returns the following values:
- guint: badge number for this page.
func (*ViewStackPage) Child ¶
func (self *ViewStackPage) Child() gtk.Widgetter
Child gets the stack child to which self belongs.
The function returns the following values:
- widget: child to which self belongs.
func (*ViewStackPage) IconName ¶
func (self *ViewStackPage) IconName() string
IconName gets the icon name of the page.
The function returns the following values:
- utf8 (optional): icon name of the page.
func (*ViewStackPage) Name ¶
func (self *ViewStackPage) Name() string
Name gets the name of the page.
The function returns the following values:
- utf8 (optional): name of the page.
func (*ViewStackPage) NeedsAttention ¶
func (self *ViewStackPage) NeedsAttention() bool
NeedsAttention gets whether the page requires the user attention.
The function returns the following values:
- ok: whether the page needs attention.
func (*ViewStackPage) SetBadgeNumber ¶
func (self *ViewStackPage) SetBadgeNumber(badgeNumber uint)
SetBadgeNumber sets the badge number for this page.
viewswitcher can display it as a badge next to the page icon. It is commonly used to display a number of unread items within the page.
It can be used together with viewstack{age}:needs-attention.
The function takes the following parameters:
- badgeNumber: new value to set.
func (*ViewStackPage) SetIconName ¶
func (self *ViewStackPage) SetIconName(iconName string)
SetIconName sets the icon name of the page.
The function takes the following parameters:
- iconName (optional): icon name.
func (*ViewStackPage) SetName ¶
func (self *ViewStackPage) SetName(name string)
SetName sets the name of the page.
The function takes the following parameters:
- name (optional): page name.
func (*ViewStackPage) SetNeedsAttention ¶
func (self *ViewStackPage) SetNeedsAttention(needsAttention bool)
SetNeedsAttention sets whether the page requires the user attention.
viewswitcher will display it as a dot next to the page icon.
The function takes the following parameters:
- needsAttention: new value to set.
func (*ViewStackPage) SetTitle ¶
func (self *ViewStackPage) SetTitle(title string)
SetTitle sets the page title.
The function takes the following parameters:
- title (optional): page title.
func (*ViewStackPage) SetUseUnderline ¶
func (self *ViewStackPage) SetUseUnderline(useUnderline bool)
SetUseUnderline sets whether underlines in the page title indicate mnemonics.
The function takes the following parameters:
- useUnderline: new value to set.
func (*ViewStackPage) SetVisible ¶
func (self *ViewStackPage) SetVisible(visible bool)
SetVisible sets whether page is visible in its AdwViewStack.
This is independent from the gtk.Widget:visible property of viewstackpage:child.
The function takes the following parameters:
- visible: whether self is visible.
func (*ViewStackPage) Title ¶
func (self *ViewStackPage) Title() string
Title gets the page title.
The function returns the following values:
- utf8 (optional): page title.
func (*ViewStackPage) UseUnderline ¶
func (self *ViewStackPage) UseUnderline() bool
UseUnderline gets whether underlines in the page title indicate mnemonics.
The function returns the following values:
- ok: whether underlines in the page title indicate mnemonics.
func (*ViewStackPage) Visible ¶
func (self *ViewStackPage) Visible() bool
Visible gets whether self is visible in its AdwViewStack.
This is independent from the gtk.Widget:visible property of its widget.
The function returns the following values:
- ok: whether self is visible.
type ViewStackPageClass ¶
type ViewStackPageClass struct {
// contains filtered or unexported fields
}
ViewStackPageClass: instance of this type is always passed by reference.
type ViewStackPageOverrides ¶
type ViewStackPageOverrides struct { }
ViewStackPageOverrides contains methods that are overridable.
type ViewStackPages ¶
type ViewStackPages struct { *coreglib.Object gtk.SelectionModel // contains filtered or unexported fields }
ViewStackPages: auxiliary class used by viewstack.
See viewstack:pages.
func (*ViewStackPages) SelectedPage ¶
func (self *ViewStackPages) SelectedPage() *ViewStackPage
SelectedPage gets the viewstackpage for the visible child of a view stack
Gets the viewstackpage for the visible child of the associated stack.
Returns NULL if there's no selected page.
The function returns the following values:
- viewStackPage (optional): stack page.
func (*ViewStackPages) SetSelectedPage ¶
func (self *ViewStackPages) SetSelectedPage(page *ViewStackPage)
SetSelectedPage sets the visible child in the associated viewstack.
See viewstack:visible-child.
The function takes the following parameters:
- page: stack page within the associated stack.
type ViewStackPagesClass ¶
type ViewStackPagesClass struct {
// contains filtered or unexported fields
}
ViewStackPagesClass: instance of this type is always passed by reference.
type ViewStackPagesOverrides ¶
type ViewStackPagesOverrides struct { }
ViewStackPagesOverrides contains methods that are overridable.
type ViewSwitcher ¶
type ViewSwitcher struct { gtk.Widget // contains filtered or unexported fields }
ViewSwitcher: adaptive view switcher.
<picture> <source srcset="view-switcher-dark.png" media="(prefers-color-scheme: dark)"> <img src="view-switcher.png" alt="view-switcher"> </picture>
An adaptive view switcher designed to switch between multiple views contained in a viewstack in a similar fashion to gtk.StackSwitcher.
AdwViewSwitcher buttons always have an icon and a label. They can be displayed side by side, or icon on top of the label. This can be controlled via the viewswitcher:policy property.
AdwViewSwitcher is intended to be used in a header bar together with viewswitcherbar at the bottom of the window, and a breakpoint showing the view switcher bar on narrow sizes, while removing the view switcher from the header bar, as follows:
<object class="AdwWindow"> <property name="width-request">360</property> <property name="height-request">200</property> <child> <object class="AdwBreakpoint"> <condition>max-width: 550sp</condition> <setter object="switcher_bar" property="reveal">True</setter> <setter object="header_bar" property="title-widget"/> </object> </child> <property name="content"> <object class="AdwToolbarView"> <child type="top"> <object class="AdwHeaderBar" id="header_bar"> <property name="title-widget"> <object class="AdwViewSwitcher"> <property name="stack">stack</property> <property name="policy">wide</property> </object> </property> </object> </child> <property name="content"> <object class="AdwViewStack" id="stack"/> </property> <child type="bottom"> <object class="AdwViewSwitcherBar" id="switcher_bar"> <property name="stack">stack</property> </object> </child> </object> </property> </object>
It's recommended to set viewswitcher:policy to ADW_VIEW_SWITCHER_POLICY_WIDE in this case.
You may have to adjust the breakpoint condition for your specific pages.
CSS nodes ¶
AdwViewSwitcher has a single CSS node with name viewswitcher. It can have the style classes .wide and .narrow, matching its policy.
Accessibility ¶
AdwViewSwitcher uses the GTK_ACCESSIBLE_ROLE_TAB_LIST role and uses the GTK_ACCESSIBLE_ROLE_TAB for its buttons.
func NewViewSwitcher ¶
func NewViewSwitcher() *ViewSwitcher
NewViewSwitcher creates a new AdwViewSwitcher.
The function returns the following values:
- viewSwitcher: newly created AdwViewSwitcher.
func (*ViewSwitcher) Policy ¶
func (self *ViewSwitcher) Policy() ViewSwitcherPolicy
Policy gets the policy of self.
The function returns the following values:
- viewSwitcherPolicy: policy of self.
func (*ViewSwitcher) SetPolicy ¶
func (self *ViewSwitcher) SetPolicy(policy ViewSwitcherPolicy)
SetPolicy sets the policy of self.
The function takes the following parameters:
- policy: new policy.
func (*ViewSwitcher) SetStack ¶
func (self *ViewSwitcher) SetStack(stack *ViewStack)
SetStack sets the stack controlled by self.
The function takes the following parameters:
- stack (optional): stack.
func (*ViewSwitcher) Stack ¶
func (self *ViewSwitcher) Stack() *ViewStack
Stack gets the stack controlled by self.
The function returns the following values:
- viewStack (optional): stack.
type ViewSwitcherBar ¶
type ViewSwitcherBar struct { gtk.Widget // contains filtered or unexported fields }
ViewSwitcherBar: view switcher action bar.
<picture> <source srcset="view-switcher-bar-dark.png" media="(prefers-color-scheme: dark)"> <img src="view-switcher-bar.png" alt="view-switcher-bar"> </picture>
An action bar letting you switch between multiple views contained in a viewstack, via an viewswitcher. It is designed to be put at the bottom of a window and to be revealed only on really narrow windows, e.g. on mobile phones. It can't be revealed if there are less than two pages.
AdwViewSwitcherBar is intended to be used together with AdwViewSwitcher in a header bar, and a breakpoint showing the view switcher bar on narrow sizes, while removing the view switcher from the header bar, as follows:
<object class="AdwWindow"> <property name="width-request">360</property> <property name="height-request">200</property> <child> <object class="AdwBreakpoint"> <condition>max-width: 550sp</condition> <setter object="switcher_bar" property="reveal">True</setter> <setter object="header_bar" property="title-widget"/> </object> </child> <property name="content"> <object class="AdwToolbarView"> <child type="top"> <object class="AdwHeaderBar" id="header_bar"> <property name="title-widget"> <object class="AdwViewSwitcher"> <property name="stack">stack</property> <property name="policy">wide</property> </object> </property> </object> </child> <property name="content"> <object class="AdwViewStack" id="stack"/> </property> <child type="bottom"> <object class="AdwViewSwitcherBar" id="switcher_bar"> <property name="stack">stack</property> </object> </child> </object> </property> </object>
It's recommended to set viewswitcher:policy to ADW_VIEW_SWITCHER_POLICY_WIDE in this case.
You may have to adjust the breakpoint condition for your specific pages.
CSS nodes ¶
AdwViewSwitcherBar has a single CSS node with name viewswitcherbar.
func NewViewSwitcherBar ¶
func NewViewSwitcherBar() *ViewSwitcherBar
NewViewSwitcherBar creates a new AdwViewSwitcherBar.
The function returns the following values:
- viewSwitcherBar: newly created AdwViewSwitcherBar.
func (*ViewSwitcherBar) Reveal ¶
func (self *ViewSwitcherBar) Reveal() bool
Reveal gets whether self should be revealed or hidden.
The function returns the following values:
- ok: whether self is revealed.
func (*ViewSwitcherBar) SetReveal ¶
func (self *ViewSwitcherBar) SetReveal(reveal bool)
SetReveal sets whether self should be revealed or hidden.
The function takes the following parameters:
- reveal: whether to reveal self.
func (*ViewSwitcherBar) SetStack ¶
func (self *ViewSwitcherBar) SetStack(stack *ViewStack)
SetStack sets the stack controlled by self.
The function takes the following parameters:
- stack (optional): stack.
func (*ViewSwitcherBar) Stack ¶
func (self *ViewSwitcherBar) Stack() *ViewStack
Stack gets the stack controlled by self.
The function returns the following values:
- viewStack (optional): stack.
type ViewSwitcherBarClass ¶
type ViewSwitcherBarClass struct {
// contains filtered or unexported fields
}
ViewSwitcherBarClass: instance of this type is always passed by reference.
func (*ViewSwitcherBarClass) ParentClass ¶
func (v *ViewSwitcherBarClass) ParentClass() *gtk.WidgetClass
type ViewSwitcherBarOverrides ¶
type ViewSwitcherBarOverrides struct { }
ViewSwitcherBarOverrides contains methods that are overridable.
type ViewSwitcherClass ¶
type ViewSwitcherClass struct {
// contains filtered or unexported fields
}
ViewSwitcherClass: instance of this type is always passed by reference.
func (*ViewSwitcherClass) ParentClass ¶
func (v *ViewSwitcherClass) ParentClass() *gtk.WidgetClass
type ViewSwitcherOverrides ¶
type ViewSwitcherOverrides struct { }
ViewSwitcherOverrides contains methods that are overridable.
type ViewSwitcherPolicy ¶
ViewSwitcherPolicy describes the adaptive modes of viewswitcher.
const ( // ViewSwitcherPolicyNarrow: force the narrow mode. ViewSwitcherPolicyNarrow ViewSwitcherPolicy = iota // ViewSwitcherPolicyWide: force the wide mode. ViewSwitcherPolicyWide )
func (ViewSwitcherPolicy) String ¶
func (v ViewSwitcherPolicy) String() string
String returns the name in string for ViewSwitcherPolicy.
type ViewSwitcherTitle
deprecated
type ViewSwitcherTitle struct { gtk.Widget // contains filtered or unexported fields }
ViewSwitcherTitle: view switcher title.
<picture> <source srcset="view-switcher-title-dark.png" media="(prefers-color-scheme: dark)"> <img src="view-switcher-title.png" alt="view-switcher-title"> </picture>
A widget letting you switch between multiple views contained by a viewstack via an viewswitcher.
It is designed to be used as the title widget of a headerbar, and will display the window's title when the window is too narrow to fit the view switcher e.g. on mobile phones, or if there are less than two views.
In order to center the title in narrow windows, the header bar should have headerbar:centering-policy set to ADW_CENTERING_POLICY_STRICT.
AdwViewSwitcherTitle is intended to be used together with viewswitcherbar.
A common use case is to bind the viewswitcherbar:reveal property to viewswitchertitle:title-visible to automatically reveal the view switcher bar when the title label is displayed in place of the view switcher, as follows:
<object class="AdwWindow"> <property name="content"> <object class="AdwToolbarView"> <child type="top"> <object class="AdwHeaderBar"> <property name="centering-policy">strict</property> <property name="title-widget"> <object class="AdwViewSwitcherTitle" id="title"> <property name="stack">stack</property> </object> </property> </object> </child> <property name="content"> <object class="AdwViewStack" id="stack"/> </property> <child type="bottom"> <object class="AdwViewSwitcherBar"> <property name="stack">stack</property> <binding name="reveal"> <lookup name="title-visible">title</lookup> </binding> </object> </child> </object> </property> </object>
CSS nodes ¶
AdwViewSwitcherTitle has a single CSS node with name viewswitchertitle.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwviewswitchertitle).
func NewViewSwitcherTitle
deprecated
func NewViewSwitcherTitle() *ViewSwitcherTitle
NewViewSwitcherTitle creates a new AdwViewSwitcherTitle.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwviewswitchertitle).
The function returns the following values:
- viewSwitcherTitle: newly created AdwViewSwitcherTitle.
func (*ViewSwitcherTitle) SetStack
deprecated
func (self *ViewSwitcherTitle) SetStack(stack *ViewStack)
SetStack sets the stack controlled by self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwviewswitchertitle).
The function takes the following parameters:
- stack (optional): stack.
func (*ViewSwitcherTitle) SetSubtitle
deprecated
func (self *ViewSwitcherTitle) SetSubtitle(subtitle string)
SetSubtitle sets the subtitle of self.
The subtitle should give the user additional details.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwviewswitchertitle).
The function takes the following parameters:
- subtitle: subtitle.
func (*ViewSwitcherTitle) SetTitle
deprecated
func (self *ViewSwitcherTitle) SetTitle(title string)
SetTitle sets the title of self.
The title typically identifies the current view or content item, and generally does not use the application name.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwviewswitchertitle).
The function takes the following parameters:
- title: title.
func (*ViewSwitcherTitle) SetViewSwitcherEnabled
deprecated
func (self *ViewSwitcherTitle) SetViewSwitcherEnabled(enabled bool)
SetViewSwitcherEnabled sets whether self's view switcher is enabled.
If it is disabled, the title will be displayed instead. This allows to programmatically hide the view switcher 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.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwviewswitchertitle).
The function takes the following parameters:
- enabled: whether the view switcher is enabled.
func (*ViewSwitcherTitle) Stack
deprecated
func (self *ViewSwitcherTitle) Stack() *ViewStack
Stack gets the stack controlled by self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwviewswitchertitle).
The function returns the following values:
- viewStack (optional): stack.
func (*ViewSwitcherTitle) Subtitle
deprecated
func (self *ViewSwitcherTitle) Subtitle() string
Subtitle gets the subtitle of self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwviewswitchertitle).
The function returns the following values:
- utf8: subtitle.
func (*ViewSwitcherTitle) Title
deprecated
func (self *ViewSwitcherTitle) Title() string
Title gets the title of self.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwviewswitchertitle).
The function returns the following values:
- utf8: title.
func (*ViewSwitcherTitle) TitleVisible
deprecated
func (self *ViewSwitcherTitle) TitleVisible() bool
TitleVisible gets whether the title of self is currently visible.
If the title is visible, it means the view switcher is hidden an it may be wanted to show an alternative switcher, e.g. a viewswitcherbar.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwviewswitchertitle).
The function returns the following values:
- ok: whether the title of self is currently visible.
func (*ViewSwitcherTitle) ViewSwitcherEnabled
deprecated
func (self *ViewSwitcherTitle) ViewSwitcherEnabled() bool
ViewSwitcherEnabled gets whether self's view switcher is enabled.
Deprecated: See the migration guide (migrating-to-breakpoints.html#replace-adwviewswitchertitle).
The function returns the following values:
- ok: whether the view switcher is enabled.
type ViewSwitcherTitleClass ¶
type ViewSwitcherTitleClass struct {
// contains filtered or unexported fields
}
ViewSwitcherTitleClass: instance of this type is always passed by reference.
func (*ViewSwitcherTitleClass) ParentClass ¶
func (v *ViewSwitcherTitleClass) ParentClass() *gtk.WidgetClass
type ViewSwitcherTitleOverrides ¶
type ViewSwitcherTitleOverrides struct { }
ViewSwitcherTitleOverrides contains methods that are overridable.
type Window ¶
type Window struct { gtk.Window // contains filtered or unexported fields }
Window: freeform window.
<picture> <source srcset="window-dark.png" media="(prefers-color-scheme: dark)"> <img src="window.png" alt="window"> </picture>
The AdwWindow widget is a subclass of gtk.Window which has no titlebar area. Instead, toolbarview can be used together with headerbar or gtk.HeaderBar as follows:
<object class="AdwWindow"> <property name="content"> <object class="AdwToolbarView"> <child type="top"> <object class="AdwHeaderBar"/> </child> <property name="content"> <!-- ... --> </property> </object> </property> </object>
Using gtk.Window:titlebar or gtk.Window:child is not supported and will result in a crash. Use window:content instead.
Dialogs ¶
AdwWindow can contain dialog. Use dialog.Present with the window or a widget within a window to show a dialog.
Breakpoints ¶
AdwWindow can be used with breakpoint the same way as breakpointbin. Refer to that widget's documentation for details.
Example:
<object class="AdwWindow"> <property name="width-request">360</property> <property name="height-request">200</property> <property name="content"> <object class="AdwToolbarView"> <child type="top"> <object class="AdwHeaderBar"/> </child> <property name="content"> <!-- ... --> </property> <child type="bottom"> <object class="GtkActionBar" id="bottom_bar"> <property name="revealed">True</property> <property name="visible">False</property> </object> </child> </object> </property> <child> <object class="AdwBreakpoint"> <condition>max-width: 500px</condition> <setter object="bottom_bar" property="visible">True</setter> </object> </child> </object>
Like AdwBreakpointBin, if breakpoints are used, AdwWindow doesn't have a minimum size, and gtk.Widget:width-request and gtk.Widget:height-request properties must be set manually.
func NewWindow ¶
func NewWindow() *Window
NewWindow creates a new AdwWindow.
The function returns the following values:
- window: newly created AdwWindow.
func (*Window) AddBreakpoint ¶
func (self *Window) AddBreakpoint(breakpoint *Breakpoint)
AddBreakpoint adds breakpoint to self.
The function takes the following parameters:
- breakpoint to add.
func (*Window) Content ¶
func (self *Window) Content() gtk.Widgetter
Content gets the content widget of self.
This method should always be used instead of gtk.Window.GetChild().
The function returns the following values:
- widget (optional): content widget of self.
func (*Window) CurrentBreakpoint ¶
func (self *Window) CurrentBreakpoint() *Breakpoint
CurrentBreakpoint gets the current breakpoint.
The function returns the following values:
- breakpoint (optional): current breakpoint.
func (*Window) Dialogs ¶
func (self *Window) Dialogs() *gio.ListModel
Dialogs returns a gio.ListModel that contains the open dialogs of self.
This can be used to keep an up-to-date view.
The function returns the following values:
- listModel: list model for the dialogs of self.
func (*Window) SetContent ¶
func (self *Window) SetContent(content gtk.Widgetter)
SetContent sets the content widget of self.
This method should always be used instead of gtk.Window.SetChild().
The function takes the following parameters:
- content (optional) widget.
func (*Window) VisibleDialog ¶
VisibleDialog returns the currently visible dialog in self, if there's one.
The function returns the following values:
- dialog (optional): visible dialog.
type WindowClass ¶
type WindowClass struct {
// contains filtered or unexported fields
}
WindowClass: instance of this type is always passed by reference.
func (*WindowClass) ParentClass ¶
func (w *WindowClass) ParentClass() *gtk.WindowClass
type WindowOverrides ¶
type WindowOverrides struct { }
WindowOverrides contains methods that are overridable.
type WindowTitle ¶
type WindowTitle struct { gtk.Widget // contains filtered or unexported fields }
WindowTitle: helper widget for setting a window's title and subtitle.
<picture> <source srcset="window-title-dark.png" media="(prefers-color-scheme: dark)"> <img src="window-title.png" alt="window-title"> </picture>
AdwWindowTitle shows a title and subtitle. It's intended to be used as the title child of gtk.HeaderBar or headerbar.
CSS nodes ¶
AdwWindowTitle has a single CSS node with name windowtitle.
func NewWindowTitle ¶
func NewWindowTitle(title, subtitle string) *WindowTitle
NewWindowTitle creates a new AdwWindowTitle.
The function takes the following parameters:
- title: title.
- subtitle: subtitle.
The function returns the following values:
- windowTitle: newly created AdwWindowTitle.
func (*WindowTitle) SetSubtitle ¶
func (self *WindowTitle) SetSubtitle(subtitle string)
SetSubtitle sets the subtitle of self.
The subtitle should give the user additional details.
The function takes the following parameters:
- subtitle: subtitle.
func (*WindowTitle) SetTitle ¶
func (self *WindowTitle) SetTitle(title string)
SetTitle sets the title of self.
The title typically identifies the current view or content item, and generally does not use the application name.
The function takes the following parameters:
- title: title.
func (*WindowTitle) Subtitle ¶
func (self *WindowTitle) Subtitle() string
Subtitle gets the subtitle of self.
The function returns the following values:
- utf8: subtitle.
func (*WindowTitle) Title ¶
func (self *WindowTitle) Title() string
Title gets the title of self.
The function returns the following values:
- utf8: title.
type WindowTitleClass ¶
type WindowTitleClass struct {
// contains filtered or unexported fields
}
WindowTitleClass: instance of this type is always passed by reference.
func (*WindowTitleClass) ParentClass ¶
func (w *WindowTitleClass) ParentClass() *gtk.WidgetClass
type WindowTitleOverrides ¶
type WindowTitleOverrides struct { }
WindowTitleOverrides contains methods that are overridable.
Source Files ¶
- adw-about-dialog.go
- adw-about-dialog_1_5.go
- adw-about-dialog_export.go
- adw-about-window.go
- adw-about-window_1_2.go
- adw-about-window_export.go
- adw-action-row.go
- adw-action-row_export.go
- adw-alert-dialog.go
- adw-alert-dialog_1_2.go
- adw-alert-dialog_1_5.go
- adw-alert-dialog_export.go
- adw-animation-target.go
- adw-animation-target_1_2.go
- adw-animation-target_export.go
- adw-animation-util.go
- adw-animation.go
- adw-animation_export.go
- adw-application-window.go
- adw-application.go
- adw-avatar.go
- adw-banner.go
- adw-banner_1_3.go
- adw-banner_export.go
- adw-bin.go
- adw-breakpoint-bin.go
- adw-breakpoint-bin_1_4.go
- adw-breakpoint-extras.go
- adw-breakpoint.go
- adw-breakpoint_1_4.go
- adw-breakpoint_export.go
- adw-button-content.go
- adw-carousel-indicator-dots.go
- adw-carousel-indicator-lines.go
- adw-carousel.go
- adw-carousel_export.go
- adw-clamp-layout.go
- adw-clamp-scrollable.go
- adw-clamp.go
- adw-combo-row.go
- adw-dialog.go
- adw-dialog_1_5.go
- adw-dialog_export.go
- adw-easing.go
- adw-entry-row.go
- adw-entry-row_1_2.go
- adw-entry-row_export.go
- adw-enum-list-model.go
- adw-expander-row.go
- adw-flap.go
- adw-fold-threshold-policy.go
- adw-header-bar.go
- adw-leaflet.go
- adw-length-unit_1_4.go
- adw-main.go
- adw-message-dialog.go
- adw-message-dialog_1_2.go
- adw-message-dialog_export.go
- adw-navigation-direction.go
- adw-navigation-split-view.go
- adw-navigation-split-view_1_4.go
- adw-navigation-view.go
- adw-navigation-view_1_4.go
- adw-navigation-view_export.go
- adw-overlay-split-view.go
- adw-overlay-split-view_1_4.go
- adw-password-entry-row.go
- adw-password-entry-row_1_2.go
- adw-preferences-dialog.go
- adw-preferences-dialog_1_5.go
- adw-preferences-group.go
- adw-preferences-page.go
- adw-preferences-row.go
- adw-preferences-window.go
- adw-spin-row.go
- adw-spin-row_1_4.go
- adw-spin-row_export.go
- adw-split-button.go
- adw-split-button_export.go
- adw-spring-animation.go
- adw-spring-params.go
- adw-squeezer.go
- adw-status-page.go
- adw-style-manager.go
- adw-swipe-tracker.go
- adw-swipe-tracker_export.go
- adw-swipeable.go
- adw-switch-row.go
- adw-switch-row_1_4.go
- adw-tab-bar.go
- adw-tab-bar_export.go
- adw-tab-button.go
- adw-tab-button_1_3.go
- adw-tab-button_export.go
- adw-tab-overview.go
- adw-tab-overview_1_3.go
- adw-tab-overview_export.go
- adw-tab-view.go
- adw-tab-view_1_2.go
- adw-tab-view_export.go
- adw-timed-animation.go
- adw-toast-overlay.go
- adw-toast.go
- adw-toast_export.go
- adw-toolbar-view.go
- adw-toolbar-view_1_4.go
- adw-version.go
- adw-view-stack.go
- adw-view-stack_1_4.go
- adw-view-switcher-bar.go
- adw-view-switcher-title.go
- adw-view-switcher.go
- adw-window-title.go
- adw-window.go
- adw.go
- adw_export.go