aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvieweruictrlfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llvieweruictrlfactory.cpp')
-rw-r--r--linden/indra/newview/llvieweruictrlfactory.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/linden/indra/newview/llvieweruictrlfactory.cpp b/linden/indra/newview/llvieweruictrlfactory.cpp
index e3162b1..3a4df1c 100644
--- a/linden/indra/newview/llvieweruictrlfactory.cpp
+++ b/linden/indra/newview/llvieweruictrlfactory.cpp
@@ -65,9 +65,7 @@ LLViewerUICtrlFactory::LLViewerUICtrlFactory()
65 LLUICtrlCreator<LLNameListCtrl>::registerCreator(LL_NAME_LIST_CTRL_TAG, this); 65 LLUICtrlCreator<LLNameListCtrl>::registerCreator(LL_NAME_LIST_CTRL_TAG, this);
66 LLUICtrlCreator<LLNameEditor>::registerCreator(LL_NAME_EDITOR_TAG, this); 66 LLUICtrlCreator<LLNameEditor>::registerCreator(LL_NAME_EDITOR_TAG, this);
67 LLUICtrlCreator<LLInventoryPanel>::registerCreator(LL_INVENTORY_PANEL_TAG, this); 67 LLUICtrlCreator<LLInventoryPanel>::registerCreator(LL_INVENTORY_PANEL_TAG, this);
68#if LL_LIBXUL_ENABLED
69 LLUICtrlCreator<LLWebBrowserCtrl>::registerCreator(LL_WEB_BROWSER_CTRL_TAG, this); 68 LLUICtrlCreator<LLWebBrowserCtrl>::registerCreator(LL_WEB_BROWSER_CTRL_TAG, this);
70#endif
71 LLUICtrlCreator<LLJoystickAgentSlide>::registerCreator(LL_JOYSTICK_SLIDE, this); 69 LLUICtrlCreator<LLJoystickAgentSlide>::registerCreator(LL_JOYSTICK_SLIDE, this);
72 LLUICtrlCreator<LLJoystickAgentTurn>::registerCreator(LL_JOYSTICK_TURN, this); 70 LLUICtrlCreator<LLJoystickAgentTurn>::registerCreator(LL_JOYSTICK_TURN, this);
73 LLUICtrlCreator<LLMediaRemoteCtrl>::registerCreator(LL_MEDIA_REMOTE_CTRL_TAG, this); 71 LLUICtrlCreator<LLMediaRemoteCtrl>::registerCreator(LL_MEDIA_REMOTE_CTRL_TAG, this);
@@ -86,45 +84,45 @@ LLViewerUICtrlFactory::~LLViewerUICtrlFactory()
86 84
87LLColorSwatchCtrl* LLViewerUICtrlFactory::getColorSwatchByName(LLPanel* panelp, const LLString& name) 85LLColorSwatchCtrl* LLViewerUICtrlFactory::getColorSwatchByName(LLPanel* panelp, const LLString& name)
88{ 86{
89 return (LLColorSwatchCtrl*) panelp->getCtrlByNameAndType(name, WIDGET_TYPE_COLOR_SWATCH); 87 return panelp->getChild<LLColorSwatchCtrl>(name);
90} 88}
91 89
92LLNameListCtrl* LLViewerUICtrlFactory::getNameListByName(LLPanel* panelp, const LLString& name) 90LLNameListCtrl* LLViewerUICtrlFactory::getNameListByName(LLPanel* panelp, const LLString& name)
93{ 91{
94 return (LLNameListCtrl*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_NAME_LIST); 92 return panelp->getChild<LLNameListCtrl>(name);
95} 93}
96 94
97LLTextureCtrl* LLViewerUICtrlFactory::getTexturePickerByName(LLPanel* panelp, const LLString& name) 95LLTextureCtrl* LLViewerUICtrlFactory::getTexturePickerByName(LLPanel* panelp, const LLString& name)
98{ 96{
99 return (LLTextureCtrl*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_TEXTURE_PICKER); 97 return panelp->getChild<LLTextureCtrl>(name);
100} 98}
101 99
102LLWebBrowserCtrl* LLViewerUICtrlFactory::getWebBrowserByName(LLPanel* panelp, const LLString& name) 100LLWebBrowserCtrl* LLViewerUICtrlFactory::getWebBrowserByName(LLPanel* panelp, const LLString& name)
103{ 101{
104 return (LLWebBrowserCtrl*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_WEBBROWSER); 102 return panelp->getChild<LLWebBrowserCtrl>(name);
105} 103}
106 104
107LLViewerTextEditor* LLViewerUICtrlFactory::getViewerTextEditorByName(LLPanel* panelp, const LLString& name) 105LLViewerTextEditor* LLViewerUICtrlFactory::getViewerTextEditorByName(LLPanel* panelp, const LLString& name)
108{ 106{
109 return (LLViewerTextEditor*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_TEXT_EDITOR); 107 return panelp->getChild<LLViewerTextEditor>(name);
110} 108}
111 109
112LLNameEditor* LLViewerUICtrlFactory::getNameEditorByName(LLPanel* panelp, const LLString& name) 110LLNameEditor* LLViewerUICtrlFactory::getNameEditorByName(LLPanel* panelp, const LLString& name)
113{ 111{
114 return (LLNameEditor*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_NAME_EDITOR); 112 return panelp->getChild<LLNameEditor>(name);
115} 113}
116 114
117LLMediaRemoteCtrl* LLViewerUICtrlFactory::getMediaRemoteByName(LLPanel* panelp, const LLString& name) 115LLMediaRemoteCtrl* LLViewerUICtrlFactory::getMediaRemoteByName(LLPanel* panelp, const LLString& name)
118{ 116{
119 return (LLMediaRemoteCtrl*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_MEDIA_REMOTE); 117 return panelp->getChild<LLMediaRemoteCtrl>(name);
120} 118}
121 119
122LLJoystickAgentTurn* LLViewerUICtrlFactory::getJoystickAgentTurnByName(LLPanel* panelp, const LLString& name) 120LLJoystickAgentTurn* LLViewerUICtrlFactory::getJoystickAgentTurnByName(LLPanel* panelp, const LLString& name)
123{ 121{
124 return (LLJoystickAgentTurn*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_JOYSTICK_TURN); 122 return panelp->getChild<LLJoystickAgentTurn>(name);
125} 123}
126 124
127LLJoystickAgentSlide* LLViewerUICtrlFactory::getJoystickAgentSlideByName(LLPanel* panelp, const LLString& name) 125LLJoystickAgentSlide* LLViewerUICtrlFactory::getJoystickAgentSlideByName(LLPanel* panelp, const LLString& name)
128{ 126{
129 return (LLJoystickAgentSlide*)panelp->getCtrlByNameAndType(name, WIDGET_TYPE_JOYSTICK_SLIDE); 127 return panelp->getChild<LLJoystickAgentSlide>(name);
130} 128}