/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/dock.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/dock.py

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

revision 577 by jonathan, Mon Mar 31 18:31:33 2003 UTC revision 631 by jonathan, Wed Apr 9 10:10:38 2003 UTC
# Line 197  class DockableWindow(Publisher): Line 197  class DockableWindow(Publisher):
197          if self.__floatPosition is not None: self.SetPosition(self.__floatPosition)          if self.__floatPosition is not None: self.SetPosition(self.__floatPosition)
198          if self.__floatSize     is not None: self.SetSize(self.__floatSize)          if self.__floatSize     is not None: self.SetSize(self.__floatSize)
199    
200            self.__dockPanel.SetSize(self.__topWindow.GetClientSize())
201    
202          self.issue(DOCKABLE_UNDOCKED, self.__id, self)          self.issue(DOCKABLE_UNDOCKED, self.__id, self)
203    
204      def IsDocked(self):      def IsDocked(self):
# Line 245  class DockableWindow(Publisher): Line 247  class DockableWindow(Publisher):
247          self.__panel.Destroy()          self.__panel.Destroy()
248          self.__floatWindow.Destroy()          self.__floatWindow.Destroy()
249          self.__dockWindow.Destroy()          self.__dockWindow.Destroy()
250          self.__parent.OnDockClose(self)          self.__parent.OnDockDestroy(self)
251                    
252      ##      ##
253      # Event handlers      # Event handlers
254      #      #
255    
256      def _OnButtonClose(self, event):      def _OnButtonClose(self, event):
257          self.Close()          #self.Close()
258            self.Show(False)
259    
260      def _OnClose(self, force = False):      def _OnClose(self, force = False):
261          self.Destroy()          self.Show(False)
262    
263      def _OnToggleDock(self, event):      def _OnToggleDock(self, event):
264          self.__CheckAllGood()          self.__CheckAllGood()
# Line 316  class DockableWindow(Publisher): Line 319  class DockableWindow(Publisher):
319          # our orientation          # our orientation
320          #          #
321          text = wxStaticText(self.__dockPanel, -1, self.GetTitle(),          text = wxStaticText(self.__dockPanel, -1, self.GetTitle(),
322                               style = wxSIMPLE_BORDER | wxALIGN_CENTRE)                               style = wxALIGN_CENTRE)
323    
324          #          #
325          # Perhaps using wxToggleButton would be better, but it's only          # Perhaps using wxToggleButton would be better, but it's only
# Line 422  class DockFrame(wxFrame): Line 425  class DockFrame(wxFrame):
425      def FindRegisteredDock(self, name):      def FindRegisteredDock(self, name):
426          return self.openWindows.get(name)          return self.openWindows.get(name)
427    
428      def OnDockClose(self, win):      def OnDockDestroy(self, win):
429          del self.openWindows[win.GetName()]          del self.openWindows[win.GetName()]
430          self._UpdateDocks()          self._UpdateDocks()
431    
# Line 446  class DockFrame(wxFrame): Line 449  class DockFrame(wxFrame):
449          #print dockPanel          #print dockPanel
450          panel = dockPanel.FindWindowById(PANEL_ID)          panel = dockPanel.FindWindowById(PANEL_ID)
451          #print panel          #print panel
452          assert(isinstance(panel, DockPanel))          assert isinstance(panel, DockPanel)
453          win = panel.GetDockParent()          win = panel.GetDockParent()
454          #print win          #print win
455          assert(isinstance(win, DockableWindow))          assert isinstance(win, DockableWindow)
456    
457          assert(win.IsDocked())          assert win.IsDocked()
458    
459          rect = event.GetDragRect()          rect = event.GetDragRect()
460    

Legend:
Removed from v.577  
changed lines
  Added in v.631

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26