示例#1
0
class ICONwindow(FrameWork.Window):
	def open(self, (resid, resname)):
		if not resname:
			resname = '#'+`resid`
		self.resid = resid
		self.picture = Icn.GetIcon(self.resid)
		l, t, r, b = 0, 0, 32, 32
		self.pictrect = (l, t, r, b)
		width = r-l
		height = b-t
		if width < MINWIDTH: width = MINWIDTH
		elif width > MAXWIDTH: width = MAXWIDTH
		if height < MINHEIGHT: height = MINHEIGHT
		elif height > MAXHEIGHT: height = MAXHEIGHT
		bounds = (LEFT, TOP, LEFT+width, TOP+height)
		
		self.wid = Win.NewWindow(bounds, resname, 1, 0, -1, 1, 0)
		self.do_postopen()
示例#2
0
"""browsepict - Display all "ICON" resources found"""