/[papo]/gnue/designer/src/forms/LayoutEditor/PropertyBar.py
ViewVC logotype

Diff of /gnue/designer/src/forms/LayoutEditor/PropertyBar.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by charlie, Fri Jun 28 19:43:51 2002 UTC revision 1.1.4.1 by anthonyl, Tue Mar 4 22:11:40 2003 UTC
# Line 1  Line 1 
1  #  #
2  # Copyright 2001-2002 Free Software Foundation  # Copyright 2001-2003 Free Software Foundation
3  #  #
4  # This file is part of GNU Enterprise.  # This file is part of GNU Enterprise.
5  #  #
# Line 35  from gnue.common import GDebug Line 35  from gnue.common import GDebug
35  #  #
36  class PropertyBar (wxPanel):  class PropertyBar (wxPanel):
37    def __init__(self, parent):    def __init__(self, parent):
38      wxPanel.__init__(self, parent, -1, style=wxRAISED_BORDER|wxCLIP_CHILDREN)      wxPanel.__init__(self, parent, -1, style=wxCLIP_CHILDREN)
39      self.parent = parent      self.parent = parent
40      self.object = None      self.object = None
41      self.nameLabel = wxStaticText(self, -1, "Name:", pos=wxPoint(4,8))  #    self.nameLabel = wxStaticText(self, -1, "Current Object:", pos=wxPoint(6,4))
42      self.nameEditor = wxTextCtrl(self, -1,  #    self.nameEditor = wxTextCtrl(self, -1,
43            pos=calcRelPos(self.nameLabel, dx=6, absy=4))  #          pos=calcRelPos(self.nameLabel, dx=6, absy=4))
44      self.typeLabel = wxStaticText(self, -1, "Class:",  #    self.nameEditor.SetEditable(0)
45            pos=calcRelPos(self.nameEditor, absx=4, dy=8))  
46      self.typeEditor = wxTextCtrl(self, -1,      self.blockLabel = wxStaticText(self, -1, "Current Block:",
47            pos=calcRelPos(self.nameLabel, self.nameEditor, dx=6, dy=4))            pos=wxPoint(6,4))
48      self.typeEditor.SetEditable(0)  #          pos=calcRelPos(self.nameEditor, dx=6, absy=4))
49        self.blockEditor = wxComboBox(self, -1,
50      self.xLabel = wxStaticText(self, -1, "x:",            pos=calcRelPos(self.blockLabel, dx=6, absy=4))
51            pos=calcRelPos(self.nameEditor, dx=10, absy=8))  
52      self.xEditor = wxSpinCtrl(self, -1,      self.SetSize((100,8 + max(self.blockEditor.GetSizeTuple()[1],
53            pos=calcRelPos(self.xLabel, dx=4, absy=6))  #        self.nameEditor.GetSizeTuple()[1],
54      self.xEditor.SetSize((50, self.xEditor.GetSize().height))          self.blockLabel.GetSizeTuple()[1])))
55    
56      self.wLabel = wxStaticText(self, -1, "Width:  ",  ##    self.typeLabel = wxStaticText(self, -1, "Class:",
57            pos=calcRelPos(self.xEditor, dx=6, absy=8))  ##          pos=calcRelPos(self.nameEditor, absx=4, dy=8))
58      self.wEditor = wxSpinCtrl(self, -1,  ##    self.typeEditor = wxTextCtrl(self, -1,
59            pos=calcRelPos(self.wLabel, dx=4, absy=6))  ##          pos=calcRelPos(self.nameLabel, self.nameEditor, dx=6, dy=4))
60      self.wEditor.SetSize(self.xEditor.GetSize())  ##    self.typeEditor.SetEditable(0)
61    
62      self.yLabel = wxStaticText(self, -1, "y:",  ##    self.xLabel = wxStaticText(self, -1, "x:",
63            pos=calcRelPos(self.nameEditor, self.xEditor, dx=10, dy=8))  ##          pos=calcRelPos(self.nameEditor, dx=10, absy=8))
64      self.yEditor = wxSpinCtrl(self, -1,  ##    self.xEditor = wxSpinCtrl(self, -1,
65            pos=calcRelPos(self.xLabel, self.xEditor, dx=4, dy=6))  ##          pos=calcRelPos(self.xLabel, dx=4, absy=6))
66      self.yEditor.SetSize(self.xEditor.GetSize())  ##    self.xEditor.SetSize((50, self.xEditor.GetSize().height))
67    ##
68      self.hLabel = wxStaticText(self, -1, "Height:",  ##    self.wLabel = wxStaticText(self, -1, "Width:  ",
69            pos=calcRelPos(self.xEditor, self.wEditor, dx=6, dy=8))  ##          pos=calcRelPos(self.xEditor, dx=6, absy=8))
70      self.hEditor = wxSpinCtrl(self, -1,  ##    self.wEditor = wxSpinCtrl(self, -1,
71            pos=calcRelPos(self.wLabel, self.wEditor, dx=4, dy=6))  ##          pos=calcRelPos(self.wLabel, dx=4, absy=6))
72      self.hEditor.SetSize(self.wEditor.GetSize())  ##    self.wEditor.SetSize(self.xEditor.GetSize())
73    ##
74  ##    self.toolpanel = LayoutEditorTools.LayoutEditorTools(self.parent,  ##    self.yLabel = wxStaticText(self, -1, "y:",
75  ##          self, -1,  ##          pos=calcRelPos(self.nameEditor, self.xEditor, dx=10, dy=8))
76  ##          pos=calcRelPos(self.hEditor,self.hEditor, dx=6, absy=6),  ##    self.yEditor = wxSpinCtrl(self, -1,
77  ##          style=wxSUNKEN_BORDER)  ##          pos=calcRelPos(self.xLabel, self.xEditor, dx=4, dy=6))
78    ##    self.yEditor.SetSize(self.xEditor.GetSize())
79      self.Fit()  ##
80    ##    self.hLabel = wxStaticText(self, -1, "Height:",
81      EVT_SPINCTRL(self, self.xEditor.GetId(), self.OnXUpdated)  ##          pos=calcRelPos(self.xEditor, self.wEditor, dx=6, dy=8))
82      EVT_SPINCTRL(self, self.yEditor.GetId(), self.OnYUpdated)  ##    self.hEditor = wxSpinCtrl(self, -1,
83      EVT_SPINCTRL(self, self.wEditor.GetId(), self.OnWidthUpdated)  ##          pos=calcRelPos(self.wLabel, self.wEditor, dx=4, dy=6))
84      EVT_SPINCTRL(self, self.hEditor.GetId(), self.OnHeightUpdated)  ##    self.hEditor.SetSize(self.wEditor.GetSize())
85    
86    
87    ##    self.Fit()
88    
89    ##    EVT_SPINCTRL(self, self.xEditor.GetId(), self.OnXUpdated)
90    ##    EVT_SPINCTRL(self, self.yEditor.GetId(), self.OnYUpdated)
91    ##    EVT_SPINCTRL(self, self.wEditor.GetId(), self.OnWidthUpdated)
92    ##    EVT_SPINCTRL(self, self.hEditor.GetId(), self.OnHeightUpdated)
93    
94    
95    def OnNameUpdated(self, event):    def OnNameUpdated(self, event):
# Line 160  class PropertyBar (wxPanel): Line 168  class PropertyBar (wxPanel):
168        self.nameEditor.SetValue(0)        self.nameEditor.SetValue(0)
169        self.nameEditor.SetEditable(0)        self.nameEditor.SetEditable(0)
170    
171    def onModifyObject (self, object, handler, modifications):    def onModifyObject (self, event):
172        raise "I have not been fixed yet!"
173      if object == None:      if object == None:
174        return        return
175      if object == self.object:      if object == self.object:

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26