dynamic motif GUI - Motif
This is a discussion on dynamic motif GUI - Motif ; Hello all,
I have two questions:
1) Is it possible to create dynamic motif GUI, where dynamic means
following: Elements of GUI presented or not presented depends on some
description in the text-based configuration file (i.e. something
similar to XML ...
-
dynamic motif GUI
Hello all,
I have two questions:
1) Is it possible to create dynamic motif GUI, where dynamic means
following: Elements of GUI presented or not presented depends on some
description in the text-based configuration file (i.e. something
similar to XML GUI
description)
2) If yes, do some examples exist, how it is done and if yes, where
can I take look at them?
/wbr
Ariel Burbaickij
-
Re: dynamic motif GUI
pustota1 wrote:
> Hello all,
> I have two questions:
> 1) Is it possible to create dynamic motif GUI, where dynamic means
> following: Elements of GUI presented or not presented depends on some
> description in the text-based configuration file (i.e. something
> similar to XML GUI
> description)
> 2) If yes, do some examples exist, how it is done and if yes, where
> can I take look at them?
Surely it is possible and it is not difficult.
We do it in our product to hide expert functions from
normal customers, who could get hurt or confused by them.
Simply remember the widget ID of the stuff you want to be
dynamically presented, and map or unmap the widgets after
first map of the main window.
Then it is up to you to make it as granulated as you wish -
have a couple of classes of users or function capabilities,
upon which you map or unmap groups of widgets.
Or you could store the status of each individual widget.
This you put in a configuration file which is read upon runtime.
In our product, we use tag based configuration file placed
in user's home directory. Reading a text file line by line,
making a string comparison and reading a parameter is child's play.
For a more general implementation of dynamic gui you can
have a look at WCL, which allows you to specify the whole
GUI in an external text file. You could use different
wcl files for completely different interfaces.
WCL can be downloaded from here:
http://www.oak-grove-consulting.com/WhatsNew/index.html
To check an existing program which uses WCL, you can have
a look at the demo of our program ArahWeave.
http://www.arahne.si/installAWeave.html
once installed,
arahne/aw/weave is the WCL configuration file for the main program
arahne/aw/arahweave is the program binary
arahne/common/*.txt are program texts in various languages.
You can use CTRL+ALT+1,2,3...9 to change among languages
without closing down the program. That is as dynamic as it
gets ;-)
Hope this gets you on track,
Dušan Peterc
http://www.arahne.si
-
Re: dynamic motif GUI
On Wed, 21 Mar 2007 20:05:02 +0100, arahne wrote:
>pustota1 wrote:
>> Hello all,
>> I have two questions:
>> 1) Is it possible to create dynamic motif GUI, where dynamic means
>> following: Elements of GUI presented or not presented depends on some
>> description in the text-based configuration file (i.e. something
>> similar to XML GUI
>> description)
>> 2) If yes, do some examples exist, how it is done and if yes, where
>> can I take look at them?
>
>Surely it is possible and it is not difficult.
There is one big snag though: non-mapped widgets cant appear in Form
constraints!
>We do it in our product to hide expert functions from
>normal customers, who could get hurt or confused by them.
>Simply remember the widget ID of the stuff you want to be
>dynamically presented, and map or unmap the widgets after
>first map of the main window.
>Then it is up to you to make it as granulated as you wish -
>have a couple of classes of users or function capabilities,
>upon which you map or unmap groups of widgets.
>Or you could store the status of each individual widget.
>This you put in a configuration file which is read upon runtime.
>In our product, we use tag based configuration file placed
>in user's home directory. Reading a text file line by line,
>making a string comparison and reading a parameter is child's play.
>
>For a more general implementation of dynamic gui you can
>have a look at WCL, which allows you to specify the whole
>GUI in an external text file. You could use different
>wcl files for completely different interfaces.
>WCL can be downloaded from here:
>http://www.oak-grove-consulting.com/WhatsNew/index.html
>
>To check an existing program which uses WCL, you can have
>a look at the demo of our program ArahWeave.
>http://www.arahne.si/installAWeave.html
>once installed,
>arahne/aw/weave is the WCL configuration file for the main program
>arahne/aw/arahweave is the program binary
>arahne/common/*.txt are program texts in various languages.
>You can use CTRL+ALT+1,2,3...9 to change among languages
>without closing down the program. That is as dynamic as it
>gets ;-)
>
>Hope this gets you on track,
>
>Dušan Peterc
>http://www.arahne.si
>
>
>
-
Re: dynamic motif GUI
Michel Bardiaux wrote:
> On Wed, 21 Mar 2007 20:05:02 +0100, arahne wrote:
>> Surely it is possible and it is not difficult.
>
> There is one big snag though: non-mapped widgets cant appear in Form
> constraints!
True.
This is one of the reasons I use XmpTable in place of XmForm,
since layout is much easier and you can freely unmap whatever you want.
an example of its use in WCL
*selectCopyAreaT.wcCreate: XmpCreateTableDialog
*selectCopyAreaT.wcCallback: setTextCB(352)
*selectCopyAreaT.noResize: TRUE
*selectCopyAreaT.autoUnmanage: FALSE
*selectCopyAreaT.wcChildren: selectAreaF copyAreaF selCopyOffsetF \
ButtonsT
*selectCopyAreaT.layout: selectAreaF 0 0 W; copyAreaF 1 0 W; \
selCopyOffsetF 0 1 2 0 W; ButtonsT 0 2 2 0
Just think how many attachments you would need to define
with XmForm to define four children widgets (A,B,C,D) with layout
AB
CC
DD
With the optional "WHlr" parameters in the layout, you can even
define left/right/center alignment, and if widget resizes
with parent or stays at default size.
XmpTable widget is only 50 kb as a shared library
and will save you many lines of code and widget placement headaches.
It is licensed as LGPL, and its source is included with WCL,
which I have already advertised in the previous post.
Best regards,
Dušan Peterc
http://www.arahne.si
-
Re: dynamic motif GUI
"Michel Bardiaux" wrote in message
news:1rk403th0lbpa1ft9et6s56quclkkgq47d@4ax.com...
> On Wed, 21 Mar 2007 20:05:02 +0100, arahne wrote:
>
>>pustota1 wrote:
>>> Hello all,
>>> I have two questions:
>>> 1) Is it possible to create dynamic motif GUI, where dynamic means
>>> following: Elements of GUI presented or not presented depends on some
>>> description in the text-based configuration file (i.e. something
>>> similar to XML GUI
>>> description)
>>> 2) If yes, do some examples exist, how it is done and if yes, where
>>> can I take look at them?
>>
>>Surely it is possible and it is not difficult.
>
> There is one big snag though: non-mapped widgets cant appear in Form
> constraints!
>
Not true.
Unmanaged widgets cannot appear in XmForm consttraints,
but unmapped widgets can. I use this all the time. If I want to hide a
widget that has form attachments, I just set XmNmappedWhenManaged
to False. The real estate occupied by the widget stays the same, but
the widget disappears.
One can also cause the real estate to apparently "disappear" by setting
the widget's XmNwidth and/or XmNheight to 1 (if the widget
allows this size).
--
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Aero Stability and Controls Computing
-
Re: dynamic motif GUI
On 22 ÍÁÒ, 15:32, "Fred Kleinschmidt"
wrote:
> "Michel Bardiaux" wrote in message
>
> news:1rk403th0lbpa1ft9et6s56quclkkgq47d@4ax.com...
>
>
>
> > On Wed, 21 Mar 2007 20:05:02 +0100, arahne wrote:
>
> >>pustota1 wrote:
> >>> Hello all,
> >>> I have two questions:
> >>> 1) Is it possible to create dynamic motif GUI, where dynamic means
> >>> following: Elements of GUI presented or not presented depends on some
> >>> description in the text-based configuration file (i.e. something
> >>> similar to XML GUI
> >>> description)
> >>> 2) If yes, do some examples exist, how it is done and if yes, where
> >>> can I take look at them?
>
> >>Surely it is possible and it is not difficult.
>
> > There is one big snag though: non-mapped widgets cant appear in Form
> > constraints!
>
> Not true.
>
> Unmanaged widgets cannot appear in XmForm consttraints,
> but unmapped widgets can. I use this all the time. If I want to hide a
> widget that has form attachments, I just set XmNmappedWhenManaged
> to False. The real estate occupied by the widget stays the same, but
> the widget disappears.
>
> One can also cause the real estate to apparently "disappear" by setting
> the widget's XmNwidth and/or XmNheight to 1 (if the widget
> allows this size).
> --
> Fred L. Kleinschmidt
> Boeing Associate Technical Fellow
> Aero Stability and Controls Computing
Thank you very much, guys.
One of the most responsive and useful newsgroup I have encountered.
/wbr
Ariel Burbaickij
-
Re: dynamic motif GUI
On Thu, 22 Mar 2007 14:32:06 GMT, "Fred Kleinschmidt"
wrote:
>
>"Michel Bardiaux" wrote in message
>news:1rk403th0lbpa1ft9et6s56quclkkgq47d@4ax.com...
>> On Wed, 21 Mar 2007 20:05:02 +0100, arahne wrote:
>>
>>>pustota1 wrote:
>>>> Hello all,
>>>> I have two questions:
>>>> 1) Is it possible to create dynamic motif GUI, where dynamic means
>>>> following: Elements of GUI presented or not presented depends on some
>>>> description in the text-based configuration file (i.e. something
>>>> similar to XML GUI
>>>> description)
>>>> 2) If yes, do some examples exist, how it is done and if yes, where
>>>> can I take look at them?
>>>
>>>Surely it is possible and it is not difficult.
>>
>> There is one big snag though: non-mapped widgets cant appear in Form
>> constraints!
>>
>
>Not true.
>
>Unmanaged widgets cannot appear in XmForm consttraints,
>but unmapped widgets can.
I stand corrected. But it doesnt really matter...
> I use this all the time. If I want to hide a
>widget that has form attachments, I just set XmNmappedWhenManaged
>to False. The real estate occupied by the widget stays the same, but
>the widget disappears.
.... because of this.
>
>One can also cause the real estate to apparently "disappear" by setting
>the widget's XmNwidth and/or XmNheight to 1 (if the widget
>allows this size).
And the border, etc ad nauseam. Possible, but not very practical.