-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixed.cljs
68 lines (64 loc) · 3.07 KB
/
fixed.cljs
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
(ns spaces.layout.fixed
(:require
[spaces.core :as spaces]))
(defn main-top [{:keys [height width
top top-size top-resizeable top-scrollable
main main-scrollable]
:or {height "100%"
width "100%"
top-size 50
top-resizeable true
top-scrollable false
main-scrollable true}}]
;(println "layout-fixed mt ...")
[spaces/fixed {:height height :width width}
(if top-resizeable
[spaces/top-resizeable {:size top-size :scrollable top-scrollable} top]
[spaces/top {:size top-size :scrollable top-scrollable} top])
[spaces/fill {:scrollable main-scrollable}
main]])
(defn left-right-top [{:keys [height width
top top-size top-resizeable top-scrollable
left left-size left-resizeable left-scrollable
right right-scrollable]
:or {height "100%"
width "100%"
top-size 50
top-resizeable true
top-scrollable false
left-size "50%"
left-resizeable true
left-scrollable true
right-scrollable true}}]
;(println "layout-fixed lrt ...")
[spaces/fixed {:height height :width width}
(if top-resizeable
[spaces/top-resizeable {:size top-size :scrollable top-scrollable} top]
[spaces/top {:size top-size :scrollable top-scrollable} top])
[spaces/fill
(if left-resizeable
[spaces/left-resizeable {:size left-size :scrollable left-scrollable} left]
[spaces/left {:size left-size :scrollable left-scrollable} left])
[spaces/fill {:scrollable right-scrollable} right]]])
(defn left-right-middle [{:keys [height width
left left-size left-resizeable left-scrollable
right right-size right-resizeable right-scrollable
middle middle-scrollable]
:or {height "100%"
width "100%"
left-size "25%"
left-resizeable true
left-scrollable true
right-size "25%"
right-resizeable true
right-scrollable true
middle-scrollable true}}]
;(println "layout-fixed lrm ...")
[spaces/fixed {:height height :width width}
(if left-resizeable
[spaces/left-resizeable {:size left-size :scrollable left-scrollable} left]
[spaces/left {:size left-size :scrollable left-scrollable} left])
(if right-resizeable
[spaces/right-resizeable {:size right-size :scrollable right-scrollable} right]
[spaces/right {:size right-size :scrollable right-scrollable} right])
[spaces/fill {:scrollable middle-scrollable} middle]])