Class: Fox::FXMDIChild
- Inherits:
-
FXComposite
- Object
- FXObject
- FXId
- FXDrawable
- FXWindow
- FXComposite
- Fox::FXMDIChild
- Defined in:
- rdoc-sources/FXMDIChild.rb
Overview
The MDI child window contains the application work area in a Multiple Document Interface application. GUI Controls are connected to the MDI child via delegation through the MDI client, which forwards messages it receives to the active MDI child. The MDI child itself tries to further delegate messages to its single content window, and if not handled there, to its target object. When the MDI child is maximized, it sends a SEL_MAXIMIZE message; when the MDI child is minimized, it sends a SEL_MINIMIZE message. When it is restored, it sends a SEL_RESTORE message to its target. The MDI child also notifies its target when it becomes the active MDI child, via the SEL_SELECTED message. The void* in the SEL_SELECTED message refers to the previously active MDI child, if any. When an MDI child ceases to be the active one, a SEL_DESELECTED message is sent. The void* in the SEL_DESELECTED message refers to the newly activated MDI child, if any. Thus, interception of SEL_SELECTED and SEL_DESELECTED allows the target object to determine whether the user switched between MDI windows of the same document (target) or between MDI windows belonging to the same document. When the MDI child is closed, it sends a SEL_CLOSE message to its target. The target has an opportunity to object to the closing; if the MDI child should not be closed, it should return 1 (objection). If the MDI child should be closed, the target can either just return 0 or simply not handle the SEL_CLOSE message. The SEL_UPDATE message can be used to modify the MDI child’s title (via ID_SETSTRINGVALUE), and window icon (via ID_SETICONVALUE).
Events
The following messages are sent by FXMDIChild to its target:
SEL_LEFTBUTTONPRESS
-
sent when the left mouse button goes down; the message data is an FXEvent instance.
SEL_LEFTBUTTONRELEASE
-
sent when the left mouse button goes up; the message data is an FXEvent instance.
SEL_MIDDLEBUTTONPRESS
-
sent when the middle mouse button goes down; the message data is an FXEvent instance.
SEL_MIDDLEBUTTONRELEASE
-
sent when the middle mouse button goes up; the message data is an FXEvent instance.
SEL_RIGHTBUTTONPRESS
-
sent when the right mouse button goes down; the message data is an FXEvent instance.
SEL_RIGHTBUTTONRELEASE
-
sent when the right mouse button goes up; the message data is an FXEvent instance.
SEL_SELECTED
-
sent when the window is selected; the message data is a reference to the MDI client’s previous active child window, or
nil
if there was no active child window. SEL_DESELECTED
-
sent when the window is deselected; the message data is a reference to the MDI client’s new active child window, or
nil
if there is no active child window. SEL_MAXIMIZE
-
sent when the window is maximized
SEL_MINIMIZE
-
sent when the window is minimized
SEL_RESTORE
-
sent when the window is restored to its normal size and position
SEL_CLOSE
-
sent when the user is trying to close this window. The message handler for this message should return 1 (or true) if the target objects to closing the window; otherwise it should just return false (or zero).
SEL_DELETE
-
sent immediately before this window is destroyed
MDI Child Window styles
MDI_NORMAL
-
Normal display mode
MDI_MAXIMIZED
-
Window appears maximized
MDI_MINIMIZED
-
Window is iconified or minimized
MDI_TRACKING
-
Track continuously during dragging
Instance Attribute Summary collapse
-
#baseColor ⇒ Object
Base color FXColor.
-
#borderColor ⇒ Object
Border color FXColor.
-
#contentWindow ⇒ Object
readonly
Content window FXWindow.
-
#font ⇒ Object
Title font FXFont.
-
#hiliteColor ⇒ Object
Highlight color FXColor.
-
#icon ⇒ Object
Window icon FXIcon.
-
#iconHeight ⇒ Object
Iconified height [Integer].
-
#iconWidth ⇒ Object
Iconified width [Integer].
-
#iconX ⇒ Object
Iconified position x-coordinate [Integer].
-
#iconY ⇒ Object
Iconified position y-coordinate [Integer].
-
#menu ⇒ Object
Window menu FXPopup.
-
#normalHeight ⇒ Object
Normal (restored) height [Integer].
-
#normalWidth ⇒ Object
Normal (restored) width [Integer].
-
#normalX ⇒ Object
Normal (restored) position x-coordinate [Integer].
-
#normalY ⇒ Object
Normal (restored) position y-coordinate [Integer].
-
#shadowColor ⇒ Object
Shadow color FXColor.
-
#title ⇒ Object
Window title [String].
-
#titleBackColor ⇒ Object
Title background color FXColor.
-
#titleColor ⇒ Object
Title color FXColor.
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
-
#getTracking ⇒ Object
(also: #isTracking?, #tracking)
Return
true
if tracking,false
otherwise. -
#initialize(p, name, ic = nil, pup = nil, opts = 0, x = 0, y = 0, width = 0, height = 0) ⇒ FXMDIChild
constructor
Construct MDI Child window with given name and icon.
-
#maximize(notify = false) ⇒ Object
Maximize this window.
-
#maximized? ⇒ Boolean
Return
true
if maximized. -
#minimize(notify = false) ⇒ Object
Minimize this window.
-
#minimized? ⇒ Boolean
Return
true
if minimized. -
#restore(notify = false) ⇒ Object
Restore this window to its normal position and size.
-
#setTracking(tracking) ⇒ Object
(also: #tracking=)
Set tracking instead of just outline.
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(p, name, ic = nil, pup = nil, opts = 0, x = 0, y = 0, width = 0, height = 0) ⇒ FXMDIChild
Construct MDI Child window with given name and icon
116 117 |
# File 'rdoc-sources/FXMDIChild.rb', line 116 def initialize(p, name, ic=nil, pup=nil, opts=0, x=0, y=0, width=0, height=0) # :yields: theMDIChild end |
Instance Attribute Details
#baseColor ⇒ Object
Base color Fox::FXColor
95 96 97 |
# File 'rdoc-sources/FXMDIChild.rb', line 95 def baseColor @baseColor end |
#borderColor ⇒ Object
Border color Fox::FXColor
98 99 100 |
# File 'rdoc-sources/FXMDIChild.rb', line 98 def borderColor @borderColor end |
#contentWindow ⇒ Object (readonly)
Content window Fox::FXWindow
83 84 85 |
# File 'rdoc-sources/FXMDIChild.rb', line 83 def contentWindow @contentWindow end |
#font ⇒ Object
Title font Fox::FXFont
113 114 115 |
# File 'rdoc-sources/FXMDIChild.rb', line 113 def font @font end |
#hiliteColor ⇒ Object
Highlight color Fox::FXColor
89 90 91 |
# File 'rdoc-sources/FXMDIChild.rb', line 89 def hiliteColor @hiliteColor end |
#icon ⇒ Object
Window icon Fox::FXIcon
107 108 109 |
# File 'rdoc-sources/FXMDIChild.rb', line 107 def icon @icon end |
#iconHeight ⇒ Object
Iconified height [Integer]
80 81 82 |
# File 'rdoc-sources/FXMDIChild.rb', line 80 def iconHeight @iconHeight end |
#iconWidth ⇒ Object
Iconified width [Integer]
77 78 79 |
# File 'rdoc-sources/FXMDIChild.rb', line 77 def iconWidth @iconWidth end |
#iconX ⇒ Object
Iconified position x-coordinate [Integer]
71 72 73 |
# File 'rdoc-sources/FXMDIChild.rb', line 71 def iconX @iconX end |
#iconY ⇒ Object
Iconified position y-coordinate [Integer]
74 75 76 |
# File 'rdoc-sources/FXMDIChild.rb', line 74 def iconY @iconY end |
#menu ⇒ Object
Window menu Fox::FXPopup
110 111 112 |
# File 'rdoc-sources/FXMDIChild.rb', line 110 def @menu end |
#normalHeight ⇒ Object
Normal (restored) height [Integer]
68 69 70 |
# File 'rdoc-sources/FXMDIChild.rb', line 68 def normalHeight @normalHeight end |
#normalWidth ⇒ Object
Normal (restored) width [Integer]
65 66 67 |
# File 'rdoc-sources/FXMDIChild.rb', line 65 def normalWidth @normalWidth end |
#normalX ⇒ Object
Normal (restored) position x-coordinate [Integer]
59 60 61 |
# File 'rdoc-sources/FXMDIChild.rb', line 59 def normalX @normalX end |
#normalY ⇒ Object
Normal (restored) position y-coordinate [Integer]
62 63 64 |
# File 'rdoc-sources/FXMDIChild.rb', line 62 def normalY @normalY end |
#shadowColor ⇒ Object
Shadow color Fox::FXColor
92 93 94 |
# File 'rdoc-sources/FXMDIChild.rb', line 92 def shadowColor @shadowColor end |
#title ⇒ Object
Window title [String]
86 87 88 |
# File 'rdoc-sources/FXMDIChild.rb', line 86 def title @title end |
#titleBackColor ⇒ Object
Title background color Fox::FXColor
104 105 106 |
# File 'rdoc-sources/FXMDIChild.rb', line 104 def titleBackColor @titleBackColor end |
#titleColor ⇒ Object
Title color Fox::FXColor
101 102 103 |
# File 'rdoc-sources/FXMDIChild.rb', line 101 def titleColor @titleColor end |
Instance Method Details
#getTracking ⇒ Object Also known as: isTracking?, tracking
Return true
if tracking, false
otherwise.
149 |
# File 'rdoc-sources/FXMDIChild.rb', line 149 def getTracking(); end |
#maximize(notify = false) ⇒ Object
Maximize this window. If notify is true
, …
129 |
# File 'rdoc-sources/FXMDIChild.rb', line 129 def maximize(notify=false); end |
#maximized? ⇒ Boolean
Return true
if maximized
138 |
# File 'rdoc-sources/FXMDIChild.rb', line 138 def maximized? ; end |
#minimize(notify = false) ⇒ Object
Minimize this window. If notify is true
, …
123 |
# File 'rdoc-sources/FXMDIChild.rb', line 123 def minimize(notify=false); end |
#minimized? ⇒ Boolean
Return true
if minimized
141 |
# File 'rdoc-sources/FXMDIChild.rb', line 141 def minimized? ; end |
#restore(notify = false) ⇒ Object
Restore this window to its normal position and size. If notify is true
, …
135 |
# File 'rdoc-sources/FXMDIChild.rb', line 135 def restore(notify=false); end |
#setTracking(tracking) ⇒ Object Also known as: tracking=
Set tracking instead of just outline
144 |
# File 'rdoc-sources/FXMDIChild.rb', line 144 def setTracking(tracking); end |