Creating none rectangular window

BlitzMax Forums/BlitzMax Beginners Area/Creating none rectangular window

Arowx(Posted 2006) [#1]
Can BlitzMax be used to create a windowed app that does not have a standard rectangular window?

Apologies if this has been answered but I could not find any referece to none rectangular windows on the Forums.

Thank You


H&K(Posted 2006) [#2]
Not being funny, but when have you seen any nonrectangular windows?


Arowx(Posted 2006) [#3]
Winamp and a few other 'windowed' applications that are not rectangular.


H&K(Posted 2006) [#4]
No they are rectangular, but copy the desktop to a canvas, then copy the "distorted" image over to it, with full transparency for the bits "outside" the application.

Or simply copy the "distorted" image onto the desktop

IE, They make bits of the rectangle see though/invisable


Arowx(Posted 2006) [#5]
But they only respond to mouse activity within their own space not their default rectangle?

Anyway is there a way to do this "distorted" image thing in BlizMax?

Regards


smilertoo(Posted 2006) [#6]
it should actually be simple for mark to add it in win2k/xp but thats probably why he wont, it wouldnt be cross platform.


H&K(Posted 2006) [#7]
Try.
Make a canvas, attached to the desktop, set transparacy, (Using setalpha, and setblend) and see.


ImaginaryHuman(Posted 2006) [#8]
You can easily ignore mouse activity that is outside of a given area by doing per-pixel collision checks.

I also agree that most windows will be actually rectangular and copy what is beneath them. That said, what if you move a window underneath/behind a non-rectangular window? Will it update in the corners?

You can set an Alpha value for gadgets... does this apply to windows?


Arowx(Posted 2006) [#9]
OK I've managed to get the border to go transparent but the main window area stays opaque...



Note that the code is based on some snippets dragged together so I could be missing the point here, can anyone provide additional help/guidance/advice?

Regards


H&K(Posted 2006) [#10]
I would have gone for using DeskTop:TGadget, and putting a canvas on that


ImaginaryHuman(Posted 2006) [#11]
Is it possible to add a canvas with Desktop() as the parent group, without a window?


H&K(Posted 2006) [#12]
I dont know, thats just how I would find out, if I wanted to know


Perturbatio(Posted 2006) [#13]
there are winapi commands that allow you to set the clipping rect of a window to polygon, thus allowing non-rectangular windows.

SetWindowRegion I think it is.


Erroneouss(Posted 2006) [#14]
TheCodeProject.com had something as using a bitmap to make a non-rectangular window in C# with the Windows API and BlitzSys has it too (But it is Blitz3D). So it is possible :]


Sub_Zero(Posted 2006) [#15]
it should actually be simple for mark to add it in win2k/xp but thats probably why he wont, it wouldnt be cross platform.


What?? Should be possible on all 3 platforms = cross platform

One good example in linux = Mplayer


Dreamora(Posted 2006) [#16]
I'm not that sure, that Cocoa allows this kind of stuff at all as it has the by far most restrictive rules on what is allowed in GUI (like buttons can't be oversized etc).


Sub_Zero(Posted 2006) [#17]
is that on mac?


Dreamora(Posted 2006) [#18]
Yes


ImaginaryHuman(Posted 2006) [#19]
It's have to work on all three platforms for brl to add it.


Sub_Zero(Posted 2006) [#20]
Because buffered windows are required for transparency or non-rectangular shapes, almost all Cocoa windows are buffered. Nonretained windows are appropriate for transitory images or simple connection lines, such as are used in Interface Builder for target-action connections.


http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CoreAppArchitecture/chapter_7_section_4.html

Anything is possible ;)