GUI

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
ManOfSteel

GUI

Post by ManOfSteel »

Hello,
I have a question for you about GUIs. You made a window (the parent window), but you want to add some information to it so you create a child window. My question is how do you restore the parent window image that was covered by the child window when you close the child window? Do you copy this portion of the parent window to a secure memory location than restore it completly when the child window is closed or partially when the child window is moved or there is another method?
Thanks for any help.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:GUI

Post by Solar »

There are many different ways to handle this. I'll just list some of the AmigaOS options so you get the idea.

SimpleRefresh - when parts of a window become uncovered, you signal the application to redraw its entire window. That's simple, but slow.

SmartRefresh - when parts of a window become uncovered, you signal the application to redraw the uncovered parts. Fast but a bit more complex.

SuperBitmap - The OS holds a complete window image in some memory area, and when parts become uncovered, copies the affected memory region into the screen display. Fast, no context switch, but eats lots of memory.

There are many other architectures possible. It's a matter of who has the data to do something, and who knows what has to be done.
Every good solution is obvious once you've found it.
ManOfSteel

Re:GUI

Post by ManOfSteel »

Hello,
I have another question about GUIs. How are the controls (message boxes, edit boxes, buttons, ...) drawn? Do you draw it line by line and pixel by pixel or there is another better and faster method?
Thanks for any help.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:GUI

Post by Solar »

If you're thinking about some way of hardware support for UI primitives by the GPU... I don't think there's such a thing.

Other than that, it's basically your decision how you handle UI primitive drawing...
Every good solution is obvious once you've found it.
Post Reply