WinBounds:
Filter:
Classes (extension) | GUI

WinBounds : Object
ExtensionExtension

a class that stores and restores window bounds
Source: WinBounds.sc

Description

WinBounds allows easy storing of window bounds in order to simplify designing and using multi-window guis. WinBounds is a class-only singleton.

First code examples:

WinBounds can also be use to store window-making functions,

WinBounds uses some extensions to the Window class :

Class Methods

WinBounds.stored

a dict with all stored bounds for windows. window names must be unique!

WinBounds.put(name, bounds)

put in bounds rect by window name

WinBounds.at(key)

Arguments:

key

get bounds rect for key

WinBounds.storeAll

store bounds of all currently open windows

WinBounds.restoreAll

restore all open windows to their stored bounds.

WinBounds.saveString

returns a code string that recreates stored bounds.

WinBounds.putAll(coll)

add a collection - a dict or keys-values-array - to stored dict.

WinBounds.store(name)

store bounds rect of a currently open window by window name.

WinBounds.storeWin(win)

store bounds rect of a currently open window

WinBounds.restoreWin(win)

Arguments:

win

restore bounds rect of a currently open windo.

WinBounds.restore(name)

Arguments:

name

restore bounds rect of a currently open window by window name.

WinBounds.makeFuncs

a dictionary of window-making functions

WinBounds.addMake(name, func)

add a make function to makeFuncs by name

WinBounds.make(name)

make the window with that name

WinBounds.showOrMake(name, restore: true, finishFunc)

if a window with that name exists, move it to its position if not, make the window by running its named makefunc (see examples) s

Inherited class methods

Undocumented class methods

WinBounds.fitToScreen(w)

WinBounds.fitWindowsToScreen

WinBounds.fitWindowsToScreen = value

WinBounds.limitRectToScreen(rect, titleBarHeight: 0, inScreenBounds)

WinBounds.menuOffset

WinBounds.menuOffset = value

WinBounds.postMissingBounds

WinBounds.postMissingBounds = value

WinBounds.titleOffset

WinBounds.titleOffset = value

Instance Methods

Inherited instance methods