Changeset 3549
- Timestamp:
- Sep 7, 2006, 5:11:21 PM (18 years ago)
- Location:
- anuga_core/source/anuga/visualiser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/visualiser/offline.py
r3548 r3549 100 100 def setup_gui(self): 101 101 Visualiser.setup_gui(self) 102 self.tk_renderWidget.grid(row=0, column=0, columnspan=6) 103 self.tk_quit.grid(row=2, column=0, columnspan=6, sticky=W+E) 104 self.tk_restart = Button(self.tk_root, text="<<<", command=self.restart) 102 self.tk_quit.grid(row=0, column=0, columnspan=6, sticky=W+E) 103 self.tk_restart = Button(self.tk_controlFrame, text="<<<", command=self.restart) 105 104 self.tk_restart.grid(row=1, column=0, sticky=W+E) 106 self.tk_back10 = Button(self.tk_ root, text="<<", command=self.back10)105 self.tk_back10 = Button(self.tk_controlFrame, text="<<", command=self.back10) 107 106 self.tk_back10.grid(row=1, column=1, sticky=W+E) 108 self.tk_back = Button(self.tk_ root, text="<", command=self.back)107 self.tk_back = Button(self.tk_controlFrame, text="<", command=self.back) 109 108 self.tk_back.grid(row=1, column=2, sticky=W+E) 110 self.tk_pauseResume = Button(self.tk_ root, text="Pause", command=self.pauseResume)109 self.tk_pauseResume = Button(self.tk_controlFrame, text="Pause", command=self.pauseResume) 111 110 self.tk_pauseResume.grid(row=1, column=3, sticky=W+E) 112 self.tk_forward = Button(self.tk_ root, text=">", command=self.forward)111 self.tk_forward = Button(self.tk_controlFrame, text=">", command=self.forward) 113 112 self.tk_forward.grid(row=1, column=4, sticky=W+E) 114 self.tk_forward10 = Button(self.tk_ root, text=">>", command=self.forward10)113 self.tk_forward10 = Button(self.tk_controlFrame, text=">>", command=self.forward10) 115 114 self.tk_forward10.grid(row=1, column=5, sticky=W+E) 115 116 # Make the buttons stretch to fill all available space 117 for i in range(6): 118 self.tk_controlFrame.grid_columnconfigure(i, weight=1) 116 119 117 120 def restart(self): -
anuga_core/source/anuga/visualiser/realtime.py
r3540 r3549 27 27 def setup_gui(self): 28 28 Visualiser.setup_gui(self) 29 self.tk_pauseResume = Button(self.tk_ root, text="Pause", command=self.pauseResume)29 self.tk_pauseResume = Button(self.tk_controlFrame, text="Pause", command=self.pauseResume) 30 30 self.tk_pauseResume.grid(row=1, column=0, sticky=E+W) 31 31 -
anuga_core/source/anuga/visualiser/visualiser.py
r3548 r3549 1 1 from threading import Thread 2 from Tkinter import Tk, Button, N, E, S, W2 from Tkinter import Tk, Button, Frame, N, E, S, W 3 3 from types import FunctionType, TupleType 4 4 from vtk import vtkActor, vtkFloatArray, vtkPolyDataMapper, vtkRenderer … … 142 142 self.tk_root.after(100, self.redraw) 143 143 self.tk_root.bind("<Destroy>", self.destroyed) 144 self.tk_root.grid_rowconfigure(0, weight=1) 145 self.tk_root.grid_columnconfigure(0, weight=1) 144 146 145 147 self.tk_renderWidget = vtkTkRenderWidget(self.tk_root, width=400, height=400) 146 148 self.tk_renderWidget.grid(row=0, column=0, sticky=N+S+E+W) 147 self.tk_quit = Button(self.tk_root, text="Quit", command=self.shutdown) 148 self.tk_quit.grid(row=2, column=0, sticky=E+W) 149 self.tk_controlFrame = Frame(self.tk_root) 150 self.tk_controlFrame.grid(row=1, column=0, sticky=E+W) 151 self.tk_controlFrame.grid_rowconfigure(0, weight=1) 152 self.tk_controlFrame.grid_columnconfigure(0, weight=1) 153 154 self.tk_quit = Button(self.tk_controlFrame, text="Quit", command=self.shutdown) 155 self.tk_quit.grid(row=0, column=0, sticky=E+W) 149 156 self.vtk_renderer = vtkRenderer() 150 157 self.tk_renderWidget.GetRenderWindow().AddRenderer(self.vtk_renderer)
Note: See TracChangeset
for help on using the changeset viewer.