I want to look at how button is defined, so I did
<b> editor svv/vid-styles/button </b> and got the listing ( see at bottom ).
I do a search for <b> font-size </b> in the listing, but cannot find any reference to font-size, yet I know you can define
font-size as part of a button in view layout e.g
</br>
view layout [ button "hello" font-size 14]
</br>
so can someone explain to me why I don't see "font-size" in the code below ?
I think that goes back to the general question how do I know what are the options/permutations I can use/have with any VID STYLE, how do I find that?
------------------------------------------------
make object! [
type: 'face
offset: 0x0
size: 100x24
span: none
pane: none
text: none
color: none
image: none
effect: none
data: none
edge: make object! [
color: 110.120.130
image: none
effect: 'bevel
size: 2x2
]
font: make object! [
name: "arial"
style: 'bold
size: 12
color: 255.255.255
offset: 2x2
space: 0x0
align: 'center
valign: 'middle
shadow: 1x1
colors: [255.255.255 255.180.75]
]
para: make object! [
origin: 2x2
margin: 2x2
indent: 0x0
tabs: 40
wrap?: true
scroll: 0x0
]
feel: make object! [
redraw: func [face act pos /local state][
if all [face/texts face/texts/2] [
face/text: either face/state [face/texts/2] [face/texts/1]
]
either face/images [
face/image: either face/state [face/images/2] [face/images/1]
if all [face/colors face/effect find face/effect 'colorize] [
change next find face/effect 'colorize pick face/colors not face/state
]
] [
if face/edge [face/edge/effect: pick [ibevel bevel] face/state]
state: either not face/state [face/blinker] [true]
if face/colors [face/color: pick face/colors not state]
if face/effects [face/effect: pick face/effects not state]
]
]
detect: none
over: func [face action event][
if all [face/font face/font/colors] [
face/font/color: pick face/font/colors not action
show face
face/font/color: first face/font/colors
]
]
engage: func [face action event][
switch action [
time [if not face/state [face/blinker: not face/blinker]]
down [face/state: on]
alt-down [face/state: on]
up [if face/state [do-face face face/text] face/state: off]
alt-up [if face/state [do-face-alt face face/text] face/state: off]
over [face/state: on]
away [face/state: off]
]
cue face action
show face
]
cue: none
blink: none
]
saved-area: none
rate: none
show?: true
options: none
parent-face: none
old-offset: none
old-size: none
line-list: none
changes: none
face-flags: 0
action: none
state: false
access: make object! [
set-face*: func [face value][face/data: value]
get-face*: func [face][face/data]
clear-face*: func [face][face/data: false]
reset-face*: func [face][face/data: false]
]
style: 'FACE
alt-action: none
facets: [100x24 with [
color: image: none
font: [align: 'center valign: 'middle style: 'bold]
edge: [size: 2x2 effect: 'bevel color: svvc/bevel]
feel: svvf/button
effects: none
depth: 128
doc: [
info: "rectangular, rendered buttons"
string: ["button label" "button down label"]
integer: "width of button"
pair: "width and height of button"
tuple: ["button color" "button down color"]
block: ["execute when clicked" "execute when alt-clicked"]
image: ["button background" "background when button down"]
]
init: [
edge: make edge []
font/color: first font/colors
either image [
if not effect [
effect: copy [fit]
if color [append effect reduce ['colorize color depth]]
if all [colors greater? length? colors 1 not effects] [
effects: compose/deep [
[fit colorize (first colors) (depth)]
[fit colorize (second colors) (depth)]
]
]
]
] [
if not any [effect effects] [
either color [
effects: reduce [
reduce ['gradient 0x1 color + 32 color - 32]
either all [block? colors colors/2] [
reduce ['gradient 0x-1 colors/2 + 32 color/2 - 32]
] [
reduce ['gradient 0x-1 color + 32 color - 32]
]
]
] [
effects: [
[gradient 0x1 66.120.192 44.80.132]
[gradient 0x-1 66.120.192 44.80.132]
]
]
]
]
if not color [color: svvc/button]
]
]]
related: none
words: none
colors: none
texts: none
images: none
file: none
var: none
keycode: none
reset: none
styles: none
init: [
edge: make edge []
font/color: first font/colors
either image [
if not effect [
effect: copy [fit]
if color [append effect reduce ['colorize color depth]]
if all [colors greater? length? colors 1 not effects] [
effects: compose/deep [
[fit colorize (first colors) (depth)]
[fit colorize (second colors) (depth)]
]
]
]
] [
if not any [effect effects] [
either color [
effects: reduce [
reduce ['gradient 0x1 color + 32 color - 32]
either all [block? colors colors/2] [
reduce ['gradient 0x-1 colors/2 + 32 color/2 - 32]
] [
reduce ['gradient 0x-1 color + 32 color - 32]
]
]
] [
effects: [
[gradient 0x1 66.120.192 44.80.132]
[gradient 0x-1 66.120.192 44.80.132]
]
]
]
]
if not color [color: svvc/button]
]
multi: make object! [
text: func [face blk][
if pick blk 1 [
face/text: first blk
face/texts: copy blk
]
]
size: func [face blk][
if pick blk 1 [
if pair? first blk [face/size: first blk]
if integer? first blk [
if none? face/size [face/size: -1x-1]
face/size/x: first blk
]
]
]
file: func [face blk][
if pick blk 1 [
face/image: load-image face/file: first blk
if pick blk 2 [
face/colors: reduce [face/image]
foreach i next blk [
append face/colors load-image i
]
]
]
]
image: func [face blk][
if pick blk 1 [
face/image: first blk
if pick blk 2 [face/images: copy blk]
]
]
color: func [face blk][
if pick blk 1 [
either flag-face? face text [
set-font face color first blk
if pick blk 2 [face/color: second blk]
] [
face/color: first blk
]
if pick blk 2 [face/colors: copy blk]
]
]
block: func [face blk][
if pick blk 1 [
face/action: func [face value] pick blk 1
if pick blk 2 [face/alt-action: func [face value] pick blk 2]
]
]
]
blinker: none
pane-size: none
dirty?: none
help: none
user-data: none
flags: []
doc: make object! [
info: "rectangular, rendered buttons"
string: ["button label" "button down label"]
image: ["button background" "background when button down"]
logic: none
integer: "width of button"
pair: "width and height of button"
tuple: ["button color" "button down color"]
file: none
url: none
decimal: none
time: none
block: ["execute when clicked" "execute when alt-clicked"]
keywords: none
]
effects: none
depth: 128
]