File:  [mozdev] / abimoz / plugin / nsWPPluginControl.idl
Revision 1.4: download - view: text, annotated - select for diffs - revision graph
Fri Nov 9 17:55:46 2001 UTC (17 years, 4 months ago) by mostafa
Branches: MAIN
CVS tags: HEAD
Beautified source. Removed dependency to ev_UnixToolbar.cpp

This file is part of AbiMoz.

nsWPPluginControl.idl - Defines scriptable interface to WP plugin.
Copyright (C) 2001 OEone Corporation

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser 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 author of this program can be contacted in writing at
OEone Corporation, 290 St-Joseph Blvd., Hull, QC J8Y 3Y3, CANADA.

#include "nsISupports.idl"

[scriptable, uuid(294cfa71-b564-4dd0-b247-3704282fc017)]
interface nsIWPPluginListener : nsISupports
    void onBoldChange(in boolean value);
    void onItalicChange(in boolean value);
    void onUnderlineChange(in boolean value);
    void onAlignmentChange(in string value);
    void onBulletChange(in boolean value);
    void onNumberlistChange(in boolean value);
    void onFontChange(in string value);
    void onFontSizeChange(in string value);
    void onColorChange(in string value);

[scriptable, uuid(10982800-365e-11d3-a2bf-0004ac779ef3)]
 * This interface can be obtained with the following HTML/JavaScript sequence:
 * <pre>
 * <EMBED type="application/msword" 
 *        id="WPObject" 
 *        width=320 height=240>
 * <form name="myForm">
 *   <input type="button" 
 *          value="ToggleBold" 
 *          onClick="wp.ToggleBold()">
 *   <!-- many more buttons -->
 * </form>
 * <script>
 *  var wp = document.WPObject.nsIWPControl;
 * </script>
 * </pre>
 * This fragment will create a plugin, which can then be accessed
 * and controlled by the nsIWPPluginInstance interface which is instantiated
 * in the script.
interface nsIWPPluginInstance : nsISupports
    // Plugin Status Interface
    // Generic WP Interface

    // Edit methods.
    void New();
    string OpenByName( in string str, in string type );
    void Save();
    void SaveAs();
    boolean SaveAsFileType( in string str, in string type );
    void ToggleBold();
    void ToggleItalic();
    void ToggleUline();
    void ChooseFont();
    void SpellCheck();
    void InsertImage();
    void SetStyle( in long style );
    void SetAlignment( in long alignment );
    void ToggleBullets();
    void IncreaseIndent();
    void DecreaseIndent();
    string GetCurrentDocument();
    boolean IsDocumentModified();
    void SetColor( in string col );
    string GetAttribute( in string attr );
    string GetAlignment();
    boolean IsList();
    string GetFontList();
    string GetRecentList();
    void SetZoom( in long zoomval );
    void ToggleNumbers();
    void SetFont( in string font );
    void SetFontSize( in string fontsize );
    string InsertImageFromFile( in string str );
    void SetTabStop( in string tabstop );
    void SetBGColor( in string col );
    void SetColumns( in string columns );
    void EditHeader();
    void EditFooter();
    void Undo();
    void Redo();
    void SetListener( in nsIWPPluginListener listener );
    void SetPortrait( in boolean val );
    void SetPrintScale( in short scale );
    void SetPaperSize( in string paperscale );
    void SetMargins( in float left, in float right, in float top, in float bottom, in float footer, in float header );
    void DoCommand( in string cmd );

%{ C++
 { 0x10982800, 0x365e, 0x11d3, { 0xa2, 0xbf, 0x0, 0x04, 0xac, 0x78, 0x0e, 0xf3 }}

FreeBSD-CVSweb <>