-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathwindow.properties.fmfn
More file actions
48 lines (44 loc) · 1.67 KB
/
window.properties.fmfn
File metadata and controls
48 lines (44 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* =====================================================
* window.properties ( method )
*
* RETURNS: (string) window properties according to specified method
* PARAMETERS: method = (enum)
* DEPENDENCIES: var.list() and object.id()
* NOTES: Provides multiple methods for returning the
* properties of the current window
* =====================================================
*
*/
Let ( [
var.keys = List( "name"; "layout"; "id"; "top";"left";"width";"height");
var.values = List(
Get ( WindowName );
Get ( LayoutName );
object.id ( Get ( LayoutName ); "Layout"; ""; "" );
Get ( WindowTop );
Get ( WindowLeft );
Get ( WindowWidth );
Get ( WindowHeight )
)
];
// returns
Case(
method = "" or
method = "default"; var.values;
method = "piped"; Substitute ( var.values ; ¶ ; "|" );
// global variables are returned by var.list() - use Substitute ( properties ; "$$" ; "$" ) to make local
method = "let"; var.list ( var.keys;
List(
Quote ( Get ( WindowName ) ); // because var.list needs quoted strings
Quote ( Get ( LayoutName ) );
object.id ( Get ( LayoutName ); "Layout"; ""; "" );
Get ( WindowTop );
Get ( WindowLeft );
Get ( WindowWidth );
Get ( WindowHeight )
) ; "global" );
// default
var.values
)
)