You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
3.0KB

  1. //
  2. // "$Id: unittest_about.cxx 7913 2010-11-29 18:18:27Z greg.ercolano $"
  3. //
  4. // Unit tests for the Fast Light Tool Kit (FLTK).
  5. //
  6. // Copyright 1998-2010 by Bill Spitzak and others.
  7. //
  8. // This library is free software; you can redistribute it and/or
  9. // modify it under the terms of the GNU Library General Public
  10. // License as published by the Free Software Foundation; either
  11. // version 2 of the License, or (at your option) any later version.
  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. // Library General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU Library General Public
  19. // License along with this library; if not, write to the Free Software
  20. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  21. // USA.
  22. //
  23. // Please report all bugs and problems on the following page:
  24. //
  25. // http://www.fltk.org/str.php
  26. //
  27. #include <FL/Fl_Help_View.H>
  28. //
  29. //------- Introduction to FLTK drawing test -------
  30. //
  31. class About : public Fl_Help_View {
  32. public:
  33. static Fl_Widget *create() {
  34. return new About(TESTAREA_X, TESTAREA_Y, TESTAREA_W, TESTAREA_H);
  35. }
  36. About(int x, int y, int w, int h) : Fl_Help_View(x, y, w, h) {
  37. value(
  38. "<htmL><body><h2>About Unit Testing...</h2>\n"
  39. "The Unit Testing application can be used to verify correct graphics rendering "
  40. "on the current platform. The core developer team uses this program to make sure that the "
  41. "FLTK user experience is identical on all supported graphics systems."
  42. "<h3>the UI Designer</h3>\n"
  43. "<p>Designing a good user interface is an art. Widgets must be selected and carefully positioned "
  44. "to create a consistent look and feel for the user. Text must fit into given boxes and graphic "
  45. "elements must be correctly aligned. A good UI library will give consistent results on any "
  46. "supported platform and render all graphics in the way the UI designer intended.</p>\n"
  47. "<p>FLTK supports a large collection of platforms and graphics drivers. This unit testing "
  48. "application contains modules which will test rendering and alignment for most "
  49. "FLTK core graphics functions.</p>\n"
  50. "<h3>the Developer</h3>\n"
  51. "<p>Unittest is also a great help when implementing new graphics drivers. The tests are sorted "
  52. "in the same order in which a new graphics driver could be implemented. Most tests rely "
  53. "on the previous test to function correctly, so sticking to the given order is a good idea.</p>\n"
  54. "<h3>Conventions</h3>\n"
  55. "<p>Two layers of graphics are drawn for most tests. The lower layer contains "
  56. "red and green pixels. The upper layer contains black pixels. The test is rendered correctly "
  57. "if all red pixels are covered, but none of the green pixels. The top graphics layer can be "
  58. "switched on and off.</p>"
  59. "</body></html>");
  60. }
  61. };
  62. UnitTest about("About...", About::create);
  63. //
  64. // End of "$Id: unittest_about.cxx 7913 2010-11-29 18:18:27Z greg.ercolano $".
  65. //