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
xyjamepa

GUI

Post by xyjamepa »

hey guys i need some good GUI tutorials
yayyak

Re:GUI

Post by yayyak »

There are a few questions that would probably help here. Are you designing the GUI, and need tips, or are you implementing it, and need tips? If the latter, are you working from scratch, on top of something like OpenGL (can you do that?) or on something like X?

Of course, if I appear to not know what I'm talking about, that's probably because I don't. :P
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:GUI

Post by Pype.Clicker »

I think James T. Klik should have that :P
xyjamepa

Re:GUI

Post by xyjamepa »

i'm trying to design my GUI to use it in my own os and i'm
working from scratch
xyjamepa

Re:GUI

Post by xyjamepa »

ok guys give me some help here
any src code or any good tutorial
earlz

Re:GUI

Post by earlz »

heres the best thing i got:
[url]http://osdever.net/tutorials/GUI_tut.php?the_id=62[/url\
srg_13

Re:GUI

Post by srg_13 »

Jordan3 wrote: heres the best thing i got:
http://osdever.net/tutorials/GUI_tut.php?the_id=62
Yeah, thats not a great tutorial...

@abuashraf: How developed is your OS? Are you in real mode or protected mode? In real mode, switching video modes would be easy, but I don't think you'd have enough spaces for bitmaps, images etc. In protected mode, you would need something like a v8086 driver or some kind of driver that uses ports. I wouldn't recommend starting with a GUI until you have finished multitasking and IRQs, and a Command line interface.

Just my AU$0.02 :P

-Stephen
xyjamepa

Re:GUI

Post by xyjamepa »

i developed my os in real mode and i have a command line
and fat12 file system
so i want to design a simple GUI as a start...
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:GUI

Post by distantvoices »

@abuashraf: Do you have dynamic memory allocation available for your os? Do you have memory management in general available for it?

Without these, your attempt will be in trouble very soon.

Stay safe :-)
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Dex4u

Re:GUI

Post by Dex4u »

You could get a basic idea, of how to make a simple gui, by looking at the code in this demo i made.
http://www.dex4u.com/images/cdpod.zip
It uses 640x480 32bpp vesa graphics, go to pmode, has built in cd player, vesa draw function etc, but is less than 512bytes in size, so fits into the boot sector of a floppy.
Screenshot http://www.dex4u.com/cdpod.htm

Comes with full source code.
Warrior

Re:GUI

Post by Warrior »

Hey, this is a more general topic as opposed to OSDev.
You may want to look into this:

http://www.gamedev.net/reference/articl ... cle994.asp
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:GUI

Post by Pype.Clicker »

suggested plan of actions:
- primitives to enable the screen ... VESA documents will be your friends here and you might wish to enable UnrealMode aswell so that you can access large LFB or store more picture data, etc.
- primitives to draw on screen (blocks, lines, fonts and bitmaps will be a must)
- test and re-test your font drawing out of your OS and integrate them when you'll be 100% sure they work properly ... bugtracking without proper text display is certainly a pain.
- read about sprites programming to see how you can handle the mouse cursor, then go for implementing mouse.
- provide basic widgets .. at least something like a "report problem" dialog box.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:GUI

Post by distantvoices »

If I may add some words from my own experience:

Wrap your brain around the idea of drawing to a global offscreen buffer and render that to the screen upon a special call - something like expose( )

You might want to keep image data in memory as long as possible. Loading and decoding and rendering it everytime you have to redraw it isn't very performant.

Consider client side drawing as an alternative to server sided rendering of controls. Sometimes it is much more performant to draw something offscreen with client lib functions and then at the end have the service blit the crap to screen. Further, accessing control data and control attributes is way easier on the client side. It's merely a function call or an assignment.

Others may have different ideas/approaches. Some think of having data streams connected together (image stream to bitmap stream or html stream to bitmap stream ... don't remember it entirely)

By the way: Pype has it right: get your hands dirty on font rendering and simple widgets. naught to display is hard for the dark debug sessions, you know?

Well enough of the ranting

stay safe
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Post Reply