Lines 3211-3217
Link Here
|
3211 |
XtAddCallback(but1, XtNcallback, |
3211 |
XtAddCallback(but1, XtNcallback, |
3212 |
(XtCallbackProc) grab_button, (XtPointer) NULL); |
3212 |
(XtCallbackProc) grab_button, (XtPointer) NULL); |
3213 |
|
3213 |
|
3214 |
if ( cur_image_editor != NULL && *cur_image_editor != (char) NULL) { |
3214 |
if ( cur_image_editor != NULL && *cur_image_editor != '\0' ) { |
3215 |
FirstArg(XtNlabel,"Edit Image"); |
3215 |
FirstArg(XtNlabel,"Edit Image"); |
3216 |
NextArg(XtNfromHoriz, but1); |
3216 |
NextArg(XtNfromHoriz, but1); |
3217 |
NextArg(XtNfromVert, label); |
3217 |
NextArg(XtNfromVert, label); |
Lines 3501-3507
Link Here
|
3501 |
{ |
3501 |
{ |
3502 |
Widget but_spline[3]; |
3502 |
Widget but_spline[3]; |
3503 |
Dimension label_height, label_width; |
3503 |
Dimension label_height, label_width; |
3504 |
int i, dist; |
3504 |
int i, dist; |
3505 |
|
3505 |
|
3506 |
static char use_item[]="Edit the behavior\nof the control point"; |
3506 |
static char use_item[]="Edit the behavior\nof the control point"; |
3507 |
|
3507 |
|
Lines 3598-3604
Link Here
|
3598 |
below = but_spline[i] = XtCreateManagedWidget(sfactor_type[i].label, |
3598 |
below = but_spline[i] = XtCreateManagedWidget(sfactor_type[i].label, |
3599 |
commandWidgetClass, form, Args, ArgCount); |
3599 |
commandWidgetClass, form, Args, ArgCount); |
3600 |
XtAddCallback(but_spline[i], XtNcallback, |
3600 |
XtAddCallback(but_spline[i], XtNcallback, |
3601 |
(XtCallbackProc) toggle_sfactor_type, (XtPointer) i); |
3601 |
(XtCallbackProc) toggle_sfactor_type, (XtPointer) (intptr_t) i); |
3602 |
XtSetArg(Args[0], XtNfromVert, below); /* here are the direct */ |
3602 |
XtSetArg(Args[0], XtNfromVert, below); /* here are the direct */ |
3603 |
XtSetArg(Args[1], XtNvertDistance, 3 * dist); /* accesses to Args */ |
3603 |
XtSetArg(Args[1], XtNvertDistance, 3 * dist); /* accesses to Args */ |
3604 |
} |
3604 |
} |
Lines 3608-3614
Link Here
|
3608 |
static void |
3608 |
static void |
3609 |
toggle_sfactor_type(Widget panel_local, XtPointer _sfactor_index, XtPointer call_data) |
3609 |
toggle_sfactor_type(Widget panel_local, XtPointer _sfactor_index, XtPointer call_data) |
3610 |
{ |
3610 |
{ |
3611 |
int sfactor_index = (int) _sfactor_index; |
3611 |
int sfactor_index = (int) (intptr_t) _sfactor_index; |
3612 |
|
3612 |
|
3613 |
update_sfactor_value(sfactor_type[sfactor_index].value); |
3613 |
update_sfactor_value(sfactor_type[sfactor_index].value); |
3614 |
XawScrollbarSetThumb(sfactor_bar, |
3614 |
XawScrollbarSetThumb(sfactor_bar, |
Lines 3629-3638
Link Here
|
3629 |
static void |
3629 |
static void |
3630 |
scroll_sfactor_value(Widget panel_local, XtPointer closure, XtPointer _num_pixels) |
3630 |
scroll_sfactor_value(Widget panel_local, XtPointer closure, XtPointer _num_pixels) |
3631 |
{ |
3631 |
{ |
3632 |
int *num_pixels = (int *) _num_pixels; |
3632 |
int num_pixels = (int) (intptr_t) _num_pixels; |
3633 |
|
3633 |
|
3634 |
update_sfactor_value(sub_sfactor->s + |
3634 |
update_sfactor_value(sub_sfactor->s + |
3635 |
(STEP_VALUE * SFACTOR_SIGN((int) num_pixels))); |
3635 |
(STEP_VALUE * SFACTOR_SIGN(num_pixels))); |
3636 |
XawScrollbarSetThumb(panel_local, SFACTOR_TO_PERCENTAGE(sub_sfactor->s), |
3636 |
XawScrollbarSetThumb(panel_local, SFACTOR_TO_PERCENTAGE(sub_sfactor->s), |
3637 |
THUMB_H); |
3637 |
THUMB_H); |
3638 |
} |
3638 |
} |
Lines 4031-4037
Link Here
|
4031 |
Widget |
4031 |
Widget |
4032 |
color_selection_panel(char *label, char *wname, char *name, Widget parent, Widget below, Widget beside, Widget *button, Widget *popup, int color, XtCallbackProc callback) |
4032 |
color_selection_panel(char *label, char *wname, char *name, Widget parent, Widget below, Widget beside, Widget *button, Widget *popup, int color, XtCallbackProc callback) |
4033 |
{ |
4033 |
{ |
4034 |
|
|
|
4035 |
FirstArg(XtNfromVert, below); |
4034 |
FirstArg(XtNfromVert, below); |
4036 |
NextArg(XtNborderWidth, 0); |
4035 |
NextArg(XtNborderWidth, 0); |
4037 |
NextArg(XtNtop, XtChainBottom); |
4036 |
NextArg(XtNtop, XtChainBottom); |
Lines 4057-4063
Link Here
|
4057 |
* callback |
4056 |
* callback |
4058 |
*/ |
4057 |
*/ |
4059 |
/* also set the label */ |
4058 |
/* also set the label */ |
4060 |
(callback)(below, (XtPointer) color, NULL); |
4059 |
(callback)(below, (XtPointer) (intptr_t) color, NULL); |
4061 |
*popup = make_color_popup_menu(below, name, callback, NO_TRANSP, NO_BACKG); |
4060 |
*popup = make_color_popup_menu(below, name, callback, NO_TRANSP, NO_BACKG); |
4062 |
|
4061 |
|
4063 |
return *button; |
4062 |
return *button; |
Lines 4658-4664
Link Here
|
4658 |
int ival; |
4657 |
int ival; |
4659 |
double val; |
4658 |
double val; |
4660 |
|
4659 |
|
4661 |
new_points_units = (int) new_unit; |
4660 |
new_points_units = (int) (intptr_t) new_unit; |
4662 |
if (points_units == new_points_units) |
4661 |
if (points_units == new_points_units) |
4663 |
return; |
4662 |
return; |
4664 |
|
4663 |
|
Lines 4739-4745
Link Here
|
4739 |
FirstArg(XtNlabel, XtName(w)); |
4738 |
FirstArg(XtNlabel, XtName(w)); |
4740 |
SetValues(arc_type_panel); |
4739 |
SetValues(arc_type_panel); |
4741 |
|
4740 |
|
4742 |
generic_vals.arc_type = (int) new_style; |
4741 |
generic_vals.arc_type = (int) (intptr_t) new_style; |
4743 |
/* if now a pie-wedge type, make the arrow panels insensitive */ |
4742 |
/* if now a pie-wedge type, make the arrow panels insensitive */ |
4744 |
if (generic_vals.arc_type == T_PIE_WEDGE_ARC) { |
4743 |
if (generic_vals.arc_type == T_PIE_WEDGE_ARC) { |
4745 |
/* unmanage arrow forms */ |
4744 |
/* unmanage arrow forms */ |
Lines 4865-4871
Link Here
|
4865 |
static void |
4864 |
static void |
4866 |
pen_color_select(Widget w, XtPointer new_color, XtPointer call_data) |
4865 |
pen_color_select(Widget w, XtPointer new_color, XtPointer call_data) |
4867 |
{ |
4866 |
{ |
4868 |
pen_color = (Color) new_color; |
4867 |
pen_color = (Color) (intptr_t) new_color; |
4869 |
color_select(pen_col_button, pen_color); |
4868 |
color_select(pen_col_button, pen_color); |
4870 |
if (pen_color_popup) { |
4869 |
if (pen_color_popup) { |
4871 |
XtPopdown(pen_color_popup); |
4870 |
XtPopdown(pen_color_popup); |
Lines 4875-4881
Link Here
|
4875 |
static void |
4874 |
static void |
4876 |
fill_color_select(Widget w, XtPointer new_color, XtPointer call_data) |
4875 |
fill_color_select(Widget w, XtPointer new_color, XtPointer call_data) |
4877 |
{ |
4876 |
{ |
4878 |
fill_color = (Color) new_color; |
4877 |
fill_color = (Color) (intptr_t) new_color; |
4879 |
color_select(fill_col_button, fill_color); |
4878 |
color_select(fill_col_button, fill_color); |
4880 |
if (fill_color_popup) { |
4879 |
if (fill_color_popup) { |
4881 |
XtPopdown(fill_color_popup); |
4880 |
XtPopdown(fill_color_popup); |
Lines 4927-4933
Link Here
|
4927 |
{ |
4926 |
{ |
4928 |
FirstArg(XtNlabel, XtName(w)); |
4927 |
FirstArg(XtNlabel, XtName(w)); |
4929 |
SetValues(hidden_text_panel); |
4928 |
SetValues(hidden_text_panel); |
4930 |
hidden_text_flag = (int) new_hidden_text; |
4929 |
hidden_text_flag = (int) (intptr_t) new_hidden_text; |
4931 |
} |
4930 |
} |
4932 |
|
4931 |
|
4933 |
static void |
4932 |
static void |
Lines 4935-4941
Link Here
|
4935 |
{ |
4934 |
{ |
4936 |
FirstArg(XtNlabel, XtName(w)); |
4935 |
FirstArg(XtNlabel, XtName(w)); |
4937 |
SetValues(rigid_text_panel); |
4936 |
SetValues(rigid_text_panel); |
4938 |
rigid_text_flag = (int) new_rigid_text; |
4937 |
rigid_text_flag = (int) (intptr_t) new_rigid_text; |
4939 |
} |
4938 |
} |
4940 |
|
4939 |
|
4941 |
static void |
4940 |
static void |
Lines 4943-4949
Link Here
|
4943 |
{ |
4942 |
{ |
4944 |
FirstArg(XtNlabel, XtName(w)); |
4943 |
FirstArg(XtNlabel, XtName(w)); |
4945 |
SetValues(special_text_panel); |
4944 |
SetValues(special_text_panel); |
4946 |
special_text_flag = (int) new_special_text; |
4945 |
special_text_flag = (int) (intptr_t) new_special_text; |
4947 |
} |
4946 |
} |
4948 |
|
4947 |
|
4949 |
static void |
4948 |
static void |
Lines 4951-4957
Link Here
|
4951 |
{ |
4950 |
{ |
4952 |
FirstArg(XtNlabel, XtName(w)); |
4951 |
FirstArg(XtNlabel, XtName(w)); |
4953 |
SetValues(textjust_panel); |
4952 |
SetValues(textjust_panel); |
4954 |
textjust = (int) new_textjust; |
4953 |
textjust = (int) (intptr_t) new_textjust; |
4955 |
} |
4954 |
} |
4956 |
|
4955 |
|
4957 |
static void |
4956 |
static void |
Lines 4963-4969
Link Here
|
4963 |
|
4962 |
|
4964 |
FirstArg(XtNlabel, XtName(w)); |
4963 |
FirstArg(XtNlabel, XtName(w)); |
4965 |
SetValues(flip_pic_panel); |
4964 |
SetValues(flip_pic_panel); |
4966 |
flip_pic_flag = (int) new_flipflag; |
4965 |
flip_pic_flag = (int) (intptr_t) new_flipflag; |
4967 |
p1.x = panel_get_dim_value(x1_panel); |
4966 |
p1.x = panel_get_dim_value(x1_panel); |
4968 |
p1.y = panel_get_dim_value(y1_panel); |
4967 |
p1.y = panel_get_dim_value(y1_panel); |
4969 |
p2.x = panel_get_dim_value(x2_panel); |
4968 |
p2.x = panel_get_dim_value(x2_panel); |
Lines 4996-5002
Link Here
|
4996 |
FirstArg(XtNlabel, XtName(w)); |
4995 |
FirstArg(XtNlabel, XtName(w)); |
4997 |
SetValues(rotation_panel); |
4996 |
SetValues(rotation_panel); |
4998 |
/* get new rotation (0 = 0 degrees, 1 = 90, 2 = 180, 3 = 270) */ |
4997 |
/* get new rotation (0 = 0 degrees, 1 = 90, 2 = 180, 3 = 270) */ |
4999 |
rotation = (int) new_rotation; |
4998 |
rotation = (int) (intptr_t) new_rotation; |
5000 |
|
4999 |
|
5001 |
/* get the two opposite corners */ |
5000 |
/* get the two opposite corners */ |
5002 |
p1.x = panel_get_dim_value(x1_panel); |
5001 |
p1.x = panel_get_dim_value(x1_panel); |
Lines 5104-5110
Link Here
|
5104 |
|
5103 |
|
5105 |
FirstArg(XtNlabel, XtName(w)); |
5104 |
FirstArg(XtNlabel, XtName(w)); |
5106 |
SetValues(fill_style_button); |
5105 |
SetValues(fill_style_button); |
5107 |
fill_flag = (int) new_fillflag; |
5106 |
fill_flag = (int) (intptr_t) new_fillflag; |
5108 |
|
5107 |
|
5109 |
if (fill_flag == 0) { |
5108 |
if (fill_flag == 0) { |
5110 |
/* no fill; blank out fill density value and pattern */ |
5109 |
/* no fill; blank out fill density value and pattern */ |