Console.hpp

Go to the documentation of this file.
00001 /*
00002 SagaEngine library
00003 Copyright (c) 2002-2006 Skalden Studio AS
00004 
00005 This software is provided 'as-is', without any express or implied 
00006 warranty. In no event will the authors be held liable for any 
00007 damages arising from the use of this software.
00008 
00009 Permission is granted to distribute the library under the terms of the 
00010 Q Public License version 1.0. Be sure to read and understand the license
00011 before using the library. It should be included here, or you may read it
00012 at http://www.trolltech.com/products/qt/licenses/licensing/qpl
00013 
00014 The original version of this library can be located at:
00015 http://www.sagaengine.com/
00016 
00017 Rune Myrland
00018 rune@skalden.com
00019 */
00020 
00021 
00022 #ifndef o3d_input_Console_hpp
00023 #define o3d_input_Console_hpp
00024 
00025 #include "O3dPre.hpp"
00026 #include "OgreCEGUI.hpp"
00027 #include "o3d_input.hpp"
00028 #include <OIS.h>
00029 
00030 
00031 namespace se_ogre {
00032     class _SeOgreExport Console {
00033     public:
00034         Console();
00035         ~Console();
00036 
00037 
00038         void setGuiSystem();
00039 
00044         void setConsoleHandler(ConsoleHandler* h);
00045         void setupGuiSystem();
00046         void createConsoleWindow();
00047         void initXMLMenu(const char* filename);
00048 
00052         void output(const char* msg);
00053         void output(const wchar_t* msg);
00054 
00055 
00056         void keyPressed(const OIS::KeyEvent* e);
00057         void mouseMoved (const OIS::MouseEvent *e);
00058         void mouseDragged (const OIS::MouseEvent *e);
00059         void mouseReleased (const OIS::MouseEvent *e, int button);
00060         void mousePressed (const OIS::MouseEvent *e, int button);
00061 
00062 
00063         bool isFocused() { return (isFocused_); /* && handler_); */ }
00064         void setFocus(bool newState) { isFocused_ = newState; }
00065         void flipFocus();
00066         void renderGui();
00067         void updateConsole();
00068 
00069     protected:
00070         void clearInput();
00071 
00072         bool isFocused_;
00073         ConsoleHandler* handler_;
00074         int inCount_, outCount_, lineCount_;
00075         static const int INPUT_BUFFER_SIZE = 256;
00076         wchar_t* input_;
00077         static const int OUTPUT_BUFFER_SIZE = 16384;
00078         wchar_t* output_;
00079 
00080 #ifndef NO_CEGUI
00081         CEGUI::OgreCEGUIRenderer* guiRenderer_;
00082         CEGUI::System* guiSystem_;
00083         CEGUI::Window* editorGuiSheet_;
00084         CEGUI::MultiLineEditbox* editBox_;
00085 #endif
00086         Ogre::RenderTexture* rttTexture_;
00087     };
00088 }
00089 
00090 #endif

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:05 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo