packaging: Initial packaging
[platform/upstream/cmake.git] / Source / cmFLTKWrapUICommand.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the License for more information.
11 ============================================================================*/
12 #ifndef cmFLTKWrapUICommand_h
13 #define cmFLTKWrapUICommand_h
14
15 #include "cmCommand.h"
16
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
21  * normal C++
22  */
23 class cmFLTKWrapUICommand : public cmCommand
24 {
25 public:
26   cmTypeMacro(cmFLTKWrapUICommand, cmCommand);
27
28   /**
29    * This is a virtual constructor for the command.
30    */
31   virtual cmCommand* Clone()
32     {
33     return new cmFLTKWrapUICommand;
34     }
35
36   /**
37    * This is called when the command is first encountered in
38    * the CMakeLists.txt file.
39    */
40   virtual bool InitialPass(std::vector<std::string> const& args,
41                            cmExecutionStatus &status);
42
43   /**
44    * This is called at the end after all the information
45    * specified by the command is accumulated. Most commands do
46    * not implement this method.  At this point, reading and
47    * writing to the cache can be done.
48    */
49   virtual void FinalPass();
50   virtual bool HasFinalPass() const { return true; }
51
52   /**
53    * The name of the command as specified in CMakeList.txt.
54    */
55   virtual const char* GetName() const { return "fltk_wrap_ui";}
56
57   /**
58    * Succinct documentation.
59    */
60   virtual const char* GetTerseDocumentation() const
61     {
62     return "Create FLTK user interfaces Wrappers.";
63     }
64
65   /**
66    * More documentation.
67    */
68   virtual const char* GetFullDocumentation() const
69     {
70     return
71       "  fltk_wrap_ui(resultingLibraryName source1\n"
72       "               source2 ... sourceN )\n"
73       "Produce .h and .cxx files for all the .fl and .fld files listed.  "
74       "The resulting .h and .cxx files will be added to a variable named "
75       "resultingLibraryName_FLTK_UI_SRCS which should be added to your "
76       "library.";
77     }
78
79 private:
80   /**
81    * List of produced files.
82    */
83   std::vector<cmSourceFile *> GeneratedSourcesClasses;
84
85   /**
86    * List of Fluid files that provide the source
87    * generating .cxx and .h files
88    */
89   std::string Target;
90 };
91
92
93
94 #endif