亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? widget.py

?? Urwid is a Python library for making text console applications. It has many features including fluid
?? PY
?? 第 1 頁 / 共 5 頁
字號:
		self._body = body		self._invalidate()	body = property(get_body, set_body)		def selectable(self):		"""Return selectable from body."""		return self._body.selectable()		def filler_values(self, (maxcol, maxrow), focus):		"""Return the number of rows to pad on the top and bottom.				Override this method to define custom padding behaviour."""		if self.height_type is None:			height = self.body.rows((maxcol,),focus=focus)			return calculate_filler( self.valign_type,				self.valign_amount, 'fixed', height, 				None, maxrow )					return calculate_filler( self.valign_type, self.valign_amount,			self.height_type, self.height_amount,			self.min_height, maxrow)		def render(self, (maxcol,maxrow), focus=False):		"""Render self.body with space above and/or below."""		top, bottom = self.filler_values((maxcol,maxrow), focus)				if self.height_type is None:			canv = self.body.render( (maxcol,), focus)		else:			canv = self.body.render( (maxcol,maxrow-top-bottom),focus)		canv = CompositeCanvas(canv)				if maxrow and canv.rows() > maxrow and canv.cursor is not None:			cx, cy = canv.cursor			if cy >= maxrow:				canv.trim(cy-maxrow+1,maxrow-top-bottom)		if canv.rows() > maxrow:			canv.trim(0, maxrow)			return canv		canv.pad_trim_top_bottom(top, bottom)		return canv	def keypress(self, (maxcol,maxrow), key):		"""Pass keypress to self.body."""		if self.height_type is None:			return self.body.keypress( (maxcol,), key )		top, bottom = self.filler_values((maxcol,maxrow), True)		return self.body.keypress( (maxcol,maxrow-top-bottom), key )	def get_cursor_coords(self, (maxcol,maxrow)):		"""Return cursor coords from self.body if any."""		if not hasattr(self.body, 'get_cursor_coords'):			return None					top, bottom = self.filler_values((maxcol,maxrow), True)		if self.height_type is None:			coords = self.body.get_cursor_coords((maxcol,))		else:			coords = self.body.get_cursor_coords(				(maxcol,maxrow-top-bottom))		if not coords:			return None		x, y = coords		if y >= maxrow:			y = maxrow-1		return x, y+top	def get_pref_col(self, (maxcol,maxrow)):		"""Return pref_col from self.body if any."""		if not hasattr(self.body, 'get_pref_col'):			return None				if self.height_type is None:			x = self.body.get_pref_col((maxcol,))		else:			top, bottom = self.filler_values((maxcol,maxrow), True)			x = self.body.get_pref_col(				(maxcol,maxrow-top-bottom))		return x		def move_cursor_to_coords(self, (maxcol,maxrow), col, row):		"""Pass to self.body."""		if not hasattr(self.body, 'move_cursor_to_coords'):			return True				top, bottom = self.filler_values((maxcol,maxrow), True)		if row < top or row >= maxcol-bottom:			return False		if self.height_type is None:			return self.body.move_cursor_to_coords((maxcol,),				col, row-top)		return self.body.move_cursor_to_coords(			(maxcol, maxrow-top-bottom), col, row-top)		def mouse_event(self, (maxcol,maxrow), event, button, col, row, focus):		"""Pass to self.body."""		if not hasattr(self.body, 'mouse_event'):			return False				top, bottom = self.filler_values((maxcol,maxrow), True)		if row < top or row >= maxcol-bottom:			return False		if self.height_type is None:			return self.body.mouse_event((maxcol,),				event, button, col, row-top, focus)		return self.body.mouse_event( (maxcol, maxrow-top-bottom), 			event, button,col, row-top, focus)				class OverlayError(Exception):	passclass Overlay(BoxWidget):	def __init__(self, top_w, bottom_w, align, width, valign, height,			min_width=None, min_height=None ):		"""		top_w -- a flow, box or fixed widget to overlay "on top"		bottom_w -- a box widget to appear "below" previous widget		align -- one of:		    'left', 'center', 'right'		    ('fixed left', columns)		    ('fixed right', columns)		    ('relative', percentage 0=left 100=right)		width -- one of:		    None if top_w is a fixed widget		    number of columns wide		    ('fixed right', columns)  Only if align is 'fixed left'		    ('fixed left', columns)  Only if align is 'fixed right'		    ('relative', percentage of total width)		valign -- one of:		    'top', 'middle', 'bottom'		    ('fixed top', rows)		    ('fixed bottom', rows)		    ('relative', percentage 0=top 100=bottom)		height -- one of:		    None if top_w is a flow or fixed widget		    number of rows high 		    ('fixed bottom', rows)  Only if valign is 'fixed top'		    ('fixed top', rows)  Only if valign is 'fixed bottom'		    ('relative', percentage of total height)		min_width -- the minimum number of columns for top_w		    when width is not fixed		min_height -- one of:		    minimum number of rows for the widget when height not fixed				Overlay widgets behave similarly to Padding and Filler widgets		when determining the size and position of top_w.  bottom_w is		always rendered the full size available "below" top_w.		"""		self.__super.__init__()		at,aa,wt,wa=decompose_align_width(align, width, OverlayError)		vt,va,ht,ha=decompose_valign_height(valign,height,OverlayError)				self.top_w = top_w		self.bottom_w = bottom_w				self.align_type, self.align_amount = at, aa		self.width_type, self.width_amount = wt, wa		if self.width_type and self.width_type != 'fixed':			self.min_width = min_width		else:			self.min_width = None				self.valign_type, self.valign_amount = vt, va		self.height_type, self.height_amount = ht, ha		if self.height_type not in ('fixed', None):			self.min_height = min_height		else:			self.min_height = None	def selectable(self):		"""Return selectable from top_w."""		return self.top_w.selectable()		def keypress(self, size, key):		"""Pass keypress to top_w."""		return self.top_w.keypress(self.top_w_size(size,                       *self.calculate_padding_filler(size, True)), key)		def get_cursor_coords(self, size):		"""Return cursor coords from top_w, if any."""		if not hasattr(self.body, 'get_cursor_coords'):			return None		left, right, top, bottom = self.calculate_padding_filler(size,			True)		x, y = self.top_w.get_cursor_coords(			(maxcol-left-right, maxrow-top-bottom) )		if y >= maxrow:  # required??			y = maxrow-1		return x+left, y+top		def calculate_padding_filler(self, (maxcol, maxrow), focus):		"""Return (padding left, right, filler top, bottom)."""		height = None		if self.width_type is None:			# top_w is a fixed widget			width, height = self.top_w.pack(focus=focus)			assert height, "fixed widget must have a height"			left, right = calculate_padding(self.align_type,				self.align_amount, 'fixed', width, 				None, maxcol, clip=True )		else:			left, right = calculate_padding(self.align_type,				self.align_amount, self.width_type,				self.width_amount, self.min_width, maxcol)		if height:			# top_w is a fixed widget			top, bottom = calculate_filler(self.valign_type, 				self.valign_amount, 'fixed', height,				None, maxrow)			if maxrow-top-bottom < height:				bottom = maxrow-top-height		elif self.height_type is None:			# top_w is a flow widget			height = self.body.rows((maxcol,),focus=focus)			top, bottom =  calculate_filler( self.valign_type,				self.valign_amount, 'fixed', height, 				None, maxrow )		else:				top, bottom = calculate_filler(self.valign_type, 				self.valign_amount, self.height_type, 				self.height_amount, self.min_height, maxrow)		return left, right, top, bottom		def top_w_size(self, size, left, right, top, bottom):		"""Return the size to pass to top_w."""		if self.width_type is None:			# top_w is a fixed widget			return ()		maxcol, maxrow = size		if self.width_type is not None and self.height_type is None:			# top_w is a flow widget			return (maxcol-left-right,)		return (maxcol-left-right, maxrow-top-bottom)					def render(self, size, focus=False):		"""Render top_w overlayed on bottom_w."""		left, right, top, bottom = self.calculate_padding_filler(size,			focus)		bottom_c = self.bottom_w.render(size)		top_c = self.top_w.render(			self.top_w_size(size, left, right, top, bottom), focus)		if left<0 or right<0:			top_c = CompositeCanvas(top_c)			top_c.pad_trim_left_right(min(0,left), min(0,right))		if top<0 or bottom<0:			top_c = CompositeCanvas(top_c)			top_c.pad_trim_top_bottom(min(0,top), min(0,bottom))				return CanvasOverlay(top_c, bottom_c, max(0,left), top)	def mouse_event(self, size, event, button, col, row, focus):		"""Pass event to top_w, ignore if outside of top_w."""		if not hasattr(self.top_w, 'mouse_event'):			return False				left, right, top, bottom = self.calculate_padding_filler(size,			focus)		maxcol, maxrow = size		if ( col<left or col>=maxcol-right or			row<top or row>=maxrow-bottom ):			return False					return self.top_w.mouse_event(			self.top_w_size(size, left, right, top, bottom),			event, button, col-left, row-top, focus )	def decompose_align_width( align, width, err ):	try:		if align in ('left','center','right'):			align = (align,0)		align_type, align_amount = align		assert align_type in ('left','center','right','fixed left',			'fixed right','relative')	except:		raise err("align value %s is not one of 'left', 'center', "			"'right', ('fixed left', columns), ('fixed right', "			"columns), ('relative', percentage 0=left 100=right)" 			% `align`)	try:		if width is None:			width = None, None		elif type(width) == type(0):			width = 'fixed', width		width_type, width_amount = width		assert width_type in ('fixed','fixed right','fixed left',			'relative', None)	except:		raise err("width value %s is not one of ('fixed', columns "			"width), ('fixed right', columns), ('relative', "			"percentage of total width), None" % `width`)			if width_type == 'fixed left' and align_type != 'fixed right':		raise err("fixed left width may only be used with fixed "			"right align")	if width_type == 'fixed right' and align_type != 'fixed left':		raise err("fixed right width may only be used with fixed "			"left align")	return align_type, align_amount, width_type, width_amountdef decompose_valign_height( valign, height, err ):	try:		if valign in ('top','middle','bottom'):			valign = (valign,0)		valign_type, valign_amount = valign		assert valign_type in ('top','middle','bottom','fixed top','fixed bottom','relative')	except:		raise err, "Invalid valign: %s" % `valign`	try:		if height is None:			height = None, None		elif type(height) == type(0):			height=('fixed',height)		height_type, height_amount = height		assert height_type in (None, 'fixed','fixed bottom','fixed top','relative')	except:		raise err, "Invalid height: %s"%`height`			if height_type == 'fixed top' and valign_type != 'fixed bottom':		raise err, "fixed top height may only be used with fixed bottom valign"	if height_type == 'fixed bottom' and valign_type != 'fixed top':		raise err, "fixed bottom height may only be used with fixed top valign"			return valign_type, valign_amount, height_type, height_amountdef calculate_filler( valign_type, valign_amount, height_type, height_amount, 		      min_height, maxrow ):	if height_type == 'fixed':		height = height_amount	elif height_type == 'relative':		height = int(height_amount*maxrow/100+.5)		if min_height is not None:			    height = max(height, min_height)	else:		assert height_type in ('fixed bottom','fixed top')		height = maxrow-height_amount-valign_amount		if min_height is not None:			    height = max(height, min_height)		if height >= maxrow:		# use the full space (no padding)		return 0, 0			if valign_type == 'fixed top':		top = valign_amount		if top+height <= maxrow:			return top, maxrow-top-height		# need to shrink top		return maxrow-height, 0	elif valign_type == 'fixed bottom':		bottom = valign_amount		if bottom+height <= maxrow:			return maxrow-bottom-height, bottom		# need to shrink bottom		return 0, maxrow-height			elif valign_type == 'relative':		top = int( (maxrow-height)*valign_amount/100+.5 )	elif valign_type == 'bottom':		top = maxrow-height		elif valign_type == 'middle':		top = int( (maxrow-height)/2 )	else: #self.valign_type == 'top'		top = 0		if top+height > maxrow: top = maxrow-height	if top < 0: top = 0		bottom = maxrow-height-top	return top, bottom 	def calculate_padding( align_type, align_amount, width_type, width_amount,		min_width, maxcol, clip=False ):	if width_type == 'fixed':		width = width_amount	elif width_type == 'relative':		width = int(width_amount*maxcol/100+.5)		if min_width is not None:			    width = max(width, min_width)	else: 		assert width_type in ('fixed right', 'fixed left')		width = maxcol-width_amount-align_amount		if min_width is not None:			    width = max(width, min_width)		if width == maxcol or (width > maxcol and not clip):		# use the full space (no padding)		return 0, 0			if align_type == 'fixed left':		left = align_amount		if left+width <= maxcol:			return left, maxcol-left-width		# need to shrink left		return maxcol-width, 0	elif align_type == 'fixed right':		right = align_amount		if right+width <= maxcol:			return maxcol-right-width, right		# need to shrink right		return 0, maxcol-width			elif align_type == 'relative':		left = int( (maxcol-width)*align_amount/100+.5 )	elif align_type == 'right':		left = maxcol-width		elif align_type == 'center':		left = int( (maxcol-width)/2 )	else: 		assert align_type == 'left'		left = 0		if width < maxcol:		if left+width > maxcol: left = maxcol-width		if left < 0: left = 0		right = maxcol-width-left	return left, right 	class Frame(BoxWidget):	def __init__(self, body, header=None, footer=None, focus_part='body'):		"""		body -- a box widget for the body of the frame		header -- a flow widget for above the body (or None)		footer -- a flow widget for below the body (or None)		focus_part -- 'header', 'footer' or 'body'		"""		self.__super.__init__()		self._header = header		self._body = body		self._footer = footer		self.focus_part = focus_part		def get_header(self):		return self._header	def set_header(self, header):		self._header = header		self._invalidate()	header = property(get_header, set_header)			def get_body(self):		return self._body	def set_body(self, body):		self._body = body		self._invalidate()	body = property(get_body, set_body)	def get_footer(self):		return self._footer	def set_footer(self, footer):		self._footer = footer		self._invalidate()	footer = property(get_footer, set_footer)	def set_focus(self, part):

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美午夜精品久久久| 国产美女精品人人做人人爽| 欧美激情一区二区三区| 精品国产一二三| 日韩视频在线观看一区二区| 欧美一区二区三区不卡| 337p亚洲精品色噜噜噜| 亚洲一区影音先锋| 亚洲成a人v欧美综合天堂下载| 不卡视频在线观看| 国产一区二区不卡| 成人免费视频国产在线观看| 国产·精品毛片| caoporen国产精品视频| 一本久久综合亚洲鲁鲁五月天| eeuss鲁片一区二区三区在线观看| 不卡高清视频专区| 在线影院国内精品| 欧美伦理电影网| 日韩精品专区在线影院观看| 久久九九国产精品| 中文字幕一区二区视频| 亚洲高清一区二区三区| 麻豆精品在线看| 国产成人综合亚洲网站| 91麻豆福利精品推荐| 欧美久久久久免费| 26uuu精品一区二区| 国产精品国产三级国产普通话蜜臀 | 亚洲精品欧美在线| 天天综合网 天天综合色| 黑人巨大精品欧美黑白配亚洲| 成人18视频日本| 制服丝袜激情欧洲亚洲| 国产日产欧美一区| 婷婷久久综合九色综合伊人色| 国产真实乱子伦精品视频| 在线免费观看日本欧美| 欧美一区二区大片| 中文字幕一区二区三区乱码在线| 视频一区二区中文字幕| 国产99久久久久| 欧美一区二区女人| 亚洲精品国产一区二区精华液| 免费成人美女在线观看.| www.色综合.com| 欧美大胆人体bbbb| 樱桃视频在线观看一区| 国产伦精品一区二区三区免费迷| 色诱视频网站一区| 久久九九影视网| 视频一区中文字幕国产| 色综合中文字幕| 久久久久久9999| 日本va欧美va欧美va精品| 99re视频精品| 国产亚洲精品超碰| 久久精品国产77777蜜臀| 欧美三级视频在线| 亚洲欧美视频在线观看视频| 国产精品一区二区久久精品爱涩| 欧美一区二区三区视频在线| 亚洲一区二区在线观看视频| 波多野结衣中文字幕一区| 日韩天堂在线观看| 视频一区二区三区在线| 欧美日韩在线三区| 亚洲精品视频在线观看免费 | 成人爱爱电影网址| 亚洲精品一区二区三区四区高清| 图片区小说区区亚洲影院| 在线欧美日韩国产| 亚洲精品大片www| 96av麻豆蜜桃一区二区| 国产精品久久久久一区| caoporn国产一区二区| 中文字幕一区在线观看视频| 国产精品一区二区三区99| 久久亚洲综合色一区二区三区| 韩国成人福利片在线播放| 久久在线观看免费| 国产精品一区二区不卡| 亚洲国产电影在线观看| 成人av资源下载| 亚洲视频每日更新| 欧美熟乱第一页| 视频在线在亚洲| 精品久久人人做人人爰| 国产一区二区免费在线| 国产精品不卡在线| 91福利视频网站| 日韩黄色一级片| 久久免费视频色| 成人免费观看视频| 亚洲一区在线观看视频| 91麻豆精品国产91久久久久久久久 | 99久久国产免费看| 亚洲综合色在线| 欧美二区乱c少妇| 国产一区 二区| 1区2区3区精品视频| 欧美日韩午夜精品| 国产乱一区二区| 一区二区三区中文字幕精品精品| 欧美高清激情brazzers| 国产精品18久久久久| 国产精品初高中害羞小美女文| 在线视频一区二区三区| 麻豆91在线播放免费| 国产精品美女一区二区在线观看| 欧美午夜在线观看| 国产二区国产一区在线观看| 亚洲自拍偷拍网站| 国产视频亚洲色图| 欧美日韩在线播放三区四区| 国产一区91精品张津瑜| 亚洲一级二级在线| 国产精品免费久久| 日韩欧美亚洲一区二区| 色婷婷亚洲一区二区三区| 久久电影网站中文字幕| 一区二区在线观看视频| 国产视频在线观看一区二区三区| 欧美日韩精品系列| k8久久久一区二区三区| 激情都市一区二区| 亚洲成a人片在线观看中文| 中文字幕亚洲一区二区va在线| 欧美大片在线观看| 欧美嫩在线观看| 色婷婷av一区| 99久久99久久精品免费看蜜桃| 国产真实乱子伦精品视频| 婷婷成人综合网| 亚洲国产毛片aaaaa无费看| 国产精品久久二区二区| 国产日韩影视精品| 亚洲精品在线免费播放| 欧美成人一区二区三区| 7777精品伊人久久久大香线蕉经典版下载 | 五月天中文字幕一区二区| 一区在线观看视频| 国产精品每日更新在线播放网址 | 99在线精品观看| 国产凹凸在线观看一区二区| 精品制服美女久久| 精品在线观看视频| 精品亚洲国内自在自线福利| 青青草国产精品97视觉盛宴 | 91精品综合久久久久久| 欧美乱妇15p| 日韩一区二区三区av| 制服丝袜在线91| 日韩欧美高清一区| 日韩免费视频线观看| 精品国产乱码久久久久久牛牛| 精品少妇一区二区| 久久人人爽爽爽人久久久| 国产日韩精品一区二区浪潮av| 国产亚洲欧美一区在线观看| 国产欧美精品一区aⅴ影院| 国产精品嫩草影院com| 亚洲色图欧美偷拍| 午夜日韩在线观看| 美女免费视频一区| 国产一区二区福利视频| 成人精品视频一区二区三区| a4yy欧美一区二区三区| 欧美色综合影院| 日韩欧美国产麻豆| 国产精品久久久久影视| 亚洲综合在线电影| 美女国产一区二区三区| 国产精品一区二区久久精品爱涩 | 欧美三级一区二区| 精品成人在线观看| 国产精品福利电影一区二区三区四区| 中文字幕制服丝袜一区二区三区 | 欧美午夜免费电影| 欧美电视剧在线看免费| 1024国产精品| 日本视频一区二区| caoporn国产一区二区| 51精品国自产在线| 中国色在线观看另类| 亚洲v精品v日韩v欧美v专区| 国产美女娇喘av呻吟久久| 在线免费不卡电影| 久久丝袜美腿综合| 亚洲综合免费观看高清完整版在线| 美腿丝袜亚洲综合| 91论坛在线播放| 久久女同互慰一区二区三区| 亚洲香肠在线观看| 国产精品一色哟哟哟| 欧美精品日韩综合在线| 国产精品视频一二三| 麻豆精品久久久| 欧美三级中文字幕| 亚洲欧美怡红院|