home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / fed0217s.zip / include / editbox.h < prev    next >
C/C++ Source or Header  |  2000-12-13  |  1KB  |  56 lines

  1. /*
  2. ** Module   :EDITBOX.H
  3. ** Abstract :EditBox control representation class
  4. **
  5. ** Copyright (C) Sergey I. Yevtushenko
  6. **
  7. ** Log: Sat  03/05/1997       Created
  8. */
  9.  
  10. #include <buffer.h>
  11.  
  12. #ifndef  __EDITBOX_H
  13. #define  __EDITBOX_H
  14.  
  15. //-------------------------------------------------------
  16. // class EditBox
  17.  
  18. class EditBox: public Rect, public Buffer
  19. {
  20.         struct
  21.         {
  22.             int row;
  23.             int col;
  24.         }
  25.         bookmark[BMK_NUM];
  26.  
  27.         char *name;
  28.         char *orig_file;
  29.         int num;
  30.         static short used;
  31.     public:
  32.  
  33.         EditBox(int, int, int, int);
  34.         virtual ~EditBox();
  35.  
  36.         int load(char* name);
  37.         int save_as(char* name);
  38.         int set_name(char *name);
  39.         int new_file();
  40.         int save();
  41.         int close();
  42.         void draw();
  43.         int search(char* flags, char *patt);
  44.         int replace(char *str);
  45.         int number()                { return num;}
  46.         char *get_name()            { return name;}
  47.         char *get_fmt_name(int, int = ' ');
  48.         int check_save();
  49.         int is_untitled();
  50.         void bmk_place(int i);
  51.         void bmk_go(int i);
  52.         void put_xy();
  53. };
  54.  
  55. #endif //__EDITBOX_H
  56.