Commit a473d9de authored by claes's avatar claes

Modification of scantime implemented

parent 691e5a57
...@@ -151,7 +151,7 @@ static void trace_scan( tra_tCtx tractx) ...@@ -151,7 +151,7 @@ static void trace_scan( tra_tCtx tractx)
flow_TraceScan( tractx->flow_ctx); flow_TraceScan( tractx->flow_ctx);
tractx->trace_timerid = XtAppAddTimeOut( tractx->trace_timerid = XtAppAddTimeOut(
XtWidgetToApplicationContext(tractx->flow_widget) ,500, XtWidgetToApplicationContext(tractx->flow_widget), tractx->scan_time * 1000,
(XtTimerCallbackProc)trace_scan, tractx); (XtTimerCallbackProc)trace_scan, tractx);
} }
} }
...@@ -398,6 +398,31 @@ static void tra_activate_zoomreset( Widget w, tra_tCtx tractx, XmAnyCallbackStru ...@@ -398,6 +398,31 @@ static void tra_activate_zoomreset( Widget w, tra_tCtx tractx, XmAnyCallbackStru
flow_UnZoom( tractx->flow_ctx); flow_UnZoom( tractx->flow_ctx);
} }
static void tra_activate_scantime1( Widget w, tra_tCtx tractx, XmAnyCallbackStruct *data)
{
tractx->scan_time = 0.5;
}
static void tra_activate_scantime2( Widget w, tra_tCtx tractx, XmAnyCallbackStruct *data)
{
tractx->scan_time = 0.2;
}
static void tra_activate_scantime3( Widget w, tra_tCtx tractx, XmAnyCallbackStruct *data)
{
tractx->scan_time = 0.1;
}
static void tra_activate_scantime4( Widget w, tra_tCtx tractx, XmAnyCallbackStruct *data)
{
tractx->scan_time = 0.05;
}
static void tra_activate_scantime5( Widget w, tra_tCtx tractx, XmAnyCallbackStruct *data)
{
tractx->scan_time = 0.02;
}
static void tra_activate_help( Widget w, tra_tCtx tractx, XmAnyCallbackStruct *data) static void tra_activate_help( Widget w, tra_tCtx tractx, XmAnyCallbackStruct *data)
{ {
if ( tractx->help_cb) if ( tractx->help_cb)
...@@ -1153,6 +1178,11 @@ tra_tCtx trace_new( void *parent_ctx, ...@@ -1153,6 +1178,11 @@ tra_tCtx trace_new( void *parent_ctx,
{"tra_activate_zoomin",(caddr_t)tra_activate_zoomin }, {"tra_activate_zoomin",(caddr_t)tra_activate_zoomin },
{"tra_activate_zoomout",(caddr_t)tra_activate_zoomout }, {"tra_activate_zoomout",(caddr_t)tra_activate_zoomout },
{"tra_activate_zoomreset",(caddr_t)tra_activate_zoomreset }, {"tra_activate_zoomreset",(caddr_t)tra_activate_zoomreset },
{"tra_activate_scantime1",(caddr_t)tra_activate_scantime1 },
{"tra_activate_scantime2",(caddr_t)tra_activate_scantime2 },
{"tra_activate_scantime3",(caddr_t)tra_activate_scantime3 },
{"tra_activate_scantime4",(caddr_t)tra_activate_scantime4 },
{"tra_activate_scantime5",(caddr_t)tra_activate_scantime5 },
{"tra_activate_help",(caddr_t)tra_activate_help }, {"tra_activate_help",(caddr_t)tra_activate_help },
{"tra_activate_helpplc",(caddr_t)tra_activate_helpplc }, {"tra_activate_helpplc",(caddr_t)tra_activate_helpplc },
{"tra_create_form",(caddr_t)tra_create_form }, {"tra_create_form",(caddr_t)tra_create_form },
...@@ -1211,6 +1241,7 @@ tra_tCtx trace_new( void *parent_ctx, ...@@ -1211,6 +1241,7 @@ tra_tCtx trace_new( void *parent_ctx,
tractx->display_object_cb = display_object_cb; tractx->display_object_cb = display_object_cb;
tractx->collect_insert_cb = collect_insert_cb; tractx->collect_insert_cb = collect_insert_cb;
tractx->is_authorized_cb = is_authorized_cb; tractx->is_authorized_cb = is_authorized_cb;
tractx->scan_time = 0.5;
reglist[0].value = (caddr_t) tractx; reglist[0].value = (caddr_t) tractx;
tractx->toplevel = XtCreatePopupShell( name, tractx->toplevel = XtCreatePopupShell( name,
......
...@@ -44,6 +44,7 @@ struct tra_sCtx{ ...@@ -44,6 +44,7 @@ struct tra_sCtx{
flow_tCtx flow_ctx; flow_tCtx flow_ctx;
flow_tNode trace_changenode; flow_tNode trace_changenode;
pwr_tObjid objid; pwr_tObjid objid;
double scan_time;
void (*close_cb) (tra_tCtx); void (*close_cb) (tra_tCtx);
void (*help_cb) (tra_tCtx, char *); void (*help_cb) (tra_tCtx, char *);
void (*subwindow_cb) (void *parent_ctx, pwr_tObjid objid); void (*subwindow_cb) (void *parent_ctx, pwr_tObjid objid);
......
...@@ -35,6 +35,11 @@ procedure ...@@ -35,6 +35,11 @@ procedure
tra_activate_zoomin(integer); tra_activate_zoomin(integer);
tra_activate_zoomout(integer); tra_activate_zoomout(integer);
tra_activate_zoomreset(integer); tra_activate_zoomreset(integer);
tra_activate_scantime1(integer);
tra_activate_scantime2(integer);
tra_activate_scantime3(integer);
tra_activate_scantime4(integer);
tra_activate_scantime5(integer);
tra_activate_help(integer); tra_activate_help(integer);
tra_activate_helpplc(integer); tra_activate_helpplc(integer);
tra_create_form(integer); tra_create_form(integer);
...@@ -328,6 +333,87 @@ object view_entry : XmCascadeButton ...@@ -328,6 +333,87 @@ object view_entry : XmCascadeButton
XmNactivateCallback = procedure tra_activate_zoomreset(tra_ctx); XmNactivateCallback = procedure tra_activate_zoomreset(tra_ctx);
}; };
}; };
XmCascadeButton
{
arguments
{
XmNlabelString = compound_string("ScanTime");
XmNfontList = menu_font;
};
callbacks
{
! MrmNcreateCallback = procedure ute_create_batchoptmenu( ute_ctx) ;
};
controls
{
XmPulldownMenu
{
controls
{
XmPushButton
{
arguments
{
XmNlabelString = compound_string("0.50");
XmNfontList = menu_font;
};
callbacks
{
XmNactivateCallback = procedure tra_activate_scantime1(tra_ctx);
};
};
XmPushButton
{
arguments
{
XmNlabelString = compound_string("0.20");
XmNfontList = menu_font;
};
callbacks
{
XmNactivateCallback = procedure tra_activate_scantime2(tra_ctx);
};
};
XmPushButton
{
arguments
{
XmNlabelString = compound_string("0.10");
XmNfontList = menu_font;
};
callbacks
{
XmNactivateCallback = procedure tra_activate_scantime3(tra_ctx);
};
};
XmPushButton
{
arguments
{
XmNlabelString = compound_string("0.05");
XmNfontList = menu_font;
};
callbacks
{
XmNactivateCallback = procedure tra_activate_scantime4(tra_ctx);
};
};
XmPushButton
{
arguments
{
XmNlabelString = compound_string("0.02");
XmNfontList = menu_font;
};
callbacks
{
XmNactivateCallback = procedure tra_activate_scantime5(tra_ctx);
};
};
};
};
};
};
}; };
}; };
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment