HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.windows.x.motif
Subject: Re: Another Row Column Question
From: bindi@ewd.dsto.gov.au (Bindi Harding)
Date: 28 Jan 93 11:56:02 CST
Distribution: world
Organization: Defence Science and Technology Organisation, Salisbury, South Australia

In article <765367d8620440t1@lha.infoserv.com>, "Your Full Name" <nodename@nodename.infoserv.com> writes:
> I have a question concerning manipulation of child widgets in
> a RowColumn wiget.  I am trying to create a spreadsheet-like
> display consisting of rows of text and label widgets.
> 
> 1) I am trying to eliminate the spacing between the child widgets.
>    I have tried XmNspacing. When set to zero, there still exist a
>    gap between widgets, and if I set the value negative, well...
>    it bounce back to default. Is there something I'm missing?
>    
> 2) I am having problems trying to get the text to be centered on
>    labels on a rowcolumn widget. XmNalignment does not seems to 
>    have any affect on the positioning (whether I set it on the 
>    rowcolumn or the child).
>    
>    					Thanks in Advance,
>    							R.
> 
> ---------------------------------------------------------------
> 
> Rocco Pochy                |     "Cage of Freedom"
> Software Engineer        -=+=-            -Metropolis
> Physicist in Training      |      
> 

I've had a similar problem with RowColumn widgets.  I can't seem to centre the
text on PushButtons which were placed in the RowColumn widget.  You're right,
XmNalignment has no effect - the text always starts at the beginning.

I haven't tried to eliminate the spacing between child widgets within a RowCol
widget, but there must be a way to do it, since that method I think is used for
menus.  Menus are just fancy extensions of RowColumn widgets, and they don't
have spaces between their widgets.

I'd be interested to find out how you go with this too.

Bindi
Date: Saturday, 23 January 1993 23:48:07 PDT
X-Mailer: TMail version 1.13
From: "Your Full Name" <nodename@nodename.infoserv.com>
Organization: Company name or other description.
Subject: Another Row Column Question
Newsgroups: comp.windows.x.motif
Distribution: world

I have a question concerning manipulation of child widgets in
a RowColumn wiget.  I am trying to create a spreadsheet-like
display consisting of rows of text and label widgets.

1) I am trying to eliminate the spacing between the child widgets.
   I have tried XmNspacing. When set to zero, there still exist a
   gap between widgets, and if I set the value negative, well...
   it bounce back to default. Is there something I'm missing?
   
2) I am having problems trying to get the text to be centered on
   labels on a rowcolumn widget. XmNalignment does not seems to 
   have any affect on the positioning (whether I set it on the 
   rowcolumn or the child).
   
   					Thanks in Advance,
   							R.

---------------------------------------------------------------

Rocco Pochy                |     "Cage of Freedom"
Software Engineer        -=+=-            -Metropolis
Physicist in Training      |      

Newsgroups: comp.windows.x.motif
From: dpotlur@hubcap.clemson.edu (Potluri Dora)
Subject: Help with motif text widgets wanted..
Keywords: motif 1.1.3, text widget, scroll bar
Organization: Clemson University
Date: Fri, 29 Jan 1993 03:16:41 GMT

Hello netters!
	
	I am a developing a small application with motif user interface.
The interface consists a set of push button widgets and a text widget
on a paned window.
	The text widget should not only be able to display simple 
text but may contain iconified objects( these objects should have the
call back capability) throughout the document.

	I am particularly unable to embed these objects( may be icons)
into the displayed widget. 
	Is there any way I can accomplish this in the text widget? 
Any help is greatly appreciated. 
	
Potluri Dora
Clemson University
Clemson, sc 29631
-----------------------------------------------------------------------
e-mail address
dpotlur@sparerib.clemson.edu 
dpotlur@hubcap.clemson.edu
-- 
Potluri Dora
Information Systems Lab  
Clemson University
Clemson, sc 29631
Newsgroups: comp.windows.x.motif
From: anil@microware.com (Anil Purohit)
Subject: Text Widget
Followup-To: anil@microware.com
Keywords: set, delete etc.
Organization: Microware Systems Corp., Des Moines, Iowa
Date: Thu, 21 Jan 1993 19:16:22 GMT

