initial commit
This commit is contained in:
44
hpglView.py
Executable file
44
hpglView.py
Executable file
@@ -0,0 +1,44 @@
|
||||
|
||||
import Tkinter as tk
|
||||
|
||||
|
||||
class HPGLView:
|
||||
|
||||
def __init__( self, master, **options ):
|
||||
self.__programs = None
|
||||
self.__canvas = tk.Canvas( master )
|
||||
self.__canvas.bind( "<Configure>", self.__onresize )
|
||||
|
||||
def pack( self, **options ):
|
||||
self.__canvas.pack( **options )
|
||||
|
||||
def pack_forget( self ):
|
||||
self.__canvas.pack_forget()
|
||||
|
||||
def grid( self, **options ):
|
||||
self.__canvas.grid( **options )
|
||||
|
||||
def grid_forget( self ):
|
||||
self.__canvas.grid_forget()
|
||||
|
||||
def __onresize( self, event ):
|
||||
pass
|
||||
|
||||
@property
|
||||
def programs( self ):
|
||||
self.__programs = programs
|
||||
|
||||
@property
|
||||
def papersize( self ):
|
||||
self.__sheetsize = sheetsize
|
||||
|
||||
def update( self ):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
window = tk.Tk()
|
||||
view = HPGLView( window )
|
||||
view.pack( expand=True, fill=tk.BOTH )
|
||||
window.mainloop()
|
||||
Reference in New Issue
Block a user