Documentation ¶
Index ¶
- func Register(current driver.Driver)
- type Application
- func (app *Application) Chan() <-chan event.Eventer
- func (app *Application) Close()
- func (app *Application) NewMenu(label string) *Menu
- func (app *Application) NewWindow(rect image.Rectangle, background color.Color) *Window
- func (app *Application) Size(rect image.Rectangle)
- func (app *Application) Title(title string)
- type Font
- type Image
- type Menu
- type Window
- func (w *Window) Clear()
- func (w *Window) Drop()
- func (w *Window) Fill(rect image.Rectangle, foreground color.Color)
- func (w *Window) Image(rect image.Rectangle, img *Image)
- func (w *Window) Line(from image.Point, to image.Point, foreground color.Color)
- func (w *Window) Raise()
- func (w *Window) Show()
- func (w *Window) Size(rect image.Rectangle)
- func (w *Window) Text(text string, font *Font, from image.Point, foreground color.Color)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
type Application struct{}
Application represents application top level window
func NewApplication ¶
func NewApplication(rect image.Rectangle, title string) *Application
NewApplication creates main application window
func (*Application) Chan ¶ added in v0.1.10
func (app *Application) Chan() <-chan event.Eventer
Chan returns event channel
func (*Application) NewMenu ¶ added in v0.1.7
func (app *Application) NewMenu(label string) *Menu
NewMenu returns a new top-level menu node
func (*Application) NewWindow ¶
NewWindow creates new inner window with a specified size and background color
func (*Application) Size ¶
func (app *Application) Size(rect image.Rectangle)
Size sets application window size
func (*Application) Title ¶
func (app *Application) Title(title string)
Title sets application window title
type Font ¶
type Font struct { Height int Baseline int Ascent int Descent int Attributes map[string]string // contains filtered or unexported fields }
Font represents a font selection
func NewFont ¶
NewFont return a font selection struct. Note than "family" and other attributes are driver specific. Open duo/font.go for details.
type Menu ¶ added in v0.1.7
type Menu struct {
// contains filtered or unexported fields
}
Menu represents any menu node
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
Window represents inner window
func (*Window) Drop ¶
func (w *Window) Drop()
Drop deletes window Note that a dropped window can no longer be used
func (*Window) Raise ¶ added in v0.1.7
func (w *Window) Raise()
Raise brings the window to the forefront
func (*Window) Show ¶
func (w *Window) Show()
Show sends the contents of the window to the screen Note that a drawings are not visible until Show