|
|

楼主 |
发表于 2014-3-7 10:16:19
|
显示全部楼层
来自: 中国江苏苏州
Radio1 B$ y5 m# q2 R* H& }) A* c& o
extern void Test_set_radio_sensitivity ( int dialog_id, char *item_id,5 e7 {" a1 a2 _: E$ c* n
int subitem_index, logical check )8 a% m) ~; B; |/ }" K# ]
{ UF_STYLER_item_value_type_t item_sensitivity;: d0 f, S9 q4 B
item_sensitivity.item_attr = UF_STYLER_SENSITIVITY;8 j# Y8 _ G) O* A5 P5 i
item_sensitivity.item_id = item_id;
2 F7 D9 Y' A, g# fitem_sensitivity.subitem_index = subitem_index;
* p2 I* D' x; B v+ f! Q& q* iitem_sensitivity.value.integer = check;
5 i- P" m7 l. x2 K1 h" vUF_STYLER_set_value ( dialog_id, &item_sensitivity );
- R2 {2 p' W6 j* j% `}
! v$ {+ V" `* R2 K/ jextern void Test_read_radio ( int dialog_id, char *item_id, int *value )1 n" W# t/ M; {
{ UF_STYLER_item_value_type_t Radio;
& B2 L% }" J& y/ n: w/ o# URadio.item_attr = UF_STYLER_VALUE;
" h8 H# X6 w, N3 rRadio.item_id = item_id;
3 d* ~8 [- k: c0 _' lUF_STYLER_ask_value ( dialog_id, &Radio );
" Y8 p' O8 `) O. b: [$ w! S*value = Radio.value.integer;
5 D. e0 j1 l; ^* D/ v}
! w+ J4 h5 D* M" @ lextern void Test_set_radio ( int dialog_id, char *item_id, int value )
2 l7 L' y8 H7 N+ H% d5 V/ C7 a' a{ UF_STYLER_item_value_type_t Radio;
, b- e8 G* W" |Radio.item_attr = UF_STYLER_VALUE;3 w) n+ B6 t, C7 x" k# \& R
Radio.item_id = item_id;* a# }+ b+ J5 q
Radio.subitem_index = value;2 e7 C) b# n1 T2 c7 N u: ?. p
UF_STYLER_set_value ( dialog_id, &Radio );
6 ?. o/ h- w9 z1 ^ {}
/ Q$ ]9 h* i9 N8 n: KBitmap
7 @/ `1 t( y2 b% E* Textern void Test_set_bitmap ( int dialog_id, char *item_id, char *name )% b) t6 y8 H9 R! E: g
{ UF_STYLER_item_value_type_t bitmap;
x8 {. q2 f9 I: y. N) S W, {bitmap.item_attr = UF_STYLER_BITMAP;
5 G' I8 e/ P5 s" Ybitmap.item_id = item_id;
8 H# I/ f$ ?# B6 e8 V+ bbitmap.value.string = name;
n g; m! C+ O$ u, A( y& b9 OUF_STYLER_set_value ( dialog_id, &bitmap );
% _9 y$ j# @! r" P}
( S8 H0 D$ E/ e/ d9 YToggle
: G7 s9 Q$ u* Hextern void Test_read_toggle ( int dialog_id, char *item_id, logical *check )
2 f, {9 f' u- k: J- q' b{ UF_STYLER_item_value_type_t Toggle;
5 P) S5 V) ~# r; Y+ }$ Z" rToggle.item_attr = UF_STYLER_VALUE;
' W: t7 a6 B2 Q7 b6 V6 S( ZToggle.item_id = item_id;/ k& P, b% p) d
UF_STYLER_ask_value ( dialog_id, &Toggle );
, D. R7 j( u! f' d! M*check = Toggle.value.integer;; J" O' ?9 L' E( S+ _5 m
}
8 ^0 B2 i0 v6 K6 {0 Q. o: uextern void Test_set_toggle ( int dialog_id, char *item_id, logical check ): Y. ^& k- X/ i3 ]/ E5 X5 X+ ^
{ UF_STYLER_item_value_type_t Toggle;
$ P$ l) T. B1 G( `Toggle.item_attr = UF_STYLER_VALUE;- \$ {, B: \6 X( ~' n! R3 U) q
Toggle.item_id = item_id;
+ W# u5 e& ?9 _Toggle.value.integer = check;. [$ [5 M4 [3 t; V. B
UF_STYLER_set_value ( dialog_id, &Toggle );
( h4 K9 T% ?, _! ~1 @2 O}) B$ v* C( C# t: t
Dialog
3 K [2 A# L, Z# J* sextern void Test_set_dialog_title ( int dialog_id, char *title )
4 ^8 s% [2 d1 c9 _* g{ UF_STYLER_item_value_type_t dialog;+ E% t V8 k0 K- k5 }( O$ Z
dialog.item_attr = UF_STYLER_LABEL;
4 `9 Z8 N- [0 C* m: ?6 d* B7 hdialog.item_id = UF_STYLER_DIALOG_INDEX;4 l( L; q& a3 o
dialog.value.string = title;7 w' K7 a, T* M! X* T- w
UF_STYLER_set_value ( dialog_id, &dialog );$ C" Q# p5 T6 ~! `) W: l
}. a$ O- Q g8 R" i$ f) e9 z/ w% }$ A
extern void Test_set_dialog_sensitivity ( int dialog_id, int item_id,
( v: `) \ G1 V- t" r8 W# m# I5 hlogical check )+ h0 }, y) a; Y9 }! s+ a
{ UF_STYLER_item_value_type_t dialog_sensitivity;
9 ~" |3 k" C) _7 o0 ~/ \; }dialog_sensitivity.item_attr = UF_STYLER_SENSITIVITY;
) H- b/ y, X _ tdialog_sensitivity.item_id = UF_STYLER_NAV_INDEX;5 g1 W8 O n+ E) l& c/ |
if ( item_id == 1 )
# r" Y7 M; @ p, i( e [) Rdialog_sensitivity.subitem_index = UF_STYLER_OK_INDEX;6 d5 t- C) g# s0 B( M' L
else if ( item_id == 2 )6 w1 F. q$ Y7 B7 _
dialog_sensitivity.subitem_index = UF_STYLER_APPLY_INDEX;
+ S& Q' S! Z7 U6 V( P! E' relse if ( item_id == 3 )6 U$ v# z% s$ g: Q! L6 \5 V
dialog_sensitivity.subitem_index = UF_STYLER_BACK_INDEX;
3 G& d7 a0 n! }; d5 u" Delse
! {' O5 d% I, q/ Mdialog_sensitivity.subitem_index = UF_STYLER_CANCEL_INDEX;2 ^: v% M* N5 `5 M
dialog_sensitivity.value.integer = check;
8 ^+ T ^3 w' L; `" j: O, JUF_STYLER_set_value ( dialog_id, &dialog_sensitivity );
" c$ S9 d5 \2 ?+ z}) u8 d! |9 G/ V& Z" P6 }6 n
Option
, r2 u% A7 W/ B5 @" `) R+ z! x# zextern void Test_read_option_allitems ( int dialog_id, char *item_id,
" S3 F( X e- j O; h8 z1 Qint *count, char ***strings )$ [ V( H1 ~* R9 r4 ~8 M- F; }
{ UF_STYLER_item_value_type_t Option; int i, error = 0;0 s1 f& Q' H: z9 F2 b
Option.item_attr = UF_STYLER_SUBITEM_VALUES;
& t N. M Z0 [$ P( \% NOption.item_id = item_id;
. E$ N9 ]1 d8 Y3 T3 o4 eOption.indicator = UF_STYLER_STRING_PTR_VALUE;: c5 A; y6 {5 l# u
UF_STYLER_ask_value ( dialog_id, &Option );1 X# N7 R8 F. N
(*count) = Option.count;9 H7 S- |7 S) S2 A2 Y
(*strings) = (char **) UF_allocate_memory ( Option.count * sizeof ( char * ), &error );
! k0 D$ o. {4 [. F4 Mfor ( i = 0; i < Option.count; i ++ )4 p: S! O2 i7 d0 L: t' b3 k$ B' f4 ?; b& X
{ (*strings) = (char *)UF_allocate_memory( 133*sizeof(char),&error);
: }5 g3 g# T9 W0 x2 [& \2 F4 Ssprintf ( (*strings), "%s", Option.value.strings );
: c5 z# ~$ H' Q$ [" H% M} UF_STYLER_free_value ( &Option );; ?' C# }2 U9 b7 b
}
( e) z4 W) m* S; x+ zextern void Test_read_option_activeitem ( int dialog_id, char *item_id,/ b+ w" W Q, h. K7 Y
int *value )
4 k2 c) x7 m5 c2 w2 p4 ~& a{ UF_STYLER_item_value_type_t Option;3 K8 X) G' x! t2 y
Option.item_attr = UF_STYLER_VALUE;1 R# p% ]/ x2 C6 o _5 W) Z% R
Option.item_id = item_id;
1 {: e/ a( g& @* Q' c1 h( }. SUF_STYLER_ask_value ( dialog_id, &Option );; D# r3 A8 o" ]. [2 J7 q- F8 w* ]
*value = Option.value.integer;* P8 t8 c) s% v
}3 E3 l2 p& p z* S X6 P
extern void Test_set_option_allitems ( int dialog_id, char *item_id,
! w3 {) w' P: [( _# h4 V8 |int count, char **strings )
2 k; q8 Y# ]6 B+ O: a{ UF_STYLER_item_value_type_t Option; int i, error;
, N0 y! D( G4 C GOption.item_attr = UF_STYLER_SUBITEM_VALUES;
3 r+ B1 @! f1 i! N7 ^3 @Option.item_id = item_id;
5 h! P3 A$ s5 AOption.count = count;; H+ E/ t( G4 W7 ^
Option.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );1 b7 y" M2 J2 a- \7 E; y, K" p# m
for ( i = 0; i < count; i ++ )
7 g/ [4 ]# k8 C& T# I& e{ Option.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );
( x Z* u/ C1 T4 p# ~" Wsprintf ( Option.value.strings, "%s", strings );2 Q: J- w. u0 ^( r u6 d) O2 u
} UF_STYLER_set_value ( dialog_id, &Option );/ Y" r5 i+ A& z# z5 M
UF_STYLER_free_value ( &Option );
/ D) J' ]6 }1 S}
$ ~* y7 y* D$ Gextern void Test_set_option_activeitem ( int dialog_id, char *item_id,
- R2 i+ K+ H" \# M+ j4 u6 _/ _int value )* r% n1 S+ A% x; v; F. x: t, l. v4 O
{ UF_STYLER_item_value_type_t Option;' n0 j* h" @) E$ O- ` P
Option.item_attr = UF_STYLER_VALUE;
. {, J' `2 ^0 T# U$ A7 ^Option.item_id = item_id;
% L& W1 t4 b) n7 t5 ?( h$ lOption.subitem_index = value;) n! n2 ~' _/ W5 a1 l" K5 p5 e
UF_STYLER_set_value ( dialog_id, &Option );
# ?+ @! C- Y+ w2 K. G, c+ b}
! N! m1 ]' g+ ?4 S' _3 ISingle Select List- b+ U8 ?4 {* M) u! j. e
extern void Test_read_singleselectlist_allitems ( int dialog_id,9 ]( _8 J% O n9 F9 l
char *item_id, int *count, char ***strings )
' O% r" o1 h) E1 E" s{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;" I2 L" e9 x2 M% K7 _% l7 z
Singleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;$ c0 Q/ s( N: \, c- p% o& o
Singleselectlist.item_id = item_id;
4 G& J d/ l: c" F: w$ s. uUF_STYLER_ask_value ( dialog_id, &Singleselectlist );. K' g! \3 ~( B$ ^
(*count) = Singleselectlist.count;* Q- j) v' x8 W T) A
(*strings) = (char **) UF_allocate_memory ( Singleselectlist.count * sizeof ( char * ), &error );- j- ]) C# e/ d3 f5 Y) @' J( G. T
for ( i = 0; i < Singleselectlist.count; i ++ )7 Y, k6 t$ Q' Y$ t2 x5 o
{ (*strings) = (char *)UF_allocate_memory(133*sizeof(char),&error);: F+ f2 n/ u { R( f( q
sprintf ( (*strings), "%s", Singleselectlist.value.strings );
0 X" s" ^$ ?" p( N! f} UF_STYLER_free_value ( &Singleselectlist );$ @1 |1 p* b ^: ~4 C1 n
}
5 L1 X' `, F: Yextern void Test_read_singleselectlist_activeitem ( int dialog_id,* }* A; @9 X3 ]# q2 h) u/ L5 |
char *item_id, int *value, char *string ), y9 ^5 r- r& z( N
{ UF_STYLER_item_value_type_t Singleselectlist;
# r: p; |/ [; O0 ]Singleselectlist.item_attr = UF_STYLER_VALUE;" n' I6 Q: ] B6 _
Singleselectlist.item_id = item_id;- b9 m |$ p6 V! ^/ |: M
Singleselectlist.indicator = UF_STYLER_INTEGER_VALUE;
! F& h7 U& P2 z- O( YUF_STYLER_ask_value ( dialog_id, &Singleselectlist );; e; } y4 p- k* e
*value = Singleselectlist.value.integer;
& @" \# Z, Y# J# m) ]- ^Singleselectlist.indicator = UF_STYLER_STRING_VALUE;
* r- K$ g x3 G" w9 KUF_STYLER_ask_value ( dialog_id, &Singleselectlist );( T8 h6 O8 C3 ^8 W
sprintf ( string, "%s", Singleselectlist.value.string );
. N+ O: I2 u) C7 B4 w}
0 A8 ]+ u: {8 h: z$ j4 d& _extern void Test_set_singleselectlist_allitems ( int dialog_id, char *item_id,
$ _$ u( u) R5 m' `) ~# Bint count, char **strings )
3 F1 q! `6 O# n3 ~{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;
3 v, T" o. I$ T) @0 |( o3 xSingleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;! H5 L( c9 g2 e) Q' ]3 n. d* @
Singleselectlist.item_id = item_id;' n+ H' B' x6 c+ S+ X6 v
Singleselectlist.count = count;0 T0 J, x2 [# {' r( g8 u8 o
Singleselectlist.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );
: X- C" h7 X; [, N+ C' h' Tfor ( i = 0; i < count; i ++ )! i2 b3 M- [5 D
{ Singleselectlist.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );
, ]0 H5 x, n6 K- v2 P7 hsprintf ( Singleselectlist.value.strings, "%s", strings );; Z/ D$ Q) Y& v5 X3 ]6 E$ Z( X$ r
}- R: b% c/ F# T& L/ q8 ^8 B+ ^% j* K
UF_STYLER_set_value ( dialog_id, &Singleselectlist );: D e3 Z: C( |9 i; |
UF_STYLER_free_value ( &Singleselectlist );
) |8 G' b* `+ B# D- Q}
6 f- g% ?$ P fextern void Test_set_singleselectlist_focusitem ( int dialog_id, char *item_id,
`5 z! j8 |( V5 e4 l7 B0 Rint value ) H6 Q6 o5 p, z& U, E
{ UF_STYLER_item_value_type_t Singleselectlist;' C- x. l [8 t& m8 |
Singleselectlist.item_attr = UF_STYLER_VALUE;
# g5 a: ^0 l% j& c$ N$ ISingleselectlist.item_id = item_id;5 t7 i# Y! ^# L8 B- _& T
Singleselectlist.subitem_index = value < 0 ? UF_STYLER_NO_SUB_INDEX : value;
' E ?2 h8 }4 U" A9 TUF_STYLER_set_value ( dialog_id, &Singleselectlist );
{1 ]+ m0 z, b- R}' j( o% B6 m6 W7 k. U, X7 D
Property Pages+ V, R& J9 N/ i$ J# L0 Y. h
extern void Test_read_propertypages_activepage ( int dialog_id,4 Q( [+ ]- y9 v1 x1 `0 h0 ]9 ~
int *active_page )% M5 A" u% U1 T) g8 I% F* |! w/ E5 C
{ UF_STYLER_item_value_type_t Propertypages;. W/ E4 m1 r2 X Y/ j! M3 ]9 T
Propertypages.item_attr = UF_STYLER_ACTIVE_PAGE;
( F4 }" w" k# z# ^$ x# mPropertypages.item_id = UF_STYLER_DIALOG_INDEX;
; V9 _3 }& Y/ G2 A) }" W) l$ iUF_STYLER_ask_value ( dialog_id, &Propertypages );
; b/ `( r# b" D% S*active_page = Propertypages.value.integer;3 w. W S" R3 y; [6 G
}. @- c! n3 B. E" v
extern void Test_set_propertypages_activepage ( int dialog_id,- p' h* {" ~1 u Q: U# S* ~3 `* `% _
int active_page )
* ^5 E5 s( o- f0 Q: H{ UF_STYLER_item_value_type_t Propertypages;
4 v' n# p9 b2 m( r- q3 Q- e6 P8 k+ cPropertypages.item_attr = UF_STYLER_ACTIVE_PAGE;
" ^' A! w) `; [" E! c: ?, r+ yPropertypages.item_id = UF_STYLER_DIALOG_INDEX;# G; ?2 w# b( q' g
Propertypages.value.integer = active_page;& J9 H. k D; e7 S- k8 v
UF_STYLER_set_value ( dialog_id, &Propertypages );* b$ `! d8 m# ^' z/ u3 ~6 B
}
. I& k% y. }. F/ ~0 N) ]Color Tool5 I5 _5 D! B( n) \
extern void Test_read_colortool_activecolor ( int dialog_id,5 K$ v' n+ m: c
char *item_id, int *active_color ), [# o5 t* {& }) B/ z% n
{ UF_STYLER_item_value_type_t Colortool;& `! O2 w' M$ P* t
Colortool.item_attr = UF_STYLER_VALUE;) ~, a! o4 }4 W) i0 Y
Colortool.item_id = item_id;/ d, R* `* T5 Y) \! r O
UF_STYLER_ask_value ( dialog_id, &Colortool );( L$ f7 Y% l$ L6 \4 f/ |9 w4 K
*active_color = Colortool.value.integer;
5 |2 j% a( f& V% ~9 a! H& c! ~}! U2 H) F" e0 W2 M2 r9 {% }
extern void Test_set_colortool_activecolor ( int dialog_id,
. d+ q d9 J: f4 M; r' X3 x# schar *item_id, int active_color )
' U+ X5 d; h" E5 Z c w: X# u{ UF_STYLER_item_value_type_t Colortool;0 P0 G' B# Z: ?' W
Colortool.item_attr = UF_STYLER_VALUE;0 W( A+ E7 c* ^
Colortool.item_id = item_id;
5 f* D: w. ^2 wColortool.value.integer = active_color;3 o& y1 w, K9 b
UF_STYLER_set_value ( dialog_id, &Colortool );/ I: h9 T: o# ?4 M( l) p4 l. t
} |
|