很早前我们做过一个讲user_styler的视频教程,但很多朋友都说讲的比较浅。所以今天把详细的函数分列出来,希望对大家有帮助。
原帖地址:http://www.ugufun.com/?p=92
- l/ G+ ]% a2 x7 J) o9 G+ `+ {& g
) q7 S" U- L/ R) w# f1 `% e" @Label:标签 一般没有回调函数. v. x7 ?4 U* d u- u8 H' T& d
Integer:整数 可以回调函数
( n# q: N& \* n* [' F6 WReal:实数 可以有回调函数9 j& a4 z, @9 ]; i: {
String:字符串 一般没有回调函数
; L. G. Z1 M N/ T! A2 JText Box:文本框 输入文本文字 一般没有回调函数
" x# U; c4 S4 J! D8 s) cPush Button:工具条 一般有回调函数
+ A2 I H5 _1 K: q* H+ | lToggle:勾选框 作为判断! V+ h( J* [! ^- i
Separator: 分割线
: W* N( f$ s9 y" c; MBitmap:位图
) `/ m2 q7 M4 jButton Layout:排列式工具条 一般设回调函数. t$ P" q1 W8 ^
Option Menu:下拉框 0,1,2…可以回调函数) f+ e9 A) F1 A) V1 T5 H" W
Radio Box:消息框 一般作为判断标准( a; u+ `- X; R8 D r4 @4 l7 @
Single List: 单选框 0,1,2… 一般有回调函数
$ H- H+ Z6 j1 Z( nFile -> Save 保存构造的对话框生成三个文件:
; X3 A+ Q, A& \2 ^. x# P7 ?8 k*.dlg 文件(对话框文件)! R% K1 L" a) }, }6 d) }% L
*.c 文件(对话框对应的源文件)
( T" b) m8 N9 l# z( T*.h 文件(原文件对应的头文件)7 l2 ?3 @' Z: e0 K
建立工作文件夹,下面设置application、startup、source(最好下设include和resource文件夹)、parts文件夹,并且设置环境变量ugII_USER_DIR
把dlg文件放在application目录下,*c文件放在source->resource$ h0 E9 v: l3 K1 n# q
文件夹,*h文件放在source->include目录下
1 m ^( h" G2 j" |7 X: h( M5 X
. ^% ~" V) j' {/ vLabel
6 Z, G1 {" Q5 y/ o4 f* E! a, Cextern void Test_set_label ( int dialog_id, char *item_id, char *name )5 P! n2 H0 d' S b _. i+ T0 j
{ UF_STYLER_item_value_type_t Text;9 ]$ i# H$ v: h& ~
Text.item_attr = UF_STYLER_LABEL;
t- u8 x3 \+ qText.item_id = item_id;9 @5 Y$ I' X) C- B s1 ^
Text.value.string = name;
3 x& d9 X3 `- B) K* OUF_STYLER_set_value ( dialog_id, &Text );2 Z' L% {4 o$ x g4 W
}
: t+ c1 U5 f! \7 d4 {Integer
. V8 K1 {3 E7 | \# @extern void Test_read_integer ( int dialog_id, char *item_id, int *value )
9 S0 N5 Z) u8 o& v{ UF_STYLER_item_value_type_t Text;& E' H0 D) S. G. E& l8 p1 k/ y" E
Text.item_attr = UF_STYLER_VALUE;
# F$ E: ~ L* S$ xText.item_id = item_id;
8 i0 X/ e+ u( y* H5 _UF_STYLER_ask_value ( dialog_id, &Text );; d2 J& L3 R4 f3 p- v
*value = Text.value.integer;; p! t; Y$ `0 s( o Y" N! O
}
5 F7 p/ X! U! ?3 ^extern void Test_set_integer ( int dialog_id, char *item_id, int value )4 l8 f2 s+ n8 `7 M* \
{ UF_STYLER_item_value_type_t Text;
- c9 W! f. }8 B8 aText.item_attr = UF_STYLER_VALUE;
- j1 e6 k( C( fText.item_id = item_id;
& W, c8 @/ Z8 Z. S3 q1 NText.value.integer = value;
5 Y- B9 p( C' J9 i: {& ?+ KUF_STYLER_set_value ( dialog_id, &Text );; q, D& h* c/ r6 ^4 ]% o4 I
}
Sensitivity
extern void Test_set_sensitivity ( int dialog_id, char *item_id, logical check )
6 c5 b: Q) j, G K% F5 H{ UF_STYLER_item_value_type_t item_sensitivity;
: D4 A* G+ f" ?% gitem_sensitivity.item_attr = UF_STYLER_SENSITIVITY;7 }9 p; W k: X; s0 d
item_sensitivity.item_id = item_id;* B6 S9 u9 b7 _ R a# S A/ `
item_sensitivity.value.integer = check;
( x% Y! q D4 c* }$ y1 h. P" sUF_STYLER_set_value ( dialog_id, &item_sensitivity );
% @0 D8 m( c$ c2 X" \}
9 T1 f6 q o/ TReal6 i4 x5 m2 K0 v8 b
extern void Test_read_real ( int dialog_id, char *item_id, double *value )
" [: J5 B- Z" k4 V! b{ UF_STYLER_item_value_type_t Text;
" P9 v4 E# z- y$ V; T- U( fText.item_attr = UF_STYLER_VALUE;
7 B6 r5 x. l8 [ ?Text.item_id = item_id;
5 z" D" [0 H0 q& n6 g4 mUF_STYLER_ask_value ( dialog_id, &Text );
* @ U# v7 Y: |+ u4 s4 p*value = Text.value.real;
. {+ `: y2 V- }* c}
9 j: e" b" ?) ]/ \, Jextern void Test_set_real ( int dialog_id, char *item_id, double value )1 a6 b f/ I5 q% y
{ UF_STYLER_item_value_type_t Text;. L( h6 b8 }1 E7 ^+ m- N4 F
Text.item_attr = UF_STYLER_VALUE;7 n4 V" _# ?0 X9 n+ D7 ^
Text.item_id = item_id;
! Z2 J( n; k& z7 F8 TText.value.real = value;
, ]; z. |1 R5 l$ H- ^1 X! UUF_STYLER_set_value ( dialog_id, &Text );/ U: B& i! `* d$ C Y6 o
}
! B7 R3 N6 `% R* z A* EVisibility
4 y: A. e7 I4 ~$ F+ U( T$ ?& {) Xextern void Test_set_visibility ( int dialog_id, char *item_id, logical check )
: `$ E, h) G5 Y9 S2 i" Z{ UF_STYLER_item_value_type_t item_visibility; J) t- q- T- Y
item_visibility.item_attr = UF_STYLER_VISIBILITY;
- f' e% L Y. x! X7 gitem_visibility.item_id = item_id;
2 [: Y" I( ]1 s! i. Aitem_visibility.value.integer = check;
$ j+ d" W0 ^7 T9 r" J& j! N/ p0 m% J' lUF_STYLER_set_value ( dialog_id, &item_visibility );
" Z; q0 h( I& r/ n, Z6 r}+ e% ^7 _! g3 T6 f8 N6 T+ T
String4 ]5 }7 O" C0 R4 S! t4 Z6 F$ y
extern void Test_read_string ( int dialog_id, char *item_id, char *value )
, X5 z1 {" z5 W6 U{ UF_STYLER_item_value_type_t Text;" l/ Z% \3 |, o- B* {5 f& u. {
Text.item_attr = UF_STYLER_VALUE;8 Q _2 o& t5 f1 ~7 P5 ~2 Z
Text.item_id = item_id;" ^4 E# R" [" Y6 N& @# b% t. j
UF_STYLER_ask_value ( dialog_id, &Text );
9 x7 t% o( |4 k$ v ]4 O/ msprintf ( value, "%s", Text.value.string );( A) B4 P4 [& v& J. C
}
* ]! e, x; G' q- D6 D4 Zextern void Test_set_string ( int dialog_id, char *item_id, char *value )+ i. B' O) T& o" K K$ \# n
{ UF_STYLER_item_value_type_t Text;
; v3 I7 k8 ^. D: OText.item_attr = UF_STYLER_VALUE;, v5 @; o+ j% w: E$ |
Text.item_id = item_id;3 H. ?" ~2 X) b9 j% B1 i/ N
Text.value.string = value;
) q4 [* E1 K2 p& eUF_STYLER_set_value ( dialog_id, &Text );
1 ]- B: G$ f: a V- s) O}8 h/ @( e8 x- @% q
Radio, ~! f# Z, t3 I
extern void Test_set_radio_sensitivity ( int dialog_id, char *item_id,
; E6 ~* ]0 y- e u/ C9 \" _! Y2 r. gint subitem_index, logical check )
% M( h' X. {+ G0 r& s6 J* W{ UF_STYLER_item_value_type_t item_sensitivity;2 q0 J! \( H. Q! z9 q
item_sensitivity.item_attr = UF_STYLER_SENSITIVITY;
2 P) o) z ?9 g5 a* |. b; V0 a. ]item_sensitivity.item_id = item_id;7 p: i) }/ J3 t" R# `& }! G) p4 h
item_sensitivity.subitem_index = subitem_index;+ \# k! U/ h6 a1 D4 h
item_sensitivity.value.integer = check;0 h' a3 j) g9 o) K6 d. E0 F
UF_STYLER_set_value ( dialog_id, &item_sensitivity );" E; a* j4 y/ g
}
9 u P# f) d# j5 ]extern void Test_read_radio ( int dialog_id, char *item_id, int *value )0 J0 E# f# K- N/ J- V
{ UF_STYLER_item_value_type_t Radio;
7 H2 h$ ~9 d; n- g( LRadio.item_attr = UF_STYLER_VALUE;
& H( H# ]5 c4 ~- t. uRadio.item_id = item_id;
! P- o% f/ O7 T, o9 a. G, m6 eUF_STYLER_ask_value ( dialog_id, &Radio );+ Y5 H+ z/ O0 S) v
*value = Radio.value.integer;
4 ?; L2 V7 G- ]1 c}2 |0 U3 O2 P3 f9 h; {2 ^
extern void Test_set_radio ( int dialog_id, char *item_id, int value )
* [3 g$ o5 `2 h( M" t{ UF_STYLER_item_value_type_t Radio;( B3 M/ G9 _. ~3 f9 B) w
Radio.item_attr = UF_STYLER_VALUE;/ A- }1 U Y3 _9 F# b
Radio.item_id = item_id;1 _' I8 H( ^. K4 W
Radio.subitem_index = value;) }8 V& U \: W7 f1 p, `
UF_STYLER_set_value ( dialog_id, &Radio );4 b3 k8 p) s& H" y
}* v% P# k' I7 l O
Bitmap' L& a" ~0 z1 ?. ]) z3 h
extern void Test_set_bitmap ( int dialog_id, char *item_id, char *name )) y2 a. G+ o' u4 f9 Z' E
{ UF_STYLER_item_value_type_t bitmap;
# }4 s2 w' c; x! bbitmap.item_attr = UF_STYLER_BITMAP;. r' z" B9 d: x# R
bitmap.item_id = item_id;
7 e/ V/ O1 n! |- S+ P: s+ tbitmap.value.string = name;
7 k" [4 Q/ g5 W5 vUF_STYLER_set_value ( dialog_id, &bitmap );
5 Q- c: ?$ r2 Q$ N}
' c5 U f$ h" H( S8 R% j# a7 kToggle
" b) U7 j' d# _: `7 Uextern void Test_read_toggle ( int dialog_id, char *item_id, logical *check )
' m) d; O$ e( e5 I1 s$ ?{ UF_STYLER_item_value_type_t Toggle;! A0 {% g" Z3 O" N" W$ X
Toggle.item_attr = UF_STYLER_VALUE;( f) b. V6 Q) ?/ Y2 p* x: U% V
Toggle.item_id = item_id;
1 G& r, Y" x7 \# CUF_STYLER_ask_value ( dialog_id, &Toggle );& u% B4 G! l, f
*check = Toggle.value.integer;9 u6 Y4 d/ X, [/ v& O3 O
}1 k& ^; h4 E5 F3 i3 W: C, x4 d
extern void Test_set_toggle ( int dialog_id, char *item_id, logical check )
; m- C+ K$ o; r q I. ?3 ?7 X{ UF_STYLER_item_value_type_t Toggle;
$ B6 e0 Z2 |$ K2 O- }0 ?$ hToggle.item_attr = UF_STYLER_VALUE;$ i" q, U0 [! g) H* V+ P
Toggle.item_id = item_id;
: i1 L& \6 d( N5 dToggle.value.integer = check;
( r7 t v- W( r1 JUF_STYLER_set_value ( dialog_id, &Toggle );% q$ M* h& m& g( q, F* I
}
9 l; t( b4 m! ~" Q4 q" s, kDialog+ q Y, ^8 Z) ?: p$ G
extern void Test_set_dialog_title ( int dialog_id, char *title )
& ]& {! L% g) e; }' s. s{ UF_STYLER_item_value_type_t dialog;
7 w' U- `; v& k s8 l+ N8 n1 Pdialog.item_attr = UF_STYLER_LABEL;
. v8 G3 T0 W" Z5 tdialog.item_id = UF_STYLER_DIALOG_INDEX;$ _, g* S' @3 H$ q
dialog.value.string = title;7 w3 B8 A3 J5 [) |7 \( y
UF_STYLER_set_value ( dialog_id, &dialog );; K0 A, ~4 f( v: ]" s: u
}
! M5 L) a- E1 `) W* A0 s0 ~) wextern void Test_set_dialog_sensitivity ( int dialog_id, int item_id,# ^) F7 D- n: A* Z
logical check )
* `/ A# g; H( N{ UF_STYLER_item_value_type_t dialog_sensitivity;6 V6 J7 S* e% f# | D# s
dialog_sensitivity.item_attr = UF_STYLER_SENSITIVITY;- J- m. [1 E/ A; ?! k. D) B* c
dialog_sensitivity.item_id = UF_STYLER_NAV_INDEX;: f$ b6 [- g4 b5 @/ t3 o
if ( item_id == 1 )
l- F7 a- X. Idialog_sensitivity.subitem_index = UF_STYLER_OK_INDEX;6 q- c5 m* P2 W! C' C+ m: O" G: C
else if ( item_id == 2 )
" U j2 v/ S4 H0 Wdialog_sensitivity.subitem_index = UF_STYLER_APPLY_INDEX;: `1 t( G/ K8 C3 {$ H
else if ( item_id == 3 )4 [, }% w# |8 t) Z- F$ k
dialog_sensitivity.subitem_index = UF_STYLER_BACK_INDEX;5 w! y6 W% e! x3 O4 d7 G, F
else: l; C. R" N5 @, V' v9 ^. d
dialog_sensitivity.subitem_index = UF_STYLER_CANCEL_INDEX;( V+ i, i0 @5 G2 k8 w6 j
dialog_sensitivity.value.integer = check;
+ J$ S! c$ {7 nUF_STYLER_set_value ( dialog_id, &dialog_sensitivity );, u$ O% R3 E/ R4 Z/ D! z; C; P
}
; @( U$ k) E' oOption
7 {) n: j; i1 ]! G& q% eextern void Test_read_option_allitems ( int dialog_id, char *item_id,
% W% U$ \! Z3 V) L- |int *count, char ***strings )9 p/ z' a I1 U
{ UF_STYLER_item_value_type_t Option; int i, error = 0;5 l9 ]& q6 A4 X* g- N. d
Option.item_attr = UF_STYLER_SUBITEM_VALUES;
1 u0 O; M0 N% i+ m$ BOption.item_id = item_id;
1 o' p2 x& Z: p( N, DOption.indicator = UF_STYLER_STRING_PTR_VALUE;2 v% [* z) p+ y. h
UF_STYLER_ask_value ( dialog_id, &Option );+ T) d8 N. [" ~
(*count) = Option.count;8 A9 y+ d g5 s _7 O! I' k) T5 u7 r" a
(*strings) = (char **) UF_allocate_memory ( Option.count * sizeof ( char * ), &error );1 B7 T" L) @6 Y+ s: g( H8 ~
for ( i = 0; i < Option.count; i ++ )
9 [ Z& G$ e8 y$ z* M/ j{ (*strings) = (char *)UF_allocate_memory( 133*sizeof(char),&error);3 _; |8 ^# W* o5 o3 F& g
sprintf ( (*strings), "%s", Option.value.strings );
, j2 n2 s1 S+ ^. R! U} UF_STYLER_free_value ( &Option );
% n) d* p" K. |}
( W& @+ Q& D5 {8 d |8 p) \extern void Test_read_option_activeitem ( int dialog_id, char *item_id,
' s: R; j$ e$ {0 Pint *value )
- B8 F3 a9 O" R0 n' O: K T{ UF_STYLER_item_value_type_t Option;
, Q7 B! J2 ^$ ]! T8 c8 I- R' }Option.item_attr = UF_STYLER_VALUE;. J# K' B: T* p/ E
Option.item_id = item_id;
4 g3 x* S3 n; K1 Y; @UF_STYLER_ask_value ( dialog_id, &Option );
$ r3 j' G) m% u6 `*value = Option.value.integer;
* X! }$ h1 H' @! K6 T}6 H( l- S5 e" w/ [* q7 ]
extern void Test_set_option_allitems ( int dialog_id, char *item_id,
9 c( k6 U# h T' w4 X: x: G6 u) Dint count, char **strings )
3 B! E2 N( S" {9 S{ UF_STYLER_item_value_type_t Option; int i, error;
% A$ C# C$ @1 v! E/ y( F9 B0 T6 pOption.item_attr = UF_STYLER_SUBITEM_VALUES;
2 J6 g# D: { x4 y) iOption.item_id = item_id;& W' L( q2 I; z- c2 V* r+ M8 T, ?' `
Option.count = count;
* t1 x3 ]% Z) }7 C7 |5 x6 z h4 Y3 NOption.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );* U. `( \3 {& M, i% G
for ( i = 0; i < count; i ++ )
' S" {, C) n7 _& t& C& U{ Option.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );
8 c$ G+ `- U- }sprintf ( Option.value.strings, "%s", strings );- D# p4 |" U" q* S/ a, w" P
} UF_STYLER_set_value ( dialog_id, &Option );* M$ x9 r) }/ E1 g5 I( ^" k
UF_STYLER_free_value ( &Option );
7 H! d0 P" T7 ]4 f}0 m# e" Y2 v! {: p/ t
extern void Test_set_option_activeitem ( int dialog_id, char *item_id,9 t$ ^) z* G& y6 V* {
int value )
5 s$ _1 p" i# s% n{ UF_STYLER_item_value_type_t Option;4 i6 i3 R; ?+ r- f8 {& y* B
Option.item_attr = UF_STYLER_VALUE;4 }+ I/ d, D! {6 D4 ^; {4 E
Option.item_id = item_id;
6 L8 c* `! X4 h# B \Option.subitem_index = value;; R, h9 N8 }- E8 k+ F' g3 w
UF_STYLER_set_value ( dialog_id, &Option );
" a( y$ k, R# _}5 k- c0 Q+ W7 w5 j, G
Single Select List
5 D' H3 v% s/ N) Q# zextern void Test_read_singleselectlist_allitems ( int dialog_id,
5 S/ x' Y2 ]9 g5 echar *item_id, int *count, char ***strings ), F6 Y; m' O9 @
{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;
7 F- j, I) O! Y# M, [# kSingleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;
& ^7 |. Y" t3 x+ ?4 D" i0 DSingleselectlist.item_id = item_id;" K2 G" H" M# O+ O' v& P
UF_STYLER_ask_value ( dialog_id, &Singleselectlist );
$ [) g9 z+ h$ ]: J0 H' ~ A(*count) = Singleselectlist.count;$ e& I- J. u) Y( C* a+ u
(*strings) = (char **) UF_allocate_memory ( Singleselectlist.count * sizeof ( char * ), &error );
# @% C% I2 e, d( B6 f+ a/ Xfor ( i = 0; i < Singleselectlist.count; i ++ )
* Q% C7 X' u( |& P$ p' a{ (*strings) = (char *)UF_allocate_memory(133*sizeof(char),&error);# B' x% l/ {5 e a, }- U
sprintf ( (*strings), "%s", Singleselectlist.value.strings );. D/ o; ~! t R2 t
} UF_STYLER_free_value ( &Singleselectlist );
7 F( {; d* b _}' H5 _; _ F ~" G# Q
extern void Test_read_singleselectlist_activeitem ( int dialog_id,
8 I8 J7 O( `8 Z Z5 J- t2 l! a3 t& Ochar *item_id, int *value, char *string )/ m; |" M4 _/ Z" {
{ UF_STYLER_item_value_type_t Singleselectlist;9 d+ A4 f/ F3 G+ b0 J! N1 Q( }
Singleselectlist.item_attr = UF_STYLER_VALUE;
! V( ]1 D3 d5 j- P |Singleselectlist.item_id = item_id;5 q& D2 Q' a# n# z
Singleselectlist.indicator = UF_STYLER_INTEGER_VALUE;
% U$ n( t) `% m' ^+ ~$ t( oUF_STYLER_ask_value ( dialog_id, &Singleselectlist );3 r: _- ~. v" g! E( ?( P8 d
*value = Singleselectlist.value.integer;, j3 k: _! \: N: A. D+ c
Singleselectlist.indicator = UF_STYLER_STRING_VALUE;0 _9 J+ o$ y- K5 I, S5 q" T
UF_STYLER_ask_value ( dialog_id, &Singleselectlist );- o$ L; K7 ^. S0 S2 d' ^/ K1 {
sprintf ( string, "%s", Singleselectlist.value.string );
) W$ ^% k/ E( v8 w) [' M}4 V5 K* ?# G: Y& `! w) U
extern void Test_set_singleselectlist_allitems ( int dialog_id, char *item_id,5 v y5 l. q; W3 d5 e' }
int count, char **strings )
! D2 {$ A: t' [! L' I{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;
) y0 Q5 A& B$ P1 MSingleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;
, H+ O T, p# U! ~! g- w& JSingleselectlist.item_id = item_id;( }8 m& N* K* ]4 O; x
Singleselectlist.count = count;
2 u2 J! u4 O8 w9 nSingleselectlist.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );- e, ~" A" A5 K! L% P
for ( i = 0; i < count; i ++ )- S7 m3 t' `3 a! I9 g
{ Singleselectlist.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );2 k" Y7 n' q! V8 E
sprintf ( Singleselectlist.value.strings, "%s", strings );
, ?4 ]$ p8 B# e7 a# A! ^}
8 u- ]) t! e# o3 r" B% U1 EUF_STYLER_set_value ( dialog_id, &Singleselectlist );' j. E6 p* Q# ? L5 E
UF_STYLER_free_value ( &Singleselectlist );
6 T! {9 U1 \3 U! f% @5 @" f9 [}
* s2 q% H+ y0 i5 ?6 pextern void Test_set_singleselectlist_focusitem ( int dialog_id, char *item_id,
2 k7 j. g* }% s; v; C( H) nint value )
; G# s( W; L6 M4 x5 a) [{ UF_STYLER_item_value_type_t Singleselectlist;
+ q7 D0 ^$ i! I) {& V& w" O' |$ @' ]- YSingleselectlist.item_attr = UF_STYLER_VALUE;* b+ r) N5 B5 y; ]
Singleselectlist.item_id = item_id;6 @1 {1 S( a3 f) f! J7 i
Singleselectlist.subitem_index = value < 0 ? UF_STYLER_NO_SUB_INDEX : value;
7 f/ D& s s0 K( E0 PUF_STYLER_set_value ( dialog_id, &Singleselectlist );2 ~& B" j; E; y. k* z
}: j& ^2 `% Q% P0 s/ d
Property Pages
, w- z7 n3 C( ?8 ^# E5 P ^extern void Test_read_propertypages_activepage ( int dialog_id,: L x/ c; P4 S' c" F
int *active_page )
; h" `7 a; Z. x2 X) y{ UF_STYLER_item_value_type_t Propertypages;( y9 L: `2 u v+ B( \( O
Propertypages.item_attr = UF_STYLER_ACTIVE_PAGE;) o4 A$ {6 r; Z# |" M
Propertypages.item_id = UF_STYLER_DIALOG_INDEX;
0 Z) a# D* d0 G; dUF_STYLER_ask_value ( dialog_id, &Propertypages );
7 V! N, A: n2 p4 m0 F) @/ E*active_page = Propertypages.value.integer;
( b: S: F& j8 e( k6 s7 ~7 Y$ z}* Z# f1 M4 U( w) \+ N7 h8 G
extern void Test_set_propertypages_activepage ( int dialog_id,
0 N/ |2 K0 B4 I" X# S* dint active_page )* d' }9 i A' k3 o" P
{ UF_STYLER_item_value_type_t Propertypages;
6 z [" V, \ sPropertypages.item_attr = UF_STYLER_ACTIVE_PAGE;
2 I* N. v" C& s$ g8 T6 OPropertypages.item_id = UF_STYLER_DIALOG_INDEX;
1 M% J0 y9 m! j$ @5 O. o- TPropertypages.value.integer = active_page;7 `$ q! ?3 S* o/ u2 x
UF_STYLER_set_value ( dialog_id, &Propertypages );
4 D9 D/ y% Y8 n: E# L% k}) z& S/ g/ \; Z7 e9 H
Color Tool7 [3 q2 K3 J; B5 ?
extern void Test_read_colortool_activecolor ( int dialog_id,
7 R a& Y; R$ ichar *item_id, int *active_color ), E7 N7 W. l( n# b7 o$ X: c' ]1 I7 y
{ UF_STYLER_item_value_type_t Colortool; J! T9 V: ^! J' f
Colortool.item_attr = UF_STYLER_VALUE;* A, E/ w* _3 b7 Y# t. f
Colortool.item_id = item_id;$ G: c+ T" h$ D! ` c2 P+ [
UF_STYLER_ask_value ( dialog_id, &Colortool );
( p* `) u( V+ S' V" a*active_color = Colortool.value.integer;/ u F5 y( p' e5 t( K: y- G; c
}
: }/ }1 y: G, k( Textern void Test_set_colortool_activecolor ( int dialog_id,( U8 Y# W, e4 y- ]) F
char *item_id, int active_color )
0 ^; Q$ i: n' }* Z( T{ UF_STYLER_item_value_type_t Colortool;
2 m, @3 K) r& n0 d+ X# [Colortool.item_attr = UF_STYLER_VALUE;
1 ?3 m0 Q" f1 a* J: i. ^! ^Colortool.item_id = item_id;$ l" W2 K) M6 M, a+ m* p$ @1 _
Colortool.value.integer = active_color;9 d. C' N# }# o- d6 F$ y! |
UF_STYLER_set_value ( dialog_id, &Colortool );
3 A0 r+ h/ D/ t1 K}