當前位置: 首頁>>代碼示例>>C++>>正文


C++ GetContainer函數代碼示例

本文整理匯總了C++中GetContainer函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetContainer函數的具體用法?C++ GetContainer怎麽用?C++ GetContainer使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GetContainer函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: HandleTextInput

bool Widget::TriggerTextInput(const TextInputEvent &event, bool emit)
{
	HandleTextInput(event);
	if (emit) emit = !onTextInput.emit(event);
	if (GetContainer()) GetContainer()->TriggerTextInput(event, emit);
	return !emit;
}
開發者ID:Faiva78,項目名稱:pioneer,代碼行數:7,代碼來源:Widget.cpp

示例2: HandleKeyUp

bool Widget::TriggerKeyUp(const KeyboardEvent &event, bool emit)
{
	HandleKeyUp(event);
	if (emit) emit = !onKeyUp.emit(event);
	if (GetContainer()) GetContainer()->TriggerKeyUp(event, emit);
	return !emit;
}
開發者ID:Faiva78,項目名稱:pioneer,代碼行數:7,代碼來源:Widget.cpp

示例3: HandleTextInput

bool Widget::TriggerTextInput(const TextInputEvent &event, bool handled)
{
	HandleTextInput(event);
	if (!handled) handled = onTextInput.emit(event);
	if (GetContainer()) handled = GetContainer()->TriggerTextInput(event, handled);
	return handled;
}
開發者ID:christiank,項目名稱:pioneer,代碼行數:7,代碼來源:Widget.cpp

示例4: HandleJoystickHatMove

bool Widget::TriggerJoystickHatMove(const JoystickHatMotionEvent &event, bool handled)
{
	HandleJoystickHatMove(event);
	if (!handled) handled = onJoystickHatMove.emit(event);
	if (GetContainer()) handled = GetContainer()->TriggerJoystickHatMove(event, handled);
	return handled;
}
開發者ID:christiank,項目名稱:pioneer,代碼行數:7,代碼來源:Widget.cpp

示例5: lock

T* HashMapHolder<T>::Find(ObjectGuid guid)
{
    boost::shared_lock<boost::shared_mutex> lock(*GetLock());

    typename MapType::iterator itr = GetContainer().find(guid);
    return (itr != GetContainer().end()) ? itr->second : NULL;
}
開發者ID:Diyvol,項目名稱:TrinityCore,代碼行數:7,代碼來源:ObjectAccessor.cpp

示例6: KUIErrorUO

bool UKUIInterfaceElement::IsMouseOver() const
{
	if ( GetInterface() == NULL )
	{
		KUIErrorUO( "Null interface" );
		return false;
	}

	if ( GetContainer() != NULL )
	{
		if ( !GetContainer()->IsMouseOver() )
			return false;
	}

	const FVector2D v2CursorLocation = GetInterface()->GetCursorLocation();
	const FVector2D v2Size = GetSize();
	const FVector2D v2TopLeftLocation = GetScreenLocation();

	if ( v2CursorLocation.X >= v2TopLeftLocation.X &&
		 v2CursorLocation.Y >= v2TopLeftLocation.Y &&
		 v2CursorLocation.X < ( v2TopLeftLocation.X + v2Size.X ) &&
		 v2CursorLocation.Y < ( v2TopLeftLocation.Y + v2Size.Y ) )
		 return true;

	return false;
}
開發者ID:cllpyl,項目名稱:KeshUI,代碼行數:26,代碼來源:KUIInterfaceElement.cpp

示例7: HandleKeyUp

bool Widget::TriggerKeyUp(const KeyboardEvent &event, bool handled)
{
	HandleKeyUp(event);
	if (!handled) handled = onKeyUp.emit(event);
	if (GetContainer()) handled = GetContainer()->TriggerKeyUp(event, handled);
	return handled;
}
開發者ID:christiank,項目名稱:pioneer,代碼行數:7,代碼來源:Widget.cpp

示例8: HandleClick

bool Widget::TriggerClick(bool handled)
{
	HandleClick();
	if (!handled) handled = onClick.emit();
	if (GetContainer()) handled = GetContainer()->TriggerClick(handled);
	return handled;
}
開發者ID:christiank,項目名稱:pioneer,代碼行數:7,代碼來源:Widget.cpp

示例9: HandleJoystickButtonUp

bool Widget::TriggerJoystickButtonUp(const JoystickButtonEvent &event, bool handled)
{
	HandleJoystickButtonUp(event);
	if (!handled) handled = onJoystickButtonUp.emit(event);
	if (GetContainer()) handled = GetContainer()->TriggerJoystickButtonUp(event, handled);
	return handled;
}
開發者ID:christiank,項目名稱:pioneer,代碼行數:7,代碼來源:Widget.cpp

示例10: NS_WARN_IF

