comparison dwtestoo.cpp @ 2939:ebbc5b16899e

C++: Another couple fixes, context menus and PackAtIndex that got lost during porting.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 01 Jan 2023 00:23:39 +0000
parents 1184f58135ba
children 60e90b783cb1
comparison
equal deleted inserted replaced
2938:1184f58135ba 2939:ebbc5b16899e
349 } 349 }
350 350
351 // Request that the render widgets redraw... 351 // Request that the render widgets redraw...
352 // If not using direct rendering, call UpdateRender() to 352 // If not using direct rendering, call UpdateRender() to
353 // redraw the in memory pixmaps. Then trigger the expose events. 353 // redraw the in memory pixmaps. Then trigger the expose events.
354 // Expose will call update_render() to draw directly or bitblt the pixmaps. 354 // Expose will call UpdateRender() to draw directly or bitblt the pixmaps.
355 void RenderDraw() { 355 void RenderDraw() {
356 // If we are double buffered, draw to the pixmaps 356 // If we are double buffered, draw to the pixmaps
357 if(render_type != SHAPES_DIRECT) 357 if(render_type != SHAPES_DIRECT)
358 UpdateRender(); 358 UpdateRender();
359 // Trigger expose event 359 // Trigger expose event
702 DW::Button *okbutton = new DW::Button("Turn Off Annoying Beep!"); 702 DW::Button *okbutton = new DW::Button("Turn Off Annoying Beep!");
703 buttonbox->PackStart(okbutton, 130, 30, TRUE, TRUE, 2); 703 buttonbox->PackStart(okbutton, 130, 30, TRUE, TRUE, 2);
704 704
705 cancelbutton->Unpack(); 705 cancelbutton->Unpack();
706 buttonbox->PackStart(cancelbutton, 130, 30, TRUE, TRUE, 2); 706 buttonbox->PackStart(cancelbutton, 130, 30, TRUE, TRUE, 2);
707 //this->ClickDefault(cancelbutton); 707 this->ClickDefault(cancelbutton);
708 708
709 DW::Button *colorchoosebutton = new DW::Button("Color Chooser Dialog"); 709 DW::Button *colorchoosebutton = new DW::Button("Color Chooser Dialog");
710 buttonbox->PackStart(colorchoosebutton, 130, 30, TRUE, TRUE, 2); 710 buttonbox->PackAtIndex(colorchoosebutton, 1, 130, 30, TRUE, TRUE, 2);
711 711
712 // Set some nice fonts and colors 712 // Set some nice fonts and colors
713 lbbox->SetColor(DW_CLR_DARKCYAN, DW_CLR_PALEGRAY); 713 lbbox->SetColor(DW_CLR_DARKCYAN, DW_CLR_PALEGRAY);
714 buttonbox->SetColor(DW_CLR_DARKCYAN, DW_CLR_PALEGRAY); 714 buttonbox->SetColor(DW_CLR_DARKCYAN, DW_CLR_PALEGRAY);
715 okbutton->SetColor(DW_CLR_PALEGRAY, DW_CLR_DARKCYAN); 715 okbutton->SetColor(DW_CLR_PALEGRAY, DW_CLR_DARKCYAN);