daboide Commit
Revision 183
Date: 2005-10-02 05:50:29 -0700 (Sun, 02 Oct 2005)
Author: ed
Changed:
U trunk/Designer.py
U trunk/DesignerControlMixin.py
U trunk/DesignerFormMixin.py
U trunk/DesignerMenu.py
U trunk/DesignerPropSheet.py
U trunk/wizards/AppWizard.py
Log:
I'm committing the the Designer stuff so I can test out some odd behavior on
other platforms.
Diff:
Modified: trunk/Designer.py
===================================================================
--- trunk/Designer.py 2005-09-28 22:14:40 UTC (rev 182)
+++ trunk/Designer.py 2005-10-02 12:50:29 UTC (rev 183)
@@ -94,7 +94,7 @@
# Create the control palette
palette = self.ControlPalette
- palette.Visible = True
+ palette.Visible = False
self.updateLayout()
@@ -281,10 +281,24 @@
self.Tree.updateDisplay(self.MainForm)
- def togglePropSheet(self):
- self._propSheetForm. Visible = not self._propSheetForm. Visible
+ def togglePropSheet(self, menubar):
+ self._menuToggle(self._propSheetForm, menubar)
+ def togglePalette(self, menubar):
+ self._menuToggle(self.ControlPalette, menubar)
+
+
+ def _menuToggle(self, itm, bar):
+ newVis = not itm.Visible
+ itm.Visible = newVis
+ oldCap = bar.Caption
+ if newVis:
+ bar.Caption = oldCap.replace("Show", "Hide")
+ else:
+ bar.Caption = oldCap.replace("Hide", "Show")
+
+
def select(self, objs, shift=False):
"""Called when an object or objects are selected. If the
shift parameter is True, the currently selected objects
@@ -415,7 +429,8 @@
def _getPalette(self):
if self._palette is None:
- cp = self._palette = dui.dToolForm(self.MainForm,
Caption=_("Control Palette"))
+ cp = self._palette = dui.dToolForm(self.MainForm,
+ Caption=_("Control Palette"))
self._palette.app = self
# Until we get good graphics, just use regular buttons
with
# captions instead of icons.
Modified: trunk/DesignerControlMixin.py
===================================================================
--- trunk/DesignerControlMixin.py 2005-09-28 22:14:40 UTC (rev 182)
+++ trunk/DesignerControlMixin.py 2005-10-02 12:50:29 UTC (rev 183)
@@ -320,7 +320,8 @@
"Right": {"type" : int, "readonly" : True},
"Top": {"type" : int, "readonly" : True},
"Bottom": {"type" : int, "readonly" : True}}
- sizerProps = {"Sizer_Proportion": {"type" : int, "readonly" :
False},
+ sizerProps = {"Sizer_Border": {"type" : int, "readonly" :
False},
+ "Sizer_Proportion": {"type" : int, "readonly" :
False},
"Sizer_HAlign": {"type" : list, "readonly" :
False,
"values" : ["Left", "Right", "Center"]},
"Sizer_VAlign": {"type" : list, "readonly" :
False,
@@ -440,6 +441,11 @@
def _getContainerState(self):
return isinstance(self, (dabo.ui.dPanel, dabo.ui.dForm,
dabo.ui.dDialog) )
+ def _getSzBorder(self):
+ return
self.ControllingSizer.getItemProp(self.ControllingSizerItem, "Border")
+ def _setSzBorder(self, val):
+ self.ControllingSizer.setItemProp(self.ControllingSizerItem,
"Border", val)
+
def _getSzExpand(self):
return
self.ControllingSizer.getItemProp(self.ControllingSizerItem, "Expand")
pass
@@ -507,6 +513,9 @@
IsMainControl = property(_getIsMain, _setIsMain, None,
_("Is this the main control of the designer, or
contained within the main control? (bool)"))
+ Sizer_Border = property(_getSzBorder, _setSzBorder, None,
+ _("Border setting of controlling sizer item (int)"))
+
Sizer_Expand = property(_getSzExpand, _setSzExpand, None,
_("Expand setting of controlling sizer item (bool)"))
Modified: trunk/DesignerFormMixin.py
===================================================================
--- trunk/DesignerFormMixin.py 2005-09-28 22:14:40 UTC (rev 182)
+++ trunk/DesignerFormMixin.py 2005-10-02 12:50:29 UTC (rev 183)
@@ -68,10 +68,13 @@
def onTogglePropSheet(self, evt=None):
- print "TOGGLE EVT", evt
- self.app.togglePropSheet()
+ self.app.togglePropSheet(self.barShowPropSheet)
+ def onTogglePalette(self, evt=None):
+ self.app.togglePalette(self.barShowPalette)
+
+
def panelClick(self, panel, shift):
"""Called when a layout panel (for an empty sizer slot) is
clicked by the user. Pass the sizer item up to the app.
Modified: trunk/DesignerMenu.py
===================================================================
--- trunk/DesignerMenu.py 2005-09-28 22:14:40 UTC (rev 182)
+++ trunk/DesignerMenu.py 2005-10-02 12:50:29 UTC (rev 183)
@@ -20,6 +20,9 @@
parent.barShowPropSheet = vm.append("Hide Prop Sheet",
bindfunc=target.onTogglePropSheet,
help="Show/hide the Property Sheet")
+ parent.barShowPalette = vm.append("Show Tool Palette",
+ bindfunc=target.onTogglePalette,
+ help="Show/hide the Tool Palette")
fm.prependSeparator()
fm.prepend("&Open\tCtrl+O", bindfunc=target.onOpenDesign)
fm.prepend("&Save\tCtrl+S", bindfunc=target.onSaveDesign)
Modified: trunk/DesignerPropSheet.py
===================================================================
--- trunk/DesignerPropSheet.py 2005-09-28 22:14:40 UTC (rev 182)
+++ trunk/DesignerPropSheet.py 2005-10-02 12:50:29 UTC (rev 183)
@@ -48,13 +48,6 @@
self.floatEditorClass = col.floatEditorClass
self.listEditorClass = col.listEditorClass
-# DS [{'readonly': False, 'type': 'color', 'val': wx.Colour(221, 221,
-# 221), 'prop': 'BackColor'}, {'readonly': False, 'type': <type 'str'>,
-# 'val': u'Dabo Designer', 'prop': 'Caption'}, {'readonly': False,
-# 'type': <type 'int'>, 'val': 703, 'prop': 'Height'}, {'readonly':
-# False, 'type': <type 'bool'>, 'val': True, 'prop': 'ShowCaption'},
-# {'readonly': False, 'type': <type 'int'>, 'val': 584, 'prop':
-# 'Width'}]
def getPropDictForRow(self, row):
prop = self.getValue(row, 0)
@@ -136,6 +129,9 @@
def onGridCellSelected(self, evt):
+
+ print "CELL SELECTED", evt.EventData["row"],
evt.EventData["col"]
+
if self.RowCount < 1:
return
row, col = evt.EventData["row"], evt.EventData["col"]
@@ -175,11 +171,16 @@
dabo.ui.callAfter(self.DisableCellEditControl)
- def afterGridCellEdited(self, row, col, newVal):
- pd = self.getPropDictForRow(row)
- typ = pd["type"]
+ def onGridCellEdited(self, evt):
+
+ print "CELL EDITED", evt.EventData["row"], evt.EventData["col"]
+
+ row, col = evt.EventData["row"], evt.EventData["col"]
+ newVal = self.getValue(row, col)
if newVal != self._origVal:
prop = self.getValue(row, 0)
+ pd = self.getPropDictForRow(row)
+ typ = pd["type"]
self.Parent.updateVal(prop, newVal, typ)
Modified: trunk/wizards/AppWizard.py
===================================================================
--- trunk/wizards/AppWizard.py 2005-09-28 22:14:40 UTC (rev 182)
+++ trunk/wizards/AppWizard.py 2005-10-02 12:50:29 UTC (rev 183)
@@ -1206,7 +1206,7 @@
"""
typeConversion = {"I" : "int", "C" : "char", "M" : "memo", "D" :
"date",
- "N" : "float", "?" : "char", "L" : "bool", "B" :
"bool", "T" : "datetime"}
+ "N" : "float", "F" : "float", "?" : "char", "L" :
"bool", "B" : "bool", "T" : "datetime"}
tableXML = ""
tables = tbDict.keys()
tables.sort()
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev