dabo Commit
Revision 5815
Date: 2010-05-17 07:22:17 -0700 (Mon, 17 May 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5815

Changed:
U   trunk/ide/ClassDesigner.py
U   trunk/ide/ClassDesignerComponents.py
U   trunk/ide/ClassDesignerControlMixin.py

Log:
Incorporated dPageStyled into the Class Designer.


Diff:
Modified: trunk/ide/ClassDesigner.py
===================================================================
--- trunk/ide/ClassDesigner.py  2010-05-17 14:17:16 UTC (rev 5814)
+++ trunk/ide/ClassDesigner.py  2010-05-17 14:22:17 UTC (rev 5815)
@@ -78,7 +78,7 @@
                self._addingClass = False
                # Tuple of all paged-control classes
                self.pagedControls = (dui.dPageFrame, dui.dPageList, 
dui.dPageSelect,
-                               dui.dPageFrameNoTabs)
+                               dui.dPageFrameNoTabs, dui.dPageStyled)
                self.MainFormClass = None
                # Only applies when running as an app
                if isinstance(self, dabo.dApp):
@@ -160,6 +160,7 @@
                                {"name" : "PageFrame", "class" : 
dui.dPageFrame, "order" : 200},
                                {"name" : "PageList", "class" : dui.dPageList, 
"order" : 210},
                                {"name" : "PageSelect", "class" : 
dui.dPageSelect, "order" : 220},
+                               {"name" : "PageStyled", "class" : 
dui.dPageStyled, "order" : 225},
                                {"name" : "PageFrameNoTabs", "class" : 
dui.dPageFrameNoTabs, "order" : 230},
                                {"name" : "Slider", "class" : dui.dSlider, 
"order" : 240},
                                {"name" : "Spinner", "class" : dui.dSpinner, 
"order" : 250},
@@ -243,10 +244,10 @@
                classes = (dui.dBox, dui.dBitmap, dui.dBitmapButton, 
dui.dButton, dui.dCheckBox, dui.dComboBox,
                                dui.dDateTextBox, dui.dDialog, 
dui.dDropdownList, dui.dEditBox, dui.dEditor, dui.dSlidePanelControl,
                                dui.dForm, dui.dDockForm, dui.dGauge, 
dui.dGrid, dui.dHtmlBox, dui.dImage, dui.dLabel, dui.dLed, 
-                               dui.dLine, dui.dListBox, dui.dListControl, 
dui.dOkCancelDialog, dui.dPanel, dui.dPage, 
-                               dui.dScrollPanel, dui.dPage, dui.dPageFrame, 
dui.dPageList, dui.dPageSelect, dui.dPageFrameNoTabs, 
-                               dui.dRadioList, dui.dSlider, dui.dSpinner, 
dui.dSplitter, dui.dTextBox, dui.dToggleButton, 
-                               dui.dTreeView, dlgs.Wizard, dlgs.WizardPage)
+                               dui.dLine, dui.dListBox, dui.dListControl, 
dui.dOkCancelDialog, dui.dPanel, dui.dPage, dui.dScrollPanel,
+                               dui.dPage, dui.dPageFrame, dui.dPageList, 
dui.dPageSelect, dui.dPageStyled, dui.dPageFrameNoTabs,
+                               dui.dRadioList, dui.dSlider, dui.dSpinner, 
dui.dSplitter, dui.dTextBox, dui.dToggleButton, dui.dTreeView,
+                               dlgs.Wizard, dlgs.WizardPage)
 
                def evtsForClass(cls):
                        def safeApplies(itm, cls):
@@ -1760,13 +1761,13 @@
                                # Create a dropdown list containing all the 
choices.
                                # NOTE: This would be an excellent candidate 
