I'm porting my UNIX Motif applications to wxWidgets, but I've some
users who are asking me for an early access to the OSX version of my
apps. I didn't finish the port to wxWidgets yet, but I can compile them
with OpenMotif. However, the look is too old-fashioned.

I saw the OSX version of Gimp. It's not a native port, as it requires
X11 to run, but however the look is reasonably acceptable, and looks
almost if it had been ported to Carbon. I guess this will be because
GTK will have some sort of Aqua-like theme.

Is there something I can do for enhancing the look of my apps under
OpenMotif, or am I limited to the old-fashioned look until I finish the
port to wxWidgets?

Thanks.

nopa

10-04-2007, 09:22 AM

unix

Re: Enhancing the look of Motif apps in MacOSX

In comp.sys.mac.programmer.help nopa <nopaperfound@yahoo.com> wrote:[color=blue]
> Hi,
>
> I'm porting my UNIX Motif applications to wxWidgets, but I've some
> users who are asking me for an early access to the OSX version of my
> apps. I didn't finish the port to wxWidgets yet, but I can compile them
> with OpenMotif. However, the look is too old-fashioned.
>
> I saw the OSX version of Gimp. It's not a native port, as it requires
> X11 to run, but however the look is reasonably acceptable, and looks
> almost if it had been ported to Carbon. I guess this will be because
> GTK will have some sort of Aqua-like theme.
>
> Is there something I can do for enhancing the look of my apps under
> OpenMotif, or am I limited to the old-fashioned look until I finish the
> port to wxWidgets?[/color]

