home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d4xx / d430 / smartfields.lha / SmartFields / Functions / field_goto.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-01-11  |  990 b   |  32 lines

  1. /***************************************
  2. *  FIELD GOTO v1.32
  3. *  © Copyright 1988 Timm Martin
  4. *  All Rights Reserved
  5. ****************************************/
  6.  
  7. #include <exec/io.h>
  8. #include <exec/types.h>
  9. #include <intuition/intuition.h>
  10. #include <console/fields.h>
  11. #include <console/functions.h>
  12.  
  13. void field_goto( header, field )
  14.   struct FieldHeader *header;
  15.   struct Field *field;
  16. {
  17.   void strcpy();  /* standard C library */
  18.  
  19.   header->CurrentField = field;
  20.   cursor_invisible( header->WriteReq );
  21.   if (header->Window->Width  > field->Right &&
  22.       header->Window->Height > field->Bottom) {
  23.     if (field->UndoBuffer)
  24.       strcpy( field->UndoBuffer, field->Buffer );
  25.     cursor_place( header->WriteReq, field->Left, field->Top );
  26.     con_graphic_rend( header->WriteReq, field->Style, field->FrontPen, field->BackPen );
  27.     con_line_length( header->WriteReq, field->MaxChars );
  28.     cursor_jump_right( header->WriteReq, field->BufferPos );
  29.     cursor_visible( header->WriteReq );
  30.   }
  31. }
  32.