Class: Fox::FXWindow

Inherits:
FXDrawable show all
Includes:
Responder2
Defined in:
rdoc-sources/FXWindow.rb,
lib/fox16/core.rb,
lib/fox16/responder2.rb

Overview

Base class for all windows

Events

The following messages are sent by FXWindow to its target:

SEL_MAP

sent when the window is mapped to the screen; the message data is an FXEvent instance.

SEL_UNMAP

sent when the window is unmapped; the message data is an FXEvent instance.

SEL_CONFIGURE

sent when the window’s size changes; the message data is an FXEvent instance.

SEL_ENTER

sent when the mouse cursor enters this window

SEL_LEAVE

sent when the mouse cursor leaves this window

SEL_FOCUSIN

sent when this window gains the focus

SEL_FOCUSOUT

sent when this window loses the focus

SEL_UPDATE

sent when this window needs an update

SEL_UNGRABBED

sent when this window loses the mouse grab (or capture)

For each of the following keyboard-related events, the message data is an FXEvent instance:

SEL_KEYPRESS

sent when a key is pressed

SEL_KEYRELEASE

sent when a key is released

For each of the following mouse-related events, the message data is an FXEvent instance:

SEL_MOTION

sent when the mouse moves

SEL_LEFTBUTTONPRESS

sent when the left mouse button goes down

SEL_LEFTBUTTONRELEASE

sent when the left mouse button goes up

SEL_MIDDLEBUTTONPRESS

sent when the middle mouse button goes down

SEL_MIDDLEBUTTONRELEASE

sent when the middle mouse button goes up

SEL_RIGHTBUTTONPRESS

sent when the right mouse button goes down

SEL_RIGHTBUTTONRELEASE

sent when the right mouse button goes up

SEL_MOUSEWHEEL

sent when the mouse wheel is scrolled

For each of the following selection-related events, the message data is an FXEvent instance:

SEL_SELECTION_GAINED

sent when this window acquires the selection

SEL_SELECTION_LOST

sent when this window loses the selection

SEL_SELECTION_REQUEST

sent when this window’s selection is requested

For each of the following clipboard-related events, the message data is an FXEvent instance:

SEL_CLIPBOARD_GAINED

sent when this window acquires the clipboard

SEL_CLIPBOARD_LOST

sent when this window loses the clipboard

SEL_CLIPBOARD_REQUEST

sent when this window’s clipboard data is requested

For each of the following drag-and-drop events, the message data is an FXEvent instance:

SEL_BEGINDRAG

sent at the beginning of a drag operation

SEL_DRAGGED

sent while stuff is being dragged around

SEL_ENDDRAG

sent at the end of a drag operation

SEL_DND_ENTER

drag-and-drop enter

SEL_DND_LEAVE

drag-and-drop leave

SEL_DND_MOTION

drag-and-drop motion

SEL_DND_DROP

drag-and-drop motion

SEL_DND_REQUEST

drag-and-drop request

Layout hints for child widgets

LAYOUT_NORMAL

Default layout mode

LAYOUT_SIDE_TOP

Pack on top side (default)

LAYOUT_SIDE_BOTTOM

Pack on bottom side

LAYOUT_SIDE_LEFT

Pack on left side

LAYOUT_SIDE_RIGHT

Pack on right side

LAYOUT_FILL_COLUMN

Matrix column is stretchable

LAYOUT_FILL_ROW

Matrix row is stretchable

LAYOUT_LEFT

Stick on left (default)

LAYOUT_RIGHT

Stick on right

LAYOUT_CENTER_X

Center horizontally

LAYOUT_FIX_X

X fixed

LAYOUT_TOP

Stick on top (default)

LAYOUT_BOTTOM

Stick on bottom

LAYOUT_CENTER_Y

Center vertically

LAYOUT_FIX_Y

Y fixed

LAYOUT_FIX_WIDTH

Width fixed

LAYOUT_FIX_HEIGHT

Height fixed

LAYOUT_MIN_WIDTH

Minimum width is the default

LAYOUT_MIN_HEIGHT

Minimum height is the default

LAYOUT_FILL_X

Stretch or shrink horizontally

LAYOUT_FILL_Y

Stretch or shrink vertically

+LAYOUT_FILL

Stretch or shrink in both directions

LAYOUT_EXPLICIT

Explicit placement

LAYOUT_DOCK_SAME

Dock on same galley, if it fits

LAYOUT_DOCK_NEXT

Dock on next galley

Frame border appearance styles (for subclasses)

FRAME_NONE

Default is no frame

FRAME_SUNKEN

Sunken border

FRAME_RAISED

Raised border

FRAME_THICK

Thick border

FRAME_GROOVE

