|
|

楼主 |
发表于 2014-3-7 10:16:19
|
显示全部楼层
来自: 中国江苏苏州
Radio3 U S+ w, t' x* e* W/ O
extern void Test_set_radio_sensitivity ( int dialog_id, char *item_id,% i/ \8 o4 J, D9 \
int subitem_index, logical check )
p* o/ c* B9 U/ s9 J{ UF_STYLER_item_value_type_t item_sensitivity;. i C! Z2 S v w9 G" A$ b
item_sensitivity.item_attr = UF_STYLER_SENSITIVITY;
3 l# @3 c6 I1 V) o# y& [item_sensitivity.item_id = item_id;6 N6 c+ C5 Y8 D1 v A |
item_sensitivity.subitem_index = subitem_index;
+ R# ~$ u6 f" m' |) F; ritem_sensitivity.value.integer = check;
3 u- S- V5 u( XUF_STYLER_set_value ( dialog_id, &item_sensitivity );, u( h4 _) r% Q7 D1 f! W1 G4 I
}) ^, K0 f" L0 F j0 T: L
extern void Test_read_radio ( int dialog_id, char *item_id, int *value )& D( \2 E4 q; h
{ UF_STYLER_item_value_type_t Radio;
% |- w$ D3 Q# q; n; ]0 K8 gRadio.item_attr = UF_STYLER_VALUE;
, Z5 U5 v3 t; Y% j) lRadio.item_id = item_id;
6 {2 ^6 t3 ]/ z+ v7 xUF_STYLER_ask_value ( dialog_id, &Radio );
3 H" m9 r) ~2 z( R9 A0 P*value = Radio.value.integer; G: U$ f$ J, P6 c0 u
}
4 C% Z0 A8 L* }: ?. K# Uextern void Test_set_radio ( int dialog_id, char *item_id, int value ): H. ` S0 O! N
{ UF_STYLER_item_value_type_t Radio;, ^$ Z, o2 H$ H# r" n: ~; K5 `7 {9 T
Radio.item_attr = UF_STYLER_VALUE;" _) r. F( H3 @8 {1 T% s0 `5 J+ m
Radio.item_id = item_id;; P1 \3 K, X1 \% ^
Radio.subitem_index = value;' \7 R1 B" Q4 H
UF_STYLER_set_value ( dialog_id, &Radio );/ v5 J( c. V5 l
}& W2 O( ]5 p2 s# x9 o4 u8 q: `
Bitmap( [# _' W- u9 `/ K1 I
extern void Test_set_bitmap ( int dialog_id, char *item_id, char *name )
2 ~5 A$ Q! E X{ UF_STYLER_item_value_type_t bitmap;
. A) _$ @' m' y/ xbitmap.item_attr = UF_STYLER_BITMAP;+ y4 l" O& Q0 @) U" |5 ]- v
bitmap.item_id = item_id;
1 p1 Z% r7 G* y# m+ |) U* jbitmap.value.string = name;
( |: l+ Q. x- t6 a6 M2 c& t) g eUF_STYLER_set_value ( dialog_id, &bitmap );
; v: r- c, L4 a+ f) N* a5 P}
% y& Q) K0 ?+ a7 Q1 ?) M4 [Toggle
4 m- \7 T5 w( ~& X, zextern void Test_read_toggle ( int dialog_id, char *item_id, logical *check )
& e; v J c5 Z, I+ J# i2 D{ UF_STYLER_item_value_type_t Toggle;& i+ W9 }- @; ~" K' y
Toggle.item_attr = UF_STYLER_VALUE;" e1 L5 j8 B+ w7 p: T4 @" z
Toggle.item_id = item_id;' ^# C! f: w8 Y) y% l7 T
UF_STYLER_ask_value ( dialog_id, &Toggle );
; o6 u; V6 g$ V*check = Toggle.value.integer;
# `7 Y' I f, `# S# M}
( U4 D! n+ x# ~7 Q5 h7 R; y" hextern void Test_set_toggle ( int dialog_id, char *item_id, logical check )9 c1 \) |) |+ T' r
{ UF_STYLER_item_value_type_t Toggle;( m2 L L* E8 i/ J% r
Toggle.item_attr = UF_STYLER_VALUE;3 e+ s. E# x# g( _( g
Toggle.item_id = item_id;6 u& t- u) s) b! M. e! |- h
Toggle.value.integer = check;
9 y- s* {+ d1 e, `" m' h+ V0 G! ]UF_STYLER_set_value ( dialog_id, &Toggle );
3 ]5 P4 {( a" G( F}
; y R P( T8 w6 e. ? WDialog8 k* z. t! t! r$ Z B. H! u8 M
extern void Test_set_dialog_title ( int dialog_id, char *title )
: r7 D7 F3 k. z. Y7 D5 L{ UF_STYLER_item_value_type_t dialog;
7 j! q) n! G& Z1 Cdialog.item_attr = UF_STYLER_LABEL;
! i$ D' V8 m! Edialog.item_id = UF_STYLER_DIALOG_INDEX;
. T+ }* q; Z& e. Jdialog.value.string = title;
% l% h- R6 R9 BUF_STYLER_set_value ( dialog_id, &dialog );
0 j1 j0 X0 z3 l+ g}) q" N" l9 k' c! ~2 [# X5 f1 P
extern void Test_set_dialog_sensitivity ( int dialog_id, int item_id,
2 m: M5 P5 Z2 ?7 ]logical check )2 K) `7 L" x z
{ UF_STYLER_item_value_type_t dialog_sensitivity;8 w( {5 e' D2 @. A$ c3 W7 U9 R
dialog_sensitivity.item_attr = UF_STYLER_SENSITIVITY;
0 [- F9 i9 l: ?dialog_sensitivity.item_id = UF_STYLER_NAV_INDEX;- U, J f/ S& c
if ( item_id == 1 )1 q" J7 x5 Z. F, f0 |- o
dialog_sensitivity.subitem_index = UF_STYLER_OK_INDEX;+ z8 l3 c4 Y( a9 k
else if ( item_id == 2 )
" O' E6 ~" f( ~' h. J$ E0 idialog_sensitivity.subitem_index = UF_STYLER_APPLY_INDEX;, d3 F; s) \) q7 j
else if ( item_id == 3 )
( h0 [$ u' M% W7 n: }; Zdialog_sensitivity.subitem_index = UF_STYLER_BACK_INDEX;
' E' @, V# Z& C/ _- Lelse, G4 H( I- \2 `5 R) d6 O
dialog_sensitivity.subitem_index = UF_STYLER_CANCEL_INDEX;0 @) H; O) g2 Z2 T: v) k' h) O& N2 `
dialog_sensitivity.value.integer = check;
4 h$ T7 ?3 n. Y( XUF_STYLER_set_value ( dialog_id, &dialog_sensitivity );
D7 r/ G4 X: _* Y1 k" Y}& i3 D' Y0 D- ` i1 t
Option4 x3 Q2 R1 y. n: }# a: A$ ?+ n
extern void Test_read_option_allitems ( int dialog_id, char *item_id,
& Y2 @" o* V D' F% Q2 cint *count, char ***strings ); P5 G( I$ L: i" u8 O, w' d
{ UF_STYLER_item_value_type_t Option; int i, error = 0;. G2 d5 i9 S0 H
Option.item_attr = UF_STYLER_SUBITEM_VALUES;
6 {/ _) D/ K5 ^Option.item_id = item_id; ?3 `) w$ ^: _ u1 Q W/ @
Option.indicator = UF_STYLER_STRING_PTR_VALUE;
% j6 y# e8 d, `! kUF_STYLER_ask_value ( dialog_id, &Option );1 Y0 g }/ i; R4 @! q. L3 f2 D9 X
(*count) = Option.count;
" h: _9 c: x" E3 R; ` ]5 R(*strings) = (char **) UF_allocate_memory ( Option.count * sizeof ( char * ), &error );
3 p9 W! I( O& [! a$ D" Z6 _for ( i = 0; i < Option.count; i ++ )
4 g0 y$ Q! y: x, ~" c: T% b{ (*strings) = (char *)UF_allocate_memory( 133*sizeof(char),&error);
) C4 {* E S" d6 Nsprintf ( (*strings), "%s", Option.value.strings );
4 I& c5 z6 L6 p" v/ J# ]} UF_STYLER_free_value ( &Option );
) ?7 j$ K; t$ n9 j4 I0 c/ G}( l% H# k/ y/ P: d$ J1 j( R
extern void Test_read_option_activeitem ( int dialog_id, char *item_id,
# I" M; _8 K7 S: I2 b o6 X% ]int *value )/ ?+ o! O* ~/ c: l
{ UF_STYLER_item_value_type_t Option;7 @ I8 q5 [' ~9 F3 O
Option.item_attr = UF_STYLER_VALUE;6 |' _/ t3 q; A' I
Option.item_id = item_id;2 M" t# F9 P& X
UF_STYLER_ask_value ( dialog_id, &Option );; G6 L4 f; z# d' d
*value = Option.value.integer;$ Y7 `( T5 f: K% x0 v; a8 k$ l
}
' N" w% S( g* l$ U0 t6 yextern void Test_set_option_allitems ( int dialog_id, char *item_id,& m- L: t1 ^, P# }6 ]! U {/ n
int count, char **strings )
# r* j: N# O1 [) E) z e{ UF_STYLER_item_value_type_t Option; int i, error;
- v3 V( a% [+ S2 cOption.item_attr = UF_STYLER_SUBITEM_VALUES;
; `+ k- I) W$ gOption.item_id = item_id;
% O( I/ Y3 w+ SOption.count = count;
+ W; }6 I( C$ p0 |: wOption.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );
: ?2 W- c3 l! }" d/ u- K8 v" wfor ( i = 0; i < count; i ++ )
/ t e3 n+ v1 A& N- f: f{ Option.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );3 _5 Y$ z- U% P6 S" j2 q s4 m. {
sprintf ( Option.value.strings, "%s", strings );
5 Y0 I/ e2 W* d! x6 l} UF_STYLER_set_value ( dialog_id, &Option );% C# b9 I* T4 V$ ` d3 @- m( M5 H
UF_STYLER_free_value ( &Option );' W6 s6 k8 x: r( N0 S0 R
}4 x5 k7 g" t+ ^- h
extern void Test_set_option_activeitem ( int dialog_id, char *item_id,
! P" J+ U8 A& U6 x# N+ O1 _- @- Y- l1 Qint value )/ i7 C3 R- b3 P: {8 m" q) n
{ UF_STYLER_item_value_type_t Option;
9 H& S4 {$ [, n- s+ |, a xOption.item_attr = UF_STYLER_VALUE;! O% I: C5 m5 P& t9 P1 J2 R3 d
Option.item_id = item_id;0 r% W$ B( A7 Q: r1 L
Option.subitem_index = value;" K% j4 A. F3 @6 ` X7 o+ q
UF_STYLER_set_value ( dialog_id, &Option );2 r; b! Y7 @! p6 T1 R; D
}! B i7 S* I* [1 U
Single Select List
2 o/ O4 `% y5 _4 o# d5 `# T Z; Hextern void Test_read_singleselectlist_allitems ( int dialog_id,+ m! \- L. H# ^, M9 Y& U
char *item_id, int *count, char ***strings ) y) _! Q1 X! O5 Z1 C9 J
{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;
v6 O5 p/ r( Z! n5 uSingleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;
( _/ X5 F/ ]- t# C) NSingleselectlist.item_id = item_id;5 H" }. F& ^) m) q
UF_STYLER_ask_value ( dialog_id, &Singleselectlist );& l# b( [; L' y8 b7 z6 ^
(*count) = Singleselectlist.count;, r7 I+ F3 p, F1 p$ G( y
(*strings) = (char **) UF_allocate_memory ( Singleselectlist.count * sizeof ( char * ), &error );
3 J! P1 d- N, _" `+ ufor ( i = 0; i < Singleselectlist.count; i ++ )
7 A. q) z$ M4 N{ (*strings) = (char *)UF_allocate_memory(133*sizeof(char),&error);! [ {" O" O7 C/ U! d! v5 ^
sprintf ( (*strings), "%s", Singleselectlist.value.strings ); ~# O$ f, h! G, Z
} UF_STYLER_free_value ( &Singleselectlist );
/ o$ z+ V9 x" O' ^}
7 m9 F8 }* y6 S o& Vextern void Test_read_singleselectlist_activeitem ( int dialog_id," a8 T( J7 f( z
char *item_id, int *value, char *string )
, L, y3 d r* U9 n' k{ UF_STYLER_item_value_type_t Singleselectlist;: H9 U4 @: D/ `7 I+ P
Singleselectlist.item_attr = UF_STYLER_VALUE;& J. P9 f9 V* {, E9 U2 f# J
Singleselectlist.item_id = item_id;
8 o0 t: P/ [1 u0 ]# Z$ iSingleselectlist.indicator = UF_STYLER_INTEGER_VALUE;1 i7 W" Y9 P( P( O
UF_STYLER_ask_value ( dialog_id, &Singleselectlist );
- f, l; ]9 B: K/ Z*value = Singleselectlist.value.integer;( S- P! K' {3 h/ d) c" D
Singleselectlist.indicator = UF_STYLER_STRING_VALUE;
5 M) d- @! v8 F2 G! Z8 j$ DUF_STYLER_ask_value ( dialog_id, &Singleselectlist );
7 ~4 e( h9 c5 n6 o" Z, [sprintf ( string, "%s", Singleselectlist.value.string );7 }* D& z7 N& {9 o" v2 }( u" [8 ^+ Z
}" m8 e' j) S0 l" E$ d& p: P
extern void Test_set_singleselectlist_allitems ( int dialog_id, char *item_id,! [5 U; J+ |% X+ G& W
int count, char **strings )* I2 r8 D w4 I' g
{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;
+ b8 d+ O1 t' H! J' RSingleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;
/ }6 a6 b' p1 A% H) c( N; H& D( ~Singleselectlist.item_id = item_id;
9 [) M/ b* i M9 c" rSingleselectlist.count = count;
3 D. w# ]: Y: pSingleselectlist.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );
& ^' @5 E. }( q1 O1 }: a0 R( gfor ( i = 0; i < count; i ++ )# M* H# m7 |9 R2 @* f
{ Singleselectlist.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );
! D2 k7 q M) J9 |/ x" Ysprintf ( Singleselectlist.value.strings, "%s", strings );
# [2 ^: j, [8 y* h' a5 E0 m}
9 a! ?1 \. @% d$ V( I; n' wUF_STYLER_set_value ( dialog_id, &Singleselectlist );+ ]8 m8 b4 j! ^3 y( ?* }
UF_STYLER_free_value ( &Singleselectlist );5 D) N, a% Q, k& D3 L. O# ?0 N
}& |8 G+ O/ {: a2 [9 X7 y
extern void Test_set_singleselectlist_focusitem ( int dialog_id, char *item_id,0 H6 V4 b8 s) \+ @4 t( P
int value )
- M, r/ N+ ]+ _1 i. B" O{ UF_STYLER_item_value_type_t Singleselectlist;8 {9 O$ W. l X8 V$ Q$ q
Singleselectlist.item_attr = UF_STYLER_VALUE;
$ s: u I' N/ M' {* e3 r. PSingleselectlist.item_id = item_id;& U9 I) r% m; b
Singleselectlist.subitem_index = value < 0 ? UF_STYLER_NO_SUB_INDEX : value;
& \2 `1 d+ f. H' cUF_STYLER_set_value ( dialog_id, &Singleselectlist );
0 j0 d( |' W) W+ i5 l2 ^* K}# S( [' x" m$ \8 c$ v
Property Pages) K# q/ |0 R: z3 D) m9 u9 u
extern void Test_read_propertypages_activepage ( int dialog_id,
^: V2 X& x( u0 fint *active_page )
( r' R2 E- Z6 g5 A{ UF_STYLER_item_value_type_t Propertypages;
/ Y) Q( N. m, z# g4 E5 p* U# O+ zPropertypages.item_attr = UF_STYLER_ACTIVE_PAGE;% Q5 C! C n5 u5 E8 n( ^
Propertypages.item_id = UF_STYLER_DIALOG_INDEX;
0 _7 r! q# q/ ` w& T7 g XUF_STYLER_ask_value ( dialog_id, &Propertypages );
$ X" K+ O- B/ E6 ?+ _*active_page = Propertypages.value.integer;, z9 o5 K" F& N: [
}
& {# n* U8 O2 P8 Xextern void Test_set_propertypages_activepage ( int dialog_id,
5 e$ Z* e" E# z" S9 p! }int active_page )
/ e2 }8 d' R \) H{ UF_STYLER_item_value_type_t Propertypages;4 w4 `" c# s( I) _
Propertypages.item_attr = UF_STYLER_ACTIVE_PAGE;- b7 U6 H) g- Z4 C2 n+ e
Propertypages.item_id = UF_STYLER_DIALOG_INDEX;6 d- T# W' ?9 v6 v" M8 o2 a) S7 m! e
Propertypages.value.integer = active_page;& `' L0 g* ]& K; T+ z) s" E
UF_STYLER_set_value ( dialog_id, &Propertypages );
' s" k- K/ I. I/ P" V}
6 a( B" E# e" h( w! ]/ H- w, `Color Tool( o8 Z s$ a/ d0 @
extern void Test_read_colortool_activecolor ( int dialog_id,4 }1 P8 a6 ^" d. a
char *item_id, int *active_color )( C7 M, d1 D! q; T7 }, i. N+ q4 V' y
{ UF_STYLER_item_value_type_t Colortool;1 j& G7 z' L$ q& @+ _1 E9 t8 G
Colortool.item_attr = UF_STYLER_VALUE;
( A( A6 j1 b- \% ^/ R, S& P5 f5 l/ \Colortool.item_id = item_id;% e6 z. R+ K G0 k* w
UF_STYLER_ask_value ( dialog_id, &Colortool );
# {( ?, B& U, M8 H0 F*active_color = Colortool.value.integer;
* t: E. M" v. F, O/ @}
# \# {; r( B, g: m0 f6 A4 bextern void Test_set_colortool_activecolor ( int dialog_id,+ Z( J9 g% P ~. D
char *item_id, int active_color ). `; G+ x4 T- e6 f) |; g, b
{ UF_STYLER_item_value_type_t Colortool;
6 p* L; j: f1 tColortool.item_attr = UF_STYLER_VALUE;4 l- K- L6 Y" A$ H2 t
Colortool.item_id = item_id;1 T- C2 e5 S$ U9 t0 Y) v" x; c/ W( I3 j
Colortool.value.integer = active_color;
( ^: u2 _: c& m- k, e" Q yUF_STYLER_set_value ( dialog_id, &Colortool );+ y% J$ Z, \( Z1 K+ S
} |
|