class Glint::Window

Overview

The window is responsible for managing and organising the Game's visual presentation.

Defined in:

glint/window.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(height : Number, width : Number, title : String) #

Create a new Window with width/height.


[View source]
def self.new(size : Dimension, title : String) #

Create a new Window with a Dimension.


[View source]

Instance Method Detail

def bottom_center : Position #

Returns the coordinate at the bottom center of the Window.


[View source]
def bottom_left : Position #

Returns the coordinate at the bottom left of the Window.


[View source]
def bottom_right : Position #

Returns the coordinate at the bottom right of the Window.


[View source]
def center : Position #

Returns the coordinate at the center of the Window.


[View source]
def close #

Closes the Window.

This also has the effect that it closes the Game.


[View source]
def close? #

Returns whether the Window should close.


[View source]
def focused? #

Returns whether the Window is focused.


[View source]
def fullscreen? #

Returns whether the Window is fullscreen.


[View source]
def height : Number #

Returns the Window's height.


[View source]
def hidden? #

Returns whether the Window is hidden.


[View source]
def maximized? #

Returns whether the Window is maximized.


[View source]
def middle_center : Position #

Returns the coordinate at the middle centre of the Window.


[View source]
def middle_left : Position #

Returns the coordinate at the middle left of the Window.


[View source]
def middle_right : Position #

Returns the coordinate at the middle right of the Window.


[View source]
def minimized? #

Returns whether the Window is minimized.


[View source]
def ready? #

Returns whether the Window is ready.


[View source]
def resizable=(resizable) #

Sets whether the Window is resizable.


[View source]
def resizable? #

Returns whether the Window is resizable.


[View source]
def resized? #

Returns whether the Window is resized.


[View source]
def restore! #

Restore the Window.


[View source]
def title : String #

Returns the Window's title.


[View source]
def title=(title : String) #

Sets the Window's title.


[View source]
def toggle_fullscreen! #

Toggles whether the Window is fullscreen.


[View source]
def top_center : Position #

Returns the coordinate at the top center of the Window.


[View source]
def top_left : Position #

Returns the coordinate at the top left of the Window.


[View source]
def top_right : Position #

Returns the coordinate at the top righr of the Window.


[View source]
def width : Number #

Returns the Window's width.


[View source]