mailr11743 - /branches/bieri_gui/gui_bieri/user_functions/base.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on December 08, 2010 - 17:52:
Author: bugman
Date: Wed Dec  8 17:52:05 2010
New Revision: 11743

URL: http://svn.gna.org/viewcvs/relax?rev=11743&view=rev
Log:
Created the UF_window base class for all user functions requiring generic 
windows.


Modified:
    branches/bieri_gui/gui_bieri/user_functions/base.py

Modified: branches/bieri_gui/gui_bieri/user_functions/base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/user_functions/base.py?rev=11743&r1=11742&r2=11743&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/user_functions/base.py (original)
+++ branches/bieri_gui/gui_bieri/user_functions/base.py Wed Dec  8 17:52:05 
2010
@@ -23,6 +23,9 @@
 # Module docstring.
 """Base class module for the user function GUI elements."""
 
+# Python module imports.
+import wx
+
 # relax GUI module imports.
 from gui_bieri.controller import Redirect_text
 
@@ -36,3 +39,28 @@
         # Store the args.
         self.gui = gui
         self.interpreter = interpreter
+
+        # Specific set up.
+        self.setup()
+
+
+    def setup(self):
+        """Dummy method to be overwritten."""
+
+
+
+class UF_window(wx.Frame):
+    """User function window GUI element base class."""
+
+    # Some class variables.
+    title = ''
+
+    def __init__(self, gui, interpreter, style=wx.DEFAULT_FRAME_STYLE):
+        """Set up the user function class."""
+
+        # Store the args.
+        self.gui = gui
+        self.interpreter = interpreter
+
+        # Execute the base class method.
+        wx.Frame.__init__(self, None, id=-1, title=self.title, style=style)




Related Messages


Powered by MHonArc, Updated Wed Dec 08 18:00:01 2010