Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NCURSES using C++ implement a basic text editor, texted.cpp, in C++ using system calls for low-level file I/O and the ncurses library for the Text

NCURSES using C++

implement a basic text editor, texted.cpp, in C++ using system calls for low-level file I/O and the ncurses library for the Text User Interface (TUI) using NCURSES.

In addition to the editable text area, the main editor window needs to include text for the menu, the title, and the name of the file currently open in the editor.

F1 Menu: If the user presses the F1 key (or fn-F1 on a Mac), then your editor needs to create a window somewhere in the terminal screen that allows the user to select from the following options:

Open: This option should prompt the user to enter in a filename. After the user presses return/enter, your editor should attempt to open the file for editing. If an unsaved file is open in the editor when the user chooses this option, then your editor needs to ask the user whether or not they want to save their changes before opening the other file.

Save: This option should attempt to save the file currently open in the editor. The mode of the file should not be changed by your editor.

Save As: This option should prompt the user to enter in a new filename and attempt to save the file currently open in the editor to that new filename. If the file already exists, then your editor should ask the user if they want to overwrite the existing file.

Exit: This option should exit your editor. If an unsaved file is open in the editor when the user chooses this option, then your editor needs to ask the user whether or not they want to save their changes before exiting.

Display Errors: If a system call issues an error, then your editor needs to create a window in the center of the terminal screen that displays that error. Whenever it makes sense to do so, your editor should prompt the user in an attempt to fix the problem. For example, if the open system call issues an error about a file not existing, then you might prompt the user to re-enter the filename.

image text in transcribed

My Menu Open Save Save As Exit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

DESCRIBE the five-step training process.

Answered: 1 week ago

Question

1. PricewaterhouseCoopers

Answered: 1 week ago

Question

3. SCC Soft Computer

Answered: 1 week ago