Hi Motif gurus,
	How do you, from within the program ( at run time )
hit a backspace in a text widget. LIke, I call a function 
which would act as if somebody hit a backspace in the text
widget. Thanks a lot

Bye,

anil		[ anil@microware.com ]


-- 
--------------------------------------------------------------------
DISCLAIMER:
Opinions expressed are mine and only mine.

Anil C. Purohit  			E-mail:	anil@microware.com
--------------------------------------------------------------------
Newsgroups: comp.windows.x.motif
From: akhtar@enuxha.eas.asu.edu (Naeem Akhtar)
Subject: Help
Keywords: pixmap in cascade buttons
Organization: Arizona State University
Date: Fri, 22 Jan 1993 08:51:29 GMT


Hi folks!

	I'm a novice in X-world and trying to learn X. I have following
question (1 of many) and hope some guru will reply.

Q.	I am trying to create a menu-bar and want to have a pixmap
	as label in the cascade button (having pulldown menu as child).
	And guess what :- Error.
	Here is a part of the code (There might be something syntax errors).
	
	/**	All the includes **/

	/* Global Vars */
	Arg		args[MAX_ARGS];
	Pixmap	apple;

	Widget CreateMenu (parent)
	Widget	parent;
	{
		Widget	menubar, menu_pane;
		int		n;

		n = 0;
		menu_bar = XmCreateMenuBar (parent, "Menu_Bar", args, n);

	 	menu_pane = XmCreatePulldownMenu (menu_bar, "File", args, n);

		XtManageChild (XtCreatePushButton (menu_pane, "Quit", args, n));

		XtSetArgs (args[n], XmNsubMenuId, menu_pane);
		XtSetArgs (args[n], XmNlabelType, XmPIXMAP);
		XtSetArgs (args[n], XmNlabelPixmap, apple);
		cascade = XmCreateCascadeButton (menu_bar, NULL, args, n);
		XtManageChild (cascade);
		
		return (menubar);
	}

	void main (args, argv)
	unsinged int args;
	char		 **argv;
	{
		Widget			topLevel, appshell, menu_bar, frame;
		XtAppContext	app_context;

    	topLevel = XtAppInitialize (&app_context, "Mac", NULL, 0, &argc,
                    argv, NULL, args, 0);

    	apple = XCreateBitmapFromData (XtDisplay (topLevel),
                                    RootWindowOfScreen (XtScreen (topLevel)),
                                    Icon_bits,
                                    Icon_width,
                                    Icon_height);

    	XtSetArg (args[n], XmNiconic, TRUE); n++;
    	XtSetArg (args[n], XmNiconPixmap, apple); n++;
    	XtSetValues (topLevel, args, n);


		XtSetArg (args[n], XmNwidth, 200); n++;
    	XtSetArg (args[n], XmNheight, 200); n++;
    	appshell = XmCreateMainWindow (topLevel, "Main_Window", args, n);
    	XtManageChild (appshell);

    	menu_bar = CreateMenuBar (appshell);
    	XtManageChild (menu_bar);

    	frame = XmCreateRowColumn (appshell, "Frame", args, n);
    	XtManageChild (frame);

    	XmMainWindowSetAreas (appshell, menu_bar, NULL, NULL, NULL, frame);


		XtRealizeWidget (topLevel);
    	XtAppMainLoop (app_context);

	}

If your answer is :-
	I havn't created GC (I don't know what is that so far), then please
	explain shortly what is GC? Why we need it here not in XmDrawnButton.
	                               ---