A groove or etched-in border

FRAME_RIDGE

A ridge or embossed border

FRAME_LINE

Simple line border

FRAME_NORMAL

Regular raised/thick border

Packing style (for packers)

PACK_NORMAL

Default is each its own size

PACK_UNIFORM_HEIGHT

Uniform height

PACK_UNIFORM_WIDTH

Uniform width

Message IDs common to most windows

ID_NONE

x

ID_HIDE

x

ID_SHOW

x

ID_TOGGLESHOWN

x

ID_LOWER

x

ID_RAISE

x

ID_DELETE

x

ID_DISABLE

x

ID_ENABLE

x

ID_TOGGLEENABLED

x

ID_UNCHECK

x

ID_CHECK

x

ID_UNKNOWN

x

ID_UPDATE

x

ID_AUTOSCROLL

x

ID_HSCROLLED

x

ID_VSCROLLED

x

ID_SETVALUE

x

ID_SETINTVALUE

x

ID_SETREALVALUE

x

ID_SETSTRINGVALUE

x

ID_SETINTRANGE

x

ID_SETREALRANGE

x

ID_GETINTVALUE

x

ID_GETREALVALUE

x

ID_GETSTRINGVALUE

x

ID_GETINTRANGE

x

ID_GETREALRANGE

x

ID_QUERY_MENU

x

ID_HOTKEY

x

ID_ACCEL

x

ID_UNPOST

x

ID_POST

x

ID_MDI_TILEHORIZONTAL

x

ID_MDI_TILEVERTICAL

x

ID_MDI_CASCADE

x

ID_MDI_MAXIMIZE

x

ID_MDI_MINIMIZE

x

ID_MDI_RESTORE

x

ID_MDI_CLOSE

x

ID_MDI_WINDOW

x

ID_MDI_MENUWINDOW

x

ID_MDI_MENUMINIMIZE

x

ID_MDI_MENURESTORE

x

ID_MDI_MENUCLOSE

x

ID_MDI_NEXT

x

ID_MDI_PREV

x

Instance Attribute Summary collapse

Attributes inherited from FXDrawable

#visual

Attributes inherited from FXId

#app, #userData, #xid

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Responder2

#connect

Methods inherited from FXId

#created?, #runOnUiThread

Methods inherited from FXObject

#bind, #handle, #load, #save, subclasses

Constructor Details

#initialize(a, own, opts, x, y, w, h) ⇒ FXWindow

Return an initialized FXWindow instance, for an owned window.

Parameters:

a

an application instance Fox::FXApp

own

the owner window for this window Fox::FXWindow

opts

window options [Integer]

x

initial x-position [Integer]

y

initial y-position [Integer]

width

initial width [Integer]

height

initial height [Integer]



275
276
# File 'rdoc-sources/FXWindow.rb', line 275

def initialize(p, opts=0, x=0, y=0, width=0, height=0) # :yields: theWindow
end

Instance Attribute Details

#accelTableObject

The accelerator table for this window Fox::FXAccelTable



198
199
200
# File 'rdoc-sources/FXWindow.rb', line 198

def accelTable
  @accelTable
end

#backColorObject

Window background color Fox::FXColor



213
214
215
# File 'rdoc-sources/FXWindow.rb', line 213

def backColor
  @backColor
end

#defaultCursorObject

Default cursor for this window Fox::FXCursor



207
208
209
# File 'rdoc-sources/FXWindow.rb', line 207

def defaultCursor
  @defaultCursor
end

#dragCursorObject

Drag cursor for this window Fox::FXCursor



210
211
212
# File 'rdoc-sources/FXWindow.rb', line 210

def dragCursor
  @dragCursor
end

#firstObject (readonly)

This window’s first child window, if any Fox::FXWindow



174
175
176
# File 'rdoc-sources/FXWindow.rb', line 174

def first
  @first
end

#focusObject (readonly)

Currently focused child window, if any Fox::FXWindow



180
181
182
# File 'rdoc-sources/FXWindow.rb', line 180

def focus
  @focus
end

#keyObject

Window key [Integer]



183
184
185
# File 'rdoc-sources/FXWindow.rb', line 183

def key
  @key
end

#lastObject (readonly)

This window’s last child window, if any Fox::FXWindow



177
178
179
# File 'rdoc-sources/FXWindow.rb', line 177

def last
  @last
end

#layoutHintsObject

Layout hints for this window [Integer]



201
202
203
# File 'rdoc-sources/FXWindow.rb', line 201

def layoutHints
  @layoutHints
end

#nextObject (readonly)

Next (sibling) window, if any Fox::FXWindow



168
169
170
# File 'rdoc-sources/FXWindow.rb', line 168

