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
// 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;
};
//------------------------------------------------------------------------------