Mercurial > dwindows
comparison win/dw.c @ 447:5a0779561d0f
Add more tests for dw_pac*() functions. Throw up a messagebox if you try and
pack an item into itself; at least under GTK this causes an inifinite loop.
Under GTK, add functionality to dw_spinbutton_set_limits() to actually do
something.
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 03 Jun 2003 09:13:35 +0000 |
parents | faaeec0dba1d |
children | e81af9e60697 |
comparison
equal
deleted
inserted
replaced
446:ab549e2f34b9 | 447:5a0779561d0f |
---|---|
4730 */ | 4730 */ |
4731 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad) | 4731 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad) |
4732 { | 4732 { |
4733 Box *thisbox; | 4733 Box *thisbox; |
4734 | 4734 |
4735 /* | |
4736 * If you try and pack an item into itself VERY bad things can happen; like at least an | |
4737 * infinite loop on GTK! Lets be safe! | |
4738 */ | |
4739 if(box == item) | |
4740 { | |
4741 dw_messagebox("dw_box_pack_start()", DW_MB_OK|DW_MB_ERROR, "Danger! Danger! Will Robinson; box and item are the same!",box,item); | |
4742 return; | |
4743 } | |
4744 | |
4735 thisbox = (Box *)GetWindowLongPtr(box, GWLP_USERDATA); | 4745 thisbox = (Box *)GetWindowLongPtr(box, GWLP_USERDATA); |
4736 if(thisbox) | 4746 if(thisbox) |
4737 { | 4747 { |
4738 int z; | 4748 int z; |
4739 Item *tmpitem, *thisitem = thisbox->items; | 4749 Item *tmpitem, *thisitem = thisbox->items; |
7529 */ | 7539 */ |
7530 void API dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad) | 7540 void API dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad) |
7531 { | 7541 { |
7532 Box *thisbox; | 7542 Box *thisbox; |
7533 | 7543 |
7544 /* | |
7545 * If you try and pack an item into itself VERY bad things can happen; like at least an | |
7546 * infinite loop on GTK! Lets be safe! | |
7547 */ | |
7548 if(box == item) | |
7549 { | |
7550 dw_messagebox("dw_box_pack_end()", DW_MB_OK|DW_MB_ERROR, "Danger! Danger! Will Robinson; box and item are the same!",box,item); | |
7551 return; | |
7552 } | |
7553 | |
7534 thisbox = (Box *)GetWindowLongPtr(box, GWLP_USERDATA); | 7554 thisbox = (Box *)GetWindowLongPtr(box, GWLP_USERDATA); |
7535 if(thisbox) | 7555 if(thisbox) |
7536 { | 7556 { |
7537 int z; | 7557 int z; |
7538 Item *tmpitem, *thisitem = thisbox->items; | 7558 Item *tmpitem, *thisitem = thisbox->items; |