Documentation ¶
Overview ¶
Package cocoa provides platform-dependent routines required to support the package goey when targeting Cocoa or GNUstep.
Index ¶
- func DialogSendKey(key uint)
- func MessageDialog(handle *Window, text string, title string, icon byte)
- func OpenPanel(handle *Window, filename string) string
- func SavePanel(handle *Window, filename string) string
- type Button
- func (w *Button) Callbacks() (func(), func(bool), func(), func())
- func (w *Button) Close()
- func (w *Button) IsDefault() bool
- func (w *Button) PerformClick()
- func (w *Button) SetCallbacks(onclick func(), onchange func(bool), onfocus func(), onblur func())
- func (w *Button) SetDefault(value bool)
- func (w *Button) SetState(value bool)
- func (w *Button) SetTitle(title string)
- func (w *Button) State() bool
- func (w *Button) Title() string
- type Control
- type Decoration
- func (w *Decoration) BorderRadius() (int, int)
- func (w *Decoration) Close()
- func (w *Decoration) FillColor() color.RGBA
- func (w *Decoration) SetBorderRadius(x, y int)
- func (w *Decoration) SetFillColor(fill color.Color)
- func (w *Decoration) SetStrokeColor(fill color.Color)
- func (w *Decoration) StrokeColor() color.RGBA
- type HR
- type ImageView
- type IntField
- func (w *IntField) Callbacks() (func(int64), func(), func())
- func (w *IntField) Close()
- func (w *IntField) IsEditable() bool
- func (w *IntField) Max() int64
- func (w *IntField) Min() int64
- func (w *IntField) Placeholder() string
- func (w *IntField) SetCallbacks(onchange func(int64), onfocus func(), onblur func())
- func (w *IntField) SetEditable(value bool)
- func (c *IntField) SetFrame(x, y, dx, dy int)
- func (w *IntField) SetPlaceholder(text string)
- func (w *IntField) SetValue(value, min, max int64)
- func (w *IntField) Value() int64
- type PopUpButton
- func (w *PopUpButton) AddItem(text string)
- func (w *PopUpButton) Callbacks() (func(int), func(), func())
- func (w *PopUpButton) Close()
- func (w *PopUpButton) ItemAtIndex(index int) string
- func (w *PopUpButton) NumberOfItems() int
- func (w *PopUpButton) RemoveAllItems()
- func (w *PopUpButton) SetCallbacks(onchange func(int), onfocus func(), onblur func())
- func (w *PopUpButton) SetValue(value int, unset bool)
- func (w *PopUpButton) Value() int
- type Progress
- type Slider
- type TabView
- func (w *TabView) AddItem(text string)
- func (w *TabView) Close()
- func (w *TabView) ContentInsets() (int, int)
- func (w *TabView) ContentView(index int) *View
- func (w *TabView) ItemAtIndex(index int) string
- func (w *TabView) NumberOfItems() int
- func (w *TabView) RemoveItemAtIndex(index int)
- func (w *TabView) SelectItem(index int)
- func (w *TabView) SetItemAtIndex(index int, text string)
- func (w *TabView) SetOnChange(cb func(int))
- type Text
- type TextField
- func (w *TextField) Callbacks() (func(string), func(), func(), func(string))
- func (w *TextField) Close()
- func (w *TextField) IsEditable() bool
- func (w *TextField) IsPassword() bool
- func (w *TextField) Placeholder() string
- func (w *TextField) SetCallbacks(onchange func(string), onfocus func(), onblur func(), onenterkey func(string))
- func (w *TextField) SetEditable(value bool)
- func (w *TextField) SetPlaceholder(text string)
- func (w *TextField) SetValue(text string)
- func (w *TextField) Value() string
- type View
- type Window
- func (w *Window) Close()
- func (w *Window) ContentSize() (int, int)
- func (w *Window) ContentView() *View
- func (w *Window) MakeFirstResponder(c *Control)
- func (w *Window) Screenshot() image.Image
- func (w *Window) SetCallbacks(cb WindowCallbacks)
- func (w *Window) SetContentSize(width, height int)
- func (w *Window) SetIcon(img image.Image) error
- func (w *Window) SetMinSize(width, height int)
- func (w *Window) SetScrollVisible(horz, vert bool)
- func (w *Window) SetTitle(title string)
- func (w *Window) Title() string
- type WindowCallbacks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialogSendKey ¶
func DialogSendKey(key uint)
Types ¶
type Button ¶
type Button struct { Control // contains filtered or unexported fields }
Button is a wrapper for a NSButton.
func (*Button) PerformClick ¶
func (w *Button) PerformClick()
func (*Button) SetCallbacks ¶
func (*Button) SetDefault ¶
type Control ¶
type Control struct { View // contains filtered or unexported fields }
func (*Control) IntrinsicContentSize ¶
func (*Control) MakeFirstResponder ¶
func (*Control) SetEnabled ¶
type Decoration ¶
type Decoration struct { View // contains filtered or unexported fields }
Decoration is a wrapper for a GDecoration.
func NewDecoration ¶
func (*Decoration) BorderRadius ¶
func (w *Decoration) BorderRadius() (int, int)
func (*Decoration) Close ¶
func (w *Decoration) Close()
func (*Decoration) FillColor ¶
func (w *Decoration) FillColor() color.RGBA
func (*Decoration) SetBorderRadius ¶
func (w *Decoration) SetBorderRadius(x, y int)
func (*Decoration) SetFillColor ¶
func (w *Decoration) SetFillColor(fill color.Color)
func (*Decoration) SetStrokeColor ¶
func (w *Decoration) SetStrokeColor(fill color.Color)
func (*Decoration) StrokeColor ¶
func (w *Decoration) StrokeColor() color.RGBA
type HR ¶
type HR struct { View // contains filtered or unexported fields }
HR is a wrapper for a GHR.
type ImageView ¶
type ImageView struct { Control // contains filtered or unexported fields }
ImageView is a wrapper for a NSImageView.
type IntField ¶
type IntField struct { Control // contains filtered or unexported fields }
IntField is a wrapper for a NSTextField and NSStepper.
func NewIntField ¶
func (*IntField) IsEditable ¶
func (*IntField) Placeholder ¶
func (*IntField) SetCallbacks ¶
func (*IntField) SetEditable ¶
func (*IntField) SetPlaceholder ¶
type PopUpButton ¶
type PopUpButton struct { Control // contains filtered or unexported fields }
PopUpButton is a wrapper for a NSPopUpButton.
func NewPopUpButton ¶
func NewPopUpButton(window *View) *PopUpButton
func (*PopUpButton) AddItem ¶
func (w *PopUpButton) AddItem(text string)
func (*PopUpButton) Callbacks ¶
func (w *PopUpButton) Callbacks() (func(int), func(), func())
func (*PopUpButton) Close ¶
func (w *PopUpButton) Close()
func (*PopUpButton) ItemAtIndex ¶
func (w *PopUpButton) ItemAtIndex(index int) string
func (*PopUpButton) NumberOfItems ¶
func (w *PopUpButton) NumberOfItems() int
func (*PopUpButton) RemoveAllItems ¶
func (w *PopUpButton) RemoveAllItems()
func (*PopUpButton) SetCallbacks ¶
func (w *PopUpButton) SetCallbacks(onchange func(int), onfocus func(), onblur func())
func (*PopUpButton) SetValue ¶
func (w *PopUpButton) SetValue(value int, unset bool)
func (*PopUpButton) Value ¶
func (w *PopUpButton) Value() int
type Progress ¶
type Progress struct { View // contains filtered or unexported fields }
Progress is a wrapper for a NSProgressIndicator.
func NewProgress ¶
type Slider ¶
type Slider struct { Control // contains filtered or unexported fields }
Slider is a wrapper for a NSSlider.
func (*Slider) SetCallbacks ¶
type TabView ¶
type TabView struct { View // contains filtered or unexported fields }
TabView is a wrapper for a NSTabView.
func NewTabView ¶
func (*TabView) ContentInsets ¶
func (*TabView) ContentView ¶
func (*TabView) ItemAtIndex ¶
func (*TabView) NumberOfItems ¶
func (*TabView) RemoveItemAtIndex ¶
func (*TabView) SelectItem ¶
func (*TabView) SetItemAtIndex ¶
func (*TabView) SetOnChange ¶
type Text ¶
type Text struct { View // contains filtered or unexported fields }
Text is a wrapper for a NSText.
func (*Text) SetAlignment ¶
type TextField ¶
type TextField struct { Control // contains filtered or unexported fields }
TextField is a wrapper for a NSTextField.
func (*TextField) IsEditable ¶
func (*TextField) IsPassword ¶
func (*TextField) Placeholder ¶
func (*TextField) SetCallbacks ¶
func (*TextField) SetEditable ¶
func (*TextField) SetPlaceholder ¶
type View ¶
type View struct {
// contains filtered or unexported fields
}
View is a wrapper for a NSView.
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
Window is a wrapper for a NSWindow.
func (*Window) ContentSize ¶
func (*Window) ContentView ¶
func (*Window) MakeFirstResponder ¶
func (*Window) Screenshot ¶
func (*Window) SetCallbacks ¶
func (w *Window) SetCallbacks(cb WindowCallbacks)
func (*Window) SetContentSize ¶
func (*Window) SetMinSize ¶
func (*Window) SetScrollVisible ¶
type WindowCallbacks ¶
type WindowCallbacks interface { OnShouldClose() bool OnWillClose() OnDidResize() }
Click to show internal directories.
Click to hide internal directories.