1with agar.gui.widget.box; 2 3package agar.gui.widget.hbox is 4 5 use type agar.gui.widget.box.flags_t; 6 use type c.unsigned; 7 8 type hbox_t is record 9 box : aliased agar.gui.widget.box.box_t; 10 end record; 11 type hbox_access_t is access all hbox_t; 12 pragma convention (c, hbox_t); 13 pragma convention (c, hbox_access_t); 14 15 type flags_t is new c.unsigned; 16 HBOX_HOMOGENOUS : constant flags_t := flags_t (agar.gui.widget.box.BOX_HOMOGENOUS); 17 HBOX_HFILL : constant flags_t := flags_t (agar.gui.widget.box.BOX_HFILL); 18 HBOX_VFILL : constant flags_t := flags_t (agar.gui.widget.box.BOX_VFILL); 19 HBOX_EXPAND : constant flags_t := flags_t (agar.gui.widget.box.BOX_HFILL or agar.gui.widget.box.BOX_VFILL); 20 21 -- API 22 23 function allocate 24 (parent : widget_access_t; 25 flags : flags_t) return hbox_access_t; 26 pragma import (c, allocate, "agar_gui_widget_hbox_new"); 27 28 procedure set_homogenous 29 (box : hbox_access_t; 30 homogenous : boolean := true); 31 pragma inline (set_homogenous); 32 33 procedure set_padding 34 (box : hbox_access_t; 35 padding : natural); 36 pragma inline (set_padding); 37 38 procedure set_spacing 39 (box : hbox_access_t; 40 spacing : natural); 41 pragma inline (set_spacing); 42 43 function widget (box : hbox_access_t) return widget_access_t; 44 pragma inline (widget); 45 46end agar.gui.widget.hbox; 47