Opal::UI::Modal
Inherits Opal::UI::Control < Opal::UI::InputHookable < Opal::UI::Element < Opal::UI::Themable < Reference < Object
A centered floating modal dialog component with backdrop dimming and button choices.
Constructors
new(title : String, message : String, buttons : Array(String) = ["OK"], selected_button : Int32 = 0, border_fg : Color | Symbol | String | Nil = nil, title_fg : Color | Symbol | String | Nil = nil, button_fg : Color | Symbol | String | Nil = nil, selected_fg : Color | Symbol | String | Nil = nil, selected_bg : Color | Symbol | String | Nil = nil, bg : Color | Symbol | String | Nil = nil, border_style : Border | Symbol | String | Nil = nil, dim_backdrop : Bool = true, on_submit : Proc(Int32, Nil) | Nil = nil)
Sourcenew(title : String, message : String, buttons : Array(String) = ["OK"], selected_button : Int32 = 0, border_fg : Color | Symbol | String | Nil = nil, title_fg : Color | Symbol | String | Nil = nil, button_fg : Color | Symbol | String | Nil = nil, selected_fg : Color | Symbol | String | Nil = nil, selected_bg : Color | Symbol | String | Nil = nil, bg : Color | Symbol | String | Nil = nil, border_style : Border | Symbol | String | Nil = nil, dim_backdrop : Bool = true, &block : Int32 -> Nil) : Modal
SourceInstance methods
bg
Sourcebg=(bg : Color | Nil)
Sourceborder_fg
Sourceborder_fg=(border_fg : Color | Nil)
Sourceborder_style
Sourceborder_style=(border_style : Border | Nil)
Sourcebutton_fg
Sourcebutton_fg=(button_fg : Color | Nil)
Sourcebuttons
Sourcedim_backdrop
Sourcedismiss
Sourcedismissed?
SourceDefault key event handler. Override in subclasses if not using @default_input_proc.
Default mouse event handler. Override in subclasses if not using @default_input_proc.
message
Sourceon_submit
Sourceon_submit
Sourceselected_bg
Sourceselected_bg=(selected_bg : Color | Nil)
Sourceselected_button
Sourceselected_fg
Sourceselected_fg=(selected_fg : Color | Nil)
Sourcesubmit_selected
Sourcetitle
Sourcetitle_fg
Sourcetitle_fg=(title_fg : Color | Nil)
Source