Thanks in advance.
Naeem!
--
<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>> |       God is real      |
<< M. N. Akhtar      Arizona State University  >> |         unless         |
<<      akhtar@enuxha.eas.asu.edu              >> |        declared        |
<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>> |         integer        |
Newsgroups: comp.windows.x.motif
From: tommc@hpcvusc.cv.hp.com (Tom McFarland)
Subject: Re: XmText: Obtaining the string value without allocating space.
Keywords: XmText, String Value
Reply-To: tommc@cv.hp.com
Organization: Hewlett Packard UTD-Corvallis
Date: Thu, 28 Jan 1993 18:32:05 GMT

In article <1993Jan6.151418.2779@aw2.fsl.ca.boeing.com>, mdr0264@aw2.fsl.ca.boeing.com (Michael D. Riston) writes:
|> Is there a way to get the XmText widget's internal string value character 
|> pointer directly?
|> 
|> I am using XmTextGetString and XmNvalue to get a character pointer, but
|> these methods both return a memory allocated string that I have to 
|> delete when I am done using it.  When you have large files in the Text widget
|> (like an editor), constantly allocating memory becomes very inefficient,
|> whenever you want to look at the Text string (which is alot when your
|> application is an editor).

Basically, you get there from here.  The text widget stores its value in
a non-linear array of bytes; in the middle of the data is a gapped buffer
added to enhance performance during typing operations.  Further, as of 1.2,
the data is not even guaranteed to be stored as char*; it may be stored as
BITS16* or BITS32*, depending on the locale of the user.  
 
An alternative you might explore would be to get the value of the text widget
initially (i.e. one malloc), and then register a modifyVerify callback so
that you are notified each time the widget's value changes.  The modifyVerify
callback data will tell you what is being added/deleted and at what point
in the widgets value; you could then mimic those changes in your copy of
the widget contents... you would never have to call XmTextGetString or
XtGetValues for the text widget again.

Tom McFarland
Hewlett-Packard, Co.
R&D Motif Team
<tommc@cv.hp.com>

|> ------------------------------------------------------------------------------
|> Michael D. Riston           |Voice: (206) 662-4345 
|> Boeing Commercial Airplanes |Boeing net: mdr0264@aw300
|> P.O. Box 3707, M/S 19-MH    |UUCP: ..!uunet!bcstec!aw300!mdr0264
|> Seattle, WA  98124-2207     |Internet: mdr0264@aw300.iasl.ca.boeing.com
|> -- 
|> ------------------------------------------------------------------------------
|> Michael D. Riston           |Voice: (206) 234-2432 
|> Boeing Commercial Airplanes |Boeing net: mdr0264@aw300
|> P.O. Box 3707, M/S OW-31    |UUCP: ..!uunet!bcstec!aw300!mdr0264
Newsgroups: comp.windows.x.motif
From: mark@prepress.com (Mark S. Bubien)
Subject: OverrideShell and System Modal, how?
Organization: Pre-Press Technologies, Carlsbad Ca.
Date: Mon, 25 Jan 1993 16:55:39 GMT


Please, someone, tell me how to implement System Modal using an 
OverrideShell.

I know the motif menus, once posted, are system modal.  They
use an OverrideShell.  But, as far as I know, you CANNOT set
the XmNdialogStyle resource for a child of an OverrideShell.
IE  if you have a Bulletin Board child of the OverrideShell,
setting:
	XtVaSetValues(BulletinBoard,
                      XmNDialogStyle,   XmDIALOG_SYSTEM_MODAL,
                      NULL);
will not work.

So how do they do it?  Better yet, how do I do it?

Thanks
	Mark
--
=============================================================================
                        |  Most of the time, my head is on straight         |
Mark S. Bubien		|  Most of the time, I'm strong enough not to hate  |
mark@prepress.com	|  I don't build up illusion, 'til it makes me sick |
                        |  I ain't afraid of confusion, no matter how thick |
Pre-Press Technologies	|  I can smile in the face of mankind.              |
2443 Impala Dr.		|  Don't even remember what her lips felt like on   |
Carlsbad, Ca 92008	|       mine                                        |
(619) 931-2695		|  Most of the time.                                |
                        |                -Bob Dylan                         |
