| 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 | |
|---|
| 18 | struct GargChoice { |
|---|
| 19 | char *label; // name for display in dialog box |
|---|
| 20 | char *method; // value (if null, return choice number) |
|---|
| 21 | }; |
|---|
| 22 | |
|---|
| 23 | struct GmenuItemArg { |
|---|
| 24 | int optional; // is this optional? |
|---|
| 25 | int type; // TEXT, SLIDER, CHOOSER, etc. |
|---|
| 26 | int ivalue; |
|---|
| 27 | double min; // minimum range value |
|---|
| 28 | double max; // maximum range value |
|---|
| 29 | double fvalue; // default numeric value(or choice) |
|---|
| 30 | int numchoices; // number of choices |
|---|
| 31 | char *textvalue; // default text value |
|---|
| 32 | int textwidth; // text width used for input field |
|---|
| 33 | char *label; // description of arg function |
|---|
| 34 | char *symbol; // internal symbol table mapping |
|---|
| 35 | char *method; // commandline interpretation |
|---|
| 36 | GargChoice *choice; // choices |
|---|
| 37 | // ARB BEGIN |
|---|
| 38 | }; |
|---|
| 39 | |
|---|
| 40 | struct GfileFormat { |
|---|
| 41 | int save; // how should file be saved |
|---|
| 42 | int overwrite; // how should file be loaded |
|---|
| 43 | int format; // what format is each field |
|---|
| 44 | int maskable; // Can a write through mask be used? |
|---|
| 45 | int select; // what type of selection |
|---|
| 46 | char *symbol; // internal symbol table mapping |
|---|
| 47 | char *name; // file name |
|---|
| 48 | }; |
|---|
| 49 | |
|---|
| 50 | class AW_window; |
|---|
| 51 | |
|---|
| 52 | struct GmenuItem { |
|---|
| 53 | int numargs; // number of agruments to cmnd |
|---|
| 54 | int numoutputs; // number of outputs from cmnd |
|---|
| 55 | int numinputs; // number of input files to cmnd |
|---|
| 56 | char *label; // item name |
|---|
| 57 | char *method; // commandline produced |
|---|
| 58 | GfileFormat *input; // input definitions |
|---|
| 59 | GfileFormat *output; // output definitions |
|---|
| 60 | GmenuItemArg *arg; // argument definitions |
|---|
| 61 | char meta; // Meta character for function |
|---|
| 62 | char seqtype; // A -> amino, N -> nucleotide, '-' -> no sequence, otherwise both |
|---|
| 63 | char *help; // commandline help |
|---|
| 64 | // ARB BEGIN |
|---|
| 65 | struct Gmenu *parent_menu; |
|---|
| 66 | AW_window *aws; // opened window |
|---|
| 67 | }; |
|---|
| 68 | |
|---|
| 69 | struct Gmenu { |
|---|
| 70 | int numitems; // number of items in menu |
|---|
| 71 | char *label; // menu heading |
|---|
| 72 | GmenuItem *item; // menu items |
|---|
| 73 | // ARB BEGIN |
|---|
| 74 | char meta; // Meta character for menu |
|---|
| 75 | }; |
|---|
| 76 | |
|---|
| 77 | typedef unsigned char uchar; |
|---|
| 78 | |
|---|
| 79 | extern struct gde_database_access { |
|---|
| 80 | GDE_get_sequences_cb get_sequences; |
|---|
| 81 | gde_window_type window_type; |
|---|
| 82 | AW_CL client_data; |
|---|
| 83 | GBDATA *gb_main; |
|---|
| 84 | } db_access; |
|---|
| 85 | |
|---|
| 86 | |
|---|
| 87 | #else |
|---|
| 88 | #error GDE_menu.h included twice |
|---|
| 89 | #endif // GDE_MENU_H |
|---|