00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00035 #ifndef _SO3_WIDGET_FACTORY_H_
00036 #define _SO3_WIDGET_FACTORY_H_
00037
00038 #include "../SCOLBasic/SO3Prerequisites.h"
00039 #include "SO3Widget.h"
00040
00041 namespace SO3
00042 {
00043
00046 class _SO3_Export SWidgetFactory
00047 {
00048 public:
00049 protected:
00050 private:
00051 std::string type;
00052
00053 public:
00057 SWidgetFactory(std::string widgetType);
00058
00062 ~SWidgetFactory();
00063
00066 std::string GetType();
00067
00071 SWidget* CreateWidget(SScene* targetScene, std::string widgetName, int xPos, int yPos, unsigned short width, unsigned short height, SViewPort* targetViewport, unsigned int widgetZOrder);
00072
00076 SWidget* CreateWidget(SScene* targetScene, std::string widgetName, int xPos, int yPos, unsigned short width, unsigned short height, SViewPort* targetViewport);
00077
00081 SWidget* CreateWidget(SScene* targetScene, std::string widgetName, unsigned short width, unsigned short height, SMaterial* targetMaterial, unsigned short targetTechnique, unsigned short targetPass, unsigned short targetTextureUnit);
00082
00085 void DeleteWidget(SWidget* existingWidget);
00086 protected:
00090 virtual SWidget* CreateWidgetImpl(SScene* targetScene, std::string widgetName, int xPos, int yPos, unsigned short width, unsigned short height, SViewPort* targetViewport, unsigned int widgetZOrder)=0;
00091
00095 virtual SWidget* CreateWidgetImpl(SScene* targetScene, std::string widgetName, int xPos, int yPos, unsigned short width, unsigned short height, SViewPort* targetViewport)=0;
00096
00100 virtual SWidget* CreateWidgetImpl(SScene* targetScene, std::string widgetName, unsigned short width, unsigned short height, SMaterial* targetMaterial, unsigned short targetTechnique, unsigned short targetPass, unsigned short targetTextureUnit)=0;
00101
00104 virtual void DeleteWidgetImpl(SWidget* existingWidget)=0;
00105 private:
00109 SWidgetFactory();
00110 };
00111
00112 }
00113
00114 #endif