def next
  @next
end

#numChildrenObject (readonly)

Number of child windows for this window [Integer]



204
205
206
# File 'rdoc-sources/FXWindow.rb', line 204

def numChildren
  @numChildren
end

#ownerObject (readonly)

This window’s owner window Fox::FXWindow



159
160
161
# File 'rdoc-sources/FXWindow.rb', line 159

def owner
  @owner
end

#parentObject (readonly)

This window’s parent window Fox::FXWindow



156
157
158
# File 'rdoc-sources/FXWindow.rb', line 156

def parent
  @parent
end

#prevObject (readonly)

Previous (sibling) window, if any Fox::FXWindow



171
172
173
# File 'rdoc-sources/FXWindow.rb', line 171

def prev
  @prev
end

#rootObject (readonly)

Root window Fox::FXWindow



165
166
167
# File 'rdoc-sources/FXWindow.rb', line 165

def root
  @root
end

#selectorObject

Message identifier for this window [Integer]



189
190
191
# File 'rdoc-sources/FXWindow.rb', line 189

def selector
  @selector
end

#shellObject (readonly)

The shell window for this window Fox::FXWindow



162
163
164
# File 'rdoc-sources/FXWindow.rb', line 162

def shell
  @shell
end

#targetObject

Message target object for this window Fox::FXObject



186
187
188
# File 'rdoc-sources/FXWindow.rb', line 186

def target
  @target
end

#xObject

This window’s x-coordinate, in the parent’s coordinate system [Integer]



192
193
194
# File 'rdoc-sources/FXWindow.rb', line 192

def x
  @x
end

#yObject

This window’s y-coordinate, in the parent’s coordinate system [Integer]



195
196
197
# File 'rdoc-sources/FXWindow.rb', line 195

def y
  @y
end

Class Method Details

.after?(a, b) ⇒ Boolean

Return true if sibling a comes after sibling b.

Returns:

  • (Boolean)


399
# File 'rdoc-sources/FXWindow.rb', line 399

def FXWindow.after?(a, b); end

.before?(a, b) ⇒ Boolean

Return true if sibling a comes before sibling b.

Returns:

  • (Boolean)


396
# File 'rdoc-sources/FXWindow.rb', line 396

def FXWindow.before?(a, b); end

.colorTypeObject

Common DND type: Color



231
# File 'rdoc-sources/FXWindow.rb', line 231

def FXWindow.colorType; end

.colorTypeNameObject

Common DND type name: Color



252
# File 'rdoc-sources/FXWindow.rb', line 252

def FXWindow.colorTypeName() ; end

.commonAncestor(a, b) ⇒ Object

Return the common ancestor of window a and window b.



393
# File 'rdoc-sources/FXWindow.rb', line 393

def FXWindow.commonAncestor(a, b); end

.deleteTypeObject

Common DND type: Delete request



219
# File 'rdoc-sources/FXWindow.rb', line 219

def FXWindow.deleteType; end

.deleteTypeNameObject

Common DND type name: Delete request



246
# File 'rdoc-sources/FXWindow.rb', line 246

def FXWindow.deleteTypeName() ; end

.imageTypeObject

Common DND type: Clipboard image type (pre-registered)



240
# File 'rdoc-sources/FXWindow.rb', line 240

def FXWindow.imageType; end

.octetTypeObject

Common DND type: Raw octet stream



216
# File 'rdoc-sources/FXWindow.rb', line 216

def FXWindow.octetType; end

.octetTypeNameObject

Common DND type name: Raw octet stream



243
# File 'rdoc-sources/FXWindow.rb', line 243

def FXWindow.octetTypeName() ; end

.stringTypeObject

Common DND type: Clipboard text type (pre-registered)



237
# File 'rdoc-sources/FXWindow.rb', line 237

def FXWindow.stringType; end

.textTypeObject

Common DND type: ASCII text request



222
# File 'rdoc-sources/FXWindow.rb', line 222

def FXWindow.textType; end

.textTypeNameObject

Common DND type name: ASCII text



249
# File 'rdoc-sources/FXWindow.rb', line 249

def FXWindow.textTypeName() ; end

.urilistTypeObject

Common DND type: URI List



234
# File 'rdoc-sources/FXWindow.rb', line 234

def FXWindow.urilistType; end

.urilistTypeNameObject

Common DND type name: URI List



255
# File 'rdoc-sources/FXWindow.rb', line 255

def FXWindow.urilistTypeName() ; end

.utf16TypeObject

Common DND type: UTF-16 text request



228
# File 'rdoc-sources/FXWindow.rb', line 228

def FXWindow.utf16Type; end

.utf16TypeNameObject

Common DND type name: UTF-16 text request



