From fb37523537cdb69a31dede401a604981ce8b7b9d Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sat, 17 Jun 2017 11:28:39 +1000 Subject: Updated coding style, added progress log --- src/fltk-widgets.adb | 94 +++++++++++++++++----------------------------------- 1 file changed, 31 insertions(+), 63 deletions(-) (limited to 'src/fltk-widgets.adb') diff --git a/src/fltk-widgets.adb b/src/fltk-widgets.adb index dfb0c9c..8d6bec2 100644 --- a/src/fltk-widgets.adb +++ b/src/fltk-widgets.adb @@ -1,14 +1,17 @@ -with Interfaces.C; -with Interfaces.C.Strings; -with System; -with System.Address_To_Access_Conversions; -with FLTK.Widgets.Groups; -with FLTK.Images; -use type Interfaces.C.int; -use type Interfaces.C.unsigned; -use type System.Address; +with + + Interfaces.C.Strings, + System.Address_To_Access_Conversions, + FLTK.Widgets.Groups, + FLTK.Images; + +use type + + Interfaces.C.int, + Interfaces.C.unsigned, + System.Address; package body FLTK.Widgets is @@ -29,6 +32,8 @@ package body FLTK.Widgets is pragma Import (C, widget_set_handle_hook, "widget_set_handle_hook"); + + function new_fl_widget (X, Y, W, H : in Interfaces.C.int; Text : in Interfaces.C.char_array) @@ -40,6 +45,8 @@ package body FLTK.Widgets is pragma Import (C, free_fl_widget, "free_fl_widget"); + + procedure fl_widget_activate (W : in System.Address); pragma Import (C, fl_widget_activate, "fl_widget_activate"); @@ -62,6 +69,9 @@ package body FLTK.Widgets is (W : in System.Address); pragma Import (C, fl_widget_clear_active, "fl_widget_clear_active"); + + + function fl_widget_changed (W : in System.Address) return Interfaces.C.unsigned; @@ -71,6 +81,9 @@ package body FLTK.Widgets is (W : in System.Address); pragma Import (C, fl_widget_clear_changed, "fl_widget_clear_changed"); + + + function fl_widget_get_parent (W : in System.Address) return System.Address; @@ -81,6 +94,9 @@ package body FLTK.Widgets is return Interfaces.C.int; pragma Import (C, fl_widget_contains, "fl_widget_contains"); + + + function fl_widget_get_align (W : in System.Address) return Interfaces.C.unsigned; @@ -145,6 +161,9 @@ package body FLTK.Widgets is (W, C : in System.Address); pragma Import (C, fl_widget_set_callback, "fl_widget_set_callback"); + + + function fl_widget_get_x (W : in System.Address) return Interfaces.C.int; @@ -175,6 +194,9 @@ package body FLTK.Widgets is X, Y : in Interfaces.C.int); pragma Import (C, fl_widget_position, "fl_widget_position"); + + + procedure fl_widget_set_image (W, I : in System.Address); pragma Import (C, fl_widget_set_image, "fl_widget_set_image"); @@ -192,8 +214,6 @@ package body FLTK.Widgets is end Callback_Hook; - - procedure Draw_Hook (U : in System.Address) is @@ -204,8 +224,6 @@ package body FLTK.Widgets is end Draw_Hook; - - function Handle_Hook (U : in System.Address; E : in Interfaces.C.int) @@ -264,8 +282,6 @@ package body FLTK.Widgets is end Activate; - - procedure Deactivate (This : in out Widget) is begin @@ -273,8 +289,6 @@ package body FLTK.Widgets is end Deactivate; - - function Is_Active (This : in Widget) return Boolean is @@ -283,8 +297,6 @@ package body FLTK.Widgets is end Is_Active; - - function Is_Tree_Active (This : in Widget) return Boolean is @@ -293,8 +305,6 @@ package body FLTK.Widgets is end Is_Tree_Active; - - procedure Clear_Active (This : in out Widget) is begin @@ -312,8 +322,6 @@ package body FLTK.Widgets is end Has_Changed; - - procedure Clear_Changed (This : in out Widget) is begin @@ -338,8 +346,6 @@ package body FLTK.Widgets is end Parent; - - function Contains (This : in Widget; Item : in Widget'Class) @@ -359,8 +365,6 @@ package body FLTK.Widgets is end Get_Alignment; - - procedure Set_Alignment (This : in out Widget; New_Align : in Alignment) is @@ -369,8 +373,6 @@ package body FLTK.Widgets is end Set_Alignment; - - function Get_Box (This : in Widget) return Box_Kind is @@ -379,8 +381,6 @@ package body FLTK.Widgets is end Get_Box; - - procedure Set_Box (This : in out Widget; Box : in Box_Kind) is @@ -389,8 +389,6 @@ package body FLTK.Widgets is end Set_Box; - - function Get_Label (This : in out Widget) return String is @@ -399,8 +397,6 @@ package body FLTK.Widgets is end Get_Label; - - procedure Set_Label (This : in out Widget; Text : in String) is @@ -409,8 +405,6 @@ package body FLTK.Widgets is end Set_Label; - - function Get_Label_Font (This : in Widget) return Font_Kind is @@ -419,8 +413,6 @@ package body FLTK.Widgets is end Get_Label_Font; - - procedure Set_Label_Font (This : in out Widget; Font : in Font_Kind) is @@ -429,8 +421,6 @@ package body FLTK.Widgets is end Set_Label_Font; - - function Get_Label_Size (This : in Widget) return Font_Size is @@ -439,8 +429,6 @@ package body FLTK.Widgets is end Get_Label_Size; - - procedure Set_Label_Size (This : in out Widget; Size : in Font_Size) is @@ -449,8 +437,6 @@ package body FLTK.Widgets is end Set_Label_Size; - - function Get_Label_Type (This : in Widget) return Label_Kind is @@ -459,8 +445,6 @@ package body FLTK.Widgets is end Get_Label_Type; - - procedure Set_Label_Type (This : in out Widget; Label : in Label_Kind) is @@ -469,8 +453,6 @@ package body FLTK.Widgets is end Set_Label_Type; - - function Get_Callback (This : in Widget) return Widget_Callback is @@ -479,8 +461,6 @@ package body FLTK.Widgets is end Get_Callback; - - procedure Set_Callback (This : in out Widget; Func : in Widget_Callback) is @@ -502,8 +482,6 @@ package body FLTK.Widgets is end Get_X; - - function Get_Y (This : in Widget) return Integer is @@ -512,8 +490,6 @@ package body FLTK.Widgets is end Get_Y; - - function Get_W (This : in Widget) return Integer is @@ -522,8 +498,6 @@ package body FLTK.Widgets is end Get_W; - - function Get_H (This : in Widget) return Integer is @@ -532,8 +506,6 @@ package body FLTK.Widgets is end Get_H; - - procedure Resize (This : in out Widget; W, H : in Integer) is @@ -545,8 +517,6 @@ package body FLTK.Widgets is end Resize; - - procedure Reposition (This : in out Widget; X, Y : in Integer) is @@ -568,8 +538,6 @@ package body FLTK.Widgets is end Get_Image; - - procedure Set_Image (This : in out Widget; Pic : in out FLTK.Images.Image'Class) is -- cgit