listitem.h

Go to the documentation of this file.
00001 /**
00002  * \file mgui/listitem.h
00003  * \brief LISTITEMDEF definition
00004  *
00005  * \if NODOC
00006  * $Id: listitem.h_v 1.6 2003/10/03 19:58:19 linux32build!build Exp $
00007  *
00008  * $Log: listitem.h_v $
00009  * Revision 1.6  2003/10/03 19:58:19  linux32build!build
00010  * Doxygen
00011  *
00012  * Revision 1.5  2003/09/15 13:49:32  fileserver!dwilliss
00013  * Doxygen
00014  *
00015  * Revision 1.4  2003/09/10 21:15:20  mju
00016  * Use MGUI::ID.
00017  *
00018  * Revision 1.3  2003/09/10 16:24:24  mju
00019  * Add LISTITEM class using MISTRING.
00020  * Add listitemdef::getstring().
00021  *
00022  * Revision 1.1  2003/01/16 21:22:49  mju
00023  * Initial revision
00024  * \endif
00025 **/
00026 
00027 #ifndef  INC_MGUI_LISTITEM_H
00028 #define  INC_MGUI_LISTITEM_H
00029 
00030 #ifndef  INC_MI32_MISTRING_H
00031 #include <mi32/mistring.h>
00032 #endif
00033 
00034 namespace MGUI {
00035 //===================================================================================================================
00036 //! Structure used in adding multiple items to COMBOBOX and LIST controls.
00037 //! Generally used as a null-terminated array.
00038 //! See the MGUI::LISTITEMDEF Function Group for documentation of common LISTITEMDEF's
00039 struct LISTITEMDEF {
00040    const char *string;                 //!< String for resource lookup
00041    ID id;                              //!< Item ID
00042 
00043    MISTRING GetString (
00044       ) const;
00045    };
00046 
00047 //===================================================================================================================
00048 //! Structure used in adding multiple items to COMBOBOX and LIST controls.
00049 //! Generally used as a null-terminated array.
00050 class LISTITEM {
00051    public:
00052 
00053       //! Constructor.
00054       LISTITEM (
00055          const MISTRING& string,          //!< String or TEXTID specification
00056          ID id                            //!< ID number
00057          ): m_string(string), m_id(id) { }
00058 
00059       //! Get ID number.
00060       ID GetID (
00061          ) const { return (m_id); }
00062 
00063       //! Get string.
00064       const MISTRING& GetString (
00065          ) const { return (m_string); }
00066 
00067    private:
00068       #ifndef GENERATING_DOXYGEN_OUTPUT
00069       MISTRING m_string;                  //!< String
00070       ID m_id;                            //!< Item ID
00071       #endif // GENERATING_DOXYGEN_OUTPUT
00072    };
00073 
00074 //===================================================================================================================
00075 }  // End namespace MGUI
00076 
00077 #endif   // INC_MGUI_LISTITEM_H

Generated on Wed May 31 15:26:46 2006 for TNTsdk by  doxygen 1.3.8-20040913