261
# File 'rdoc-sources/FXWindow.rb', line 261

def FXWindow.utf16TypeName() ; end

.utf8TypeObject

Common DND type: UTF-8 text request



225
# File 'rdoc-sources/FXWindow.rb', line 225

def FXWindow.utf8Type; end

.utf8TypeNameObject

Common DND type name: UTF-8 text request



258
# File 'rdoc-sources/FXWindow.rb', line 258

def FXWindow.utf8TypeName() ; end

Instance Method Details

#acceptDrop(action = DRAG_ACCEPT) ⇒ Object

When being dragged over, indicate acceptance or rejection of the dragged data. The action is a constant indicating the suggested drag action, one of:

DRAG_REJECT

reject all drop actions

DRAG_ACCEPT

accept any drop action

DRAG_COPY

accept this drop as a copy

DRAG_MOVE

accept this drop as a move

DRAG_LINK

accept this drop as a link

DRAG_PRIVATE

private



652
# File 'rdoc-sources/FXWindow.rb', line 652

def acceptDrop(action=DRAG_ACCEPT); end

#acquireClipboard(typesArray) ⇒ Object

Try to acquire the clipboard, given an array of drag types. Returns true on success.



591
# File 'rdoc-sources/FXWindow.rb', line 591

def acquireClipboard(typesArray) ; end

#acquireSelection(typesArray) ⇒ Object

Try to acquire the primary selection, given an array of drag types. Returns true on success.



577
# File 'rdoc-sources/FXWindow.rb', line 577

def acquireSelection(typesArray) ; end

#active?Boolean

Return true if this window is active.

Returns:

  • (Boolean)


420
# File 'rdoc-sources/FXWindow.rb', line 420

def active?() ; end

#addHotKey(code) ⇒ Object

Add this hot key to the closest ancestor’s accelerator table.



340
341
342
343
344
345
346
347
348
349
# File 'rdoc-sources/FXWindow.rb', line 340

def addHotKey(code)
  accel = nil
  win = self
  while win && (accel = win.accelTable).nil?
    win = win.parent
  end
  if accel
    accel.addAccel(code, self, MKUINT(ID_HOTKEY, SEL_KEYPRESS), MKUINT(ID_HOTKEY, SEL_KEYRELEASE))
  end
end

#after?(other) ⇒ Boolean

Return true if this window (self) comes after sibling window other,

Returns:

  • (Boolean)


337
338
339
# File 'lib/fox16/core.rb', line 337

def after?(other)
  FXWindow.after?(other)
end

#before?(other) ⇒ Boolean

Return true if this window (self) comes before sibling window other.

Returns:

  • (Boolean)


332
333
334
# File 'lib/fox16/core.rb', line 332

def before?(other)
  FXWindow.before?(other)
end

#beginDrag(typesArray) ⇒ Object

Initiate a drag operation with an array of previously registered drag types



611
# File 'rdoc-sources/FXWindow.rb', line 611

def beginDrag(typesArray) ; end

#canFocus?Boolean

Return true if this window is a control capable of receiving the focus.

Returns:

  • (Boolean)


423
# File 'rdoc-sources/FXWindow.rb', line 423

def canFocus?() ; end

#changeFocus(child) ⇒ Object

Notification that focus moved to a new child window.



438
# File 'rdoc-sources/FXWindow.rb', line 438

def changeFocus(child); end

#childAtIndex(index) ⇒ Object

Return the child window at specified index. Raises IndexError if index is out of range.



390
# File 'rdoc-sources/FXWindow.rb', line 390

def childAtIndex(index) ; end

#childOf?(window) ⇒ Boolean

Return true if specified window is ancestor of this window.

Returns:

  • (Boolean)


372
# File 'rdoc-sources/FXWindow.rb', line 372

def childOf?(window) ; end

#childrenObject

Returns an array containing all child windows of this window



325
326
327
328
329
# File 'lib/fox16/core.rb', line 325

def children
  kids = []
  each_child { |kid| kids << kid }
  kids
end

#clearDragRectangleObject

When being dragged over, indicate we want to receive SEL_DND_MOTION messages every time the cursor moves



640
# File 'rdoc-sources/FXWindow.rb', line 640

def clearDragRectangle(); end

#clearShapeObject

Clear window shape



478
# File 'rdoc-sources/FXWindow.rb', line 478

def clearShape(); end

#composeContextObject

Return compose context (an FXComposeContext).



402
# File 'rdoc-sources/FXWindow.rb', line 402

def composeContext; end

#composite?Boolean

Return true if this window is a composite.

Returns:

  • (Boolean)


565
# File 'rdoc-sources/FXWindow.rb', line 565

