Page 1 of 1
GUI
Posted: Fri Feb 17, 2006 12:13 pm
by xyjamepa
hey guys i need some good GUI tutorials
Re:GUI
Posted: Fri Feb 17, 2006 11:46 pm
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.
Re:GUI
Posted: Sat Feb 18, 2006 4:28 am
by Pype.Clicker
I think
James T. Klik should have that
Re:GUI
Posted: Sat Feb 18, 2006 4:29 am
by xyjamepa
i'm trying to design my GUI to use it in my own os and i'm
working from scratch
Re:GUI
Posted: Sun Feb 19, 2006 2:12 am
by xyjamepa
ok guys give me some help here
any src code or any good tutorial
Re:GUI
Posted: Sun Feb 19, 2006 2:22 am
by earlz
heres the best thing i got:
[url]http://osdever.net/tutorials/GUI_tut.php?the_id=62[/url\
Re:GUI
Posted: Sun Feb 19, 2006 3:16 am
by srg_13
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
-Stephen
Re:GUI
Posted: Sun Feb 19, 2006 6:21 am
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...
Re:GUI
Posted: Sun Feb 19, 2006 7:32 am
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
Re:GUI
Posted: Sun Feb 19, 2006 3:36 pm
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.
Re:GUI
Posted: Sun Feb 19, 2006 7:54 pm
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
Re:GUI
Posted: Mon Feb 20, 2006 2:58 am
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.
Re:GUI
Posted: Mon Feb 20, 2006 3:38 am
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