| 1 | // =============================================================== // |
|---|
| 2 | // // |
|---|
| 3 | // File : GDE_menu.h // |
|---|
| 4 | // Purpose : // |
|---|
| 5 | // // |
|---|
| 6 | // =============================================================== // |
|---|
| 7 | |
|---|
| 8 | #ifndef GDE_MENU_H |
|---|
| 9 | #define GDE_MENU_H |
|---|
| 10 | |
|---|
| 11 | #ifndef GDE_HXX |
|---|
| 12 | #include "gde.hxx" |
|---|
| 13 | #endif |
|---|
| 14 | #ifndef GDE_DEF_H |
|---|
| 15 | #include "GDE_def.h" |
|---|
| 16 | #endif |
|---|
| 17 | #ifndef CB_H |
|---|
| 18 | #include <cb.h> |
|---|
| 19 | #endif |
|---|
| 20 | |
|---|
| 21 | struct GargChoice { |
|---|
| 22 | char *label; // name for display in dialog box |
|---|
| 23 | char *method; // value (if null, return choice number) |
|---|
| 24 | }; |
|---|
| 25 | |
|---|
| 26 | struct GmenuItemArg { |
|---|
| 27 | int type; // TEXT, SLIDER, CHOOSER, etc. |
|---|
| 28 | int ivalue; |
|---|
| 29 | double min; // minimum range value |
|---|
| 30 | double max; // maximum range value |
|---|
| 31 | double fvalue; // default numeric value(or choice) |
|---|
| 32 | int numchoices; // number of choices |
|---|
| 33 | char *textvalue; // default text value |
|---|
| 34 | int textwidth; // text width used for input field |
|---|
| 35 | char *label; // description of arg function |
|---|
| 36 | char *symbol; // internal symbol table mapping |
|---|
| 37 | GargChoice *choice; // choices |
|---|
| 38 | // ARB BEGIN |
|---|
| 39 | AW_active active_mask; // expert/novice |
|---|
| 40 | }; |
|---|
| 41 | |
|---|
| 42 | enum TypeInfo { |
|---|
| 43 | BASIC_TYPEINFO = 0, // has to be zero (default value; initialized with calloc) |
|---|
| 44 | DETAILED_TYPEINFO = 1, |
|---|
| 45 | UNKNOWN_TYPEINFO = 2, |
|---|
| 46 | }; |
|---|
| 47 | |
|---|
| 48 | struct GfileFormat { |
|---|
| 49 | bool save; // whether file should be saved |
|---|
| 50 | int format; // what format is each field |
|---|
| 51 | char *symbol; // internal symbol table mapping |
|---|
| 52 | char *name; // file name |
|---|
| 53 | TypeInfo typeinfo; |
|---|
| 54 | }; |
|---|
| 55 | |
|---|
| 56 | struct GmenuItem { |
|---|
| 57 | int numargs; // number of arguments to cmnd |
|---|
| 58 | int numoutputs; // number of outputs from cmnd |
|---|
| 59 | int numinputs; // number of input files to cmnd |
|---|
| 60 | char *label; // item name |
|---|
| 61 | char *method; // commandline produced |
|---|
| 62 | GfileFormat *input; // input definitions |
|---|
| 63 | GfileFormat *output; // output definitions |
|---|
| 64 | GmenuItemArg *arg; // argument definitions |
|---|
| 65 | char meta; // Meta character for function |
|---|
| 66 | char seqtype; // A -> amino, N -> nucleotide, '-' -> no sequence, otherwise both |
|---|
| 67 | bool aligned; |
|---|
| 68 | char *help; // associated helpfile ("agde_*.hlp") |
|---|
| 69 | |
|---|
| 70 | // ARB BEGIN |
|---|
| 71 | struct Gmenu *parent_menu; |
|---|
| 72 | AW_window *aws; // opened window |
|---|
| 73 | AW_active active_mask; // expert/novice |
|---|
| 74 | WindowCallback *popup; // callback to create/reopen window |
|---|
| 75 | }; |
|---|
| 76 | |
|---|
| 77 | struct Gmenu { |
|---|
| 78 | int numitems; // number of items in menu |
|---|
| 79 | char *label; // menu heading |
|---|
| 80 | GmenuItem *item; // menu items |
|---|
| 81 | // ARB BEGIN |
|---|
| 82 | char meta; // Meta character for menu |
|---|
| 83 | AW_active active_mask; // expert/novice |
|---|
| 84 | }; |
|---|
| 85 | |
|---|
| 86 | extern struct gde_database_access { |
|---|
| 87 | GDE_get_sequences_cb get_sequences; |
|---|
| 88 | GDE_format_alignment_cb format_ali; |
|---|
| 89 | gde_window_type window_type; |
|---|
| 90 | GBDATA *gb_main; |
|---|
| 91 | } db_access; |
|---|
| 92 | |
|---|
| 93 | |
|---|
| 94 | #else |
|---|
| 95 | #error GDE_menu.h included twice |
|---|
| 96 | #endif // GDE_MENU_H |
|---|