Class: Fox::FXMDIChild

Inherits:
FXComposite show all
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

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

#height, #visual, #width

Attributes inherited from FXId

#app, #userData, #xid

Instance Method Summary collapse

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

#connect

Methods inherited from FXDrawable

#resize

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

#baseColorObject

Base color Fox::FXColor



95
96
97
# File 'rdoc-sources/FXMDIChild.rb', line 95

def baseColor
  @baseColor
end

#borderColorObject

Border color Fox::FXColor



98
99
100
# File 'rdoc-sources/FXMDIChild.rb', line 98

def borderColor
  @borderColor
end

#contentWindowObject (readonly)

Content window Fox::FXWindow



83
84
85
# File 'rdoc-sources/FXMDIChild.rb', line 83

def contentWindow
  @contentWindow
end

#fontObject

Title font Fox::FXFont



113
114
115
# File 'rdoc-sources/FXMDIChild.rb', line 113

def font
  @font
end

#hiliteColorObject

Highlight color Fox::FXColor



89
90
91
# File 'rdoc-sources/FXMDIChild.rb', line 89

def hiliteColor
  @hiliteColor
end

#iconObject

Window icon Fox::FXIcon



107
108
109
# File 'rdoc-sources/FXMDIChild.rb', line 107

def icon
  @icon
end

#iconHeightObject

Iconified height [Integer]



80
81
82
# File 'rdoc-sources/FXMDIChild.rb', line 80

def iconHeight
  @iconHeight
end

#iconWidthObject

Iconified width [Integer]



77
78
79
# File 'rdoc-sources/FXMDIChild.rb', line 77

def iconWidth
  @iconWidth
end

#iconXObject

Iconified position x-coordinate [Integer]



71
72
73
# File 'rdoc-sources/FXMDIChild.rb', line 71

def iconX
  @iconX
end

#iconYObject

Iconified position y-coordinate [Integer]



74
75
76
# File 'rdoc-sources/FXMDIChild.rb', line 74

def iconY
  @iconY
end

Window menu Fox::FXPopup



110
111
112
# File 'rdoc-sources/FXMDIChild.rb', line 110

def menu
  @menu
end

#normalHeightObject

Normal (restored) height [Integer]



68
69
70
# File 'rdoc-sources/FXMDIChild.rb', line 68

def normalHeight
  @normalHeight
end

#normalWidthObject

Normal (restored) width [Integer]



65
66
67
# File 'rdoc-sources/FXMDIChild.rb', line 65

def normalWidth
  @normalWidth
end

#normalXObject

Normal (restored) position x-coordinate [Integer]



59
60
61
# File 'rdoc-sources/FXMDIChild.rb', line 59

def normalX
  @normalX
end

#normalYObject

Normal (restored) position y-coordinate [Integer]



62
63
64
# File 'rdoc-sources/FXMDIChild.rb', line 62

def normalY
  @normalY
end

#shadowColorObject

Shadow color Fox::FXColor



92
93
94
# File 'rdoc-sources/FXMDIChild.rb', line 92

def shadowColor
  @shadowColor
end

#titleObject

Window title [String]



86
87
88
# File 'rdoc-sources/FXMDIChild.rb', line 86

def title
  @title
end

#titleBackColorObject

Title background color Fox::FXColor



104
105
106
# File 'rdoc-sources/FXMDIChild.rb', line 104

def titleBackColor
  @titleBackColor
end

#titleColorObject

Title color Fox::FXColor



101
102
103
# File 'rdoc-sources/FXMDIChild.rb', line 101

def titleColor
  @titleColor
end

Instance Method Details

#getTrackingObject 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

Returns:

  • (Boolean)


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

Returns:

  • (Boolean)


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