allback (changed_cb, w); :: delete_widget (w); _windows -; (! num_windows) exit (0);
} quit_cb (Fl_Widget *, void *) {(changed &&! check_save ()); (0);
} replace_cb (Fl_Widget *, void * v) {* e = (EditorWindow *) v;> replace_dlg-> show ();
} replace2_cb (Fl_Widget *, void * v) {* e = (EditorWindow *) v; char * find = e-> replace_find-> value (); char * replace = e- > replace_with-> value (); (find [0] == ' 0') {
// Search string is blank; get a new one.> replace_dlg-> show ();;
}> replace_dlg-> hide (); pos = e-> editor-> insert_position (); found = textbuf-> search_forward (pos, find, & pos); (found) {
// Found a match; update the position and replace text.> select (pos, pos + strlen (find));> remove_selection ();> insert (pos, replace); > select (pos, pos + strlen (replace));> editor-> insert_position (pos + strlen (replace));> editor-> show_insert_position ();
} fl_alert ("No occurrences of '% s ' found!", find);
} replall_cb (Fl_Widget *, void * v) {* e = (EditorWindow *) v; char * find = e-> replace_find-> value (); char * replace = e- > replace_with-> value (); = e-> replace_find-> value (); (find [0] == ' 0') {
// Search string is blank; get a new one.> replace_dlg-> show ();;
}> replace_dlg-> hide ();> editor-> insert_position (0); times = 0;
// Loop through the whole string (int found = 1; found ;) {pos = e-> editor-> insert_position (); = textbuf-> search_forward (pos, find, & pos); (found) {
// Found a match; update the position and replace text.> select (pos, pos + strlen (find));> remove_selection ();> insert (pos, replace); > editor-> insert_position (pos + strlen (replace));> editor-> show_insert_position (); + +;
}
} (times) fl_message ("Replaced% d occurrences.", times); fl_alert ("No occurrences of '% s ' found!", find); p>
} replcan_cb (Fl_Widget *, void * v) {* e = (EditorWindow *) v;> replace_dlg-> hide ();
} save_cb () {(filename [0] == ' 0') {
// No filename - get one! _cb ();;
} save_file (filename);
} saveas_cb () {_Native_File_Chooser fnfc;. title ("Save File As?");. type (Fl_Native_File_Chooser :: BROWSE_SAVE_FILE); (fnfc. show ()) return; _file (fnfc. filename ());
} _Window * new_view (); view_cb (Fl_Widget *, void *) {_Window * w = new_view ();> show ();
} _Menu_Item menuitems [] = {
{"& File", 0, 0, 0, FL_SUBMENU},
{"& New File", 0, (Fl_Callback *) new_cb},
{"& Open File.", FL_COMMAND + 'o', (Fl...