22 #define awtc_assert(bed) arb_assert(bed)
24 #define AWAR_SUBMIT_PARSER "tmp/submission/parser"
25 #define AWAR_SUBMIT_PARSED "tmp/submission/parsed"
27 #define AWAR_SUBMIT_SOURCE "submission/source"
28 #define AWAR_SUBMIT_FILE "submission/file"
29 #define AWAR_SUBMIT_PRIVAT "submission/privat"
44 AW_window_simple *aws =
new AW_window_simple;
48 aws->init(root, window_id,
"START TEXT EDITOR");
53 aws->load_xfig(
"calltexe.fig");
54 aws->label_length(18);
55 aws->button_length(8);
59 aws->create_button(
"CLOSE",
"CLOSE",
"O");
62 aws->create_input_field(varname, 34);
66 aws->create_button(
"EDIT",
"EDIT",
"E");
109 strstruct.
cat(
":\n");
117 const char *srt_submit =
119 "$(SEQ_LEN)\\=*(|sequence|len(.-))\\:\n"
120 "$(SEQ_A)\\=*(|sequence|count(aA))\\:\n"
121 "$(SEQ_C)\\=*(|sequence|count(cC))\\:\n"
122 "$(SEQ_G)\\=*(|sequence|count(gG))\\:\n"
123 "$(SEQ_T)\\=*(|sequence|count(tT))\\:\n"
124 "$(SEQ_U)\\=*(|sequence|count(uU))\\:\n"
125 "$(SEQUENCE)\\=*(|sequence|remove(.-)|format_sequence(firsttab\\=12;tab\\=12;width\\=60;numleft;gap\\=10))\\:\n";
131 strstruct.
cat(seq_info);
139 strstruct.
cat(
"Species not found");
142 char *parser = strstruct.
release();
153 FILE *out = fopen(file_name,
"w");
156 fprintf(out,
"%s", data);
174 for (d = p = parser; *p; p++) {
176 if (p[1] ==
'\n') p++;
194 for (d = p = privat; *p; p++) {
196 if (p[1] ==
'\n') p++;
219 sprintf(buffer,
"%s.submit", name);
226 AW_window_simple *aws =
new AW_window_simple;
227 aws->init(root,
"SUBMISSION",
"SUBMISSION");
230 aws->label_length(18);
231 aws->button_length(8);
235 aws->create_button(
"CLOSE",
"CLOSE",
"O");
239 aws->create_button(
"HELP",
"HELP",
"H");
241 aws->button_length(15);
246 aws->at(
"parsed_info");
253 aws->label(
"Species Name:");
256 aws->at(
"submission");
261 if (!submits.empty()) {
262 aws->label(
"Select a Form");
264 for (
int i = 0; submits[i]; ++i) {
265 aws->insert_option(submits[i],
"", submits[i]);
267 aws->insert_default_option(
"default",
"d",
"default");
268 aws->update_option_menu();
273 aws->label(
"Gen File Name");
275 aws->create_button(
"GEN_FILE_NAME",
"CREATE NAME",
"C");
278 aws->label(
"or enter");
283 aws->create_button(
"READ_INFO",
"READ INFO",
"R");
287 aws->create_button(
"FILL_OUT_FORM",
"FILL THE FORM",
"F");
291 aws->create_button(
"SAVE",
"SAVE TO FILE",
"S");
293 aws->button_length(20);
296 aws->create_button(
"EDIT_FORM",
"EDIT FORM",
"R");
298 aws->at(
"editresult");
300 aws->create_button(
"EDIT_SAVED",
"EDIT SAVED",
"S");
302 aws->at(
"privatlabel");
303 aws->create_button(
NULp,
"Your private data");
static void ed_submit_info_event(AW_window *aww, GBDATA *gb_main)
static void ed_submit_parse_event(AW_window *aww)
#define AWAR_SUBMIT_PARSED
char * GB_read_key(GBDATA *gbd)
GBDATA * GB_child(GBDATA *father)
return string(buffer, length)
void AWTC_create_submission_variables(AW_root *root, AW_default db1)
char * GBS_string_eval_in_env(const char *insource, const char *icommand, const GBL_call_env &callEnv)
void load_xfig(const char *file, bool resize=true)
void AW_edit(const char *path)
AW_window * AWTC_create_submission_window(AW_root *root, GBDATA *gb_main)
static AW_window * create_calltexe_window(AW_root *root, const char *varname)
#define AWAR_SUBMIT_SOURCE
GB_ERROR GB_IO_error(const char *action, const char *filename)
char * ARB_strdup(const char *str)
char * GB_read_as_string(GBDATA *gbd)
char * GBS_string_eval(const char *insource, const char *icommand)
void AW_POPDOWN(AW_window *window)
char * GBS_string_2_key(const char *str)
void cat(const char *from)
char buffer[MESSAGE_BUFFERSIZE]
const char * read_char_pntr() const
GB_ERROR GB_await_error()
WindowCallback makeHelpCallback(const char *helpfile)
GB_TYPES GB_read_type(GBDATA *gbd)
static void ed_submit_gen_event(AW_window *aww)
static void ed_submit_info_event_rm(char *string)
#define AWAR_SPECIES_NAME
char * read_string() const
GB_CSTR GB_path_in_ARBLIB(const char *relative_path)
AW_awar * awar(const char *awar)
void GBS_read_dir(StrArray &names, const char *dir, const char *mask)
#define AWAR_SUBMIT_PARSER
#define AWAR_SUBMIT_PRIVAT
static void ed_calltexe_event(AW_window *aww, const char *varname)
void aw_message(const char *msg)
GBDATA * GBT_find_species(GBDATA *gb_main, const char *name)
GB_ERROR write_string(const char *aw_string)
GBDATA * GB_nextChild(GBDATA *child)
GB_transaction ta(gb_var)
AW_awar * awar_string(const char *var_name, const char *default_value="", AW_default default_file=AW_ROOT_DEFAULT)
static void ed_save_var_to_file(AW_window *aww, const char *data_var, const char *file_var)
char * GBS_global_string_copy(const char *templat,...)
char * GB_read_file(const char *path)