2001-02-02 11:25:11 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Netscape Public
|
|
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.mozilla.org/NPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS
|
|
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
* implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
|
|
|
* Communications Corporation. Portions created by Netscape are
|
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*/
|
|
|
|
|
2001-02-12 23:37:37 +00:00
|
|
|
#include "nsISupports.idl"
|
2001-02-15 09:43:11 +00:00
|
|
|
#include "domstubs.idl"
|
2001-02-02 11:25:11 +00:00
|
|
|
|
2001-02-03 23:13:53 +00:00
|
|
|
interface nsIOutlinerView;
|
2001-02-15 09:43:11 +00:00
|
|
|
interface nsIOutlinerSelection;
|
2001-02-02 11:25:11 +00:00
|
|
|
|
|
|
|
[scriptable, uuid(8398C757-6387-480c-82B2-C914E15CE00D)]
|
|
|
|
interface nsIOutlinerBoxObject : nsISupports
|
|
|
|
{
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* The view that backs the outliner and that supplies it with its data.
|
|
|
|
* It is dynamically settable, either using a view attribute on the
|
|
|
|
* outliner tag or by setting this attribute to a new value.
|
|
|
|
*/
|
2001-02-03 23:13:53 +00:00
|
|
|
attribute nsIOutlinerView view;
|
2001-02-02 11:25:11 +00:00
|
|
|
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* Whether or not we are currently focused.
|
|
|
|
*/
|
2001-03-08 00:46:58 +00:00
|
|
|
attribute boolean focused;
|
|
|
|
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* Obtain the outlinerbody content node
|
|
|
|
*/
|
2001-02-15 09:43:11 +00:00
|
|
|
readonly attribute nsIDOMElement outlinerBody;
|
|
|
|
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* Obtains the selection from the view.
|
|
|
|
*/
|
2001-02-15 09:43:11 +00:00
|
|
|
readonly attribute nsIOutlinerSelection selection;
|
|
|
|
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* Get the index of the first visible row.
|
|
|
|
*/
|
2001-03-06 02:27:50 +00:00
|
|
|
long getFirstVisibleRow();
|
|
|
|
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* Get the index of the last visible row.
|
|
|
|
*/
|
2001-03-06 02:27:50 +00:00
|
|
|
long getLastVisibleRow();
|
2001-02-02 11:25:11 +00:00
|
|
|
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* Gets the number of possible visible rows.
|
|
|
|
*/
|
2001-02-02 11:25:11 +00:00
|
|
|
long getPageCount();
|
|
|
|
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* Ensures that a row at a given index is visible.
|
|
|
|
*/
|
2001-03-06 02:27:50 +00:00
|
|
|
void ensureRowIsVisible(in long index);
|
|
|
|
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* Scrolls such that the row at index is at the top of the visible view.
|
|
|
|
*/
|
2001-02-06 02:57:58 +00:00
|
|
|
void scrollToRow(in long index);
|
2001-03-06 02:27:50 +00:00
|
|
|
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* Scroll the outliner up or down by numLines lines. Positive
|
|
|
|
* values move down in the outliner. Prevents scrolling off the
|
|
|
|
* end of the outliner.
|
|
|
|
*/
|
2001-03-06 02:27:50 +00:00
|
|
|
void scrollByLines(in long numLines);
|
|
|
|
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* Scroll the outliner up or down by numPages pages. A page
|
|
|
|
* is considered to be the amount displayed by the outliner.
|
|
|
|
* Positive values move down in the outliner. Prevents scrolling
|
|
|
|
* off the end of the outliner.
|
|
|
|
*/
|
2001-03-06 02:27:50 +00:00
|
|
|
void scrollByPages(in long numPages);
|
2001-02-06 02:57:58 +00:00
|
|
|
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* Invalidation methods for fine-grained painting control.
|
|
|
|
*/
|
2001-02-02 11:25:11 +00:00
|
|
|
void invalidate();
|
|
|
|
void invalidateRow(in long index);
|
|
|
|
void invalidateCell(in long row, in wstring colID);
|
2001-02-02 22:34:52 +00:00
|
|
|
void invalidateRange(in long startIndex, in long endIndex);
|
2001-02-02 11:25:11 +00:00
|
|
|
void invalidateScrollbar();
|
|
|
|
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* A hit test that can tell you what cell the mouse is over. Row is the row index
|
|
|
|
* hit. ColID is the column hit. ChildElt is the pseudoelement hit: this can have
|
|
|
|
* values of "cell", "twisty", "image", and "text".
|
|
|
|
*/
|
2001-03-28 22:45:43 +00:00
|
|
|
void getCellAt(in long x, in long y, out long row, out wstring colID, out wstring childElt);
|
2001-02-02 11:42:40 +00:00
|
|
|
|
2001-04-05 05:29:24 +00:00
|
|
|
/**
|
|
|
|
* The view is responsible for calling these notification methods when
|
|
|
|
* rows are added or removed. Index is the position at which the new
|
|
|
|
* rows were added or at which rows were removed. For
|
|
|
|
* non-contiguous additions/removals, this method should be called multiple times.
|
|
|
|
*/
|
2001-03-06 02:27:50 +00:00
|
|
|
void rowCountChanged(in long index, in long count);
|
2001-02-02 11:25:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
%{C++
|
|
|
|
// Initializer,
|
|
|
|
%}
|
2001-04-05 05:29:24 +00:00
|
|
|
|