Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Demo_Controller.h

00001 /*
00002   Copyright 1996-2002
00003   Simon Whiteside, All Rights Reserved
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Lesser General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library 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 GNU
00013     Lesser General Public License for more details.
00014 
00015     You should have received a copy of the GNU Lesser General Public
00016     License along with this library; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019   Demo_Controller.h
00020 
00021   This file defines the interface for the class which controls the demo's view.
00022 
00023   $Id: Demo__Controller_8h-source.html,v 1.5 2003/01/23 15:31:03 simkin_cvs Exp $
00024 */
00025 #ifndef CONTROLLER_H
00026 #define CONTROLLER_H
00027 
00028 #include "skScriptedExecutable.h"
00029 
00030 #include "Demo_View.h"
00031 
00032 class Controller : public skScriptedExecutable, public ViewCallback
00033 //      deriving from skScriptedExecutable means we can be called from Simkin scripts
00034 //      deriving from ViewCallback means we can get notified when 
00035 //      buttons are pressed on the view
00036 {
00037  public:
00038   Controller(skString fileName,skExecutableContext& ctxt);
00039   ~Controller();
00040   void  buttonPressed(int id);
00041   bool  method(const skString& s,skRValueArray& args,skRValue& ret,skExecutableContext& ctxt);
00042  private:
00043   void  init();
00044   View *        m_View;
00045   skString m_FileName;
00046   skInterpreter& m_Interpreter;
00047 };
00048 
00049 #endif

Generated on Thu Jan 23 15:25:38 2003 for Simkin by doxygen1.3-rc1