summaryrefslogtreecommitdiff
path: root/src/adapad.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/adapad.adb')
-rw-r--r--src/adapad.adb23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/adapad.adb b/src/adapad.adb
index abb63cb..c24bb6e 100644
--- a/src/adapad.adb
+++ b/src/adapad.adb
@@ -80,8 +80,7 @@ package body Adapad is
begin
if not Safe_To_Discard then return; end if;
Filename := To_Unbounded_String (0);
- Buffer.Set_Selection (0, Buffer.Length);
- Buffer.Remove_Selected_Text;
+ Buffer.Remove_Text (0, Buffer.Length);
Changed := False;
Buffer.Call_Modify_Callbacks;
end New_CB;
@@ -138,7 +137,7 @@ package body Adapad is
(Item : in out FLTK.Widgets.Widget'Class)
is
use type FLTK.Text_Buffers.Modification;
- Bar : FLTK.Widgets.Menus.Menu_Cursor := Editor.Get_Menu_Bar;
+ Bar : FLTK.Widgets.Menus.Menu_Reference := Editor.Get_Menu_Bar;
Ch : Change_Vectors.Change;
begin
Buffer.Disable_Callbacks;
@@ -171,7 +170,7 @@ package body Adapad is
(Item : in out FLTK.Widgets.Widget'Class)
is
use type FLTK.Text_Buffers.Modification;
- Bar : FLTK.Widgets.Menus.Menu_Cursor := Editor.Get_Menu_Bar;
+ Bar : FLTK.Widgets.Menus.Menu_Reference := Editor.Get_Menu_Bar;
Ch : Change_Vectors.Change;
begin
Buffer.Disable_Callbacks;
@@ -320,7 +319,7 @@ package body Adapad is
procedure Wrap_CB
(Item : in out FLTK.Widgets.Widget'Class) is
begin
- if FLTK.Widgets.Menus.Menu (Item).Chosen.Value then
+ if FLTK.Widgets.Menus.Menu (Item).Chosen.Get_State then
Editor.Set_Wrap_Mode (Windows.Editor.Bounds);
else
Editor.Set_Wrap_Mode (Windows.Editor.None);
@@ -333,7 +332,7 @@ package body Adapad is
procedure Lines_CB
(Item : in out FLTK.Widgets.Widget'Class) is
begin
- if FLTK.Widgets.Menus.Menu (Item).Chosen.Value then
+ if FLTK.Widgets.Menus.Menu (Item).Chosen.Get_State then
-- 50 pixels should be enough for 5 digit line numbers.
Editor.Set_Linenumber_Width (50);
else
@@ -363,8 +362,8 @@ package body Adapad is
Deleted_Text : in String)
is
use type FLTK.Text_Buffers.Modification;
- Bar : FLTK.Widgets.Menus.Menu_Cursor := Editor.Get_Menu_Bar;
- Pop : FLTK.Widgets.Menus.Menu_Cursor := Editor.Get_Rightclick_Menu;
+ Bar : FLTK.Widgets.Menus.Menu_Reference := Editor.Get_Menu_Bar;
+ Pop : FLTK.Widgets.Menus.Menu_Reference := Editor.Get_Rightclick_Menu;
begin
if Action = FLTK.Text_Buffers.Insert or Action = FLTK.Text_Buffers.Delete then
Changed := True;
@@ -417,7 +416,7 @@ package body Adapad is
Facing : in Windows.Find.Direction)
is
use type Windows.Find.Direction;
- Bar : FLTK.Widgets.Menus.Menu_Cursor := Editor.Get_Menu_Bar;
+ Bar : FLTK.Widgets.Menus.Menu_Reference := Editor.Get_Menu_Bar;
Current_Position, Select_Start, Select_End, Found_At : Natural;
Was_Found : Boolean;
begin
@@ -485,7 +484,7 @@ package body Adapad is
end if;
exit when User_Response = FLTK.Dialogs.Third;
if User_Response = FLTK.Dialogs.Second then
- Buffer.Remove_Selected_Text;
+ Buffer.Remove_Selection;
Buffer.Insert_Text (Found_At, Replace_With);
Current_Position := Found_At + Replace_With'Length;
Times_Replaced := Times_Replaced + 1;
@@ -636,7 +635,7 @@ begin
declare
use FLTK;
use FLTK.Widgets.Menus;
- Bar : Menu_Cursor := Editor.Get_Menu_Bar;
+ Bar : Menu_Reference := Editor.Get_Menu_Bar;
begin
Bar.Add (Text => "&File", Flags => Flag_Submenu);
Bar.Add ("File/&New", New_CB'Access, Mod_Ctrl + 'n');
@@ -674,7 +673,7 @@ begin
declare
use FLTK;
use FLTK.Widgets.Menus;
- Pop : Menu_Cursor := Editor.Get_Rightclick_Menu;
+ Pop : Menu_Reference := Editor.Get_Rightclick_Menu;
begin
Pop.Add ("Cu&t", Cut_CB'Access, No_Key, Flag_Inactive);
Pop.Add ("&Copy", Copy_CB'Access, No_Key, Flag_Inactive);