Home | Reviews | GUIpedia | Forum | Fun500


ysft9OS Windowing Demo!
So I have started working on 9OS again, wanting to make a windowing GUI. The story behind this demo is this: I started a new little qbasic test file trying to make a draggable square, after two days of coding the little square evolved into this! This inspired me to continue work on 9OS. The windowing system is unique from other GUIS: 1. I does not redraw the whole screen if window is dragged/resized 2. Windows are fully resizable! 3. unique way to organize active/inactive windows 4. The Z-order is backwards :( (z-order was made with a snigle SWAP statement :P) One thing I learned from this is to never base of someone-elses code. The best code comes from what you write from scratch. Anyways, here it is: [url]http://www.serpentine.moved.in/nineos.zip[/url] Source code is written in QBasic 1.1. This is just a demo, 9OS is not going to look like this at all. Look at 9OS 4 years ago, what a piece of crap... I have learned TONS since the first 9OS and I have some big, BIG plans! I had one idea to make a scripter: Have the QBasic interprteer handle all the variables, math... w/e, Only have the scripter interperpret GUI specific commands. ( I have a realistic plan to do this. ) Anyways, Tell me what you think!
2008-09-1711:24 PM

jasonwoodlandRe: NineOS Windowing Demo is cool!
Ah, very fast I'm guessing you didn't use the GET and PUT command:) One thing I'll say though I went over to drag a window but the window behind it drew over it. A very good start to it! :cheer:
2008-09-1711:55 PM

ksrRe: NineOS Windowing Demo is cool!
Very fast, and very nice!
2008-09-1812:24 PM

Re: NineOS Windowing Demo is cool!
What do you mean? Do you mean it drew over it after you let go of the window? That happens because the Z-order is broken. I have a few ideas to fix it, but I gotta try them all first. One of the reasons its fast is because I wrote it all from scratch. You see how when you have your mouse over it, the window stands out and and the bar is highlighted? That is the secret behind the whole window system. It also makes all the code around 150 lines.
2008-09-183:00 PM

jasonwoodlandRe:9OS Windowing Demo!
Ah, okay;) Can't wait for the next version!
2008-09-185:50 PM

ToddRe: NineOS Windowing Demo is cool!
Great job, ysft! 9OS is coming along very well. I like the whole window management when the cursor hovers over a window. It can be a little tough to do so if you want to make it really user friendly, you should put it in as an option to the user. Some of us old-timers are used to pointing and clicking to overlap a window! There's just a small problem with it too. It doesn't bring forward every window when it should. Instead it seems like it comes into conflict when other windows overlap. I'll look at your code and see what you did.
2008-09-185:51 PM

Re: NineOS Windowing Demo is cool!
[b]tlsuess wrote:[/b] [quote]Great job, ysft! 9OS is coming along very well. I like the whole window management when the cursor hovers over a window. It can be a little tough to do so if you want to make it really user friendly, you should put it in as an option to the user. Some of us old-timers are used to pointing and clicking to overlap a window! There's just a small problem with it too. It doesn't bring forward every window when it should. Instead it seems like it comes into conflict when other windows overlap. I'll look at your code and see what you did.[/quote] Hmm, IDK. I got the idea from twn and fvwm. Thats how they work.
2008-09-186:56 PM

