* rcparse.y (res_text_field): New res_id variable.

(res_null_text): New static const struct res_id object,
	with empty unicode name field.
	(control): Pop parsing of optresidc up one level. Set
	res_text_field to $2 except for controls which do not accept
	a text field.  Set res_text_field to res_null_text for the
	special cases (viz. COMBOBOX, EDITTEXT, LISTBOX, SCROLLBAR).
	(control_params): Adjust to use res_text_field rather
	than optresidc.
	(COMBOBOX): Add comment about discrepency between documented
	vs. observed default style.
	* resrc.c (define_control): Make first param const.
	* windres.h (define_control): Adjust prototype.

testsuite:

	* binutils-all/windres/checkbox.rc: New file.
	* binutils-all/windres/checkbox.rsd: New file.
	* binutils-all/windres/combobox.rc: New file.
	* binutils-all/windres/combobox.rsd: New file.
	* binutils-all/windres/edittext.rc: New file.
	* binutils-all/windres/edittext.rsd: New file.
	* binutils-all/windres/listbox.rc: New file.
	* binutils-all/windres/listbox.rsd: New file.
	* binutils-all/windres/scrollbar.rc: New file.
	* binutils-all/windres/scrollbar.rsd: New file.
This commit is contained in:
Danny Smith
2003-06-28 02:37:43 +00:00
parent 0b2828595e
commit b9ae04920a
15 changed files with 170 additions and 47 deletions

View File

@@ -0,0 +1,5 @@
501 DIALOGEX DISCARDABLE 0, 0, 168, 137
BEGIN
CHECKBOX 108, 1002, 12, 76, 123, 41
CHECKBOX "tick me", 1001, 12, 15, 123, 41
END

View File

@@ -0,0 +1,12 @@
0000 00000000 20000000 ffff0000 ffff0000 .... ...........
0010 00000000 00000000 00000000 00000000 ................
0020 72000000 20000000 ffff0500 fffff501 r... ...........
0030 00000000 30100904 00000000 00000000 ....0...........
0040 0100ffff 00000000 00000000 00008880 ................
0050 02000000 0000a800 89000000 00000000 ................
0060 00000000 00000000 02000150 0c004c00 ...........P..L.
0070 7b002900 ea030000 ffff8000 ffff6c00 {.)...........l.
0080 00000000 00000000 00000000 02000150 ...............P
0090 0c000f00 7b002900 e9030000 ffff8000 ....{.).........
00a0 74006900 63006b00 20006d00 65000000 t.i.c.k. .m.e...
00b0 00000000 ....

View File

@@ -0,0 +1,8 @@
#define CBS_SIMPLE 0x1
#define WS_TABSTOP 0x10000
501 DIALOG DISCARDABLE 0, 0, 168, 137
BEGIN
COMBOBOX 1001,10,10,50,54, CBS_SIMPLE | WS_TABSTOP
END

View File

@@ -0,0 +1,8 @@
0000 00000000 20000000 ffff0000 ffff0000 .... ...........
0010 00000000 00000000 00000000 00000000 ................
0020 32000000 20000000 ffff0500 fffff501 2... ...........
0030 00000000 30100904 00000000 00000000 ....0...........
0040 00008880 00000000 01000000 0000a800 ................
0050 89000000 00000000 01000150 00000000 ...........P....
0060 0a000a00 32003600 e903ffff 85000000 ....2.6.........
0070 00000000 ....

View File

@@ -0,0 +1,4 @@
501 DIALOG DISCARDABLE 0, 0, 168, 137
BEGIN
EDITTEXT 1001, 28, 63, 137, 52
END

View File

@@ -0,0 +1,8 @@
0000 00000000 20000000 ffff0000 ffff0000 .... ...........
0010 00000000 00000000 00000000 00000000 ................
0020 32000000 20000000 ffff0500 fffff501 2... ...........
0030 00000000 30100904 00000000 00000000 ....0...........
0040 00008880 00000000 01000000 0000a800 ................
0050 89000000 00000000 00008150 00000000 ...........P....
0060 1c003f00 89003400 e903ffff 81000000 ..?...4.........
0070 00000000 ....

View File

@@ -0,0 +1,4 @@
501 DIALOG DISCARDABLE 0, 0, 168, 137
BEGIN
LISTBOX 1001, 28, 63, 137, 52
END

View File

@@ -0,0 +1,8 @@
0000 00000000 20000000 ffff0000 ffff0000 .... ...........
0010 00000000 00000000 00000000 00000000 ................
0020 32000000 20000000 ffff0500 fffff501 2... ...........
0030 00000000 30100904 00000000 00000000 ....0...........
0040 00008880 00000000 01000000 0000a800 ................
0050 89000000 00000000 01008050 00000000 ...........P....
0060 1c003f00 89003400 e903ffff 83000000 ..?...4.........
0070 00000000 ....

View File

@@ -0,0 +1,4 @@
501 DIALOGEX 0, 0, 168, 137
BEGIN
SCROLLBAR 1001,43,68,105,10,0,0,0x81f503e9
END

View File

@@ -0,0 +1,8 @@
0000 00000000 20000000 ffff0000 ffff0000 .... ...........
0010 00000000 00000000 00000000 00000000 ................
0020 40000000 20000000 ffff0500 fffff501 @... ...........
0030 00000000 30100904 00000000 00000000 ....0...........
0040 0100ffff 00000000 00000000 00008880 ................
0050 01000000 0000a800 89000000 00000000 ................
0060 e903f581 00000000 00000050 2b004400 ...........P+.D.
0070 69000a00 e9030000 ffff8400 00000000 i...............