1package body agar.gui.widget.hbox is 2 3 package cbinds is 4 procedure set_homogenous 5 (box : hbox_access_t; 6 homogenous : c.int); 7 pragma import (c, set_homogenous, "agar_gui_widget_hbox_set_homogenous"); 8 9 procedure set_padding 10 (box : hbox_access_t; 11 padding : c.int); 12 pragma import (c, set_padding, "agar_gui_widget_hbox_set_padding"); 13 14 procedure set_spacing 15 (box : hbox_access_t; 16 spacing : c.int); 17 pragma import (c, set_spacing, "agar_gui_widget_hbox_set_spacing"); 18 end cbinds; 19 20 procedure set_homogenous 21 (box : hbox_access_t; 22 homogenous : boolean := true) is 23 begin 24 if homogenous then 25 cbinds.set_homogenous (box, 1); 26 else 27 cbinds.set_homogenous (box, 0); 28 end if; 29 end set_homogenous; 30 31 procedure set_padding 32 (box : hbox_access_t; 33 padding : natural) is 34 begin 35 cbinds.set_padding 36 (box => box, 37 padding => c.int (padding)); 38 end set_padding; 39 40 procedure set_spacing 41 (box : hbox_access_t; 42 spacing : natural) is 43 begin 44 cbinds.set_spacing 45 (box => box, 46 spacing => c.int (spacing)); 47 end set_spacing; 48 49 function widget (box : hbox_access_t) return widget_access_t is 50 begin 51 return agar.gui.widget.box.widget (box.box'access); 52 end widget; 53 54end agar.gui.widget.hbox; 55