QQ登录

只需一步,快速开始

登录 | 注册 | 找回密码

三维网

 找回密码
 注册

QQ登录

只需一步,快速开始

展开

通知     

查看: 3959|回复: 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


1 z6 L" C. X  j$ W/ F3 Z1 ^$ o3 B6 M


; p+ _9 A* n# \8 a- G9 M* L

Label:标签 一般没有回调函数
+ _# d  c9 `: |0 D. JInteger:整数 可以回调函数
5 T5 p. o1 U' l2 M9 W2 s4 aReal:实数 可以有回调函数
( d1 M! x$ _* U! C! V+ o; B; LString:字符串 一般没有回调函数
" l( f" M9 R& }3 aText Box:文本框 输入文本文字 一般没有回调函数
; r" o. Z* ^1 A3 q! {) W7 LPush Button:工具条 一般有回调函数
: E! m) v  _* M7 Y- v0 \' W2 WToggle:勾选框 作为判断! ?# `2 C1 V3 p0 e' L; M
Separator: 分割线
$ a! n) G3 M9 D' @5 Y% Z& hBitmap:位图# c# h; i+ f* ?- w; P0 D+ P
Button Layout:排列式工具条 一般设回调函数
& e1 H% l/ j5 j# @+ _" oOption Menu:下拉框 0,1,2…可以回调函数3 G+ h; Z; p- x! M, V
Radio Box:消息框 一般作为判断标准
! n  c: n( O8 o7 J% S1 s! M! GSingle List: 单选框 0,1,2… 一般有回调函数8 p% n# P. {/ {& P+ W3 T: X
File -> Save 保存构造的对话框生成三个文件:0 o3 H( i5 ?$ C- L  }. t
*.dlg 文件(对话框文件)
$ G1 ^9 @1 Y% z/ V*.c 文件(对话框对应的源文件)
& i4 ~3 c) _! j/ J  o1 E*.h 文件(原文件对应的头文件)
3 \3 e) ]9 a2 K( K* B! g建立工作文件夹,下面设置application、startup、source(最好下设include和resource文件夹)、parts文件夹,并且设置环境变量UGII_USER_DIR

把dlg文件放在application目录下,*c文件放在source->resource
4 c% t: Q; K: v: K文件夹,*h文件放在source->include目录下


  q1 V/ `# h1 ~( l$ S# Y


/ E- q" r- |( K, E9 n; b) C7 GLabel
; ?2 B2 A# m+ Kextern void Test_set_label ( int dialog_id, char *item_id, char *name )
: S( v+ ?9 E: Y7 M3 W0 g1 Z$ R  Q{ UF_STYLER_item_value_type_t Text;1 d: w1 l4 j% f2 z/ B- Y
Text.item_attr = UF_STYLER_LABEL;
* {. b: M, z4 S/ g) DText.item_id = item_id;
7 w% Y& x  X6 }3 W7 RText.value.string = name;
" z1 _# R# {) K6 J! iUF_STYLER_set_value ( dialog_id, &Text );2 W+ s( s- @, n+ O' D
}
# J, C6 }; M/ O4 [Integer. _. [1 ?6 J6 M; n1 U$ t7 w
extern void Test_read_integer ( int dialog_id, char *item_id, int *value )
  I0 {. ~) Q: ^5 ^{ UF_STYLER_item_value_type_t Text;& W  t- _+ ?- g4 c) M6 M
Text.item_attr = UF_STYLER_VALUE;% G+ S) k: p+ |# J
Text.item_id = item_id;. L# Y& t+ ?; p* G  P
UF_STYLER_ask_value ( dialog_id, &Text );2 L) p  F' `& n) g. x
*value = Text.value.integer;
, Y' ~# J2 ?! _1 s}3 [; p3 ]0 @& y& z2 m0 \9 o7 M
extern void Test_set_integer ( int dialog_id, char *item_id, int value )7 x1 H5 _1 h, A7 z7 T" A
{ UF_STYLER_item_value_type_t Text;
  |- v$ |1 ]: @9 r- tText.item_attr = UF_STYLER_VALUE;, o9 c! {+ F. p6 e+ U4 h7 t" v
Text.item_id = item_id;
# m# t4 g  v/ pText.value.integer = value;. z) i2 G8 h( L# g
UF_STYLER_set_value ( dialog_id, &Text );7 [. O, h1 ~3 k2 _, a. L
}

Sensitivity

extern void Test_set_sensitivity ( int dialog_id, char *item_id, logical check )
3 s: @# f/ o2 N2 j& m# O{ UF_STYLER_item_value_type_t item_sensitivity;
3 @% ^$ ~# Q) R& oitem_sensitivity.item_attr = UF_STYLER_SENSITIVITY;/ w+ t+ z. C8 B: `! _5 ]' H8 Y
item_sensitivity.item_id = item_id;
) k6 V$ p+ S8 E4 jitem_sensitivity.value.integer = check;
0 c) g/ h  C, p; V2 pUF_STYLER_set_value ( dialog_id, &item_sensitivity );
  C( B3 Q# n$ H) H7 L7 B# Q. L}
% k, G2 p  t5 S6 _) Z$ a  V) ]Real, H7 v& o0 m: @/ G" D1 g9 u' Z( A
extern void Test_read_real ( int dialog_id, char *item_id, double *value )0 S$ m; f; \7 E& o+ t: v3 D% P
{ UF_STYLER_item_value_type_t Text;) y0 h) V; e& d3 D% y. \$ v
Text.item_attr = UF_STYLER_VALUE;
, s* Y; `: r4 \- n) `; pText.item_id = item_id;
; B8 N* a3 J8 p& q: g# VUF_STYLER_ask_value ( dialog_id, &Text );' B1 X: F- Z: q6 S3 N
*value = Text.value.real;
6 a: a8 _2 Z  d- ^$ Y  o3 g) F  m) k}2 G& \' a" h; Z  B; m' q
extern void Test_set_real ( int dialog_id, char *item_id, double value )0 Q1 |# q0 U/ d) D( O
{ UF_STYLER_item_value_type_t Text;
5 A% ]. \* @" j) G/ kText.item_attr = UF_STYLER_VALUE;4 q( K" v& Y: ?; J
Text.item_id = item_id;
  p. {) m- B+ \' p! r0 R  y* t. W2 pText.value.real = value;2 P6 ]4 h* K4 _