def composite?() ; end

#contains?(parentX, parentY) ⇒ Boolean

Return true if this window logically contains the given point (parentX, parentY).

Returns:

  • (Boolean)


700
# File 'rdoc-sources/FXWindow.rb', line 700

def contains?(parentX, parentY) ; end

#containsChild?(child) ⇒ Boolean

Return true if this window contains child in its subtree.

Returns:

  • (Boolean)


377
# File 'rdoc-sources/FXWindow.rb', line 377

def containsChild?(child) ; end

#createObject

Create all of the server-side resources for this window.



463
# File 'rdoc-sources/FXWindow.rb', line 463

def create(); end

#createComposeContextObject

Create compose context.



405
# File 'rdoc-sources/FXWindow.rb', line 405

def createComposeContext; end

#cursorPositionObject

Return the cursor position and mouse button-state as a three-element array.



411
# File 'rdoc-sources/FXWindow.rb', line 411

def cursorPosition() ; end

#default?Boolean

Return true if this is the default window.

Returns:

  • (Boolean)


448
# File 'rdoc-sources/FXWindow.rb', line 448

def default?() ; end

#defaultHeightObject

Return the default height of this window



329
# File 'rdoc-sources/FXWindow.rb', line 329

def defaultHeight(); end

#defaultWidthObject

Return the default width of this window



326
# File 'rdoc-sources/FXWindow.rb', line 326

def defaultWidth(); end

#destroyObject

Destroy the server-side resources for this window.



469
# File 'rdoc-sources/FXWindow.rb', line 469

def destroy(); end

#destroyComposeContextObject

Destroy compose context.



408
# File 'rdoc-sources/FXWindow.rb', line 408

def destroyComposeContext; end

#detachObject

Detach the server-side resources for this window.



466
# File 'rdoc-sources/FXWindow.rb', line 466

def detach(); end

#didAcceptObject

Returns DRAG_REJECT when the drop target would not accept the drop; otherwise indicates acceptance by returning one of DRAG_ACCEPT, DRAG_COPY, DRAG_MOVE or DRAG_LINK.



657
# File 'rdoc-sources/FXWindow.rb', line 657

def didAccept() ; end

#disableObject

Disable the window from receiving mouse and keyboard events.



460
# File 'rdoc-sources/FXWindow.rb', line 460

def disable(); end

#doesSaveUnder?Boolean

Return true if this window does save-unders.

Returns:

  • (Boolean)


713
# File 'rdoc-sources/FXWindow.rb', line 713

def doesSaveUnder?() ; end

#dragging?Boolean

Return true if a drag operation has been initiated from this window

Returns:

  • (Boolean)


608
# File 'rdoc-sources/FXWindow.rb', line 608

def dragging?() ; end

#dropDisableObject

Disable this window from receiving drops



602
# File 'rdoc-sources/FXWindow.rb', line 602

def dropDisable(); end

#dropEnableObject

Enable this window to receive drops



599
# File 'rdoc-sources/FXWindow.rb', line 599

def dropEnable(); end

#dropEnabled?Boolean

Return true if this window is able to receive drops

Returns:

  • (Boolean)


605
# File 'rdoc-sources/FXWindow.rb', line 605

def dropEnabled?() ; end

#dropFinished(action = DRAG_REJECT) ⇒ Object

Sent by the drop target in response to SEL_DND_DROP. The drag action should be the same as the action the drop target reported to the drag source in reponse to the SEL_DND_MOTION message. This function notifies the drag source that its part of the drop transaction is finished, and that it is free to release any resources involved in the drag operation. Calling #dropFinished is advisable in cases where the drop target needs to perform complex processing on the data received from the drag source, prior to returning from the SEL_DND_DROP message handler.



670
# File 'rdoc-sources/FXWindow.rb', line 670

def dropFinished(action=DRAG_REJECT); end

#dropTarget?Boolean

Return true if this window is the target of a drop

Returns:

  • (Boolean)


632
# File 'rdoc-sources/FXWindow.rb', line 632

def dropTarget?() ; end

#each_childObject

Iterate over the child windows for this window. Note that this only reaches the direct child windows for this window and no deeper descendants. To traverse the entire widget tree, use #each_child_recursive.



301
302
303
304
305
306
307
308
# File 'lib/fox16/core.rb', line 301

def each_child # :yields: child
  child = self.first
  while child
    next_child = child.next
    yield child
    child = next_child
  end
end

#each_child_recursiveObject

Traverse the widget tree starting from this window using depth-first traversal.



314
315
316
317
318
319
320
321
# File 'lib/fox16/core.rb', line 314

def each_child_recursive # :yields: child
  each_child do |child|
    yield child
    child.each_child_recursive do |subchild|
      yield subchild
    end
  end
