本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: GetTreeBody
NS_IMETHODIMP nsTreeBoxObject::GetPageLength(PRInt32 *_retval)
{
nsITreeBoxObject* body = GetTreeBody();
if (body)
return body->GetPageLength(_retval);
return NS_OK;
}
示例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;
}