1. RE: [GEN] event handling

Hello Chris,

>That is similar to what I have going on. But how do you check if a
>control is active?

As in "has focus"? or mouse-over?

>How I have it, the events for each window(including child controls) are
>stored in the Window object. Each event, has an identifier to tell what
>mouse event it is,a control ID, and a routine ID.
>On calling gui_main() (gui_do_events() in the distributed guiX), guiX
>polls for keyboard events, and then polls for mouse events. In the mouse
>poll it tests if the cursor is over a control, if it is, then it checks
>for an active event. Either mouseOver,mouseDown, or mouseUp. if one is
>found, it calls the routineID.
>I've considered using oop, but decided against it...
>Sorta coded a cross between inlined and oop code..

Our main difference is probably oop but I think you can make GUIX do
what I'm doing with LAGUI. I make very little distinction between objects 
whether they are a window (panel) or another object. All objects are stored 
in LOOP lib but GUI objects have a property called "parent". This way I can 
calculate the actual screen location for mouse-overness. I don't have to 
calculate screen location for drawing or displaying. Each object "draws" to 
its own image property, an exotica bitmap. Each object "displays" to its 
parent's image. If an object's parent is zero then it displays to the 
screen. I know having each object store its own image takes up a bit of 
memory but it makes for seamless graphics :).

>I'd be interested to see your LAgui if you don't mind.. :)

I'll send it to you. Even as it is, unfinished and un documented. :)
And maybe some bugs.

>On a side note..
>Now that you have ExoticaX, can we expect to see Lewis Artillery for
>Exotica?

I think so. I think it would be faster and maybe smaller if
Exotica + ExoticaX is smaller than Win32lib. I will have to finish LAGUI 
first so that I can port the GUI part over too.

later,
Lewis Townsend

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu