本文整理汇总了C++中LLInventoryPanel::childFromPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ LLInventoryPanel::childFromPoint方法的具体用法?C++ LLInventoryPanel::childFromPoint怎么用?C++ LLInventoryPanel::childFromPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLInventoryPanel
的用法示例。
在下文中一共展示了LLInventoryPanel::childFromPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleDragAndDrop
BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg)
{
if ((mOutboxInventoryPanel.get() == NULL) ||
//(mWindowShade && mWindowShade->isShown()) ||
LLMarketplaceInventoryImporter::getInstance()->isImportInProgress() ||
mOutboxId.isNull())
{
return FALSE;
}
LLView * handled_view = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
BOOL handled = (handled_view != NULL);
// Determine if the mouse is inside the inventory panel itself or just within the floater
bool pointInInventoryPanel = false;
bool pointInInventoryPanelChild = false;
LLInventoryPanel* panel = mOutboxInventoryPanel.get();
LLFolderView * root_folder = panel->getRootFolder();
if (panel->getVisible())
{
S32 inv_x, inv_y;
localPointToOtherView(x, y, &inv_x, &inv_y, panel);
pointInInventoryPanel = panel->getRect().pointInRect(inv_x, inv_y);
LLView * inventory_panel_child_at_point = panel->childFromPoint(inv_x, inv_y, true);
pointInInventoryPanelChild = (inventory_panel_child_at_point != root_folder);
}
// Pass all drag and drop for this floater to the outbox inventory control
if (!handled || !isAccepted(*accept))
{
// Handle the drag and drop directly to the root of the outbox if we're not in the inventory panel
// (otherwise the inventory panel itself will handle the drag and drop operation, without any override)
if (!pointInInventoryPanel)
{
handled = root_folder->handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
}
mOutboxTopLevelDropZone->setBackgroundVisible(handled && !drop && isAccepted(*accept));
}
else
{
mOutboxTopLevelDropZone->setBackgroundVisible(!pointInInventoryPanelChild);
}
return handled;
}