Documentation
¶
Index ¶
- Variables
- func Close()
- func DropFile() string
- func Init() error
- func InitFonts()
- func KeySym() int
- func MaxInt(a, b int) int
- func MinInt(a, b int) int
- func ModShift() int
- func MouseButton() int
- func PostUpdate()
- func Run() int
- func SetSender(o Widget)
- type Box
- func (o *Box) AddChild(child Widget)
- func (o *Box) Children() []Widget
- func (o *Box) Clear()
- func (o *Box) ClearColor() Color
- func (o *Box) Close()
- func (o *Box) Color() Color
- func (o *Box) Draw()
- func (o *Box) Fill(rect Rect)
- func (o *Box) Font() *ttf.Font
- func (o *Box) Line(a, b Point)
- func (o *Box) Move(x, y int)
- func (o *Box) Parent() Widget
- func (o *Box) Pos() Point
- func (o *Box) Rect(rect Rect)
- func (o *Box) RemoveChild(child Widget)
- func (o *Box) Renderer() *sdl.Renderer
- func (o *Box) Repaint()
- func (o *Box) Resize(w, h int)
- func (o *Box) SetClearColor(color Color)
- func (o *Box) SetColor(color Color)
- func (o *Box) SetFont(font *ttf.Font)
- func (o *Box) SetParent(parent Widget)
- func (o *Box) SetPos(pos Point)
- func (o *Box) SetSize(size Point)
- func (o *Box) SetTextColor(color Color)
- func (o *Box) Size() Point
- func (o *Box) Surface() *sdl.Surface
- func (o *Box) TextColor() Color
- func (o *Box) TranslateAbsToRel(x, y int) (int, int)
- func (o *Box) WriteText(pos Point, str string) Point
- type Color
- type Point
- type Rect
- type RootWindow
- type Widget
Constants ¶
This section is empty.
Variables ¶
View Source
var OnLoop func()
View Source
var Palette = palette{ Passive: Color32b(0x455a64ff), Active: Color32b(0x593e37ff), Accent: Color32b(0x0277bdff), Select: Color32b(0x01579bff), Normal: Color32b(0x000000ff), Info: Color32b(0xcfd8dcff), Warning: Color32b(0xff9800ff), Error: Color32b(0xff5722ff), // contains filtered or unexported fields }
Functions ¶
func MouseButton ¶
func MouseButton() int
func PostUpdate ¶
func PostUpdate()
Types ¶
type Box ¶
type Box struct {
Widget
OnDraw func()
OnEnter func()
OnLeave func()
OnMouseButtonDown func()
OnMouseButtonUp func()
OnMouseClick func()
OnMouseOver func()
OnMouseScroll func()
OnKeyPress func()
OnResize func()
// contains filtered or unexported fields
}
func (*Box) ClearColor ¶
func (*Box) RemoveChild ¶
func (*Box) SetClearColor ¶
func (*Box) SetTextColor ¶
type RootWindow ¶
type RootWindow struct {
Box
OnDropFile func()
// contains filtered or unexported fields
}
RootWindow ...
func NewRootWindow ¶
func NewRootWindow(title string, width, height int) *RootWindow
NewRootWindow ...
func (*RootWindow) Close ¶
func (o *RootWindow) Close()
func (*RootWindow) Resize ¶
func (o *RootWindow) Resize(w, h int)
func (*RootWindow) SetSize ¶
func (o *RootWindow) SetSize(_ Point)
func (*RootWindow) UpdateSurface ¶
func (o *RootWindow) UpdateSurface()
type Widget ¶
type Widget interface {
Close()
Parent() Widget
SetParent(Widget)
Children() []Widget
AddChild(child Widget)
RemoveChild(child Widget)
Pos() Point
SetPos(pos Point)
Move(x, y int)
Size() Point
SetSize(size Point)
Resize(width, height int)
Font() *ttf.Font
Surface() *sdl.Surface
Renderer() *sdl.Renderer
Repaint()
SetClearColor(color Color)
SetColor(color Color)
SetTextColor(color Color)
ClearColor() Color
Color() Color
TextColor() Color
Clear()
Fill(rect Rect)
Rect(rect Rect)
Line(a, b Point)
WriteText(pos Point, str string) Point
//IsInside(x, y int32) bool
TranslateAbsToRel(x, y int) (int, int)
Draw()
// contains filtered or unexported methods
}
func PrevMouseOver ¶
func PrevMouseOver() Widget
Source Files
¶
Click to show internal directories.
Click to hide internal directories.