Fnd_Wnd
25 shared methods.
- Fnd_Wnd_BringToFront
- Fnd_Wnd_Cancel
- Fnd_Wnd_CancelCloseAll
- Fnd_Wnd_CloseAllWindows
- Fnd_Wnd_CloseAllWindows2
- Fnd_Wnd_CloseBox
- Fnd_Wnd_CloseBoxMethod
- Fnd_Wnd_CloseNow
- Fnd_Wnd_CloseWindow
- Fnd_Wnd_GetNextStackElement
- Fnd_Wnd_GetProcessWindowRef
- Fnd_Wnd_Info
- Fnd_Wnd_MoveOnScreen
- Fnd_Wnd_OpenFormWindow
- Fnd_Wnd_OpenWindow
- Fnd_Wnd_Position
- Fnd_Wnd_Register
- Fnd_Wnd_SavePosition
- Fnd_Wnd_SendCloseRequests
- Fnd_Wnd_Title
- Fnd_Wnd_ToolbarHeight
- Fnd_Wnd_Type
- Fnd_Wnd_Unregister
- Fnd_Wnd_UseSavedPosition
- Fnd_Wnd_Windows
Fnd_Wnd_BringToFront
Fnd_Wnd_BringToFront ($windowID_i : Integer)
Pass a window ID and that window is brought to the front, a more precise version than bringing an entire process to the front. If the window's process is hidden it is shown first. Does nothing when the window does not exist.
| Parameter | Type | Direction | Description |
|---|---|---|---|
windowID | Integer | in | A Window ID |
Fnd_Wnd_Cancel
Fnd_Wnd_Cancel
Calls the CANCEL command.
Exists so that CANCEL can be reached from CALL FORM, which takes a method name and cannot be given a bare command.
No parameters.
Fnd_Wnd_CancelCloseAll
Fnd_Wnd_CancelCloseAll
Call this to end Foundation's attempts to close all windows.
No parameters.
Fnd_Wnd_CloseAllWindows
Fnd_Wnd_CloseAllWindows ({wait?}) --> Boolean
This process tries to tell all of the other processes to close their windows.
Called as a new process from Fnd_Shell_Quitter, and when the user Option-clicks a window's close box.
If the wait parameter is passed and is True, this process will wait until all of the windows have been closed, and then return True. If it takes too long for the windows to close, or the user cancels the closing, then False is returned.
Do not pass True to this routine from a process that's displaying a window that needs to be closed. It won't work properly.
| Parameter | Type | Direction | Description |
|---|---|---|---|
wait | Boolean | in | Wait for all windows to close? (optional) |
Result | Boolean | out | Did all windows close? |
Fnd_Wnd_CloseAllWindows2
Fnd_Wnd_CloseAllWindows2
This process asks every closeable window to close, one request each, and keeps looking for new ones until none are left, Close All is cancelled, or 30 seconds pass.
Called as a new process from Fnd_Wnd_CloseAllWindows.
Called with a window by Fnd_Wnd_CloseWindow, it asks only that window's process, and only asks that window (a prime) once every closeable sibling has closed. Close All is untouched.
| Parameter | Type | Direction | Description |
|---|---|---|---|
targetWindow | Integer | in | A prime window to close after its siblings (optional) |
Fnd_Wnd_CloseBox
Fnd_Wnd_CloseBox ({add close box?}) --> Boolean
Adds a close box to the upcoming window. Also returns the current setting.
This method replaces the original Fnd_Wnd_SetCloseBox method, which is now obsolete.
| Parameter | Type | Direction | Description |
|---|---|---|---|
closeBox | Boolean | in | Add a close box? (optional) |
Result | Boolean | out | Current setting |
Fnd_Wnd_CloseBoxMethod
Fnd_Wnd_CloseBoxMethod
A generic method with no code. Used by the Fnd_Wnd_OpenWindow method as the close box method for new windows (handle the close in the form method).
No parameters.
Fnd_Wnd_CloseNow
Fnd_Wnd_CloseNow --> Boolean
Returns True if Foundation is trying to close all windows due to the user Option-clicking a window's close box, or if the current form's window has been asked to close by Fnd_Wnd_CloseWindow or Close All.
| Parameter | Type | Direction | Description |
|---|---|---|---|
$0 | Boolean | out | True if it's time to close the window |
Fnd_Wnd_CloseWindow
Fnd_Wnd_CloseWindow (window)
Asks one window to close, as if it had been closed with Close All: its onClose method, its On Outside Call handler, or a plain CANCEL. The window may veto.
A prime window with closeable siblings waits: the siblings are asked first, and the prime only once they have all closed. That happens in a background process. Does nothing if the window does not exist.
| Parameter | Type | Direction | Description |
|---|---|---|---|
window | Integer | in | The window reference |
Fnd_Wnd_GetNextStackElement
Fnd_Wnd_GetNextStackElement --> Number
Gets (and reserves) the number of the next available slot in the window cascade. The slot's position is the seed plus (slot-1) times the offset.
| Parameter | Type | Direction | Description |
|---|---|---|---|
$0 | Longint | out | The cascade slot number to use, from 1 |
Fnd_Wnd_GetProcessWindowRef
Fnd_Wnd_GetProcessWindowRef (process number) --> Number
Returns the window ref for the frontmost window of the specified process.
| Parameter | Type | Direction | Description |
|---|---|---|---|
processNumber | Longint | in | A process number |
Result | Longint | out | A window reference or 0 |
Fnd_Wnd_Info
Fnd_Wnd_Info (label) --> Text
Returns requested information. See the Fnd_Gen_ComponentInfo method for more information.
| Parameter | Type | Direction | Description |
|---|---|---|---|
request | Text | in | Info desired ("version" or "name" or "position" or "title") |
Result | Text | out | Response |
Fnd_Wnd_MoveOnScreen
Fnd_Wnd_MoveOnScreen (->left; ->top; ->right; ->bottom; {window type})
Modifies the window coordinates so the window will be opened completely onscreen.
Alternate syntax #1: pass no parameters and the per-process properties Fnd.Wnd.Left_i, Fnd.Wnd.Top_i, Fnd.Wnd.Right_i, Fnd.Wnd.Bottom_i and Fnd.Wnd.WindowType_i are used and updated Alternate syntax #2: pass an object with the desired parameters; the property names are capitalised, as below, and the object is updated in place
| Parameter | Type | Direction | Description |
|---|---|---|---|
numberOne | Pointer | in | Pointer to the left side of the window |
top | Pointer | in | Pointer to the top of the window |
right | Pointer | in | Pointer to the right side of the window |
bottom | Pointer | in | Pointer to the bottom of the window |
windowType | Longint | in | The window type (optional) |
numberOne | Object | in | Object containing parameters |
numberOne | Longint | in | Left side of the window |
numberOne | Longint | in | Top of the window |
numberOne | Longint | in | Right side of the window |
numberOne | Longint | in | Bottom of the window |
numberOne | Longint | in | The window type (optional) |
Fnd_Wnd_OpenFormWindow
Fnd_Wnd_OpenFormWindow (->table; form name)
Opens a new window using the specified form's width and height.
| Parameter | Type | Direction | Description |
|---|---|---|---|
var1 | Pointer | in | A pointer to the form's table |
var2 | Text | in | The name of the form |
Result | Longint | out | The window reference |
Fnd_Wnd_OpenWindow
Fnd_Wnd_OpenWindow (width; height) --> Number Alternate parameters: Fnd_Wnd_OpenWindow (left; top; right; bottom)
Opens a new window centered on the screen or over the frontmost window (depending on the value of Fnd.Wnd.WindowPosition_i).
| Parameter | Type | Direction | Description |
|---|---|---|---|
fnd_Wnd_Left | Longint | in | Width of the new window |
fnd_Wnd_Top | Longint | in | Height of the new window |
fnd_Wnd_Left | Longint | in | Global left coordinate |
fnd_Wnd_Top | Longint | in | Global top coordinate |
fnd_Wnd_Right | Longint | in | Global right coordinate |
fnd_Wnd_Bottom | Longint | in | Global bottom coordinate |
Result | Longint | out | The window reference number |
Fnd_Wnd_Position
Fnd_Wnd_Position ({position setting}) --> Number Fnd_Wnd_Position (left; top; right; bottom) --> Number
Allows the developer to get and set the window position for the upcoming window. 1 = Fnd_Wnd_CenterOnScreen = Centered on screen 2 = Fnd_Wnd_CenterOnWindow = Centered over frontmost window 3 = Fnd_Wnd_MacOSXSheet = Sheet if possible, or centered over frontmost window 4 = Fnd_Wnd_Stack = Stacked with other stacked windows 5 = Fnd_Wnd_StackOnWindow = Stacked over the frontmost window
Optionally exact window coordinates can be passed.
This method replaces the original Fnd_Wnd_SetPosition method, which is now obsolete.
| Parameter | Type | Direction | Description |
|---|---|---|---|
left | Longint | in | Window position (optional) |
top | Longint | in | Relative to Window (optional) |
left | Longint | in | Left |
top | Longint | in | Top |
right | Longint | in | Right |
bottom | Longint | in | Bottom |
Result | Longint | out | Current window position setting |
Fnd_Wnd_Register
Fnd_Wnd_Register (window {; options})
Adds a window to the window registry, or merges the options into its entry if it is already there. Windows opened by Fnd_Wnd_OpenWindow are registered automatically, but are kept out of the Window menu and out of Close All until they opt in.
| Parameter | Type | Direction | Description |
|---|---|---|---|
window | Integer | in | The window reference |
options | Object | in | Any of the properties below (optional) |
options | Text | in | The Window-menu text |
options | Boolean | in | List the window in the Window menu |
options | Boolean | in | Include the window in Close All |
options | Boolean | in | See below |
options | Boolean | in | See below |
options | Text | in | A project method run inside the window when it is asked to |
Fnd_Wnd_SavePosition
Fnd_Wnd_SavePosition ({name{; window ref}})
Saves the frontmost window of the current process in the user's prefernces file (if the Foundation Preferences component is available).
This is basically the same as calling Fnd_Pref_SetWindow, but you don't have to check first to see if the Preferences component is available.
| Parameter | Type | Direction | Description |
|---|---|---|---|
preferenceName | Text | in | The name of the preference item (optional) |
windowReference | Longint | in | The window to save (optional) |
Fnd_Wnd_SendCloseRequests
Fnd_Wnd_SendCloseRequests ({process number})
Marks the frontmost window of the current process (or of the process passed) as one that should be closed if the user option-closes a window or selects Close All Windows from a menu. A window already marked is not added again. If the current process has no window yet, the next one it opens with Fnd_Wnd_OpenWindow or Fnd_Wnd_OpenFormWindow is marked. Nothing happens if another process has no window. See Fnd_Wnd_Register for the prime window, which this claims in the same way.
| Parameter | Type | Direction | Description |
|---|---|---|---|
processNumber | Longint | in | Process number (optional) |
Fnd_Wnd_Title
Fnd_Wnd_Title ({title}) --> Text
Gets and sets the window title for the upcoming window.
This method replaces the original Fnd_Wnd_Title method, which is now obsolete.
| Parameter | Type | Direction | Description |
|---|---|---|---|
windowTitle | Text | in | Window title (optional) |
Result | Text | out | Next window title |
Fnd_Wnd_ToolbarHeight
Fnd_Wnd_ToolbarHeight --> longint
Returns the toolbar height (if it is currently being displayed)
| Parameter | Type | Direction | Description |
|---|---|---|---|
$0 | longint | out | The toolbar height |
Fnd_Wnd_Type
Fnd_Wnd_Type ({window type}) --> Number
Sets and gets the window type for the next window to be opened.
This method replaces the original Fnd_Wnd_SetType method, which is now obsolete.
| Parameter | Type | Direction | Description |
|---|---|---|---|
windowType | Longint | in | Window type (optional) |
Result | Longint | out | Window type Modified by Gary Boudreaux on Dec 21, 2008 Enhanced parameter description in header |
Fnd_Wnd_Unregister
Fnd_Wnd_Unregister ({window})
Removes a window from the window registry. With no parameter it removes the current process's most recently registered window, which is the one CLOSE WINDOW would close. Does nothing if there is no such entry.
| Parameter | Type | Direction | Description |
|---|---|---|---|
window | Integer | in | The window reference (optional) |
Fnd_Wnd_UseSavedPosition
Fnd_Wnd_UseSavedPosition ({pref name})
Tells the window routines we want to try to use a saved position.
If no preference name is specified, the current process name is used.
| Parameter | Type | Direction | Description |
|---|---|---|---|
processName | Text | in | The name of the saved position (optional) |
Fnd_Wnd_Windows
Fnd_Wnd_Windows ({filter}) --> Collection
Returns the live entries of the window registry, after dropping the dead ones. Each entry is an object: window, process, processName, title, inMenu, closeable, prime, disposable, slot and onClose.
The result is a copy: changing it does not change the registry.
| Parameter | Type | Direction | Description |
|---|---|---|---|
filter | Object | in | Return only entries having every property of this object, e.g. {process: 3} or {inMenu: True} (optional) |
Result | Collection | out | A non-shared collection of entry objects, oldest first |