1. Re: VisualBasic Look-a-like

[ C. K. Lester wrote: ]

> What exactly does ["emulated controls"] mean? You're
> saying that an emulated control is less of an OS control
> and more of a faceplate to that control? Or are you saying
> it's totally faked?

Totally faked.

In the most current version of Llama, the pushbuttons, radio buttons and
checkboxes in examples 3, 4, 5, 6 and 7 are completely rendered and managed
by Llama.

> Why couldn't you just make modules for
> each OS- one that you'll include when
> distributing Linux solutions, one for
> Win9x solutions, one for Mac solutions,
> etc.? Each module would use native calls
> for each function/procedure.

I'm sure people will prefer a library that does native OS calls instead of
emulated controls, and I'm sure that there will be a version of Llama that
will support this.

The advantage of emulated controls is that far less of the OS needs to be
wrapped in order to make the port. All you really need is the ability to
create windows, and draw graphics into them.

[ Mike Hurley wrote: ]

> If Llama is supposed to be a platform-independant library, how
> will it know the routine for doing something in DOS, Win32, Linux,
> Mac, or whatever other platform Eu would be made to work with?

This is one of the few times that an OOP system comes in handy. The calls
are polymorphic, depending on what classes are loaded. Currently, an
emulated pushbutton in Llama has a hierarchy something like this:

        Drawable -> Pixmap -> QControl -> QPushButton

A call made by QButton to draw something is handled by the Pixmap or
Drawable classes. These implement the OS-specific portions. The 'QControl'
and 'QPushButton', on the other hand, are (relatively) OS-independant. To
port the emulated pushbutton to a different OS, I would only need to alter
the Drawable and Pixmap classes.

> Will Win32 users of Llama get a Win32 version,
> DOS users a DOS version, Linux users a Linux version,
> etc.?

Yes, each OS would have a seperate distribution of low-level libraries for
the OS, while the high-level classes would remain unchanges (I'm ignoring
look and feel to simplify things).

Obviously, I'd like to make the number of *different* classes needed between
OSes as few as possible.


> Just wondering.  By the way, if you want my help
> emulating controls for Llama, ask me, I'd be glad to help.

Thanks. I have some major restructuring of Llama to do first. The Generic
class needs to be rewritten, and I may write a thin layer over native events
to make the OS independant. At the point where I feel the code is stable, I
will definitely be farming out the work on widgets.

[ Ferlin Scarborough wrote: ]

> ... I was hoping David would make the main Llama file
> portable, and the include files for the controls etc...


That's it, exactly.

-- David Cuny

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu