cmFLTKWrapUICommand.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmFLTKWrapUICommand_h
  14. #define cmFLTKWrapUICommand_h
  15. #include "cmCommand.h"
  16. /** \class cmFLTKWrapUICommand
  17. * \brief Create .h and .cxx files rules for FLTK user interfaces files
  18. *
  19. * cmFLTKWrapUICommand is used to create wrappers for FLTK classes into normal C++
  20. */
  21. class cmFLTKWrapUICommand : public cmCommand
  22. {
  23. public:
  24. /**
  25. * This is a virtual constructor for the command.
  26. */
  27. virtual cmCommand* Clone()
  28. {
  29. return new cmFLTKWrapUICommand;
  30. }
  31. /**
  32. * This is called when the command is first encountered in
  33. * the CMakeLists.txt file.
  34. */
  35. virtual bool InitialPass(std::vector<std::string> const& args);
  36. /**
  37. * This is called at the end after all the information
  38. * specified by the command is accumulated. Most commands do
  39. * not implement this method. At this point, reading and
  40. * writing to the cache can be done.
  41. */
  42. virtual void FinalPass();
  43. /**
  44. * The name of the command as specified in CMakeList.txt.
  45. */
  46. virtual const char* GetName() { return "FLTK_WRAP_UI";}
  47. /**
  48. * Succinct documentation.
  49. */
  50. virtual const char* GetTerseDocumentation()
  51. {
  52. return "Create FLTK user interfaces Wrappers.";
  53. }
  54. /**
  55. * More documentation.
  56. */
  57. virtual const char* GetFullDocumentation()
  58. {
  59. return
  60. " FLTK_WRAP_UI(resultingLibraryName source1\n"
  61. " source2 ... sourceN )\n"
  62. "Produce .h and .cxx files for all the .fl and .fld files listed. "
  63. "The resulting .h and .cxx files will be added to the specified "
  64. "library.";
  65. }
  66. private:
  67. /**
  68. * List of produced files.
  69. */
  70. std::vector<cmSourceFile *> m_GeneratedSourcesClasses;
  71. /**
  72. * List of Fluid files that provide the source
  73. * generating .cxx and .h files
  74. */
  75. std::string m_Target;
  76. };
  77. #endif