Listing 1
macros {
// dock b onto left, after a
#dock_left(a,b,c = 0cm) {
b.rect.left = a.rect.left + a.rect.width + c;
}
// ...
}
template {
// ...
}
surfaces {
empty ok { content, bg, is_focused };
empty content { txt, pict };
text txt;
bitmap pict;
gradient_fill bg;
border is_focused;
}
properties {
// some properties
txt.text = "Ok!";
pict.file_name = "ok.bmp";
bg.from_col = root.bg - rgb(40,40,40);
bg.to_col = root.bg + rgb(40,40,40);
is_focused.col = color("blue");
}
// note: we can have multiple layouts
layout l default {
ok.rect.left = .5cm;
ok.rect.top = .5cm;
ok.rect.width = 3.4cm;
ok.rect.height = 12mm;
}