summaryrefslogtreecommitdiff
path: root/src/editors.adb
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2016-09-15 03:41:54 +1000
committerJed Barber <jjbarber@y7mail.com>2016-09-15 03:41:54 +1000
commitbfcc3811a3ce55cafa6f7809d0d92c87238ea032 (patch)
tree6727c02fc76f00580ce7a238ea9cb5f2656e7918 /src/editors.adb
parent6c61d634be9aa3cd30c1bf0254eee5d36a37eeb5 (diff)
Menu callbacks working, also some quick testing code that'll probably get deleted later because wynaut
Diffstat (limited to 'src/editors.adb')
-rw-r--r--src/editors.adb20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/editors.adb b/src/editors.adb
index 3cdfa5f..9400016 100644
--- a/src/editors.adb
+++ b/src/editors.adb
@@ -10,8 +10,10 @@ package body Editors is
begin
return This : Editor_Window :=
(Double_Window'(Create (X, Y, W, H, Label_Text)) with
- The_Editor => Text_Editor'(Create (0, 30, 640, 370, ""))) do
- This.Add (This.The_Editor);
+ Editor => Text_Editor'(Create (0, 30, 640, 370, "")),
+ Bar => Menu_Bar'(Create (0, 0, 640, 30, ""))) do
+ This.Add (This.Editor);
+ This.Add (This.Bar);
end return;
end Create;
@@ -32,7 +34,7 @@ package body Editors is
(This : in Editor_Window)
return Text_Buffer_Cursor is
begin
- return This.The_Editor.Get_Buffer;
+ return This.Editor.Get_Buffer;
end Get_Buffer;
@@ -42,9 +44,19 @@ package body Editors is
(This : in out Editor_Window;
Buff : in out Text_Buffer) is
begin
- This.The_Editor.Set_Buffer (Buff);
+ This.Editor.Set_Buffer (Buff);
end Set_Buffer;
+
+
+ function Get_Menu
+ (This : in out Editor_Window)
+ return Menu_Cursor is
+ begin
+ return Ref : Menu_Cursor (This.Bar'Access);
+ end Get_Menu;
+
+
end Editors;