end

#enableObject

Enable the window to receive mouse and keyboard events.



457
# File 'rdoc-sources/FXWindow.rb', line 457

def enable(); end

#enabled?Boolean

Return true if this window is able to receive mouse and keyboard events.

Returns:

  • (Boolean)


417
# File 'rdoc-sources/FXWindow.rb', line 417

def enabled?() ; end

#endDrag(drop = true) ⇒ Object

Terminate the drag operation with or without actually dropping the data. Return the action performed by the target.



629
# File 'rdoc-sources/FXWindow.rb', line 629

def endDrag(drop=true); end

#forceRefreshObject

Generate a SEL_UPDATE message for the window and its children.



514
# File 'rdoc-sources/FXWindow.rb', line 514

def forceRefresh(); end

#getChildAt(x, y) ⇒ Object

Return the child window at specified coordinates (x, y)



380
# File 'rdoc-sources/FXWindow.rb', line 380

def getChildAt(x, y) ; end

#getDNDData(origin, type) ⇒ Object

Get DND data; the caller becomes the owner of the array. The origin is a constant indicating the origin of the data, one of FROM_SELECTION, FROM_CLIPBOARD or FROM_DRAGNDROP. The type is a previously registered drag type.



691
# File 'rdoc-sources/FXWindow.rb', line 691

def getDNDData(origin, type) ; end

#getHeightForWidth(givenWidth) ⇒ Object

Return height for given width



335
# File 'rdoc-sources/FXWindow.rb', line 335

def getHeightForWidth(givenWidth); end

#getWidthForHeight(givenHeight) ⇒ Object

Return width for given height



332
# File 'rdoc-sources/FXWindow.rb', line 332

def getWidthForHeight(givenHeight); end

#grabObject

Grab the mouse to this window; future mouse events will be reported to this window even while the cursor goes outside of this window



536
# File 'rdoc-sources/FXWindow.rb', line 536

def grab() ; end

#grabbed?Boolean

Return true if the window has been grabbed

Returns:

  • (Boolean)


542
# File 'rdoc-sources/FXWindow.rb', line 542

def grabbed?() ; end

#grabbedKeyboard?Boolean

Return true if active grab is in effect

Returns:

  • (Boolean)


551
# File 'rdoc-sources/FXWindow.rb', line 551

def grabbedKeyboard?() ; end

#grabKeyboardObject

Grab keyboard device



545
# File 'rdoc-sources/FXWindow.rb', line 545

def grabKeyboard(); end

#handleDrag(x, y, action = DRAG_COPY) ⇒ Object

When dragging, inform the drop target of the new position and the drag action. The action is a constant, one of:

DRAG_REJECT

reject all drop actions

DRAG_ACCEPT

accept any drop action

DRAG_COPY

accept this drop as a copy

DRAG_MOVE

accept this drop as a move

DRAG_LINK

accept this drop as a link

DRAG_PRIVATE

private



623
# File 'rdoc-sources/FXWindow.rb', line 623

def handleDrag(x, y, action=DRAG_COPY) ; end

#hasClipboard?Boolean

Return true if this window owns the clipboard

Returns:

  • (Boolean)


585
# File 'rdoc-sources/FXWindow.rb', line 585

def hasClipboard?() ; end

#hasFocus?Boolean

Return true if this window has the focus.

Returns:

  • (Boolean)


426
# File 'rdoc-sources/FXWindow.rb', line 426

def hasFocus?() ; end

#hasSelection?Boolean

Return true if this window owns the primary selection

Returns:

  • (Boolean)


571
# File 'rdoc-sources/FXWindow.rb', line 571

def hasSelection?() ; end

#heightObject

Return the window height (in pixels).



316
# File 'rdoc-sources/FXWindow.rb', line 316

def height; end

#height=(h) ⇒ Object

Set the window height; and flag the widget as being in need of layout by its parent. This does not immediately update the server- side representation of the widget.



323
# File 'rdoc-sources/FXWindow.rb', line 323

def height=(h); end

#hideObject

Hide this window



557
# File 'rdoc-sources/FXWindow.rb', line 557

def hide(); end

#indexOfChild(window) ⇒ Object

Return the index (starting from zero) of the specified child window, or -1 if the window is not a child of this window.



384
# File 'rdoc-sources/FXWindow.rb', line 384

def indexOfChild(window) ; end

#inFocusChain?Boolean

Return true if this window is in the focus chain.

Returns:

  • (Boolean)


429
# File 'rdoc-sources/FXWindow.rb', line 429

def inFocusChain? ; end

#initial?Boolean

Return true if this is the initial default window.

Returns:

  • (Boolean)


