Code Search for Developers
 
 
  

widgetlib.h from NeoEngineNG at Krugle


Show widgetlib.h syntax highlighted

/***************************************************************************
                    wdigetlib.h  -  Widget library file loader
                             -------------------
    begin                : Tue Jul 1 2003
    copyright            : (C) 2003 by Reality Rift Studios
    email                : mattias@realityrift.com
 ***************************************************************************

 The contents of this file are subject to the Mozilla Public License Version
 1.1 (the "License"); you may not use this file except in compliance with
 the License. You may obtain a copy of the License at 
 http://www.mozilla.org/MPL/

 Software distributed under the License is distributed on an "AS IS" basis,
 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 for the specific language governing rights and limitations under the
 License.

 The Original Code is the NeoEngine, NeoWTK, widgetlib.h

 The Initial Developer of the Original Code is Mattias Jansson.
 Portions created by Mattias Jansson are Copyright (C) 2002
 Reality Rift Studios. All Rights Reserved.

 ***************************************************************************/

#ifndef _NECHUNKIO_WIDGETLIB_H_
#define _NECHUNKIO_WIDGETLIB_H_


/**
  * \file widgetlib.h
  * Widget library file loader
  */
  

#include "base.h"
#include "object.h"

#include <neoengine/loadableentity.h>

#include <vector>


#ifdef HAVE_NEOCHUNKIO


namespace NeoWTK
{


/**
  * \class WidgetLibrary
  * \brief Widget library
  * \author Mattias Jansson (mattias@realityrift.com)
  **/
class WidgetLibrary : public NeoEngine::LoadableEntity, public Object
{
	protected:

		/**
		* Load widget library file. Called by LoadableEntity to load object if file was opened successfully
		* \param uiFlags                              Flags passed by caller to Load() method
		* \return                                     true if load was successful, false otherwise
		*/
		virtual bool                                  LoadNode( unsigned int uiFlags = 0 );


	public:

		/*! Used during loading to resolve references */
		static Object                                *s_pkRefRoot;


		/**
		* Initialize library for loading
		* \param pkFileManager                        File manager, will use engine core file manager if null (default)
		*/
		                                              WidgetLibrary( NeoEngine::FileManager *pkFileManager = 0 );

		/**
		*/
		virtual                                      ~WidgetLibrary();
};


/**
  * \class LibRefChunk
  * \brief Widget library reference (include) chunk
  * \author Mattias Jansson (mattias@realityrift.com)
  */
class LibRefChunk : public NeoChunkIO::ComplexChunk
{
	public:

		/**
		* Initialize chunk
		* \param usType                               Chunk type
		* \param rstrType                             Chunk type as string
		* \param rstrID                               Chunk ID string
		*/ 
		                                              LibRefChunk( unsigned short usType, const NeoEngine::HashString &rstrType, const NeoEngine::HashString &rstrID = "" ) : NeoChunkIO::ComplexChunk( usType, rstrType, rstrID ) {}
		
		/**
		* Deallocate data and subchunks
		*/
		virtual                                      ~LibRefChunk() {}

		/**
		* Parse chunk data
		* \param uiFlags                              Parse flags
		* \param pkFileManager                        File manager
		* \return                                     <0 if error, >0 if successful (0 reserved)
		*/
		virtual int                                   ParseData( unsigned int uiFlags, NeoEngine::FileManager *pkFileManager );

		/**
		* Allocate new chunk
		* \param usType                               Type identifier
		* \param rstrType                             Type identifier as string
		* \param rstrID                               ID string
		* \return                                     New chunk
		*/
		static NeoChunkIO::Chunk                     *Allocator( unsigned short usType, const NeoEngine::HashString &rstrType, const NeoEngine::HashString &rstrID ) { return new LibRefChunk( usType, rstrType, rstrID ); }
};


};


#endif


#endif





See more files for this project here

NeoEngineNG

NeoenEngine NG (Next Generation) is the evolution of neoengine one,it\'s a different development from NeoEngine2, it\'s a direct inherits from NeoEngine one.\n

Project homepage: http://sourceforge.net/projects/neoengineng
Programming language(s): C,C++
License: other

  Makefile.am
  SConscript
  area.cpp
  area.h
  attribute.cpp
  attribute.h
  base.cpp
  base.h
  borderarea.cpp
  borderarea.h
  button.cpp
  button.h
  chunktype.h
  coord.cpp
  coord.h
  core.cpp
  core.h
  dll.cpp
  editbox.cpp
  editbox.h
  msg.cpp
  msg.h
  msghook.cpp
  msghook.h
  neowtk-static.dev
  neowtk.cbp
  neowtk.dev
  neowtk.dsp
  neowtk.layout
  neowtk.vcproj
  object.cpp
  object.h
  textarea.cpp
  textarea.h
  widgetlib.cpp
  widgetlib.h