当前位置: 首页>>代码示例>>C++>>正文


C++ JXWindow::GetXWindow方法代码示例

本文整理汇总了C++中JXWindow::GetXWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindow::GetXWindow方法的具体用法?C++ JXWindow::GetXWindow怎么用?C++ JXWindow::GetXWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JXWindow的用法示例。


在下文中一共展示了JXWindow::GetXWindow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: if

JBoolean
JXDockWidget::CloseAll()
{
	if (itsWindowList != NULL)
		{
		JXDisplay* display = GetDisplay();
		Display* xDisplay  = display->GetXDisplay();

		const JSize count = itsWindowList->GetElementCount();
		for (JIndex i=count; i>=1; i--)
			{
			JXWindow* w = itsWindowList->NthElement(i);
			StopListening(w);

			Window xWindow = w->GetXWindow();
			if (w->Close())
				{
				if (JXDisplay::WindowExists(display, xDisplay, xWindow))
					{
					w->Undock();
					}
				else if ((JXGetApplication())->DisplayExists(xDisplay))
					{
					itsTabGroup->DeleteTab(i);
					itsWindowList->RemoveElement(i);
					}
				else
					{
					return kJFalse;
					}
				}
			else
				{
				UpdateMinSize();
				return kJFalse;
				}
			}

		delete itsWindowList;
		itsWindowList = NULL;

		UpdateMinSize();
		}

	return kJTrue;
}
开发者ID:mbert,项目名称:mulberry-lib-jx,代码行数:46,代码来源:JXDockWidget.cpp

示例2: if

JBoolean
JXApplication::HandleOneEventForWindow
	(
	JXWindow*		window,
	const JBoolean	origAllowSleep,
	const JBoolean do_tasks
	)
{
	const JBoolean origHadBlockingWindowFlag = itsHadBlockingWindowFlag;

	itsHasBlockingWindowFlag = kJTrue;
	itsHadBlockingWindowFlag = kJFalse;		// req'd by JXWindow

	if (itsIdleTaskStack->IsEmpty())
		{
		PushIdleTaskStack();
		}

	UpdateCurrentTime();
	const JBoolean allowSleep =
		JI2B(origAllowSleep && HandleCustomEventWhileBlocking());

	UpdateCurrentTime();
	JBoolean windowHasEvents = kJFalse;

	const JXDisplay* uiDisplay = window->GetDisplay();

	Window eventWindow [ kEventWindowCount ];
	eventWindow[0] = window->GetXWindow();

	JPtrArrayIterator<JXDisplay> iter(itsDisplayList);
	JXDisplay* display;
	JIndex displayIndex = 0;
	while (iter.Next(&display))
		{
		JXMenuManager* menuMgr = display->GetMenuManager();
		if (!origHadBlockingWindowFlag)
			{
			menuMgr->CloseCurrentMenus();
			}

		JXWindow* mouseContainer;

		displayIndex++;
		itsCurrDisplayIndex = displayIndex;		// itsCurrDisplayIndex might change during event
		if (XPending(*display) != 0)
			{
			// get mouse and keyboard grabbers -- for menus inside blocking window

			eventWindow[1] = eventWindow[2] = None;

			JXWindow* grabber;
			if (display == uiDisplay && display->GetMouseGrabber(&grabber) &&
				menuMgr->IsMenuForWindow(grabber, window))
				{
				eventWindow[1] = grabber->GetXWindow();
				}
			if (display == uiDisplay && display->GetKeyboardGrabber(&grabber) &&
				menuMgr->IsMenuForWindow(grabber, window))
				{
				eventWindow[2] = grabber->GetXWindow();
				}

			// process one event

			XEvent xEvent;
			if (display == uiDisplay &&
				XCheckIfEvent(*display, &xEvent, GetNextWindowEvent,
							  reinterpret_cast<char*>(eventWindow)))
				{
				windowHasEvents = kJTrue;
				if (xEvent.type != MotionNotify)
					{
					itsLastIdleTime = itsCurrentTime;
					}
				display->HandleEvent(xEvent, itsCurrentTime);
				}
#if 0
			// cd: background event check is now done as part of window event check
			// to give better update responsiveness when dragging a window
			else if (XCheckIfEvent(*display, &xEvent, GetNextBkgdEvent, NULL))
				{
				display->HandleEvent(xEvent, itsCurrentTime);
				}
#endif
			else if (display == uiDisplay &&
					 display->GetMouseContainer(&mouseContainer) &&
					 mouseContainer == window)
				{
				display->Idle(itsCurrentTime);
				}
			else
				{
				display->Update();
				}

			// discard mouse and keyboard events

			DiscardEventInfo discardInfo(display, NULL);
			if (display == uiDisplay)
//.........这里部分代码省略.........
开发者ID:mbert,项目名称:mulberry-lib-jx,代码行数:101,代码来源:JXApplication.cpp


注:本文中的JXWindow::GetXWindow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。