//铸入型起重棒
8 |! J3 O" o4 F7 X A& C/* These include files are needed for the following template code. */
7 f. Q: `* B$ l1 D+ c+ Y#include <stdio.h>6 @: f; A' V+ C8 E2 u# b
#include <uf.h>) W8 Z4 H( F7 Q4 t+ o
#include <uf_defs.h>9 Y7 e: T. n) k. X4 }+ a
#include <uf_exit.h>
2 b8 ?7 K2 r# S2 f9 I Z* `#include <uf_ui.h>) M7 c4 H$ |/ G" M" s- [1 ]
#include <uf_styler.h>
" R# j, @+ V# R# v6 t% M#include <uf_mb.h>
, e/ O2 z a N; {) _# r#include "CCHF.h"
T1 e' N6 c) b6 l3 o' O/ f#include <uf_modl.h>
& G, i7 h1 w0 |% t#include <uf_obj.h>2 o% D& e5 C9 V/ a" p; D
#include <math.h> /* The following definition defines the number of callback entries */
8 ]; j; A3 T5 {' c/* in the callback structure: */
J% ?7 l' n0 r2 I! k7 d6 q7 r/* UF_STYLER_callback_info_t CCHF_cbs */
; p" u8 p4 e* A# i#define CCHF_CB_COUNT ( 6 + 1 ) /* Add 1 for the terminator */ /*--------------------------------------------------------------------------
/ S- a8 X7 L3 C) A' c& [2 oThe following structure defines the callback entries used by the
9 W8 }9 X; W6 V, W5 a; Astyler file. This structure MUST be passed into the user function,
9 l, x( H- D! U' l4 [, rUF_STYLER_create_dialog along with CCHF_CB_COUNT.# H4 G5 J7 P/ _
--------------------------------------------------------------------------*/
" ~, ~% b( L7 Y! h8 b u- Ostatic UF_STYLER_callback_info_t CCHF_cbs[CCHF_CB_COUNT] =8 R: f3 K: T. L: e& B9 j& @% s
{
1 b. x& ?5 F+ l& p! C( k{UF_STYLER_DIALOG_INDEX, UF_STYLER_CONSTRUCTOR_CB , 0, CCHF_con_cb},8 l+ O6 X4 h$ n" U+ Z
{UF_STYLER_DIALOG_INDEX, UF_STYLER_OK_CB , 0, CCHF_apply_cb},
" ? n# c% Z: d/ o{UF_STYLER_DIALOG_INDEX, UF_STYLER_APPLY_CB , 0, CCHF_apply_cb},; G: F2 g& O4 S9 X
{UF_STYLER_DIALOG_INDEX, UF_STYLER_CANCEL_CB , 0, CCHF_cancel_cb},
: L! f1 i J' M4 ?, S{CCHF_TYPE , UF_STYLER_VALUE_CHANGED_CB, 0, CCHF_type_cb},
- N+ n3 N, \- v! X{CCHF_OPTION_D , UF_STYLER_ACTIVATE_CB , 0, CCHF_D_cb},
* q& D% g5 c0 m G9 ^( b{UF_STYLER_NULL_OBJECT, UF_STYLER_NO_CB, 0, 0 }2 o% J' M# N4 z. I# d0 U" z1 f
};# p0 P8 O* ^% U' Y, b% j
static UF_MB_styler_actions_t actions[] = {4 h( h& J9 ` n
{ "CCHF.dlg", NULL, CCHF_cbs, UF_MB_STYLER_IS_NOT_TOP },
2 q3 o2 c3 P! F2 C{ NULL, NULL, NULL, 0 } /* This is a NULL terminated list */9 {+ {& O6 u0 ]" ]+ A0 O
}; char * strings_D[6]={"25","32","36","40","50","70"};
# _3 x+ g7 B( I+ ]char * D;$ ]! @! D/ _3 J, n: m4 h
int user_click=0;
. q9 o( |( }* i7 J6 j: K$ j: rint cancel_click=0;' ?$ U9 ?. I5 G0 \* M! z+ F
int type,D_int; extern void ufusr (char *param, int *retcode, int rlen)2 U0 T& i7 I4 S- q9 c4 U
{
1 ^. t7 Y, K# ~2 `; Bint response = 0;8 D s2 ^( @1 V; \6 g2 W
int error_code = 0; int choice;3 m5 J% h4 n# A, }( _
int defalt[2];( y$ v. _3 E% h, H& d: @* T0 ]
double point1[3],point2[3],point3[3],point4[3],point5[3],point6[3];% A' E- M/ \* P* w4 d
double direction[3]={0,1,0}; }0 f; V: w' S
// int i; char * D1, * D2, * T, * A, * B, * C, * E;/ K# ^- h8 o8 K: C Y# E
char * R1;5 O. S4 U- H6 W5 j( w6 o( t. r/ S
char * block_len[3];& F1 o9 j% t+ t m2 o8 Y$ B9 @
UF_FEATURE_SIGN sign = UF_NULLSIGN; //建立一个新的目标体
' G' c2 r: L0 |# m; eUF_FEATURE_SIGN sign1 = UF_NEGATIVE; //减去目标实体
7 o2 c( t+ {6 h1 sUF_FEATURE_SIGN sign2 = UF_POSITIVE; //加目标实体5 G- _6 b, T, O5 O, ~; c$ ?% g& L
tag_t cyl1_obj,cyl1_fea,cyl2_obj,cyl3_obj,cyl4_obj,cyl5_obj,blk_obj;8 f( L% |0 y* H- \
tag_t blend1_tag,blend2_tag,blend3_tag,blend4_tag; uf_list_p_t edge_list,object_list; if ( ( UF_initialize() ) != 0 )
" {4 P2 l0 g3 m- Ereturn; if ( ( error_code = UF_STYLER_create_dialog ( "CCHF.dlg",1 ^4 o: }1 b+ }+ p5 w0 ?5 n
CCHF_cbs, /* Callbacks from dialog */* A X6 G1 ~& }3 @; N
CCHF_CB_COUNT, /* number of callbacks*// t! r, \: x4 `1 K3 i: k: p
NULL, /* This is your client data */
; ]5 i1 D2 l- H) ~. {) q&response ) ) != 0 )2 a/ \- \% F- t Z
{
* S/ U* E9 L) o' U% Vchar fail_message[133]; /* Get the user function fail message based on the fail code.*/
3 N& @# |' ]: v+ r- n! f% A. iUF_get_fail_message(error_code, fail_message);
, @& r: ~4 C3 a! q' p$ _( Z: m8 AUF_UI_set_status (fail_message);+ E. f0 M" |& V `7 z0 P/ |
printf ( "%s\n", fail_message );
$ ]4 j8 C. [/ C6 o' W/ I U1 I+ L} if(cancel_click==1)5 R \# |6 j$ t
{% t3 j% _; y; j: T- b* s
UF_terminate();3 c8 B0 v) e! D: v" S$ k f2 D T
return;
( P' W! b! |3 I6 T6 |, O" o3 b" n} switch(D_int)
& s# o- E) a3 ?7 p5 c0 I{: q2 [1 F8 T z( r6 J
case 0:
. B- v4 w/ @3 A* S1 `D1="46";+ t) x% \# G' }- I4 d, p" F f/ e2 R
D2="36";& c8 o& W# v2 |# v6 |- n4 z
T="12.6";4 R: x0 D; N' g( n/ r
A="25";
( r3 e5 j" R3 z+ u2 {B="30";
( f6 Z9 h; J( h& y2 wC="15";
# T$ s: C- _. V/ ]/ p& }+ k; u' eE="16.6";
3 a k# D( c( T1 I; Dif(type==1)
* C1 P) O2 E# A1 B8 {4 Y7 p8 x" `1 |3 M{6 g% t0 A3 c" s* D
D1="60";+ Z! O2 v+ H) b! Z
}
: R! N! s% f" @, c6 Sbreak;
2 [8 K( x' A6 }- s/ icase 1:$ c0 l3 C9 S: x7 T" M3 ?
D1="55";
3 z" R5 h8 j! zD2="42";: S& W* c2 p% z# G& ^+ r3 N
T="13.1";
3 }! }/ m8 r: SA="30";
/ h+ |# d/ {& h* v/ DB="40";1 u4 I9 k& T0 l4 D8 Y! j3 V
C="20";' Q! a4 p/ M4 \) C' P9 r r; x" A
E="16.8";
9 W+ u/ u0 w# yif(type==1)4 S" o9 J6 _5 q& E4 u
{$ T* c l9 z4 C( g
D1="70";
. I/ R5 f, ^2 D; a9 L B, P}
7 g8 S) l+ \* Tbreak;
' b* x9 Q. W9 F, I2 x+ g$ h# z; icase 2:" B6 U9 b: ?% [# o! ?4 s% |
D1="60";- b* X0 G% T' ~' a) R9 ^
D2="46";
! ~0 V$ D- B3 V7 G9 yT="18.5";& C8 L# [: j- y7 B
A="35";6 T( y7 b: [7 j. _
B="45";
4 p9 `9 B/ D# Y% e6 X O; x( X, y- wC="25";* H" H" c S3 e! y' m4 I
E="17";8 h" N( u, ?7 F1 l) _/ _- T1 s
if(type==1)
8 y& N; @$ J, _9 m) Q- e7 z{
3 q- N* J; o7 @# UD1="80";
" l. p4 d! o! {3 u! \}
: A' }3 x5 R$ I/ }( ^break;
+ W: g0 g& r5 c- `0 N. {- ucase 3:( c+ R, z( m! S2 L. g# S
D1="70";
& ~6 I* m1 I- A) YD2="55";
8 t% S3 ?" M; f% G- X$ N! AT="18.9";
) e% _" I5 t. y: D2 ?A="35";4 S3 _) Z+ S' D+ ~9 L" A: S
B="60";
' h& @3 w* i' B; r. @C="30"; }- z* [4 N8 s! R7 l, P1 n+ |+ C
E="17.4"; D' } z! n( t- j
if(type==1)) K" U! u. D- Q& S+ W; s$ {
{
R; ?) f0 H7 o6 }( q% U2 hD1="90";( v* U4 B3 ~, Q' e6 A- I
}/ n9 \, ]9 Q9 z. ^
break;
9 {+ u0 s {% |( w; l' ]8 R7 Ecase 4:
! Y O3 X3 v3 x* xD1="90";
' X3 Y3 W7 ~8 j! @+ j' ^* OD2="70";
* h1 u& l2 A; B0 Y8 r4 {" gT="25.2";; j8 d) L! |; J# U; S" |( E* }+ O7 _
A="35";. B3 Z! Q; x- `" @0 U) Q
B="70";% u8 y. H( P' H
C="40";) D+ _) r' z1 j$ Y9 T* C
E="18.1";- D0 I* _! L6 f" j
if(type==1)5 U& d I4 E+ j: ]( R
{
* j \5 ]) ]* o/ M& dD1="120";
. b# W, c- @1 F5 W7 G2 {* v}
- H- g, Y! r; ~! d4 }break;: m$ D% Q) t# m* @, h& p
case 5:" [$ u' l1 T4 v: `& Z2 P
D1="120";4 p' r n) m! d8 o, ~$ X" K
D2="100";
' W1 v6 ~ N, Z- N2 n3 ~% p5 xT="31.1";% E+ _9 f- L3 k
A="40";: ]( r# Q6 B) w" x5 S6 u
B="80";* M: E! E; r9 ~- u9 \0 s! w. W
C="40";0 Z, ^% ]- ~7 r; C5 q9 P0 V
E="19.4";
% W0 n. W- R% Y; E0 R7 A+ Vif(type==1)
& G9 R" S0 I* [' X2 Z9 V3 i& E{( s- K" }2 g1 z8 r: E. E
D1="140";# ?3 p: P& v& R
}7 @# \/ @" @3 L: D9 ]0 D
break;* ?* L% H) o+ l2 {
default:
5 N# N8 D2 T0 b( G& x2 u, \break;
6 R) Y% Y- r/ G) u0 ~9 Q4 Y4 B} if (user_click==1)0 e0 L0 R; C3 k; k2 q
{
5 `4 [( O( f4 bchoice = uc1616("指定插入点", defalt, 0, point1);
+ a) W; i* P% D6 }- w$ A, ]: P5 Vif(choice == 2) //判断退出对话框& }% V: R) b8 C* {, G
{
! O8 G) o7 ]" {* B$ Z+ u' pUF_terminate();
9 o( w S& ~1 H6 }return;
1 h# W9 q. K$ s. \4 P w} R1="2";
# n1 ?% f, V2 t* K! ^if(type==1)
t- s. m2 F# p6 I) E3 _{6 X( C! I! x, F
R1="4";
) I. S3 x. P }. X8 ^}6 e& N* Y' k) Q- ?+ Q4 W" }
//cyl1+ Y. c. P6 \/ s( i
UF_MODL_create_cyl1 (sign,point1,T,D1,direction,&cyl1_obj);2 r% H, H/ e' K8 i
UF_MODL_ask_feat_body(cyl1_obj,&cyl1_fea);1 R! A. @, q9 e( ]1 Z
UF_OBJ_set_color (cyl1_fea, 9); //设置实体颜色 UF_MODL_create_list(&edge_list);) z$ f5 K* s7 z: l! P0 I
UF_MODL_ask_feat_edges (cyl1_obj, &edge_list);4 L; |" T9 D* g: F( G9 B" M/ w
UF_MODL_create_blend (R1, edge_list, 0, 0, 0, 0.5, &blend1_tag); //倒圆角cyl1
- M0 S1 u$ Z5 |1 T5 {$ VUF_MODL_delete_list(&edge_list);/ b# _. I9 ^! R) I+ e7 u U3 m
//cyl2- ` w( g9 I4 U2 v* r- _
point2[0]=point1[0];
& J$ J* p' L3 a) Y npoint2[1]=point1[1]+atof(T);
2 a B: X7 L! p% J @ }, ppoint2[2]=point1[2];2 S* j; ]; c, f. K
UF_MODL_create_cyl1 (sign2,point2,A,D,direction,&cyl2_obj);
' L) z2 G6 { q( [//cyl3 r* v$ b3 x* l& _: A( z
point3[0]=point1[0];4 c t& I2 {( o/ u4 [: t4 V* l s6 ~/ z
point3[1]=point2[1]+atof(A); [: V0 F* I% q
point3[2]=point1[2];; e6 Q X- R) {' D& j/ a
UF_MODL_create_cyl1 (sign2,point3,B,D2,direction,&cyl3_obj);, v9 l3 z* L# q* B8 s0 q
//cyl43 z# y4 V3 d, V" ?) e; K
point4[0]=point1[0];
+ B/ h$ N1 D) w% {, C! ?" Fpoint4[1]=point3[1]+atof(B);! P; T+ U/ s' P
point4[2]=point1[2];
6 E5 G: \/ \, EUF_MODL_create_cyl1 (sign2,point4,C,D,direction,&cyl4_obj);
/ P: I$ `+ W% }! m$ E ]+ J5 D+ ]//cyl5
& @5 K: K4 E) y! U3 I4 ~ spoint5[0]=point1[0];
$ B7 t' W2 B5 \ @4 b' H0 }point5[1]=point4[1]+atof(C);
& s- J) {6 K5 M Upoint5[2]=point1[2];! B! H% r, _8 m$ V2 O
UF_MODL_create_cyl1 (sign2,point5,E,D2,direction,&cyl5_obj);
: @. k" z# |# y6 K6 [2 R//倒圆角
8 Y- R+ ]- S6 Y5 rUF_MODL_create_list(&edge_list);
A% M7 `$ x1 {, eUF_MODL_ask_feat_edges (cyl2_obj, &edge_list);4 C" q8 l+ k/ _. ]0 m& |
UF_MODL_create_blend ("5", edge_list, 0, 0, 0, 0.5, &blend2_tag); //倒圆角cyl2; `) D( b' J1 m3 J
UF_MODL_delete_list(&edge_list); UF_MODL_create_list(&edge_list);8 L& b4 @ F2 |0 n; I
UF_MODL_ask_feat_edges (cyl4_obj, &edge_list);
# G% k) I3 |0 S! N' \UF_MODL_create_blend ("3", edge_list, 0, 0, 0, 0.5, &blend3_tag); //倒圆角cyl49 \: S* @9 v9 S7 b: s* k% t
UF_MODL_delete_list(&edge_list); UF_MODL_create_list(&edge_list);: w/ H7 e8 q c ]3 o" g
UF_MODL_ask_feat_edges (cyl5_obj, &edge_list);* ]- y- r W1 Q5 }* B" i1 b4 V
UF_MODL_create_blend ("3", edge_list, 0, 0, 0, 0.5, &blend4_tag); //倒圆角cyl5
- R" p; S* u& b3 |6 y9 H8 E( tUF_MODL_delete_list(&edge_list);
* a3 S+ j8 |( l. A//减体用blk
1 W( s3 h% L7 _; F/ \. ?. e% G" V4 w$ Pblock_len[0] = D2;
_( q2 s2 c. b$ {+ T# f* r Rblock_len[1] = D2;% X' y* n( C* Z" Q% a3 |7 f
block_len[2] = D2;
9 } Q( K* N1 q2 ppoint6[0]=point1[0]+atof(D)/2;
+ }* |) F* m! t2 {9 fpoint6[1]=point5[1]-8;9 ]/ X6 G4 B/ Z1 r' P, z: X- z# |: T
point6[2]=point1[2]-atof(D2)/2;0 ?- }0 O' C; w. ~3 B0 e1 h& U" E: `
UF_MODL_create_block1 (sign1, point6, block_len, &blk_obj);
, b8 s# _; W+ I' ~//消参; l* M# n, a% i( b$ i
UF_MODL_create_list(&object_list);! `5 s$ ~2 n7 R# q
UF_MODL_put_list_item(object_list, cyl1_fea);
2 k5 c+ ]$ l$ { f: {; l( iUF_MODL_delete_object_parms (object_list);! F1 i( T+ g; W6 [! y7 g
UF_MODL_delete_list(&object_list);
8 G3 \ U% ]. |% Q6 G; P} UF_terminate();7 l a( i5 q9 ?% s8 [+ P/ R$ w
return;
9 F, {. ~2 P, |+ z' O}) B# K; b/ P- q% }" g4 n
extern int ufusr_ask_unload (void)0 O i7 }& [: j* q4 K* [
{
/ m8 c4 o( H0 i; f$ k6 w3 X( e/* unload immediately after application exits*/! s( q$ G, L. v
return ( UF_UNLOAD_IMMEDIATELY ); /*via the unload selection dialog... */
) e' ?$ y: _+ m: F" W- D1 ?7 S/*return ( UF_UNLOAD_SEL_DIALOG ); */* e+ D( I8 z/ q; n8 ]7 \
/*when ug terminates... */
) K9 D+ A; g0 m# r- r/*return ( UF_UNLOAD_UG_TERMINATE ); */
5 `1 @/ J! X& f( p$ a} extern void ufusr_cleanup (void)
4 ]- o2 D0 L: j- A( p1 r{7 P% n7 x- f2 V- O& W
return;
5 p' G4 z; o, D# t3 L% o5 D}0 w" o/ k( e! b5 @ Y
int CCHF_con_cb ( int dialog_id,
( V. _3 L$ E6 V3 @" _! q7 ]7 Wvoid * client_data,8 ]$ S. j% h' A# f6 X/ w4 U
UF_STYLER_item_value_type_p_t callback_data)
: x$ G8 g! s& V2 {{/ I% R# \' E7 D
/* Make sure User Function is available. */
+ k# ?9 x+ \; b: d0 s: pUF_STYLER_item_value_type_t data; if ( UF_initialize() != 0)
1 `* I' U% h2 j- c$ ~$ |; Hreturn ( UF_UI_CB_CONTINUE_DIALOG ); /* ---- Enter your callback code here ----- */$ G* D2 _# N6 X; x0 ]; I/ ^. X
data.item_id = CCHF_OPTION_D;$ _3 K: `& m6 I8 N
data.item_attr = UF_STYLER_SUBITEM_VALUES;- k0 S$ y- A; K& N9 z
data.count = 6;+ g, N/ e. ~4 N8 e
data.value.strings = strings_D;
# e R0 b: @* z7 B& k7 x dUF_STYLER_set_value(dialog_id,&data); data.item_id = CCHF_WIDE_STRING;$ Y9 u8 n7 u& ]! ?
data.item_attr = UF_STYLER_VALUE;8 |; @( x; n5 A) t. t P
data.value.string = "三住标准/材质:S25C";: }# Z) g) `# J) ]/ m6 b- J" ^
UF_STYLER_set_value(dialog_id,&data); D="25";1 _" I; n& U; Q, [' ~
type=0;- B9 ^* e$ B! |& _; ~2 ^9 r
D_int=0; UF_terminate (); /* Callback acknowledged, do not terminate dialog */% D3 {6 I7 b9 \( @+ _! E8 s/ g/ V
return (UF_UI_CB_CONTINUE_DIALOG);6 j) |3 M3 \: D) c# o& ] s7 m
/* A return value of UF_UI_CB_EXIT_DIALOG will not be accepted */& g3 F1 h( t5 m% w) a- u
/* for this callback type. You must continue dialog construction.*/ } int CCHF_apply_cb ( int dialog_id,2 C2 B. L: P2 k/ u- B" O
void * client_data,
5 ]" S3 n) H9 | [! K! O/ g2 QUF_STYLER_item_value_type_p_t callback_data)
: h! P! I4 _5 s9 j4 f* r{
$ B1 [- U" W1 B) A' g. Q! S/* Make sure User Function is available. */
5 N5 p" ?0 z* u1 h, ~if ( UF_initialize() != 0)
* q1 L7 P" Y( I4 Preturn ( UF_UI_CB_CONTINUE_DIALOG ); /* ---- Enter your callback code here ----- */
* g- S$ g0 x# \5 I5 K, C Yuser_click=1; UF_terminate (); /* Callback acknowledged, terminate dialog */% T& v1 r! |' B1 c$ n) n# S
/* It is STRONGLY recommended that you exit your */8 K4 _- `- |3 Z5 y- K ^6 U5 M6 F
/* callback with UF_UI_CB_EXIT_DIALOG in a ok callback.*/% }/ s8 Z7 x0 s5 r& B+ v
/* return ( UF_UI_CB_EXIT_DIALOG ); */
$ a3 d% p' V/ b/ B, P( I4 Kreturn (UF_UI_CB_EXIT_DIALOG); } int CCHF_cancel_cb ( int dialog_id,
8 m& J: f9 q6 \0 r& V; ~void * client_data,
% l! i" m; d& DUF_STYLER_item_value_type_p_t callback_data)
! D$ U0 o6 s- t- n% X; t- j{: m6 e. {: E3 D, ]5 U& O
/* Make sure User Function is available. */
: O- b# D0 h6 c" V! j6 d$ n/ kif ( UF_initialize() != 0)
5 R% T! ~$ @6 R* a4 @/ [return ( UF_UI_CB_CONTINUE_DIALOG ); /* ---- Enter your callback code here ----- */7 ?! }' z: O4 w
cancel_click=1; UF_terminate (); /* Callback acknowledged, terminate dialog */$ O% |* d: e+ X. z% J& S/ v
/* It is STRONGLY recommended that you exit your */$ o; l; B( D0 b/ y
/* callback with UF_UI_CB_EXIT_DIALOG in a cancel call */
5 J- j7 r: j \1 ?/* back rather than UF_UI_CB_CONTINUE_DIALOG. */
T% b/ B& v$ o+ G# `return ( UF_UI_CB_EXIT_DIALOG ); } int CCHF_type_cb ( int dialog_id,9 e3 B- U" ?; L. v/ O0 H
void * client_data,/ M5 m2 o7 e- L1 h
UF_STYLER_item_value_type_p_t callback_data)
3 s" b# j1 r2 Z: W" K7 M{8 _7 W+ B3 O! Y9 p1 A) e+ y8 j
/* Make sure User Function is available. */
$ o/ F( t$ b7 f1 r6 xUF_STYLER_item_value_type_t data; if ( UF_initialize() != 0)$ q0 y/ `( d5 N- ?0 a2 u# E
return ( UF_UI_CB_CONTINUE_DIALOG ); /* ---- Enter your callback code here ----- */
$ b+ X" n# C* u2 edata.item_id = CCHF_TYPE;
8 P. g' J# F) w5 T: b7 @" \+ Xdata.item_attr = UF_STYLER_VALUE;& d, u! O5 v, ^/ g
UF_STYLER_ask_value(dialog_id,&data); type=data.value.integer; UF_terminate (); /* Callback acknowledged, do not terminate dialog */! Y. D' Y9 [3 [4 |. D2 R1 B1 l" j4 l
return (UF_UI_CB_CONTINUE_DIALOG); /* or Callback acknowledged, terminate dialog. */9 p2 q) t, F' y' f7 D8 F) ]" i
/* return ( UF_UI_CB_EXIT_DIALOG ); */ } int CCHF_D_cb ( int dialog_id,
1 g4 x! [" t( D+ gvoid * client_data,
4 Z; Q$ \: B( D. L7 C$ `# ^UF_STYLER_item_value_type_p_t callback_data)2 a7 g7 j$ R) v; c) t/ L
{ ~9 U9 _; b) A6 t3 ?
/* Make sure User Function is available. *// e( r. T7 Y3 S9 `! _9 ]
UF_STYLER_item_value_type_t data; if ( UF_initialize() != 0)
! G+ ~, z! Q" G( preturn ( UF_UI_CB_CONTINUE_DIALOG ); /* ---- Enter your callback code here ----- */
) O( q* R6 B; B4 d, r1 ~2 J$ Fdata.item_id = CCHF_OPTION_D;
0 k( b/ k! k$ ^. M1 @5 W. b" vdata.item_attr = UF_STYLER_VALUE;
( v/ S- `" b2 w- A4 [2 jUF_STYLER_ask_value(dialog_id,&data); D_int=data.value.integer;
, Q/ P: r; y7 j3 h$ Y, p+ ^D=strings_D[D_int]; UF_terminate (); /* Callback acknowledged, do not terminate dialog */
: C. ] J) R6 @: Breturn (UF_UI_CB_CONTINUE_DIALOG); /* or Callback acknowledged, terminate dialog. */
. A# x$ A/ u7 }4 _4 r9 N/* return ( UF_UI_CB_EXIT_DIALOG ); */ } 6 `+ A$ S5 \7 h l' |. y
1 x& g$ N( Q( t& u8 m
|