MCPcopy Create free account
hub / github.com/Kitware/CMake / _nc_Refresh_Current_Field

Function _nc_Refresh_Current_Field

Source/CursesDialog/form/frm_driver.c:622–731  ·  view source on GitHub ↗

--------------------------------------------------------------------------- | Facility : libnform | Function : int _nc_Refresh_Current_Field(FORM * form) | | Description : Propagate the changes in the fields window to the | window of the form. | | Return Values : E_OK - on success | E_BAD_ARGUMENT - invalid form poi

Source from the content-addressed store, hash-verified

620| Return Values : E_OK - on success
621| E_BAD_ARGUMENT - invalid form pointer
622| E_SYSTEM_ERROR - general error
623+--------------------------------------------------------------------------*/
624int
625_nc_Refresh_Current_Field(FORM * form)
626{
627 WINDOW *formwin;
628 FIELD *field;
629
630 if (!form)
631 RETURN(E_BAD_ARGUMENT);
632
633 if (!form->w || !form->current)
634 RETURN(E_SYSTEM_ERROR);
635
636 field = form->current;
637 formwin = Get_Form_Window(form);
638
639 if (field->opts & O_PUBLIC)
640 {
641 if (Is_Scroll_Field(field))
642 {
643 /* Again, in this case the fieldwin isn't derived from formwin,
644 so we have to perform a copy operation. */
645 if (Single_Line_Field(field))
646 { /* horizontal scrolling */
647 if (form->curcol < form->begincol)
648 form->begincol = form->curcol;
649 else
650 {
651 if (form->curcol >= (form->begincol + field->cols))
652 form->begincol = form->curcol - field->cols + 1;
653 }
654 copywin(form->w,
655 formwin,
656 0,
657 form->begincol,
658 field->frow,
659 field->fcol,
660 field->frow,
661 field->cols + field->fcol - 1,
662 0);
663 }
664 else
665 { /* A multiline, i.e. vertical scrolling field */
666 int row_after_bottom,first_modified_row,first_unmodified_row;
667
668 if (field->drows > field->rows)
669 {
670 row_after_bottom = form->toprow + field->rows;
671 if (form->currow < form->toprow)
672 {
673 form->toprow = form->currow;
674 field->status |= _NEWTOP;
675 }
676 if (form->currow >= row_after_bottom)
677 {
678 form->toprow = form->currow - field->rows + 1;
679 field->status |= _NEWTOP;

Callers 7

post_formFunction · 0.85
set_form_pageFunction · 0.85
Synchronize_FieldFunction · 0.85
_nc_Set_Current_FieldFunction · 0.85
form_driverFunction · 0.85
set_current_fieldFunction · 0.85

Calls 5

copywinFunction · 0.85
is_linetouchedFunction · 0.85
wsyncupFunction · 0.85
untouchwinFunction · 0.85
_nc_Position_Form_CursorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…