|
马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
下面是我的程序代码?
static UF_STYLER_callback_info_t EXE_cbs[EXE_CB_COUNT] =
{
{UF_STYLER_DIALOG_INDEX, UF_STYLER_APPLY_CB , 1, EXE_apply_cb},
{UF_STYLER_NULL_OBJECT, UF_STYLER_NO_CB, 0, 0 }
};
static int report( char *file, int line, char *call, int irc)
{
if (irc)
{
char messg[133];
printf("%s, line %d: %s\n", file, line, call);
(UF_get_fail_message(irc, messg)) ?
printf(" returned a %d\n", irc) :
printf(" returned error %d: %s\n", irc, messg);
}
return(irc);
}
/* selection initialization procedure */
static int init_proc(
UF_UI_selection_p_t select,
void* user_data)
{
int num_triples = 1;
UF_UI_mask_t mask_triples[] = {
0,0,UF_route_segment_type};
/* enable only route segment */
if((UF_CALL(UF_UI_set_sel_mask(select,
UF_UI_SEL_MASK_CLEAR_AND_ENABLE_SPECIFIC,
num_triples, mask_triples))) == 0)
{
return (UF_UI_SEL_SUCCESS);
}
else
{
return (UF_UI_SEL_FAILURE);
}
}
int EXE_apply_cb ( int dialog_id,
void * client_data,
UF_STYLER_item_value_type_p_t callback_data)
{
char cue[] = "选择需要修改的路径!";
char title[]="选择需要修改的路径!";
int response;
tag_t object, view;
double cursor[3];
/* Make sure User Function is available. */
if ( UF_initialize() != 0)
return ( UF_UI_CB_CONTINUE_DIALOG );
/* ---- Enter your callback code here ----- */
uc1601("head",1);
UF_UI_select_with_single_dialog(cue,title,
UF_UI_SEL_SCOPE_NO_CHANGE, init_proc, NULL,
[$response, &object, cursor, &view)]
uc1601("end",1);
UF_DISP_set_highlight(object,0);
UF_terminate ();
return (UF_UI_CB_CONTINUE_DIALOG);
}
编辑运行就是打不开select对话框。怎么回事?急需请教。谢谢 |
|