cmFLTKWrapUICommand.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef cmFLTKWrapUICommand_h
  2. #define cmFLTKWrapUICommand_h
  3. #include "cmStandardIncludes.h"
  4. #include "cmCommand.h"
  5. /** \class cmFLTKWrapUICommand
  6. * \brief Create .h and .cxx files rules for FLTK user interfaces files
  7. *
  8. * cmFLTKWrapUICommand is used to create wrappers for FLTK classes into normal C++
  9. */
  10. class cmFLTKWrapUICommand : public cmCommand
  11. {
  12. public:
  13. /**
  14. * This is a virtual constructor for the command.
  15. */
  16. virtual cmCommand* Clone()
  17. {
  18. return new cmFLTKWrapUICommand;
  19. }
  20. /**
  21. * This is called when the command is first encountered in
  22. * the CMakeLists.txt file.
  23. */
  24. virtual bool InitialPass(std::vector<std::string> const& args);
  25. /**
  26. * This is called at the end after all the information
  27. * specified by the command is accumulated. Most commands do
  28. * not implement this method. At this point, reading and
  29. * writing to the cache can be done.
  30. */
  31. virtual void FinalPass();
  32. /**
  33. * The name of the command as specified in CMakeList.txt.
  34. */
  35. virtual const char* GetName() { return "FLTK_WRAP_UI";}
  36. /**
  37. * Succinct documentation.
  38. */
  39. virtual const char* GetTerseDocumentation()
  40. {
  41. return "Create FLTK user interfaces Wrappers.";
  42. }
  43. /**
  44. * More documentation.
  45. */
  46. virtual const char* GetFullDocumentation()
  47. {
  48. return
  49. "FLTK_WRAP_UI(resultingLibraryName SourceList)\n"
  50. "Produce .h and .cxx files for all the .fl and .fld file listed "
  51. "in the SourceList.\n"
  52. "The .h files will be added to the library using the base name in\n"
  53. "source list.\n"
  54. "The .cxx files will be added to the library using the base name in \n"
  55. "source list.";
  56. }
  57. private:
  58. /**
  59. * List of produced files.
  60. */
  61. std::vector<cmSourceFile> m_GeneratedSourcesClasses;
  62. std::vector<cmSourceFile> m_GeneratedHeadersClasses;
  63. /**
  64. * List of Fluid files that provide the source
  65. * generating .cxx and .h files
  66. */
  67. std::vector<std::string> m_WrapUserInterface;
  68. std::string m_GUISourceList;
  69. std::string m_GeneratedSourceList;
  70. };
  71. #endif