Home Index classes Index static functions Index enumerations Index structure types

{Paint_table}


CLASS {Paint_table} , UNTESTED, BITWISE:



IMPORT : {Paint_lines} , {Mathematics} , {Canvas} , {Geometry} , {Form} .

BASE CLASS {Paint_lines} .


  

FUNCTION New_paint_table (
     
{Form} Parent|_form ,
     
STR Alias|_paint_lines ,
     
STR Scrollbars|_and_options|_Vertscrollbar|Horzsbar|Focusable ) ==> {Paint_table} , NEW



STRUCTURE {table_row}

      STR Subitems[]

      {Object} Data_|additional_ .


{table_row} Items|_captions[] , READ


BOOL Virtual|_items , READ


              

METHOD Set_virtual ( BOOL Yes|_virtual )



OVERRIDE Count ==> INT



OVERRIDE Set_lines_count ( INT New|_count )



METHOD Set_count|_for_virtual_table_view || Set_items_count (
     
INT New_count )



METHOD . [
     
INT Item INDEXING {table_row} ,
     
INT Subitem INDEXING STR ] ==> STR



METHOD Set_subitem (
     
INT Item|_index INDEXING {table_row} ,
     
INT Subitem|_index INDEXING STR ,
     
STR Value|_string ) , SETTER FOR .[]



METHOD Get_by_col|umn_header (
     
INT Item INDEXING {table_row} ,
     
STR Column|_header ) ==> STR , STORE



METHOD Set_by_col|umn_header (
     
INT Item INDEXING {table_row} ,
     
STR Column|_header ,
     
STR Value|_to_set ) , STORE



METHOD Insert|_item (
     
INT Before|_item_index ,
     
STR Value|_item_caption )



METHOD Insert_line (
     
INT Before|_item_index ,
     
STR Value|_item_with_subitems_NL_separated )



METHOD Write|_line ( STR Value|_item_with_subitems_NL_separated )



METHOD Swap|_two_rows (
     
INT E1 INDEXING {table_row} ,
     
INT E2 INDEXING {table_row} )



METHOD Delete|_row ( INT At|_index )



OVERRIDE Clear , REPLACE



----------------------------------------------------------------- 'columns'

  

ENUMERATION {text_align} :

        'LEFT|_default_alignment||TEXT_LEFT' ,

        'RIGHT|_alignment||TEXT_RIGHT' ,

        'CENTER|_alignment||TEXT_CENTER' .



STRUCTURE {column|_info}

      STR Caption|_of_column

      REAL Width|_in_points

      {text_align} Align|ment_of_text .


{column} Column|s|_info[] , READ


     

METHOD Set_columns ( STR A|rray_of_strings [*] ) , FORGET



METHOD Set_columns_from_text ( STR T|ext_NL_separated )



METHOD Adjust_columns|_width_and_align (
     
STR W|idth_align_definitions )



METHOD Add_column (
     
STR C|olumn_caption ,
     
{text_align} A|lign_text ,
     
REAL W|idth_in_points )



METHOD Set_column_caption (
     
INT Index INDEXING {column} ,
     
STR Caption|_to_set ) , FORGET


BOOL Show_header|_with_columns


    

METHOD Set_show_header (
     
BOOL Show|_header_line ) , SETTER FOR Show_header



METHOD Set_column_width (
     
INT Index|_of_column INDEXING {column} ,
     
REAL Width|_to_set )



METHOD Set_column_align|ment_of_text (
     
INT Index|_of_column INDEXING {column} ,
     
{text_align} A|lignment_to_set )



METHOD Column_pos|ition ( INT I|ndex_column ) ==> REAL


INT Hidden_col|umns , READ


 

METHOD Set_hidden_col|umns (
     
INT N|umber_last_columns_to_hide ) , SETTER FOR Hidden_col



------------------------------------------------------------------- 'paint'

 

STRUCTURE {drawing_item|_set_on_different_stages_of_paint}

      BOOL Fill|_stage

      INT Item|_index_less_then_0_if_header INDEXING INT

      INT Column|_index

      BOOL Before|_drawing_cell_FALSE_if_called_after

      BOOL Erase_r|ectangle_before_draw_text

      {rect} Rect|angle_of_cell

      INT Background_right|_of_columns .


{drawing_item} Drawing|_item_info|rmation


INT Current_subitem|_drawing


STR Current_row|_caption_and_subitems_while_drawing[]



---------------------------------------------------------- 'shadow on text'

INT Shadow|_color


REAL Offset_shadow


BOOL Shadow_both_sides



-------------------------------------------------------------------- 'grid'

INT Grid_color


BOOL Grids|_draw


BOOL Gradient|_to_indicate_long_text_in_cells



--------------------------------------------------------------- 'selecting'

INDEXING STR

INT Selection[] , READ


    

METHOD Select|_item ( INT Row|_index , BOOL Do_select|_unselect )



METHOD Unselect|_all



METHOD Reset_sel|ection



METHOD Next_selected ( INT After|_row ) ==> INT


BOOL Multiselect , READ


  

METHOD Set_multiselect ( BOOL New_m|ultiselect )



METHOD Select_all


BOOL Can_select|_by_mouse


BOOL Resize_columns|_with_mouse



------------------------------------------------- 'table can have a header'

        

OVERRIDE Lines_visible ==> INT



OVERRIDE Current_line ==> INT



OVERRIDE Set_current_line ( INT New_line )



METHOD Set_cur_line|_not_affect_selection (
     
INT New_line ,
     
BOOL Clear_sel|ection|DUMMY )



OVERRIDE Position_current_line ==> REAL



OVERRIDE Line_at ( REAL Y|_coordinate ) ==> INT



METHOD Row_at|_y_coordinate_or_minus_one_when_on_header (
     
REAL Y|_coordinate ) ==> INT



METHOD Column_at|_x_coordinate ( REAL X|_coordinate ) ==> INT



--------------------------------------------------- 'handling key commands'

 

OVERRIDE Handle_key ( {Form}.{key_info} Key|_to_handle )


END