コード例 #1
0
void
ToolTipView::DetachedFromWindow()
{
	BToolTipManager* manager = BToolTipManager::Manager();
	manager->Lock();

	RemoveChild(fToolTip->View());
		// don't delete this one!
	fToolTip->DetachedFromWindow();

	manager->Unlock();
}
コード例 #2
0
ファイル: ToolTip.cpp プロジェクト: mariuz/haiku
bool
BToolTip::Lock()
{
	bool lockedLooper;
	while (true) {
		lockedLooper = View()->LockLooper();
		if (!lockedLooper) {
			BToolTipManager* manager = BToolTipManager::Manager();
			manager->Lock();

			if (View()->Window() != NULL) {
				manager->Unlock();
				continue;
			}
		}
		break;
	}

	fLockedLooper = lockedLooper;
	return true;
}
コード例 #3
0
ToolTipWindow::ToolTipWindow(BToolTip* tip, BPoint where, void* owner)
	:
	BWindow(BRect(0, 0, 250, 10).OffsetBySelf(where), "tool tip",
		B_BORDERED_WINDOW_LOOK, kMenuWindowFeel,
		B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS
			| B_AVOID_FRONT | B_AVOID_FOCUS),
	fOwner(owner)
{
	SetLayout(new BGroupLayout(B_VERTICAL));

	BToolTipManager* manager = BToolTipManager::Manager();
	ToolTipView* view = new ToolTipView(tip);

	manager->Lock();
	AddChild(view);
	manager->Unlock();

	// figure out size and location

	view->ResetWindowFrame(where);
}