GUI Ideas

I had some ideas about GUI widgets.  I was brainstorming about how to create a GUI that would be capable of displaying a tree of strings.  It seems like every widget needs x and y coordinates, plus location information saying what the x and y are relative to.  The location information would take the form of a pointer to another widget (perhaps the parent) and an enum for bottom right, top left, etc.  The widget also needs a width and height.  If the width or height is set, then the contents (including child widgets) will be clipped along that dimension.  The width or height should also be able to be set to an “autosize” mode, which would size up the width/height of the widget based on its children widgets.  There would also need to be a visibility flag for each widget.

I haven’t thought yet about how widgets are created, drawn, or how widgets handle events (like mouse clicks).

Comments are closed.

Dev Journal and Project Hosting