Variables

Our text editor will need some global variables to keep track of things:

Fl_Window          *window;
Fl_Menu_Bar        *menubar;
Fl_Multiline_Input *input;
Fl_Window          *replace_dlg;
Fl_Input           *replace_find;
Fl_Input           *replace_with;
Fl_Button          *replace_all;
Fl_Return_Button   *replace_next;
Fl_Button          *replace_cancel;

int                changed = 0;
char               filename[1024] = "";
char               search[256] = "";
      

The window variable is our top-level window described previously. We'll cover the other variables as we build the application.