点击查看详细介绍

批量改参数无法得到所有刀具名

hedg VIP会员 4月前 375 1

UG NX 二次开发 技术交流 qq群:641226372      UG二次开发(C、C#、WPF)




/* These include files are needed for the following template code. */

#include <cstdio>

#include <cstring>

#include <io.h>

#include <fstream>

#include <iostream>

#include <stdarg.h>

#include <stdio.h>

#include <string.h>

#include <sstream>

#include <NXSigningResource.cpp>

#include <uf.h>

#include <uf_cam.h>

#include <UF_CAMGEOM.h>

#include <UF_CUTTER.h>

#include <uf_defs.h>

#include <uf_exit.h>

#include <uf_mb.h>

#include <uf_modl.h>

#include <uf_modl_error.h>

#include <uf_ncgroup.h>

#include <uf_obj.h>

#include <UF_OPER.h>

#include <uf_part.h>

#include <uf_setup.h>

#include <uf_styler.h>

#include <uf_param.h>

#include <uf_param_indices.h > //有关操作参数

#include <uf_ui.h>

#include <uf_ui_ont.h>

#include <uf_ui_types.h>

#include <UF_UI_PARAM.h>

#include <algorithm>

#include "PLGGCX.h"

using namespace std;



/* The following definition defines the number of callback entries */

/* in the callback structure: */

/* UF_STYLER_callback_info_t M_cbs */

#define M_CB_COUNT ( 21 + 1 ) /* Add 1 for the terminator */

/*--------------------------------------------------------------------------

The following structure defines the callback entries used by the

styler file. This structure MUST be passed into the user function,

UF_STYLER_create_dialog along with M_CB_COUNT.

--------------------------------------------------------------------------*/

static UF_STYLER_callback_info_t M_cbs[M_CB_COUNT] =

{

{UF_STYLER_DIALOG_INDEX, UF_STYLER_CONSTRUCTOR_CB , 0, M_ZH_GZ_CB},

{UF_STYLER_DIALOG_INDEX, UF_STYLER_DESTRUCTOR_CB , 0, M_ZH_DE_CB},

{UF_STYLER_DIALOG_INDEX, UF_STYLER_OK_CB , 0, M_ZH_OK_CB},

{UF_STYLER_DIALOG_INDEX, UF_STYLER_APPLY_CB , 0, M_ZH_apply_cb},

{UF_STYLER_DIALOG_INDEX, UF_STYLER_CANCEL_CB , 0, M_ZH_NO_CB},

{UF_STYLER_DIALOG_INDEX, UF_STYLER_FILEOP_CB , 0, M_ZH_WJQJ_CB},

{M_TOGGLE_0 , UF_STYLER_VALUE_CHANGED_CB, 0, M_HJ_PNAME_1_CB},

{M_TOGGLE_1 , UF_STYLER_VALUE_CHANGED_CB, 0, M_HJ_PNAME_2_CB},

{M_STR_1 , UF_STYLER_ACTIVATE_CB , 1, M_HJ_PNAME_3_CB},

{M_OPTION_0 , UF_STYLER_ACTIVATE_CB , 1, M_HJ_PNAME_4_CB},

{M_INT_1 , UF_STYLER_ACTIVATE_CB , 1, M_HJ_PNAME_5_CB},

{M_INT_2 , UF_STYLER_ACTIVATE_CB , 1, M_HJ_PNAME_6_CB},

{M_TOGGLE_3 , UF_STYLER_VALUE_CHANGED_CB, 0, M_HJ_PNAME_7_CB},

{M_OPTION_1 , UF_STYLER_ACTIVATE_CB , 1, M_HJ_PNAME_8_CB},

{M_REAL_0 , UF_STYLER_ACTIVATE_CB , 1, M_HJ_PNAME_9_CB},

{M_REAL_1 , UF_STYLER_ACTIVATE_CB , 1, M_HJ_PNAME_10_CB},

{M_TOGGLE_4 , UF_STYLER_VALUE_CHANGED_CB, 0, M_HJ_PNAME_11_CB},

{M_REAL_2 , UF_STYLER_ACTIVATE_CB , 1, M_HJ_PNAME_12_CB},

{M_REAL_3 , UF_STYLER_ACTIVATE_CB , 1, M_HJ_PNAME_13_CB},

{M_TOGGLE_5 , UF_STYLER_VALUE_CHANGED_CB, 0, M_HJ_PNAME_14_CB},

{M_OPTION_2 , UF_STYLER_ACTIVATE_CB , 1, M_HJ_PNAME_15_CB},

{UF_STYLER_NULL_OBJECT, UF_STYLER_NO_CB, 0, 0 }

};




/*--------------------------------------------------------------------------

UF_MB_styler_actions_t contains 4 fields. These are defined as follows:

Field 1 : the name of your dialog that you wish to display.

Field 2 : any client data you wish to pass to your callbacks.

Field 3 : your callback structure.

Field 4 : flag to inform menubar of your dialog location. This flag MUST

match the resource set in your dialog! Do NOT ASSUME that changing

this field will update the location of your dialog. Please use the

UIStyler to indicate the position of your dialog.

--------------------------------------------------------------------------*/

static UF_MB_styler_actions_t actions[] = {

{ "PLGGCX.dlg", NULL, M_cbs, UF_MB_STYLER_IS_NOT_TOP },

{ NULL, NULL, NULL, 0 } /* This is a NULL terminated list */

};









/*---------------- MENUBAR HOOKUP HELP Example -------------------

To launch this dialog from a Unigraphics menubar, you must follow

the steps below.

1) Add the following lines to your MenuScript file in order to

associate a menu bar button with your dialog. In this

example, a cascade menu will be created and will be

located just before the Help button on the main menubar.

The button, PLGGCX_BTN is set up to launch your dialog and

will be positioned as the first button on your pulldown menu.

If you wish to add the button to an existing cascade, simply

add the 3 lines between MENU LAUNCH_CASCADE and END_OF_MENU

to your menuscript file.

The MenuScript file requires an extension of ".men".

Make sure that you add the extension to the file and place

the file in your startup directory:

$UGII_USER_DIR/startup or

$UGII_SITE_DIR/startup or

$UGII_VENDOR_DIR/startup directory



Move the contents between the dashed lines to your Menuscript file.

! ----------------------------------------------------------------

VERSION 120


EDIT UG_GATEWAY_MAIN_MENUBAR


BEFORE UG_HELP

CASCADE_BUTTON UISTYLER_DLG_CASCADE_BTN

LABEL Dialog Launcher

END_OF_BEFORE

MENU UISTYLER_DLG_CASCADE_BTN

BUTTON PLGGCX_BTN

LABEL Display PLGGCX dialog

ACTIONS PLGGCX.dlg

END_OF_MENU

! ---------------------------------------------------------------



2) Issue a call to the function, UF_MB_add_styler_actions from the ufsta

user exit as shown below. To use this call, remove the conditional

definitions: #ifdef MENUBAR_COMMENTED_OUT

#endif MENUBAR_COMMENTED_OUT

The static structure, actions, will allow you to associate ALL of your

dialogs and callback functions to the menubar at once. For example, if you

wish to have 10 dialogs associated to 10 different buttons on the menubar,

you may enter each dialog and callback list into the actions structure. Make

sure that you have created a corresponding button in your MenuScript file.

You may also have separate shared libraries, each with a ufsta user exit

for each individual dialog.



3) Place your compiled and linked ufsta user function in

$UGII_USER_DIR/startup or

$UGII_SITE_DIR/startup or

$UGII_VENDOR_DIR/startup directory.

NOTE: The user function must contain the proper extension .so, .sl or .dll

to make ensure that it is recognized by the MenuScript. If it does not

have the proper extension, it will NOT be recognized by MenuScript.



The action name you have provided in your MenuScript must correspond to

to the dialog name provided in the action structure. This MUST match inorder

to bind your dlg file to your MenuScript button.



4) Copy your UIStyler dialog file to the proper directory.

All dialog files (.dlg) must be located in

$UGII_USER_DIR/application or

$UGII_SITE_DIR/application or

$UGII_VENDOR_DIR/application directory





------------------------------------------------------------*/

extern void ufsta (char *param, int *retcode, int rlen)

{

int error_code,resonse;

if ( (UF_initialize()) != 0) return;


/* 在调用UIStyler对话框之前操作 如加入密码*/

if ( error_code = UF_STYLER_create_dialog ("E:\\UG-API\\PLGGCX.dlg",

M_cbs,M_CB_COUNT,NULL,&resonse) != 0 )//M 与UIStyler前缀名 有关注意大小写

{

char fail_message[133];

UF_get_fail_message(error_code, fail_message);

printf ( "%s\n", fail_message );

}



/* 在调用UIStyler对话框之后操作 */

UF_terminate();

return;

}


extern "C" int ufusr_ask_unload( void )

{

return (UF_UNLOAD_IMMEDIATELY);

}



static void ECHO(char *format, ...)

{

char msg[1024];

va_list args;

va_start(args, format);

vsnprintf_s(msg, sizeof(msg), 1024, format, args);

va_end(args);

UF_UI_open_listing_window();

UF_UI_write_listing_window(msg);

UF_print_syslog(msg, FALSE);

}


#define UF_CALL(X) (report_error( __FILE__, __LINE__, #X, (X)))


static int report_error( char *file, int line, char *call, int irc)

{

if (irc)

{

char err[133];


UF_get_fail_message(irc, err);

ECHO("*** ERROR code %d at line %d in %s:\n",

irc, line, file);

ECHO("+++ %s\n", err);

ECHO("%s;\n", call);

}


return(irc);

}



//

int i=0,tool_num=0;

char *tool_name[1024];

char obj_name[1024] = "";

static logical cycelGenerateCb(tag_t obj_tag, void* data)

{

logical is_group = false;

UF_CALL(UF_NCGROUP_is_group(obj_tag, &is_group));

if (is_group)

{

UF_CALL(UF_OBJ_ask_name(obj_tag, obj_name));

i++;

tool_num=i;

tool_name[i]=obj_name;//得到刀具名数组

//UF_UI_write_listing_window(tool_name[i]);

//UF_UI_write_listing_window("\n");


return TRUE;

}

return TRUE;



}






/*-------DIALOG CREATION FROM A CALLBACK HELP Example ----------

If you wish to have this dialog displayed from the callback of

another UIStyler dialog, you should:


1) Make sure that the callback of your UIStyler dialog is

designated as a dialog building callback.

2) Remove the conditional definitions:

#ifdef DISPLAY_FROM_CALLBACK

#endif DISPLAY_FROM_CALLBACK

3) Your callback should issue a call to this function.

4) You should also add the funcitonal prototype to your header file

(PLGGCX.h) and ensure that the file is properly included.


All dialog files must be located in

$UGII_USER_DIR/application or

$UGII_SITE_DIR/application or

$UGII_VENDOR_DIR/application directory

--------------------------------------------------------------*/



#ifdef DISPLAY_FROM_CALLBACK

extern int <enter the name of your function> ( int *response )

{

int error_code = 0;

if ( ( error_code = UF_initialize() ) != 0 )

return (0) ;


if ( ( error_code = UF_STYLER_create_dialog ( "PLGGCX.dlg",

M_cbs, /* Callbacks from dialog */

M_CB_COUNT, /* number of callbacks*/

NULL, /* This is your client data */

response ) ) != 0 )

{

char fail_message[133];


/* Get the user function fail message based on the fail code.*/

UF_get_fail_message(error_code, fail_message);

UF_UI_set_status (fail_message);

printf ( "%s\n", fail_message );

}



UF_terminate();

return (error_code);

}

#endif /* DISPLAY_FROM_CALLBACK */





/*-------DIALOG CREATION FROM A USER EXIT HELP Example --------

To create this dialog from a user exit, you must invoke a

call to the NX Open API, UF_STYLER_create_dialog. An example

is shown below.


All dialog files must be located in

$UGII_USER_DIR/application or

$UGII_SITE_DIR/application or

$UGII_VENDOR_DIR/application directory


1) Remove the conditional definitions:

#ifdef DISPLAY_FROM_USER_EXIT

#endif DISPLAY_FROM_USER_EXIT

2) Add a user exit to the function name below, for example, ufusr.

3) Consider how your shared library will be unloaded. Take a look

at the generated function ufusr_ask_unload.

--------------------------------------------------------------*/


#ifdef DISPLAY_FROM_USER_EXIT

extern void <enter a valid user exit here> (char *param, int *retcode, int rlen)

{

int response = 0;

int error_code = 0;

if ( ( UF_initialize() ) != 0 )

return;


if ( ( error_code = UF_STYLER_create_dialog ( "PLGGCX.dlg",

M_cbs, /* Callbacks from dialog */

M_CB_COUNT, /* number of callbacks*/

NULL, /* This is your client data */

&response ) ) != 0 )

{

char fail_message[133];


/* Get the user function fail message based on the fail code.*/

UF_get_fail_message(error_code, fail_message);

UF_UI_set_status (fail_message);

printf ( "%s\n", fail_message );

}



UF_terminate();

return;

}





/*--------------------------------------------------------------------------

This function specifies how a shared image is unloaded from memory

within Unigraphics. This function gives you the capability to unload an

internal NX Open application or user exit from Unigraphics. You can

specify any one of the three constants as a return value to determine

the type of unload to perform: immediately after user function

execution, via an unload selection dialog, or when Unigraphics terminates

terminates. If you choose UF_UNLOAD_SEL_DIALOG, then you have the

option to unload your image by selecting File->Utilities->Unload Shared

Image.


NOTE: A program which associates NX Open applications with the menubar

MUST NOT use this option since it will UNLOAD your NX Open application image

--------

from the menubar.

--------------------------------------------------------------------------*/


extern int ufusr_ask_unload (void)

{

/* unload immediately after application exits*/

return ( UF_UNLOAD_IMMEDIATELY );


/*via the unload selection dialog... */

/*return ( UF_UNLOAD_SEL_DIALOG ); */

/*when UG terminates... */

/*return ( UF_UNLOAD_UG_TERMINATE ); */

}




/*--------------------------------------------------------------------------

You have the option of coding the cleanup routine to perform any housekeeping

chores that may need to be performed. If you code the cleanup routine, it is

automatically called by Unigraphics.

--------------------------------------------------------------------------*/

extern void ufusr_cleanup (void)

{

return;

}

#endif /* DISPLAY_FROM_USER_EXIT */







/*-------------------------------------------------------------------------*/

/*---------------------- UIStyler Callback Functions ----------------------*/

/*-------------------------------------------------------------------------*/


/* -------------------------------------------------------------------------

* Callback Name: M_ZH_GZ_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_ZH_GZ_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


tag_t setup_tag=NULL_TAG;

tag_t tool_group = NULL_TAG;

tag_t disp_part_tag;

char part_name[MAX_FSPEC_SIZE]="";

char part_name_1[1024]="";


UF_CALL(UF_SETUP_ask_setup(&setup_tag));


disp_part_tag= UF_PART_ask_display_part (); //获取当前部件的UF_SETUP对象

UF_PART_ask_part_name(disp_part_tag,part_name); //获得部件文件位置

string s(part_name);

int ans,ans1,ans2;

ans = s.rfind("\\");

ans1 = s.rfind(".");

ans2 =ans1-ans-1;

s = s.substr (ans+1,ans2);

strcpy(part_name_1,s.c_str());


//获取刀具组

UF_SETUP_ask_mct_root(setup_tag, &tool_group);

UF_NCGROUP_cycle_members(tool_group, cycelGenerateCb, NULL);



UF_STYLER_item_value_type_t data_a;

data_a.count=1;

data_a.item_attr=UF_STYLER_VALUE;

data_a.item_id=M_STR_1;//指定被访问的控件标识

data_a.value.string= part_name_1; //值 注意类型 整数integer 实数real 字符串string

UF_STYLER_set_value(dialog_id,&data_a); //改变实数编辑栏的数值


uc1601(tool_name[10],1);

data_a.item_attr = UF_STYLER_SUBITEM_VALUES;

data_a.item_id=M_OPTION_2;

data_a.count = tool_num;

//data_a.subitem_index = UF_STYLER_NO_SUB_INDEX;

if(tool_num > 0)

{

for(int i=-1;i<tool_num-1;i++)

{

data_a.value.strings[i] = tool_name[i];

}

UF_STYLER_set_value(dialog_id,&data_a); //第一次设置时必须先获得数据

}


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* A return value of UF_UI_CB_EXIT_DIALOG will not be accepted */

/* for this callback type. You must continue dialog construction.*/


}



