Skip to content

UI.Link

Name - Description Default Type
<input> The value that will be passed to the Action shards of the link. Any
<output> Indicates whether the link was clicked during this frame. Bool
Label Optional label for the link. None String
Action The shards to execute when the link is clicked. None Shard[ Shard ]
Style The text style. None { Any }&{ Any }

A clickable link.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
(GFX.MainWindow
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    (->
     (UI.Link "Click here" (Msg "Hello")))))

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

 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
(GFX.MainWindow
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    (->
     (UI.Link
      :Label "Click here"
      :Style {:italics true}
      :Action (Msg "Hello")))))

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