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

This file is part of AbiMoz.

nsWPPlugin.h - Declares the nsWPPluginInterface class for the 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.

#ifndef __NS_WP_PLUGIN_H__
#define __NS_WP_PLUGIN_H__

#include "gtk/gtk.h"
#include "npapi.h"
#include "pnWPPluginScriptablePeer.h"

class nsWPPluginInstance
    nsWPPluginInstance(NPP pNPInstance);
    virtual ~nsWPPluginInstance(void);
    static nsIWPPluginListener *m_listener;
    NS_METHOD Initialize();
    NS_METHOD SetWindow( NPWindow *window );
    void windowResized( NPWindow* pNPWindow );
    NS_METHOD ShutDown();
    NPBool isInitialized();
    nsIWPPluginInstance* getScriptablePeer();

    NS_IMETHODIMP DoCommand(const char *cmd);
    NS_IMETHODIMP New(void);
    NS_IMETHODIMP OpenByName( const char *pathname, const char *filetype, char **retval );
    NS_IMETHODIMP Save(void);
    NS_IMETHODIMP SaveAs(void);
    NS_IMETHODIMP SaveAsFileType(const char *pathname, const char *filetype, PRBool *retval );
    NS_IMETHODIMP ToggleBold(void);
    NS_IMETHODIMP ToggleItalic(void);
    NS_IMETHODIMP ToggleUline(void);
    NS_IMETHODIMP ChooseFont(void);
    NS_IMETHODIMP SpellCheck(void);
    NS_IMETHODIMP InsertImage(void);
    NS_IMETHODIMP SetStyle(PRInt32 style);
    NS_IMETHODIMP SetAlignment(PRInt32 alignment);
    NS_IMETHODIMP ToggleBullets(void);
    NS_IMETHODIMP IncreaseIndent(void);
    NS_IMETHODIMP DecreaseIndent(void);
    NS_IMETHODIMP GetCurrentDocument(char **retval);
    NS_IMETHODIMP IsDocumentModified(PRBool *retval);
    NS_IMETHODIMP SetColor(const char *color);
    NS_IMETHODIMP GetAttribute(const char *attrname, char **attrval);
    NS_IMETHODIMP GetAlignment(char **alignment);
    NS_IMETHODIMP IsList(PRBool *retval);
    NS_IMETHODIMP GetFontList(char **flist);
    NS_IMETHODIMP GetRecentList(char **recentlist);
    NS_IMETHODIMP SetZoom(PRInt32 zoomval);
    NS_IMETHODIMP ToggleNumbers(void);
    NS_IMETHODIMP SetFont(const char *font);
    NS_IMETHODIMP InsertImageFromFile( const char *pathname, char **retval );
    NS_IMETHODIMP SetFontSize(const char *fontsize);
    NS_IMETHODIMP SetTabStop(const char *tabstop);
    NS_IMETHODIMP SetBGColor(const char *color);
    NS_IMETHODIMP SetColumns(const char *columns);
    NS_IMETHODIMP EditHeader();
    NS_IMETHODIMP EditFooter();
    NS_IMETHODIMP SetPortrait( PRBool val );
    NS_IMETHODIMP SetPrintScale( PRInt16 scale );
    NS_IMETHODIMP SetPaperSize( const char *papersize );
    NS_IMETHODIMP SetMargins( float left, float right, float top, float bottom, float footer, float header );
    NS_IMETHODIMP SetListener(nsIWPPluginListener *listener);
    GtkWidget *		        pluginWidget;
    void *					pluginFrame;

    NPP m_pNPInstance;

    NPStream * m_pNPStream;
    NPBool m_bInitialized;
    NPWindow* m_NPWindow;
    nsIWPPluginInstance * m_pScriptablePeer;
    NPWindow *m_window;

#endif // __NS_WP_PLUGIN_H__

FreeBSD-CVSweb <>