(in-package #:org.shirakumo.alloy.examples) (defclass tab-button (alloy:value-component) ((icon :initform NIL :initarg :icon :accessor icon))) (presentations:define-realization (windowing:window tab-button) ((:icon simple:text) (alloy:margins 10 0 0 0) (or (icon alloy:renderable) "") :font "FontAwesome" :size (alloy:un 15) :pattern colors:white :halign :start :valign :middle :hidden-p (not (icon alloy:renderable))) ((:label simple:text) (alloy:margins (if (icon alloy:renderable) 40 10) 0 0 0) alloy:text :font "PromptFont" :size (alloy:un 20) :halign :start :valign :middle)) (define-example workbench (screen) (let* ((window (windowing:make-window screen))) (alloy:represent "Test" 'tab-button :icon "" :layout-parent window)))