=============================================================================
Date: Wednesday, 27 January 1993 21:48:27 PDT
X-Mailer: TMail version 1.13
From: Rocco Pochy <lha@lha.infoserv.com>
Organization: Under Construction
Subject: Hardwired Color
Newsgroups: comp.windows.x.motif
Distribution: world

I have ran into a problem on trying to hardcoded the 
foreground and background color of an application
(based on some external event).  I have tried setting
the foreground and background of the toplevel widget
assuming that the children will inherit the values.

Setting resource files and fallback resources work fine,
it just seems like after initialization, values are no
longer propagated.  Any clues?

			Thanks in Advance
					R.

---------------------------------------------------------------

Rocco Pochy                |     "Cage of Freedom"
Software Engineer        -=+=-            -Metropolis
Physicist in Training      |      

Newsgroups: comp.windows.x.motif
From: pierre@lectra.fr (Pierre Ficheux)
Subject: Re: Japanese characters for XmLabel
Organization: Lectra Systemes, Cestas, France
Date: Tue, 26 Jan 1993 09:52:01 GMT
Keywords: Japan, Label, String

In article <1j413oINN9r2@hal.com>, randolph@hal.COM (Randolph Bertin) writes:
> 
> How can I display Japanese characters on an XmLabel (PushButton, etc)
> widget?  Ideally, I would like to be able to set up a Japanese version
> of the resource file containing all of the label strings.
> 

	No problem. You just have to put the ascii string corresponding to the
kanji character 16 bits code ==> example with the k14 font :

	*fontList: k14
	*label1*labelString:	0!

	It will display the first kanji charactere of the k14 font (code 0x3021 =>
string 0!).

-- 
 ._______________________________.__________________________. 
