class Fox::FXSplashScreen
The FXSplashScreen window…
Public Class Methods
Source
# 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
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
Public Instance Methods
Source
# 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
Calls superclass method
Fox::FXDialogBox#execute
Source
# File lib/fox16/splashscreen.rb, line 53 def update_status(msg) @status.text = msg end