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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? toolbar.java

?? 源碼為Eclipse開源開發(fā)平臺(tái)桌面開發(fā)工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 3 頁
字號(hào):
/******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html *  * Contributors: *     IBM Corporation - initial API and implementation *******************************************************************************/package org.eclipse.swt.widgets;import org.eclipse.swt.internal.win32.*;import org.eclipse.swt.*;import org.eclipse.swt.graphics.*;/** * Instances of this class support the layout of selectable * tool bar items. * <p> * The item children that may be added to instances of this class * must be of type <code>ToolItem</code>. * </p><p> * Note that although this class is a subclass of <code>Composite</code>, * it does not make sense to add <code>Control</code> children to it, * or set a layout on it. * </p><p> * <dl> * <dt><b>Styles:</b></dt> * <dd>FLAT, WRAP, RIGHT, HORIZONTAL, VERTICAL, SHADOW_OUT</dd> * <dt><b>Events:</b></dt> * <dd>(none)</dd> * </dl> * <p> * Note: Only one of the styles HORIZONTAL and VERTICAL may be specified. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> */public class ToolBar extends Composite {	int lastFocusId;	ToolItem [] items;	boolean ignoreResize;	ImageList imageList, disabledImageList, hotImageList;	static final int ToolBarProc;	static final TCHAR ToolBarClass = new TCHAR (0, OS.TOOLBARCLASSNAME, true);	static {		WNDCLASS lpWndClass = new WNDCLASS ();		OS.GetClassInfo (0, ToolBarClass, lpWndClass);		ToolBarProc = lpWndClass.lpfnWndProc;	}		/*	* From the Windows SDK for TB_SETBUTTONSIZE:	*	*   "If an application does not explicitly	*	set the button size, the size defaults	*	to 24 by 22 pixels". 	*/	static final int DEFAULT_WIDTH = 24;	static final int DEFAULT_HEIGHT = 22;/** * Constructs a new instance of this class given its parent * and a style value describing its behavior and appearance. * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this * class, or must be built by <em>bitwise OR</em>'ing together  * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. * Style bits are also inherited from superclasses. * </p> * * @param parent a composite control which will be the parent of the new instance (cannot be null) * @param style the style of control to construct * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> * * @see SWT#FLAT * @see SWT#WRAP * @see SWT#RIGHT * @see SWT#HORIZONTAL * @see SWT#SHADOW_OUT * @see SWT#VERTICAL * @see Widget#checkSubclass() * @see Widget#getStyle() */public ToolBar (Composite parent, int style) {	super (parent, checkStyle (style));	/*	* Ensure that either of HORIZONTAL or VERTICAL is set.	* NOTE: HORIZONTAL and VERTICAL have the same values	* as H_SCROLL and V_SCROLL so it is necessary to first	* clear these bits to avoid scroll bars and then reset	* the bits using the original style supplied by the	* programmer.	*/	if ((style & SWT.VERTICAL) != 0) {		this.style |= SWT.VERTICAL;	} else {		this.style |= SWT.HORIZONTAL;	}}int callWindowProc (int msg, int wParam, int lParam) {	if (handle == 0) return 0;	/*	* Bug in Windows.  For some reason, during the processing	* of WM_SYSCHAR, the tool bar window proc does not call the	* default window proc causing mnemonics for the menu bar	* to be ignored.  The fix is to always call the default	* window proc for WM_SYSCHAR.	*/	if (msg == OS.WM_SYSCHAR) {		return OS.DefWindowProc (handle, msg, wParam, lParam);	}	return OS.CallWindowProc (ToolBarProc, handle, msg, wParam, lParam);}static int checkStyle (int style) {	/*	* On Windows, only flat tool bars can be traversed.	*/	if ((style & SWT.FLAT) == 0) style |= SWT.NO_FOCUS;		/*	* A vertical tool bar cannot wrap because TB_SETROWS	* fails when the toobar has TBSTYLE_WRAPABLE.	*/	if ((style & SWT.VERTICAL) != 0) style &= ~SWT.WRAP;			/*	* Even though it is legal to create this widget	* with scroll bars, they serve no useful purpose	* because they do not automatically scroll the	* widget's client area.  The fix is to clear	* the SWT style.	*/	return style & ~(SWT.H_SCROLL | SWT.V_SCROLL);}protected void checkSubclass () {	if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);}public Point computeSize (int wHint, int hHint, boolean changed) {	checkWidget ();	if (layout != null) {		return super.computeSize (wHint, hHint, changed);	}	int width = 0, height = 0;	if ((style & SWT.VERTICAL) != 0) {		RECT rect = new RECT ();		TBBUTTON lpButton = new TBBUTTON ();		int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);		for (int i=0; i<count; i++) {			OS.SendMessage (handle, OS.TB_GETITEMRECT, i, rect);			height = Math.max (height, rect.bottom);			OS.SendMessage (handle, OS.TB_GETBUTTON, i, lpButton);			if ((lpButton.fsStyle & OS.BTNS_SEP) == 0) {				width = Math.max (width, rect.right);			}		}	} else {		RECT oldRect = new RECT ();		OS.GetWindowRect (handle, oldRect);		int oldWidth = oldRect.right - oldRect.left;		int oldHeight = oldRect.bottom - oldRect.top;		int border = getBorderWidth ();		int newWidth = wHint == SWT.DEFAULT ? 0x3FFF : wHint + border * 2;		int newHeight = hHint == SWT.DEFAULT ? 0x3FFF : hHint + border * 2;		boolean redraw = drawCount == 0 && OS.IsWindowVisible (handle);		ignoreResize = true;		if (redraw) OS.UpdateWindow (handle);		int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOREDRAW | OS.SWP_NOZORDER;		SetWindowPos (handle, 0, 0, 0, newWidth, newHeight, flags);		int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);		if (count != 0) {			RECT rect = new RECT ();			OS.SendMessage (handle, OS.TB_GETITEMRECT, count - 1, rect);			width = Math.max (width, rect.right);			height = Math.max (height, rect.bottom);		}		SetWindowPos (handle, 0, 0, 0, oldWidth, oldHeight, flags);		if (redraw) OS.ValidateRect (handle, null);		ignoreResize = false;	}		/*	* From the Windows SDK for TB_SETBUTTONSIZE:	*	*   "If an application does not explicitly	*	set the button size, the size defaults	*	to 24 by 22 pixels". 	*/	if (width == 0) width = DEFAULT_WIDTH;	if (height == 0) height = DEFAULT_HEIGHT;	if (wHint != SWT.DEFAULT) width = wHint;	if (hHint != SWT.DEFAULT) height = hHint;	Rectangle trim = computeTrim (0, 0, width, height);	width = trim.width;  height = trim.height;	return new Point (width, height);}public Rectangle computeTrim (int x, int y, int width, int height) {	checkWidget ();	Rectangle trim = super.computeTrim (x, y, width, height);	int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);	if ((bits & OS.CCS_NODIVIDER) == 0) trim.height += 2;	return trim;}void createHandle () {	super.createHandle ();	state &= ~CANVAS;	/*	* Feature in Windows.  Despite the fact that the	* tool tip text contains \r\n, the tooltip will	* not honour the new line unless TTM_SETMAXTIPWIDTH	* is set.  The fix is to set TTM_SETMAXTIPWIDTH to	* a large value.	*/	/*	* These lines are intentionally commented.  The tool	* bar currently sets this value to 300 so it is not	* necessary to set TTM_SETMAXTIPWIDTH.	*///	int hwndToolTip = OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);//	OS.SendMessage (hwndToolTip, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);	/*	* Feature in Windows.  When the control is created,	* it does not use the default system font.  A new HFONT	* is created and destroyed when the control is destroyed.	* This means that a program that queries the font from	* this control, uses the font in another control and then	* destroys this control will have the font unexpectedly	* destroyed in the other control.  The fix is to assign	* the font ourselves each time the control is created.	* The control will not destroy a font that it did not	* create.	*/	int hFont = OS.GetStockObject (OS.SYSTEM_FONT);	OS.SendMessage (handle, OS.WM_SETFONT, hFont, 0);	/* Set the button struct, bitmap and button sizes */	OS.SendMessage (handle, OS.TB_BUTTONSTRUCTSIZE, TBBUTTON.sizeof, 0);	OS.SendMessage (handle, OS.TB_SETBITMAPSIZE, 0, 0);	OS.SendMessage (handle, OS.TB_SETBUTTONSIZE, 0, 0);	/* Set the extended style bits */	int bits = OS.TBSTYLE_EX_DRAWDDARROWS | OS.TBSTYLE_EX_MIXEDBUTTONS;	OS.SendMessage (handle, OS.TB_SETEXTENDEDSTYLE, 0, bits);}void createItem (ToolItem item, int index) {	int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);	if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);	int id = 0;	while (id < items.length && items [id] != null) id++;	if (id == items.length) {		ToolItem [] newItems = new ToolItem [items.length + 4];		System.arraycopy (items, 0, newItems, 0, items.length);		items = newItems;	}	int bits = item.widgetStyle ();	TBBUTTON lpButton = new TBBUTTON ();	lpButton.idCommand = id;	lpButton.fsStyle = (byte) bits;	lpButton.fsState = (byte) OS.TBSTATE_ENABLED;		/*	* Bug in Windows.  Despite the fact that the image list	* index has never been set for the item, Windows always	* assumes that the image index for the item is valid.	* When an item is inserted, the image index is zero.	* Therefore, when the first image is inserted and is	* assigned image index zero, every item draws with this	* image.  The fix is to set the image index to none	* when the item is created.  This is not necessary in	* the case when the item has the BTNS_SEP style because	* separators cannot show images.	*/	if ((bits & OS.BTNS_SEP) == 0) lpButton.iBitmap = OS.I_IMAGENONE;	if (OS.SendMessage (handle, OS.TB_INSERTBUTTON, index, lpButton) == 0) {		error (SWT.ERROR_ITEM_NOT_ADDED);	}	items [item.id = id] = item;	if ((style & SWT.VERTICAL) != 0) setRows (count + 1);	layoutItems ();}void createWidget () {	super.createWidget ();	items = new ToolItem [4];	lastFocusId = -1;}int defaultBackground () {	if (OS.IsWinCE) return OS.GetSysColor (OS.COLOR_BTNFACE);	return super.defaultBackground ();}void destroyItem (ToolItem item) {	TBBUTTONINFO info = new TBBUTTONINFO ();	info.cbSize = TBBUTTONINFO.sizeof;	info.dwMask = OS.TBIF_IMAGE | OS.TBIF_STYLE;	int index = OS.SendMessage (handle, OS.TB_GETBUTTONINFO, item.id, info);	/*	* Feature in Windows.  For some reason, a tool item that has	* the style BTNS_SEP does not return I_IMAGENONE when queried	* for an image index, despite the fact that no attempt has been	* made to assign an image to the item.  As a result, operations	* on an image list that use the wrong index cause random results.		* The fix is to ensure that the tool item is not a separator	* before using the image index.  Since separators cannot have	* an image and one is never assigned, this is not a problem.	*/	if ((info.fsStyle & OS.BTNS_SEP) == 0 && info.iImage != OS.I_IMAGENONE) {		if (imageList != null) imageList.put (info.iImage, null);		if (hotImageList != null) hotImageList.put (info.iImage, null);		if (disabledImageList != null) disabledImageList.put (info.iImage, null);	}	OS.SendMessage (handle, OS.TB_DELETEBUTTON, index, 0);	if (item.id == lastFocusId) lastFocusId = -1;	items [item.id] = null;	item.id = -1;	int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);	if (count == 0) {		if (imageList != null) {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久av资源网| 极品美女销魂一区二区三区| 中文av一区二区| 亚洲精品网站在线观看| 欧美国产日韩a欧美在线观看 | 中文字幕一区二区三区色视频| 欧美国产视频在线| 中文字幕日韩精品一区 | 午夜欧美视频在线观看| 午夜视频在线观看一区| 天堂在线一区二区| 美女被吸乳得到大胸91| 国产乱码精品1区2区3区| 国产一区二区中文字幕| 国产69精品久久久久777| 不卡的av电影| 欧美在线综合视频| 制服丝袜亚洲播放| 日韩精品一区二区三区视频播放| 欧美精品一区二区三区蜜桃视频| 久久这里都是精品| 国产精品美女久久福利网站| 亚洲欧洲制服丝袜| 午夜视频一区在线观看| 久久99国产精品麻豆| 国产精品自产自拍| 色素色在线综合| 51精品久久久久久久蜜臀| 亚洲精品一区二区三区蜜桃下载| 中国色在线观看另类| 亚洲精品久久久蜜桃| 日韩综合在线视频| 国产jizzjizz一区二区| 91免费视频大全| 717成人午夜免费福利电影| 欧美xxxxx裸体时装秀| 中文字幕第一区综合| 亚洲一二三四区不卡| 捆绑紧缚一区二区三区视频| 国产成人精品午夜视频免费| 在线欧美一区二区| 久久久美女毛片| 一区二区国产视频| 国产做a爰片久久毛片| 91偷拍与自偷拍精品| 日韩一区二区精品在线观看| 国产日本一区二区| 天堂久久一区二区三区| 成人高清视频在线| 91精品国产一区二区三区蜜臀| 国产日产精品1区| 日精品一区二区| 波多野结衣亚洲| 欧美刺激脚交jootjob| 欧美国产精品专区| 蜜桃视频免费观看一区| 99国内精品久久| 久久在线免费观看| 日韩精品国产欧美| 欧美三级韩国三级日本三斤| 国产亚洲综合在线| 日韩二区三区四区| 色婷婷综合激情| 国产亚洲自拍一区| 蜜臀精品久久久久久蜜臀| 色成人在线视频| 国产女同性恋一区二区| 久久国产剧场电影| 欧美日韩三级一区| 综合久久一区二区三区| 狠狠色丁香九九婷婷综合五月| 欧美性一二三区| 成人免费在线播放视频| 国产综合色产在线精品| 91精品视频网| 亚洲国产精品一区二区尤物区| 本田岬高潮一区二区三区| 久久精品日产第一区二区三区高清版| 日韩极品在线观看| 欧美影视一区二区三区| 亚洲欧洲美洲综合色网| 国产在线国偷精品产拍免费yy| 欧美丰满一区二区免费视频| 亚洲精品国产精华液| www.日韩在线| 国产精品国产三级国产有无不卡| 国产精品1区2区| 欧美成人性战久久| 免费成人小视频| 欧美一区欧美二区| 日本不卡在线视频| 欧美一区二区三区免费在线看| 亚洲电影在线免费观看| 色呦呦国产精品| 亚洲麻豆国产自偷在线| 91论坛在线播放| 亚洲视频在线一区观看| 丁香婷婷综合五月| 亚洲国产精品t66y| 成人爱爱电影网址| 中文字幕一区二区三区精华液| 不卡的av电影在线观看| 国产精品高潮久久久久无| 成人丝袜视频网| 亚洲图片激情小说| 色综合天天综合在线视频| 中文字幕在线观看不卡视频| 波多野结衣一区二区三区| 亚洲欧美综合在线精品| 91视频xxxx| 一级女性全黄久久生活片免费| 91豆麻精品91久久久久久| 亚洲国产精品天堂| 4hu四虎永久在线影院成人| 人人狠狠综合久久亚洲| 日韩欧美另类在线| 国产成人精品免费网站| 国产精品视频看| 色素色在线综合| 日韩一区欧美二区| 久久日一线二线三线suv| 色天使色偷偷av一区二区| 一区二区欧美精品| 日韩美女视频在线| 国产91精品一区二区| 亚洲男人的天堂av| 91精品国产91久久久久久一区二区 | 亚洲国产人成综合网站| 777久久久精品| 国产麻豆一精品一av一免费| 国产精品成人在线观看| 欧美色倩网站大全免费| 老司机精品视频导航| 国产精品天美传媒| 欧美亚州韩日在线看免费版国语版| 日韩综合在线视频| 国产三区在线成人av| 色综合久久综合中文综合网| 偷窥少妇高潮呻吟av久久免费| 精品毛片乱码1区2区3区| 波多野结衣中文字幕一区二区三区| 亚洲精品欧美二区三区中文字幕| 欧美一区二区三区免费在线看| 国产成a人亚洲精| 亚洲线精品一区二区三区| 精品国产sm最大网站免费看| 99久久国产免费看| 蜜桃视频在线观看一区| √…a在线天堂一区| 欧美一区二区精美| 99久久精品国产一区| 蜜臀精品一区二区三区在线观看| 中文字幕一区av| 欧美一级二级在线观看| 91丝袜美腿高跟国产极品老师| 日本成人在线网站| 亚洲精品免费看| 6080国产精品一区二区| 亚洲成人先锋电影| 日韩黄色一级片| 久久久综合九色合综国产精品| 九九精品一区二区| 亚洲女子a中天字幕| 2021中文字幕一区亚洲| 欧美性猛片aaaaaaa做受| 国产精品性做久久久久久| 亚洲成人自拍一区| 国产精品国产馆在线真实露脸| 日韩色在线观看| 欧美在线|欧美| 成人sese在线| 国产一区二区三区在线观看免费| 亚洲大片一区二区三区| 综合色天天鬼久久鬼色| 国产色产综合色产在线视频| 777午夜精品免费视频| 日本韩国精品在线| 成人动漫av在线| 国产在线一区观看| 美女一区二区视频| 亚洲图片一区二区| 亚洲黄色尤物视频| 国产日韩视频一区二区三区| 欧美美女网站色| 91黄色免费看| av在线不卡电影| 粉嫩av一区二区三区粉嫩 | 91色视频在线| 国产成人免费高清| 久久精品99久久久| 日韩精品亚洲一区| 91国在线观看| 日韩精品电影在线观看| 国产亚洲女人久久久久毛片| 亚洲综合免费观看高清完整版 | 日本免费新一区视频| 亚洲一本大道在线| 一区二区三区丝袜| 一区二区三区四区五区视频在线观看 | www.欧美日韩|