cmFLTKWrapUICommand.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Insight Consortium. All rights reserved.
  8. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm 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 "cmStandardIncludes.h"
  16. #include "cmCommand.h"
  17. /** \class cmFLTKWrapUICommand
  18. * \brief Create .h and .cxx files rules for FLTK user interfaces files
  19. *
  20. * cmFLTKWrapUICommand is used to create wrappers for FLTK classes into normal C++
  21. */
  22. class cmFLTKWrapUICommand : public cmCommand
  23. {
  24. public:
  25. /**
  26. * This is a virtual constructor for the command.
  27. */
  28. virtual cmCommand* Clone()
  29. {
  30. return new cmFLTKWrapUICommand;
  31. }
  32. /**
  33. * This is called when the command is first encountered in
  34. * the CMakeLists.txt file.
  35. */
  36. virtual bool InitialPass(std::vector<std::string> const& args);
  37. /**
  38. * This is called at the end after all the information
  39. * specified by the command is accumulated. Most commands do
  40. * not implement this method. At this point, reading and
  41. * writing to the cache can be done.
  42. */
  43. virtual void FinalPass();
  44. /**
  45. * The name of the command as specified in CMakeList.txt.
  46. */
  47. virtual const char* GetName() { return "FLTK_WRAP_UI";}
  48. /**
  49. * Succinct documentation.
  50. */
  51. virtual const char* GetTerseDocumentation()
  52. {
  53. return "Create FLTK user interfaces Wrappers.";
  54. }
  55. /**
  56. * More documentation.
  57. */
  58. virtual const char* GetFullDocumentation()
  59. {
  60. return
  61. "FLTK_WRAP_UI(resultingLibraryName SourceList)\n"
  62. "Produce .h and .cxx files for all the .fl and .fld file listed "
  63. "in the SourceList.\n"
  64. "The .h files will be added to the library using the base name in\n"
  65. "source list.\n"
  66. "The .cxx files will be added to the library using the base name in \n"
  67. "source list.";
  68. }
  69. private:
  70. /**
  71. * List of produced files.
  72. */
  73. std::vector<cmSourceFile> m_GeneratedSourcesClasses;
  74. std::vector<cmSourceFile> m_GeneratedHeadersClasses;
  75. /**
  76. * List of Fluid files that provide the source
  77. * generating .cxx and .h files
  78. */
  79. std::vector<std::string> m_WrapUserInterface;
  80. std::string m_Target;
  81. std::string m_GUISourceList;
  82. };
  83. #endif