Documentation ¶
Overview ¶
Package window defines an event associated with windows -- including changes in the dimensions, physical resolution and orientation of the app's window, and iconify, open and close events (see also lifecycle events, which pertain to the main app window -- these window events are for all windows including dialogs and popups)
Index ¶
Constants ¶
This section is empty.
Variables ¶
var KiT_Visibility = kit.Enums.AddEnum(VisibilityN, false, nil)
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action int32
Action is the action taken on the window by the user
func (*Action) FromString ¶
type Event ¶
type Event struct { oswin.EventBase // Size is the window's new dimensions in raw physical pixels. Size image.Point // DPI is the window's current logical dots-per-inch -- can change if // moved to different screen LogicalDPI float32 // ScreenNumber contains index of the current physical or logical screen // on which the window is being displayed -- see App.Screen() for // the accessing the data associated with this screen ScreenNumber int // Visibility is the visibility status of the window: Closed, NotVisible, // Visible, Iconified Visibility Visibility // Action taken on the window -- what has changed Action Action }
window.Event holds the dimensions, physical resolution, orientation, visibility status of a given window, and actions taken on the window
func (Event) Bounds ¶
Bounds returns the window's bounds in raw display dots (pixels), at the time this size event was sent.
The top-left pixel is always (0, 0).
type Visibility ¶
type Visibility int32
Visibility is the visibility status of the window
const ( // Closed means the window is closed -- has not been opened yet or is now closed Closed Visibility = iota // NotVisible means the window is not visible for various reasons (occluded by other windows, off the screen), but not specifically Iconfied NotVisible // Visible means the window has been opened and is visible Visible // Iconified means the window has been iconified Iconified VisibilityN )
func (*Visibility) FromString ¶
func (i *Visibility) FromString(s string) error
func (Visibility) String ¶
func (i Visibility) String() string