|
|

楼主 |
发表于 2014-3-7 10:16:19
|
显示全部楼层
来自: 中国江苏苏州
Radio* B( J1 C; t4 x* p' Z! u/ L/ h* Y
extern void Test_set_radio_sensitivity ( int dialog_id, char *item_id,
' Y2 q0 p0 O" [( {int subitem_index, logical check )
1 Q' n& T# ^, B0 q& f: z# N{ UF_STYLER_item_value_type_t item_sensitivity;& ]# g' ?3 | a/ `$ m/ I {
item_sensitivity.item_attr = UF_STYLER_SENSITIVITY;8 @) t9 }. Q. E
item_sensitivity.item_id = item_id;
7 |% K- F7 O; ]& ~' E; t$ z9 ditem_sensitivity.subitem_index = subitem_index;: u9 C6 T+ E% q3 r" n" S! W' t
item_sensitivity.value.integer = check;
. a! b. y+ b: d$ y6 Q! QUF_STYLER_set_value ( dialog_id, &item_sensitivity );
7 V/ v- r/ P" _$ C}! m7 x E1 \( T
extern void Test_read_radio ( int dialog_id, char *item_id, int *value )5 ^" q' v" T" E& V
{ UF_STYLER_item_value_type_t Radio;
% v8 }" n6 Q2 }& [( GRadio.item_attr = UF_STYLER_VALUE;
0 Y5 E7 u2 B- \& V$ ]4 PRadio.item_id = item_id;/ _6 F8 A' @& [& y3 e8 c+ {/ e
UF_STYLER_ask_value ( dialog_id, &Radio );" |% L! A, r5 Q4 n2 @
*value = Radio.value.integer;
/ J' N' z- h9 @}5 S+ U {# g. d( S5 x% v5 q9 L
extern void Test_set_radio ( int dialog_id, char *item_id, int value ): h$ s7 s5 _ c* \6 l/ r
{ UF_STYLER_item_value_type_t Radio;! n4 o2 B6 ]) z7 W, ^
Radio.item_attr = UF_STYLER_VALUE;5 S; N- D; B2 J
Radio.item_id = item_id;
2 W" k9 `6 c& `% fRadio.subitem_index = value;
" F9 S; S" A9 l, u% y& A, EUF_STYLER_set_value ( dialog_id, &Radio );
2 h" n8 I, A4 Z5 y/ W}
) ]3 u/ z P" k5 t. yBitmap! p* j' }, ~% Y. Z7 U8 K/ R
extern void Test_set_bitmap ( int dialog_id, char *item_id, char *name )
' d% ~, b5 P- K, J7 k{ UF_STYLER_item_value_type_t bitmap;
) g: z- e. R c1 }bitmap.item_attr = UF_STYLER_BITMAP;
& B% b2 L4 p9 {; i2 d) [bitmap.item_id = item_id;
8 G1 ^5 c9 x& ]9 S0 w1 a; m! bbitmap.value.string = name;
* Y0 W# z, r+ d7 O8 G! s; o7 {UF_STYLER_set_value ( dialog_id, &bitmap );
1 q0 g4 H n1 {- s}
6 K' M" w% ] k. QToggle
1 Y) }) ~1 R, o4 K" M+ Lextern void Test_read_toggle ( int dialog_id, char *item_id, logical *check )) u2 Q2 [1 o1 d5 b) {& n
{ UF_STYLER_item_value_type_t Toggle;3 s+ v, }/ S# h8 |+ y
Toggle.item_attr = UF_STYLER_VALUE;
5 Z! r% b" }, ]0 z. |! f! ]Toggle.item_id = item_id;6 [) X: p" D: a, ~
UF_STYLER_ask_value ( dialog_id, &Toggle );' k2 g h. o. \. F7 j
*check = Toggle.value.integer;! J) b3 ~; N) | N6 d# r- P4 \
}7 X# c: X! u8 ~% Q
extern void Test_set_toggle ( int dialog_id, char *item_id, logical check ); }5 ~2 O7 I0 m, M+ T
{ UF_STYLER_item_value_type_t Toggle;
8 P5 y4 m3 F3 v+ HToggle.item_attr = UF_STYLER_VALUE;* b# d W8 _$ X2 o
Toggle.item_id = item_id;3 f) f1 c: c- a+ n1 J! S4 `# M
Toggle.value.integer = check;
+ Q$ m) w8 G+ Z; tUF_STYLER_set_value ( dialog_id, &Toggle );
+ _/ n' i7 [. a0 Y* \}
( E1 R2 q+ C. n" V& ^& nDialog
* [* G; d& E" r( d# _% |8 Iextern void Test_set_dialog_title ( int dialog_id, char *title )% v. r8 A: O4 L9 }2 n
{ UF_STYLER_item_value_type_t dialog;, u: n3 ]4 S8 b) E! T
dialog.item_attr = UF_STYLER_LABEL;
- j/ t. g6 Y( {4 A$ t$ L, Qdialog.item_id = UF_STYLER_DIALOG_INDEX;, Z# Y( N; I& V1 J
dialog.value.string = title;
* h4 j3 n5 h# t& J; y/ hUF_STYLER_set_value ( dialog_id, &dialog );
5 E. f! U/ B% K: l @" l6 _ ]}9 c7 `4 [3 X' f% o
extern void Test_set_dialog_sensitivity ( int dialog_id, int item_id,1 m5 z l* C# W/ K: |/ i6 g
logical check )& D' Z$ P- A0 i T' C; ~5 ^ r
{ UF_STYLER_item_value_type_t dialog_sensitivity;! ]% j4 {) _# [2 [' C/ d9 T$ U
dialog_sensitivity.item_attr = UF_STYLER_SENSITIVITY;
0 T5 V) D: \# s. E4 R9 w; cdialog_sensitivity.item_id = UF_STYLER_NAV_INDEX;
3 c9 J7 Q0 q4 V9 Qif ( item_id == 1 )7 ?! B2 Q4 v( i5 \4 v& b: i! U6 j
dialog_sensitivity.subitem_index = UF_STYLER_OK_INDEX;& n3 E2 ?; H( W% v* Q x- r
else if ( item_id == 2 )* o* m3 \. p) i$ v5 V
dialog_sensitivity.subitem_index = UF_STYLER_APPLY_INDEX;, s; `. W- G% w% V+ z
else if ( item_id == 3 )
* B% x1 Q- D7 T/ B# Jdialog_sensitivity.subitem_index = UF_STYLER_BACK_INDEX;
' m8 z; G, ^3 \$ Yelse" b# L: s2 e6 d6 Q2 [; X: I
dialog_sensitivity.subitem_index = UF_STYLER_CANCEL_INDEX;; K* n1 X6 k' i3 ]. x2 `- S
dialog_sensitivity.value.integer = check;
* X _8 ?2 i' H/ I* n6 rUF_STYLER_set_value ( dialog_id, &dialog_sensitivity );( D& @$ \ u" ?0 G0 O
}
* a0 {' `6 h# e& COption
[( k; |# c4 F2 ?. Jextern void Test_read_option_allitems ( int dialog_id, char *item_id,
. x7 f: `: A0 A0 v6 P# z+ fint *count, char ***strings ); v- S4 N# k7 r
{ UF_STYLER_item_value_type_t Option; int i, error = 0;( n9 v) w( H- f" r8 W+ |
Option.item_attr = UF_STYLER_SUBITEM_VALUES;5 F: X& v, n$ w$ L
Option.item_id = item_id;# g5 s+ s, y7 Y+ x: i
Option.indicator = UF_STYLER_STRING_PTR_VALUE;7 ?: P, S' c/ ~, \* Z. z. j. x4 S, y
UF_STYLER_ask_value ( dialog_id, &Option );
, A1 d% @/ d4 c' O, E$ W! J(*count) = Option.count;$ M+ ?! z. X& P5 T- }' J
(*strings) = (char **) UF_allocate_memory ( Option.count * sizeof ( char * ), &error );% z3 l% m" E: ^# R& ?
for ( i = 0; i < Option.count; i ++ )2 c4 j1 c* z" ?% ]' G0 i% |
{ (*strings) = (char *)UF_allocate_memory( 133*sizeof(char),&error);% N* T( T, E& ]7 F" l
sprintf ( (*strings), "%s", Option.value.strings );, K. Z# v( u3 G5 O
} UF_STYLER_free_value ( &Option );8 i' T: F( A$ |0 [1 [8 U
}
# s# L- Y+ M7 l7 n' {extern void Test_read_option_activeitem ( int dialog_id, char *item_id,9 [( D3 |% G- x1 `! t
int *value )
2 I& Y7 r5 ]6 T' ], ]{ UF_STYLER_item_value_type_t Option;, K! e$ `3 \+ ?- x
Option.item_attr = UF_STYLER_VALUE;
/ t0 x2 m/ w( c2 Z- W/ x1 uOption.item_id = item_id;
' b4 s# w2 n) e) i+ lUF_STYLER_ask_value ( dialog_id, &Option );
7 G2 O0 l8 u* b2 o- i1 U*value = Option.value.integer;
u6 W: G+ z7 j3 w}+ o( d/ K& p0 [! _
extern void Test_set_option_allitems ( int dialog_id, char *item_id,: E4 \. E: k7 L3 A% F
int count, char **strings )2 \, H! U* J. ?
{ UF_STYLER_item_value_type_t Option; int i, error;
2 z- h3 A# }5 p6 B' v& iOption.item_attr = UF_STYLER_SUBITEM_VALUES;
! R3 L9 P3 V6 b, COption.item_id = item_id;$ p9 ~, S( }9 w
Option.count = count;
" B8 ?: U: `6 IOption.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );
1 s3 e4 |4 Y" }3 ~for ( i = 0; i < count; i ++ )
5 Q& m3 @" j" v" v{ Option.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );, W* u+ y! V5 K0 Q
sprintf ( Option.value.strings, "%s", strings );8 }: i$ C- @3 E9 P6 c% Y+ I. u
} UF_STYLER_set_value ( dialog_id, &Option );/ I; |2 H1 J3 W9 b7 H' c
UF_STYLER_free_value ( &Option );
- g. m3 N$ H1 F' g4 S) \5 T5 F% I& L}
- L* f8 O' |$ f5 X" T. {extern void Test_set_option_activeitem ( int dialog_id, char *item_id,
6 R! @+ G+ W% v' x6 U6 \int value )
" [1 H+ V$ N2 k4 E" I8 A{ UF_STYLER_item_value_type_t Option;
7 K& ?3 Q* ?, F7 `Option.item_attr = UF_STYLER_VALUE;
# q5 W" J: A8 ^9 VOption.item_id = item_id;
7 a2 D* B, W1 X% M- O- l% |- [ ]Option.subitem_index = value;/ S' D3 }" z' p4 p) F. E9 }
UF_STYLER_set_value ( dialog_id, &Option );
# E5 o" m- e& L& W* ]8 F/ u! @5 Q}/ j4 b" O& n* X+ p
Single Select List9 c" ^. Y5 q2 l
extern void Test_read_singleselectlist_allitems ( int dialog_id,7 o* c* D! q! g; d
char *item_id, int *count, char ***strings )1 Q. b3 C7 V: M9 J
{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;- i- a0 K2 P7 i: w% c5 { W5 i0 u
Singleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;, d0 B6 z o8 Q) L U# E
Singleselectlist.item_id = item_id;
9 M4 K1 s! H# vUF_STYLER_ask_value ( dialog_id, &Singleselectlist );& e+ }& `5 h. Z
(*count) = Singleselectlist.count;$ Z6 V7 y; u, `1 E8 f) S9 Z0 W
(*strings) = (char **) UF_allocate_memory ( Singleselectlist.count * sizeof ( char * ), &error );
# [, M0 u5 B: I4 J. `2 Ofor ( i = 0; i < Singleselectlist.count; i ++ )+ g- m6 m# t2 L7 w
{ (*strings) = (char *)UF_allocate_memory(133*sizeof(char),&error);
8 b Z+ o% H; g! |1 f4 z1 D4 l; Qsprintf ( (*strings), "%s", Singleselectlist.value.strings );
# ^& F& b3 G5 P r+ [} UF_STYLER_free_value ( &Singleselectlist );! G+ E3 C% k7 }
}' n: q8 z# J* E
extern void Test_read_singleselectlist_activeitem ( int dialog_id,
/ [* m2 \: r# uchar *item_id, int *value, char *string )
; Q& u# Y& C. T! j{ UF_STYLER_item_value_type_t Singleselectlist;
( o* e/ f) p% n- L( v' H6 a: pSingleselectlist.item_attr = UF_STYLER_VALUE;
6 |6 ?, s6 j$ g8 m9 cSingleselectlist.item_id = item_id;
4 T* C( L d3 D3 A# MSingleselectlist.indicator = UF_STYLER_INTEGER_VALUE;7 `( F0 s# v/ u( I$ c
UF_STYLER_ask_value ( dialog_id, &Singleselectlist );( u/ Y5 n# O+ h f3 p$ |$ ]
*value = Singleselectlist.value.integer;
5 W* F. f# s: N- t0 W1 G( @Singleselectlist.indicator = UF_STYLER_STRING_VALUE;
; t1 p, m+ D( |) T7 T! bUF_STYLER_ask_value ( dialog_id, &Singleselectlist );
9 W- F/ q& Y& D2 s8 v9 s$ |- y" Osprintf ( string, "%s", Singleselectlist.value.string );
% i1 g) v( ~! ^}
9 i6 n; i' n) h) b+ ]) @& e& w, V2 s" ~extern void Test_set_singleselectlist_allitems ( int dialog_id, char *item_id,
8 [6 F* a' Y. D i* Kint count, char **strings )* c4 n9 j/ y6 ^' V$ O- |5 T* Y) ]7 h
{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;
. B% x% ]: K! G# NSingleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;% w2 ~" D7 \# V( E
Singleselectlist.item_id = item_id;; q) E+ P* r8 t. Q, s
Singleselectlist.count = count;
# ^2 y1 Y( ~# d1 `: f/ q- k+ lSingleselectlist.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );; o. K. f _6 Z1 M9 _' X
for ( i = 0; i < count; i ++ )+ r4 l7 U! J: q; s
{ Singleselectlist.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );- n) ?7 T0 o! N8 ?9 }1 i2 g7 f
sprintf ( Singleselectlist.value.strings, "%s", strings );3 [7 z8 d6 U! F4 L( ^" Z2 j& x
}
1 }$ u* d: [( A/ z2 }9 f! aUF_STYLER_set_value ( dialog_id, &Singleselectlist );
& V- n9 u1 T7 E" \UF_STYLER_free_value ( &Singleselectlist );
4 A& M0 Z4 r- d' V}
$ R* w# ?# u* y8 x. g/ r2 vextern void Test_set_singleselectlist_focusitem ( int dialog_id, char *item_id,
+ o: o2 e' T( b! m, Q+ }int value )1 d0 E+ I- c3 d" A$ f& |
{ UF_STYLER_item_value_type_t Singleselectlist;
9 [! ^& ~. D3 h: {( O7 JSingleselectlist.item_attr = UF_STYLER_VALUE;0 x3 c! g) V2 |* D% A: s
Singleselectlist.item_id = item_id;
* I% Z0 @9 N, a4 b- T8 \- DSingleselectlist.subitem_index = value < 0 ? UF_STYLER_NO_SUB_INDEX : value;* C4 X" {# ?, ^9 q! }
UF_STYLER_set_value ( dialog_id, &Singleselectlist );6 V$ T+ c9 v. y# a# V d
}+ T. l& j6 u4 E
Property Pages: e1 \ s; h+ U
extern void Test_read_propertypages_activepage ( int dialog_id,$ w7 `4 w8 ^1 ^4 R' \* d: i- G
int *active_page )
5 `1 _' w! J x+ W{ UF_STYLER_item_value_type_t Propertypages;) {* W- n8 U2 N4 g+ I/ p- R* F
Propertypages.item_attr = UF_STYLER_ACTIVE_PAGE;2 o- x! A# s A& `/ d* W3 l
Propertypages.item_id = UF_STYLER_DIALOG_INDEX;
* A5 L. h, @2 W8 ]UF_STYLER_ask_value ( dialog_id, &Propertypages );
+ o+ z" O$ q) v% e4 F& A! U# K*active_page = Propertypages.value.integer;
3 K' V. d% ~6 ^- a$ f" m}$ E2 i3 u* L6 l$ w1 h' t
extern void Test_set_propertypages_activepage ( int dialog_id,* s6 G9 ]5 d& U% p; h4 Q& E6 V
int active_page )
& n) H+ O- x+ l- h{ UF_STYLER_item_value_type_t Propertypages;/ D2 w s3 f' {1 P% ]+ p
Propertypages.item_attr = UF_STYLER_ACTIVE_PAGE;
" n1 h3 I1 q2 [& K0 VPropertypages.item_id = UF_STYLER_DIALOG_INDEX;
, j- g1 H3 H' S/ o) A3 K) ^# EPropertypages.value.integer = active_page;) l* l8 t, W0 U$ M$ `+ P6 h. [
UF_STYLER_set_value ( dialog_id, &Propertypages );
) `# _" a4 m8 L% y9 a}8 b+ u0 X B6 \* ?5 i3 Z+ `- _
Color Tool
) z$ c# r( }) F4 O) K2 Oextern void Test_read_colortool_activecolor ( int dialog_id,
- L P `, T; a1 Pchar *item_id, int *active_color )
$ K( g( G9 _& c$ s& @% H{ UF_STYLER_item_value_type_t Colortool;7 O/ K% V7 |, t6 _% v: h3 D" ]
Colortool.item_attr = UF_STYLER_VALUE;
2 l) W6 P2 u- L, N, W5 }5 |$ KColortool.item_id = item_id;2 `' L" V3 F! p
UF_STYLER_ask_value ( dialog_id, &Colortool );# c+ a; G& o2 i* m
*active_color = Colortool.value.integer;0 T% c% `3 l) K% t
}
8 G) r: H5 m. q, Kextern void Test_set_colortool_activecolor ( int dialog_id,
* z4 @9 h3 O" X0 @char *item_id, int active_color )
2 _7 i! ]& n6 L! @/ ~1 l) x{ UF_STYLER_item_value_type_t Colortool;
) J* s/ D- W, aColortool.item_attr = UF_STYLER_VALUE;
5 v: k1 j1 v, A( V7 O4 u0 {. LColortool.item_id = item_id;% x8 a5 u( |$ O. {' B
Colortool.value.integer = active_color;) [1 z. h* a' y2 i& k
UF_STYLER_set_value ( dialog_id, &Colortool );
# \8 O5 p, N0 v) E3 L) G} |
|