for usage ordering.
                                chc = ["Form", "DockForm", "Panel", 
"ScrollPanel", "SlidePanel", "Plain Dialog", "OK/Cancel Dialog",
-                               "Wizard", "WizardPage", "PageFrame", 
"PageList", "PageSelect", "PageNoTabs", "Box", "Bitmap",
+                               "Wizard", "WizardPage", "PageFrame", 
"PageList", "PageSelect", "PageStyled", "PageNoTabs", "Box", "Bitmap",
                                "BitmapButton", "Button", "CheckBox", 
"ComboBox", "DateTextBox", "DropdownList", "EditBox", 
                                "Editor", "Gauge", "Grid", "HtmlBox", "Image", 
"Label", "LED", "Line", "ListBox", "ListControl", "Page",
                                "RadioList", "Slider", "Spinner", "Splitter", 
"TextBox", "ToggleButton", "TreeView"]
                                keys = [dui.dForm, dui.dDockForm, dui.dPanel, 
dui.dScrollPanel, dui.dSlidePanelControl, dui.dDialog,
                                                dui.dOkCancelDialog, 
dlgs.Wizard, dlgs.WizardPage, dui.dPageFrame, dui.dPageList,
-                                               dui.dPageSelect, 
dui.dPageFrameNoTabs, dui.dBox, dui.dBitmap, dui.dBitmapButton,
+                                               dui.dPageSelect, 
dui.dPageStyled, dui.dPageFrameNoTabs, dui.dBox, dui.dBitmap, dui.dBitmapButton,
                                                dui.dButton, dui.dCheckBox, 
dui.dComboBox, dui.dDateTextBox, dui.dDropdownList,
                                                dui.dEditBox, dui.dEditor, 
dui.dGauge, dui.dGrid, dui.dHtmlBox, dui.dImage, dui.dLabel,
                                                dui.dLine, dui.dLed, 
dui.dListBox, dui.dListControl, dui.dPage, dui.dRadioList, dui.dSlider,
@@ -3037,6 +3038,7 @@
                        pop.append(_("Add PageFrame"), 
OnHit=self.onNewPageFrame)
                        pop.append(_("Add PageList"), OnHit=self.onNewPageList)
                        pop.append(_("Add PageSelect"), 
OnHit=self.onNewPageSelect)
+                       pop.append(_("Add PageStyled"), 
OnHit=self.onNewPageStyled)
                        pop.append(_("Add PageNoTabs"), 
OnHit=self.onNewPageNoTabs)
                        mainpop.appendMenu(pop)
                        pop = dui.dMenu(Caption=self._customClassCaption)
@@ -3250,6 +3252,8 @@
                dui.callAfter(self.addNewControl, None, dui.dPageList)
        def onNewPageSelect(self, evt):
                dui.callAfter(self.addNewControl, None, dui.dPageSelect)
+       def onNewPageStyled(self, evt):
+               dui.callAfter(self.addNewControl, None, dui.dPageStyled)
        def onNewPageNoTabs(self, evt):
                dui.callAfter(self.addNewControl, None, dui.dPageFrameNoTabs)
        def onNewSlider(self, evt):
@@ -3614,6 +3618,7 @@
                                        _("PageFrame") : self.onNewPageFrame,
                                        _("PageList") : self.onNewPageList,
                                        _("PageSelect") : self.onNewPageSelect,
+                                       _("PageStyled") : self.onNewPageStyled,
                                        _("PageNoTabs") : self.onNewPageNoTabs,
                                        _("SlidePanelControl") : 
self.onNewSlidePanelControl,
                                        _("Slider") : self.onNewSlider,
@@ -4035,6 +4040,7 @@
                                        (_("PageFrame"), dui.dPageFrame),
                                        (_("PageList"), dui.dPageList),
                                        (_("PageSelect"), dui.dPageSelect),
+                                       (_("PageStyled"), dui.dPageStyled),
                                        (_("PageNoTabs"), dui.dPageFrameNoTabs),
                                        (_("RadioList"), dui.dRadioList),
                                        (_("Slider"), dui.dSlider),

Modified: trunk/ide/ClassDesignerComponents.py
===================================================================
--- trunk/ide/ClassDesignerComponents.py        2010-05-17 14:17:16 UTC (rev 
5814)
+++ trunk/ide/ClassDesignerComponents.py        2010-05-17 14:22:17 UTC (rev 
5815)
@@ -378,7 +378,7 @@
                if insideClass:
                        childDict = clsChildren.get("children", [])
                if isinstance(self, (dabo.ui.dPageFrame, dabo.ui.dPageList,
-                               dabo.ui.dPageSelect, dabo.ui.dPageFrameNoTabs)):
+                               dabo.ui.dPageSelect, dabo.ui.dPageStyled, 
dabo.ui.dPageFrameNoTabs)):
                        nonSizerKids = kids
                elif isinstance(self, dabo.ui.dGrid):
                        # Grid children are Columns
