class Fox::FXSplashScreen
The FXSplashScreen
window…
Public Class Methods
new( owner, title, text, action )
click to toggle source
Return an initialized FXSplashScreen
instance.
Parameters:¶ ↑
owner
-
Owner window for this dialog box [FXWindow]
title
-
Title string for this dialog box [String]
text
-
Message text for this dialog box [String]
action
-
The action
Calls superclass method
Fox::FXDialogBox::new
# File lib/fox16/splashscreen.rb, line 23 def initialize( owner, title, text, action ) # Initialize the base class first super(owner, title) # Store the action block @action = action # Construct the window contents FXVerticalFrame.new( self ) do |frame| text.each_line do |line| FXLabel.new( frame, line.strip ) end FXLabel.new( frame, "Click OK to continue (this may take a few moments)...." ) @status = FXLabel.new( frame, " " ) @accept = FXButton.new( frame, "&OK", nil, self, ID_ACCEPT, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) @accept.enabled = false end end
Public Instance Methods
execute(placement = PLACEMENT_OWNER)
click to toggle source
Calls superclass method
Fox::FXDialogBox#execute
# File lib/fox16/splashscreen.rb, line 43 def execute(placement = PLACEMENT_OWNER) Thread.new do sleep 1 @action.call method( :update_status ) update_status "Completed" @accept.enabled = true end super end
update_status(msg)
click to toggle source
# File lib/fox16/splashscreen.rb, line 53 def update_status(msg) @status.text = msg end