diff options
Diffstat (limited to 'body/fltk-widgets-valuators-counters.adb')
-rw-r--r-- | body/fltk-widgets-valuators-counters.adb | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/body/fltk-widgets-valuators-counters.adb b/body/fltk-widgets-valuators-counters.adb index e04e180..f05df69 100644 --- a/body/fltk-widgets-valuators-counters.adb +++ b/body/fltk-widgets-valuators-counters.adb @@ -6,8 +6,7 @@ with - FLTK.Widgets.Groups, - Interfaces.C.Strings; + FLTK.Widgets.Groups; package body FLTK.Widgets.Valuators.Counters is @@ -17,6 +16,8 @@ package body FLTK.Widgets.Valuators.Counters is -- Functions From C -- ------------------------ + -- Allocation -- + function new_fl_counter (X, Y, W, H : in Interfaces.C.int; Text : in Interfaces.C.char_array) @@ -32,6 +33,8 @@ package body FLTK.Widgets.Valuators.Counters is + -- Button Steps -- + function fl_counter_get_step (C : in Storage.Integer_Address) return Interfaces.C.double; @@ -59,6 +62,8 @@ package body FLTK.Widgets.Valuators.Counters is + -- Text Settings -- + function fl_counter_get_textcolor (C : in Storage.Integer_Address) return Interfaces.C.unsigned; @@ -98,6 +103,8 @@ package body FLTK.Widgets.Valuators.Counters is + -- Drawing, Events -- + procedure fl_counter_draw (W : in Storage.Integer_Address); pragma Import (C, fl_counter_draw, "fl_counter_draw"); @@ -167,11 +174,11 @@ package body FLTK.Widgets.Valuators.Counters is begin return This : Counter do This.Void_Ptr := new_fl_counter - (Interfaces.C.int (X), - Interfaces.C.int (Y), - Interfaces.C.int (W), - Interfaces.C.int (H), - Interfaces.C.To_C (Text)); + (Interfaces.C.int (X), + Interfaces.C.int (Y), + Interfaces.C.int (W), + Interfaces.C.int (H), + Interfaces.C.To_C (Text)); Extra_Init (This, X, Y, W, H, Text); end return; end Create; @@ -197,6 +204,8 @@ package body FLTK.Widgets.Valuators.Counters is -- API Subprograms -- ----------------------- + -- Button Steps -- + function Get_Step (This : in Counter) return Long_Float is @@ -243,6 +252,8 @@ package body FLTK.Widgets.Valuators.Counters is + -- Text Settings -- + function Get_Text_Color (This : in Counter) return Color is @@ -293,6 +304,8 @@ package body FLTK.Widgets.Valuators.Counters is + -- Drawing, Events -- + procedure Draw (This : in out Counter) is begin @@ -311,11 +324,13 @@ package body FLTK.Widgets.Valuators.Counters is + -- Counter Type -- + function Get_Kind (This : in out Counter) return Counter_Kind is - Result : Interfaces.C.unsigned_char := fl_widget_get_type (This.Void_Ptr); + Result : constant Interfaces.C.unsigned_char := fl_widget_get_type (This.Void_Ptr); begin return Counter_Kind'Val (Result); exception |