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

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

?? menuitem.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
		* Bug in Windows.  When GetMenuItemInfo() is used to get the text,		* for an item that has a bitmap set using MIIM_BITMAP, the text is		* not returned.  This means that when SetMenuItemInfo() is used to		* set the submenu and the current menu state, the text is lost.		* The fix is to temporarily remove the bitmap and restore it after		* the text and submenu have been set.		*/		if (!OS.IsWinCE && (OS.WIN32_MAJOR << 16 | OS.WIN32_MINOR) >= (4 << 16 | 10)) {			info.fMask = OS.MIIM_BITMAP;			OS.GetMenuItemInfo (hMenu, index, true, info);			hasBitmap = info.hbmpItem != 0;			if (hasBitmap) {				info.hbmpItem = 0;				success = OS.SetMenuItemInfo (hMenu, id, false, info);			}		}				int cch = 128;		int hHeap = OS.GetProcessHeap ();		int byteCount = cch * TCHAR.sizeof;		int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);		info.fMask = OS.MIIM_STATE | OS.MIIM_ID | OS.MIIM_TYPE | OS.MIIM_DATA;		info.dwTypeData = pszText;		info.cch = cch;		success = OS.GetMenuItemInfo (hMenu, index, true, info);		if (menu != null) {			menu.cascade = this; 			info.fMask |= OS.MIIM_SUBMENU;			info.hSubMenu = menu.handle;		}		OS.RemoveMenu (hMenu, index, OS.MF_BYPOSITION);		if (OS.IsWinCE) {			/*			* On WinCE, InsertMenuItem() is not available.  The fix is to			* use SetMenuItemInfo() but this call does not set the menu item			* state and submenu.  The fix is to use InsertMenu() to insert			* the item, SetMenuItemInfo() to set the string and EnableMenuItem()			* and CheckMenuItem() to set the state.			*/			int uIDNewItem = id;			int uFlags = OS.MF_BYPOSITION;			if (menu != null) {				uFlags |= OS.MF_POPUP;				uIDNewItem = menu.handle;			}			TCHAR lpNewItem = new TCHAR (0, " ", true);			success = OS.InsertMenu (hMenu, index, uFlags, uIDNewItem, lpNewItem);			if (success) {				info.fMask = OS.MIIM_DATA | OS.MIIM_TYPE;				success = OS.SetMenuItemInfo (hMenu, index, true, info);				if ((info.fState & (OS.MFS_DISABLED | OS.MFS_GRAYED)) != 0) {					OS.EnableMenuItem (hMenu, index, OS.MF_BYPOSITION | OS.MF_GRAYED);				}				if ((info.fState & OS.MFS_CHECKED) != 0) {					OS.CheckMenuItem (hMenu, index, OS.MF_BYPOSITION | OS.MF_CHECKED);				}			}		} else {			success = OS.InsertMenuItem (hMenu, index, true, info);			/*			* Restore the bitmap that was removed to work around a problem			* in GetMenuItemInfo() and menu items that have bitmaps set with			* MIIM_BITMAP.			*/			if ((OS.WIN32_MAJOR << 16 | OS.WIN32_MINOR) >= (4 << 16 | 10)) {				if (hasBitmap) {					info.fMask = OS.MIIM_BITMAP;					info.hbmpItem = OS.HBMMENU_CALLBACK;					success = OS.SetMenuItemInfo (hMenu, id, false, info);				}			}					}		if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);		if (!success) error (SWT.ERROR_CANNOT_SET_MENU);	}	parent.destroyAccelerators ();}boolean setRadioSelection (boolean value) {	if ((style & SWT.RADIO) == 0) return false;	if (getSelection () != value) {		setSelection (value);		postEvent (SWT.Selection);	}	return true;}/** * Sets the selection state of the receiver. * <p> * When the receiver is of type <code>CHECK</code> or <code>RADIO</code>, * it is selected when it is checked. * * @param selected the new selection state * * @exception SWTException <ul> *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */public void setSelection (boolean selected) {	checkWidget ();	if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return;	if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) return;	int hMenu = parent.handle;	if (OS.IsWinCE) {		int index = parent.indexOf (this);		if (index == -1) return;		int uCheck = OS.MF_BYPOSITION | (selected ? OS.MF_CHECKED : OS.MF_UNCHECKED);		OS.CheckMenuItem (hMenu, index, uCheck);	} else {		MENUITEMINFO info = new MENUITEMINFO ();		info.cbSize = MENUITEMINFO.sizeof;		info.fMask = OS.MIIM_STATE;		boolean success = OS.GetMenuItemInfo (hMenu, id, false, info);		if (!success) error (SWT.ERROR_CANNOT_SET_SELECTION);		info.fState &= ~OS.MFS_CHECKED;		if (selected) info.fState |= OS.MFS_CHECKED;		success = OS.SetMenuItemInfo (hMenu, id, false, info);		if (!success) error (SWT.ERROR_CANNOT_SET_SELECTION);	}	parent.redraw ();}/** * Sets the receiver's text. The string may include * the mnemonic character and accelerator text. * <p> * Mnemonics are indicated by an '&amp' that causes the next * character to be the mnemonic.  When the user presses a * key sequence that matches the mnemonic, a selection * event occurs. On most platforms, the mnemonic appears * underlined but may be emphasised in a platform specific * manner.  The mnemonic indicator character '&amp' can be * escaped by doubling it in the string, causing a single *'&amp' to be displayed. * </p> * <p> * Accelerator text is indicated by the '\t' character. * On platforms that support accelerator text, the text * that follows the '\t' character is displayed to the user, * typically indicating the key stroke that will cause * the item to become selected.  On most platforms, the * accelerator text appears right aligned in the menu. * Setting the accelerator text does not install the * accelerator key sequence. The accelerator key sequence * is installed using #setAccelerator. * </p> *  * @param string the new text * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the text is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> *  * @see #setAccelerator */public void setText (String string) {	checkWidget ();	if (string == null) error (SWT.ERROR_NULL_ARGUMENT);	if ((style & SWT.SEPARATOR) != 0) return;	if (text.equals (string)) return;	super.setText (string);	int hHeap = OS.GetProcessHeap ();	int pszText = 0;	boolean success = false;	if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) {		/*		* Bug in WinCE PPC.  Tool items on the menubar don't resize		* correctly when the character '&' is used (even when it		* is a sequence '&&').  The fix is to remove all '&' from		* the string. 		*/		if (string.indexOf ('&') != -1) {			int length = string.length ();			char[] text = new char [length];			string.getChars( 0, length, text, 0);			int i = 0, j = 0;			for (i=0; i<length; i++) {				if (text[i] != '&') text [j++] = text [i];			}			if (j < i) string = new String (text, 0, j);		}		/* Use the character encoding for the default locale */		TCHAR buffer = new TCHAR (0, string, true);		int byteCount = buffer.length () * TCHAR.sizeof;		pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);		OS.MoveMemory (pszText, buffer, byteCount);			int hwndCB = parent.hwndCB;		TBBUTTONINFO info2 = new TBBUTTONINFO ();		info2.cbSize = TBBUTTONINFO.sizeof;		info2.dwMask = OS.TBIF_TEXT;		info2.pszText = pszText;		success = OS.SendMessage (hwndCB, OS.TB_SETBUTTONINFO, id, info2) != 0;	} else {		MENUITEMINFO info = new MENUITEMINFO ();		info.cbSize = MENUITEMINFO.sizeof;		int hMenu = parent.handle;				/*		* Bug in Windows 2000.  For some reason, when MIIM_TYPE is set		* on a menu item that also has MIIM_BITMAP, the MIIM_TYPE clears		* the MIIM_BITMAP style.  The fix is to reset both MIIM_BITMAP.		* Note, this does not happen on Windows 98.		*/		boolean hasBitmap = false;		if (!OS.IsWinCE && (OS.WIN32_MAJOR << 16 | OS.WIN32_MINOR) >= (4 << 16 | 10)) {			info.fMask = OS.MIIM_BITMAP;			OS.GetMenuItemInfo (hMenu, id, false, info);			hasBitmap = info.hbmpItem != 0;		}				/* Use the character encoding for the default locale */		TCHAR buffer = new TCHAR (0, string, true);		int byteCount = buffer.length () * TCHAR.sizeof;		pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);		OS.MoveMemory (pszText, buffer, byteCount);			info.fMask = OS.MIIM_TYPE;		info.fType = widgetStyle ();		info.dwTypeData = pszText;		success = OS.SetMenuItemInfo (hMenu, id, false, info);		/*		* Restore the bitmap that was removed to work around a problem		* in GetMenuItemInfo() and menu items that have bitmaps set with		* MIIM_BITMAP.		*/		if (!OS.IsWinCE && (OS.WIN32_MAJOR << 16 | OS.WIN32_MINOR) >= (4 << 16 | 10)) {			if (hasBitmap) {				info.fMask = OS.MIIM_BITMAP;				info.hbmpItem = OS.HBMMENU_CALLBACK;				success = OS.SetMenuItemInfo (hMenu, id, false, info);			}		}	}	if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);	if (!success) error (SWT.ERROR_CANNOT_SET_TEXT);	parent.redraw ();}int widgetStyle () {	int bits = 0;	Decorations shell = parent.parent;	if ((shell.style & SWT.MIRRORED) != 0) {		if ((parent.style & SWT.LEFT_TO_RIGHT) != 0) {			bits |= OS.MFT_RIGHTJUSTIFY | OS.MFT_RIGHTORDER;		}	} else {		if ((parent.style & SWT.RIGHT_TO_LEFT) != 0) {			bits |= OS.MFT_RIGHTJUSTIFY | OS.MFT_RIGHTORDER;		}	}	if ((style & SWT.SEPARATOR) != 0) return bits | OS.MFT_SEPARATOR;	if ((style & SWT.RADIO) != 0) return bits | OS.MFT_RADIOCHECK;	return bits | OS.MFT_STRING;}LRESULT wmCommandChild (int wParam, int lParam) {	if ((style & SWT.CHECK) != 0) {		setSelection (!getSelection ());	} else {		if ((style & SWT.RADIO) != 0) {			if ((parent.getStyle () & SWT.NO_RADIO_GROUP) != 0) {				setSelection (!getSelection ());			} else {				selectRadio ();			}		}	}	Event event = new Event ();	setInputState (event, SWT.Selection);	postEvent (SWT.Selection, event);	return null;}LRESULT wmDrawChild (int wParam, int lParam) {	DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();	OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);	if (image != null) {		GCData data = new GCData();		data.device = display;		GC gc = GC.win32_new (struct.hDC, data);		/*		* Bug in Windows.  When a bitmap is included in the		* menu bar, the HDC seems to already include the left		* coordinate.  The fix is to ignore this value when		* the item is in a menu bar.		*/		int x = (parent.style & SWT.BAR) != 0 ? (OS.IsWin95 ? 4 : 2) : struct.left;		gc.drawImage (image, x, struct.top + 2);		gc.dispose ();	}	return null;}LRESULT wmMeasureChild (int wParam, int lParam) {	MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT ();	OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof);	int width = 0, height = 0;	if (image != null) {		Rectangle rect = image.getBounds ();		width = rect.width;		height = rect.height;	} else {		/*		* Bug in Windows.  If a menu contains items that have		* images and can be checked, Windows does not include		* the width of the image and the width of the check when		* computing the width of the menu.  When the longest item		* does not have an image, the label and the accelerator		* text can overlap.  The fix is to use SetMenuItemInfo()		* to indicate that all items have a bitmap and then include		* the width of the widest bitmap in WM_MEASURECHILD.		*/		MENUINFO lpcmi = new MENUINFO ();		lpcmi.cbSize = MENUINFO.sizeof;		lpcmi.fMask = OS.MIM_STYLE;		int hMenu = parent.handle;		OS.GetMenuInfo (hMenu, lpcmi);		if ((lpcmi.dwStyle & OS.MNS_CHECKORBMP) == 0) {			MenuItem [] items = parent.getItems ();			for (int i=0; i<items.length; i++) {				MenuItem item = items [i];				if (item.image != null) {					Rectangle rect = item.image.getBounds ();					width = Math.max (width, rect.width); 				}			}		}	}	if (width != 0 || height != 0) {		/*		* Feature in Windows.  On Windows 98, it is necessary		* to add 4 pixels to the width of the image or the image		* and text are too close.  On other Windows platforms,		* this causes the text of the longest item to touch the		* accelerator text.  The fix is to add only 2 pixels in		* this case.		*/		struct.itemWidth = width + (OS.IsWin95 ? 4 : 2);		struct.itemHeight = height + 4;		OS.MoveMemory (lParam, struct, MEASUREITEMSTRUCT.sizeof);	}	return null;}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性猛片xxxx免费看久爱| 久久尤物电影视频在线观看| 久久这里只有精品视频网| 国产精品久久久久久久第一福利 | 欧美电影在哪看比较好| 久久久久久久久久美女| 图片区小说区国产精品视频| 91在线视频播放地址| 久久天天做天天爱综合色| 午夜久久久久久久久久一区二区| 99久久婷婷国产| 国产欧美中文在线| 久久国产精品99久久久久久老狼 | 丁香婷婷综合网| 91麻豆精品国产无毒不卡在线观看| 亚洲欧美在线视频观看| 成人自拍视频在线| 欧美大片免费久久精品三p| 亚洲v日本v欧美v久久精品| 在线视频国内自拍亚洲视频| 国产精品女主播av| 成人avav影音| 国产精品久线在线观看| 成人午夜电影网站| 日本一区二区三区国色天香| 国产一区二区毛片| 国产亚洲一本大道中文在线| 国产在线国偷精品产拍免费yy| 欧美一级日韩免费不卡| 人人狠狠综合久久亚洲| 在线成人高清不卡| 日本不卡视频在线| 欧美一区二区三区思思人| 日韩黄色小视频| 欧美一个色资源| 激情综合色播激情啊| 欧美videofree性高清杂交| 精品一区二区三区在线视频| 精品免费视频一区二区| 国产在线视频一区二区| 久久久久9999亚洲精品| 成人av片在线观看| 亚洲精品国产成人久久av盗摄| 欧美综合欧美视频| 亚洲成av人片在www色猫咪| 91麻豆精品国产91久久久使用方法 | 精品国产免费视频| 国产高清视频一区| 中文字幕在线观看一区二区| 日本韩国欧美在线| 日韩国产欧美三级| 久久综合丝袜日本网| 成人午夜伦理影院| 亚洲综合色婷婷| 日韩欧美电影一区| 成人app在线| 三级久久三级久久久| 久久久久亚洲蜜桃| 99久久综合精品| 日本在线观看不卡视频| 中文字幕国产一区| 欧美日韩视频在线一区二区| 国产精品一卡二卡| 亚洲午夜激情av| 国产无人区一区二区三区| kk眼镜猥琐国模调教系列一区二区 | 欧美性猛片xxxx免费看久爱| 另类欧美日韩国产在线| 1区2区3区欧美| 精品国产青草久久久久福利| 在线视频综合导航| 国产一区二区三区电影在线观看| 亚洲精品免费在线观看| 欧美精品一区二区三| 色八戒一区二区三区| 国精产品一区一区三区mba桃花 | 欧美一区二区三区视频在线观看 | 椎名由奈av一区二区三区| 91麻豆精品91久久久久同性| 国产成人午夜精品5599| 日韩黄色免费电影| 亚洲女爱视频在线| 国产色爱av资源综合区| 日韩午夜电影av| 欧美在线免费播放| 成人动漫av在线| 国产一区二区三区在线观看免费 | 日韩精品91亚洲二区在线观看 | 91原创在线视频| 精品一二三四区| 亚洲国产精品久久人人爱| 国产精品午夜久久| 精品成人私密视频| 在线播放欧美女士性生活| 91热门视频在线观看| 国产成人免费高清| 狠狠色丁香九九婷婷综合五月| 亚洲高清不卡在线| 一区二区三区四区在线| 1区2区3区精品视频| 中文字幕欧美激情| 国产亚洲一本大道中文在线| 精品国产伦一区二区三区免费| 欧美高清视频不卡网| 欧美色男人天堂| 欧美亚洲综合一区| 欧美色男人天堂| 精品视频在线视频| 欧美精品色综合| 在线播放中文一区| 7777精品伊人久久久大香线蕉的 | 成人看片黄a免费看在线| 国产麻豆精品视频| 国产一区二区三区精品欧美日韩一区二区三区 | 国产精品亚洲第一| 国产精品一级片| 国产精品亚洲第一| 99综合电影在线视频| 99在线视频精品| 色偷偷88欧美精品久久久| 色久优优欧美色久优优| 欧美日本一区二区三区| 欧美精品在线视频| 日韩女优av电影在线观看| 精品久久久久久久久久久久包黑料 | 亚洲综合色在线| 五月天精品一区二区三区| 五月天婷婷综合| 激情六月婷婷久久| 成人av网址在线| 欧美亚洲综合一区| 日韩三级视频在线观看| 精品国产三级a在线观看| 国产欧美视频在线观看| 中文字幕一区二区三区精华液| 亚洲欧美日韩人成在线播放| 亚洲一区二区三区四区在线免费观看 | 亚洲人妖av一区二区| 性做久久久久久免费观看欧美| 人人狠狠综合久久亚洲| 粉嫩蜜臀av国产精品网站| 色婷婷久久久亚洲一区二区三区 | 国产日韩亚洲欧美综合| 一区二区三区中文在线| 美女爽到高潮91| av一二三不卡影片| 欧美精品精品一区| 国产精品视频一二三区 | 成人丝袜视频网| 欧美性感一区二区三区| 久久新电视剧免费观看| 一区二区在线免费观看| 国产一区二区三区在线观看免费| 91麻豆产精品久久久久久| 日韩一区二区在线看| 国产精品国产三级国产aⅴ中文 | 成人综合在线观看| 在线播放中文一区| 亚洲欧美怡红院| 精品一区二区在线视频| 欧美吻胸吃奶大尺度电影| 日本一区二区三区高清不卡| 日韩和欧美一区二区| 97se狠狠狠综合亚洲狠狠| 欧美不卡一区二区| 亚洲高清免费视频| 99精品一区二区三区| 久久综合九色综合欧美就去吻 | 亚洲精品乱码久久久久久久久| 麻豆成人久久精品二区三区红| 91视频免费播放| 国产亚洲欧美一级| 日本va欧美va瓶| 欧美老肥妇做.爰bbww| 国产精品久久久久久户外露出| 久久国产福利国产秒拍| 欧美日韩在线免费视频| 1024国产精品| 成人污污视频在线观看| 26uuu久久综合| 久久不见久久见免费视频1| 欧美精品乱码久久久久久| 18欧美亚洲精品| 不卡的av电影在线观看| 久久精品一区二区三区不卡牛牛| 蜜臀精品一区二区三区在线观看 | 国内成+人亚洲+欧美+综合在线| 欧美美女直播网站| 亚洲小少妇裸体bbw| 91同城在线观看| 亚洲日本乱码在线观看| 99免费精品视频| 最新国产精品久久精品| 岛国精品在线观看| 中文成人综合网| 91在线播放网址| 亚洲激情校园春色| 日本乱人伦aⅴ精品| 一区二区三区在线观看视频| 91最新地址在线播放|