K3dGuiWindow.h

Go to the documentation of this file.
00001 
00011 /***************************************************************************
00012  *   Copyright (C) 2007 by Jan Koci   *
00013  *   honza.koci@email.cz   *
00014  *   http://kengine.sourceforge.net/tutorial/
00015  *                                                                         *
00016  *   This program is free software; you can redistribute it and/or modify  *
00017  *   it under the terms of the GNU General Public License as published by  *
00018  *   the Free Software Foundation; either version 2 of the License, or     *
00019  *   (at your option) any later version.                                   *
00020  *                                                                         *
00021  *   This program is distributed in the hope that it will be useful,       *
00022  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00023  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00024  *   GNU General Public License for more details.                          *
00025  *                                                                         *
00026  *   You should have received a copy of the GNU General Public License     *
00027  *   along with this program; if not, write to the                         *
00028  *   Free Software Foundation, Inc.,                                       *
00029  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00030  ***************************************************************************/
00031 
00032 #pragma once
00033 
00034 #include <guichan.hpp>
00035 #include "../System/K3dString.h"
00036 #include "K3dGuiObject.h"
00037 
00038 
00046 class K3dGuiWindow: public gcn::Window, public K3dGuiObject
00047 {
00048                 TStrCharArray m_tChildNameArray;
00049         public:
00050 
00051                 K3dGuiWindow ( const std::string & _strCaption ) :
00052                                 gcn::Window ( _strCaption )
00053                 {
00054                 }
00055                 ~K3dGuiWindow()
00056                 {}
00057 
00058                 void AddChildName ( const char* _strName )
00059                 {
00060                         m_tChildNameArray.push_back ( _strName );
00061                 }
00062                 const char* GetChildName ( const int _iId )
00063                 {
00064                         if ( ! ( ( 0 <= _iId ) && ( _iId < ( int ) m_tChildNameArray.size() ) ) )
00065                         {
00066                                 cerr << "Error :: const char* GetChildName(const int _iId) -- Invalid child name array index" << endl;
00067                                 return NULL;
00068                         }
00069                         return m_tChildNameArray[_iId];
00070                 }
00071                 int GetNumChildNames()
00072                 {
00073                         return ( int ) m_tChildNameArray.size();
00074                 }
00075                 void DeleteChildNames()
00076                 {
00077                         m_tChildNameArray.clear();
00078                 }
00079 };
00080 

Generated on Thu Aug 16 23:53:27 2007 for K3dEngine by  doxygen 1.5.0