|
|

楼主 |
发表于 2014-3-7 10:16:19
|
显示全部楼层
来自: 中国江苏苏州
Radio
7 s' T4 }& j( B7 C8 _) U" S1 x Mextern void Test_set_radio_sensitivity ( int dialog_id, char *item_id,0 ~7 B* O& E( P- k: x* c
int subitem_index, logical check )4 F5 \; F8 T0 {% c( p4 o: q
{ UF_STYLER_item_value_type_t item_sensitivity;
% e* y& w! c- p7 P j# ditem_sensitivity.item_attr = UF_STYLER_SENSITIVITY;
9 D! O1 C/ O( L: Z* s6 T( N/ Fitem_sensitivity.item_id = item_id;- V o4 }9 B7 ]4 k: r
item_sensitivity.subitem_index = subitem_index;
* w: y: h: o, |6 o9 mitem_sensitivity.value.integer = check;& c: g: L- g* D- a7 h% m, Y
UF_STYLER_set_value ( dialog_id, &item_sensitivity );, L4 u& @. |- E; n! f
}! G3 Z5 y" V. y
extern void Test_read_radio ( int dialog_id, char *item_id, int *value )1 B+ v( l: _" w. [. ~& [; D) r
{ UF_STYLER_item_value_type_t Radio;* {, [8 S5 Z+ _) Q
Radio.item_attr = UF_STYLER_VALUE;
( C1 E6 {6 I. F! jRadio.item_id = item_id;. Z, U* O9 }8 {$ a$ F& `
UF_STYLER_ask_value ( dialog_id, &Radio );
! u5 g8 y: ?8 ]; j3 s*value = Radio.value.integer;$ S6 V0 s7 S6 k5 ], e8 W) m* V w
}
! s# D( i* K0 J; [/ oextern void Test_set_radio ( int dialog_id, char *item_id, int value )
" U- [, {: q* |* C: j$ ?4 B{ UF_STYLER_item_value_type_t Radio;
& e3 C9 D( R) X! mRadio.item_attr = UF_STYLER_VALUE;. _# k7 M) N" ^+ q3 \
Radio.item_id = item_id;
& I" `" d' c0 m: A1 }Radio.subitem_index = value;8 ]8 l' a8 k2 s1 ]3 |1 k( G4 {, O% t6 Q
UF_STYLER_set_value ( dialog_id, &Radio );
4 A5 y o! y3 h- u0 ]4 b}- t M+ P: n1 j
Bitmap
1 g. ]; A4 z1 M: x4 z0 _1 X& U. J7 ~extern void Test_set_bitmap ( int dialog_id, char *item_id, char *name )
. O' x* v; r( ^{ UF_STYLER_item_value_type_t bitmap;
# p3 L! o/ s, P% @/ d! U% D* p+ dbitmap.item_attr = UF_STYLER_BITMAP;
5 a) |) g4 r3 g; X( J Jbitmap.item_id = item_id;
9 V; f5 t0 z' f+ J+ S# C7 i: R' |bitmap.value.string = name;6 f$ M9 S# m5 E2 X
UF_STYLER_set_value ( dialog_id, &bitmap );$ ^$ L6 v( U4 x9 P0 m6 v
}/ u8 T. z) L7 E( o; D4 j. T! Y' l
Toggle: v; `% D; q5 Z9 V$ A7 F, R4 R2 o
extern void Test_read_toggle ( int dialog_id, char *item_id, logical *check )7 q6 f, y* Z- f' @) v
{ UF_STYLER_item_value_type_t Toggle;
# \& \. }- i2 O2 `Toggle.item_attr = UF_STYLER_VALUE;+ j3 c& S+ R4 T
Toggle.item_id = item_id;! M! b+ W! F0 v& A
UF_STYLER_ask_value ( dialog_id, &Toggle );
, i, q8 s. w6 p3 S( m; O! L7 i*check = Toggle.value.integer;* M% d' r, x3 ` M) p' ]( q
}
- X8 p! W( o$ k- f% l" lextern void Test_set_toggle ( int dialog_id, char *item_id, logical check )+ _* x: F8 L) ^: C7 S! c; X3 v) F
{ UF_STYLER_item_value_type_t Toggle;
, i! K. h: p6 r7 A/ {Toggle.item_attr = UF_STYLER_VALUE;
7 f# L5 V* _% N# @, aToggle.item_id = item_id;& T/ x5 ^8 `! M& V% T
Toggle.value.integer = check;
1 S0 p( P. y3 c; N9 n# D# R, DUF_STYLER_set_value ( dialog_id, &Toggle );; @9 L. a2 f; E) N* k
}
, o5 Q* y* m/ |. g* T6 I7 O, ^Dialog" z; h2 p; A$ V9 S! x! z
extern void Test_set_dialog_title ( int dialog_id, char *title )" d; u/ s0 S8 U+ F" F7 N# R
{ UF_STYLER_item_value_type_t dialog;$ b* }/ K: ^/ V: N) ]/ @
dialog.item_attr = UF_STYLER_LABEL;
6 X9 b- i, |; Q/ t. T: d$ Qdialog.item_id = UF_STYLER_DIALOG_INDEX;% F, f. |6 H# {7 A3 {
dialog.value.string = title;8 |: U" ]0 _# Z3 z1 u: r
UF_STYLER_set_value ( dialog_id, &dialog );
: R+ {6 |# n( P* \}
# L3 _6 k) r- c- f" E8 ]1 Zextern void Test_set_dialog_sensitivity ( int dialog_id, int item_id,
9 d& l' I& @. }9 P) x2 vlogical check )0 I! O& ]/ z& D
{ UF_STYLER_item_value_type_t dialog_sensitivity;
: W3 x, d* A# i' {dialog_sensitivity.item_attr = UF_STYLER_SENSITIVITY;
/ j# S: W- n$ K7 F, a9 H( sdialog_sensitivity.item_id = UF_STYLER_NAV_INDEX;& }. Q- P4 w2 M
if ( item_id == 1 )
4 w0 w3 k+ J4 _1 wdialog_sensitivity.subitem_index = UF_STYLER_OK_INDEX;
7 m+ n% _' ]: X1 Kelse if ( item_id == 2 )
3 P8 o( b1 O* k2 o2 Rdialog_sensitivity.subitem_index = UF_STYLER_APPLY_INDEX;3 I, T/ I0 o2 `1 L$ [( g
else if ( item_id == 3 )- y: w. Y; d+ h; C- s
dialog_sensitivity.subitem_index = UF_STYLER_BACK_INDEX;
7 |& m7 d! W, q. R: P6 welse! \0 Q' Z; [* ^
dialog_sensitivity.subitem_index = UF_STYLER_CANCEL_INDEX;+ |( s# N1 B5 I1 s$ U
dialog_sensitivity.value.integer = check;3 {' Q- n* i6 G5 J; `
UF_STYLER_set_value ( dialog_id, &dialog_sensitivity );
8 ~' p6 U) b! Z9 B}
S+ ^6 Q7 O! i' [Option& W0 [! k- A5 f
extern void Test_read_option_allitems ( int dialog_id, char *item_id,6 g6 m: a" q0 f7 l) n# f( T$ f
int *count, char ***strings )3 b6 g4 m7 a: a/ I/ U' u% _
{ UF_STYLER_item_value_type_t Option; int i, error = 0;
5 \* u' T" F* u* HOption.item_attr = UF_STYLER_SUBITEM_VALUES;
6 F2 S; N5 V) [- F$ [Option.item_id = item_id;$ y4 u, K( V+ P* a, m% T
Option.indicator = UF_STYLER_STRING_PTR_VALUE;. @- s( E, r9 ] a6 `* p
UF_STYLER_ask_value ( dialog_id, &Option );
3 U" F. L2 H, N# i9 s5 v3 Z! H(*count) = Option.count;
) B j( e8 i/ U1 K(*strings) = (char **) UF_allocate_memory ( Option.count * sizeof ( char * ), &error );" D$ q2 \# e. n- y) M/ }* ^
for ( i = 0; i < Option.count; i ++ )
4 F0 w& y6 c& d" q6 ?0 W1 w{ (*strings) = (char *)UF_allocate_memory( 133*sizeof(char),&error);
5 W# ?2 x; S8 H) |sprintf ( (*strings), "%s", Option.value.strings );
+ M" |! d0 Q4 ~. q$ j- r} UF_STYLER_free_value ( &Option );
5 r2 I7 H0 x# A% z2 v: e, p) t8 g}9 e! @! o% B3 N/ {1 N
extern void Test_read_option_activeitem ( int dialog_id, char *item_id,& V; y6 w1 L2 R) w* d
int *value )
0 h1 L. H( R9 c3 {1 P ?{ UF_STYLER_item_value_type_t Option;/ G0 J( y) V8 Q4 o/ o z
Option.item_attr = UF_STYLER_VALUE;, | b% ^+ B2 X/ ?9 j' V
Option.item_id = item_id;0 W& Z9 P" m) T$ ~; w; @
UF_STYLER_ask_value ( dialog_id, &Option );
7 i* j+ U7 T# M2 Q3 Y# I" u* p*value = Option.value.integer;
3 u- @9 z _9 A3 Z# C, R, \}
# L, R: G; X1 q( g8 p9 g( w4 mextern void Test_set_option_allitems ( int dialog_id, char *item_id, _0 o# I7 {, D0 ?. Y+ T
int count, char **strings )/ K+ J2 S8 I* i8 |3 ]% T! a
{ UF_STYLER_item_value_type_t Option; int i, error;: q( f9 |/ g6 g$ [
Option.item_attr = UF_STYLER_SUBITEM_VALUES;$ m6 B5 k& V; D; ]3 V1 w' U5 w
Option.item_id = item_id;- s- R* u. L7 J% s
Option.count = count;
, z( L! C1 C9 W! o x( P. }Option.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );
* j2 ~6 ^7 L- L& D i) z: zfor ( i = 0; i < count; i ++ )2 j, ?; X0 E+ _. j# p
{ Option.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );
/ C# i9 b' a6 @' F: fsprintf ( Option.value.strings, "%s", strings );+ \) o* H6 E( w+ k: F! {
} UF_STYLER_set_value ( dialog_id, &Option );
3 @, L6 N' V9 l* OUF_STYLER_free_value ( &Option );
" Z v& R5 Q9 a$ z( n4 F h}
: ]# M- f4 X4 _( f7 gextern void Test_set_option_activeitem ( int dialog_id, char *item_id,
+ r% s- m1 r: k) R. j5 w( }+ ~int value )+ }- o) X/ [$ ]5 y
{ UF_STYLER_item_value_type_t Option;- n8 f/ J, ?7 ]: c: h
Option.item_attr = UF_STYLER_VALUE;
/ P7 g; D+ `4 h1 x6 v6 Q+ ROption.item_id = item_id;
" G: B+ N8 i. E: o$ EOption.subitem_index = value;
! C# l! C; t2 u" \, hUF_STYLER_set_value ( dialog_id, &Option );# Y5 l( B7 W! X7 x1 S; W
}
' o m5 g6 a# e) B7 ~/ dSingle Select List$ @+ V- Y2 }6 R }4 p
extern void Test_read_singleselectlist_allitems ( int dialog_id,
: P1 y8 m2 j& R1 ~& _char *item_id, int *count, char ***strings )+ o2 L+ i) g* P0 C% r+ l
{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;. V2 |& c \0 [$ g# e, T; R
Singleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;
! _' @, Y C. a* o. w$ f3 ESingleselectlist.item_id = item_id;% K" M6 R; D$ C+ x
UF_STYLER_ask_value ( dialog_id, &Singleselectlist );! m- y) O& I' D: a
(*count) = Singleselectlist.count;4 A5 ^/ l* a1 P5 I7 V1 A
(*strings) = (char **) UF_allocate_memory ( Singleselectlist.count * sizeof ( char * ), &error );
& W; h& _' j8 t$ ?" O0 ]0 G0 @1 Efor ( i = 0; i < Singleselectlist.count; i ++ )0 V) F- U0 d) B. e. e
{ (*strings) = (char *)UF_allocate_memory(133*sizeof(char),&error);
5 O6 r) n" n3 n' ~1 D$ A5 g7 l7 }sprintf ( (*strings), "%s", Singleselectlist.value.strings );
3 D1 E# h, ^. w& O' W} UF_STYLER_free_value ( &Singleselectlist );
" t# G8 c+ C q}
- g* x! N0 W# p5 Aextern void Test_read_singleselectlist_activeitem ( int dialog_id,
9 o+ T0 T( @3 |% H+ d/ o/ Jchar *item_id, int *value, char *string )) P& r" M- `2 s( z! b
{ UF_STYLER_item_value_type_t Singleselectlist;; [$ h8 i4 v. k. S8 X
Singleselectlist.item_attr = UF_STYLER_VALUE;1 d; K. b2 B0 I% w
Singleselectlist.item_id = item_id;+ s8 a d1 N' i0 k' k# B: W3 y: u
Singleselectlist.indicator = UF_STYLER_INTEGER_VALUE;( @/ x2 K0 I1 I& C
UF_STYLER_ask_value ( dialog_id, &Singleselectlist );
, M' ~" g, S) @* v0 s0 I*value = Singleselectlist.value.integer;% z3 j8 B4 r/ g/ E$ c
Singleselectlist.indicator = UF_STYLER_STRING_VALUE;
( ^3 v' x9 l8 d( qUF_STYLER_ask_value ( dialog_id, &Singleselectlist );
8 k. t. u$ O5 y- `- _- W4 O- B1 d5 gsprintf ( string, "%s", Singleselectlist.value.string );% p# Q, q3 a# M b- f& F3 u
}" f: b6 c" k3 ?" }; ~+ q
extern void Test_set_singleselectlist_allitems ( int dialog_id, char *item_id,
- g$ O7 O8 p Nint count, char **strings )
6 i* i8 { c4 s: t: h{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;- X4 P: ^3 [$ J( Y
Singleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;
' [; O. x$ f7 b- l+ O: ~9 U8 Y3 C; f) |/ dSingleselectlist.item_id = item_id;- A5 N6 q) h% D
Singleselectlist.count = count;* b& c! e% A# P0 O1 D. x! P6 A
Singleselectlist.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );
' }5 [4 M" L* Q: `5 }for ( i = 0; i < count; i ++ )) f9 ~: d2 s) h& R
{ Singleselectlist.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );8 {0 a4 ]& K8 ~7 u) M/ g
sprintf ( Singleselectlist.value.strings, "%s", strings );
" Y1 X0 }& [; J0 ]2 i}
1 `' l0 R. ^$ x2 u ]UF_STYLER_set_value ( dialog_id, &Singleselectlist );
4 L7 Z- T% H: m- I7 JUF_STYLER_free_value ( &Singleselectlist );
6 f" `8 _. m$ y}
. F+ z0 V; a) K4 w. w( hextern void Test_set_singleselectlist_focusitem ( int dialog_id, char *item_id,
) r$ y* ^' y. e1 Q! k# X1 xint value )
/ R" a. p& t! K P$ y! z( _, m{ UF_STYLER_item_value_type_t Singleselectlist;
: \" S: Z e4 L+ ]$ U% T, ^: ySingleselectlist.item_attr = UF_STYLER_VALUE;; k( t+ C$ m: Q j
Singleselectlist.item_id = item_id;. |. ? b6 Z' @
Singleselectlist.subitem_index = value < 0 ? UF_STYLER_NO_SUB_INDEX : value;, K; H8 A" `) z# o0 l' L
UF_STYLER_set_value ( dialog_id, &Singleselectlist );% B6 l. @( ]' X- e0 W A9 P* V
}
# N+ I, a( J) h" T" [' S* EProperty Pages
3 q# f4 ~+ N5 d! qextern void Test_read_propertypages_activepage ( int dialog_id,+ t4 }' ^' a6 }
int *active_page )
% I' _1 `' g& T. G! w{ UF_STYLER_item_value_type_t Propertypages;
% z% {* J" b, b' W6 APropertypages.item_attr = UF_STYLER_ACTIVE_PAGE;
" T: b/ [) A" L" pPropertypages.item_id = UF_STYLER_DIALOG_INDEX;2 U6 a7 f h. H6 e
UF_STYLER_ask_value ( dialog_id, &Propertypages );& c+ q, g" A+ B. b
*active_page = Propertypages.value.integer;
, S j2 V3 B2 ?8 F7 N. ?7 Y}
" I$ M B' g9 J2 j4 n& S: Oextern void Test_set_propertypages_activepage ( int dialog_id,# I! A6 k3 z" _3 o
int active_page )
6 z) s7 G, [8 L M( `7 @6 p& S/ W{ UF_STYLER_item_value_type_t Propertypages;
: U4 {0 v7 H$ g/ _2 N' kPropertypages.item_attr = UF_STYLER_ACTIVE_PAGE;
) K1 I3 N+ h8 Y. uPropertypages.item_id = UF_STYLER_DIALOG_INDEX;
5 u: o) ]/ Z$ XPropertypages.value.integer = active_page; R0 N6 l5 I. R( R, Y9 _
UF_STYLER_set_value ( dialog_id, &Propertypages );* v& }5 N5 B& C9 g
}
?% s) L$ @; r' z5 o3 yColor Tool
6 G5 ]7 w) ]; S+ X" Rextern void Test_read_colortool_activecolor ( int dialog_id,
" f3 K) g& A' i# F7 Ychar *item_id, int *active_color )
5 _ O* D. W" n4 b7 T# O{ UF_STYLER_item_value_type_t Colortool;
2 i: X9 w }8 A; V6 x' l5 cColortool.item_attr = UF_STYLER_VALUE;
: N& L5 b* W6 K3 H3 |/ nColortool.item_id = item_id;
! _: g V1 b+ D6 d! X4 o; X% f. VUF_STYLER_ask_value ( dialog_id, &Colortool );4 I+ N& L- [4 G( [# G, a& }
*active_color = Colortool.value.integer;
6 A! f/ W F( h! \: T( z}3 M1 o3 S: u' Q' b
extern void Test_set_colortool_activecolor ( int dialog_id,
E8 U2 [% V6 Z3 [, [+ n* kchar *item_id, int active_color )
. C) \: \( \4 Y/ Y* U{ UF_STYLER_item_value_type_t Colortool;6 f; P1 c: _: Q& ^% _
Colortool.item_attr = UF_STYLER_VALUE;% A+ u- L) b# k* A5 S1 z( f! x
Colortool.item_id = item_id;" s5 K' E. T* D! f* V1 J
Colortool.value.integer = active_color;
, X& \! {& ^5 qUF_STYLER_set_value ( dialog_id, &Colortool );
, a( P- y2 `0 D9 w9 k0 g, R} |
|