Commit 83642cdd authored by claes's avatar claes

Collect clear and collect remove added to menu

parent 22a22267
/*
* Proview $Id: xtt_xnav.cpp,v 1.27 2005-11-22 12:17:19 claes Exp $
* Proview $Id: xtt_xnav.cpp,v 1.28 2006-03-31 14:40:51 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -822,6 +822,27 @@ int XNav::collect_show()
return 1;
}
int XNav::collect_remove()
{
if ( brow->ctx == collect_brow->ctx) {
brow_tNode *node_list;
int node_count;
brow_GetSelectedNodes( brow->ctx, &node_list, &node_count);
if ( node_count) {
for ( int i = 0; i < node_count; i++)
brow_DeleteNode( collect_brow->ctx, node_list[i]);
free( node_list);
return XNAV__SUCCESS;
}
else
return XNAV__NOSELECT;
}
return XNAV__NOTCOLLECTW;
}
void XNav::collect_clear()
{
brow_DeleteAll( collect_brow->ctx);
......
/*
* Proview $Id: xtt_xnav.h,v 1.15 2005-11-14 16:17:13 claes Exp $
* Proview $Id: xtt_xnav.h,v 1.16 2006-03-31 14:40:51 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -336,6 +336,7 @@ class XNav {
int get_all_objects( pwr_sAttrRef **attrref, int **is_attr);
int get_all_collect_objects( pwr_sAttrRef **attrref, int **is_attr);
int collect_insert( pwr_sAttrRef *attrref);
int collect_remove();
int collect_show();
void collect_clear();
void clear();
......
/*
* Proview $Id: xtt_xnav_command.cpp,v 1.26 2006-01-23 08:47:03 claes Exp $
* Proview $Id: xtt_xnav_command.cpp,v 1.27 2006-03-31 14:41:16 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -3617,6 +3617,14 @@ static int xnav_collect_func( void *client_data,
sts = xnav->collect_show();
return sts;
}
else if ( strncmp( arg1_str, "REMOVE", strlen( arg1_str)) == 0)
{
sts = xnav->collect_remove();
if ( EVEN(sts))
xnav->message(' ', XNav::get_message(sts));
return XNAV__SUCCESS;
}
else if ( strncmp( arg1_str, "CLEAR", strlen( arg1_str)) == 0)
{
xnav->collect_clear();
......
!
! Proview $Id: inc_xtt.uil,v 1.2 2006-02-01 15:10:09 claes Exp $
! Proview $Id: inc_xtt.uil,v 1.3 2006-03-31 14:41:55 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! Dieses Programm ist kostenlose Software, sie knnen es benutzen,
......@@ -39,8 +39,12 @@ c_Open_ClassGraph : compound_string("
c_Show_Crossreferences : compound_string("Zeige Verweise");
c_Change_Value : compound_string("ndere Wert");
c_Command : compound_string("Befehl");
c_Collect_insert : compound_string("Eingaben sammeln");
c_Collect_show : compound_string("Zeige gesammelte Eingaben");
c_Collect : compound_string("Collect");
c_Collect_insert : compound_string("Collect Einsatz");
c_Show : compound_string("Ansehen");
c_Insert : compound_string("Einsatz");
c_Remove : compound_string("Delete");
c_Clear : compound_string("Clear");
c_Advanced_user : compound_string("Fortgeschrittene Benutzer");
c_View : compound_string("Ansehen");
c_Zoom_in : compound_string("Heranzoomen");
......
!
! Proview $Id: inc_xtt.uil,v 1.10 2005-09-06 10:39:34 claes Exp $
! Proview $Id: inc_xtt.uil,v 1.11 2006-03-31 14:41:55 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
......@@ -36,8 +36,12 @@ c_Open_ClassGraph : compound_string("Open ClassGraph");
c_Show_Crossreferences : compound_string("Show Crossreferences");
c_Change_Value : compound_string("Change Value");
c_Command : compound_string("Command");
c_Collect_insert : compound_string("Collect insert");
c_Collect_show : compound_string("Collect show");
c_Collect : compound_string("Collect");
c_Collect_insert : compound_string("Collect Insert");
c_Show : compound_string("Show");
c_Insert : compound_string("Insert");
c_Remove : compound_string("Remove");
c_Clear : compound_string("Clear");
c_Advanced_user : compound_string("Advanced user");
c_View : compound_string("View");
c_Zoom_in : compound_string("Zoom in");
......
!
! Proview $Id: xtt.uil,v 1.3 2005-09-06 10:39:34 claes Exp $
! Proview $Id: xtt.uil,v 1.4 2006-03-31 14:41:55 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
......@@ -41,6 +41,8 @@ procedure
xtt_activate_change_value(integer);
xtt_activate_command(integer);
xtt_activate_collect_insert(integer);
xtt_activate_collect_remove(integer);
xtt_activate_collect_clear(integer);
xtt_activate_collect_show(integer);
xtt_activate_advanceduser(integer);
xtt_activate_zoom_in(integer);
......@@ -355,35 +357,82 @@ object functions_entry : XmCascadeButton
XmNactivateCallback = procedure xtt_activate_command(xtt_ctx);
};
};
XmPushButton
XmCascadeButton
{
arguments
arguments
{
XmNlabelString = c_Collect_insert;
XmNmnemonic = keysym('C');
XmNaccelerator = "Ctrl<Key>V";
XmNacceleratorText = compound_string('Ctrl+V');
XmNlabelString = c_Collect;
XmNmnemonic = keysym("C");
XmNfontList = menu_font;
};
callbacks
{
XmNactivateCallback = procedure xtt_activate_collect_insert(xtt_ctx);
};
};
XmPushButton
{
arguments
controls
{
XmNlabelString = c_Collect_show;
XmNmnemonic = keysym('s');
XmNaccelerator = "Ctrl<Key>N";
XmNacceleratorText = compound_string('Ctrl+N');
XmNfontList = menu_font;
XmPulldownMenu
{
arguments
{
};
controls
{
XmPushButton
{
arguments
{
XmNlabelString = c_Insert;
XmNmnemonic = keysym('I');
XmNaccelerator = "Ctrl<Key>V";
XmNacceleratorText = compound_string('Ctrl+V');
XmNfontList = menu_font;
};
callbacks
{
XmNactivateCallback = procedure xtt_activate_collect_insert(xtt_ctx);
};
};
XmPushButton
{
arguments
{
XmNlabelString = c_Show;
XmNmnemonic = keysym('s');
XmNaccelerator = "Ctrl<Key>N";
XmNacceleratorText = compound_string('Ctrl+N');
XmNfontList = menu_font;
};
callbacks
{
XmNactivateCallback = procedure xtt_activate_collect_show(xtt_ctx);
};
};
XmPushButton
{
arguments
{
XmNlabelString = c_Remove;
XmNmnemonic = keysym('r');
XmNfontList = menu_font;
};
callbacks
{
XmNactivateCallback = procedure xtt_activate_collect_remove(xtt_ctx);
};
};
XmPushButton
{
arguments
{
XmNlabelString = c_Clear;
XmNmnemonic = keysym('c');
XmNfontList = menu_font;
};
callbacks
{
XmNactivateCallback = procedure xtt_activate_collect_clear(xtt_ctx);
};
};
};
};
};
callbacks
{
XmNactivateCallback = procedure xtt_activate_collect_show(xtt_ctx);
};
};
XmPushButton
{
......
!
! Proview $Id: inc_xtt.uil,v 1.10 2005-09-06 10:39:35 claes Exp $
! Proview $Id: inc_xtt.uil,v 1.11 2006-03-31 14:41:55 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
......@@ -36,8 +36,12 @@ c_Open_ClassGraph : compound_string("
c_Show_Crossreferences : compound_string("Visa korsreferenser");
c_Change_Value : compound_string("ndra Vrde");
c_Command : compound_string("Kommando");
c_Collect_insert : compound_string("Addera till Samlingsbild");
c_Collect_show : compound_string("Visa Samlingsbild");
c_Collect : compound_string("Samlingsbild");
c_Collect_insert : compound_string("Addera till samlingsbild");
c_Show : compound_string("Visa");
c_Insert : compound_string("Addera");
c_Remove : compound_string("Ta bort");
c_Clear : compound_string("Tm");
c_Advanced_user : compound_string("Avancerad anvndare");
c_View : compound_string("Visa");
c_Zoom_in : compound_string("Zooma in");
......
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