package glfw

import "fyne.io/fyne/v2/internal/driver/glfw"

Package glfw provides a full Fyne desktop driver that uses the system OpenGL libraries. This supports Windows, Mac OS X and Linux using the gl and glfw packages from go-gl.

Index

Functions

func NewGLDriver

func NewGLDriver() fyne.Driver

NewGLDriver sets up a new Driver instance implemented using the GLFW Go library and OpenGL bindings.

Types

type MenuBar struct {
	widget.Base
	Items []fyne.CanvasObject
	// contains filtered or unexported fields
}

MenuBar is a widget for displaying a fyne.MainMenu in a bar.

func NewMenuBar

func NewMenuBar(mainMenu *fyne.MainMenu, canvas fyne.Canvas) *MenuBar

NewMenuBar creates a menu bar populated with items from the passed main menu structure.

func (b *MenuBar) CreateRenderer() fyne.WidgetRenderer

CreateRenderer returns a new renderer for the menu bar.

Implements: fyne.Widget

func (b *MenuBar) Hide()

Hide hides the menu bar.

Implements: fyne.Widget

func (b *MenuBar) IsActive() bool

IsActive returns whether the menu bar is active or not. An active menu bar shows the current selected menu and should have the focus.

func (b *MenuBar) MinSize() fyne.Size

MinSize returns the minimal size of the menu bar.

Implements: fyne.Widget

func (b *MenuBar) Move(pos fyne.Position)

Move sets the position of the widget relative to its parent.

Implements: fyne.Widget

func (b *MenuBar) Refresh()

Refresh triggers a redraw of the menu bar.

Implements: fyne.Widget

func (b *MenuBar) Resize(size fyne.Size)

Resize resizes the menu bar. It only affects the width because menu bars are always displayed with their minimal height.

Implements: fyne.Widget

func (b *MenuBar) Show()

Show makes the menu bar visible.

Implements: fyne.Widget

func (b *MenuBar) Toggle()

Toggle changes the activation state of the menu bar. On activation, the first item will become active.

Source Files

animation.go canvas.go clipboard.go device.go driver.go glfw_core.go loop.go menu.go menu_bar.go menu_bar_item.go menu_other.go scale.go window.go window_linux.go

Version
v2.0.2
Published
Apr 1, 2021
Platform
linux/amd64
Imports
30 packages
Last checked
14 seconds ago

Tools for package owners.