MyGUI  3.0.3
MyGUI_Prerequest.h
Go to the documentation of this file.
00001 
00008 /*
00009     This file is part of MyGUI.
00010 
00011     MyGUI is free software: you can redistribute it and/or modify
00012     it under the terms of the GNU Lesser General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     MyGUI is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019     GNU Lesser General Public License for more details.
00020 
00021     You should have received a copy of the GNU Lesser General Public License
00022     along with MyGUI.  If not, see <http://www.gnu.org/licenses/>.
00023 */
00024 
00025 #ifndef __MYGUI_PREREQUEST_H__
00026 #define __MYGUI_PREREQUEST_H__
00027 
00028 #include "MyGUI_Platform.h"
00029 
00030 #if MYGUI_COMPILER == MYGUI_COMPILER_MSVC
00031 #   ifndef _CRT_SECURE_NO_WARNINGS
00032 #       define _CRT_SECURE_NO_WARNINGS
00033 #   endif
00034 #   ifdef MYGUI_CHECK_MEMORY_LEAKS
00035 #       define _CRTDBG_MAP_ALLOC
00036 #       include <stdlib.h>
00037 #       include <crtdbg.h>
00038 #   endif
00039 #endif
00040 
00041 #define MYGUI_DEFINE_VERSION(major, minor, patch) ((major << 16) | (minor << 8) | patch)
00042 
00043 #ifndef MYGUI_DONT_REPLACE_NULLPTR
00044     #if MYGUI_COMPILER == MYGUI_COMPILER_MSVC
00045         #ifndef _MANAGED
00046             #define nullptr 0
00047         #endif
00048     #else
00049         #define nullptr 0
00050     #endif
00051 #endif
00052 
00053 namespace MyGUI
00054 {
00055 
00056     class Gui;
00057     class IWidgetCreator;
00058 
00059     // managers
00060     class LogManager;
00061     class InputManager;
00062     class SubWidgetManager;
00063     class LayerManager;
00064     class SkinManager;
00065     class WidgetManager;
00066     class FontManager;
00067     class ControllerManager;
00068     class PointerManager;
00069     class ClipboardManager;
00070     class LayoutManager;
00071     class PluginManager;
00072     class DynLibManager;
00073     class LanguageManager;
00074     class ResourceManager;
00075     class RenderManager;
00076     class FactoryManager;
00077     class TextureManager;
00078 
00079     class IWidgetFactory;
00080 
00081     class DynLib;
00082 
00083     namespace factory
00084     {
00085         template <typename T>
00086         class BaseWidgetFactory;
00087     }
00088 
00089     class Widget;
00090     class Button;
00091     class Window;
00092     class List;
00093     class HScroll;
00094     class VScroll;
00095     class Edit;
00096     class ComboBox;
00097     class StaticText;
00098     class Tab;
00099     class TabItem;
00100     class Progress;
00101     class ItemBox;
00102     class MultiList;
00103     class StaticImage;
00104     class Message;
00105     class MenuCtrl;
00106     class MenuItem;
00107     class PopupMenu;
00108     class MenuBar;
00109     class ScrollView;
00110     class DDContainer;
00111     class Canvas;
00112     class ListCtrl;
00113     class ListBox;
00114 
00115     typedef Widget* WidgetPtr;
00116     typedef Button* ButtonPtr;
00117     typedef Window* WindowPtr;
00118     typedef List* ListPtr;
00119     typedef HScroll* HScrollPtr;
00120     typedef VScroll* VScrollPtr;
00121     typedef Edit* EditPtr;
00122     typedef ComboBox* ComboBoxPtr;
00123     typedef StaticText* StaticTextPtr;
00124     typedef Tab* TabPtr;
00125     typedef TabItem* TabItemPtr;
00126     typedef Progress* ProgressPtr;
00127     typedef ItemBox* ItemBoxPtr;
00128     typedef MultiList* MultiListPtr;
00129     typedef StaticImage* StaticImagePtr;
00130     typedef Message* MessagePtr;
00131     typedef MenuCtrl* MenuCtrlPtr;
00132     typedef MenuItem* MenuItemPtr;
00133     typedef PopupMenu* PopupMenuPtr;
00134     typedef MenuBar* MenuBarPtr;
00135     typedef ScrollView* ScrollViewPtr;
00136     typedef DDContainer* DDContainerPtr;
00137     typedef Canvas* CanvasPtr;
00138     typedef ListCtrl* ListCtrlPtr;
00139     typedef ListBox* ListBoxPtr;
00140 
00141 #ifndef MYGUI_DONT_USE_OBSOLETE
00142 
00143     typedef TabItem Sheet;
00144     typedef TabItem* SheetPtr;
00145     typedef Canvas RenderBox;
00146     typedef Canvas* RenderBoxPtr;
00147 
00148 #endif // MYGUI_DONT_USE_OBSOLETE
00149 
00150     // Define version
00151     #define MYGUI_VERSION_MAJOR 3
00152     #define MYGUI_VERSION_MINOR 0
00153     #define MYGUI_VERSION_PATCH 3
00154 
00155     #define MYGUI_VERSION    MYGUI_DEFINE_VERSION(MYGUI_VERSION_MAJOR, MYGUI_VERSION_MINOR, MYGUI_VERSION_PATCH)
00156 
00157     // Disable warnings for MSVC compiler
00158 #if MYGUI_COMPILER == MYGUI_COMPILER_MSVC
00159 
00160 // Turn off warnings generated by long std templates
00161 // This warns about truncation to 255 characters in debug/browse info
00162 #   pragma warning (disable : 4786)
00163 
00164 // Turn off warnings generated by long std templates
00165 // This warns about truncation to 255 characters in debug/browse info
00166 #   pragma warning (disable : 4503)
00167 
00168 // disable: "conversion from 'double' to 'float', possible loss of data
00169 #   pragma warning (disable : 4244)
00170 
00171 // disable: "truncation from 'double' to 'float'
00172 #   pragma warning (disable : 4305)
00173 
00174 // disable: "<type> needs to have dll-interface to be used by clients'
00175 // Happens on STL member variables which are not public therefore is ok
00176 #   pragma warning (disable : 4251)
00177 
00178 // disable: "non dll-interface class used as base for dll-interface class"
00179 // Happens when deriving from Singleton because bug in compiler ignores
00180 // template export
00181 #   pragma warning (disable : 4275)
00182 
00183 // disable: "C++ Exception Specification ignored"
00184 // This is because MSVC 6 did not implement all the C++ exception
00185 // specifications in the ANSI C++ draft.
00186 #   pragma warning( disable : 4290 )
00187 
00188 // disable: "no suitable definition provided for explicit template
00189 // instantiation request" Occurs in VC7 for no justifiable reason on all
00190 // #includes of Singleton
00191 #   pragma warning( disable: 4661)
00192 
00193 #endif
00194 
00195 } // namespace MyGUI
00196 
00197 #endif // __MYGUI_PREREQUEST_H__