| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# csutil/common_handlers.h

Go to the documentation of this file.

    00001 /*
    00002   Crystal Space Common Event Handlers
    00003   Copyright (C) 2006 by Adam D. Bradley <artdodge@cs.bu.edu>
    00004
    00005   This library is free software; you can redistribute it and/or
    00006   modify it under the terms of the GNU Library 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   Library General Public License for more details.
    00014
    00015   You should have received a copy of the GNU Library General Public
    00016   License along with this library; if not, write to the Free
    00017   Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00018 */
    00019 #ifndef __CSUTIL_COMMON_HANDLERS_H__
    00020 #define __CSUTIL_COMMON_HANDLERS_H__
    00021
    00022 #include "cssysdef.h"
    00023 #include "csutil/scf_implementation.h"
    00024 #include "iutil/eventh.h"
    00025 #include "csutil/eventnames.h"
    00026 #include "ivideo/graph3d.h"
    00027 #include "ivaria/view.h"
    00028 #include "iengine/engine.h"
    00029 #include "csutil/eventhandlers.h"
    00030
    00048 class CS_CRYSTALSPACE_EXPORT FrameBegin3DDraw :
    00049   public scfImplementation1<FrameBegin3DDraw, iEventHandler>
    00050 {
    00051  protected:
    00052   iObjectRegistry *object_reg;
    00053   csRef<iGraphics3D> g3d;
    00054   csRef<iEngine> engine;
    00055   csRef<iView> view;
    00056  public:
    00057   FrameBegin3DDraw (iObjectRegistry *, csRef<iView> &);
    00058   virtual ~FrameBegin3DDraw ();
    00059   virtual bool HandleEvent (iEvent&);
    00060   CS_EVENTHANDLER_PHASE_3D ("crystalspace.frame.3d_drawer")
    00061 };
    00062
    00071 class CS_CRYSTALSPACE_EXPORT FramePrinter :
    00072   public scfImplementation1<FramePrinter, iEventHandler>
    00073 {
    00074  protected:
    00075   csRef<iGraphics3D> g3d;
    00076  public:
    00077   FramePrinter (iObjectRegistry *);
    00078   virtual ~FramePrinter ();
    00079   virtual bool HandleEvent (iEvent&);
    00080   CS_EVENTHANDLER_PHASE_FRAME ("crystalspace.frame.printer")
    00081 };
    00082
    00085 #endif // __CSUTIL_COMMON_HANDLERS_H__