From 9f161d1c93b415baac79a9fee86b12a7abccf32f Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Wed, 10 Feb 2010 16:03:57 +0000 Subject: added comment directly to sandwichtop --- (limited to 'taconstants.py') diff --git a/taconstants.py b/taconstants.py index a515e78..10f90b0 100644 --- a/taconstants.py +++ b/taconstants.py @@ -174,7 +174,7 @@ BASIC_STYLE_TAIL = ['stopstack', 'empty'] BASIC_STYLE = ['clean', 'penup', 'pendown', 'stack1', 'stack2', 'vspace', 'hideblocks', 'showblocks', 'clearheap', 'printheap', 'kbinput', 'picturelist', 'picture1x1', 'picture2x2', 'picture2x1', 'picture1x2', - 'fullscreen', 'sandwichtop', 'sandwichbottom'] + 'fullscreen'] BASIC_STYLE_1ARG = ['forward', 'back', 'left', 'right', 'seth', 'show', 'setscale', 'setpensize', 'setcolor', 'setshade', 'print', 'showaligned', 'settextsize', 'settextcolor', 'print', 'wait', 'storeinbox1', 'savepix', @@ -199,6 +199,8 @@ FLOW_STYLE = ['forever', 'hspace'] FLOW_STYLE_1ARG = ['repeat'] FLOW_STYLE_BOOLEAN = ['if'] FLOW_STYLE_ELSE = ['ifelse'] +COLLAPSIBLE_TOP = ['sandwichtop'] +COLLAPSIBLE_BOTTOM = ['sandwichbottom'] # Depreciated block styles PORTFOLIO_STYLE_2x2 = ['template2x2'] @@ -224,134 +226,129 @@ MACROS = { [9, 'wait', 0, 0, [8, 10, None]], [10, ['number', '1'], 0, 0, [9, None]]], 'picturelist': - [[0, 'comment', 0, 0, [None, 1, 2]], + [[0, 'sandwichtop', 0, 0, [None, 1, 2]], [1, ['string', _('bulleted list')], 0, 0, [0, None]], - [2, 'sandwichtop', 0, 0, [0, 3]], - [3, 'setxy', 0, 0, [2, 4, 5, 6]], - [4, 'titlex', 0, 0, [3, None]], - [5, 'titley', 0, 0, [3, None]], - [6, 'show', 0, 0, [3, 7, 8]], - [7, ['string',_('Title')], 0, 0, [6, None]], - [8, 'setxy', 0, 0, [6, 9, 10, 11]], - [9, 'leftx', 0, 0, [8, None]], - [10, 'topy', 0, 0, [8, None]], - [11, 'list', 0, 0, [8, 12, 13, 14]], - [12, ['string','∙ '], 0, 0, [11, None]], - [13, ['string','∙ '], 0, 0, [11, None]], - [14, 'sandwichbottom', 0, 0, [11, None]]], + [2, 'setxy', 0, 0, [0, 3, 4, 5]], + [3, 'titlex', 0, 0, [2, None]], + [4, 'titley', 0, 0, [2, None]], + [5, 'show', 0, 0, [2, 6, 7]], + [6, ['string',_('Title')], 0, 0, [5, None]], + [7, 'setxy', 0, 0, [5, 8, 9, 10]], + [8, 'leftx', 0, 0, [7, None]], + [9, 'topy', 0, 0, [7, None]], + [10, 'list', 0, 0, [7, 11, 12, 13]], + [11, ['string','∙ '], 0, 0, [10, None]], + [12, ['string','∙ '], 0, 0, [10, None]], + [13, 'sandwichbottom', 0, 0, [10, None]]], 'picture1x1': - [[0, 'comment', 0, 0, [None, 1, 2]], + [[0, 'sandwichtop', 0, 0, [None, 1, 2]], [1, ['string', _('picture')], 0, 0, [0, None]], - [2, 'sandwichtop', 0, 0, [0, 3]], - [3, 'setxy', 0, 0, [2, 4, 5, 6]], - [4, 'titlex', 0, 0, [3, None]], - [5, 'titley', 0, 0, [3, None]], - [6, 'show', 0, 0, [3, 7, 8]], - [7, ['string',_('Title')], 0, 0, [6, None]], - [8, 'setscale', 0, 0, [6, 9, 10]], - [9, ['number', '90'], 0, 0, [8, None]], - [10, 'setxy', 0, 0, [8, 11, 12, 13]], - [11, 'leftx', 0, 0, [10, None]], - [12, 'topy', 0, 0, [10, None]], - [13, 'showaligned', 0, 0, [10, 14, 15]], - [14, 'journal', 0, 0, [13, None]], - [15, 'sandwichbottom', 0, 0, [13, None]]], + [2, 'setxy', 0, 0, [0, 3, 4, 5]], + [3, 'titlex', 0, 0, [2, None]], + [4, 'titley', 0, 0, [2, None]], + [5, 'show', 0, 0, [2, 6, 7]], + [6, ['string',_('Title')], 0, 0, [5, None]], + [7, 'setscale', 0, 0, [5, 8, 9]], + [8, ['number', '90'], 0, 0, [7, None]], + [9, 'setxy', 0, 0, [7, 10, 11, 12]], + [10, 'leftx', 0, 0, [9, None]], + [11, 'topy', 0, 0, [9, None]], + [12, 'showaligned', 0, 0, [9, 13, 14]], + [13, 'journal', 0, 0, [12, None]], + [14, 'sandwichbottom', 0, 0, [12, None]]], 'picture2x2': - [[0, 'comment', 0, 0, [None, 1, 2]], + [[0, 'sandwichtop', 0, 0, [None, 1, 2]], [1, ['string', _('2×2 pictures')], 0, 0, [0, None]], - [2, 'sandwichtop', 0, 0, [0, 3]], - [3, 'setxy', 0, 0, [2, 4, 5, 6]], - [4, 'titlex', 0, 0, [3, None]], - [5, 'titley', 0, 0, [3, None]], - [6, 'show', 0, 0, [3, 7, 8]], - [7, ['string',_('Title')], 0, 0, [6, None]], - [8, 'setscale', 0, 0, [6, 9, 10]], - [9, ['number', '45'], 0, 0, [8, None]], - [10, 'setxy', 0, 0, [8, 11, 12, 13]], - [11, 'leftx', 0, 0, [10, None]], - [12, 'topy', 0, 0, [10, None]], - [13, 'showaligned', 0, 0, [10, 14, 15]], - [14, 'journal', 0, 0, [13, None]], - [15, 'setxy', 0, 0, [13, 16, 17, 18]], - [16, 'rightx', 0, 0, [15, None]], - [17, 'topy', 0, 0, [15, None]], - [18, 'showaligned', 0, 0, [15, 19, 20]], - [19, 'journal', 0, 0, [18, None]], - [20, 'setxy', 0, 0, [18, 21, 22, 23]], - [21, 'leftx', 0, 0, [20, None]], - [22, 'bottomy', 0, 0, [20, None]], - [23, 'showaligned', 0, 0, [20, 24, 25]], - [24, 'journal', 0, 0, [23, None]], - [25, 'setxy', 0, 0, [23, 26, 27, 28]], - [26, 'rightx', 0, 0, [25, None]], - [27, 'bottomy', 0, 0, [25, None]], - [28, 'showaligned', 0, 0, [25, 29, 30]], - [29, 'journal', 0, 0, [28, None]], - [30, 'sandwichbottom', 0, 0, [28, None]]], + [2, 'setxy', 0, 0, [0, 3, 4, 5]], + [3, 'titlex', 0, 0, [2, None]], + [4, 'titley', 0, 0, [2, None]], + [5, 'show', 0, 0, [2, 6, 7]], + [6, ['string',_('Title')], 0, 0, [5, None]], + [7, 'setscale', 0, 0, [5, 8, 9]], + [8, ['number', '90'], 0, 0, [7, None]], + [9, 'setxy', 0, 0, [7, 10, 11, 12]], + [10, 'leftx', 0, 0, [9, None]], + [11, 'topy', 0, 0, [9, None]], + [12, 'showaligned', 0, 0, [9, 13, 14]], + [13, 'journal', 0, 0, [12, None]], + [14, 'setxy', 0, 0, [12, 15, 16, 17]], + [15, 'rightx', 0, 0, [14, None]], + [16, 'topy', 0, 0, [14, None]], + [17, 'showaligned', 0, 0, [14, 18, 19]], + [18, 'journal', 0, 0, [17, None]], + [19, 'setxy', 0, 0, [17, 20, 21, 22]], + [20, 'leftx', 0, 0, [19, None]], + [21, 'bottomy', 0, 0, [19, None]], + [22, 'showaligned', 0, 0, [19, 23, 24]], + [23, 'journal', 0, 0, [22, None]], + [24, 'setxy', 0, 0, [22, 25, 26, 27]], + [25, 'rightx', 0, 0, [24, None]], + [26, 'bottomy', 0, 0, [24, None]], + [27, 'showaligned', 0, 0, [24, 28, 29]], + [28, 'journal', 0, 0, [27, None]], + [29, 'sandwichbottom', 0, 0, [27, None]]], 'picture2x1': - [[0, 'comment', 0, 0, [None, 1, 2]], + [[0, 'sandwichtop', 0, 0, [None, 1, 2]], [1, ['string', _('2×1 pictures')], 0, 0, [0, None]], - [2, 'sandwichtop', 0, 0, [0, 3]], - [3, 'setxy', 0, 0, [2, 4, 5, 6]], - [4, 'titlex', 0, 0, [3, None]], - [5, 'titley', 0, 0, [3, None]], - [6, 'show', 0, 0, [3, 7, 8]], - [7, ['string',_('Title')], 0, 0, [6, None]], - [8, 'setscale', 0, 0, [6, 9, 10]], - [9, ['number', '45'], 0, 0, [8, None]], - [10, 'setxy', 0, 0, [8, 11, 12, 13]], - [11, 'leftx', 0, 0, [10, None]], - [12, 'topy', 0, 0, [10, None]], - [13, 'showaligned', 0, 0, [10, 14, 15]], - [14, 'journal', 0, 0, [13, None]], - [15, 'setxy', 0, 0, [13, 16, 17, 18]], - [16, 'rightx', 0, 0, [15, None]], - [17, 'topy', 0, 0, [15, None]], - [18, 'showaligned', 0, 0, [15, 19, 20]], - [19, 'journal', 0, 0, [18, None]], - [20, 'setxy', 0, 0, [18, 21, 22, 23]], - [21, 'leftx', 0, 0, [20, None]], - [22, 'bottomy', 0, 0, [20, None]], - [23, 'showaligned', 0, 0, [20, 24, 25]], - [24, 'description', 0, 0, [23, None]], - [25, 'setxy', 0, 0, [23, 26, 27, 28]], - [26, 'rightx', 0, 0, [25, None]], - [27, 'bottomy', 0, 0, [25, None]], - [28, 'showaligned', 0, 0, [25, 29, 30]], - [29, 'description', 0, 0, [28, None]], - [30, 'sandwichbottom', 0, 0, [28, None]]], + [2, 'setxy', 0, 0, [0, 3, 4, 5]], + [3, 'titlex', 0, 0, [2, None]], + [4, 'titley', 0, 0, [2, None]], + [5, 'show', 0, 0, [2, 6, 7]], + [6, ['string',_('Title')], 0, 0, [5, None]], + [7, 'setscale', 0, 0, [5, 8, 9]], + [8, ['number', '90'], 0, 0, [7, None]], + [9, 'setxy', 0, 0, [7, 10, 11, 12]], + [10, 'leftx', 0, 0, [9, None]], + [11, 'topy', 0, 0, [9, None]], + [12, 'showaligned', 0, 0, [9, 13, 14]], + [13, 'journal', 0, 0, [12, None]], + [14, 'setxy', 0, 0, [12, 15, 16, 17]], + [15, 'rightx', 0, 0, [14, None]], + [16, 'topy', 0, 0, [14, None]], + [17, 'showaligned', 0, 0, [14, 18, 19]], + [18, 'journal', 0, 0, [17, None]], + [19, 'setxy', 0, 0, [17, 20, 21, 22]], + [20, 'leftx', 0, 0, [19, None]], + [21, 'bottomy', 0, 0, [19, None]], + [22, 'showaligned', 0, 0, [19, 23, 24]], + [23, 'description', 0, 0, [22, None]], + [24, 'setxy', 0, 0, [22, 25, 26, 27]], + [25, 'rightx', 0, 0, [24, None]], + [26, 'bottomy', 0, 0, [24, None]], + [27, 'showaligned', 0, 0, [24, 28, 29]], + [28, 'description', 0, 0, [27, None]], + [29, 'sandwichbottom', 0, 0, [27, None]]], 'picture1x2': - [[0, 'comment', 0, 0, [None, 1, 2]], + [[0, 'sandwichtop', 0, 0, [None, 1, 2]], [1, ['string', _('1×2 pictures')], 0, 0, [0, None]], - [2, 'sandwichtop', 0, 0, [0, 3]], - [3, 'setxy', 0, 0, [2, 4, 5, 6]], - [4, 'titlex', 0, 0, [3, None]], - [5, 'titley', 0, 0, [3, None]], - [6, 'show', 0, 0, [3, 7, 8]], - [7, ['string',_('Title')], 0, 0, [6, None]], - [8, 'setscale', 0, 0, [6, 9, 10]], - [9, ['number', '45'], 0, 0, [8, None]], - [10, 'setxy', 0, 0, [8, 11, 12, 13]], - [11, 'leftx', 0, 0, [10, None]], - [12, 'topy', 0, 0, [10, None]], - [13, 'showaligned', 0, 0, [10, 14, 15]], - [14, 'journal', 0, 0, [13, None]], - [15, 'setxy', 0, 0, [13, 16, 17, 18]], - [16, 'rightx', 0, 0, [15, None]], - [17, 'topy', 0, 0, [15, None]], - [18, 'showaligned', 0, 0, [15, 19, 20]], - [19, 'description', 0, 0, [18, None]], - [20, 'setxy', 0, 0, [18, 21, 22, 23]], - [21, 'leftx', 0, 0, [20, None]], - [22, 'bottomy', 0, 0, [20, None]], - [23, 'showaligned', 0, 0, [20, 24, 25]], - [24, 'journal', 0, 0, [23, None]], - [25, 'setxy', 0, 0, [23, 26, 27, 28]], - [26, 'rightx', 0, 0, [25, None]], - [27, 'bottomy', 0, 0, [25, None]], - [28, 'showaligned', 0, 0, [25, 29, 30]], - [29, 'description', 0, 0, [28, None]], - [30, 'sandwichbottom', 0, 0, [28, None]]] + [2, 'setxy', 0, 0, [0, 3, 4, 5]], + [3, 'titlex', 0, 0, [2, None]], + [4, 'titley', 0, 0, [2, None]], + [5, 'show', 0, 0, [2, 6, 7]], + [6, ['string',_('Title')], 0, 0, [5, None]], + [7, 'setscale', 0, 0, [5, 8, 9]], + [8, ['number', '90'], 0, 0, [7, None]], + [9, 'setxy', 0, 0, [7, 10, 11, 12]], + [10, 'leftx', 0, 0, [9, None]], + [11, 'topy', 0, 0, [9, None]], + [12, 'showaligned', 0, 0, [9, 13, 14]], + [13, 'journal', 0, 0, [12, None]], + [14, 'setxy', 0, 0, [12, 15, 16, 17]], + [15, 'rightx', 0, 0, [14, None]], + [16, 'topy', 0, 0, [14, None]], + [17, 'showaligned', 0, 0, [14, 18, 19]], + [18, 'description', 0, 0, [17, None]], + [19, 'setxy', 0, 0, [17, 20, 21, 22]], + [20, 'leftx', 0, 0, [19, None]], + [21, 'bottomy', 0, 0, [19, None]], + [22, 'showaligned', 0, 0, [19, 23, 24]], + [23, 'journal', 0, 0, [22, None]], + [24, 'setxy', 0, 0, [22, 25, 26, 27]], + [25, 'rightx', 0, 0, [24, None]], + [26, 'bottomy', 0, 0, [24, None]], + [27, 'showaligned', 0, 0, [24, 28, 29]], + [28, 'description', 0, 0, [27, None]], + [29, 'sandwichbottom', 0, 0, [27, None]]] } # @@ -360,6 +357,11 @@ MACROS = { EXPANDABLE = ['vspace', 'hspace', 'templatelist', 'list', 'identity2', 'myfunc'] # +# Blocks that are 'collapsible' +# +COLLAPSIBLE = ['sandwichbottom'] + +# # Depreciated block styles that need dock adjustments # OLD_DOCK = ['and', 'or', 'plus', 'minus', 'division', 'product', 'remainder'] @@ -449,8 +451,8 @@ BLOCK_NAMES = { 'rightx':[_('picture right')], 'savepix':[_('save picture')], 'scale':[_('scale')], - 'sandwichtop':[_('top of stack')], - 'sandwichbottom':[_('bottom of stack')], + 'sandwichtop':['top of stack'], + 'sandwichbottom':[''], 'setcolor':[_('set color')], 'seth':[_('set heading')], 'setpensize':[_('set pen size')], @@ -559,7 +561,7 @@ PRIMITIVES = { 'right':'right', 'rightpos':'rpos', 'rightx':'rightx', - 'sandwichtop':'nop', + 'sandwichtop':'comment', 'sandwichbottom':'nop', 'savepix':'savepix', 'scale':'scale', @@ -630,6 +632,7 @@ DEFAULTS = { 'random':[0, 100], 'repeat':[4, None, 'vspace'], 'right':[90], + 'sandwichtop':[_('label')], 'savepix':[_('picture name')], 'setcolor':[0], 'seth':[0], -- cgit v0.9.1