Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Dec 07, 2019 6:37 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Cocoa and HUD-Window?
PostPosted: Wed Mar 09, 2011 9:14 am 
Offline

Joined: Mon May 10, 2010 6:51 am
Posts: 36
Location: Berlin, Germany
Hey guys,

is it now possible to use an HUD-Window with the new RealStudio releases?
I'm wondering about that if I compile for Cocoa there's no opportunity to select an HUD-Window, or do I have to set a special MacProcID?

Best regards.

_________________
Visit: Paeric's | OpenSource Code Resources
iMac 8,1 ; PowerBook G4(5,2) ; iBook G3 (Clamshell)


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Thu Jun 09, 2011 7:26 am 
Offline

Joined: Mon Nov 22, 2010 4:51 pm
Posts: 61
Location: Stockholm, Sweden.
Seems to be very little knowledge about this.

_________________
Richard B.
Real Studio 2012> OS X


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Thu Jun 09, 2011 8:34 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
Isn't that just a new frame option?

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Sat Jun 11, 2011 3:32 pm 
Offline

Joined: Mon May 10, 2010 6:51 am
Posts: 36
Location: Berlin, Germany
I don't found such... :/

_________________
Visit: Paeric's | OpenSource Code Resources
iMac 8,1 ; PowerBook G4(5,2) ; iBook G3 (Clamshell)


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Sat Jun 11, 2011 3:41 pm 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
Oh. Sorry. I was wrong there.

Do you use our plugins?

You can make it with our plugins:
see http://www.mbsplugins.de/archive/2010-02-20/HUD_Windows_in_REALbasic/monkeybreadsoftware_blog_archive

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Sat Jun 11, 2011 8:37 pm 
Offline

Joined: Mon May 10, 2010 6:51 am
Posts: 36
Location: Berlin, Germany
Of cause I really like your plugins but I want to provide free software and though I can't use plugins which were I've to pay for, I'm sorry, may in Octobre if I start to study I will. But nowadays I'm not able to, sorry. But at all I really like 'em! :)

_________________
Visit: Paeric's | OpenSource Code Resources
iMac 8,1 ; PowerBook G4(5,2) ; iBook G3 (Clamshell)


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Wed Jun 15, 2011 11:42 am 
Offline

Joined: Thu Jul 13, 2006 11:20 am
Posts: 114
MrLee wrote:
Hey guys,

is it now possible to use an HUD-Window with the new RealStudio releases?
I'm wondering about that if I compile for Cocoa there's no opportunity to select an HUD-Window, or do I have to set a special MacProcID?

Best regards.


Sure, it's possible, and no plugins are required. Given an Rb Window, set its Frame type to 3 - Floating Window. Then add the following code to the Window.Open event handler.
const NSHUDWindowMask = 8192
const NSTitledWindowMask = 1
const NSClosableWindowMask = 2
const NSUtilityWindowMask = 16

#if targetCocoa
declare sub setStyleMask lib "Cocoa.framework" selector "setStyleMask:" (obj_id as Integer, mask as Integer)

setStyleMask self.Handle, NSHUDWindowMask or NSTitledWindowMask or NSClosableWindowMask or NSUtilityWindowMask
#endif


Adding controls appropriate to a HUD window are more work, but certainly possible. I did a quick proof of concept last month.
http://imageshack.us/photo/my-images/546/rbhudwindowdemo.png/
There are transparent control libraries available on the web; I used one for the example.


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Wed Jun 15, 2011 12:33 pm 
Offline
Real Software Engineer

Joined: Fri Jan 28, 2011 5:24 pm
Posts: 145
charles wrote:
const NSHUDWindowMask = 8192
const NSTitledWindowMask = 1
const NSClosableWindowMask = 2
const NSUtilityWindowMask = 16

#if targetCocoa
declare sub setStyleMask lib "Cocoa.framework" selector "setStyleMask:" (obj_id as Integer, mask as Integer)

setStyleMask self.Handle, NSHUDWindowMask or NSTitledWindowMask or NSClosableWindowMask or NSUtilityWindowMask
#endif



One thing to be aware of is that -[NSWindow setStyleMask:] was added in 10.6.

_________________
Joe Ranieri
Mac Frameworks & Compiler
REAL Software, Inc.


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Thu Jun 16, 2011 4:31 am 
Offline

Joined: Sun Mar 26, 2006 11:02 am
Posts: 85
Nice, thanks, charles. And with
const NSResizableWindowMask = 8
... it's resizeable!


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Thu Jun 16, 2011 2:47 pm 
Offline

Joined: Wed Feb 04, 2009 1:43 pm
Posts: 427
charles wrote:
Adding controls appropriate to a HUD window are more work, but certainly possible. I did a quick proof of concept last month.
http://imageshack.us/photo/my-images/546/rbhudwindowdemo.png/
There are transparent control libraries available on the web; I used one for the example.


Any change sharing us some code for the HUD controls? :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Thu Jun 16, 2011 2:53 pm 
Offline

Joined: Thu Jul 13, 2006 11:20 am
Posts: 114
atarikid wrote:
charles wrote:
Adding controls appropriate to a HUD window are more work, but certainly possible. I did a quick proof of concept last month.
http://imageshack.us/photo/my-images/546/rbhudwindowdemo.png/
There are transparent control libraries available on the web; I used one for the example.


Any change sharing us some code for the HUD controls? :)


There is already code in macoslib for some Cocoa controls. I just used that, adapted to a third-party framework.


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Thu Jun 16, 2011 3:10 pm 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
well, our plugins have a couple of examples for using Cocoa controls.
See NSViewMBS and subclasses.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Sun Feb 10, 2013 4:16 pm 
Offline

Joined: Fri Dec 09, 2011 6:27 am
Posts: 67
Can anyone think of why Charles' method above doesn't work for Global Floating windows?

_________________
Xcode and Real Studio developer. Using Real Studio since RealBasic 1.0


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Sun Feb 10, 2013 4:30 pm 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
Maybe because a global floating window is an NSPanel?

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: Re: Cocoa and HUD-Window?
PostPosted: Mon Feb 11, 2013 7:35 am 
Offline

Joined: Fri Dec 09, 2011 6:27 am
Posts: 67
So what's a floating window then?

It works initially - it gets the focus but if you switch to another app and then attempt to switch back, it can't regain focus.

_________________
Xcode and Real Studio developer. Using Real Studio since RealBasic 1.0


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group