factory.h

Go to the documentation of this file.
00001 
00007 /*
00008     This library is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU Lesser General Public
00010     License as published by the Free Software Foundation; either
00011     version 2.1 of the License, or (at your option) any later version.
00012 
00013     This library is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016     Lesser General Public License for more details.
00017 
00018     You should have received a copy of the GNU Lesser General Public
00019     License along with this library; if not, write to the Free Software
00020     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021 */
00022 
00023 #ifndef OMGUI_PRIVATE_FACTORY_H
00024 #define OMGUI_PRIVATE_FACTORY_H
00025 
00026 #include <omgui/dllimpexp.h>
00027 #include <omgui/api-prototypes.h>
00028 
00029 namespace omgui {
00030     namespace factory {
00031 
00038 #define DECLARE_WIDGET_FACTORY(type) \
00039     omgui::api::type *create_widget_implementation(omgui::type *wrapper);
00040 
00041 DECLARE_WIDGET_FACTORY(Button)
00042 DECLARE_WIDGET_FACTORY(Window)
00043 DECLARE_WIDGET_FACTORY(Button)
00044 DECLARE_WIDGET_FACTORY(TextBox)
00045 DECLARE_WIDGET_FACTORY(EntryBox)
00046 DECLARE_WIDGET_FACTORY(SecureEntryBox)
00047 DECLARE_WIDGET_FACTORY(Panel)
00048 DECLARE_WIDGET_FACTORY(TableLayout)
00049 DECLARE_WIDGET_FACTORY(Notebook)
00050 DECLARE_WIDGET_FACTORY(ComboBox)
00051 
00052 #undef DECLARE_WIDGET_FACTORY
00053 
00060 #define IMPLEMENT_WIDGET_FACTORY(type, port) \
00061 namespace omgui { \
00062     namespace factory { \
00063         omgui::api::type *create_widget_implementation(omgui::type * wrapper) \
00064         { return new omgui::port::type(wrapper); } \
00065     } \
00066 }
00067 
00068 /*
00069     \return An object identifier unique throughout the application
00070 */
00071 int get_unique_object_id();
00072 
00073     } // factory
00074 } // omgui
00075 
00076 #endif // OMGUI_PRIVATE_FACTORY_H

doxygen SourceForge.net Logo