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 _SelectorPulldownInteractor_h 16 #define _SelectorPulldownInteractor_h 17 18 19 #include <X11/Intrinsic.h> 20 21 #include "Interactor.h" 22 23 class TextSelector; 24 25 // 26 // Class name definition: 27 // 28 #define ClassSelectorPulldownInteractor "SelectorPulldownInteractor" 29 30 extern "C" void SelectorPulldownInteractor_SelectionCB(Widget, XtPointer, XtPointer); 31 32 33 // 34 // SelectorPulldownInteractor class definition: 35 // 36 class SelectorPulldownInteractor : public Interactor 37 { 38 private: 39 // 40 // Private member data: 41 // 42 static boolean ClassInitialized; 43 44 static String DefaultResources[]; 45 46 TextSelector *text_selector; 47 48 protected: 49 // 50 // Protected member data: 51 // 52 53 friend void SelectorPulldownInteractor_SelectionCB 54 (Widget widget, XtPointer clientData, XtPointer callData); 55 56 // 57 // [Re]load the options into this->pulldown. 58 // 59 void reloadMenuOptions(); 60 61 // 62 // Layout ourself when resized 63 // 64 virtual void layoutInteractorHorizontally(); 65 virtual void layoutInteractorVertically(); 66 67 public: 68 // 69 // Allocate this class 70 // 71 static Interactor *AllocateInteractor(const char *name, 72 InteractorInstance *ii); 73 74 75 // 76 // Constructor: 77 // 78 SelectorPulldownInteractor(const char *name, InteractorInstance *ii); 79 80 // 81 // Destructor: 82 // ~SelectorPulldownInteractor()83 ~SelectorPulldownInteractor(){} 84 85 // 86 // Update the displayed values for this interactor. 87 // 88 void updateDisplayedInteractorValue(void); 89 90 // 91 // 92 // 93 Widget createInteractivePart(Widget p); 94 void completeInteractivePart(); 95 96 // 97 // Make sure the attributes match the resources for the widgets. 98 // 99 void handleInteractivePartStateChange(InteractorInstance *src_ii, 100 boolean major_change); 101 102 // 103 // One time initialize for the class. 104 // 105 void initialize(); 106 107 // 108 // Flatten out the parent change the color, and turn off selectibility. 109 // 110 virtual void setAppearance(boolean developerStyle); 111 112 113 // 114 // Returns a pointer to the class name. 115 // getClassName()116 const char* getClassName() 117 { 118 return ClassSelectorPulldownInteractor; 119 } 120 }; 121 122 123 #endif // _SelectorPulldownInteractor_h 124