diff options
author | Jed Barber <jjbarber@y7mail.com> | 2016-11-09 11:32:47 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2016-11-09 11:36:51 +1100 |
commit | 1f35137574691335d63e86bf5d2b2366fc91c1ba (patch) | |
tree | 9ef15ab20157b5c10c92819d6a1694287219e1e1 /src/windows-editor.ads | |
parent | 87063e50bfb3dd69d0806897d5b0d97b7d48f92a (diff) |
Moved code for each window into its own package
Diffstat (limited to 'src/windows-editor.ads')
-rw-r--r-- | src/windows-editor.ads | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/src/windows-editor.ads b/src/windows-editor.ads new file mode 100644 index 0000000..a1afdad --- /dev/null +++ b/src/windows-editor.ads @@ -0,0 +1,91 @@ + + +with FLTK.Widgets.Groups.Windows.Double; +with FLTK.Widgets.Menus; +with FLTK.Text_Buffers; +private with FLTK.Widgets.Groups.Text_Displays.Text_Editors; +private with FLTK.Widgets.Menus.Menu_Bars; + + +package Windows.Editor is + + + type Editor_Window is new FLTK.Widgets.Groups.Windows.Double.Double_Window with private; + + + Min_Editor_Height : Integer := 60; + Min_Editor_Width : Integer := 300; + + + function Create + (X, Y, W, H : in Integer; + Label_Text : in String) + return Editor_Window; + + + function Create + (W, H : in Integer) + return Editor_Window; + + + function Get_Buffer + (This : in Editor_Window) + return FLTK.Text_Buffers.Text_Buffer_Cursor; + + + procedure Set_Buffer + (This : in out Editor_Window; + Buff : in out FLTK.Text_Buffers.Text_Buffer); + + + function Get_Menu + (This : in out Editor_Window) + return FLTK.Widgets.Menus.Menu_Cursor; + + + procedure Undo + (This : in out Editor_Window); + + + procedure Cut + (This : in out Editor_Window); + + + procedure Copy + (This : in out Editor_Window); + + + procedure Paste + (This : in out Editor_Window); + + + procedure Delete + (This : in out Editor_Window); + + + function Get_Insert_Position + (This : in Editor_Window) + return Natural; + + + procedure Set_Insert_Position + (This : in out Editor_Window; + Pos : in Natural); + + + procedure Show_Insert_Position + (This : in out Editor_Window); + + +private + + + type Editor_Window is new FLTK.Widgets.Groups.Windows.Double.Double_Window with + record + Bar : aliased FLTK.Widgets.Menus.Menu_Bars.Menu_Bar; + Editor : FLTK.Widgets.Groups.Text_Displays.Text_Editors.Text_Editor; + end record; + + +end Windows.Editor; + |