I think that Mac users are much more demanding than you believe. (Or
perhaps they're less demanding than I believe....)

Nothing X11 is even vaguely acceptable as a "real" Mac app. I use Gimp in
X11 occasionally, but I'm also familiar with other UNIX systems, and I
still don't like to use it. It looks nothing like a native app, and
behaves nothing like a native app. Unless your program is highly
specialized and you can individually train your users, X11 should not even
be considered. If you're releasing to the general public, most of your
potential users won't even have X11 *installed*, much less understand how
to use it. It sounds like your user base for now is people who are already
familiar with your software on other systems and so are more likely to be
savvy, but presumably you may want to reach new users on the Mac as well
once you release the port.

You should note that wxWidgets, while it looks significantly better, is
*still* noticeably different and disconcerting compared to real native Mac
applications. Consider doing a Cocoa or Carbon port, at least at some
point later on.

--
Michael Ash
Rogue Amoeba Software

10-04-2007, 09:22 AM

unix

Re: Enhancing the look of Motif apps in MacOSX

Michael Ash wrote:[color=blue]
> In comp.sys.mac.programmer.help nopa <nopaperfound@yahoo.com> wrote:
> [...]
> I think that Mac users are much more demanding than you believe. (Or
> perhaps they're less demanding than I believe....)[/color]

No, I don't plan to use X11 as a desired target, but only as a temporal
workaround. Regarding Gimp, yes it's not native, but it looks much
better than OpenMotif, and that's what I'm looking for (ie: some visual
enhancement for OpenMotif, if such thing exists).

[...][color=blue]
> You should note that wxWidgets, while it looks significantly better, is
> *still* noticeably different and disconcerting compared to real native Mac
> applications.[/color]

What makes a "real native Mac app" isn't just Aqua and Cocoa. It's more
than that. A single read to the Apple HI Guidelines is enough for
realizing that you can create a non-native Mac app no matter if you
directly use native APIs like Carbon or Cocoa.

wxWidgets has two OSX ports: A Carbon port (in mature status), and a
Cocoa port (in experimental status). It uses the native Apple APIs for
almost everything. The developers of these two ports are making great
stuff... even the standard menu options go automatically to the places
Apple mandates. It's true that they used some non-native custom
controls in the first versions, but they've been moving towards an all
native implementation. The last feature is native toolbars, IIRC.

The fact is that if you follow the Apple HI Guidelines, you can create
a real native Mac app with wxWidgets, and nobody will notice that you
used wx. And if you don't follow that book, your app won't be native
even if you use Apple APIs.

Of course, if you write an wxWidgets app with a UNIX mind, don't expect
it to translate to a real Mac app when you compile on OSX.

As a side comment, I decided to stop making my software depend on
closed-source commercial APIs after seeing that no computer business is
really committed to the technology they develop. They'll drop their
APIs for whatever reason dictated by the market, even if their APIs are
technically superior to their competitors. They won't fight for
defending their technology. I've seen this too many times... Beta video
tapes, Silicon Graphics IRIX OS, several Apple APIs, including Altivec
support, processor endianness, DirectX substituting OpenGL (I wouldn't
be surprised to see Apple dropping OpenGL in favor of DirectX some
day).

Vendors won't defend their technology, so I can't make my code depend
on something nobody will defend.

If some day I see a computer maker fight for their technology instead
of their shares values in the short-term, I might change my views.

nopa

10-04-2007, 09:22 AM

unix

Re: Enhancing the look of Motif apps in MacOSX

nopa wrote:
[color=blue]
> I'm porting my UNIX Motif applications to wxWidgets, but I've some
> users who are asking me for an early access to the OSX version of my
> apps. I didn't finish the port to wxWidgets yet, but I can compile them
> with OpenMotif. However, the look is too old-fashioned.
>
> I saw the OSX version of Gimp. It's not a native port, as it requires
> X11 to run, but however the look is reasonably acceptable, and looks
> almost if it had been ported to Carbon. I guess this will be because
> GTK will have some sort of Aqua-like theme.
>
> Is there something I can do for enhancing the look of my apps under
> OpenMotif, or am I limited to the old-fashioned look until I finish the
> port to wxWidgets?[/color]

At the very least, try the following resource values if you haven't
already. They change the look from the ca 1990 original ugly Motif to
the ca 1996 "CDE look" (thin frames, menus appearing etched-in instead
of raised, different appearance for checkboxes and radio boxes, etc):

These should be in everyone's .Xdefaults file IMHO. Try "man XmDisplay"
for more info.

You can also change the colours or specify XPM files as the
backgroundPixmap for some or all widgets if you really want to make an
effort.

--
Per Espen Hagen
My TLD is CC

10-04-2007, 09:22 AM

unix

Re: Enhancing the look of Motif apps in MacOSX

In comp.sys.mac.programmer.help nopa <nopaperfound@yahoo.com> wrote:[color=blue]
> Michael Ash wrote:[color=green]
>> In comp.sys.mac.programmer.help nopa <nopaperfound@yahoo.com> wrote:[/color]
> [...][color=green]
>> You should note that wxWidgets, while it looks significantly better, is
>> *still* noticeably different and disconcerting compared to real native Mac
>> applications.[/color]
>
> What makes a "real native Mac app" isn't just Aqua and Cocoa. It's more
> than that. A single read to the Apple HI Guidelines is enough for
> realizing that you can create a non-native Mac app no matter if you
> directly use native APIs like Carbon or Cocoa.
>
> wxWidgets has two OSX ports: A Carbon port (in mature status), and a
> Cocoa port (in experimental status). It uses the native Apple APIs for
> almost everything. The developers of these two ports are making great
> stuff... even the standard menu options go automatically to the places
> Apple mandates. It's true that they used some non-native custom
> controls in the first versions, but they've been moving towards an all
> native implementation. The last feature is native toolbars, IIRC.
>
> The fact is that if you follow the Apple HI Guidelines, you can create
> a real native Mac app with wxWidgets, and nobody will notice that you
> used wx. And if you don't follow that book, your app won't be native
> even if you use Apple APIs.
>
> Of course, if you write an wxWidgets app with a UNIX mind, don't expect
> it to translate to a real Mac app when you compile on OSX.[/color]

In theory, you are of course correct. However, in practice I have a
difficult time finding any Cocoa app which does not look and feel native.
Carbon apps are more hit-and-miss, but are generally good. And I have
never seen a wxWidgets app that looked or felt remotely native. There was
a thread in the comp.sys.mac.programmer hierarchy a month or three back
which discussed this in fairly deep detail. Various wxWidgets programs
were proposed with the idea that they feel native, and they really did
not.

No doubt you can make a fully native-look-and-feel app with an API like
wxWidgets, but you will have to do a *lot* of extra work. Using Cocoa or
Carbon usually means that you start out native, and have to work to make
it un-native. What's possible is the same for either, but what actually
*happens* is generally not.
[color=blue]
> As a side comment, I decided to stop making my software depend on
> closed-source commercial APIs after seeing that no computer business is
> really committed to the technology they develop. They'll drop their
> APIs for whatever reason dictated by the market, even if their APIs are
> technically superior to their competitors. They won't fight for
> defending their technology. I've seen this too many times... Beta video
> tapes, Silicon Graphics IRIX OS, several Apple APIs, including Altivec
> support, processor endianness, DirectX substituting OpenGL (I wouldn't
> be surprised to see Apple dropping OpenGL in favor of DirectX some
> day).[/color]

Right, Apple is going to throw out the drawing API upon which *every other
drawing API on the system depends*.

Apple is not as insane about backwards compatibility as Microsoft is, but
they try not to break old apps. They still support QuickDraw! Of course if
you are sufficiently paranoid and refuse to have any code that could be
rendered useless, then your attitude makes some sense.

I have no idea what processor endianness has to do with anything. The only
technical value in either is consistency.
[color=blue]
> Vendors won't defend their technology, so I can't make my code depend
> on something nobody will defend.
>
> That explanation is perhaps the main reason why I'm directly porting
> from X11 to wxWidgets, without considering Win32, nor MFC, nor Carbon,
> nor Cocoa, nor nothing.[/color]

Normally you'd have a large kernel of portable code with a thin wrapper
using whatever platform-specific API is needed to get a decent program
running. If a company implodes or turns stupid, you just lose the thin
wrapper, nothing more.
[color=blue]
> If some day I see a computer maker fight for their technology instead
> of their shares values in the short-term, I might change my views.[/color]

Nothing says wxWidgets couldn't just implode one day as well. Yes, it's
open source, but if everybody else stops working on it, can you really
maintain it for all of your target platforms single handedly?

Anyway, I'm not trying to be argumentative, nor am I even trying to change
your choices, but just pointing out that there are advantages to using the
official API, and that it may not be as bad as you fear. Of course if you
don't want to use them, that's entirely up to you.

--
Michael Ash
Rogue Amoeba Software

10-04-2007, 09:22 AM

unix

Re: Enhancing the look of Motif apps in MacOSX

Per Espen Hagen wrote:[color=blue]
> You can also change the colours or specify XPM files as the
> backgroundPixmap for some or all widgets if you really want to make an
> effort.[/color]

Thank you, I didn't know xpm backgrounds were possible for motif
widgets. I might invest some time experimenting with this, and it may
indeed improve the look, at least for reducing the "80s look".

They sure are. Just try to run nedit or some other Motif app like this:

nedit -xrm "*backgroundPixmap: /path/to/some/file.xpm"

However, widgets cannot be transparent so each widget will have its own
pixmap tiled from the upper-left corner. Gadgets (which have no window)
will have the parent widget's pixmap though.

--
Per Espen Hagen
My TLD is CC

10-04-2007, 09:22 AM

unix

Re: Enhancing the look of Motif apps in MacOSX

Per Espen Hagen wrote:[color=blue]
> nopa wrote:
>[color=green]
> > Thank you, I didn't know xpm backgrounds were possible for motif
> > widgets.[/color]
>
> They sure are. Just try to run nedit or some other Motif app like this:
>
> nedit -xrm "*backgroundPixmap: /path/to/some/file.xpm"
>
> However, widgets cannot be transparent so each widget will have its own
> pixmap tiled from the upper-left corner. Gadgets (which have no window)
> will have the parent widget's pixmap though.[/color]

Do you mean that it's not possible to set some colors in the pixmap as
"none" so that they're transparent? (it would be nice if that feature
was supported, because I could give a bit of rounded appearance to the
widgets corners).

nopa

10-04-2007, 09:22 AM

unix

Re: Enhancing the look of Motif apps in MacOSX

nopa wrote:[color=blue]
> Per Espen Hagen wrote:[/color]
[color=blue][color=green]
>>However, widgets cannot be transparent so each widget will have its own
>>pixmap tiled from the upper-left corner. Gadgets (which have no window)
>>will have the parent widget's pixmap though.[/color][/color]
[color=blue]
> Do you mean that it's not possible to set some colors in the pixmap as
> "none" so that they're transparent? (it would be nice if that feature
> was supported, because I could give a bit of rounded appearance to the
> widgets corners).[/color]

