languages

A collection of programs made with different programming languages.
git clone git://evanalba.com/languages
Log | Files | Refs

todo_ui.h (1458B)


      1 /*
      2 * Name        : todo_ui.h
      3 * Author      : Evan Alba
      4 * Description : Header File for class TodoUI.
      5 */
      6 #ifndef TODO_UI
      7 #define TODO_UI
      8 #include "CinReader.h"
      9 #include "todo_item.h"
     10 #include "todo_list.h"
     11 #include <iostream>
     12 #include <string>
     13 #include <unistd.h>
     14 #include <term.h>
     15 class TodoUI {
     16  public:
     17   /* Create a new Todo List */
     18   TodoUI();
     19 
     20   /* Delete the dynamic TodoList and set the pointer to the List to NULL */
     21   ~TodoUI();
     22 
     23   /* Display the menu ui to the user and give them the options of:
     24      1. Exiting the program
     25      2. Create a new item
     26      3. Edit an Item
     27      4, Delete all items
     28      5. View a specific item
     29      6. View all items
     30   */
     31   void menu();
     32 
     33  private:
     34   /* Initialize CinReader */
     35   CinReader reader;
     36   TodoList* interface_;
     37 
     38   /* Create a new item by asking the user the
     39      description of the item todo, priority, and
     40      if the item on the list has been completed. */
     41   void NewItem();
     42 
     43   /* Ask the user what they want to edit a specific item's of the following: 
     44      Description, Priority, and if it was completed. 
     45      After that edit the part of the item they want to edit out. */
     46   void EditItem();
     47 
     48   /* Allows user to delete a specific item in the Todo List */
     49   void DeleteItem();
     50 
     51   /* Deletes all the items in the Todo List. */
     52   void DeleteItems();
     53 
     54   /* Prints out a specific item in the Todo List */
     55   void ViewItem();
     56 
     57   /* Prints out all the items in the Todo List */
     58   void ViewItems();
     59 };
     60 #endif
     61