Chapter 10. Designing a Simple Text Editor

Table of Contents
Determining the Goals of the Text Editor
Designing the Main Window
Variables
Menubars and Menus
Editing the Text
The Replace Dialog
Callbacks
Other Functions
Compiling the Editor
The Final Product

This chapter takes you through the design of a simple FLTK-based text editor.

Determining the Goals of the Text Editor

Since this will be the first big project you'll be doing with FLTK, lets define what we want our text editor to do:

  1. Menubar/menus for all functions.

  2. Edit a single text file.

  3. Load from a file.

  4. Save to a file.

  5. Cut/copy/delete/paste functions.

  6. Search and replace functions.

  7. Keep track of when the file has been changed.