Commit 294d9235 authored by claes's avatar claes

Function to remove trace objects added

parent e7b9069a
......@@ -303,6 +303,14 @@ static void tra_activate_restoretrace( Widget w, tra_tCtx tractx, XmAnyCallbackS
flow_OpenTrace( tractx->flow_ctx, filename);
}
static void tra_activate_cleartrace( Widget w, tra_tCtx tractx, XmAnyCallbackStruct *data)
{
if ( !tractx->trace_started)
return;
flow_RemoveTraceObjects( tractx->flow_ctx);
}
static void tra_activate_display_object( Widget w, tra_tCtx tractx, XmAnyCallbackStruct *data)
{
flow_tObject node;
......@@ -1313,6 +1321,7 @@ tra_tCtx trace_new( void *parent_ctx,
{"tra_activate_print",(caddr_t)tra_activate_print },
{"tra_activate_savetrace",(caddr_t)tra_activate_savetrace },
{"tra_activate_restoretrace",(caddr_t)tra_activate_restoretrace },
{"tra_activate_cleartrace",(caddr_t)tra_activate_cleartrace },
{"tra_activate_trace",(caddr_t)tra_activate_trace },
{"tra_activate_display_object",(caddr_t)tra_activate_display_object },
{"tra_activate_open_object",(caddr_t)tra_activate_open_object },
......
......@@ -71,6 +71,7 @@ c_Help_on_selected_msg : compound_string("Help on selected message");
c_SaveTrace : compound_string("SaveTrace");
c_RestoreTrace : compound_string("RestoreTrace");
c_ClearTrace : compound_string("ClearTrace");
c_Mode : compound_string("Mode");
c_Trace : compound_string("Trace");
c_Simulate : compound_string("Simulate");
......
......@@ -24,6 +24,7 @@ procedure
tra_activate_print(integer);
tra_activate_savetrace(integer);
tra_activate_restoretrace(integer);
tra_activate_cleartrace(integer);
tra_activate_display_object(integer);
tra_activate_open_object(integer);
tra_activate_show_cross(integer);
......@@ -166,6 +167,18 @@ object file_entry : XmCascadeButton
};
};
XmPushButton
{
arguments
{
XmNlabelString = c_ClearTrace;
XmNfontList = menu_font;
};
callbacks
{
XmNactivateCallback = procedure tra_activate_cleartrace(tra_ctx);
};
};
XmPushButton
{
arguments
{
......
......@@ -71,6 +71,7 @@ c_Help_on_selected_msg : compound_string("Hj
c_SaveTrace : compound_string("Spara Trace");
c_RestoreTrace : compound_string("terskapa Trace");
c_ClearTrace : compound_string("Rensa Trace");
c_Mode : compound_string("Mod");
c_Trace : compound_string("Trace");
c_Simulate : compound_string("Simulera");
......
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