|
本帖最后由 hechengjin 于 2015-8-5 10:15 编辑
- 手动增加
- \nsITreeView.idl
- interface nsITreeView : nsISupports
- {
- long getRowFlags(in long rowIndex);
- }
- 动态生成
- nsITreeView.h
- /* long getRowFlags (in long rowIndex); /
- NS_IMETHOD GetRowFlags(int32_t rowIndex, int32_t *_retval) = 0;
- NS_IMETHOD GetRowFlags(int32_t rowIndex, int32_t *_retval); \
- NS_IMETHOD GetRowFlags(int32_t rowIndex, int32_t *_retval) { return _to GetRowFlags(rowIndex, retval); } \
- NS_IMETHOD GetRowFlags(int32_t rowIndex, int32_t *_retval) { return !to ? NS_ERRORNULLPOINTER : _to→GetRowFlags(rowIndex, _retval); } \
- / long getRowFlags (in long rowIndex); */
- NS_IMETHODIMP nsTreeView::GetRowFlags(int32_t rowIndex, int32_t *_retval)
- {
- return NS_ERROR_NOT_IMPLEMENTED;
- }
- 根据上面动态生成的内容可以手动在下面相关文件中加入对应的函数实现,注意区分大小写
- nsMsgDBView.cpp
- NS_IMETHODIMP nsMsgDBView::GetRowFlags(int32_t rowIndex, int32_t *_retval)
- {
- *_retval = 0;
- return NS_OK;
- }
- E:\svn\mailtree\mozilla\layout\xul\base\src\tree\src\nsTreeContentView.cpp
- NS_IMETHODIMP nsTreeContentView::GetRowFlags(int32_t rowIndex, int32_t *_retval)
- {
- *_retval = 0;
- return NS_OK;
- }
- E:\svn\mailtree\mozilla\content\xul\templates\src\nsXULTreeBuilder.cpp
- NS_IMETHODIMP nsXULTreeBuilder::GetRowFlags(int32_t rowIndex, int32_t *_retval)
- {
- *_retval = 0;
- return NS_OK;
- }
- E:\svn\mailtree\mozilla\layout\inspector\src\inDOMView.cpp
- NS_IMETHODIMP inDOMView::GetRowFlags(int32_t rowIndex, int32_t *_retval)
- {
- *_retval = 0;
- return NS_OK;
- }
- E:\svn\mailtree\mozilla\security\manager\ssl\src\nsCertTree.cpp
- NS_IMETHODIMP nsCertTree::GetRowFlags(int32_t rowIndex, int32_t *_retval)
- {
- *_retval = 0;
- return NS_OK;
- }
- E:\svn\mailtree\mozilla\security\manager\pki\src\nsASN1Tree.cpp
- NS_IMETHODIMP nsNSSASN1Tree::GetRowFlags(int32_t rowIndex, int32_t *_retval)
- {
- *_retval = 0;
- return NS_OK;
- }
- E:\svn\mailtree\mailnews\addrbook\src\nsAbView.cpp
- NS_IMETHODIMP nsAbView::GetRowFlags(int32_t rowIndex, int32_t *_retval)
- {
- *_retval = 0;
- return NS_OK;
- }
- E:\svn\mailtree\mailnews\news\src\nsNntpIncomingServer.cpp
- nsNntpIncomingServer::GetLevel(int32_t index, int32_t *_retval)
- {
- *_retval = 0;
- return NS_OK;
- }
- E:\svn\mailtree\mozilla\toolkit\components\autocomplete\nsAutoCompleteController.cpp
- NS_IMETHODIMP nsAutoCompleteController::GetRowFlags(int32_t rowIndex, int32_t *_retval)
- {
- *_retval = 0;
- return NS_OK;
- }
复制代码 //下面这个看情况是否要加入
nsMsgGroupView.cpp
NS_IMETHODIMP nsMsgGroupView::GetRowFlags(int32_t rowIndex, int32_t *_retval)
{
NS_ENSURE_ARG(aResult);
if (!IsValidIndex(aIndex))
return NS_MSG_INVALID_DBVIEW_INDEX;
*aResult = m_flags[aIndex];
return NS_OK;
}
nsMsgGroupView.h
NS_IMETHOD GetRowFlags(int32_t rowIndex, int32_t *_retval);
|
|