UF_STYLER_set_value ( dialog_id, &Text );. ?) R! M) h$ b6 X$ P- d  v5 T
}
" T. l! g+ T' H- B3 r5 M% z. V0 J/ AVisibility
3 f' f( M" P& w$ _; G, {) r- Q7 yextern void Test_set_visibility ( int dialog_id, char *item_id, logical check )
# H8 c! k5 x+ p5 b{ UF_STYLER_item_value_type_t item_visibility;
$ k1 A% _- q0 o% u" ~& ~item_visibility.item_attr = UF_STYLER_VISIBILITY;
( a2 [) b- p! d! j) vitem_visibility.item_id = item_id;
7 ]1 ?4 y) _' s4 l6 v  qitem_visibility.value.integer = check;
; g1 v6 p! Q9 M6 k' H8 GUF_STYLER_set_value ( dialog_id, &item_visibility );
2 l' b6 g; a) G  L$ Q3 G) W1 }}
( Y& Y; k6 E/ p0 \) `String
& ~5 \/ H. n& [6 ?. x2 w  V* {extern void Test_read_string ( int dialog_id, char *item_id, char *value )$ p- d7 x/ n3 w; `4 k* S
{ UF_STYLER_item_value_type_t Text;
& ^3 P7 L4 Q, c0 \" j4 J' aText.item_attr = UF_STYLER_VALUE;
0 [9 A& J7 l( x5 V2 xText.item_id = item_id;
% f3 D' `* R* j6 `* L- b' [9 yUF_STYLER_ask_value ( dialog_id, &Text );
) Z% J' _8 b0 G1 q! jsprintf ( value, "%s", Text.value.string );
+ ^! E3 @8 I3 u; Y/ F! V5 m}
  ~7 C/ H+ B5 V( q1 ], @6 r* Pextern void Test_set_string ( int dialog_id, char *item_id, char *value )
3 H# Y5 ?7 e! z/ X- ~+ m{ UF_STYLER_item_value_type_t Text;
* z/ L5 ^% m( N" h4 I$ OText.item_attr = UF_STYLER_VALUE;4 k8 [; A  j) B, W2 Y
Text.item_id = item_id;
+ f1 p6 r; w( k. g3 B/ iText.value.string = value;3 A: W' Z2 {) D. s3 Q
UF_STYLER_set_value ( dialog_id, &Text );9 R" V' K# `0 y+ g& Z+ L- O3 N  q+ m7 N
}1 f" x7 |, C5 ~. Y1 y0 |" m

) i4 {0 w: ^( y9 }" }0 y


0 x- U# ]+ \4 C: u8 ~* J7 |
 楼主| 发表于 2014-3-7 10:16:19 | 显示全部楼层 来自: 中国江苏苏州
Radio
8 m3 w: M" y2 Z7 B* W) xextern void Test_set_radio_sensitivity ( int dialog_id, char *item_id,
  G2 |9 b) Z& `5 C( M) Gint subitem_index, logical check )" y5 P( |/ P- l3 @) W: p
{ UF_STYLER_item_value_type_t item_sensitivity;
% x/ O: z: _% q, @7 ?6 L' O) w! bitem_sensitivity.item_attr = UF_STYLER_SENSITIVITY;. u: d7 ^2 `$ A2 `. ^
item_sensitivity.item_id = item_id;2 X8 Q- v8 r7 b5 G4 c' b# D- R6 W
item_sensitivity.subitem_index = subitem_index;
; j. z' S* m' _( ]! Y" Oitem_sensitivity.value.integer = check;  m6 i6 e! S$ }+ E, A( g' @
UF_STYLER_set_value ( dialog_id, &item_sensitivity );0 H2 ?# m9 _( X! x( N
}3 K5 O2 Q6 s) ]  e
extern void Test_read_radio ( int dialog_id, char *item_id, int *value )/ P, o  z8 z5 |8 Q+ U! b
{ UF_STYLER_item_value_type_t Radio;
7 A/ R/ W/ c* ^6 lRadio.item_attr = UF_STYLER_VALUE;. F2 s! J% c0 S2 b' _' }/ f" P" f
Radio.item_id = item_id;
5 s$ o9 G0 i3 z) BUF_STYLER_ask_value ( dialog_id, &Radio );& o0 L) y6 v/ f/ q; x* G% A
*value = Radio.value.integer;' S2 Z/ J' j- w% T  h3 u: v
}
/ M5 {* g$ C! G- f7 M" jextern void Test_set_radio ( int dialog_id, char *item_id, int value )6 S) q, P/ ?$ M; ]0 R6 F. Z  T# b& X
{ UF_STYLER_item_value_type_t Radio;
0 M+ r5 _& s+ c0 `. U/ @3 DRadio.item_attr = UF_STYLER_VALUE;
0 j: a4 P$ V4 M: j9 XRadio.item_id = item_id;( j. p3 ?$ C* I0 s
Radio.subitem_index = value;
) {( v: |$ _8 @2 Q+ m9 y. RUF_STYLER_set_value ( dialog_id, &Radio );
# ?/ ]% x. u3 a7 i% E7 k}
# w2 {" i0 l) U8 z6 UBitmap
! I3 [( C, E* L. j" X' Oextern void Test_set_bitmap ( int dialog_id, char *item_id, char *name )# r! G% m$ q) w+ n
{ UF_STYLER_item_value_type_t bitmap;2 e, a; v6 W3 A+ S
bitmap.item_attr = UF_STYLER_BITMAP;* R2 N; N1 |4 ?. f/ }' q; f
bitmap.item_id = item_id;3 k! {. ~& u% h$ B
bitmap.value.string = name;7 b# E; `: P; ~9 K
UF_STYLER_set_value ( dialog_id, &bitmap );
7 k4 {( X  Q- @& n}& {+ y6 K' W" ?. l
Toggle. M# T8 u: K. t/ W- Y1 S/ r
extern void Test_read_toggle ( int dialog_id, char *item_id, logical *check )" j+ M" A2 u3 O! o" U
{ UF_STYLER_item_value_type_t Toggle;% d) [: I+ c* M$ ^$ p
Toggle.item_attr = UF_STYLER_VALUE;
3 Q4 I9 ]; U1 V, @* B2 f1 A; ]Toggle.item_id = item_id;
4 J. R' s! z# @1 hUF_STYLER_ask_value ( dialog_id, &Toggle );
0 |4 N1 i- ]% F5 G*check = Toggle.value.integer;8 V) c  V! q( z; A
}
, U  X7 Y  I- F, [; Cextern void Test_set_toggle ( int dialog_id, char *item_id, logical check )1 t1 k- P0 p1 u5 O1 h8 N) _, J
{ UF_STYLER_item_value_type_t Toggle;
$ i% J* Y: a  w6 jToggle.item_attr = UF_STYLER_VALUE;
$ m) Z0 t+ Z6 fToggle.item_id = item_id;
+ q8 U. c! m$ n2 x: r1 ?Toggle.value.integer = check;
4 c9 |! V8 q( A1 F: {% m- fUF_STYLER_set_value ( dialog_id, &Toggle );- T% @) |  F& L9 w& g! o+ _
}% l5 I  j# w! }7 B) L1 O
Dialog' l% J+ Y: Z8 e6 u# Z; I
extern void Test_set_dialog_title ( int dialog_id, char *title )
  V1 M3 b4 Z$ u! E! r/ @* p1 w{ UF_STYLER_item_value_type_t dialog;1 c( }6 ]/ M" \/ Q0 X' O
dialog.item_attr = UF_STYLER_LABEL;
2 M' N+ P0 r" m  D, b7 @# Hdialog.item_id = UF_STYLER_DIALOG_INDEX;
9 [( p: f3 f: D2 P" Rdialog.value.string = title;
/ K9 j6 B/ y9 H: o  L' gUF_STYLER_set_value ( dialog_id, &dialog );
7 H4 @7 s. [5 o7 y7 x6 L: M}
# l; m1 t& k$ _3 }8 ?6 k. Xextern void Test_set_dialog_sensitivity ( int dialog_id, int item_id,4 ^$ D: a- A/ L, @# A
logical check )
% f9 s: w+ Z7 D; ]8 n# N$ d% v: N{ UF_STYLER_item_value_type_t dialog_sensitivity;4 ]. X% [% q+ L
dialog_sensitivity.item_attr = UF_STYLER_SENSITIVITY;
/ x' J* n5 s. pdialog_sensitivity.item_id = UF_STYLER_NAV_INDEX;
' h$ m5 ?2 H: L. d8 q: @if ( item_id == 1 )+ i2 h& s0 e7 [7 K
dialog_sensitivity.subitem_index = UF_STYLER_OK_INDEX;! G/ R( \, Q0 n8 u2 }0 f9 N
else if ( item_id == 2 )3 ~& Q1 x$ S* q. l$ m
dialog_sensitivity.subitem_index = UF_STYLER_APPLY_INDEX;
4 ]+ m8 H: L$ G- O  Z* w$ zelse if ( item_id == 3 )0 D3 X# P: H) {& I  ?: s- G4 y! c7 D
dialog_sensitivity.subitem_index = UF_STYLER_BACK_INDEX;- |6 ]$ z! {- b; p
else
/ {( b6 }9 }! L5 Z6 Udialog_sensitivity.subitem_index = UF_STYLER_CANCEL_INDEX;3 W$ [' |) d" n, J0 Z" ^' _/ |( k
dialog_sensitivity.value.integer = check;, P( f& Q+ _3 g, u& Z, j# P% w! y
UF_STYLER_set_value ( dialog_id, &dialog_sensitivity );
  \) }! o! {, t: N- i1 A! x}  V, Q8 O" a7 o: e& M( Y% W* z
Option: K2 D4 m- g* Q0 Y" _8 l& q
extern void Test_read_option_allitems ( int dialog_id, char *item_id,4 w3 b7 t. L3 \* r' l1 ?
int *count, char ***strings )
( q' |5 J0 X0 T% _{ UF_STYLER_item_value_type_t Option; int i, error = 0;1 T6 b4 ^, P4 W) K1 J) P
Option.item_attr = UF_STYLER_SUBITEM_VALUES;: X5 K. F6 g4 I5 R4 P
Option.item_id = item_id;
8 p6 X) G" O' b; K  v( \1 vOption.indicator = UF_STYLER_STRING_PTR_VALUE;( Z/ j- `" O# h. ]  c) R
UF_STYLER_ask_value ( dialog_id, &Option );, r9 g1 d  r. a+ Q5 y  Q! f
(*count) = Option.count;
- g% K9 ~6 y4 f0 I1 k+ \1 U6 v(*strings) = (char **) UF_allocate_memory ( Option.count * sizeof ( char * ), &error );2 |; i: E- z/ A! q
for ( i = 0; i < Option.count; i ++ )5 z$ ]; d  \, T. @
{ (*strings) = (char *)UF_allocate_memory( 133*sizeof(char),&error);
1 E* L( r2 S1 M% Vsprintf ( (*strings), "%s", Option.value.strings );
( v* u8 j* U& O} UF_STYLER_free_value ( &Option );9 n! `8 M! Y/ V# D, A" c
}( B$ M. r. }$ @/ H
extern void Test_read_option_activeitem ( int dialog_id, char *item_id,* v) N# Y8 p( i3 a# u
int *value )$ ^5 Q9 x4 L# z; p; O+ ]7 q2 Q
{ UF_STYLER_item_value_type_t Option;" y- u1 s+ m1 ~3 I, p
Option.item_attr = UF_STYLER_VALUE;; U& D/ `9 u4 H/ U0 @! F) y5 S
Option.item_id = item_id;
' i/ ?' M; S. l; s, _UF_STYLER_ask_value ( dialog_id, &Option );8 P# @2 L  \! k) \% W3 B
*value = Option.value.integer;
6 V0 d; A  b8 I5 A/ N$ |: K% ]% ?}( k9 a4 x( y3 }
extern void Test_set_option_allitems ( int dialog_id, char *item_id,
, J1 [1 v, Z" h5 |int count, char **strings )! ?" D- C. ^4 k% S: r# D7 X
{ UF_STYLER_item_value_type_t Option; int i, error;
5 e) h0 K1 D* p' l1 [0 |Option.item_attr = UF_STYLER_SUBITEM_VALUES;
" `& V+ E" c; p' H4 N# C) eOption.item_id = item_id;3 `1 J, |# J' ?; j% u
Option.count = count;2 c  l; z; E& p$ |7 D
Option.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );- ]2 V8 e9 |; F2 F  E) \, ?$ Y. ]
for ( i = 0; i < count; i ++ )0 q4 a6 I& X& E4 {( I' d3 v) p
{ Option.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );
+ x6 J! \- ?- o( dsprintf ( Option.value.strings, "%s", strings );: {  D! h9 y! D0 k' b! s
} UF_STYLER_set_value ( dialog_id, &Option );
2 ~' v" q1 }% b0 f0 ]6 s% @UF_STYLER_free_value ( &Option );
, Q2 A+ l4 N" J( o! X6 S}
& C4 ?' k3 |& B; H( pextern void Test_set_option_activeitem ( int dialog_id, char *item_id,$ ]. O2 b+ P7 v9 |: e- I( z  J' K
int value )
/ x+ ?5 B- [& ?& H3 k{ UF_STYLER_item_value_type_t Option;* O  U2 U0 ]& {8 u+ u: B8 A
Option.item_attr = UF_STYLER_VALUE;% ~. P7 T0 |  E  M4 f
Option.item_id = item_id;/ P0 H0 l9 n: k: C  D6 G  m8 T
Option.subitem_index = value;1 F3 |3 J8 Z: F% m7 r  n# N
UF_STYLER_set_value ( dialog_id, &Option );
! W9 r! C* t2 h" w}9 R+ R- K- x0 t6 r1 \
Single Select List
" i: {# d6 r: j; cextern void Test_read_singleselectlist_allitems ( int dialog_id,
5 z5 ^5 i+ s. a& z- Ichar *item_id, int *count, char ***strings ); W9 o$ A& h, r" Z5 N) A
{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;
8 r. Q6 _, x3 V6 ~Singleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;
* A; b# j2 m9 f6 U0 SSingleselectlist.item_id = item_id;
9 y3 H/ K& s3 R9 j2 s/ Q6 l% ]" BUF_STYLER_ask_value ( dialog_id, &Singleselectlist );3 G; V: N4 B- ]
(*count) = Singleselectlist.count;8 ~8 D- v2 X) j, s% H
(*strings) = (char **) UF_allocate_memory ( Singleselectlist.count * sizeof ( char * ), &error );
) `2 e8 z/ q+ K+ v5 |1 Lfor ( i = 0; i < Singleselectlist.count; i ++ )
0 U) h1 r, ?  ^6 h5 ?{ (*strings) = (char *)UF_allocate_memory(133*sizeof(char),&error);* J+ V, h$ }9 `5 @" [; k- Y
sprintf ( (*strings), "%s", Singleselectlist.value.strings );( x1 A( t8 V) K: i  c
} UF_STYLER_free_value ( &Singleselectlist );
2 x8 _' s7 @0 a! j( p8 {4 Q/ y}
5 ~$ z! Y1 w" Y( ]0 q5 U2 jextern void Test_read_singleselectlist_activeitem ( int dialog_id,
: w7 Y5 g- y  {: d. B. zchar *item_id, int *value, char *string )
+ ~- P& h3 H2 P; e( H. V/ B{ UF_STYLER_item_value_type_t Singleselectlist;
7 E# N4 b# e! d* @Singleselectlist.item_attr = UF_STYLER_VALUE;
, I, p/ Z: F( I% aSingleselectlist.item_id = item_id;
; p% p: x  @9 }9 j7 }Singleselectlist.indicator = UF_STYLER_INTEGER_VALUE;
2 g/ W, o; ^5 r' ?UF_STYLER_ask_value ( dialog_id, &Singleselectlist );
2 k; M& H9 ]3 U7 p5 J$ A9 e" a*value = Singleselectlist.value.integer;  D* v8 Q' h/ d6 ^: J
Singleselectlist.indicator = UF_STYLER_STRING_VALUE;
7 P! {* K" s5 h5 `7 v) ?( aUF_STYLER_ask_value ( dialog_id, &Singleselectlist );2 t! {# m  T0 \9 T$ U: L
sprintf ( string, "%s", Singleselectlist.value.string );: _; Y1 r/ @$ S  m" c/ z$ N; ?
}7 @" q- i  o" }. ~8 m  M2 G
extern void Test_set_singleselectlist_allitems ( int dialog_id, char *item_id,) y) \- o2 W/ s! |
int count, char **strings )
9 i' O9 P; g$ @. y{ UF_STYLER_item_value_type_t Singleselectlist; int i, error = 0;
$ k" L; D( E/ ^- c3 N$ _+ f0 XSingleselectlist.item_attr = UF_STYLER_SUBITEM_VALUES;
. e1 w0 O* \4 b5 _) nSingleselectlist.item_id = item_id;9 Z- ?+ @. i3 [$ q( f- B
Singleselectlist.count = count;/ a, z! L- E9 E- ^  `
Singleselectlist.value.strings = (char **) UF_allocate_memory ( count * sizeof ( char * ), &error );' ]6 k$ k2 l8 t; ^$ c) `
for ( i = 0; i < count; i ++ )
0 I/ v! O8 {* F- \6 \{ Singleselectlist.value.strings = (char *) UF_allocate_memory ( 133 * sizeof ( char ), &error );
9 K% Q) K8 ^7 ?% K. Ssprintf ( Singleselectlist.value.strings, "%s", strings );( O% |" R! A  O% `
}
  p6 }0 R# T9 }5 ?, W7 j# M- \2 uUF_STYLER_set_value ( dialog_id, &Singleselectlist );; R5 ^4 F, F* ~+ Y+ |8 _+ D' t+ d
UF_STYLER_free_value ( &Singleselectlist );! Y1 F( A& P2 p
}
0 ]7 M6 _  k7 o' z! Hextern void Test_set_singleselectlist_focusitem ( int dialog_id, char *item_id,
9 ]' L# y& m. D; l, }- i; A3 Y  Lint value )
6 e$ j' ^' R  ]% c{ UF_STYLER_item_value_type_t Singleselectlist;
6 m' ?1 S$ c# [) z6 a) MSingleselectlist.item_attr = UF_STYLER_VALUE;6 q) e1 Q' E! ^) J: d  A
Singleselectlist.item_id = item_id;
- x8 z0 T2 i2 x- a5 x, X. ~6 ~8 ^Singleselectlist.subitem_index = value < 0 ? UF_STYLER_NO_SUB_INDEX : value;; }, j7 e' D: s. x9 z! U7 E
UF_STYLER_set_value ( dialog_id, &Singleselectlist );
' C: z, x: |' U  j5 v& L1 b: k1 t}
3 m% g( s7 b" K% I1 u7 A, d! NProperty Pages
& L6 f6 G' F% n/ s' ?extern void Test_read_propertypages_activepage ( int dialog_id,
, }; ^8 Y" x/ g% @int *active_page )+ a% D: F* z3 q% x7 _' g5 e
{ UF_STYLER_item_value_type_t Propertypages;
1 w2 {0 h5 B( P5 t% QPropertypages.item_attr = UF_STYLER_ACTIVE_PAGE;
6 l- |) J" m  C9 z5 \& \Propertypages.item_id = UF_STYLER_DIALOG_INDEX;9 {7 O+ v9 J# P# j6 w* V
UF_STYLER_ask_value ( dialog_id, &Propertypages );. _8 |" N; @; m, M& P
*active_page = Propertypages.value.integer;
7 k+ u: X% N: T: k1 @, k7 K, a2 c}9 q5 b" }# G5 U3 m5 Q0 x3 D
extern void Test_set_propertypages_activepage ( int dialog_id,2 s3 r% Q: T% z0 i! J' J
int active_page )! c% {# N0 |+ d
{ UF_STYLER_item_value_type_t Propertypages;
) d* V7 {: ?9 }( B( J3 M. rPropertypages.item_attr = UF_STYLER_ACTIVE_PAGE;
9 e- l9 S, `1 p5 |. N1 tPropertypages.item_id = UF_STYLER_DIALOG_INDEX;
1 k) R3 F' C6 s2 Z: ~Propertypages.value.integer = active_page;5 O5 @5 L3 G. y4 R) x
UF_STYLER_set_value ( dialog_id, &Propertypages );
: ^" i/ _7 w- ]3 q}
7 S' L  g" j6 N- X" @$ z+ X) MColor Tool
! N( B$ |( L  L% ?% D. `" Q* Pextern void Test_read_colortool_activecolor ( int dialog_id,
) u0 X) F; ]5 lchar *item_id, int *active_color )
* F% j& q# r4 @{ UF_STYLER_item_value_type_t Colortool;2 n+ U+ ^& H' W; j; m$ S# v
Colortool.item_attr = UF_STYLER_VALUE;
6 A4 h( T; G& j5 s+ i% s! g1 EColortool.item_id = item_id;
7 g5 P! j  r2 V( s( f' wUF_STYLER_ask_value ( dialog_id, &Colortool );- L! r* n/ q+ |7 D- N3 R
*active_color = Colortool.value.integer;3 Y6 c4 [. C7 r4 v
}
: u3 n+ }9 n/ f" pextern void Test_set_colortool_activecolor ( int dialog_id,1 i8 V8 f+ v! }7 y; q& U' `
char *item_id, int active_color )
7 e5 {2 H- i9 z  k. f9 f- d{ UF_STYLER_item_value_type_t Colortool;
$ g# ~' v$ t$ J7 O& p5 _Colortool.item_attr = UF_STYLER_VALUE;
& m) k& U3 @8 Z6 h1 Z$ R$ GColortool.item_id = item_id;( R* N+ h# X6 Z: Y# n2 N' D& L
Colortool.value.integer = active_color;& ]# J2 F1 k& W. B6 G
UF_STYLER_set_value ( dialog_id, &Colortool );
' p2 y' Z" @9 q4 _5 e}
发表于 2015-11-5 22:29:48 | 显示全部楼层 来自: 中国浙江温州
发表回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则


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

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

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