File:  [mozdev] / chimera / Attic / RDFOutlineTranslator.mm
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Thu Mar 7 18:42:43 2002 UTC (17 years, 9 months ago) by hyatt
Branches: MAIN
CVS tags: HEAD
Add the tri-license to all files.

    1: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
    2: /* ***** BEGIN LICENSE BLOCK *****
    3:  * Version: NPL 1.1/GPL 2.0/LGPL 2.1
    4:  *
    5:  * The contents of this file are subject to the Netscape Public License
    6:  * Version 1.1 (the "License"); you may not use this file except in
    7:  * compliance with the License. You may obtain a copy of the License at
    8:  * http://www.mozilla.org/NPL/
    9:  *
   10:  * Software distributed under the License is distributed on an "AS IS" basis,
   11:  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   12:  * for the specific language governing rights and limitations under the
   13:  * License.
   14:  *
   15:  * The Original Code is mozilla.org code.
   16:  *
   17:  * The Initial Developer of the Original Code is 
   18:  * Netscape Communications Corporation.
   19:  * Portions created by the Initial Developer are Copyright (C) 2002
   20:  * the Initial Developer. All Rights Reserved.
   21:  *
   22:  * Contributor(s):
   23:  *
   24:  * Alternatively, the contents of this file may be used under the terms of
   25:  * either the GNU General Public License Version 2 or later (the "GPL"), or 
   26:  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   27:  * in which case the provisions of the GPL or the LGPL are applicable instead
   28:  * of those above. If you wish to allow use of your version of this file only
   29:  * under the terms of either the GPL or the LGPL, and not to allow others to
   30:  * use your version of this file under the terms of the NPL, indicate your
   31:  * decision by deleting the provisions above and replace them with the notice
   32:  * and other provisions required by the GPL or the LGPL. If you do not delete
   33:  * the provisions above, a recipient may use your version of this file under
   34:  * the terms of any one of the NPL, the GPL or the LGPL.
   35:  *
   36:  * ***** END LICENSE BLOCK ***** */
   37: 
   38: #include <Carbon/Carbon.h>
   39: #include "nsCOMPtr.h"
   40: #include "RDFOutlineTranslator.h"
   41: 
   42: //////////////////////////////////////////////////
   43: // nsIOutlinerBoxObject implementation
   44: //////////////////////////////////////////////////
   45: 
   46: NS_IMETHODIMP
   47: RDFOutlineTranslator::GetView(nsIOutlinerView** aResult)
   48: {
   49:     *aResult = mBuilder;
   50:     NS_IF_ADDREF(*aResult);
   51:     return NS_OK;
   52: }
   53: 
   54: NS_IMETHODIMP
   55: RDFOutlineTranslator::SetView(nsIOutlinerView * aView)
   56: {
   57:     mBuilder = aView;
   58:     return NS_OK;
   59: }
   60: 
   61: /**
   62: * Get the index of the specified column.
   63: */
   64: /* long getColumnIndex (in wstring colID); */
   65: NS_IMETHODIMP
   66: RDFOutlineTranslator::GetColumnIndex(const PRUnichar *colID, PRInt32 *_retval)
   67: {
   68:     return NS_OK;
   69: }
   70: 
   71: /**
   72: * Invalidation methods for fine-grained painting control.
   73: */
   74: /* void invalidate (); */
   75: NS_IMETHODIMP
   76: RDFOutlineTranslator::Invalidate(void)
   77: {
   78:     [mDataSource invalidate];
   79:     return NS_OK;
   80: }
   81: 
   82: /* void invalidateColumn (in wstring colID); */
   83: NS_IMETHODIMP
   84: RDFOutlineTranslator::InvalidateColumn(const PRUnichar *colID)
   85: {
   86:     [mDataSource invalidateColumn: colID];
   87:     return NS_OK;
   88: }
   89: 
   90: /* void invalidateRow (in long index); */
   91: NS_IMETHODIMP
   92: RDFOutlineTranslator::InvalidateRow(PRInt32 index)
   93: {
   94:     [mDataSource invalidateRow: index];
   95:     return NS_OK;
   96: }
   97: 
   98: /* void invalidateCell (in long row, in wstring colID); */
   99: NS_IMETHODIMP
  100: RDFOutlineTranslator::InvalidateCell(PRInt32 index, const PRUnichar *colID)
  101: {
  102:     [mDataSource invalidateCell: index atColumn: colID];
  103:     return NS_OK;
  104: }
  105: 
  106: /* void invalidatePrimaryCell (in long row); */
  107: NS_IMETHODIMP
  108: RDFOutlineTranslator::InvalidatePrimaryCell(PRInt32 row)
  109: {
  110:     [mDataSource invalidatePrimaryCell: row];
  111:     return NS_OK;
  112: }
  113: 
  114: /* void invalidateRange (in long startIndex, in long endIndex); */
  115: NS_IMETHODIMP
  116: RDFOutlineTranslator::InvalidateRange(PRInt32 startIndex, PRInt32 endIndex)
  117: {
  118:     [mDataSource invalidateRange: startIndex ending: endIndex];
  119:     return NS_OK;
  120: }
  121: 
  122: /**
  123: * The view is responsible for calling these notification methods when
  124: * rows are added or removed.  Index is the position at which the new
  125: * rows were added or at which rows were removed.  For
  126: * non-contiguous additions/removals, this method should be called multiple times.
  127: */
  128: /* void rowCountChanged (in long index, in long count); */
  129: NS_IMETHODIMP
  130: RDFOutlineTranslator::RowCountChanged(PRInt32 index, PRInt32 count)
  131: {
  132:     [mDataSource rowCountChanged: index byCount: count];
  133:     return NS_OK;
  134: }
  135: 
  136: 
  137: /**
  138: * [IRRELEVANT METHODS]
  139: */
  140: NS_IMETHODIMP
  141: RDFOutlineTranslator::GetFocused(PRBool *aFocused) { return NS_OK; }
  142: NS_IMETHODIMP
  143: RDFOutlineTranslator::SetFocused(PRBool aFocused) { return NS_OK; }
  144: NS_IMETHODIMP
  145: RDFOutlineTranslator::GetOutlinerBody(nsIDOMElement * *aOutlinerBody) { return NS_OK; }
  146: NS_IMETHODIMP
  147: RDFOutlineTranslator::GetSelection(nsIOutlinerSelection * *aSelection) { return NS_OK; }
  148: NS_IMETHODIMP
  149: RDFOutlineTranslator::GetRowHeight(PRInt32 *aRowHeight) { return NS_OK; }
  150: NS_IMETHODIMP
  151: RDFOutlineTranslator::GetFirstVisibleRow(PRInt32 *_retval) { return NS_OK; }
  152: NS_IMETHODIMP
  153: RDFOutlineTranslator::GetLastVisibleRow(PRInt32 *_retval) { return NS_OK; }
  154: NS_IMETHODIMP
  155: RDFOutlineTranslator::GetPageCount(PRInt32 *_retval) { return NS_OK; }
  156: NS_IMETHODIMP
  157: RDFOutlineTranslator::EnsureRowIsVisible(PRInt32 index) { return NS_OK; }
  158: NS_IMETHODIMP
  159: RDFOutlineTranslator::ScrollToRow(PRInt32 index) { return NS_OK; }
  160: NS_IMETHODIMP
  161: RDFOutlineTranslator::ScrollByLines(PRInt32 numLines) { return NS_OK; }
  162: NS_IMETHODIMP
  163: RDFOutlineTranslator::ScrollByPages(PRInt32 numPages) { return NS_OK; }
  164: NS_IMETHODIMP
  165: RDFOutlineTranslator::GetCellAt(PRInt32 x, PRInt32 y, PRInt32 *row, PRUnichar **colID, PRUnichar **childElt) { return NS_OK; }
  166: NS_IMETHODIMP
  167: RDFOutlineTranslator::GetCoordsForCellItem(PRInt32 row, const PRUnichar *colID, const PRUnichar *element, PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height) { return NS_OK; }
  168: NS_IMETHODIMP
  169: RDFOutlineTranslator::IsCellCropped(PRInt32 row, const nsAString & colID, PRBool *_retval) { return NS_OK; }
  170: NS_IMETHODIMP
  171: RDFOutlineTranslator::OnDragEnter(nsIDOMEvent *event) { return NS_OK; }
  172: NS_IMETHODIMP
  173: RDFOutlineTranslator::OnDragExit(nsIDOMEvent *event) { return NS_OK; }
  174: NS_IMETHODIMP
  175: RDFOutlineTranslator::OnDragOver(nsIDOMEvent *event) { return NS_OK; }
  176: NS_IMETHODIMP
  177: RDFOutlineTranslator::OnDragDrop(nsIDOMEvent *event) { return NS_OK; }
  178: NS_IMETHODIMP
  179: RDFOutlineTranslator::ClearStyleAndImageCaches(void) { return NS_OK; }
  180: NS_IMETHODIMP RDFOutlineTranslator::InvalidateScrollbar(void) { return NS_OK; }
  181: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>