add: WPrefs.balloonBtn = WMCreateSwitchButton(WPrefs.win); WMResizeWidget(WPrefs.balloonBtn, 200, 28); WMMoveWidget(WPrefs.balloonBtn, 15, 350); WMSetButtonText(WPrefs.balloonBtn, _("Balloon Help")); WMSetButtonAction(WPrefs.balloonBtn, toggleBalloons, NULL); { WMUserDefaults *udb = WMGetStandardUserDefaults(); Bool flag = WMGetUDBoolForKey(udb, "BalloonHelp");  WMSetButtonSelected(WPrefs.balloonBtn, flag); WMSetBalloonEnabled(scr, flag); }
context: createMainWindow(WMScreen *scr){    WMScroller *scroller;    WMFont *font;    char buffer[128];    WPrefs.win = WMCreateWindow(scr, "wprefs");    WMResizeWidget(WPrefs.win, 520, 390);    WMSetWindowTitle(WPrefs.win, _("Window Maker Preferences"));    WMSetWindowCloseAction(WPrefs.win, quit, NULL);    WMSetWindowMaxSize(WPrefs.win, 520, 390);    WMSetWindowMinSize(WPrefs.win, 520, 390);    WMSetWindowMiniwindowTitle(WPrefs.win, "Preferences");    WMSetWindowMiniwindowImage(WPrefs.win, WMGetApplicationIconImage(scr));        WPrefs.scrollV = WMCreateScrollView(WPrefs.win);    WMResizeWidget(WPrefs.scrollV, 500, 87);    WMMoveWidget(WPrefs.scrollV, 10, 10);    WMSetScrollViewRelief(WPrefs.scrollV, WRSunken);    WMSetScrollViewHasHorizontalScroller(WPrefs.scrollV, True);    WMSetScrollViewHasVerticalScroller(WPrefs.scrollV, False);    scroller = WMGetScrollViewHorizontalScroller(WPrefs.scrollV);    WMSetScrollerArrowsPosition(scroller, WSANone);    WPrefs.buttonF = WMCreateFrame(WPrefs.win);    WMSetFrameRelief(WPrefs.buttonF, WRFlat);    WMSetScrollViewContentView(WPrefs.scrollV, WMWidgetView(WPrefs.buttonF));    WPrefs.undosBtn = WMCreateCommandButton(WPrefs.win);    WMResizeWidget(WPrefs.undosBtn, 90, 28);    WMMoveWidget(WPrefs.undosBtn, 135, 350);    WMSetButtonText(WPrefs.undosBtn, _("Revert Page"));    WMSetButtonAction(WPrefs.undosBtn, undo, NULL);        WPrefs.undoBtn = WMCreateCommandButton(WPrefs.win);    WMResizeWidget(WPrefs.undoBtn, 90, 28);    WMMoveWidget(WPrefs.undoBtn, 235, 350);    WMSetButtonText(WPrefs.undoBtn, _("Revert All"));    WMSetButtonAction(WPrefs.undoBtn, undoAll, NULL);    WPrefs.saveBtn = WMCreateCommandButton(WPrefs.win);    WMResizeWidget(WPrefs.saveBtn, 80, 28);    WMMoveWidget(WPrefs.saveBtn, 335, 350);    WMSetButtonText(WPrefs.saveBtn, _("Save"));    WMSetButtonAction(WPrefs.saveBtn, save, NULL);        WPrefs.closeBtn = WMCreateCommandButton(WPrefs.win);    WMResizeWidget(WPrefs.closeBtn, 80, 28);    WMMoveWidget(WPrefs.closeBtn, 425, 350);    WMSetButtonText(WPrefs.closeBtn, _("Close"));    WMSetButtonAction(WPrefs.closeBtn, quit, NULL);        /* banner */    WPrefs.banner = WMCreateFrame(WPrefs.win);    WMResizeWidget(WPrefs.banner, FRAME_WIDTH, FRAME_HEIGHT);    WMMoveWidget(WPrefs.banner, FRAME_LEFT, FRAME_TOP);    WMSetFrameRelief(WPrefs.banner, WRFlat);    font = WMCreateFont(scr, "-*-times-bold-r-*-*-24-*-*-*-*-*-*-*,"			"-*-fixed-medium-r-normal-*-24-*");    if (!font)	font = WMBoldSystemFontOfSize(scr, 24);    WPrefs.nameL = WMCreateLabel(WPrefs.banner);    WMSetLabelTextAlignment(WPrefs.nameL, WACenter);    WMResizeWidget(WPrefs.nameL, FRAME_WIDTH-20, 30);    WMMoveWidget(WPrefs.nameL, 10, 25);    WMSetLabelFont(WPrefs.nameL, font);    WMSetLabelText(WPrefs.nameL, _("Window Maker Preferences Utility"));    WMReleaseFont(font);    WPrefs.versionL = WMCreateLabel(WPrefs.banner);    WMResizeWidget(WPrefs.versionL, FRAME_WIDTH-20, 20);    WMMoveWidget(WPrefs.versionL, 10, 65);    WMSetLabelTextAlignment(WPrefs.versionL, WACenter);    sprintf(buffer, _("Version %s for Window Maker %s or newer"), WVERSION,								 WMVERSION);    WMSetLabelText(WPrefs.versionL, buffer);    WPrefs.statusL = WMCreateLabel(WPrefs.banner);    WMResizeWidget(WPrefs.statusL, FRAME_WIDTH-20, 60);    WMMoveWidget(WPrefs.statusL, 10, 100);    WMSetLabelTextAlignment(WPrefs.statusL, WACenter);    WMSetLabelText(WPrefs.statusL, _("Starting..."));         WPrefs.creditsL = WMCreateLabel(WPrefs.banner);    WMResizeWidget(WPrefs.creditsL, FRAME_WIDTH-20, 60);    WMMoveWidget(WPrefs.creditsL, 10, FRAME_HEIGHT-60);    WMSetLabelTextAlignment(WPrefs.creditsL, WACenter);    WMSetLabelText(WPrefs.creditsL, _("Programming/Design: Alfredo K. Kojima\n"		   		"Artwork: Marco van Hylckama Vlieg\n"				      "More Programming: James Thompson"));           WMMapSubwidgets(WPrefs.win);        WMUnmapWidget(WPrefs.undosBtn);    WMUnmapWidget(WPrefs.undoBtn);    WMUnmapWidget(WPrefs.saveBtn);}