CAD-ProEngineer
view release on metacpan or search on metacpan
ProEngineer.pm view on Meta::CPAN
ProMdlWindowGet()
ProMessageClear()
ProMessageDisplay()
ProMessageDoubleRead()
ProMessageIntegerRead()
ProMessagePasswordRead()
ProMessageStringRead()
ProCmdActionAdd()
ProMenubarmenuPushbuttonAdd()
ProDimensionInit()
ProDimensionSymbolGet()
ProDimensionValueGet()
ProSolidDimensionVisit()
ProModelitemInit()
ProModelitemMdlGet()
ProParameterInit()
ProEngineer.xs view on Meta::CPAN
*/
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "ProToolkit.h"
#include "ProUtil.h"
#include "ProMenu.h"
#include "ProMenuBar.h"
#include "ProUICmd.h"
#include "ProParameter.h"
#include "ProDimension.h"
/* bless_safefree()
Generates a blessed object from a pointer. Will mark the object for
use with Safefree() if 'add_safefree' is TRUE. The object is compatible
ProEngineer.xs view on Meta::CPAN
module_cb_hv = get_hv("CAD::ProEngineer::Callbacks", TRUE);
if (module_cb_hv == NULL) { printf("module_cb_hv is NULL\n"); } else { /* printf("module_cb_hv ok\n"); */ }
/* Store uiCmdCmdActFn ref in "Callbacks" hash under key: "uiCmdCmdActFn" */
/* */
hv_store(module_cb_hv, uiCmdCmdActFn_hv_key, strlen(uiCmdCmdActFn_hv_key), SvREFCNT_inc(rv_uiCmdCmdActFn_hv), 0);
void
ProMenubarmenuPushbuttonAdd(...)
INIT:
int item_idx = 0, total_items = 0;
char *menu_name, *button_name, *button_label, *button_help, *neighbor;
int add_after_neighbor;
uiCmdCmdId cmd_id;
ProFileName msg_file_wstr;
ProError err;
PPCODE:
/* Determine if OO calling syntax */
/* */
ProEngineer.xs view on Meta::CPAN
menu_name = SvPV_nolen(ST(item_idx));
button_name = SvPV_nolen(ST(item_idx+1));
button_label = SvPV_nolen(ST(item_idx+2));
button_help = SvPV_nolen(ST(item_idx+3));
neighbor = SvPV_nolen(ST(item_idx+4));
add_after_neighbor = SvIV(ST(item_idx+5));
cmd_id = INT2PTR(uiCmdCmdId,SvIV(ST(item_idx+6)));
ProStringToWstring(msg_file_wstr, SvPV_nolen(ST(item_idx+7)));
/* printf("cmd_id: %d\n", cmd_id); */
err = ProMenubarmenuPushbuttonAdd(menu_name, button_name, button_label, button_help,
neighbor, add_after_neighbor, cmd_id, msg_file_wstr);
if (GIMME_V != G_VOID) {
/* return err */
XPUSHs(sv_2mortal(newSViv(err)));
}
void
ProParameterInit(...)
PROTKDAT protk-properl.dat
trail_dir trail
mapkey a ~ Select `main_dlg_cur` `MenuBar1`1 `Utilities`;\
~ Close `main_dlg_cur` `MenuBar1`;\
~ Activate `main_dlg_cur` `Stuff`;
mapkey b %a;%a;%a;%a;%a;%a;%a;%a;%a;%a;%a;%a;%a;%a;%a;%a;%a;
mapkey c %b;%b;%b;%b;%b;%b;%b;%b;%b;%b;%b;%b;%b;%b;%b;%b;%b;
mapkey d %c;%c;%c;%c;%c;%c;%c;%c;%c;%c;%c;%c;%c;%c;%c;%c;%c;
mapkey e %d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;
mapkey h ~ Select `main_dlg_cur` `MenuBar1`1 `Utilities`;\
~ Close `main_dlg_cur` `MenuBar1`;\
~ Activate `main_dlg_cur` `Utilities.psh_util_aux`;\
~ Activate `aux_apps` `CloseBtn`;
mapkey i %h;%h;%h;%h;%h;%h;%h;%h;%h;%h;%h;%h;%h;%h;%h;%h;%h;
mapkey j %i;%i;%i;%i;%i;%i;%i;%i;%i;%i;%i;%i;%i;%i;%i;%i;%i;
mapkey k %j;%j;%j;%j;%j;%j;%j;%j;%j;%j;%j;%j;%j;%j;%j;%j;%j;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
mapkey s1 \
~ Select `main_dlg_cur` `MenuBar1`1 `Utilities`;\
~ Close `main_dlg_cur` `MenuBar1`;\
~ Activate `main_dlg_cur` `Stuff`;
mapkey s2 \
%s1;%s1;%s1;%s1;%s1;%s1;%s1;%s1;%s1;%s1;
mapkey s3 \
%s2;%s2;%s2;%s2;%s2;%s2;%s2;%s2;%s2;%s2;
mapkey s4 \
%s3;%s3;%s3;%s3;%s3;%s3;%s3;%s3;%s3;%s3;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
mapkey d1 \
~ Select `main_dlg_cur` `MenuBar1`1 `Utilities`;\
~ Close `main_dlg_cur` `MenuBar1`;\
mapkey d2 \
%d1;%d1;%d1;%d1;%d1;%d1;%d1;%d1;%d1;%d1;
mapkey d3 \
%d2;%d2;%d2;%d2;%d2;%d2;%d2;%d2;%d2;%d2;
mapkey d4 \
%d3;%d3;%d3;%d3;%d3;%d3;%d3;%d3;%d3;%d3;
#
my($test) = 1;
$ui_err = $o->ProCmdActionAdd("Stuff", sub { display_model_info(\$test) },
$o->uiProeImmediate, $o->ACCESS_AVAILABLE,
$o->PRO_B_TRUE, $o->PRO_B_TRUE, $cmd_id);
# Registering UICmdAction on the "Utilities" menu.
#
$ui_err = $o->ProMenubarmenuPushbuttonAdd("Utilities", "Stuff", "Stuff",
"Special stuff commands",
"Utilities.psh_util_aux",
$o->PRO_B_TRUE, $cmd_id,
"msg_file.txt");
}
# END blocks are not executed when the interpreter shuts down
#
( run in 0.877 second using v1.01-cache-2.11-cpan-49f99fa48dc )