######################################################################## #### #### Title: grs_colour.magik #### Author: Mark Cederholm #### Last Revised: 10-Apr-2002 #### #### Notes: #### #### Assign select_background_colour() to a graphics_system menu. #### ######################################################################## _method graphics_system.select_background_colour() ## Invokes a colour_palette_editor to allow you to set the ## background color of the graphics_system window(s). Note that ## this will not apply to windows subsequently created. p << colour_palette_editor.new(_self, :|set_background_colour()|, "Set Background Colour", :disable_items,{:no_colour}) p.select_cell_with_nearest_rgb_values({100,100,100}) p.activate() _endmethod _method graphics_system.set_background_colour(action, a_colour) ## This is the method called by the colour_palette_editor ## invoked by select_background_colour() _if action _isnt :ok _then _return _endif _for a_view _over _self.views() _loop c << a_view.window c.drawing_surface.background_colour << a_colour _endloop _self.refresh_all() _endmethod