Home Index classes Index static functions Index enumerations Index structure types

{Report|_printing}


CLASS {Report|_printing} , UNTESTED, BITWISE:



IMPORT : {Geometry} , {Canvas} , {Font} , {Bitmap} , {Mathematics} .

STR Title|_of_report_document , INIT


      

ENUMERATION {wrap|_words_syllabels} :

        'NO_WRAP|_CUT_TEXT' ,

        'WRAP_WORDS' ,

        'WRAP_SYLLABELS' .



ENUMERATION {align_text} :

        'LEFT|_ALIGN' ,

        'RIGHT|_ALIGN' ,

        'CENTER|_ALIGN' ,

        'JUSTIFY|_SIDES' .



ENUMERATION {vertical_align} :

        'TOP|_ALIGN' ,

        'BOTTOM|_ALIGN' ,

        'CENTER_VERTICAL' .


CONSTANT INT {font_style} :

          BOLD|_STYLE = 1

          ITALIC|_STYLE = 2

          UNDERLINE|_STYLE = 4

          STRIKEOUT|_STYLE = 8 .



STRUCTURE {margins|_for_cell}

      REAL Left|_margin

      REAL Right|_margin

      REAL Top|_margin

      REAL Bottom|_margin .



STRUCTURE {cell|_of_band}

      STR Name|_of_cell

      INT Band|_index

      {rect} Bounds|_relative_to_band

      {rect} Bounds0|_initial

      REAL Border|_width

      REAL Border_ex|ternal_width

      STR Borders|_lines_LRTB_Diagonal_Zdiagonal

      {margins} Margins|_4_sides

      {wrap} Wrap|_words

      BOOL Scale_down|_to_fit_text

      BOOL Scale_up

      BOOL Transparent

      INT Background

      INT Foreground

      {align_text} Align|_text

      {vertical_align} Vertical_align

      BOOL Show_pages_count|_rather_then_text

      INT Font_face_index INDEXING STR

      INT Font_style

      REAL Font_size .



--------------------------------------------------------- 'bands and cells'

STR Band_names[] , READ


{cell} Cells|_array[] , READ


STR Values|_text_of_all_cells[] , READ



---------------------------------------------------------------- 'creating'

             

METHOD Band|_create ( STR Band_name )



METHOD Band_borders|_set ( REAL Value|_border , REAL External_border )



METHOD Border_sides ( STR Sides|_border_LRTB_D_Z )



METHOD Margins|_for_next_cells ( {margins} M|argins_to_set )



METHOD Wrapping|_and_scaling (
     
{wrap} Wrap|_to_set ,
     
BOOL Scale_down|_to_fit ,
     
BOOL Scale_up )



METHOD Align|_text (
     
{align_text} Align|_text ,
     
{vertical_align} Vertical_align )



METHOD Font|_custom ( STR Font_face , REAL Font_size , STR Font_style )



METHOD Colors|_custom ( INT Foreground , INT Background )



METHOD Cell|_create (
     
STR Name|_of_cell ,
     
{rect} Rect|angle ,
     
STR Value|_initial )



METHOD Cell_r|ight (
     
STR Name|_of_cell ,
     
{rect} Rect|angle ,
     
STR Value|_initial )



METHOD Cell_d|own (
     
STR Name|_of_cell ,
     
{rect} Rect|angle ,
     
STR Value|_initial )



METHOD Show_pages_count|_just_created_cell_wiil_be_show_rather_then_value



METHOD Total_pages|_count_generated ==> INT



------------------------------------------- 'using bands / cells in report'

INDEXING (STR, {page_attr})

INT Current|_band_index , READ


   

METHOD Set_current ( INT New_current ) , SETTER FOR Current



METHOD Band_name ==> STR



METHOD Select|_band_by_name ( STR Name_band )


BOOL OK|_if_last_change_was_successful , READ


    

METHOD Change|_value_while_printing (
     
STR Cell_name ,
     
STR Value|_to_set )



