Documentation
¶
Overview ¶
Package ctk is a curses-based graphical user interface library modeled after the GTK API.
The purpose of this project is to provide a similar API to the actual GTK project and instead of interacting with an X11 server, the Curses Tool Kit interacts with a terminal display, managed by the Curses Development Kit.
CTK Type Hierarchy
Object
|- Adjustment
`- Widget
|- Container
| |- Bin
| | |- Button
| | |- EventBox
| | |- Frame
| | |- Viewport
| | | `- ScrolledViewport
| | `- Window
| | `- Dialog
| `- Box
| |- HBox
| |- VBox
| `- ButtonBox
| |- HButtonBox
| `- VButtonBox
|- Misc
| |- Arrow
| `- Label
|- Range
| |- Scale
| | |- HScale
| | `- VScale
| `- Scrollbar
| |- HScrollbar
| `- VScrollbar
`- Sensitive
Index ¶
- Constants
- Variables
- func AddStockItems(items ...*StockItem)
- func BuilderRegisterConstructor(tag cdk.TypeTag, fn BuilderTranslationFn)
- func TestingWithCtkWindow(d cdk.Display) error
- func WithFakeWindow(fn WithFakeWindowFn) func()
- func WithFakeWindowOptions(w, h int, theme paint.Theme, fn WithFakeWindowFn) func()
- type AccelFlags
- type AccelGroup
- type AccelGroupEntry
- type AccelGroupFindFunc
- type AccelKey
- type Activatable
- type Adjustment
- type Alignable
- type Alignment
- type AnchorType
- type ArgFlags
- type Arrow
- type ArrowPlacement
- type ArrowType
- type AssistantPageType
- type AttachOptions
- type Bin
- type Box
- type Buildable
- type Builder
- type BuilderElement
- type BuilderError
- type BuilderNode
- type BuilderTranslationFn
- type Button
- type ButtonAction
- type ButtonBox
- type ButtonBoxStyle
- type ButtonsType
- type CAccelGroup
- func (a *CAccelGroup) AccelConnect(accelKey cdk.Key, accelMods cdk.ModMask, accelFlags AccelFlags, ...) (id int)
- func (a *CAccelGroup) AccelDisconnect(id int) (removed bool)
- func (a *CAccelGroup) AccelGroupActivate(acceleratable Object, keyval cdk.Key, modifier cdk.ModMask) (activated bool)
- func (a *CAccelGroup) AcceleratorGetDefaultModMask() (value int)
- func (a *CAccelGroup) AcceleratorGetLabel(acceleratorKey cdk.Key, acceleratorMods cdk.ModMask) (value string)
- func (a *CAccelGroup) AcceleratorName(acceleratorKey cdk.Key, acceleratorMods cdk.ModMask) (value string)
- func (a *CAccelGroup) AcceleratorParse(accelerator string) (acceleratorKey cdk.Key, acceleratorMods cdk.ModMask)
- func (a *CAccelGroup) AcceleratorSetDefaultModMask(defaultModMask cdk.ModMask)
- func (a *CAccelGroup) AcceleratorValid(keyval cdk.Key, modifiers cdk.ModMask) (valid bool)
- func (a *CAccelGroup) Activate(accelQuark ptypes.QuarkID, acceleratable Object, accelKey cdk.Key, ...) (value bool)
- func (a *CAccelGroup) ConnectByPath(accelPath string, closure GClosure)
- func (a *CAccelGroup) DisconnectKey(accelKey cdk.Key, accelMods cdk.ModMask) (removed bool)
- func (a *CAccelGroup) Find(findFunc AccelGroupFindFunc, data interface{}) (key *AccelKey)
- func (a *CAccelGroup) FromAccelClosure(closure GClosure) (value AccelGroup)
- func (a *CAccelGroup) GetIsLocked() (locked bool)
- func (a *CAccelGroup) GetModifierMask() (value cdk.ModMask)
- func (a *CAccelGroup) Init() (already bool)
- func (a *CAccelGroup) Lock()
- func (a *CAccelGroup) Query(accelKey cdk.Key, accelMods cdk.ModMask) (entries []*AccelGroupEntry)
- func (a *CAccelGroup) Unlock()
- type CAdjustment
- func (a *CAdjustment) Changed() enums.EventFlag
- func (a *CAdjustment) ClampPage(upper, lower int)
- func (a *CAdjustment) Configure(value, lower, upper, stepIncrement, pageIncrement, pageSize int)
- func (a *CAdjustment) GetLower() (value int)
- func (a *CAdjustment) GetPageIncrement() (pageIncrement int)
- func (a *CAdjustment) GetPageSize() (pageSize int)
- func (a *CAdjustment) GetStepIncrement() (stepIncrement int)
- func (a *CAdjustment) GetUpper() (upper int)
- func (a *CAdjustment) GetValue() (value int)
- func (a *CAdjustment) Init() bool
- func (a *CAdjustment) Moot() bool
- func (a *CAdjustment) SetLower(lower int)
- func (a *CAdjustment) SetPageIncrement(pageIncrement int)
- func (a *CAdjustment) SetPageSize(pageSize int)
- func (a *CAdjustment) SetStepIncrement(stepIncrement int)
- func (a *CAdjustment) SetUpper(upper int)
- func (a *CAdjustment) SetValue(value int)
- func (a *CAdjustment) Settings() (value, lower, upper, stepIncrement, pageIncrement, pageSize int)
- func (a *CAdjustment) ShowByPolicy(policy PolicyType) bool
- func (a *CAdjustment) ValueChanged() enums.EventFlag
- type CAlignment
- func (a *CAlignment) Add(w Widget)
- func (a *CAlignment) Get() (xAlign, yAlign, xScale, yScale float64)
- func (a *CAlignment) GetPadding() (paddingTop, paddingBottom, paddingLeft, paddingRight int)
- func (a *CAlignment) Init() (already bool)
- func (a *CAlignment) Remove(w Widget)
- func (a *CAlignment) Set(xAlign, yAlign, xScale, yScale float64)
- func (a *CAlignment) SetPadding(paddingTop, paddingBottom, paddingLeft, paddingRight int)
- type CArrow
- type CBin
- type CBox
- func (b *CBox) Add(child Widget)
- func (b *CBox) Build(builder Builder, element *CBuilderElement) error
- func (b *CBox) GetFocusChain() (focusableWidgets []interface{}, explicitlySet bool)
- func (b *CBox) GetHomogeneous() (value bool)
- func (b *CBox) GetOrientation() (orientation enums.Orientation)
- func (b *CBox) GetSizeRequest() (width, height int)
- func (b *CBox) GetSpacing() (value int)
- func (b *CBox) Init() (already bool)
- func (b *CBox) PackEnd(child Widget, expand, fill bool, padding int)
- func (b *CBox) PackStart(child Widget, expand, fill bool, padding int)
- func (b *CBox) QueryChildPacking(child Widget) (expand bool, fill bool, padding int, packType PackType)
- func (b *CBox) Remove(w Widget)
- func (b *CBox) ReorderChild(child Widget, position int)
- func (b *CBox) SetChildPacking(child Widget, expand bool, fill bool, padding int, packType PackType)
- func (b *CBox) SetHomogeneous(homogeneous bool)
- func (b *CBox) SetOrientation(orientation enums.Orientation)
- func (b *CBox) SetSpacing(spacing int)
- type CBuilder
- func (b *CBuilder) AddNamedSignalHandler(name string, fn cdk.SignalListenerFn)
- func (b *CBuilder) Build(element *CBuilderElement) (newObject interface{})
- func (b *CBuilder) BuildableTypeTags() map[string]cdk.TypeTag
- func (b *CBuilder) GetWidget(name string) (w interface{})
- func (b *CBuilder) GetWidgetsBuiltByType(tag cdk.CTypeTag) (widgets []interface{})
- func (b *CBuilder) Init() (already bool)
- func (b *CBuilder) LoadFromString(raw string) (topElement *CBuilderElement, err error)
- func (b *CBuilder) LookupNamedSignalHandler(name string) (fn cdk.SignalListenerFn)
- func (b *CBuilder) ParsePacking(packing *CBuilderElement) (expand, fill bool, padding int, packType PackType)
- type CBuilderElement
- type CButton
- func (b *CButton) Activate() (value bool)
- func (b *CButton) Build(builder Builder, element *CBuilderElement) error
- func (b *CButton) CancelEvent()
- func (b *CButton) Clicked() enums.EventFlag
- func (b *CButton) GetAlignment() (xAlign float64, yAlign float64)
- func (b *CButton) GetFocusChain() (focusableWidgets []interface{}, explicitlySet bool)
- func (b *CButton) GetFocusOnClick() (value bool)
- func (b *CButton) GetImage() (value Widget, ok bool)
- func (b *CButton) GetImagePosition() (value PositionType)
- func (b *CButton) GetLabel() (value string)
- func (b *CButton) GetPressed() bool
- func (b *CButton) GetRelief() (value ReliefStyle)
- func (b *CButton) GetSizeRequest() (width, height int)
- func (b *CButton) GetUseMarkup() (enabled bool)
- func (b *CButton) GetUseStock() (value bool)
- func (b *CButton) GetUseUnderline() (enabled bool)
- func (b *CButton) GetWidgetAt(p *ptypes.Point2I) Widget
- func (b *CButton) GrabEventFocus()
- func (b *CButton) GrabFocus()
- func (b *CButton) Init() (already bool)
- func (b *CButton) SetAlignment(xAlign float64, yAlign float64)
- func (b *CButton) SetFocusOnClick(focusOnClick bool)
- func (b *CButton) SetImage(image Widget)
- func (b *CButton) SetImagePosition(position PositionType)
- func (b *CButton) SetLabel(label string)
- func (b *CButton) SetPressed(pressed bool)
- func (b *CButton) SetRelief(newStyle ReliefStyle)
- func (b *CButton) SetUseMarkup(enabled bool)
- func (b *CButton) SetUseStock(useStock bool)
- func (b *CButton) SetUseUnderline(enabled bool)
- type CButtonBox
- func (b *CButtonBox) Add(w Widget)
- func (b *CButtonBox) Build(builder Builder, element *CBuilderElement) error
- func (b *CButtonBox) GetChildPrimary(w Widget) (isPrimary bool)
- func (b *CButtonBox) GetChildSecondary(w Widget) (isSecondary bool)
- func (b *CButtonBox) GetLayout() (value ButtonBoxStyle)
- func (b *CButtonBox) Init() (already bool)
- func (b *CButtonBox) PackEnd(w Widget, expand, fill bool, padding int)
- func (b *CButtonBox) PackStart(w Widget, expand, fill bool, padding int)
- func (b *CButtonBox) Remove(w Widget)
- func (b *CButtonBox) SetChildPacking(child Widget, expand bool, fill bool, padding int, packType PackType)
- func (b *CButtonBox) SetChildSecondary(child Widget, isSecondary bool)
- func (b *CButtonBox) SetLayout(layoutStyle ButtonBoxStyle)
- type CContainer
- func (c *CContainer) Add(w Widget)
- func (c *CContainer) AddWithProperties(widget Widget, argv ...interface{})
- func (c *CContainer) Build(builder Builder, element *CBuilderElement) error
- func (c *CContainer) ChildGet(child Widget, properties ...cdk.Property) (values []interface{})
- func (c *CContainer) ChildSet(child Widget, argv ...interface{})
- func (c *CContainer) ChildType() (value cdk.CTypeTag)
- func (c *CContainer) FindChildProperty(property cdk.Property) (value *cdk.CProperty)
- func (c *CContainer) GetBorderWidth() (value int)
- func (c *CContainer) GetChildProperty(child Widget, propertyName cdk.Property) (value interface{})
- func (c *CContainer) GetChildren() (children []Widget)
- func (c *CContainer) GetFocusChain() (focusableWidgets []interface{}, explicitlySet bool)
- func (c *CContainer) GetFocusChild() (value Widget)
- func (c *CContainer) GetFocusHAdjustment() (value Adjustment)
- func (c *CContainer) GetFocusVAdjustment() (value Adjustment)
- func (c *CContainer) GetWidgetAt(p *ptypes.Point2I) Widget
- func (c *CContainer) Init() (already bool)
- func (c *CContainer) InstallChildProperty(name cdk.Property, kind cdk.PropertyType, write bool, def interface{}) error
- func (c *CContainer) ListChildProperties() (properties []*cdk.CProperty)
- func (c *CContainer) Remove(w Widget)
- func (c *CContainer) ResizeChildren()
- func (c *CContainer) SetBorderWidth(borderWidth int)
- func (c *CContainer) SetChildProperty(child Widget, propertyName cdk.Property, value interface{})
- func (c *CContainer) SetFocusChain(focusableWidgets []interface{})
- func (c *CContainer) SetFocusChild(child Widget)
- func (c *CContainer) SetFocusHAdjustment(adjustment Adjustment)
- func (c *CContainer) SetFocusVAdjustment(adjustment Adjustment)
- func (c *CContainer) SetOrigin(x, y int)
- func (c *CContainer) SetWindow(w Window)
- func (c *CContainer) ShowAll()
- func (c *CContainer) UnsetFocusChain()
- type CDialog
- func (d *CDialog) AddActionWidget(child Widget, responseId ResponseType)
- func (d *CDialog) AddButton(buttonText string, responseId ResponseType) (button Button)
- func (d *CDialog) AddButtons(argv ...interface{})
- func (d *CDialog) AddSecondaryActionWidget(child Widget, responseId ResponseType)
- func (d *CDialog) Build(builder Builder, element *CBuilderElement) error
- func (d *CDialog) Destroy()
- func (d *CDialog) GetActionArea() (value ButtonBox)
- func (d *CDialog) GetContentArea() (value VBox)
- func (d *CDialog) GetResponseForWidget(widget Widget) (value ResponseType)
- func (d *CDialog) GetWidgetForResponse(responseId ResponseType) (value Widget)
- func (d *CDialog) Init() (already bool)
- func (d *CDialog) Response(responseId ResponseType)
- func (d *CDialog) Run() (response chan ResponseType)
- func (d *CDialog) SetDefaultResponse(responseId ResponseType)
- func (d *CDialog) SetResponseSensitive(responseId ResponseType, sensitive bool)
- func (d *CDialog) Show()
- func (d *CDialog) ShowAll()
- type CEventBox
- func (b *CEventBox) Activate() (value bool)
- func (b *CEventBox) CancelEvent()
- func (b *CEventBox) GetAboveChild() (value bool)
- func (b *CEventBox) GetVisibleWindow() (value bool)
- func (b *CEventBox) GrabEventFocus()
- func (b *CEventBox) GrabFocus()
- func (b *CEventBox) Init() (already bool)
- func (b *CEventBox) ProcessEvent(evt cdk.Event) enums.EventFlag
- func (b *CEventBox) SetAboveChild(aboveChild bool)
- func (b *CEventBox) SetVisibleWindow(visibleWindow bool)
- type CFakeWindow
- type CFrame
- func (f *CFrame) Add(w Widget)
- func (f *CFrame) GetFocusWithChild() (focusWithChild bool)
- func (f *CFrame) GetLabel() (value string)
- func (f *CFrame) GetLabelAlign() (xAlign float64, yAlign float64)
- func (f *CFrame) GetLabelWidget() (value Widget)
- func (f *CFrame) GetShadowType() (value ShadowType)
- func (f *CFrame) GetSizeRequest() (width, height int)
- func (f *CFrame) GetWidgetAt(p *ptypes.Point2I) Widget
- func (f *CFrame) GrabFocus()
- func (f *CFrame) Init() (already bool)
- func (f *CFrame) IsFocus() bool
- func (f *CFrame) Remove(w Widget)
- func (f *CFrame) SetFocusWithChild(focusWithChild bool)
- func (f *CFrame) SetLabel(label string)
- func (f *CFrame) SetLabelAlign(xAlign float64, yAlign float64)
- func (f *CFrame) SetLabelWidget(labelWidget Widget)
- func (f *CFrame) SetShadowType(shadowType ShadowType)
- type CHBox
- type CHButtonBox
- type CHScrollbar
- type CLabel
- func (l *CLabel) Build(builder Builder, element *CBuilderElement) error
- func (l *CLabel) GetAttributes() (value paint.Style)
- func (l *CLabel) GetCleanText() (text string)
- func (l *CLabel) GetClearText() (text string)
- func (l *CLabel) GetCurrentUri() (value string)
- func (l *CLabel) GetEllipsize() (value bool)
- func (l *CLabel) GetJustify() (value enums.Justification)
- func (l *CLabel) GetLabel() (value string)
- func (l *CLabel) GetLineWrap() (value bool)
- func (l *CLabel) GetLineWrapMode() (value enums.WrapMode)
- func (l *CLabel) GetMaxWidthChars() (value int)
- func (l *CLabel) GetMnemonicKeyVal() (value rune)
- func (l *CLabel) GetMnemonicWidget() (value Widget)
- func (l *CLabel) GetPlainText() (text string)
- func (l *CLabel) GetPlainTextInfo() (maxWidth, lineCount int)
- func (l *CLabel) GetPlainTextInfoAtWidth(width int) (maxWidth, lineCount int)
- func (l *CLabel) GetSelectable() (value bool)
- func (l *CLabel) GetSelectionBounds() (start int, end int, nonEmpty bool)
- func (l *CLabel) GetSingleLineMode() (value bool)
- func (l *CLabel) GetSizeRequest() (width, height int)
- func (l *CLabel) GetText() (value string)
- func (l *CLabel) GetTrackVisitedLinks() (value bool)
- func (l *CLabel) GetUseMarkup() (value bool)
- func (l *CLabel) GetUseUnderline() (value bool)
- func (l *CLabel) GetWidthChars() (value int)
- func (l *CLabel) Init() (already bool)
- func (l *CLabel) SelectRegion(startOffset int, endOffset int)
- func (l *CLabel) SetAttributes(attrs paint.Style)
- func (l *CLabel) SetEllipsize(mode bool)
- func (l *CLabel) SetJustify(justify enums.Justification)
- func (l *CLabel) SetLabel(str string)
- func (l *CLabel) SetLineWrap(wrap bool)
- func (l *CLabel) SetLineWrapMode(wrapMode enums.WrapMode)
- func (l *CLabel) SetMarkup(text string) (parseError error)
- func (l *CLabel) SetMarkupWithMnemonic(str string) (err error)
- func (l *CLabel) SetMaxWidthChars(nChars int)
- func (l *CLabel) SetMnemonicWidget(widget Widget)
- func (l *CLabel) SetSelectable(setting bool)
- func (l *CLabel) SetSingleLineMode(singleLineMode bool)
- func (l *CLabel) SetText(text string)
- func (l *CLabel) SetTextWithMnemonic(str string)
- func (l *CLabel) SetTrackVisitedLinks(trackLinks bool)
- func (l *CLabel) SetUseMarkup(setting bool)
- func (l *CLabel) SetUseUnderline(setting bool)
- func (l *CLabel) SetWidthChars(nChars int)
- type CListDragPos
- type CMisc
- type CObject
- func (o *CObject) Build(builder Builder, element *CBuilderElement) error
- func (o *CObject) CssSelector() (selector string)
- func (o *CObject) GetAllocation() ptypes.Rectangle
- func (o *CObject) GetCssBool(name cdk.Property, state StateType) (value bool, err error)
- func (o *CObject) GetCssColor(name cdk.Property, state StateType) (value paint.Color, err error)
- func (o *CObject) GetCssFloat(name cdk.Property, state StateType) (value float64, err error)
- func (o *CObject) GetCssInt(name cdk.Property, state StateType) (value int, err error)
- func (o *CObject) GetCssProperties() (properties map[StateType][]*CStyleProperty)
- func (o *CObject) GetCssProperty(name cdk.Property, state StateType) (property *CStyleProperty)
- func (o *CObject) GetCssString(name cdk.Property, state StateType) (value string, err error)
- func (o *CObject) GetCssValue(name cdk.Property, state StateType) (value interface{})
- func (o *CObject) GetObjectAt(p *ptypes.Point2I) Object
- func (o *CObject) GetOrigin() ptypes.Point2I
- func (o *CObject) GetTextDirection() (direction TextDirection)
- func (o *CObject) HasPoint(p *ptypes.Point2I) (contains bool)
- func (o *CObject) Init() (already bool)
- func (o *CObject) InstallCssProperty(name cdk.Property, state StateType, kind cdk.PropertyType, write bool, ...) (err error)
- func (o *CObject) Invalidate() enums.EventFlag
- func (o *CObject) ObjectInfo() string
- func (o *CObject) ProcessEvent(evt cdk.Event) enums.EventFlag
- func (o *CObject) Resize() enums.EventFlag
- func (o *CObject) SetAllocation(size ptypes.Rectangle)
- func (o *CObject) SetCssPropertyFromStyle(key, value string) (err error)
- func (o *CObject) SetOrigin(x, y int)
- func (o *CObject) SetTextDirection(direction TextDirection)
- type CRange
- func (r *CRange) GetAdjustment() (adjustment *CAdjustment)
- func (r *CRange) GetFillLevel() (value float64)
- func (r *CRange) GetFlippable() (value bool)
- func (r *CRange) GetIncrements() (step int, page int)
- func (r *CRange) GetInverted() (value bool)
- func (r *CRange) GetLowerStepperSensitivity() (value SensitivityType)
- func (r *CRange) GetMinSliderLength() (length int)
- func (r *CRange) GetMinSliderSize() (value int)
- func (r *CRange) GetRange() (min, max int)
- func (r *CRange) GetRangeRect() (rangeRect ptypes.Rectangle)
- func (r *CRange) GetRestrictToFillLevel() (value bool)
- func (r *CRange) GetRoundDigits() (value int)
- func (r *CRange) GetShowFillLevel() (value bool)
- func (r *CRange) GetSliderLength() (length int)
- func (r *CRange) GetSliderRange() (sliderStart int, sliderEnd int)
- func (r *CRange) GetSliderSizeFixed() (value bool)
- func (r *CRange) GetStepperSize() (size int)
- func (r *CRange) GetStepperSpacing() (spacing int)
- func (r *CRange) GetTroughUnderSteppers() (underSteppers bool)
- func (r *CRange) GetUpperStepperSensitivity() (value SensitivityType)
- func (r *CRange) GetValue() (value int)
- func (r *CRange) Init() (already bool)
- func (r *CRange) SetFillLevel(fillLevel float64)
- func (r *CRange) SetFlippable(flippable bool)
- func (r *CRange) SetIncrements(step int, page int)
- func (r *CRange) SetInverted(setting bool)
- func (r *CRange) SetLowerStepperSensitivity(sensitivity SensitivityType)
- func (r *CRange) SetMinSliderLength(length int)
- func (r *CRange) SetMinSliderSize(minSize bool)
- func (r *CRange) SetRange(min, max int)
- func (r *CRange) SetRestrictToFillLevel(restrictToFillLevel bool)
- func (r *CRange) SetRoundDigits(roundDigits int)
- func (r *CRange) SetShowFillLevel(showFillLevel bool)
- func (r *CRange) SetSliderLength(length int)
- func (r *CRange) SetSliderSizeFixed(sizeFixed bool)
- func (r *CRange) SetStepperSize(size int)
- func (r *CRange) SetStepperSpacing(spacing int)
- func (r *CRange) SetTroughUnderSteppers(underSteppers bool)
- func (r *CRange) SetUpperStepperSensitivity(sensitivity SensitivityType)
- func (r *CRange) SetValue(value int)
- type CRcStyle
- type CScrollbar
- func (s *CScrollbar) Backward(step int) enums.EventFlag
- func (s *CScrollbar) BackwardPage() enums.EventFlag
- func (s *CScrollbar) BackwardStep() enums.EventFlag
- func (s *CScrollbar) CancelEvent()
- func (s *CScrollbar) Changed()
- func (s *CScrollbar) Forward(step int) enums.EventFlag
- func (s *CScrollbar) ForwardPage() enums.EventFlag
- func (s *CScrollbar) ForwardStep() enums.EventFlag
- func (s *CScrollbar) GetAllStepperRegions() (fwd, bwd, sFwd, sBwd ptypes.Region)
- func (s *CScrollbar) GetHasBackwardStepper() (hasBackwardStepper bool)
- func (s *CScrollbar) GetHasForwardStepper() (hasForwardStepper bool)
- func (s *CScrollbar) GetHasSecondaryBackwardStepper() (hasSecondaryBackwardStepper bool)
- func (s *CScrollbar) GetHasSecondaryForwardStepper() (hasSecondaryForwardStepper bool)
- func (s *CScrollbar) GetSizeRequest() (width, height int)
- func (s *CScrollbar) GetSliderRegion() (region ptypes.Region)
- func (s *CScrollbar) GetStepperRegions() (start, end ptypes.Region)
- func (s *CScrollbar) GetTroughRegion() (region ptypes.Region)
- func (s *CScrollbar) GetWidgetAt(p *ptypes.Point2I) Widget
- func (s *CScrollbar) GrabEventFocus()
- func (s *CScrollbar) GrabFocus()
- func (s *CScrollbar) Init() (already bool)
- func (s *CScrollbar) SetHasBackwardStepper(hasBackwardStepper bool)
- func (s *CScrollbar) SetHasForwardStepper(hasForwardStepper bool)
- func (s *CScrollbar) SetHasSecondaryBackwardStepper(hasSecondaryBackwardStepper bool)
- func (s *CScrollbar) SetHasSecondaryForwardStepper(hasSecondaryForwardStepper bool)
- func (s *CScrollbar) ValueChanged()
- type CScrolledViewport
- func (s *CScrolledViewport) Add(w Widget)
- func (s *CScrolledViewport) AddWithViewport(child Widget)
- func (s *CScrolledViewport) Build(builder Builder, element *CBuilderElement) error
- func (s *CScrolledViewport) CancelEvent()
- func (s *CScrolledViewport) GetChild() Widget
- func (s *CScrolledViewport) GetHAdjustment() (value Adjustment)
- func (s *CScrolledViewport) GetHScrollbar() *CHScrollbar
- func (s *CScrolledViewport) GetPlacement() (value CornerType)
- func (s *CScrolledViewport) GetPolicy() (hScrollbarPolicy PolicyType, vScrollbarPolicy PolicyType)
- func (s *CScrolledViewport) GetRegions() (c, h, v ptypes.Region)
- func (s *CScrolledViewport) GetShadowType() (value ShadowType)
- func (s *CScrolledViewport) GetVAdjustment() (value Adjustment)
- func (s *CScrolledViewport) GetVScrollbar() *CVScrollbar
- func (s *CScrolledViewport) GetWidgetAt(p *ptypes.Point2I) Widget
- func (b *CScrolledViewport) GrabEventFocus()
- func (s *CScrolledViewport) GrabFocus()
- func (s *CScrolledViewport) Hide()
- func (s *CScrolledViewport) HorizontalShowByPolicy() (show bool)
- func (s *CScrolledViewport) Init() (already bool)
- func (s *CScrolledViewport) Remove(w Widget)
- func (s *CScrolledViewport) SetHAdjustment(hAdjustment *CAdjustment)
- func (s *CScrolledViewport) SetPlacement(windowPlacement CornerType)
- func (s *CScrolledViewport) SetPolicy(hScrollbarPolicy PolicyType, vScrollbarPolicy PolicyType)
- func (s *CScrolledViewport) SetShadowType(t ShadowType)
- func (s *CScrolledViewport) SetVAdjustment(vAdjustment *CAdjustment)
- func (s *CScrolledViewport) Show()
- func (s *CScrolledViewport) UnsetPlacement()
- func (s *CScrolledViewport) VerticalShowByPolicy() (show bool)
- type CStyle
- func (s *CStyle) Init() (already bool)
- func (s *CStyle) PaintArrow(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintBox(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintBoxGap(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintCheck(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintDiamond(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintExpander(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, ...)
- func (s *CStyle) PaintExtension(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintFlatBox(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintFocus(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, ...)
- func (s *CStyle) PaintHandle(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintOption(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintPolygon(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintResizeGrip(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, ...)
- func (s *CStyle) PaintShadow(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintShadowGap(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintSlider(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintSpinner(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, ...)
- func (s *CStyle) PaintTab(window Window, stateType StateType, shadowType ShadowType, ...)
- func (s *CStyle) PaintVLine(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, ...)
- type CStyleProperty
- func (p *CStyleProperty) Buildable() bool
- func (p *CStyleProperty) Clone() *CStyleProperty
- func (p *CStyleProperty) Default() (def interface{})
- func (p *CStyleProperty) Name() cdk.Property
- func (p *CStyleProperty) ReadOnly() bool
- func (p *CStyleProperty) Set(value interface{}) error
- func (p *CStyleProperty) SetFromString(value string) error
- func (p *CStyleProperty) State() StateType
- func (p *CStyleProperty) Type() cdk.PropertyType
- func (p *CStyleProperty) Value() (value interface{})
- type CTreeExpanderStyle
- type CTreeExpansionType
- type CTreeLineStyle
- type CTreePos
- type CVBox
- type CVButtonBox
- type CVScrollbar
- type CViewport
- func (v *CViewport) GetBinWindow() (value Window)
- func (v *CViewport) GetHAdjustment() (adjustment *CAdjustment)
- func (v *CViewport) GetShadowType() (shadowType ShadowType)
- func (v *CViewport) GetVAdjustment() (adjustment *CAdjustment)
- func (v *CViewport) GetViewWindow() (value Window)
- func (v *CViewport) Init() (already bool)
- func (v *CViewport) SetHAdjustment(adjustment *CAdjustment)
- func (v *CViewport) SetShadowType(shadowType ShadowType)
- func (v *CViewport) SetVAdjustment(adjustment *CAdjustment)
- type CWidget
- func (w *CWidget) Activate() (value bool)
- func (w *CWidget) AddAccelerator(accelSignal string, accelGroup AccelGroup, accelKey int, ...)
- func (w *CWidget) AddEvents(events cdk.EventMask)
- func (w *CWidget) AddMnemonicLabel(label Widget)
- func (w *CWidget) CanActivateAccel(signalId int) (value bool)
- func (w *CWidget) CanDefault() bool
- func (w *CWidget) CanFocus() bool
- func (w *CWidget) ChildFocus(direction DirectionType) (value bool)
- func (w *CWidget) ChildNotify(childProperty string)
- func (w *CWidget) ClassPath(pathLength int, path string, pathReversed string)
- func (w *CWidget) CssFullPath() (selector string)
- func (w *CWidget) CssState() (state StateType)
- func (w *CWidget) Destroy()
- func (w *CWidget) Draw() enums.EventFlag
- func (w *CWidget) ErrorBell()
- func (w *CWidget) FreezeChildNotify()
- func (w *CWidget) GetAncestor(widgetType cdk.CTypeTag) (value Widget)
- func (w *CWidget) GetAppPaintable() (value bool)
- func (w *CWidget) GetCanDefault() (value bool)
- func (w *CWidget) GetCanFocus() (value bool)
- func (w *CWidget) GetChildVisible() (value bool)
- func (w *CWidget) GetCompositeName() (value string)
- func (w *CWidget) GetDefaultDirection() (value TextDirection)
- func (w *CWidget) GetDirection() (value TextDirection)
- func (w *CWidget) GetDisplay() (value cdk.Display)
- func (w *CWidget) GetEvents() (value cdk.EventMask)
- func (w *CWidget) GetFlags() WidgetFlags
- func (w *CWidget) GetHasTooltip() (value bool)
- func (w *CWidget) GetHasWindow() (ok bool)
- func (w *CWidget) GetMapped() (value bool)
- func (w *CWidget) GetNoShowAll() (value bool)
- func (w *CWidget) GetParent() (value Container)
- func (w *CWidget) GetParentWindow() (value Window)
- func (w *CWidget) GetPointer(x int, y int)
- func (w *CWidget) GetRealized() (value bool)
- func (w *CWidget) GetReceivesDefault() (value bool)
- func (w *CWidget) GetRootWindow() (value Window)
- func (w *CWidget) GetScreen() (value cdk.Display)
- func (w *CWidget) GetSensitive() (value bool)
- func (w *CWidget) GetSizeRequest() (width, height int)
- func (w *CWidget) GetState() (value StateType)
- func (w *CWidget) GetTheme() (theme paint.Theme)
- func (w *CWidget) GetThemeRequest() (theme paint.Theme)
- func (w *CWidget) GetTooltipMarkup() (value string)
- func (w *CWidget) GetTooltipText() (value string)
- func (w *CWidget) GetTooltipWindow() (value Window)
- func (w *CWidget) GetTopParent() (parent Container)
- func (w *CWidget) GetToplevel() (value Widget)
- func (w *CWidget) GetVisible() (value bool)
- func (w *CWidget) GetWidgetAt(p *ptypes.Point2I) Widget
- func (w *CWidget) GetWindow() (window Window)
- func (w *CWidget) GrabDefault()
- func (w *CWidget) GrabEventFocus()
- func (w *CWidget) GrabFocus()
- func (w *CWidget) HasDefault() (value bool)
- func (w *CWidget) HasEventFocus() bool
- func (w *CWidget) HasFlags(f WidgetFlags) bool
- func (w *CWidget) HasFocus() (value bool)
- func (w *CWidget) HasGrab() (value bool)
- func (w *CWidget) HasScreen() (value bool)
- func (w *CWidget) HasState(s StateType) bool
- func (w *CWidget) Hide()
- func (w *CWidget) HideOnDelete() (value bool)
- func (w *CWidget) Init() (already bool)
- func (w *CWidget) IsAncestor(ancestor Widget) (value bool)
- func (w *CWidget) IsDefault() bool
- func (w *CWidget) IsDrawable() (value bool)
- func (w *CWidget) IsFocus() (value bool)
- func (w *CWidget) IsFocused() bool
- func (w *CWidget) IsParentFocused() bool
- func (w *CWidget) IsSensitive() bool
- func (w *CWidget) IsToplevel() (value bool)
- func (w *CWidget) IsVisible() bool
- func (w *CWidget) KeynavFailed(direction DirectionType) (value bool)
- func (w *CWidget) MnemonicActivate(groupCycling bool) (value bool)
- func (w *CWidget) Path() (path string)
- func (w *CWidget) ReleaseEventFocus()
- func (w *CWidget) RemoveAccelerator(accelGroup AccelGroup, accelKey int, accelMods ModifierType) (value bool)
- func (w *CWidget) RemoveMnemonicLabel(label Widget)
- func (w *CWidget) Reparent(parent Container)
- func (w *CWidget) SendExpose(event cdk.Event) (value int)
- func (w *CWidget) SendFocusChange(event cdk.Event) (value bool)
- func (w *CWidget) SetAccelPath(accelPath string, accelGroup AccelGroup)
- func (w *CWidget) SetAppPaintable(appPaintable bool)
- func (w *CWidget) SetCanDefault(canDefault bool)
- func (w *CWidget) SetCanFocus(canFocus bool)
- func (w *CWidget) SetCompositeName(name string)
- func (w *CWidget) SetDefaultDirection(dir TextDirection)
- func (w *CWidget) SetDirection(dir TextDirection)
- func (w *CWidget) SetDoubleBuffered(doubleBuffered bool)
- func (w *CWidget) SetEvents(events cdk.EventMask)
- func (w *CWidget) SetFlags(v WidgetFlags)
- func (w *CWidget) SetHasTooltip(hasTooltip bool)
- func (w *CWidget) SetMapped(mapped bool)
- func (w *CWidget) SetNoShowAll(noShowAll bool)
- func (w *CWidget) SetParent(parent Container)
- func (w *CWidget) SetParentWindow(parentWindow Window)
- func (w *CWidget) SetRealized(realized bool)
- func (w *CWidget) SetReceivesDefault(receivesDefault bool)
- func (w *CWidget) SetRedrawOnAllocate(redrawOnAllocate bool)
- func (w *CWidget) SetScrollAdjustments(hadjustment Adjustment, vadjustment Adjustment) (value bool)
- func (w *CWidget) SetSensitive(sensitive bool)
- func (w *CWidget) SetSizeRequest(width, height int)
- func (w *CWidget) SetState(state StateType)
- func (w *CWidget) SetTheme(theme paint.Theme)
- func (w *CWidget) SetTooltipMarkup(markup string)
- func (w *CWidget) SetTooltipText(text string)
- func (w *CWidget) SetTooltipWindow(customWindow Window)
- func (w *CWidget) SetVisible(visible bool)
- func (w *CWidget) SetWindow(window Window)
- func (w *CWidget) Show()
- func (w *CWidget) ShowAll()
- func (w *CWidget) SizeRequest() ptypes.Rectangle
- func (w *CWidget) TranslateCoordinates(destWidget Widget, srcX int, srcY int, destX int, destY int) (value bool)
- func (w *CWidget) TriggerTooltipQuery()
- func (w *CWidget) Unparent()
- func (w *CWidget) UnsetFlags(v WidgetFlags)
- func (w *CWidget) UnsetState(state StateType)
- type CWindow
- func (w *CWindow) ActivateDefault() (value bool)
- func (w *CWindow) ActivateFocus() (value bool)
- func (w *CWindow) ActivateKey(event cdk.EventKey) (value bool)
- func (w *CWindow) AddAccelGroup(accelGroup AccelGroup)
- func (w *CWindow) AddMnemonic(keyval rune, target interface{})
- func (w *CWindow) AddStylesFromString(css string) (err error)
- func (w *CWindow) ApplyStylesTo(widget Widget)
- func (w *CWindow) Build(builder Builder, element *CBuilderElement) error
- func (w *CWindow) Deiconify()
- func (w *CWindow) FocusNext() enums.EventFlag
- func (w *CWindow) FocusPrevious() enums.EventFlag
- func (w *CWindow) Fullscreen()
- func (w *CWindow) GetAcceptFocus() (value bool)
- func (w *CWindow) GetDecorated() (value bool)
- func (w *CWindow) GetDefaultSize(width int, height int)
- func (w *CWindow) GetDefaultWidget() (value Widget)
- func (w *CWindow) GetDeletable() (value bool)
- func (w *CWindow) GetDestroyWithParent() (value bool)
- func (w *CWindow) GetDisplay() (dm cdk.Display)
- func (w *CWindow) GetEventFocus() (o interface{})
- func (w *CWindow) GetFocus() (focus interface{})
- func (w *CWindow) GetFocusOnMap() (value bool)
- func (w *CWindow) GetMnemonicModifier() (value cdk.ModMask)
- func (w *CWindow) GetMnemonicsVisible() (value bool)
- func (w *CWindow) GetModal() (value bool)
- func (w *CWindow) GetNextFocus() (next interface{})
- func (w *CWindow) GetOpacity() (value float64)
- func (w *CWindow) GetPosition(rootX int, rootY int)
- func (w *CWindow) GetPreviousFocus() (previous interface{})
- func (w *CWindow) GetResizable() (value bool)
- func (w *CWindow) GetRole() (value string)
- func (w *CWindow) GetSize() (width, height int)
- func (w *CWindow) GetSkipPagerHint() (value bool)
- func (w *CWindow) GetSkipTaskbarHint() (value bool)
- func (w *CWindow) GetTitle() (value string)
- func (w *CWindow) GetTransientFor() (value Window)
- func (w *CWindow) GetUrgencyHint() (value bool)
- func (w *CWindow) GetVBox() (vbox VBox)
- func (w *CWindow) HasGroup() (value bool)
- func (w *CWindow) HasToplevelFocus() (focused bool)
- func (w *CWindow) Iconify()
- func (w *CWindow) Init() (already bool)
- func (w *CWindow) IsActive() (active bool)
- func (w *CWindow) ListTopLevels() (value []Window)
- func (w *CWindow) Maximize()
- func (w *CWindow) MnemonicActivate(keyval rune, modifier cdk.ModMask) (activated bool)
- func (w *CWindow) Move(x int, y int)
- func (w *CWindow) ParseGeometry(geometry string) (value bool)
- func (w *CWindow) Present()
- func (w *CWindow) PresentWithTime(timestamp int)
- func (w *CWindow) PropagateKeyEvent(event cdk.EventKey) (value bool)
- func (w *CWindow) RemoveAccelGroup(accelGroup AccelGroup)
- func (w *CWindow) RemoveMnemonic(keyval rune, target interface{})
- func (w *CWindow) RemoveWidgetMnemonics(target interface{})
- func (w *CWindow) ReplaceStylesFromString(css string) (err error)
- func (w *CWindow) ReshowWithInitialSize()
- func (w *CWindow) SetAcceptFocus(setting bool)
- func (w *CWindow) SetAutoStartupNotification(setting bool)
- func (w *CWindow) SetDecorated(setting bool)
- func (w *CWindow) SetDefault(defaultWidget Widget)
- func (w *CWindow) SetDeletable(setting bool)
- func (w *CWindow) SetDestroyWithParent(setting bool)
- func (w *CWindow) SetDisplay(dm cdk.Display)
- func (w *CWindow) SetEventFocus(o interface{})
- func (w *CWindow) SetFocus(focus interface{})
- func (w *CWindow) SetFocusOnMap(setting bool)
- func (w *CWindow) SetKeepAbove(setting bool)
- func (w *CWindow) SetKeepBelow(setting bool)
- func (w *CWindow) SetMnemonicModifier(modifier cdk.ModMask)
- func (w *CWindow) SetMnemonicsVisible(setting bool)
- func (w *CWindow) SetModal(modal bool)
- func (w *CWindow) SetOpacity(opacity float64)
- func (w *CWindow) SetPosition(position WindowPosition)
- func (w *CWindow) SetResizable(resizable bool)
- func (w *CWindow) SetRole(role string)
- func (w *CWindow) SetSkipPagerHint(setting bool)
- func (w *CWindow) SetSkipTaskbarHint(setting bool)
- func (w *CWindow) SetStartupId(startupId string)
- func (w *CWindow) SetTitle(title string)
- func (w *CWindow) SetTransientFor(parent Window)
- func (w *CWindow) SetUrgencyHint(setting bool)
- func (w *CWindow) Stick()
- func (w *CWindow) Unfullscreen()
- func (w *CWindow) Unmaximize()
- func (w *CWindow) Unstick()
- type CalendarDisplayOptions
- type CellRendererAccelMode
- type CellRendererMode
- type CellRendererState
- type CellType
- type Container
- type CornerType
- type CurveType
- type DebugFlag
- type DeleteType
- type Dialog
- type DialogFlags
- type DirectionType
- type Drawable
- type EntryIconPosition
- type EnumFromString
- type ErrorType
- type EventBox
- type ExpanderStyle
- type ExtensionMode
- type FileChooserAction
- type FileChooserConfirmation
- type FileChooserError
- type FileChooserProp
- type FileFilterFlags
- type Frame
- type GClosure
- type Gravity
- type HBox
- type HButtonBox
- type HScrollbar
- type IMPreeditStyle
- type IMStatusStyle
- type IconLookupFlags
- type IconSize
- type IconThemeError
- type IconViewDropPosition
- type ImageType
- type Label
- type LayoutStyle
- type LoadState
- type LocationMode
- type MatchType
- type MenuDirectionType
- type MessageType
- type MetricType
- type Misc
- type ModifierType
- type MovementStep
- type NotebookTab
- type NumberUpLayout
- type Object
- type OperationMode
- type Orientable
- type PackDirection
- type PackType
- type PageSet
- type ParamFlags
- type PathPriorityType
- type PathType
- type PolicyType
- type PositionType
- type PrintPages
- type PrivateFlags
- type ProgressBarOrientation
- type ProgressBarStyle
- type RBNodeColor
- type Range
- type RcFlags
- type RcStyle
- type RcTokenType
- type RecentChooserError
- type RecentChooserProp
- type RecentFilterFlags
- type RecentManagerError
- type RecentSortType
- type ReliefStyle
- type ReloadState
- type ResponseType
- type ScrollStep
- type ScrollType
- type Scrollbar
- type ScrolledViewport
- type SelectionMode
- type Sensitive
- type SensitivityType
- type ShadowType
- type SideType
- type SizeGroupMode
- type SortType
- type SpinButtonUpdatePolicy
- type SpinType
- type StartupMode
- type StateType
- type StockID
- type StockItem
- type Style
- type StyleProperty
- type StyleSheetMedia
- type StyleSheetProperty
- type StyleSheetRule
- type StyleSheetSelector
- type SubmenuDirection
- type SubmenuPlacement
- type TextBufferTargetInfo
- type TextDirection
- type TextSearchFlags
- type TextWindowType
- type TokenType
- type ToolbarChildType
- type ToolbarSpaceStyle
- type ToolbarStyle
- type TreeModelFlags
- type TreeViewColumnSizing
- type TreeViewDropPosition
- type TreeViewFlags
- type TreeViewGridLines
- type TreeViewMode
- type UIManagerItemType
- type Unit
- type UpdateType
- type VBox
- type VButtonBox
- type VScrollbar
- type Viewport
- type Visibility
- type Widget
- type WidgetFlags
- type WidgetHelpType
- type Window
- type WindowEdge
- type WindowPosition
- type WindowType
- type WindowTypeHint
- type WithFakeWindowFn
Constants ¶
const ( ANCHOR_CENTER AnchorType = iota ANCHOR_NORTH ANCHOR_NORTH_WEST ANCHOR_NORTH_EAST ANCHOR_SOUTH ANCHOR_SOUTH_WEST ANCHOR_SOUTH_EAST ANCHOR_WEST ANCHOR_EAST ANCHOR_N = ANCHOR_NORTH ANCHOR_NW = ANCHOR_NORTH_WEST ANCHOR_NE = ANCHOR_NORTH_EAST ANCHOR_S = ANCHOR_SOUTH ANCHOR_SW = ANCHOR_SOUTH_WEST ANCHOR_SE = ANCHOR_SOUTH_EAST ANCHOR_W = ANCHOR_WEST ANCHOR_E = ANCHOR_EAST )
const ( SignalAllocation cdk.Signal = "allocation" SignalCancelEvent cdk.Signal = "cancel-event" SignalCdkEvent cdk.Signal = "cdk-event" SignalDraw cdk.Signal = cdk.SignalDraw SignalError cdk.Signal = "error" SignalEventKey cdk.Signal = "key-event" SignalEventMouse cdk.Signal = "mouse-event" SignalGainedEventFocus cdk.Signal = "gained-event-focus" SignalGainedFocus cdk.Signal = "gained-focus" SignalGrabEventFocus cdk.Signal = "grab-event-focus" SignalHomogeneous cdk.Signal = "homogeneous" SignalInvalidate cdk.Signal = "invalidate" SignalLostEventFocus cdk.Signal = "lost-event-focus" SignalLostFocus cdk.Signal = "lost-focus" SignalName cdk.Signal = "name" SignalOrigin cdk.Signal = "origin" SignalPackEnd cdk.Signal = "pack-end" SignalPackStart cdk.Signal = "pack-start" SignalReleaseEventFocus cdk.Signal = "set-event-focus" SignalReorderChild cdk.Signal = "reorder-child" SignalReparent cdk.Signal = "reparent" SignalResize cdk.Signal = "resize" SignalSetEventFocus cdk.Signal = "set-event-focus" SignalSetFlags cdk.Signal = "set-flags" SignalSetParent cdk.Signal = "set-parent" SignalSetProperty cdk.Signal = cdk.SignalSetProperty SignalSetSensitive cdk.Signal = "set-sensitive" SignalSetSizeRequest cdk.Signal = "set-size-request" SignalSetState cdk.Signal = "set-state" SignalSetTheme cdk.Signal = "set-theme" SignalSetThemeRequest cdk.Signal = "set-theme-request" SignalSetWindow cdk.Signal = "set-window" SignalShowAll cdk.Signal = "show-all" SignalSpacing cdk.Signal = "spacing" SignalTextDirection cdk.Signal = "text-direction" SignalUnparent cdk.Signal = "unparent" SignalUnsetFlags cdk.Signal = "unset-flags" SignalUnsetState cdk.Signal = "unset-state" )
const AlignmentDrawHandle = "alignment-draw-handler"
const AlignmentEventResizeHandle = "alignment-event-resize-handler"
const AlignmentGainedFocusHandle = "alignment-gained-focus-handler"
const AlignmentInvalidateHandler = "alignment-invalidate-handler"
const AlignmentLostFocusHandle = "alignment-lost-focus-handler"
const ArrowDrawHandle = "arrow-draw-handler"
const BoxChildHideHandle = "box-child-hide-handler"
const BoxChildShowHandle = "box-child-show-handler"
const BoxDrawHandle = "box-draw-handler"
const BoxInvalidateHandle = "box-invalidate-handler"
const BoxResizeHandle = "box-resize-handler"
const ButtonBoxDrawHandle = "button-box-draw-handler"
const ButtonCdkEventHandle = "button-cdk-event-handler"
const ButtonDrawHandle = "button-draw-handler"
const ButtonInvalidateHandle = "button-invalidate-handler"
const ButtonResizeHandle = "button-resize-handler"
const ButtonSetPropertyHandle = "button-set-property-handler"
const ContainerGainedFocusHandle = "container-gained-focus-handler"
const ContainerLostFocusHandle = "container-lost-focus-handler"
const CssPropertyBackgroundColor cdk.Property = "background-color"
const CssPropertyBackgroundFillContent cdk.Property = "background-fill-content"
const CssPropertyBlink cdk.Property = "blink"
const CssPropertyBold cdk.Property = "bold"
const CssPropertyBorder cdk.Property = "border"
const CssPropertyBorderBackgroundColor cdk.Property = "border-background-color"
const CssPropertyBorderBottomContent cdk.Property = "border-bottom-content"
const CssPropertyBorderBottomLeftContent cdk.Property = "border-bottom-left-content"
const CssPropertyBorderBottomRightContent cdk.Property = "border-bottom-right-content"
const CssPropertyBorderColor cdk.Property = "border-color"
const CssPropertyBorderLeftContent cdk.Property = "border-left-content"
const CssPropertyBorderRightContent cdk.Property = "border-right-content"
const CssPropertyBorderTopContent cdk.Property = "border-top-content"
const CssPropertyBorderTopLeftContent cdk.Property = "border-top-left-content"
const CssPropertyBorderTopRightContent cdk.Property = "border-top-right-content"
const CssPropertyClass cdk.Property = "class"
const CssPropertyColor cdk.Property = "color"
const CssPropertyDim cdk.Property = "dim"
const CssPropertyHeight cdk.Property = "height"
const CssPropertyItalic cdk.Property = "italic"
const CssPropertyReverse cdk.Property = "reverse"
const CssPropertyStrike cdk.Property = "strike"
const CssPropertyUnderline cdk.Property = "underline"
const CssPropertyWidth cdk.Property = "width"
const DialogActivateHandle = "dialog-activate-handler"
const DialogDrawHandle = "dialog-draw-handler"
const DialogEventHandle = "dialog-event-handler"
const DialogInvalidateHandle = "dialog-invalidate-handler"
const DialogResizeHandle = "dialog-resize-handler"
const DialogResponseHandle = "dialog-response-handler"
const FrameChildGainedFocusHandle = "frame-child-gained-focus-handler"
const FrameChildLostFocusHandle = "frame-child-lost-focus-handler"
const FrameDrawHandle = "frame-draw-handler"
const FrameInvalidateHandle = "frame-invalidate-handler"
const FrameResizeHandle = "frame-resize-handler"
const LabelDrawHandle = "label-draw-handler"
const LabelInvalidateHandle = "label-invalidate-handler"
const LabelResizeHandle = "label-resize-handler"
const PropertyAboveChild cdk.Property = "above-child"
Whether the event-trapping window of the eventbox is above the window of the child widget as opposed to below it. Flags: Read / Write Default value: FALSE
const PropertyAcceptFocus cdk.Property = "accept-focus"
Whether the window should receive the input focus. Flags: Read / Write Default value: TRUE
const PropertyAdjustment cdk.Property = "adjustment"
The Adjustment that contains the current value of this range object. Flags: Read / Write / Construct
const PropertyAppPaintable cdk.Property = "app-paintable"
Whether the application will paint directly on the widget. Flags: Read / Write Default value: FALSE
const PropertyArrowShadowType cdk.Property = "shadow-type"
Appearance of the shadow surrounding the arrow. Flags: Read / Write Default value: GTK_SHADOW_OUT
const PropertyArrowType cdk.Property = "arrow-type"
The direction the arrow should point. Flags: Read / Write Default value: GTK_ARROW_RIGHT
const PropertyAttributes cdk.Property = "attributes"
A list of style attributes to apply to the text of the label. Flags: Read / Write
const PropertyBorderWidth cdk.Property = "border-width"
The width of the empty border outside the containers children. Flags: Read / Write Allowed values: <= 65535 Default value: 0
const PropertyBottomPadding cdk.Property = "bottom-padding"
The padding to insert at the bottom of the widget. Flags: Read / Write Allowed values: <= G_MAXINT Default value: 0
const PropertyBoxChildExpand cdk.Property = "box-child--expand"
const PropertyBoxChildFill cdk.Property = "box-child--fill"
const PropertyBoxChildPackType cdk.Property = "box-child--pack-type"
const PropertyBoxChildPadding cdk.Property = "box-child--padding"
const PropertyButtonLabel cdk.Property = "label"
Text of the label widget inside the button, if the button contains a label widget. Flags: Read / Write / Construct Default value: NULL
const PropertyCanDefault cdk.Property = "can-default"
Whether the widget can be the default widget. Flags: Read / Write Default value: FALSE
const PropertyCanFocus cdk.Property = "can-focus"
Whether the widget can accept the input focus. Flags: Read / Write Default value: FALSE
const PropertyChild cdk.Property = "child"
Can be used to add a new child to the container. Flags: Write
const PropertyCompositeChild cdk.Property = "composite-child"
Whether the widget is part of a composite widget. Flags: Read Default value: FALSE
const PropertyCursorPosition cdk.Property = "cursor-position"
The current position of the insertion cursor in chars. Flags: Read Allowed values: >= 0 Default value: 0
const PropertyDebug cdk.Property = cdk.PropertyDebug
const PropertyDebugChildren cdk.Property = "debug-children"
const PropertyDecorated cdk.Property = "decorated"
Whether the window should be decorated by the window manager. Flags: Read / Write Default value: TRUE
const PropertyDefaultHeight cdk.Property = "default-height"
The default height of the window, used when initially showing the window. Flags: Read / Write Allowed values: >= -1 Default value: -1
const PropertyDefaultWidth cdk.Property = "default-width"
The default width of the window, used when initially showing the window. Flags: Read / Write Allowed values: >= -1 Default value: -1
const PropertyDeletable cdk.Property = "deletable"
Whether the window frame should have a close button. Flags: Read / Write Default value: TRUE
const PropertyDestroyWithParent cdk.Property = "destroy-with-parent"
If this window should be destroyed when the parent is destroyed. Flags: Read / Write Default value: FALSE
const PropertyDoubleBuffered cdk.Property = "double-buffered"
Whether or not the widget is double buffered. Flags: Read / Write Default value: TRUE
const PropertyEllipsize cdk.Property = "ellipsize"
The preferred place to ellipsize the string, if the label does not have enough room to display the entire string, specified as a bool. Flags: Read / Write Default value: false
const PropertyEvents cdk.Property = "events"
The event mask that decides what kind of Events this widget gets. Flags: Read / Write Default value: GDK_STRUCTURE_MASK
const PropertyExtensionEvents cdk.Property = "extension-events"
The mask that decides what kind of extension events this widget gets. Flags: Read / Write Default value: GDK_EXTENSION_EVENTS_NONE
const PropertyFillLevel cdk.Property = "fill-level"
The fill level (e.g. prebuffering of a network stream). See SetFillLevel. Flags: Read / Write Default value: 1.79769e+308
const PropertyFocusOnClick cdk.Property = "focus-on-click"
Whether the button grabs focus when it is clicked with the mouse. Flags: Read / Write Default value: TRUE
const PropertyFocusOnMap cdk.Property = "focus-on-map"
Whether the window should receive the input focus when mapped. Flags: Read / Write Default value: TRUE
const PropertyGravity cdk.Property = "gravity"
The window gravity of the window. See Move and Gravity for more details about window gravity. Flags: Read / Write Default value: GDK_GRAVITY_NORTH_WEST
const PropertyHAdjustment cdk.Property = "h-adjustment"
The Adjustment for the horizontal position. Flags: Read / Write / Construct
const PropertyHScrollbarPolicy cdk.Property = "h-scrollbar-policy"
When the horizontal scrollbar is displayed. Flags: Read / Write Default value: GTK_POLICY_ALWAYS
const PropertyHandler cdk.Property = "handler"
const PropertyHasDefault cdk.Property = "has-default"
Whether the widget is the default widget. Flags: Read / Write Default value: FALSE
const PropertyHasFocus cdk.Property = "has-focus"
Whether the widget has the input focus. Flags: Read / Write Default value: FALSE
const PropertyHasTooltip cdk.Property = "has-tooltip"
Enables or disables the emission of query-tooltip on widget . A value of TRUE indicates that widget can have a tooltip, in this case the widget will be queried using query-tooltip to determine whether it will provide a tooltip or not. Note that setting this property to TRUE for the first time will change the event masks of the Windows of this widget to include leave-notify and motion-notify events. This cannot and will not be undone when the property is set to FALSE again. Flags: Read / Write Default value: FALSE
const PropertyHasToplevelFocus cdk.Property = "has-toplevel-focus"
Whether the input focus is within this Window. Flags: Read Default value: FALSE
const PropertyHeightRequest cdk.Property = "height-request"
Override for height request of the widget, or -1 if natural request should be used. Flags: Read / Write Allowed values: >= -1 Default value: -1
const PropertyHomogeneous cdk.Property = "homogeneous"
Whether the children should all be the same size. Flags: Read / Write Default value: FALSE
const PropertyID cdk.Property = "id"
const PropertyIcon cdk.Property = "icon"
Icon for this window. Flags: Read / Write
const PropertyIconName cdk.Property = "icon-name"
The :icon-name property specifies the name of the themed icon to use as the window icon. See IconTheme for more details. Flags: Read / Write Default value: NULL
const PropertyImage cdk.Property = "image"
Child widget to appear next to the button text. Flags: Read / Write
const PropertyImagePosition cdk.Property = "image-position"
The position of the image relative to the text inside the button. Flags: Read / Write Default value: GTK_POS_LEFT
const PropertyInverted cdk.Property = "inverted"
Invert direction slider moves to increase range value. Flags: Read / Write Default value: FALSE
const PropertyIsActive cdk.Property = "is-active"
Whether the toplevel is the current active window. Flags: Read Default value: FALSE
const PropertyIsFocus cdk.Property = "is-focus"
Whether the widget is the focus widget within the toplevel. Flags: Read / Write Default value: FALSE
const PropertyIsLocked cdk.Property = "is-locked"
Is the accel group locked. Flags: Read Default value: FALSE
const PropertyJustify cdk.Property = "justify"
The alignment of the lines in the text of the label relative to each other. This does NOT affect the alignment of the label within its allocation. See Misc::xAlign for that. Flags: Read / Write Default value: enums.JUSTIFY_LEFT
const PropertyLabel cdk.Property = "label"
The text of the label. Flags: Read / Write Default value: ""
const PropertyLabelUseUnderline cdk.Property = "use-underline"
If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key. Flags: Read / Write Default value: FALSE
const PropertyLabelWidget cdk.Property = "label-widget"
A widget to display in place of the usual frame label. Flags: Read / Write
const PropertyLabelXAlign cdk.Property = "label-x-align"
The horizontal alignment of the label. Flags: Read / Write Allowed values: [0,1] Default value: 0
const PropertyLabelYAlign cdk.Property = "label-y-align"
The vertical alignment of the label. Flags: Read / Write Allowed values: [0,1] Default value: 0.5
const PropertyLayoutStyle cdk.Property = "layout-style"
How to lay out the buttons in the box. Possible values are: default, spread, edge, start and end. Flags: Read / Write Default value: GTK_BUTTONBOX_DEFAULT_STYLE
const PropertyLeftPadding cdk.Property = "left-padding"
The padding to insert at the left of the widget. Flags: Read / Write Allowed values: <= G_MAXINT Default value: 0
const PropertyLower cdk.Property = "lower"
The minimum value of the adjustment. Flags: Read / Write Default value: 0
const PropertyLowerStepperSensitivity cdk.Property = "lower-stepper-sensitivity"
The sensitivity policy for the stepper that points to the adjustment's lower side. Flags: Read / Write Default value: GTK_SENSITIVITY_AUTO
const PropertyMaxWidthChars cdk.Property = "max-width-chars"
The desired maximum width of the label, in characters. If this property is set to -1, the width will be calculated automatically, otherwise the label will request space for no more than the requested number of characters. If the “width-chars” property is set to a positive value, then the "max-width-chars" property is ignored. Flags: Read / Write Allowed values: >= -1 Default value: -1
const PropertyMnemonicKeyVal cdk.Property = "mnemonic-key-val"
The mnemonic accelerator key for this label. Flags: Read Default value: 16777215
const PropertyMnemonicWidget cdk.Property = "mnemonic-widget"
The widget to be activated when the label's mnemonic key is pressed. Flags: Read / Write
const PropertyMnemonicsVisible cdk.Property = "mnemonics-visible"
Whether mnemonics are currently visible in this window. Flags: Read / Write Default value: TRUE
const PropertyModal cdk.Property = "modal"
If TRUE, the window is modal (other windows are not usable while this one is up). Flags: Read / Write Default value: FALSE
const PropertyModifierMask cdk.Property = "modifier-mask"
Modifier Mask. Flags: Read Default value: GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_SUPER_MASK | GDK_HYPER_MASK | GDK_META_MASK
const PropertyName cdk.Property = "name"
The name of the widget. Flags: Read / Write Default value: NULL
const PropertyNoShowAll cdk.Property = "no-show-all"
Whether ShowAll should not affect this widget. Flags: Read / Write Default value: FALSE
const PropertyOpacity cdk.Property = "opacity"
The requested opacity of the window. See SetOpacity for more details about window opacity. Flags: Read / Write Allowed values: [0,1] Default value: 1
const PropertyOrientation cdk.Property = "orientation"
The orientation of the orientable. Flags: Read / Write Default value: ORIENTATION_HORIZONTAL
const PropertyPageIncrement cdk.Property = "page-increment"
The page increment of the adjustment. Flags: Read / Write Default value: 0
const PropertyPageSize cdk.Property = "page-size"
The page size of the adjustment. Note that the page-size is irrelevant and should be set to zero if the adjustment is used for a simple scalar value, e.g. in a SpinButton. Flags: Read / Write Default value: 0
const PropertyParent cdk.Property = "parent"
The parent widget of this widget. Must be a Container widget. Flags: Read / Write
const PropertyReceivesDefault cdk.Property = "receives-default"
If TRUE, the widget will receive the default action when it is focused. Flags: Read / Write Default value: FALSE
const PropertyRelatedAction cdk.Property = "related-action"
The action that this activatable will activate and receive updates from for various states and possibly appearance. Flags: Read / Write
const PropertyRelief cdk.Property = "relief"
The border relief style. Flags: Read / Write Default value: GTK_RELIEF_NORMAL
const PropertyResizable cdk.Property = "resizable"
If TRUE, users can resize the window. Flags: Read / Write Default value: TRUE
const PropertyResizeMode cdk.Property = "resize-mode"
Specify how resize events are handled. Flags: Read / Write Default value: GTK_RESIZE_PARENT
const PropertyRestrictToFillLevel cdk.Property = "restrict-to-fill-level"
The restrict-to-fill-level property controls whether slider movement is restricted to an upper boundary set by the fill level. See SetRestrictToFillLevel. Flags: Read / Write Default value: TRUE
const PropertyRightPadding cdk.Property = "right-padding"
The padding to insert at the right of the widget. Flags: Read / Write Allowed values: <= G_MAXINT Default value: 0
const PropertyRole cdk.Property = "role"
Unique identifier for the window to be used when restoring a session. Flags: Read / Write Default value: NULL
const PropertyRoundDigits cdk.Property = "round-digits"
The number of digits to round the value to when it changes, or -1. See “change-value”. Flags: Read / Write Allowed values: >= -1 Default value: -1
const PropertyScreen cdk.Property = "screen"
The screen where this window will be displayed. Flags: Read / Write
const PropertyScrolledViewportShadowType cdk.Property = "viewport-shadow-type"
Style of bevel around the contents. Flags: Read / Write Default value: GTK_SHADOW_NONE
const PropertySelectable cdk.Property = "selectable"
Whether the label text can be selected with the mouse. Flags: Read / Write Default value: FALSE
const PropertySelectionBound cdk.Property = "selection-bound"
The position of the opposite end of the selection from the cursor in chars. Flags: Read Allowed values: >= 0 Default value: 0
const PropertySensitive cdk.Property = "sensitive"
Whether the widget responds to input. Flags: Read / Write Default value: TRUE
const PropertyShadow cdk.Property = "shadow"
Deprecated property, use shadow_type instead. Flags: Read / Write Default value: GTK_SHADOW_ETCHED_IN
const PropertyShadowType cdk.Property = "shadow-type"
Appearance of the frame border. Flags: Read / Write Default value: GTK_SHADOW_ETCHED_IN
const PropertyShowFillLevel cdk.Property = "show-fill-level"
The show-fill-level property controls whether fill level indicator graphics are displayed on the trough. See SetShowFillLevel. Flags: Read / Write Default value: FALSE
const PropertySingleLineMode cdk.Property = "single-line-mode"
Whether the label is in single line mode. In single line mode, the height of the label does not depend on the actual text, it is always set to ascent + descent of the font. This can be an advantage in situations where resizing the label because of text changes would be distracting, e.g. in a statusbar. Flags: Read / Write Default value: FALSE
const PropertySkipPagerHint cdk.Property = "skip-pager-hint"
TRUE if the window should not be in the pager. Flags: Read / Write Default value: FALSE
const PropertySkipTaskbarHint cdk.Property = "skip-taskbar-hint"
TRUE if the window should not be in the task bar. Flags: Read / Write Default value: FALSE
const PropertySpacing cdk.Property = "spacing"
The amount of space between children. Flags: Read / Write Allowed values: >= 0 Default value: 0
const PropertyStartupId cdk.Property = "startup-id"
The :startup-id is a write-only property for setting window's startup notification identifier. See SetStartupId for more details. Flags: Write Default value: NULL
const PropertyStepIncrement cdk.Property = "step-increment"
The step increment of the adjustment. Flags: Read / Write Default value: 0
const PropertyStyle cdk.Property = "style"
The style of the widget, which contains information about how it will look (colors etc). Flags: Read / Write
const PropertySwapped cdk.Property = "swapped"
const PropertyTitle cdk.Property = "title"
The title of the window. Flags: Read / Write Default value: NULL
const PropertyTooltipMarkup cdk.Property = "tooltip-markup"
Sets the text of tooltip to be the given string, which is marked up with the Tango text markup language. Also see TooltipSetMarkup. This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL: has-tooltip will automatically be set to TRUE and there will be taken care of query-tooltip in the default signal handler. Flags: Read / Write Default value: NULL
const PropertyTooltipText cdk.Property = "tooltip-text"
Sets the text of tooltip to be the given string. Also see TooltipSetText. This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL: has-tooltip will automatically be set to TRUE and there will be taken care of query-tooltip in the default signal handler. Flags: Read / Write Default value: NULL
const PropertyTopPadding cdk.Property = "top-padding"
The padding to insert at the top of the widget. Flags: Read / Write Allowed values: <= G_MAXINT Default value: 0
const PropertyTrackVisitedLinks cdk.Property = "track-visited-links"
Set this property to TRUE to make the label track which links have been clicked. It will then apply the ::visited-link-color color, instead of ::link-color. Flags: Read / Write Default value: TRUE
const PropertyTransientFor cdk.Property = "transient-for"
The transient parent of the window. See SetTransientFor for more details about transient windows. Flags: Read / Write / Construct
const PropertyType cdk.Property = "type"
The type of the window. Flags: Read / Write / Construct Only Default value: GTK_WINDOW_TOPLEVEL
const PropertyTypeHint cdk.Property = "type-hint"
Hint to help the desktop environment understand what kind of window this is and how to treat it. Flags: Read / Write Default value: GDK_WINDOW_TYPE_HINT_NORMAL
const PropertyUpdatePolicy cdk.Property = "update-policy"
How the range should be updated on the screen. Flags: Read / Write Default value: GTK_UPDATE_CONTINUOUS
const PropertyUpper cdk.Property = "upper"
The maximum value of the adjustment. Note that values will be restricted by upper - page-size if the page-size property is nonzero. Flags: Read / Write Default value: 0
const PropertyUpperStepperSensitivity cdk.Property = "upper-stepper-sensitivity"
The sensitivity policy for the stepper that points to the adjustment's upper side. Flags: Read / Write Default value: GTK_SENSITIVITY_AUTO
const PropertyUrgencyHint cdk.Property = "urgency-hint"
TRUE if the window should be brought to the user's attention. Flags: Read / Write Default value: FALSE
const PropertyUseActionAppearance cdk.Property = "use-action-appearance"
Whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance. See the Action documentation directly to find which properties should be ignored by the Activatable when this property is FALSE. Flags: Read / Write Default value: TRUE
const PropertyUseMarkup cdk.Property = "use-markup"
The text of the label includes XML markup. See pango_parse_markup. Flags: Read / Write Default value: FALSE
const PropertyUseStock cdk.Property = "use-stock"
If set, the label is used to pick a stock item instead of being displayed. Flags: Read / Write / Construct Default value: FALSE
const PropertyUseUnderline cdk.Property = "use-underline"
If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key. Flags: Read / Write / Construct Default value: FALSE
const PropertyVAdjustment cdk.Property = "v-adjustment"
The Adjustment for the vertical position. Flags: Read / Write / Construct
const PropertyVScrollbarPolicy cdk.Property = "vscrollbar-policy"
When the vertical scrollbar is displayed. Flags: Read / Write Default value: GTK_POLICY_ALWAYS
const PropertyValue cdk.Property = "value"
The value of the adjustment. Flags: Read / Write Default value: 0
const PropertyViewportHAdjustment cdk.Property = "hadjustment"
The Adjustment that determines the values of the horizontal position for this viewport. Flags: Read / Write / Construct
const PropertyViewportShadowType cdk.Property = "shadow-type"
Determines how the shadowed box around the viewport is drawn. Flags: Read / Write Default value: GTK_SHADOW_IN
const PropertyViewportVAdjustment cdk.Property = "vadjustment"
The Adjustment that determines the values of the vertical position for this viewport. Flags: Read / Write / Construct
const PropertyVisible cdk.Property = "visible"
Whether the widget is visible. Flags: Read / Write Default value: FALSE
const PropertyVisibleWindow cdk.Property = "visible-window"
Whether the event box is visible, as opposed to invisible and only used to trap events. Flags: Read / Write Default value: TRUE
const PropertyWidthChars cdk.Property = "width-chars"
The desired width of the label, in characters. If this property is set to -1, the width will be calculated automatically, otherwise the label will request either 3 characters or the property value, whichever is greater. If the "width-chars" property is set to a positive value, then the “max-width-chars” property is ignored. Flags: Read / Write Allowed values: >= -1 Default value: -1
const PropertyWidthRequest cdk.Property = "width-request"
Override for width request of the widget, or -1 if natural request should be used. Flags: Read / Write Allowed values: >= -1 Default value: -1
const PropertyWindow cdk.Property = "window"
The widget's window if it is realized, NULL otherwise. Flags: Read
const PropertyWindowPlacement cdk.Property = "window-placement"
Where the contents are located with respect to the scrollbars. This property only takes effect if "window-placement-set" is TRUE. Flags: Read / Write Default value: GTK_CORNER_TOP_LEFT
const PropertyWindowPlacementSet cdk.Property = "window-placement-set"
Whether "window-placement" should be used to determine the location of the contents with respect to the scrollbars. Otherwise, the "gtk-scrolled-window-placement" setting is used. Flags: Read / Write Default value: FALSE
const PropertyWindowPosition cdk.Property = "window-position"
The initial position of the window. Flags: Read / Write Default value: GTK_WIN_POS_NONE
const PropertyWrap cdk.Property = "wrap"
If set, wrap lines if the text becomes too wide. Flags: Read / Write Default value: FALSE
const PropertyWrapMode cdk.Property = "wrap-mode"
If line wrapping is on (see the “wrap” property) this controls how the line wrapping is done. The default is PANGO_WRAP_WORD, which means wrap on word boundaries. Flags: Read / Write Default value: PANGO_WRAP_WORD
const PropertyXAlign cdk.Property = "x-align"
Horizontal position of child in available space. 0.0 is left aligned, 1.0 is right aligned. Flags: Read / Write Allowed values: [0,1] Default value: 0.5
const PropertyXPad cdk.Property = "x-pad"
The amount of space to add on the left and right of the widget, in pixels. Flags: Read / Write Allowed values: >= 0 Default value: 0
const PropertyXScale cdk.Property = "x-scale"
If available horizontal space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all. Flags: Read / Write Allowed values: [0,1] Default value: 1
const PropertyYAlign cdk.Property = "y-align"
Vertical position of child in available space. 0.0 is top aligned, 1.0 is bottom aligned. Flags: Read / Write Allowed values: [0,1] Default value: 0.5
const PropertyYPad cdk.Property = "y-pad"
The amount of space to add on the top and bottom of the widget, in pixels. Flags: Read / Write Allowed values: >= 0 Default value: 0
const PropertyYScale cdk.Property = "y-scale"
If available vertical space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all. Flags: Read / Write Allowed values: [0,1] Default value: 1
const ScrollbarDrawHandle = "scrollbar-draw-handler"
const ScrollbarEventHandle = "scrollbar-event-handler"
const ScrollbarInvalidateHandle = "scrollbar-invalidate-handler"
const ScrollbarResizeHandle = "scrollbar-resize-handler"
const ScrolledViewportDrawHandle = "scrolled-viewport-draw-handler"
const ScrolledViewportEventHandle = "scrolled-viewport-event-handler"
const ScrolledViewportGainedFocusHandle = "scrolled-viewport-gained-focus-handler"
const ScrolledViewportInvalidateHandle = "scrolled-viewport-invalidate-handler"
const ScrolledViewportLostFocusHandle = "scrolled-viewport-lost-focus-handler"
const ScrolledViewportResizeHandle = "scrolled-viewport-resize-handler"
const SignalAccelActivate cdk.Signal = "accel-activate"
The accel-activate signal is an implementation detail of AccelGroup and not meant to be used by applications.
const SignalAccelChanged cdk.Signal = "accel-changed"
The accel-changed signal is emitted when a AccelGroupEntry is added to or removed from the accel group. Widgets like AccelLabel which display an associated accelerator should connect to this signal, and rebuild their visual representation if the accel_closure is theirs. Listener function arguments:
keyval int the accelerator keyval modifier cdk.ModMask the modifier combination of the accelerator accelClosure GClosure the GClosure of the accelerator
const SignalAccelClosuresChanged cdk.Signal = "accel-closures-changed"
const SignalActivate cdk.Signal = "activate"
const SignalActivateCurrentLink cdk.Signal = "activate-current-link"
A keybinding signal which gets emitted when the user activates a link in the label. Applications may also emit the signal with g_signal_emit_by_name if they need to control activation of URIs programmatically. The default bindings for this signal are all forms of the Enter key.
const SignalActivateDefault cdk.Signal = "activate-default"
The ::activate-default signal is a which gets emitted when the user activates the default widget of window .
const SignalActivateFocus cdk.Signal = "activate-focus"
The ::activate-focus signal is a which gets emitted when the user activates the currently focused widget of window .
const SignalActivateLink cdk.Signal = "activate-link"
The signal which gets emitted to activate a URI. Applications may connect to it to override the default behaviour, which is to call ShowUri.
const SignalAdd cdk.Signal = "add"
Listener function arguments:
widget Widget
const SignalAdjustBounds cdk.Signal = "adjust-bounds"
Listener function arguments:
arg1 float64
const SignalButtonPressEvent cdk.Signal = "button-press-event"
The ::button-press-event signal will be emitted when a button (typically from a mouse) is pressed. To receive this signal, the Window associated to the widget needs to enable the GDK_BUTTON_PRESS_MASK mask. This signal will be sent to the grab widget if there is one.
const SignalButtonReleaseEvent cdk.Signal = "button-release-event"
The ::button-release-event signal will be emitted when a button (typically from a mouse) is released. To receive this signal, the Window associated to the widget needs to enable the GDK_BUTTON_RELEASE_MASK mask. This signal will be sent to the grab widget if there is one.
const SignalCanActivateAccel cdk.Signal = "can-activate-accel"
Determines whether an accelerator that activates the signal identified by signal_id can currently be activated. This signal is present to allow applications and derived widgets to override the default Widget handling for determining whether an accelerator can be activated.
const SignalChangeValue cdk.Signal = "change-value"
The ::change-value signal is emitted when a scroll action is performed on a range. It allows an application to determine the type of scroll event that occurred and the resultant new value. The application can handle the event itself and return TRUE to prevent further processing. Or, by returning FALSE, it can pass the event to other handlers until the default CTK handler is reached. The value parameter is unrounded. An application that overrides the ::change-value signal is responsible for clamping the value to the desired number of decimal digits; the default CTK handler clamps the value based on “round_digits”. It is not possible to use delayed update policies in an overridden ::change-value handler.
const SignalChanged cdk.Signal = "changed"
const SignalCheckResize cdk.Signal = "check-resize"
const SignalChildNotify cdk.Signal = "child-notify"
The ::child-notify signal is emitted for each changed on an object. The signal's detail holds the property name. Listener function arguments:
pspec GParamSpec the GParamSpec of the changed child property
const SignalClampPage cdk.Signal = "clamp-page"
const SignalClicked cdk.Signal = "clicked"
Emitted when the button has been activated (pressed and released).
const SignalClientEvent cdk.Signal = "client-event"
The ::client-event will be emitted when the widget 's window receives a message (via a ClientMessage event) from another application.
const SignalClose cdk.Signal = "close"
The ::close signal is a which gets emitted when the user uses a keybinding to close the dialog. The default binding for this signal is the Escape key.
const SignalCompositedChanged cdk.Signal = "composited-changed"
The ::composited-changed signal is emitted when the composited status of widget s screen changes. See ScreenIsComposited.
const SignalConfigure cdk.Signal = "configure"
const SignalConfigureEvent cdk.Signal = "configure-event"
The ::configure-event signal will be emitted when the size, position or stacking of the widget 's window has changed. To receive this signal, the Window associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.
const SignalCopyClipboard cdk.Signal = "copy-clipboard"
The ::copy-clipboard signal is a which gets emitted to copy the selection to the clipboard. The default binding for this signal is Ctrl-c.
const SignalDamageEvent cdk.Signal = "damage-event"
Emitted when a redirected window belonging to widget gets drawn into. The region/area members of the event shows what area of the redirected drawable was drawn into.
const SignalDeleteEvent cdk.Signal = "delete-event"
The ::delete-event signal is emitted if a user requests that a toplevel window is closed. The default handler for this signal destroys the window. Connecting HideOnDelete to this signal will cause the window to be hidden instead, so that it can later be shown again without reconstructing it.
const SignalDestroyEvent cdk.Signal = "destroy-event"
The ::destroy-event signal is emitted when a Window is destroyed. You rarely get this signal, because most widgets disconnect themselves from their window before they destroy it, so no widget owns the window at destroy time. To receive this signal, the Window associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.
const SignalDirectionChanged cdk.Signal = "direction-changed"
The ::direction-changed signal is emitted when the text direction of a widget changes. Listener function arguments:
previousDirection TextDirection the previous text direction of widget
const SignalDragBegin cdk.Signal = "drag-begin"
The ::drag-begin signal is emitted on the drag source when a drag is started. A typical reason to connect to this signal is to set up a custom drag icon with DragSourceSetIcon. Note that some widgets set up a drag icon in the default handler of this signal, so you may have to use g_signal_connect_after to override what the default handler did. Listener function arguments:
dragContext DragContext the drag context
const SignalDragDataDelete cdk.Signal = "drag-data-delete"
The ::drag-data-delete signal is emitted on the drag source when a drag with the action GDK_ACTION_MOVE is successfully completed. The signal handler is responsible for deleting the data that has been dropped. What "delete" means depends on the context of the drag operation. Listener function arguments:
dragContext DragContext the drag context
const SignalDragDataGet cdk.Signal = "drag-data-get"
The ::drag-data-get signal is emitted on the drag source when the drop site requests the data which is dragged. It is the responsibility of the signal handler to fill data with the data in the format which is indicated by info . See SelectionDataSet and SelectionDataSetText. Listener function arguments:
dragContext DragContext the drag context data SelectionData the GtkSelectionData to be filled with the dragged data info int the info that has been registered with the target in the GtkTargetList time int the timestamp at which the data was requested
const SignalDragDataReceived cdk.Signal = "drag-data-received"
The ::drag-data-received signal is emitted on the drop site when the dragged data has been received. If the data was received in order to determine whether the drop will be accepted, the handler is expected to call DragStatus and not finish the drag. If the data was received in response to a drag-drop signal (and this is the last target to be received), the handler for this signal is expected to process the received data and then call DragFinish, setting the success parameter depending on whether the data was processed successfully. The handler may inspect and modify drag_context->action before calling DragFinish, e.g. to implement GDK_ACTION_ASK as shown in the following example: Listener function arguments:
dragContext DragContext the drag context x int where the drop happened y int where the drop happened data SelectionData the received data info int the info that has been registered with the target in the GtkTargetList time int the timestamp at which the data was received
const SignalDragDrop cdk.Signal = "drag-drop"
The ::drag-drop signal is emitted on the drop site when the user drops the data onto the widget. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns FALSE and no further processing is necessary. Otherwise, the handler returns TRUE. In this case, the handler must ensure that DragFinish is called to let the source know that the drop is done. The call to DragFinish can be done either directly or in a drag-data-received handler which gets triggered by calling DragGetData to receive the data for one or more of the supported targets.
const SignalDragEnd cdk.Signal = "drag-end"
The ::drag-end signal is emitted on the drag source when a drag is finished. A typical reason to connect to this signal is to undo things done in drag-begin. Listener function arguments:
dragContext DragContext the drag context
const SignalDragFailed cdk.Signal = "drag-failed"
The ::drag-failed signal is emitted on the drag source when a drag has failed. The signal handler may hook custom code to handle a failed DND operation based on the type of error, it returns TRUE is the failure has been already handled (not showing the default "drag operation failed" animation), otherwise it returns FALSE.
const SignalDragLeave cdk.Signal = "drag-leave"
The ::drag-leave signal is emitted on the drop site when the cursor leaves the widget. A typical reason to connect to this signal is to undo things done in drag-motion, e.g. undo highlighting with DragUnhighlight Listener function arguments:
dragContext DragContext the drag context time int the timestamp of the motion event
const SignalDragMotion cdk.Signal = "drag-motion"
The drag-motion signal is emitted on the drop site when the user moves the cursor over the widget during a drag. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns FALSE and no further processing is necessary. Otherwise, the handler returns TRUE. In this case, the handler is responsible for providing the necessary information for displaying feedback to the user, by calling DragStatus. If the decision whether the drop will be accepted or rejected can't be made based solely on the cursor position and the type of the data, the handler may inspect the dragged data by calling DragGetData and defer the DragStatus call to the drag-data-received handler. Note that you cannot not pass GTK_DEST_DEFAULT_DROP, GTK_DEST_DEFAULT_MOTION or GTK_DEST_DEFAULT_ALL to DragDestSet when using the drag-motion signal that way. Also note that there is no drag-enter signal. The drag receiver has to keep track of whether he has received any drag-motion signals since the last drag-leave and if not, treat the drag-motion signal as an "enter" signal. Upon an "enter", the handler will typically highlight the drop site with DragHighlight.
const SignalEnter cdk.Signal = "enter"
Emitted when the pointer enters the button.
const SignalEnterNotifyEvent cdk.Signal = "enter-notify-event"
The ::enter-notify-event will be emitted when the pointer enters the widget 's window. To receive this signal, the Window associated to the widget needs to enable the GDK_ENTER_NOTIFY_MASK mask. This signal will be sent to the grab widget if there is one.
const SignalEvent cdk.Signal = "event"
The CTK main loop will emit three signals for each GDK event delivered to a widget: one generic ::event signal, another, more specific, signal that matches the type of event delivered (e.g. key-press-event) and finally a generic event-after signal.
const SignalEventAfter cdk.Signal = "event-after"
After the emission of the event signal and (optionally) the second more specific signal, ::event-after will be emitted regardless of the previous two signals handlers return values. Listener function arguments:
event Event the GdkEvent which triggered this signal
const SignalExposeEvent cdk.Signal = "expose-event"
The ::expose-event signal is emitted when an area of a previously obscured Window is made visible and needs to be redrawn. GTK_NO_WINDOW widgets will get a synthesized event from their parent widget. To receive this signal, the Window associated to the widget needs to enable the GDK_EXPOSURE_MASK mask. Note that the ::expose-event signal has been replaced by a ::draw signal in CTK 3. The CTK 3 migration guide for hints on how to port from ::expose-event to ::draw.
const SignalFocus cdk.Signal = "focus"
const SignalFocusInEvent cdk.Signal = "focus-in-event"
The ::focus-in-event signal will be emitted when the keyboard focus enters the widget 's window. To receive this signal, the Window associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask.
const SignalFocusOutEvent cdk.Signal = "focus-out-event"
The ::focus-out-event signal will be emitted when the keyboard focus leaves the widget 's window. To receive this signal, the Window associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask.
const SignalFrameEvent cdk.Signal = "frame-event"
const SignalGetThemeRequest = "get-theme-request"
const SignalGrabBrokenEvent cdk.Signal = "grab-broken-event"
Emitted when a pointer or keyboard grab on a window belonging to widget gets broken. On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again.
const SignalGrabFocus cdk.Signal = "grab-focus"
const SignalGrabNotify cdk.Signal = "grab-notify"
The ::grab-notify signal is emitted when a widget becomes shadowed by a CTK grab (not a pointer or keyboard grab) on another widget, or when it becomes unshadowed due to a grab being removed. A widget is shadowed by a GrabAdd when the topmost grab widget in the grab stack of its window group is not its ancestor. Listener function arguments:
wasGrabbed bool FALSE if the widget becomes shadowed, TRUE if it becomes unshadowed
const SignalHide cdk.Signal = "hide"
const SignalHierarchyChanged cdk.Signal = "hierarchy-changed"
The ::hierarchy-changed signal is emitted when the anchored state of a widget changes. A widget is anchored when its toplevel ancestor is a Window. This signal is emitted when a widget changes from un-anchored to anchored or vice-versa.
const SignalKeyPressEvent cdk.Signal = "key-press-event"
The ::key-press-event signal is emitted when a key is pressed. To receive this signal, the Window associated to the widget needs to enable the GDK_KEY_PRESS_MASK mask. This signal will be sent to the grab widget if there is one.
const SignalKeyReleaseEvent cdk.Signal = "key-release-event"
The ::key-release-event signal is emitted when a key is pressed. To receive this signal, the Window associated to the widget needs to enable the GDK_KEY_RELEASE_MASK mask. This signal will be sent to the grab widget if there is one.
Gets emitted if keyboard navigation fails. See KeynavFailed for details.
const SignalKeysChanged cdk.Signal = "keys-changed"
The ::keys-changed signal gets emitted when the set of accelerators or mnemonics that are associated with window changes.
const SignalLeave cdk.Signal = "leave"
Emitted when the pointer leaves the button.
const SignalLeaveNotifyEvent cdk.Signal = "leave-notify-event"
The ::leave-notify-event will be emitted when the pointer leaves the widget 's window. To receive this signal, the Window associated to the widget needs to enable the GDK_LEAVE_NOTIFY_MASK mask. This signal will be sent to the grab widget if there is one.
const SignalMap cdk.Signal = "map"
const SignalMapEvent cdk.Signal = "map-event"
The ::map-event signal will be emitted when the widget 's window is mapped. A window is mapped when it becomes visible on the screen. To receive this signal, the Window associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.
const SignalMnemonicActivate cdk.Signal = "mnemonic-activate"
const SignalMotionNotifyEvent cdk.Signal = "motion-notify-event"
The ::motion-notify-event signal is emitted when the pointer moves over the widget's Window. To receive this signal, the Window associated to the widget needs to enable the GDK_POINTER_MOTION_MASK mask. This signal will be sent to the grab widget if there is one.
const SignalMoveCursor cdk.Signal = "move-cursor"
The ::move-cursor signal is a which gets emitted when the user initiates a cursor movement. If the cursor is not visible in entry , this signal causes the viewport to be moved instead. Applications should not connect to it, but may emit it with g_signal_emit_by_name if they need to control the cursor programmatically. The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifer does not. There are too many key combinations to list them all here. Listener function arguments:
step MovementStep the granularity of the move, as a GtkMovementStep count int the number of step units to move extendSelection bool TRUE if the move should extend the selection
const SignalMoveFocus cdk.Signal = "move-focus"
Listener function arguments:
direction DirectionType
const SignalMoveFocusOut cdk.Signal = "move-focus-out"
Listener function arguments:
arg1 DirectionType
const SignalMoveSlider cdk.Signal = "move-slider"
Virtual function that moves the slider. Used for keybindings. Listener function arguments:
step ScrollType how to move the slider
const SignalNoExposeEvent cdk.Signal = "no-expose-event"
The ::no-expose-event will be emitted when the widget 's window is drawn as a copy of another Drawable (with DrawDrawable or WindowCopyArea) which was completely unobscured. If the source window was partially obscured EventExpose events will be generated for those areas.
const SignalParentSet cdk.Signal = "parent-set"
The ::parent-set signal is emitted when a new parent has been set on a widget.
const SignalPopulatePopup cdk.Signal = "populate-popup"
The ::populate-popup signal gets emitted before showing the context menu of the label. Note that only selectable labels have context menus. If you need to add items to the context menu, connect to this signal and append your menuitems to the menu . Listener function arguments:
menu Menu the menu that is being populated
const SignalPopupMenu cdk.Signal = "popup-menu"
This signal gets emitted whenever a widget should pop up a context menu. This usually happens through the standard key binding mechanism; by pressing a certain key while a widget is focused, the user can cause the widget to pop up a menu. For example, the Entry widget creates a menu with clipboard commands. See the section called Implement Widget::popup_menu for an example of how to use this signal.
const SignalPressed cdk.Signal = "pressed"
Emitted when the button is pressed.
const SignalPropertyNotifyEvent cdk.Signal = "property-notify-event"
The ::property-notify-event signal will be emitted when a property on the widget 's window has been changed or deleted. To receive this signal, the Window associated to the widget needs to enable the GDK_PROPERTY_CHANGE_MASK mask.
const SignalProximityInEvent cdk.Signal = "proximity-in-event"
To receive this signal the Window associated to the widget needs to enable the GDK_PROXIMITY_IN_MASK mask. This signal will be sent to the grab widget if there is one.
const SignalProximityOutEvent cdk.Signal = "proximity-out-event"
To receive this signal the Window associated to the widget needs to enable the GDK_PROXIMITY_OUT_MASK mask. This signal will be sent to the grab widget if there is one.
const SignalQueryTooltip cdk.Signal = "query-tooltip"
Emitted when has-tooltip is TRUE and the gtk-tooltip-timeout has expired with the cursor hovering "above" widget ; or emitted when widget got focus in keyboard mode. Using the given coordinates, the signal handler should determine whether a tooltip should be shown for widget . If this is the case TRUE should be returned, FALSE otherwise. Note that if keyboard_mode is TRUE, the values of x and y are undefined and should not be used. The signal handler is free to manipulate tooltip with the therefore destined function calls.
const SignalRangeValueChanged cdk.Signal = "value-changed"
Emitted when the range value changes.
const SignalRealize cdk.Signal = "realize"
const SignalReleased cdk.Signal = "released"
Emitted when the button is released.
const SignalRemove cdk.Signal = "remove"
Listener function arguments:
widget Widget
const SignalResponse cdk.Signal = "response"
Emitted when an action widget is clicked, the dialog receives a delete event, or the application programmer calls Response. On a delete event, the response ID is GTK_RESPONSE_DELETE_EVENT. Otherwise, it depends on which action widget was clicked. Listener function arguments:
responseId int the response ID
const SignalScreenChanged cdk.Signal = "screen-changed"
The ::screen-changed signal gets emitted when the screen of a widget has changed. Listener function arguments:
previousScreen Screen the previous screen, or NULL if the widget was not associated with a screen before.
const SignalScrollChild cdk.Signal = "scroll-child"
The ::scroll-child signal is a which gets emitted when a keybinding that scrolls is pressed. The horizontal or vertical adjustment is updated which triggers a signal that the scrolled windows child may listen to and scroll itself.
const SignalScrollEvent cdk.Signal = "scroll-event"
The ::scroll-event signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned. To receive this signal, the Window associated to the widget needs to enable the GDK_BUTTON_PRESS_MASK mask. This signal will be sent to the grab widget if there is one.
const SignalSelectionClearEvent cdk.Signal = "selection-clear-event"
The ::selection-clear-event signal will be emitted when the the widget 's window has lost ownership of a selection.
const SignalSelectionGet cdk.Signal = "selection-get"
Listener function arguments:
data SelectionData info int time int
const SignalSelectionNotifyEvent cdk.Signal = "selection-notify-event"
const SignalSelectionReceived cdk.Signal = "selection-received"
Listener function arguments:
data SelectionData time int
const SignalSelectionRequestEvent cdk.Signal = "selection-request-event"
The ::selection-request-event signal will be emitted when another client requests ownership of the selection owned by the widget 's window.
const SignalSetFocus cdk.Signal = "set-focus"
Listener function arguments:
widget Widget
const SignalSetFocusChild cdk.Signal = "set-focus-child"
Listener function arguments:
widget Widget
const SignalSetLower cdk.Signal = "set-lower"
const SignalSetPageIncrement cdk.Signal = "set-page-increment"
const SignalSetPageSize cdk.Signal = "set-page-size"
const SignalSetScrollAdjustments cdk.Signal = "set-scroll-adjustments"
Set the scroll adjustments for the viewport. Usually scrolled containers like ScrolledWindow will emit this signal to connect two instances of Scrollbar to the scroll directions of the Viewport. Listener function arguments:
vertical Adjustment the vertical GtkAdjustment arg2 Adjustment
const SignalSetStepIncrement cdk.Signal = "set-step-increment"
const SignalSetUpper cdk.Signal = "set-upper"
const SignalSetValue cdk.Signal = "set-value"
const SignalShow cdk.Signal = "show"
const SignalShowHelp cdk.Signal = "show-help"
const SignalSizeAllocate cdk.Signal = "size-allocate"
Listener function arguments:
allocation Rectangle
const SignalSizeRequest cdk.Signal = "size-request"
Listener function arguments:
requisition Requisition
const SignalStateChanged cdk.Signal = "state-changed"
The ::state-changed signal is emitted when the widget state changes. See GetState. Listener function arguments:
state StateType the previous state
const SignalStyleSet cdk.Signal = "style-set"
The ::style-set signal is emitted when a new style has been set on a widget. Note that style-modifying functions like ModifyBase also cause this signal to be emitted. Listener function arguments:
previousStyle Style the previous style, or NULL if the widget just got its initial style.
const SignalUnmap cdk.Signal = "unmap"
const SignalUnmapEvent cdk.Signal = "unmap-event"
The ::unmap-event signal will be emitted when the widget 's window is unmapped. A window is unmapped when it becomes invisible on the screen. To receive this signal, the Window associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.
const SignalUnrealize cdk.Signal = "unrealize"
const SignalValueChanged cdk.Signal = "value-changed"
const SignalVisibilityNotifyEvent cdk.Signal = "visibility-notify-event"
The ::visibility-notify-event will be emitted when the widget 's window is obscured or unobscured. To receive this signal the Window associated to the widget needs to enable the GDK_VISIBILITY_NOTIFY_MASK mask.
const SignalWindowStateEvent cdk.Signal = "window-state-event"
The ::window-state-event will be emitted when the state of the toplevel window associated to the widget changes. To receive this signal the Window associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.
const TypeAccelGroup cdk.CTypeTag = "ctk-accel-group"
CDK type-tag for AccelGroup objects
const TypeAdjustment cdk.CTypeTag = "ctk-adjustment"
const TypeAlignment cdk.CTypeTag = "ctk-alignment"
const TypeArrow cdk.CTypeTag = "ctk-arrow"
const TypeBin cdk.CTypeTag = "ctk-bin"
const TypeBox cdk.CTypeTag = "ctk-box"
const TypeBuilder cdk.CTypeTag = "ctk-builder"
const TypeButton cdk.CTypeTag = "ctk-button"
const TypeButtonBox cdk.CTypeTag = "ctk-button-box"
const TypeContainer cdk.CTypeTag = "ctk-container"
const TypeDialog cdk.CTypeTag = "ctk-dialog"
const TypeEventBox cdk.CTypeTag = "ctk-event-box"
const TypeFakeWindow cdk.CTypeTag = "ctk-fake-window"
const TypeFrame cdk.CTypeTag = "ctk-frame"
const (
TypeHBox cdk.CTypeTag = "ctk-h-box"
)
const TypeHButtonBox cdk.CTypeTag = "ctk-h-button-box"
const (
TypeHScrollbar cdk.CTypeTag = "ctk-h-scrollbar"
)
const TypeLabel cdk.CTypeTag = "ctk-label"
const TypeMisc cdk.CTypeTag = "ctk-misc"
const TypeObject cdk.CTypeTag = "ctk-object"
const TypeRange cdk.CTypeTag = "ctk-range"
const TypeScrollbar cdk.CTypeTag = "ctk-scrollbar"
const (
TypeScrolledViewport cdk.CTypeTag = "ctk-scrolled-viewport"
)
const TypeStyle cdk.CTypeTag = "ctk-style"
const (
TypeVBox cdk.CTypeTag = "ctk-v-box"
)
const TypeVButtonBox cdk.CTypeTag = "ctk-v-button-box"
const (
TypeVScrollbar cdk.CTypeTag = "ctk-v-scrollbar"
)
const TypeViewport cdk.CTypeTag = "ctk-viewport"
CDK type-tag for Viewport objects
const TypeWidget cdk.CTypeTag = "ctk-widget"
const TypeWindow cdk.CTypeTag = "ctk-window"
const ViewportDrawHandle = "viewport-draw-handler"
const ViewportInvalidateHandle = "viewport-invalidate-handler"
const ViewportResizeHandle = "viewport-resize-handler"
const WidgetActivateHandle = "widget-activate-handler"
const WidgetEnterHandle = "widget-enter-handler"
const WidgetGainedFocusHandle = "widget-gained-focus-handler"
const WidgetLeaveHandle = "widget-leave-handler"
const WidgetLostFocusHandle = "widget-lost-focus-handler"
const WindowDrawHandle = "window-draw-handler"
const WindowEventHandle = "window-event-handler"
const WindowInvalidateHandle = "window-invalidate-handler"
const WindowResizeHandle = "window-resize-handler"
Variables ¶
var ( // DefaultButtonTheme enables customized theming of default stock buttons. DefaultButtonTheme = paint.Theme{ Content: paint.ThemeAspect{ Normal: paint.DefaultColorStyle.Foreground(paint.ColorWhite).Background(paint.ColorFireBrick).Dim(true).Bold(false), Selected: paint.DefaultColorStyle.Foreground(paint.ColorWhite).Background(paint.ColorDarkRed).Dim(false).Bold(true), Active: paint.DefaultColorStyle.Foreground(paint.ColorWhite).Background(paint.ColorDarkRed).Dim(false).Bold(true).Reverse(true), Prelight: paint.DefaultColorStyle.Foreground(paint.ColorWhite).Background(paint.ColorDarkRed).Dim(false), Insensitive: paint.DefaultColorStyle.Foreground(paint.ColorWhite).Background(paint.ColorRosyBrown).Dim(true), FillRune: paint.DefaultFillRune, BorderRunes: paint.DefaultBorderRune, ArrowRunes: paint.DefaultArrowRune, Overlay: false, }, Border: paint.ThemeAspect{ Normal: paint.DefaultColorStyle.Foreground(paint.ColorWhite).Background(paint.ColorFireBrick).Dim(true).Bold(false), Selected: paint.DefaultColorStyle.Foreground(paint.ColorWhite).Background(paint.ColorDarkRed).Dim(false).Bold(true), Active: paint.DefaultColorStyle.Foreground(paint.ColorWhite).Background(paint.ColorDarkRed).Dim(false).Bold(true).Reverse(true), Prelight: paint.DefaultColorStyle.Foreground(paint.ColorWhite).Background(paint.ColorDarkRed).Dim(false), Insensitive: paint.DefaultColorStyle.Foreground(paint.ColorWhite).Background(paint.ColorRosyBrown).Dim(true), FillRune: paint.DefaultFillRune, BorderRunes: paint.DefaultBorderRune, ArrowRunes: paint.DefaultArrowRune, Overlay: false, }, } )
var ( DefaultScrollbarTheme = paint.Theme{ Content: paint.ThemeAspect{ Normal: paint.DefaultColorStyle.Foreground(paint.ColorDarkGray).Background(paint.ColorSilver).Dim(true).Bold(false), Selected: paint.DefaultColorStyle.Foreground(paint.ColorBlack).Background(paint.ColorWhite).Dim(false).Bold(true), Active: paint.DefaultColorStyle.Foreground(paint.ColorBlack).Background(paint.ColorWhite).Dim(false).Bold(true), Prelight: paint.DefaultColorStyle.Foreground(paint.ColorBlack).Background(paint.ColorGray).Dim(false), Insensitive: paint.DefaultColorStyle.Foreground(paint.ColorBlack).Background(paint.ColorGray).Dim(true), FillRune: paint.DefaultFillRune, BorderRunes: paint.DefaultBorderRune, ArrowRunes: paint.DefaultArrowRune, Overlay: false, }, Border: paint.ThemeAspect{ Normal: paint.DefaultColorStyle.Foreground(paint.ColorBlack).Background(paint.ColorGray).Dim(true).Bold(false), Selected: paint.DefaultColorStyle.Foreground(paint.ColorWhite).Background(paint.ColorDarkGray).Dim(false).Bold(true), Active: paint.DefaultColorStyle.Foreground(paint.ColorBlack).Background(paint.ColorSilver).Dim(false).Bold(true), Prelight: paint.DefaultColorStyle.Foreground(paint.ColorBlack).Background(paint.ColorDarkGray).Dim(false), Insensitive: paint.DefaultColorStyle.Foreground(paint.ColorBlack).Background(paint.ColorDarkGray).Dim(true), FillRune: paint.DefaultFillRune, BorderRunes: paint.DefaultBorderRune, ArrowRunes: paint.DefaultArrowRune, Overlay: false, }, } )
var DefaultStyles string
var ErrFallthrough = fmt.Errorf("fallthrough")
Functions ¶
func AddStockItems ¶
func AddStockItems(items ...*StockItem)
Registers each of the stock items in items. If an item already exists with the same stock ID as one of the items, the old item gets replaced.
func BuilderRegisterConstructor ¶
func BuilderRegisterConstructor(tag cdk.TypeTag, fn BuilderTranslationFn)
func TestingWithCtkWindow ¶
func WithFakeWindow ¶
func WithFakeWindow(fn WithFakeWindowFn) func()
func WithFakeWindowOptions ¶
func WithFakeWindowOptions(w, h int, theme paint.Theme, fn WithFakeWindowFn) func()
Types ¶
type AccelFlags ¶
type AccelFlags uint64
Accel flags
const ( ACCEL_VISIBLE AccelFlags = 1 << 0 ACCEL_LOCKED AccelFlags = 1 << iota ACCEL_MASK AccelFlags = 0 )
type AccelGroup ¶
type AccelGroup interface {
Object
Init() (already bool)
AccelConnect(accelKey cdk.Key, accelMods cdk.ModMask, accelFlags AccelFlags, closure GClosure) (id int)
ConnectByPath(accelPath string, closure GClosure)
AccelGroupActivate(acceleratable Object, keyval cdk.Key, modifier cdk.ModMask) (activated bool)
AccelDisconnect(id int) (removed bool)
DisconnectKey(accelKey cdk.Key, accelMods cdk.ModMask) (removed bool)
Query(accelKey cdk.Key, accelMods cdk.ModMask) (entries []*AccelGroupEntry)
Activate(accelQuark ptypes.QuarkID, acceleratable Object, accelKey cdk.Key, accelMods cdk.ModMask) (value bool)
Lock()
Unlock()
GetIsLocked() (locked bool)
FromAccelClosure(closure GClosure) (value AccelGroup)
GetModifierMask() (value cdk.ModMask)
Find(findFunc AccelGroupFindFunc, data interface{}) (key *AccelKey)
AcceleratorValid(keyval cdk.Key, modifiers cdk.ModMask) (valid bool)
AcceleratorParse(accelerator string) (acceleratorKey cdk.Key, acceleratorMods cdk.ModMask)
AcceleratorName(acceleratorKey cdk.Key, acceleratorMods cdk.ModMask) (value string)
AcceleratorGetLabel(acceleratorKey cdk.Key, acceleratorMods cdk.ModMask) (value string)
AcceleratorSetDefaultModMask(defaultModMask cdk.ModMask)
AcceleratorGetDefaultModMask() (value int)
}
AccelGroup Hierarchy:
Object +- AccelGroup
An AccelGroup represents a group of keyboard accelerators, typically attached to a toplevel Window (with Window.AddAccelGroup). Usually you won't need to create a AccelGroup directly; instead, when using ItemFactory, CTK automatically sets up the accelerators for your menus in the item factory's AccelGroup. Note that accelerators are different from mnemonics. Accelerators are shortcuts for activating a menu item; they appear alongside the menu item they're a shortcut for. For example "Ctrl+Q" might appear alongside the "Quit" menu item. Mnemonics are shortcuts for GUI elements such as text entries or buttons; they appear as underlined characters. See Label.NewWithMnemonic. Menu items can have both accelerators and mnemonics, of course.
Note that usage of within CTK is unimplemented at this time
type AccelGroupEntry ¶
func NewAccelGroupEntry ¶
func NewAccelGroupEntry(key AccelKey, closure GClosure, quark ptypes.QuarkID) (age *AccelGroupEntry)
type AccelGroupFindFunc ¶
type AccelKey ¶
type AccelKey struct {
Key cdk.Key
Mods cdk.ModMask
Flags AccelFlags
}
func MakeAccelKey ¶
type Adjustment ¶
type Adjustment interface {
Object
Init() bool
GetValue() (value int)
SetValue(value int)
ClampPage(upper, lower int)
Changed() enums.EventFlag
ValueChanged() enums.EventFlag
Settings() (value, lower, upper, stepIncrement, pageIncrement, pageSize int)
Configure(value, lower, upper, stepIncrement, pageIncrement, pageSize int)
GetLower() (value int)
SetLower(lower int)
GetUpper() (upper int)
SetUpper(upper int)
GetStepIncrement() (stepIncrement int)
SetStepIncrement(stepIncrement int)
GetPageIncrement() (pageIncrement int)
SetPageIncrement(pageIncrement int)
GetPageSize() (pageSize int)
SetPageSize(pageSize int)
Moot() bool
ShowByPolicy(policy PolicyType) bool
}
Adjustment Hierarchy:
Object +- Adjustment
The Adjustment CTK object is a means of managing the state of multiple widgets concurrently. By sharing the same Adjustment instance, one or more widgets can ensure that all related User Interface elements are reflecting the same values and constraints. The Adjustment consists of an integer value, with an upper and lower bounds, and pagination rendering features
type Alignable ¶
type Alignable interface {
SetAlignment(xAlign float64, yAlign float64)
GetAlignment() (xAlign float64, yAlign float64)
}
An Alignable Widget is one that implements the SetAlignment and GetAlignment methods for adjusting the positioning of the Widget. The Misc and Alignment types are the primary ones implementing this interface.
type Alignment ¶
type Alignment interface {
Bin
Buildable
Init() (already bool)
Get() (xAlign, yAlign, xScale, yScale float64)
Set(xAlign, yAlign, xScale, yScale float64)
GetPadding() (paddingTop, paddingBottom, paddingLeft, paddingRight int)
SetPadding(paddingTop, paddingBottom, paddingLeft, paddingRight int)
Add(w Widget)
Remove(w Widget)
}
Alignment Hierarchy:
Object
+- Widget
+- Container
+- Bin
+- Alignment
The Alignment widget controls the alignment and size of its child widget. It has four settings: xScale, yScale, xAlign, and yAlign. The scale settings are used to specify how much the child widget should expand to fill the space allocated to the Alignment. The values can range from 0 (meaning the child doesn't expand at all) to 1 (meaning the child expands to fill all of the available space). The alignment settings are used to place the child widget within the available area. The values range from 0 (top or left) to 1 (bottom or right). Of course, if the scale settings are both set to 1, the alignment settings have no effect. New Alignment instances can be created using NewAlignment.
type ArgFlags ¶
type ArgFlags uint64
Arg flags
const ( ARC_READABLE ArgFlags = ArgFlags(PARAM_READABLE) ARC_WRITABLE ArgFlags = ArgFlags(PARAM_WRITABLE) ARC_CONSTRUCT ArgFlags = ArgFlags(PARAM_CONSTRUCT) ARC_CONSTRUCT_ONLY ArgFlags = ArgFlags(PARAM_CONSTRUCT_ONLY) ARC_CHILD_ARG ArgFlags = 1 << 4 )
type Arrow ¶
type Arrow interface {
Misc
Buildable
Init() bool
GetArrowType() (arrow ArrowType)
SetArrowType(arrow ArrowType)
GetArrowRune() (r rune, width int)
GetSizeRequest() (width, height int)
}
Arrow Hierarchy:
Object
+- Widget
+- Misc
+- Arrow
The Arrow Widget should be used to draw simple arrows that need to point in one of the four cardinal directions (up, down, left, or right). The style of the arrow can be one of shadow in, shadow out, etched in, or etched out. Note that these directions and style types may be amended in versions of CTK to come. Arrow will fill any space allotted to it, but since it is inherited from Misc, it can be padded and/or aligned, to fill exactly the space the programmer desires. Arrows are created with a call to NewArrow. The direction or style of an arrow can be changed after creation by using Set.
type ArrowPlacement ¶
type ArrowPlacement uint64
Arrow placement
const ( ARROWS_BOTH ArrowPlacement = iota ARROWS_START ARROWS_END )
type AssistantPageType ¶
type AssistantPageType uint64
Assistant page type
const ( ASSISTANT_PAGE_CONTENT AssistantPageType = iota ASSISTANT_PAGE_INTRO ASSISTANT_PAGE_CONFIRM ASSISTANT_PAGE_SUMMARY ASSISTANT_PAGE_PROGRESS )
type AttachOptions ¶
type AttachOptions uint64
Attach options
const ( EXPAND AttachOptions = 1 << 0 SHRINK AttachOptions = 1 << iota FILL )
type Bin ¶
type Bin interface {
Container
Buildable
Init() (already bool)
GetChild() (value Widget)
Add(w Widget)
}
Bin Hierarchy:
Object
+- Widget
+- Container
+- Bin
+- Window
+- Alignment
+- Frame
+- Button
+- Item
+- ComboBox
+- EventBox
+- Expander
+- HandleBox
+- ToolItem
+- ScrolledWindow
+- Viewport
The Bin Widget is a Container with just one child. It is not very useful itself, but it is useful for deriving subclasses, since it provides common code needed for handling a single child widget. Many CTK widgets are subclasses of Bin, including Window, Button, Frame or ScrolledWindow.
type Box ¶
type Box interface {
Container
Buildable
Orientable
Init() (already bool)
Build(builder Builder, element *CBuilderElement) error
GetOrientation() (orientation enums.Orientation)
SetOrientation(orientation enums.Orientation)
GetHomogeneous() (value bool)
SetHomogeneous(homogeneous bool)
GetSpacing() (value int)
SetSpacing(spacing int)
Add(child Widget)
Remove(w Widget)
PackStart(child Widget, expand, fill bool, padding int)
PackEnd(child Widget, expand, fill bool, padding int)
ReorderChild(child Widget, position int)
QueryChildPacking(child Widget) (expand bool, fill bool, padding int, packType PackType)
SetChildPacking(child Widget, expand bool, fill bool, padding int, packType PackType)
GetFocusChain() (focusableWidgets []interface{}, explicitlySet bool)
GetSizeRequest() (width, height int)
}
Box Hierarchy:
Object
+- Widget
+- Container
+- Box
+- ButtonBox
+- VBox
+- HBox
The Box Widget is a Container for organizing one or more child Widgets. A Box displays either a horizontal row or vertical column of the visible children contained within.
type Buildable ¶
type Buildable interface {
ListProperties() (known []cdk.Property)
InitWithProperties(properties map[cdk.Property]string) (already bool, err error)
Build(builder Builder, element *CBuilderElement) error
SetProperties(properties map[cdk.Property]string) (err error)
SetPropertyFromString(property cdk.Property, value string) (err error)
SetSensitive(sensitive bool)
SetFlags(widgetFlags WidgetFlags)
UnsetFlags(widgetFlags WidgetFlags)
Connect(signal cdk.Signal, handle string, c cdk.SignalListenerFn, data ...interface{})
LogErr(err error)
Show()
GrabFocus()
}
type Builder ¶
type Builder interface {
cdk.Object
Init() (already bool)
BuildableTypeTags() map[string]cdk.TypeTag
LookupNamedSignalHandler(name string) (fn cdk.SignalListenerFn)
AddNamedSignalHandler(name string, fn cdk.SignalListenerFn)
GetWidget(name string) (w interface{})
GetWidgetsBuiltByType(tag cdk.CTypeTag) (widgets []interface{})
ParsePacking(packing *CBuilderElement) (expand, fill bool, padding int, packType PackType)
LoadFromString(raw string) (topElement *CBuilderElement, err error)
Build(element *CBuilderElement) (newObject interface{})
}
func NewBuilder ¶
func NewBuilder() (builder Builder)
type BuilderElement ¶
type BuilderError ¶
type BuilderError uint64
Builder error
const ( BUILDER_ERROR_INVALID_TYPE_FUNCTION BuilderError = iota BUILDER_ERROR_UNHANDLED_TAG BUILDER_ERROR_MISSINC_ATTRIBUTE BUILDER_ERROR_INVALID_ATTRIBUTE BUILDER_ERROR_INVALID_TAG BUILDER_ERROR_MISSINC_PROPERTY_VALUE BUILDER_ERROR_INVALID_VALUE BUILDER_ERROR_VERSION_MISMATCH BUILDER_ERROR_DUPLICATE_ID )
type BuilderNode ¶
type BuilderNode struct {
XMLName xml.Name
Attrs []xml.Attr `xml:"-"`
Content []byte `xml:",innerxml"`
Nodes []BuilderNode `xml:",any"`
}
func (*BuilderNode) UnmarshalXML ¶
func (n *BuilderNode) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type BuilderTranslationFn ¶
type Button ¶
type Button interface {
Bin
Activatable
Alignable
Buildable
Init() (already bool)
Build(builder Builder, element *CBuilderElement) error
Activate() (value bool)
Clicked() enums.EventFlag
GetRelief() (value ReliefStyle)
SetRelief(newStyle ReliefStyle)
GetLabel() (value string)
SetLabel(label string)
GetUseStock() (value bool)
SetUseStock(useStock bool)
GetUseUnderline() (enabled bool)
SetUseUnderline(enabled bool)
GetUseMarkup() (enabled bool)
SetUseMarkup(enabled bool)
GetFocusOnClick() (value bool)
SetFocusOnClick(focusOnClick bool)
GetAlignment() (xAlign float64, yAlign float64)
SetAlignment(xAlign float64, yAlign float64)
GetImage() (value Widget, ok bool)
SetImage(image Widget)
GetImagePosition() (value PositionType)
SetImagePosition(position PositionType)
GetPressed() bool
SetPressed(pressed bool)
GetFocusChain() (focusableWidgets []interface{}, explicitlySet bool)
CancelEvent()
GetWidgetAt(p *ptypes.Point2I) Widget
GetSizeRequest() (width, height int)
GrabFocus()
GrabEventFocus()
}
Button Hierarchy:
Object
+- Widget
+- Container
+- Bin
+- Button
+- ToggleButton
+- ColorButton
+- FontButton
+- LinkButton
+- OptionMenu
+- ScaleButton
The Button Widget is a Bin Container that represents a focusable Drawable Widget that is Sensitive to event interactions.
type ButtonAction ¶
type ButtonAction uint64
Button action
const ( BUTTON_IGNORED ButtonAction = 0 BUTTON_SELECTS ButtonAction = 1 << 0 BUTTON_DRAGS ButtonAction = 1 << iota BUTTON_EXPANDS )
type ButtonBox ¶
type ButtonBox interface {
Box
Buildable
Orientable
Init() (already bool)
Build(builder Builder, element *CBuilderElement) error
GetLayout() (value ButtonBoxStyle)
SetLayout(layoutStyle ButtonBoxStyle)
Add(w Widget)
Remove(w Widget)
PackStart(w Widget, expand, fill bool, padding int)
PackEnd(w Widget, expand, fill bool, padding int)
GetChildPrimary(w Widget) (isPrimary bool)
GetChildSecondary(w Widget) (isSecondary bool)
SetChildSecondary(child Widget, isSecondary bool)
SetChildPacking(child Widget, expand bool, fill bool, padding int, packType PackType)
}
ButtonBox Hierarchy:
Object
+- Widget
+- Container
+- Box
+- ButtonBox
+- HButtonBox
+- VButtonBox
The ButtonBox Widget is a Box Container that has a primary and a secondary grouping of its Widget children. These are typically used by the Dialog Widget to implement the action buttons.
type ButtonBoxStyle ¶
type ButtonBoxStyle uint64
Button box style
const ( BUTTONBOX_DEFAULT_STYLE ButtonBoxStyle = iota // Spread the buttons evenly and centered away from the edges BUTTONBOX_SPREAD // Spread the buttons evenly and centered from edge to edge BUTTONBOX_EDGE // Group buttons at the start BUTTONBOX_START // Group buttons at the end BUTTONBOX_END // Group buttons at the center BUTTONBOX_CENTER // Buttons are expanded to evenly consume all space available BUTTONBOX_EXPAND )
type ButtonsType ¶
type ButtonsType uint64
Buttons type
const ( BUTTONS_NONE ButtonsType = iota BUTTONS_OK BUTTONS_CLOSE BUTTONS_CANCEL BUTTONS_YES_NO BUTTONS_OK_CANCEL )
type CAccelGroup ¶
type CAccelGroup struct {
CObject
// contains filtered or unexported fields
}
The CAccelGroup structure implements the AccelGroup interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with AccelGroup objects
func MakeAccelGroup ¶
func MakeAccelGroup() *CAccelGroup
MakeAccelGroup is used by the Buildable system to construct a new AccelGroup.
func NewAccelGroup ¶
func NewAccelGroup() (value *CAccelGroup)
NewAccelGroup is the constructor for new AccelGroup instances.
func (*CAccelGroup) AccelConnect ¶
func (a *CAccelGroup) AccelConnect(accelKey cdk.Key, accelMods cdk.ModMask, accelFlags AccelFlags, closure GClosure) (id int)
AccelConnect installs an accelerator in this group. When accel_group is being activated in response to a call to AccelGroupsActivate, closure will be invoked if the accel_key and accel_mods from AccelGroupsActivate match those of this connection. The signature used for the closure is that of AccelGroupActivate. Note that, due to implementation details, a single closure can only be connected to one accelerator group.
Parameters:
accelGroup the accelerator group to install an accelerator in accelKey key value of the accelerator accelMods modifier combination of the accelerator accelFlags a flag mask to configure this accelerator closure code to be executed upon accelerator activation
func (*CAccelGroup) AccelDisconnect ¶
func (a *CAccelGroup) AccelDisconnect(id int) (removed bool)
AccelDisconnect removes an accelerator previously installed through Connect.
Parameters:
accelGroup the accelerator group to remove an accelerator from closure handle for the closure code to remove
func (*CAccelGroup) AccelGroupActivate ¶
func (*CAccelGroup) AcceleratorGetDefaultModMask ¶
func (a *CAccelGroup) AcceleratorGetDefaultModMask() (value int)
AcceleratorGetDefaultModMask returns the value set by AcceleratorSetDefaultModMask.
Parameters:
returns the default accelerator modifier mask
func (*CAccelGroup) AcceleratorGetLabel ¶
func (a *CAccelGroup) AcceleratorGetLabel(acceleratorKey cdk.Key, acceleratorMods cdk.ModMask) (value string)
AcceleratorGetLable converts an accelerator keyval and modifier mask into a string which can be used to represent the accelerator to the user.
Parameters:
acceleratorKey accelerator keyval acceleratorMods accelerator modifier mask
func (*CAccelGroup) AcceleratorName ¶
func (a *CAccelGroup) AcceleratorName(acceleratorKey cdk.Key, acceleratorMods cdk.ModMask) (value string)
AcceleratorName converts an accelerator keyval and modifier mask into a string parseable by AcceleratorParse. For example, if you pass in cdk.KeySmallQ and CONTROL_MASK, this function returns "<Control>q". If you need to display accelerators in the user interface, see AcceleratorGetLabel.
Parameters:
acceleratorKey accelerator keyval acceleratorMods accelerator modifier mask
func (*CAccelGroup) AcceleratorParse ¶
func (a *CAccelGroup) AcceleratorParse(accelerator string) (acceleratorKey cdk.Key, acceleratorMods cdk.ModMask)
AcceleratorParse parses a string representing an accelerator. The format looks like "<Control>a" or "<Shift><Alt>F1" or "<Release>z" (the last one is for key release). The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>". Key names are parsed using KeyvalFromName. For character keys the name is not the symbol, but the lowercase name, e.g. one would use "<Ctrl>minus" instead of "<Ctrl>-". If the parse fails, accelerator_key and accelerator_mods will be set to 0 (zero).
Parameters:
accelerator string representing an accelerator
func (*CAccelGroup) AcceleratorSetDefaultModMask ¶
func (a *CAccelGroup) AcceleratorSetDefaultModMask(defaultModMask cdk.ModMask)
AcceleratorSetDefaultMask updates the modifiers that will be considered significant for keyboard accelerators. The default mod mask is CONTROL_MASK | SHIFT_MASK | MOD1_MASK | SUPER_MASK | HYPER_MASK | META_MASK, that is, Control, Shift, Alt, Super, Hyper and Meta. Other modifiers will by default be ignored by AccelGroup. You must include at least the three modifiers Control, Shift and Alt in any value you pass to this function. The default mod mask should be changed on application startup, before using any accelerator groups.
Parameters:
defaultModMask accelerator modifier mask
func (*CAccelGroup) AcceleratorValid ¶
AcceleratorValid determines whether a given keyval and modifier mask constitute a valid keyboard accelerator.
Parameters:
keyval a GDK keyval modifiers modifier mask
func (*CAccelGroup) Activate ¶
func (a *CAccelGroup) Activate(accelQuark ptypes.QuarkID, acceleratable Object, accelKey cdk.Key, accelMods cdk.ModMask) (value bool)
Activate finds the first accelerator in accel_group that matches accel_key and accel_mods, and activates it.
Parameters:
accelQuark the quark for the accelerator name acceleratable the CObject, usually a Window, on which to activate the accelerator. accelKey accelerator keyval from a key event accelMods keyboard state mask from a key event
func (*CAccelGroup) ConnectByPath ¶
func (a *CAccelGroup) ConnectByPath(accelPath string, closure GClosure)
ConnectByPath installs an accelerator in this group, using an accelerator path to look up the appropriate key and modifiers (see AccelMapAddEntry). When accel_group is being activated in response to a call to AccelGroupsActivate, closure will be invoked if the accel_key and accel_mods from AccelGroupsActivate match the key and modifiers for the path. The signature used for the closure is that of AccelGroupActivate. Note that accel_path string will be stored in a cdk.Quark.
Parameters:
accelGroup the accelerator group to install an accelerator in accelPath path used for determining key and modifiers. closure code to be executed upon accelerator activation
func (*CAccelGroup) DisconnectKey ¶
DisconnectKey removes an accelerator previously installed through Connect.
Parameters:
accelGroup the accelerator group to install an accelerator in accelKey key value of the accelerator accelMods modifier combination of the accelerator
func (*CAccelGroup) Find ¶
func (a *CAccelGroup) Find(findFunc AccelGroupFindFunc, data interface{}) (key *AccelKey)
Find finds the first entry in an accelerator group for which find_func returns TRUE and returns its AccelKey.
Parameters:
findFunc a function to filter the entries of accel_group data arbitrary data to pass to find_func
func (*CAccelGroup) FromAccelClosure ¶
func (a *CAccelGroup) FromAccelClosure(closure GClosure) (value AccelGroup)
FromAccelClosure finds the AccelGroup to which closure is connected. See: Connect()
Parameters:
closure a GClosure handle
func (*CAccelGroup) GetIsLocked ¶
func (a *CAccelGroup) GetIsLocked() (locked bool)
GetIsLocked checks if the group is locked or not. Locks are added and removed using Lock and Unlock.
func (*CAccelGroup) GetModifierMask ¶
func (a *CAccelGroup) GetModifierMask() (value cdk.ModMask)
GetModifierMask returns a cdk.ModMask representing the mask for this accel_group. For example, CONTROL_MASK, SHIFT_MASK, etc.
func (*CAccelGroup) Init ¶
func (a *CAccelGroup) Init() (already bool)
Init initializes an AccelGroup object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the AccelGroup instance. Init is used in the NewAccelGroup constructor and only necessary when implementing a derivative AccelGroup type.
func (*CAccelGroup) Lock ¶
func (a *CAccelGroup) Lock()
Lock locks the given accelerator group. Locking an accelerator group prevents the accelerators contained within it to be changed during runtime. Refer to AccelMapChangeEntry about runtime accelerator changes. If called more than once, accel_group remains locked until Unlock has been called an equivalent number of times.
func (*CAccelGroup) Query ¶
func (a *CAccelGroup) Query(accelKey cdk.Key, accelMods cdk.ModMask) (entries []*AccelGroupEntry)
Query searches an accelerator group for all entries matching accel_key and accel_mods.
Parameters:
accelGroup the accelerator group to query accelKey key value of the accelerator accelMods modifier combination of the accelerator
func (*CAccelGroup) Unlock ¶
func (a *CAccelGroup) Unlock()
Unlock releases the last call to Lock on this accel_group.
type CAdjustment ¶
type CAdjustment struct {
CObject
}
The CAdjustment structure implements the Adjustment interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Adjustment objects.
func MakeAdjustment ¶
func MakeAdjustment() *CAdjustment
MakeAdjustment is used by the Buildable system to construct a new Adjustment.
func NewAdjustment ¶
func NewAdjustment(value, lower, upper, stepIncrement, pageIncrement, pageSize int) *CAdjustment
NewAdjustment is the constructor for new Adjustment instances.
func (*CAdjustment) Changed ¶
func (a *CAdjustment) Changed() enums.EventFlag
Changed emits a changed signal. The changed signal reflects that one or more of the configurable aspects have changed, excluding the actual value of the Adjustment. See: ValueChanged()
func (*CAdjustment) ClampPage ¶
func (a *CAdjustment) ClampPage(upper, lower int)
ClampPage is a convenience method to set both the upper and lower bounds without emitting multiple changed signals. This method emits a clamp-page signal initially and if the listeners return an EVENT_PASS then the new upper and lower bounds are applied and a call to Changed() is made.
func (*CAdjustment) Configure ¶
func (a *CAdjustment) Configure(value, lower, upper, stepIncrement, pageIncrement, pageSize int)
Configure updates all the configurable aspects of an Adjustment while emitting only a single changed and/or value-changed signal. The method emits a configure signal initially and if the listeners return an EVENT_PASS then applies all the changes and calls Changed() and/or ValueChanged() accordingly. The same effect of this method can be achieved by passing the changed and value-changed signal emissions for the Adjustment instance, making all the individual calls to the setter methods, resuming the changed and value-changed signals and finally calling the Changed() and/or ValueChanged() methods accordingly.
Parameters:
value the new value lower the new minimum value upper the new maximum value stepIncrement the new step increment pageIncrement the new page increment pageSize the new page size
func (*CAdjustment) GetLower ¶
func (a *CAdjustment) GetLower() (value int)
GetLower returns the current lower bounds of the Adjustment.
func (*CAdjustment) GetPageIncrement ¶
func (a *CAdjustment) GetPageIncrement() (pageIncrement int)
GetPageIncrement returns the current page increment of the Adjustment. Adjustment values are intended to be increased or decreased by either a step or page amount. The page increment is the longer movement such as moving up or down half a page of text.
func (*CAdjustment) GetPageSize ¶
func (a *CAdjustment) GetPageSize() (pageSize int)
GetPageSize returns the page size of the Adjustment. Adjustment values are intended to be increased or decreased by either a step or page amount and having a separate Adjustment variable to track the end-user facing page size is beneficial. This value does not have to be the same as the page increment, however the page increment is in effect clamped to the page size of the Adjustment.
func (*CAdjustment) GetStepIncrement ¶
func (a *CAdjustment) GetStepIncrement() (stepIncrement int)
GetStepIncrement returns the current step increment of the Adjustment. Adjustment values are intended to be increased or decreased by either a step or page amount. The step increment is the shorter movement such as moving up or down a line of text.
func (*CAdjustment) GetUpper ¶
func (a *CAdjustment) GetUpper() (upper int)
GetUpper returns the current lower bounds of the Adjustment.
func (*CAdjustment) GetValue ¶
func (a *CAdjustment) GetValue() (value int)
GetValue returns the current value of the adjustment. See: SetValue()
func (*CAdjustment) Init ¶
func (a *CAdjustment) Init() bool
Init initializes an Adjustment object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Adjustment instance. Init is used in the NewAdjustment constructor and only necessary when implementing a derivative Adjustment type.
func (*CAdjustment) Moot ¶
func (a *CAdjustment) Moot() bool
Moot is a convenience method to return TRUE if the Adjustment object is in a "moot" state in which the values are irrelevant because the upper bounds is set to zero. Given an upper bounds of zero, the value and lower bounds are also clamped to zero and so on. Thus, this convenience method enables a Human readable understanding of why the upper bounds is being checked for a zero value (eliminates a useful magic value).
func (*CAdjustment) SetLower ¶
func (a *CAdjustment) SetLower(lower int)
SetLower updates the lower bounds of the Adjustment. This method emits a set-lower signal initially and if the listeners return an EVENT_PASS then the value is applied and a call to Changed() is made.
func (*CAdjustment) SetPageIncrement ¶
func (a *CAdjustment) SetPageIncrement(pageIncrement int)
SetPageIncrement updates the page increment of the Adjustment. This method emits a set-page-increment signal initially and if the listeners return an EVENT_PASS then the value is applied and a call to Changed() is made.
func (*CAdjustment) SetPageSize ¶
func (a *CAdjustment) SetPageSize(pageSize int)
SetPageSize updates the page size of the Adjustment. This method emits a set-page-size signal initially and if the listeners return an EVENT_PASS then the value is applied and a call to Changed() is made.
func (*CAdjustment) SetStepIncrement ¶
func (a *CAdjustment) SetStepIncrement(stepIncrement int)
SetStepIncrement updates the step increment of the Adjustment. This method emits a set-step-increment signal initially and if the listeners return an EVENT_PASS then the value is applied and a call to Changed() is made.
func (*CAdjustment) SetUpper ¶
func (a *CAdjustment) SetUpper(upper int)
SetUpper updates the upper bounds of the Adjustment. This method emits a set-upper signal initially and if the listeners return an EVENT_PASS then the value is applied and a call to Changed() is made.
func (*CAdjustment) SetValue ¶
func (a *CAdjustment) SetValue(value int)
SetValue updates the current value of the Adjustment. This method emits a set-value signal initially and if the listeners return an EVENT_PASS then the new value is applied and a call to ValueChanged() is made.
func (*CAdjustment) Settings ¶
func (a *CAdjustment) Settings() (value, lower, upper, stepIncrement, pageIncrement, pageSize int)
Settings is a convenience method to retrieve all the configurable Adjustment values in one statement.
func (*CAdjustment) ShowByPolicy ¶
func (a *CAdjustment) ShowByPolicy(policy PolicyType) bool
ShowByPolicy is a convenience method that given a PolicyType, determines if the Widget using the Adjustment should be rendered or otherwise used to an end-user-facing effect. This method is primarily used by other Widgets as a convenient way to determine if they should show or hide their presence.
func (*CAdjustment) ValueChanged ¶
func (a *CAdjustment) ValueChanged() enums.EventFlag
ValueChanged emits a value-changed signal. The value-changed signal reflects that the actual value of the Adjustment has changed.
type CAlignment ¶
type CAlignment struct {
CBin
}
The CAlignment structure implements the Alignment interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Alignment objects.
func MakeAlignment ¶
func MakeAlignment() *CAlignment
MakeAlignment is used by the Buildable system to construct a new Alignment with default settings of: xAlign=0.5, yAlign=1.0, xScale=0.5, yScale=1.0
func NewAlignment ¶
func NewAlignment(xAlign float64, yAlign float64, xScale float64, yScale float64) *CAlignment
NewAlignment is the constructor for new Alignment instances.
Parameters:
xAlign the horizontal alignment of the child widget, from 0 (left) to 1 (right) yAlign the vertical alignment of the child widget, from 0 (top) to 1 (bottom) xScale the amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the Alignment yScale the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to xScale
func (*CAlignment) Add ¶
func (a *CAlignment) Add(w Widget)
Add will set the current child to the Widget instance given, connect two signal handlers for losing and gaining focus and finally resize the Alignment instance to accommodate the new child Widget.
func (*CAlignment) Get ¶
func (a *CAlignment) Get() (xAlign, yAlign, xScale, yScale float64)
Get is a convenience method to return the four main Alignment property values See: Set()
func (*CAlignment) GetPadding ¶
func (a *CAlignment) GetPadding() (paddingTop, paddingBottom, paddingLeft, paddingRight int)
GetPadding is a convenience method to return the four padding property values See: SetPadding()
func (*CAlignment) Init ¶
func (a *CAlignment) Init() (already bool)
Init initializes an Alignment object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Alignment instance. Init is used in the NewAlignment constructor and only necessary when implementing a derivative Alignment type.
func (*CAlignment) Remove ¶
func (a *CAlignment) Remove(w Widget)
Remove will remove the given Widget from the Alignment instance, disconnecting any connected focus signal handlers and finally resize the Alignment instance to accommodate the lack of content.
func (*CAlignment) Set ¶
func (a *CAlignment) Set(xAlign, yAlign, xScale, yScale float64)
Set is a convenience method to update the four main Alignment property values
Parameters:
xAlign the horizontal alignment of the child widget, from 0 (left) to 1 (right) yAlign the vertical alignment of the child widget, from 0 (top) to 1 (bottom) xScale the amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the Alignment yScale the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to xScale
func (*CAlignment) SetPadding ¶
func (a *CAlignment) SetPadding(paddingTop, paddingBottom, paddingLeft, paddingRight int)
SetPadding is a convenience method to update the padding for the different sides of the widget. The padding adds blank space to the sides of the widget. For instance, this can be used to indent the child widget towards the right by adding padding on the left.
Parameters:
paddingTop the padding at the top of the widget paddingBottom the padding at the bottom of the widget paddingLeft the padding at the left of the widget paddingRight the padding at the right of the widget.
type CArrow ¶
type CArrow struct {
CMisc
}
The CArrow structure implements the Arrow interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Arrow objects.
func MakeArrow ¶
func MakeArrow() *CArrow
MakeArrow is used by the Buildable system to construct a new Arrow with a default ArrowType setting of ArrowRight.
func (*CArrow) GetArrowRune ¶
GetArrowRune is a Curses-specific method for returning the go `rune` character and its byte width.
func (*CArrow) GetArrowType ¶
GetArrowType is a convenience method for returning the ArrowType property
func (*CArrow) GetSizeRequest ¶
GetSizeRequest returns the requested size of the Drawable Widget. This method is used by Container Widgets to resolve the surface space allocated for their child Widget instances.
func (*CArrow) Init ¶
Init initializes an Arrow object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Arrow instance. Init is used in the NewArrow constructor and only necessary when implementing a derivative Arrow type.
func (*CArrow) SetArrowType ¶
SetArrowType is a convenience method for updating the ArrowType property
Parameters:
arrowType a valid ArrowType.
type CBin ¶
type CBin struct {
CContainer
}
The CBin structure implements the Bin interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Bin objects.
func MakeBin ¶ added in v0.1.2
func MakeBin() *CBin
MakeBin is used by the Buildable system to construct a new Bin.
func (*CBin) Add ¶
Add the given widget to the Bin, if the Bin is full (has one child already) the given Widget replaces the existing Widget.
func (*CBin) GetChild ¶
GetChild is a convenience method to return the first child in the Bin Container. Returns the Widget or `nil` if the Bin contains no child widget.
func (*CBin) Init ¶
Init initializes a Bin object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Bin instance. Init is used in the NewBin constructor and only necessary when implementing a derivative Bin type.
type CBox ¶
type CBox struct {
CContainer
}
The CBox structure implements the Box interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Box objects.
func MakeBox ¶
func MakeBox() (box *CBox)
MakeBox is used by the Buildable system to construct a new Box with default settings of: horizontal orientation, dynamically sized (not homogeneous) and no extra spacing.
func NewBox ¶
func NewBox(orientation enums.Orientation, homogeneous bool, spacing int) *CBox
NewBox is the constructor for new Box instances.
Parameters:
orientation the orientation of the Box vertically or horizontally homogeneous whether each child receives an equal size allocation or not spacing extra spacing to include between children
func (*CBox) Add ¶
Add the given Widget to the Box using PackStart() with default settings of: expand=false, fill=true and padding=0
func (*CBox) Build ¶
func (b *CBox) Build(builder Builder, element *CBuilderElement) error
Build provides customizations to the Buildable system for Box Widgets.
func (*CBox) GetFocusChain ¶
GetFocusChain retrieves the focus chain of the Box, if one has been set explicitly. If no focus chain has been explicitly set, CTK computes the focus chain based on the positions of the children, taking into account the child packing configuration.
Returns:
focusableWidgets widgets in the focus chain. explicitlySet TRUE if the focus chain has been set explicitly.
func (*CBox) GetHomogeneous ¶
GetHomogeneous is a convenience method for returning the homogeneous property value. See: SetHomogeneous()
func (*CBox) GetOrientation ¶
func (b *CBox) GetOrientation() (orientation enums.Orientation)
GetOrientation is a convenience method for returning the orientation property value. See: SetOrientation()
func (*CBox) GetSizeRequest ¶
GetSizeRequest returns the requested size of the Drawable Widget. This method is used by Container Widgets to resolve the surface space allocated for their child Widget instances.
func (*CBox) GetSpacing ¶
GetSpacing is a convenience method for returning the spacing property value. See: SetSpacing()
func (*CBox) Init ¶
Init initializes a Box object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Box instance. Init is used in the NewBox constructor and only necessary when implementing a derivative Box type.
func (*CBox) PackEnd ¶
PackEnd adds child to box, packed with reference to the end of box. The child is packed after (away from end of) any other child packed with reference to the end of box.
Parameters ¶
child the Widget to be added to box expand TRUE if the new child is to be given extra space allocated to box.
The extra space will be divided evenly between all children of box that use this option
fill TRUE if space given to child by the expand option is actually
allocated to child, rather than just padding it. This parameter has no effect if expand is set to FALSE. A child is always allocated the full height of an HBox and the full width of a VBox. This option affects the other dimension
padding extra space in pixels to put between this child and its neighbors,
over and above the global amount specified by spacing property. If child is a widget at one of the reference ends of box, then padding pixels are also put between child and the reference edge of box
func (*CBox) PackStart ¶
PackStart adds child to box, packed with reference to the start of box. The child is packed after any other child packed with reference to the start of box.
Parameters ¶
child the Widget to be added to box expand TRUE if the new child is to be given extra space allocated to box.
The extra space will be divided evenly between all children of box that use this option
fill TRUE if space given to child by the expand option is actually
allocated to child, rather than just padding it. This parameter has no effect if expand is set to FALSE. A child is always allocated the full height of an HBox and the full width of a VBox. This option affects the other dimension
padding extra space in pixels to put between this child and its neighbors,
over and above the global amount specified by spacing property. If child is a widget at one of the reference ends of box , then padding pixels are also put between child and the reference edge of box
func (*CBox) QueryChildPacking ¶
func (b *CBox) QueryChildPacking(child Widget) (expand bool, fill bool, padding int, packType PackType)
QueryChildPacking obtains information about how the child is packed into the Box. If the given child Widget is not contained within the Box an error is logged and the return values will all be their `nil` equivalents.
Parameters:
child the Widget of the child to query
func (*CBox) Remove ¶
Remove the given Widget from the Box Container, disconnecting any signal handlers in the process.
func (*CBox) ReorderChild ¶
ReorderChild moves the given child to a new position in the list of Box children. The list is the children field of Box, and contains both widgets packed PACK_START as well as widgets packed PACK_END, in the order that these widgets were added to the box. A widget's position in the Box children list determines where the widget is packed into box. A child widget at some position in the list will be packed just after all other widgets of the same packing type that appear earlier in the list. The children field is not exported and only the interface methods are able to manipulate the field.
Parameters:
child the Widget to move position the new position for child in the list of children of box starting from 0. If negative, indicates the end of the list
func (*CBox) SetChildPacking ¶
func (b *CBox) SetChildPacking(child Widget, expand bool, fill bool, padding int, packType PackType)
SetChildPacking updates the information about how the child is packed into the Box. If the given child Widget is not contained within the Box an error is logged and no action is taken.
Parameters:
child the Widget of the child to set expand the new value of the “expand” child property fill the new value of the “fill” child property padding the new value of the “padding” child property packType the new value of the “pack-type” child property
func (*CBox) SetHomogeneous ¶
SetHomogeneous is a convenience method for updating the homogeneous property of the Box instance, controlling whether or not all children of box are given equal space in the box.
Parameters:
homogeneous TRUE to create equal allotments, FALSE for variable allotments
func (*CBox) SetOrientation ¶
func (b *CBox) SetOrientation(orientation enums.Orientation)
SetOrientation is a convenience method for updating the orientation property value.
Parameters:
orientation the desired enums.Orientation to use
func (*CBox) SetSpacing ¶
SetSpacing is a convenience method to update the spacing property value.
Parameters:
spacing the number of characters to put between children
type CBuilder ¶
func (*CBuilder) AddNamedSignalHandler ¶
func (b *CBuilder) AddNamedSignalHandler(name string, fn cdk.SignalListenerFn)
func (*CBuilder) Build ¶
func (b *CBuilder) Build(element *CBuilderElement) (newObject interface{})
func (*CBuilder) GetWidgetsBuiltByType ¶
func (*CBuilder) LoadFromString ¶
func (b *CBuilder) LoadFromString(raw string) (topElement *CBuilderElement, err error)
func (*CBuilder) LookupNamedSignalHandler ¶
func (b *CBuilder) LookupNamedSignalHandler(name string) (fn cdk.SignalListenerFn)
func (*CBuilder) ParsePacking ¶
func (b *CBuilder) ParsePacking(packing *CBuilderElement) (expand, fill bool, padding int, packType PackType)
type CBuilderElement ¶
type CBuilderElement struct {
TagName string
Content string
Builder Builder
Instance interface{}
Attributes map[string]string
Properties map[string]string
Signals map[string]string
Packing map[string]string
Children []*CBuilderElement
}
func (*CBuilderElement) ApplyProperties ¶
func (b *CBuilderElement) ApplyProperties()
func (*CBuilderElement) ApplyProperty ¶
func (b *CBuilderElement) ApplyProperty(k, v string) (set bool)
func (*CBuilderElement) ApplySignal ¶
func (b *CBuilderElement) ApplySignal(k, v string)
func (*CBuilderElement) ApplySignals ¶
func (b *CBuilderElement) ApplySignals()
func (*CBuilderElement) String ¶
func (b *CBuilderElement) String() string
type CButton ¶
type CButton struct {
CBin
// contains filtered or unexported fields
}
The CButton structure implements the Button interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Button objects.
func MakeButton ¶
func MakeButton() *CButton
MakeButton is used by the Buildable system to construct a new Button with a default label that is empty.
func NewButton ¶
func NewButton() *CButton
NewButton is a constructor for new Button instances without a label Widget.
func NewButtonFromStock ¶
NewButtonFromStock creates a NewButtonWithLabel containing the text from a stock item. If stock_id is unknown, it will be treated as a mnemonic label (as for NewWithMnemonic).
Parameters:
stockId the name of the stock item
func NewButtonWithLabel ¶
NewButtonWithLabel will construct a NewButton with a NewLabel, pre-configured for a centered placement within the new Button instance, taking care to avoid focus complications and default event handling.
Parameters:
label the text of the button
func NewButtonWithMnemonic ¶
NewButtonWithMnemonic creates a NewButtonWithLabel. If the characters in the label are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use '__' (two underscores). The first underlined character represents a keyboard accelerator called a mnemonic. Pressing Alt and that key activates the button.
Parameters:
label the text of the button
func NewButtonWithWidget ¶
NewButtonWithWidget creates a NewButton with the given Widget as the Button's child.
func (*CButton) Build ¶
func (b *CButton) Build(builder Builder, element *CBuilderElement) error
Build provides customizations to the Buildable system for Button Widgets.
func (*CButton) CancelEvent ¶
func (b *CButton) CancelEvent()
CancelEvent emits a cancel-event signal and if the signal handlers all return enums.EVENT_PASS, then set the button as not pressed and release any event focus.
func (*CButton) GetAlignment ¶
GetAlignment is a convenience method for returning both the x and y alignment property values.
Parameters:
xAlign horizontal alignment yAlign vertical alignment
func (*CButton) GetFocusChain ¶
GetFocusChain overloads the Container.GetFocusChain to always return the Button instance as the only item in the focus chain.
func (*CButton) GetFocusOnClick ¶
GetFocusOnClick is a convenience method to return the focus-on-click property value. This is whether the button grabs focus when it is clicked with the mouse. See: SetFocusOnClick()
func (*CButton) GetImage ¶
GetImage is a convenience method to return the image property value. See: SetImage()
func (*CButton) GetImagePosition ¶
func (b *CButton) GetImagePosition() (value PositionType)
GetImagePosition is a convenience method to return the image-position property value. See: SetImagePosition()
Note that usage of this within CTK is unimplemented at this time
func (*CButton) GetLabel ¶
GetLabel returns the text from the label of the button, as set by SetLabel. If the child Widget is not a Label, the value of the button label property will be returned instead. See: SetLabel()
func (*CButton) GetPressed ¶
GetPressed returns TRUE if the Button is currently pressed, FALSE otherwise.
func (*CButton) GetRelief ¶
func (b *CButton) GetRelief() (value ReliefStyle)
GetRelief is a convenience method for returning the relief property value See: SetRelief()
func (*CButton) GetSizeRequest ¶
GetSizeRequest returns the requested size of the Drawable Widget. This method is used by Container Widgets to resolve the surface space allocated for their child Widget instances.
func (*CButton) GetUseMarkup ¶
GetUseMarkup is a convenience method to return the use-markup property value. This is whether markup in the label text is rendered. See: SetUseMarkup()
func (*CButton) GetUseStock ¶
GetUseStock is a convenience method to return the use-stock property value. See: SetUseStock()
func (*CButton) GetUseUnderline ¶
GetUseUnderline is a convenience method to return the use-underline property value. This is whether an embedded underline in the button label indicates a mnemonic. See: SetUseUnderline()
func (*CButton) GetWidgetAt ¶
GetWidgetAt returns the Button instance if the position given is within the allocated size at the origin point of the Button. If the position given is not contained within the Button space, `nil` is returned.
func (*CButton) GrabEventFocus ¶
func (b *CButton) GrabEventFocus()
GrabEventFocus will emit a grab-event-focus signal and if all signal handlers return enums.EVENT_PASS will set the Button instance as the Window event focus handler.
Note that this method needs to be implemented within each Drawable that can be focused because of the golang interface system losing the concrete struct when a Widget interface reference is passed as a generic interface{} argument.
func (*CButton) GrabFocus ¶
func (b *CButton) GrabFocus()
GrabFocus will take the focus of the associated Window if the Widget instance CanFocus(). Any previously focused Widget will emit a lost-focus signal and the newly focused Widget will emit a gained-focus signal. This method emits a grab-focus signal initially and if the listeners return EVENT_PASS, the changes are applied.
Note that this method needs to be implemented within each Drawable that can be focused because of the golang interface system losing the concrete struct when a Widget interface reference is passed as a generic interface{} argument.
func (*CButton) Init ¶
Init initializes a Button object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Button instance. Init is used in the NewButton constructor and only necessary when implementing a derivative Button type.
func (*CButton) SetAlignment ¶
SetAlignment is a convenience method for updating both the x and y alignment values. This property has no effect unless the child Widget implements the Alignable interface (ie: Misc based or Alignment Widget types).
Parameters:
xAlign the horizontal position of the child, 0.0 is left aligned, 1.0 is right aligned yAlign the vertical position of the child, 0.0 is top aligned, 1.0 is bottom aligned
func (*CButton) SetFocusOnClick ¶
SetFocusOnClick is a convenience method for updating the focus-on-click property value. This is whether the button will grab focus when it is clicked with the mouse. Making mouse clicks not grab focus is useful in places like toolbars where you don't want the keyboard focus removed from the main area of the application.
Parameters:
focusOnClick whether the button grabs focus when clicked with the mouse
func (*CButton) SetImage ¶
SetImage is a convenience method to update the image property value.
Parameters:
image a widget to set as the image for the button
Note that usage of this within CTK is unimplemented at this time
func (*CButton) SetImagePosition ¶
func (b *CButton) SetImagePosition(position PositionType)
SetImagePosition is a convenience method to update the image-position property value. This sets the position of the image relative to the text inside the button.
Parameters:
position the position
Note that usage of this within CTK is unimplemented at this time
func (*CButton) SetLabel ¶
SetLabel will update the text of the child Label of the button to the given text. This text is also used to select the stock item if SetUseStock is used. This will also clear any previously set labels.
Parameters:
label the Label text to apply
func (*CButton) SetPressed ¶
SetPressed is used to change the pressed state of the Button. If TRUE, the Button is flagged as pressed and a SignalPressed is emitted. If FALSE, the Button is flagged as not being pressed and a SignalReleased is emitted.
func (*CButton) SetRelief ¶
func (b *CButton) SetRelief(newStyle ReliefStyle)
SetRelief is a convenience method for updating the relief property value
Note that usage of this within CTK is unimplemented at this time
func (*CButton) SetUseMarkup ¶
SetUseMarkup is a convenience method to update the use-markup property value. If true, any Tango markup in the text of the button label will be rendered.
Parameters:
enabled TRUE if markup is rendered
func (*CButton) SetUseStock ¶
SetUseStock is a convenience method to update the use-stock property value. If TRUE, the label set on the button is used as a stock id to select the stock item for the button.
Parameters:
useStock TRUE if the button should use a stock item
func (*CButton) SetUseUnderline ¶
SetUseUnderline is a convenience method to update the use-underline property value and update the child Label settings. If true, an underline in the text of the button label indicates the next character should be used for the mnemonic accelerator key.
Parameters:
useUnderline TRUE if underlines in the text indicate mnemonics
type CButtonBox ¶
type CButtonBox struct {
CBox
}
The CButtonBox structure implements the ButtonBox interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with ButtonBox objects.
func MakeButtonBox ¶
func MakeButtonBox() *CButtonBox
MakeButtonBox is used by the Buildable system to construct a new horizontal homogeneous ButtonBox with no spacing between the Widget children.
func NewButtonBox ¶
func NewButtonBox(orientation enums.Orientation, homogeneous bool, spacing int) *CButtonBox
NewButtonBox is a constructor for new Box instances.
func (*CButtonBox) Add ¶
func (b *CButtonBox) Add(w Widget)
Add is a convenience method for adding the given Widget to the primary group with default PackStart configuration of: expand=true, fill=true and padding=0
func (*CButtonBox) Build ¶
func (b *CButtonBox) Build(builder Builder, element *CBuilderElement) error
Build provides customizations to the Buildable system for ButtonBox Widgets.
func (*CButtonBox) GetChildPrimary ¶
func (b *CButtonBox) GetChildPrimary(w Widget) (isPrimary bool)
GetChildPrimary is a convenience method that returns TRUE if the given Widget is in the primary grouping and returns FALSE otherwise.
Parameters:
child a child of widget
func (*CButtonBox) GetChildSecondary ¶
func (b *CButtonBox) GetChildSecondary(w Widget) (isSecondary bool)
GetChildSecondary is a convenience method that returns TRUE if the given Widget is in the primary grouping and returns FALSE otherwise.
Parameters:
child a child of widget
func (*CButtonBox) GetLayout ¶
func (b *CButtonBox) GetLayout() (value ButtonBoxStyle)
GetLayout is a convenience method for returning the layout-style property value as the ButtonBoxStyle type. See: SetLayout()
func (*CButtonBox) Init ¶
func (b *CButtonBox) Init() (already bool)
Init initializes a ButtonBox object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the ButtonBox instance. Init is used in the NewButtonBox constructor and only necessary when implementing a derivative ButtonBox type.
func (*CButtonBox) PackEnd ¶
func (b *CButtonBox) PackEnd(w Widget, expand, fill bool, padding int)
PackEnd will add the given Widget to the secondary group with the given Box packing configuration.
func (*CButtonBox) PackStart ¶
func (b *CButtonBox) PackStart(w Widget, expand, fill bool, padding int)
PackStart will add the given Widget to the primary group with the given Box packing configuration.
func (*CButtonBox) Remove ¶
func (b *CButtonBox) Remove(w Widget)
Remove the given Widget from the ButtonBox
func (*CButtonBox) SetChildPacking ¶
func (b *CButtonBox) SetChildPacking(child Widget, expand bool, fill bool, padding int, packType PackType)
SetChildPacking is a convenience method to set the packing configuration for the given child Widget of the ButtonBox, regardless of which grouping the Widget is in.
Parameters:
child the Widget of the child to set expand the new value of the expand child property fill the new value of the fill child property padding the new value of the padding child property packType the new value of the pack-type child property
func (*CButtonBox) SetChildSecondary ¶
func (b *CButtonBox) SetChildSecondary(child Widget, isSecondary bool)
SetChildSecondary will ensure the given Widget is in the secondary grouping if the isSecondary argument is TRUE. If isSecondary is FALSE, this will ensure that the Widget is in the primary grouping.
Parameters:
child a child of widget secondary TRUE, if the child appears in a secondary group
func (*CButtonBox) SetLayout ¶
func (b *CButtonBox) SetLayout(layoutStyle ButtonBoxStyle)
SetLayout is a convenience method for updating the layout-style property for the ButtonBox. The normal expand and fill packing options are ignored in the context of a ButtonBox. The layout style instead defines the visual placement of the child widgets. The size request for each child determines it's allocation in the ButtonBox with the exception of the "expand" layout style in which the children are evenly allocated to consume all available space in the ButtonBox.
The different styles are as follows:
"start" group Widgets from the starting edge "end" group Widgets from the ending edge "center" group Widgets together in the center, away from edges "spread" spread Widgets evenly and centered, away form edges "edge" spread Widgets evenly and centered, flush with edges "expand" expand all Widgets to evenly consume all available space
Note that usage of this within CTK is unimplemented at this time
type CContainer ¶
type CContainer struct {
CWidget
// contains filtered or unexported fields
}
The CContainer structure implements the Container interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Container objects.
func MakeContainer ¶ added in v0.1.2
func MakeContainer() *CContainer
MakeContainer is used by the Buildable system to construct a new Container.
func NewContainer ¶ added in v0.1.2
func NewContainer() *CContainer
NewContainer is the constructor for new Container instances.
func (*CContainer) Add ¶
func (c *CContainer) Add(w Widget)
Add the given Widget to the container. Typically this is used for simple containers such as Window, Frame, or Button; for more complicated layout containers such as Box or Table, this function will pick default packing parameters that may not be correct. So consider functions such as Box.PackStart() and Table.Attach() as an alternative to Container.Add() in those cases. A Widget may be added to only one container at a time; you can't place the same widget inside two different containers. This method emits an add signal initially and if the listeners return enums.EVENT_PASS then the change is applied.
Parameters:
widget a widget to be placed inside container
func (*CContainer) AddWithProperties ¶
func (c *CContainer) AddWithProperties(widget Widget, argv ...interface{})
AddWithProperties the given Widget to the Container, setting any given child properties at the same time. See: Add() and ChildSet()
Parameters:
widget widget to be placed inside container argv list of property names and values
func (*CContainer) Build ¶
func (c *CContainer) Build(builder Builder, element *CBuilderElement) error
Build provides customizations to the Buildable system for Container Widgets.
func (*CContainer) ChildGet ¶
func (c *CContainer) ChildGet(child Widget, properties ...cdk.Property) (values []interface{})
ChildGet returns the values of one or more child properties for the given child.
Parameters:
child a widget which is a child of container properties... one or more property names
Returns:
an array of property values, in the order of the property names given, and if the property named is not found, a Go error is returned for that position of property names given
func (*CContainer) ChildSet ¶
func (c *CContainer) ChildSet(child Widget, argv ...interface{})
ChildSet updates one or more child properties for the given child in the container.
Parameters:
child a widget which is a child of container argv a list of property name and value pairs
func (*CContainer) ChildType ¶
func (c *CContainer) ChildType() (value cdk.CTypeTag)
ChildType returns the type of the children supported by the container. Note that this may return TYPE_NONE to indicate that no more children can be added, e.g. for a Paned which already has two children.
Returns:
tag a cdk.CTypeTag
Note that usage of this within CTK is unimplemented at this time
func (*CContainer) FindChildProperty ¶
func (c *CContainer) FindChildProperty(property cdk.Property) (value *cdk.CProperty)
FindChildProperty searches for a child property of a container by name.
Parameters:
property the name of the child property to find
Returns:
value the cdk.CProperty of the child property or nil if there is no child property with that name.
func (*CContainer) GetBorderWidth ¶
func (c *CContainer) GetBorderWidth() (value int)
GetBorderWidth retrieves the border width of the Container. See: SetBorderWidth()
Returns:
the current border width
Note that usage of this within CTK is unimplemented at this time
func (*CContainer) GetChildProperty ¶
func (c *CContainer) GetChildProperty(child Widget, propertyName cdk.Property) (value interface{})
GetChildProperty returns the value of a child property for the given child. Parameters:
child a widget which is a child of container propertyName the name of the property to get
Returns:
the value stored in the given property, or nil if the property
func (*CContainer) GetChildren ¶
func (c *CContainer) GetChildren() (children []Widget)
GetChildren returns the container's non-internal children.
Returns:
children list of Widget children
Note that usage of this within CTK is unimplemented at this time
func (*CContainer) GetFocusChain ¶
func (c *CContainer) GetFocusChain() (focusableWidgets []interface{}, explicitlySet bool)
GetFocusChain retrieves the focus chain of the container, if one has been set explicitly. If no focus chain has been explicitly set, CTK computes the focus chain based on the positions of the children.
Returns:
focusableWidgets widgets in the focus chain. explicitlySet TRUE if the focus chain has been set explicitly.
func (*CContainer) GetFocusChild ¶
func (c *CContainer) GetFocusChild() (value Widget)
GetFocusChild returns the current focus child widget inside container. This is not the currently focused widget. That can be obtained by calling Window.GetFocus().
Returns:
widget child which will receive the focus inside container when the container is focussed, or NULL if none is set
Note that usage of this within CTK is unimplemented at this time
func (*CContainer) GetFocusHAdjustment ¶
func (c *CContainer) GetFocusHAdjustment() (value Adjustment)
GetFocusHAdjustment retrieves the horizontal focus adjustment for the container. See: SetFocusHAdjustment()
Returns:
adjustment the horizontal focus adjustment, or NULL if none has been set
Note that usage of this within CTK is unimplemented at this time
func (*CContainer) GetFocusVAdjustment ¶
func (c *CContainer) GetFocusVAdjustment() (value Adjustment)
GetFocusVAdjustment retrieves the vertical focus adjustment for the container. See: SetFocusVAdjustment()
Returns:
adjustment the vertical focus adjustment, or NULL if none has been set
Note that usage of this within CTK is unimplemented at this time
func (*CContainer) GetWidgetAt ¶
func (c *CContainer) GetWidgetAt(p *ptypes.Point2I) Widget
GetWidgetAt is a wrapper around the Widget.GetWidgetAt() method that if the Container has the given Point2I within it's bounds, will return itself, or if there is a child Widget at the given Point2I will return the child Widget. If the Container does not have the given point within it's bounds, will return nil
func (*CContainer) Init ¶
func (c *CContainer) Init() (already bool)
Init initializes a Container object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Container instance. Init is used in the NewContainer constructor and only necessary when implementing a derivative Container type.
func (*CContainer) InstallChildProperty ¶
func (c *CContainer) InstallChildProperty(name cdk.Property, kind cdk.PropertyType, write bool, def interface{}) error
InstallChildProperty adds a child property on a container.
func (*CContainer) ListChildProperties ¶
func (c *CContainer) ListChildProperties() (properties []*cdk.CProperty)
ListChildProperties returns all child properties of a Container.
Parameters:
properties list of *cdk.Property instances
func (*CContainer) Remove ¶
func (c *CContainer) Remove(w Widget)
Remove the given Widget from the Container. Widget must be inside Container. This method emits a remove signal initially and if the listeners return enums.EVENT_PASS, the change is applied.
Parameters:
widget a current child of container
func (*CContainer) ResizeChildren ¶ added in v0.1.2
func (c *CContainer) ResizeChildren()
ResizeChildren will call Resize on each child Widget.
func (*CContainer) SetBorderWidth ¶
func (c *CContainer) SetBorderWidth(borderWidth int)
SetBorderWidth updates the border width of the Container. The border width of a container is the amount of space to leave around the outside of the container. The only exception to this is Window; because toplevel windows can't leave space outside, they leave the space inside. The border is added on all sides of the container. To add space to only one side, one approach is to create a Alignment widget, call Widget.SetSizeRequest to give it a size and place it on the side of the container as a spacer.
Parameters:
borderWidth amount of blank space to leave outside the container
Note that usage of this within CTK is unimplemented at this time
func (*CContainer) SetChildProperty ¶
func (c *CContainer) SetChildProperty(child Widget, propertyName cdk.Property, value interface{})
SetChildProperty updates a child property for the given child.
Parameters:
child a widget which is a child of container propertyName the name of the property to set value the value to set the property to
func (*CContainer) SetFocusChain ¶
func (c *CContainer) SetFocusChain(focusableWidgets []interface{})
SetFocusChain updates a focus chain, overriding the one computed automatically by CTK. In principle each widget in the chain should be a descendant of the container, but this is not enforced by this method, since it's allowed to set the focus chain before you pack the widgets, or have a widget in the chain that isn't always packed. The necessary checks are done when the focus chain is actually traversed.
Parameters:
focusableWidgets the new focus chain.
func (*CContainer) SetFocusChild ¶
func (c *CContainer) SetFocusChild(child Widget)
SetFocusChild updates the focus child for the Container.
Parameters:
child a Widget, or `nil`
Note that usage of this within CTK is unimplemented at this time
func (*CContainer) SetFocusHAdjustment ¶
func (c *CContainer) SetFocusHAdjustment(adjustment Adjustment)
SetFocusHAdjustment hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. This function sets the horizontal alignment. See ScrolledWindow.GetHadjustment for a typical way of obtaining the adjustment and SetFocusVadjustment for setting the vertical adjustment.
Parameters:
adjustment an adjustment which should be adjusted when the focus is moved among the descendents of container
Note that usage of this within CTK is unimplemented at this time
func (*CContainer) SetFocusVAdjustment ¶
func (c *CContainer) SetFocusVAdjustment(adjustment Adjustment)
SetFocusVAdjustment hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. This function sets the vertical alignment. See ScrolledWindow.GetVAdjustment for a typical way of obtaining the adjustment and SetFocusHAdjustment for setting the horizontal adjustment.
Parameters:
adjustment an adjustment which should be adjusted when the focus is moved among the descendents of container
Note that usage of this within CTK is unimplemented at this time
func (*CContainer) SetOrigin ¶
func (c *CContainer) SetOrigin(x, y int)
SetOrigin emits an origin signal and if all signal handlers return enums.EVENT_PASS, updates the Container origin field while also setting all children to the same origin.
Note that this method's behaviour may change.
func (*CContainer) SetWindow ¶
func (c *CContainer) SetWindow(w Window)
SetWindow sets the Container window field to the given Window and then does the same for each of the Widget children.
func (*CContainer) ShowAll ¶
func (c *CContainer) ShowAll()
ShowAll is a convenience method to call Show on the Container itself and then call ShowAll for all Widget children.
func (*CContainer) UnsetFocusChain ¶
func (c *CContainer) UnsetFocusChain()
UnsetFocusChain removes a focus chain explicitly set with SetFocusChain.
type CDialog ¶
type CDialog struct {
CWindow
// contains filtered or unexported fields
}
The CDialog structure implements the Dialog interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Dialog objects.
func MakeDialog ¶
func MakeDialog() *CDialog
MakeDialog is used by the Buildable system to construct a new Dialog.
func NewDialog ¶
func NewDialog() (value *CDialog)
NewDialog is the constructor for new Dialog instances.
func NewDialogWithButtons ¶
func NewDialogWithButtons(title string, parent Window, flags DialogFlags, argv ...interface{}) (value *CDialog)
NewDialogWithButtons creates a new Dialog with title, transient parent, a bitmask of DialogFlags and a variadic list of paired items. The items are the button ResponseType paired with a Button label string (which can be a ctk.StockID for access to the stock Buttons in CTK).
The `flags` argument can be used to make the dialog modal (ctk.DialogModal) and/or to have it destroyed along with its transient parent (ctk.DialogDestroyWithParent).
If the user clicks one of these Dialog Buttons, the Dialog will emit the response signal with the corresponding response ID. Buttons are from left to right, so the first button in the list will be the leftmost button in the Dialog.
Parameters:
title label for the dialog parent Transient parent of the dialog, or `nil` flags from DialogFlags argv response ID with label pairs
func (*CDialog) AddActionWidget ¶
func (d *CDialog) AddActionWidget(child Widget, responseId ResponseType)
AddActionWidget adds the given activatable widget to the action area of a Dialog, connecting a signal handler that will emit the response signal on the Dialog when the widget is activated. The widget is appended to the end of the Dialog's action area. If you want to add a non-activatable widget, simply pack it into the action_area field of the Dialog struct.
Parameters:
child an activatable widget responseId response ID for child
func (*CDialog) AddButton ¶
func (d *CDialog) AddButton(buttonText string, responseId ResponseType) (button Button)
AddButton is a convenience method for AddActionWidget to create a Button with the given text (or a stock button, if button_text is a StockID) and set things up so that clicking the button will emit the response signal with the given ResponseType. The Button is appended to the end of the dialog's action area. The button widget is returned, but usually you don't need it.
Parameters:
buttonText text of button, or stock ID responseId response ID for the button
func (*CDialog) AddButtons ¶
func (d *CDialog) AddButtons(argv ...interface{})
AddButtons is a convenience method for AddButton to create many buttons, in the same way as calling AddButton repeatedly. Each Button must have both ResponseType and label text provided.
Parameters:
argv response ID with label pairs
func (*CDialog) AddSecondaryActionWidget ¶
func (d *CDialog) AddSecondaryActionWidget(child Widget, responseId ResponseType)
AddSecondaryActionWidget is the same as AddActionWidget with the exception of adding the given Widget to the secondary action Button grouping instead of the primary grouping as with AddActionWidget.
func (*CDialog) Build ¶
func (d *CDialog) Build(builder Builder, element *CBuilderElement) error
Build provides customizations to the Buildable system for Dialog Widgets.
func (*CDialog) Destroy ¶
func (d *CDialog) Destroy()
Destroy hides the Dialog, removes it from any transient Window associations, removes the Dialog from the Display and finally emits the destroy-event signal.
func (*CDialog) GetActionArea ¶
GetActionArea returns the action area ButtonBox of a Dialog instance.
func (*CDialog) GetContentArea ¶
GetContentArea returns the content area VBox of a Dialog instance.
func (*CDialog) GetResponseForWidget ¶
func (d *CDialog) GetResponseForWidget(widget Widget) (value ResponseType)
GetResponseForWidget is a convenience method for looking up the ResponseType associated with the given Widget in the Dialog action area. Returns ResponseNone if the Widget is not found in the action area of the Dialog.
Parameters:
widget a widget in the action area of dialog
func (*CDialog) GetWidgetForResponse ¶
func (d *CDialog) GetWidgetForResponse(responseId ResponseType) (value Widget)
GetWidgetForResponse returns the last Widget Button that uses the given ResponseType in the action area of a Dialog.
Parameters:
responseId the response ID used by the dialog widget
func (*CDialog) Init ¶
Init initializes a Dialog object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Dialog instance. Init is used in the NewDialog constructor and only necessary when implementing a derivative Dialog type.
func (*CDialog) Response ¶
func (d *CDialog) Response(responseId ResponseType)
Response emits the response signal with the given response ID. Used to indicate that the user has responded to the dialog in some way; typically either you or Run will be monitoring the ::response signal and take appropriate action.
Parameters:
responseId ResponseType identifier
func (*CDialog) Run ¶
func (d *CDialog) Run() (response chan ResponseType)
Run in CTK, unlike the GTK equivalent, does not block the main thread. Run maintains its own internal main-loop process and returns a ResponseType channel so that once the user presses one of the action-buttons or closes the Dialog with ESC for example, the response channel can deliver the user-input to the Dialog calling code.
Before entering the recursive main loop, Run calls Show on the Dialog for you. Note that you still need to Show any children of the Dialog yourself. You can force Run to return at any time by calling Response to emit the ::response signal directly. Destroying the dialog during Run is a very bad idea, because your post-run code won't know whether the dialog was destroyed or not and there would likely be a closed-chan issue with the ResponseType channel.
After Run returns, you are responsible for hiding or destroying the dialog if you wish to do so.
func (*CDialog) SetDefaultResponse ¶
func (d *CDialog) SetDefaultResponse(responseId ResponseType)
SetDefaultResponse updates which action Widget is activated when the user presses the ENTER key without changing the focused Widget first. The last Widget in the Dialog's action area with the given ResponseType as the default widget for the dialog.
Parameters:
responseId a response ID
func (*CDialog) SetResponseSensitive ¶
func (d *CDialog) SetResponseSensitive(responseId ResponseType, sensitive bool)
SetResponseSensitive calls Widget.SetSensitive for each widget in the Dialog's action area with the given Responsetype. A convenient way to sensitize/desensitize Dialog Buttons.
Parameters:
responseId a response ID setting TRUE for sensitive
type CEventBox ¶
type CEventBox struct {
CBin
}
The CEventBox structure implements the EventBox interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with EventBox objects.
func MakeEventBox ¶
func MakeEventBox() *CEventBox
MakeEventBox is used by the Buildable system to construct a new EventBox.
func NewEventBox ¶
func NewEventBox() (value *CEventBox)
NewEventBox is the constructor for new EventBox instances.
func (*CEventBox) Activate ¶
Activate will emit an activate signal and return TRUE if the signal handlers return EVENT_STOP indicating that the event was in fact handled.
func (*CEventBox) CancelEvent ¶
func (b *CEventBox) CancelEvent()
CancelEvent will emit a cancel-event signal.
func (*CEventBox) GetAboveChild ¶
GetAboveChild returns whether the event box window is above or below the windows of its child. See: SetAboveChild()
func (*CEventBox) GetVisibleWindow ¶
GetVisibleWindow returns whether the event box has a visible window. See: SetVisibleWindow()
func (*CEventBox) GrabEventFocus ¶ added in v0.1.4
func (b *CEventBox) GrabEventFocus()
GrabEventFocus will emit a grab-event-focus signal and if all signal handlers return enums.EVENT_PASS will set the Button instance as the Window event focus handler.
Note that this method needs to be implemented within each Drawable that can be focused because of the golang interface system losing the concrete struct when a Widget interface reference is passed as a generic interface{} argument.
func (*CEventBox) GrabFocus ¶
func (b *CEventBox) GrabFocus()
GrabFocus will take the focus of the associated Window if the Widget instance CanFocus(). Any previously focused Widget will emit a lost-focus signal and the newly focused Widget will emit a gained-focus signal. This method emits a grab-focus signal initially and if the listeners return EVENT_PASS, the changes are applied.
Note that this method needs to be implemented within each Drawable that can be focused because of the golang interface system losing the concrete struct when a Widget interface reference is passed as a generic interface{} argument.
func (*CEventBox) Init ¶
Init initializes a EventBox object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the EventBox instance. Init is used in the NewEventBox constructor and only necessary when implementing a derivative EventBox type.
func (*CEventBox) ProcessEvent ¶
ProcessEvent manages the processing of events, current this is just emitting a cdk-event signal and returning the result.
func (*CEventBox) SetAboveChild ¶
SetAboveChild updates whether the event box window is positioned above the windows of its child, as opposed to below it. If the window is above, all events inside the event box will go to the event box. If the window is below, events in windows of child widgets will first got to that widget, and then to its parents. The default is to keep the window below the child.
Parameters:
aboveChild TRUE if the event box window is above the windows of its child
func (*CEventBox) SetVisibleWindow ¶
SetVisibleWindow updates whether the event box uses a visible or invisible child window. The default is to use visible windows. In an invisible window event box, the window that the event box creates is a GDK_INPUT_ONLY window, which means that it is invisible and only serves to receive events. A visible window event box creates a visible (GDK_INPUT_OUTPUT) window that acts as the parent window for all the widgets contained in the event box. You should generally make your event box invisible if you just want to trap events. Creating a visible window may cause artifacts that are visible to the user. The main reason to create a non input-only event box is if you want to set the background to a different color or draw on it.
Parameters:
visibleWindow boolean value
type CFakeWindow ¶
type CFakeWindow struct {
CWindow
}
func (*CFakeWindow) Init ¶
func (f *CFakeWindow) Init() (already bool)
type CFrame ¶
type CFrame struct {
CBin
// contains filtered or unexported fields
}
The CFrame structure implements the Frame interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Frame objects.
func MakeFrame ¶
func MakeFrame() *CFrame
MakeFrame is used by the Buildable system to construct a new Frame.
func NewFrameWithWidget ¶
NewFrameWithWidget will construct a new Frame with the given widget instead of the default Label.
func (*CFrame) Add ¶
Add will add the given Widget to the Frame. As the Frame Widget is of Bin type, any previous child Widget is removed first.
func (*CFrame) GetFocusWithChild ¶
GetFocusWithChild returns true if the Frame is supposed to follow the focus of its child Widget or if it should follow its own focus. See: SetFocusWithChild()
func (*CFrame) GetLabel ¶
GetLabel returns the text in the label Widget, if the Widget is in fact of Label Widget type. If the label Widget is not an actual Label, the value of the Frame label property is returned.
Returns:
the text in the label, or NULL if there was no label widget or the label widget was not a Label. This string is owned by CTK and must not be modified or freed.
func (*CFrame) GetLabelAlign ¶
GetLabelAlign retrieves the X and Y alignment of the frame's label. If the label Widget is not of Label Widget type, then the values of the label-x-align and label-y-align properties are returned. See: SetLabelAlign()
Parameters:
xAlign X alignment of frame's label yAlign Y alignment of frame's label
func (*CFrame) GetLabelWidget ¶
GetLabelWidget retrieves the label widget for the Frame. See: SetLabelWidget()
func (*CFrame) GetShadowType ¶
func (f *CFrame) GetShadowType() (value ShadowType)
Retrieves the shadow type of the frame. See SetShadowType. Returns:
the current shadow type of the frame.
func (*CFrame) GetSizeRequest ¶
GetSizeRequest returns the requested size of the Frame, taking into account any children and their size requests.
func (*CFrame) GetWidgetAt ¶
GetWidgetAt returns the Widget at the given point within the Frame. Widgets that are not visible are ignored.
func (*CFrame) GrabFocus ¶
func (f *CFrame) GrabFocus()
If the Widget instance CanFocus() then take the focus of the associated Window. Any previously focused Widget will emit a lost-focus signal and the newly focused Widget will emit a gained-focus signal. This method emits a grab-focus signal initially and if the listeners return EVENT_PASS, the changes are applied
Emits: SignalGrabFocus, Argv=[Widget instance] Emits: SignalLostFocus, Argv=[Previous focus Widget instance], From=Previous focus Widget instance Emits: SignalGainedFocus, Argv=[Widget instance, previous focus Widget instance]
func (*CFrame) Init ¶
Init initializes a Frame object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Frame instance. Init is used in the NewFrame constructor and only necessary when implementing a derivative Frame type.
func (*CFrame) IsFocus ¶
IsFocus is a convenience method for returning whether the child Widget is the focused Widget. If no child Widget exists, or the child Widget cannot be focused itself, then the return value is whether the Frame itself is the focused Widget.
func (*CFrame) SetFocusWithChild ¶
SetFocusWithChild updates whether or not the Frame's theme will reflect the focused state of the Frame's child Widget.
func (*CFrame) SetLabel ¶
SetLabel updates the text of the Label.
Parameters:
label the text to use as the label of the frame.
func (*CFrame) SetLabelAlign ¶
SetLabelAlign is a convenience method for setting the label-x-align and label-y-align properties of the Frame. The default values for a newly created frame are 0.0 and 0.5. If the label Widget is in fact of Label Widget type, SetAlignment with the given x and y alignment values.
Parameters:
xAlign The position of the label along the top edge of the widget. A value
of 0.0 represents left alignment; 1.0 represents right alignment.
yAlign The y alignment of the label. A value of 0.0 aligns under the frame;
1.0 aligns above the frame. If the values are exactly 0.0 or 1.0 the
gap in the frame won't be painted because the label will be
completely above or below the frame.
func (*CFrame) SetLabelWidget ¶
SetLabelWidget removes any existing Widget and replaces it with the given one. This is the widget that will appear embedded in the top edge of the frame as a title.
Parameters:
labelWidget the new label widget
func (*CFrame) SetShadowType ¶
func (f *CFrame) SetShadowType(shadowType ShadowType)
SetShadowType updates the shadow-type property for the Frame.
Parameters:
type the new ShadowType
Note that usage of this within CTK is unimplemented at this time
type CHButtonBox ¶
type CHButtonBox struct {
CButtonBox
}
func MakeHButtonBox ¶
func MakeHButtonBox() *CHButtonBox
func NewHButtonBox ¶
func NewHButtonBox(homogeneous bool, spacing int) *CHButtonBox
func (*CHButtonBox) Init ¶
func (b *CHButtonBox) Init() bool
type CHScrollbar ¶
type CHScrollbar struct {
CScrollbar
}
func MakeHScrollbar ¶
func MakeHScrollbar() *CHScrollbar
func NewHScrollbar ¶
func NewHScrollbar() *CHScrollbar
func (*CHScrollbar) Init ¶
func (s *CHScrollbar) Init() (already bool)
type CLabel ¶
type CLabel struct {
CMisc
// contains filtered or unexported fields
}
The CLabel structure implements the Label interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Label objects.
func MakeLabel ¶
func MakeLabel() *CLabel
MakeLabel is used by the Buildable system to construct a new Label.
func NewLabelWithMarkup ¶
NewLabelWithMarkup creates a new Label, containing the text given and if the text contains Tango markup, the rendered text will display accordingly.
func NewLabelWithMnemonic ¶
NewLabelWithMnemonic creates a new Label, containing the text given. If characters in the string are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use '__' (two underscores). The first underlined character represents a keyboard accelerator called a mnemonic. The mnemonic key can be used to activate another widget, chosen automatically, or explicitly using SetMnemonicWidget. If SetMnemonicWidget is not called, then the first activatable ancestor of the Label will be chosen as the mnemonic widget. For instance, if the label is inside a button or menu item, the button or menu item will automatically become the mnemonic widget and be activated by the mnemonic.
Parameters:
label text, with an underscore in front of the mnemonic character
func (*CLabel) Build ¶
func (l *CLabel) Build(builder Builder, element *CBuilderElement) error
Build provides customizations to the Buildable system for Label Widgets.
func (*CLabel) GetAttributes ¶
GetAttributes returns the attribute list that was set on the label using SetAttributes, if any. This function does not reflect attributes that come from the labels markup (see SetMarkup).
func (*CLabel) GetCleanText ¶
GetCleanText filters the result of GetClearText to strip leading underscores.
func (*CLabel) GetClearText ¶
GetClearText returns the Label's text, stripped of markup.
func (*CLabel) GetCurrentUri ¶
GetCurrentUri returns the URI for the currently active link in the label. The active link is the one under the mouse pointer or, in a selectable label, the link in which the text cursor is currently positioned. This function is intended for use in a activate-link handler or for use in a query-tooltip handler.
Note that usage of this within CTK is unimplemented at this time
func (*CLabel) GetEllipsize ¶
GetEllipsize returns the ellipsizing state of the label. See: SetEllipsize()
func (*CLabel) GetJustify ¶
func (l *CLabel) GetJustify() (value enums.Justification)
GetJustify returns the justification of the label. See: SetJustify()
func (*CLabel) GetLabel ¶
GetLabel returns the text from a label widget including any embedded underlines indicating mnemonics and Tango markup. See: GetText()
func (*CLabel) GetLineWrap ¶
GetLineWrap returns whether lines in the label are automatically wrapped. See: SetLineWrap()
func (*CLabel) GetLineWrapMode ¶
GetLineWrapMode returns line wrap mode used by the label. See: SetLineWrapMode()
func (*CLabel) GetMaxWidthChars ¶
GetMaxWidthChars retrieves the desired maximum width of label, in characters. See: SetWidthChars()
func (*CLabel) GetMnemonicKeyVal ¶
GetMnemonicKeyVal returns the mnemonic character in the Label text if the Label has been set so that it has an mnemonic key. Rhis function returns the keyval used for the mnemonic accelerator. If there is no mnemonic set up it returns `rune(0)`.
Returns:
value keyval usable for accelerators
func (*CLabel) GetMnemonicWidget ¶
GetMnemonicWidget retrieves the target of the mnemonic (keyboard shortcut) of this Label. See: SetMnemonicWidget()
func (*CLabel) GetPlainText ¶
GetPlainText returns the Label's text, stripped of markup and mnemonics.
func (*CLabel) GetPlainTextInfo ¶
GetPlainTextInfo returns the maximum line width and line count.
func (*CLabel) GetPlainTextInfoAtWidth ¶
GetPlainTextInfoAtWidth returns the maximum line width and line count, with the given width as an override to the value set with SetMaxWidthChars. This is used primarily for pre-rendering stages like Resize to determine the size allocations without having to render the actual text with Tango first.
func (*CLabel) GetSelectable ¶
GetSelectable returns the value set by SetSelectable.
func (*CLabel) GetSelectionBounds ¶
GetSelectionBounds returns the selected range of characters in the label, returning TRUE for nonEmpty if there's a selection.
Note that usage of this within CTK is unimplemented at this time
func (*CLabel) GetSingleLineMode ¶
GetSingleLineMode returns whether the label is in single line mode.
func (*CLabel) GetSizeRequest ¶
GetSizeRequest returns the requested size of the Label taking into account the label's content and any padding set.
func (*CLabel) GetText ¶
GetText returns the text from a label widget, as displayed on the screen. This does not include any embedded underlines indicating mnemonics or Tango markup. See: GetLabel
func (*CLabel) GetTrackVisitedLinks ¶
GetTrackVisitedLinks returns whether the label is currently keeping track of clicked links.
Returns:
TRUE if clicked links are remembered
Note that usage of this within CTK is unimplemented at this time
func (*CLabel) GetUseMarkup ¶
GetUseMarkup returns whether the label's text is interpreted as marked up with the Tango text markup language. See: SetUseMarkup()
func (*CLabel) GetUseUnderline ¶
GetUseUnderline returns whether an embedded underline in the label indicates a mnemonic. See: SetUseUnderline()
func (*CLabel) GetWidthChars ¶
GetWidthChars retrieves the desired width of label, in characters. See: SetWidthChars()
func (*CLabel) Init ¶
Init initializes a Label object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Label instance. Init is used in the NewLabel constructor and only necessary when implementing a derivative Label type.
func (*CLabel) SelectRegion ¶
SelectRegion selects a range of characters in the label, if the label is selectable. If the label is not selectable, this function has no effect. If start_offset or end_offset are -1, then the end of the label will be substituted. See: SetSelectable()
Parameters:
startOffset start offset (in characters not bytes) endOffset end offset (in characters not bytes)
Note that usage of this within CTK is unimplemented at this time
func (*CLabel) SetAttributes ¶
SetAttributes updates the attributes property to be the given paint.Style.
Parameters:
attrs a paint.Style
func (*CLabel) SetEllipsize ¶
SetEllipsize updates the mode used to ellipsize (add an ellipsis: "...") to the text if there is not enough space to render the entire string.
Parameters:
mode bool
func (*CLabel) SetJustify ¶
func (l *CLabel) SetJustify(justify enums.Justification)
SetJustify updates the alignment of the lines in the text of the label relative to each other. JUSTIFY_LEFT is the default value when the widget is first created with New. If you instead want to set the alignment of the label as a whole, use SetAlignment instead.
SetJustify has no effect on labels containing only a single line.
Parameters:
jtype a Justification
func (*CLabel) SetLabel ¶
SetLabel updates the text of the label. The label is interpreted as including embedded underlines and/or Pango markup depending on the values of the use-underline and use-markup properties.
Parameters:
str the new text to set for the label
func (*CLabel) SetLineWrap ¶
SetLineWrap updates the line wrapping within the Label widget. TRUE makes it break lines if text exceeds the widget's size. FALSE lets the text get cut off by the edge of the widget if it exceeds the widget size. Note that setting line wrapping to TRUE does not make the label wrap at its parent container's width, because CTK widgets conceptually can't make their requisition depend on the parent container's size. For a label that wraps at a specific position, set the label's width using SetSizeRequest.
Parameters:
wrap the setting
func (*CLabel) SetLineWrapMode ¶
SetLineWrapMode updates the line wrapping if line-wrap is on (see SetLineWrap) this controls how the line wrapping is done. The default is WRAP_WORD which means wrap on word boundaries.
Parameters:
wrapMode the line wrapping mode
func (*CLabel) SetMarkup ¶
SetMarkup parses text which is marked up with the Tango text markup language, setting the Label's text and attribute list based on the parse results.
Parameters:
text a markup string (see Tango markup format)
func (*CLabel) SetMarkupWithMnemonic ¶
SetMarkupWithMnemonic parses str which is marked up with the Tango text markup language, setting the label's text and attribute list based on the parse results. If characters in str are preceded by an underscore, they are underlined indicating that they represent a keyboard accelerator called a mnemonic. The mnemonic key can be used to activate another widget, chosen automatically, or explicitly using SetMnemonicWidget.
Parameters:
str a markup string (see Pango markup format)
func (*CLabel) SetMaxWidthChars ¶
SetMaxWidthChars updates the desired maximum width in characters of label to nChars.
Parameters:
nChars the new desired maximum width, in characters.
func (*CLabel) SetMnemonicWidget ¶
SetMnemonicWidget updates the mnemonic-widget property with the given Widget. If the label has been set so that it has a mnemonic key (using i.e. SetMarkupWithMnemonic, SetTextWithMnemonic, NewWithMnemonic or the use-underline property) the label can be associated with a widget that is the target of the mnemonic. When the label is inside a widget (like a Button or a Notebook tab) it is automatically associated with the correct widget, but sometimes (i.e. when the target is a Entry next to the label) you need to set it explicitly using this function. The target widget will be accelerated by emitting the mnemonic-activate signal on it. The default handler for this signal will activate the widget if there are no mnemonic collisions and toggle focus between the colliding widgets otherwise.
Parameters:
widget the target Widget.
Note that usage of this within CTK is unimplemented at this time
func (*CLabel) SetSelectable ¶
SetSelectable updates the selectable property for the Label. Labels allow the user to select text from the label, for copy-and-paste.
Parameters:
setting TRUE to allow selecting text in the label
Note that usage of this within CTK is unimplemented at this time
func (*CLabel) SetSingleLineMode ¶
SetSingleLineMode updates whether the label is in single line mode.
Parameters:
singleLineMode TRUE if the label should be in single line mode
func (*CLabel) SetText ¶
SetText updates the text within the Label widget. It overwrites any text that was there before. This will also clear any previously set mnemonic accelerators.
Parameters:
text the text you want to set
func (*CLabel) SetTextWithMnemonic ¶
SetTextWithMnemonic updates the Label's text from the string str. If characters in str are preceded by an underscore, they are underlined indicating that they represent a keyboard accelerator called a mnemonic. The mnemonic key can be used to activate another widget, chosen automatically, or explicitly using SetMnemonicWidget.
Parameters:
str a string
func (*CLabel) SetTrackVisitedLinks ¶
SetTrackVisitedLinks updates whether the label should keep track of clicked links (and use a different color for them).
Parameters:
trackLinks TRUE to track visited links
Note that usage of this within CTK is unimplemented at this time
func (*CLabel) SetUseMarkup ¶
SetUseMarkup updates whether the text of the label contains markup in Tango's text markup language. See: SetMarkup()
Parameters:
setting TRUE if the label's text should be parsed for markup.
func (*CLabel) SetUseUnderline ¶
SetUseUnderline updates the use-underline property for the Lable. If TRUE, an underline in the text indicates the next character should be used for the mnemonic accelerator key.
Parameters:
setting TRUE if underlines in the text indicate mnemonics
func (*CLabel) SetWidthChars ¶
SetWidthChars updates the desired width in characters of label to nChars.
Parameters:
nChars the new desired width, in characters.
type CListDragPos ¶
type CListDragPos uint64
List drag pos
const ( CLIST_DRAC_NONE CListDragPos = iota CLIST_DRAC_BEFORE CLIST_DRAC_INTO CLIST_DRAC_AFTER )
type CMisc ¶
type CMisc struct {
CWidget
}
The CMisc structure implements the Misc interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Misc objects.
func (*CMisc) GetAlignment ¶
GetAlignment returns the X and Y alignment of the widget within its allocation. See: SetAlignment()
func (*CMisc) GetPadding ¶
GetPadding returns the padding in the X and Y directions of the widget. See: SetPadding()
func (*CMisc) Init ¶
Init initializes a Misc object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Misc instance. Init is used in the NewMisc constructor and only necessary when implementing a derivative Misc type.
func (*CMisc) SetAlignment ¶
SetAlignment is a convenience method to set the x-align and y-align properties of the Misc Widget.
func (*CMisc) SetPadding ¶
SetPadding is a convenience method to set x-pad and y-pad properties of the Misc Widget.
type CObject ¶
The CObject structure implements the Object interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Object objects.
func (*CObject) Build ¶
func (o *CObject) Build(builder Builder, element *CBuilderElement) error
Build provides customizations to the Buildable system for Object Widgets.
func (*CObject) CssSelector ¶
CssSelector returns a selector string identifying this exact Object instance.
func (*CObject) GetAllocation ¶
GetAllocation returns the current allocation size of the Object instance.
func (*CObject) GetCssBool ¶
GetCssBool is a convenience method to return a boolean value for the CSS property of the given name.
Note that usage of this within CTK is unimplemented at this time
func (*CObject) GetCssColor ¶
GetCssColor is a convenience method to return a paint.Color value for the CSS property of the given name.
Note that usage of this within CTK is unimplemented at this time
func (*CObject) GetCssFloat ¶
GetCssFloat is a convenience method to return a float value for the CSS property of the given name.
Note that usage of this within CTK is unimplemented at this time
func (*CObject) GetCssInt ¶
GetCssInt is a convenience method to return a int value for the CSS property of the given name.
Note that usage of this within CTK is unimplemented at this time
func (*CObject) GetCssProperties ¶
func (o *CObject) GetCssProperties() (properties map[StateType][]*CStyleProperty)
GetCssProperties returns all the installed CSS properties for the Object.
Note that usage of this within CTK is unimplemented at this time
func (*CObject) GetCssProperty ¶
func (o *CObject) GetCssProperty(name cdk.Property, state StateType) (property *CStyleProperty)
GetCssProperty returns the cdk.Property instance of the property found with the name given, returning `nil` if no property by the name given is found.
Note that usage of this within CTK is unimplemented at this time
func (*CObject) GetCssString ¶
GetCssString is a convenience method to return a string value for the CSS property of the given name.
Note that usage of this within CTK is unimplemented at this time
func (*CObject) GetCssValue ¶ added in v0.1.2
GetCssValue returns the value of the property found with the same name as the given name.
Note that usage of this within CTK is unimplemented at this time
func (*CObject) GetObjectAt ¶
GetObjectAt returns the Object's instance if the given point is within the Object's display space bounds. This method is mainly used by Window objects and other event processing Widgets that need to find a Widget by mouse-cursor coordinates for example. If this Object does not encompass the point given, it returns `nil`.
func (*CObject) GetTextDirection ¶
func (o *CObject) GetTextDirection() (direction TextDirection)
GetTextDirection returns the current text direction for this Object instance.
Note that usage of this within CTK is unimplemented at this time
func (*CObject) HasPoint ¶
HasPoint determines whether the given point is within the Object's display space bounds.
func (*CObject) Init ¶
Init initializes an Object instance. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Object instance. Init is used in the NewObject constructor and only necessary when implementing a derivative Object type.
func (*CObject) InstallCssProperty ¶
func (o *CObject) InstallCssProperty(name cdk.Property, state StateType, kind cdk.PropertyType, write bool, def interface{}) (err error)
InstallCssProperty installs a new cdk.Property in a secondary CSS-focused property list.
Note that usage of this within CTK is unimplemented at this time
func (*CObject) Invalidate ¶
Invalidate emits an invalidate signal, primarily used in other CTK types which are drawable and need an opportunity to invalidate the memphis surfaces so that the next CTK draw cycle can reflect the latest changes to the Object instance.
func (*CObject) ObjectInfo ¶
ObjectInfo is a convenience method to return a string identifying the Object instance with its type, unique identifier, name if set (see SetName()), the origin point and current size allocation.
func (*CObject) ProcessEvent ¶
ProcessEvent emits a cdk-event signal, primarily used to consume CDK events received such as mouse or key events in other CTK and custom types that embed CObject.
func (*CObject) Resize ¶
Resize emits a resize signal, primarily used to make adjustments or otherwise reallocate resources necessary for subsequent draw events.
func (*CObject) SetAllocation ¶
SetAllocation updates the allocated size of the Object instance. This method is only useful for custom CTK types that need to render child Widgets. This method emits an allocation signal initially and if the listeners return EVENT_PASS the change is applied and constrained to a minimum width and height of zero.
func (*CObject) SetCssPropertyFromStyle ¶ added in v0.1.4
func (*CObject) SetOrigin ¶
SetOrigin updates the origin of this instance in display space. This method emits an origin signal initially and if the listeners return EVENT_PASS then the change is applied.
Emits: SignalOrigin, Argv=[Object instance, new origin]
func (*CObject) SetTextDirection ¶
func (o *CObject) SetTextDirection(direction TextDirection)
SetTextDirection updates text direction for this Object instance. This method emits a text-direction signal initially and if the listeners return EVENT_PASS, the change is applied.
Note that usage of this within CTK is unimplemented at this time
type CRange ¶
type CRange struct {
CWidget
// contains filtered or unexported fields
}
The CRange structure implements the Range interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Range objects.
func (*CRange) GetAdjustment ¶
func (r *CRange) GetAdjustment() (adjustment *CAdjustment)
GetAdjustment returns the Adjustment which is the "model" object for Range. See: SetAdjustment()
func (*CRange) GetFillLevel ¶
GetFillLevel returns the current position of the fill level indicator.
func (*CRange) GetFlippable ¶
GetFlippable returns the value set by SetFlippable.
func (*CRange) GetIncrements ¶
GetIncrements returns the step and page sizes for the range. The step size is used when the user clicks the Scrollbar arrows or moves Scale via arrow keys. The page size is used for example when moving via Page Up or Page Down keys.
func (*CRange) GetInverted ¶
GetInverted returns the value set by SetInverted.
func (*CRange) GetLowerStepperSensitivity ¶
func (r *CRange) GetLowerStepperSensitivity() (value SensitivityType)
GetLowerStepperSensitivity updates the sensitivity policy for the stepper that points to the 'lower' end of the Range's adjustment.
func (*CRange) GetMinSliderLength ¶
GetMinSliderLength returns the minimum slider length. This method is useful mainly for Range subclasses. See: SetMinSliderLength()
func (*CRange) GetMinSliderSize ¶
GetMinSliderSize returns the minimum slider size. This method is useful mainly for Range subclasses. See: SetMinSliderSize()
Note that usage of this within CTK is unimplemented at this time
func (*CRange) GetRangeRect ¶
GetRangeRect returns the area that contains the range's trough and its steppers, in widget->window coordinates. This function is useful mainly for Range subclasses.
Note that usage of this within CTK is unimplemented at this time
func (*CRange) GetRestrictToFillLevel ¶
GetRestricttoFillLevel returns whether the range is restricted to the fill level.
func (*CRange) GetRoundDigits ¶
GetRoundDigits returns the number of digits to round the value to when it changes.
func (*CRange) GetShowFillLevel ¶
GetShowFillLevel returns whether the range displays the fill level graphically.
func (*CRange) GetSliderLength ¶
GetSliderLength returns the length of the scrollbar or scale thumb.
func (*CRange) GetSliderRange ¶
GetSliderRange returns sliders range along the long dimension, in widget->window coordinates. This function is useful mainly for Range subclasses.
Note that usage of this within CTK is unimplemented at this time
func (*CRange) GetSliderSizeFixed ¶
GetSliderSizeFixed returns whether the slider size is fixed or not. This method is useful mainly for Range subclasses. See: SetSliderSizeFixed()
Note that usage of this within CTK is unimplemented at this time
func (*CRange) GetStepperSize ¶
GetStepperSize returns the length of step buttons at ends.
func (*CRange) GetStepperSpacing ¶
GetStepperSpacing returns the spacing between the stepper buttons and thumb. Note that setting this value to anything > 0 will automatically set the trough-under-steppers style property to TRUE as well. Also, stepper-spacing won't have any effect if there are no steppers.
func (*CRange) GetTroughUnderSteppers ¶
GetTroughUnderSteppers returns whether to draw the trough across the full length of the range or to exclude the steppers and their spacing. Note that setting the stepper-spacing style property to any value > 0 will automatically enable trough-under-steppers too.
func (*CRange) GetUpperStepperSensitivity ¶
func (r *CRange) GetUpperStepperSensitivity() (value SensitivityType)
GetUpperStepperSensitivity updates the sensitivity policy for the stepper that points to the 'upper' end of the Range's adjustment.
func (*CRange) Init ¶
Init initializes a Range object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Range instance. Init is used in the NewRange constructor and only necessary when implementing a derivative Range type.
func (*CRange) SetFillLevel ¶
SetFillLevel updates the new position of the fill level indicator. The "fill level" is probably best described by its most prominent use case, which is an indicator for the amount of pre-buffering in a streaming media player. In that use case, the value of the range would indicate the current play position, and the fill level would be the position up to which the file/stream has been downloaded. This amount of pre-buffering can be displayed on the range's trough and is themeable separately from the trough. To enable fill level display, use SetShowFillLevel. The range defaults to not showing the fill level. Additionally, it's possible to restrict the range's slider position to values which area smaller than the fill level. This is controller by SetRestrictToFillLevel and is by default enabled.
Parameters:
fillLevel the new position of the fill level indicator
func (*CRange) SetFlippable ¶
SetFlippable updates whether a range is flippable. If the range is flippable, it will switch its direction if it is horizontal and its direction is TEXT_DIR_RTL. See: Widget.GetTextDirection()
Parameters:
flippable TRUE to make the range flippable
Note that usage of this within CTK is unimplemented at this time
func (*CRange) SetIncrements ¶
SetIncrements updates the step and page sizes for the range. The step size is used when the user clicks the Scrollbar arrows or moves Scale via arrow keys. The page size is used for example when moving via Page Up or Page Down keys.
Parameters:
step step size page page size
func (*CRange) SetInverted ¶
SetInverted updates the inverted property value. Ranges normally move from lower to higher values as the slider moves from top to bottom or left to right. Inverted ranges have higher values at the top or on the right rather than on the bottom or left.
Parameters:
setting TRUE to invert the range
func (*CRange) SetLowerStepperSensitivity ¶
func (r *CRange) SetLowerStepperSensitivity(sensitivity SensitivityType)
SetLowerStepperSensitivity updates the sensitivity policy for the stepper that points to the 'lower' end of the Range's adjustment.
Parameters:
sensitivity the lower stepper's sensitivity policy.
func (*CRange) SetMinSliderLength ¶
SetMinSliderLength updates the minimum size of the range's slider. This method is useful mainly for Range subclasses.
Parameters:
minSize The slider's minimum size
func (*CRange) SetMinSliderSize ¶
SetMinSliderSize updates the minimum size of the range's slider. This method is useful mainly for Range subclasses.
Parameters:
minSize The slider's minimum size
Note that usage of this within CTK is unimplemented at this time
func (*CRange) SetRange ¶
SetRange updates the allowable values in the Range, and clamps the range value to be between min and max. (If the range has a non-zero page size, it is clamped between min and max - page-size.)
Parameters:
min minimum range value max maximum range value
func (*CRange) SetRestrictToFillLevel ¶
SetRestrictToFillLevel updates whether the slider is restricted to the fill level. See: SetFillLevel()
Parameters:
restrictToFillLevel Whether the fill level restricts slider movement.
func (*CRange) SetRoundDigits ¶
SetRoundDigits updates the number of digits to round the value to when it changes.
Parameters:
roundDigits the precision in digits, or -1
func (*CRange) SetShowFillLevel ¶
SetShowFillLevel updates whether a graphical fill level is show on the trough. See: SetFillLevel()
Parameters:
showFillLevel Whether a fill level indicator graphics is shown.
func (*CRange) SetSliderLength ¶
SetSliderLength updates the length of the scrollbar or scale thumb. Sets fixed slider length to true. Set to -1 for variable slider length.
func (*CRange) SetSliderSizeFixed ¶
SetSliderSizeFixed updates whether the range's slider has a fixed size, or a size that depends on it's adjustment's page size. This function is useful mainly for Range subclasses.
Parameters:
sizeFixed TRUE to make the slider size constant
Note that usage of this within CTK is unimplemented at this time
func (*CRange) SetStepperSize ¶
SetStepperSize updates the length of step buttons at ends.
func (*CRange) SetStepperSpacing ¶
SetStepperSpacing updates the spacing between the stepper buttons and thumb. Note that setting this value to anything > 0 will automatically set the trough-under-steppers style property to TRUE as well. Also, stepper-spacing won't have any effect if there are no steppers.
func (*CRange) SetTroughUnderSteppers ¶
SetTroughUnderSteppers updates whether to draw the trough across the full length of the range or to exclude the steppers and their spacing. Note that setting the stepper-spacing style property to any value > 0 will automatically enable trough-under-steppers too.
func (*CRange) SetUpperStepperSensitivity ¶
func (r *CRange) SetUpperStepperSensitivity(sensitivity SensitivityType)
SetUpperStepperSensitivity updates the sensitivity policy for the stepper that points to the 'upper' end of the Range's adjustment.
Parameters:
sensitivity the upper stepper's sensitivity policy.
type CScrollbar ¶
type CScrollbar struct {
CRange
// contains filtered or unexported fields
}
The CScrollbar structure implements the Scrollbar interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Scrollbar objects.
func (*CScrollbar) BackwardPage ¶
func (s *CScrollbar) BackwardPage() enums.EventFlag
func (*CScrollbar) BackwardStep ¶
func (s *CScrollbar) BackwardStep() enums.EventFlag
func (*CScrollbar) CancelEvent ¶
func (s *CScrollbar) CancelEvent()
func (*CScrollbar) Changed ¶
func (s *CScrollbar) Changed()
func (*CScrollbar) ForwardPage ¶
func (s *CScrollbar) ForwardPage() enums.EventFlag
func (*CScrollbar) ForwardStep ¶
func (s *CScrollbar) ForwardStep() enums.EventFlag
func (*CScrollbar) GetAllStepperRegions ¶
func (s *CScrollbar) GetAllStepperRegions() (fwd, bwd, sFwd, sBwd ptypes.Region)
func (*CScrollbar) GetHasBackwardStepper ¶
func (s *CScrollbar) GetHasBackwardStepper() (hasBackwardStepper bool)
GetHasBackwardStepper returns whether to display the standard backward arrow button. See: SetHasBackwardStepper()
func (*CScrollbar) GetHasForwardStepper ¶
func (s *CScrollbar) GetHasForwardStepper() (hasForwardStepper bool)
Display the standard forward arrow button. Flags: Read Default value: TRUE
func (*CScrollbar) GetHasSecondaryBackwardStepper ¶
func (s *CScrollbar) GetHasSecondaryBackwardStepper() (hasSecondaryBackwardStepper bool)
Display a second backward arrow button on the opposite end of the scrollbar. Flags: Read Default value: FALSE
func (*CScrollbar) GetHasSecondaryForwardStepper ¶
func (s *CScrollbar) GetHasSecondaryForwardStepper() (hasSecondaryForwardStepper bool)
Display a second forward arrow button on the opposite end of the scrollbar. Flags: Read Default value: FALSE
func (*CScrollbar) GetSizeRequest ¶
func (s *CScrollbar) GetSizeRequest() (width, height int)
func (*CScrollbar) GetSliderRegion ¶
func (s *CScrollbar) GetSliderRegion() (region ptypes.Region)
func (*CScrollbar) GetStepperRegions ¶
func (s *CScrollbar) GetStepperRegions() (start, end ptypes.Region)
func (*CScrollbar) GetTroughRegion ¶
func (s *CScrollbar) GetTroughRegion() (region ptypes.Region)
func (*CScrollbar) GetWidgetAt ¶
func (s *CScrollbar) GetWidgetAt(p *ptypes.Point2I) Widget
func (*CScrollbar) GrabEventFocus ¶ added in v0.1.4
func (s *CScrollbar) GrabEventFocus()
GrabEventFocus will emit a grab-event-focus signal and if all signal handlers return enums.EVENT_PASS will set the Button instance as the Window event focus handler.
Note that this method needs to be implemented within each Drawable that can be focused because of the golang interface system losing the concrete struct when a Widget interface reference is passed as a generic interface{} argument.
func (*CScrollbar) GrabFocus ¶
func (s *CScrollbar) GrabFocus()
GrabFocus will take the focus of the associated Window if the Widget instance CanFocus(). Any previously focused Widget will emit a lost-focus signal and the newly focused Widget will emit a gained-focus signal. This method emits a grab-focus signal initially and if the listeners return EVENT_PASS, the changes are applied.
Note that this method needs to be implemented within each Drawable that can be focused because of the golang interface system losing the concrete struct when a Widget interface reference is passed as a generic interface{} argument.
func (*CScrollbar) Init ¶
func (s *CScrollbar) Init() (already bool)
Init initializes a Scrollbar object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Scrollbar instance. Init is used in the NewScrollbar constructor and only necessary when implementing a derivative Scrollbar type.
func (*CScrollbar) SetHasBackwardStepper ¶
func (s *CScrollbar) SetHasBackwardStepper(hasBackwardStepper bool)
SetHasBackwardStepper updates whether to display the standard backward arrow button.
func (*CScrollbar) SetHasForwardStepper ¶
func (s *CScrollbar) SetHasForwardStepper(hasForwardStepper bool)
Display the standard forward arrow button. Flags: Read Default value: TRUE
func (*CScrollbar) SetHasSecondaryBackwardStepper ¶
func (s *CScrollbar) SetHasSecondaryBackwardStepper(hasSecondaryBackwardStepper bool)
Display a second backward arrow button on the opposite end of the scrollbar. Flags: Read Default value: FALSE
func (*CScrollbar) SetHasSecondaryForwardStepper ¶
func (s *CScrollbar) SetHasSecondaryForwardStepper(hasSecondaryForwardStepper bool)
Display a second forward arrow button on the opposite end of the scrollbar. Flags: Read Default value: FALSE
func (*CScrollbar) ValueChanged ¶
func (s *CScrollbar) ValueChanged()
type CScrolledViewport ¶
type CScrolledViewport struct {
CViewport
// contains filtered or unexported fields
}
func MakeScrolledViewport ¶
func MakeScrolledViewport() *CScrolledViewport
func NewScrolledViewport ¶
func NewScrolledViewport() *CScrolledViewport
func (*CScrolledViewport) Add ¶
func (s *CScrolledViewport) Add(w Widget)
func (*CScrolledViewport) AddWithViewport ¶
func (s *CScrolledViewport) AddWithViewport(child Widget)
Used to add children without native scrolling capabilities. This is simply a convenience function; it is equivalent to adding the unscrollable child to a viewport, then adding the viewport to the scrolled window. If a child has native scrolling, use ContainerAdd instead of this function. The viewport scrolls the child by moving its Window, and takes the size of the child to be the size of its toplevel Window. This will be very wrong for most widgets that support native scrolling; for example, if you add a widget such as TreeView with a viewport, the whole widget will scroll, including the column headings. Thus, widgets with native scrolling support should not be used with the Viewport proxy. A widget supports scrolling natively if the set_scroll_adjustments_signal field in WidgetClass is non-zero, i.e. has been filled in with a valid signal identifier. Parameters:
child the widget you want to scroll
func (*CScrolledViewport) Build ¶
func (s *CScrolledViewport) Build(builder Builder, element *CBuilderElement) error
func (*CScrolledViewport) CancelEvent ¶
func (s *CScrolledViewport) CancelEvent()
func (*CScrolledViewport) GetChild ¶
func (s *CScrolledViewport) GetChild() Widget
func (*CScrolledViewport) GetHAdjustment ¶
func (s *CScrolledViewport) GetHAdjustment() (value Adjustment)
Returns the horizontal scrollbar's adjustment, used to connect the horizontal scrollbar to the child widget's horizontal scroll functionality. Returns:
the horizontal Adjustment.
func (*CScrolledViewport) GetHScrollbar ¶
func (s *CScrolledViewport) GetHScrollbar() *CHScrollbar
func (*CScrolledViewport) GetPlacement ¶
func (s *CScrolledViewport) GetPlacement() (value CornerType)
Gets the placement of the contents with respect to the scrollbars for the scrolled window. See SetPlacement. Returns:
the current placement value. See also SetPlacement and UnsetPlacement.
func (*CScrolledViewport) GetPolicy ¶
func (s *CScrolledViewport) GetPolicy() (hScrollbarPolicy PolicyType, vScrollbarPolicy PolicyType)
Retrieves the current policy values for the horizontal and vertical scrollbars. See SetPolicy. Parameters:
hScrollbarPolicy location to store the policy
for the horizontal scrollbar, or NULL.
vScrollbarPolicy location to store the policy
for the vertical scrollbar, or NULL.
func (*CScrolledViewport) GetRegions ¶
func (s *CScrolledViewport) GetRegions() (c, h, v ptypes.Region)
Returns a CDK Region for each of the viewport child space, horizontal and vertical scrollbar spaces.
func (*CScrolledViewport) GetShadowType ¶
func (s *CScrolledViewport) GetShadowType() (value ShadowType)
Gets the shadow type of the scrolled window. See SetShadowType. Returns:
the current shadow type
func (*CScrolledViewport) GetVAdjustment ¶
func (s *CScrolledViewport) GetVAdjustment() (value Adjustment)
Returns the vertical scrollbar's adjustment, used to connect the vertical scrollbar to the child widget's vertical scroll functionality. Returns:
the vertical Adjustment.
func (*CScrolledViewport) GetVScrollbar ¶
func (s *CScrolledViewport) GetVScrollbar() *CVScrollbar
func (*CScrolledViewport) GetWidgetAt ¶
func (s *CScrolledViewport) GetWidgetAt(p *ptypes.Point2I) Widget
func (*CScrolledViewport) GrabEventFocus ¶ added in v0.1.4
func (b *CScrolledViewport) GrabEventFocus()
GrabEventFocus will emit a grab-event-focus signal and if all signal handlers return enums.EVENT_PASS will set the Button instance as the Window event focus handler.
Note that this method needs to be implemented within each Drawable that can be focused because of the golang interface system losing the concrete struct when a Widget interface reference is passed as a generic interface{} argument.
func (*CScrolledViewport) GrabFocus ¶
func (s *CScrolledViewport) GrabFocus()
GrabFocus will take the focus of the associated Window if the Widget instance CanFocus(). Any previously focused Widget will emit a lost-focus signal and the newly focused Widget will emit a gained-focus signal. This method emits a grab-focus signal initially and if the listeners return EVENT_PASS, the changes are applied.
Note that this method needs to be implemented within each Drawable that can be focused because of the golang interface system losing the concrete struct when a Widget interface reference is passed as a generic interface{} argument.
func (*CScrolledViewport) Hide ¶
func (s *CScrolledViewport) Hide()
func (*CScrolledViewport) HorizontalShowByPolicy ¶
func (s *CScrolledViewport) HorizontalShowByPolicy() (show bool)
func (*CScrolledViewport) Init ¶
func (s *CScrolledViewport) Init() (already bool)
func (*CScrolledViewport) Remove ¶
func (s *CScrolledViewport) Remove(w Widget)
func (*CScrolledViewport) SetHAdjustment ¶
func (s *CScrolledViewport) SetHAdjustment(hAdjustment *CAdjustment)
Sets the Adjustment for the horizontal scrollbar. Parameters:
hAdjustment horizontal scroll adjustment
func (*CScrolledViewport) SetPlacement ¶
func (s *CScrolledViewport) SetPlacement(windowPlacement CornerType)
Sets the placement of the contents with respect to the scrollbars for the scrolled window. The default is GTK_CORNER_TOP_LEFT, meaning the child is in the top left, with the scrollbars underneath and to the right. Other values in CornerType are GTK_CORNER_TOP_RIGHT, GTK_CORNER_BOTTOM_LEFT, and GTK_CORNER_BOTTOM_RIGHT. See also GetPlacement and UnsetPlacement. Parameters:
windowPlacement position of the child window
func (*CScrolledViewport) SetPolicy ¶
func (s *CScrolledViewport) SetPolicy(hScrollbarPolicy PolicyType, vScrollbarPolicy PolicyType)
Sets the scrollbar policy for the horizontal and vertical scrollbars. The policy determines when the scrollbar should appear; it is a value from the PolicyType enumeration. If GTK_POLICY_ALWAYS, the scrollbar is always present; if GTK_POLICY_NEVER, the scrollbar is never present; if GTK_POLICY_AUTOMATIC, the scrollbar is present only if needed (that is, if the slider part of the bar would be smaller than the trough - the display is larger than the page size). Parameters:
hScrollbarPolicy policy for horizontal bar vScrollbarPolicy policy for vertical bar
func (*CScrolledViewport) SetShadowType ¶
func (s *CScrolledViewport) SetShadowType(t ShadowType)
Changes the type of shadow drawn around the contents of scrolled_window . Parameters:
type kind of shadow to draw around scrolled window contents
func (*CScrolledViewport) SetVAdjustment ¶
func (s *CScrolledViewport) SetVAdjustment(vAdjustment *CAdjustment)
Sets the Adjustment for the vertical scrollbar. Parameters:
vAdjustment vertical scroll adjustment
func (*CScrolledViewport) Show ¶
func (s *CScrolledViewport) Show()
func (*CScrolledViewport) UnsetPlacement ¶
func (s *CScrolledViewport) UnsetPlacement()
Unsets the placement of the contents with respect to the scrollbars for the scrolled window. If no window placement is set for a scrolled window, it obeys the "gtk-scrolled-window-placement" XSETTING. See also SetPlacement and GetPlacement.
func (*CScrolledViewport) VerticalShowByPolicy ¶
func (s *CScrolledViewport) VerticalShowByPolicy() (show bool)
type CStyle ¶
type CStyle struct {
CObject
}
The CStyle structure implements the Style interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Style objects
func (*CStyle) Init ¶
Style object initialization. This must be called at least once to setup the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Style instance
func (*CStyle) PaintArrow ¶
func (s *CStyle) PaintArrow(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, arrowType ArrowType, fill bool, x int, y int, width int, height int)
Draws an arrow in the given rectangle on window using the given parameters. arrow_type determines the direction of the arrow. Parameters:
window a Window stateType a state shadowType the type of shadow to draw area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. arrowType the type of arrow to draw fill TRUE if the arrow tip should be filled x x origin of the rectangle to draw the arrow in y y origin of the rectangle to draw the arrow in width width of the rectangle to draw the arrow in height height of the rectangle to draw the arrow in
func (*CStyle) PaintBox ¶
func (s *CStyle) PaintBox(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
Draws a box on window with the given parameters. Parameters:
window a Window stateType a state shadowType the type of shadow to draw area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x x origin of the box y y origin of the box width the width of the box height the height of the box
func (*CStyle) PaintBoxGap ¶
func (s *CStyle) PaintBoxGap(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int, gapSide PositionType, gapX int, gapWidth int)
Draws a box in window using the given style and state and shadow type, leaving a gap in one side. Parameters:
window a Window stateType a state shadowType type of shadow to draw area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x x origin of the rectangle y y origin of the rectangle width width of the rectangle height width of the rectangle gapSide side in which to leave the gap gapX starting position of the gap gapWidth width of the gap
func (*CStyle) PaintCheck ¶
func (s *CStyle) PaintCheck(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
Draws a check button indicator in the given rectangle on window with the given parameters. Parameters:
window a Window stateType a state shadowType the type of shadow to draw area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x x origin of the rectangle to draw the check in y y origin of the rectangle to draw the check in width the width of the rectangle to draw the check in height the height of the rectangle to draw the check in
func (*CStyle) PaintDiamond ¶
func (s *CStyle) PaintDiamond(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
Draws a diamond in the given rectangle on window using the given parameters. Parameters:
window a Window stateType a state shadowType the type of shadow to draw area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x x origin of the rectangle to draw the diamond in y y origin of the rectangle to draw the diamond in width width of the rectangle to draw the diamond in height height of the rectangle to draw the diamond in
func (*CStyle) PaintExpander ¶
func (s *CStyle) PaintExpander(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, expanderStyle ExpanderStyle)
Draws an expander as used in TreeView. x and y specify the center the expander. The size of the expander is determined by the "expander-size" style property of widget . (If widget is not specified or doesn't have an "expander-size" property, an unspecified default size will be used, since the caller doesn't have sufficient information to position the expander, this is likely not useful.) The expander is expander_size pixels tall in the collapsed position and expander_size pixels wide in the expanded position. Parameters:
window a Window stateType a state area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x the x position to draw the expander at y the y position to draw the expander at expanderStyle the style to draw the expander in; determines
whether the expander is collapsed, expanded, or in an intermediate state.
func (*CStyle) PaintExtension ¶
func (s *CStyle) PaintExtension(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int, gapSide PositionType)
Draws an extension, i.e. a notebook tab. Parameters:
window a Window stateType a state shadowType type of shadow to draw area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x x origin of the extension y y origin of the extension width width of the extension height width of the extension gapSide the side on to which the extension is attached
func (*CStyle) PaintFlatBox ¶
func (s *CStyle) PaintFlatBox(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
Draws a flat box on window with the given parameters. Parameters:
window a Window stateType a state shadowType the type of shadow to draw area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x x origin of the box y y origin of the box width the width of the box height the height of the box
func (*CStyle) PaintFocus ¶
func (s *CStyle) PaintFocus(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
Draws a focus indicator around the given rectangle on window using the given style. Parameters:
window a Window stateType a state area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x the x origin of the rectangle around which to draw a focus indicator y the y origin of the rectangle around which to draw a focus indicator width the width of the rectangle around which to draw a focus indicator height the height of the rectangle around which to draw a focus indicator
func (*CStyle) PaintHandle ¶
func (s *CStyle) PaintHandle(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int, orientation enums.Orientation)
Draws a handle as used in HandleBox and Paned. Parameters:
window a Window stateType a state shadowType type of shadow to draw area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x x origin of the handle y y origin of the handle width with of the handle height height of the handle orientation the orientation of the handle
func (*CStyle) PaintOption ¶
func (s *CStyle) PaintOption(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
Draws a radio button indicator in the given rectangle on window with the given parameters. Parameters:
window a Window stateType a state shadowType the type of shadow to draw area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x x origin of the rectangle to draw the option in y y origin of the rectangle to draw the option in width the width of the rectangle to draw the option in height the height of the rectangle to draw the option in
func (*CStyle) PaintPolygon ¶
func (s *CStyle) PaintPolygon(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, points []ptypes.Point2I, nPoints int, fill bool)
Draws a polygon on window with the given parameters. Parameters:
window a Window stateType a state shadowType type of shadow to draw area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. points an array of Points nPoints length of points fill TRUE if the polygon should be filled
func (*CStyle) PaintResizeGrip ¶
func (s *CStyle) PaintResizeGrip(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, detail string, edge WindowEdge, x int, y int, width int, height int)
Draws a resize grip in the given rectangle on window using the given parameters. Parameters:
window a Window stateType a state area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. edge the edge in which to draw the resize grip x the x origin of the rectangle in which to draw the resize grip y the y origin of the rectangle in which to draw the resize grip width the width of the rectangle in which to draw the resize grip height the height of the rectangle in which to draw the resize grip
func (*CStyle) PaintShadow ¶
func (s *CStyle) PaintShadow(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
Draws a shadow around the given rectangle in window using the given style and state and shadow type. Parameters:
window a Window stateType a state shadowType type of shadow to draw area clip rectangle or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x x origin of the rectangle y y origin of the rectangle width width of the rectangle height width of the rectangle
func (*CStyle) PaintShadowGap ¶
func (s *CStyle) PaintShadowGap(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int, gapSide PositionType, gapX int, gapWidth int)
Draws a shadow around the given rectangle in window using the given style and state and shadow type, leaving a gap in one side. Parameters:
window a Window stateType a state shadowType type of shadow to draw area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x x origin of the rectangle y y origin of the rectangle width width of the rectangle height width of the rectangle gapSide side in which to leave the gap gapX starting position of the gap gapWidth width of the gap
func (*CStyle) PaintSlider ¶
func (s *CStyle) PaintSlider(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int, orientation enums.Orientation)
Draws a slider in the given rectangle on window using the given style and orientation. Parameters:
window a Window stateType a state shadowType a shadow area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x the x origin of the rectangle in which to draw a slider y the y origin of the rectangle in which to draw a slider width the width of the rectangle in which to draw a slider height the height of the rectangle in which to draw a slider orientation the orientation to be used
func (*CStyle) PaintSpinner ¶
func (s *CStyle) PaintSpinner(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, detail string, step int, x int, y int, width int, height int)
Draws a spinner on window using the given parameters. Parameters:
window a Window stateType a state area clip rectangle, or NULL if the
output should not be clipped.
widget the widget (may be NULL). detail a style detail (may be NULL). step the nth step, a value between 0 and “num-steps” x the x origin of the rectangle in which to draw the spinner y the y origin of the rectangle in which to draw the spinner width the width of the rectangle in which to draw the spinner height the height of the rectangle in which to draw the spinner
func (*CStyle) PaintTab ¶
func (s *CStyle) PaintTab(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
Draws an option menu tab (i.e. the up and down pointing arrows) in the given rectangle on window using the given parameters. Parameters:
window a Window stateType a state shadowType the type of shadow to draw area clip rectangle, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. x x origin of the rectangle to draw the tab in y y origin of the rectangle to draw the tab in width the width of the rectangle to draw the tab in height the height of the rectangle to draw the tab in
func (*CStyle) PaintVLine ¶
func (s *CStyle) PaintVLine(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, detail string, y1 int, y2 int, x int)
Draws a vertical line from (x , y1_ ) to (x , y2_ ) in window using the given style and state. Parameters:
window a Window stateType a state area rectangle to which the output is clipped, or NULL if the
output should not be clipped.
widget the widget. detail a style detail. y1 the starting y coordinate y2 the ending y coordinate x the x coordinate
type CStyleProperty ¶ added in v0.1.4
func NewStyleProperty ¶ added in v0.1.4
func NewStyleProperty(name cdk.Property, state StateType, kind cdk.PropertyType, write bool, buildable bool, def interface{}) (property *CStyleProperty)
func (*CStyleProperty) Buildable ¶ added in v0.1.4
func (p *CStyleProperty) Buildable() bool
func (*CStyleProperty) Clone ¶ added in v0.1.4
func (p *CStyleProperty) Clone() *CStyleProperty
func (*CStyleProperty) Default ¶ added in v0.1.4
func (p *CStyleProperty) Default() (def interface{})
func (*CStyleProperty) Name ¶ added in v0.1.4
func (p *CStyleProperty) Name() cdk.Property
func (*CStyleProperty) ReadOnly ¶ added in v0.1.4
func (p *CStyleProperty) ReadOnly() bool
func (*CStyleProperty) Set ¶ added in v0.1.4
func (p *CStyleProperty) Set(value interface{}) error
func (*CStyleProperty) SetFromString ¶ added in v0.1.4
func (p *CStyleProperty) SetFromString(value string) error
func (*CStyleProperty) State ¶ added in v0.1.4
func (p *CStyleProperty) State() StateType
func (*CStyleProperty) Type ¶ added in v0.1.4
func (p *CStyleProperty) Type() cdk.PropertyType
func (*CStyleProperty) Value ¶ added in v0.1.4
func (p *CStyleProperty) Value() (value interface{})
type CTreeExpanderStyle ¶
type CTreeExpanderStyle uint64
Tree expander style
const ( CTREE_EXPANDER_NONE CTreeExpanderStyle = iota CTREE_EXPANDER_SQUARE CTREE_EXPANDER_TRIANGLE CTREE_EXPANDER_CIRCULAR )
type CTreeExpansionType ¶
type CTreeExpansionType uint64
Tree expansion type
const ( CTREE_EXPANSION_EXPAND CTreeExpansionType = iota CTREE_EXPANSION_EXPAND_RECURSIVE CTREE_EXPANSION_COLLAPSE CTREE_EXPANSION_COLLAPSE_RECURSIVE CTREE_EXPANSION_TOGGLE CTREE_EXPANSION_TOGGLE_RECURSIVE )
type CTreeLineStyle ¶
type CTreeLineStyle uint64
Tree line style
const ( CTREE_LINES_NONE CTreeLineStyle = iota CTREE_LINES_SOLID CTREE_LINES_DOTTED CTREE_LINES_TABBED )
type CVButtonBox ¶
type CVButtonBox struct {
CButtonBox
}
func MakeVButtonBox ¶
func MakeVButtonBox() *CVButtonBox
func NewVButtonBox ¶
func NewVButtonBox(homogeneous bool, spacing int) *CVButtonBox
func (*CVButtonBox) Init ¶
func (b *CVButtonBox) Init() bool
type CVScrollbar ¶
type CVScrollbar struct {
CScrollbar
}
func MakeVScrollbar ¶
func MakeVScrollbar() *CVScrollbar
func NewVScrollbar ¶
func NewVScrollbar() *CVScrollbar
func (*CVScrollbar) Init ¶
func (v *CVScrollbar) Init() (already bool)
type CViewport ¶
type CViewport struct {
CBin
// contains filtered or unexported fields
}
The CViewport structure implements the Viewport interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Viewport objects.
func MakeViewport ¶
func MakeViewport() *CViewport
MakeViewport is used by the Buildable system to construct a new Viewport.
func NewViewport ¶
func NewViewport(hAdjustment, vAdjustment *CAdjustment) *CViewport
NewViewport is the constructor for new Viewport instances.
func (*CViewport) GetBinWindow ¶
GetBinWindow returns the bin window of the Viewport.
Note that usage of this within CTK is unimplemented at this time
func (*CViewport) GetHAdjustment ¶
func (v *CViewport) GetHAdjustment() (adjustment *CAdjustment)
GetHAdjustment returns the horizontal adjustment of the viewport. See: SetHAdjustment()
func (*CViewport) GetShadowType ¶
func (v *CViewport) GetShadowType() (shadowType ShadowType)
GetShadowType returns the shadow type of the Viewport. See: SetShadowType()
Note that usage of this within CTK is unimplemented at this time
func (*CViewport) GetVAdjustment ¶
func (v *CViewport) GetVAdjustment() (adjustment *CAdjustment)
GetVAdjustment returns the vertical adjustment of the viewport. See: SetVAdjustment()
func (*CViewport) GetViewWindow ¶
GetViewWindow returns the view window of the Viewport.
Note that usage of this within CTK is unimplemented at this time
func (*CViewport) Init ¶
Init initializes a Viewport object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Viewport instance. Init is used in the NewViewport constructor and only necessary when implementing a derivative Viewport type.
func (*CViewport) SetHAdjustment ¶
func (v *CViewport) SetHAdjustment(adjustment *CAdjustment)
SetHAdjustment replaces the horizontal adjustment of the viewport with the given adjustment.
func (*CViewport) SetShadowType ¶
func (v *CViewport) SetShadowType(shadowType ShadowType)
SetShadowType updates the shadow type of the viewport.
Note that usage of this within CTK is unimplemented at this time
func (*CViewport) SetVAdjustment ¶
func (v *CViewport) SetVAdjustment(adjustment *CAdjustment)
SetHAdjustment replaces the horizontal adjustment of the viewport with the given adjustment.
type CWidget ¶
type CWidget struct {
CObject
// contains filtered or unexported fields
}
The CWidget structure implements the Widget interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Widget objects.
func (*CWidget) Activate ¶
For widgets that can be "activated" (buttons, menu items, etc.) this function activates them. Activation is what happens when you press Enter on a widget during key navigation. If widget isn't activatable, the function returns FALSE. Returns:
TRUE if the widget was activatable
func (*CWidget) AddAccelerator ¶
func (w *CWidget) AddAccelerator(accelSignal string, accelGroup AccelGroup, accelKey int, accelMods ModifierType, accelFlags AccelFlags)
Installs an accelerator for this widget in accel_group that causes accel_signal to be emitted if the accelerator is activated. The accel_group needs to be added to the widget's toplevel via WindowAddAccelGroup, and the signal must be of type G_RUN_ACTION. Accelerators added through this function are not user changeable during runtime. If you want to support accelerators that can be changed by the user, use AccelMapAddEntry and SetAccelPath or MenuItemSetAccelPath instead. Parameters:
widget widget to install an accelerator on accelSignal widget signal to emit on accelerator activation accelGroup accel group for this widget, added to its toplevel accelKey GDK keyval of the accelerator accelMods modifier key combination of the accelerator accelFlags flag accelerators, e.g. GTK_ACCEL_VISIBLE
func (*CWidget) AddEvents ¶
Adds the events in the bitfield events to the event mask for widget . See SetEvents for details. Parameters:
events an event mask, see EventMask
func (*CWidget) AddMnemonicLabel ¶
Adds a widget to the list of mnemonic labels for this widget. (See ListMnemonicLabels). Note the list of mnemonic labels for the widget is cleared when the widget is destroyed, so the caller must make sure to update its internal state at this point as well, by using a connection to the destroy signal or a weak notifier.
func (*CWidget) CanActivateAccel ¶
Determines whether an accelerator that activates the signal identified by signal_id can currently be activated. This is done by emitting the can-activate-accel signal on widget ; if the signal isn't overridden by a handler or in a derived widget, then the default check is that the widget must be sensitive, and the widget and all its ancestors mapped. Parameters:
signalId the ID of a signal installed on widget
Returns:
TRUE if the accelerator can be activated.
func (*CWidget) CanDefault ¶
Returns TRUE if the Widget instance IsSensitive() and the CAN_DEFAULT flag is set, returns FALSE otherwise
func (*CWidget) CanFocus ¶
Returns TRUE if the Widget instance has the CAN_FOCUS flag, FALSE otherwise
func (*CWidget) ChildFocus ¶
func (w *CWidget) ChildFocus(direction DirectionType) (value bool)
This function is used by custom widget implementations; if you're writing an app, you'd use GrabFocus to move the focus to a particular widget, and ContainerSetFocusChain to change the focus tab order. So you may want to investigate those functions instead. ChildFocus is called by containers as the user moves around the window using keyboard shortcuts. direction indicates what kind of motion is taking place (up, down, left, right, tab forward, tab backward). ChildFocus emits the focus signal; widgets override the default handler for this signal in order to implement appropriate focus behavior. The default ::focus handler for a widget should return TRUE if moving in direction left the focus on a focusable location inside that widget, and FALSE if moving in direction moved the focus outside the widget. If returning TRUE, widgets normally call GrabFocus to place the focus accordingly; if returning FALSE, they don't modify the current focus location. This function replaces ContainerFocus from CTK 1.2. It was necessary to check that the child was visible, sensitive, and focusable before calling ContainerFocus. ChildFocus returns FALSE if the widget is not currently in a focusable state, so there's no need for those checks. Parameters:
direction direction of focus movement
Returns:
TRUE if focus ended up inside widget
func (*CWidget) ChildNotify ¶
Emits a child-notify signal for the on widget . This is the analogue of g_object_notify for child properties. Parameters:
childProperty the name of a child property installed on the
class of widget 's parent
func (*CWidget) ClassPath ¶
Same as Path, but always uses the name of a widget's type, never uses a custom name set with SetName. Parameters:
pathLength location to store the length of the class path, or NULL. path location to store the class path as an allocated string, or NULL. pathReversed location to store the reverse class path as an allocated
string, or NULL.
func (*CWidget) CssFullPath ¶ added in v0.1.4
CssFullPath returns a CSS selector rule for the Widget which includes the parent hierarchy in type form.
func (*CWidget) Destroy ¶
func (w *CWidget) Destroy()
Destroy a widget. Equivalent to DestroyObject. When a widget is destroyed, it will break any references it holds to other objects. If the widget is inside a container, the widget will be removed from the container. If the widget is a toplevel (derived from Window), it will be removed from the list of toplevels, and the reference CTK holds to it will be removed. Removing a widget from its container or the list of toplevels results in the widget being finalized, unless you've added additional references to the widget with g_object_ref. In most cases, only toplevel widgets (windows) require explicit destruction, because when you destroy a toplevel its children will be destroyed as well.
func (*CWidget) Draw ¶
Emits a draw signal, primarily used to render canvases and cause end-user facing display updates. Signal listeners can draw to the Canvas and return EVENT_STOP to cause those changes to be composited upon the larger display canvas
Emits: SignalDraw, Argv=[Object instance, canvas]
func (*CWidget) ErrorBell ¶
func (w *CWidget) ErrorBell()
Notifies the user about an input-related error on this widget. If the gtk-error-bell setting is TRUE, it calls WindowBeep, otherwise it does nothing. Note that the effect of WindowBeep can be configured in many ways, depending on the windowing backend and the desktop environment or window manager that is used.
func (*CWidget) FreezeChildNotify ¶
func (w *CWidget) FreezeChildNotify()
Stops emission of child-notify signals on widget . The signals are queued until ThawChildNotify is called on widget . This is the analogue of g_object_freeze_notify for child properties.
func (*CWidget) GetAncestor ¶
Gets the first ancestor of widget with type widget_type . For example, GetAncestor (widget, GTK_TYPE_BOX) gets the first Box that's an ancestor of widget . No reference will be added to the returned widget; it should not be unreferenced. See note about checking for a toplevel Window in the docs for GetToplevel. Note that unlike IsAncestor, GetAncestor considers widget to be an ancestor of itself. Parameters:
widgetType ancestor type
Returns:
the ancestor widget, or NULL if not found.
func (*CWidget) GetAppPaintable ¶
Determines whether the application intends to draw on the widget in an expose-event handler. See SetAppPaintable Returns:
TRUE if the widget is app paintable
func (*CWidget) GetCanDefault ¶
Determines whether widget can be a default widget. See SetCanDefault. Returns:
TRUE if widget can be a default widget, FALSE otherwise
func (*CWidget) GetCanFocus ¶
Determines whether widget can own the input focus. See SetCanFocus. Returns:
TRUE if widget can own the input focus, FALSE otherwise
func (*CWidget) GetChildVisible ¶
Gets the value set with SetChildVisible. If you feel a need to use this function, your code probably needs reorganization. This function is only useful for container implementations and never should be called by an application. Returns:
TRUE if the widget is mapped with the parent.
func (*CWidget) GetCompositeName ¶
Obtains the composite name of a widget.
func (*CWidget) GetDefaultDirection ¶
func (w *CWidget) GetDefaultDirection() (value TextDirection)
Obtains the current default reading direction. See SetDefaultDirection. Returns:
the current default direction.
func (*CWidget) GetDirection ¶
func (w *CWidget) GetDirection() (value TextDirection)
Gets the reading direction for a particular widget. See SetDirection. Returns:
the reading direction for the widget.
func (*CWidget) GetDisplay ¶
Get the Display for the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a Window at the top. In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized. Returns:
the Display for the toplevel for this widget.
func (*CWidget) GetEvents ¶
Returns the event mask for the widget (a bitfield containing flags from the EventMask enumeration). These are the events that the widget will receive. Returns:
event mask for widget
func (*CWidget) GetFlags ¶
func (w *CWidget) GetFlags() WidgetFlags
Returns the current flags for the Widget instance
func (*CWidget) GetHasTooltip ¶
Returns the current value of the has-tooltip property. See Widget:has-tooltip for more information. Returns:
current value of has-tooltip on widget .
func (*CWidget) GetHasWindow ¶
Determines whether widget has a Window of its own. See SetHasWindow. Returns:
TRUE if widget has a window, FALSE otherwise
func (*CWidget) GetMapped ¶
Whether the widget is mapped. Returns:
TRUE if the widget is mapped, FALSE otherwise.
func (*CWidget) GetNoShowAll ¶
Returns the current value of the Widget:no-show-all property, which determines whether calls to ShowAll and HideAll will affect this widget. Returns:
the current value of the "no-show-all" property.
func (*CWidget) GetParent ¶
Returns the parent container of widget . Returns:
the parent container of widget , or NULL.
func (*CWidget) GetParentWindow ¶
Gets widget's parent window. Returns:
the parent window of widget.
func (*CWidget) GetPointer ¶
Obtains the location of the mouse pointer in widget coordinates. Widget coordinates are a bit odd; for historical reasons, they are defined as widget->window coordinates for widgets that are not GTK_NO_WINDOW widgets, and are relative to widget->allocation.x , widget->allocation.y for widgets that are GTK_NO_WINDOW widgets. Parameters:
x return location for the X coordinate, or NULL. y return location for the Y coordinate, or NULL.
func (*CWidget) GetRealized ¶
Determines whether widget is realized. Returns:
TRUE if widget is realized, FALSE otherwise
func (*CWidget) GetReceivesDefault ¶
Determines whether widget is alyways treated as default widget withing its toplevel when it has the focus, even if another widget is the default. See SetReceivesDefault. Returns:
TRUE if widget acts as default widget when focussed, FALSE otherwise
func (*CWidget) GetRootWindow ¶
Get the root window where this widget is located. This function can only be called after the widget has been added to a widget hierarchy with Window at the top. The root window is useful for such purposes as creating a popup Window associated with the window. In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized. Returns:
the Window root window for the toplevel for this widget.
func (*CWidget) GetScreen ¶
Get the Screen from the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a Window at the top. In general, you should only create screen specific resources when a widget has been realized, and you should free those resources when the widget is unrealized. Returns:
the Screen for the toplevel for this widget.
func (*CWidget) GetSensitive ¶
Returns the widget's sensitivity (in the sense of returning the value that has been set using SetSensitive). The effective sensitivity of a widget is however determined by both its own and its parent widget's sensitivity. See IsSensitive. Returns:
TRUE if the widget is sensitive
func (*CWidget) GetSizeRequest ¶
Gets the size request that was explicitly set for the widget using SetSizeRequest. A value of -1 stored in width or height indicates that that dimension has not been set explicitly and the natural requisition of the widget will be used intead. See SetSizeRequest. To get the size a widget will actually use, call SizeRequest instead of this function. Parameters:
width return location for width, or NULL. height return location for height, or NULL.
func (*CWidget) GetState ¶
Returns the widget's state. See SetState. Returns:
the state of the widget.
func (*CWidget) GetThemeRequest ¶
GetThemeRequest returns the current theme, adjusted for Widget state and accounting for any PARENT_SENSITIVE conditions. This method is primarily useful in drawable Widget types during Invalidate() and Draw() stages of the Widget lifecycle. This method emits an initial get-theme-request signal with a pointer to the theme instance to be modified as there are no return values for signal listeners. If the signal listeners return EVENT_STOP, the theme instance is returned without modification. If the signal listeners return EVENT_PASS, this method will perform the changes to the theme instance mentioned above.
func (*CWidget) GetTooltipMarkup ¶
Gets the contents of the tooltip for widget . Returns:
the tooltip text, or NULL. You should free the returned string with g_free when done.
func (*CWidget) GetTooltipText ¶
Gets the contents of the tooltip for widget . Returns:
the tooltip text, or NULL. You should free the returned string with g_free when done.
func (*CWidget) GetTooltipWindow ¶
Returns the Window of the current tooltip. This can be the Window created by default, or the custom tooltip window set using SetTooltipWindow. Returns:
The Window of the current tooltip.
func (*CWidget) GetTopParent ¶
Returns the top-most parent in the Widget instance's parent hierarchy. Returns nil if the Widget has no parent container
func (*CWidget) GetToplevel ¶
This function returns the topmost widget in the container hierarchy widget is a part of. If widget has no parent widgets, it will be returned as the topmost widget. No reference will be added to the returned widget; it should not be unreferenced. Note the difference in behavior vs. GetAncestor; GetAncestor (widget, GTK_TYPE_WINDOW) would return NULL if widget wasn't inside a toplevel window, and if the window was inside a Window-derived widget which was in turn inside the toplevel Window. While the second case may seem unlikely, it actually happens when a Plug is embedded inside a Socket within the same application. To reliably find the toplevel Window, use GetToplevel and check if the TOPLEVEL flags is set on the result. Returns:
the topmost ancestor of widget , or widget itself if there's no ancestor.
func (*CWidget) GetVisible ¶
Determines whether the widget is visible. Note that this doesn't take into account whether the widget's parent is also visible or the widget is obscured in any way. See SetVisible. Returns:
TRUE if the widget is visible
func (*CWidget) GetWidgetAt ¶
A wrapper around the Object.GetObjectAt() method, only returning Widget instance types or nil otherwise
func (*CWidget) GetWindow ¶
Returns the widget's window if it is realized, NULL otherwise Returns:
widget 's window.
Returns the Window instance associated with this Widget instance, nil otherwise
func (*CWidget) GrabDefault ¶
func (w *CWidget) GrabDefault()
Causes widget to become the default widget. widget must have the GTK_CAN_DEFAULT flag set; typically you have to set this flag yourself by calling SetCanDefault (widget , TRUE). The default widget is activated when the user presses Enter in a window. Default widgets must be activatable, that is, Activate should affect them.
func (*CWidget) GrabEventFocus ¶
func (w *CWidget) GrabEventFocus()
GrabEventFocus will attempt to set the Widget as the Window event focus handler. This method emits a grab-event-focus signal and if the listeners all return EVENT_PASS, the changes are applied.
Note that this method needs to be implemented within each Drawable that can be focused because of the golang interface system losing the concrete struct when a Widget interface reference is passed as a generic interface{} argument.
func (*CWidget) GrabFocus ¶
func (w *CWidget) GrabFocus()
Causes widget to have the keyboard focus for the Window it's inside. widget must be a focusable widget, such as a Entry; something like Frame won't work. More precisely, it must have the GTK_CAN_FOCUS flag set. Use SetCanFocus to modify that flag. The widget also needs to be realized and mapped. This is indicated by the related signals. Grabbing the focus immediately after creating the widget will likely fail and cause critical warnings. If the Widget instance CanFocus() then take the focus of the associated Window. Any previously focused Widget will emit a lost-focus signal and the newly focused Widget will emit a gained-focus signal. This method emits a grab-focus signal initially and if the listeners return EVENT_PASS, the changes are applied
Emits: SignalGrabFocus, Argv=[Widget instance] Emits: SignalLostFocus, Argv=[Previous focus Widget instance], From=Previous focus Widget instance Emits: SignalGainedFocus, Argv=[Widget instance, previous focus Widget instance]
func (*CWidget) HasDefault ¶
Determines whether widget is the current default widget within its toplevel. See SetCanDefault. Returns:
TRUE if widget is the current default widget within its toplevel, FALSE otherwise
func (*CWidget) HasEventFocus ¶
func (*CWidget) HasFlags ¶
func (w *CWidget) HasFlags(f WidgetFlags) bool
Returns TRUE if the Widget instance has the given flag, FALSE otherwise
func (*CWidget) HasFocus ¶
Determines if the widget has the global input focus. See IsFocus for the difference between having the global input focus, and only having the focus within a toplevel. Returns:
TRUE if the widget has the global input focus.
func (*CWidget) HasGrab ¶
Determines whether the widget is currently grabbing events, so it is the only widget receiving input events (keyboard and mouse). See also GrabAdd. Returns:
TRUE if the widget is in the grab_widgets stack
func (*CWidget) HasScreen ¶
Checks whether there is a Screen is associated with this widget. All toplevel widgets have an associated screen, and all widgets added into a hierarchy with a toplevel window at the top. Returns:
TRUE if there is a Screen associcated with the widget.
func (*CWidget) Hide ¶
func (w *CWidget) Hide()
Hide reverses the effects of Show, causing the widget to be hidden (invisible to the user).
func (*CWidget) HideOnDelete ¶
Utility function; intended to be connected to the delete-event signal on a Window. The function calls Hide on its argument, then returns TRUE. If connected to ::delete-event, the result is that clicking the close button for a window (on the window frame, top right corner usually) will hide but not destroy the window. By default, CTK destroys windows when ::delete-event is received. Returns:
TRUE
func (*CWidget) Init ¶
Init initializes a Widget object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Widget instance. Init is used in the NewWidget constructor and only necessary when implementing a derivative Widget type.
func (*CWidget) IsAncestor ¶
Determines whether widget is somewhere inside ancestor , possibly with intermediate containers. Returns:
TRUE if ancestor contains widget as a child, grandchild, great grandchild, etc.
func (*CWidget) IsDefault ¶
Returns TRUE if the Widget instance CanDefault() and the HAS_DEFAULT flag is set, returns FALSE otherwise
func (*CWidget) IsDrawable ¶
Determines whether widget can be drawn to. A widget can be drawn to if it is mapped and visible. Returns:
TRUE if widget is drawable, FALSE otherwise
Returns TRUE if the APP_PAINTABLE flag is set, FALSE otherwise
func (*CWidget) IsFocus ¶
Determines if the widget is the focus widget within its toplevel. (This does not mean that the HAS_FOCUS flag is necessarily set; HAS_FOCUS will only be set if the toplevel widget additionally has the global input focus.) Returns:
TRUE if the widget is the focus widget.
Returns TRUE if the Widget instance is currently the focus of it's parent Window, FALSE otherwise
func (*CWidget) IsFocused ¶
Returns TRUE if the Widget instance or it's parent are the current focus of the associated Window
func (*CWidget) IsParentFocused ¶
If the Widget instance is PARENT_SENSITIVE and one of it's parents are the focus for the associated Window, return TRUE and FALSE otherwise
func (*CWidget) IsSensitive ¶
Returns the widget's effective sensitivity, which means it is sensitive itself and also its parent widget is sensitive Returns:
TRUE if the widget is effectively sensitive
func (*CWidget) IsToplevel ¶
Determines whether widget is a toplevel widget. Currently only Window and Invisible are toplevel widgets. Toplevel widgets have no parent widget. Returns:
TRUE if widget is a toplevel, FALSE otherwise
func (*CWidget) KeynavFailed ¶
func (w *CWidget) KeynavFailed(direction DirectionType) (value bool)
This function should be called whenever keyboard navigation within a single widget hits a boundary. The function emits the keynav-failed signal on the widget and its return value should be interpreted in a way similar to the return value of ChildFocus: When TRUE is returned, stay in the widget, the failed keyboard navigation is Ok and/or there is nowhere we can/should move the focus to. When FALSE is returned, the caller should continue with keyboard navigation outside the widget, e.g. by calling ChildFocus on the widget's toplevel. The default ::keynav-failed handler returns TRUE for GTK_DIR_TAB_FORWARD and GTK_DIR_TAB_BACKWARD. For the other values of DirectionType, it looks at the gtk-keynav-cursor-only setting and returns FALSE if the setting is TRUE. This way the entire user interface becomes cursor-navigatable on input devices such as mobile phones which only have cursor keys but no tab key. Whenever the default handler returns TRUE, it also calls ErrorBell to notify the user of the failed keyboard navigation. A use case for providing an own implementation of ::keynav-failed (either by connecting to it or by overriding it) would be a row of Entry widgets where the user should be able to navigate the entire row with the cursor keys, as e.g. known from user interfaces that require entering license keys. Parameters:
direction direction of focus movement
Returns:
TRUE if stopping keyboard navigation is fine, FALSE if the emitting widget should try to handle the keyboard navigation attempt in its parent container(s).
func (*CWidget) MnemonicActivate ¶ added in v0.1.4
Emits the mnemonic-activate signal. The default handler for this signal activates the widget if group_cycling is FALSE, and just grabs the focus if group_cycling is TRUE. Parameters:
groupCycling TRUE if there are other widgets with the same mnemonic
Returns:
TRUE if the signal has been handled
func (*CWidget) Path ¶
Obtains the full path to widget . The path is simply the name of a widget and all its parents in the container hierarchy, separated by periods. The name of a widget comes from GetName. Paths are used to apply styles to a widget in gtkrc configuration files. Widget names are the type of the widget by default (e.g. "Button") or can be set to an application-specific value with SetName. By setting the name of a widget, you allow users or theme authors to apply styles to that specific widget in their gtkrc file. path_reversed_p fills in the path in reverse order, i.e. starting with widget 's name instead of starting with the name of widget 's outermost ancestor. Parameters:
pathLength location to store length of the path, or NULL. path location to store allocated path string, or NULL. pathReversed location to store allocated reverse path string, or NULL.
func (*CWidget) ReleaseEventFocus ¶
func (w *CWidget) ReleaseEventFocus()
func (*CWidget) RemoveAccelerator ¶
func (w *CWidget) RemoveAccelerator(accelGroup AccelGroup, accelKey int, accelMods ModifierType) (value bool)
Removes an accelerator from widget , previously installed with AddAccelerator. Parameters:
widget widget to install an accelerator on accelGroup accel group for this widget accelKey GDK keyval of the accelerator accelMods modifier key combination of the accelerator returns whether an accelerator was installed and could be removed
func (*CWidget) RemoveMnemonicLabel ¶
Removes a widget from the list of mnemonic labels for this widget. (See ListMnemonicLabels). The widget must have previously been added to the list with AddMnemonicLabel.
func (*CWidget) Reparent ¶
Move the Widget to the given container, removing itself first from any other container that was currently holding it. This method emits a reparent signal initially and if the listeners return EVENT_PAS, the change is applied Parameters:
newParent a Container to move the widget into
Emits: SignalReparent, Argv=[Widget instance, new parent]
func (*CWidget) SendExpose ¶
Very rarely-used function. This function is used to emit an expose event signals on a widget. This function is not normally used directly. The only time it is used is when propagating an expose event to a child NO_WINDOW widget, and that is normally done using ContainerPropagateExpose. If you want to force an area of a window to be redrawn, use WindowInvalidateRect or WindowInvalidateRegion. To cause the redraw to be done immediately, follow that call with a call to WindowProcessUpdates. Parameters:
event a expose Event
Returns:
return from the event signal emission (TRUE if the event was handled)
func (*CWidget) SendFocusChange ¶
Sends the focus change event to widget This function is not meant to be used by applications. The only time it should be used is when it is necessary for a Widget to assign focus to a widget that is semantically owned by the first widget even though it's not a direct child - for instance, a search entry in a floating window similar to the quick search in TreeView. An example of its usage is: Parameters:
event a Event of type GDK_FOCUS_CHANGE
Returns:
the return value from the event signal emission: TRUE if the event was handled, and FALSE otherwise
func (*CWidget) SetAccelPath ¶
func (w *CWidget) SetAccelPath(accelPath string, accelGroup AccelGroup)
Given an accelerator group, accel_group , and an accelerator path, accel_path , sets up an accelerator in accel_group so whenever the key binding that is defined for accel_path is pressed, widget will be activated. This removes any accelerators (for any accelerator group) installed by previous calls to SetAccelPath. Associating accelerators with paths allows them to be modified by the user and the modifications to be saved for future use. (See AccelMapSave.) This function is a low level function that would most likely be used by a menu creation system like UIManager. If you use UIManager, setting up accelerator paths will be done automatically. Even when you you aren't using UIManager, if you only want to set up accelerators on menu items MenuItemSetAccelPath provides a somewhat more convenient interface. Note that accel_path string will be stored in a GQuark. Therefore, if you pass a static string, you can save some memory by interning it first with g_intern_static_string. Parameters:
accelPath path used to look up the accelerator. accelGroup a AccelGroup.
func (*CWidget) SetAppPaintable ¶
Sets whether the application intends to draw on the widget in an expose-event handler. This is a hint to the widget and does not affect the behavior of the CTK core; many widgets ignore this flag entirely. For widgets that do pay attention to the flag, such as EventBox and Window, the effect is to suppress default themed drawing of the widget's background. (Children of the widget will still be drawn.) The application is then entirely responsible for drawing the widget background. Note that the background is still drawn when the widget is mapped. If this is not suitable (e.g. because you want to make a transparent window using an RGBA visual), you can work around this by doing: Parameters:
appPaintable TRUE if the application will paint on the widget
func (*CWidget) SetCanDefault ¶
Specifies whether widget can be a default widget. See GrabDefault for details about the meaning of "default". Parameters:
canDefault whether or not widget
can be a default widget.
func (*CWidget) SetCanFocus ¶
Specifies whether widget can own the input focus. See GrabFocus for actually setting the input focus on a widget. Parameters:
canFocus whether or not widget
can own the input focus.
func (*CWidget) SetCompositeName ¶
Sets a widgets composite name. The widget must be a composite child of its parent; see PushCompositeChild. Parameters:
name the name to set
func (*CWidget) SetDefaultDirection ¶
func (w *CWidget) SetDefaultDirection(dir TextDirection)
Sets the default reading direction for widgets where the direction has not been explicitly set by SetDirection. Parameters:
dir the new default direction. This cannot be
GTK_TEXT_DIR_NONE.
func (*CWidget) SetDirection ¶
func (w *CWidget) SetDirection(dir TextDirection)
Sets the reading direction on a particular widget. This direction controls the primary direction for widgets containing text, and also the direction in which the children of a container are packed. The ability to set the direction is present in order so that correct localization into languages with right-to-left reading directions can be done. Generally, applications will let the default reading direction present, except for containers where the containers are arranged in an order that is explicitely visual rather than logical (such as buttons for text justification). If the direction is set to GTK_TEXT_DIR_NONE, then the value set by SetDefaultDirection will be used. Parameters:
dir the new direction
func (*CWidget) SetDoubleBuffered ¶
Widgets are double buffered by default; you can use this function to turn off the buffering. "Double buffered" simply means that WindowBeginPaintRegion and WindowEndPaint are called automatically around expose events sent to the widget. WindowBeginPaint diverts all drawing to a widget's window to an offscreen buffer, and WindowEndPaint draws the buffer to the screen. The result is that users see the window update in one smooth step, and don't see individual graphics primitives being rendered. In very simple terms, double buffered widgets don't flicker, so you would only use this function to turn off double buffering if you had special needs and really knew what you were doing. Note: if you turn off double-buffering, you have to handle expose events, since even the clearing to the background color or pixmap will not happen automatically (as it is done in WindowBeginPaint). Parameters:
doubleBuffered TRUE to double-buffer a widget
func (*CWidget) SetEvents ¶
Sets the event mask (see EventMask) for a widget. The event mask determines which events a widget will receive. Keep in mind that different widgets have different default event masks, and by changing the event mask you may disrupt a widget's functionality, so be careful. This function must be called while a widget is unrealized. Consider AddEvents for widgets that are already realized, or if you want to preserve the existing event mask. This function can't be used with GTK_NO_WINDOW widgets; to get events on those widgets, place them inside a EventBox and receive events on the event box. Parameters:
events event mask
func (*CWidget) SetFlags ¶
func (w *CWidget) SetFlags(v WidgetFlags)
Sets the given flags on the Widget instance. This method emits a set-flags signal initially and if the listeners return EVENT_PASS, the change is applied
Emits: SignalSetFlags, Argv=[Widget instance, given flags to set]
func (*CWidget) SetHasTooltip ¶
Sets the has-tooltip property on widget to has_tooltip . See Widget:has-tooltip for more information. Parameters:
hasTooltip whether or not widget
has a tooltip.
func (*CWidget) SetMapped ¶
Marks the widget as being realized. This function should only ever be called in a derived widget's "map" or "unmap" implementation. Parameters:
mapped TRUE to mark the widget as mapped
func (*CWidget) SetNoShowAll ¶
Sets the no-show-all property, which determines whether calls to ShowAll and HideAll will affect this widget. This is mostly for use in constructing widget hierarchies with externally controlled visibility, see UIManager. Parameters:
noShowAll the new value for the "no-show-all" property
func (*CWidget) SetParent ¶
This function is useful only when implementing subclasses of Container. Sets the container as the parent of widget , and takes care of some details such as updating the state and style of the child to reflect its new location. The opposite function is Unparent. Parameters:
parent parent container
func (*CWidget) SetParentWindow ¶
Sets a non default parent window for widget . Parameters:
parentWindow the new parent window.
func (*CWidget) SetRealized ¶
Marks the widget as being realized. This function should only ever be called in a derived widget's "realize" or "unrealize" implementation. Parameters:
realized TRUE to mark the widget as realized
func (*CWidget) SetReceivesDefault ¶
Specifies whether widget will be treated as the default widget within its toplevel when it has the focus, even if another widget is the default. See GrabDefault for details about the meaning of "default". Parameters:
receivesDefault whether or not widget
can be a default widget.
func (*CWidget) SetRedrawOnAllocate ¶
Sets whether the entire widget is queued for drawing when its size allocation changes. By default, this setting is TRUE and the entire widget is redrawn on every size change. If your widget leaves the upper left unchanged when made bigger, turning this setting off will improve performance. Note that for NO_WINDOW widgets setting this flag to FALSE turns off all allocation on resizing: the widget will not even redraw if its position changes; this is to allow containers that don't draw anything to avoid excess invalidations. If you set this flag on a NO_WINDOW widget that does draw on widget->window , you are responsible for invalidating both the old and new allocation of the widget when the widget is moved and responsible for invalidating regions newly when the widget increases size. Parameters:
redrawOnAllocate if TRUE, the entire widget will be redrawn
when it is allocated to a new size. Otherwise, only the new portion of the widget will be redrawn.
func (*CWidget) SetScrollAdjustments ¶
func (w *CWidget) SetScrollAdjustments(hadjustment Adjustment, vadjustment Adjustment) (value bool)
For widgets that support scrolling, sets the scroll adjustments and returns TRUE. For widgets that don't support scrolling, does nothing and returns FALSE. Widgets that don't support scrolling can be scrolled by placing them in a Viewport, which does support scrolling. Parameters:
hadjustment an adjustment for horizontal scrolling, or NULL. vadjustment an adjustment for vertical scrolling, or NULL.
Returns:
TRUE if the widget supports scrolling
func (*CWidget) SetSensitive ¶
Sets the sensitivity of a widget. A widget is sensitive if the user can interact with it. Insensitive widgets are "grayed out" and the user can't interact with them. Insensitive widgets are known as "inactive", "disabled", or "ghosted" in some other toolkits. Parameters:
sensitive TRUE to make the widget sensitive
Emits: SignalSetSensitive, Argv=[Widget instance, given sensitive bool]
func (*CWidget) SetSizeRequest ¶
Sets the minimum size of a widget; that is, the widget's size request will be width by height . You can use this function to force a widget to be either larger or smaller than it normally would be. In most cases, WindowSetDefaultSize is a better choice for toplevel windows than this function; setting the default size will still allow users to shrink the window. Setting the size request will force them to leave the window at least as large as the size request. When dealing with window sizes, WindowSetGeometryHints can be a useful function as well. Note the inherent danger of setting any fixed size - themes, translations into other languages, different fonts, and user action can all change the appropriate size for a given widget. So, it's basically impossible to hardcode a size that will always be correct. The size request of a widget is the smallest size a widget can accept while still functioning well and drawing itself correctly. However in some strange cases a widget may be allocated less than its requested size, and in many cases a widget may be allocated more space than it requested. If the size request in a given direction is -1 (unset), then the "natural" size request of the widget will be used instead. Widgets can't actually be allocated a size less than 1 by 1, but you can pass 0,0 to this function to mean "as small as possible." Parameters:
width width widget should request, or -1 to unset height height widget should request, or -1 to unset
Emits: SignalSetSizeRequest, Argv=[Widget instance, given size]
func (*CWidget) SetState ¶
This function is for use in widget implementations. Sets the state of a widget (insensitive, prelighted, etc.) Usually you should set the state using wrapper functions such as SetSensitive. Parameters:
state new state for widget
Adds the given state bitmask to the Widget instance. This method emits a set-state signal initially and if the listeners return EVENT_PASS, the change is applied
Emit: SignalSetState, Argv=[Widget instance, given state to set]
func (*CWidget) SetTheme ¶
Set the Theme for the Widget instance. This will also refresh the requested theme. A request theme is a transient theme, based on the actually set theme and adjusted for focus. If the given theme is equivalent to the current theme then no action is taken. After verifying that the given theme is different, this method emits a set-theme signal and if the listeners return EVENT_PASS, the changes are applied and the Widget.Invalidate() method is called
func (*CWidget) SetTooltipMarkup ¶
Sets markup as the contents of the tooltip, which is marked up with the Tango text markup language. This function will take care of setting Widget:has-tooltip to TRUE and of the default handler for the Widget::query-tooltip signal. See also the Widget:tooltip-markup property and TooltipSetMarkup. Parameters:
markup the contents of the tooltip for widget
, or NULL.
func (*CWidget) SetTooltipText ¶
Sets text as the contents of the tooltip. This function will take care of setting Widget:has-tooltip to TRUE and of the default handler for the Widget::query-tooltip signal. See also the Widget:tooltip-text property and TooltipSetText. Parameters:
text the contents of the tooltip for widget
func (*CWidget) SetTooltipWindow ¶
Replaces the default, usually yellow, window used for displaying tooltips with custom_window . CTK will take care of showing and hiding custom_window at the right moment, to behave likewise as the default tooltip window. If custom_window is NULL, the default tooltip window will be used. If the custom window should have the default theming it needs to have the name "gtk-tooltip", see SetName. Parameters:
customWindow a Window, or NULL.
func (*CWidget) SetVisible ¶
Sets the visibility state of widget . Note that setting this to TRUE doesn't mean the widget is actually viewable, see GetVisible. This function simply calls Show or Hide but is nicer to use when the visibility of the widget depends on some condition. Parameters:
visible whether the widget should be shown or not
func (*CWidget) SetWindow ¶
Sets a widget's window. This function should only be used in a widget's Widget::realize implementation. The window passed is usually either new window created with WindowNew, or the window of its parent widget as returned by GetParentWindow. Widgets must indicate whether they will create their own Window by calling SetHasWindow. This is usually done in the widget's init function. Parameters:
window a Window
Emits: SignalSetWindow, Argv=[Widget instance, given window]
func (*CWidget) Show ¶
func (w *CWidget) Show()
Show flags a widget to be displayed. Any widget that isn't shown will not appear on the screen. If you want to show all the widgets in a container, it's easier to call ShowAll on the container, instead of individually showing the widgets. Remember that you have to show the containers containing a widget, in addition to the widget itself, before it will appear onscreen. When a toplevel container is shown, it is immediately realized and mapped; other shown widgets are realized and mapped when their toplevel container is realized and mapped.
func (*CWidget) ShowAll ¶
func (w *CWidget) ShowAll()
ShowAll recursively shows a widget, and any child widgets (if the widget is a container).
func (*CWidget) SizeRequest ¶
Returns the currently requested size
func (*CWidget) TranslateCoordinates ¶
func (w *CWidget) TranslateCoordinates(destWidget Widget, srcX int, srcY int, destX int, destY int) (value bool)
Translate coordinates relative to src_widget 's allocation to coordinates relative to dest_widget 's allocations. In order to perform this operation, both widgets must be realized, and must share a common toplevel. Parameters:
srcX X position relative to src_widget srcY Y position relative to src_widget destX location to store X position relative to dest_widget
.
destY location to store Y position relative to dest_widget
. Returns:
FALSE if either widget was not realized, or there was no common ancestor. In this case, nothing is stored in *dest_x and *dest_y . Otherwise TRUE.
func (*CWidget) TriggerTooltipQuery ¶
func (w *CWidget) TriggerTooltipQuery()
Triggers a tooltip query on the display where the toplevel of widget is located. See TooltipTriggerTooltipQuery for more information.
func (*CWidget) Unparent ¶
func (w *CWidget) Unparent()
Unparent is only for use in widget implementations. Should be called by implementations of the remove method on Container, to dissociate a child from the container.
func (*CWidget) UnsetFlags ¶
func (w *CWidget) UnsetFlags(v WidgetFlags)
Removes the given flags from the Widget instance. This method emits an unset-flags signal initially and if the listeners return EVENT_PASS, the change is applied
Emits: SignalUnsetFlags, Argv=[Widget instance, given flags to unset]
func (*CWidget) UnsetState ¶
Removes the given state bitmask from the Widget instance. This method emits an unset-state signal initially and if the listeners return EVENT_PASS, the change is applied
Emit: SignalUnsetState, Argv=[Widget instance, given state to unset]
type CWindow ¶
type CWindow struct {
CBin
// contains filtered or unexported fields
}
The CWindow structure implements the Window interface and is exported to facilitate type embedding with custom implementations. No member variables are exported as the interface methods are the only intended means of interacting with Window objects.
func MakeWindow ¶
func MakeWindow() *CWindow
MakeWindow is used by the Buildable system to construct a new Window.
func NewWindowWithTitle ¶
NewWindowWithTitle is a constructor for new Window instances that also sets the Window title to the string given.
func (*CWindow) ActivateDefault ¶
Activates the default widget for the window, unless the current focused widget has been configured to receive the default action (see WidgetSetReceivesDefault), in which case the focused widget is activated. Returns:
TRUE if a widget got activated.
func (*CWindow) ActivateFocus ¶
Activates the current focused widget within the window. Returns:
TRUE if a widget got activated.
func (*CWindow) ActivateKey ¶
Activates mnemonics and accelerators for this Window. This is normally called by the default ::key_press_event handler for toplevel windows, however in some cases it may be useful to call this directly when overriding the standard key handling for a toplevel window. Parameters:
event a EventKey
Returns:
TRUE if a mnemonic or accelerator was found and activated.
func (*CWindow) AddAccelGroup ¶
func (w *CWindow) AddAccelGroup(accelGroup AccelGroup)
Associate accel_group with window , such that calling AccelGroupsActivate on window will activate accelerators in accel_group . Parameters:
window window to attach accelerator group to accelGroup a AccelGroup
func (*CWindow) AddMnemonic ¶
Adds a mnemonic to this window. Parameters:
keyval the mnemonic target the widget that gets activated by the mnemonic
func (*CWindow) AddStylesFromString ¶ added in v0.1.4
func (*CWindow) ApplyStylesTo ¶ added in v0.1.4
func (*CWindow) Build ¶
func (w *CWindow) Build(builder Builder, element *CBuilderElement) error
Build provides customizations to the Buildable system for Window Widgets.
func (*CWindow) Deiconify ¶
func (w *CWindow) Deiconify()
Asks to deiconify (i.e. unminimize) the specified window . Note that you shouldn't assume the window is definitely deiconified afterward, because other entities (e.g. the user or window manager) could iconify it again before your code which assumes deiconification gets to run. You can track iconification via the "window-state-event" signal on Widget.
func (*CWindow) FocusPrevious ¶
func (*CWindow) Fullscreen ¶
func (w *CWindow) Fullscreen()
Asks to place window in the fullscreen state. Note that you shouldn't assume the window is definitely full screen afterward, because other entities (e.g. the user or window manager) could unfullscreen it again, and not all window managers honor requests to fullscreen windows. But normally the window will end up fullscreen. Just don't write code that crashes if not. You can track the fullscreen state via the "window-state-event" signal on Widget.
func (*CWindow) GetAcceptFocus ¶
Gets the value set by SetAcceptFocus. Returns:
TRUE if window should receive the input focus
func (*CWindow) GetDecorated ¶
Returns whether the window has been set to have decorations such as a title bar via SetDecorated. Returns:
TRUE if the window has been set to have decorations
func (*CWindow) GetDefaultSize ¶
Gets the default size of the window. A value of -1 for the width or height indicates that a default size has not been explicitly set for that dimension, so the "natural" size of the window will be used. Parameters:
width location to store the default width, or NULL. height location to store the default height, or NULL.
func (*CWindow) GetDefaultWidget ¶
Returns the default widget for window . See SetDefault for more details. Returns:
the default widget, or NULL if there is none. [transfer none]
func (*CWindow) GetDeletable ¶
Returns whether the window has been set to have a close button via SetDeletable. Returns:
TRUE if the window has been set to have a close button
func (*CWindow) GetDestroyWithParent ¶
Returns whether the window will be destroyed with its transient parent. See SetDestroyWithParent. Returns:
TRUE if the window will be destroyed with its transient parent.
func (*CWindow) GetDisplay ¶
func (*CWindow) GetEventFocus ¶
func (w *CWindow) GetEventFocus() (o interface{})
func (*CWindow) GetFocus ¶
func (w *CWindow) GetFocus() (focus interface{})
Retrieves the current focused widget within the window. Note that this is the widget that would have the focus if the toplevel window focused; if the toplevel window is not focused then WidgetHasFocus (widget) will not be TRUE for the widget. Returns:
the currently focused widget, or NULL if there is none. [transfer none]
func (*CWindow) GetFocusOnMap ¶
Gets the value set by SetFocusOnMap. Returns:
TRUE if window should receive the input focus when mapped.
func (*CWindow) GetMnemonicModifier ¶
Returns the mnemonic modifier for this window. See SetMnemonicModifier. Returns:
the modifier mask used to activate mnemonics on this window.
func (*CWindow) GetMnemonicsVisible ¶
func (*CWindow) GetModal ¶
Returns whether the window is modal. See SetModal. Returns:
TRUE if the window is set to be modal and establishes a grab when shown
func (*CWindow) GetNextFocus ¶
func (w *CWindow) GetNextFocus() (next interface{})
func (*CWindow) GetOpacity ¶
Fetches the requested opacity for this window. See SetOpacity. Returns:
the requested opacity for this window.
func (*CWindow) GetPosition ¶
This function returns the position you need to pass to Move to keep window in its current position. This means that the meaning of the returned value varies with window gravity. See Move for more details. If you haven't changed the window gravity, its gravity will be GDK_GRAVITY_NORTH_WEST. This means that GetPosition gets the position of the top-left corner of the window manager frame for the window. Move sets the position of this same top-left corner. GetPosition is not 100% reliable because the X Window System does not specify a way to obtain the geometry of the decorations placed on a window by the window manager. Thus CTK is using a "best guess" that works with most window managers. Moreover, nearly all window managers are historically broken with respect to their handling of window gravity. So moving a window to its current position as returned by GetPosition tends to result in moving the window slightly. Window managers are slowly getting better over time. If a window has gravity GDK_GRAVITY_STATIC the window manager frame is not relevant, and thus GetPosition will always produce accurate results. However you can't use static gravity to do things like place a window in a corner of the screen, because static gravity ignores the window manager decorations. If you are saving and restoring your application's window positions, you should know that it's impossible for applications to do this without getting it somewhat wrong because applications do not have sufficient knowledge of window manager state. The Correct Mechanism is to support the session management protocol (see the "GnomeClient" object in the GNOME libraries for example) and allow the window manager to save your window sizes and positions. Parameters:
rootX return location for X coordinate of gravity-determined reference point. rootY return location for Y coordinate of gravity-determined reference point.
func (*CWindow) GetPreviousFocus ¶
func (w *CWindow) GetPreviousFocus() (previous interface{})
func (*CWindow) GetResizable ¶
GetResizable returns the value set by SetResizable.
func (*CWindow) GetRole ¶
Returns the role of the window. See SetRole for further explanation. Returns:
the role of the window if set, or NULL. The returned is owned by the widget and must not be modified or freed.
func (*CWindow) GetSize ¶
Obtains the current size of window . If window is not onscreen, it returns the size CTK will suggest to the window manager for the initial window size (but this is not reliably the same as the size the window manager will actually select). The size obtained by GetSize is the last size received in a EventConfigure, that is, CTK uses its locally-stored size, rather than querying the X server for the size. As a result, if you call Resize then immediately call GetSize, the size won't have taken effect yet. After the window manager processes the resize request, CTK receives notification that the size has changed via a configure event, and the size of the window gets updated. Note 1: Nearly any use of this function creates a race condition, because the size of the window may change between the time that you get the size and the time that you perform some action assuming that size is the current size. To avoid race conditions, connect to "configure-event" on the window and adjust your size-dependent state to match the size delivered in the EventConfigure. Note 2: The returned size does not include the size of the window manager decorations (aka the window frame or border). Those are not drawn by CTK and CTK has no reliable method of determining their size. Note 3: If you are getting a window size in order to position the window onscreen, there may be a better way. The preferred way is to simply set the window's semantic type with SetTypeHint, which allows the window manager to e.g. center dialogs. Also, if you set the transient parent of dialogs with SetTransientFor window managers will often center the dialog over its parent window. It's much preferred to let the window manager handle these things rather than doing it yourself, because all apps will behave consistently and according to user prefs if the window manager handles it. Also, the window manager can take the size of the window decorations/border into account, while your application cannot. In any case, if you insist on application-specified window positioning, there's still a better way than doing it yourself - SetPosition will frequently handle the details for you. Parameters:
width return location for width, or NULL. height return location for height, or NULL.
func (*CWindow) GetSkipPagerHint ¶
Gets the value set by SetSkipPagerHint. Returns:
TRUE if window shouldn't be in pager
func (*CWindow) GetSkipTaskbarHint ¶
Gets the value set by SetSkipTaskbarHint Returns:
TRUE if window shouldn't be in taskbar
func (*CWindow) GetTitle ¶
Retrieves the title of the window. See SetTitle. Returns:
the title of the window, or NULL if none has been set explicitely. The returned string is owned by the widget and must not be modified or freed.
func (*CWindow) GetTransientFor ¶
Fetches the transient parent for this window. See SetTransientFor. Returns:
the transient parent for this window, or NULL if no transient parent has been set. [transfer none]
func (*CWindow) GetUrgencyHint ¶
Gets the value set by SetUrgencyHint Returns:
TRUE if window is urgent
func (*CWindow) HasGroup ¶
Returns whether window has an explicit window group. Returns:
TRUE if window has an explicit window group. Since 2.22
func (*CWindow) HasToplevelFocus ¶
Returns whether the input focus is within this Window. For real toplevel windows, this is identical to IsActive, but for embedded windows, like Plug, the results will differ. Returns:
TRUE if the input focus is within this Window
func (*CWindow) Iconify ¶
func (w *CWindow) Iconify()
Asks to iconify (i.e. minimize) the specified window . Note that you shouldn't assume the window is definitely iconified afterward, because other entities (e.g. the user or window manager) could deiconify it again, or there may not be a window manager in which case iconification isn't possible, etc. But normally the window will end up iconified. Just don't write code that crashes if not. It's permitted to call this function before showing a window, in which case the window will be iconified before it ever appears onscreen. You can track iconification via the "window-state-event" signal on Widget.
func (*CWindow) Init ¶
Init initializes a Window object. This must be called at least once to set up the necessary defaults and allocate any memory structures. Calling this more than once is safe though unnecessary. Only the first call will result in any effect upon the Window instance. Init is used in the NewWindow constructor and only necessary when implementing a derivative Window type.
func (*CWindow) IsActive ¶
Returns whether the window is part of the current active toplevel. (That is, the toplevel window receiving keystrokes.) The return value is TRUE if the window is active toplevel itself, but also if it is, say, a Plug embedded in the active toplevel. You might use this function if you wanted to draw a widget differently in an active window from a widget in an inactive window. See HasToplevelFocus Returns:
TRUE if the window part of the current active window.
func (*CWindow) ListTopLevels ¶
Returns a list of all existing toplevel windows. The widgets in the list are not individually referenced. If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets, you must call g_list_foreach (result, (GFunc)g_object_ref, NULL) first, and then unref all the widgets afterwards. Returns:
list of toplevel widgets. [element-type Widget][transfer container]
func (*CWindow) Maximize ¶
func (w *CWindow) Maximize()
Asks to maximize window , so that it becomes full-screen. Note that you shouldn't assume the window is definitely maximized afterward, because other entities (e.g. the user or window manager) could unmaximize it again, and not all window managers support maximization. But normally the window will end up maximized. Just don't write code that crashes if not. It's permitted to call this function before showing a window, in which case the window will be maximized when it appears onscreen initially. You can track maximization via the "window-state-event" signal on Widget.
func (*CWindow) MnemonicActivate ¶
Activates the targets associated with the mnemonic. Parameters:
keyval the mnemonic modifier the modifiers returns TRUE if the activation is done.
func (*CWindow) Move ¶
Asks the window manager to move window to the given position. Window managers are free to ignore this; most window managers ignore requests for initial window positions (instead using a user-defined placement algorithm) and honor requests after the window has already been shown. Note: the position is the position of the gravity-determined reference point for the window. The gravity determines two things: first, the location of the reference point in root window coordinates; and second, which point on the window is positioned at the reference point. By default the gravity is GDK_GRAVITY_NORTH_WEST, so the reference point is simply the x , y supplied to Move. The top-left corner of the window decorations (aka window frame or border) will be placed at x , y . Therefore, to position a window at the top left of the screen, you want to use the default gravity (which is GDK_GRAVITY_NORTH_WEST) and move the window to 0,0. To position a window at the bottom right corner of the screen, you would set GDK_GRAVITY_SOUTH_EAST, which means that the reference point is at x + the window width and y + the window height, and the bottom-right corner of the window border will be placed at that reference point. So, to place a window in the bottom right corner you would first set gravity to south east, then write: Move (window, ScreenWidth - window_width, ScreenHeight - window_height) (note that this example does not take multi-head scenarios into account). The Extended Window Manager Hints specification at http://www.freedesktop.org/Standards/wm-spec has a nice table of gravities in the "implementation notes" section. The GetPosition documentation may also be relevant. Parameters:
x X coordinate to move window to y Y coordinate to move window to
func (*CWindow) ParseGeometry ¶
Parses a standard X Window System geometry string - see the manual page for X (type 'man X') for details on this. ParseGeometry does work on all CTK ports including Win32 but is primarily intended for an X environment. If either a size or a position can be extracted from the geometry string, ParseGeometry returns TRUE and calls SetDefaultSize and/or Move to resize/move the window. If ParseGeometry returns TRUE, it will also set the GDK_HINT_USER_POS and/or GDK_HINT_USER_SIZE hints indicating to the window manager that the size/position of the window was user-specified. This causes most window managers to honor the geometry. Note that for ParseGeometry to work as expected, it has to be called when the window has its "final" size, i.e. after calling WidgetShowAll on the contents and SetGeometryHints on the window. Parameters:
geometry geometry string
Returns:
TRUE if string was parsed successfully
func (*CWindow) Present ¶
func (w *CWindow) Present()
Presents a window to the user. This may mean raising the window in the stacking order, deiconifying it, moving it to the current desktop, and/or giving it the keyboard focus, possibly dependent on the user's platform, window manager, and preferences. If window is hidden, this function calls WidgetShow as well. This function should be used when the user tries to open a window that's already open. Say for example the preferences dialog is currently open, and the user chooses Preferences from the menu a second time; use Present to move the already-open dialog where the user can see it. If you are calling this function in response to a user interaction, it is preferable to use PresentWithTime.
func (*CWindow) PresentWithTime ¶
Presents a window to the user in response to a user interaction. If you need to present a window without a timestamp, use Present. See Present for details. Parameters:
timestamp the timestamp of the user interaction (typically a
button or key press event) which triggered this call
func (*CWindow) PropagateKeyEvent ¶
Propagate a key press or release event to the focus widget and up the focus container chain until a widget handles event . This is normally called by the default ::key_press_event and ::key_release_event handlers for toplevel windows, however in some cases it may be useful to call this directly when overriding the standard key handling for a toplevel window. Parameters:
event a EventKey
Returns:
TRUE if a widget in the focus chain handled the event.
func (*CWindow) RemoveAccelGroup ¶
func (w *CWindow) RemoveAccelGroup(accelGroup AccelGroup)
Reverses the effects of AddAccelGroup. Parameters:
accelGroup a AccelGroup
func (*CWindow) RemoveMnemonic ¶
Removes a mnemonic from this window. Parameters:
keyval the mnemonic target the widget that gets activated by the mnemonic
func (*CWindow) RemoveWidgetMnemonics ¶
func (w *CWindow) RemoveWidgetMnemonics(target interface{})
Removes all mnemonics from this window for the target Widget. Parameters:
target the widget that gets activated by the mnemonic
func (*CWindow) ReplaceStylesFromString ¶ added in v0.1.4
func (*CWindow) ReshowWithInitialSize ¶
func (w *CWindow) ReshowWithInitialSize()
Hides window , then reshows it, resetting the default size and position of the window. Used by GUI builders only.
func (*CWindow) SetAcceptFocus ¶
Windows may set a hint asking the desktop environment not to receive the input focus. This function sets this hint. Parameters:
setting TRUE to let this window receive input focus
func (*CWindow) SetAutoStartupNotification ¶
By default, after showing the first Window, CTK calls NotifyStartupComplete. Call this function to disable the automatic startup notification. You might do this if your first window is a splash screen, and you want to delay notification until after your real main window has been shown, for example. In that example, you would disable startup notification temporarily, show your splash screen, then re-enable it so that showing the main window would automatically result in notification. Parameters:
setting TRUE to automatically do startup notification
func (*CWindow) SetDecorated ¶
By default, windows are decorated with a title bar, resize controls, etc. Some window managers allow CTK to disable these decorations, creating a borderless window. If you set the decorated property to FALSE using this function, CTK will do its best to convince the window manager not to decorate the window. Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before calling Show. On Windows, this function always works, since there's no window manager policy involved. Parameters:
setting TRUE to decorate the window
func (*CWindow) SetDefault ¶
The default widget is the widget that's activated when the user presses Enter in a dialog (for example). This function sets or unsets the default widget for a Window about. When setting (rather than unsetting) the default widget it's generally easier to call WidgetGrabFocus on the widget. Before making a widget the default widget, you must set the GTK_CAN_DEFAULT flag on the widget you'd like to make the default using GTK_WIDGET_SET_FLAGS. Parameters:
defaultWidget widget to be the default, or NULL to unset the
default widget for the toplevel.
func (*CWindow) SetDeletable ¶
By default, windows have a close button in the window frame. Some disable this button. If you set the deletable property to FALSE using this function, CTK will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before calling Show. On Windows, this function always works, since there's no window manager policy involved. Parameters:
setting TRUE to decorate the window as deletable
func (*CWindow) SetDestroyWithParent ¶
If setting is TRUE, then destroying the transient parent of window will also destroy window itself. This is useful for dialogs that shouldn't persist beyond the lifetime of the main window they're associated with, for example. Parameters:
setting whether to destroy window
with its transient parent
func (*CWindow) SetDisplay ¶
func (*CWindow) SetEventFocus ¶
func (w *CWindow) SetEventFocus(o interface{})
func (*CWindow) SetFocus ¶
func (w *CWindow) SetFocus(focus interface{})
If focus is not the current focus widget, and is focusable, sets it as the focus widget for the window. If focus is NULL, unsets the focus widget for this window. To set the focus to a particular widget in the toplevel, it is usually more convenient to use WidgetGrabFocus instead of this function.
Parameters:
focus widget to be the new focus widget, or NULL to unset
func (*CWindow) SetFocusOnMap ¶
Windows may set a hint asking the desktop environment not to receive the input focus when the window is mapped. This function sets this hint. Parameters:
setting TRUE to let this window receive input focus on map
func (*CWindow) SetKeepAbove ¶
Asks to keep window above, so that it stays on top. Note that you shouldn't assume the window is definitely above afterward, because other entities (e.g. the user or window manager) could not keep it above, and not all window managers support keeping windows above. But normally the window will end kept above. Just don't write code that crashes if not. It's permitted to call this function before showing a window, in which case the window will be kept above when it appears onscreen initially. You can track the above state via the "window-state-event" signal on Widget. Note that, according to the Extended Window Manager Hints specification, the above state is mainly meant for user preferences and should not be used by applications e.g. for drawing attention to their dialogs. Parameters:
setting whether to keep window
above other windows
func (*CWindow) SetKeepBelow ¶
Asks to keep window below, so that it stays in bottom. Note that you shouldn't assume the window is definitely below afterward, because other entities (e.g. the user or window manager) could not keep it below, and not all window managers support putting windows below. But normally the window will be kept below. Just don't write code that crashes if not. It's permitted to call this function before showing a window, in which case the window will be kept below when it appears onscreen initially. You can track the below state via the "window-state-event" signal on Widget. Note that, according to the Extended Window Manager Hints specification, the above state is mainly meant for user preferences and should not be used by applications e.g. for drawing attention to their dialogs. Parameters:
setting whether to keep window
below other windows
func (*CWindow) SetMnemonicModifier ¶
Sets the mnemonic modifier for this window. Parameters:
modifier the modifier mask used to activate
mnemonics on this window.
func (*CWindow) SetMnemonicsVisible ¶
Sets the mnemonics-visible property. Parameters:
setting the new value
func (*CWindow) SetModal ¶
Sets a window modal or non-modal. Modal windows prevent interaction with other windows in the same application. To keep modal dialogs on top of main application windows, use SetTransientFor to make the dialog transient for the parent; most window managers will then disallow lowering the dialog below the parent. Parameters:
modal whether the window is modal
func (*CWindow) SetOpacity ¶
Request the windowing system to make window partially transparent, with opacity 0 being fully transparent and 1 fully opaque. (Values of the opacity parameter are clamped to the [0,1] range.) On X11 this has any effect only on X screens with a compositing manager running. See WidgetIsComposited. On Windows it should work always. Note that setting a window's opacity after the window has been shown causes it to flicker once on Windows. Parameters:
opacity desired opacity, between 0 and 1
func (*CWindow) SetPosition ¶
func (w *CWindow) SetPosition(position WindowPosition)
Sets a position constraint for this window. If the old or new constraint is GTK_WIN_POS_CENTER_ALWAYS, this will also cause the window to be repositioned to satisfy the new constraint. Parameters:
position a position constraint.
func (*CWindow) SetResizable ¶
SetResizable updates whether the user can resize a window. Windows are user resizable by default.
Parameters:
resizable TRUE if the user can resize this window
func (*CWindow) SetRole ¶
This function is only useful on X11, not with other CTK targets. In combination with the window title, the window role allows a same" window when an application is restarted. So for example you might set the "toolbox" role on your app's toolbox window, so that when the user restarts their session, the window manager can put the toolbox back in the same place. If a window already has a unique title, you don't need to set the role, since the WM can use the title to identify the window when restoring the session. Parameters:
role unique identifier for the window to be used when restoring a session
func (*CWindow) SetSkipPagerHint ¶
Windows may set a hint asking the desktop environment not to display the window in the pager. This function sets this hint. (A "pager" is any desktop navigation tool such as a workspace switcher that displays a thumbnail representation of the windows on the screen.) Parameters:
setting TRUE to keep this window from appearing in the pager
func (*CWindow) SetSkipTaskbarHint ¶
Windows may set a hint asking the desktop environment not to display the window in the task bar. This function sets this hint. Parameters:
setting TRUE to keep this window from appearing in the task bar
func (*CWindow) SetStartupId ¶
Startup notification identifiers are used by desktop environment to track application startup, to provide user feedback and other features. This function changes the corresponding property on the underlying Window. Normally, startup identifier is managed automatically and you should only use this function in special cases like transferring focus from other processes. You should use this function before calling Present or any equivalent function generating a window map event. This function is only useful on X11, not with other CTK targets. Parameters:
startupId a string with startup-notification identifier
func (*CWindow) SetTitle ¶
SetTitle updates the title of the Window. The title of a window will be displayed in its title bar; on the X Window System, the title bar is rendered by the window manager, so exactly how the title appears to users may vary according to a user's exact configuration. The title should help a user distinguish this window from other windows they may have open. A good title might include the application name and current document filename, for example.
Parameters:
title text for the title of the window
func (*CWindow) SetTransientFor ¶
Dialog windows should be set transient for the main application window they were spawned from. This allows window managers to e.g. keep the dialog on top of the main window, or center the dialog over the main window. DialogNewWithButtons and other convenience functions in CTK will sometimes call SetTransientFor on your behalf. Passing NULL for parent unsets the current transient window. On Windows, this function puts the child window on top of the parent, much as the window manager would have done on X. Parameters:
parent parent window, or NULL.
func (*CWindow) SetUrgencyHint ¶
Windows may set a hint asking the desktop environment to draw the users attention to the window. This function sets this hint. Parameters:
setting TRUE to mark this window as urgent
func (*CWindow) Stick ¶
func (w *CWindow) Stick()
Asks to stick window , which means that it will appear on all user desktops. Note that you shouldn't assume the window is definitely stuck afterward, because other entities (e.g. the user or window manager) could unstick it again, and some window managers do not support sticking windows. But normally the window will end up stuck. Just don't write code that crashes if not. It's permitted to call this function before showing a window. You can track stickiness via the "window-state-event" signal on Widget.
func (*CWindow) Unfullscreen ¶
func (w *CWindow) Unfullscreen()
Asks to toggle off the fullscreen state for window . Note that you shouldn't assume the window is definitely not full screen afterward, because other entities (e.g. the user or window manager) could fullscreen it again, and not all window managers honor requests to unfullscreen windows. But normally the window will end up restored to its normal state. Just don't write code that crashes if not. You can track the fullscreen state via the "window-state-event" signal on Widget.
func (*CWindow) Unmaximize ¶
func (w *CWindow) Unmaximize()
Asks to unmaximize window . Note that you shouldn't assume the window is definitely unmaximized afterward, because other entities (e.g. the user or window manager) could maximize it again, and not all window managers honor requests to unmaximize. But normally the window will end up unmaximized. Just don't write code that crashes if not. You can track maximization via the "window-state-event" signal on Widget.
func (*CWindow) Unstick ¶
func (w *CWindow) Unstick()
Asks to unstick window , which means that it will appear on only one of the user's desktops. Note that you shouldn't assume the window is definitely unstuck afterward, because other entities (e.g. the user or window manager) could stick it again. But normally the window will end up stuck. Just don't write code that crashes if not. You can track stickiness via the "window-state-event" signal on Widget.
type CalendarDisplayOptions ¶
type CalendarDisplayOptions uint64
Calendar display options
const ( CALENDAR_SHOW_HEADING CalendarDisplayOptions = 1 << 0 CALENDAR_SHOW_DAY_NAMES CalendarDisplayOptions = 1 << iota CALENDAR_NO_MONTH_CHANGE CALENDAR_SHOW_WEEK_NUMBERS CALENDAR_WEEK_START_MONDAY CALENDAR_SHOW_DETAILS )
type CellRendererAccelMode ¶
type CellRendererAccelMode uint64
Cell renderer accel mode
const ( CELL_RENDERER_ACCEL_MODE_CTK CellRendererAccelMode = iota CELL_RENDERER_ACCEL_MODE_OTHER )
type CellRendererMode ¶
type CellRendererMode uint64
Cell renderer mode
const ( CELL_RENDERER_MODE_INERT CellRendererMode = iota CELL_RENDERER_MODE_ACTIVATABLE CELL_RENDERER_MODE_EDITABLE )
type CellRendererState ¶
type CellRendererState uint64
Cell renderer state
const ( CELL_RENDERER_SELECTED CellRendererState = 1 << 0 CELL_RENDERER_PRELIT CellRendererState = 1 << iota CELL_RENDERER_INSENSITIVE CELL_RENDERER_SORTED CELL_RENDERER_FOCUSED )
type Container ¶
type Container interface {
Widget
Buildable
Init() (already bool)
Build(builder Builder, element *CBuilderElement) error
SetOrigin(x, y int)
SetWindow(w Window)
ShowAll()
Add(w Widget)
AddWithProperties(widget Widget, argv ...interface{})
Remove(w Widget)
ResizeChildren()
ChildType() (value cdk.CTypeTag)
GetChildren() (children []Widget)
GetFocusChild() (value Widget)
SetFocusChild(child Widget)
GetFocusVAdjustment() (value Adjustment)
SetFocusVAdjustment(adjustment Adjustment)
GetFocusHAdjustment() (value Adjustment)
SetFocusHAdjustment(adjustment Adjustment)
ChildGet(child Widget, properties ...cdk.Property) (values []interface{})
ChildSet(child Widget, argv ...interface{})
GetChildProperty(child Widget, propertyName cdk.Property) (value interface{})
SetChildProperty(child Widget, propertyName cdk.Property, value interface{})
GetBorderWidth() (value int)
SetBorderWidth(borderWidth int)
GetFocusChain() (focusableWidgets []interface{}, explicitlySet bool)
SetFocusChain(focusableWidgets []interface{})
UnsetFocusChain()
FindChildProperty(property cdk.Property) (value *cdk.CProperty)
InstallChildProperty(name cdk.Property, kind cdk.PropertyType, write bool, def interface{}) error
ListChildProperties() (properties []*cdk.CProperty)
GetWidgetAt(p *ptypes.Point2I) Widget
}
Container Hierarchy:
Object
+- Widget
+- Container
+- Bin
+- Box
+- CList
+- Fixed
+- Paned
+- IconView
+- Layout
+- List
+- MenuShell
+- Notebook
+- Socket
+- Table
+- TextView
+- Toolbar
+- ToolItemGroup
+- ToolPalette
+- Tree
+- TreeView
In the Curses Tool Kit, the Container interface is an extension of the CTK Widget interface and for all intents and purposes, this is the base class for any CTK type that will contain other widgets. The Container also supports the tracking of focus and default widgets by maintaining two chain-list types: FocusChain and DefaultChain.
Note that currently CTK only supports the FocusChain
type CornerType ¶
type CornerType uint64
Corner type
const ( CornerTopLeft CornerType = iota CornerBottomLeft CornerTopRight CornerBottomRight )
type DeleteType ¶
type DeleteType uint64
Delete type
const ( DELETE_CHARS DeleteType = iota DELETE_WORD_ENDS DELETE_WORDS DELETE_DISPLAY_LINES DELETE_DISPLAY_LINE_ENDS DELETE_PARAGRAPH_ENDS DELETE_PARAGRAPHS DELETE_WHITESPACE )
type Dialog ¶
type Dialog interface {
Window
Buildable
Init() (already bool)
Build(builder Builder, element *CBuilderElement) error
Run() (response chan ResponseType)
Response(responseId ResponseType)
AddButton(buttonText string, responseId ResponseType) (value Button)
AddButtons(argv ...interface{})
AddActionWidget(child Widget, responseId ResponseType)
AddSecondaryActionWidget(child Widget, responseId ResponseType)
SetDefaultResponse(responseId ResponseType)
SetResponseSensitive(responseId ResponseType, sensitive bool)
GetResponseForWidget(widget Widget) (value ResponseType)
GetWidgetForResponse(responseId ResponseType) (value Widget)
GetActionArea() (value ButtonBox)
GetContentArea() (value VBox)
Show()
ShowAll()
Destroy()
}
Dialog Hierarchy:
Object
+- Widget
+- Container
+- Bin
+- Window
+- Dialog
+- AboutDialog
+- ColorSelectionDialog
+- FileChooserDialog
+- FileSelection
+- FontSelectionDialog
+- InputDialog
+- MessageDialog
+- PageSetupUnixDialog
+- PrintUnixDialog
+- RecentChooserDialog
The Dialog Widget is a Window with actionable Buttons, typically intended to be used as a transient for another Window rather than a Window on its own.
type DialogFlags ¶
type DialogFlags uint64
Dialog flags
const ( DialogModal DialogFlags = 1 << 0 DialogDestroyWithParent DialogFlags = 1 << iota DialogNoSeparator )
type DirectionType ¶
type DirectionType uint64
Direction type
const ( DIR_TAB_FORWARD DirectionType = iota DIR_TAB_BACKWARD DIR_UP DIR_DOWN DIR_LEFT DIR_RIGHT )
type Drawable ¶
type Drawable interface {
Hide()
Show()
ShowAll()
IsVisible() bool
HasPoint(p *ptypes.Point2I) bool
GetWidgetAt(p *ptypes.Point2I) (instance interface{})
GetSizeRequest() (size ptypes.Rectangle)
SetSizeRequest(x, y int)
GetTheme() (theme paint.Theme)
SetTheme(theme paint.Theme)
GetThemeRequest() (theme paint.Theme)
GetOrigin() (origin ptypes.Point2I)
SetOrigin(x, y int)
GetAllocation() (alloc ptypes.Rectangle)
SetAllocation(alloc ptypes.Rectangle)
Invalidate() enums.EventFlag
Resize() enums.EventFlag
Draw() enums.EventFlag
}
type EntryIconPosition ¶
type EntryIconPosition uint64
Entry icon position
const ( ENTRY_ICON_PRIMARY EntryIconPosition = iota ENTRY_ICON_SECONDARY )
type EnumFromString ¶
type EventBox ¶
type EventBox interface {
Bin
Buildable
Init() (already bool)
SetAboveChild(aboveChild bool)
GetAboveChild() (value bool)
SetVisibleWindow(visibleWindow bool)
GetVisibleWindow() (value bool)
Activate() (value bool)
CancelEvent()
ProcessEvent(evt cdk.Event) enums.EventFlag
GrabFocus()
GrabEventFocus()
}
EventBox Hierarchy:
Object
+- Widget
+- Container
+- Bin
+- EventBox
The EventBox Widget is used to capture Widget events (mouse, keyboard) without needing having any defined user-interface.
type ExpanderStyle ¶
type ExpanderStyle uint64
Expander style
const ( EXPANDER_COLLAPSED ExpanderStyle = iota EXPANDER_SEMI_COLLAPSED EXPANDER_SEMI_EXPANDED EXPANDER_EXPANDED )
type ExtensionMode ¶
type ExtensionMode uint64
const ( EXTENSION_EVENTS_NONE ExtensionMode = iota EXTENSION_EVENTS_ALL EXTENSION_EVENTS_CURSOR )
type FileChooserAction ¶
type FileChooserAction uint64
File chooser action
const ( FILE_CHOOSER_ACTION_OPEN FileChooserAction = iota FILE_CHOOSER_ACTION_SAVE FILE_CHOOSER_ACTION_SELECT_FOLDER FILE_CHOOSER_ACTION_CREATE_FOLDER )
type FileChooserConfirmation ¶
type FileChooserConfirmation uint64
File chooser confirmation
const ( FILE_CHOOSER_CONFIRMATION_CONFIRM FileChooserConfirmation = iota FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN )
type FileChooserError ¶
type FileChooserError uint64
File chooser error
const ( FILE_CHOOSER_ERROR_NONEXISTENT FileChooserError = iota FILE_CHOOSER_ERROR_BAD_FILENAME FILE_CHOOSER_ERROR_ALREADY_EXISTS FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME )
type FileChooserProp ¶
type FileChooserProp uint64
File chooser prop
const ( FILE_CHOOSER_PROP_FIRST FileChooserProp = 0 FILE_CHOOSER_PROP_ACTION FileChooserProp = FileChooserProp(FILE_CHOOSER_PROP_FIRST) FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND FileChooserProp = iota FILE_CHOOSER_PROP_FILTER FILE_CHOOSER_PROP_LOCAL_ONLY FILE_CHOOSER_PROP_PREVIEW_WIDGET FILE_CHOOSER_PROP_PREVIEW_WIDGET_ACTIVE FILE_CHOOSER_PROP_USE_PREVIEW_LABEL FILE_CHOOSER_PROP_EXTRA_WIDGET FILE_CHOOSER_PROP_SELECT_MULTIPLE FILE_CHOOSER_PROP_SHOW_HIDDEN FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION FILE_CHOOSER_PROP_CREATE_FOLDERS FILE_CHOOSER_PROP_LAST FileChooserProp = FileChooserProp(FILE_CHOOSER_PROP_CREATE_FOLDERS) )
type FileFilterFlags ¶
type FileFilterFlags uint64
File filter flags
const ( FILE_FILTER_FILENAME FileFilterFlags = 1 << 0 FILE_FILTER_URI FileFilterFlags = 1 << iota FILE_FILTER_DISPLAY_NAME FILE_FILTER_MIME_TYPE )
type Frame ¶
type Frame interface {
Bin
Buildable
Init() (already bool)
GetLabel() (value string)
SetLabel(label string)
GetLabelWidget() (value Widget)
SetLabelWidget(labelWidget Widget)
GetLabelAlign() (xAlign float64, yAlign float64)
SetLabelAlign(xAlign float64, yAlign float64)
GetShadowType() (value ShadowType)
SetShadowType(shadowType ShadowType)
GrabFocus()
Add(w Widget)
Remove(w Widget)
IsFocus() bool
GetFocusWithChild() (focusWithChild bool)
SetFocusWithChild(focusWithChild bool)
GetWidgetAt(p *ptypes.Point2I) Widget
GetThemeRequest() (theme paint.Theme)
GetSizeRequest() (width, height int)
}
Frame Hierarchy:
Object
+- Widget
+- Container
+- Bin
+- Frame
+- AspectFrame
The Frame Widget wraps other Widgets with a border and optional title label.
type Gravity ¶
type Gravity uint64
const ( // The reference point is at the top left corner. GravityNorthWest Gravity = iota // The reference point is in the middle of the top edge. GravityNorth // The reference point is at the top right corner. GravityNorthEast // The reference point is at the middle of the left edge. GravityWest // The reference point is at the center of the window. GravityCenter // The reference point is at the middle of the right edge. GravityEast // The reference point is at the lower left corner. GravitySouthWest // The reference point is at the middle of the lower edge. GravitySouth // The reference point is at the lower right corner. GravitySouthEast // The reference point is at the top left corner of the window itself, ignoring window manager decorations. GravityStatic )
func (Gravity) FromString ¶
type HButtonBox ¶
type HScrollbar ¶
type IMPreeditStyle ¶
type IMPreeditStyle uint64
Preedit style
const ( IM_PREEDIT_NOTHING IMPreeditStyle = iota IM_PREEDIT_CALLBACK IM_PREEDIT_NONE )
type IMStatusStyle ¶
type IMStatusStyle uint64
Status style
const ( IM_STATUS_NOTHING IMStatusStyle = iota IM_STATUS_CALLBACK IM_STATUS_NONE )
type IconLookupFlags ¶
type IconLookupFlags uint64
Icon lookup flags
const ( ICON_LOOKUP_NO_SVG IconLookupFlags = 1 << 0 ICON_LOOKUP_FORCE_SVG IconLookupFlags = 1 << iota ICON_LOOKUP_USE_BUILTIN ICON_LOOKUP_GENERIC_FALLBACK ICON_LOOKUP_FORCE_SIZE )
type IconThemeError ¶
type IconThemeError uint64
Icon style error
const ( ICON_THEME_NOT_FOUND IconThemeError = iota ICON_THEME_FAILED )
type IconViewDropPosition ¶
type IconViewDropPosition uint64
Icon view drop position
const ( ICON_VIEW_NO_DROP IconViewDropPosition = iota ICON_VIEW_DROP_INTO ICON_VIEW_DROP_LEFT ICON_VIEW_DROP_RIGHT ICON_VIEW_DROP_ABOVE ICON_VIEW_DROP_BELOW )
type Label ¶
type Label interface {
Misc
Alignable
Buildable
Init() (already bool)
Build(builder Builder, element *CBuilderElement) error
SetText(text string)
SetAttributes(attrs paint.Style)
SetMarkup(text string) (parseError error)
SetMarkupWithMnemonic(str string) (err error)
SetJustify(justify enums.Justification)
SetEllipsize(mode bool)
SetWidthChars(nChars int)
SetMaxWidthChars(nChars int)
SetLineWrap(wrap bool)
SetLineWrapMode(wrapMode enums.WrapMode)
GetMnemonicKeyVal() (value rune)
GetSelectable() (value bool)
GetText() (value string)
SelectRegion(startOffset int, endOffset int)
SetMnemonicWidget(widget Widget)
SetSelectable(setting bool)
SetTextWithMnemonic(str string)
GetAttributes() (value paint.Style)
GetJustify() (value enums.Justification)
GetEllipsize() (value bool)
GetWidthChars() (value int)
GetMaxWidthChars() (value int)
GetLabel() (value string)
GetLineWrap() (value bool)
GetLineWrapMode() (value enums.WrapMode)
GetMnemonicWidget() (value Widget)
GetSelectionBounds() (start int, end int, nonEmpty bool)
GetUseMarkup() (value bool)
GetUseUnderline() (value bool)
GetSingleLineMode() (value bool)
SetLabel(str string)
SetUseMarkup(setting bool)
SetUseUnderline(setting bool)
SetSingleLineMode(singleLineMode bool)
GetCurrentUri() (value string)
SetTrackVisitedLinks(trackLinks bool)
GetTrackVisitedLinks() (value bool)
GetClearText() (text string)
GetPlainText() (text string)
GetCleanText() (text string)
GetPlainTextInfo() (maxWidth, lineCount int)
GetPlainTextInfoAtWidth(width int) (maxWidth, lineCount int)
GetSizeRequest() (width, height int)
}
Label Hierarchy:
Object
+- Widget
+- Misc
+- Label
+- AccelLabel
+- TipsQuery
The Label Widget presents text to the end user.
type LayoutStyle ¶
type LayoutStyle uint64
layout style
const ( LayoutStart LayoutStyle = iota LayoutEnd )
func (LayoutStyle) FromString ¶
func (l LayoutStyle) FromString(value string) (enum interface{}, err error)
type LocationMode ¶
type LocationMode uint64
Location mode
const ( LOCATION_MODE_PATH_BAR LocationMode = iota LOCATION_MODE_FILENAME_ENTRY )
type MenuDirectionType ¶
type MenuDirectionType uint64
Menu direction type
const ( MENU_DIR_PARENT MenuDirectionType = iota MENU_DIR_CHILD MENU_DIR_NEXT MENU_DIR_PREV )
type MessageType ¶
type MessageType uint64
Message type
const ( MESSAGE_INFO MessageType = iota MESSAGE_WARNING MESSAGE_QUESTION MESSAGE_ERROR MESSAGE_OTHER )
type MetricType ¶
type MetricType uint64
Metric type
const ( PIXELS MetricType = iota INCHES CENTIMETERS )
type Misc ¶
type Misc interface {
Widget
Buildable
Init() (already bool)
GetAlignment() (xAlign float64, yAlign float64)
SetAlignment(xAlign float64, yAlign float64)
GetPadding() (xPad int, yPad int)
SetPadding(xPad int, yPad int)
}
Misc Hierarchy:
Object
+- Widget
+- Misc
+- Label
+- Arrow
+- Image
+- Pixmap
The Misc Widget is intended primarily as a base type for other Widget implementations where there is a necessity for alignment and padding properties.
type ModifierType ¶
type ModifierType uint64
const ( NullModMask ModifierType = 0 ShiftMask ModifierType = 1 << iota LockMask ControlMask Mod1Mask Mod2Mask Mod3Mask Mod4Mask Mod5Mask Button1Mask Button2Mask Button3Mask Button4Mask Button5Mask SuperMask HyperMask MetaMask ReleaseMask ModifierMask )
func (ModifierType) HasBit ¶
func (m ModifierType) HasBit(b ModifierType) bool
func (ModifierType) String ¶
func (m ModifierType) String() string
type MovementStep ¶
type MovementStep uint64
Movement step
const ( MOVEMENT_LOGICAL_POSITIONS MovementStep = iota MOVEMENT_VISUAL_POSITIONS MOVEMENT_WORDS MOVEMENT_DISPLAY_LINES MOVEMENT_DISPLAY_LINE_ENDS MOVEMENT_PARAGRAPHS MOVEMENT_PARAGRAPH_ENDS MOVEMENT_PAGES MOVEMENT_BUFFER_ENDS MOVEMENT_HORIZONTAL_PAGES )
type NotebookTab ¶
type NotebookTab uint64
Notebook tab
const ( NOTEBOOK_TAB_FIRST NotebookTab = iota NOTEBOOK_TAB_LAST )
type NumberUpLayout ¶
type NumberUpLayout uint64
Number up layout
const ( NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM NumberUpLayout = iota NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT )
type Object ¶
type Object interface {
cdk.Object
Init() (already bool)
Build(builder Builder, element *CBuilderElement) error
ObjectInfo() string
SetOrigin(x, y int)
GetOrigin() ptypes.Point2I
SetAllocation(size ptypes.Rectangle)
GetAllocation() ptypes.Rectangle
GetObjectAt(p *ptypes.Point2I) Object
HasPoint(p *ptypes.Point2I) (contains bool)
Invalidate() enums.EventFlag
ProcessEvent(evt cdk.Event) enums.EventFlag
Resize() enums.EventFlag
GetTextDirection() (direction TextDirection)
SetTextDirection(direction TextDirection)
CssSelector() (selector string)
InstallCssProperty(name cdk.Property, state StateType, kind cdk.PropertyType, write bool, def interface{}) (err error)
SetCssPropertyFromStyle(key, value string) (err error)
GetCssProperty(name cdk.Property, state StateType) (property *CStyleProperty)
GetCssProperties() (properties map[StateType][]*CStyleProperty)
GetCssBool(name cdk.Property, state StateType) (value bool, err error)
GetCssString(name cdk.Property, state StateType) (value string, err error)
GetCssInt(name cdk.Property, state StateType) (value int, err error)
GetCssFloat(name cdk.Property, state StateType) (value float64, err error)
GetCssColor(name cdk.Property, state StateType) (value paint.Color, err error)
}
Object in the Curses Tool Kit, is an extension of the CDK Object type and for all intents and purposes, this is the base class for any CTK type with no other CTK type embedding a CDK type directly.
type OperationMode ¶
type OperationMode uint64
Operation mode
const ( OPERATION_MODE_BROWSE OperationMode = iota OPERATION_MODE_SEARCH OPERATION_MODE_RECENT )
type Orientable ¶
type Orientable interface {
GetOrientation() (orientation enums.Orientation)
SetOrientation(orientation enums.Orientation)
}
type PackDirection ¶
type PackDirection uint64
packing direction
const ( PACK_DIRECTION_LTR PackDirection = iota PACK_DIRECTION_RTL PACK_DIRECTION_TTB PACK_DIRECTION_BTT )
type ParamFlags ¶
type ParamFlags uint64
Param flags
const ( PARAM_READABLE ParamFlags = 1 << 0 PARAM_WRITABLE ParamFlags = 1 << iota PARAM_READWRITE ParamFlags = ParamFlags(PARAM_READABLE | PARAM_WRITABLE) PARAM_CONSTRUCT PARAM_CONSTRUCT_ONLY PARAM_LAX_VALIDATION PARAM_STATIC_NAME PARAM_PRIVATE ParamFlags = ParamFlags(PARAM_STATIC_NAME) PARAM_STATIC_NICK PARAM_STATIC_BLURB PARAM_EXPLICIT_NOTIFY )
type PathPriorityType ¶
type PathPriorityType uint64
Path priority type
const ( PATH_PRIO_LOWEST PathPriorityType = 0 PATH_PRIO_CTK PathPriorityType = 4 PATH_PRIO_APPLICATION PathPriorityType = 8 PATH_PRIO_THEME PathPriorityType = 10 PATH_PRIO_RC PathPriorityType = 12 PATH_PRIO_HIGHEST PathPriorityType = 15 )
type PolicyType ¶
type PolicyType uint64
Policy type
const ( PolicyAlways PolicyType = iota PolicyAutomatic PolicyNever )
func (PolicyType) FromString ¶
func (p PolicyType) FromString(value string) (enum interface{}, err error)
type PositionType ¶
type PositionType uint64
Position type
const ( POS_LEFT PositionType = iota POS_RIGHT POS_TOP POS_BOTTOM )
type PrintPages ¶
type PrintPages uint64
Print pages
const ( PRINT_PAGES_ALL PrintPages = iota PRINT_PAGES_CURRENT PRINT_PAGES_RANGES PRINT_PAGES_SELECTION )
type PrivateFlags ¶
type PrivateFlags uint64
Private flags
const ( PRIVATE_USER_STYLE PrivateFlags = 1 << 0 PRIVATE_RESIZE_PENDING PrivateFlags = 1 << 2 PRIVATE_HAS_POINTER PrivateFlags = 1 << 3 PRIVATE_SHADOWED PrivateFlags = 1 << 4 PRIVATE_HAS_SHAPE_MASK PrivateFlags = 1 << 5 PRIVATE_IN_REPARENT PrivateFlags = 1 << 6 PRIVATE_DIRECTION_SET PrivateFlags = 1 << 7 PRIVATE_DIRECTION_LTR PrivateFlags = 1 << 8 PRIVATE_ANCHORED PrivateFlags = 1 << 9 PRIVATE_CHILD_VISIBLE PrivateFlags = 1 << 10 PRIVATE_REDRAW_ON_ALLOC PrivateFlags = 1 << 11 PRIVATE_ALLOC_NEEDED PrivateFlags = 1 << 12 PRIVATE_REQUEST_NEEDED PrivateFlags = 1 << 13 )
type ProgressBarOrientation ¶
type ProgressBarOrientation uint64
Progress bar orientation
const ( PROGRESS_LEFT_TO_RIGHT ProgressBarOrientation = iota PROGRESS_RIGHT_TO_LEFT PROGRESS_BOTTOM_TO_TOP PROGRESS_TOP_TO_BOTTOM )
type ProgressBarStyle ¶
type ProgressBarStyle uint64
Progress bar style
const ( PROGRESS_CONTINUOUS ProgressBarStyle = iota PROGRESS_DISCRETE )
type RBNodeColor ¶
type RBNodeColor uint64
Node color
const ( RBNODE_BLACK RBNodeColor = 1 << 0 RBNODE_RED RBNodeColor = 1 << iota RBNODE_IS_PARENT RBNODE_IS_SELECTED RBNODE_IS_PRELIT RBNODE_IS_SEMI_COLLAPSED RBNODE_IS_SEMI_EXPANDED RBNODE_INVALID RBNODE_COLUMN_INVALID RBNODE_DESCENDANTS_INVALID RBNODE_NON_COLORS RBNodeColor = RBNodeColor(RBNODE_IS_PARENT) )
type Range ¶
type Range interface {
Widget
Init() (already bool)
GetFillLevel() (value float64)
GetRestrictToFillLevel() (value bool)
GetShowFillLevel() (value bool)
SetFillLevel(fillLevel float64)
SetRestrictToFillLevel(restrictToFillLevel bool)
SetShowFillLevel(showFillLevel bool)
GetAdjustment() (adjustment *CAdjustment)
GetInverted() (value bool)
SetInverted(setting bool)
SetIncrements(step int, page int)
SetRange(min, max int)
GetValue() (value int)
SetValue(value int)
GetRoundDigits() (value int)
SetRoundDigits(roundDigits int)
SetLowerStepperSensitivity(sensitivity SensitivityType)
GetLowerStepperSensitivity() (value SensitivityType)
SetUpperStepperSensitivity(sensitivity SensitivityType)
GetUpperStepperSensitivity() (value SensitivityType)
GetFlippable() (value bool)
SetFlippable(flippable bool)
GetMinSliderSize() (value int)
GetRangeRect() (rangeRect ptypes.Rectangle)
GetSliderRange() (sliderStart int, sliderEnd int)
GetSliderSizeFixed() (value bool)
SetMinSliderSize(minSize bool)
SetSliderSizeFixed(sizeFixed bool)
GetIncrements() (step int, page int)
GetRange() (min, max int)
GetMinSliderLength() (length int)
SetMinSliderLength(length int)
GetSliderLength() (length int)
SetSliderLength(length int)
GetStepperSize() (size int)
SetStepperSize(size int)
GetStepperSpacing() (spacing int)
SetStepperSpacing(spacing int)
GetTroughUnderSteppers() (underSteppers bool)
SetTroughUnderSteppers(underSteppers bool)
}
Range Hierarchy:
Object
+- Widget
+- Range
+- Scale
+- Scrollbar
The Range Widget is used to manage the position of things within some range of values. Scrollbar and Scale are two examples.
type RcTokenType ¶
type RcTokenType uint64
Rc token type
const ( RC_TOKEN_INVALID RcTokenType = RcTokenType(TOKEN_LAST) RC_TOKEN_INCLUDE RcTokenType = iota RC_TOKEN_NORMAL RC_TOKEN_ACTIVE RC_TOKEN_PRELIGHT RC_TOKEN_SELECTED RC_TOKEN_INSENSITIVE RC_TOKEN_FG RC_TOKEN_BG RC_TOKEN_TEXT RC_TOKEN_BASE RC_TOKEN_XTHICKNESS RC_TOKEN_YTHICKNESS RC_TOKEN_FONT RC_TOKEN_FONTSET RC_TOKEN_FONT_NAME RC_TOKEN_BC_PIXMAP RC_TOKEN_PIXMAP_PATH RC_TOKEN_STYLE RC_TOKEN_BINDING RC_TOKEN_BIND RC_TOKEN_WIDGET RC_TOKEN_WIDGET_CLASS RC_TOKEN_CLASS RC_TOKEN_LOWEST RC_TOKEN_CTK RC_TOKEN_APPLICATION RC_TOKEN_THEME RC_TOKEN_RC RC_TOKEN_HIGHEST RC_TOKEN_ENGINE RC_TOKEN_MODULE_PATH RC_TOKEN_IM_MODULE_PATH RC_TOKEN_IM_MODULE_FILE RC_TOKEN_STOCK RC_TOKEN_LTR RC_TOKEN_RTL RC_TOKEN_COLOR RC_TOKEN_UNBIND RC_TOKEN_LAST )
type RecentChooserError ¶
type RecentChooserError uint64
Recent chooser error
const ( RECENT_CHOOSER_ERROR_NOT_FOUND RecentChooserError = iota RECENT_CHOOSER_ERROR_INVALID_URI )
type RecentChooserProp ¶
type RecentChooserProp uint64
Recent chooser prop
const ( RECENT_CHOOSER_PROP_FIRST RecentChooserProp = 0 RECENT_CHOOSER_PROP_RECENT_MANAGER RecentChooserProp = iota RECENT_CHOOSER_PROP_SHOW_PRIVATE RECENT_CHOOSER_PROP_SHOW_NOT_FOUND RECENT_CHOOSER_PROP_SHOW_TIPS RECENT_CHOOSER_PROP_SHOW_ICONS RECENT_CHOOSER_PROP_SELECT_MULTIPLE RECENT_CHOOSER_PROP_LIMIT RECENT_CHOOSER_PROP_LOCAL_ONLY RECENT_CHOOSER_PROP_SORT_TYPE RECENT_CHOOSER_PROP_FILTER RECENT_CHOOSER_PROP_LAST )
type RecentFilterFlags ¶
type RecentFilterFlags uint64
Recent filter flags
const ( RECENT_FILTER_URI RecentFilterFlags = 1 << 0 RECENT_FILTER_DISPLAY_NAME RecentFilterFlags = 1 << iota RECENT_FILTER_MIME_TYPE RECENT_FILTER_APPLICATION RECENT_FILTER_GROUP RECENT_FILTER_AGE )
type RecentManagerError ¶
type RecentManagerError uint64
Recent manager error
const ( RECENT_MANAGER_ERROR_NOT_FOUND RecentManagerError = iota RECENT_MANAGER_ERROR_INVALID_URI RECENT_MANAGER_ERROR_INVALID_ENCODING RECENT_MANAGER_ERROR_NOT_REGISTERED RECENT_MANAGER_ERROR_READ RECENT_MANAGER_ERROR_WRITE RECENT_MANAGER_ERROR_UNKNOWN )
type RecentSortType ¶
type RecentSortType uint64
Recent sort type
const ( RECENT_SORT_NONE RecentSortType = 0 RECENT_SORT_MRU RecentSortType = iota RECENT_SORT_LRU RECENT_SORT_CUSTOM )
type ReliefStyle ¶
type ReliefStyle uint64
Relief style
const ( RELIEF_NORMAL ReliefStyle = iota RELIEF_HALF RELIEF_NONE )
type ReloadState ¶
type ReloadState uint64
Reload state
const ( RELOAD_EMPTY ReloadState = iota RELOAD_HAS_FOLDER )
type ResponseType ¶
type ResponseType int
Response type
const ( ResponseNone ResponseType = -1 ResponseReject ResponseType = -2 ResponseAccept ResponseType = -3 ResponseDeleteEvent ResponseType = -4 ResponseOk ResponseType = -5 ResponseCancel ResponseType = -6 ResponseClose ResponseType = -7 ResponseYes ResponseType = -8 ResponseNo ResponseType = -9 ResponseApply ResponseType = -10 ResponseHelp ResponseType = -11 )
func ResponseTypeFromName ¶
func ResponseTypeFromName(name string) ResponseType
func (ResponseType) String ¶
func (r ResponseType) String() string
type ScrollStep ¶
type ScrollStep uint64
Scroll step
const ( SCROLL_STEPS ScrollStep = iota SCROLL_PAGES SCROLL_ENDS SCROLL_HORIZONTAL_STEPS SCROLL_HORIZONTAL_PAGES SCROLL_HORIZONTAL_ENDS )
type ScrollType ¶
type ScrollType uint64
Scroll type
const ( SCROLL_NONE ScrollType = iota SCROLL_JUMP SCROLL_STEP_BACKWARD SCROLL_STEP_FORWARD SCROLL_PAGE_BACKWARD SCROLL_PAGE_FORWARD SCROLL_STEP_UP SCROLL_STEP_DOWN SCROLL_PAGE_UP SCROLL_PAGE_DOWN SCROLL_STEP_LEFT SCROLL_STEP_RIGHT SCROLL_PAGE_LEFT SCROLL_PAGE_RIGHT SCROLL_START SCROLL_END )
type Scrollbar ¶
type Scrollbar interface {
Range
Init() (already bool)
GetHasBackwardStepper() (hasBackwardStepper bool)
SetHasBackwardStepper(hasBackwardStepper bool)
GetHasForwardStepper() (hasForwardStepper bool)
SetHasForwardStepper(hasForwardStepper bool)
GetHasSecondaryBackwardStepper() (hasSecondaryBackwardStepper bool)
SetHasSecondaryBackwardStepper(hasSecondaryBackwardStepper bool)
GetHasSecondaryForwardStepper() (hasSecondaryForwardStepper bool)
SetHasSecondaryForwardStepper(hasSecondaryForwardStepper bool)
Forward(step int) enums.EventFlag
ForwardStep() enums.EventFlag
ForwardPage() enums.EventFlag
Backward(step int) enums.EventFlag
BackwardStep() enums.EventFlag
BackwardPage() enums.EventFlag
GetSizeRequest() (width, height int)
GetWidgetAt(p *ptypes.Point2I) Widget
ValueChanged()
Changed()
CancelEvent()
GetAllStepperRegions() (fwd, bwd, sFwd, sBwd ptypes.Region)
GetStepperRegions() (start, end ptypes.Region)
GetTroughRegion() (region ptypes.Region)
GetSliderRegion() (region ptypes.Region)
GrabFocus()
GrabEventFocus()
}
Scrollbar Hierarchy:
Object
+- Widget
+- Range
+- Scrollbar
+- HScrollbar
+- VScrollbar
The Scrollbar Widget is a Range Widget that draws steppers and sliders.
type ScrolledViewport ¶
type ScrolledViewport interface {
Viewport
Init() (already bool)
Build(builder Builder, element *CBuilderElement) error
GetHAdjustment() (value *CAdjustment)
GetVAdjustment() (value *CAdjustment)
SetPolicy(hScrollbarPolicy PolicyType, vScrollbarPolicy PolicyType)
AddWithViewport(child Widget)
SetPlacement(windowPlacement CornerType)
UnsetPlacement()
SetShadowType(t ShadowType)
SetHAdjustment(hAdjustment *CAdjustment)
SetVAdjustment(vAdjustment *CAdjustment)
GetPlacement() (value CornerType)
GetPolicy() (hScrollbarPolicy PolicyType, vScrollbarPolicy PolicyType)
GetShadowType() (value ShadowType)
VerticalShowByPolicy() (show bool)
HorizontalShowByPolicy() (show bool)
Add(w Widget)
Remove(w Widget)
GetChild() Widget
GetHScrollbar() *CHScrollbar
GetVScrollbar() *CVScrollbar
Show()
Hide()
GetWidgetAt(p *ptypes.Point2I) Widget
CancelEvent()
GetRegions() (c, h, v ptypes.Region)
GrabFocus()
GrabEventFocus()
}
ScrolledViewport Hierarchy:
Object
+- Widget
+- Container
+- Bin
+- ScrolledViewport
type SelectionMode ¶
type SelectionMode uint64
Selection mode
const ( SELECTION_NONE SelectionMode = iota SELECTION_SINGLE SELECTION_BROWSE SELECTION_MULTIPLE SELECTION_EXTENDED SelectionMode = SelectionMode(SELECTION_MULTIPLE) )
type SensitivityType ¶
type SensitivityType uint64
Sensitivity type
const ( SensitivityAuto SensitivityType = iota SensitivityOn SensitivityOff )
type ShadowType ¶
type ShadowType uint64
Shadow type
const ( SHADOW_NONE ShadowType = iota SHADOW_IN SHADOW_OUT SHADOW_ETCHED_IN SHADOW_ETCHED_OUT )
type SizeGroupMode ¶
type SizeGroupMode uint64
Size group mode
const ( SIZE_GROUP_NONE SizeGroupMode = iota SIZE_GROUP_HORIZONTAL SIZE_GROUP_VERTICAL SIZE_GROUP_BOTH )
type SpinButtonUpdatePolicy ¶
type SpinButtonUpdatePolicy uint64
Spin button update policy
const ( UPDATE_ALWAYS SpinButtonUpdatePolicy = iota UPDATE_IF_VALID )
type StartupMode ¶
type StartupMode uint64
Startup mode
const ( STARTUP_MODE_RECENT StartupMode = iota STARTUP_MODE_CWD )
type StateType ¶
type StateType uint64
func StateTypeFromString ¶ added in v0.1.4
StateTypeFromString returns the StateType equivalent for the given named string. If the name given is not a valid name, returns StateNormal.
type StockID ¶
type StockID string
Stock items represent commonly-used menu or toolbar items such as "Open" or "Exit". Each stock item is identified by a stock ID; stock IDs are just strings, and constants such as StockOpen are provided to avoid typing mistakes in the strings. Applications can register their own stock items in addition to those built-in to CTK.
Each stock ID can be associated with a StockItem, which contains the user-visible label, keyboard accelerator, and translation domain of the menu or toolbar item; and/or with an icon stored in a GtkIconFactory. See IconFactory for more information on stock icons. The connection between a StockItem and stock icons is purely conventional (by virtue of using the same stock ID); it's possible to register a stock item but no icon, and vice versa. Stock icons may have a RTL variant which gets used for right-to-left locales.
const ( StockAbout StockID = "ctk-about" StockAdd StockID = "ctk-add" StockApply StockID = "ctk-apply" StockBold StockID = "ctk-bold" StockCancel StockID = "ctk-cancel" StockClear StockID = "ctk-clear" StockClose StockID = "ctk-close" StockConvert StockID = "ctk-convert" StockConnect StockID = "ctk-connect" StockCopy StockID = "ctk-copy" StockCut StockID = "ctk-cut" StockDelete StockID = "ctk-delete" StockDialogError StockID = "ctk-dialog-error" StockDialogInfo StockID = "ctk-dialog-info" StockDialogQuestion StockID = "ctk-dialog-question" StockDialogWarning StockID = "ctk-dialog-warning" StockDirectory StockID = "ctk-directory" StockDiscard StockID = "ctk-discard" StockDisconnect StockID = "ctk-disconnect" StockEdit StockID = "ctk-edit" StockExecute StockID = "ctk-execute" StockFile StockID = "ctk-file" StockFind StockID = "ctk-find" StockFindAndReplace StockID = "ctk-find-and-replace" StockGotoBottom StockID = "ctk-goto-bottom" StockGotoFirst StockID = "ctk-goto-first" StockGotoLast StockID = "ctk-goto-last" StockGotoTop StockID = "ctk-goto-top" StockGoBack StockID = "ctk-go-back" StockGoDown StockID = "ctk-go-down" StockGoForward StockID = "ctk-go-forward" StockGoUp StockID = "ctk-go-up" StockHelp StockID = "ctk-help" StockHome StockID = "ctk-home" StockIndent StockID = "ctk-indent" StockIndex StockID = "ctk-index" StockInfo StockID = "ctk-info" StockItalic StockID = "ctk-italic" StockJumpTo StockID = "ctk-jump-to" StockJustifyCenter StockID = "ctk-justify-center" StockJustifyFill StockID = "ctk-justify-fill" StockJustifyLeft StockID = "ctk-justify-left" StockJustifyRight StockID = "ctk-justify-right" StockMediaForward StockID = "ctk-media-forward" StockMediaNext StockID = "ctk-media-next" StockMediaPause StockID = "ctk-media-pause" StockMediaPlay StockID = "ctk-media-play" StockMediaPrevious StockID = "ctk-media-previous" StockMediaRecord StockID = "ctk-media-record" StockMediaRewind StockID = "ctk-media-rewind" StockMediaStop StockID = "ctk-media-stop" StockNew StockID = "ctk-new" StockNo StockID = "ctk-no" StockOk StockID = "ctk-ok" StockOpen StockID = "ctk-open" StockPaste StockID = "ctk-paste" StockPreferences StockID = "ctk-preferences" StockProperties StockID = "ctk-properties" StockQuit StockID = "ctk-quit" StockRedo StockID = "ctk-redo" StockRefresh StockID = "ctk-refresh" StockRemove StockID = "ctk-remove" StockRevertToSaved StockID = "ctk-revert-to-saved" StockSave StockID = "ctk-save" StockSaveAs StockID = "ctk-save-as" StockSelectAll StockID = "ctk-select-all" StockSelectColor StockID = "ctk-select-color" StockSelectFont StockID = "ctk-select-font" StockSortAscending StockID = "ctk-sort-ascending" StockSortDescending StockID = "ctk-sort-descending" StockStop StockID = "ctk-stop" StockStrikethrough StockID = "ctk-strikethrough" StockUndelete StockID = "ctk-undelete" StockUnderline StockID = "ctk-underline" StockUndo StockID = "ctk-undo" StockUnindent StockID = "ctk-unindent" StockYes StockID = "ctk-yes" StockZoom100 StockID = "ctk-zoom-100" StockZoomFit StockID = "ctk-zoom-fit" StockZoomIn StockID = "ctk-zoom-in" StockZoomOut StockID = "ctk-zoom-out" )
func ListStockIDs ¶
func ListStockIDs() (list []StockID)
Retrieves a list of all known stock IDs added to an IconFactory or registered with StockAdd().
type StockItem ¶
type StockItem struct {
ID StockID
Label string
Modifier ModifierType
KeyVal cdk.Key
I18nDomain string
}
func LookupStockItem ¶
Retrieve a stock item by ID. Returns nil if item not found.
func LookupStockLabel ¶
type Style ¶
type Style interface {
Object
Init() (already bool)
PaintArrow(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, arrowType ArrowType, fill bool, x int, y int, width int, height int)
PaintBox(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
PaintBoxGap(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int, gapSide PositionType, gapX int, gapWidth int)
PaintCheck(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
PaintDiamond(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
PaintExtension(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int, gapSide PositionType)
PaintFlatBox(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
PaintFocus(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
PaintHandle(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int, orientation enums.Orientation)
PaintHLine(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, detail string, x1 int, x2 int, y int)
PaintOption(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
PaintPolygon(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, points ptypes.Point2I, nPoints int, fill bool)
PaintShadow(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
PaintShadowGap(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int, gapSide PositionType, gapX int, gapWidth int)
PaintSlider(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int, orientation enums.Orientation)
PaintSpinner(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, detail string, step int, x int, y int, width int, height int)
PaintTab(window Window, stateType StateType, shadowType ShadowType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, width int, height int)
PaintVLine(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, detail string, y1 int, y2 int, x int)
PaintExpander(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, detail string, x int, y int, expanderStyle ExpanderStyle)
// PaintLayout(window Window, stateType StateType, useText bool, area ptypes.Rectangle, widget Widget, detail string, x int, y int, layout PangoLayout)
PaintResizeGrip(window Window, stateType StateType, area ptypes.Rectangle, widget Widget, detail string, edge WindowEdge, x int, y int, width int, height int)
}
Style Hierarchy:
Object +- Style
type StyleProperty ¶ added in v0.1.4
type StyleProperty string
func (StyleProperty) String ¶ added in v0.1.4
func (p StyleProperty) String() string
type StyleSheetMedia ¶
type StyleSheetMedia struct {
Conditions string
Rules []*StyleSheetRule
}
func (StyleSheetMedia) String ¶
func (m StyleSheetMedia) String() string
type StyleSheetProperty ¶
func (StyleSheetProperty) String ¶
func (e StyleSheetProperty) String() string
type StyleSheetRule ¶
type StyleSheetRule struct {
Selector string
Properties []*StyleSheetProperty
}
func (StyleSheetRule) String ¶
func (r StyleSheetRule) String() string
type StyleSheetSelector ¶
type StyleSheetSelector struct {
Name string
Type string
Class string
State string
Parents []string
}
func (StyleSheetSelector) Match ¶
func (s StyleSheetSelector) Match(selector *StyleSheetSelector) (match bool)
func (StyleSheetSelector) String ¶
func (s StyleSheetSelector) String() string
type SubmenuDirection ¶
type SubmenuDirection uint64
Submenu direction
const ( DIRECTION_LEFT SubmenuDirection = iota DIRECTION_RIGHT )
type SubmenuPlacement ¶
type SubmenuPlacement uint64
Submenu placement
const ( TOP_BOTTOM SubmenuPlacement = iota LEFT_RIGHT )
type TextBufferTargetInfo ¶
type TextBufferTargetInfo int
Text buffer target info
const ( TEXT_BUFFER_TARGET_INFO_BUFFER_CONTENTS TextBufferTargetInfo = -1 TEXT_BUFFER_TARGET_INFO_RICH_TEXT TextBufferTargetInfo = -2 TEXT_BUFFER_TARGET_INFO_TEXT TextBufferTargetInfo = -3 )
type TextDirection ¶
type TextDirection uint64
Text direction
const ( TextDirNone TextDirection = iota TextDirLtr TextDirRtl )
type TextSearchFlags ¶
type TextSearchFlags uint64
Text search flags
const ( TEXT_SEARCH_VISIBLE_ONLY TextSearchFlags = 1 << 0 TEXT_SEARCH_TEXT_ONLY TextSearchFlags = 1 << iota )
type TextWindowType ¶
type TextWindowType uint64
Text window type
const ( TEXT_WINDOW_PRIVATE TextWindowType = iota TEXT_WINDOW_WIDGET TEXT_WINDOW_TEXT TEXT_WINDOW_LEFT TEXT_WINDOW_RIGHT TEXT_WINDOW_TOP TEXT_WINDOW_BOTTOM )
type ToolbarChildType ¶
type ToolbarChildType uint64
Toolbar child type
const ( TOOLBAR_CHILD_SPACE ToolbarChildType = iota TOOLBAR_CHILD_BUTTON TOOLBAR_CHILD_TOGGLEBUTTON TOOLBAR_CHILD_RADIOBUTTON TOOLBAR_CHILD_WIDGET )
type ToolbarSpaceStyle ¶
type ToolbarSpaceStyle uint64
Toolbar space style
const ( TOOLBAR_SPACE_EMPTY ToolbarSpaceStyle = iota TOOLBAR_SPACE_LINE )
type ToolbarStyle ¶
type ToolbarStyle uint64
Toolbar style
const ( TOOLBAR_ICONS ToolbarStyle = iota TOOLBAR_TEXT TOOLBAR_BOTH TOOLBAR_BOTH_HORIZ )
type TreeModelFlags ¶
type TreeModelFlags uint64
Tree model flags
const ( TREE_MODEL_ITERS_PERSIST TreeModelFlags = 1 << 0 TREE_MODEL_LIST_ONLY TreeModelFlags = 1 << iota )
type TreeViewColumnSizing ¶
type TreeViewColumnSizing uint64
Tree view column sizing
const ( TREE_VIEW_COLUMN_GROW_ONLY TreeViewColumnSizing = iota TREE_VIEW_COLUMN_AUTOSIZE TREE_VIEW_COLUMN_FIXED )
type TreeViewDropPosition ¶
type TreeViewDropPosition uint64
Tree view drop position
const ( TREE_VIEW_DROP_BEFORE TreeViewDropPosition = iota TREE_VIEW_DROP_AFTER TREE_VIEW_DROP_INTO_OR_BEFORE TREE_VIEW_DROP_INTO_OR_AFTER )
type TreeViewFlags ¶
type TreeViewFlags uint64
Tree view flags
const ( TREE_VIEW_IS_LIST TreeViewFlags = 1 << 0 TREE_VIEW_SHOW_EXPANDERS TreeViewFlags = 1 << iota TREE_VIEW_IN_COLUMN_RESIZE TREE_VIEW_ARROW_PRELIT TREE_VIEW_HEADERS_VISIBLE TREE_VIEW_DRAW_KEYFOCUS TREE_VIEW_MODEL_SETUP TREE_VIEW_IN_COLUMN_DRAG )
type TreeViewGridLines ¶
type TreeViewGridLines uint64
Tree view grid lines
const ( TREE_VIEW_GRID_LINES_NONE TreeViewGridLines = iota TREE_VIEW_GRID_LINES_HORIZONTAL TREE_VIEW_GRID_LINES_VERTICAL TREE_VIEW_GRID_LINES_BOTH )
type TreeViewMode ¶
type TreeViewMode uint64
Tree view mode
const ( TREE_VIEW_LINE TreeViewMode = iota TREE_VIEW_ITEM )
type UIManagerItemType ¶
type UIManagerItemType uint64
Manager item type
const ( UI_MANAGER_AUTO UIManagerItemType = 0 UI_MANAGER_MENUBAR UIManagerItemType = 1 << 0 UI_MANAGER_MENU UIManagerItemType = 1 << iota UI_MANAGER_TOOLBAR UI_MANAGER_PLACEHOLDER UI_MANAGER_POPUP UI_MANAGER_MENUITEM UI_MANAGER_TOOLITEM UI_MANAGER_SEPARATOR UI_MANAGER_ACCELERATOR UI_MANAGER_POPUP_WITH_ACCELS )
type UpdateType ¶
type UpdateType uint64
Update type
const ( UpdateContinuous UpdateType = iota UpdateDiscontinuous UpdateDelayed )
func (UpdateType) FromString ¶
func (t UpdateType) FromString(value string) (enum interface{}, err error)
type VButtonBox ¶
type VScrollbar ¶
type Viewport ¶
type Viewport interface {
Bin
Init() (already bool)
GetHAdjustment() *CAdjustment
SetHAdjustment(adjustment *CAdjustment)
GetVAdjustment() *CAdjustment
SetVAdjustment(adjustment *CAdjustment)
SetShadowType(shadowType ShadowType)
GetShadowType() (value ShadowType)
GetBinWindow() (value Window)
GetViewWindow() (value Window)
}
Viewport Hierarchy:
Object
+- Widget
+- Container
+- Bin
+- Viewport
The Viewport widget acts as an adaptor class, implementing scrollability for child widgets that lack their own scrolling capabilities. Use Viewport to scroll child widgets such as Table, Box, and so on. If a widget has native scrolling abilities, such as TextView, TreeView IconView, it can be added to a ScrolledWindow with Container.Add. If a widget does not, you must first add the widget to a Viewport, then add the viewport to the scrolled window. The convenience function ScrolledWindow.AddWithViewport does exactly this, so you can ignore the presence of the viewport.
type Visibility ¶
type Visibility uint64
Visibility
const ( VISIBILITY_NONE Visibility = iota VISIBILITY_PARTIAL VISIBILITY_FULL )
type Widget ¶
type Widget interface {
Object
Init() (already bool)
Destroy()
Unparent()
Show()
Hide()
ShowAll()
AddAccelerator(accelSignal string, accelGroup AccelGroup, accelKey int, accelMods ModifierType, accelFlags AccelFlags)
RemoveAccelerator(accelGroup AccelGroup, accelKey int, accelMods ModifierType) (value bool)
SetAccelPath(accelPath string, accelGroup AccelGroup)
CanActivateAccel(signalId int) (value bool)
Activate() (value bool)
Reparent(parent Container)
IsFocus() (value bool)
GrabFocus()
GrabDefault()
SetState(state StateType)
SetSensitive(sensitive bool)
CssFullPath() (path string)
CssState() (state StateType)
SetParent(parent Container)
SetParentWindow(parentWindow Window)
GetParentWindow() (value Window)
SetEvents(events cdk.EventMask)
AddEvents(events cdk.EventMask)
GetToplevel() (value Widget)
GetAncestor(widgetType cdk.CTypeTag) (value Widget)
GetEvents() (value cdk.EventMask)
GetPointer(x int, y int)
IsAncestor(ancestor Widget) (value bool)
TranslateCoordinates(destWidget Widget, srcX int, srcY int, destX int, destY int) (value bool)
SetDirection(dir TextDirection)
GetDirection() (value TextDirection)
SetDefaultDirection(dir TextDirection)
GetDefaultDirection() (value TextDirection)
Path() (path string)
ClassPath(pathLength int, path string, pathReversed string)
GetCompositeName() (value string)
SetAppPaintable(appPaintable bool)
SetCompositeName(name string)
SetScrollAdjustments(hAdjustment Adjustment, vAdjustment Adjustment) (value bool)
SendExpose(event cdk.Event) (value int)
SendFocusChange(event cdk.Event) (value bool)
ChildFocus(direction DirectionType) (value bool)
ChildNotify(childProperty string)
FreezeChildNotify()
GetChildVisible() (value bool)
GetParent() (value Container)
GetDisplay() (value cdk.Display)
GetRootWindow() (value Window)
GetScreen() (value cdk.Display)
HasScreen() (value bool)
GetSizeRequest() (width, height int)
SizeRequest() ptypes.Rectangle
SetSizeRequest(width, height int)
SetNoShowAll(noShowAll bool)
GetNoShowAll() (value bool)
AddMnemonicLabel(label Widget)
RemoveMnemonicLabel(label Widget)
ErrorBell()
GetTooltipMarkup() (value string)
SetTooltipMarkup(markup string)
GetTooltipText() (value string)
SetTooltipText(text string)
GetTooltipWindow() (value Window)
SetTooltipWindow(customWindow Window)
GetHasTooltip() (value bool)
SetHasTooltip(hasTooltip bool)
TriggerTooltipQuery()
GetWindow() (window Window)
GetAppPaintable() (value bool)
GetCanDefault() (value bool)
SetCanDefault(canDefault bool)
GetCanFocus() (value bool)
SetCanFocus(canFocus bool)
GetHasWindow() (value bool)
GetSensitive() (value bool)
IsSensitive() bool
GetState() (value StateType)
GetVisible() (value bool)
SetVisible(visible bool)
HasDefault() (value bool)
HasFocus() (value bool)
HasGrab() (value bool)
IsDrawable() (value bool)
IsToplevel() (value bool)
SetWindow(window Window)
SetReceivesDefault(receivesDefault bool)
GetReceivesDefault() (value bool)
GetTheme() (theme paint.Theme)
GetThemeRequest() (theme paint.Theme)
SetTheme(theme paint.Theme)
HasState(s StateType) bool
UnsetState(v StateType)
GetFlags() WidgetFlags
HasFlags(f WidgetFlags) bool
UnsetFlags(v WidgetFlags)
SetFlags(v WidgetFlags)
IsParentFocused() bool
IsFocused() bool
CanFocus() bool
IsDefault() bool
CanDefault() bool
IsVisible() bool
HasEventFocus() bool
GrabEventFocus()
ReleaseEventFocus()
GetTopParent() (parent Container)
GetWidgetAt(p *ptypes.Point2I) Widget
Draw() enums.EventFlag
}
Widget Hierarchy:
Object
+- Widget
+- Container
+- Misc
+- Calendar
+- CellView
+- DrawingArea
+- Entry
+- Ruler
+- Range
+- Separator
+- HSV
+- Invisible
+- OldEditable
+- Preview
+- Progress
Widget is the base class all widgets in CTK derive from. It manages the widget lifecycle, states and style.
type WidgetFlags ¶
type WidgetFlags uint64
Widget flags
const ( NULL_WIDGET_FLAG WidgetFlags = 0 TOPLEVEL WidgetFlags = 1 << (iota + 2) NO_WINDOW REALIZED MAPPED VISIBLE SENSITIVE PARENT_SENSITIVE CAN_FOCUS HAS_FOCUS CAN_DEFAULT HAS_DEFAULT HAS_GRAB RC_STYLE COMPOSITE_CHILD NO_REPARENT APP_PAINTABLE RECEIVES_DEFAULT DOUBLE_BUFFERED NO_SHOW_ALL INVALID_WIDGET_FLAG )
func (WidgetFlags) HasBit ¶
func (f WidgetFlags) HasBit(flag WidgetFlags) bool
type WidgetHelpType ¶
type WidgetHelpType uint64
Widget help type
const ( WIDGET_HELP_TOOLTIP WidgetHelpType = iota WIDGET_HELP_WHATS_THIS )
type Window ¶
type Window interface {
Bin
cdk.Window
Init() (already bool)
Build(builder Builder, element *CBuilderElement) error
AddStylesFromString(css string) (err error)
ReplaceStylesFromString(css string) (err error)
ApplyStylesTo(widget Widget)
SetTitle(title string)
SetResizable(resizable bool)
GetResizable() (value bool)
AddAccelGroup(accelGroup AccelGroup)
RemoveAccelGroup(accelGroup AccelGroup)
ActivateFocus() (value bool)
ActivateDefault() (value bool)
SetModal(modal bool)
SetPosition(position WindowPosition)
SetTransientFor(parent Window)
SetDestroyWithParent(setting bool)
IsActive() (active bool)
HasToplevelFocus() (focused bool)
ListTopLevels() (value []Window)
AddMnemonic(keyval rune, target interface{})
RemoveMnemonic(keyval rune, target interface{})
RemoveWidgetMnemonics(target interface{})
MnemonicActivate(keyval rune, modifier cdk.ModMask) (activated bool)
ActivateKey(event cdk.EventKey) (value bool)
PropagateKeyEvent(event cdk.EventKey) (value bool)
GetFocus() (focus interface{})
SetFocus(focus interface{})
GetDefaultWidget() (value Widget)
SetDefault(defaultWidget Widget)
Present()
PresentWithTime(timestamp int)
Iconify()
Deiconify()
Stick()
Unstick()
Maximize()
Unmaximize()
Fullscreen()
Unfullscreen()
SetKeepAbove(setting bool)
SetKeepBelow(setting bool)
SetDecorated(setting bool)
SetDeletable(setting bool)
SetMnemonicModifier(modifier cdk.ModMask)
SetSkipTaskbarHint(setting bool)
SetSkipPagerHint(setting bool)
SetUrgencyHint(setting bool)
SetAcceptFocus(setting bool)
SetFocusOnMap(setting bool)
SetStartupId(startupId string)
SetRole(role string)
GetDecorated() (value bool)
GetDeletable() (value bool)
GetDefaultSize(width int, height int)
GetDestroyWithParent() (value bool)
GetMnemonicModifier() (value cdk.ModMask)
GetModal() (value bool)
GetPosition(rootX int, rootY int)
GetRole() (value string)
GetSize() (width, height int)
GetTitle() (value string)
GetTransientFor() (value Window)
GetSkipTaskbarHint() (value bool)
GetSkipPagerHint() (value bool)
GetUrgencyHint() (value bool)
GetAcceptFocus() (value bool)
GetFocusOnMap() (value bool)
HasGroup() (value bool)
Move(x int, y int)
ParseGeometry(geometry string) (value bool)
ReshowWithInitialSize()
SetAutoStartupNotification(setting bool)
GetOpacity() (value float64)
SetOpacity(opacity float64)
GetMnemonicsVisible() (value bool)
SetMnemonicsVisible(setting bool)
GetDisplay() (dm cdk.Display)
SetDisplay(dm cdk.Display)
GetVBox() (vbox VBox)
GetNextFocus() (next interface{})
GetPreviousFocus() (previous interface{})
FocusNext() enums.EventFlag
FocusPrevious() enums.EventFlag
GetEventFocus() (o interface{})
SetEventFocus(o interface{})
}
Window Hierarchy:
Object
+- Widget
+- Container
+- Bin
+- Window
+- Dialog
+- Assistant
+- OffscreenWindow
+- Plug
In the Curses Tool Kit, the Window type is an extension of the CTK Bin type and also implements the cdk.Window interface so that it can be utilized within the Curses Development Kit framework. A Window is a TOPLEVEL Widget that can contain other widgets.
type WindowEdge ¶
type WindowEdge uint64
const ( WindowEdgeNone WindowEdge = iota WindowEdgeNorthWest WindowEdgeNorth WindowEdgeNorthEast WindowEdgeWest WindowEdgeEast WindowEdgeSouthWest WindowEdgeSouth WindowEdgeSouthEast )
func (WindowEdge) FromString ¶
func (e WindowEdge) FromString(value string) (enum interface{}, err error)
type WindowPosition ¶
type WindowPosition uint64
Window position
const ( WinPosNone WindowPosition = iota WinPosCenter WinPosMouse WinPosCenterAlways WinPosCenterOnParent )
type WindowType ¶
type WindowType uint64
Window type
const ( WindowTopLevel WindowType = iota WindowPopup )
func (WindowType) FromString ¶
func (t WindowType) FromString(value string) (enum interface{}, err error)
type WindowTypeHint ¶
type WindowTypeHint uint64
const ( // A normal toplevel window. WindowTypeHintNormal WindowTypeHint = iota // A dialog window. WindowTypeHintDialog // A window used to implement a menu. WindowTypeHintMenu // A window used to implement a toolbar. WindowTypeHintToolbar // A window used to implement a splash screen WindowTypeHintSplashscreen // WindowTypeHintUtility // A window used to implement a docking bar. WindowTypeHintDock // A window used to implement a desktop. WindowTypeHintDesktop // A menu that belongs to a menubar. WindowTypeHintDropdownMenu // A menu that does not belong to a menubar, e.g. a context menu. WindowTypeHintPopupMenu // A tooltip. WindowTypeHintTooltip // A notification - typically a "bubble" that belongs to a status icon. WindowTypeHintNotification // A popup from a combo box. WindowTypeHintCombo // A window that is used to implement a DND cursor. WindowTypeHintDND )
func (WindowTypeHint) FromString ¶
func (t WindowTypeHint) FromString(value string) (enum interface{}, err error)
type WithFakeWindowFn ¶
type WithFakeWindowFn = func(w Window)
Source Files
¶
- accel_group.go
- accel_group_entry.go
- accel_groups.go
- accel_key.go
- activatable.go
- adjustment.go
- alignable.go
- alignment.go
- arrow.go
- bin.go
- box.go
- buildable.go
- builder.go
- builder_element.go
- builder_node.go
- button.go
- button_box.go
- container.go
- ctk.go
- dialog.go
- drawable.go
- enums.go
- event_box.go
- fake_window.go
- frame.go
- hbox.go
- hbutton_box.go
- hscrollbar.go
- label.go
- misc.go
- object.go
- orientable.go
- range.go
- rcstyle.go
- scrollbar.go
- scrolled_viewport.go
- selection.go
- sensitive.go
- signals.go
- stock_items.go
- style.go
- style_property.go
- style_sheet.go
- style_sheet_media.go
- style_sheet_property.go
- style_sheet_rule.go
- style_sheet_selector.go
- testing.go
- vbox.go
- vbutton_box.go
- viewport.go
- vscrollbar.go
- widget.go
- window.go





