#ifndef _statictext_ #define _statictext_ #include /* Macros used to access the display_map as if it were an array of arrays [MAPLINE, MAPLENGTH] */ #define MAPLINE(x) display_map[(x)<<1] #define MAPLENGTH(x) display_map[((x)<<1)+1] /* Routines used to call the correct show and width procedures. Depending on the justification, and the tabs, text_show_proc and text_width_proc are assigned differnt methods */ operator void text_show(char *) = "text_show_proc cvx exec"; operator int text_width(char *) = "text_width_proc cvx exec"; typedef struct statictext statictext; struct statictext : text { char *value; int margin; int margin2; int *display_map; void setfile(char *filename); int line_gap; int display_top_line; int display_bottom_line; int total_display_lines; int max_display_lines; int justification_indent(char *line); void clip_textarea(); void clip_boxarea(); void set_value(char *new_string); float ypos_from_line(int); int textarea_width(); int boxarea_width(); boolean is_word_space(char ch); void set_font(name font, int font_size); void compute_display_map(); void compute_updated_display_map(int line); void compute_display_map_from(int line_no, int char_count, char *rest_of_text); void paint_text_from_line(int line); void paint_text_from_line_to(int line, int to_line); }; #endif