flat assembler
Message board for the users of flat assembler.

Index > Heap > Question about GUI theory - nested windows.

Author
Thread Post new topic Reply to topic
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
I asked this question on stackoverflow, but it was closed as opinion based. So, let discuss it here in the heap. Smile

Almost all GUI engines (Win32, X11, etc.) allows multiply nesting level of parent-child windows. i.e. every window can be child for its parent and parent for other windows. This way, all windows of some application form a tree structure with arbitrary depth.

But after some though, it seems to me, that every possible children layout can be created using only one nesting level - a main window and needed children windows being children of the main window.

I am sure, about the way the UI looks - after all everything is an image on 2D screen. But the UI windows are not only "look" but also "feel"...

So, the question: Is there a UI layout that can't be created using only one nesting level and suitable children placement and control algorithms?

or by other words:

Is it true, that every possible GUI can be created using only one level of windows nesting?

I know that I can emulate the nesting tree behavior with my own structures and code, but it would be a cheating. I mean, real flat structure is needed.

_________________
Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9
Post 10 Aug 2013, 20:31
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2915
Location: [RSP+8*5]
bitRAKE
Do UI's actually use all the features of the hierarchy? The idea was to reuse data/code for sub-branches. For example, a program can have multiple message boxes open and responding differently based on who the parent is. Wouldn't the message passing need additional information to mimic the hierarchy from the flat structure?
Post 10 Aug 2013, 21:06
View user's profile Send private message Visit poster's website Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8902
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
reading OP, i got an idea,
i think the current OS never really optimize the usage of keyboard,
imo, the keyboard is the best short cut,
this short-cut mode should be the always mode when a OS loaded and only temporarily off when the focus is on text box or other text enter/edit control.

the idea of 2D window to me is like a border partition tool, set a range of area belong to x process, then they add in with layer idea, (and this layer up down is not so optimize too in current OS)

then we come to information re-presentation,
i suggest maybe a mapped like method, very personalize, and it is still window based if you zoom the 1px to full screen,

UI, the raw idea is info presentation, i think there are just lots of method to present info.
Post 10 Aug 2013, 22:42
View user's profile Send private message Reply with quote
uart777



Joined: 17 Jan 2012
Posts: 369
uart777
A custom GUI by drawing lines/rectangles is the only way to true portability, FASM IDE with the same appearance and functionality on all systems. Small OSs - Menuet, Kilobri, etc - need GUI support instead of waiting forever for them to become as advanced as Windows/Linux.

Example ideas/design for custom controls/frames/windows:
Code:
structure TAG        ; identifies a
 byte type, version  ; structure.
 u16 id, size, a8    ; 8 bytes
ends ?tag

structure EVENT
 inherit TAG
 void *function
ends ?event

numeric ON.BEGIN, ON.CREATE, ON.DESTROY,\
 ON.SET.TEXT, ON.GET.TEXT, ON.MOVE, ON.SIZE,\
 ON.LOAD, ON.DRAW, ON.UPDATE, ON.INPUT, ON.ETC

structure CONTROL    ; generic control
 inherit TAG         ; with events
 integer \
  x, y, w, h, n,\
  style, state, visible,\
  select, focus, change 
 void *owner, *pointer, *text
 integer length
 void *events
 integer n.events
 inherit FONT, THEME
ends ?control

structure FRAME      ; master container
 inherit CONTROL     ; of controls.
 void *controls      ; its children
 integer n.controls
ends ?frame

structure WINDOW     ; a custom frame
 inherit FRAME
 void *title
 BOX title.box,\
  title.bar.box,\
  minimize.box, close.box
 ; ... etc
ends ?window

structure PROGRAM
 inherit TAG
 uinteger total.size
 void *events        ; program events
 integer n.events
 void *heap, *heap.p ; available address
 uinteger heap.size  ; space
 void *windows       ; array of windows
 integer n.windows
 ; ... etc
ends ?program    
Events are processed in a tree fashion: When an event occurs, program sends to each of its Windows and each Window redirects to all of its controls.
Post 11 Aug 2013, 11:15
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
JohnFound wrote:
Is it true, that every possible GUI can be created using only one level of windows nesting?

Probably - but you might need to write a whole bunch of code for some scenarios. Consider things like moving a parent window which automatically moves the child windows as well (and hide/minimize), or modal windows. And if you want to use layout managers, the parent/child concept is also pretty useful.

_________________
Image - carpe noctem
Post 14 Aug 2013, 16:26
View user's profile Send private message Visit poster's website Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
f0dder wrote:
And if you want to use layout managers, the parent/child concept is also pretty useful.
That's the key. Nesting vertical and horizontal layouts can do a lot of neat things. Like a vbox with an important thing (like an image or graph or something) with a bunch of hboxes below with line edits/buttons/bubbles.

There are also grid layout managers that sound useful (probably a better way to achieve what I describe above), but I've never tried them.
Post 16 Aug 2013, 02:58
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.