Changeset main,5 for main/form2.c


Ignore:
Timestamp:
09/27/2007 10:46:25 PM (19 years ago)
Author:
David Owen <dsowen@…>
branch-nick:
tui
revision id:
dsowen@fugue88.ws-20070927224625-s9k87snjmjfo33lv
Message:

Added a few more things to the curses/forms wrapper.
Added very light CDK wrapper and adjusted Makefile.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/form2.c

    r4 r5  
    2626DC(req_left_char, REQ_LEFT_CHAR);
    2727DC(req_right_char, REQ_RIGHT_CHAR);
     28DC(o_active, O_ACTIVE);
     29DC(o_autoskip, O_AUTOSKIP);
    2830
    2931
     
    9395
    9496int form2_add_field(form2_h form, int row, int col, int width, int height,
    95                 int data_height)
     97                int data_height, int opts_mask)
    9698{
    9799        struct form2_t *f = _check(form);
     
    107109        f->fields[*i] = new_field(height, width, row, col, data_height, 0);
    108110        set_field_back(f->fields[*i], A_UNDERLINE | COLOR_PAIR(1));
    109         field_opts_off(f->fields[*i], O_AUTOSKIP);
     111        field_opts_off(f->fields[*i], opts_mask);
    110112
    111113        ++(*i);
     
    193195        return 1;
    194196}
     197
     198int form2_set_field(form2_h form, int i, const char *str)
     199{
     200        struct form2_t *f = _check(form);
     201
     202        if(!f) return 0;
     203        if(!f->form_struct) return 0;
     204
     205        set_field_buffer(f->fields[i], 0, str);
     206
     207        return 1;
     208}
Note: See TracChangeset for help on using the changeset viewer.