Home Index classes Index static functions Index enumerations Index structure types

{Paint_turtle|_glyph}


CLASS {Paint_turtle|_glyph} , UNTESTED, RECURSIVE, BITWISE:



IMPORT : {Form} , {AL4_form} , {Control} , {Paintbox} , {Geometry} , {Canvas} .

BASE CLASS {Paintbox} .


 

ENUMERATION {border|_style} :

        'NONE|_BORDER_NOT_USED' ,

        'FLAT|_BORDER' ,

        'RAISED|_BORDER' ,

        'SUNKEN|_BORDER' .


{border} Border|_style , READ


 

METHOD Set_border ( {border} Style|_to_set ) , SETTER FOR Border


STR Command|s_for_turtle_to_paint_glyph , READ , INIT


 

METHOD Set_command|s_sequence (
     
STR S|equence_set ) , SETTER FOR Command



------------------------------------------------------------------ 'create'

 

FUNCTION New_paint_turtle_button (
     
{Form} Parent|_form ,
     
STR Alias|_of_control ,
     
STR Commands|_to_draw_glyph ) ==> {Paint_turtle} , NEW


STR Subbuttons[] , READ


STR Current|_subbutton_clicked_by_mouse


 

METHOD Set_multi_button|s|_bar (
     
STR Aliases|_of_subbuttons_comma_separated )



------------------------------------------------------- 'like button press'

 

METHOD Set_normal_color ( INT N|ormal_color )



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

  

STRUCTURE {turtle_data}

      {rect} Dest|ination_area

      REAL X|_coordinate

      REAL Y|_coordinate

      INT Angle|_0_to_359

      REAL X_sav|ed_coordinate

      REAL Y_sav|ed_coordinate

      INT Save_dir|ection

      {point} Fill_from|_point

      BOOL Do_fill|_or_not_fill

      BOOL Pen|_or_not_pen

      BOOL Fill_pass

      {border} Border|_style

      BOOL Disabled|_state

      BOOL Like_button

      INT Ink|_color

      INT Ink_disabled

      INT Fill|_color

      INT Fill_disabled

      REAL Pen_width

      INT Buttons|_count

      INT Current|_button_index .



METHOD Set_like_button ( BOOL True|_if_button )


INT Ink|_color


INT Ink_disabled


INT Fill|_color


INT Fill_disabled


    

METHOD Set_ink|_color ( INT New|_ink_color )



METHOD Set_ink_disabled ( INT New|_ink_disabled )



METHOD Set_fill|_color ( INT New|_fill_color )



METHOD Set_fill_disabled ( INT New|_fill_disabled )


REAL Pen_width


  

FUNCTION Paint_turtle (
     
{Canvas} C|anvas_destinatioin ,
     
{turtle_data} Data|_turtle ,
     
STR Seq|uence_of_commands )



OVERRIDE Set_foreground ( INT C|olor_as_ink_color ) , REPLACE


END