display/submen.h

Go to the documentation of this file.
00001 
00019 #ifndef SUBMEN_H
00020 #define SUBMEN_H
00021 
00026 class VAR_SUB_MENU:public LEAF_MENU_NODE
00027 {
00028   private:
00029     MENU_ROOT * root;            //Sub window menu
00030     COMMAND_WINDOW *sub_window;  //Sub window window
00031 
00032     void event(                          //User clicked...
00033                COMMAND_WINDOW *cmd_win,  //For UI, update etc
00034                FCOORD pt,                //here
00035                INT32 *cmd_event_id,      //Command selected
00036                char *new_value);         //Edited value
00037 
00038     void write_vars(                       //save config vars
00039                     FILE *fp,              //in this file
00040                     BOOL8 changes_only) {  //Changed vars only?
00041       fprintf (fp, "\n");
00042                                  //propogate to submenu
00043       root->write_vars (fp, changes_only);
00044     }
00045 
00046   public:
00047     VAR_SUB_MENU (               //constructor
00048                                  //variable to edit
00049       const char *menu_text, MENU_ROOT * sub_menu
00050     ):LEAF_MENU_NODE (menu_text) {
00051       root = sub_menu;
00052       sub_window = NULL;
00053     }
00054 
00055     void child_closed() { 
00056       sub_window = NULL;
00057     }
00058 };
00059 #endif

Generated on Wed Feb 28 19:49:11 2007 for Tesseract by  doxygen 1.5.1