project_va_move_dialog.c

来自「基于UG的自动装配技术」· C语言 代码 · 共 466 行 · 第 1/2 页

C
466
字号
 *                               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 PROJECT_VA_MOVE_destruction ( 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: PROJECT_VA_MOVE_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 PROJECT_VA_MOVE_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: PROJECT_VA_MOVE_cancel_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 PROJECT_VA_MOVE_cancel_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: PROJECT_VA_MOVE_plus
 * 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 PROJECT_VA_MOVE_plus ( int dialog_id,
             void * client_data,
             UF_STYLER_item_value_type_p_t callback_data)
{
     int *p_action; 
     if ( UF_initialize() != 0) 
          return ( UF_UI_CB_CONTINUE_DIALOG );

	 p_action=(int *)client_data;
	 *p_action=MOVE_PLUS;
     UF_terminate ();

    /* Callback acknowledged, do not terminate dialog */
    return (UF_UI_CB_EXIT_DIALOG); 
    
    /* or Callback acknowledged, terminate dialog.    */
    /* return ( UF_UI_CB_EXIT_DIALOG );               */

}


/* -------------------------------------------------------------------------
 * Callback Name: PROJECT_VA_MOVE_minus
 * 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 PROJECT_VA_MOVE_minus ( int dialog_id,
             void * client_data,
             UF_STYLER_item_value_type_p_t callback_data)
{
     int *p_action; 
     if ( UF_initialize() != 0) 
          return ( UF_UI_CB_CONTINUE_DIALOG );

	 p_action=(int *)client_data;
	 *p_action=MOVE_MINUS;

     UF_terminate ();

    /* Callback acknowledged, do not terminate dialog */
    return (UF_UI_CB_EXIT_DIALOG); 
    
    /* or Callback acknowledged, terminate dialog.    */
    /* return ( UF_UI_CB_EXIT_DIALOG );               */

}


/* -------------------------------------------------------------------------
 * Callback Name: PROJECT_VA_MOVE_change_stepsize
 * 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 PROJECT_VA_MOVE_change_stepsize ( int dialog_id,
             void * client_data,
             UF_STYLER_item_value_type_p_t callback_data)
{
    int *p_action; 
     if ( UF_initialize() != 0) 
          return ( UF_UI_CB_CONTINUE_DIALOG );

	 p_action=(int *)client_data;
	 *p_action=ADJUST_SEPT_SIZE;

     UF_terminate ();

    /* Callback acknowledged, do not terminate dialog */
    return (UF_UI_CB_EXIT_DIALOG); 
    
    /* or Callback acknowledged, terminate dialog.    */
    /* return ( UF_UI_CB_EXIT_DIALOG );               */

}


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?