Commit 5b82c618 authored by claes's avatar claes

Print methods command

parent 165b1a6e
/*
* Proview $Id: xtt_xnav.h,v 1.16 2006-03-31 14:40:51 claes Exp $
* Proview $Id: xtt_xnav.h,v 1.17 2006-04-12 12:19:08 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -431,6 +431,7 @@ class XNav {
int search_next();
int create_object( char *classname, char *name);
int delete_object( char *name);
void print_methods();
// Table module member functions
int show_plcthreads();
......
/*
* Proview $Id: xtt_xnav_command.cpp,v 1.27 2006-03-31 14:41:16 claes Exp $
* Proview $Id: xtt_xnav_command.cpp,v 1.28 2006-04-12 12:19:08 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -95,6 +95,8 @@ if ( !xnav->gbl.gdh_started)\
#define XNAV_MENU_CREATE 0
#define XNAV_MENU_ADD 1
pwr_dImport pwr_BindXttClasses(Base);
static char null_str[] = "";
static char xtt_version[] = "V3.3a";
static XNav *current_xnav;
......@@ -1841,6 +1843,11 @@ static int xnav_show_func( void *client_data,
brow_ResetNodraw( xnav->brow->ctx);
brow_Redraw( xnav->brow->ctx, 0);
}
else if ( strncmp( arg1_str, "METHODS", strlen( arg1_str)) == 0)
{
/* Command is "SHOW METHODS" */
xnav->print_methods();
}
else
{
/* This might be a system picture */
......@@ -6424,5 +6431,22 @@ int XNav::delete_object(
return XNAV__SUCCESS;
}
void XNav::print_methods()
{
int i, j;
printf( "Base Methods\n");
for (i = 0;; i++) {
if (pwr_gBase_XttClassMethods[i].ClassName[0] == '\0') break;
printf( "%3d %-20s\n", i, pwr_gBase_XttClassMethods[i].ClassName);
for (j = 0;; j++) {
if ((*pwr_gBase_XttClassMethods[i].Methods)[j].MethodName[0] == '\0')
break;
printf( " %s\n", (*pwr_gBase_XttClassMethods[i].Methods)[j].MethodName);
}
}
}
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