+-------------------------------'--------------------------'|
| Pierre FICHEUX                | tel   : +33 56 68 80 00  ||
| Lectra Systemes               | fax   : +33 56 78 88 31  ||
| ZI Marticot 33610 CESTAS      | E-mail: pierre@lectra.fr ||          
| FRANCE                        |     			   ||	
`-------------------------------^--------------------------'
Comment ? (Beethoven)
Newsgroups: comp.windows.x.motif
From: keith@sharebase.com (Keith Chambless)
Subject: Turning off borders for checkboxes.
Organization: NCR/ShareBase Corporation
Date: Thu, 21 Jan 93 19:31:04 GMT

I've been working through some of the examples in O'Reilly Motif
Programming Manual and am interested in changing the toggle_box
program in chapter 12.

The program displays a window with checkboxes. The gadget last
selected is surrounded by a border. I would like to turn off this
feature and pack the gadgets a little closer together.

Any pointers are appreciated.
keith@sharebase.com
Newsgroups: comp.windows.x.motif
From: mark@prepress.com (Mark S. Bubien)
Subject: Resizing OverrideShell
Organization: Pre-Press Technologies, Carlsbad Ca.
Date: Mon, 25 Jan 1993 16:39:38 GMT


I have an OverrideShell, a form as its child, and then
a scrolled list as the forms child.
I dynamically add and delete strings of varying length from 
the scrolled list.

Here's the problem:

Say I've added several items, then I realize the OverrideShell.
It comes up fine, horizontally sized based on the longest
string in the scrolled list.  If I unrealize the Overrideshell,
add some more items (or delete the longest one), then realize
it again, it doesn't resize.

The Override Shell ALWAYS comes up the same size as when I first
realized it.  It doesn't matter how big or small the scrolled list
grows (vertically OR horizontally).

Is there a way to make the OverrideShell resize??

Thanks
	Mark
--
=============================================================================
                        |  Most of the time, my head is on straight         |
Mark S. Bubien		|  Most of the time, I'm strong enough not to hate  |
mark@prepress.com	|  I don't build up illusion, 'til it makes me sick |
                        |  I ain't afraid of confusion, no matter how thick |
Pre-Press Technologies	|  I can smile in the face of mankind.              |
2443 Impala Dr.		|  Don't even remember what her lips felt like on   |
Carlsbad, Ca 92008	|       mine                                        |
(619) 931-2695		|  Most of the time.                                |
                        |                -Bob Dylan                         |
=============================================================================
From: jpg@bnr.co.uk (Jonathan P. Gibbons)
Newsgroups: comp.windows.x.motif
Subject: How to determine a widget type (shell widgets)
Date: 20 Jan 93 15:18:57
Organization: BNR Europe Ltd, London Rd, Harlow, Essex, CM19 9NA, U.K.
Distribution: comp
NNTP-Posting-Host: 128.199.200.40

I need to find out if a widget is a dialogue shell or similar widget.  ie the
widget at the top of the heirarchy for a certain window.

The XtIsShell() call will determine if a widget is a shell widget, but it will
also find menushells which I want to be ignored.  Sooo, how can I find out
what widget a widget is?

Thanks in advance,
Jonathan
--
 ----------------------------------------------------------------------------
  With fearsome eyes and fiery breath the dragon burnt the girl to death
                    -- from "Too Late Saint George"
From: mark@BHANU.ANDYNE.ON.CA (Mark Levison)
Newsgroups: comp.windows.x.motif
Subject: re:Need a scrollable window/drawing area with spreadsheet-like #
Date: 27 Jan 93 00:09:21 GMT
Distribution: inet
Organization: The Internet


The following question was asked
> I have a drawing area widget parented by a scrollable window (automatic)
> but I need to update a list of horizontal and vertical "cell" numbers which
> don't scroll off the area and that are displayed above and to the left of the
> drawing area - similar in manner to a spreadsheet, where the numbers are
> always visible. I've tried several permutations with application defined
> scrolled windows and frames, but to no avail. What is the best way to
> accomplish this behavior? I want the numbers to scroll with the drawing
> area, but remain visible.

Either roll your own or buy a spread sheet widget.  I had do this 18 months
ago now.  My solution use 4 drawing area, 2 scrollbars and a frame widget.
One drawing is the main one and the other ones are for horizontal, vertical
and a top corner that says how many rows there are.  You have to set up
your own scroll bar callbacks etc.  It was my first real Motif project and
took me about 1 month to get right.  I could probably do it from scratch is
2 - 2 1/2 weeks.

Good Luck
Mark Levison
mark@bhanu.andyne.on.ca
From: ihle@iki101.inf.tu-dresden.de (Torsten Ihle)
Newsgroups: comp.windows.x.motif
Subject: Re: Using Pixmaps
Date: 25 Jan 1993 08:20:56 GMT
Organization: Dept. of Computer Science, TU of Dresden, Germany
Distribution: usa
Reply-To: ihle@iki101.inf.tu-dresden.de (Torsten Ihle)
NNTP-Posting-Host: irzr27.inf.tu-dresden.de


--
Hi !
In article <1993Jan21.010127.7091@loral.CTS.COM>, ross@loral.cts.com (Robert Ross) writes:
|>I'm trying to get a Pixmap (not Bitmap) to be displayed as the labelPixmap
|>on a XmPushButton. 
	[ ...]
|>I've read about XtConvert and XtConvertAndStore in the manuals but I have
|>no real examples about how to use them, especially to convert from
|>a string (ie. "my_pixmap.xpm") to Pixmap.

Am I wrong because I think  there is no definition by X11 or Motif how to store
more than one bit deep Pixmaps in a file? IMHO, if you need a one bit deep Pixmap, you
should try XmGetPixmap( ... ), but that will handle only Bitmaps, which are converted 
to Pixmaps.
If you need more than one pixel depth, you have to create a Pixmap by
XCreatePixmap, read or compute the data (pixel values), create an XImage by
XCreateImage and put the data into the Pixmap by XPutImage. I think that is the only
way to get the data from clients memory into server memory.

|>If someone could send me a short code excerpt (or a real working example)
|>that shows how to get from a string to a Pixmap, it would be greatly
                               ^^^^^^
|>appreciated.

Again my question : What is a "string" in this context ?
Thanks.
				Torsten
----------------------------------------------
Torsten Ihle, cand. inf., TU-Dresden
EMail: ihle@iki101.inf.tu-dresden.de

Es ist deutsch in Kaltland !
----------------------------------------------
From: deveau@oceanroutes.ns.ca ("Terry J. Deveau")
Newsgroups: comp.windows.x.motif
Subject: Re: OSF documentation
Date: 25 Jan 93 18:46:19 GMT
Reply-To: deveau@koala.drea.dnd.ca
Distribution: inet
Organization: Seimac Limited

David Brooks writes:
>
> adrian@cs.wm.edu writes:
> >     A coworker claims he found the OSF Motif documantation on the internet
> >a year or so ago, but can't remember where. Could some one give me a clue as 
> >to where I should be looking. In particular I'd like to get the current 
> >documantation for Motif.
> 
> Our documents are subject to copyright, and should not be made freely
> available.  Sometimes people make mistakes and leave ftp doors open; we ask
> for them to be closed when we find out.

Ok, as copyright owner OSF has the right to do whatever it wants. But why
restrict distribution of the manuals? Surely they are made available at
not much more than cost anyway? Other owners of copyrighted material, text
as well as source code, have seen the benefits of allowing free distribution
of their work, while retaining copyright.

I think OSF should have an ftp site where these documents (in postscript)
are made available to anyone who wants them. It would make OSF a few
friends and I don't believe it would loose anything significant in
revenues. In fact, OSF probably couldn't *afford* to buy the goodwill that
would ensue - at little or no cost to itself (assuming OSF already has a
suitable ftp site, or could get the use of a directory on some cooperative
public site).

Not everyone would rush-out and get the ftp copy of the documentation.
Most of OSF's customers would probably be quite content to get their
printed manuals the same old way. It's only a few who think they can
"save a dime" by printing their own (they pay for the paper, toner, and
printer costs), or who feel they "can't wait" to get the latest docs
through slower chanels, that would actually go this route.

--

Terry J. Deveau                   Internet: deveau@oceanroutes.ns.ca
Seimac Limited                    Phone: (902) 468-3007
Dartmouth, N.S., Canada           Fax: (902) 468-3009
From: gnpaolo@aragorn.CSELT.STET.IT (Gian Paolo Costantino - CSELT - Italy)
Newsgroups: comp.windows.x.motif
Subject: Re: Text widgets - no stroke "delay"
Date: 25 Jan 93 10:34:50 GMT
Distribution: inet
Organization: The Internet

Maybe my answer is a bit later, but I received the mail only today.

Prakash Baskaran wrote:

>I used to following technique to solve the problem.  It works allright
>-execpt- that I get the answer one "stroke" later.  I am using
>XmNmotionVerifyCallback to return the x, y position of my cursor. And

The solution for the "delay" should be by using XmNvalueChangedCallback
instead of the XmNmotionVerifyCallback: the latter is called before the
insertion or deletion of text, while the former is called after, so the
content of the XmText in this case is the current actual string.
************************************************************************
*               Gian Paolo Costantino                                  *
*               CSELT  -  Turin  -  Italy                              *
*               gnpaolo@aragorn.cselt.stet.it                          *
************************************************************************
From: Iris_-_Smith@cup.portal.com
Newsgroups: comp.windows.x.motif
Subject: Re: Dragging in DrawingArea--How?
Date: Sat, 23 Jan 93 12:22:43 PST
Organization: The Portal System (TM)
Distribution: usa

To implement dragging in a DrawingArea you need to add a translation
which handles <Btn1Motion> events. There is a bug in the 1.1 DrawingArea
which doesn't let you augment other translations, so in your resource file
set up the translations you need (<Btn1Down> <Btn1Motion> <Btn1Up>) and
assign them to an action which handles those events. You will then get
mouse position events when the button is held down and dragged.
Newsgroups: comp.windows.x.motif