QQ登录

只需一步,快速开始

登录 | 注册 | 找回密码

三维网

 找回密码
 注册

QQ登录

只需一步,快速开始

展开

通知     

查看: 3988|回复: 2
收起左侧

[推荐] 讲讲user_styler的详细函数用法

[复制链接]
发表于 2014-3-7 10:15:05 | 显示全部楼层 |阅读模式 来自: 中国江苏苏州

马上注册,结识高手,享用更多资源,轻松玩转三维网社区。

您需要 登录 才可以下载或查看,没有帐号?注册

x

很早前我们做过一个讲user_styler的视频教程,但很多朋友都说讲的比较浅。所以今天把详细的函数分列出来,希望对大家有帮助。

http://www.ugufun.com/wp-content/uploads/2014/03/QQ%E5%9B%BE%E7%89%8720140305184949-300x224.jpg

原帖地址:http://www.ugufun.com/?p=92


4 _/ _0 o- n  z) `


9 M$ \. D& ~$ r, N$ S

Label:标签 一般没有回调函数
5 w! @+ K& @8 {% bInteger:整数 可以回调函数
' x$ W; [+ K- p9 j9 qReal:实数 可以有回调函数- P2 g* j; B% `7 k" e
String:字符串 一般没有回调函数. ?; }+ M( N/ c6 `0 J# ~, W
Text Box:文本框 输入文本文字 一般没有回调函数
% V/ f1 ~- E0 V" nPush Button:工具条 一般有回调函数
$ y% I6 P3 }; y1 X/ ^Toggle:勾选框 作为判断
& A3 }- L8 @( sSeparator: 分割线* i5 r6 G& K9 ]7 g& f; ?( s. s
Bitmap:位图) I0 I& e- R: {, ?  [% X' J% G3 d
Button Layout:排列式工具条 一般设回调函数
5 M/ I; M; k2 Y5 a6 hOption Menu:下拉框 0,1,2…可以回调函数  L; q. g- l0 i3 C( r, L
Radio Box:消息框 一般作为判断标准
3 ^& K" ^6 ^' D- a% W5 C; J& rSingle List: 单选框 0,1,2… 一般有回调函数
+ v/ b/ S  ?/ p4 s6 f& H' ~+ G8 I/ lFile -> Save 保存构造的对话框生成三个文件:# Z4 u2 O) O" X: T& a! n! F5 ~- c
*.dlg 文件(对话框文件)( P/ ?+ _' K- `# c; R
*.c 文件(对话框对应的源文件)5 _$ ]- R. P# b; J* W% p1 @) l, q
*.h 文件(原文件对应的头文件)
- B1 \1 E- b/ z2 A! p. ~建立工作文件夹,下面设置application、startup、source(最好下设include和resource文件夹)、parts文件夹,并且设置环境变量UGII_USER_DIR