METHOD Is_fit|_text_of_all_cells_of_band ==> BOOL



METHOD Resize|_all_cells_in_band_vertically (
     
REAL Percents|_100_to_reset )



METHOD Resize_to_fit ( REAL Maximal|_percents , REAL Delta|_percents )



------------------------------------------------------ 'printing / drawing'

{Canvas} Canvas|_destination , READ


{Bitmap} Fake|_bitmap


       

METHOD Destination|_canvas_set ( {Canvas} Value|_canvas )



ENUMERATION {move_pos|ition_direction} :

        'NOT_MOVE' ,

        'MOVE_DOWN' ,

        'MOVE_RIGHT' .



METHOD Print_down



METHOD Print_right



METHOD Print_band (
     
BOOL Wrap|_next_line_if_too_wide_band ,
     
BOOL Next_page|_if_too_high_band ,
     
{move_pos} Move|_position_after_printing_band ) ==> BOOL



METHOD Band_height ( STR Name|_of_band ) ==> REAL



METHOD Band_width ( STR Name|_of_band ) ==> REAL


BOOL Syllabels_second|_time_to_try_to_fit_only


   

METHOD Desired_rect|angle_for_cell ( STR Name|_cell ) ==> {rect}



METHOD Set_band_height ( REAL H|eight_to_set ) , PUSH



METHOD Band_rect|angle ==> {rect}



------------------------------------------------------------ 'page control'

BOOL Landscape|_orientation , READ


             

METHOD Set_landscape (
     
BOOL V|alue_landscape ) , SETTER FOR Landscape



METHOD Page_width ==> REAL



METHOD Page_height ==> REAL



METHOD Height_available ==> REAL



METHOD Width_available ==> REAL



METHOD Page_margin_left ==> REAL



METHOD Page_margin_right ==> REAL



METHOD Page_margin_top ==> REAL



METHOD Page_margin_bottom ==> REAL



ENUMERATION {page_size} :

        'A4|_USUAL_PAGE_FORMAT' ,

        'A3|_LARGE_PAGE' ,

        'A5|_SMALL_PAGE' ,

        'CUSTOM_SIZE' .



METHOD Set_page|_size_and_orientation (
     
{page_size} Page_format ,
     
{point} Size|_for_case_of_CUSTOM_SIZE ,
     
BOOL Is_landscape )



METHOD Set_margins|_page ( {margins} Value|_to_set )



STRUCTURE {page_attr|ibutes}

      REAL Page_width|_in_points

      REAL Page_height|_in_points

      BOOL Landscape|_orientation

      {margins} Margins|_page .


{point} Position|_in_page


   

METHOD Count|_pages ==> INT



METHOD Page_number|_current_from_1 ==> INT



METHOD End_page



--------------------------------------------------- 'stored print commands'

   

ENUMERATION {kind_command|_to_print} :

        'RECT|ANGLE_WO_LINES' ,

        'LINE|_COMMAND' ,

        'TEXT|_COMMAND' ,

        'COUNT|_PAGES' .



STRUCTURE {command|_info}

      INT Page|_index

      {kind_command} Kind|_of_command

      {point} Point1|_line

      {point} Point2|_line

      REAL Line_width

      INT Color|_line_fill_or_text

      BOOL Transparent

      BOOL Show_pages_count

      INT Font_face_index INDEXING STR

      REAL Font_size

      INT Font_style .



METHOD Clear|_all_commands_before_prepare_report



------------------------------------------------------ 'draw page commands'

REAL Scale_draw


BOOL Do_not_reset|_transforms_before_draw


BOOL Do_not_rotate|_if_landscape|_set_TRUE_to_preview_when_landscape


BOOL Do_not_erase


 

METHOD Draw_page ( INT Index|_of_page_to_print )



--------------------------------------------------------- 'generate report'

  

FUNCTION Generate|_override_next_method (
     
{Report} R|eport_to_generate ) , HANDLER



METHOD Generated ==> BOOL



----------------------------------------------------- 'methods to override'

END