summaryrefslogtreecommitdiff
path: root/src/windows-editor.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/windows-editor.adb')
-rw-r--r--src/windows-editor.adb23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/windows-editor.adb b/src/windows-editor.adb
index d995f7a..ca4bacf 100644
--- a/src/windows-editor.adb
+++ b/src/windows-editor.adb
@@ -4,6 +4,7 @@ with FLTK.Enums; use FLTK.Enums;
with FLTK.Widgets.Groups.Windows.Double;
with FLTK.Widgets.Groups.Text_Displays.Text_Editors;
with FLTK.Widgets.Menus.Menu_Bars;
+with FLTK.Widgets.Menus.Menu_Buttons;
with FLTK.Text_Buffers;
@@ -14,6 +15,7 @@ package body Windows.Editor is
package TD renames FLTK.Widgets.Groups.Text_Displays;
package TE renames FLTK.Widgets.Groups.Text_Displays.Text_Editors;
package MB renames FLTK.Widgets.Menus.Menu_Bars;
+ package MU renames FLTK.Widgets.Menus.Menu_Buttons;
@@ -41,13 +43,18 @@ package body Windows.Editor is
Editor => TE.Text_Editor'(TE.Create
(0, Menu_Height, Width, Height - Menu_Height, "")),
Bar => MB.Menu_Bar'(MB.Create
- (0, 0, Width, Menu_Height, ""))) do
+ (0, 0, Width, Menu_Height, "")),
+ Popup => MU.Menu_Button'(MU.Create
+ (0, 0, Width, Height, ""))) do
This.Add (This.Editor);
This.Add (This.Bar);
This.Bar.Set_Box (No_Box);
+ This.Editor.Add (This.Popup);
+ This.Popup.Set_Popup_Kind (MU.Popup3);
This.Editor.Set_Text_Font (Courier);
This.Set_Resizable (This.Editor);
+ This.Editor.Set_Resizable (This.Popup);
This.Set_Size_Range (Min_Editor_Width, Min_Editor_Height);
This.Set_Icon (Logo);
end return;
@@ -86,12 +93,22 @@ package body Windows.Editor is
- function Get_Menu
+ function Get_Menu_Bar
(This : in out Editor_Window)
return FLTK.Widgets.Menus.Menu_Cursor is
begin
return Ref : FLTK.Widgets.Menus.Menu_Cursor (This.Bar'Access);
- end Get_Menu;
+ end Get_Menu_Bar;
+
+
+
+
+ function Get_Rightclick_Menu
+ (This : in out Editor_Window)
+ return FLTK.Widgets.Menus.Menu_Cursor is
+ begin
+ return Ref : FLTK.Widgets.Menus.Menu_Cursor (This.Popup'Access);
+ end Get_Rightclick_Menu;