Exemplo n.º 1
0
ViewerPlotFactory::ViewerPlotFactory() : ViewerBase()
{

    PlotPluginManager *plotPluginMgr = GetPlotPluginManager();

    nTypes = plotPluginMgr->GetNEnabledPlugins();
    viewerPluginInfo  = new ViewerPlotPluginInfo*[nTypes];

    for (int i = 0; i < nTypes; ++i)
    {
        viewerPluginInfo[i]  = plotPluginMgr->GetViewerPluginInfo(
                                               plotPluginMgr->GetEnabledID(i));
    }
}
AddPlotAction::AddPlotAction(ViewerWindow *win) : ViewerActionLogic(win),
    graphicalPlugins()
{
    //
    // Iterate through all of the loaded plot plugins and add a
    // choice for all of the ones that have icons.
    //
    ViewerPlotPluginInfo *info = 0;
    PlotPluginManager *pluginMgr = GetPlotPluginManager();
    for(int i = 0; i < pluginMgr->GetNEnabledPlugins(); ++i)
    {
        info = pluginMgr->GetViewerPluginInfo(pluginMgr->GetEnabledID(i));
        if(info)
        {
            if(!GetViewerProperties()->GetNowin() && info->XPMIconData() != 0)
            {
                // Record the plugin entry.
                graphicalPlugins.push_back(i);
            }
        }
    }
}