Back to index

lightning-sunbird  0.9+nobinonly
nsIXULTemplateBuilder.idl
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   Chris Waterson <waterson@netscape.com>
00024  *   Ben Goodger <ben@netscape.com>
00025  *   Jan Varga <varga@ku.sk>
00026  *   Benjamin Smedberg <bsmedberg@covad.net>
00027  *
00028  * Alternatively, the contents of this file may be used under the terms of
00029  * either of the GNU General Public License Version 2 or later (the "GPL"),
00030  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00031  * in which case the provisions of the GPL or the LGPL are applicable instead
00032  * of those above. If you wish to allow use of your version of this file only
00033  * under the terms of either the GPL or the LGPL, and not to allow others to
00034  * use your version of this file under the terms of the MPL, indicate your
00035  * decision by deleting the provisions above and replace them with the notice
00036  * and other provisions required by the GPL or the LGPL. If you do not delete
00037  * the provisions above, a recipient may use your version of this file under
00038  * the terms of any one of the MPL, the GPL or the LGPL.
00039  *
00040  * ***** END LICENSE BLOCK ***** */
00041 
00042 #include "domstubs.idl"
00043 #include "nsISupports.idl"
00044 #include "nsIRDFCompositeDataSource.idl"
00045 #include "nsIRDFResource.idl"
00046 
00047 interface nsIXULBuilderListener;
00048 
00049 [ptr] native nsIContent_ptr(nsIContent);
00050 
00051 [scriptable, uuid(9da147a7-5854-49e3-a397-22ecdd93e96d)]
00052 interface nsIXULTemplateBuilder : nsISupports
00053 {
00057     readonly attribute nsIDOMElement root;
00058 
00063     readonly attribute nsIRDFCompositeDataSource database;
00064 
00068     void rebuild();
00069 
00077     void refresh();
00078 
00085     [noscript] void init(in nsIContent_ptr aElement);
00086 
00091     [noscript] void createContents(in nsIContent_ptr aElement);
00092 
00097     void addListener(in nsIXULBuilderListener aListener);
00098 
00102     void removeListener(in nsIXULBuilderListener aListener);
00103 };
00104 
00111 [scriptable, uuid(a5480e0d-ac7c-42e5-aca5-d7f0bbffa207)]
00112 interface nsIXULTreeBuilderObserver : nsISupports
00113 {
00114     const long DROP_BEFORE = -1;
00115     const long DROP_ON = 0;
00116     const long DROP_AFTER = 1;
00123     boolean canDrop(in long index, in long orientation);
00124 
00129     void onDrop(in long row, in long orientation);
00130  
00134          void onToggleOpenState (in long index);
00135 
00139     void onCycleHeader(in wstring colID, in nsIDOMElement elt);
00140 
00145     void onCycleCell(in long row, in wstring colID);
00146 
00150     void onSelectionChanged();
00151 
00158     void onPerformAction(in wstring action);
00159 
00163     void onPerformActionOnRow(in wstring action, in long row);
00164 
00168     void onPerformActionOnCell(in wstring action, in long row, in wstring colID);
00169 };
00170 
00171 [scriptable, uuid(06b31b15-ebf5-4e74-a0e2-6bc0a18a3969)]
00172 interface nsIXULTreeBuilder : nsISupports
00173 {
00177     nsIRDFResource getResourceAtIndex(in long aRowIndex);
00178 
00182     long getIndexOfResource(in nsIRDFResource resource);
00183 
00188     void addObserver(in nsIXULTreeBuilderObserver aObserver);
00189 
00193     void removeObserver(in nsIXULTreeBuilderObserver aObserver);
00194 
00198     void sort(in nsIDOMElement aColumnElement);
00199 };
00200