23 |
#include "arshell.h" |
#include "arshell.h" |
24 |
|
|
25 |
Widget |
Widget |
26 |
arshell_add_appendage(Widget container) |
arshell_add_appendage (Widget container) |
27 |
{ |
{ |
28 |
char *command; |
char *command; |
29 |
Widget button; |
Widget button; |
30 |
command=antiright_pipe_read("arshell -ADp " |
command = antiright_pipe_read ("arshell -ADp " |
31 |
"'Enter the command for the new button.'"); |
"'Enter the command for the new button.'"); |
32 |
button=arshell_optioned_button(container, arshell_system_cb, command); |
button = arshell_optioned_button (container, arshell_system_cb, command); |
33 |
free(command); |
free (command); |
34 |
return(button); |
return (button); |
35 |
} |
} |
36 |
|
|
37 |
Widget |
Widget |
38 |
arshell_add_predefined_appendage(Widget container, char *command) |
arshell_add_predefined_appendage (Widget container, char *command) |
39 |
{ |
{ |
40 |
return(arshell_optioned_button(container, arshell_system_cb, command)); |
return (arshell_optioned_button (container, arshell_system_cb, command)); |
41 |
} |
} |
42 |
|
|
43 |
void |
void |
44 |
arshell_appendage_append_callback(Widget caller, |
arshell_appendage_append_callback (Widget caller, |
45 |
XtPointer client, |
XtPointer client, XtPointer call) |
46 |
XtPointer call) |
{ |
47 |
{ |
arshell_add_appendage ((Widget) client); |
48 |
arshell_add_appendage((Widget)client); |
caller = NULL; |
49 |
caller=NULL; |
call = NULL; |
|
call=NULL; |
|
50 |
} |
} |
51 |
|
|
52 |
void |
void |
53 |
arshell_appendage_append_predefined_callback(Widget caller, |
arshell_appendage_append_predefined_callback (Widget caller, |
54 |
XtPointer client, XtPointer call) |
XtPointer client, |
55 |
|
XtPointer call) |
56 |
{ |
{ |
57 |
char *command; |
char *command; |
58 |
call=NULL; |
call = NULL; |
59 |
ARCLARG; |
ARCLARG; |
60 |
antiright_set(XmNlabelString, (XtArgVal)&command); |
antiright_set (XmNlabelString, (XtArgVal) & command); |
61 |
antiright_get_values(caller); |
antiright_get_values (caller); |
62 |
ARCLARG; |
ARCLARG; |
63 |
arshell_add_predefined_appendage((Widget)client, command); |
arshell_add_predefined_appendage ((Widget) client, command); |
64 |
XtFree(command); |
XtFree (command); |
65 |
} |
} |
66 |
|
|
67 |
Widget |
Widget |
68 |
arshell_add_predefined_appendage_button(Widget parent, |
arshell_add_predefined_appendage_button (Widget parent, |
69 |
Widget container, |
Widget container, char *command) |
|
char *command) |
|
70 |
{ |
{ |
71 |
Widget button; |
Widget button; |
72 |
button=antiright_button(parent, |
button = antiright_button (parent, |
73 |
command, |
command, |
74 |
arshell_appendage_append_predefined_callback, |
arshell_appendage_append_predefined_callback, |
75 |
(XtPointer)container); |
(XtPointer) container); |
76 |
antiright_label_string(button, command); |
antiright_label_string (button, command); |
77 |
return(button); |
return (button); |
78 |
} |
} |
79 |
|
|
80 |
Widget |
Widget |
81 |
arshell_add_appendage_button(Widget parent, Widget container) |
arshell_add_appendage_button (Widget parent, Widget container) |
82 |
{ |
{ |
83 |
Widget button; |
Widget button; |
84 |
button=antiright_button(parent, "Append", arshell_appendage_append_callback, |
button = |
85 |
(XtPointer)container); |
antiright_button (parent, "Append", arshell_appendage_append_callback, |
86 |
antiright_label_string(button, "Append..."); |
(XtPointer) container); |
87 |
return(button); |
antiright_label_string (button, "Append..."); |
88 |
|
return (button); |
89 |
} |
} |