DisplayManager.h

Go to the documentation of this file.
00001 /*************** <auto-copyright.pl BEGIN do not edit this line> **************
00002  *
00003  * VR Juggler is (C) Copyright 1998-2005 by Iowa State University
00004  *
00005  * Original Authors:
00006  *   Allen Bierbaum, Christopher Just,
00007  *   Patrick Hartling, Kevin Meinert,
00008  *   Carolina Cruz-Neira, Albert Baker
00009  *
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Library General Public
00012  * License as published by the Free Software Foundation; either
00013  * version 2 of the License, or (at your option) any later version.
00014  *
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * Library General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU Library General Public
00021  * License along with this library; if not, write to the
00022  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00023  * Boston, MA 02111-1307, USA.
00024  *
00025  * -----------------------------------------------------------------
00026  * File:          $RCSfile$
00027  * Date modified: $Date: 2005-01-16 17:51:42 -0600 (Sun, 16 Jan 2005) $
00028  * Version:       $Revision: 16627 $
00029  * -----------------------------------------------------------------
00030  *
00031  *************** <auto-copyright.pl END do not edit this line> ***************/
00032 
00033 #ifndef _VRJ_DISPLAY_MANAGER_H_
00034 #define _VRJ_DISPLAY_MANAGER_H_
00035 
00036 #include <vrj/vrjConfig.h>
00037 #include <vector>
00038 
00039 #include <vpr/Util/Singleton.h>
00040 
00041 //#include <gadget/Type/Position.h>
00042 #include <vrj/Util/Debug.h>
00043 #include <jccl/RTRC/ConfigElementHandler.h>
00044 #include <jccl/Config/ConfigElementPtr.h>
00045 
00046 namespace vrj
00047 {
00048 
00049 class DrawManager;
00050 class Display;
00051 
00065 class VJ_CLASS_API DisplayManager : public jccl::ConfigElementHandler
00066 {
00067 public:     // --- Config stuff -- //
00072    virtual bool configAdd(jccl::ConfigElementPtr element);
00073 
00078    virtual bool configRemove(jccl::ConfigElementPtr element);
00079 
00085    virtual bool configCanHandle(jccl::ConfigElementPtr element);
00086 
00087 public:
00092    virtual void updateProjections(const float scaleFactor);
00093 
00101    void setDrawManager(DrawManager* drawMgr);
00102 
00107    const std::vector<vrj::Display*>& getActiveDisplays()
00108    {
00109       return mActiveDisplays;
00110    }
00111 
00116    const std::vector<vrj::Display*>& getInActiveDisplays()
00117    {
00118       return mInactiveDisplays;
00119    }
00120 
00125    std::vector<vrj::Display*> getAllDisplays();
00126 
00127    jccl::ConfigElementPtr getDisplaySystemElement();
00128 
00129 private:
00139    bool configAddDisplay(jccl::ConfigElementPtr element);
00140 
00147    bool configRemoveDisplay(jccl::ConfigElementPtr element);
00148 
00149 
00158    int addDisplay(vrj::Display* disp, bool notifyDrawMgr = true);
00159 
00167    int closeDisplay(vrj::Display* disp, bool notifyDrawMgr = true);
00168 
00170    bool isMemberDisplay(vrj::Display* disp);
00171 
00176    vrj::Display* findDisplayNamed(std::string name);
00177 
00178 public:
00179    std::vector<vrj::Display*> mActiveDisplays; 
00180    std::vector<vrj::Display*> mInactiveDisplays; 
00182 protected:
00183    DrawManager*    mDrawManager;           
00184    jccl::ConfigElementPtr mDisplaySystemElement; 
00186 protected:
00187    DisplayManager() : mDrawManager(NULL)
00188    {
00189       /* Do nothing. */ ;
00190    }
00191 
00192    virtual ~DisplayManager()
00193    {
00194       /* Do nothing. */ ;
00195    }
00196 
00197    DisplayManager(const DisplayManager& o)
00198       : jccl::ConfigElementHandler(o)
00199    {
00200       /* Do nothing. */ ;
00201    }
00202 
00203    void operator= (const DisplayManager&) {;}
00204 
00205    vprSingletonHeader( DisplayManager );
00206 };
00207 
00208 } // end namespace vrj
00209 
00210 
00211 #endif

Generated on Thu Jan 4 10:56:51 2007 for VR Juggler by  doxygen 1.5.1