admin 发表于 2013-11-7 17:19:02

NX 9.0 上面的 ufun函数也有很多更新,比如关于ribbon界面

偶尔看见的,大家可以关注下!

ribbon界面通过代码创建,前提是你要有准备的 .rtb/.gly/.grb文件哦



/****************************************************************************
Creates a ribbon from the given .rtb/.gly/.grb file. The file name should not have
any hard coded path and should exist in one of the Open application
directories. The show parameter is only used to show or hide the ribbon
when it is loaded for the first time. On all subsequent loads, the show/hide
value as recorded in the users registry is used.

In order to be successfully loaded, the .rtb/.gly/.grbfile must be located in the
application subdirectory of one of the directories listed in the file
pointed to by UGII_CUSTOM_DIRECTORY_FILE, which defaults to
$UGII_BASE_DIR/ugii/menus/custom_dirs.dat.

Example:
    UF_UI_ribbon_id_t id = NULL;

    error = UF_UI_create_ribbon("my.rtb", 1, &id);

Environment: Internal

See Also:UF_UI_remove_ribbon

History: Originally released in NX9.0
****************************************************************************/
extern UGOPENINTEXPORT int UF_UI_create_ribbon
(
      char* file_name,             /* <I>
                                    The .rtb/.gly/.grb file name without any hard coded
                                    path */
      int show,                  /* <I>
                                    Initial visibility of the ribbon
                                    (1 = show; 0 = hide) */
      UF_UI_ribbon_id_t *ribbon_id/* <OF>
                                    ribbon id if creation is successful */
);

/****************************************************************************
Removes the ribbon with the given id. Once the ribbon is removed the ribbon
id should not be used.

Example:

    if (id)
      UF_UI_remove_ribbon(id);
    id = NULL;

Environment: Internal

See Also:UF_UI_create_ribbon

History: Originally released in NX9.0
****************************************************************************/
extern UGOPENINTEXPORT int UF_UI_remove_ribbon
(
      UF_UI_ribbon_id_t ribbon_id/* <I>
                                    ribbon id of the ribbon to be removed */
);

/****************************************************************************
This routine sets the visibility of a ribbon. This routine can only be used
on ribbon that you have valid ribbon id for.

Environment: Internal

See Also:UF_UI_ask_ribbon_vis
         UF_UI_create_ribbon

History: Originally released in NX9.0
****************************************************************************/
extern UGOPENINTEXPORT int UF_UI_set_ribbon_vis
(
      UF_UI_ribbon_id_t ribbonl_id, /* <I>
                                 Valid Ribbon id returned from a call to
                                 UF_UI_create_ribbon*/
      int show                  /* <I>
                                 1 = show; 0 = hide */
);

/****************************************************************************
This routine returns the current visibility of the given ribbon.

Environment: Internal

See Also:UF_UI_set_ribbon_vis
         UF_UI_create_ribbon

History: Originally released in NX9.0
****************************************************************************/
extern UGOPENINTEXPORT int UF_UI_ask_ribbon_vis
(
      UF_UI_ribbon_id_t ribbon_id, /* <I>
                                 Valid Ribbon id from a call to
                                 UF_UI_create_ribbon*/
      int* show                   /* <O>
                                 1 = show; 0 = hide */
);





#undef EXPORTLIBRARY

#endif /*UF_UI_INCLUDED*/

Buguin 发表于 2014-4-16 11:31:11

求问大神,二次开发函数在哪查询?帮助文档已经下了,没找到函数呀
页: [1]
查看完整版本: NX 9.0 上面的 ufun函数也有很多更新,比如关于ribbon界面