@@ -446,6 +446,7 @@
                                if isinstance(self, (dabo.ui.dRadioList,
                                                dabo.ui.dSpinner,
                                                dabo.ui.dPageSelect,
+                                               dabo.ui.dPageStyled,
                                                dabo.ui.dColumn,
                                                
dabo.ui.dTreeView.getBaseNodeClass())):
                                        sz = None

Modified: trunk/ide/ClassDesignerControlMixin.py
===================================================================
--- trunk/ide/ClassDesignerControlMixin.py      2010-05-17 14:17:16 UTC (rev 
5814)
+++ trunk/ide/ClassDesignerControlMixin.py      2010-05-17 14:22:17 UTC (rev 
5815)
@@ -111,7 +111,7 @@
                        # Bind the selected node to the current selection
                        self.bindEvent(dEvents.TreeSelection, 
self.desSelectNode)
                elif isinstance(self, (dui.dPageFrame, dui.dPageList, 
-                               dui.dPageSelect, dui.dPageFrameNoTabs)):
+                               dui.dPageSelect, dui.dPageStyled, 
dui.dPageFrameNoTabs)):
                        self.defaultWd = 400
                        self.defaultHt = 300
                        # Bind the active page to the current selection
@@ -847,8 +847,27 @@
                                "Sizer_ColSpan": {"type": int, "readonly": 
False}}
                pageFrameProps = {"PageCount": {"type": int, "readonly": False},
                                "TabPosition": {"type": list, "readonly": 
False, 
-                               "values": ["Top", "Bottom", "Left", "Right"] }}
+                                       "values": ["Top", "Bottom", "Left", 
"Right"] }}
                pageListProps = {"ListSpacing": {"type": int, "readonly": 
False}}
+               pageStyleProps = {"ActiveTabColor":  {"type": "color", 
"readonly": False, 
+                                               "customEditor": "editColor"},
+                                       "ActiveTabTextColor":  {"type": 
"color", "readonly": False, 
+                                               "customEditor": "editColor"},
+                                       "InactiveTabTextColor":  {"type": 
"color", "readonly": False, 
+                                               "customEditor": "editColor"},
+                                       "ShowDropdownTabList":  {"type": 
"bool", "readonly": False},
+                                       "ShowMenuCloseButton":  {"type": 
"bool", "readonly": False},
+                                       "ShowMenuOnSingleTab":  {"type": 
"bool", "readonly": False},
+                                       "ShowPageCloseButtons":  {"type": 
"bool", "readonly": False},
+                                       "ShowNavButtons":  {"type": "bool", 
"readonly": False},
+                                       "TabAreaColor":  {"type": "color", 
"readonly": False, 
+                                               "customEditor": "editColor"},
+                                       "TabPosition": {"type": list, 
"readonly": False, 
+                                               "values": ["Top", "Bottom"]},
+                                       "TabSideIncline": {"type": int, 
"readonly": False},
+                                       "TabStyle": {"type": list, "readonly": 
False, 
+                                               "values": ["Default", "VC8", 
"VC71", "Fancy", "Firefox"]}
+                                       }
                borderProps = {"BorderColor": {"type": "color", "readonly": 
False, 
                                        "customEditor": "editColor"},
                                "BorderLineStyle": {"type": list, "readonly": 
False,
@@ -962,12 +981,14 @@
                        ret.update(pageFrameProps)
                        ret.update(pageListProps)
                elif isinstance(self, (dui.dPageFrame, dui.dPageList, 
-                               dui.dPageSelect, dui.dPageFrameNoTabs)):
+                               dui.dPageSelect, dui.dPageStyled, 
dui.dPageFrameNoTabs)):
                        ret.update(colorProps)
                        ret.update(fontProps)
                        ret.update(pageFrameProps)
                        if isinstance(self, dui.dPageFrameNoTabs):
                                del ret["TabPosition"]
+                       if isinstance(self, dui.dPageStyled):
+                               ret.update(pageStyleProps)
                elif isinstance(self, dui.dPage):
                        ret.update(captionProps)
                        ret.update(colorProps)



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to