C:/irrlicht/IrrLib/IrrLibGUI.h

Go to the documentation of this file.
00001 /*
00002     Irrlicht Library Wrapper
00003     Created by:
00004         Nathan Adams
00005         Denzel Morris
00006     Copyright (C) 2007
00007 
00008     This software is licensed under the GNU/GPL.
00009     This software may not be used for commerical purposes.
00010 */
00011 
00012 #ifndef IRRLIBGUI_H
00013 #define IRRLIBGUI_H
00014 
00015 #include <iostream>
00016 #include <strings.h>
00017 #include <irrlicht.h>
00018 #include "IrrLib.h"
00019 #include "IrrData.h"
00020 #include "IrrLibBase.h"
00021 
00022 class IrrLibGUI: public IrrLibBase {
00023         private:
00024                 irr::gui::IGUISkin* skin;
00025                 irr::gui::IGUIFont* font;
00026                 irr::gui::IGUIEnvironment* env;
00027                 //TODO: Create an array storing all messages
00028                 int nStaticText;
00029                 //irr::gui::IGUIStaticText* arrStaticText[10];
00030                 int nButton;
00031                 int nButtonid;
00032                 int nListBox;
00033                 int nListBoxid;
00034                 std::vector<irr::gui::IGUIStaticText*> arrStaticText;
00035                 std::vector<irr::gui::IGUIButton*> arrButton;
00036                 std::vector<irr::gui::IGUIListBox*> arrListBox;
00037                 IrrObj AddToStaticArray(irr::gui::IGUIStaticText * addme);
00038                 IrrObj addButton(const irr::core::rect< irr::s32 > & rectangle, irr::gui::IGUIElement *parent = 0, irr::s32 id = 0, const wchar_t * text = 0, const wchar_t * tooltiptext  = 0); //TODO: Clean this up!
00039                 IrrObj addListBox(const irr::core::rect< irr::s32 > &rectangle, irr::gui::IGUIElement * parent);
00040         public:
00041                 IrrLibGUI();
00042                 ~IrrLibGUI();
00043                 void SetEnv(irr::gui::IGUIEnvironment* env);
00044                 void Clear();
00045                 void DrawAll();
00046                 //irr::gui::IGUIStaticText* IrrLibGUI::AddStaticText(); //NA eh a default text adder why not?
00047                 /* This is bad coding, we do not want to return an irrlicht object, we want to return a standard datatype because this class handles the GUI elements, not the user. */
00048                 void AddStaticText(); //NA eh a default text adder why not?
00049                 IrrObj AddStaticText(irr::core::stringw message);
00050                 IrrObj AddStaticText(irr::core::stringw message, int x1, int y1, int x2, int y2);
00051                 IrrObj AddStaticText(irr::core::stringw message, int x1, int y1, int x2, int y2, bool border, bool wordwrap);
00052                 IrrObj AddStaticText(irr::core::stringw message, int x1, int y1, int x2, int y2, bool border, bool wordwrap, int id, bool fillbackground);
00053                 IrrObj AddStaticText(irr::core::stringw message, const irr::core::rect< irr::s32 > &rectangle);
00054                 IrrObj AddStaticText(irr::core::stringw message, const irr::core::rect< irr::s32 > &rectangle, bool border, bool wordwrap);
00055                 IrrObj AddStaticText(irr::core::stringw message, const irr::core::rect< irr::s32 > &rectangle, bool border, bool wordwrap, int id, bool fillbackground);
00056                 IrrObj AddButton(irr::core::stringw text, int x1, int y1, int x2, int y2, irr::core::stringw tooltiptext);
00057                 IrrObj AddButton(irr::core::stringw text, irr::core::rect<irr::s32> & rect, irr::core::stringw tooltiptext); //TODO: Add move functions
00058                 IrrObj AddListBox(int x1, int y1, int x2, int y2, irr::gui::IGUIElement * parent = 0);
00059                 IrrObj AddListBox(const irr::core::rect< irr::s32 > &rectangle, irr::gui::IGUIElement * parent = 0);
00060                 void AddStringToListBox(IrrObj nLbox, irr::core::stringw text);
00061                 void ChangeStaticText(IrrObj nstatictext, irr::core::stringw message);
00062                 void ChangeFont(irr::core::stringc fontfile);
00063                 std::string getSelectListString(IrrObj lstbox);
00064                 //irr::core::stringw getSelectListString(int lstbox);
00065 
00066 };
00067 
00068 
00069 #endif

Generated on Thu Dec 27 18:25:19 2007 for IrrLib by  doxygen 1.5.4