Path: utzoo!attcan!uunet!mailrus!ames!uhccux!munnari.oz.au!csc!csc3!arp!gustav From: gustav@arp.anu.oz.au (Zdzislaw Meglicki) Newsgroups: comp.windows.x Subject: Re: toolkit Message-ID: <1989Nov20.221807.23785@arp.anu.oz.au> Date: 20 Nov 89 22:18:07 GMT Organization: Automated Reasoning Project, ANU, Australia Lines: 52 From article <10431@xanth.cs.odu.edu>, by lfl@cs.odu.edu (Lianfang Liu): > > Does anybody know: > Why is there no standard toolkit for x window ? > As far as I know libXt, libXaw, and libXmu yield a standard toolkit for X. Although many vendors may want to _push_ theirs, and may try not to include Athena widgets in their distribution, you can always get Athena Widgets from expo.lcs.mit.edu via ftp anonymous. > How to change the string value of asciiStringWidget ? I use X Toolkit Athena > Widgets. I tried 'XtSetValue' and to modify XtNstring. They did not work. > There is not 'XtTextReplace' in this Toolkit. This is an example illustrating how you can do what you want with Athena Widgets (incidentally - XtTextReplace is available with Athena Widgets). #include #include ... char *a_string Widget global_magic_output, main_pane; Arg text_args [30]; int i; static XtTextBlock text_block; static XtTextPosition old_length, total_length, length; ... XtSetArg (text_args [i], XtNeditType, (XtArgVal) XttextEdit); i++; ... global_magic_output = XtCreateManagedWidget ("magic_output", asciiStringWidgetClass, main_pane, text_args, i); XtTextEnableRedisplay (global_magic_output); ... text_block.firstPos = (int) old_length; text_block.length = (int) length; text_block.ptr = a_string; text_block.format = FMT8BIT; XtTextReplace (global_magic_output, old_length, total_length, &text_block); XtTextSetInsertionPoint (global_magic_output, total_length); Hope it'll help Gustav Meglicki, Automated Reasoning Project, The Research School of Social Sciences, The Australian National University, GPO Box 4, Canberra, ACT 2601, Australia inet: gustav@arp.anu.oz.au