|
倬虚
发表于 2016-1-4 17:13:38
|阅读模式
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
- int selectSingle(int user_data,int *num, tag_p_t *object)& {1 d7 a& K7 U3 \6 |
- {
, W6 _1 u* J4 V
; N& z% @6 S0 w; d6 Q- int num_obj = 0;7 Z7 s7 V% H3 P
- tag_p_t obj_sel = nullptr;
* y# W o' E. H1 M2 X; y- D - UF_UI_ask_global_sel_object_list(&num_obj,&obj_sel);# y6 j$ U7 d% E' @" I
- if (num_obj > 0)) _$ y# Q7 S- N! j; d
- {
% ^9 [4 T+ X( _* g9 s, V! }/ K - //UF_DISP_set_highlights(num_obj,obj_sel,0);2 ~; a6 g& P. V' ^& C
- for(int i = 0; i < num_obj; i++)
/ a" a$ ?* ]1 T z) t - {
$ e) F* K" C# z3 w: q6 @ - UF_DISP_set_highlight(obj_sel[i],0);
8 w0 o* [# l; C8 D& t( y' n - }8 a+ l3 D5 h. ^
- UF_free(obj_sel);
/ b0 ^" u2 O" O+ S! w( Z6 F) v - }$ f# O$ f1 j- }2 Q
-
7 e9 T9 h2 V9 E0 H - UF_UI_set_cursor_view(0);
* x2 X$ x- O' w7 j - UF_UI_lock_UG_access(UF_UI_FROM_CUSTOM);( l% y* g9 B, H- o1 p
- char cue[] = "cue message";" j# O/ Y) v* Z+ ~/ a( K/ a4 Z
- char title[] = "选择元素";; \3 v2 N; |; H, G! f
- int response;( E7 I1 @* Y6 E/ @8 J" M# T
- if(UF_CALL(UF_UI_select_with_class_dialog(cue,title,
+ x0 p" K, p! j% _- t" e; t5 h6 M5 y - UF_UI_SEL_SCOPE_ANY_IN_ASSEMBLY, init_proc, &user_data,
4 c9 V3 p6 w; V - &response, num ,object)) == 0)4 H" W, ?3 B" j& i- a
- {+ [0 L& Y4 N* {; T
- if (response == UF_UI_OK)
( _$ y! }, V2 x: g; q2 R& w - {* g9 ]' g4 v7 w7 H3 k& e, ~" n# ]; I
- UF_UI_unlock_ug_access(UF_UI_FROM_CUSTOM);
) G# ~$ ^9 [. f) _3 {! G - return 1;
' z* R% x, A: l, m* P - }" R2 h1 ^6 C8 ]: q
- }
* ^0 M$ ]0 d6 n3 {# l - UF_UI_unlock_ug_access(UF_UI_FROM_CUSTOM);2 c8 l5 [- @# s! i
2 \" z' f* M6 N$ J" o3 ?! c- return 0;
7 _" C7 p0 X% P. W2 _9 J. {8 a' O3 f - }
复制代码
{0 ?% g$ B; d7 W6 @4 J0 S对象选择对话框有时候不能弹出来,但点击鼠标中间还是能够选中的,能帮忙分析下原因吗? |
|