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
ClassDefOverride(FWGUIValidatingTextEntry, 0)
std::vector< std::pair< std::shared_ptr< std::string >, std::string > > m_options
FWGUIValidatingTextEntry(const TGWindow *parent=nullptr, const char *text=nullptr, Int_t id=-1)
void insertTextOption(const std::string &)
const FWGUIValidatingTextEntry & operator=(const FWGUIValidatingTextEntry &)
void setValidator(FWValidatorBase *)
tuple msg
Definition: mps_check.py:286
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) override
void keyPressedInPopup(TGFrame *, UInt_t keysym, UInt_t mask)