2 Introduction to Motif
This chapter answers the question "Why Motif?" in terms of the development of applications that are "easy enough for
your mother to use." It suggests some of the complexities that the programmer has to master in order to make an
application simple.
Congratulations! After slaving behind the computer for months, fighting a deadline that seemed impossible to meet,
you've finished your software product and it's a big hit. The critics love it, you're in the money, and everyone,
including your mother, is buying your new product. Just as everything seems to be going your way, your worst
nightmare comes true: your mother calls and asks you how to use it.
An unlikely scenario? Not if you're developing applications to run under the Motif graphical user interface (GUI). As
a proposed standard for graphical user interfaces, Motif may be implemented on a wide range of computer platforms,
from large IBM mainframes right down to the PC that your mom may be using. The Open Software Foundation
(OSF), developer of the Motif GUI, hopes to reach all kinds of computers and computer users no matter how
advanced (or limited) their computer skills may be.
So, will your mom really call you for help? Well, mine did. In fact, she did something worse. She wanted me to
explain how to use a software product I didn't write. I didn't know how her software worked or even what it was.
Fortunately, though, the software was based on Microsoft Windows, which has more than a passing similarity to
Motif. The experience of providing technical support to my mother reminded me of some of the fundamental concepts
behind the design of a user interface and the role of the application programmer in carrying out that design.
2.1 A True Story
Before I tell my story, let me start with a little background. I have been developing software for the X Window
System for several years. Every now and then, when the family gets together for dinner, someone always asks the
same thing, "So, explain it to me again: just what is it that you do?" I launch into my usual speech: "It's called X
Windows, dad... uh, no, mom, it's computer software... it's rather hard to explain, but..." The attention span lasts only
until the next course is served, at which time the discussion turns to new ways for cooking eggplant. Little did I realize
that something actually registered with someone in my family, because shortly thereafter, I got a call from my mom.
Mom: Guess what?!
Me: What?
Mom: Our company is switching to a new line of software based on your work!
Me: Really? You're going to use electronic mail?
Mom: No, all of our insurance packages use this new software that runs under Windows. You wrote that, didn't you?
Me: No, mom. I write software using X Windows −− and I didn't write X, I just use it. I think you're talking about
Microsoft Windows. You're using it with your PC, right?
Mom: That's right, but it looks exactly like your software, so I figured you could show me how to use it. I have never
seen this stuff before.
13
(Uh, oh... I see it coming now. Last time she wanted me to help her explain her computer to her, I ended up translating
the entire DOS 2.0 user's guide into English, which she conveniently forgot in about a week.)
Me: Mom, I don't know Microsoft Windows, I know X Windows and they're not the same...
Mom: You mean you won't help me?
Me: You don't understand −− I can't help you. MS−Windows has nothing to do with X...
Silence.
Me: I don't think I'm getting through to you.
Silence.
Me: Ok, I'll be right over...
Despite all my explanations of the X Window System, the only keyword my mom remembered was Windows. I had
high hopes, though, because I was actually going to teach her something related to what I do for a living. And this
time she had to listen because her job depended on it.
After some fidgeting with diskettes and other necessary start−up procedures, I finally got Microsoft Windows 3.0 up
and running. Sure enough, it looked just like Motif. Several applications came up by default: a clock, an editor of
some sort, and a little calendar program. Immediately, the questions started flying at me:
Mom: How do you access those buttons at the top of the window?
Me: Those are called Pulldown Menus and every application has them. They are located in what is called a MenuBar.
Mom: What does "F1" mean?
Me: The "F" denotes a function key and the "1" indicates it's the first function key. Pressing it gives you help
depending on where the cursor is. For example...
Mom (interrupting): Why are these keys labeled "ALT?" What do they do?
Me: Oh, those are used in conjunction with other keys. You press "ALT" and then some other key and you get special
attention, like...
Mom (growing frustrated): Look what you did. Now there are too many windows up. How do I get back to the one I
was using?
Me (fighting for words): Well, you see, you can move from one window to the next or between elements within a
window by using the Tab key and possibly some other key like the Control key, the Shift key, or the Alt key, or
maybe a combination of several of these keys depending on where you want to go...
Mom (sitting back and sighing): Oh, that's way too complicated, I'll never remember all that. And just look at those
colors−−they're awful.
Me (trying to sound encouraging): You can change them using this tool...
2 Introduction to Motif 2 Introduction to Motif
14
Get Volume 6A: Motif Programming Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.