The fltk2go package provides an interface to the FLTK (Fast, Light Toolkit) library, wrapping its functionalities for ease of use in Go applications. This documentation describes the main types, interfaces, and functions available in the package.
- Represents a GUI element in the FLTK framework.
- Fields:
Label string: The text label displayed.Width int: The width of the element.Height int: The height of the element.
- Represents a top-level window in FLTK.
- Fields:
Title string: The title of the window.Elements []Element: The elements contained in the window.
- An interface that all widgets implement.
- Methods:
Draw(): Method to draw the widget on the screen.Handle(event Event): Method to handle events.
- Creates a new window.
- Parameters:
title: The title of the window.width: The width of the window.height: The height of the window.
- Starts the FLTK main loop.
- Returns the exit code.
package main
import "github.com/0xdevelop/fltk2go"
func main() {
window := fltk2go.NewWindow("My Window", 800, 600)
window.Run()
}This documentation provides a brief overview of the main types, interfaces, and functions in the fltk2go package. For more information, please refer to the source code and additional documentation available within the repository.