Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-request From: chuck@trantor.harris-atd.com (Chuck Musciano) Newsgroups: comp.sys.sun Subject: Help with OpenWindows Keywords: Windows Message-ID: <5334@brazos.Rice.edu> Date: 27 Feb 90 16:59:17 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 64 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 9, Issue 55, message 6 I am just beginning to use OpenWindows, and have discovered that the documentation is missing one important part: the OpenWindows Programmers Guide. While the API Reference Manual and Porting Guide are fine in their own right, you cannot get any real work done without a programmer's guide. In particular, the API reference has absolutely no example code in it to help you out. Am I missing something fundamental? Did I not get a complete manual set? Where do I turn for example code and a more tutorial approach? I am a wizened SunView veteran, and I want to learn XView as a complete system, not just how to convert tools. My flails are prompted by some problems in opening a font. The font attributes include FONT_FAMILY, and FONT_STYLE. The API reference says that these attributes accept character strings for their values. (What a help, huh?) Perusing the include files (which I should NEVER have to do) tells me that things like FONT_FAMILY_LUCIDA and FONT_STYLE_BOLDITALIC are acceptable values for these attributes (I think). However, using these attributes results in the default font, I think. Here is my code: #include #include #include #include main(argc, argv) int argc; char **argv; { Frame frame; Panel panel; Xv_font font; xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, 0); font = xv_create(NULL, FONT, FONT_FAMILY, FONT_FAMILY_LUCIDA, FONT_SIZE, 14, FONT_STYLE, FONT_STYLE_BOLD_ITALIC, 0); frame = xv_create(NULL, FRAME, XV_LABEL, "A simple window", 0); panel = xv_create(frame, PANEL, XV_WIDTH, 400, XV_HEIGHT, 200, 0); xv_create(panel, PANEL_BUTTON, PANEL_LABEL_STRING, "A Button", PANEL_LABEL_FONT, font, 0); window_fit(frame); window_main_loop(frame); } My button is always displayed in the default font. What gives? How do I know what values are appropriate for these attributes? Where is some real documentation on this? Chuck Musciano ARPA : chuck@trantor.harris-atd.com Harris Corporation Usenet: ...!uunet!x102a!trantor!chuck PO Box 37, MS 3A/1912 AT&T : (407) 727-6131 Melbourne, FL 32902 FAX : (407) 727-{5118,5227,4004} I'm glad you asked, son. Being popular is the most important thing in the world. -- Homer Simpson