summaryrefslogtreecommitdiff
path: root/grc/gui/Element.py
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2016-08-01 17:27:09 +0200
committerSebastian Koslowski <koslowski@kit.edu>2016-08-03 21:46:16 +0200
commit979cab9bf5d5986c3df3ea97d0082ed41d313190 (patch)
tree01824c96351f25e4a8a323c221789deff60b924b /grc/gui/Element.py
parenta59464a7a90715065b600416a3575a734cba51f2 (diff)
grc: gtk3: better lables/shapes handling during flowgraph update
Diffstat (limited to 'grc/gui/Element.py')
-rw-r--r--grc/gui/Element.py34
1 files changed, 15 insertions, 19 deletions
diff --git a/grc/gui/Element.py b/grc/gui/Element.py
index 73be7b8c92..81a5cbfc40 100644
--- a/grc/gui/Element.py
+++ b/grc/gui/Element.py
@@ -76,25 +76,6 @@ class Element(object):
rotation = rotation or self.rotation
return rotation in (90, 270)
- def create_labels(self):
- """
- Create labels (if applicable) and call on all children.
- Call this base method before creating labels in the element.
- """
- for child in self.get_children():
- child.create_labels()
-
- def create_shapes(self):
- """
- Create shapes (if applicable) and call on all children.
- Call this base method before creating shapes in the element.
- """
- for child in self.get_children():
- child.create_shapes()
-
- def draw(self, widget, cr):
- raise NotImplementedError()
-
def rotate(self, rotation):
"""
Rotate all of the areas by 90 degrees.
@@ -115,6 +96,21 @@ class Element(object):
dx, dy = delta_coor
self.coordinate = (x + dx, y + dy)
+ def create_labels(self):
+ """
+ Create labels (if applicable) and call on all children.
+ Call this base method before creating labels in the element.
+ """
+
+ def create_shapes(self):
+ """
+ Create shapes (if applicable) and call on all children.
+ Call this base method before creating shapes in the element.
+ """
+
+ def draw(self, widget, cr):
+ raise NotImplementedError()
+
def bounds_from_area(self, area):
x1, y1, w, h = area
x2 = x1 + w