Package dtk :: Package ui :: Module color_selection :: Class ColorSelectDialog

Class ColorSelectDialog

source code


ColorSelectionDialog widget.

Instance Methods
 
__init__(self, confirm_callback=None, cancel_callback=None)
Initialize ColorSelectDialog class.
source code
 
update_color_info(self, color_string, clear_highlight=True)
Update color information.
source code

Inherited from dialog.DialogBox: get_mask_func

Inherited from window.Window: add_move_event, add_toggle_event, close_window, draw_mask, get_edge, get_shadow_size, hide_shadow, is_disable_window_maximized, min_window, resize_window, show_shadow, show_window, toggle_fullscreen_window, toggle_max_window

Class Variables
  DEFAULT_COLOR_LIST = ["#000000", "#808080", "#E20417", "#F2930...
Method Details

__init__(self, confirm_callback=None, cancel_callback=None)
(Constructor)

source code 

Initialize ColorSelectDialog class.

Parameters:
  • confirm_callback - Callback when user click OK, this callback accept one argument, color string.
  • cancel_callback - Callback when user click cancel, this callback don't accept any argument.
Overrides: window.Window.__init__

update_color_info(self, color_string, clear_highlight=True)

source code 

Update color information.

Parameters:
  • color_string - Hex color string.
  • clear_highlight - Whether clear color select view's highlight status, default is True.

Class Variable Details

DEFAULT_COLOR_LIST

Value:
["#000000", "#808080", "#E20417", "#F29300", "#FFEC00", "#95BE0D", "#0\
08F35", "#00968F", "#FFFFFF", "#C0C0C0", "#E2004E", "#E2007A", "#920A7\
E", "#162883", "#0069B2", "#009DE0"]