tree: d71e62553e6529a1addd7901db7116a3db734f6c [path history] [tgz]
  1. actions_example.cc
  2. actions_example.h
  3. animated_image_view_example.cc
  4. animated_image_view_example.h
  5. animation_example.cc
  6. animation_example.h
  7. ax_example.cc
  8. ax_example.h
  9. badge_example.cc
  10. badge_example.h
  11. box_layout_example.cc
  12. box_layout_example.h
  13. bubble_example.cc
  14. bubble_example.h
  15. BUILD.gn
  16. button_example.cc
  17. button_example.h
  18. button_sticker_sheet.cc
  19. button_sticker_sheet.h
  20. checkbox_example.cc
  21. checkbox_example.h
  22. color_chooser_example.cc
  23. color_chooser_example.h
  24. colored_dialog_example.cc
  25. colored_dialog_example.h
  26. colors_example.cc
  27. colors_example.h
  28. combobox_example.cc
  29. combobox_example.h
  30. create_examples.cc
  31. create_examples.h
  32. DEPS
  33. designer_example.cc
  34. designer_example.h
  35. dialog_example.cc
  36. dialog_example.h
  37. example_base.cc
  38. example_base.h
  39. example_combobox_model.cc
  40. example_combobox_model.h
  41. examples_action_id.h
  42. examples_color_id.h
  43. examples_color_mixer.cc
  44. examples_color_mixer.h
  45. examples_exit_code.h
  46. examples_main.cc
  47. examples_main_proc.cc
  48. examples_main_proc.h
  49. examples_skia_gold_pixel_diff.cc
  50. examples_skia_gold_pixel_diff.h
  51. examples_themed_label.cc
  52. examples_themed_label.h
  53. examples_unittest.cc
  54. examples_unittest_main.cc
  55. examples_views_delegate_chromeos.cc
  56. examples_views_delegate_chromeos.h
  57. examples_window.cc
  58. examples_window.h
  59. examples_window_with_content.cc
  60. examples_window_with_content.h
  61. examples_with_content_main.cc
  62. fade_animation.cc
  63. fade_animation.h
  64. flex_layout_example.cc
  65. flex_layout_example.h
  66. ink_drop_example.cc
  67. ink_drop_example.h
  68. label_example.cc
  69. label_example.h
  70. layout_example_base.cc
  71. layout_example_base.h
  72. link_example.cc
  73. link_example.h
  74. login_bubble_dialog_example.cc
  75. login_bubble_dialog_example.h
  76. menu_example.cc
  77. menu_example.h
  78. message_box_example.cc
  79. message_box_example.h
  80. multiline_example.cc
  81. multiline_example.h
  82. notification_example.cc
  83. notification_example.h
  84. progress_bar_example.cc
  85. progress_bar_example.h
  86. radio_button_example.cc
  87. radio_button_example.h
  88. README.md
  89. scroll_view_example.cc
  90. scroll_view_example.h
  91. slider_example.cc
  92. slider_example.h
  93. square_ink_drop_example.cc
  94. square_ink_drop_example.h
  95. tabbed_pane_example.cc
  96. tabbed_pane_example.h
  97. table_example.cc
  98. table_example.h
  99. text_example.cc
  100. text_example.h
  101. textarea_example.cc
  102. textarea_example.h
  103. textfield_example.cc
  104. textfield_example.h
  105. throbber_example.cc
  106. throbber_example.h
  107. toggle_button_example.cc
  108. toggle_button_example.h
  109. tree_view_example.cc
  110. tree_view_example.h
  111. typography_example.cc
  112. typography_example.h
  113. vector_example.cc
  114. vector_example.h
  115. views_examples.exe.manifest
  116. views_examples_export.h
  117. views_examples_resources.grd
  118. views_examples_with_content_export.h
  119. webview_example.cc
  120. webview_example.h
  121. widget_example.cc
  122. widget_example.h
ui/views/examples/README.md

Overview

views_examples and views_examples_with_content are executable tools to showcase all the Views components with some varied styles. The latter has extra support for web_view as well.

How to build and run

views_examples

$ autoninja -C out/Default views_examples

$ out/Default/views_examples

views_examples_with_content

$ autoninja -C out/Default views_examples_with_content

$ out/Default/views_examples_with_content

Note: Both programs are available on all desktop platforms which support Views toolkit, except views_examples is unavailable on Mac.

Optional args

To run programs but only with specific examples enabled:

<output_dir>/<program> [--enable-examples=<example1,[example2...]>]

To get help from the programs:

<output_dir>/<program> --help will print out the above usage info.

To list examples:

<output_dir>/<program> --enable-examples will print out all names of available examples and execute as if all (the default) are specified.

How to use

After launching the executable, there is a list of all available examples to browse.

Showcase gif

Use the scroll bar and select the example you'd like to browse. You can find how how these examples are created below in the examples section. Each example is linked to a corresponding source file with basic implementation details.

Contact the Views team if you have any questions.

Examples

The current available examples are listed below: