OS X fullscreen in wxWidgets 3.0 - c++

I contribute to a cross-platform application which is built using wxWidgets stable version - 3.0.2.
I would like to enable the app to use the native fullscreen system on OS X Lion and above. This feature is implemented in current development versions of wxWidgets, but not in 3.0.2.
I understand that it should be possible to call the native Cocoa API from within the wxWidgets app to enable fullscreen mode, but I can't work out how to do so and can't find any information online.
How can I directly access the NSWindow class from my wxWidgets C++ code?
For reference, this question asks how to do the same with wxPython, and gets an answer - but python is different enough from C++ that I can't work out how I would do it in standard wxWidgets.

You can use wxWindow::MacGetTopLevelWindowRef() to get the NSWindow. See this commit for what you can do with it afterwards.

Related

Is there a built-in OpenGL GUI windowing library in XCode 6 (OS X 10.10)?

I am trying to develop a C++ application that uses OpenGL. I set up everything in XCode 6.4 (running on OS X 10.10.5) and I was able to get the OpenGL framework working. However, I can't figure out how to draw the graphics to a GUI window.
I know that GLUT is available, but it is deprecated and I'd rather avoid using it. Instead, is there a way of using some of Apple's native windowing systems (I assume there should be something available in the Cocoa API)?
I would rather avoid downloading additional libraries like SDL or Qt since I do not have root access on this machine and maintaining third-party libraries those may be challenging.

is GTK 3.x a real cross-platform solution?

I have tasted both Qt 4.x/5.x and GTKmm 3.x and I really like GTKmm over Qt.
Now I have just discovered that GTKmm 3.x doesn't offer a Windows porting, they also do not offer a Mac porting, basically I can't find nothing but libraries/sources/binaries for Linux.
Apparently the Windows support ( I'm not sure about the situation for the Mac OS stuff ) was dropped in the 2.x era and it's still not-existing today.
I have planned to use GTK 3.x for specific reasons, especially for some new features introduced by the 3.x branch, so using GTK 2.x is an option off the table.
Now I ask: there is something new for the Windows and/or Mac support for GTK 3.x ? There is something ? even experimental projects ?
No it isn't - at least when you want to be on the safe side for the future. The MacOSX and GTK ports are less then perfect and completely voluntarily which means by a program of this complexity and size they are not not active developed. And nobody cares that old features are implemented before new are added.
Almost 2 years since GTK3 released and there is still no official Windows binary distribution. And on one of the GNOME conferences there was an open discussion if GTK4 should be made Linux only. Well i guess they mean Linux/BSD - but Wayland is pure Linux at the moment and BSD do have a lack of developer for Desktop stuff.
This should be enough to scare any person with a serious program which requires real world investment away.
Also i strongly belive that cross platform GUI toolkits are a thing from the past. Abstract the GUI of your app and develop for every platform. With the success of the AppStores you will be forced more and more to use the native platform style. Your app will already be rejected by Apples AppStore if it looks to different. Windows is now enforcing WinRT. Be prepared that this will just be more important in the future.
So the way to go is WxWidgets which uses native widget sets. Skip GTK
2018-12-18 Update:
GTK+ 3 on Windows has been supported through MSYS2 for years.
Old answer:
GTK for Windows is currently provided "as-is". What it means, basically, is that there are no GTK maintainer that use Windows, and those using Linux have enough work maintaining the Linux builds.
This means that any contribution for GTK 3 on Windows is welcome, some people are using it, but that's not ready for the masses because nobody steps up to do the work, which won't be done by magic overnight. So it's usable, but don't expect reactive maintenance.
As for the build, there's a french dude providing an (unofficial) GTK 3 installer for Windows.
As of right now, no.
Like Frédéric Hamidi said, see Where can I download precompiled GTK+ 3 binaries or windows installer? for more info.
GTK on Mac has worked well for a long time and continues to work into the 3.x series:
https://live.gnome.org/GTK%2B/OSX/Building
You can also install GTK 3.x using MacPorts, but I don't know how well that works.

iPad/iPhone app developement in C++ on Windows OS

What is the fastest way to port an finished game project written in C++ to iPad. Is there any good way to do it without buying a Mac?
Marmalade (formerly Airplay SDK) is a cross-platform SDK that is well-suited to games. You can write your code in Visual C++ and run it in Windows in a simulator. Using a PC, you will not be able to debug (stepping, breakpoints, etc) your game while running on an iPhone. Deploying to an iPhone for testing (from Windows) seems rather tedious, compared to how it's done with XCode.
If you need to use iOS native API features that are not supported in Marmalade, you can build wrappers to them with the EDK (Extension Development Kit), but you'll need a Mac with XCode to build the wrapper library once.
If you decide to get a Mac for development, the cheapest route is probably a Mac Mini and a KVM switch that will let you use your existing keyboard, monitor, and mouse. It's cheaper to upgrade the Mac Mini's memory yourself than to buy a Mac Mini with more memory pre-installed. You can order Mac memory upgrades from online computer retailers cheaper than from the Apple store.
See also:
Marmalade Mobile App Development - Is Marmalade a Good Choice?
Is Marmalade SDK more relevant or commonly used for Game Development?
Native Android/iOS development vs Marmalade SDK
ADDENDUM
I forgot to mention that iOS already has native support for OpenGL ES, and that XCode can compile C++ code. It's also possible to mix Objective-C with C++. So you can keep your C++ engine more or less intact, and write wrappers around iOS-specific facilities, such as detecting user touches.
I don't think you can. I do believe you have to have a mac! If you don't want to buy one, I suggest to just borrow it from a friend!

Qt Quick how to create a button that will loock native to each OS app is used in?

What I need is simple: qml way to create a button that would loock native on each platform app is compiled to? (mainly I wonder about linux, windows and Mac OS X)
There's nothing built-in.
But there is a project called Qt Quick Components, mainly for mobile platforms. There is also some development for desktop platforms, see http://labs.qt.nokia.com/2011/03/10/qml-components-for-desktop/
There may not have been anything built-in when you asked this question, but QtQuick.Controls 1.0 was officially released as a part of Qt 5.1. It has a Button component that should tries to match the native look and feel.
The QtQuick.Controls module is basically the Qt Desktop Components project that blakharaz linked to in his answer. It just has a new name, is more developed and is better integrated now.

How can i make a tray icon in Linux using C++?

In Windows, I can use Shell_NotifyIcon(). What is the Linux equivalent of this function?
Is it different in GNOME (gtk) and KDE (qt)? Can't find any tutorials on the Internet.
Yes, it depends on a desktop environment you're using.
In Qt (KDE), you can do this in a cross-platform manner using QSystemTrayIcon.
There is even a sample application in Qt.
In GTK, you do this with GtkStatusIcon. There is a sample application in this blog post.
All major desktop support the current XEmbed based systray icon specification. Qt and GTK both provide facilities to use that protocol in comfortable manner. Regardless of your toolkit choice the icons will appear on all desktop environments. If you use Qt you get even compatability with other platforms like Windows for free.
For Gnome, there's this tutorial and the gtkmm toolkit for C++
EDIT: This is for panel applets, you asked for system tray icons. They're similar, but not quite the same. Go with Reed's answer.