[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/designer/src TriggerEditor.py forms/Layout...
From: |
Jason Cater |
Subject: |
gnue/designer/src TriggerEditor.py forms/Layout... |
Date: |
Wed, 04 Dec 2002 19:45:18 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/12/04 19:45:17
Modified files:
designer/src : TriggerEditor.py
designer/src/forms/LayoutEditor: LayoutEditor.py PropertyBar.py
WidgetHandler.py
Log message:
More cleanup in Designer (might be broken)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/TriggerEditor.py.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/forms/LayoutEditor/LayoutEditor.py.diff?tr1=1.40&tr2=1.41&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/forms/LayoutEditor/PropertyBar.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/forms/LayoutEditor/WidgetHandler.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: gnue/designer/src/TriggerEditor.py
diff -c gnue/designer/src/TriggerEditor.py:1.25
gnue/designer/src/TriggerEditor.py:1.26
*** gnue/designer/src/TriggerEditor.py:1.25 Fri Nov 29 02:06:59 2002
--- gnue/designer/src/TriggerEditor.py Wed Dec 4 19:45:17 2002
***************
*** 82,87 ****
--- 82,89 ----
self.namedNameLabel = wxStaticText(self.toolpanel, -1, _("Trigger: "),
pos=wxPoint(4,6))
self.triggerCombo = wxComboBox(self.toolpanel, -1, choices=['This is to
make the combo box big enough'],pos=wxPoint(self.namedNameLabel.GetSize().width
+ 10,4), style=wxCB_READONLY)
self.toolh = max(self.namedNameLabel.GetSizeTuple()[1],
self.triggerCombo.GetSizeTuple()[1]) + 12
+ self.triggerCombo.Clear()
+ self.triggerCombo.Append('')
self.editor.SetPosition((0, self.toolh))
EVT_COMBOBOX(self, self.triggerCombo.GetId(), self.OnTriggerSelected)
Index: gnue/designer/src/forms/LayoutEditor/LayoutEditor.py
diff -c gnue/designer/src/forms/LayoutEditor/LayoutEditor.py:1.40
gnue/designer/src/forms/LayoutEditor/LayoutEditor.py:1.41
*** gnue/designer/src/forms/LayoutEditor/LayoutEditor.py:1.40 Tue Dec 3
23:32:53 2002
--- gnue/designer/src/forms/LayoutEditor/LayoutEditor.py Wed Dec 4
19:45:17 2002
***************
*** 80,85 ****
--- 80,86 ----
self.positionMappings = {}
self.widgetList = []
+ self._currentObject = None
self.mode = 'move'
self.__x = 0
self.__y = 0
***************
*** 101,106 ****
--- 102,109 ----
except KeyError:
pass
+ self._setFeedback()
+
## TODO: Fix me
self.instance.SetToolBar(self.toolbar)
##
***************
*** 142,148 ****
## self.propBar.setCurrentObject(object)
if handler != "Forms::LayoutEditor":
self._setCurrentPage(object)
! self._setCurrentBlock(object)
def _setCurrentBlock(self,object):
if not object:
--- 145,152 ----
## self.propBar.setCurrentObject(object)
if handler != "Forms::LayoutEditor":
self._setCurrentPage(object)
! self._setCurrentBlock(object)
! self._setFeedback()
def _setCurrentBlock(self,object):
if not object:
***************
*** 153,159 ****
block = object._block
if block:
self.block = block
! self.SetFeedbackText('Block: %s' % block.name)
def _setCurrentPage(self, object):
--- 157,199 ----
block = object._block
if block:
self.block = block
! ## self._setFeedback()
!
!
! def _setFeedback(self):
!
! object = self._currentObject
!
! if self.block:
! ft = 'self.block.name
!
! if object:
! try:
! ft += 'Name: % (%s)' % (object.name, object._type[2:])
! except:
! pass
! try:
! ft += ' x: %s' % object.Char__x
! except:
! pass
!
! try:
! ft += ' y: %s' % object.Char__y
! except:
! pass
!
! try:
! ft += ' w: %s' % object.Char__width
! except:
! pass
!
! try:
! if obhect.Char__height > 1:
! ft += ' h: %s' % object.Char__height
! except:
! pass
!
! self.setHeaderText(ft)
def _setCurrentPage(self, object):
***************
*** 244,249 ****
--- 284,291 ----
if object in (self.rootObject, self.page) or object in self.widgetList:
self.refreshPage(self.page)
+
+ self._setFeedback()
def onDeleteObject (self, event):
***************
*** 384,392 ****
self.widgetList.append(object)
def OnSize(self, event):
! ## self.propBar.SetSize(wxSize(self.GetClientSize().x,
self.propBar.GetSize().y))
! ## self.propBar.SetPosition(wxPoint(0, self.GetClientSize().y -
self.propBar.GetSize().y))
! self.notebook.SetSize(wxSize(self.GetClientSize().x-8,
self.GetClientSize().y - 8))# - self.propBar.GetSize().y))
def OnPageSelected(self, event):
p = self._notebookMap[event.GetSelection()]
--- 426,435 ----
self.widgetList.append(object)
def OnSize(self, event):
! self.propBar.SetSize(wxSize(self.GetClientSize().x,
self.propBar.GetSize().y))
! self.propBar.SetPosition(wxPoint(0, self.GetClientSize().y -
self.propBar.GetSize().y))
! self.notebook.SetSize(wxSize(self.GetClientSize().x-8,
self.GetClientSize().y - 8 - self.propBar.GetSize().y))
! # self.notebook.SetSize(wxSize(self.GetClientSize().x-8,
self.GetClientSize().y - 8))# - self.propBar.GetSize().y))
def OnPageSelected(self, event):
p = self._notebookMap[event.GetSelection()]
Index: gnue/designer/src/forms/LayoutEditor/PropertyBar.py
diff -c gnue/designer/src/forms/LayoutEditor/PropertyBar.py:1.4
gnue/designer/src/forms/LayoutEditor/PropertyBar.py:1.5
*** gnue/designer/src/forms/LayoutEditor/PropertyBar.py:1.4 Mon Nov 25
00:41:42 2002
--- gnue/designer/src/forms/LayoutEditor/PropertyBar.py Wed Dec 4 19:45:17 2002
***************
*** 35,87 ****
#
class PropertyBar (wxPanel):
def __init__(self, parent):
! wxPanel.__init__(self, parent, -1, style=wxRAISED_BORDER|wxCLIP_CHILDREN)
self.parent = parent
self.object = None
! self.nameLabel = wxStaticText(self, -1, "Name:", pos=wxPoint(4,8))
self.nameEditor = wxTextCtrl(self, -1,
pos=calcRelPos(self.nameLabel, dx=6, absy=4))
! self.typeLabel = wxStaticText(self, -1, "Class:",
! pos=calcRelPos(self.nameEditor, absx=4, dy=8))
! self.typeEditor = wxTextCtrl(self, -1,
! pos=calcRelPos(self.nameLabel, self.nameEditor, dx=6, dy=4))
! self.typeEditor.SetEditable(0)
!
! self.xLabel = wxStaticText(self, -1, "x:",
! pos=calcRelPos(self.nameEditor, dx=10, absy=8))
! self.xEditor = wxSpinCtrl(self, -1,
! pos=calcRelPos(self.xLabel, dx=4, absy=6))
! self.xEditor.SetSize((50, self.xEditor.GetSize().height))
!
! self.wLabel = wxStaticText(self, -1, "Width: ",
! pos=calcRelPos(self.xEditor, dx=6, absy=8))
! self.wEditor = wxSpinCtrl(self, -1,
! pos=calcRelPos(self.wLabel, dx=4, absy=6))
! self.wEditor.SetSize(self.xEditor.GetSize())
!
! self.yLabel = wxStaticText(self, -1, "y:",
! pos=calcRelPos(self.nameEditor, self.xEditor, dx=10, dy=8))
! self.yEditor = wxSpinCtrl(self, -1,
! pos=calcRelPos(self.xLabel, self.xEditor, dx=4, dy=6))
! self.yEditor.SetSize(self.xEditor.GetSize())
!
! self.hLabel = wxStaticText(self, -1, "Height:",
! pos=calcRelPos(self.xEditor, self.wEditor, dx=6, dy=8))
! self.hEditor = wxSpinCtrl(self, -1,
! pos=calcRelPos(self.wLabel, self.wEditor, dx=4, dy=6))
! self.hEditor.SetSize(self.wEditor.GetSize())
!
! ## self.toolpanel = LayoutEditorTools.LayoutEditorTools(self.parent,
! ## self, -1,
! ## pos=calcRelPos(self.hEditor,self.hEditor, dx=6, absy=6),
! ## style=wxSUNKEN_BORDER)
!
! self.Fit()
!
! EVT_SPINCTRL(self, self.xEditor.GetId(), self.OnXUpdated)
! EVT_SPINCTRL(self, self.yEditor.GetId(), self.OnYUpdated)
! EVT_SPINCTRL(self, self.wEditor.GetId(), self.OnWidthUpdated)
! EVT_SPINCTRL(self, self.hEditor.GetId(), self.OnHeightUpdated)
def OnNameUpdated(self, event):
--- 35,94 ----
#
class PropertyBar (wxPanel):
def __init__(self, parent):
! wxPanel.__init__(self, parent, -1, style=wxCLIP_CHILDREN)
self.parent = parent
self.object = None
! self.nameLabel = wxStaticText(self, -1, "Current Object:",
pos=wxPoint(6,4))
self.nameEditor = wxTextCtrl(self, -1,
pos=calcRelPos(self.nameLabel, dx=6, absy=4))
! self.nameEditor.SetEditable(0)
!
! self.blockLabel = wxStaticText(self, -1, "Current Block:",
! pos=calcRelPos(self.nameEditor, dx=6, absy=4))
! self.blockEditor = wxComboBox(self, -1,
! pos=calcRelPos(self.blockLabel, dx=6, absy=4))
!
! self.SetSize((100,8 + max(self.blockEditor.GetSizeTuple()[1],
! self.nameEditor.GetSizeTuple()[1],
! self.nameEditor.GetSizeTuple()[1])))
!
! ## self.typeLabel = wxStaticText(self, -1, "Class:",
! ## pos=calcRelPos(self.nameEditor, absx=4, dy=8))
! ## self.typeEditor = wxTextCtrl(self, -1,
! ## pos=calcRelPos(self.nameLabel, self.nameEditor, dx=6, dy=4))
! ## self.typeEditor.SetEditable(0)
!
! ## self.xLabel = wxStaticText(self, -1, "x:",
! ## pos=calcRelPos(self.nameEditor, dx=10, absy=8))
! ## self.xEditor = wxSpinCtrl(self, -1,
! ## pos=calcRelPos(self.xLabel, dx=4, absy=6))
! ## self.xEditor.SetSize((50, self.xEditor.GetSize().height))
! ##
! ## self.wLabel = wxStaticText(self, -1, "Width: ",
! ## pos=calcRelPos(self.xEditor, dx=6, absy=8))
! ## self.wEditor = wxSpinCtrl(self, -1,
! ## pos=calcRelPos(self.wLabel, dx=4, absy=6))
! ## self.wEditor.SetSize(self.xEditor.GetSize())
! ##
! ## self.yLabel = wxStaticText(self, -1, "y:",
! ## pos=calcRelPos(self.nameEditor, self.xEditor, dx=10, dy=8))
! ## self.yEditor = wxSpinCtrl(self, -1,
! ## pos=calcRelPos(self.xLabel, self.xEditor, dx=4, dy=6))
! ## self.yEditor.SetSize(self.xEditor.GetSize())
! ##
! ## self.hLabel = wxStaticText(self, -1, "Height:",
! ## pos=calcRelPos(self.xEditor, self.wEditor, dx=6, dy=8))
! ## self.hEditor = wxSpinCtrl(self, -1,
! ## pos=calcRelPos(self.wLabel, self.wEditor, dx=4, dy=6))
! ## self.hEditor.SetSize(self.wEditor.GetSize())
!
!
! ## self.Fit()
!
! ## EVT_SPINCTRL(self, self.xEditor.GetId(), self.OnXUpdated)
! ## EVT_SPINCTRL(self, self.yEditor.GetId(), self.OnYUpdated)
! ## EVT_SPINCTRL(self, self.wEditor.GetId(), self.OnWidthUpdated)
! ## EVT_SPINCTRL(self, self.hEditor.GetId(), self.OnHeightUpdated)
def OnNameUpdated(self, event):
Index: gnue/designer/src/forms/LayoutEditor/WidgetHandler.py
diff -c gnue/designer/src/forms/LayoutEditor/WidgetHandler.py:1.6
gnue/designer/src/forms/LayoutEditor/WidgetHandler.py:1.7
*** gnue/designer/src/forms/LayoutEditor/WidgetHandler.py:1.6 Wed Nov 27
19:11:31 2002
--- gnue/designer/src/forms/LayoutEditor/WidgetHandler.py Wed Dec 4
19:45:17 2002
***************
*** 58,65 ****
for widget in self.mainWidget.widgets:
widget.SetCursor (wxSTANDARD_CURSOR)
! if isinstance(widget, wxWindow):
! widget.Enable(0)
self.setAllChildren(EVT_KEY_UP, widget, self.instance.keyTrap)
self.setAllChildren(EVT_SET_FOCUS, widget, self.focusGainedTrap)
self.setAllChildren(EVT_KILL_FOCUS, widget, self.focusLostTrap)
--- 58,74 ----
for widget in self.mainWidget.widgets:
widget.SetCursor (wxSTANDARD_CURSOR)
!
! # try:
! # widget.Enable(0)
! # except:
! # pass
!
! try:
! widget.SetEditable(0)
! except:
! pass
!
self.setAllChildren(EVT_KEY_UP, widget, self.instance.keyTrap)
self.setAllChildren(EVT_SET_FOCUS, widget, self.focusGainedTrap)
self.setAllChildren(EVT_KILL_FOCUS, widget, self.focusLostTrap)
***************
*** 338,344 ****
# Recursively destroy this widget set
#
def Destroy(self):
!
# TODO: Why the fsck can't I Destroy() this thing!?!??!?
self.widget.Show(0)
--- 347,353 ----
# Recursively destroy this widget set
#
def Destroy(self):
!
# TODO: Why the fsck can't I Destroy() this thing!?!??!?
self.widget.Show(0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/designer/src TriggerEditor.py forms/Layout...,
Jason Cater <=