#include <Ofont.h>
List of all members.
Definition at line 48 of file Ofont.h.
Definition at line 70 of file Ofont.cpp.
References init().
Definition at line 81 of file Ofont.cpp.
References deinit().
Display the textPtr on the center of the given area
<int> x1,y1 = the coordination of the panel <int> x2,y2 = <char*> desStr = the spinner description [char] clearBack = clear background with back_color or not (default : 0)
Return : <int> lastX, the x coordination of the last pixel of last font
Definition at line 936 of file Ofont.cpp.
References Vga::use_back_buf.
Referenced by UserInterface::create_button_bitmap().
Definition at line 1333 of file Ofont.cpp.
References font_height, put_to_buffer(), and text_width().
Definition at line 1380 of file Ofont.cpp.
References font_height, put_to_bufferW(), and text_width().
int area_width = area width of the textPtr
Definition at line 828 of file Ofont.cpp.
References String::str_buf.
Count the no. of lines of textPtr can be displayed on the given area.
int x1,y1,x2,y2 = area of the textPtr char* textPtr = the textPtr to be put on screen
<int lineSpace> = no. of pixel space between lines ( default : 0 )
<int& dispLines> = no. of lines can be displayed in the textPtr area <int& totalLines> = total no. of lines of the textPtr
Definition at line 859 of file Ofont.cpp.
Display field description and field value. It will display the description on the center of the panel
<int> x1,y1 = the coordination of the panel <int> x2,y2 = <char*> desStr = the spinner description
Definition at line 910 of file Ofont.cpp.
Display field description and field value
<int> x1,y1 = the coordination of the spinner description <char*> desStr = the spinner description
Definition at line 887 of file Ofont.cpp.
Definition at line 178 of file Ofont.cpp.
References font_bitmap_buf, font_info_array, init_flag, mem_del, and NULL.
Referenced by ~Font().
Display a value and clear the background
<int> x1,y1 = the coordination of the field variable <char*> textPtr = pointer to the textPtr <int> x2 = the x2 (right border) of the field
Definition at line 1275 of file Ofont.cpp.
<int> x1,y1 = the coordination of the field variable <double> value = value
<int> format = 1 - 1,000,000 normal, with thousand separator 2 - $1,000,000 add dollar sign, with thousand separator 3 - 100% percentage (default : 1 )
<int> x2 = the x2 (right border) of the field
Definition at line 1254 of file Ofont.cpp.
[inline]
Definition at line 152 of file Ofont.h.
References disp().
Definition at line 138 of file Ofont.h.
<int> x1,y1 = the coordination of the field variable <int> value = value
Definition at line 1227 of file Ofont.cpp.
Referenced by disp().
Combine the function of put_field() and update_field() depending on the refreshFlag passed
format - "Field : 999999" e.g. "List price : $92,232"
<int> x1,y1 = the coordination of the spinner description <char*> desStr = the spinner description <int> x2 = the coordination of the spinner variable <char*> value = value
<int> x3 = the x3 (right border) of the field <int> refreshFlag = refresh flag, either INFO_REPAINT or INFO_UPDATE [char*] helpCode = help code
Definition at line 1188 of file Ofont.cpp.
References INFO_REPAINT.
<int> x1,y1 = the coordination of the spinner description <char*> desStr = the spinner description <int> x2 = the coordination of the spinner variable <double> value = value
<int> format = 1 - 1,000,000 normal, with thousand separator 2 - $1,000,000 add dollar sign, with thousand separator 3 - 100% percentage
<int> x2 = the x2 (right border) of the field <int> refreshFlag = refresh flag, either INFO_REPAINT or INFO_UPDATE [char*] helpCode = help code
Definition at line 1111 of file Ofont.cpp.
Definition at line 149 of file Ofont.h.
References field(), and NULL.
Definition at line 135 of file Ofont.h.
<int> x1,y1 = the coordination of the spinner description <char*> desStr = the spinner description <int> x2 = the coordination of the spinner variable <int> value = value
Definition at line 1020 of file Ofont.cpp.
Referenced by field().
int area_width = area width of the textPtr int start_char
Definition at line 777 of file Ofont.cpp.
References NULL.
Definition at line 82 of file Ofont.h.
References font_height.
Referenced by Get::field(), Text::paint(), LargeText::paint(), and GetA::paint().
<char*> fontName = name of the font type. (e.g. "STD" will load "FNT_STD.RES" )
[int] interCharSpace = inter-character space (default:1)
[int] italicShift = horzontal back shifting for italic font (default:0)
Return : 1 - succeed; 0 - reading palette file error
Definition at line 101 of file Ofont.cpp.
References DIR_RES.
Referenced by Font().
Definition at line 93 of file Ofont.h.
References put().
Definition at line 207 of file Ofont.cpp.
References Vga::active_buf, FontInfo::bitmap_offset, err_when, first_char, font_bitmap_buf, font_height, font_info_array, init_flag, inter_char_space, last_char, max_font_height, max_font_width, FontInfo::offset_y, VgaBuf::put_bitmap_trans_fast(), space_width, Vga::use_back_buf, VGA_WIDTH, and FontInfo::width.
Referenced by put(), Text::refresh(), LargeText::refresh(), and right_put().
Definition at line 339 of file Ofont.cpp.
References Vga::active_buf, FontInfo::bitmap_offset, first_char, font_bitmap_buf, font_info_array, last_char, FontInfo::offset_y, and VgaBuf::put_bitmap_trans().
Definition at line 1287 of file Ofont.cpp.
References FontInfo::bitmap_offset, err_here, first_char, font_bitmap_buf, font_info_array, and last_char.
Referenced by put_to_buffer().
Definition at line 1346 of file Ofont.cpp.
References FontInfo::bitmap_offset, first_char, font_bitmap_buf, font_info_array, IMGbltTransRemap(), last_char, and FontInfo::offset_y.
Referenced by put_to_bufferW().
Definition at line 1145 of file Ofont.cpp.
[int] format = 1 - 1,000,000 normal, with thousand separator 2 - $1,000,000 add dollar sign, with thousand separator 3 - 100% percentage (default : 1 )
Definition at line 1058 of file Ofont.cpp.
Definition at line 143 of file Ofont.h.
References put_field().
Definition at line 129 of file Ofont.h.
Definition at line 967 of file Ofont.cpp.
Referenced by put_field().
Put a paragraph of textPtr on screen Given the area of the paragraph Automatical word wrap is available
If the background color of the font is set, the area of the paragraph will be filled with the background color first.
int x1,y1,x2,y2 = area of the textPtr
char* textPtr = the textPtr to be put on screen
[int lineSpace] = no. of pixel space between lines ( default : 2 )
[int] startLine = start display at which line ( default : 1, first line)
[float wordPause] = time pause between words ( default : 0 )
[char dispFlag] = display the textPtr or not, if called by count_line(), this would be 0. ( default : 1 )
-------------------------------------------------------//
It will store resulting paramteres :
<char*> next_text_ptr = point to the textPtr just after this paragraph which has been put to the screen.
<int> next_textPtr_y = the endding y position of the paragraph and which is the y position which next paragraph can be put
<int> line_count = the no. of lines has been displayed in current put_paragraph() session.
<HyperField> hyper_field_array[] = an array of hyper-textPtred field
Definition at line 518 of file Ofont.cpp.
References Vga::active_buf, VgaBuf::bar_fast(), FontInfo::bitmap_offset, err_when, first_char, font_bitmap_buf, font_height, font_info_array, hyper_field_array, HYPER_FIELD_COLOR, hyper_field_count, init_flag, inter_char_space, last_char, line_count, MAX_HYPER_FIELD, next_text_ptr, next_text_y, NULL, FontInfo::offset_y, VgaBuf::put_bitmap_trans_fast(), space_width, HyperField::text_len, HyperField::text_ptr, Vga::use_back_buf, VGA_HEIGHT, VGA_WIDTH, FontInfo::width, HyperField::x1, HyperField::x2, HyperField::y1, and HyperField::y2.
Definition at line 1300 of file Ofont.cpp.
References first_char, font_info_array, put_char_to_buffer(), and space_width.
Referenced by center_put_to_buffer().
Definition at line 1358 of file Ofont.cpp.
References first_char, font_info_array, put_char_to_bufferW(), and space_width.
Referenced by center_put_to_bufferW(), and GetA::paint().
Definition at line 356 of file Ofont.cpp.
References put(), and text_width().
Referenced by Text::refresh(), and LargeText::refresh().
text_width() must first be called, this function use the result from text_width() to calc the textPtr height.
[int] lineSpace = space between lines ( default : DEFAULT_LINE_SPACE )
Return : <int> the screen height of the textPtr display using this font
Definition at line 468 of file Ofont.cpp.
Given the textPtr string, then calculate the width (unit:pixel).
char* textPtr = the textPtr to be put on screen [int] textPtrLen = the length of the textPtr to be put (default : -1, until NULL character) [int] maxDispWidth = the maximum width can be displayed the textPtr width cannot > maxDispWidth
Note : static var text_line_count is used to pass value to text_height()
Return : <int> the screen width of the textPtr display using this font
Definition at line 378 of file Ofont.cpp.
Referenced by center_put_to_buffer(), center_put_to_bufferW(), GetA::cursor_x(), Text::paint(), LargeText::paint(), GetA::paint(), and right_put().
Update the value of the field which is previously displayed by Font::put_field()
<int> x1,y1 = the coordination of the field variable <char*> value = value <int> x2 = the x2 (right border) of the field
Definition at line 1163 of file Ofont.cpp.
Definition at line 1082 of file Ofont.cpp.
Definition at line 146 of file Ofont.h.
References update_field().
Definition at line 132 of file Ofont.h.
Definition at line 991 of file Ofont.cpp.
Referenced by update_field().
Definition at line 86 of file Ofont.h.
References font_height, and max_font_height.
Definition at line 85 of file Ofont.h.
References font_height, and std_font_height.
Definition at line 83 of file Ofont.h.
References space_width.
Definition at line 63 of file Ofont.h.
Referenced by put(), put_char(), put_char_to_buffer(), put_char_to_bufferW(), put_paragraph(), put_to_buffer(), and put_to_bufferW().
Definition at line 67 of file Ofont.h.
Referenced by deinit(), put(), put_char(), put_char_to_buffer(), put_char_to_bufferW(), and put_paragraph().
Definition at line 56 of file Ofont.h.
Referenced by center_put_to_buffer(), center_put_to_bufferW(), height(), Bar::init(), put(), put_paragraph(), use_max_height(), and use_std_height().
Definition at line 66 of file Ofont.h.
Referenced by deinit(), put(), put_char(), put_char_to_buffer(), put_char_to_bufferW(), put_paragraph(), put_to_buffer(), and put_to_bufferW().
[static]
Definition at line 64 of file Ofont.cpp.
Referenced by put_paragraph().
Definition at line 63 of file Ofont.cpp.
Definition at line 50 of file Ofont.h.
Referenced by deinit(), put(), and put_paragraph().
Definition at line 61 of file Ofont.h.
Referenced by put(), and put_paragraph().