class Lune::Options

Overview

Configuration passed to Lune.run via its block parameter.

Lune.run(app) do |o|
  o.title  = "My App"
  o.width  = 1280
  o.height = 720
  o.on_load = -> { puts "ready" }
end

Defined in:

lune/options.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def apply(window : Config::Window) #

[View source]
def debug : Bool #

Enable webview debug/inspector tools.


[View source]
def debug=(debug : Bool) #

Enable webview debug/inspector tools.


[View source]
def height : Int32 #

Initial window height in logical pixels.


[View source]
def height=(height : Int32) #

Initial window height in logical pixels.


[View source]
def hint : Webview::SizeHints #

Size constraint mode (NONE, MIN, MAX, FIXED). Ignored when #resizable is false — the hint is forced to FIXED.


[View source]
def hint=(hint : Webview::SizeHints) #

Size constraint mode (NONE, MIN, MAX, FIXED). Ignored when #resizable is false — the hint is forced to FIXED.


[View source]
def max_height : Int32 | Nil #

Maximum window height in logical pixels. Applied in addition to #hint.


[View source]
def max_height=(max_height : Int32 | Nil) #

Maximum window height in logical pixels. Applied in addition to #hint.


[View source]
def max_width : Int32 | Nil #

Maximum window width in logical pixels. Applied in addition to #hint.


[View source]
def max_width=(max_width : Int32 | Nil) #

Maximum window width in logical pixels. Applied in addition to #hint.


[View source]
def min_height : Int32 | Nil #

Minimum window height in logical pixels. Applied in addition to #hint.


[View source]
def min_height=(min_height : Int32 | Nil) #

Minimum window height in logical pixels. Applied in addition to #hint.


[View source]
def min_width : Int32 | Nil #

Minimum window width in logical pixels. Applied in addition to #hint.


[View source]
def min_width=(min_width : Int32 | Nil) #

Minimum window width in logical pixels. Applied in addition to #hint.


[View source]
def on_close : -> Nil | Nil #

Called once after the webview window closes and the run loop exits.


[View source]
def on_close=(on_close : -> Nil | Nil) #

Called once after the webview window closes and the run loop exits.


[View source]
def on_load : -> Nil | Nil #

Called once when the page's load event fires (i.e. the DOM is ready).


[View source]
def on_load=(on_load : -> Nil | Nil) #

Called once when the page's load event fires (i.e. the DOM is ready).


[View source]
def on_navigate : String -> Nil | Nil #

Called on every client-side navigation with the new URL as argument. Fires on popstate and hashchange events.


[View source]
def on_navigate=(on_navigate : String -> Nil | Nil) #

Called on every client-side navigation with the new URL as argument. Fires on popstate and hashchange events.


[View source]
def resizable : Bool #

When false the window cannot be resized by the user (forces #hint to FIXED).


[View source]
def resizable=(resizable : Bool) #

When false the window cannot be resized by the user (forces #hint to FIXED).


[View source]
def title : String #

Window title bar text.


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

Window title bar text.


[View source]
def width : Int32 #

Initial window width in logical pixels.


[View source]
def width=(width : Int32) #

Initial window width in logical pixels.


[View source]