home *** CD-ROM | disk | FTP | other *** search
- #include "xsignal.h"
-
- XtActionsRec canvas_actions[] =
- {
- { "Event", (XtActionProc)canvas_selected },
- { "Expose", (XtActionProc)canvas_exposed },
- };
-
- /*
- static String canvas_translations =
- "<Motion>:Event()\n\
- <Btn1Down>:Event()\n\
- <Btn2Down>:Event()\n\
- <Btn3Down>:Event()\n\
- <Key>:Event()\n\
- <Expose>:Expose()\n";
- */
- static String canvas_translations =
- "<Btn1Down>:Event()\n\
- <Btn2Down>:Event()\n\
- <Btn3Down>:Event()\n\
- <Key>:Event()\n\
- <Expose>:Expose()\n";
-
- void init_canvas(pane)
- sigbox *pane;
- {
- static XtCallbackRec callback[2]; /* K&R: initialized to NULL */
- static XtCallbackRec thumbcall[2]; /* K&R: initialized to NULL */
- float shown,top;
- Widget box;
- int narg;
- Arg arg[10];
-
- narg = 0;
- XtSetArg( arg[narg], XtNwidth, WIDTH ); narg++;
- XtSetArg( arg[narg], XtNheight, CHEIGHT ); narg++;
- XtSetArg( arg[narg], XtNlabel, ""); narg++;
- XtSetArg( arg[narg], XtNsensitive, False ); narg++;
- pane->canvas = XtCreateManagedWidget( "label", labelWidgetClass,
- pane->outer, arg, narg );
- XtAddActions(canvas_actions, XtNumber(canvas_actions));
- XtOverrideTranslations(pane->canvas,
- XtParseTranslationTable(canvas_translations));
- }
-