llvieweruictrlfactory.cpp

Go to the documentation of this file.
00001 
00032 #include "llviewerprecompiledheaders.h"
00033 
00034 #include <fstream>
00035 #include <boost/tokenizer.hpp>
00036 
00037 #include "v4color.h"
00038 
00039 #include "llvieweruictrlfactory.h"
00040 #include "llcolorswatch.h"
00041 #include "llinventoryview.h"
00042 #include "llviewertexteditor.h"
00043 #include "lltexturectrl.h"
00044 #include "llnameeditor.h"
00045 #include "llnamelistctrl.h"
00046 #include "llwebbrowserctrl.h"
00047 #include "lljoystickbutton.h"
00048 #include "llmediaremotectrl.h"
00049 #include "v4color.h"
00050 #include <boost/tokenizer.hpp>
00051 
00052 LLUICtrlFactory* gUICtrlFactory = NULL;
00053 
00054 
00055 //-----------------------------------------------------------------------------
00056 // LLUICtrlFactory()
00057 //-----------------------------------------------------------------------------
00058 LLViewerUICtrlFactory::LLViewerUICtrlFactory()
00059 :       LLUICtrlFactory()
00060 {
00061         // Register controls
00062         LLUICtrlCreator<LLColorSwatchCtrl>::registerCreator(LL_COLOR_SWATCH_CTRL_TAG, this);
00063         LLUICtrlCreator<LLViewerTextEditor>::registerCreator(LL_TEXT_EDITOR_TAG, this);
00064         LLUICtrlCreator<LLTextureCtrl>::registerCreator(LL_TEXTURE_CTRL_TAG, this);
00065         LLUICtrlCreator<LLNameListCtrl>::registerCreator(LL_NAME_LIST_CTRL_TAG, this);
00066         LLUICtrlCreator<LLNameEditor>::registerCreator(LL_NAME_EDITOR_TAG, this);
00067         LLUICtrlCreator<LLInventoryPanel>::registerCreator(LL_INVENTORY_PANEL_TAG, this);
00068 #if LL_LIBXUL_ENABLED
00069         LLUICtrlCreator<LLWebBrowserCtrl>::registerCreator(LL_WEB_BROWSER_CTRL_TAG, this);
00070 #endif
00071         LLUICtrlCreator<LLJoystickAgentSlide>::registerCreator(LL_JOYSTICK_SLIDE, this);
00072         LLUICtrlCreator<LLJoystickAgentTurn>::registerCreator(LL_JOYSTICK_TURN, this);
00073         LLUICtrlCreator<LLMediaRemoteCtrl>::registerCreator(LL_MEDIA_REMOTE_CTRL_TAG, this);
00074 }
00075 
00076 //-----------------------------------------------------------------------------
00077 // ~LLUICtrlFactory()
00078 //-----------------------------------------------------------------------------
00079 LLViewerUICtrlFactory::~LLViewerUICtrlFactory()
00080 {
00081 }
00082 
00083 //-----------------------------------------------------------------------------
00084 //-----------------------------------------------------------------------------
00085 
00086 
00087 LLColorSwatchCtrl*      LLViewerUICtrlFactory::getColorSwatchByName(LLPanel* panelp, const LLString& name)      
00088 { 
00089         return (LLColorSwatchCtrl*)     panelp->getCtrlByNameAndType(name, WIDGET_TYPE_COLOR_SWATCH); 
00090 }
00091 
00092 LLNameListCtrl*         LLViewerUICtrlFactory::getNameListByName(LLPanel* panelp, const LLString& name)         
00093 { 
00094         return (LLNameListCtrl*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_NAME_LIST); 
00095 }
00096 
00097 LLTextureCtrl*          LLViewerUICtrlFactory::getTexturePickerByName(LLPanel* panelp, const LLString& name)
00098 {
00099         return (LLTextureCtrl*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_TEXTURE_PICKER); 
00100 }
00101 
00102 LLWebBrowserCtrl*       LLViewerUICtrlFactory::getWebBrowserByName(LLPanel* panelp, const LLString& name)
00103 {
00104         return (LLWebBrowserCtrl*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_WEBBROWSER); 
00105 }
00106 
00107 LLViewerTextEditor* LLViewerUICtrlFactory::getViewerTextEditorByName(LLPanel* panelp, const LLString& name)             
00108 { 
00109         return (LLViewerTextEditor*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_TEXT_EDITOR); 
00110 }
00111 
00112 LLNameEditor* LLViewerUICtrlFactory::getNameEditorByName(LLPanel* panelp, const LLString& name)         
00113 { 
00114         return (LLNameEditor*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_NAME_EDITOR); 
00115 }
00116 
00117 LLMediaRemoteCtrl* LLViewerUICtrlFactory::getMediaRemoteByName(LLPanel* panelp, const LLString& name)           
00118 { 
00119         return (LLMediaRemoteCtrl*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_MEDIA_REMOTE); 
00120 }
00121 
00122 LLJoystickAgentTurn* LLViewerUICtrlFactory::getJoystickAgentTurnByName(LLPanel* panelp, const LLString& name)           
00123 { 
00124         return (LLJoystickAgentTurn*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_JOYSTICK_TURN); 
00125 }
00126 
00127 LLJoystickAgentSlide* LLViewerUICtrlFactory::getJoystickAgentSlideByName(LLPanel* panelp, const LLString& name)         
00128 { 
00129         return (LLJoystickAgentSlide*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_JOYSTICK_SLIDE); 
00130 }

Generated on Thu Jul 1 06:09:34 2010 for Second Life Viewer by  doxygen 1.4.7