ysftRe:9OS Windowing Demo!
Here is one: I made a few fixes, but there is a small flickering problem (nothing big): [code] DEFINT A-Z TYPE RegTypeX ax AS INTEGER bx AS INTEGER cx AS INTEGER dx AS INTEGER bp AS INTEGER si AS INTEGER di AS INTEGER flags AS INTEGER ds AS INTEGER es AS INTEGER END TYPE TYPE wintype x AS INTEGER y AS INTEGER x1 AS INTEGER y1 AS INTEGER c AS STRING * 20 END TYPE DECLARE SUB intx (intnum AS INTEGER, InReg AS RegTypeX, OutReg AS RegTypeX) DECLARE SUB drawin (x, y, x1, y1, a) DECLARE SUB cwin (x, y, x1, y1, c$, n) DECLARE SUB mouse.show () DECLARE SUB mouse.hide () DECLARE FUNCTION mouse.click (x, y, x1, y1) DECLARE FUNCTION mouse.over (x, y, x1, y1) DIM SHARED regs AS RegTypeX DIM SHARED win(10) AS wintype SCREEN 12 cwin 50, 50, 200, 200, "", 1 cwin 300, 300, 500, 420, "", 2 cwin 200, 70, 450, 180, "", 3 mouse.show DO mouse.hide FOR i = 1 TO UBOUND(win) IF win(i).x1 = 0 OR win(i).y1 = 0 THEN n = i: EXIT FOR drawin win(i).x, win(i).y, win(i).x1, win(i).y1, 0 NEXT mouse.show DO FOR i = 1 TO n IF mouse.over(win(i).x, win(i).y, win(i).x1, win(i).y1) THEN mouse.hide drawin win(i).x, win(i).y, win(i).x1, win(i).y1, 1 mouse.show EXIT DO END IF IF mouse.click(win(i).x, win(i).y, win(i).x1, win(i).y1) THEN EXIT DO NEXT LOOP UNTIL INP(&H60) = 1 FOR i = 1 TO n DO IF NOT mouse.over(win(i).x, win(i).y, win(i).x1, win(i).y1) THEN EXIT DO IF mouse.click(win(i).x + 25, win(i).y, win(i).x1 - 1, win(i).y + 25) THEN mouse.hide LINE (win(i).x, win(i).y)-(win(i).x1, win(i).y1), 0, BF LINE (win(i).x, win(i).y)-(win(i).x1, win(i).y1), 7, B regs.ax = 3: intx &H33, regs, regs x1 = regs.cx x2 = regs.dx DO WAIT &H3DA, 8 WAIT &H3DA, 8, 8 LINE (regs.cx - x1 + win(i).x, regs.dx - x2 + win(i).y)-(regs.cx - x1 + win(i).x1, regs.dx - x2 + win(i).y1), 0, B regs.ax = 3: intx &H33, regs, regs LINE (regs.cx - x1 + win(i).x, regs.dx - x2 + win(i).y)-(regs.cx - x1 + win(i).x1, regs.dx - x2 + win(i).y1), 7, B LOOP UNTIL INP(&H60) = 1 OR regs.bx = 0 drawin regs.cx - x1 + win(i).x, regs.dx - x2 + win(i).y, regs.cx - x1 + win(i).x1, regs.dx - x2 + win(i).y1, 0 win(i).x = regs.cx - x1 + win(i).x win(i).x1 = regs.cx - x1 + win(i).x1 win(i).y = regs.dx - x2 + win(i).y win(i).y1 = regs.dx - x2 + win(i).y1 mouse.show SWAP win(i), win(n - 1) EXIT FOR ELSEIF mouse.click(win(i).x1 - 5, win(i).y1 - 27, win(i).x1, win(i).y1) OR mouse.click(win(i).x1 - 27, win(i).y1 - 5, win(i).x1, win(i).y1) THEN mouse.hide LINE (win(i).x + 1, win(i).y + 1)-(win(i).x1 - 1, win(i).y1 - 1), 0, BF oldx1 = win(i).x1 oldy1 = win(i).y1 DO LINE (win(i).x, win(i).y)-(win(i).x1, win(i).y1), 0, B regs.ax = 3: intx &H33, regs, regs LINE (win(i).x, win(i).y)-(regs.cx, regs.dx), 7, B win(i).x1 = regs.cx win(i).y1 = regs.dx IF win(i).x1
2008-09-203:10 PM

agumaRe:9OS Windowing Demo!
You mean the LFs? or was it CRs? lol :laugh:
2008-09-206:34 PM

GUIs


2021 Brandon Cornell