454
# File 'rdoc-sources/FXWindow.rb', line 454

def initial?() ; end

#inquireDNDActionObject

When being dragged over, return the drag action



685
# File 'rdoc-sources/FXWindow.rb', line 685

def inquireDNDAction() ; end

#inquireDNDTypes(origin) ⇒ Object

When being dragged over, inquire the drag types being offered. The origin is a constant indicating the origin of the data, one of FROM_SELECTION, FROM_CLIPBOARD or FROM_DRAGNDROP. Returns an array of drag types.



676
# File 'rdoc-sources/FXWindow.rb', line 676

def inquireDNDTypes(origin) ; end

#killFocusObject

Remove the focus from this window.



435
# File 'rdoc-sources/FXWindow.rb', line 435

def killFocus(); end

#layoutObject

Perform layout immediately.



511
# File 'rdoc-sources/FXWindow.rb', line 511

def layout(); end

#linkAfter(other) ⇒ Object

Relink this window after sibling window other, in the parent’s window list.



347
348
349
# File 'lib/fox16/core.rb', line 347

def linkAfter(other)
  reparent(self.parent, other.next)
end

#linkBefore(other) ⇒ Object

Relink this window before sibling window other, in the parent’s window list.



342
343
344
# File 'lib/fox16/core.rb', line 342

def linkBefore(other)
  reparent(self.parent, other)
end

#lowerObject

Lower this window to the bottom of the stacking order.



484
# File 'rdoc-sources/FXWindow.rb', line 484

def lower(); end

#move(x, y) ⇒ Object

Move the window immediately, in the parent’s coordinate system. Update the server representation as well if the window is realized. Perform layout of the children when necessary.



491
# File 'rdoc-sources/FXWindow.rb', line 491

def move(x, y) ; end

#offeredDNDType?(origin, type) ⇒ Boolean

When being dragged over, return true if we are offered the given drag type. The origin is a constant indicating the origin of the data, one of FROM_SELECTION, FROM_CLIPBOARD or FROM_DRAGNDROP. The type is a previously registered drag type.

Returns:

  • (Boolean)


682
# File 'rdoc-sources/FXWindow.rb', line 682

def offeredDNDType?(origin, type) ; end

#position(x, y, w, h) ⇒ Object

Move and resize the window immediately, in the parent’s coordinate system. Update the server representation as well if the window is realized. Perform layout of the children when necessary.



505
# File 'rdoc-sources/FXWindow.rb', line 505

def position(x, y, w, h); end

#raiseWindowObject

Raise this window to the top of the stacking order.



481
# File 'rdoc-sources/FXWindow.rb', line 481

def raiseWindow(); end

#recalcObject

Mark this window’s layout as dirty



508
# File 'rdoc-sources/FXWindow.rb', line 508

def recalc(); end

#releaseClipboardObject

Release the clipboard. Returns true on success.



596
# File 'rdoc-sources/FXWindow.rb', line 596

def releaseClipboard(); end

#releaseSelectionObject

Release the primary selection. Returns true on success.



582
# File 'rdoc-sources/FXWindow.rb', line 582

def releaseSelection(); end

#remHotKey(code) ⇒ Object

Remove this hot key from the closest ancestor’s accelerator table.



355
356
357
358
359
360
361
362
363
364
# File 'rdoc-sources/FXWindow.rb', line 355

def remHotKey(code)
  accel = nil
  win = self
  while win && (accel = win.accelTable).nil?
    win = win.parent
  end
  if accel
    accel.removeAccel(code)
  end
end

#removeChild(child) ⇒ Object

Remove specified child window



387
# File 'rdoc-sources/FXWindow.rb', line 387

def removeChild(child) ; end

#repaintObject

If marked but not yet painted, paint the entire window



529
# File 'rdoc-sources/FXWindow.rb', line 529

def repaint(x, y, w, h) ; end

#reparent(father, other) ⇒ Object

Reparent this window under new father window, before other sibling..



517
# File 'rdoc-sources/FXWindow.rb', line 517

def reparent(father, other); end

#resize(w, h) ⇒ Object

Resize the window to the specified width and height immediately, updating the server representation as well, if the window was realized. Perform layout of the children when necessary.



498
# File 'rdoc-sources/FXWindow.rb', line 498

def resize(w, h) ; end

#scroll(x, y, w, h, dx, dy) ⇒ Object

Scroll rectangle (x, y, w, h) by a shift of (dx, dy)



520
# File 'rdoc-sources/FXWindow.rb', line 520

def scroll(x, y, w, h, dx, dy); end

#setCursorPosition(x, y) ⇒ Object

Warp the cursor to the new position (x, y).



