1 /***********************************************************************/ 2 /* Open Visualization Data Explorer */ 3 /* (C) Copyright IBM Corp. 1989,1999 */ 4 /* ALL RIGHTS RESERVED */ 5 /* This code licensed under the */ 6 /* "IBM PUBLIC LICENSE - Open Visualization Data Explorer" */ 7 /***********************************************************************/ 8 9 #include <dxconfig.h> 10 #include "../base/defines.h" 11 12 13 14 15 #ifndef _CDBInput 16 #define _CDBInput 17 18 19 #include "DXStrings.h" 20 #include "CDBParameter.h" 21 #include "../base/TextPopup.h" 22 23 24 // 25 // Class name definition: 26 // 27 #define ClassCDBInput "CDBInput" 28 29 class ConfigurationDialog; 30 31 // 32 // CDBInput class definition: 33 // 34 class CDBInput : public CDBParameter 35 { 36 private: 37 // 38 // Private member data: 39 // 40 41 protected: 42 // 43 // Protected member data: 44 // 45 46 47 public: 48 #if 11 49 TextPopup *valueTextPopup; 50 #else 51 Widget valueWidget; 52 #endif 53 boolean valueChanged; 54 boolean initialValueIsDefault; 55 char *initialValue; 56 int modified; 57 58 // 59 // Constructor: 60 // CDBInput()61 CDBInput() : CDBParameter() 62 { 63 #if 00 64 this->valueWidget = NULL; 65 #endif 66 this->valueChanged = FALSE; 67 this->initialValue = NULL; 68 this->initialValueIsDefault = FALSE; 69 this->valueTextPopup = new TextPopup(); 70 this->modified = 0; 71 } 72 73 // 74 // Destructor: 75 // ~CDBInput()76 ~CDBInput() 77 { 78 if (this->initialValue != NULL) 79 delete initialValue; 80 if (this->valueTextPopup) 81 delete this->valueTextPopup; 82 } 83 setInitialValue(const char * s)84 void setInitialValue(const char *s) 85 { 86 if (this->initialValue) 87 delete this->initialValue; 88 if (s) 89 this->initialValue = DuplicateString(s); 90 else 91 this->initialValue = NULL; 92 } 93 94 // 95 // Returns a pointer to the class name. 96 // getClassName()97 const char* getClassName() 98 { 99 return ClassCDBInput; 100 } 101 }; 102 103 104 #endif // _CDBInput 105