]> Creatis software - clitk.git/blobdiff - vv/vvToolManager.h
- toolbase
[clitk.git] / vv / vvToolManager.h
index 8d8c1da9a50bf05812044520bf783ee9b5901e08..01f1e819f5856f927cf561ee78155f6e58561e27 100644 (file)
@@ -3,8 +3,8 @@
   Program:   vv
   Module:    $RCSfile: vvToolManager.h,v $
   Language:  C++
-  Date:      $Date: 2010/02/03 10:54:08 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2010/02/24 11:42:42 $
+  Version:   $Revision: 1.3 $
   Author :   David Sarrut (david.sarrut@creatis.insa-lyon.fr)
 
   Copyright (C) 2008
 #ifndef VVTOOLMANAGER_H
 #define VVTOOLMANAGER_H
 
-#include "vvToolCreatorBase.h"
 #include "clitkCommon.h"
 
 class vvToolCreatorBase;
-class vvMainWindow;
+class vvMainWindowBase;
 
 //------------------------------------------------------------------------------
 // Manage a list of ToolCreator. Each tool will be automagically
@@ -40,15 +39,25 @@ class vvMainWindow;
 // MainWindow will call the 'Initialize' to insert the tool in the
 // menu bar.
 class vvToolManager {
+
 public:
-  // Functions
+
+  /// Get or build unique instance with this method
   static vvToolManager * GetInstance();  
+
+  /// Add a tool creator in the list (called before main, via static member initialization)
   static void AddTool(vvToolCreatorBase * v);
-  static void Initialize(vvMainWindow * m);
-  static void UpdateEnabledTool();
-  // Variables
-   std::vector<vvToolCreatorBase *> mListOfTools;
+
+  /// Called in MainWindow, insert all tools into the menu
+  static void InsertToolsInMenu(vvMainWindowBase * m);
+  
+protected:
+
+  /// Singleton object pointer
   static vvToolManager * mSingleton;
+
+  /// list of all tool creators
+  std::vector<vvToolCreatorBase *> mListOfTools;
 };
 //------------------------------------------------------------------------------