gecko-dev/layout/xul/base/src/tree/public/nsITreeBoxObject.idl

125 lines
3.6 KiB
Plaintext
Raw Normal View History

/* -*- 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-03 23:13:53 +00:00
interface nsIOutlinerView;
2001-02-15 09:43:11 +00:00
interface nsIOutlinerSelection;
[scriptable, uuid(8398C757-6387-480c-82B2-C914E15CE00D)]
interface nsIOutlinerBoxObject : nsISupports
{
/**
* 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;
/**
* Whether or not we are currently focused.
*/
2001-03-08 00:46:58 +00:00
attribute boolean focused;
/**
* Obtain the outlinerbody content node
*/
2001-02-15 09:43:11 +00:00
readonly attribute nsIDOMElement outlinerBody;
/**
* Obtains the selection from the view.
*/
2001-02-15 09:43:11 +00:00
readonly attribute nsIOutlinerSelection selection;
/**
* Get the index of the first visible row.
*/
long getFirstVisibleRow();
/**
* Get the index of the last visible row.
*/
long getLastVisibleRow();
/**
* Gets the number of possible visible rows.
*/
long getPageCount();
/**
* Ensures that a row at a given index is visible.
*/
void ensureRowIsVisible(in long index);
/**
* 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);
/**
* Scroll the outliner up or down by numLines lines. Positive
* values move down in the outliner. Prevents scrolling off the
* end of the outliner.
*/
void scrollByLines(in long numLines);
/**
* 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.
*/
void scrollByPages(in long numPages);
2001-02-06 02:57:58 +00:00
/**
* Invalidation methods for fine-grained painting control.
*/
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);
void invalidateScrollbar();
/**
* 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);
/**
* 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.
*/
void rowCountChanged(in long index, in long count);
};
%{C++
// Initializer,
%}