Documentation ¶
Overview ¶
CTK - Curses Tool Kit
The Curses Tool Kit a curses-based graphical user interface library modeled after the GTK project.
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 | `- Box | |- HBox | `- VBox |- 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.DisplayManager) error
- func WithFakeWindow(fn WithFakeWindowFn) func()
- func WithFakeWindowOptions(w, h int, theme cdk.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 BitFlags
- 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 cdk.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() cdk.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() cdk.EventFlag
- type CAlignment
- func (a *CAlignment) Add(w Widget)
- func (a *CAlignment) Draw(canvas cdk.Canvas) cdk.EventFlag
- 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) Invalidate() cdk.EventFlag
- func (a *CAlignment) Remove(w Widget)
- func (a *CAlignment) Resize() cdk.EventFlag
- func (a *CAlignment) Set(xAlign, yAlign, xScale, yScale float64)
- func (a *CAlignment) SetPadding(paddingTop, paddingBottom, paddingLeft, paddingRight int)
- type CArrow
- type CBin
- type CBitFlags
- type CBox
- func (b *CBox) Add(child Widget)
- func (b *CBox) Build(builder Builder, element *CBuilderElement) error
- func (b *CBox) Draw(canvas cdk.Canvas) cdk.EventFlag
- func (b *CBox) GetFocusChain() (focusableWidgets []interface{}, explicitlySet bool)
- func (b *CBox) GetHomogeneous() (value bool)
- func (b *CBox) GetOrientation() (orientation cdk.Orientation)
- 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) Resize() cdk.EventFlag
- 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 cdk.Orientation)
- func (b *CBox) SetSpacing(spacing int)
- func (b *CBox) ShowAll()
- 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) Add(w Widget)
- func (b *CButton) Build(builder Builder, element *CBuilderElement) error
- func (b *CButton) CancelEvent()
- func (b *CButton) Clicked() cdk.EventFlag
- func (b *CButton) Draw(canvas cdk.Canvas) cdk.EventFlag
- func (b *CButton) GetAlignment() (xAlign float64, yAlign float64)
- func (b *CButton) GetDefaultChildren() []Widget
- 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) GetThemeRequest() (theme cdk.Theme)
- func (b *CButton) GetUseStock() (value bool)
- func (b *CButton) GetUseUnderline() (value bool)
- func (b *CButton) GetWidgetAt(p *cdk.Point2I) Widget
- func (b *CButton) GrabEventFocus()
- func (b *CButton) GrabFocus()
- func (b *CButton) Init() (already bool)
- func (b *CButton) Invalidate() cdk.EventFlag
- func (b *CButton) ProcessEvent(evt cdk.Event) cdk.EventFlag
- func (b *CButton) Remove(w Widget)
- func (b *CButton) Resize() cdk.EventFlag
- 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) SetUseStock(useStock bool)
- func (b *CButton) SetUseUnderline(useUnderline bool)
- type CButtonBox
- func (b *CButtonBox) Add(w Widget)
- func (b *CButtonBox) Build(builder Builder, element *CBuilderElement) error
- func (b *CButtonBox) Draw(canvas cdk.Canvas) cdk.EventFlag
- 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) Hide()
- func (b *CButtonBox) Init() (already bool)
- func (b *CButtonBox) Invalidate() cdk.EventFlag
- 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) Resize() cdk.EventFlag
- 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)
- func (b *CButtonBox) Show()
- func (b *CButtonBox) ShowAll()
- 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) ForAll(callback Callback, callbackData interface{})
- func (c *CContainer) ForEach(callback Callback, callbackData interface{})
- 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 *cdk.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) 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) (value 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) Draw(canvas cdk.Canvas) cdk.EventFlag
- 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) Invalidate() cdk.EventFlag
- func (d *CDialog) ProcessEvent(evt cdk.Event) cdk.EventFlag
- func (d *CDialog) Resize() cdk.EventFlag
- 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()
- type CEventBox
- func (b *CEventBox) Activate() (value bool)
- func (b *CEventBox) CancelEvent()
- func (e *CEventBox) GetAboveChild() (value bool)
- func (e *CEventBox) GetVisibleWindow() (value bool)
- func (b *CEventBox) GrabFocus()
- func (b *CEventBox) Init() (already bool)
- func (b *CEventBox) ProcessEvent(evt cdk.Event) cdk.EventFlag
- func (e *CEventBox) SetAboveChild(aboveChild bool)
- func (e *CEventBox) SetVisibleWindow(visibleWindow bool)
- type CFakeWindow
- type CFrame
- func (f *CFrame) Add(w Widget)
- func (f *CFrame) Draw(canvas cdk.Canvas) cdk.EventFlag
- 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) GetThemeRequest() (theme cdk.Theme)
- func (f *CFrame) GetWidgetAt(p *cdk.Point2I) Widget
- func (f *CFrame) GrabFocus()
- func (f *CFrame) Init() (already bool)
- func (f *CFrame) Invalidate() cdk.EventFlag
- func (f *CFrame) IsFocus() bool
- func (f *CFrame) Remove(w Widget)
- func (f *CFrame) Resize() cdk.EventFlag
- 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) Draw(canvas cdk.Canvas) cdk.EventFlag
- func (l *CLabel) GetAttributes() (value cdk.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 cdk.Justification)
- func (l *CLabel) GetLabel() (value string)
- func (l *CLabel) GetLineWrap() (value bool)
- func (l *CLabel) GetLineWrapMode() (value cdk.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) Invalidate() cdk.EventFlag
- func (l *CLabel) Resize() cdk.EventFlag
- func (l *CLabel) SelectRegion(startOffset int, endOffset int)
- func (l *CLabel) SetAttributes(attrs cdk.Style)
- func (l *CLabel) SetEllipsize(mode bool)
- func (l *CLabel) SetJustify(justify cdk.Justification)
- func (l *CLabel) SetLabel(str string)
- func (l *CLabel) SetLineWrap(wrap bool)
- func (l *CLabel) SetLineWrapMode(wrapMode cdk.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) SetTheme(theme cdk.Theme)
- 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) Draw(canvas cdk.Canvas) cdk.EventFlag
- func (o *CObject) GetAllocation() cdk.Rectangle
- func (o *CObject) GetCssBool(name cdk.Property) (value bool, err error)
- func (o *CObject) GetCssColor(name cdk.Property) (value cdk.Color, err error)
- func (o *CObject) GetCssFloat(name cdk.Property) (value float64, err error)
- func (o *CObject) GetCssInt(name cdk.Property) (value int, err error)
- func (o *CObject) GetCssProperties() (properties []*cdk.CProperty)
- func (o *CObject) GetCssProperty(name cdk.Property) (property *cdk.CProperty)
- func (o *CObject) GetCssString(name cdk.Property) (value string, err error)
- func (o *CObject) GetObjectAt(p *cdk.Point2I) Object
- func (o *CObject) GetOrigin() cdk.Point2I
- func (o *CObject) GetTextDirection() (direction TextDirection)
- func (o *CObject) HasPoint(p *cdk.Point2I) (contains bool)
- func (o *CObject) Init() (already bool)
- func (o *CObject) InstallCssProperty(name cdk.Property, kind cdk.PropertyType, write bool, def interface{}) (err error)
- func (o *CObject) Invalidate() cdk.EventFlag
- func (o *CObject) ObjectInfo() string
- func (o *CObject) ProcessEvent(evt cdk.Event) cdk.EventFlag
- func (o *CObject) Resize() cdk.EventFlag
- func (o *CObject) SetAllocation(size cdk.Rectangle)
- 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 cdk.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) cdk.EventFlag
- func (s *CScrollbar) BackwardPage() cdk.EventFlag
- func (s *CScrollbar) BackwardStep() cdk.EventFlag
- func (s *CScrollbar) CancelEvent()
- func (s *CScrollbar) Changed()
- func (s *CScrollbar) Draw(canvas cdk.Canvas) cdk.EventFlag
- func (s *CScrollbar) Forward(step int) cdk.EventFlag
- func (s *CScrollbar) ForwardPage() cdk.EventFlag
- func (s *CScrollbar) ForwardStep() cdk.EventFlag
- func (s *CScrollbar) GetAllStepperRegions() (fwd, bwd, sFwd, sBwd cdk.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 cdk.Region)
- func (s *CScrollbar) GetStepperRegions() (start, end cdk.Region)
- func (s *CScrollbar) GetTroughRegion() (region cdk.Region)
- func (s *CScrollbar) GetWidgetAt(p *cdk.Point2I) Widget
- func (s *CScrollbar) GrabFocus()
- func (s *CScrollbar) Init() (already bool)
- func (s *CScrollbar) Invalidate() cdk.EventFlag
- func (s *CScrollbar) ProcessEvent(evt cdk.Event) cdk.EventFlag
- func (s *CScrollbar) ProcessEventAtPoint(p *cdk.Point2I, e *cdk.EventMouse) cdk.EventFlag
- func (s *CScrollbar) Resize() cdk.EventFlag
- 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) Draw(canvas cdk.Canvas) cdk.EventFlag
- 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 cdk.Region)
- func (s *CScrolledViewport) GetShadowType() (value ShadowType)
- func (s *CScrolledViewport) GetVAdjustment() (value Adjustment)
- func (s *CScrolledViewport) GetVScrollbar() *CVScrollbar
- func (s *CScrolledViewport) GetWidgetAt(p *cdk.Point2I) Widget
- func (s *CScrolledViewport) GrabFocus()
- func (s *CScrolledViewport) Hide()
- func (s *CScrolledViewport) HorizontalShowByPolicy() (show bool)
- func (s *CScrolledViewport) Init() (already bool)
- func (s *CScrolledViewport) InternalGetWidgetAt(p *cdk.Point2I) Widget
- func (s *CScrolledViewport) Invalidate() cdk.EventFlag
- func (s *CScrolledViewport) ProcessEvent(evt cdk.Event) cdk.EventFlag
- func (s *CScrolledViewport) ProcessEventAtPoint(p *cdk.Point2I, evt *cdk.EventMouse) cdk.EventFlag
- func (s *CScrolledViewport) Remove(w Widget)
- func (s *CScrolledViewport) Resize() cdk.EventFlag
- 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) SetTheme(theme cdk.Theme)
- 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) ApplyDefaultBackground(window Window, setBg bool, stateType StateType, area cdk.Rectangle, x int, ...)
- func (s *CStyle) Attach(window Window) (value Style)
- func (s *CStyle) Copy() (value Style)
- func (s *CStyle) Detach()
- func (s *CStyle) GetStyleProperty(widgetType cdk.CTypeTag, propertyName string) (value interface{})
- func (s *CStyle) Init() (already bool)
- func (s *CStyle) LookupColor(colorName string, color cdk.Color) (value bool)
- func (s *CStyle) PaintArrow(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintBox(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintBoxGap(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintCheck(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintDiamond(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintExpander(window Window, stateType StateType, area cdk.Rectangle, widget Widget, ...)
- func (s *CStyle) PaintExtension(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintFlatBox(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintFocus(window Window, stateType StateType, area cdk.Rectangle, widget Widget, ...)
- func (s *CStyle) PaintHandle(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintOption(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintPolygon(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintResizeGrip(window Window, stateType StateType, area cdk.Rectangle, widget Widget, ...)
- func (s *CStyle) PaintShadow(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintShadowGap(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintSlider(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintSpinner(window Window, stateType StateType, area cdk.Rectangle, widget Widget, ...)
- func (s *CStyle) PaintTab(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, ...)
- func (s *CStyle) PaintVLine(window Window, stateType StateType, area cdk.Rectangle, widget Widget, ...)
- type CTreeExpanderStyle
- type CTreeExpansionType
- type CTreeLineStyle
- type CTreePos
- type CVBox
- type CVButtonBox
- type CVScrollbar
- type CViewport
- func (v *CViewport) Draw(canvas cdk.Canvas) cdk.EventFlag
- 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) Invalidate() cdk.EventFlag
- func (v *CViewport) Resize() cdk.EventFlag
- 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) Destroy()
- func (w *CWidget) Destroyed(widgetPointer Widget)
- func (w *CWidget) EnsureStyle()
- func (w *CWidget) ErrorBell()
- func (w *CWidget) Event(event cdk.Event) (value bool)
- 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) GetColormap() (value cdk.Colormap)
- func (w *CWidget) GetCompositeName() (value string)
- func (w *CWidget) GetDefaultColormap() (value cdk.Colormap)
- func (w *CWidget) GetDefaultDirection() (value TextDirection)
- func (w *CWidget) GetDefaultStyle() (value Style)
- func (w *CWidget) GetDefaultVisual() (value cdk.Visual)
- func (w *CWidget) GetDirection() (value TextDirection)
- func (w *CWidget) GetDisplay() (value cdk.DisplayManager)
- func (w *CWidget) GetDoubleBuffered() (value bool)
- func (w *CWidget) GetEvents() (value cdk.EventMask)
- func (w *CWidget) GetFlags() WidgetFlags
- func (w *CWidget) GetHasTooltip() (value bool)
- func (w *CWidget) GetHasWindow() (value bool)
- func (w *CWidget) GetMapped() (value bool)
- func (w *CWidget) GetModifierStyle() (value RcStyle)
- func (w *CWidget) GetName() (value string)
- 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) GetSnapshot(clipRect cdk.Rectangle) (value cdk.Pixmap)
- func (w *CWidget) GetState() (value StateType)
- func (w *CWidget) GetStyle() (value Style)
- func (w *CWidget) GetThemeRequest() (theme cdk.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) GetVisual() (value cdk.Visual)
- func (w *CWidget) GetWidgetAt(p *cdk.Point2I) Widget
- func (w *CWidget) GetWindow() (window Window)
- func (w *CWidget) GrabDefault()
- func (w *CWidget) GrabEventFocus()
- func (w *CWidget) GrabFocus()
- func (w *CWidget) GtkCallback(data interface{})
- 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) HasRcStyle() (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) Intersect(area cdk.Rectangle, intersection cdk.Rectangle) (value bool)
- func (w *CWidget) IsAncestor(ancestor Widget) (value bool)
- func (w *CWidget) IsComposited() (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) ListAccelClosures() (value cdk.CList)
- func (w *CWidget) ListMnemonicLabels() (value cdk.CList)
- func (w *CWidget) Map()
- func (w *CWidget) ModifyBase(state StateType, color cdk.Color)
- func (w *CWidget) ModifyBg(state StateType, color cdk.Color)
- func (w *CWidget) ModifyCursor(primary cdk.Color, secondary cdk.Color)
- func (w *CWidget) ModifyFg(state StateType, color cdk.Color)
- func (w *CWidget) ModifyStyle(style RcStyle)
- func (w *CWidget) ModifyText(state StateType, color cdk.Color)
- func (w *CWidget) Path() (path string)
- func (w *CWidget) PopColormap()
- func (w *CWidget) PopCompositeChild()
- func (w *CWidget) PushColormap(cmap cdk.Colormap)
- func (w *CWidget) PushCompositeChild()
- func (w *CWidget) QueueDraw()
- func (w *CWidget) QueueDrawArea(x int, y int, width int, height int)
- func (w *CWidget) QueueResizeNoRedraw()
- func (w *CWidget) Realize()
- func (w *CWidget) RegionIntersect(region cdk.Region) (value cdk.Region)
- 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) ResetRcStyles()
- 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) SetChildVisible(isVisible bool)
- func (w *CWidget) SetColormap(colormap cdk.Colormap)
- func (w *CWidget) SetCompositeName(name string)
- func (w *CWidget) SetDefaultColormap(colormap cdk.Colormap)
- 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) SetHasWindow(hasWindow bool)
- func (w *CWidget) SetMapped(mapped bool)
- func (w *CWidget) SetName(name string)
- 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) SetStyle(style Style)
- func (w *CWidget) SetTheme(theme cdk.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) ShowNow()
- func (w *CWidget) SizeRequest() cdk.Rectangle
- func (w *CWidget) ThawChildNotify()
- func (w *CWidget) TranslateCoordinates(destWidget Widget, srcX int, srcY int, destX int, destY int) (value bool)
- func (w *CWidget) TriggerTooltipQuery()
- func (w *CWidget) Unmap()
- func (w *CWidget) Unparent()
- func (w *CWidget) Unrealize()
- func (w *CWidget) UnsetFlags(v WidgetFlags)
- func (w *CWidget) UnsetState(v 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) Build(builder Builder, element *CBuilderElement) error
- func (w *CWindow) Deiconify()
- func (w *CWindow) Draw(canvas cdk.Canvas) cdk.EventFlag
- func (w *CWindow) FocusNext() cdk.EventFlag
- func (w *CWindow) FocusPrevious() cdk.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) GetDisplayManager() (dm cdk.DisplayManager)
- 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) GetThemeRequest() (theme cdk.Theme)
- 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) Invalidate() cdk.EventFlag
- 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) ProcessEvent(evt cdk.Event) cdk.EventFlag
- 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) ReshowWithInitialSize()
- func (w *CWindow) Resize() cdk.EventFlag
- 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) SetDisplayManager(dm cdk.DisplayManager)
- 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) SetWmClass(wmClassName string, wmClassClass string)
- func (w *CWindow) Stick()
- func (w *CWindow) Unfullscreen()
- func (w *CWindow) Unmaximize()
- func (w *CWindow) Unstick()
- type CalendarDisplayOptions
- type Callback
- 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 StyleSheet
- 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 = "draw" 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" 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 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 PropertyBackgroundColor cdk.Property = "background-color"
const PropertyBackgroundFillContent cdk.Property = "background-fill-content"
const PropertyBlink cdk.Property = "blink"
const PropertyBold cdk.Property = "bold"
const PropertyBorder cdk.Property = "border"
const PropertyBorderBackgroundColor cdk.Property = "border-background-color"
const PropertyBorderBottomContent cdk.Property = "border-bottom-content"
const PropertyBorderBottomLeftContent cdk.Property = "border-bottom-left-content"
const PropertyBorderBottomRightContent cdk.Property = "border-bottom-right-content"
const PropertyBorderColor cdk.Property = "border-color"
const PropertyBorderLeftContent cdk.Property = "border-left-content"
const PropertyBorderRightContent cdk.Property = "border-right-content"
const PropertyBorderTopContent cdk.Property = "border-top-content"
const PropertyBorderTopLeftContent cdk.Property = "border-top-left-content"
const PropertyBorderTopRightContent cdk.Property = "border-top-right-content"
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 PropertyClass cdk.Property = "class"
grouping label
const PropertyColor cdk.Property = "color"
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
convenience wrapper for 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 PropertyDim cdk.Property = "dim"
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 PropertyHeight cdk.Property = "height"
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 PropertyItalic cdk.Property = "italic"
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: cdk.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 PropertyReverse cdk.Property = "reverse"
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 PropertyStrike cdk.Property = "strike"
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 PropertyUnderline cdk.Property = "underline"
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 PropertyWidth cdk.Property = "width"
css properties
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 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 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 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 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 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 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 SignalStyleRealize cdk.Signal = "realize"
Emitted when the style has been initialized for a particular colormap and depth. Connecting to this signal is probably seldom useful since most of the time applications and widgets only deal with styles that have been already realized.
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 SignalStyleUnrealize cdk.Signal = "unrealize"
Emitted when the aspects of the style specific to a particular colormap and depth are being cleaned up. A connection to this signal can be useful if a widget wants to cache objects like a GC as object data on Style. This signal provides a convenient place to free such cached objects.
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"
CDK type-tag for Adjustment objects
const TypeAlignment cdk.CTypeTag = "ctk-alignment"
CDK type-tag for Alignment objects
const TypeArrow cdk.CTypeTag = "ctk-arrow"
CDK type-tag for Arrow objects
const TypeBin cdk.CTypeTag = "ctk-bin"
CDK type-tag for Bin objects
const TypeBox cdk.CTypeTag = "ctk-box"
CDK type-tag for Box objects
const TypeBuilder cdk.CTypeTag = "ctk-builder"
const TypeButton cdk.CTypeTag = "ctk-button"
CDK type-tag for Button objects
const TypeButtonBox cdk.CTypeTag = "ctk-button-box"
CDK type-tag for ButtonBox objects
const TypeContainer cdk.CTypeTag = "ctk-container"
CDK type-tag for Container objects
const TypeDialog cdk.CTypeTag = "ctk-dialog"
CDK type-tag for Dialog objects
const TypeEventBox cdk.CTypeTag = "ctk-event-box"
CDK type-tag for EventBox objects
const TypeFakeWindow cdk.CTypeTag = "ctk-fake-window"
const TypeFrame cdk.CTypeTag = "ctk-frame"
CDK type-tag for Frame objects
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"
CDK type-tag for Label objects
const TypeMisc cdk.CTypeTag = "ctk-misc"
CDK type-tag for Misc objects
const TypeObject cdk.CTypeTag = "ctk-object"
CDK type tag for CTK Objects
const TypeRange cdk.CTypeTag = "ctk-range"
CDK type-tag for Range objects
const TypeScrollbar cdk.CTypeTag = "ctk-scrollbar"
CDK type-tag for Scrollbar objects
const (
TypeScrolledViewport cdk.CTypeTag = "ctk-scrolled-viewport"
)
const TypeStyle cdk.CTypeTag = "ctk-style"
CDK type-tag for Style objects
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"
CDK type-tag for Widget objects
const TypeWindow cdk.CTypeTag = "ctk-window"
CDK type-tag for Window objects
Variables ¶
var ( DefaultMonoButtonTheme = cdk.Theme{ Content: cdk.ThemeAspect{ Normal: cdk.DefaultMonoStyle, Focused: cdk.DefaultMonoStyle.Dim(false), Active: cdk.DefaultMonoStyle.Dim(false).Bold(true), FillRune: cdk.DefaultFillRune, BorderRunes: cdk.DefaultBorderRune, ArrowRunes: cdk.DefaultArrowRune, Overlay: false, }, Border: cdk.ThemeAspect{ Normal: cdk.DefaultMonoStyle, Focused: cdk.DefaultMonoStyle.Dim(false), Active: cdk.DefaultMonoStyle.Dim(false).Bold(true), FillRune: cdk.DefaultFillRune, BorderRunes: cdk.DefaultBorderRune, ArrowRunes: cdk.DefaultArrowRune, Overlay: false, }, } DefaultColorButtonTheme = cdk.Theme{ Content: cdk.ThemeAspect{ Normal: cdk.DefaultColorStyle.Foreground(cdk.ColorWhite).Background(cdk.ColorFireBrick).Dim(true).Bold(false), Focused: cdk.DefaultColorStyle.Foreground(cdk.ColorWhite).Background(cdk.ColorDarkRed).Dim(false).Bold(true), Active: cdk.DefaultColorStyle.Foreground(cdk.ColorWhite).Background(cdk.ColorDarkRed).Dim(false).Bold(true).Reverse(true), FillRune: cdk.DefaultFillRune, BorderRunes: cdk.DefaultBorderRune, ArrowRunes: cdk.DefaultArrowRune, Overlay: false, }, Border: cdk.ThemeAspect{ Normal: cdk.DefaultColorStyle.Foreground(cdk.ColorWhite).Background(cdk.ColorFireBrick).Dim(true).Bold(false), Focused: cdk.DefaultColorStyle.Foreground(cdk.ColorWhite).Background(cdk.ColorDarkRed).Dim(false).Bold(true), Active: cdk.DefaultColorStyle.Foreground(cdk.ColorWhite).Background(cdk.ColorDarkRed).Dim(false).Bold(true).Reverse(true), FillRune: cdk.DefaultFillRune, BorderRunes: cdk.DefaultBorderRune, ArrowRunes: cdk.DefaultArrowRune, Overlay: false, }, } )
var ( DefaultMonoScrollbarTheme = cdk.Theme{ Content: cdk.ThemeAspect{ Normal: cdk.DefaultMonoStyle, Focused: cdk.DefaultMonoStyle.Dim(false), Active: cdk.DefaultMonoStyle.Dim(false).Bold(true), FillRune: cdk.DefaultFillRune, BorderRunes: cdk.DefaultBorderRune, ArrowRunes: cdk.DefaultArrowRune, Overlay: false, }, Border: cdk.ThemeAspect{ Normal: cdk.DefaultMonoStyle, Focused: cdk.DefaultMonoStyle.Dim(false), Active: cdk.DefaultMonoStyle.Dim(false).Bold(true), FillRune: cdk.DefaultFillRune, BorderRunes: cdk.DefaultBorderRune, ArrowRunes: cdk.DefaultArrowRune, Overlay: false, }, } DefaultColorScrollbarTheme = cdk.Theme{ Content: cdk.ThemeAspect{ Normal: cdk.DefaultColorStyle.Foreground(cdk.ColorDarkGray).Background(cdk.ColorSilver).Dim(true).Bold(false), Focused: cdk.DefaultColorStyle.Foreground(cdk.ColorBlack).Background(cdk.ColorWhite).Dim(false).Bold(true), Active: cdk.DefaultColorStyle.Foreground(cdk.ColorBlack).Background(cdk.ColorWhite).Dim(false).Bold(true), FillRune: cdk.DefaultFillRune, BorderRunes: cdk.DefaultBorderRune, ArrowRunes: cdk.DefaultArrowRune, Overlay: false, }, Border: cdk.ThemeAspect{ Normal: cdk.DefaultColorStyle.Foreground(cdk.ColorBlack).Background(cdk.ColorGray).Dim(true).Bold(false), Focused: cdk.DefaultColorStyle.Foreground(cdk.ColorWhite).Background(cdk.ColorDarkGray).Dim(false).Bold(true), Active: cdk.DefaultColorStyle.Foreground(cdk.ColorBlack).Background(cdk.ColorSilver).Dim(false).Bold(true), FillRune: cdk.DefaultFillRune, BorderRunes: cdk.DefaultBorderRune, ArrowRunes: cdk.DefaultArrowRune, Overlay: false, }, } )
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 TestingWithCtkWindow(d cdk.DisplayManager) error
func WithFakeWindow ¶
func WithFakeWindow(fn WithFakeWindowFn) func()
func WithFakeWindowOptions ¶
func WithFakeWindowOptions(w, h int, theme cdk.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 cdk.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
A AccelGroup represents a group of keyboard accelerators, typically attached to a toplevel Window (with WindowAddAccelGroup). 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 LabelNewWithMnemonic. Menu items can have both accelerators and mnemonics, of course.
type AccelGroupEntry ¶
func NewAccelGroupEntry ¶
func NewAccelGroupEntry(key AccelKey, closure GClosure, quark cdk.QuarkID) (age *AccelGroupEntry)
type AccelGroupFindFunc ¶
type AccelKey ¶
type AccelKey struct { Key cdk.Key Mods cdk.ModMask Flags AccelFlags }
func MakeAccelKey ¶
func MakeAccelKey(key cdk.Key, mods cdk.ModMask, flags AccelFlags) (accelKey AccelKey)
type Activatable ¶
type Activatable interface { // emit the Activate signal, use Clicked() to programmatically trigger // the activation of an Activatable Widget Activate() (value bool) // the Activatable Widget has been pressed and now released Clicked() cdk.EventFlag // set the related-action of a Widget? // can grab focus GrabFocus() }
Activatable Hierarchy:
CInterface +- Activatable
type Adjustment ¶
type Adjustment interface { Object Init() bool GetValue() (value int) SetValue(value int) ClampPage(upper, lower int) Changed() cdk.EventFlag ValueChanged() cdk.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 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) Invalidate() cdk.EventFlag Resize() cdk.EventFlag Draw(canvas cdk.Canvas) cdk.EventFlag }
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 align 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.
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 SetArrowType(arrow ArrowType) GetArrowType() (arrow ArrowType) GetArrowRune() (r rune, width int) GetSizeRequest() (width, height int) Draw(canvas cdk.Canvas) cdk.EventFlag }
Arrow Hierarchy:
Object +- Widget +- Misc +- Arrow
Arrow 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 New. 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, HandleBox or ScrolledWindow.
type Box ¶
type Box interface { Container Buildable Orientable Init() (already bool) PackStart(child Widget, expand, fill bool, padding int) PackEnd(child Widget, expand, fill bool, padding int) Remove(w Widget) GetOrientation() (orientation cdk.Orientation) SetOrientation(orientation cdk.Orientation) GetHomogeneous() (value bool) SetHomogeneous(homogeneous bool) GetSpacing() (value int) SetSpacing(spacing 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) Build(builder Builder, element *CBuilderElement) error ShowAll() Add(child Widget) GetFocusChain() (focusableWidgets []interface{}, explicitlySet bool) GetSizeRequest() (width, height int) Resize() cdk.EventFlag Draw(canvas cdk.Canvas) cdk.EventFlag }
Box Hierarchy:
Object +- Widget +- Container +- Box +- ButtonBox +- VBox +- HBox
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() cdk.EventFlag SetRelief(newStyle ReliefStyle) GetRelief() (value ReliefStyle) GetLabel() (value string) SetLabel(label string) GetUseStock() (value bool) SetUseStock(useStock bool) GetUseUnderline() (value bool) SetUseUnderline(useUnderline bool) SetFocusOnClick(focusOnClick bool) GetFocusOnClick() (value bool) SetAlignment(xAlign float64, yAlign float64) GetAlignment() (xAlign float64, yAlign float64) SetImage(image Widget) GetImage() (value Widget, ok bool) SetImagePosition(position PositionType) GetImagePosition() (value PositionType) Add(w Widget) Remove(w Widget) SetPressed(pressed bool) GetPressed() bool GrabFocus() GetFocusChain() (focusableWidgets []interface{}, explicitlySet bool) GetDefaultChildren() []Widget GetWidgetAt(p *cdk.Point2I) Widget CancelEvent() GrabEventFocus() ProcessEvent(evt cdk.Event) cdk.EventFlag Invalidate() cdk.EventFlag GetThemeRequest() (theme cdk.Theme) GetSizeRequest() (width, height int) Resize() cdk.EventFlag Draw(canvas cdk.Canvas) cdk.EventFlag }
Button Hierarchy:
Object +- Widget +- Container +- Bin +- Button +- ToggleButton +- ColorButton +- FontButton +- LinkButton +- OptionMenu +- ScaleButton
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) GetChildSecondary(w Widget) (isSecondary bool) GetChildPrimary(w Widget) (isPrimary bool) SetLayout(layoutStyle ButtonBoxStyle) SetChildSecondary(child Widget, isSecondary bool) Show() ShowAll() Hide() PackStart(w Widget, expand, fill bool, padding int) PackEnd(w Widget, expand, fill bool, padding int) SetChildPacking(child Widget, expand bool, fill bool, padding int, packType PackType) Add(w Widget) Remove(w Widget) Resize() cdk.EventFlag Invalidate() cdk.EventFlag Draw(canvas cdk.Canvas) cdk.EventFlag }
ButtonBox Hierarchy:
Object +- Widget +- Container +- Box +- ButtonBox +- HButtonBox +- VButtonBox
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 (*CAccelGroup) AccelConnect ¶
func (a *CAccelGroup) AccelConnect(accelKey cdk.Key, accelMods cdk.ModMask, accelFlags AccelFlags, closure GClosure) (id int)
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 closure to be executed upon accelerator activation
func (*CAccelGroup) AccelDisconnect ¶
func (a *CAccelGroup) AccelDisconnect(id int) (removed bool)
Removes an accelerator previously installed through Connect. Since 2.20 closure can be NULL. Parameters:
accelGroup the accelerator group to remove an accelerator from closure the closure to remove from this accelerator group, or NULL
to remove all closures.
returns TRUE if the closure was found and got disconnected
func (*CAccelGroup) AccelGroupActivate ¶
func (a *CAccelGroup) AccelGroupActivate(acceleratable Object, keyval cdk.Key, modifier cdk.ModMask) (activated bool)
func (*CAccelGroup) AcceleratorGetDefaultModMask ¶
func (a *CAccelGroup) AcceleratorGetDefaultModMask() (value int)
Gets 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)
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
Returns:
a newly-allocated string representing the accelerator.
func (*CAccelGroup) AcceleratorName ¶
func (a *CAccelGroup) AcceleratorName(acceleratorKey cdk.Key, acceleratorMods cdk.ModMask) (value string)
Converts an accelerator keyval and modifier mask into a string parseable by AcceleratorParse. For example, if you pass in GDK_q and GDK_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
Returns:
a newly-allocated accelerator name
func (*CAccelGroup) AcceleratorParse ¶
func (a *CAccelGroup) AcceleratorParse(accelerator string) (acceleratorKey cdk.Key, acceleratorMods cdk.ModMask)
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
Returns:
acceleratorKey keyval. acceleratorMods modifier mask.
func (*CAccelGroup) AcceleratorSetDefaultModMask ¶
func (a *CAccelGroup) AcceleratorSetDefaultModMask(defaultModMask cdk.ModMask)
Sets the modifiers that will be considered significant for keyboard accelerators. The default mod mask is GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK | GDK_SUPER_MASK | GDK_HYPER_MASK | GDK_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 ¶
func (a *CAccelGroup) AcceleratorValid(keyval cdk.Key, modifiers cdk.ModMask) (valid bool)
Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator. For example, the GDK_a keyval plus GDK_CONTROL_MASK is valid - this is a "Ctrl+a" accelerator. But, you can't, for instance, use the GDK_Control_L keyval as an accelerator. Parameters:
keyval a GDK keyval modifiers modifier mask returns TRUE if the accelerator is valid
func (*CAccelGroup) Activate ¶
func (a *CAccelGroup) Activate(accelQuark cdk.QuarkID, acceleratable Object, accelKey cdk.Key, accelMods cdk.ModMask) (value bool)
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 GObject, usually a Window, on which
to activate the accelerator.
accelKey accelerator keyval from a key event accelMods keyboard state mask from a key event
Returns:
TRUE if an accelerator was activated and handled this keypress
func (*CAccelGroup) ConnectByPath ¶
func (a *CAccelGroup) ConnectByPath(accelPath string, closure GClosure)
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 GQuark. Therefore, if you pass a static string, you can save some memory by interning it first with g_intern_static_string. Parameters:
accelGroup the accelerator group to install an accelerator in accelPath path used for determining key and modifiers. closure closure to be executed upon accelerator activation
func (*CAccelGroup) DisconnectKey ¶
func (a *CAccelGroup) DisconnectKey(accelKey cdk.Key, accelMods cdk.ModMask) (removed bool)
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 returns TRUE if there was an accelerator which could be
removed, FALSE otherwise
func (*CAccelGroup) Find ¶
func (a *CAccelGroup) Find(findFunc AccelGroupFindFunc, data interface{}) (key *AccelKey)
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
with
data data to pass to find_func returns the key of the first entry passing
find_func . The key is owned by CTK and must not be freed.
func (*CAccelGroup) FromAccelClosure ¶
func (a *CAccelGroup) FromAccelClosure(closure GClosure) (value AccelGroup)
Finds the AccelGroup to which closure is connected; see Connect. Parameters:
closure a GClosure
func (*CAccelGroup) GetIsLocked ¶
func (a *CAccelGroup) GetIsLocked() (locked bool)
Locks are added and removed using Lock and Unlock. Returns:
TRUE if there are 1 or more locks on the accel_group , FALSE otherwise.
func (*CAccelGroup) GetModifierMask ¶
func (a *CAccelGroup) GetModifierMask() (value cdk.ModMask)
Gets a cdk.ModMask representing the mask for this accel_group . For example, GDK_CONTROL_MASK, GDK_SHIFT_MASK, etc. Returns:
the modifier mask for this accel group.
func (*CAccelGroup) Init ¶
func (a *CAccelGroup) Init() (already bool)
AccelGroup 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 AccelGroup instance
func (*CAccelGroup) Lock ¶
func (a *CAccelGroup) Lock()
Locks the given accelerator group. Locking an acelerator 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)
Queries 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 nEntries location to return the number of entries found, or NULL. returns an array of n_entries
AccelGroupEntry elements, or NULL. The array is owned by CTK and must not be freed.
func (*CAccelGroup) Unlock ¶
func (a *CAccelGroup) Unlock()
Undoes 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
func NewAdjustment ¶
func NewAdjustment(value, lower, upper, stepIncrement, pageIncrement, pageSize int) *CAdjustment
Factory method for convenient construction of new Adjustment objects
func (*CAdjustment) Changed ¶
func (a *CAdjustment) Changed() cdk.EventFlag
Cause a changed signal to be emitted. The changed signal reflects that one or more of the configurable aspects have changed, excluding the actual value of the Adjustment. See ValueChanged()
Emits: SignalChanged, Argv=[Adjustment instance] Returns: emission result EventFlag
func (*CAdjustment) ClampPage ¶
func (a *CAdjustment) ClampPage(upper, lower int)
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
Emits: SignalClampPage, Argv=[Adjustment instance, given upper, given lower]
func (*CAdjustment) Configure ¶
func (a *CAdjustment) Configure(value, lower, upper, stepIncrement, pageIncrement, pageSize int)
Set all of 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 of 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
Emits: SignalConfigure, Argv=[Adjustment instance, value, lower, upper, stepIncrement, pageIncrement, pageSize]
func (*CAdjustment) GetLower ¶
func (a *CAdjustment) GetLower() (value int)
Returns the current lower bounds of the Adjustment
func (*CAdjustment) GetPageIncrement ¶
func (a *CAdjustment) GetPageIncrement() (pageIncrement int)
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)
Gets 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)
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)
Returns the current lower bounds of the Adjustment
func (*CAdjustment) GetValue ¶
func (a *CAdjustment) GetValue() (value int)
Gets the current value of the adjustment. See SetValue. Returns:
The current value of the adjustment.
func (*CAdjustment) Init ¶
func (a *CAdjustment) Init() bool
Adjustment 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 Adjustment instance
func (*CAdjustment) Moot ¶
func (a *CAdjustment) Moot() bool
This method determines 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)
Sets 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)
Sets the page increment of the Adjustment. This method emits a set-step 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)
Sets 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)
Sets the step increment of the Adjustment. This method emits a set-step 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)
Sets 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)
Sets 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
Emits: SignalSetValue, Argv=[Adjustment instance, current value, new value]
func (*CAdjustment) Settings ¶
func (a *CAdjustment) Settings() (value, lower, upper, stepIncrement, pageIncrement, pageSize int)
Convenience method to retrieve all the configurable Adjustment values in one statement
func (*CAdjustment) ShowByPolicy ¶
func (a *CAdjustment) ShowByPolicy(policy PolicyType) bool
Convenience method that given a Policy, determine if 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() cdk.EventFlag
Cause a value-changed signal to be emitted. The value-changed signal reflects that the actual value of the Adjustment has changed
Emits: SignalValueChanged, Argv=[Adjustment instance] Returns: emission result EventFlag
type CAlignment ¶
type CAlignment struct { CBin // contains filtered or unexported fields }
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 NewAlignment ¶
func NewAlignment(xAlign float64, yAlign float64, xScale float64, yScale float64) *CAlignment
Constructor for Alignment objects
func (*CAlignment) Add ¶
func (a *CAlignment) Add(w Widget)
func (*CAlignment) Draw ¶
func (a *CAlignment) Draw(canvas cdk.Canvas) cdk.EventFlag
func (*CAlignment) Get ¶
func (a *CAlignment) Get() (xAlign, yAlign, xScale, yScale float64)
func (*CAlignment) GetPadding ¶
func (a *CAlignment) GetPadding() (paddingTop, paddingBottom, paddingLeft, paddingRight int)
Gets the padding on the different sides of the widget. See SetPadding. Parameters:
paddingTop location to store the padding for the top of the widget, or NULL. paddingBottom location to store the padding for the bottom of the widget, or NULL. paddingLeft location to store the padding for the left of the widget, or NULL. paddingRight location to store the padding for the right of the widget, or NULL.
func (*CAlignment) Init ¶
func (a *CAlignment) Init() (already bool)
Alignment 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 Alignment instance
func (*CAlignment) Invalidate ¶
func (a *CAlignment) Invalidate() cdk.EventFlag
func (*CAlignment) Remove ¶
func (a *CAlignment) Remove(w Widget)
func (*CAlignment) Resize ¶
func (a *CAlignment) Resize() cdk.EventFlag
func (*CAlignment) Set ¶
func (a *CAlignment) Set(xAlign, yAlign, xScale, yScale float64)
Sets the Alignment 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)
Sets the padding on 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 (*CArrow) GetArrowRune ¶
func (*CArrow) GetArrowType ¶
func (*CArrow) GetSizeRequest ¶
func (*CArrow) Init ¶
Arrow 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 Arrow instance
func (*CArrow) SetArrowType ¶
Sets the direction of the Arrow. 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 (*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 ¶
Gets the child of the Bin, or NULL if the bin contains no child widget. The returned widget does not have a reference added, so you do not need to unref it. Returns:
pointer to child of the Bin. [transfer none]
type CBox ¶
type CBox struct { CContainer // contains filtered or unexported fields }
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 (*CBox) GetFocusChain ¶
func (*CBox) GetHomogeneous ¶
Returns whether the box is homogeneous (all children are the same size). See SetHomogeneous. Returns:
TRUE if the box is homogeneous.
func (*CBox) GetOrientation ¶
func (b *CBox) GetOrientation() (orientation cdk.Orientation)
Returns the orientation of the Box
func (*CBox) Init ¶
Box 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 Box instance
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)
Obtains information about how child is packed into box . Parameters:
child the Widget of the child to query expand pointer to return location for “expand” child property fill pointer to return location for “fill” child property padding pointer to return location for “padding” child property packType pointer to return location for “pack-type” child property
func (*CBox) ReorderChild ¶
Moves child to a new position in the list of box children. The list is the children field of Box, and contains both widgets packed GTK_PACK_START as well as widgets packed GTK_PACK_END, in the order that these widgets were added to 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. 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)
Sets the way child is packed into box . 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 ¶
Sets the “homogeneous” property of box , controlling whether or not all children of box are given equal space in the box. Parameters:
homogeneous a boolean value, TRUE to create equal allotments,
FALSE for variable allotments
func (*CBox) SetOrientation ¶
func (b *CBox) SetOrientation(orientation cdk.Orientation)
Sets the orientation of the Box
func (*CBox) SetSpacing ¶
Sets the “spacing” property of box , which is the number of pixels to place between children of box . Parameters:
spacing the number of pixels to put between children
type CBuilder ¶
type CBuilder struct { cdk.CObject // contains filtered or unexported fields }
func (*CBuilder) AddNamedSignalHandler ¶
func (*CBuilder) Build ¶
func (b *CBuilder) Build(element *CBuilderElement) (newObject interface{})
func (*CBuilder) BuildableTypeTags ¶
func (*CBuilder) GetWidgetsBuiltByType ¶
func (b *CBuilder) GetWidgetsBuiltByType(tag cdk.CTypeTag) (widgets []interface{})
func (*CBuilder) LoadFromString ¶
func (b *CBuilder) LoadFromString(raw string) (topElement *CBuilderElement, err error)
func (*CBuilder) LookupNamedSignalHandler ¶
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 NewButtonFromStock ¶
Creates a new Button containing the image and text from a stock item. Some stock ids have preprocessor macros like GTK_STOCK_OK and GTK_STOCK_APPLY. If stock_id is unknown, then it will be treated as a mnemonic label (as for NewWithMnemonic). Parameters:
stockId the name of the stock item
Returns:
a new Button
func NewButtonWithLabel ¶
func NewButtonWithMnemonic ¶
Creates a new Button containing a label. If characters in 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, with an underscore in front of the
mnemonic character
func NewButtonWithWidget ¶
Constructor with Widget for Button objects, uncertain this works as expected due to struct type information loss on interface filter
func (*CButton) CancelEvent ¶
func (b *CButton) CancelEvent()
func (*CButton) GetAlignment ¶
Gets the alignment of the child in the button. Parameters:
xAlign return location for horizontal alignment. yAlign return location for vertical alignment.
func (*CButton) GetDefaultChildren ¶
func (*CButton) GetFocusChain ¶
func (*CButton) GetFocusOnClick ¶
Returns whether the button grabs focus when it is clicked with the mouse. See SetFocusOnClick. Returns:
TRUE if the button grabs focus when it is clicked with the mouse.
func (*CButton) GetImage ¶
Gets the widget that is currently set as the image of button . This may have been explicitly set by SetImage or constructed by NewFromStock. Returns:
a Widget or NULL in case there is no image. [transfer none]
func (*CButton) GetImagePosition ¶
func (b *CButton) GetImagePosition() (value PositionType)
Gets the position of the image relative to the text inside the button. Returns:
the position
func (*CButton) GetLabel ¶
Fetches the text from the label of the button, as set by SetLabel. If the label text has not been set the return value will be NULL. This will be the case if you create an empty button with New to use as a container. Returns:
The text of the label widget. This string is owned by the widget and must not be modified or freed.
func (*CButton) GetPressed ¶
func (*CButton) GetRelief ¶
func (b *CButton) GetRelief() (value ReliefStyle)
func (*CButton) GetSizeRequest ¶
func (*CButton) GetThemeRequest ¶
func (b *CButton) GetThemeRequest() (theme cdk.Theme)
func (*CButton) GetUseStock ¶
Returns whether the button label is a stock item. Returns:
TRUE if the button label is used to select a stock item instead of being used directly as the label text.
func (*CButton) GetUseUnderline ¶
Returns whether an embedded underline in the button label indicates a mnemonic. See SetUseUnderline. Returns:
TRUE if an embedded underline in the button label indicates the mnemonic accelerator keys.
func (*CButton) GetWidgetAt ¶
func (*CButton) GrabEventFocus ¶
func (b *CButton) GrabEventFocus()
func (*CButton) GrabFocus ¶
func (b *CButton) 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 (*CButton) Init ¶
Button 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 Button instance
func (*CButton) Invalidate ¶
func (b *CButton) Invalidate() cdk.EventFlag
func (*CButton) ProcessEvent ¶
func (b *CButton) ProcessEvent(evt cdk.Event) cdk.EventFlag
func (*CButton) SetAlignment ¶
Sets the alignment of the child. This property has no effect unless the child is a Misc or a Alignment. 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 ¶
Sets 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 ¶
Set the image of button to the given widget. Note that it depends on the gtk-button-images setting whether the image will be displayed or not, you don't have to call WidgetShow on image yourself. Parameters:
image a widget to set as the image for the button
func (*CButton) SetImagePosition ¶
func (b *CButton) SetImagePosition(position PositionType)
Sets the position of the image relative to the text inside the button. Parameters:
position the position
func (*CButton) SetLabel ¶
Sets the text of the label of the button to str . This text is also used to select the stock item if SetUseStock is used. This will also clear any previously set labels. Parameters:
label a string
func (*CButton) SetPressed ¶
func (*CButton) SetRelief ¶
func (b *CButton) SetRelief(newStyle ReliefStyle)
func (*CButton) SetUseStock ¶
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 ¶
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
func NewButtonBox ¶
func NewButtonBox(orientation cdk.Orientation, homogeneous bool, spacing int) *CButtonBox
func (*CButtonBox) Add ¶
func (b *CButtonBox) Add(w Widget)
func (*CButtonBox) Build ¶
func (b *CButtonBox) Build(builder Builder, element *CBuilderElement) error
func (*CButtonBox) Draw ¶
func (b *CButtonBox) Draw(canvas cdk.Canvas) cdk.EventFlag
func (*CButtonBox) GetChildPrimary ¶
func (b *CButtonBox) GetChildPrimary(w Widget) (isPrimary bool)
Returns whether child should appear in the primary group of children. Parameters:
child a child of widget
Returns:
whether child should appear in the primary group of children.
func (*CButtonBox) GetChildSecondary ¶
func (b *CButtonBox) GetChildSecondary(w Widget) (isSecondary bool)
Returns whether child should appear in a secondary group of children. Parameters:
child a child of widget
Returns:
whether child should appear in a secondary group of children.
func (*CButtonBox) GetLayout ¶
func (b *CButtonBox) GetLayout() (value ButtonBoxStyle)
func (*CButtonBox) Hide ¶
func (b *CButtonBox) Hide()
func (*CButtonBox) Init ¶
func (b *CButtonBox) Init() (already bool)
ButtonBox 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 ButtonBox instance
func (*CButtonBox) Invalidate ¶
func (b *CButtonBox) Invalidate() cdk.EventFlag
func (*CButtonBox) PackStart ¶
func (b *CButtonBox) PackStart(w Widget, expand, fill bool, padding int)
func (*CButtonBox) Remove ¶
func (b *CButtonBox) Remove(w Widget)
func (*CButtonBox) Resize ¶
func (b *CButtonBox) Resize() cdk.EventFlag
func (*CButtonBox) SetChildPacking ¶
func (b *CButtonBox) SetChildPacking(child Widget, expand bool, fill bool, padding int, packType PackType)
Sets the way child is packed into box . 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)
Sets whether child should appear in a secondary group of children.
A typical use of a secondary child is the help button in a dialog.
This group appears after the other children if the style
is CTK_BUTTONBOX_START, CTK_BUTTONBOX_SPREAD or CTK_BUTTONBOX_EDGE, and before the other children if the style is CTK_BUTTONBOX_END. For horizontal button boxes, the definition of before/after depends on direction of the widget (see gtk_widget_set_direction()). If the style is CTK_BUTTONBOX_START or CTK_BUTTONBOX_END, then the secondary children are aligned at the other end of the button box from the main children. For the other styles, they appear immediately next to the main children.
Parameters:
child a child of widget secondary if TRUE, the child appears in a secondary group of the button box.
func (*CButtonBox) SetLayout ¶
func (b *CButtonBox) SetLayout(layoutStyle ButtonBoxStyle)
Sets the layout 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
func (*CButtonBox) Show ¶
func (b *CButtonBox) Show()
func (*CButtonBox) ShowAll ¶
func (b *CButtonBox) ShowAll()
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 (*CContainer) Add ¶
func (c *CContainer) Add(w Widget)
Adds widget to container.Typically 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 EVENT_PASS then the change is applied
Parameters:
widget a widget to be placed inside container
Emits: SignalAdd, Argv=[Container instance, Widget instance]
func (*CContainer) AddWithProperties ¶
func (c *CContainer) AddWithProperties(widget Widget, argv ...interface{})
Adds widget to container, setting child properties at the same time. See Add and ChildSet for more details. Parameters:
widget a widget to be placed inside container argv a list of property names and values
func (*CContainer) Build ¶
func (c *CContainer) Build(builder Builder, element *CBuilderElement) error
func (*CContainer) ChildGet ¶
func (c *CContainer) ChildGet(child Widget, properties ...cdk.Property) (values []interface{})
Gets the values of one or more child properties for child and container.
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{})
Sets 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)
Returns the type of the children supported by the container. Note that this may return G_TYPE_NONE to indicate that no more children can be added, e.g. for a Paned which already has two children. Returns:
a GType.
func (*CContainer) FindChildProperty ¶
func (c *CContainer) FindChildProperty(property cdk.Property) (value *cdk.CProperty)
Finds a child property of a container by name. Parameters:
property the name of the child property to find
Returns:
the cdk.CProperty of the child property or nil if there is no child property with that name.
func (*CContainer) ForAll ¶
func (c *CContainer) ForAll(callback Callback, callbackData interface{})
Invokes callback on each child of container , including children that are considered "internal" (implementation details of the container). "Internal" children generally weren't added by the user of the container, but were added by the container implementation itself. Most applications should use Foreach, rather than Forall. Parameters:
callback a callback callbackData callback user data
func (*CContainer) ForEach ¶
func (c *CContainer) ForEach(callback Callback, callbackData interface{})
Invokes callback on each non-internal child of container . See Forall for details on what constitutes an "internal" child. Most applications should use Foreach, rather than Forall. Parameters:
callback a callback. callbackData callback user data
func (*CContainer) GetBorderWidth ¶
func (c *CContainer) GetBorderWidth() (value int)
Retrieves the border width of the container. See SetBorderWidth. Returns:
the current border width
func (*CContainer) GetChildProperty ¶
func (c *CContainer) GetChildProperty(child Widget, propertyName cdk.Property) (value interface{})
Gets the value of a child property for child and container . 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)
Returns the container's non-internal children. See Forall for details on what constitutes an "internal" child. Returns:
a newly-allocated list of the container's non-internal children. [element-type Widget][transfer container]
func (*CContainer) GetFocusChain ¶
func (c *CContainer) GetFocusChain() (focusableWidgets []interface{}, explicitlySet bool)
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)
Returns the current focus child widget inside container . This is not the currently focused widget. That can be obtained by calling WindowGetFocus. Returns:
The child widget which will receive the focus inside container when the container is focussed, or NULL if none is set.
func (*CContainer) GetFocusHAdjustment ¶
func (c *CContainer) GetFocusHAdjustment() (value Adjustment)
Retrieves the horizontal focus adjustment for the container. See SetFocusHAdjustment. Returns:
the horizontal focus adjustment, or NULL if none has been set. [transfer none]
func (*CContainer) GetFocusVAdjustment ¶
func (c *CContainer) GetFocusVAdjustment() (value Adjustment)
Retrieves the vertical focus adjustment for the container. See SetFocusVAdjustment. Returns:
the vertical focus adjustment, or NULL if none has been set. [transfer none]
func (*CContainer) GetWidgetAt ¶
func (c *CContainer) GetWidgetAt(p *cdk.Point2I) Widget
A wrapper around the Widget.GetWidgetAt() method that if the Container has the given Point2I within it's bounds, will return a 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)
Container 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 Container instance
func (*CContainer) InstallChildProperty ¶
func (c *CContainer) InstallChildProperty(name cdk.Property, kind cdk.PropertyType, write bool, def interface{}) error
Installs a child property on a container.
func (*CContainer) ListChildProperties ¶
func (c *CContainer) ListChildProperties() (properties []*cdk.CProperty)
Returns all child properties of a container class. Parameters:
cclass a ContainerClass. nProperties location to return the number of child properties found returns a newly
allocated NULL-terminated array of GParamSpec*. The array must be freed with g_free.
func (*CContainer) Remove ¶
func (c *CContainer) Remove(w Widget)
Removes Widget from container. Widget must be inside Container. This method emits a remove signal initially and if the listeners return EVENT_PASS then the change is applied
Parameters:
widget a current child of container
Emits: SignalRemove, Argv=[Container instance, Widget instance]
func (*CContainer) SetBorderWidth ¶
func (c *CContainer) SetBorderWidth(borderWidth int)
Sets 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 WidgetSetSizeRequest 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. Valid values are in the range 0-65535 pixels.
func (*CContainer) SetChildProperty ¶
func (c *CContainer) SetChildProperty(child Widget, propertyName cdk.Property, value interface{})
Sets a child property for child and container . 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{})
Sets 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)
Sets, or unsets if child is NULL, the focused child of container . This function emits the Container::set_focus_child signal of container . Implementations of Container can override the default behaviour by overriding the class closure of this signal. This is function is mostly meant to be used by widgets. Applications can use WidgetGrabFocus to manualy set the focus to a specific widget. Parameters:
child a Widget, or NULL.
func (*CContainer) SetFocusHAdjustment ¶
func (c *CContainer) SetFocusHAdjustment(adjustment Adjustment)
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 ScrolledWindowGetHadjustment for a typical way of obtaining the adjustment and SetFocusVadjustment for setting the vertical adjustment. The adjustments have to be in pixel units and in the same coordinate system as the allocation for immediate children of the container. Parameters:
adjustment an adjustment which should be adjusted when the focus is
moved among the descendents of container
func (*CContainer) SetFocusVAdjustment ¶
func (c *CContainer) SetFocusVAdjustment(adjustment Adjustment)
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 ScrolledWindowGetVAdjustment for a typical way of obtaining the adjustment and SetFocusHAdjustment for setting the horizontal adjustment. The adjustments have to be in pixel units and in the same coordinate system as the allocation for immediate children of the container. Parameters:
adjustment an adjustment which should be adjusted when the focus
is moved among the descendents of container
func (*CContainer) SetOrigin ¶
func (c *CContainer) SetOrigin(x, y int)
func (*CContainer) SetWindow ¶
func (c *CContainer) SetWindow(w Window)
func (*CContainer) ShowAll ¶
func (c *CContainer) ShowAll()
The Container type implements a version of Widget.ShowAll() where all the children of the Container have their ShowAll() method called, in addition to calling Show() on itself first.
func (*CContainer) UnsetFocusChain ¶
func (c *CContainer) 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 NewDialogWithButtons ¶
func NewDialogWithButtons(title string, parent Window, flags DialogFlags, argv ...interface{}) (value *CDialog)
Creates a new Dialog with title title (or NULL for the default title; see WindowSetTitle) and transient parent parent (or NULL for none; see WindowSetTransientFor). The flags argument can be used to make the dialog modal (GTK_DIALOG_MODAL) and/or to have it destroyed along with its transient parent (GTK_DIALOG_DESTROY_WITH_PARENT). After flags , button text/response ID pairs should be listed, with a NULL pointer ending the list. Button text can be either a stock ID such as GTK_STOCK_OK, or some arbitrary text. A response ID can be any positive number, or one of the values in the ResponseType enumeration. If the user clicks one of these dialog buttons, Dialog will emit the “response” signal with the corresponding response ID. If a Dialog receives the “delete-event” signal, it will emit ::response with a response ID of GTK_RESPONSE_DELETE_EVENT. However, destroying a dialog does not emit the ::response signal; so be careful relying on ::response when using the GTK_DIALOG_DESTROY_WITH_PARENT flag. Buttons are from left to right, so the first button in the list will be the leftmost button in the dialog. Here's a simple example: Parameters:
title Title of the dialog, or NULL. parent Transient parent of the dialog, or NULL. flags from DialogFlags firstButtonText stock ID or text to go in first button, or NULL. varargs response ID for first button, then additional buttons, ending with NULL
Returns:
a new Dialog
func (*CDialog) AddActionWidget ¶
func (d *CDialog) AddActionWidget(child Widget, responseId ResponseType)
Adds an 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) (value Button)
Adds a button with the given text (or a stock button, if button_text is a stock ID) and sets things up so that clicking the button will emit the “response” signal with the given response_id . 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
Returns:
the button widget that was added. [transfer none]
func (*CDialog) AddButtons ¶
func (d *CDialog) AddButtons(argv ...interface{})
Adds more buttons, same as calling AddButton repeatedly. The variable argument list should be NULL-terminated as with NewWithButtons. Each button must have both text and response ID. Parameters:
firstButtonText button text or stock ID varargs response ID for first button, then more text-response_id pairs
func (*CDialog) AddSecondaryActionWidget ¶
func (d *CDialog) AddSecondaryActionWidget(child Widget, responseId ResponseType)
func (*CDialog) GetActionArea ¶
Returns the action area of dialog . Returns:
the action area. [transfer none]
func (*CDialog) GetContentArea ¶
Returns the content area of dialog . Returns:
the content area VBox. [transfer none]
func (*CDialog) GetResponseForWidget ¶
func (d *CDialog) GetResponseForWidget(widget Widget) (value ResponseType)
Gets the response id of a widget in the action area of a dialog. Parameters:
widget a widget in the action area of dialog
Returns:
the response id of widget , or GTK_RESPONSE_NONE if widget doesn't have a response id set.
func (*CDialog) GetWidgetForResponse ¶
func (d *CDialog) GetWidgetForResponse(responseId ResponseType) (value Widget)
Gets the widget button that uses the given response ID in the action area of a dialog. Parameters:
responseId the response ID used by the dialog
widget Returns:
the widget button that uses the given response_id , or NULL. [transfer none]
func (*CDialog) Init ¶
Dialog 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 Dialog instance
func (*CDialog) Invalidate ¶
func (d *CDialog) Invalidate() cdk.EventFlag
func (*CDialog) ProcessEvent ¶
func (d *CDialog) ProcessEvent(evt cdk.Event) cdk.EventFlag
func (*CDialog) Response ¶
func (d *CDialog) Response(responseId ResponseType)
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 response ID
func (*CDialog) Run ¶
func (d *CDialog) Run() (response chan ResponseType)
Blocks in a recursive main loop until the dialog either emits the “response” signal, or is destroyed. If the dialog is destroyed during the call to Run, Run returns GTK_RESPONSE_NONE. Otherwise, it returns the response ID from the ::response signal emission. Before entering the recursive main loop, Run calls WidgetShow on the dialog for you. Note that you still need to show any children of the dialog yourself. During Run, the default behavior of “delete-event” is disabled; if the dialog receives ::delete_event, it will not be destroyed as windows usually are, and Run will return GTK_RESPONSE_DELETE_EVENT. Also, during Run the dialog will be modal. You can force Run to return at any time by calling Response to emit the ::response signal. 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. After Run returns, you are responsible for hiding or destroying the dialog if you wish to do so. Typical usage of this function might be: Note that even though the recursive main loop gives the effect of a modal dialog (it prevents the user from interacting with other windows in the same window group while the dialog is run), callbacks such as timeouts, IO channel watches, DND drops, etc, will be triggered during a Run call. Returns:
response ID
func (*CDialog) SetDefaultResponse ¶
func (d *CDialog) SetDefaultResponse(responseId ResponseType)
Sets the last widget in the dialog's action area with the given response_id as the default widget for the dialog. Pressing "Enter" normally activates the default widget. Parameters:
responseId a response ID
func (*CDialog) SetResponseSensitive ¶
func (d *CDialog) SetResponseSensitive(responseId ResponseType, sensitive bool)
Calls WidgetSetSensitive (widget, setting ) for each widget in the dialog's action area with the given response_id . 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 (*CEventBox) CancelEvent ¶
func (b *CEventBox) CancelEvent()
func (*CEventBox) GetAboveChild ¶
Returns whether the event box window is above or below the windows of its child. See SetAboveChild for details. Returns:
TRUE if the event box window is above the window of its child.
func (*CEventBox) GetVisibleWindow ¶
Returns whether the event box has a visible window. See SetVisibleWindow for details. Returns:
TRUE if the event box window is visible
func (*CEventBox) GrabFocus ¶
func (b *CEventBox) 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 (*CEventBox) Init ¶
EventBox 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 EventBox instance
func (*CEventBox) ProcessEvent ¶
func (b *CEventBox) ProcessEvent(evt cdk.Event) cdk.EventFlag
func (*CEventBox) SetAboveChild ¶
Set 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 ¶
Set 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, especially if the user is using a theme with gradients or pixmaps. 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) FakeDraw ¶
func (f *CFakeWindow) FakeDraw() (canvas cdk.Canvas, flag cdk.EventFlag)
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 NewFrameWithWidget ¶
construct a new frame with the given widget instead of the normal label
func (*CFrame) GetFocusWithChild ¶
func (*CFrame) GetLabel ¶
If the frame's label widget is a Label, returns the text in the label widget. (The frame will have a Label for the label widget if a non-NULL argument was passed to New.) Returns:
the text in the label, or NULL if there was no label widget or the lable widget was not a Label. This string is owned by CTK and must not be modified or freed.
func (*CFrame) GetLabelAlign ¶
Retrieves the X and Y alignment of the frame's label. See SetLabelAlign. Parameters:
xAlign X alignment of frame's label yAlign Y alignment of frame's label
func (*CFrame) GetLabelWidget ¶
Retrieves the label widget for the frame. See SetLabelWidget. Returns:
the label widget, or NULL if there is none. [transfer none]
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 ¶
func (*CFrame) GetThemeRequest ¶
func (f *CFrame) GetThemeRequest() (theme cdk.Theme)
Returns the current theme, adjusted for Widget focus and accounting for any PARENT_SENSITIVE conditions. This method is primarily useful in drawable Widget types during the Invalidate() and Draw() stages of the Widget lifecycle
func (*CFrame) GetWidgetAt ¶
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 ¶
Frame 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 Frame instance
func (*CFrame) Invalidate ¶
func (f *CFrame) Invalidate() cdk.EventFlag
func (*CFrame) SetFocusWithChild ¶
func (*CFrame) SetLabel ¶
Sets the text of the label. If label is NULL, the current label is removed. Parameters:
label the text to use as the label of the frame.
func (*CFrame) SetLabelAlign ¶
Sets the alignment of the frame widget's label. The default values for a newly created frame are 0.0 and 0.5. 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 ¶
Sets the label widget for the frame. 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)
Sets the shadow type for frame . Parameters:
type the new ShadowType
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 NewLabelWithMarkup ¶
func NewLabelWithMnemonic ¶
Creates a new Label, containing the text in str . If characters in str 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:
str The text of the label, with an underscore in front of the
mnemonic character Returns:
the new Label
func (*CLabel) GetAttributes ¶
func (l *CLabel) GetAttributes() (value cdk.Style)
Gets 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). If you want to get the effective attributes for the label, use pango_layout_get_attribute (GetLayout (label)). Returns:
the attribute list, or NULL if none was set. [transfer none]
func (*CLabel) GetCleanText ¶
func (*CLabel) GetClearText ¶
func (*CLabel) 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. Returns:
the currently active URI. The string is owned by CTK and must not be freed or modified.
func (*CLabel) GetEllipsize ¶
Returns the ellipsizing position of the label. See SetEllipsize. Returns:
PangoEllipsizeMode
func (*CLabel) GetJustify ¶
func (l *CLabel) GetJustify() (value cdk.Justification)
Returns the justification of the label. See SetJustify. Returns:
Justification
func (*CLabel) GetLabel ¶
Fetches the text from a label widget including any embedded underlines indicating mnemonics and Pango markup. (See GetText). Returns:
the text of the label widget. This string is owned by the widget and must not be modified or freed.
func (*CLabel) GetLineWrap ¶
Returns whether lines in the label are automatically wrapped. See SetLineWrap. Returns:
TRUE if the lines of the label are automatically wrapped.
func (*CLabel) GetLineWrapMode ¶
func (l *CLabel) GetLineWrapMode() (value cdk.WrapMode)
Returns line wrap mode used by the label. See SetLineWrapMode. Returns:
the current cdk.WrapMode
func (*CLabel) GetMaxWidthChars ¶
Retrieves the desired maximum width of label , in characters. See SetWidthChars. Returns:
the maximum width of the label in characters.
func (*CLabel) GetMnemonicKeyVal ¶
If the label has been set so that it has an mnemonic key this function returns the keyval used for the mnemonic accelerator. If there is no mnemonic set up it returns GDK_VoidSymbol. Returns:
GDK keyval usable for accelerators, or GDK_VoidSymbol
func (*CLabel) GetMnemonicWidget ¶
Retrieves the target of the mnemonic (keyboard shortcut) of this label. See SetMnemonicWidget. Returns:
the target of the label's mnemonic, or NULL if none has been set and the default algorithm will be used. [transfer none]
func (*CLabel) GetPlainText ¶
func (*CLabel) GetPlainTextInfo ¶
func (*CLabel) GetPlainTextInfoAtWidth ¶
func (*CLabel) GetSelectable ¶
Gets the value set by SetSelectable. Returns:
TRUE if the user can copy text from the label
func (*CLabel) GetSelectionBounds ¶
Gets the selected range of characters in the label, returning TRUE if there's a selection. Parameters:
start return location for start of selection, as a character offset. end return location for end of selection, as a character offset.
Returns:
TRUE if selection is non-empty
func (*CLabel) GetSingleLineMode ¶
Returns whether the label is in single line mode. Returns:
TRUE when the label is in single line mode.
func (*CLabel) GetSizeRequest ¶
func (*CLabel) GetText ¶
Fetches 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) Returns:
the text in the label widget.
func (*CLabel) GetTrackVisitedLinks ¶
Returns whether the label is currently keeping track of clicked links. Returns:
TRUE if clicked links are remembered
func (*CLabel) GetUseMarkup ¶
Returns whether the label's text is interpreted as marked up with the Pango text markup language. See SetUseMarkup. Returns:
TRUE if the label's text will be parsed for markup.
func (*CLabel) GetUseUnderline ¶
Returns whether an embedded underline in the label indicates a mnemonic. See SetUseUnderline. Returns:
TRUE whether an embedded underline in the label indicates the mnemonic accelerator keys.
func (*CLabel) GetWidthChars ¶
Retrieves the desired width of label , in characters. See SetWidthChars. Returns:
the width of the label in characters.
func (*CLabel) Init ¶
Label 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 Label instance
func (*CLabel) Invalidate ¶
func (l *CLabel) Invalidate() cdk.EventFlag
func (*CLabel) SelectRegion ¶
Selects a range of characters in the label, if the label is selectable. See SetSelectable. 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. Parameters:
startOffset start offset (in characters not bytes) endOffset end offset (in characters not bytes)
func (*CLabel) SetAttributes ¶
func (l *CLabel) SetAttributes(attrs cdk.Style)
Sets a PangoAttrList; the attributes in the list are applied to the label text. Parameters:
attrs a PangoAttrList
func (*CLabel) SetEllipsize ¶
Sets 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 cdk.Justification)
Sets the alignment of the lines in the text of the label relative to each other. GTK_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 MiscSetAlignment instead. SetJustify has no effect on labels containing only a single line. Parameters:
jtype a Justification
func (*CLabel) SetLabel ¶
Sets 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 ¶
Toggles 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 ¶
func (l *CLabel) SetLineWrapMode(wrapMode cdk.WrapMode)
If line wrapping is on (see SetLineWrap) this controls how the line wrapping is done. The default is PANGO_WRAP_WORD which means wrap on word boundaries. Parameters:
wrapMode the line wrapping mode
func (*CLabel) SetMarkup ¶
Parses str which is marked up with the Pango text markup language, setting the label's text and attribute list based on the parse results. If the str is external data, you may need to escape it with g_markup_escape_text or g_markup_printf_escaped: Parameters:
str a markup string (see Pango markup format)
func (*CLabel) SetMarkupWithMnemonic ¶
Parses str which is marked up with the Pango 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 ¶
Sets the desired maximum width in characters of label to n_chars . Parameters:
nChars the new desired maximum width, in characters.
func (*CLabel) SetMnemonicWidget ¶
If the label has been set so that it has an 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 Widget::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.
func (*CLabel) SetSelectable ¶
Selectable labels allow the user to select text from the label, for copy-and-paste. Parameters:
setting TRUE to allow selecting text in the label
func (*CLabel) SetSingleLineMode ¶
Sets whether the label is in single line mode. Parameters:
singleLineMode TRUE if the label should be in single line mode
func (*CLabel) SetText ¶
Sets the text within the Label widget. It overwrites any text that was there before. This will also clear any previously set mnemonic accelerators. Parameters:
str The text you want to set
func (*CLabel) SetTextWithMnemonic ¶
Sets 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) SetTheme ¶
func (l *CLabel) SetTheme(theme cdk.Theme)
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 (*CLabel) SetTrackVisitedLinks ¶
Sets whether the label should keep track of clicked links (and use a different color for them). Parameters:
trackLinks TRUE to track visited links
func (*CLabel) SetUseMarkup ¶
Sets whether the text of the label contains markup in Pango's text markup language. See SetMarkup. Parameters:
setting TRUE if the label's text should be parsed for markup.
func (*CLabel) SetUseUnderline ¶
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 ¶
Sets the desired width in characters of label to n_chars . 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 ¶
Gets the X and Y alignment of the widget within its allocation. See SetAlignment. Parameters:
xAlign location to store X alignment of misc
, or NULL.
yAlign location to store Y alignment of misc
, or NULL.
func (*CMisc) GetPadding ¶
Gets the padding in the X and Y directions of the widget. See SetPadding. Parameters:
xPad location to store padding in the X
direction, or NULL.
yPad location to store padding in the Y
direction, or NULL.
func (*CMisc) Init ¶
Misc 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 Misc instance
func (*CMisc) SetAlignment ¶
func (*CMisc) SetPadding ¶
type CObject ¶
type CObject struct { cdk.CObject // contains filtered or unexported fields }
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 CTK objects
func (*CObject) CssSelector ¶
return a selector string identifying this exact Object instance.
func (*CObject) Draw ¶
func (o *CObject) Draw(canvas cdk.Canvas) cdk.EventFlag
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 (*CObject) GetAllocation ¶
func (o *CObject) GetAllocation() cdk.Rectangle
Returns the current allocation size of the Object instance
func (*CObject) GetCssBool ¶
func (*CObject) GetCssColor ¶
func (*CObject) GetCssFloat ¶
func (*CObject) GetCssProperties ¶
func (o *CObject) GetCssProperties() (properties []*cdk.CProperty)
func (*CObject) GetCssProperty ¶
func (o *CObject) GetCssProperty(name cdk.Property) (property *cdk.CProperty)
func (*CObject) GetCssString ¶
func (*CObject) 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 encompasses the point given, it returns nil
func (*CObject) GetOrigin ¶
func (o *CObject) GetOrigin() cdk.Point2I
Returns the current origin point of the Object instance
func (*CObject) GetTextDirection ¶
func (o *CObject) GetTextDirection() (direction TextDirection)
Returns the current text direction for this Object instance
func (*CObject) HasPoint ¶
Determines whether or not the given point is within the Object's display space bounds
func (*CObject) Init ¶
CTK 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 Object instance
func (*CObject) InstallCssProperty ¶
func (*CObject) Invalidate ¶
func (o *CObject) Invalidate() cdk.EventFlag
Emits an invalidate signal, primarily used in other CTK types which are drawable and need an opportunity to invalidate the render canvases so that the next CTK draw cycle can reflect the latest changes to the Object instance
Emits: SignalInvalidate, Argv=[Object instance]
func (*CObject) ObjectInfo ¶
Convenience method to return a string identifying the Object instance with it's type, unique identifier, name if set (see SetName()), the origin point and current size allocation
func (*CObject) ProcessEvent ¶
func (o *CObject) ProcessEvent(evt cdk.Event) cdk.EventFlag
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
Emits: SignalCdkEvent, Argv=[Object instance, event]
func (*CObject) Resize ¶
func (o *CObject) Resize() cdk.EventFlag
Emits a resize signal, primarily used to make adjustments or otherwise reallocate resources necessary for subsequent draw events
Emits: SignalResize, Argv=[Object instance, allocated size]
func (*CObject) SetAllocation ¶
func (o *CObject) SetAllocation(size cdk.Rectangle)
Set 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) SetOrigin ¶
Set 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)
Set the 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
Emit: SignalTextDirection, Argv=[Object instance, new text direction]
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)
Get the Adjustment which is the "model" object for Range. See SetAdjustment for details. The return value does not have a reference added, so should not be unreferenced. Returns:
a Adjustment. [transfer none]
func (*CRange) GetFillLevel ¶
Gets the current position of the fill level indicator. Returns:
The current fill level
func (*CRange) GetFlippable ¶
Gets the value set by SetFlippable. Returns:
TRUE if the range is flippable
func (*CRange) GetIncrements ¶
Gets 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.
Returns:
step step size page page size
func (*CRange) GetInverted ¶
Gets the value set by SetInverted. Returns:
TRUE if the range is inverted
func (*CRange) GetLowerStepperSensitivity ¶
func (r *CRange) GetLowerStepperSensitivity() (value SensitivityType)
Gets the sensitivity policy for the stepper that points to the 'lower' end of the Range's adjustment. Returns:
The lower stepper's sensitivity policy.
func (*CRange) GetMinSliderLength ¶
This function is useful mainly for Range subclasses. See SetMinSliderLength(). Returns:
The minimum size of the range's slider.
func (*CRange) GetMinSliderSize ¶
This function is useful mainly for Range subclasses. See SetMinSliderSize. Returns:
The minimum size of the range's slider.
func (*CRange) GetRange ¶
Sets 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) GetRangeRect ¶
func (r *CRange) GetRangeRect(rangeRect cdk.Rectangle)
This function returns the area that contains the range's trough and its steppers, in widget->window coordinates. This function is useful mainly for Range subclasses. Parameters:
rangeRect return location for the range rectangle.
func (*CRange) GetRestrictToFillLevel ¶
Gets whether the range is restricted to the fill level. Returns:
TRUE if range is restricted to the fill level.
func (*CRange) GetRoundDigits ¶
Gets the number of digits to round the value to when it changes. See “change-value”. Returns:
the number of digits to round to
func (*CRange) GetShowFillLevel ¶
Gets whether the range displays the fill level graphically. Returns:
TRUE if range shows the fill level.
func (*CRange) GetSliderLength ¶
Returns the length of the scrollbar or scale thumb. Flags: Read
func (*CRange) GetSliderRange ¶
This function returns sliders range along the long dimension, in widget->window coordinates. This function is useful mainly for Range subclasses. Parameters:
sliderStart return location for the slider's
start, or NULL.
sliderEnd return location for the slider's
end, or NULL.
func (*CRange) GetSliderSizeFixed ¶
This function is useful mainly for Range subclasses. See SetSliderSizeFixed. Returns:
whether the range's slider has a fixed size.
func (*CRange) GetStepperSize ¶
Length of step buttons at ends. Flags: Read Allowed values: >= 0 Default value: 1
func (*CRange) GetStepperSpacing ¶
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. Flags: Read Allowed values: >= 0 Default value: 0
func (*CRange) GetTroughUnderSteppers ¶
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. Flags: Read Default value: TRUE Flags: Run Last
func (*CRange) GetUpperStepperSensitivity ¶
func (r *CRange) GetUpperStepperSensitivity() (value SensitivityType)
Gets the sensitivity policy for the stepper that points to the 'upper' end of the Range's adjustment. Returns:
The upper stepper's sensitivity policy.
func (*CRange) Init ¶
Range 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 Range instance
func (*CRange) SetFillLevel ¶
Set 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 prebuffering 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 are 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 ¶
If a range is flippable, it will switch its direction if it is horizontal and its direction is GTK_TEXT_DIR_RTL. See WidgetGetDirection. Parameters:
flippable TRUE to make the range flippable
func (*CRange) SetIncrements ¶
Sets 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 ¶
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)
Sets 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 ¶
Sets the minimum size of the range's slider. This function is useful mainly for Range subclasses. Parameters:
minSize The slider's minimum size
func (*CRange) SetMinSliderSize ¶
Sets the minimum size of the range's slider. This function is useful mainly for Range subclasses. Parameters:
minSize The slider's minimum size
func (*CRange) SetRange ¶
Sets 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 ¶
Sets whether the slider is restricted to the fill level. See SetFillLevel for a general description of the fill level concept. Parameters:
restrictToFillLevel Whether the fill level restricts slider movement.
func (*CRange) SetRoundDigits ¶
Sets the number of digits to round the value to when it changes. See “change-value”. Parameters:
roundDigits the precision in digits, or -1
func (*CRange) SetShowFillLevel ¶
Sets whether a graphical fill level is show on the trough. See SetFillLevel for a general description of the fill level concept. Parameters:
showFillLevel Whether a fill level indicator graphics is shown.
func (*CRange) SetSliderLength ¶
Set the length of the scrollbar or scale thumb. Sets fixed slider length to
true. Set to -1 for variable slider length.
Flags: Read Allowed values: >= 0 Default value: 14
func (*CRange) SetSliderSizeFixed ¶
Sets 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
func (*CRange) SetStepperSize ¶
Length of step buttons at ends. Flags: Read Allowed values: >= 0 Default value: 1
func (*CRange) SetStepperSpacing ¶
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. Flags: Read Allowed values: >= 0 Default value: 0
func (*CRange) SetTroughUnderSteppers ¶
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. Flags: Read Default value: TRUE Flags: Run Last
func (*CRange) SetUpperStepperSensitivity ¶
func (r *CRange) SetUpperStepperSensitivity(sensitivity SensitivityType)
Sets 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) Backward ¶
func (s *CScrollbar) Backward(step int) cdk.EventFlag
func (*CScrollbar) BackwardPage ¶
func (s *CScrollbar) BackwardPage() cdk.EventFlag
func (*CScrollbar) BackwardStep ¶
func (s *CScrollbar) BackwardStep() cdk.EventFlag
func (*CScrollbar) CancelEvent ¶
func (s *CScrollbar) CancelEvent()
func (*CScrollbar) Changed ¶
func (s *CScrollbar) Changed()
func (*CScrollbar) Draw ¶
func (s *CScrollbar) Draw(canvas cdk.Canvas) cdk.EventFlag
func (*CScrollbar) Forward ¶
func (s *CScrollbar) Forward(step int) cdk.EventFlag
func (*CScrollbar) ForwardPage ¶
func (s *CScrollbar) ForwardPage() cdk.EventFlag
func (*CScrollbar) ForwardStep ¶
func (s *CScrollbar) ForwardStep() cdk.EventFlag
func (*CScrollbar) GetAllStepperRegions ¶
func (s *CScrollbar) GetAllStepperRegions() (fwd, bwd, sFwd, sBwd cdk.Region)
func (*CScrollbar) GetHasBackwardStepper ¶
func (s *CScrollbar) GetHasBackwardStepper() (hasBackwardStepper bool)
Display the standard backward arrow button. Flags: Read Default value: TRUE
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 cdk.Region)
func (*CScrollbar) GetStepperRegions ¶
func (s *CScrollbar) GetStepperRegions() (start, end cdk.Region)
func (*CScrollbar) GetTroughRegion ¶
func (s *CScrollbar) GetTroughRegion() (region cdk.Region)
func (*CScrollbar) GetWidgetAt ¶
func (s *CScrollbar) GetWidgetAt(p *cdk.Point2I) Widget
func (*CScrollbar) GrabFocus ¶
func (s *CScrollbar) 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 (*CScrollbar) Init ¶
func (s *CScrollbar) Init() (already bool)
Scrollbar 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 Scrollbar instance
func (*CScrollbar) Invalidate ¶
func (s *CScrollbar) Invalidate() cdk.EventFlag
func (*CScrollbar) ProcessEvent ¶
func (s *CScrollbar) ProcessEvent(evt cdk.Event) cdk.EventFlag
func (*CScrollbar) ProcessEventAtPoint ¶
func (s *CScrollbar) ProcessEventAtPoint(p *cdk.Point2I, e *cdk.EventMouse) cdk.EventFlag
func (*CScrollbar) Resize ¶
func (s *CScrollbar) Resize() cdk.EventFlag
func (*CScrollbar) SetHasBackwardStepper ¶
func (s *CScrollbar) SetHasBackwardStepper(hasBackwardStepper bool)
Display the standard backward arrow button. Flags: Read Default value: TRUE
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) Draw ¶
func (s *CScrolledViewport) Draw(canvas cdk.Canvas) cdk.EventFlag
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. [transfer none]
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 cdk.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. [transfer none]
func (*CScrolledViewport) GetVScrollbar ¶
func (s *CScrolledViewport) GetVScrollbar() *CVScrollbar
func (*CScrolledViewport) GetWidgetAt ¶
func (s *CScrolledViewport) GetWidgetAt(p *cdk.Point2I) Widget
func (*CScrolledViewport) GrabFocus ¶
func (s *CScrolledViewport) 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 (*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) InternalGetWidgetAt ¶
func (s *CScrolledViewport) InternalGetWidgetAt(p *cdk.Point2I) Widget
func (*CScrolledViewport) Invalidate ¶
func (s *CScrolledViewport) Invalidate() cdk.EventFlag
func (*CScrolledViewport) ProcessEvent ¶
func (s *CScrolledViewport) ProcessEvent(evt cdk.Event) cdk.EventFlag
func (*CScrolledViewport) ProcessEventAtPoint ¶
func (s *CScrolledViewport) ProcessEventAtPoint(p *cdk.Point2I, evt *cdk.EventMouse) cdk.EventFlag
func (*CScrolledViewport) Remove ¶
func (s *CScrolledViewport) Remove(w Widget)
func (*CScrolledViewport) Resize ¶
func (s *CScrolledViewport) Resize() cdk.EventFlag
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) SetTheme ¶
func (s *CScrolledViewport) SetTheme(theme cdk.Theme)
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) ApplyDefaultBackground ¶
func (s *CStyle) ApplyDefaultBackground(window Window, setBg bool, stateType StateType, area cdk.Rectangle, x int, y int, width int, height int)
Parameters:
area .
func (*CStyle) Attach ¶
Attaches a style to a window; this process allocates the colors and creates the GC's for the style - it specializes it to a particular visual and colormap. The process may involve the creation of a new style if the style has already been attached to a window with a different style and colormap. Since this function may return a new object, you have to use it in the following way: style = Attach (style, window) Parameters:
window a Window.
Returns:
Either style , or a newly-created Style. If the style is newly created, the style parameter will be unref'ed, and the new style will have a reference count belonging to the caller.
func (*CStyle) Copy ¶
Creates a copy of the passed in Style object. Returns:
a copy of style . [transfer full]
func (*CStyle) Detach ¶
func (s *CStyle) Detach()
Detaches a style from a window. If the style is not attached to any windows anymore, it is unrealized. See Attach.
func (*CStyle) GetStyleProperty ¶
Queries the value of a style property corresponding to a widget class is in the given style. Parameters:
widgetType the GType of a descendant of Widget propertyName the name of the style property to get value a GValue where the value of the property being
queried will be stored
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) LookupColor ¶
Looks up color_name in the style's logical color mappings, filling in color and returning TRUE if found, otherwise returning FALSE. Do not cache the found mapping, because it depends on the Style and might change when a theme switch occurs. Parameters:
colorName the name of the logical color to look up color the Color to fill in.
Returns:
TRUE if the mapping was found.
func (*CStyle) PaintArrow ¶
func (s *CStyle) PaintArrow(window Window, stateType StateType, shadowType ShadowType, area cdk.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 cdk.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 cdk.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 cdk.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 cdk.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 cdk.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 cdk.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 cdk.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 cdk.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 cdk.Rectangle, widget Widget, detail string, x int, y int, width int, height int, orientation cdk.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 cdk.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 cdk.Rectangle, widget Widget, detail string, points []cdk.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 cdk.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 cdk.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 cdk.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 cdk.Rectangle, widget Widget, detail string, x int, y int, width int, height int, orientation cdk.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 cdk.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 cdk.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 cdk.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 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 NewViewport ¶
func NewViewport(hAdjustment, vAdjustment *CAdjustment) *CViewport
func (*CViewport) GetBinWindow ¶
Gets the bin window of the Viewport. Returns:
a Window. [transfer none]
func (*CViewport) GetHAdjustment ¶
func (v *CViewport) GetHAdjustment() (adjustment *CAdjustment)
Returns the horizontal adjustment of the viewport. Returns:
the horizontal adjustment of viewport . [transfer none]
func (*CViewport) GetShadowType ¶
func (v *CViewport) GetShadowType() (shadowType ShadowType)
Gets the shadow type of the Viewport. See SetShadowType. Returns:
the shadow type
func (*CViewport) GetVAdjustment ¶
func (v *CViewport) GetVAdjustment() (adjustment *CAdjustment)
Returns the vertical adjustment of the viewport. Returns:
the vertical adjustment of viewport . [transfer none]
func (*CViewport) GetViewWindow ¶
Gets the view window of the Viewport. Returns:
a Window. [transfer none]
func (*CViewport) Init ¶
Viewport 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 Viewport instance
func (*CViewport) Invalidate ¶
func (v *CViewport) Invalidate() cdk.EventFlag
func (*CViewport) SetHAdjustment ¶
func (v *CViewport) SetHAdjustment(adjustment *CAdjustment)
Sets the horizontal adjustment of the viewport. Parameters:
adjustment a Adjustment.
func (*CViewport) SetShadowType ¶
func (v *CViewport) SetShadowType(shadowType ShadowType)
Sets the shadow type of the viewport. Parameters:
type the new shadow type.
func (*CViewport) SetVAdjustment ¶
func (v *CViewport) SetVAdjustment(adjustment *CAdjustment)
Sets the vertical adjustment of the viewport. Parameters:
adjustment a 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 CTK 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 ¶
func (w *CWidget) AddEvents(events cdk.EventMask)
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) Destroy ¶
func (w *CWidget) Destroy()
Destroys a widget. Equivalent to ObjectDestroy, except that you don't have to cast the widget to Object. 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) Destroyed ¶
This function sets *widget_pointer to NULL if widget_pointer != NULL. It's intended to be used as a callback connected to the "destroy" signal of a widget. You connect Destroyed as a signal handler, and pass the address of your widget variable as user data. Then when the widget is destroyed, the variable will be set to NULL. Useful for example to avoid multiple copies of the same dialog. Parameters:
widgetPointer address of a variable that contains widget
.
func (*CWidget) EnsureStyle ¶
func (w *CWidget) EnsureStyle()
Ensures that widget has a style (widget->style ). Not a very useful function; most of the time, if you want the style, the widget is realized, and realized widgets are guaranteed to have a style already.
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) Event ¶
Rarely-used function. This function is used to emit the event signals on a widget (those signals should never be emitted without using this function to do so). If you want to synthesize an event though, don't use this function; instead, use MainDoEvent so the event will behave as if it were in the event queue. Don't synthesize expose events; instead, use WindowInvalidateRect to invalidate a region of the window. Parameters:
event a Event
Returns:
return from the event signal emission (TRUE if the event was handled)
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. [transfer none]
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) GetColormap ¶
func (w *CWidget) GetColormap() (value cdk.Colormap)
Gets the colormap that will be used to render widget . No reference will be added to the returned colormap; it should not be unreferenced. Returns:
the colormap used by widget . [transfer none]
func (*CWidget) GetCompositeName ¶
Obtains the composite name of a widget. Returns:
the composite name of widget , or NULL if widget is not a composite child. The string should be freed when it is no longer needed.
func (*CWidget) GetDefaultColormap ¶
func (w *CWidget) GetDefaultColormap() (value cdk.Colormap)
Obtains the default colormap used to create widgets. Returns:
default widget colormap. [transfer none]
func (*CWidget) GetDefaultDirection ¶
func (w *CWidget) GetDefaultDirection() (value TextDirection)
Obtains the current default reading direction. See SetDefaultDirection. Returns:
the current default direction.
func (*CWidget) GetDefaultStyle ¶
Returns the default style used by all widgets initially. Returns:
the default style. This Style object is owned by CTK and should not be modified or freed. [transfer none]
func (*CWidget) GetDefaultVisual ¶
func (w *CWidget) GetDefaultVisual() (value cdk.Visual)
Obtains the visual of the default colormap. Not really useful; used to be useful before ColormapGetVisual existed. Returns:
visual of the default colormap. [transfer none]
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 ¶
func (w *CWidget) GetDisplay() (value cdk.DisplayManager)
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. [transfer none]
func (*CWidget) GetDoubleBuffered ¶
Determines whether the widget is double buffered. See SetDoubleBuffered Returns:
TRUE if the widget is double buffered
func (*CWidget) GetEvents ¶
func (w *CWidget) GetEvents() (value cdk.EventMask)
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) GetModifierStyle ¶
Returns the current modifier style for the widget. (As set by ModifyStyle.) If no style has previously set, a new RcStyle will be created with all values unset, and set as the modifier style for the widget. If you make changes to this rc style, you must call ModifyStyle, passing in the returned rc style, to make sure that your changes take effect. Caution: passing the style back to ModifyStyle will normally end up destroying it, because ModifyStyle copies the passed-in style and sets the copy as the new modifier style, thus dropping any reference to the old modifier style. Add a reference to the modifier style if you want to keep it alive. Returns:
the modifier style for the widget. This rc style is owned by the widget. If you want to keep a pointer to value this around, you must add a refcount using g_object_ref. [transfer none]
func (*CWidget) GetName ¶
Retrieves the name of a widget. See SetName for the significance of widget names. Returns:
name of the widget. This string is owned by CTK and should not be modified or freed
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. [transfer none]
func (*CWidget) GetParentWindow ¶
Gets widget 's parent window. Returns:
the parent window of widget . [transfer none]
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. [transfer none]
func (*CWidget) GetScreen ¶
func (w *CWidget) GetScreen() (value cdk.Display)
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. [transfer none]
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) GetSnapshot ¶
func (w *CWidget) GetSnapshot(clipRect cdk.Rectangle) (value cdk.Pixmap)
Create a Pixmap of the contents of the widget and its children. Works even if the widget is obscured. The depth and visual of the resulting pixmap is dependent on the widget being snapshot and likely differs from those of a target widget displaying the pixmap. The function PixbufGetFromDrawable can be used to convert the pixmap to a visual independant representation. The snapshot area used by this function is the widget 's allocation plus any extra space occupied by additional windows belonging to this widget (such as the arrows of a spin button). Thus, the resulting snapshot pixmap is possibly larger than the allocation. If clip_rect is non-NULL, the resulting pixmap is shrunken to match the specified clip_rect. The (x,y) coordinates of clip_rect are interpreted widget relative. If width or height of clip_rect are 0 or negative, the width or height of the resulting pixmap will be shrunken by the respective amount. For instance a clip_rect { +5, +5, -10, -10 } will chop off 5 pixels at each side of the snapshot pixmap. If non-NULL, clip_rect will contain the exact widget-relative snapshot coordinates upon return. A clip_rect of { -1, -1, 0, 0 } can be used to preserve the auto-grown snapshot area and use clip_rect as a pure output parameter. The returned pixmap can be NULL, if the resulting clip_area was empty. Parameters:
clipRect a Rectangle or NULL.
Returns:
Pixmap snapshot of the widget
func (*CWidget) GetState ¶
Returns the widget's state. See SetState. Returns:
the state of the widget.
func (*CWidget) GetStyle ¶
Simply an accessor function that returns widget->style . Returns:
the widget's Style. [transfer none]
func (*CWidget) GetThemeRequest ¶
func (w *CWidget) GetThemeRequest() (theme cdk.Theme)
Returns the current theme, adjusted for Widget focus and accounting for any PARENT_SENSITIVE conditions. This method is primarily useful in drawable Widget types during the Invalidate() and Draw() stages of the Widget lifecycle
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. [transfer none]
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. [transfer none]
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) GetVisual ¶
func (w *CWidget) GetVisual() (value cdk.Visual)
Gets the visual that will be used to render widget . Returns:
the visual for widget . [transfer none]
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. [transfer none]
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()
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) GtkCallback ¶
func (w *CWidget) GtkCallback(data interface{})
The type of the callback functions used for e.g. iterating over the children of a container, see ContainerForeach. Parameters:
widget the widget to operate on data user-supplied data
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) HasRcStyle ¶
Determines if the widget style has been looked up through the rc mechanism. Returns:
TRUE if the widget has been looked up through the rc mechanism, FALSE otherwise.
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()
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 ¶
CTK widget 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 Widget instance
func (*CWidget) Intersect ¶
Computes the intersection of a widget 's area and area , storing the intersection in intersection , and returns TRUE if there was an intersection. intersection may be NULL if you're only interested in whether there was an intersection. Parameters:
area a rectangle intersection rectangle to store intersection of widget
and area
Returns:
TRUE if there was an intersection
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) IsComposited ¶
Whether widget can rely on having its alpha channel drawn correctly. On X11 this function returns whether a compositing manager is running for widget 's screen. Please note that the semantics of this call will change in the future if used on a widget that has a composited window in its hierarchy (as set by WindowSetComposited). Returns:
TRUE if the widget can rely on its alpha channel being drawn correctly.
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) ListAccelClosures ¶
func (w *CWidget) ListAccelClosures() (value cdk.CList)
Lists the closures used by widget for accelerator group connections with AccelGroupConnectByPath or AccelGroupConnect. The closures can be used to monitor accelerator changes on widget , by connecting to the AccelGroup ::accel-changed signal of the AccelGroup of a closure which can be found out with AccelGroupFromAccelClosure. Parameters:
widget widget to list accelerator closures for
Returns:
a newly allocated cdk.CList of closures. [transfer container][element-type GClosure]
func (*CWidget) ListMnemonicLabels ¶
func (w *CWidget) ListMnemonicLabels() (value cdk.CList)
Returns a newly allocated list of the widgets, normally labels, for which this widget is a the target of a mnemonic (see for example, LabelSetMnemonicWidget). 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:
the list of mnemonic labels; free this list with g_list_free when you are done with it. [element-type Widget][transfer container]
func (*CWidget) Map ¶
func (w *CWidget) Map()
This function is only for use in widget implementations. Causes a widget to be mapped if it isn't already.
func (*CWidget) ModifyBase ¶
Sets the base color for a widget in a particular state. All other style values are left untouched. The base color is the background color used along with the text color (see ModifyText) for widgets such as Entry and TextView. See also ModifyStyle. Note that "no window" widgets (which have the GTK_NO_WINDOW flag set) draw on their parent container's window and thus may not draw any background themselves. This is the case for e.g. Label. To modify the background of such widgets, you have to set the base color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in a EventBox widget and setting the base color on that. Parameters:
state the state for which to set the base color color the color to assign (does not need to be allocated),
or NULL to undo the effect of previous calls to of ModifyBase.
func (*CWidget) ModifyBg ¶
Sets the background color for a widget in a particular state. All other style values are left untouched. See also ModifyStyle. Note that "no window" widgets (which have the GTK_NO_WINDOW flag set) draw on their parent container's window and thus may not draw any background themselves. This is the case for e.g. Label. To modify the background of such widgets, you have to set the background color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in a EventBox widget and setting the background color on that. Parameters:
state the state for which to set the background color color the color to assign (does not need to be allocated),
or NULL to undo the effect of previous calls to of ModifyBg.
func (*CWidget) ModifyCursor ¶
func (w *CWidget) ModifyCursor(primary cdk.Color, secondary cdk.Color)
Sets the cursor color to use in a widget, overriding the “cursor-color” and “secondary-cursor-color” style properties. All other style values are left untouched. See also ModifyStyle. Parameters:
primary the color to use for primary cursor (does not need to be
allocated), or NULL to undo the effect of previous calls to of ModifyCursor.
secondary the color to use for secondary cursor (does not need to be
allocated), or NULL to undo the effect of previous calls to of ModifyCursor.
func (*CWidget) ModifyFg ¶
Sets the foreground color for a widget in a particular state. All other style values are left untouched. See also ModifyStyle. Parameters:
state the state for which to set the foreground color color the color to assign (does not need to be allocated),
or NULL to undo the effect of previous calls to of ModifyFg.
func (*CWidget) ModifyStyle ¶
Modifies style values on the widget. Modifications made using this technique take precedence over style values set via an RC file, however, they will be overriden if a style is explicitely set on the widget using SetStyle. The RcStyle structure is designed so each field can either be set or unset, so it is possible, using this function, to modify some style values and leave the others unchanged. Note that modifications made with this function are not cumulative with previous calls to ModifyStyle or with such functions as ModifyFg. If you wish to retain previous values, you must first call GetModifierStyle, make your modifications to the returned style, then call ModifyStyle with that style. On the other hand, if you first call ModifyStyle, subsequent calls to such functions ModifyFg will have a cumulative effect with the initial modifications. Parameters:
style the RcStyle holding the style modifications
func (*CWidget) ModifyText ¶
Sets the text color for a widget in a particular state. All other style values are left untouched. The text color is the foreground color used along with the base color (see ModifyBase) for widgets such as Entry and TextView. See also ModifyStyle. Parameters:
state the state for which to set the text color color the color to assign (does not need to be allocated),
or NULL to undo the effect of previous calls to of ModifyText.
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) PopColormap ¶
func (w *CWidget) PopColormap()
Removes a colormap pushed with PushColormap.
func (*CWidget) PopCompositeChild ¶
func (w *CWidget) PopCompositeChild()
Cancels the effect of a previous call to PushCompositeChild.
func (*CWidget) PushColormap ¶
func (w *CWidget) PushColormap(cmap cdk.Colormap)
Pushes cmap onto a global stack of colormaps; the topmost colormap on the stack will be used to create all widgets. Remove cmap with PopColormap. There's little reason to use this function. Parameters:
cmap a Colormap
func (*CWidget) PushCompositeChild ¶
func (w *CWidget) PushCompositeChild()
Makes all newly-created widgets as composite children until the corresponding PopCompositeChild call. A composite child is a child that's an implementation detail of the container it's inside and should not be visible to people using the container. Composite children aren't treated differently by GTK (but see ContainerForeach vs. ContainerForall), but e.g. GUI builders might want to treat them in a different way. Here is a simple example:
func (*CWidget) QueueDraw ¶
func (w *CWidget) QueueDraw()
Equivalent to calling QueueDrawArea for the entire area of a widget.
func (*CWidget) QueueDrawArea ¶
Invalidates the rectangular area of widget defined by x , y , width and height by calling WindowInvalidateRect on the widget's window and all its child windows. Once the main loop becomes idle (after the current batch of events has been processed, roughly), the window will receive expose events for the union of all regions that have been invalidated. Normally you would only use this function in widget implementations. You might also use it, or WindowInvalidateRect directly, to schedule a redraw of a DrawingArea or some portion thereof. Frequently you can just call WindowInvalidateRect or WindowInvalidateRegion instead of this function. Those functions will invalidate only a single window, instead of the widget and all its children. The advantage of adding to the invalidated region compared to simply drawing immediately is efficiency; using an invalid region ensures that you only have to redraw one time. Parameters:
x x coordinate of upper-left corner of rectangle to redraw y y coordinate of upper-left corner of rectangle to redraw width width of region to draw height height of region to draw
func (*CWidget) QueueResizeNoRedraw ¶
func (w *CWidget) QueueResizeNoRedraw()
This function works like QueueResize, except that the widget is not invalidated.
func (*CWidget) Realize ¶
func (w *CWidget) Realize()
Creates the GDK (windowing system) resources associated with a widget. For example, widget->window will be created when a widget is realized. Normally realization happens implicitly; if you show a widget and all its parent containers, then the widget will be realized and mapped automatically. Realizing a widget requires all the widget's parent widgets to be realized; calling Realize realizes the widget's parents in addition to widget itself. If a widget is not yet inside a toplevel window when you realize it, bad things will happen. This function is primarily used in widget implementations, and isn't very useful otherwise. Many times when you think you might need it, a better approach is to connect to a signal that will be called after the widget is realized automatically, such as Widget::expose-event. Or simply g_signal_connect to the Widget::realize signal.
func (*CWidget) RegionIntersect ¶
func (w *CWidget) RegionIntersect(region cdk.Region) (value cdk.Region)
Computes the intersection of a widget 's area and region , returning the intersection. The result may be empty, use RegionEmpty to check. Parameters:
region a Region, in the same coordinate system as
widget->allocation . That is, relative to widget->window for NO_WINDOW widgets; relative to the parent window of widget->window for widgets with their own window.
returns A newly allocated region holding the intersection of widget
and region . The coordinates of the return value are relative to widget->window for NO_WINDOW widgets, and relative to the parent window of widget->window for widgets with their own window.
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) ResetRcStyles ¶
func (w *CWidget) ResetRcStyles()
Reset the styles of widget and all descendents, so when they are looked up again, they get the correct values for the currently loaded RC file settings. This function is not useful for applications.
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) SetChildVisible ¶
Sets whether widget should be mapped along with its when its parent is mapped and widget has been shown with Show. The child visibility can be set for widget before it is added to a container with SetParent, to avoid mapping children unnecessary before immediately unmapping them. However it will be reset to its default state of TRUE when the widget is removed from a container. Note that changing the child visibility of a widget does not queue a resize on the widget. Most of the time, the size of a widget is computed from all visible children, whether or not they are mapped. If this is not the case, the container can queue a resize itself. This function is only useful for container implementations and never should be called by an application. Parameters:
isVisible if TRUE, widget
should be mapped along with its parent.
func (*CWidget) SetColormap ¶
func (w *CWidget) SetColormap(colormap cdk.Colormap)
Sets the colormap for the widget to the given value. Widget must not have been previously realized. This probably should only be used from an init function (i.e. from the constructor for the widget). Parameters:
colormap a colormap
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) SetDefaultColormap ¶
func (w *CWidget) SetDefaultColormap(colormap cdk.Colormap)
Sets the default colormap to use when creating widgets. PushColormap is a better function to use if you only want to affect a few widgets, rather than all widgets. Parameters:
colormap a Colormap
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 ¶
func (w *CWidget) SetEvents(events cdk.EventMask)
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) SetHasWindow ¶
Specifies whether widget has a Window of its own. Note that all realized widgets have a non-NULL "window" pointer (GetWindow never returns a NULL window when a widget is realized), but for many of them it's actually the Window of one of its parent widgets. Widgets that do not create a window for themselves in Widget::realize must announce this by calling this function with has_window = FALSE. This function should only be called by widget implementations, and they should call it in their init function. Parameters:
hasWindow whether or not widget
has a window.
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) SetName ¶
Widgets can be named, which allows you to refer to them from a gtkrc file. You can apply a style to widgets with a particular name in the gtkrc file. See the documentation for gtkrc files (on the same page as the docs for RcStyle). Note that widget names are separated by periods in paths (see Path), so names with embedded periods may cause confusion. Parameters:
name name for the widget
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) SetStyle ¶
Sets the Style for a widget (widget->style ). You probably don't want to use this function; it interacts badly with themes, because themes work by replacing the Style. Instead, use ModifyStyle. Parameters:
style a Style, or NULL to remove the effect of a previous
SetStyle and go back to the default style.
func (*CWidget) SetTheme ¶
func (w *CWidget) SetTheme(theme cdk.Theme)
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()
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()
Recursively shows a widget, and any child widgets (if the widget is a container).
func (*CWidget) ShowNow ¶
func (w *CWidget) ShowNow()
Shows a widget. If the widget is an unmapped toplevel widget (i.e. a Window that has not yet been shown), enter the main loop and wait for the window to actually be mapped. Be careful; because the main loop is running, anything can happen during this function.
func (*CWidget) SizeRequest ¶
func (w *CWidget) SizeRequest() cdk.Rectangle
Returns the currently requested size
func (*CWidget) ThawChildNotify ¶
func (w *CWidget) ThawChildNotify()
Reverts the effect of a previous call to FreezeChildNotify. This causes all queued “child-notify” signals on widget to be emitted.
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) Unmap ¶
func (w *CWidget) Unmap()
This function is only for use in widget implementations. Causes a widget to be unmapped if it's currently mapped.
func (*CWidget) Unparent ¶
func (w *CWidget) Unparent()
This function 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) Unrealize ¶
func (w *CWidget) Unrealize()
This function is only useful in widget implementations. Causes a widget to be unrealized (frees all GDK resources associated with the widget, such as widget->window ).
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 NewWindowWithTitle ¶
Constructor for Window objects
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) 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 (w *CWindow) FocusPrevious() cdk.EventFlag
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) GetDisplayManager ¶
func (w *CWindow) GetDisplayManager() (dm cdk.DisplayManager)
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 ¶
func (w *CWindow) GetMnemonicModifier() (value cdk.ModMask)
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 ¶
Gets the value set by SetResizable. Returns:
TRUE if the user can resize the window
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) GetThemeRequest ¶
func (w *CWindow) GetThemeRequest() (theme cdk.Theme)
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 ¶
Window 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 Window instance
func (*CWindow) Invalidate ¶
func (w *CWindow) Invalidate() cdk.EventFlag
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) ProcessEvent ¶
func (w *CWindow) ProcessEvent(evt cdk.Event) cdk.EventFlag
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) 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) Resize ¶
func (w *CWindow) Resize() cdk.EventFlag
Resizes the window as if the user had done so, obeying geometry constraints. The default geometry constraint is that windows may not be smaller than their size request; to override this constraint, call WidgetSetSizeRequest to set the window's request to a smaller value. If Resize is called before showing a window for the first time, it overrides any default size set with SetDefaultSize. Windows may not be resized smaller than 1 by 1 pixels. Parameters:
width width in pixels to resize the window to height height in pixels to resize the window to
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) SetDisplayManager ¶
func (w *CWindow) SetDisplayManager(dm cdk.DisplayManager)
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 ¶
func (w *CWindow) SetMnemonicModifier(modifier cdk.ModMask)
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 ¶
Sets 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 ¶
Sets 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 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) SetWmClass ¶
Don't use this function. It sets the X Window System "class" and "name" hints for a window. According to the ICCCM, you should always set these to the same value for all windows in an application, and CTK sets them to that value by default, so calling this function is sort of pointless. However, you may want to call SetRole on each window in your application, for the benefit of the session manager. Setting the role allows the window manager to restore window positions when loading a saved session. Parameters:
wmclassName window name hint wmclassClass window class hint
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) Add(w Widget) Remove(w Widget) AddWithProperties(widget Widget, argv ...interface{}) ForEach(callback Callback, callbackData interface{}) GetChildren() (children []Widget) GetFocusChild() (value Widget) SetFocusChild(child Widget) GetFocusVAdjustment() (value Adjustment) SetFocusVAdjustment(adjustment Adjustment) GetFocusHAdjustment() (value Adjustment) SetFocusHAdjustment(adjustment Adjustment) ChildType() (value cdk.CTypeTag) 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{}) ForAll(callback Callback, callbackData 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) Build(builder Builder, element *CBuilderElement) error SetOrigin(x, y int) SetWindow(w Window) GetWidgetAt(p *cdk.Point2I) Widget ShowAll() }
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 WidgetChain types: FocusChain and DefaultChain.
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) 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) Build(builder Builder, element *CBuilderElement) error Show() Destroy() ProcessEvent(evt cdk.Event) cdk.EventFlag Resize() cdk.EventFlag Invalidate() cdk.EventFlag Draw(canvas cdk.Canvas) cdk.EventFlag }
Dialog Hierarchy:
Object +- Widget +- Container +- Bin +- Window +- Dialog +- AboutDialog +- ColorSelectionDialog +- FileChooserDialog +- FileSelection +- FontSelectionDialog +- InputDialog +- MessageDialog +- PageSetupUnixDialog +- PrintUnixDialog +- RecentChooserDialog
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 *cdk.Point2I) bool GetWidgetAt(p *cdk.Point2I) (instance interface{}) GetSizeRequest() (size cdk.Rectangle) SetSizeRequest(x, y int) GetTheme() (theme cdk.Theme) SetTheme(theme cdk.Theme) GetThemeRequest() (theme cdk.Theme) GetOrigin() (origin cdk.Point2I) SetOrigin(x, y int) GetAllocation() (alloc cdk.Rectangle) SetAllocation(alloc cdk.Rectangle) Invalidate() cdk.EventFlag Resize() cdk.EventFlag Draw(canvas cdk.Canvas) cdk.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) GrabFocus() Activate() (value bool) CancelEvent() ProcessEvent(evt cdk.Event) cdk.EventFlag }
EventBox Hierarchy:
Object +- Widget +- Container +- Bin +- EventBox
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) SetLabel(label string) SetLabelWidget(labelWidget Widget) SetLabelAlign(xAlign float64, yAlign float64) SetShadowType(shadowType ShadowType) GetLabel() (value string) GetLabelAlign() (xAlign float64, yAlign float64) GetLabelWidget() (value Widget) GetShadowType() (value ShadowType) GrabFocus() Add(w Widget) Remove(w Widget) IsFocus() bool GetFocusWithChild() (focusWithChild bool) SetFocusWithChild(focusWithChild bool) GetWidgetAt(p *cdk.Point2I) Widget GetThemeRequest() (theme cdk.Theme) GetSizeRequest() (width, height int) Resize() cdk.EventFlag Draw(canvas cdk.Canvas) cdk.EventFlag Invalidate() cdk.EventFlag }
Frame Hierarchy:
Object +- Widget +- Container +- Bin +- Frame +- AspectFrame
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 cdk.Style) SetMarkup(text string) (parseError error) SetMarkupWithMnemonic(str string) (err error) SetJustify(justify cdk.Justification) SetEllipsize(mode bool) SetWidthChars(nChars int) SetMaxWidthChars(nChars int) SetLineWrap(wrap bool) SetLineWrapMode(wrapMode cdk.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 cdk.Style) GetJustify() (value cdk.Justification) GetEllipsize() (value bool) GetWidthChars() (value int) GetMaxWidthChars() (value int) GetLabel() (value string) GetLineWrap() (value bool) GetLineWrapMode() (value cdk.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) SetTheme(theme cdk.Theme) GetClearText() (text string) GetPlainText() (text string) GetCleanText() (text string) GetPlainTextInfo() (maxWidth, lineCount int) GetPlainTextInfoAtWidth(width int) (maxWidth, lineCount int) GetSizeRequest() (width, height int) Resize() cdk.EventFlag Draw(canvas cdk.Canvas) cdk.EventFlag Invalidate() cdk.EventFlag }
Label Hierarchy:
Object +- Widget +- Misc +- Label +- AccelLabel +- TipsQuery
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) SetAlignment(xAlign float64, yAlign float64) SetPadding(xPad int, yPad int) GetAlignment() (xAlign float64, yAlign float64) GetPadding() (xPad int, yPad int) }
Misc Hierarchy:
Object +- Widget +- Misc +- Label +- Arrow +- Image +- Pixmap
type ModifierType ¶
type ModifierType uint64
const ( NullModMask ModifierType = 0 ShiftMask ModifierType = 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() cdk.Point2I SetAllocation(size cdk.Rectangle) GetAllocation() cdk.Rectangle GetObjectAt(p *cdk.Point2I) Object HasPoint(p *cdk.Point2I) (contains bool) Invalidate() cdk.EventFlag ProcessEvent(evt cdk.Event) cdk.EventFlag Draw(canvas cdk.Canvas) cdk.EventFlag Resize() cdk.EventFlag GetTextDirection() (direction TextDirection) SetTextDirection(direction TextDirection) CssSelector() (selector string) InstallCssProperty(name cdk.Property, kind cdk.PropertyType, write bool, def interface{}) (err error) GetCssProperty(name cdk.Property) (property *cdk.CProperty) GetCssProperties() (properties []*cdk.CProperty) GetCssBool(name cdk.Property) (value bool, err error) GetCssString(name cdk.Property) (value string, err error) GetCssInt(name cdk.Property) (value int, err error) GetCssFloat(name cdk.Property) (value float64, err error) GetCssColor(name cdk.Property) (value cdk.Color, err error) }
In the Curses Tool Kit, the Object type 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 cdk.Orientation) SetOrientation(orientation cdk.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 cdk.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
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) cdk.EventFlag ForwardStep() cdk.EventFlag ForwardPage() cdk.EventFlag Backward(step int) cdk.EventFlag BackwardStep() cdk.EventFlag BackwardPage() cdk.EventFlag GetSizeRequest() (width, height int) Resize() cdk.EventFlag GetWidgetAt(p *cdk.Point2I) Widget ValueChanged() Changed() GrabFocus() CancelEvent() ProcessEvent(evt cdk.Event) cdk.EventFlag ProcessEventAtPoint(p *cdk.Point2I, e *cdk.EventMouse) cdk.EventFlag Invalidate() cdk.EventFlag Draw(canvas cdk.Canvas) cdk.EventFlag GetAllStepperRegions() (fwd, bwd, sFwd, sBwd cdk.Region) GetStepperRegions() (start, end cdk.Region) GetTroughRegion() (region cdk.Region) GetSliderRegion() (region cdk.Region) }
Scrollbar Hierarchy:
Object +- Widget +- Range +- Scrollbar +- HScrollbar +- VScrollbar
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) SetTheme(theme cdk.Theme) Add(w Widget) Remove(w Widget) GetChild() Widget GetHScrollbar() *CHScrollbar GetVScrollbar() *CVScrollbar Show() Hide() GrabFocus() GetWidgetAt(p *cdk.Point2I) Widget InternalGetWidgetAt(p *cdk.Point2I) Widget CancelEvent() ProcessEvent(evt cdk.Event) cdk.EventFlag ProcessEventAtPoint(p *cdk.Point2I, evt *cdk.EventMouse) cdk.EventFlag GetRegions() (c, h, v cdk.Region) Resize() cdk.EventFlag Draw(canvas cdk.Canvas) cdk.EventFlag Invalidate() cdk.EventFlag }
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 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.
type Style ¶
type Style interface { Object Init() (already bool) Copy() (value Style) Attach(window Window) (value Style) Detach() ApplyDefaultBackground(window Window, setBg bool, stateType StateType, area cdk.Rectangle, x int, y int, width int, height int) LookupColor(colorName string, color cdk.Color) (value bool) Get(widgetType cdk.CTypeTag, firstPropertyName string, argv ...interface{}) PaintArrow(window Window, stateType StateType, shadowType ShadowType, area cdk.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 cdk.Rectangle, widget Widget, detail string, x int, y int, width int, height int) PaintBoxGap(window Window, stateType StateType, shadowType ShadowType, area cdk.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 cdk.Rectangle, widget Widget, detail string, x int, y int, width int, height int) PaintDiamond(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, widget Widget, detail string, x int, y int, width int, height int) PaintExtension(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, widget Widget, detail string, x int, y int, width int, height int, gapSide PositionType) PaintFlatBox(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, widget Widget, detail string, x int, y int, width int, height int) PaintFocus(window Window, stateType StateType, area cdk.Rectangle, widget Widget, detail string, x int, y int, width int, height int) PaintHandle(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, widget Widget, detail string, x int, y int, width int, height int, orientation cdk.Orientation) PaintHLine(window Window, stateType StateType, area cdk.Rectangle, widget Widget, detail string, x1 int, x2 int, y int) PaintOption(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, widget Widget, detail string, x int, y int, width int, height int) PaintPolygon(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, widget Widget, detail string, points cdk.Point2I, nPoints int, fill bool) PaintShadow(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, widget Widget, detail string, x int, y int, width int, height int) PaintShadowGap(window Window, stateType StateType, shadowType ShadowType, area cdk.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 cdk.Rectangle, widget Widget, detail string, x int, y int, width int, height int, orientation cdk.Orientation) PaintSpinner(window Window, stateType StateType, area cdk.Rectangle, widget Widget, detail string, step int, x int, y int, width int, height int) PaintTab(window Window, stateType StateType, shadowType ShadowType, area cdk.Rectangle, widget Widget, detail string, x int, y int, width int, height int) PaintVLine(window Window, stateType StateType, area cdk.Rectangle, widget Widget, detail string, y1 int, y2 int, x int) PaintExpander(window Window, stateType StateType, area cdk.Rectangle, widget Widget, detail string, x int, y int, expanderStyle ExpanderStyle) // PaintLayout(window Window, stateType StateType, useText bool, area cdk.Rectangle, widget Widget, detail string, x int, y int, layout PangoLayout) PaintResizeGrip(window Window, stateType StateType, area cdk.Rectangle, widget Widget, detail string, edge WindowEdge, x int, y int, width int, height int) BorderNew() (value cdk.Border) BorderCopy(border cdk.Border) (value cdk.Border) BorderFree(border cdk.Border) }
Style Hierarchy:
Object +- Style
type StyleSheet ¶
type StyleSheet struct { Lexer *tcss.Lexer Rules []*StyleSheetRule MediaRules []*StyleSheetMedia }
func NewStyleSheet ¶
func NewStyleSheet() *StyleSheet
func (*StyleSheet) ParseString ¶
func (s *StyleSheet) ParseString(source string) (err error)
func (StyleSheet) SelectProperties ¶
func (s StyleSheet) SelectProperties(path string) (properties map[string]*StyleSheetProperty)
func (StyleSheet) String ¶
func (s StyleSheet) 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 ¶
func ParseSelector ¶
func ParseSelector(path string) (selector *StyleSheetSelector)
func (StyleSheetSelector) Match ¶
func (s StyleSheetSelector) Match(selector *StyleSheetSelector) (score int)
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) Invalidate() cdk.EventFlag Resize() cdk.EventFlag Draw(canvas cdk.Canvas) cdk.EventFlag }
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 or Iconview, it can be added to a ScrolledWindow with ContainerAdd. 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 ScrolledWindowAddWithViewport 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) GtkCallback(data interface{}) Destroy() Destroyed(widgetPointer Widget) Unparent() Show() ShowNow() Hide() ShowAll() Map() Unmap() Realize() Unrealize() QueueDraw() QueueResizeNoRedraw() 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) ListAccelClosures() (value cdk.CList) CanActivateAccel(signalId int) (value bool) Event(event cdk.Event) (value bool) Activate() (value bool) Reparent(parent Container) Intersect(area cdk.Rectangle, intersection cdk.Rectangle) (value bool) IsFocus() (value bool) GrabFocus() GrabDefault() SetName(name string) GetName() (value string) SetState(state StateType) SetSensitive(sensitive bool) 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) GetColormap() (value cdk.Colormap) SetColormap(colormap cdk.Colormap) GetVisual() (value cdk.Visual) 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) HideOnDelete() (value bool) SetStyle(style Style) EnsureStyle() GetStyle() (value Style) ResetRcStyles() PushColormap(cmap cdk.Colormap) PopColormap() SetDefaultColormap(colormap cdk.Colormap) GetDefaultStyle() (value Style) GetDefaultColormap() (value cdk.Colormap) GetDefaultVisual() (value cdk.Visual) 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) ModifyStyle(style RcStyle) GetModifierStyle() (value RcStyle) ModifyFg(state StateType, color cdk.Color) ModifyBg(state StateType, color cdk.Color) ModifyText(state StateType, color cdk.Color) ModifyBase(state StateType, color cdk.Color) ModifyCursor(primary cdk.Color, secondary cdk.Color) PopCompositeChild() PushCompositeChild() QueueDrawArea(x int, y int, width int, height int) SetAppPaintable(appPaintable bool) SetDoubleBuffered(doubleBuffered bool) SetRedrawOnAllocate(redrawOnAllocate bool) SetCompositeName(name string) SetScrollAdjustments(hadjustment Adjustment, vadjustment Adjustment) (value bool) RegionIntersect(region cdk.Region) (value cdk.Region) 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.DisplayManager) GetRootWindow() (value Window) GetScreen() (value cdk.Display) HasScreen() (value bool) GetSizeRequest() (width, height int) SizeRequest() cdk.Rectangle SetChildVisible(isVisible bool) SetSizeRequest(width, height int) ThawChildNotify() SetNoShowAll(noShowAll bool) GetNoShowAll() (value bool) ListMnemonicLabels() (value cdk.CList) AddMnemonicLabel(label Widget) RemoveMnemonicLabel(label Widget) IsComposited() (value bool) 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() GetSnapshot(clipRect cdk.Rectangle) (value cdk.Pixmap) GetWindow() (window Window) GetAppPaintable() (value bool) GetCanDefault() (value bool) SetCanDefault(canDefault bool) GetCanFocus() (value bool) SetCanFocus(canFocus bool) GetDoubleBuffered() (value bool) GetHasWindow() (value bool) SetHasWindow(hasWindow bool) GetSensitive() (value bool) IsSensitive() bool GetState() (value StateType) GetVisible() (value bool) SetVisible(visible bool) HasDefault() (value bool) HasFocus() (value bool) HasGrab() (value bool) HasRcStyle() (value bool) IsDrawable() (value bool) IsToplevel() (value bool) SetWindow(window Window) SetReceivesDefault(receivesDefault bool) GetReceivesDefault() (value bool) SetRealized(realized bool) GetRealized() (value bool) SetMapped(mapped bool) GetMapped() (value bool) GetThemeRequest() (theme cdk.Theme) SetTheme(theme cdk.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 *cdk.Point2I) Widget }
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. Widget introduces style properties - these are basically object properties that are stored not on the object, but in the style object associated to the widget. Style properties are set in resource files. This mechanism is used for configuring such things as the location of the scrollbar arrows through the theme, giving theme authors more control over the look of applications without the need to write a theme engine in C. Use ClassInstallStyleProperty to install style properties for a widget class, ClassFindStyleProperty or ClassListStyleProperties to get information about existing style properties and StyleGetProperty, StyleGet or StyleGetValist to obtain the value of a style property. The Widget implementation of the Buildable interface supports a custom <accelerator> element, which has attributes named key, modifiers and signal and allows to specify accelerators. Example 14. A UI definition fragment specifying an accelerator In addition to accelerators, Widget also support a custom <accessible> element, which supports actions and relations. Properties on the accessible implementation of an object can be set by accessing the internal child "accessible" of a Widget. Example 15. A UI definition fragment specifying an accessible
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 SetTitle(title string) SetWmClass(wmClassName string, wmClassClass 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() Resize() cdk.EventFlag SetAutoStartupNotification(setting bool) GetOpacity() (value float64) SetOpacity(opacity float64) GetMnemonicsVisible() (value bool) SetMnemonicsVisible(setting bool) GetDisplayManager() (dm cdk.DisplayManager) SetDisplayManager(dm cdk.DisplayManager) GetVBox() (vbox VBox) GetNextFocus() (next interface{}) GetPreviousFocus() (previous interface{}) FocusNext() cdk.EventFlag FocusPrevious() cdk.EventFlag GetEventFocus() (o interface{}) SetEventFocus(o interface{}) ProcessEvent(evt cdk.Event) cdk.EventFlag GetThemeRequest() (theme cdk.Theme) Invalidate() cdk.EventFlag Draw(canvas cdk.Canvas) cdk.EventFlag }
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 embeds 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
- dnd.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_sheet.go
- style_sheet_media.go
- style_sheet_property.go
- style_sheet_rule.go
- style_sheet_selector.go
- testing.go
- types.go
- vbox.go
- vbutton_box.go
- viewport.go
- vscrollbar.go
- widget.go
- window.go