home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / tui160 / t_proto.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-02  |  8.6 KB  |  184 lines

  1. /****************************************************************************/
  2. /* Prototype File                                Fri Oct 04 21:59:43 1991   */
  3. /****************************************************************************/
  4. #ifndef __T_PROTO_H
  5. #define __T_PROTO_H
  6.  
  7. /*------------------------- Prototypes for T_BASE.C ------------------------*/
  8. int base_at_cr( TUI *tuip, int inx, int col, int row);
  9. void free_base( TUI *tuip, int inx );
  10. void realloc_base( TUI *tuip, int n_alloc );
  11. int add_base( TUI *tuip, int inx );
  12. int del_base( TUI *tuip, int inx );
  13. int free_tui( TUI *tuip );
  14.  
  15. /*------------------------- Prototypes for T_DLG.C  ------------------------*/
  16. void clear_area( WINDOW *wnp, int x, int y, int width, int height );
  17. void draw_shadow( WINDOW *wnp, TUI_BASE *basep );
  18. void draw_box( WINDOW *wnp, TUI_BASE *basep );
  19. int draw_square_text( WINDOW *wnp, TUI_BASE *basep, int len, uchar *text, int f_att, int f_pos );
  20. void draw_button( WINDOW *wnp, TUI_BASE *basep );
  21. void draw_check( WINDOW *wnp, TUI_BASE *basep );
  22. void draw_input( WINDOW *wnp, TUI_BASE *basep );
  23. void draw_slider( WINDOW *wnp, TUI_BASE *basep );
  24. void draw_icon( WINDOW *wnp, TUI_BASE *basep );
  25. void draw_base( WINDOW *wnp, TUI_BASE *basep );
  26. int draw_item( TUI *tuip, int inx );
  27. void refresh_base( WINDOW *wnp, TUI_BASE *basep );
  28. void refresh_dialog( TUI *tuip, int inx );
  29. int draw_dialog( TUI *tuip, int inx );
  30. int erase_dialog( TUI *tuip, int inx );
  31. void center_dialog( TUI *tuip, int inx );
  32. void position_dialog( TUI *tuip, int inx, int col, int row );
  33. void desel_radios( WINDOW *wnp, TUI_BASE *cmpp, TUI_BASE *basep, int cnt );
  34. int process_input( WINDOW *wnp, TUI_BASE *basep, int mode, int *proc_mouse, int *proc_key );
  35. void validate_slider( TUI_SLIDER *sldrp );
  36. int process_slider( WINDOW *wnp, TUI_BASE *basep );
  37. int process_btnchk( TUI_BASE *basep, WINDOW *wnp, TUI_BASE *dlgp, int num_in_dlg);
  38. void wait_for_release( void );
  39. int advance_tabs(TUI *tuip, int inx, WINDOW *wnp, int num_in_dlg, int num_with_tab,
  40.              int key, int *tab_inx);
  41. int do_dialog( TUI *tuip, int inx, int mode );
  42.  
  43. /*------------------------- Prototypes for T_FSEL.C ------------------------*/
  44. int getdisk( void );
  45. int setdisk(int drive);
  46. long datetol( TUI_FILE_TMDT *tmdt );
  47. void get_curr_path( char *path );
  48. int remove_lastdir(char *d);
  49. int cmp_dir_name( const void *p1, const void *p2 );
  50. int cmp_dir_ext( const void *p1, const void *p2 );
  51. int cmp_dir_size( const void *p1, const void *p2 );
  52. int cmp_dir_datetime( const void *p1, const void *p2 );
  53. void sort_directory(TUI_DIR *dir_array, int num, int sort_type);
  54. void split_fn_ext( char *n, char *f, char *s);
  55. void merge_fn_ext( char *n, char *f, char *s);
  56. int directory_read(char *path, char *wildcard, TUI_DIR *dir_array, int *num );
  57. void make_path_plus( char *dest, char *path, char *name );
  58. void split_path( char *path_plus, char *path, char *wildcard );
  59. void make_filesel_strs( int num, TUI_DIR *dir_array, char *str_buffer );
  60. int file_selected( char *wildcard, char *path, char *filename, char *fullname );
  61. void validate_offset( int csr, int h, int *offset );
  62. int ffirst( char *p, TUI_FBLK *fblk, int mode );
  63. int fnext( TUI_FBLK *fblk );
  64.  
  65. /*------------------------- Prototypes for T_UTIL.C ------------------------*/
  66. int file_exists( char *fname );
  67. void set_slider( TUI *tuip, int inx, long position, long page_amt, long total );
  68. void set_base_btn_text( TUI_BASE *basep, char *new_text );
  69. void set_base_check_text( TUI_BASE *basep, char *new_text );
  70. void set_base_input_strs( TUI_BASE *basep, char *text, char *mask, char *tplt );
  71.  
  72. /*------------------------- Prototypes for T_HELP.C ------------------------*/
  73. int tui_help( int sx, int sy, int ex, int ey, char *fname, char *search_str, int mode );
  74. int browse( TUI_HELP *help );
  75. void cleanup( TUI_HELP *help );
  76. void remove_commands(char *s, char *d);
  77. char *itoa4( int val );
  78. int get_line(int fid, uchar *d, int max_len);
  79. int find_color(char *s);
  80. char *get_token( char *s, char *d, char delim, int mode );
  81. int find_word( char *word, int curr_col, int *col, char *lines[], int num_lines, int dir, int mode );
  82. int fast_find( char *word, char *lines[], int num_lines, int skip_line );
  83. char *mystrstr( char *s, char *w, int mode, int skip );
  84. void mystrupr( char *s, char *d );
  85. int cvt_tabs_to_spaces( char *s, int *text_len, int tab_size );
  86. int get_font( char *fname, int block );
  87. int auto_repeat(ulong tm);
  88.  
  89. /*------------------------- Prototypes for T_INIT.C ------------------------*/
  90. void default_font( int block );
  91. int init_tui_fonts( TUI *tuip );
  92. int init_tui( TUI *tuip );
  93. void end_tui( TUI *tuip );
  94.  
  95. /*------------------------- Prototypes for T_ADD.C  ------------------------*/
  96. void set_base_parms( TUI_BASE *basep, int type, int hot_key, uint flags,
  97.      int transfer, int x_off, int y_off, int width, int height, int style );
  98. int add_dialog( TUI *tuip, uint flags, int x_off, int y_off, int width, int height,
  99.             int att, int bdr_att, int style );
  100. int add_box( TUI *tuip, int hot_key, uint flags, int transfer, int x_off,
  101.          int y_off, int width, int height, int att, int style );
  102. int add_button( TUI *tuip, int hot_key, uint flags, int transfer, int x_off,
  103.             int y_off, int width, int height, int style, int norm_att,
  104.             int norm_f_att, int sel_att, int sel_f_att, int tab_color,
  105.             int first_pos, char *text );
  106. int add_check( TUI *tuip, int hot_key, uint flags, int transfer, int x_off,
  107.            int y_off, int width, int height, int style, int norm_att,
  108.            int norm_f_att, int tab_color, int mark_pos, uchar mark_char,
  109.            int first_pos, char *text );
  110. int add_input( TUI *tuip, int hot_key, uint flags, int transfer, int x_off,
  111.            int y_off, int width, int height, int style, int norm_att,
  112.            int tab_color, uint input_flags, char *text, char *mask, char *tplt );
  113. int add_slider( TUI *tuip, uint flags, int transfer, int x_off, int y_off,
  114.             int width, int height, int style, int arrow_att, int track_att,
  115.             int grab_att, uchar *slider_chars );
  116. int add_icon( TUI *tuip, int hot_key, uint flags, int transfer, int x_off,
  117.           int y_off, int width, int height, int style, int norm_att,
  118.           int sel_att, int tab_color, uchar *images );
  119. void set_tui_parenting( TUI *tuip );
  120. int set_base_parent( TUI *tuip, int inx );
  121.  
  122. /*------------------------- Prototypes for T_SAVE.C ------------------------*/
  123. int save_tui( TUI *tuip, char *fname );
  124.  
  125. /*------------------------- Prototypes for T_LOAD.C ------------------------*/
  126. int load_tui( TUI *tuip, char *fname );
  127. int load_tui_ll( TUI *tuip, char *fname );
  128.  
  129. /*------------------------- Prototypes for T_FSELT.C -----------------------*/
  130. int register_fsel_tui( TUI *tuip );
  131. void register_fsel_dlg0( TUI *tuip );
  132.  
  133. /*------------------------- Prototypes for T_HELPT.C -----------------------*/
  134. int  register_help_tui( TUI *tuip );
  135. void register_help_dlg0( TUI *tuip );
  136. void register_help_dlg1( TUI *tuip );
  137.  
  138. /*-------------------------- Prototypes for T_DBG.C ------------------------*/
  139. #if ( defined(ENQ_DEBUG) || defined(SOURCE_TRACE) )
  140. int tui_vld( char *s, int mode, int i, TUI *tp );
  141. int tui_base_vld( char *s, int mode, TUI_BASE *tbp );
  142. WINDOW *get_dlg_wnp(TUI *tp, int i);
  143. int get_item_type(TUI *tp, int i);
  144. int get_item_x(TUI *tp, int i);
  145. int get_item_y(TUI *tp, int i);
  146. int get_item_w(TUI *tp, int i);
  147. int get_item_h(TUI *tp, int i);
  148. int get_box_att(TUI *tp, int i);
  149. long get_sldr_pos(TUI *tp, int i);
  150. char *get_str_text(TUI *tp, int i);
  151. char *get_btn_text(TUI *tp, int i);
  152. int get_btn_att(TUI *tp, int i);
  153. int get_btn_sel_att(TUI *tp,int i);
  154. char *get_check_text(TUI *tp, int i);
  155. char *get_inp_text(TUI *tp, int i);
  156. char *get_inp_mask(TUI *tp, int i);
  157. char *get_inp_tplt(TUI *tp, int i);
  158. void set_item_x(TUI *tp, int i, int x);
  159. void set_item_y(TUI *tp, int i, int y);
  160. void set_item_w(TUI *tp, int i, int w);
  161. void set_item_h(TUI *tp, int i, int h);
  162. void set_box_att(TUI *tp, int i, int att);
  163. void set_btn_att(TUI *tp, int i, int att);
  164. void set_btn_sel_att(TUI *tp, int i, int att);
  165. void set_sldr_pos(TUI *tp, int i, long sval);
  166. void set_btn_text(TUI *tp, int i, char *s);
  167. void set_str_text(TUI *tp, int i, char *s);
  168. void set_inp_strs(TUI *tp, int i, char *t, char *m, char *p);
  169. int is_valid_inx(TUI *tp, int i);
  170. int is_selected(TUI *tp, int i);
  171. int is_tabbed(TUI *tp, int i);
  172. int is_enabled(TUI *tp, int i);
  173. void select(TUI *tp, int i);
  174. void deselect(TUI *tp, int i);
  175. void tab(TUI *tp, int i);
  176. void detab(TUI *tp, int i);
  177. void enable_item(TUI *tp, int i);
  178. void disable_item(TUI *tp, int i);
  179. #endif
  180.  
  181. #endif /* __T_PROTO_H */
  182.  
  183. /**** END OF FILE ****/
  184.