Class: Fox::FXSplashScreen
- Inherits:
-
FXDialogBox
- Object
- FXObject
- FXId
- FXDrawable
- FXWindow
- FXComposite
- FXShell
- FXTopWindow
- FXDialogBox
- Fox::FXSplashScreen
- Defined in:
- lib/fox16/splashscreen.rb
Overview
The FXSplashScreen window…
Instance Attribute Summary
Attributes inherited from FXTopWindow
#decorations, #hSpacing, #icon, #miniIcon, #packingHints, #padBottom, #padLeft, #padRight, #padTop, #title, #vSpacing
Attributes inherited from FXWindow
#accelTable, #backColor, #defaultCursor, #dragCursor, #first, #focus, #key, #last, #layoutHints, #next, #numChildren, #owner, #parent, #prev, #root, #selector, #shell, #target, #x, #y
Attributes inherited from FXDrawable
Attributes inherited from FXId
Instance Method Summary collapse
- #execute(placement = PLACEMENT_OWNER) ⇒ Object
-
#initialize(owner, title, text, action) ⇒ FXSplashScreen
constructor
Return an initialized FXSplashScreen instance.
- #update_status(msg) ⇒ Object
Methods inherited from FXTopWindow
#close, #getWMBorders, #maximize, #maximized?, #minimize, #minimized?, #place, #restore, #show
Methods inherited from FXComposite
#maxChildHeight, #maxChildWidth
Methods inherited from FXWindow
#acceptDrop, #acquireClipboard, #acquireSelection, #active?, #addHotKey, after?, #after?, before?, #before?, #beginDrag, #canFocus?, #changeFocus, #childAtIndex, #childOf?, #children, #clearDragRectangle, #clearShape, colorType, colorTypeName, commonAncestor, #composeContext, #composite?, #contains?, #containsChild?, #create, #createComposeContext, #cursorPosition, #default?, #defaultHeight, #defaultWidth, deleteType, deleteTypeName, #destroy, #destroyComposeContext, #detach, #didAccept, #disable, #doesSaveUnder?, #dragging?, #dropDisable, #dropEnable, #dropEnabled?, #dropFinished, #dropTarget?, #each_child, #each_child_recursive, #enable, #enabled?, #endDrag, #forceRefresh, #getChildAt, #getDNDData, #getHeightForWidth, #getWidthForHeight, #grab, #grabKeyboard, #grabbed?, #grabbedKeyboard?, #handleDrag, #hasClipboard?, #hasFocus?, #hasSelection?, #height, #height=, #hide, imageType, #inFocusChain?, #indexOfChild, #initial?, #inquireDNDAction, #inquireDNDTypes, #killFocus, #layout, #linkAfter, #linkBefore, #lower, #move, octetType, octetTypeName, #offeredDNDType?, #position, #raiseWindow, #recalc, #releaseClipboard, #releaseSelection, #remHotKey, #removeChild, #repaint, #reparent, #resize, #scroll, #setCursorPosition, #setDNDData, #setDefault, #setDragRectangle, #setFocus, #setInitial, #setShape, #shell?, #show, #shown?, stringType, textType, textTypeName, #tr, #translateCoordinatesFrom, #translateCoordinatesTo, #underCursor?, #ungrab, #ungrabKeyboard, #update, urilistType, urilistTypeName, utf16Type, utf16TypeName, utf8Type, utf8TypeName, #visible=, #width, #width=
Methods included from Responder2
Methods inherited from FXDrawable
Methods inherited from FXId
#create, #created?, #destroy, #detach, #runOnUiThread
Methods inherited from FXObject
#bind, #handle, #load, #save, subclasses
Constructor Details
#initialize(owner, title, text, action) ⇒ FXSplashScreen
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
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# 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 |
Instance Method Details
#execute(placement = PLACEMENT_OWNER) ⇒ Object
43 44 45 46 47 48 49 50 51 |
# 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) ⇒ Object
53 54 55 |
# File 'lib/fox16/splashscreen.rb', line 53 def update_status(msg) @status.text = msg end |