File:  [mozdev] / abimoz / plugin / pnWPPluginScriptablePeer.cpp
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Fri Oct 25 14:42:28 2002 UTC (15 years ago) by mikep
Branches: MAIN
CVS tags: HEAD
Upgraded to Mozilla 1.2b and abiword 1.0.3.

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 *  ***** BEGIN LICENSE BLOCK *****
 * Version: GPL 2.0
 *
 * The contents of this file are subject to the GNU General Public License 
 * Version 2.0 (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.fsf.org/licenses/gpl.txt
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 * 
 * The Original Code is OEone Penzilla Code.
 * 
 * The Initial Developer of the Original Code is
 * OEone Corporation.
 * Portions created by the Initial Developer are Copyright (C) 1999-2002
 * the Initial Developer. All Rights Reserved.
 * Some portions are based on xine code.
 * 
 * Contributor(s): 
 * 
 * 
 * ***** END LICENSE BLOCK *****
 */


// ==============================
// ! Scriptability related code !
// ==============================
//

/////////////////////////////////////////////////////
//
// This file implements the nsScriptablePeer object
// The native methods of this class are supposed to
// be callable from JavaScript
//
#include "nsWPPlugin.h"

pnWPPluginScriptablePeer::pnWPPluginScriptablePeer(nsWPPluginInstance* aPlugin)
{

  NS_INIT_ISUPPORTS();
  mPlugin = aPlugin;
}

pnWPPluginScriptablePeer::~pnWPPluginScriptablePeer()
{
}

// Notice that we expose our claim to implement nsIClassInfo.
NS_IMPL_ISUPPORTS2(pnWPPluginScriptablePeer, nsIWPPluginInstance, nsIClassInfo)


NS_IMETHODIMP pnWPPluginScriptablePeer::SetListener( nsIWPPluginListener *listener )
{                                                    
    return mPlugin->SetListener( listener );
}

/* void New (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::New()
{
    return mPlugin->New();
}

/* string OpenByName (in string str, in string type); */
NS_IMETHODIMP pnWPPluginScriptablePeer::OpenByName(const char *str, const char *type, char **_retval)
{
    return mPlugin->OpenByName(str, type, _retval);
}

/* void Save (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::Save()
{
    return mPlugin->Save();
}

/* void SaveAs (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SaveAs()
{
    return mPlugin->SaveAs();
}

/* boolean SaveAsFileType (in string str, in string type); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SaveAsFileType(const char *str, const char *type, PRBool *_retval)
{
    return mPlugin->SaveAsFileType(str, type, _retval);
}

/* void ToggleBold (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::ToggleBold()
{
    return mPlugin->ToggleBold();
}

/* void ToggleItalic (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::ToggleItalic()
{
    return mPlugin->ToggleItalic();
}

/* void ToggleUline (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::ToggleUline()
{
    return mPlugin->ToggleUline();
}

/* void ChooseFont (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::ChooseFont()
{
    return mPlugin->ChooseFont();
}

/* void SpellCheck (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SpellCheck()
{
    return mPlugin->SpellCheck();
}

/* void InsertImage (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::InsertImage()
{
    return mPlugin->InsertImage();
}

/* void SetStyle (in long style); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SetStyle(PRInt32 style)
{
    return mPlugin->SetStyle(style);
}

/* void SetAlignment (in long alignment); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SetAlignment(PRInt32 alignment)
{
    return mPlugin->SetAlignment(alignment);
}

/* void ToggleBullets (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::ToggleBullets()
{
    return mPlugin->ToggleBullets();
}

/* void IncreaseIndent (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::IncreaseIndent()
{
    return mPlugin->IncreaseIndent();
}

/* void DecreaseIndent (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::DecreaseIndent()
{
    return mPlugin->DecreaseIndent();
}

/* string GetCurrentDocument (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::GetCurrentDocument(char **_retval)
{
    return mPlugin->GetCurrentDocument(_retval);
}

/* boolean IsDocumentModified (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::IsDocumentModified(PRBool *_retval)
{
    return mPlugin->IsDocumentModified(_retval);
}

/* void SetColor (in string col); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SetColor(const char *col)
{
    return mPlugin->SetColor(col);
}

/* string GetAttribute (in string attr); */
NS_IMETHODIMP pnWPPluginScriptablePeer::GetAttribute(const char *attr, char **_retval)
{
    return mPlugin->GetAttribute(attr, _retval);
}

/* string GetAlignment (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::GetAlignment(char **_retval)
{
    return mPlugin->GetAlignment(_retval);
}

/* boolean IsList (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::IsList(PRBool *_retval)
{
    return mPlugin->IsList(_retval);
}

/* string GetFontList (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::GetFontList(char **_retval)
{
    return mPlugin->GetFontList(_retval);
}

/* string GetRecentList (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::GetRecentList(char **_retval)
{
    return mPlugin->GetRecentList(_retval);
}

/* void SetZoom (in long zoomval); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SetZoom(PRInt32 zoomval)
{
    return mPlugin->SetZoom(zoomval);
}

/* void ToggleNumbers (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::ToggleNumbers()
{
    return mPlugin->ToggleNumbers();
}

/* void SetFont (in string font); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SetFont(const char *font)
{
    return mPlugin->SetFont(font);
}

/* void SetFontSize (in string fontsize); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SetFontSize(const char *fontsize)
{
    return mPlugin->SetFontSize(fontsize);
}

/* string InsertImageFromFile (in string str); */
NS_IMETHODIMP pnWPPluginScriptablePeer::InsertImageFromFile(const char *str, char **_retval)
{
    return mPlugin->InsertImageFromFile(str, _retval);
}

/* void SetTabStop (in string tabstop); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SetTabStop(const char *tabstop)
{
    return mPlugin->SetTabStop(tabstop);
}

/* void SetBGColor (in string col); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SetBGColor(const char *col)
{
    return mPlugin->SetBGColor(col);
}

/* void SetColumns (in string columns); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SetColumns(const char *columns)
{
    return mPlugin->SetColumns(columns);
}

/* void EditHeader (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::EditHeader()
{
    return mPlugin->EditHeader();
}

/* void EditFooter (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::EditFooter()
{
    return mPlugin->EditFooter();
}

/* void Undo (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::Undo()
{
    return mPlugin->Undo();
}

/* void Redo (); */
NS_IMETHODIMP pnWPPluginScriptablePeer::Redo()
{
    return mPlugin->Redo();
}

/* void SetPortrait (in boolean val); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SetPortrait(PRBool val)
{
    return mPlugin->SetPortrait(val);
}

/* void SetPrintScale (in short scale); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SetPrintScale(PRInt16 scale)
{
    return mPlugin->SetPrintScale(scale);
}

/* void SetPaperSize (in string paperscale); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SetPaperSize(const char *paperscale)
{
    return mPlugin->SetPaperSize(paperscale);
}

/* void SetMargins (in float left, in float right, in float top, in float bottom, in float footer, in float header); */
NS_IMETHODIMP pnWPPluginScriptablePeer::SetMargins(float left, float right, float top, float bottom, float footer, float header)
{
    return mPlugin->SetMargins(left, right, top, bottom, footer, header);
}

/* void DoCommand (in string cmd); */
NS_IMETHODIMP pnWPPluginScriptablePeer::DoCommand(const char *cmd)
{
    return mPlugin->DoCommand(cmd);
}


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