Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tablock.py
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2010-02-10 16:03:57 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2010-02-10 16:03:57 (GMT)
commit9f161d1c93b415baac79a9fee86b12a7abccf32f (patch)
tree5d7edba88407bf6a6245ee2093a3ae208c734a1c /tablock.py
parent704a7308924c5300cfb1044385f3c99433178418 (diff)
added comment directly to sandwichtop
Diffstat (limited to 'tablock.py')
-rw-r--r--tablock.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/tablock.py b/tablock.py
index 5c9df4d..a07f348 100644
--- a/tablock.py
+++ b/tablock.py
@@ -321,6 +321,10 @@ class Block:
self._make_flow_style_boolean(svg)
elif self.name in FLOW_STYLE_ELSE:
self._make_flow_style_else(svg)
+ elif self.name in COLLAPSIBLE_TOP:
+ self._make_collapsible_style_top(svg)
+ elif self.name in COLLAPSIBLE_BOTTOM:
+ self._make_collapsible_style_bottom(svg)
elif self.name in PORTFOLIO_STYLE_2x2:
self._make_portfolio_style_2x2(svg)
elif self.name in PORTFOLIO_STYLE_2x1:
@@ -622,6 +626,22 @@ class Block:
['flow', False, self.svg.docks[4][0],
self.svg.docks[4][1], ']']]
+ def _make_collapsible_style_top(self, svg):
+ self.svg.expand(self._dx+self._ex, self._ey)
+ self._make_collapsible_top_block(svg)
+ self.docks = [['flow', True, self.svg.docks[0][0],
+ self.svg.docks[0][1]],
+ ['number', False, self.svg.docks[1][0],
+ self.svg.docks[1][1]],
+ ['flow', False, self.svg.docks[2][0],
+ self.svg.docks[2][1]]]
+
+ def _make_collapsible_style_bottom(self, svg):
+ self.svg.expand(self._dx+self._ex, self._ey)
+ self._make_collapsible_bottom_block(svg)
+ self.docks = [['flow',True,self.svg.docks[0][0],self.svg.docks[0][1]],
+ ['flow',False,self.svg.docks[1][0],self.svg.docks[1][1]]]
+
# Depreciated block styles
def _make_portfolio_style_2x2(self, svg):
self.svg.expand(30+self._dx+self._ex, 10+self._ey)
@@ -703,6 +723,22 @@ class Block:
self.svg.set_stroke_color(SELECTED_COLOR)
self.shapes.append(svg_str_to_pixbuf(self.svg.basic_block()))
+ def _make_collapsible_top_block(self, svg):
+ self.shapes.append(svg_str_to_pixbuf(self.svg.sandwich_top()))
+ self.width = self.svg.get_width()
+ self.height = self.svg.get_height()
+ self.svg.set_stroke_width(SELECTED_STROKE_WIDTH)
+ self.svg.set_stroke_color(SELECTED_COLOR)
+ self.shapes.append(svg_str_to_pixbuf(self.svg.sandwich_top()))
+
+ def _make_collapsible_bottom_block(self, svg):
+ self.shapes.append(svg_str_to_pixbuf(self.svg.sandwich_bottom()))
+ self.width = self.svg.get_width()
+ self.height = self.svg.get_height()
+ self.svg.set_stroke_width(SELECTED_STROKE_WIDTH)
+ self.svg.set_stroke_color(SELECTED_COLOR)
+ self.shapes.append(svg_str_to_pixbuf(self.svg.sandwich_bottom()))
+
def _make_basic_box(self, svg):
self.shapes.append(svg_str_to_pixbuf(self.svg.basic_box()))
self.width = self.svg.get_width()