summaryrefslogtreecommitdiff
path: root/src/fltk-widgets-groups.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/fltk-widgets-groups.adb')
-rw-r--r--src/fltk-widgets-groups.adb217
1 files changed, 108 insertions, 109 deletions
diff --git a/src/fltk-widgets-groups.adb b/src/fltk-widgets-groups.adb
index d5b8197..5d21d1f 100644
--- a/src/fltk-widgets-groups.adb
+++ b/src/fltk-widgets-groups.adb
@@ -1,8 +1,13 @@
-with Interfaces.C;
-with System;
-use type System.Address;
+with
+
+ Interfaces.C,
+ System;
+
+use type
+
+ System.Address;
package body FLTK.Widgets.Groups is
@@ -17,6 +22,8 @@ package body FLTK.Widgets.Groups is
pragma Import (C, group_set_handle_hook, "group_set_handle_hook");
+
+
function new_fl_group
(X, Y, W, H : in Interfaces.C.int;
Text : in Interfaces.C.char_array)
@@ -28,19 +35,12 @@ package body FLTK.Widgets.Groups is
pragma Import (C, free_fl_group, "free_fl_group");
+
+
procedure fl_group_add
(G, W : in System.Address);
pragma Import (C, fl_group_add, "fl_group_add");
- function fl_group_find
- (G, W : in System.Address)
- return Interfaces.C.int;
- pragma Import (C, fl_group_find, "fl_group_find");
-
- procedure fl_group_init_sizes
- (G : in System.Address);
- pragma Import (C, fl_group_init_sizes, "fl_group_init_sizes");
-
procedure fl_group_insert
(G, W : in System.Address;
P : in Interfaces.C.int);
@@ -59,10 +59,8 @@ package body FLTK.Widgets.Groups is
P : in Interfaces.C.int);
pragma Import (C, fl_group_remove2, "fl_group_remove2");
- function fl_group_children
- (G : in System.Address)
- return Interfaces.C.int;
- pragma Import (C, fl_group_children, "fl_group_children");
+
+
function fl_group_child
(G : in System.Address;
@@ -70,15 +68,31 @@ package body FLTK.Widgets.Groups is
return System.Address;
pragma Import (C, fl_group_child, "fl_group_child");
- function fl_group_get_clip_children
+ function fl_group_find
+ (G, W : in System.Address)
+ return Interfaces.C.int;
+ pragma Import (C, fl_group_find, "fl_group_find");
+
+ function fl_group_children
(G : in System.Address)
- return Interfaces.C.unsigned;
- pragma Import (C, fl_group_get_clip_children, "fl_group_get_clip_children");
+ return Interfaces.C.int;
+ pragma Import (C, fl_group_children, "fl_group_children");
+
+
+
+
+ -- function fl_group_get_clip_children
+ -- (G : in System.Address)
+ -- return Interfaces.C.unsigned;
+ -- pragma Import (C, fl_group_get_clip_children, "fl_group_get_clip_children");
+
+ -- procedure fl_group_set_clip_children
+ -- (G : in System.Address;
+ -- C : in Interfaces.C.unsigned);
+ -- pragma Import (C, fl_group_set_clip_children, "fl_group_set_clip_children");
+
+
- procedure fl_group_set_clip_children
- (G : in System.Address;
- C : in Interfaces.C.unsigned);
- pragma Import (C, fl_group_set_clip_children, "fl_group_set_clip_children");
function fl_group_get_resizable
(G : in System.Address)
@@ -89,6 +103,13 @@ package body FLTK.Widgets.Groups is
(G, W : in System.Address);
pragma Import (C, fl_group_set_resizable, "fl_group_set_resizable");
+ procedure fl_group_init_sizes
+ (G : in System.Address);
+ pragma Import (C, fl_group_init_sizes, "fl_group_init_sizes");
+
+
+
+
procedure fl_group_draw
(W : in System.Address);
pragma Import (C, fl_group_draw, "fl_group_draw");
@@ -150,6 +171,55 @@ package body FLTK.Widgets.Groups is
end Add;
+ procedure Insert
+ (This : in out Group;
+ Item : in out Widget'Class;
+ Place : in Index) is
+ begin
+ fl_group_insert
+ (This.Void_Ptr,
+ Item.Void_Ptr,
+ Interfaces.C.int (Place));
+ end Insert;
+
+
+ procedure Insert
+ (This : in out Group;
+ Item : in out Widget'Class;
+ Before : in Widget'Class) is
+ begin
+ fl_group_insert2
+ (This.Void_Ptr,
+ Item.Void_Ptr,
+ Before.Void_Ptr);
+ end Insert;
+
+
+ procedure Remove
+ (This : in out Group;
+ Item : in out Widget'Class) is
+ begin
+ fl_group_remove (This.Void_Ptr, Item.Void_Ptr);
+ end Remove;
+
+
+ procedure Remove
+ (This : in out Group;
+ Place : in Index) is
+ begin
+ fl_group_remove2 (This.Void_Ptr, Interfaces.C.int (Place - 1));
+ end Remove;
+
+
+ procedure Clear
+ (This : in out Group) is
+ begin
+ for I in reverse 1 .. This.Number_Of_Children loop
+ This.Remove (Index (I));
+ end loop;
+ end Clear;
+
+
function Child
@@ -167,6 +237,14 @@ package body FLTK.Widgets.Groups is
end Child;
+ function Find
+ (This : in Group;
+ Item : in out Widget'Class)
+ return Index is
+ begin
+ -- should set this up to throw an exception if not found
+ return Index (fl_group_find (This.Void_Ptr, Item.Void_Ptr));
+ end Find;
function Number_Of_Children
@@ -187,8 +265,6 @@ package body FLTK.Widgets.Groups is
-- end Get_Clip_Mode;
-
-
-- procedure Set_Clip_Mode
-- (This : in out Group;
-- Mode : in Clip_Mode) is
@@ -199,86 +275,6 @@ package body FLTK.Widgets.Groups is
- procedure Clear
- (This : in out Group) is
- begin
- for I in reverse 1 .. This.Number_Of_Children loop
- This.Remove (Index (I));
- end loop;
- end Clear;
-
-
-
-
- function Find
- (This : in Group;
- Item : in out Widget'Class)
- return Index is
- begin
- -- should set this up to throw an exception if not found
- return Index (fl_group_find (This.Void_Ptr, Item.Void_Ptr));
- end Find;
-
-
-
-
- procedure Reset_Initial_Sizes
- (This : in out Group) is
- begin
- fl_group_init_sizes (This.Void_Ptr);
- end Reset_Initial_Sizes;
-
-
-
-
- procedure Insert
- (This : in out Group;
- Item : in out Widget'Class;
- Place : in Index) is
- begin
- fl_group_insert
- (This.Void_Ptr,
- Item.Void_Ptr,
- Interfaces.C.int (Place));
- end Insert;
-
-
-
-
- procedure Insert
- (This : in out Group;
- Item : in out Widget'Class;
- Before : in Widget'Class) is
- begin
- fl_group_insert2
- (This.Void_Ptr,
- Item.Void_Ptr,
- Before.Void_Ptr);
- end Insert;
-
-
-
-
- procedure Remove
- (This : in out Group;
- Item : in out Widget'Class) is
- begin
- fl_group_remove (This.Void_Ptr, Item.Void_Ptr);
- end Remove;
-
-
-
-
- procedure Remove
- (This : in out Group;
- Place : in Index) is
- begin
- fl_group_remove2 (This.Void_Ptr, Interfaces.C.int (Place - 1));
- end Remove;
-
-
-
-
function Get_Resizable
(This : in Group)
return access Widget'Class
@@ -293,8 +289,6 @@ package body FLTK.Widgets.Groups is
end Get_Resizable;
-
-
procedure Set_Resizable
(This : in out Group;
Item : in Widget'Class) is
@@ -303,6 +297,13 @@ package body FLTK.Widgets.Groups is
end Set_Resizable;
+ procedure Reset_Initial_Sizes
+ (This : in out Group) is
+ begin
+ fl_group_init_sizes (This.Void_Ptr);
+ end Reset_Initial_Sizes;
+
+
procedure Draw
@@ -312,8 +313,6 @@ package body FLTK.Widgets.Groups is
end Draw;
-
-
function Handle
(This : in out Group;
Event : in Event_Kind)