www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/15/12:57:54

Date: Sun, 15 Mar 1998 11:55:52 -0600 (CST)
From: Andrew Deren <aderen AT eecs DOT uic DOT edu>
To: Vic <tudor AT cam DOT org>
cc: djgpp AT delorie DOT com
Subject: Re: About GUI's
In-Reply-To: <350AD507.3621@cam.org>
Message-ID: <Pine.GSO.3.96.980315114711.25960A-100000@bert.eecs.uic.edu>
MIME-Version: 1.0

> I'm allmost finished with XGUI. I discovered limitations in design
> (what design? I started with a button and built the rest on top of that
> :) and the next version (after finishing this one) will be more
> thoughtfully designed from the beginning.
> So, what is a GUI supposed to do anyways? What is the best way of
> designing one? What objects should it provide (XGUI 0.5 has text
> buttons,bitmapped buttons, checkboxes, radio buttons, panels, bitmaps,
> line edit, progress bars, hidden and visible list boxes, windows.
> I plan adding menus, labels (text thing) and edit window (text) before
> shipping version 1.0 beta).
> How is the user supposed to interact with it? Or the objects created by
> the user?
> (Of course I'm asking your opinion on how it would be best to do all of
> these. XGUI allready does all that but I find it somewhat limited)
> TIA,

I think a good feature would be to have custom callback procedures called
on some specific event. Let's say you have a button object and you want
some action to take place when it's clicked. You could have the behavior
of the button inside the class (clicking and unclicking) and then it would
execute a callback function whose argument would be a pointer to the
object it came from and an event structure (state of key flags (key, alt,
ctrl, shift) and state of mouse (position and buttons)), and if each
object would have a pointer to the dialog it's contained in then each
callback function could interact with all other objects. The structure of
the hierarchy could be something like this:

desktop - dialog - objects
        - dialog - objects
        - .....
THen you could have all the dialogs run in parallel and execute their
code (Idle event). Your event loop would send events to the dialogs and
dialogs would sent them to objects. ANd each type of object could have
different callback functions, list box could have onSelect, onIdle and all
sorts of other events. 

That's just what I think would be good to have in a GUI. I stared doing it
some time ago, but never really had time to do it (because of school
projects).



 > -- 
> --> http://www.cam.org/~tudor <--
> 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019