This commit is contained in:
hyatt%netscape.com 2001-02-14 19:44:38 +00:00
Родитель f605fd6cb5
Коммит 0dbaa4f83f
6 изменённых файлов: 52 добавлений и 8 удалений

Просмотреть файл

@ -54,6 +54,10 @@ interface nsIOutlinerSelection : nsISupports
// Selects all rows.
void selectAll();
// Iterate the selection using these methods.
long getRangeCount();
void getRangeAt(in long i, out long min, out long max);
// This attribute is a boolean indicating whether or not the
// "select" event should fire when the selection is changed using
// one of our methods. A view can use this to temporarily suppress

Просмотреть файл

@ -29,6 +29,7 @@ nsOutlinerSelection::nsOutlinerSelection(nsIOutlinerBoxObject* aOutliner)
{
NS_INIT_ISUPPORTS();
mOutliner = aOutliner;
mSuppressed = PR_FALSE;
}
nsOutlinerSelection::~nsOutlinerSelection()
@ -85,24 +86,38 @@ NS_IMETHODIMP nsOutlinerSelection::SelectAll()
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsOutlinerSelection::GetSelectEventsSuppressed(PRBool *aSelectEventsSuppressed)
NS_IMETHODIMP nsOutlinerSelection::GetRangeCount(PRInt32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsOutlinerSelection::GetRangeAt(PRInt32 i, PRInt32 *min, PRInt32 *max)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsOutlinerSelection::GetSelectEventsSuppressed(PRBool *aSelectEventsSuppressed)
{
*aSelectEventsSuppressed = mSuppressed;
return NS_OK;
}
NS_IMETHODIMP nsOutlinerSelection::SetSelectEventsSuppressed(PRBool aSelectEventsSuppressed)
{
return NS_ERROR_NOT_IMPLEMENTED;
mSuppressed = aSelectEventsSuppressed;
return NS_OK;
}
NS_IMETHODIMP nsOutlinerSelection::GetCurrentIndex(PRInt32 *aCurrentIndex)
{
return NS_ERROR_NOT_IMPLEMENTED;
*aCurrentIndex = mCurrentIndex;
return NS_OK;
}
NS_IMETHODIMP nsOutlinerSelection::SetCurrentIndex(PRInt32 aCurrentIndex)
{
return NS_ERROR_NOT_IMPLEMENTED;
mCurrentIndex = aCurrentIndex;
return NS_OK;
}
///////////////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -39,6 +39,9 @@ public:
protected:
// Members
nsIOutlinerBoxObject* mOutliner; // [Weak]. The outliner will hold on to us through the view and let go when it dies.
PRBool mSuppressed; // Whether or not we should be firing onselect events.
PRInt32 mCurrentIndex; // The item to draw the rect around. The last one clicked, etc.
};
extern nsresult

Просмотреть файл

@ -54,6 +54,10 @@ interface nsIOutlinerSelection : nsISupports
// Selects all rows.
void selectAll();
// Iterate the selection using these methods.
long getRangeCount();
void getRangeAt(in long i, out long min, out long max);
// This attribute is a boolean indicating whether or not the
// "select" event should fire when the selection is changed using
// one of our methods. A view can use this to temporarily suppress

Просмотреть файл

@ -29,6 +29,7 @@ nsOutlinerSelection::nsOutlinerSelection(nsIOutlinerBoxObject* aOutliner)
{
NS_INIT_ISUPPORTS();
mOutliner = aOutliner;
mSuppressed = PR_FALSE;
}
nsOutlinerSelection::~nsOutlinerSelection()
@ -85,24 +86,38 @@ NS_IMETHODIMP nsOutlinerSelection::SelectAll()
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsOutlinerSelection::GetSelectEventsSuppressed(PRBool *aSelectEventsSuppressed)
NS_IMETHODIMP nsOutlinerSelection::GetRangeCount(PRInt32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsOutlinerSelection::GetRangeAt(PRInt32 i, PRInt32 *min, PRInt32 *max)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsOutlinerSelection::GetSelectEventsSuppressed(PRBool *aSelectEventsSuppressed)
{
*aSelectEventsSuppressed = mSuppressed;
return NS_OK;
}
NS_IMETHODIMP nsOutlinerSelection::SetSelectEventsSuppressed(PRBool aSelectEventsSuppressed)
{
return NS_ERROR_NOT_IMPLEMENTED;
mSuppressed = aSelectEventsSuppressed;
return NS_OK;
}
NS_IMETHODIMP nsOutlinerSelection::GetCurrentIndex(PRInt32 *aCurrentIndex)
{
return NS_ERROR_NOT_IMPLEMENTED;
*aCurrentIndex = mCurrentIndex;
return NS_OK;
}
NS_IMETHODIMP nsOutlinerSelection::SetCurrentIndex(PRInt32 aCurrentIndex)
{
return NS_ERROR_NOT_IMPLEMENTED;
mCurrentIndex = aCurrentIndex;
return NS_OK;
}
///////////////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -39,6 +39,9 @@ public:
protected:
// Members
nsIOutlinerBoxObject* mOutliner; // [Weak]. The outliner will hold on to us through the view and let go when it dies.
PRBool mSuppressed; // Whether or not we should be firing onselect events.
PRInt32 mCurrentIndex; // The item to draw the rect around. The last one clicked, etc.
};
extern nsresult