Topic: Creating a Motif Toolbar
Author: brad@truffula.fp.trw.com (Brad Brahms)
Date: 1995/05/19 Raw View
In article <D8q17F.HIp@pdd.3com.com>, Peter Jarvis <peterj@torso> wrote:
>Hello everyone,
>
>Can anyone give me any pointers or examples of how to develop an
>application that works in the same way as the Microsoft Office
>Application Toolbar?
>
> e.g. Toolbar to invoke applications by clicking
> on an icon.
>
>I want to develop the application on both Windows and on Motif. My
>preference is to share the code but being realistic I would just
>like to get some pointers or examples of how this can be done under:
>
>1. MS Windows (MFC Classes...?)
> - Are there any examples in the MFC, does anyone know?
>2. Motif/X Windows
>
If you want to do the code in the native environment on each system,
then for Motif, a row column widget using buttons with Pixmaps vice labels
would work. If, for whatever reason, you can not get the row column widget
to spread our the buttons in the way you want, a form could be used
with attachments.
If portability between Windows and Motif is important, than one of the
cross plateform GUI APIs (XVT for instance) would work. The only problem
with these that I know of is that the interface tends to be a little slower
than a native application and it becomes harder to get to particulare fetures
of one platform that are not available on another. However, the big
win is that you have a single GUI to deal with.
--
"Life is like a box of chocolates..." -- Bradley Brahms
TRW Inc.
Bradley.Brahms@trw.com
Author: peterj@torso (Peter Jarvis)
Date: 1995/05/17 Raw View
Hello everyone,
Can anyone give me any pointers or examples of how to develop an
application that works in the same way as the Microsoft Office
Application Toolbar?
e.g. Toolbar to invoke applications by clicking
on an icon.
I want to develop the application on both Windows and on Motif. My
preference is to share the code but being realistic I would just
like to get some pointers or examples of how this can be done under:
1. MS Windows (MFC Classes...?)
- Are there any examples in the MFC, does anyone know?
2. Motif/X Windows
If anyone can help point me in the right direction I will be
eternally grateful.
--
**********************************************************************
* *
* Peter K. Jarvis * That learning belongs not to the female
* 3Com Limitied, * character, and that the female mind is not
* ISOLAN House, * capable of a degree of improvement equal
* Brindley Way, * to that of the other sex, are narrow and
* London Road, * unphilosophical prejudices.
* Hemel Hempstead, *
* Hertfordshire, * Vicesimus Knox 1752-1821
* HP3 9XJ, * essays, vol3,142.
* England. * (The British Essayists (1823), vol. 37)
* *
**********************************************************************
*
* POTS +44 (0)442 2788251 Disclaimer: Only my opinions...
* FAX +44 (0)442 278003
*
* PC Email: Peter_Jarvis@3mail.3Com.Com
* UNIX Email: peterj@pdd.3com.com
*
**********************************************************************
--
**********************************************************************
* *
* Peter K. Jarvis * That learning belongs not to the female
* 3Com Limitied, * character, and that the female mind is not
* ISOLAN House, * capable of a degree of improvement equal
* Brindley Way, * to that of the other sex, are narrow and
* London Road, * unphilosophical prejudices.
* Hemel Hempstead, *
* Hertfordshire, * Vicesimus Knox 1752-1821
* HP3 9XJ, * essays, vol3,142.
* England. * (The British Essayists (1823), vol. 37)
* *
**********************************************************************
*
* POTS +44 (0)442 2788251 Disclaimer: Only my opinions...
* FAX +44 (0)442 278003
*
* PC Email: Peter_Jarvis@3mail.3Com.Com
* UNIX Email: peterj@pdd.3com.com
*
**********************************************************************
Author: ichudov@star89.galstar.com (Igor Chudov @ home)
Date: 1995/05/18 Raw View
Peter Jarvis (peterj@torso) wrote:
* Hello everyone,
* Can anyone give me any pointers or examples of how to develop an
* application that works in the same way as the Microsoft Office
* Application Toolbar?
* e.g. Toolbar to invoke applications by clicking
* on an icon.
* I want to develop the application on both Windows and on Motif. My
* preference is to share the code but being realistic I would just
* like to get some pointers or examples of how this can be done under:
* 1. MS Windows (MFC Classes...?)
* - Are there any examples in the MFC, does anyone know?
* 2. Motif/X Windows
* If anyone can help point me in the right direction I will be
* eternally grateful.
Use Tcl/Tk. Even if you are not familiar with these tools, it is
the fastest way to create a toolbar-like application. It is not
harder and is more powerful tool for X windows than Visual Basic
is for Windows. I started writing extremely useful and good-looking
programs in about a week after I got it.
Unlike Visual Basic, Tcl/Tk is free and has a lot of support on the Net.
I am totally happy with it. It takes me only a day to develop a complete,
functional and powerful workbench, and I am still learning it.
Here is an example of Tk program that will get you started:
O/_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Begin Example
O\
#!/usr/local/bin/wish -f
button .quit -text quit -padx 4 -pady 4 -command {exit}
button .aixterm -text AixTerm -padx 4 -pady 4 \
-command {exec aixterm & }
scale .red -label Red -from 0 -to 255 -length 400 -orient horizontal \
-command new_color
scale .blue -label Blue -from 0 -to 255 -length 400 -orient horizontal \
-command new_color
scale .green -label Green -from 0 -to 255 -length 400 -orient horizontal \
-command new_color
frame .sample -height 200 -width 400 -relief ridge -bd 2 -bg black
pack .quit .aixterm .red .green .blue .sample -side top -pady 8
proc new_color {value} {
set color [format #%02x%02x%02x [.red get] [.green get] [.blue get]]
.sample configure -bg $color
}
O/_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ End Example
O\
This little program gives you a complete color control that looks great.
--
- (My opinions only)
http://www.iii.net/users/ichudov/index.html