/* -------------------------------------------------------------------------

* Callback Name: M_ZH_DE_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_ZH_DE_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog. */

/* A return value of UF_UI_CB_EXIT_DIALOG will not be accepted */

/* for this callback type. You must continue dialog destruction*/

return (UF_UI_CB_CONTINUE_DIALOG);


}



/* -------------------------------------------------------------------------

* Callback Name: M_ZH_OK_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_ZH_OK_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, terminate dialog */

/* It is STRONGLY recommended that you exit your */

/* callback with UF_UI_CB_EXIT_DIALOG in a ok callback.*/

/* return ( UF_UI_CB_EXIT_DIALOG ); */

return (UF_UI_CB_EXIT_DIALOG);


}



/* -------------------------------------------------------------------------

* Callback Name: M_ZH_apply_cb

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_ZH_apply_cb ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

/* A return value of UF_UI_CB_EXIT_DIALOG will not be accepted */

/* for this callback type. You must respond to your apply button.*/

return (UF_UI_CB_CONTINUE_DIALOG);


}



/* -------------------------------------------------------------------------

* Callback Name: M_ZH_NO_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_ZH_NO_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, terminate dialog */

/* It is STRONGLY recommended that you exit your */

/* callback with UF_UI_CB_EXIT_DIALOG in a cancel call */

