25 #define gen_assert(bed) arb_assert(bed)
31 #define GEN_NDS_COUNT 10
32 #define GEN_NDS_STRING_SIZE 4000
48 const char *sf =
"flag1";
49 const char *sl =
"len1";
61 gen_nds_ms->
rek[count] = 1;
64 gen_nds_ms->
rek[count] = 0;
68 freenull(gen_nds_ms->
parsing[count]);
75 gen_nds_ms->
count = count;
81 char *bp = gen_nds_ms->
buf;
85 for (
long i = 0; i < gen_nds_ms->
count; i++) {
87 if (gen_nds_ms->
rek[i]) {
94 if (!mode && !gbe)
continue;
105 sprintf(buf,
"%%%lii", gen_nds_ms->
lengths[i]);
116 sprintf(buf,
"%%%lii", gen_nds_ms->
lengths[i]);
126 const char *p =
NULp;
145 long dlen = gen_nds_ms->
lengths[i];
153 if (j > dlen) j = dlen;
154 for (; j; j--) *bp++ = *p++;
156 long post = dlen - len;
157 while (post-- > 0) *(bp++) =
' ';
172 long j = gen_nds_ms->
lengths[i];
176 for (; j > 0; j--) *(bp++) =
' ';
191 char *keystart = buf+sprintf(buf,
"tmp/gene_viewkey_%i/", i);
198 gb_viewkey =
GB_entry(gb_arb_presets,
"gene_viewkey");
210 const char *default_key =
NULp;
212 case 1: default_key =
"pos_start";
break;
213 case 2: default_key =
"pos_stop";
break;
214 case 3: default_key =
"product";
break;
215 default: default_key =
"name";
break;
220 strcpy(keystart,
"key_text");
222 aw_root->
awar(buf)->
map(gb_key_text);
230 strcpy(keystart,
"pars");
232 aw_root->
awar(buf)->
map(gb_pars);
240 strcpy(keystart,
"flag1");
242 aw_root->
awar(buf)->
map(gb_flag1);
250 strcpy(keystart,
"len1");
253 aw_root->
awar(buf)->
map(gb_len1);
261 while (!error && (gb_next =
GB_nextEntry(gb_viewkey))) {
266 aw_root->
awar_string(
"tmp/gene_viewkey/key_text",
"", awdef);
273 static AW_window_simple *aws =
NULp;
275 aws =
new AW_window_simple;
277 aws->init(aw_root,
"GENE_NDS_PROPS",
"Gene NDS");
278 aws->load_xfig(
"awt/nds.fig");
279 aws->auto_space(10, 5);
283 aws->create_button(
"CLOSE",
"CLOSE",
"C");
287 aws->create_button(
"HELP",
"HELP",
"H");
289 aws->button_length(13);
292 aws->get_at_position(&dummy, &closey);
294 aws->create_button(
NULp,
"K");
298 int showx, fieldx, columnx, srtx, srtux;
300 aws->auto_space(10, 0);
305 sprintf(buf,
"tmp/gene_viewkey_%i/flag1", i);
306 aws->get_at_position(&showx, &dummy);
307 aws->create_toggle(buf);
309 sprintf(buf,
"tmp/gene_viewkey_%i/key_text", i);
310 aws->get_at_position(&fieldx, &dummy);
313 sprintf(buf,
"tmp/gene_viewkey_%i/len1", i);
314 aws->get_at_position(&columnx, &dummy);
315 aws->create_input_field(buf, 4);
317 sprintf(buf,
"tmp/gene_viewkey_%i/pars", i);
318 const char *inputFieldAwarName =
ARB_strdup(buf);
320 aws->get_at_position(&srtx, &dummy);
322 aws->button_length(0);
325 sprintf(buf,
"SELECT_SRTACI_%i", i);
326 aws->create_button(buf,
"S",
"S");
328 aws->get_at_position(&srtux, &dummy);
329 aws->create_input_field(inputFieldAwarName, 50);
332 aws->at(showx, closey);
335 aws->create_button(
NULp,
"SHOW");
338 aws->create_button(
NULp,
"FIELD");
341 aws->create_button(
NULp,
"WIDTH");
344 aws->create_button(
NULp,
"SRT");
347 aws->create_button(
NULp,
"ACI/SRT PROGRAM");
char * GEN_make_node_text_nds(GBDATA *gbd, int mode)
ItemSelector & GEN_get_selector()
void GEN_create_nds_vars(AW_root *aw_root, AW_default awdef, GBDATA *gb_main, const DatabaseCallback &NDS_changed_callback)
static GEN_NodeTextBuilder * gen_nds_ms
#define GEN_NDS_STRING_SIZE
long GB_read_int(GBDATA *gbd)
GBDATA * GB_searchOrCreate_string(GBDATA *gb_container, const char *fieldpath, const char *default_value)
GB_ERROR GB_add_callback(GBDATA *gbd, GB_CB_TYPE type, const DatabaseCallback &dbcb)
GBDATA * GB_nextEntry(GBDATA *entry)
GB_ERROR GB_end_transaction(GBDATA *gbd, GB_ERROR error)
char buf[GEN_NDS_STRING_SIZE]
char * ARB_strdup(const char *str)
AW_awar * set_minmax(float min, float max)
void AW_POPDOWN(AW_window *window)
GB_ERROR GB_push_transaction(GBDATA *gbd)
CONSTEXPR long FIELD_FILTER_NDS
GB_ERROR GB_delete(GBDATA *&source)
char * dkeys[GEN_NDS_COUNT]
void create_itemfield_selection_button(AW_window *aws, const FieldSelDef &selDef, const char *at)
size_t GB_read_string_count(GBDATA *gbd)
GB_ERROR GB_await_error()
GBDATA * GB_create_container(GBDATA *father, const char *key)
WindowCallback makeHelpCallback(const char *helpfile)
GB_TYPES GB_read_type(GBDATA *gbd)
void NDS_popup_select_srtaci_window(AW_window *aww, const char *acisrt_awarname)
const char * GB_first_non_key_char(const char *str)
static void error(const char *msg)
GBDATA * GB_searchOrCreate_int(GBDATA *gb_container, const char *fieldpath, long default_value)
float GB_read_float(GBDATA *gbd)
AW_awar * awar(const char *awar)
bool GB_has_key(GBDATA *gbd, const char *key)
char * NDS_mask_nonprintable_chars(char *const str)
AW_awar * awar_int(const char *var_name, long default_value=0, AW_default default_file=AW_ROOT_DEFAULT)
TYPE * ARB_calloc(size_t nelem)
AW_window * GEN_open_nds_window(AW_root *aw_root, GBDATA *gb_main)
int GB_read_byte(GBDATA *gbd)
AW_awar * map(const char *awarn)
char * GB_read_string(GBDATA *gbd)
void aw_message(const char *msg)
void GEN_make_node_text_init(GBDATA *gb_main)
char * parsing[GEN_NDS_COUNT]
NOT4PERL char * GB_command_interpreter_in_env(const char *str, const char *commands, const GBL_call_env &callEnv)
GB_CSTR GB_read_char_pntr(GBDATA *gbd)
AW_awar * awar_string(const char *var_name, const char *default_value="", AW_default default_file=AW_ROOT_DEFAULT)
GBDATA * GB_search(GBDATA *gbd, const char *fieldpath, GB_TYPES create)
long lengths[GEN_NDS_COUNT]
GBDATA * GB_entry(GBDATA *father, const char *key)