Changeset 1529
- Timestamp:
- 06/28/07 11:51:55 (1 year ago)
- Files:
-
- gaphas/trunk/gaphas/item.py (modified) (1 diff)
- gaphas/trunk/gaphas/painter.py (modified) (1 diff)
- gaphas/trunk/gaphas/view.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphas/trunk/gaphas/item.py
r1520 r1529 203 203 204 204 - matrix_i2w: Item to World transformation matrix (no need to) 205 - cairo: the Cairo Context use this one to draw .205 - cairo: the Cairo Context use this one to draw 206 206 - view: the view that is to be rendered to 207 - selected, focused, hovered : view state of items.207 - selected, focused, hovered, dropzone: view state of items 208 208 """ 209 209 pass gaphas/trunk/gaphas/painter.py
r1518 r1529 106 106 focused=(item is view.focused_item), 107 107 hovered=(item is view.hovered_item), 108 dropzone=(item is view.dropzone_item), 108 109 draw_all=self.draw_all)) 109 110 gaphas/trunk/gaphas/view.py
r1518 r1529 39 39 self._focused_item = None 40 40 self._hovered_item = None 41 self._dropzone_item = None 41 42 42 43 self._matrix = Matrix() … … 151 152 _set_hovered_item, _del_hovered_item, 152 153 "The item directly under the mouse pointer") 154 155 156 def _set_dropzone_item(self, item): 157 """ 158 Set dropzone item. 159 """ 160 if item is not self._dropzone_item: 161 self.queue_draw_item(self._dropzone_item, item) 162 self._dropzone_item = item 163 self.emit('dropzone-changed', item) 164 165 166 def _del_dropzone_item(self): 167 """ 168 Unset dropzone item. 169 """ 170 self._dropzone_item = None 171 172 173 dropzone_item = property(lambda s: s._dropzone_item, 174 _set_dropzone_item, _del_dropzone_item, 175 'The item which can group other items') 176 153 177 154 178 def _set_painter(self, painter): … … 336 360 # Signals: emited before the change takes effect. 337 361 __gsignals__ = { 362 'dropzone-changed': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, 363 (gobject.TYPE_PYOBJECT,)), 338 364 'hover-changed': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, 339 365 (gobject.TYPE_PYOBJECT,)), … … 554 580 if self.hovered_item in removed_items: 555 581 self.hovered_item = None 582 if self.dropzone_item in removed_items: 583 self.dropzone_item = None 556 584 557 585 # Pseudo-draw
