summaryrefslogtreecommitdiffstats
path: root/Source/FLTKDialog/CMakeSetupGUIImplementation.h
blob: 5b290b813d9f45d36694a2b4757ef3043926d2b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    $RCSfile$
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Insight Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

#ifndef CMakeSetupGUIImplementation_h
#define CMakeSetupGUIImplementation_h

#include "CMakeSetupGUI.h"
#include "FLTKPropertyList.h"
#include <set>


/**
 *
 *  This class implements the virtual methods 
 *  declared in the GUI interface
 *
 */
   
class cmake;

class CMakeSetupGUIImplementation : public CMakeSetupGUI 
{

public:

  CMakeSetupGUIImplementation();
  virtual ~CMakeSetupGUIImplementation();
  virtual void Close( void );
  virtual void Show( void );
  virtual void UpdateData( bool option );
  virtual void BrowseForBinaryPath( void );
  virtual void BrowseForSourcePath( void );
  virtual void SetBinaryPath( const char * path );
  virtual void SetSourcePath( const char * path );
  virtual void SaveCacheFromGUI( void );
  virtual void LoadCacheFromDiskToGUI( void );
  virtual void FillCacheGUIFromCacheManager( void );
  virtual void FillCacheManagerFromCacheGUI( void );
        virtual void SetPathToExecutable( const char * path );
  virtual void LoadRecentDirectories(void);
  virtual void SaveRecentDirectories(void);
  virtual void ShowRecentBinaryDirectories(void);
  virtual void ShowRecentSourceDirectories(void);
  virtual void SelectOneRecentSourceDirectory(void);
  virtual void SelectOneRecentBinaryDirectory(void);
  virtual void UpdateListOfRecentDirectories(void);
  virtual void ClickOnConfigure(void);
  virtual void ClickOnOK(void);
  virtual void ClickOnCancel(void);
  virtual void RunCMake( bool generateProjectFiles );
  cmake *GetCMakeInstance() {return m_CMakeInstance; }
private:  
  virtual bool VerifyBinaryPath( const std::string & path ) const;
  virtual bool VerifySourcePath( const std::string & path ) const;
  virtual std::string ExpandPathAndMakeItAbsolute( const std::string & inputPath ) const;

private:
  fltk::PropertyList   m_CacheEntriesList;
  std::string          m_WhereBuild;
  std::string          m_WhereSource;
  std::string          m_PathToExecutable;
  std::string            m_GeneratorChoiceString;
  bool                 m_BuildPathChanged;
  
  std::set< std::string > m_RecentBinaryDirectories;
  std::set< std::string > m_RecentSourceDirectories;
  cmake *m_CMakeInstance;
};


#endif