Oh, well it tried it and it worked. The only downside though is that both windows must be manually positioned and set to toplevel, otherwise other windows will appear 'inside' of the drawing if switch between them. Of course, I think the latter problem can be fixed just by waiting for active event and making sure both windows go active and inactive at the same time.

ANYWAY, I figured out paging but I need to go learns meh sum GDT cuz I just found out I didn't know half as much about it as I thought I did, and it is truly making my brain hurt.
AND COOL RANCH DORITO BEANS I created a GUI framework for my PSP that is a sort of extended version of the DCS GUI stack. In my framework, there are 3 types of objects: stacks, containers, and components. All objects have a component header that tells its type and state flags, and all containers or stacks have an additional container header that has an x, y, width, and height for a rendering region. Unlike the DCS stack though, items are stored in list of pointers and each container has its own stack. Here's an example code of how its used:

GUI_STACK stack = gui_openStack()
GUI_WINDOW win1 = gui_newWindow("Example", 10, 10, 250, 150)
GUI_WINDOW win2 = gui_newWindow("Child Window", 35, 35, 175, 100)
GUI_TEXT txt = gui_newText("Hello World", 5, 5)
gui_pushStack(&stack, &win1)
gui_pushStack(&win1, &wbtns)
gui_pushStack(&win1, &win2)
gui_pushStack(&win2, &txt)

As you can see, windows can be used as arguments for the stack functions.

NO. THIS IS NOT A CONCEPT. This is something I have already done for fun and practice. Currently supported are windows (with and without captions and window buttons), buttons, images, text, rectangles (with and without borders), and drawing a cursor.
For stack handling functions there are gui_openStack(), gui_closeStack(), gui_renderStack(), gui_pushStack(), gui_popStack(), gui_insertStack(), and gui_removeStack(). Most are pretty much self explanatory if you know how the DCS stack works, but the last 2 allow you to insert and remove a specific item from the stack.

This doesn't really have anything to do the my os, but I figured it was good practice for when I create my OS's framework.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 3 of 3
» All times are UTC - 5 Hours
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