PageRenderTime 34ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/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
Possible License(s): LGPL-2.1
  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. #include "llwidgetreg.h"
  27. #include "llbutton.h"
  28. #include "llcheckboxctrl.h"
  29. #include "llcombobox.h"
  30. #include "llcontainerview.h"
  31. #include "lliconctrl.h"
  32. #include "llloadingindicator.h"
  33. #include "llmenubutton.h"
  34. #include "llmenugl.h"
  35. #include "llmultislider.h"
  36. #include "llmultisliderctrl.h"
  37. #include "llprogressbar.h"
  38. #include "llradiogroup.h"
  39. #include "llsearcheditor.h"
  40. #include "llscrollcontainer.h"
  41. #include "llscrollingpanellist.h"
  42. #include "llscrolllistctrl.h"
  43. #include "llslider.h"
  44. #include "llsliderctrl.h"
  45. #include "llspinctrl.h"
  46. #include "llstatview.h"
  47. #include "lltabcontainer.h"
  48. #include "lltextbox.h"
  49. #include "lltexteditor.h"
  50. #include "lltimectrl.h"
  51. #include "llflyoutbutton.h"
  52. #include "llfiltereditor.h"
  53. #include "lllayoutstack.h"
  54. void LLWidgetReg::initClass(bool register_widgets)
  55. {
  56. // Only need to register if the Windows linker has optimized away the
  57. // references to the object files.
  58. if (register_widgets)
  59. {
  60. LLDefaultChildRegistry::Register<LLButton> button("button");
  61. LLDefaultChildRegistry::Register<LLMenuButton> menu_button("menu_button");
  62. LLDefaultChildRegistry::Register<LLCheckBoxCtrl> check_box("check_box");
  63. LLDefaultChildRegistry::Register<LLComboBox> combo_box("combo_box");
  64. LLDefaultChildRegistry::Register<LLFilterEditor> filter_editor("filter_editor");
  65. LLDefaultChildRegistry::Register<LLFlyoutButton> flyout_button("flyout_button");
  66. LLDefaultChildRegistry::Register<LLContainerView> container_view("container_view");
  67. LLDefaultChildRegistry::Register<LLIconCtrl> icon("icon");
  68. LLDefaultChildRegistry::Register<LLLoadingIndicator> loading_indicator("loading_indicator");
  69. LLDefaultChildRegistry::Register<LLLineEditor> line_editor("line_editor");
  70. LLDefaultChildRegistry::Register<LLMenuItemSeparatorGL> menu_item_separator("menu_item_separator");
  71. LLDefaultChildRegistry::Register<LLMenuItemCallGL> menu_item_call_gl("menu_item_call");
  72. LLDefaultChildRegistry::Register<LLMenuItemCheckGL> menu_item_check_gl("menu_item_check");
  73. LLDefaultChildRegistry::Register<LLMenuGL> menu("menu");
  74. LLDefaultChildRegistry::Register<LLMenuBarGL> menu_bar("menu_bar");
  75. LLDefaultChildRegistry::Register<LLContextMenu> context_menu("context_menu");
  76. LLDefaultChildRegistry::Register<LLMultiSlider> multi_slider_bar("multi_slider_bar");
  77. LLDefaultChildRegistry::Register<LLMultiSliderCtrl> multi_slider("multi_slider");
  78. LLDefaultChildRegistry::Register<LLPanel> panel("panel", &LLPanel::fromXML);
  79. LLDefaultChildRegistry::Register<LLLayoutStack> layout_stack("layout_stack");
  80. LLDefaultChildRegistry::Register<LLProgressBar> progress_bar("progress_bar");
  81. LLDefaultChildRegistry::Register<LLRadioGroup> radio_group("radio_group");
  82. LLDefaultChildRegistry::Register<LLSearchEditor> search_editor("search_editor");
  83. LLDefaultChildRegistry::Register<LLScrollContainer> scroll_container("scroll_container");
  84. LLDefaultChildRegistry::Register<LLScrollingPanelList> scrolling_panel_list("scrolling_panel_list");
  85. LLDefaultChildRegistry::Register<LLScrollListCtrl> scroll_list("scroll_list");
  86. LLDefaultChildRegistry::Register<LLSlider> slider_bar("slider_bar");
  87. LLDefaultChildRegistry::Register<LLSliderCtrl> slider("slider");
  88. LLDefaultChildRegistry::Register<LLSpinCtrl> spinner("spinner");
  89. LLDefaultChildRegistry::Register<LLStatBar> stat_bar("stat_bar");
  90. //LLDefaultChildRegistry::Register<LLPlaceHolderPanel> placeholder("placeholder");
  91. LLDefaultChildRegistry::Register<LLTabContainer> tab_container("tab_container");
  92. LLDefaultChildRegistry::Register<LLTextBox> text("text");
  93. LLDefaultChildRegistry::Register<LLTimeCtrl> time("time");
  94. LLDefaultChildRegistry::Register<LLTextEditor> simple_text_editor("simple_text_editor");
  95. LLDefaultChildRegistry::Register<LLUICtrl> ui_ctrl("ui_ctrl");
  96. LLDefaultChildRegistry::Register<LLStatView> stat_view("stat_view");
  97. //LLDefaultChildRegistry::Register<LLUICtrlLocate> locate("locate");
  98. //LLDefaultChildRegistry::Register<LLUICtrlLocate> pad("pad");
  99. LLDefaultChildRegistry::Register<LLViewBorder> view_border("view_border");
  100. }
  101. // *HACK: Usually this is registered as a viewer text editor
  102. LLDefaultChildRegistry::Register<LLTextEditor> text_editor("text_editor");
  103. }