indexing description: "[ Colors of a theme. All default delegates rely solely on these colors. Use EM_SHARED_THEME to access the instance used by default delegates. ]" date: "$Date$" revision: "$Revision$" class EM_THEME_COLORS create make feature {NONE} -- Initialisation make is -- Initialise default values. do load_default_colors end feature -- Access standard_background: EM_COLOR -- Standard background color standard_text: EM_COLOR -- Standard text color selected_background: EM_COLOR -- Background color of selected elements selected_text: EM_COLOR -- Text color of selected elements window_background: EM_COLOR -- Background color of windows / dialogs window_text: EM_COLOR -- Text color of window button_background: EM_COLOR -- Background color of buttons button_text: EM_COLOR -- Text color of buttons button_border: EM_COLOR -- Border color of buttons window_title_background: EM_COLOR -- Background color of window title window_title_background_fade: EM_COLOR -- Fade color of window title background window_title_text: EM_COLOR -- Text color of window title window_border: EM_COLOR -- Color of window border tooltip_background: EM_COLOR -- Background color of tooltip tooltip_text: EM_COLOR -- Text color of tooltip progress_bar_color: EM_COLOR -- Color of progress progress_bar_fade: EM_COLOR -- Fade color of progress bar list_border: EM_COLOR -- Color of list border feature -- Element change set_standard_background (a_color: like standard_background) is -- Set `standard_background' to `a_color'. require a_color_not_void: a_color /= Void do standard_background := a_color ensure standard_background_set: standard_background = a_color end set_standard_text (a_color: like standard_text) is -- Set `standard_text' to `a_color'. require a_color_not_void: a_color /= Void do standard_text := a_color ensure standard_text_set: standard_text = a_color end set_selected_background (a_color: like selected_background) is -- Set `selected_background' to `a_color'. require a_color_not_void: a_color /= Void do selected_background := a_color ensure selected_background_set: selected_background = a_color end set_selected_text (a_color: like selected_text) is -- Set `selected_text' to `a_color'. require a_color_not_void: a_color /= Void do selected_text := a_color ensure selected_text_set: selected_text = a_color end set_window_background (a_color: like window_background) is -- Set `window_background' to `a_color'. require a_color_not_void: a_color /= Void do window_background := a_color ensure window_background_set: window_background = a_color end set_window_text (a_color: like window_text) is -- Set `window_text' to `a_color'. require a_color_not_void: a_color /= Void do window_text := a_color ensure window_text_set: window_text = a_color end set_button_background (a_color: like button_text) is -- Set `button_background' to `a_color'. require a_color_not_void: a_color /= Void do button_background := a_color ensure button_background_set: button_background = a_color end set_button_text (a_color: like button_text) is -- Set `button_text' to `a_color'. require a_color_not_void: a_color /= Void do button_text := a_color ensure button_text_set: button_text = a_color end set_button_border (a_color: like button_border) is -- Set `button_border' to `a_color'. require a_color_not_void: a_color /= Void do button_border := a_color ensure button_border_set: button_border = a_color end set_window_title_background (a_color: like window_title_background) is -- Set `window_title_background' to `a_color'. require a_color_not_void: a_color /= Void do window_title_background := a_color ensure window_title_background_set: window_title_background = a_color end set_window_title_text (a_color: like window_title_text) is -- Set `window_title_text' to `a_color'. require a_color_not_void: a_color /= Void do window_title_text := a_color ensure window_title_text_set: window_title_text = a_color end set_window_border (a_color: like window_border) is -- Set `window_border' to `a_color'. require a_color_not_void: a_color /= Void do window_border := a_color ensure window_border_set: window_border = a_color end set_tooltip_background (a_color: like tooltip_background) is -- Set `tooltip_background' to `a_color'. require a_color_not_void: a_color /= Void do tooltip_background := a_color ensure tooltip_background_set: tooltip_background = a_color end set_tooltip_text (a_color: like tooltip_text) is -- Set `tooltip_text' to `a_color'. require a_color_not_void: a_color /= Void do tooltip_text := a_color ensure tooltip_text_set: tooltip_text = a_color end set_progress_bar_color (a_color: like progress_bar_color) is -- Set `progress_bar_color' to `a_color'. require a_color_not_void: a_color /= Void do progress_bar_color := a_color ensure progress_bar_color_set: progress_bar_color = a_color end set_progress_bar_fade (a_color: like progress_bar_fade) is -- Set `progress_bar_fade' to `a_color'. require a_color_not_void: a_color /= Void do progress_bar_fade := a_color ensure progress_bar_fade_set: progress_bar_fade = a_color end set_list_border (a_color: like list_border) is -- Set `list_border' to `a_color'. require a_color_not_void: a_color /= Void do list_border := a_color ensure list_border_set: list_border = a_color end feature -- Themes load_default_colors is -- Load default colors. do create standard_background.make_white create standard_text.make_black create selected_background.make_with_rgb (50, 50, 255) create selected_text.make_white create window_background.make_with_rgb (239, 239, 239) create window_text.make_white create button_background.make_with_rgb (210, 210, 210) create button_text.make_black create button_border.make_black create window_title_background.make_with_rgb (0, 0, 200) create window_title_background_fade.make_with_rgb (0, 0, 255) create window_title_text.make_with_rgb (255, 255, 255) create window_border.make_with_rgb (0, 0, 0) create tooltip_background.make_with_rgb (200, 255, 255) create tooltip_text.make_black create progress_bar_color.make_with_rgb (100, 100, 200) create progress_bar_fade.make_with_rgb (200, 100, 100) create list_border.make_black end invariant standard_background_not_void: standard_background /= Void standard_text_not_void: standard_text /= Void selected_background_not_void: selected_background /= Void selected_text_not_void: selected_text /= Void window_background_not_void: window_background /= Void window_text_not_void: window_text /= Void button_background_not_void: button_background /= Void button_text_not_void: button_text /= Void button_border_not_void: button_border /= Void window_title_background_not_void: window_title_background /= Void window_title_background_fade_not_void: window_title_background_fade /= Void window_title_text_not_void: window_title_text /= Void window_border_not_void: window_border /= Void tooltip_background_not_void: tooltip_background /= Void tooltip_text_not_void: tooltip_text /= Void progress_bar_color_not_void: progress_bar_color /= Void progress_bar_fade_not_void: progress_bar_fade /= Void list_border_not_void: list_border /= Void end