/* back rather than UF_UI_CB_CONTINUE_DIALOG. */

return ( UF_UI_CB_EXIT_DIALOG );


}



/* -------------------------------------------------------------------------

* Callback Name: M_ZH_WJQJ_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_ZH_WJQJ_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_1_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_1_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_2_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_2_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_3_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_3_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_4_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_4_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_5_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_5_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_6_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_6_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_7_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_7_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_8_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_8_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_9_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_9_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_10_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_10_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_11_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_11_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_12_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_12_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_13_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_13_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_14_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_14_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



/* -------------------------------------------------------------------------

* Callback Name: M_HJ_PNAME_15_CB

* This is a callback function associated with an action taken from a

* UIStyler object.

*

* Input: dialog_id - The dialog id indicate which dialog this callback

* is associated with. The dialog id is a dynamic,

* unique id and should not be stored. It is

* strictly for the use in the NX Open API:

* UF_STYLER_ask_value(s)

* UF_STYLER_set_value

* client_data - Client data is user defined data associated

* with your dialog. Client data may be bound

* to your dialog with UF_MB_add_styler_actions

* or UF_STYLER_create_dialog.

* callback_data - This structure pointer contains information

* specific to the UIStyler Object type that

* invoked this callback and the callback type.

* -----------------------------------------------------------------------*/

int M_HJ_PNAME_15_CB ( int dialog_id,

void * client_data,

UF_STYLER_item_value_type_p_t callback_data)

{

/* Make sure User Function is available. */

if ( UF_initialize() != 0)

return ( UF_UI_CB_CONTINUE_DIALOG );


/* ---- Enter your callback code here ----- */


UF_terminate ();


/* Callback acknowledged, do not terminate dialog */

return (UF_UI_CB_CONTINUE_DIALOG);

/* or Callback acknowledged, terminate dialog. */

/* return ( UF_UI_CB_EXIT_DIALOG ); */


}



0

最新回复 (1)
  • 卢尚宇 VIP会员 2月前
    1

    厉害厉害 厉害了

请登录后发表新帖