|
|
倬虚
发表于 2016-1-4 17:13:38
|阅读模式
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
- int selectSingle(int user_data,int *num, tag_p_t *object)5 D- a: p. t. y3 `/ m. `
- {
# V8 b+ V. \0 Z2 }6 ?/ G
; }; \3 a2 K2 [# ?- int num_obj = 0;0 D3 V" A$ {- r
- tag_p_t obj_sel = nullptr;2 S ~, Q. H1 K! }
- UF_UI_ask_global_sel_object_list(&num_obj,&obj_sel);
: O: q* J( t6 G9 e9 [ - if (num_obj > 0)/ g1 l+ o% }% Y9 I& T' h; x7 L
- {
: f7 ~; j6 Z6 p1 I: ~ - //UF_DISP_set_highlights(num_obj,obj_sel,0);7 f/ ~/ s- p* R) I( H
- for(int i = 0; i < num_obj; i++)8 s' N; V1 p/ D9 }
- { d" G1 m! C$ O% l( V7 @: @
- UF_DISP_set_highlight(obj_sel[i],0);
! ?7 }$ ]' i0 } - }
' ]0 A! q3 W% t; ^3 y3 T# |6 y - UF_free(obj_sel);+ B0 D1 {0 A8 j1 x1 r4 p0 R* X" ]
- }- q9 V: G- u; i$ p9 n( |- J9 T3 x) ^
-
$ C1 L, K3 z& L- i1 X - UF_UI_set_cursor_view(0);) ^, _. b7 J+ {& v' j- L
- UF_UI_lock_UG_access(UF_UI_FROM_CUSTOM);
* E$ s; f( b7 y7 W7 W7 T9 {! |6 a - char cue[] = "cue message";$ P( Y, c! Z# {" P; f4 U
- char title[] = "选择元素";
# w0 }. l/ \1 I( O - int response;# }- T, A) K$ Y0 Q% R, V
- if(UF_CALL(UF_UI_select_with_class_dialog(cue,title,( c0 _" r& s/ }8 e
- UF_UI_SEL_SCOPE_ANY_IN_ASSEMBLY, init_proc, &user_data,
# {: U' R2 X: |' Y6 V& i - &response, num ,object)) == 0)
8 n1 o2 h3 e3 @. _ - {
# B X5 f0 l4 c3 i6 r: l6 q - if (response == UF_UI_OK)& `& C4 f3 i5 X$ m* T0 R
- {
' `# ?; ?; g; A0 U2 D - UF_UI_unlock_ug_access(UF_UI_FROM_CUSTOM);
c1 L0 C, j; e& D1 i" V - return 1;- Q' F1 v9 o+ z8 g& k; f9 A) K0 I
- }
( y/ k1 K5 P6 ^' X7 c# g% J4 Y - }( h8 G. p& L* Q: ^, K9 c
- UF_UI_unlock_ug_access(UF_UI_FROM_CUSTOM);
& N% D6 c8 V8 J* b - " w% W6 ]- o0 Q% N' b1 S& A
- return 0;
& S o7 G- I* J& \+ q. p" ? - }
复制代码 ) j8 y, V, R: m5 ]6 |
对象选择对话框有时候不能弹出来,但点击鼠标中间还是能够选中的,能帮忙分析下原因吗? |
|