summaryrefslogtreecommitdiff
path: root/fltk-widgets.adb
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2016-07-18 15:58:30 +1000
committerJed Barber <jjbarber@y7mail.com>2016-07-18 15:58:30 +1000
commit6aa9475d598065081866913bb86a049a6d2d0c1a (patch)
treefd2074432185ed1d9f9dd8b3e9ae8e2344cbe7c5 /fltk-widgets.adb
parentf419b275ee91792e08f211a588d891c4aa6bedac (diff)
Decided on widget init problem, started on rudimentary editor appearance
Diffstat (limited to 'fltk-widgets.adb')
-rw-r--r--fltk-widgets.adb31
1 files changed, 31 insertions, 0 deletions
diff --git a/fltk-widgets.adb b/fltk-widgets.adb
index 39ffb66..cffd3f7 100644
--- a/fltk-widgets.adb
+++ b/fltk-widgets.adb
@@ -1,6 +1,7 @@
with Interfaces.C;
+with Interfaces.C.Strings;
with System;
with FLTK.Widgets.Groups;
@@ -18,6 +19,16 @@ package body FLTK.Widgets is
B : in Interfaces.C.int);
pragma Import (C, fl_widget_set_box, "fl_widget_set_box");
+ function fl_widget_get_label
+ (W : in System.Address)
+ return Interfaces.C.Strings.chars_ptr;
+ pragma Import (C, fl_widget_get_label, "fl_widget_get_label");
+
+ procedure fl_widget_set_label
+ (W : in System.Address;
+ T : in Interfaces.C.char_array);
+ pragma Import (C, fl_widget_set_label, "fl_widget_set_label");
+
function fl_widget_get_label_font
(W : in System.Address)
return Interfaces.C.int;
@@ -92,6 +103,26 @@ package body FLTK.Widgets is
+ function Get_Label
+ (This : in out Widget)
+ return String is
+ begin
+ return Interfaces.C.Strings.Value (fl_widget_get_label (This.Void_Ptr));
+ end Get_Label;
+
+
+
+
+ procedure Set_Label
+ (This : in out Widget;
+ Text : in String) is
+ begin
+ fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text));
+ end Set_Label;
+
+
+
+
function Get_Label_Font
(This : in Widget)
return Font_Kind is