indexing description: "Permanent window: Editor." date: "$Date$" revision: "$Revision$" class PERM_WIND1 inherit WINDOWS STATES PERM_WIND undefine init_toolkit redefine realize, make end creation make feature -- Creation make (a_name: STRING; a_parent: SCREEN) is do Precursor (a_name, a_parent) !! scrolled_text1.make ("Scrolled_text1", Current) !! push_b1.make ("push_b1", Current) !! push_b2.make ("push_b2", Current) !! push_b3.make ("push_b3", Current) !! push_b4.make ("push_b4", Current) !! push_b5.make ("push_b5", Current) set_values end set_values is do set_title ("Editor") scrolled_text1.set_font_name ("Arial,16,400,,default,dontcare,default,0,0,0,default,default,default") scrolled_text1.set_x_y (82, -3) scrolled_text1.set_size (412, 513) push_b1.set_text ("VIEW") push_b1.forbid_recompute_size push_b1.set_font_name ("Celtic,20,700,,default,dontcare,default,0,0,0,default,default,default") push_b1.set_x_y (7, 13) push_b1.set_size (67, 26) push_b2.set_text ("BACK") push_b2.forbid_recompute_size push_b2.set_font_name ("Celtic,20,700,,default,dontcare,default,0,0,0,default,default,default") push_b2.set_x_y (7, 49) push_b2.set_size (67, 26) push_b3.set_text ("OPEN") push_b3.forbid_recompute_size push_b3.set_font_name ("Celtic,20,700,,default,dontcare,default,0,0,0,default,default,default") push_b3.set_x_y (7, 85) push_b3.set_size (67, 26) push_b4.set_text ("SAVE") push_b4.forbid_recompute_size push_b4.set_font_name ("Celtic,20,700,,default,dontcare,default,0,0,0,default,default,default") push_b4.set_x_y (7, 121) push_b4.set_size (67, 26) push_b5.set_text ("QUIT") push_b5.forbid_recompute_size push_b5.set_font_name ("Celtic,20,700,,default,dontcare,default,0,0,0,default,default,default") push_b5.set_x_y (7, 157) push_b5.set_size (67, 26) set_x_y (105, 34) set_size (494, 510) record_resize_policy (Perm_wind1.scrolled_text1, true, true, true, true); record_resize_policy (Perm_wind1.push_b1, false, false, true, true); record_resize_policy (Perm_wind1.push_b2, false, false, true, true); record_resize_policy (Perm_wind1.push_b3, false, false, true, true); record_resize_policy (Perm_wind1.push_b4, false, false, true, true); record_resize_policy (Perm_wind1.push_b5, false, false, true, true); set_colors end set_colors is local a_color: COLOR a_pixmap: PIXMAP do !! a_pixmap.make a_pixmap.read_from_file ("C:\WINNT\Soap Bubbles.bmp") set_background_pixmap (a_pixmap) !! a_color.make a_color.set_name ("NavyBlue") Perm_wind1.scrolled_text1.set_background_color (a_color) !! a_color.make a_color.set_name ("white") Perm_wind1.scrolled_text1.set_foreground_color (a_color) end feature -- Attributes scrolled_text1: SCROLLED_T push_b1: PUSH_B -- VIEW push_b2: PUSH_B -- BACK push_b3: PUSH_B -- OPEN push_b4: PUSH_B -- SAVE push_b5: PUSH_B -- QUIT feature -- Realization realize is do set_callbacks Precursor end set_callbacks is do set_scrolled_text1_callbacks set_push_b1_callbacks -- (Widget's visual name is VIEW) set_push_b2_callbacks -- (Widget's visual name is BACK) set_push_b3_callbacks -- (Widget's visual name is OPEN) set_push_b4_callbacks -- (Widget's visual name is SAVE) set_push_b5_callbacks -- (Widget's visual name is QUIT) end set_scrolled_text1_callbacks is local com1: COMMAND3 meta_command: META_COMMAND do !! com1.make !! meta_command.make meta_command.add (BASIC, com1) Perm_wind1.scrolled_text1.add_modify_action (meta_command, Void) end set_push_b1_callbacks is local com1: COMMAND1 com2: COMMAND1 meta_command: META_COMMAND do !! com1.make(Perm_wind1.scrolled_text1) !! com2.make(Perm_wind1.scrolled_text1) !! meta_command.make meta_command.add (Editing, com1) meta_command.add (BASIC, com2) Perm_wind1.push_b1.add_activate_action (meta_command, Void) end set_push_b2_callbacks is local com1: COMMAND4 meta_command: META_COMMAND do !! com1.make(Perm_wind1.scrolled_text1) !! meta_command.make meta_command.add (Viewing, com1) Perm_wind1.push_b2.add_activate_action (meta_command, Void) end set_push_b3_callbacks is local com1: BUILD_OPEN com2: BUILD_OPEN meta_command: META_COMMAND do !! com1.make(Perm_wind1.scrolled_text1) !! com2.make(Perm_wind1.scrolled_text1) !! meta_command.make meta_command.add (Editing, com1) meta_command.add (BASIC, com2) Perm_wind1.push_b3.add_activate_action (meta_command, Void) end set_push_b4_callbacks is local com1: BUILD_SAVE meta_command: META_COMMAND do !! com1.make(Perm_wind1.scrolled_text1) !! meta_command.make meta_command.add (Editing, com1) Perm_wind1.push_b4.add_activate_action (meta_command, Void) end set_push_b5_callbacks is local com1: COMMAND2 com2: COMMAND2 com3: COMMAND2 meta_command: META_COMMAND do !! com1.make !! com2.make !! com3.make !! meta_command.make meta_command.add (Editing, com1) meta_command.add (BASIC, com2) meta_command.add (Viewing, com3) Perm_wind1.push_b5.add_activate_action (meta_command, Void) end end -- class PERM_WIND1