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


C++ GetTreeBody函數代碼示例

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


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

示例1: GetView

NS_IMETHODIMP nsTreeBoxObject::GetView(nsITreeView * *aView)
{
  if (!mTreeBody) {
    if (!GetTreeBody()) {
      // Don't return an uninitialised view
      *aView = nsnull;
      return NS_OK;
    }

    if (mView)
      // Our new frame needs to initialise itself
      return mTreeBody->GetView(aView);
  }
  if (!mView) {
    nsCOMPtr<nsIDOMXULElement> xulele = do_QueryInterface(mContent);
    if (xulele) {
      // See if there is a XUL tree builder associated with the element
      nsCOMPtr<nsIXULTemplateBuilder> builder;
      xulele->GetBuilder(getter_AddRefs(builder));
      mView = do_QueryInterface(builder);

      if (!mView) {
        // No tree builder, create a tree content view.
        nsresult rv = NS_NewTreeContentView(getter_AddRefs(mView));
        NS_ENSURE_SUCCESS(rv, rv);
      }

      // Initialise the frame and view
      mTreeBody->SetView(mView);
    }
  }
  NS_IF_ADDREF(*aView = mView);
  return NS_OK;
}
開發者ID:lofter2011,項目名稱:Icefox,代碼行數:34,代碼來源:nsTreeBoxObject.cpp

示例2: GetTreeBody

NS_IMETHODIMP nsTreeBoxObject::RowCountChanged(int32_t aIndex, int32_t aDelta)
{
  nsTreeBodyFrame* body = GetTreeBody();
  if (body)
    return body->RowCountChanged(aIndex, aDelta);
  return NS_OK;
}
開發者ID:JuannyWang,項目名稱:gecko-dev,代碼行數:7,代碼來源:nsTreeBoxObject.cpp

示例3: GetTreeBody

NS_IMETHODIMP nsTreeBoxObject::InvalidateColumnRange(PRInt32 aStart, PRInt32 aEnd, nsITreeColumn* aCol)
{
  nsTreeBodyFrame* body = GetTreeBody();
  if (body)
    return body->InvalidateColumnRange(aStart, aEnd, aCol);
  return NS_OK;
}
開發者ID:lofter2011,項目名稱:Icefox,代碼行數:7,代碼來源:nsTreeBoxObject.cpp

示例4: GetTreeBody

NS_IMETHODIMP nsTreeBoxObject::GetPageLength(PRInt32 *_retval)
{
  nsITreeBoxObject* body = GetTreeBody();
  if (body)
    return body->GetPageLength(_retval);
  return NS_OK;
}
開發者ID:rn10950,項目名稱:RetroZilla,代碼行數:7,代碼來源:nsTreeBoxObject.cpp

示例5: ClearRows

NS_IMETHODIMP
nsTreeContentView::SetTree(nsITreeBoxObject* aTree)
{
  ClearRows();

  mBoxObject = aTree;

  if (aTree && !mRoot) {
    // Get our root element
    nsCOMPtr<nsIBoxObject> boxObject = do_QueryInterface(mBoxObject);
    nsCOMPtr<nsIDOMElement> element;
    boxObject->GetElement(getter_AddRefs(element));

    mRoot = do_QueryInterface(element);
    NS_ENSURE_STATE(mRoot);

    // Add ourselves to document's observers.
    nsIDocument* document = mRoot->GetDocument();
    if (document) {
      document->AddObserver(this);
      mDocument = document;
    }

    nsCOMPtr<nsIDOMElement> bodyElement;
    mBoxObject->GetTreeBody(getter_AddRefs(bodyElement));
    if (bodyElement) {
      mBody = do_QueryInterface(bodyElement);
      int32_t index = 0;
      Serialize(mBody, -1, &index, mRows);
    }
  }

  return NS_OK;
}
開發者ID:Tripleman,項目名稱:mozilla-central,代碼行數:34,代碼來源:nsTreeContentView.cpp


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