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

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

?? toolbar.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
		* style BTNS_SEP and TB_SETROWS is used to set the number of rows		* in the tool bar, depending on the number of buttons, the toolbar		* will wrap items with the style BTNS_CHECK, even when the fLarger		* flags is used to force the number of rows to be larger than the		* number of items.  The fix is to set the number of rows to be two		* larger than the actual number of rows in the tool bar.  When items		* are being added, as long as the number of rows is at least one		* item larger than the count, the tool bar is layed out properly.		* When items are being removed, setting the number of rows to be		* one more than the item count has no effect.  The number of rows		* is already one more causing TB_SETROWS to do nothing.  Therefore,		* choosing two instead of one as the row increment fixes both cases.		*/		count += 2;		OS.SendMessage (handle, OS.TB_SETROWS, (1 << 16) | count, 0);		int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOZORDER;		SetWindowPos (handle, 0, 0, 0, rect.right - rect.left, rect.bottom - rect.top, flags);		ignoreResize = false;	}}boolean setTabItemFocus () {	int index = 0;	while (index < items.length) {		ToolItem item = items [index];		if (item != null && (item.style & SWT.SEPARATOR) == 0) {			if (item.getEnabled ()) break;		}		index++;	}	if (index == items.length) return false;	return super.setTabItemFocus ();}String toolTipText (NMTTDISPINFO hdr) {	if ((hdr.uFlags & OS.TTF_IDISHWND) != 0) {		return null;	}	/*	* Bug in Windows.  On Windows XP, when TB_SETHOTITEM is	* used to set the hot item, the tool bar control attempts	* to display the tool tip, even when the cursor is not in	* the hot item.  The fix is to detect this case and fail to	* provide the string, causing no tool tip to be displayed.	*/	if (!hasCursor ()) return ""; //$NON-NLS-1$	int index = hdr.idFrom;	int hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);	if (hwndToolTip == hdr.hwndFrom) {		if (toolTipText != null) return ""; //$NON-NLS-1$		if (0 <= index && index < items.length) {			ToolItem item = items [index];			if (item != null) return item.toolTipText;		}	}	return super.toolTipText (hdr);}int widgetStyle () {	int bits = super.widgetStyle () | OS.CCS_NORESIZE | OS.TBSTYLE_TOOLTIPS | OS.TBSTYLE_CUSTOMERASE;	if ((style & SWT.SHADOW_OUT) == 0) bits |= OS.CCS_NODIVIDER;	if ((style & SWT.WRAP) != 0) bits |= OS.TBSTYLE_WRAPABLE;	if ((style & SWT.FLAT) != 0) bits |= OS.TBSTYLE_FLAT;	if ((style & SWT.RIGHT) != 0) bits |= OS.TBSTYLE_LIST;	return bits;}TCHAR windowClass () {	return ToolBarClass;}int windowProc () {	return ToolBarProc;}LRESULT WM_COMMAND (int wParam, int lParam) {	/*	* Feature in Windows.  When the toolbar window	* proc processes WM_COMMAND, it forwards this	* message to its parent.  This is done so that	* children of this control that send this message 	* type to their parent will notify not only	* this control but also the parent of this control,	* which is typically the application window and	* the window that is looking for the message.	* If the control did not forward the message, 	* applications would have to subclass the control 	* window to see the message. Because the control	* window is subclassed by SWT, the message	* is delivered twice, once by SWT and once when	* the message is forwarded by the window proc.	* The fix is to avoid calling the window proc 	* for this control.	*/	LRESULT result = super.WM_COMMAND (wParam, lParam);	if (result != null) return result;	return LRESULT.ZERO;}LRESULT WM_GETDLGCODE (int wParam, int lParam) {	LRESULT result = super.WM_GETDLGCODE (wParam, lParam);	/*	* Return DLGC_BUTTON so that mnemonics will be	* processed without needing to press the ALT key	* when the widget has focus.	*/	if (result != null) return result;	return new LRESULT (OS.DLGC_BUTTON);}LRESULT WM_KEYDOWN (int wParam, int lParam) {	LRESULT result = super.WM_KEYDOWN (wParam, lParam);	if (result != null) return result;	switch (wParam) {		case OS.VK_SPACE:			int index = OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);			if (index != -1) {				TBBUTTON lpButton = new TBBUTTON ();				int code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);				if (code != 0) {					items [lpButton.idCommand].click (false);					return LRESULT.ZERO;				}			}	}	return result;}LRESULT WM_KILLFOCUS (int wParam, int lParam) {	int index = OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);	TBBUTTON lpButton = new TBBUTTON ();	int code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton);	if (code != 0) lastFocusId = lpButton.idCommand;	return super.WM_KILLFOCUS (wParam, lParam);}LRESULT WM_NOTIFY (int wParam, int lParam) {	/*	* Feature in Windows.  When the toolbar window	* proc processes WM_NOTIFY, it forwards this	* message to its parent.  This is done so that	* children of this control that send this message 	* type to their parent will notify not only	* this control but also the parent of this control,	* which is typically the application window and	* the window that is looking for the message.	* If the control did not forward the message, 	* applications would have to subclass the control 	* window to see the message. Because the control	* window is subclassed by SWT, the message	* is delivered twice, once by SWT and once when	* the message is forwarded by the window proc.	* The fix is to avoid calling the window proc 	* for this control.	*/	LRESULT result = super.WM_NOTIFY (wParam, lParam);	if (result != null) return result;	return LRESULT.ZERO;}LRESULT WM_SETFOCUS (int wParam, int lParam) {	LRESULT result = super.WM_SETFOCUS (wParam, lParam);	if (lastFocusId != -1 && handle == OS.GetFocus ()) {		int index = OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lastFocusId, 0); 		OS.SendMessage (handle, OS.TB_SETHOTITEM, index, 0);	}	return result;}LRESULT WM_SIZE (int wParam, int lParam) {	if (ignoreResize) {		int code = callWindowProc (OS.WM_SIZE, wParam, lParam);		if (code == 0) return LRESULT.ZERO;		return new LRESULT (code);	}	/*	* Feature in Windows.  When a tool bar that contains	* separators is wrapped, under certain circumstances,	* Windows redraws the entire tool bar unnecessarily	* when resized and no item moves.  Whether the entire	* toolbar is damaged or not seems to depend on the size	* of the tool bar and the position of the separators.	* The fix is to ensure that the newly exposed areas are	* always damaged, and avoid the redraw when no tool item	* moves.	*/	RECT [] rects = null;	int rgn = 0, oldCount = 0;	boolean fixRedraw = drawCount == 0 &&		(style & SWT.WRAP) != 0 &&		OS.IsWindowVisible (handle) &&		OS.SendMessage (handle, OS.TB_GETROWS, 0, 0) != 1;	if (fixRedraw) {		rgn = OS.CreateRectRgn (0, 0, 0, 0);		OS.GetUpdateRgn (handle, rgn, false);		oldCount = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);		rects = new RECT [oldCount];		for (int i=0; i<oldCount; i++) {			rects [i] = new RECT ();			OS.SendMessage (handle, OS.TB_GETITEMRECT, i, rects [i]);		}	}		LRESULT result = super.WM_SIZE (wParam, lParam);	/*	* It is possible (but unlikely), that application	* code could have disposed the widget in the resize	* event.  If this happens, end the processing of the	* Windows message by returning the result of the	* WM_SIZE message.	*/	if (isDisposed ()) return result;		if (fixRedraw) {		int newCount = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);		if (newCount == oldCount) {			int index = 0;			RECT rect = new RECT ();			while (index < newCount) {				OS.SendMessage (handle, OS.TB_GETITEMRECT, index, rect);				if (!OS.EqualRect (rects [index], rect)) break;				index++;			}			if (index == newCount) {				OS.ValidateRect (handle, null);				OS.InvalidateRgn (handle, rgn, false);			}		}		OS.DeleteObject (rgn);	}	layoutItems ();	return result;}LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {	LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam);	if (result != null) return result;	/*	* Feature in Windows.  When a tool bar that contains	* separators is wrapped, under certain circumstances,	* Windows redraws the entire tool bar unnecessarily	* when resized no item is moves.  Whether the entire	* toolbar is damaged or not seems to depend on the	* size of the tool bar and the position of the separators.	* The fix is to ensure that the newly exposed areas are	* always damaged, and avoid the redraw when no tool item	* moves.	*/	if (drawCount != 0) return result;	if ((style & SWT.WRAP) == 0) return result;	if (!OS.IsWindowVisible (handle)) return result;	if (OS.SendMessage (handle, OS.TB_GETROWS, 0, 0) == 1) {		return result;	}	WINDOWPOS lpwp = new WINDOWPOS ();	OS.MoveMemory (lpwp, lParam, WINDOWPOS.sizeof);	if ((lpwp.flags & (OS.SWP_NOSIZE | OS.SWP_NOREDRAW)) != 0) {		return result;	}	RECT oldRect = new RECT ();	OS.GetClientRect (handle, oldRect);	RECT newRect = new RECT ();	OS.SetRect (newRect, 0, 0, lpwp.cx, lpwp.cy);	OS.SendMessage (handle, OS.WM_NCCALCSIZE, 0, newRect);	int oldWidth = oldRect.right - oldRect.left;	int oldHeight = oldRect.bottom - oldRect.top;	int newWidth = newRect.right - newRect.left;	int newHeight = newRect.bottom - newRect.top;	if (newWidth > oldWidth) {		/*		* Bug in Windows.  When a flat tool bar is wrapped,		* Windows draws a horizontal separator between the		* rows.  The tool bar does not draw the first or		* the last two pixels of this separator.  When the		* toolbar is resized to be bigger, only the new		* area is drawn and the last two pixels, which are		* blank are drawn over by separator.  This leaves		* garbage on the screen.  The fix is to damage the		* pixels.		*/		RECT rect = new RECT ();		OS.SetRect (rect, oldWidth - 2, 0, oldWidth, newHeight);		OS.InvalidateRect (handle, rect, false);		OS.SetRect (rect, oldRect.right, newRect.top, newRect.right, newRect.bottom);		OS.InvalidateRect (handle, rect, true);	}	if (newHeight > oldHeight) {		RECT rect = new RECT ();		OS.SetRect (rect, newRect.left, oldRect.bottom, newRect.right, newRect.bottom);		OS.InvalidateRect (handle, rect, true);	}	return result;}LRESULT wmCommandChild (int wParam, int lParam) {	ToolItem child = items [wParam & 0xFFFF];	if (child == null) return null;	return child.wmCommandChild (wParam, lParam);}LRESULT wmNotifyChild (int wParam, int lParam) {	NMHDR hdr = new NMHDR ();	OS.MoveMemory (hdr, lParam, NMHDR.sizeof);	switch (hdr.code) {		case OS.TBN_DROPDOWN:			NMTOOLBAR lpnmtb = new NMTOOLBAR ();			OS.MoveMemory (lpnmtb, lParam, NMTOOLBAR.sizeof);			ToolItem child = items [lpnmtb.iItem];			if (child != null) {				Event event = new Event ();				event.detail = SWT.ARROW;				int index = OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lpnmtb.iItem, 0);				RECT rect = new RECT ();				OS.SendMessage (handle, OS.TB_GETITEMRECT, index, rect);				event.x = rect.left;				event.y = rect.bottom;				child.postEvent (SWT.Selection, event);			}			break;		case OS.NM_CUSTOMDRAW: 			if (background == -1) break;			NMCUSTOMDRAW nmcd = new NMCUSTOMDRAW ();			OS.MoveMemory (nmcd, lParam, NMCUSTOMDRAW.sizeof);			switch (nmcd.dwDrawStage) {				case OS.CDDS_PREERASE:					return new LRESULT (OS.CDRF_NOTIFYPOSTERASE);				case OS.CDDS_POSTERASE:					drawBackground(nmcd.hdc);					return null;			}			break;	}	return super.wmNotifyChild (wParam, lParam);}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲va国产天堂va久久en| 欧美午夜理伦三级在线观看| 色综合久久天天| 久久影院午夜论| 亚洲大片一区二区三区| 成人午夜精品在线| 精品久久久久av影院| 亚洲制服丝袜在线| 不卡高清视频专区| 国产免费观看久久| 欧美专区日韩专区| 中文字幕成人在线观看| 精品午夜一区二区三区在线观看| 色婷婷狠狠综合| 亚洲欧洲另类国产综合| 国产成人在线色| 国产色一区二区| 国产乱码字幕精品高清av | 国产三级一区二区三区| 天天免费综合色| 欧美性淫爽ww久久久久无| 一色桃子久久精品亚洲| 成人免费观看视频| 亚洲国产激情av| 国产精品911| 国产午夜精品久久| 高清不卡一二三区| 国产精品青草久久| 97国产一区二区| 亚洲日本va午夜在线电影| 91丝袜美腿高跟国产极品老师 | 久久综合色天天久久综合图片| 亚洲午夜电影在线| 欧美色综合天天久久综合精品| 一区二区三区精品久久久| 欧美亚洲自拍偷拍| 日韩专区一卡二卡| 欧美成人女星排行榜| 韩国三级电影一区二区| 久久影院午夜片一区| 国产成人在线视频网站| 国产精品萝li| 欧美性大战久久| 日韩福利视频网| 欧美成人女星排行榜| 成人一区二区三区视频在线观看| 国产精品久久久久精k8| 91国模大尺度私拍在线视频| 婷婷六月综合亚洲| 久久美女艺术照精彩视频福利播放| 国产精品一区二区三区四区 | 日韩一区二区在线观看视频| 精品一区二区日韩| 国产精品久久国产精麻豆99网站| 97se狠狠狠综合亚洲狠狠| 亚洲一二三专区| 精品日韩一区二区三区| 成人18精品视频| 肉色丝袜一区二区| 欧美极品xxx| 色综合色综合色综合| 日本不卡视频一二三区| 国产精品久久久久精k8| 欧美精品视频www在线观看| 国产精品亚洲专一区二区三区| 成人免费视频在线观看| 欧美mv日韩mv国产网站| 色综合久久天天综合网| 国产揄拍国内精品对白| 亚洲精选免费视频| 久久久99免费| 6080国产精品一区二区| av高清不卡在线| 麻豆一区二区三| 一区二区在线观看不卡| 久久精品一区八戒影视| 欧美精品tushy高清| 成人av资源在线观看| 久久97超碰色| 亚洲国产美女搞黄色| 国产精品色哟哟网站| 欧美tk—视频vk| 欧美日韩高清一区二区不卡| www.亚洲在线| 国产精品一线二线三线精华| 婷婷国产在线综合| 一区二区三区在线视频观看| 亚洲国产精品高清| 久久人人超碰精品| 91精品国产黑色紧身裤美女| 色婷婷亚洲婷婷| 99视频在线精品| 国产91精品精华液一区二区三区 | 亚洲蜜臀av乱码久久精品 | 成人av在线看| 国产精品原创巨作av| 麻豆精品在线看| 亚洲成人av电影| 亚洲一区在线视频观看| 最新中文字幕一区二区三区 | 国产一区二区看久久| 午夜精品一区二区三区三上悠亚| 136国产福利精品导航| 日本一二三四高清不卡| 久久精品人人做人人爽人人| 精品国产凹凸成av人网站| 国产精品久久久久久久久快鸭| 精品成a人在线观看| 日韩免费高清av| 日韩三级电影网址| 欧美成人一区二区三区| 欧美不卡一区二区三区四区| 日韩欧美黄色影院| 精品国产乱码久久久久久牛牛| 欧美tickle裸体挠脚心vk| 精品欧美一区二区久久| 欧美精品一区男女天堂| 精品国产乱码久久久久久1区2区 | 亚洲一区二区三区自拍| 亚洲影视在线播放| 偷拍日韩校园综合在线| 免费成人av在线| 精品一区二区在线免费观看| 国产一区二区不卡老阿姨| 国产精品77777竹菊影视小说| 精品一区二区三区香蕉蜜桃| 国产电影精品久久禁18| 成人av资源站| 在线观看www91| 欧美一二三四区在线| 亚洲精品在线免费观看视频| 日本一区二区综合亚洲| 亚洲女同女同女同女同女同69| 亚洲午夜激情av| 久久超级碰视频| 成人免费高清在线观看| 欧美亚洲综合另类| 久久综合色8888| 自拍偷拍国产精品| 日韩和欧美一区二区| 国产一区三区三区| 91麻豆视频网站| 日韩视频免费直播| 国产精品久久网站| 日产欧产美韩系列久久99| 国产精品一区一区| 色8久久精品久久久久久蜜| 欧美一级黄色大片| 国产精品视频一二| 日日摸夜夜添夜夜添国产精品| 国产麻豆视频一区| 欧美亚洲动漫精品| 国产欧美一区二区三区鸳鸯浴| 亚洲最大成人综合| 国产精品综合久久| 欧美日韩视频不卡| 中文av一区特黄| 日产国产欧美视频一区精品| av激情综合网| 久久综合九色综合97婷婷| 亚洲自拍欧美精品| 成人免费的视频| 欧美成人一区二区三区 | 国产精品久久久久影院老司| 亚洲成人精品影院| 91蜜桃网址入口| 久久嫩草精品久久久精品一| 亚洲五月六月丁香激情| 国产69精品一区二区亚洲孕妇| 欧美另类videos死尸| 亚洲日本电影在线| 国产精品亚洲午夜一区二区三区| 精品视频在线免费看| 国产精品久久精品日日| 国产一区二区三区美女| 欧美一区日韩一区| 国产精品18久久久久久久久| 欧美久久一区二区| 一区二区三区在线观看欧美| 本田岬高潮一区二区三区| 久久丝袜美腿综合| 久久国产精品无码网站| 这里只有精品99re| 日日嗨av一区二区三区四区| 色悠悠久久综合| 国产农村妇女毛片精品久久麻豆| 国内外成人在线| 精品国产1区二区| 韩日精品视频一区| 精品国内二区三区| 六月丁香综合在线视频| 欧美一区二区播放| 日韩高清在线观看| 日韩一区二区不卡| 免费成人美女在线观看.| 日韩亚洲欧美高清| 久久成人久久鬼色| 久久久国产综合精品女国产盗摄| 国产乱妇无码大片在线观看| 国产偷v国产偷v亚洲高清|