Author: reinhard Date: 2011-06-18 04:18:13 -0500 (Sat, 18 Jun 2011) New Revision: 10329
Modified: trunk/gnue-designer/ trunk/gnue-designer/FAQ trunk/gnue-designer/src/forms/Incubator.py trunk/gnue-designer/src/forms/PagePainter/skins/common.py trunk/gnue-designer/src/forms/PagePainter/skins/default.py trunk/gnue-designer/src/templates/forms/Simple.py Log: Nominally display entries on page canvas after running simple form wizard. Need to implement managed layout for canvas display in Designer. Property changes on: trunk/gnue-designer ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2011-06-09 14:24:06.015000105 -0700 committer: whizman properties: branch-nick: designer + timestamp: 2011-06-10 12:37:06.089999914 -0700 committer: whizman properties: branch-nick: designer Name: bzr:file-ids - doc/Users-Guide.odt usersguide.odt-20110609212355-uadgfhqmdzfsqugq-1 + FAQ 5245@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:FAQ src/forms/Incubator.py 2934@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:src%2Fforms%2FIncubator.py src/forms/PagePainter/skins/common.py 8340@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:src%2Fforms%2FPagePainter%2Fskins%2Fcommon.py src/forms/PagePainter/skins/default.py 8340@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:src%2Fforms%2FPagePainter%2Fskins%2Fdefault.py src/templates/forms/Simple.py 1411@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:src%2Ftemplates%2Fforms%2FSimple.py Name: bzr:revision-id:v4 - 937 reinhard.muel...@bytewise.at-20100426083744-iq5ahvdxf38ltx6r 938 whizman_software_solutions_www.whizman.com-20110131201023-bmx4kgkf4erlim85 939 whizman_software_solutions_www.whizman.com-20110226005239-cn6eioyybe5p62rh 940 whizman-20110504201148-w669gtbff176vhop 941 whizman-20110505231025-243w4sfxhzqcbzt2 942 whizman-20110509181949-gnbxobve89qk8pr5 943 whizman-20110509204654-xx9cb9tiuszib409 944 whizman-20110519181636-ighctsn5h1uftknz 945 whizman-20110527230256-kqjr2eb33a29zy9o 946 whizman-20110527235820-zqeownp0345308ww 947 whizman-20110601222222-rvg8tu47q0x6y6rf 948 whizman-20110602174655-bbnm4cs5i6ht5mbg 949 whizman-20110604010805-vqpv6d319epfvvq0 950 whizman-20110609205251-fos3f8ur2m1bnkgv 951 whizman-20110609212406-jyc6m05v8dwxm3vx + 937 reinhard.muel...@bytewise.at-20100426083744-iq5ahvdxf38ltx6r 938 whizman_software_solutions_www.whizman.com-20110131201023-bmx4kgkf4erlim85 939 whizman_software_solutions_www.whizman.com-20110226005239-cn6eioyybe5p62rh 940 whizman-20110504201148-w669gtbff176vhop 941 whizman-20110505231025-243w4sfxhzqcbzt2 942 whizman-20110509181949-gnbxobve89qk8pr5 943 whizman-20110509204654-xx9cb9tiuszib409 944 whizman-20110519181636-ighctsn5h1uftknz 945 whizman-20110527230256-kqjr2eb33a29zy9o 946 whizman-20110527235820-zqeownp0345308ww 947 whizman-20110601222222-rvg8tu47q0x6y6rf 948 whizman-20110602174655-bbnm4cs5i6ht5mbg 949 whizman-20110604010805-vqpv6d319epfvvq0 950 whizman-20110609205251-fos3f8ur2m1bnkgv 951 whizman-20110609212406-jyc6m05v8dwxm3vx 952 whizman-20110610193706-5vjbvkyd9w3male1 Name: bzr:text-parents - + FAQ svn-v3-single1-dHJ1bmsvZ251ZS1kZXNpZ25lcg..:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:9998 src/forms/Incubator.py svn-v3-single1-dHJ1bmsvZ251ZS1kZXNpZ25lcg..:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:9955 src/forms/PagePainter/skins/common.py svn-v3-single1-dHJ1bmsvZ251ZS1kZXNpZ25lcg..:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:9955 src/forms/PagePainter/skins/default.py whizman-20110604010805-vqpv6d319epfvvq0 src/templates/forms/Simple.py whizman-20110609205251-fos3f8ur2m1bnkgv Modified: trunk/gnue-designer/FAQ =================================================================== --- trunk/gnue-designer/FAQ 2011-06-18 09:18:10 UTC (rev 10328) +++ trunk/gnue-designer/FAQ 2011-06-18 09:18:13 UTC (rev 10329) @@ -14,3 +14,8 @@ development and is not any more up to the current status of the other tools. If you are interested in working on GNUe Designer, please contact us! + + Q: What can do GNUe Designer do now? + + A: As of 2011-06, GNUe Designer new form wizard can create a prototype form, + which you can manually refine based on the sample GFD files. Modified: trunk/gnue-designer/src/forms/Incubator.py =================================================================== --- trunk/gnue-designer/src/forms/Incubator.py 2011-06-18 09:18:10 UTC (rev 10328) +++ trunk/gnue-designer/src/forms/Incubator.py 2011-06-18 09:18:13 UTC (rev 10329) @@ -34,5 +34,5 @@ def _handleUnknownAttribute(self, tag, object, attr, value): # Hackery for forms Layout Management (namespace) support - if attr.find(':')+1: + if attr.find(':') >= 0: object.__dict__[attr.replace(':','__')] = value Modified: trunk/gnue-designer/src/forms/PagePainter/skins/common.py =================================================================== --- trunk/gnue-designer/src/forms/PagePainter/skins/common.py 2011-06-18 09:18:10 UTC (rev 10328) +++ trunk/gnue-designer/src/forms/PagePainter/skins/common.py 2011-06-18 09:18:13 UTC (rev 10329) @@ -76,17 +76,27 @@ x = object['Char:x'] y = object['Char:y'] except: - x = y = 0 + try: # experimental 2011-06 + x = object['__posx']; + y = object['__posy']; + except: + x = y = 0 try: width = object['Char:width'] except KeyError: - width = self.char_default_width + try: + width = object['__poswidth'] + except KeyError: + width = self.char_default_width try: height = object['Char:height'] except KeyError: - height = self.char_default_height + try: + height = object['__posheight'] + except KeyError: + height = self.char_default_height # Convert from Char positions into wx positions x *= char_x_scale Modified: trunk/gnue-designer/src/forms/PagePainter/skins/default.py =================================================================== --- trunk/gnue-designer/src/forms/PagePainter/skins/default.py 2011-06-18 09:18:10 UTC (rev 10328) +++ trunk/gnue-designer/src/forms/PagePainter/skins/default.py 2011-06-18 09:18:13 UTC (rev 10329) @@ -78,7 +78,7 @@ x = -1 * common.char_x_scale y = -1 * common.char_y_scale width = 41 #object['Char:width'] + 1 - height = 13 #object['Char:height'] + 1 + height = 14 #object['Char:height'] + 1 # Convert from Char positions into wx positions width *= common.char_x_scale @@ -246,6 +246,20 @@ target_dc.SetBrush(wx.Brush(color_map['widgetback'])) x, y, width, height = self.draw_area.Get() target_dc.DrawRectangle(x, y, width, height) + try: + labelText = self.gobject['label'] + #char_x_scale = common.char_x_scale + target_dc.SetFont(font_map['label']) + x = self.gobject['__posl'] + # Center each character in its cell + for char in labelText: + text_width, text_height = target_dc.GetTextExtent(char) + target_dc.DrawText(char, + x + (common.char_x_scale - text_width) // 2, + y + 1) + x += common.char_x_scale + except: # no label attribute + pass def get_movable_siblings(self): """ Modified: trunk/gnue-designer/src/templates/forms/Simple.py =================================================================== --- trunk/gnue-designer/src/templates/forms/Simple.py 2011-06-18 09:18:10 UTC (rev 10328) +++ trunk/gnue-designer/src/templates/forms/Simple.py 2011-06-18 09:18:13 UTC (rev 10329) @@ -353,8 +353,8 @@ # # Resize the layout screen to fit our form # - # layout['_poswidth'] = width - # layout['_posheight'] = height + # layout[':poswidth'] = width + # layout[':posheight'] = height # @@ -370,13 +370,13 @@ # # First, the label # - labelText, x, y = labelQueue[i] + labelText, lx, ly = labelQueue[i] # self.AddElement( 'label', curParent, - # {'_posx': x, - # '_posy': y, + # {':posx': x, + # ':posy': y, # 'name': "lbl%s" % (text[-1]==':' and text[:-1] or text), # 'text': text, - # '_poswidth': len(text)}) + # ':poswidth': len(text)}) # # And the entry... @@ -386,9 +386,11 @@ 'field': field['name'], 'block': block['name'], 'label': labelText, - '_posx': x, - '_posy': y, - '_poswidth': defaultWidth + ':posx': x, + ':posy': y, + ':posl': lx, + ':posm': ly, + ':poswidth': defaultWidth } # If we have a length for the field, use this as the length @@ -396,7 +398,7 @@ # 2011-06: change to managed layout # if do anything with this in meantime, see hasattr above # try: - # attrs['_poswidth'] = min(field['length'], 40) \ + # attrs[':poswidth'] = min(field['length'], 40) \ # or defaultWidth # beware None # except KeyError: # pass _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org https://lists.gnu.org/mailman/listinfo/commit-gnue