Skip to content

UI.Frame

Name - Description Default Type
<input> The value that will be passed to the Contents shards of the frame. Any
<output> The output of this shard will be its input. Any
Contents The UI contents. None Shard[ Shard ]
InnerMargin The margin inside the frame, between the outline and the contents. None Float4
OuterMargin The margin outside the frame. None Float4
Rounding Rounding radiuses for the corners. None Float4
FillColor The color filling the background of the frame. None Color&Color
StrokeColor The color for the frame outline. None Color&Color
StrokeWidth The width of the frame outline. None Float

Visually groups the contents together.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
(GFX.MainWindow
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    (UI.Frame
     :InnerMargin (float4 10) :OuterMargin (float4 0) :Rounding (float4 5)
     :FillColor (color 50 50 21)
     :StrokeColor (color 250 250 32) :StrokeWidth (float 2)
     :Contents
     (->
      "Frame content" (UI.Label)))))

  (GFX.Render :Steps .render-steps)))