PageRenderTime 28ms CodeModel.GetById 1ms app.highlight 23ms RepoModel.GetById 1ms app.codeStats 1ms

/indra/integration_tests/llui_libtest/llwidgetreg.cpp

https://bitbucket.org/lindenlab/viewer-beta/
C++ | 107 lines | 73 code | 4 blank | 30 comment | 1 complexity | e45aaa6197ce70b865eead5d7cfa058a MD5 | raw file
  1/** 
  2 * @file llwidgetreg.cpp
  3 *
  4 * $LicenseInfo:firstyear=2009&license=viewerlgpl$
  5 * Second Life Viewer Source Code
  6 * Copyright (C) 2010, Linden Research, Inc.
  7 * 
  8 * This library is free software; you can redistribute it and/or
  9 * modify it under the terms of the GNU Lesser General Public
 10 * License as published by the Free Software Foundation;
 11 * version 2.1 of the License only.
 12 * 
 13 * This library is distributed in the hope that it will be useful,
 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 16 * Lesser General Public License for more details.
 17 * 
 18 * You should have received a copy of the GNU Lesser General Public
 19 * License along with this library; if not, write to the Free Software
 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 21 * 
 22 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
 23 * $/LicenseInfo$
 24 */
 25#include "linden_common.h"
 26
 27#include "llwidgetreg.h"
 28
 29#include "llbutton.h"
 30#include "llcheckboxctrl.h"
 31#include "llcombobox.h"
 32#include "llcontainerview.h"
 33#include "lliconctrl.h"
 34#include "llloadingindicator.h"
 35#include "llmenubutton.h"
 36#include "llmenugl.h"
 37#include "llmultislider.h"
 38#include "llmultisliderctrl.h"
 39#include "llprogressbar.h"
 40#include "llradiogroup.h"
 41#include "llsearcheditor.h"
 42#include "llscrollcontainer.h"
 43#include "llscrollingpanellist.h"
 44#include "llscrolllistctrl.h"
 45#include "llslider.h"
 46#include "llsliderctrl.h"
 47#include "llspinctrl.h"
 48#include "llstatview.h"
 49#include "lltabcontainer.h"
 50#include "lltextbox.h"
 51#include "lltexteditor.h"
 52#include "lltimectrl.h"
 53#include "llflyoutbutton.h"
 54#include "llfiltereditor.h"
 55#include "lllayoutstack.h"
 56
 57void LLWidgetReg::initClass(bool register_widgets)
 58{
 59	// Only need to register if the Windows linker has optimized away the
 60	// references to the object files.
 61	if (register_widgets)
 62	{
 63		LLDefaultChildRegistry::Register<LLButton> button("button");
 64		LLDefaultChildRegistry::Register<LLMenuButton> menu_button("menu_button");
 65		LLDefaultChildRegistry::Register<LLCheckBoxCtrl> check_box("check_box");
 66		LLDefaultChildRegistry::Register<LLComboBox> combo_box("combo_box");
 67		LLDefaultChildRegistry::Register<LLFilterEditor> filter_editor("filter_editor");
 68		LLDefaultChildRegistry::Register<LLFlyoutButton> flyout_button("flyout_button");
 69		LLDefaultChildRegistry::Register<LLContainerView> container_view("container_view");
 70		LLDefaultChildRegistry::Register<LLIconCtrl> icon("icon");
 71		LLDefaultChildRegistry::Register<LLLoadingIndicator> loading_indicator("loading_indicator");
 72		LLDefaultChildRegistry::Register<LLLineEditor> line_editor("line_editor");
 73		LLDefaultChildRegistry::Register<LLMenuItemSeparatorGL> menu_item_separator("menu_item_separator");
 74		LLDefaultChildRegistry::Register<LLMenuItemCallGL> menu_item_call_gl("menu_item_call");
 75		LLDefaultChildRegistry::Register<LLMenuItemCheckGL> menu_item_check_gl("menu_item_check");
 76		LLDefaultChildRegistry::Register<LLMenuGL> menu("menu");
 77		LLDefaultChildRegistry::Register<LLMenuBarGL> menu_bar("menu_bar");
 78		LLDefaultChildRegistry::Register<LLContextMenu> context_menu("context_menu");
 79		LLDefaultChildRegistry::Register<LLMultiSlider> multi_slider_bar("multi_slider_bar");
 80		LLDefaultChildRegistry::Register<LLMultiSliderCtrl> multi_slider("multi_slider");
 81		LLDefaultChildRegistry::Register<LLPanel> panel("panel", &LLPanel::fromXML);
 82		LLDefaultChildRegistry::Register<LLLayoutStack> layout_stack("layout_stack");
 83		LLDefaultChildRegistry::Register<LLProgressBar> progress_bar("progress_bar");
 84		LLDefaultChildRegistry::Register<LLRadioGroup> radio_group("radio_group");
 85		LLDefaultChildRegistry::Register<LLSearchEditor> search_editor("search_editor");
 86		LLDefaultChildRegistry::Register<LLScrollContainer> scroll_container("scroll_container");
 87		LLDefaultChildRegistry::Register<LLScrollingPanelList> scrolling_panel_list("scrolling_panel_list");
 88		LLDefaultChildRegistry::Register<LLScrollListCtrl> scroll_list("scroll_list");
 89		LLDefaultChildRegistry::Register<LLSlider> slider_bar("slider_bar");
 90		LLDefaultChildRegistry::Register<LLSliderCtrl> slider("slider");
 91		LLDefaultChildRegistry::Register<LLSpinCtrl> spinner("spinner");
 92		LLDefaultChildRegistry::Register<LLStatBar> stat_bar("stat_bar");
 93		//LLDefaultChildRegistry::Register<LLPlaceHolderPanel> placeholder("placeholder");
 94		LLDefaultChildRegistry::Register<LLTabContainer> tab_container("tab_container");
 95		LLDefaultChildRegistry::Register<LLTextBox> text("text");
 96		LLDefaultChildRegistry::Register<LLTimeCtrl> time("time");
 97		LLDefaultChildRegistry::Register<LLTextEditor> simple_text_editor("simple_text_editor");
 98		LLDefaultChildRegistry::Register<LLUICtrl> ui_ctrl("ui_ctrl");
 99		LLDefaultChildRegistry::Register<LLStatView> stat_view("stat_view");
100		//LLDefaultChildRegistry::Register<LLUICtrlLocate> locate("locate");
101		//LLDefaultChildRegistry::Register<LLUICtrlLocate> pad("pad");
102		LLDefaultChildRegistry::Register<LLViewBorder> view_border("view_border");
103	}
104
105	// *HACK: Usually this is registered as a viewer text editor
106	LLDefaultChildRegistry::Register<LLTextEditor> text_editor("text_editor");
107}