Package dtk :: Package ui :: Module color_selection :: Class ColorItem

Class ColorItem

source code


ColorItem class for use in ColorSelectDialog.

Instance Methods
 
__init__(self, color)
Initialize ColorItem class.
source code
 
emit_redraw_request(self)
IconView interface function.
source code
 
get_width(self)
IconView interface function.
source code
 
get_height(self)
IconView interface function.
source code
 
render(self, cr, rect)
IconView interface function.
source code
 
icon_item_motion_notify(self, x, y)
IconView interface function.
source code
 
icon_item_lost_focus(self)
IconView interface function.
source code
 
icon_item_highlight(self)
IconView interface function.
source code
 
icon_item_normal(self)
Normal icon item.
source code
 
icon_item_button_press(self, x, y)
IconView interface function.
source code
 
icon_item_button_release(self, x, y)
IconView interface function.
source code
 
icon_item_single_click(self, x, y)
IconView interface function.
source code
 
icon_item_double_click(self, x, y)
IconView interface function.
source code
Class Variables
  __gsignals__ = {"redraw-request":(gobject.SIGNAL_RUN_LAST, gob...
Method Details

__init__(self, color)
(Constructor)

source code 

Initialize ColorItem class.

Parameters:
  • color - Hex color string.

emit_redraw_request(self)

source code 

IconView interface function.

Emit `redraw-request` signal.

get_width(self)

source code 

IconView interface function.

Get item width.

Returns:
Return item width, in pixel.

get_height(self)

source code 

IconView interface function.

Get item height.

Returns:
Return item height, in pixel.

render(self, cr, rect)

source code 

IconView interface function.

Render item.

Parameters:
  • cr - Cairo context.
  • rect - Render rectangle area.

icon_item_motion_notify(self, x, y)

source code 

IconView interface function.

Handle `motion-notify-event` signal.

Parameters:
  • x - X coordinate that user motion on item.
  • y - Y coordinate that user motion on item.

icon_item_lost_focus(self)

source code 

IconView interface function.

Handle `lost-focus` signal.

icon_item_highlight(self)

source code 

IconView interface function.

Handle `highlight` signal.

icon_item_button_press(self, x, y)

source code 

IconView interface function.

Handle `button-press` signal.

icon_item_button_release(self, x, y)

source code 

IconView interface function.

Handle `button-release` signal.

icon_item_single_click(self, x, y)

source code 

IconView interface function.

Handle `click` signal.

icon_item_double_click(self, x, y)

source code 

IconView interface function.

Handle `double-click` signal.


Class Variable Details

__gsignals__

Value:
{"redraw-request":(gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()),}