toolsml.h

Go to the documentation of this file.
00001 /**
00002  * \file toolsml.h <gre/toolsml.h>
00003  * \brief GRE TOOL_SML class
00004  *
00005  * \if NODOC
00006  * $Id: toolsml.h_v 1.4 2003/09/15 13:48:59 fileserver!dwilliss Exp $
00007  *
00008  * $Log: toolsml.h_v $
00009  * Revision 1.4  2003/09/15 13:48:59  fileserver!dwilliss
00010  * Doxygen
00011  *
00012  * Revision 1.3  2003/07/30 15:38:00  mju
00013  * Ignore private section.
00014  *
00015  * Revision 1.1  2003/06/24 16:24:44  mju
00016  * Initial revision
00017  * \endif
00018 **/
00019 
00020 #ifndef  INC_GRE_TOOLSML_H
00021 #define  INC_GRE_TOOLSML_H
00022 
00023 #ifndef  INC_GRE_VIEW_H
00024    #include <gre/view.h>
00025 #endif
00026 
00027 //===================================================================================================================
00028 
00029 #if defined(X_NATIVE)
00030 //! Script Tool class definition.
00031 class GRE_TOOL_SML : public GRE_TOOL {
00032    public:
00033 
00034       // GRE_TOOL_SML::CONTEXT
00035       //! Context for editing or running ToolScript.
00036       class CONTEXT : public GRE::VIEWSCRIPT::CONTEXT {
00037          public:
00038             CONTEXT (
00039                GRE_VIEWABLE *viewable,
00040                GRE_VIEW *view,
00041                const GRE::TOOLSCRIPT& script
00042                );
00043 
00044             virtual ~CONTEXT (
00045                ) { }
00046 
00047          private:
00048             #ifndef GENERATING_DOXYGEN_OUTPUT
00049 
00050             SMLSYMBOL *m_SymToolIsActive;
00051             SMLSYMBOL *m_SymPointerX;
00052             SMLSYMBOL *m_SymPointerY;
00053             SMLSYMBOL *m_SymShiftPressed;
00054             SMLSYMBOL *m_SymCtrlPressed;
00055             SMLSYMBOL *m_SymLeftButtonPressed;
00056             SMLSYMBOL *m_SymRightButtonPressed;
00057             SMLSYMBOL *m_SymMiddleButtonPressed;
00058 
00059             ERRVALUE CallFunction (
00060                const char *funcname
00061                ) const;
00062 
00063             void SetPointerButtonState (
00064                int x,
00065                int y,
00066                int state
00067                );
00068 
00069             friend class GRE_TOOL_SML;
00070 
00071             CONTEXT (const CONTEXT&);
00072             CONTEXT& operator= (const CONTEXT&);
00073 
00074             #endif //!< GENERATING_DOXYGEN_OUTPUT
00075          }; // End of GRE_TOOL_SML::CONTEXT
00076 
00077       GRE_TOOL_SML (
00078          GRE_VIEW *view,
00079          const GRE::TOOLSCRIPT& script
00080          );
00081 
00082       virtual ~GRE_TOOL_SML ();
00083 
00084       virtual bool IsScript (
00085          ) const;
00086 
00087    private:
00088 
00089       #ifndef GENERATING_DOXYGEN_OUTPUT
00090 
00091       GRE::TOOLSCRIPT m_script;
00092       CONTEXT *m_context;
00093 
00094       static void EH_DrawingArea (
00095          Widget,
00096          GRE_TOOL_SML *tool,
00097          XEvent *event,
00098          Boolean *
00099          );
00100 
00101       virtual bool DoActivate ();
00102       virtual void DoDeactivate ();
00103       virtual bool DoInitialize ();
00104       virtual void DoSuspend ();
00105       virtual void DoResume ();
00106 
00107       MXXTEH_ADD(GRE_TOOL_SML)
00108       MXXTEH_REMOVE(GRE_TOOL_SML)
00109 
00110       GRE_TOOL_SML (const GRE_TOOL_SML&);
00111       GRE_TOOL_SML& operator= (const GRE_TOOL_SML&);
00112 
00113       #endif //!< GENERATING_DOXYGEN_OUTPUT
00114    }; // End of GRE_TOOL_SML
00115 
00116 #endif
00117 
00118 //===================================================================================================================
00119 
00120 #endif   //!< INC_GRE_TOOLSML_H

Generated on Tue Dec 14 13:18:14 2004 for TNTsdk by  doxygen 1.3.8-20040913