把dlg文件放在application目录下,*c文件放在source->resource& T5 t+ m  _2 _: r$ O( I
文件夹,*h文件放在source->include目录下


+ L% d$ Y! V* p; |( y8 D

7 C4 P' Q- _. |* Y/ D  Z* v3 a* `
Label
. I  M% f) k' @1 n$ R" Rextern void Test_set_label ( int dialog_id, char *item_id, char *name )
. b4 |+ \+ K* Y# x1 a: m% n{ UF_STYLER_item_value_type_t Text;
5 k0 Z: Y  J$ N5 r2 nText.item_attr = UF_STYLER_LABEL;) C+ S; ^- W% g6 J# s( j3 ?
Text.item_id = item_id;3 y4 l3 Z0 e$ A% ?
Text.value.string = name;+ Q9 a* d: m& a/ o0 x
UF_STYLER_set_value ( dialog_id, &Text );' O' F% ~8 T- E. z: j8 D
}
. m( q. J! O# aInteger
. I& \' z5 {, b" {extern void Test_read_integer ( int dialog_id, char *item_id, int *value )
$ b/ D5 u, Y* c{ UF_STYLER_item_value_type_t Text;. I) g! S" I6 i6 l5 U5 H
Text.item_attr = UF_STYLER_VALUE;
0 M& l3 J2 w3 O/ ?! R+ fText.item_id = item_id;6 E2 I( L0 J/ @
UF_STYLER_ask_value ( dialog_id, &Text );) z$ I7 h8 r$ d, Y
*value = Text.value.integer;
  B& ?: w# D, P6 P. {7 T}. G) S  K- b+ w% r4 N  G8 ~
extern void Test_set_integer ( int dialog_id, char *item_id, int value )1 k) E$ j  {3 ^' r
{ UF_STYLER_item_value_type_t Text;
0 Y9 q7 J8 Z, H. q9 d' @Text.item_attr = UF_STYLER_VALUE;
% X7 [9 t- o8 }; v' @3 G, ]Text.item_id = item_id;; q# w0 p# e" _, w6 O
Text.value.integer = value;5 Q7 u% D+ z& |# y5 M
UF_STYLER_set_value ( dialog_id, &Text );
7 w2 j1 I* k& I- i" n: m  V: t* N}

Sensitivity

extern void Test_set_sensitivity ( int dialog_id, char *item_id, logical check )
( x. P* F4 G* S# l6 M  i5 Z{ UF_STYLER_item_value_type_t item_sensitivity;
: A7 |2 O7 L3 titem_sensitivity.item_attr = UF_STYLER_SENSITIVITY;8 C/ X7 `1 ]0 M( H2 B, C
item_sensitivity.item_id = item_id;
, c  f% S& A7 M) _$ ]2 qitem_sensitivity.value.integer = check;
( X/ z$ E9 D( V  l4 h2 LUF_STYLER_set_value ( dialog_id, &item_sensitivity );
$ K! \8 |; S4 o9 H: R}
2 E- L# J5 i/ e  k3 B- O0 lReal6 y( b/ _3 U% Q
extern void Test_read_real ( int dialog_id, char *item_id, double *value )) T; H/ b5 V1 r) M) P+ T7 z
{ UF_STYLER_item_value_type_t Text;, V9 M$ N  [$ R; K
Text.item_attr = UF_STYLER_VALUE;
1 X. x" a: s  x. E( C* dText.item_id = item_id;2 s* \7 ^4 v/ n) W/ U- L
UF_STYLER_ask_value ( dialog_id, &Text );" y: D9 d2 v( C) c2 L( O3 F( l
*value = Text.value.real;
; C; E0 _* x' k2 D& X5 L}
  @$ R6 k6 H8 T; @/ X) {& Y' ^2 a& lextern void Test_set_real ( int dialog_id, char *item_id, double value )$ P, H- w" l# f2 y
{ UF_STYLER_item_value_type_t Text;- r( Q4 F# t% c! U3 r
Text.item_attr = UF_STYLER_VALUE;1 z9 x( L* t& P1 L( w& A4 m  E  }
Text.item_id = item_id;2 e& r- s6 c( ^; E4 ]' [8 v
Text.value.real = value;
- n$ S9 w* P6 K7 Y7 [7 g6 ~+ QUF_STYLER_set_value ( dialog_id, &Text );( ]$ P+ _& h: E* S) Q: ^; f' k
}  g  \& i1 b& A6 y- Z
Visibility
4 n2 K/ h8 ]4 f/ m  `* P) d# x& ]extern void Test_set_visibility ( int dialog_id, char *item_id, logical check )8 c* L8 p' M1 j! y  P
{ UF_STYLER_item_value_type_t item_visibility;
/ @4 l: I  a5 u( B* H" ?item_visibility.item_attr = UF_STYLER_VISIBILITY;
/ N% @7 {7 a9 L' ~% U) H2 Jitem_visibility.item_id = item_id;! r$ ~8 I! c9 ?7 f' A% U8 ~
item_visibility.value.integer = check;) T; S0 V9 O! K
UF_STYLER_set_value ( dialog_id, &item_visibility );6 [0 Y  @+ t5 I0 o4 T0 e+ h
}
, `4 }* y/ Q9 HString8 V" Z( P, o- H1 \
extern void Test_read_string ( int dialog_id, char *item_id, char *value )
5 G2 m  U2 p* T" d& W/ }3 b{ UF_STYLER_item_value_type_t Text;- l1 [# V; \! h! A5 l' l$ e) L
Text.item_attr = UF_STYLER_VALUE;
! w8 a7 f! V0 o2 M* v4 x/ u( `0 UText.item_id = item_id;
* c# V8 d. n0 L( kUF_STYLER_ask_value ( dialog_id, &Text );2 U$ E- d! _  K% J, Q8 b8 B: t+ s
sprintf ( value, "%s", Text.value.string );
7 K- U. Z/ |1 e# U, \$ o3 u}, n, I4 C# M% ^6 I
extern void Test_set_string ( int dialog_id, char *item_id, char *value )2 l: ~" i8 ?$ v9 X( o8 M
{ UF_STYLER_item_value_type_t Text;
' v3 _, |7 N) Y3 @3 N9 Y, r# yText.item_attr = UF_STYLER_VALUE;
+ A. v/ z2 N  WText.item_id = item_id;' u& ^. ]4 a6 \8 \" T! V5 Q
Text.value.string = value;/ l% s/ z/ f# a
UF_STYLER_set_value ( dialog_id, &Text );. @3 |2 _6 L2 u4 w) L* `, g
}
  q- D; X* v) E5 K! o  @
; `) W1 a. q$ _" B/ x/ [% a8 F

& Y0 Q' s& b$ Z1 F; S3 ^  |! W
 楼主| 发表于 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}
发表于 2015-11-5 22:29:48 | 显示全部楼层 来自: 中国浙江温州
发表回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Licensed Copyright © 2016-2020 http://www.3dportal.cn/ All Rights Reserved 京 ICP备13008828号

小黑屋|手机版|Archiver|三维网 ( 京ICP备2023026364号-1 )

快速回复 返回顶部 返回列表