cmFLTKWrapUICommand.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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
  20. * normal C++
  21. */
  22. class cmFLTKWrapUICommand : public cmCommand
  23. {
  24. public:
  25. cmTypeMacro(cmFLTKWrapUICommand, cmCommand);
  26. /**
  27. * This is a virtual constructor for the command.
  28. */
  29. virtual cmCommand* Clone()
  30. {
  31. return new cmFLTKWrapUICommand;
  32. }
  33. /**
  34. * This is called when the command is first encountered in
  35. * the CMakeLists.txt file.
  36. */
  37. virtual bool InitialPass(std::vector<std::string> const& args);
  38. /**
  39. * This is called at the end after all the information
  40. * specified by the command is accumulated. Most commands do
  41. * not implement this method. At this point, reading and
  42. * writing to the cache can be done.
  43. */
  44. virtual void FinalPass();
  45. /**
  46. * The name of the command as specified in CMakeList.txt.
  47. */
  48. virtual const char* GetName() { return "FLTK_WRAP_UI";}
  49. /**
  50. * Succinct documentation.
  51. */
  52. virtual const char* GetTerseDocumentation()
  53. {
  54. return "Create FLTK user interfaces Wrappers.";
  55. }
  56. /**
  57. * More documentation.
  58. */
  59. virtual const char* GetFullDocumentation()
  60. {
  61. return
  62. " FLTK_WRAP_UI(resultingLibraryName source1\n"
  63. " source2 ... sourceN )\n"
  64. "Produce .h and .cxx files for all the .fl and .fld files listed. "
  65. "The resulting .h and .cxx files will be added to a variable named "
  66. "resultingLibraryName_FLTK_UI_SRCS which should be added to your "
  67. "library.";
  68. }
  69. private:
  70. /**
  71. * List of produced files.
  72. */
  73. std::vector<cmSourceFile *> GeneratedSourcesClasses;
  74. /**
  75. * List of Fluid files that provide the source
  76. * generating .cxx and .h files
  77. */
  78. std::string Target;
  79. };
  80. #endif