414
# File 'rdoc-sources/FXWindow.rb', line 414

def setCursorPosition(x, y); end

#setDefault(enable = TRUE) ⇒ Object

This changes the default window which responds to the Enter key in a dialog. If enable is true, this window becomes the default window; when enable is false, this window will no longer be the default window. Finally, when enable is MAYBE, the default window will revert to the initial default window.



445
# File 'rdoc-sources/FXWindow.rb', line 445

def setDefault(enable=TRUE) ; end

#setDNDData(origin, type, data) ⇒ Object

Set DND data; ownership is transferred to the system. The origin is a constant indicating the origin of the data, one of FROM_SELECTION, FROM_CLIPBOARD or FROM_DRAGNDROP. The type is a previously registered drag type.



697
# File 'rdoc-sources/FXWindow.rb', line 697

def setDNDData(origin, type, data) ; end

#setDragRectangle(x, y, w, h, wantUpdates = true) ⇒ Object

When being dragged over, indicate that no further SEL_DND_MOTION messages are required while the cursor is inside the given rectangle



636
# File 'rdoc-sources/FXWindow.rb', line 636

def setDragRectangle(x, y, w, h, wantUpdates=true); end

#setFocusObject

Move the focus to this window.



432
# File 'rdoc-sources/FXWindow.rb', line 432

def setFocus(); end

#setInitial(enable = true) ⇒ Object

Make this window the initial default window.



451
# File 'rdoc-sources/FXWindow.rb', line 451

def setInitial(enable=true) ; end

#setShape(shape) ⇒ Object

Set window shape, where shape is either an FXRegion, FXBitmap or FXIcon instance.



475
# File 'rdoc-sources/FXWindow.rb', line 475

def setShape(shape); end

#shell?Boolean

Return true if this window is a shell window.

Returns:

  • (Boolean)


367
# File 'rdoc-sources/FXWindow.rb', line 367

def shell?() ; end

#showObject

Show this window



554
# File 'rdoc-sources/FXWindow.rb', line 554

def show(); end

#shown?Boolean Also known as: visible?

Return true if this window is shown.

Returns:

  • (Boolean)


560
# File 'rdoc-sources/FXWindow.rb', line 560

def shown?() ; end

#tr(message, hint = nil) ⇒ Object

Translate message for localization; using the current FXTranslator, an attempt is made to translate the given message into the current language. An optional hint may be passed to break any ties in case more than one tranlation is possible for the given message text. In addition, the name of the widget is passed as context name so that controls in a single dialog may be grouped together.



723
# File 'rdoc-sources/FXWindow.rb', line 723

def tr(message, hint=nil); end

#translateCoordinatesFrom(fromWindow, fromX, fromY) ⇒ Object

Translate coordinates (fromX, fromY) from fromWindow’s coordinate system to this window’s coordinate system. Returns a two-element array containing the coordinates in this window’s coordinate system.



705
# File 'rdoc-sources/FXWindow.rb', line 705

def translateCoordinatesFrom(fromWindow, fromX, fromY) ; end

#translateCoordinatesTo(toWindow, fromX, fromY) ⇒ Object

Translate coordinates (fromX, fromY) from this window’s coordinate system to toWindow’s coordinate system. Returns a two-element array containing the coordinates in toWindow’s coordinate system.



710
# File 'rdoc-sources/FXWindow.rb', line 710

def translateCoordinatesTo(toWindow, fromX, fromY) ; end

#underCursor?Boolean

Return true if this window is under the cursor

Returns:

  • (Boolean)


568
# File 'rdoc-sources/FXWindow.rb', line 568

def underCursor?() ; end

#ungrabObject

Release the mouse grab



539
# File 'rdoc-sources/FXWindow.rb', line 539

def ungrab(); end

#ungrabKeyboardObject

Ungrab keyboard device



548
# File 'rdoc-sources/FXWindow.rb', line 548

def ungrabKeyboard(); end

#update(x, y, w, h) ⇒ Object

Mark the specified rectangle dirty



523
# File 'rdoc-sources/FXWindow.rb', line 523

def update() ; end

#visible=(vis) ⇒ Object

Setting visible to true calls #show, setting it to false calls #hide.



352
353
354
355
356
357
358
# File 'lib/fox16/core.rb', line 352

def visible=(vis)
  if vis
    show
  else
    hide
  end
end

#widthObject

Return the window width (in pixels).



306
# File 'rdoc-sources/FXWindow.rb', line 306

def width; end

#width=(w) ⇒ Object

Set the window width; and flag the widget as being in need of layout by its parent. This does not immediately update the server- side representation of the widget.



313
# File 'rdoc-sources/FXWindow.rb', line 313

def width=(w); end