-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathstyle.lisp
157 lines (139 loc) · 4.75 KB
/
style.lisp
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
(in-package #:jupyter/widgets)
(defwidget style (widget)
()
(:default-initargs :%model-module +controls-module+
:%model-module-version +controls-module-version+
:%view-name "StyleView"
:%view-module +base-module+
:%view-module-version +base-module-version+))
(defwidget background-style (style)
((widget-background :initarg :background
:initform nil
:accessor widget-background
:documentation "Background specifications."
:trait :string)))
(defwidget base-text-style (style)
((font-size :initarg :font-size
:initform nil
:accessor widget-font-size
:documentation "Button text font size."
:trait :string)
(text-color :initarg :text-color
:initform nil
:accessor widget-text-color
:documentation "text color."
:trait :string)))
(defwidget weight-text-style (style)
((font-weight :initarg :font-weight
:initform nil
:accessor widget-font-weight
:documentation "Button text font weight."
:trait :string)))
(defwidget extended-text-style (base-text-style weight-text-style)
((font-family :initarg :font-family
:initform nil
:accessor widget-font-family
:documentation "Button text font family."
:trait :string)
(font-style :initarg :font-style
:initform nil
:accessor widget-font-style
:documentation "Button text font style."
:trait :string)
(font-variant :initarg :font-variant
:initform nil
:accessor widget-font-variant
:documentation "Button text font variant."
:trait :string)
(font-decoration :initarg :font-decoration
:initform nil
:accessor widget-font-decoration
:documentation "Button text font decoration."
:trait :string)))
(defwidget button-style (extended-text-style)
((button-color :initarg :button-color
:initform nil
:accessor widget-button-color
:documentation "Color of the button"
:trait :string))
(:default-initargs :%model-name "ButtonStyleModel")
(:documentation "Button style widget"))
(defwidget description-style (style)
((description-width
:initarg :description-width
:initform nil
:accessor widget-description-width
:documentation "Width of the description to the side of the control."
:trait :string))
(:default-initargs
:%model-name "DescriptionStyleModel"))
(defwidget label-style (extended-text-style description-style)
()
(:default-initargs :%model-name "LabelStyleModel")
(:documentation "Label style widget"))
(defwidget checkbox-style (background-style)
()
(:default-initargs :%model-name "CheckboxStyleModel")
(:documentation "Button style widget"))
(defwidget text-style (base-text-style description-style background-style)
()
(:default-initargs :%model-name "TextStyleModel")
(:documentation "Text style widget"))
(defwidget html-style (text-style)
()
(:default-initargs :%model-name "HTMLStyleModel")
(:documentation "HTML style widget"))
(defwidget html-math-style (text-style)
()
(:default-initargs :%model-name "HTMLMathStyleModel")
(:documentation "HTML math style widget"))
(defwidget progress-style (description-style)
((bar-color
:initarg :bar-color
:accessor widget-bar-color
:documentation "Color of the slider handle."
:trait :color))
(:default-initargs
:%model-name "ProgressStyleModel")
(:documentation "Progress style widget."))
(defwidget slider-style (description-style)
((handle-color
:initarg :handle-color
:accessor widget-handle-color
:documentation "Color of the slider handle."
:trait :color))
(:default-initargs
:%model-name "SliderStyleModel"))
(defwidget toggle-button-style (extended-text-style description-style)
()
(:default-initargs
:%model-name "ToggleButtonStyleModel")
(:documentation "Toggle Button style widget."))
(defwidget toggle-buttons-style (weight-text-style description-style)
((button-width
:initarg :button-width
:initform nil
:accessor widget-button-width
:documentation "The width of each button."
:trait :string))
(:default-initargs
:%model-name "ToggleButtonsStyleModel")
(:documentation "Toggle Buttons style widget."))
(defwidget styled-widget (dom-widget)
((style
:initarg :style
:accessor widget-style
:documentation "Reference to style widget."
:trait :widget)))
(defwidget description-widget (styled-widget)
((description
:initarg :description
:accessor widget-description
:documentation "Description of the control."
:trait :string)
(description-tooltip
:initarg :description-tooltip
:accessor widget-description-tooltip
:documentation "Tooltip for the description (defaults to description)."
:trait :string))
(:default-initargs :style (make-instance 'description-style)))