aboutsummaryrefslogtreecommitdiff
path: root/src/windows-editor.ads
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-04-15 17:23:52 +1200
committerJedidiah Barber <contact@jedbarber.id.au>2025-04-15 17:23:52 +1200
commitce287c99ae15137138e2c5674f8f84a9c8bc1609 (patch)
tree0567cbd3dddc78f64a95d60eae1ce54d46da70a1 /src/windows-editor.ads
parent63c26c318a60efd20485978624352befd5f6c5ee (diff)
Constants marked constant, code style improvements, redundant with clauses removed
Diffstat (limited to 'src/windows-editor.ads')
-rw-r--r--src/windows-editor.ads39
1 files changed, 16 insertions, 23 deletions
diff --git a/src/windows-editor.ads b/src/windows-editor.ads
index a9d0041..c172679 100644
--- a/src/windows-editor.ads
+++ b/src/windows-editor.ads
@@ -18,12 +18,13 @@ package Windows.Editor is
type Editor_Window is new Window with private;
-
type Wrap_Mode is new FLTK.Widgets.Groups.Text_Displays.Wrap_Mode;
- Min_Editor_Height : Integer := 60;
- Min_Editor_Width : Integer := 300;
+ Min_Editor_Height : constant Integer := 60;
+ Min_Editor_Width : constant Integer := 300;
+
+
function Create
@@ -31,80 +32,72 @@ package Windows.Editor is
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_Reference;
-
procedure Set_Buffer
(This : in out Editor_Window;
Buff : in out FLTK.Text_Buffers.Text_Buffer);
-
function Get_Menu_Bar
(This : in out Editor_Window)
return FLTK.Widgets.Menus.Menu_Reference;
-
function Get_Rightclick_Menu
(This : in out Editor_Window)
return FLTK.Widgets.Menus.Menu_Reference;
+
+
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);
-
procedure Next_Word
(This : in out Editor_Window);
-
procedure Previous_Word
(This : in out Editor_Window);
-
procedure Set_Wrap_Mode
(This : in out Editor_Window;
Mode : in Wrap_Mode;
Margin : in Natural := 0);
-
procedure Set_Linenumber_Width
(This : in out Editor_Window;
Width : in Natural);
@@ -113,13 +106,13 @@ package Windows.Editor is
private
- type Editor_Window is new Window with
- record
- Bar : aliased FLTK.Widgets.Menus.Menu_Bars.Menu_Bar;
- Popup : aliased FLTK.Widgets.Menus.Menu_Buttons.Menu_Button;
- Editor : FLTK.Widgets.Groups.Text_Displays.Text_Editors.Text_Editor;
- end record;
+ type Editor_Window is new Window with record
+ Bar : aliased FLTK.Widgets.Menus.Menu_Bars.Menu_Bar;
+ Popup : aliased FLTK.Widgets.Menus.Menu_Buttons.Menu_Button;
+ Editor : FLTK.Widgets.Groups.Text_Displays.Text_Editors.Text_Editor;
+ end record;
end Windows.Editor;
+