NS_IMETHODIMP
InsertNodeTransaction::DoTransaction()
{
  if (NS_WARN_IF(!mEditorBase) ||
      NS_WARN_IF(!mContentToInsert) ||
      NS_WARN_IF(!mPointToInsert.IsSet())) {
    return NS_ERROR_NOT_INITIALIZED;
  }

  if (!mPointToInsert.IsSetAndValid()) {
    // It seems that DOM tree has been changed after first DoTransaction()
    // and current RedoTranaction() call.
    if (mPointToInsert.GetChild()) {
      EditorDOMPoint newPointToInsert(mPointToInsert.GetChild());
      if (!newPointToInsert.IsSet()) {
        // The insertion point has been removed from the DOM tree.
        // In this case, we should append the node to the container instead.
        newPointToInsert.SetToEndOf(mPointToInsert.GetContainer());
        if (NS_WARN_IF(!newPointToInsert.IsSet())) {
          return NS_ERROR_FAILURE;
        }
      }
      mPointToInsert = newPointToInsert;
    } else {
      mPointToInsert.SetToEndOf(mPointToInsert.GetContainer());
      if (NS_WARN_IF(!mPointToInsert.IsSet())) {
        return NS_ERROR_FAILURE;
      }
    }
  }

  mEditorBase->MarkNodeDirty(GetAsDOMNode(mContentToInsert));

  ErrorResult error;
  mPointToInsert.GetContainer()->InsertBefore(*mContentToInsert,
                                              mPointToInsert.GetChild(),
                                              error);
  error.WouldReportJSException();
  if (NS_WARN_IF(error.Failed())) {
    return error.StealNSResult();
  }

  // Only set selection to insertion point if editor gives permission
  if (mEditorBase->GetShouldTxnSetSelection()) {
    RefPtr<Selection> selection = mEditorBase->GetSelection();
    if (NS_WARN_IF(!selection)) {
      return NS_ERROR_FAILURE;
    }
    // Place the selection just after the inserted element
    EditorRawDOMPoint afterInsertedNode(mContentToInsert);
    DebugOnly<bool> advanced = afterInsertedNode.AdvanceOffset();
    NS_WARNING_ASSERTION(advanced,
      "Failed to advance offset after the inserted node");
    selection->Collapse(afterInsertedNode, error);
    if (NS_WARN_IF(error.Failed())) {
      error.SuppressException();
    }
  }
  return NS_OK;
}
開發者ID:luke-chang,項目名稱:gecko-1,代碼行數:60,代碼來源:InsertNodeTransaction.cpp

示例11: HandleClick

bool Widget::TriggerClick(bool emit)
{
	HandleClick();
	if (emit) emit = !onClick.emit();
	if (GetContainer()) GetContainer()->TriggerClick(emit);
	return !emit;
}
開發者ID:Faiva78,項目名稱:pioneer,代碼行數:7,代碼來源:Widget.cpp

示例12: HandleJoystickHatMove

bool Widget::TriggerJoystickHatMove(const JoystickHatMotionEvent &event, bool emit)
{
	HandleJoystickHatMove(event);
	if (emit) emit = !onJoystickHatMove.emit(event);
	if (GetContainer()) GetContainer()->TriggerJoystickHatMove(event, emit);
	return !emit;
}
開發者ID:Faiva78,項目名稱:pioneer,代碼行數:7,代碼來源:Widget.cpp

示例13: HandleJoystickButtonUp

bool Widget::TriggerJoystickButtonUp(const JoystickButtonEvent &event, bool emit)
{
	HandleJoystickButtonUp(event);
	if (emit) emit = !onJoystickButtonUp.emit(event);
	if (GetContainer()) GetContainer()->TriggerJoystickButtonUp(event, emit);
	return !emit;
}
開發者ID:Faiva78,項目名稱:pioneer,代碼行數:7,代碼來源:Widget.cpp

示例14: GetContainer

bool UKUIInterfaceElement::IsVisibleRecursive() const
{
	if ( !IsVisible() )
		return false;

	if ( GetContainer() == NULL )
		return false;

	return GetContainer()->IsVisibleRecursive();
}
開發者ID:cllpyl,項目名稱:KeshUI,代碼行數:10,代碼來源:KUIInterfaceElement.cpp

示例15: HandleMouseWheel

bool Widget::TriggerMouseWheel(const MouseWheelEvent &event, bool emit)
{
	HandleMouseWheel(event);
	if (emit) emit = !onMouseWheel.emit(event);
	if (GetContainer()) {
		MouseWheelEvent translatedEvent = MouseWheelEvent(event.direction, event.pos+GetPosition());
		GetContainer()->TriggerMouseWheel(translatedEvent, emit);
	}
	return !emit;
}
開發者ID:Faiva78,項目名稱:pioneer,代碼行數:10,代碼來源:Widget.cpp


注:本文中的GetContainer函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。