comparison dwtest.c @ 308:f844a07c5915

Get it working on OS/2. :)
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 31 Mar 2003 08:42:28 +0000
parents 32ad8a0dc06b
children 77105fe19c1f
comparison
equal deleted inserted replaced
307:324587c06cea 308:f844a07c5915
415 415
416 dw_box_pack_start(lbbox, browsebox, 0, 0, TRUE, TRUE, 0); 416 dw_box_pack_start(lbbox, browsebox, 0, 0, TRUE, TRUE, 0);
417 417
418 entryfield = dw_entryfield_new("", 100L); 418 entryfield = dw_entryfield_new("", 100L);
419 419
420 dw_entryfield_set_limit(entryfield, 260);
421
420 dw_box_pack_start(browsebox, entryfield, 100, 15, TRUE, TRUE, 4); 422 dw_box_pack_start(browsebox, entryfield, 100, 15, TRUE, TRUE, 4);
421 423
422 browsebutton = dw_button_new("Browse", 1001L); 424 browsebutton = dw_button_new("Browse", 1001L);
423 425
424 dw_box_pack_start(browsebox, browsebutton, 30, 15, TRUE, TRUE, 0); 426 dw_box_pack_start(browsebox, browsebutton, 30, 15, TRUE, TRUE, 0);
517 /* create a box to pack into the notebook page */ 519 /* create a box to pack into the notebook page */
518 treebox = dw_box_new(BOXHORZ, 2); 520 treebox = dw_box_new(BOXHORZ, 2);
519 dw_box_pack_start( notebookbox3, treebox, 500, 200, TRUE, TRUE, 0); 521 dw_box_pack_start( notebookbox3, treebox, 500, 200, TRUE, TRUE, 0);
520 522
521 /* now a tree area under this box */ 523 /* now a tree area under this box */
522 tree = dw_tree_new(0); 524 tree = dw_tree_new(101);
523 dw_box_pack_start( notebookbox3, tree, 500, 200, TRUE, FALSE, 1); 525 dw_box_pack_start( notebookbox3, tree, 500, 200, TRUE, FALSE, 1);
524 526
525 /* and a status area to see whats going on */ 527 /* and a status area to see whats going on */
526 tree_status = dw_status_text_new("", 0); 528 tree_status = dw_status_text_new("", 0);
527 dw_box_pack_start( notebookbox3, tree_status, 100, 20, TRUE, FALSE, 1); 529 dw_box_pack_start( notebookbox3, tree_status, 100, 20, TRUE, FALSE, 1);
562 /* create a box to pack into the notebook page */ 564 /* create a box to pack into the notebook page */
563 containerbox = dw_box_new(BOXHORZ, 2); 565 containerbox = dw_box_new(BOXHORZ, 2);
564 dw_box_pack_start( notebookbox4, containerbox, 500, 200, TRUE, TRUE, 0); 566 dw_box_pack_start( notebookbox4, containerbox, 500, 200, TRUE, TRUE, 0);
565 567
566 /* now a container area under this box */ 568 /* now a container area under this box */
567 container = dw_container_new(0); 569 container = dw_container_new(100);
568 dw_box_pack_start( notebookbox4, container, 500, 200, TRUE, FALSE, 1); 570 dw_box_pack_start( notebookbox4, container, 500, 200, TRUE, FALSE, 1);
571
572 dw_container_set_view(container, DW_CV_DETAIL | DW_CV_MINI | DW_CA_DETAILSVIEWTITLES, 16, 16);
569 573
570 /* and a status area to see whats going on */ 574 /* and a status area to see whats going on */
571 container_status = dw_status_text_new("", 0); 575 container_status = dw_status_text_new("", 0);
572 dw_box_pack_start( notebookbox4, container_status, 100, 20, TRUE, FALSE, 1); 576 dw_box_pack_start( notebookbox4, container_status, 100, 20, TRUE, FALSE, 1);
573 577
582 { 586 {
583 size = z+100; 587 size = z+100;
584 sprintf(buffer, "Filename %d",z+1); 588 sprintf(buffer, "Filename %d",z+1);
585 if (z == 0 ) thisicon = foldericon; 589 if (z == 0 ) thisicon = foldericon;
586 else thisicon = fileicon; 590 else thisicon = fileicon;
587 dw_filesystem_set_file(container, containerinfo, z, buffer, thisicon); 591 dw_filesystem_set_file(container, containerinfo, z, strdup(buffer), thisicon);
588 dw_filesystem_set_item(container, containerinfo, 0, z, &size); 592 dw_filesystem_set_item(container, containerinfo, 0, z, &size);
589 593
590 time.seconds = z+10; 594 time.seconds = z+10;
591 time.minutes = z+10; 595 time.minutes = z+10;
592 time.hours = z+10; 596 time.hours = z+10;
595 date.day = z+10; 599 date.day = z+10;
596 date.month = z+10; 600 date.month = z+10;
597 date.year = z+2000; 601 date.year = z+2000;
598 dw_filesystem_set_item(container, containerinfo, 2, z, &date); 602 dw_filesystem_set_item(container, containerinfo, 2, z, &date);
599 603
600 dw_container_set_row_title(containerinfo, z, buffer); 604 dw_container_set_row_title(containerinfo, z, "Don't allocate from the stack");
601 } 605 }
602 606
603 dw_container_insert(container, containerinfo, 3); 607 dw_container_insert(container, containerinfo, 3);
604 dw_container_optimize(container); 608 dw_container_optimize(container);
605 609