CMS 3D CMS Logo

FWGUIValidatingTextEntry.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWGUIValidatingTextEntry_h
2 #define Fireworks_Core_FWGUIValidatingTextEntry_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : FWGUIValidatingTextEntry
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Fri Aug 22 18:13:29 EDT 2008
19 //
20 
21 // system include files
22 #include <vector>
23 #include <string>
24 #ifndef __CINT__
25 #include <memory>
26 #endif
27 // user include files
28 #include "TGTextEntry.h"
29 
30 // forward declarations
31 class FWValidatorBase;
32 class TGComboBoxPopup;
33 class TGListBox;
34 
35 class FWGUIValidatingTextEntry : public TGTextEntry {
36 public:
37  FWGUIValidatingTextEntry(const TGWindow* parent = nullptr, const char* text = nullptr, Int_t id = -1);
38 
39  ~FWGUIValidatingTextEntry() override;
40 
41  // ---------- const member functions ---------------------
42 
43  // ---------- static member functions --------------------
44 
45  // ---------- member functions ---------------------------
47  void showOptions();
48  void hideOptions();
49 
50  TGListBox* getListBox() const { return m_list; }
51  void setMaxListBoxHeight(UInt_t x) { m_listHeight = x; }
52 
53  Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) override;
54 
55  void keyPressedInPopup(TGFrame*, UInt_t keysym, UInt_t mask);
56 
58 
59 private:
60  FWGUIValidatingTextEntry(const FWGUIValidatingTextEntry&); // stop default
61 
62  const FWGUIValidatingTextEntry& operator=(const FWGUIValidatingTextEntry&); // stop default
63  void insertTextOption(const std::string&);
64 
65  // ---------- member data --------------------------------
66  TGComboBoxPopup* m_popup;
67  TGListBox* m_list;
69 
70  UInt_t m_listHeight;
71 #ifndef __CINT__
72  std::vector<std::pair<std::shared_ptr<std::string>, std::string> > m_options;
73 #endif
74 };
75 
76 #endif
FWGUIValidatingTextEntry::setValidator
void setValidator(FWValidatorBase *)
Definition: FWGUIValidatingTextEntry.cc:78
FWGUIValidatingTextEntry::m_popup
TGComboBoxPopup * m_popup
Definition: FWGUIValidatingTextEntry.h:66
FWGUIValidatingTextEntry::m_validator
FWValidatorBase * m_validator
Definition: FWGUIValidatingTextEntry.h:68
FWGUIValidatingTextEntry::keyPressedInPopup
void keyPressedInPopup(TGFrame *, UInt_t keysym, UInt_t mask)
Definition: FWGUIValidatingTextEntry.cc:99
FWGUIValidatingTextEntry::m_list
TGListBox * m_list
Definition: FWGUIValidatingTextEntry.h:67
mps_check.msg
tuple msg
Definition: mps_check.py:285
DDAxes::x
FWGUIValidatingTextEntry::showOptions
void showOptions()
Definition: FWGUIValidatingTextEntry.cc:139
FWGUIValidatingTextEntry
Definition: FWGUIValidatingTextEntry.h:35
FWGUIValidatingTextEntry::operator=
const FWGUIValidatingTextEntry & operator=(const FWGUIValidatingTextEntry &)
FWGUIValidatingTextEntry::m_options
std::vector< std::pair< std::shared_ptr< std::string >, std::string > > m_options
Definition: FWGUIValidatingTextEntry.h:72
FWValidatorBase
Definition: FWValidatorBase.h:30
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FWGUIValidatingTextEntry::~FWGUIValidatingTextEntry
~FWGUIValidatingTextEntry() override
Definition: FWGUIValidatingTextEntry.cc:61
FWGUIValidatingTextEntry::FWGUIValidatingTextEntry
FWGUIValidatingTextEntry(const TGWindow *parent=nullptr, const char *text=nullptr, Int_t id=-1)
Definition: FWGUIValidatingTextEntry.cc:36
FWGUIValidatingTextEntry::getListBox
TGListBox * getListBox() const
Definition: FWGUIValidatingTextEntry.h:50
FWGUIValidatingTextEntry::ClassDefOverride
ClassDefOverride(FWGUIValidatingTextEntry, 0)
FWGUIValidatingTextEntry::ProcessMessage
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) override
Definition: FWGUIValidatingTextEntry.cc:80
FWGUIValidatingTextEntry::m_listHeight
UInt_t m_listHeight
Definition: FWGUIValidatingTextEntry.h:70
FWGUIValidatingTextEntry::setMaxListBoxHeight
void setMaxListBoxHeight(UInt_t x)
Definition: FWGUIValidatingTextEntry.h:51
runonSM.text
text
Definition: runonSM.py:43
class-composition.parent
parent
Definition: class-composition.py:88
FWGUIValidatingTextEntry::hideOptions
void hideOptions()
Definition: FWGUIValidatingTextEntry.cc:182
FWGUIValidatingTextEntry::insertTextOption
void insertTextOption(const std::string &)
Definition: FWGUIValidatingTextEntry.cc:187