CmsShowSearchFiles

Macros

Line Code
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
// -*- C++ -*-
#ifndef Fireworks_Core_CmsShowSearchFiles_h
#define Fireworks_Core_CmsShowSearchFiles_h
//
// Package:     Core
// Class  :     CmsShowSearchFiles
//
/**\class CmsShowSearchFiles CmsShowSearchFiles.h Fireworks/Core/interface/CmsShowSearchFiles.h

   Description: <one line class summary>

   Usage:
    <usage>

 */
//
// Original Author:
//         Created:  Fri Jun 27 11:23:31 EDT 2008
//

// system include files
#include "GuiTypes.h"
#include "TGFrame.h"
#include <string>
#include <vector>

// forward declarations

class FWHtml;
class TGComboBox;
class TGTextButton;
class TGPopupMenu;
class TGTextEntry;

class CmsShowSearchFiles : public TGTransientFrame {
public:
  CmsShowSearchFiles(
      const char* filename, const char* windowname, const TGWindow* p = nullptr, UInt_t w = 1, UInt_t h = 1);
  ~CmsShowSearchFiles() override;

  ///This opens the dialog window and returns once the user has choosen, returns an empty string if canceled
  std::string chooseFileFromURL();

  //NOTE: Do not call any of the following, they are only public because 'signals' are attached to them
  void showPrefixes();
  void prefixChoosen(Int_t);
  void fileEntryChanged(const char*);
  void updateBrowser();
  void openClicked();

  void hyperlinkClicked(const char*);

  ClassDefOverride(CmsShowSearchFiles, 0);

private:
  void sendToWebBrowser(std::string& iWebFile);
  void readInfo();
  void readError();

  TGTextButton* m_choosePrefix;
  TGPopupMenu* m_prefixMenu;
  TGTextEntry* m_file;
  FWHtml* m_webFile;
  std::vector<std::string> m_prefixes;
  std::vector<bool> m_prefixComplete;
  TGTextButton* m_openButton;
  bool m_openCalled;
};

#endif