00001 /* 00002 * AbiCommand - Abiword plugin for a command line interface 00003 * Copyright (C) 2002 by Martin Sevior 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00018 * 02111-1307, USA. 00019 */ 00020 00021 #ifndef PLUGIN_ABICOMMAND_H 00022 #define PLUGIN_ABICOMMAND_H 00023 #include "ut_string_class.h" 00024 class PD_Document; 00025 class AP_UnixFrame; 00026 class AV_View; 00027 class CairoNull_Graphics; 00028 class FL_DocLayout; 00029 class XAP_App; 00030 class UT_UTF8String; 00031 00032 class AbiCommand 00033 { 00034 public: 00035 AbiCommand(void); 00036 AbiCommand(bool bAbiCollab); 00037 ~AbiCommand(void); 00038 void doCommands(void); 00039 UT_sint32 parseTokens(UT_GenericVector<const UT_UTF8String*> * pToks); 00040 bool printFiles(const UT_GenericVector<const UT_UTF8String*> * pToks); 00041 bool replaceAll(const UT_GenericVector<const UT_UTF8String*> * pToks); 00042 bool replaceNext(const UT_GenericVector<const UT_UTF8String*> * pToks); 00043 bool movePoint(const UT_GenericVector<const UT_UTF8String*> * pToks); 00044 bool deleteText(const UT_GenericVector<const UT_UTF8String*> * pToks); 00045 bool insertText(const UT_GenericVector<const UT_UTF8String*> * pToks); 00046 bool replaceDocument(PD_Document * pDoc); 00047 bool loadDocument(UT_UTF8String & sPathToDoc); 00048 bool newDocument(void); 00049 PD_Document * getCurrentDocument(); 00050 void clearTokenVector(UT_GenericVector<const UT_UTF8String*> & Toks); 00051 bool invoke(const char * pszCommand); 00052 bool tokenizeString(UT_GenericVector<const UT_UTF8String*> & tok, char * pStr); 00053 void nullUpdate(); 00054 bool removeGraphicalView(void); 00055 void deleteCurrentDoc(void); 00056 bool viewDoc(void); 00057 private: 00058 PD_Document * m_pCurDoc; 00059 UT_UTF8String * m_pCurFile; 00060 AP_UnixFrame * m_pCurFrame; 00061 AV_View * m_pCurView; 00062 CairoNull_Graphics * m_pG; 00063 FL_DocLayout * m_pLayout; 00064 XAP_App * m_pApp; 00065 bool m_bViewDoc; 00066 bool m_bRunAsServer; 00067 UT_uint32 m_iPID; 00068 bool m_bRunAsAbiCollab; 00069 UT_UTF8String m_sErrorFile; 00070 00071 }; 00072 00073 #endif /* PLUGIN_ABICOMMAND_H */ 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085
1.5.5