Re: Win4Eu update

new topic     » goto parent     » topic index » view thread      » older message » newer message

Bernard Ryan wrote:
> Tommy Carlier wrote:
> > A little update on the progress of Win4Eu:
> > 
> > }}}
<eucode>
> > include win4eu.ew
> > 
> > constant win = create(Window, "win", {10, 10, 300, 200})
> > start(Application)
> > </eucode>
{{{

> Tommy I don't see anything new except you have no parent
> and no style; You can already do this using my w32engin.ew or win32lib.
> 
>  }}}
<eucode>
>  include w32engin.ew
>  
> constant win = create(Window, "win", 0, 10, 10, 300, 200,0)
> WinMain(win,Normal)
> </eucode>
{{{


You're absolutely right. What it does, is just create a window, and
show it. I forgot to mention that Win4Eu will be able to do more than
that blink

The difference with w32Engine and Win32Lib, will not be what it can do,
but the programming interface, the architecture. Win4Eu is a (limited)
object-oriented architecture, with inheritance, properties and events.
One other difference: I'm trying to hide the technical details of
Windows programming even more than in the currently used libraries.
Why do you start the event-loop of an application with 'WinMain'?
Probably because it's like that in C/C++. I'm taking a different
approach: wanna start the application? Call the start-verb and pass
it the Application-object: start(Application). Wanna move a window?
Set the location: set(win, "Location", {x, y}) or even shorter:
move(win, {x, y})
Although Win4Eu hides the low-level stuff for regular users, you can
still access all the low-level features. An example: structures. You
can create structures, like you create regular objects, with the 
create-verb. Here's a simple definition of a structure, and how you
create an instance:
constant POINT = defineStructure("POINT", {
   {"x", Int},
   {"y", Int}
})

integer pt, size
atom address
pt = create(POINT, "pt", {})
pokeField(pt, "x", 0, 100)
pokeField(pt, "y", 0, 100)
size = getStructureSize(pt) -- get the size in bytes
address = getStructureAddress(pt) -- get the physical address

destroy(pt) -- release the memory


I will try to make it as easy as possible for people to create
Windows applications. And another advantage of the object-oriented
architecture is extensibility: it will be easy to create new controls
and treat them exactly the same as regular controls (what I earlier
tried to do with EuControls). 

--
tommy online: http://users.telenet.be/tommycarlier
tommy.blog: http://tommycarlier.blogspot.com
Euphoria Message Board: http://uboard.proboards32.com
Empire for Euphoria: http://empire.iwireweb.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu