Module: ui.window

Source: ./ui/window.reef


Overview

ui/window.reef - Window management for UI Part of reef-stdlib UI module

This module provides the Window type which represents a top-level window in the UI system. Window is an Active Object that manages its own rendering and event handling.


Types

WindowState (enum)

Variants:

  • Normal
  • Minimized
  • Maximized
  • Fullscreen

WindowConfig

Fields:

Name Type
title string
width int
height int
resizable bool
decorated bool
visible bool

Window

Fields:

Name Type
id int
title string
width int
height int
state WindowState
visible bool
focused bool
current_theme theme.Theme
surf surface.Surface
cvs canvas.Canvas
focus_mgr focus.FocusManager
needs_redraw bool
is_closed bool

Functions

fn window_state_normal(): WindowState

fn window_state_minimized(): WindowState

fn window_state_maximized(): WindowState

fn window_state_fullscreen(): WindowState

fn window_config(title: string, width: int, height: int): WindowConfig

fn window_config_full(title: string, width: int, height: int, resizable: bool, decorated: bool, visible: bool): WindowConfig

fn config_title(c: WindowConfig): string

fn config_width(c: WindowConfig): int

fn config_height(c: WindowConfig): int

fn config_resizable(c: WindowConfig): bool

fn config_decorated(c: WindowConfig): bool

fn config_visible(c: WindowConfig): bool

fn new_window(config: WindowConfig, t: theme.Theme): Window

fn window_id(w: Window): int

fn window_title(w: Window): string

fn window_width(w: Window): int

fn window_height(w: Window): int

fn window_state(w: Window): WindowState

fn window_is_visible(w: Window): bool

fn window_is_focused(w: Window): bool

fn window_theme(w: Window): theme.Theme

fn window_canvas(w: Window): canvas.Canvas

fn window_focus_manager(w: Window): focus.FocusManager


Procedures

proc window_set_title(w: Window, title: string)

proc window_set_size(w: Window, width: int, height: int)

proc window_set_state(w: Window, state: WindowState)

proc window_set_visible(w: Window, visible: bool)

proc window_set_theme(w: Window, t: theme.Theme)

proc window_show(w: Window)

proc window_hide(w: Window)

proc window_close(w: Window)

proc window_request_redraw(w: Window)

proc window_handle_event(w: Window, e: event.Event)

proc handle_window_event(w: Window, e: event.WindowEvent)

proc handle_focus_event(w: Window, e: event.FocusEvent)

proc window_begin_draw(w: Window)

proc window_end_draw(w: Window)

proc window_clear(w: Window)


Generated by reefc doc