![]() |
![]() |
00001 #ifndef Fireworks_Core_FWGUIValidatingTextEntry_h 00002 #define Fireworks_Core_FWGUIValidatingTextEntry_h 00003 // -*- C++ -*- 00004 // 00005 // Package: Core 00006 // Class : FWGUIValidatingTextEntry 00007 // 00016 // 00017 // Original Author: Chris Jones 00018 // Created: Fri Aug 22 18:13:29 EDT 2008 00019 // $Id: FWGUIValidatingTextEntry.h,v 1.7 2010/11/11 19:45:50 amraktad Exp $ 00020 // 00021 00022 // system include files 00023 #include <vector> 00024 #include <string> 00025 #ifndef __CINT__ 00026 #include <boost/shared_ptr.hpp> 00027 #endif 00028 // user include files 00029 #include "TGTextEntry.h" 00030 00031 // forward declarations 00032 class FWValidatorBase; 00033 class TGComboBoxPopup; 00034 class TGListBox; 00035 00036 class FWGUIValidatingTextEntry : public TGTextEntry { 00037 00038 public: 00039 FWGUIValidatingTextEntry(const TGWindow *parent = 0, const char *text = 0, Int_t id = -1); 00040 00041 virtual ~FWGUIValidatingTextEntry(); 00042 00043 // ---------- const member functions --------------------- 00044 00045 // ---------- static member functions -------------------- 00046 00047 // ---------- member functions --------------------------- 00048 void setValidator(FWValidatorBase*); 00049 void showOptions(); 00050 void hideOptions(); 00051 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); 00052 00053 void keyPressedInPopup(TGFrame*, UInt_t keysym, UInt_t mask); 00054 00055 ClassDef(FWGUIValidatingTextEntry, 0); 00056 00057 private: 00058 FWGUIValidatingTextEntry(const FWGUIValidatingTextEntry&); // stop default 00059 00060 const FWGUIValidatingTextEntry& operator=(const FWGUIValidatingTextEntry&); // stop default 00061 void insertTextOption(const std::string&); 00062 00063 // ---------- member data -------------------------------- 00064 TGComboBoxPopup* m_popup; 00065 TGListBox* m_list; 00066 00067 FWValidatorBase* m_validator; 00068 #ifndef __CINT__ 00069 std::vector<std::pair<boost::shared_ptr<std::string>, std::string> > m_options; 00070 #endif 00071 }; 00072 00073 00074 #endif