class

Opal::UI::Window

Inherits Opal::UI::Control < Opal::UI::InputHookable < Opal::UI::Element < Opal::UI::Themable < Reference < Object

Movable, resizable floating window container with title bar, minimize/maximize/close buttons, drop shadow depth, and strict client area content clipping.

Constructors

new(title : String, x : Int32 = 2, y : Int32 = 2, width : Int32 = 40, height : Int32 = 12, min_width : Int32 = 18, min_height : Int32 = 5, closable : Bool = true, minimizable : Bool = true, maximizable : Bool = true, resizable : Bool = true, content : Element | Nil = nil, on_close : Proc(Window, Nil) | Nil = nil, title_fg : Color | Symbol | String | Nil = nil, border_fg : Color | Symbol | String | Nil = nil, active_border_fg : Color | Symbol | String | Nil = nil, inactive_border_fg : Color | Symbol | String | Nil = nil, bg : Color | Symbol | String | Nil = nil, border : Border | Symbol | String | Nil = nil, close_glyph : String | Nil = nil, maximize_glyph : String | Nil = nil, minimize_glyph : String | Nil = nil, resize_glyph : Char | Nil = nil)
Source

Instance methods

active=(active : Bool)
Source
active?
Source
active_border_fg
Source
active_border_fg=(active_border_fg : Color | Nil)
Source
bg=(bg : Color | Nil)
Source
border
Source
border=(border : Border | Nil)
Source
border_fg
Source
border_fg=(border_fg : Color | Nil)
Source
closable=(closable : Bool)
Source
closable?
Source
close

Closes the window and triggers callback

Source
close_glyph
Source
close_glyph=(close_glyph : String | Nil)
Source
content
Source
content=(content : Element | Nil)
Source
drag_border_fg
Source
drag_border_fg=(drag_border_fg : Color | Nil)
Source
dragging?
Source
handle_mouse(event : Terminal::MouseEvent) : Bool

Default mouse event handler. Override in subclasses if not using @default_input_proc.

Source
height
Source
height=(height : Int32)
Source
inactive_border_fg
Source
inactive_border_fg=(inactive_border_fg : Color | Nil)
Source
maximizable=(maximizable : Bool)
Source
maximizable?
Source
maximize!(max_w : Int32 = 80, max_h : Int32 = 24) : self
Source
maximize_glyph
Source
maximize_glyph=(maximize_glyph : String | Nil)
Source
maximized=(maximized : Bool)
Source
maximized?
Source
min_height
Source
min_height=(min_height : Int32)
Source
min_width
Source
min_width=(min_width : Int32)
Source
minimizable=(minimizable : Bool)
Source
minimizable?
Source
minimize!
Source
minimize_glyph
Source
minimize_glyph=(minimize_glyph : String | Nil)
Source
minimized=(minimized : Bool)
Source
minimized?
Source
on_close
Source
on_close=(on_close : Proc(Window, Nil) | Nil)
Source
on_drag

Drag and resize callbacks

Source
on_drag
Source
on_drag=(on_drag : Proc(Window, Int32, Int32, Nil) | Nil)

Drag and resize callbacks

Source
on_maximize
Source
on_maximize=(on_maximize : Proc(Window, Nil) | Nil)
Source
on_minimize
Source
on_minimize=(on_minimize : Proc(Window, Nil) | Nil)
Source
on_resize
Source
on_resize
Source
on_resize=(on_resize : Proc(Window, Int32, Int32, Nil) | Nil)
Source
preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
Source
render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
Source
resizable=(resizable : Bool)
Source
resizable?
Source
resize_border_fg
Source
resize_border_fg=(resize_border_fg : Color | Nil)
Source
resize_glyph
Source
resize_glyph=(resize_glyph : Char | Nil)
Source
resize_handle_fg
Source
resize_handle_fg=(resize_handle_fg : Color | Nil)
Source
resizing?
Source
restore!(max_w : Int32 = 80, max_h : Int32 = 24) : self
Source
shadow_char
Source
shadow_char=(shadow_char : Char | Nil)
Source
shadow_fg
Source
shadow_fg=(shadow_fg : Color | Nil)
Source
title
Source
title=(title : String)
Source
title_fg

Manipulable theme styling and character swaps

Source
title_fg=(title_fg : Color | Nil)

Manipulable theme styling and character swaps

Source
toggle_maximize(max_w : Int32 = 80, max_h : Int32 = 24) : self

Toggles window maximize state

Source
toggle_minimize

Toggles window minimize state

Source
width
Source
width=(width : Int32)
Source
x=(x : Int32)
Source
y=(y : Int32)
Source