No, that won't work if I understand you correctly. Transparent ("none")
pixels in the XPM file will just show the widget's background colour.

--
Per Espen Hagen
My TLD is CC

10-04-2007, 09:24 AM

unix

Re: Enhancing the look of Motif apps in MacOSX

So, back to the original question, does anyone have an answer on how Gimp does
it? I could care less about your style debate--I also want my X11 applications
look vaguely similar to native MacOS X applications, and I believe the original
poster wants to know how to do that and it hasn't been addressed by anyone yet.

Thanks!

In article <1141900131.660435.211440@v46g2000cwv.googlegroups.com>, nopa says...[color=blue]
>
>Hi,
>
>I'm porting my UNIX Motif applications to wxWidgets, but I've some
>users who are asking me for an early access to the OSX version of my
>apps. I didn't finish the port to wxWidgets yet, but I can compile them
>with OpenMotif. However, the look is too old-fashioned.
>
>I saw the OSX version of Gimp. It's not a native port, as it requires
>X11 to run, but however the look is reasonably acceptable, and looks
>almost if it had been ported to Carbon. I guess this will be because
>GTK will have some sort of Aqua-like theme.
>
>Is there something I can do for enhancing the look of my apps under
>OpenMotif, or am I limited to the old-fashioned look until I finish the
>port to wxWidgets?
>
>Thanks.
>
>nopa
>[/color]