|

楼主 |
发表于 2014-3-7 10:16:19
|
显示全部楼层
来自: 中国江苏苏州
Radio
1 j7 K& W$ }+ Z, S& Hextern void Test_set_radio_sensitivity ( int dialog_id, char *item_id,. m* z, m$ x& o1 U
int subitem_index, logical check )
]! x4 W5 A( w- Y" v n{ UF_STYLER_item_value_type_t item_sensitivity;
! I# J& s7 G7 ^& ^item_sensitivity.item_attr = UF_STYLER_SENSITIVITY;
" S2 f" h5 [( V- E, Xitem_sensitivity.item_id = item_id;
* W! \& U( ~6 Ritem_sensitivity.subitem_index = subitem_index;4 E( }- M" o& ^, E) a
item_sensitivity.value.integer = check;8 f) C2 j% |- U* A8 x6 W, @3 {
UF_STYLER_set_value ( dialog_id, &item_sensitivity ); B1 @2 q2 T, i
}5 x6 g7 K q5 j
extern void Test_read_radio ( int dialog_id, char *item_id, int *value )7 i5 Z7 A! H: y- @
{ UF_STYLER_item_value_type_t Radio;
3 Z' Y- ]" ]5 ?4 L' C$ n$ vRadio.item_attr = UF_STYLER_VALUE;
( |9 I4 l w9 eRadio.item_id = item_id;
V" U9 z! L( B# ?8 ^4 W8 PUF_STYLER_ask_value ( dialog_id, &Radio );. Y7 `+ a3 r- L7 P
*value = Radio.value.integer;6 m: e4 J2 O! v; _2 `. n. E
}
s+ i$ z. P0 I6 Z2 \( xextern void Test_set_radio ( int dialog_id, char *item_id, int value )$ f( H5 B" \6 G$ ]9 K7 ^/ n, P
{ UF_STYLER_item_value_type_t Radio;! k0 q2 H0 j0 `4 N# j
Radio.item_attr = UF_STYLER_VALUE;
# ?' e2 T, B; ^0 n( {. W1 R1 TRadio.item_id = item_id;
3 \: \ j+ t) c/ ?2 ?0 HRadio.subitem_index = value;
* h6 s5 W6 q+ M: ?0 P! t) |# p3 kUF_STYLER_set_value ( dialog_id, &Radio ); s" K& Z6 O4 w$ y! _0 p
}; m! P$ C' y8 l' ~3 R0 K) m
Bitmap
. M" F4 m* x' p, i! z( ^, E6 v2 |: oextern void Test_set_bitmap ( int dialog_id, char *item_id, char *name )5 L2 B& U5 \0 g5 l8 H( f
{ UF_STYLER_item_value_type_t bitmap;
- h* q' D# \# |bitmap.item_attr = UF_STYLER_BITMAP;
. y5 g4 ` H: { ybitmap.item_id = item_id;
* e* @9 j/ k H, j obitmap.value.string = name;
; h% |$ A* I& ~0 e4 B, ]. JUF_STYLER_set_value ( dialog_id, &bitmap );
1 `5 t: {$ S6 w# i! y0 O* |}1 e5 E! h6 `" K" R
Toggle, _) c! u9 A5 b0 M8 P& ]! L
extern void Test_read_toggle ( int dialog_id, char *item_id, logical *check )8 w3 |! z7 B# I! z: T1 i# {5 Z
{ UF_STYLER_item_value_type_t Toggle;0 R m0 u1 g0 ?* z& _5 \
Toggle.item_attr = UF_STYLER_VALUE;
$ A5 w8 p1 e8 G' H' cToggle.item_id = item_id;2 c% X& X( N, z
UF_STYLER_ask_value ( dialog_id, &Toggle );9 v* R. R( H) t( b
*check = Toggle.value.integer;
8 a% `/ ^3 Y' `}
4 m7 w9 o ~4 f, wextern void Test_set_toggle ( int dialog_id, char *item_id, logical check )
: A' U! j$ W* I! {{ UF_STYLER_item_value_type_t Toggle;0 s# r" j* @" `) S
Toggle.item_attr = UF_STYLER_VALUE;
8 E$ B* w/ q$ b- k* cToggle.item_id = item_id;6 a# r$ K8 |* q A% E1 D
Toggle.value.integer = check;; w4 }0 L2 {0 ^4 q( T' X p) \& Y
UF_STYLER_set_value ( dialog_id, &Toggle );1 n4 u0 Z/ c$ C
}5 |" [# A9 Q- |
Dialog
# [; l! g9 R9 @extern void Test_set_dialog_title ( int dialog_id, char *title )
. O9 ~1 v5 v& ]% s- U9 }{ UF_STYLER_item_value_type_t dialog;
9 e+ q' X# ]1 S; T( I$ Hdialog.item_attr = UF_STYLER_LABEL; Q0 k" L8 @4 }$ {
dialog.item_id = UF_STYLER_DIALOG_INDEX;" ~, n+ V' B2 N F* p8 F3 y8 V* V
dialog.value.string = title;: V& `9 q1 N* n2 @. v
UF_STYLER_set_value ( dialog_id, &dialog );
5 X" \6 ^( o3 v}7 u& ]4 D; {- b
extern void Test_set_dialog_sensitivity ( int dialog_id, int item_id,
* u6 d/ F. L8 klogical check )
6 p7 n) U# z+ H9 F p' F{ UF_STYLER_item_value_type_t dialog_sensitivity;( D. Q/ K5 z1 b5 O
dialog_sensitivity.item_attr = UF_STYLER_SENSITIVITY;! B5 \% o/ x* z& q% k
dialog_sensitivity.item_id = UF_STYLER_NAV_INDEX;) m4 H9 C( Y3 ?. V4 e
if ( item_id == 1 )
' v4 r, ^4 l- b* h% s* zdialog_sensitivity.subitem_index = UF_STYLER_OK_INDEX;
. i7 V$ V7 u& ~- d* O2 oelse if ( item_id == 2 )
8 {2 X" E; W# @( c- Y/ Jdialog_sensitivity.subitem_index = UF_STYLER_APPLY_INDEX;
# |8 M3 D- l) |else if ( item_id == 3 )" w- G- H- k& t8 a8 T
dialog_sensitivity.subitem_index = UF_STYLER_BACK_INDEX;" b9 b3 i- [6 D; `$ N, v4 X/ T
else
) q( r" P! ]3 l! h6 hdialog_sensitivity.subitem_index = UF_STYLER_CANCEL_INDEX;
) I8 t/ m3 `! I, Qdialog_sensitivity.value.integer = check;' i. x5 P' ? a1 y
UF_STYLER_set_value ( dialog_id, &dialog_sensitivity );
0 v% |5 w5 T/ C3 r}
" M" W7 T+ H$ N% w+ O3 Z9 POption
7 N& {. c' o5 r- `0 O8 T& nextern void Test_read_option_allitems ( int dialog_id, char *item_id,4 V; k2 E$ x; v' p
int *count, char ***strings )
4 S' H0 i2 K4 h, w0 v8 s{ UF_STYLER_item_value_type_t Option; int i, error = 0;4 Q. T! H& Q3 X. S4 t
Option.item_attr = UF_STYLER_SUBITEM_VALUES;
, m- ]2 F9 D" DOption.item_id = item_id;
, q6 S N5 ~$ A: LOption.indicator = UF_STYLER_STRING_PTR_VALUE;
5 ~: G+ A! H! O1 SUF_STYLER_ask_value ( dialog_id, &Option );
- z" e; i; x& {, s" T8 ? ^( o(*count) = Option.count;
- J' S# s( T- g- h(*strings) = (char **) UF_allocate_memory ( Option.count * sizeof ( char * ), &error );8 W: E4 s7 r% Z2 j5 y! m
for ( i = 0; i < Option.count; i ++ )1 @4 X& V* m5 ~$ F- \
{ (*strings) = (char *)UF_allocate_memory( 133*sizeof(char),&error);
# z* K; b U. y1 Y$ L1 Msprintf ( (*strings), "%s", Option.value.strings );& U6 a% B7 |* j1 \+ E7 f5 U# t
} UF_STYLER_free_value ( &Option );* r; E" V; p( G7 O- f. |& Y9 D
}
; ~# }" I7 A2 ]8 J2 e) Y; v8 Textern void Test_read_option_activeitem ( int dialog_id, char *item_id,
5 g% G3 z+ u4 Rint *value )
[8 I% C$ f2 n$ x8 T9 m{ UF_STYLER_item_value_type_t Option;: K, f! }9 i G; v* g
Option.item_attr = UF_STYLER_VALUE;
1 r: f% |1 N* _Option.item_id = item_id;
- j. R" y! B% q, ZUF_STYLER_ask_value ( dialog_id, &Option );) X4 P3 s: v }8 \) K3 H ^* A
*value = Option.value.integer;: m0 L/ I8 A' n7 s* }9 l# ?( W
}
1 w4 C9 O, c1 k) _1 l" Dextern void Test_set_option_allitems ( int dialog_id, char *item_id,
3 n$ T4 j: w# J) l$ r: h0 Tint count, char **strings )
/ P* o. [" g' U4 ^# |$ D' o{ UF_STYLER_item_value_type_t Option; int i, error;
: [2 Y- a6 _: {' xOption.item_attr = UF_STYLER_SUBITEM_VALUES;
: d: Q4 h8 o* f, {- Y! y( h* nOption.item_id = item_id;/ J9 V* Q% }5 O x
Option.count = count;
& @& _# ]" p, G; gOption.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );
, D$ a5 [$ ]! ~" ffor ( i = 0; i < count; i ++ )# [9 G- h9 L0 {8 i
{ Option.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );0 S# ~8 \1 @# ^ q7 ]
sprintf ( Option.value.strings, "%s", strings );; x" Y: g6 j/ o$ R* X
} UF_STYLER_set_value ( dialog_id, &Option );3 u% |, i1 f2 g+ u3 d
UF_STYLER_free_value ( &Option );) v6 G' e D# ?9 f
}' `8 Y2 f c# x8 V2 y
extern void Test_set_option_activeitem ( int dialog_id, char *item_id,
3 Y( I4 S) u; l) o2 [$ oint value )
+ w9 B5 n. M$ X{ UF_STYLER_item_value_type_t Option;& s- T! f- R0 h: q+ J$ b7 a
Option.item_attr = UF_STYLER_VALUE;
5 t0 c) \2 d$ A# Z6 b( K! E, @Option.item_id = item_id;" v9 q# H p0 ?2 _* Q* r H$ P4 w
Option.subitem_index = value;
* A* A4 c& W* A; tUF_STYLER_set_value ( dialog_id, &Option );
`- x* v% |. h) |}* b" D4 S( o( Z9 c) a4 o
Single Select List# l! B+ {! t' X% k
extern void Test_read_singleselectlist_allitems ( int dialog_id,
7 e2 X* N( c! {$ echar *item_id, int *count, char ***strings )
* F+ A2 Q- s/ r{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;3 v6 b4 F' O( K4 R$ y8 k
Singleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;! h( j [% G% E0 u
Singleselectlist.item_id = item_id;
+ ^+ G9 E N/ ]/ F8 AUF_STYLER_ask_value ( dialog_id, &Singleselectlist );# t0 p! ^6 g& P; y, k
(*count) = Singleselectlist.count;* e3 \% i( w4 Z. X; z
(*strings) = (char **) UF_allocate_memory ( Singleselectlist.count * sizeof ( char * ), &error );
) q2 O0 [) y+ H3 j' e- Wfor ( i = 0; i < Singleselectlist.count; i ++ )
" |- D+ q2 q0 K) `- P$ b{ (*strings) = (char *)UF_allocate_memory(133*sizeof(char),&error);
( { o8 t2 r- ^# a4 Z6 Rsprintf ( (*strings), "%s", Singleselectlist.value.strings );, Z: B/ T( @- p
} UF_STYLER_free_value ( &Singleselectlist );* p* w8 j& z% \9 t1 M
}
) b) C* D- q- Textern void Test_read_singleselectlist_activeitem ( int dialog_id,
( |/ ~' ?, s7 a8 V* r! _! P: C# i" [char *item_id, int *value, char *string )
- I; h8 G, y0 w. Y{ UF_STYLER_item_value_type_t Singleselectlist;7 A [; k1 R) [9 `) T
Singleselectlist.item_attr = UF_STYLER_VALUE;
- u0 X( L( l8 `/ _ i' SSingleselectlist.item_id = item_id;
1 b( j% j8 i1 H& R5 @+ t: PSingleselectlist.indicator = UF_STYLER_INTEGER_VALUE;$ u3 c" U- @" \: c
UF_STYLER_ask_value ( dialog_id, &Singleselectlist );1 d/ z, X5 V" g
*value = Singleselectlist.value.integer;! |+ @$ U* j0 t5 {7 A. I
Singleselectlist.indicator = UF_STYLER_STRING_VALUE;
, p [5 l9 f" c" p) vUF_STYLER_ask_value ( dialog_id, &Singleselectlist );# ~" `. J. [, [! G; g
sprintf ( string, "%s", Singleselectlist.value.string );* i4 b% G! _* V
}6 ?' G+ `; _) [8 u$ A& S- N S6 K
extern void Test_set_singleselectlist_allitems ( int dialog_id, char *item_id,) B; a3 U/ n4 C+ I$ x" Q
int count, char **strings )* B: G/ p* n; R, F
{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;
& x5 w+ w2 N0 @$ `, M; NSingleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;
( P t/ n. Q6 h# y$ K* bSingleselectlist.item_id = item_id;6 \+ v2 u- C+ C6 e8 D% ~/ A
Singleselectlist.count = count;
* D4 s5 ~6 @1 ?% W7 |0 y9 mSingleselectlist.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );& d# a) }* O/ U- `
for ( i = 0; i < count; i ++ )
2 s6 o. H" n/ i0 @! |" ^4 Q* i{ Singleselectlist.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );
, _# U: E9 t/ q: r! [2 ]sprintf ( Singleselectlist.value.strings, "%s", strings );9 B, w5 P+ V! c7 ?% E; z
}. f# q$ {) j- @% s, I7 J
UF_STYLER_set_value ( dialog_id, &Singleselectlist );
. O5 ]' j' Q8 U& _! V3 nUF_STYLER_free_value ( &Singleselectlist );3 J) U9 X% J: k; o
} R3 S7 q* a" K/ f4 B
extern void Test_set_singleselectlist_focusitem ( int dialog_id, char *item_id,
. Z/ H3 `# t9 v( j2 d& Iint value )
; i+ {6 N& K' ?' @4 C{ UF_STYLER_item_value_type_t Singleselectlist;
7 x% I7 ]: X: o' PSingleselectlist.item_attr = UF_STYLER_VALUE;
5 V* J: |' |+ G8 ^Singleselectlist.item_id = item_id; \; k5 q* \2 U1 G
Singleselectlist.subitem_index = value < 0 ? UF_STYLER_NO_SUB_INDEX : value;& V+ n% W; H1 a" E9 h# e/ U- Z t
UF_STYLER_set_value ( dialog_id, &Singleselectlist );
, }! T7 F, O8 }2 _$ s}
, g% Y: h& f1 \" o! r/ w: X* _9 MProperty Pages
$ S8 \$ _* K$ j) l$ ] n9 L, ?extern void Test_read_propertypages_activepage ( int dialog_id,/ u4 Q2 U0 r0 g4 a: P5 R
int *active_page )- U8 @) e9 y" a% L& l n* L) u1 L/ b- t
{ UF_STYLER_item_value_type_t Propertypages;: K. D. @6 n# {5 V( `) Q! l
Propertypages.item_attr = UF_STYLER_ACTIVE_PAGE;0 Q; D9 s" Y5 t! U B z9 `- L
Propertypages.item_id = UF_STYLER_DIALOG_INDEX;5 I5 I- m7 B9 x
UF_STYLER_ask_value ( dialog_id, &Propertypages );
3 [- J6 K9 k4 ~8 d% `- _; H*active_page = Propertypages.value.integer;9 ~3 e" ~( M( I; n) Z$ S7 b
}5 f' y8 q6 l: P2 U$ g
extern void Test_set_propertypages_activepage ( int dialog_id,
8 a+ W: l* [' c' j7 J. eint active_page )" f# f0 x% P7 Z! s9 S, g
{ UF_STYLER_item_value_type_t Propertypages;
3 A- a8 W! E1 W9 NPropertypages.item_attr = UF_STYLER_ACTIVE_PAGE;
9 s( f8 T7 I9 w) O; ?Propertypages.item_id = UF_STYLER_DIALOG_INDEX;. _- ^* P) m" ?0 l) w& I6 {
Propertypages.value.integer = active_page;. M$ }8 T4 {' F1 x: S
UF_STYLER_set_value ( dialog_id, &Propertypages );! G( O8 n2 K/ j7 h
}$ c7 B9 H) {; ~ d( Z4 K
Color Tool
3 b- | Z: {! J# ^5 \0 Y0 aextern void Test_read_colortool_activecolor ( int dialog_id,
( ?/ p- `% I0 a. }char *item_id, int *active_color )
1 E4 z3 O6 R9 B' }9 [+ c1 Y{ UF_STYLER_item_value_type_t Colortool;
/ p$ A5 W, T! XColortool.item_attr = UF_STYLER_VALUE;
$ ?3 G8 o- ^) jColortool.item_id = item_id;
6 Y; N9 i& I1 MUF_STYLER_ask_value ( dialog_id, &Colortool );
" d; _( l& q' ]9 Q& ]9 h*active_color = Colortool.value.integer;
- L; ?. @7 ], h% y}- O8 d0 u8 ?: E! q
extern void Test_set_colortool_activecolor ( int dialog_id,' W1 D0 b/ k" P- W
char *item_id, int active_color )1 }. o1 V9 ]" @- O
{ UF_STYLER_item_value_type_t Colortool;
& C0 d( ]# m" EColortool.item_attr = UF_STYLER_VALUE;; y g- o. e! W1 k+ _2 V& K# h
Colortool.item_id = item_id;# H6 F# c+ s: s. {3 C# f
Colortool.value.integer = active_color;; m( j- s r4 M- u4 Q. {* d7 K
UF_STYLER_set_value ( dialog_id, &Colortool );
; Q; w; w) O& u6 W2 x5 t} |
|