summaryrefslogtreecommitdiffstats
path: root/x11-toolkits/viewkit/files/patch-VkCombo.C
blob: 661234540d7cf0d1c52b133a52ee06e4262a4aa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
--- ./VkCombo.C.orig	Wed Aug 16 23:49:29 2000
+++ ./VkCombo.C	Wed Aug 16 23:41:04 2000
@@ -36,13 +36,21 @@
 char *
 VkCombo::getValue()
 {
+#ifdef OPEN_MOTIF
+    return XmTextFieldGetString(CB_EditBox(_baseWidget));
+#else
     return XmComboBoxGetString(_baseWidget);
+#endif
 }
 
 void
 VkCombo::setIndex(int index)
 {
+#ifdef OPEN_MOTIF
+    XtVaSetValues(_baseWidget,XmNselectedPosition,index);
+#else
     XmComboBoxSelectPos(_baseWidget, index, False);
+#endif
 }
 
 void
@@ -52,7 +60,11 @@
 
     xmstr = XmStringCreateSimple(value);
 
+#ifdef OPEN_MOTIF
+    XmComboBoxSelectItem(_baseWidget, xmstr);
+#else
     XmComboBoxSelectItem(_baseWidget, xmstr, False);
+#endif
 
     XmStringFree(xmstr);
 }
@@ -60,7 +72,11 @@
 void
 VkCombo::selectIndex(int index)
 {
+#ifdef OPEN_MOTIF
+    XtVaSetValues(_baseWidget,XmNselectedPosition,index);
+#else
     XmComboBoxSelectPos(_baseWidget, index, True);
+#endif
 }
 
 void
@@ -70,7 +86,11 @@
 
     xmstr = XmStringCreateSimple(value);
 
+#ifdef OPEN_MOTIF
+    XmComboBoxSelectItem(_baseWidget, xmstr);
+#else
     XmComboBoxSelectItem(_baseWidget, xmstr, True);
+#endif
 
     XmStringFree(xmstr);
 }
@@ -80,7 +100,11 @@
 {
     XmString xmstr = XmStringCreateSimple(newItem);
 
+#ifdef OPEN_MOTIF
+    XmComboBoxAddItem(_baseWidget, xmstr, 0, False);
+#else
     XmComboBoxAddItem(_baseWidget, xmstr, 0);
+#endif
 
     XmStringFree(xmstr);
 }
OpenPOWER on IntegriCloud