Support for system-style menus?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Support for system-style menus?

joymaker
I use SDL2, and I would like to put menus in the menubar. The way the system likes to do it: top of the screen on the Mac, top of the window on Windows, etc. Is there any facility in SDL2 to access these system-style menus? Or has anyone written an add-on to do so?

Thanks,
Ken

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|

Re: Support for system-style menus?

Alex Barry
I have heard of people embedding SDL inside Qt and windows apps, so I suspect you could use something like SDL_CreateWindowFrom.  I'm sure there is someone on here more information, but that gives you a clear path forward, I think.

On Thu, Jan 26, 2017 at 5:23 PM, joymaker <[hidden email]> wrote:
I use SDL2, and I would like to put menus in the menubar. The way the system likes to do it: top of the screen on the Mac, top of the window on Windows, etc. Is there any facility in SDL2 to access these system-style menus? Or has anyone written an add-on to do so?

Thanks,
Ken

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|

Re: Support for system-style menus?

Daniel Gibson
In reply to this post by joymaker
I don't think a small crossplatform solution that just provides a
menubar exists.
You could use GTK or Qt or WxWidgets, but that seems like a huge
dependency for such a simple thing.

FWIW, https://forums.libsdl.org/viewtopic.php?t=7746 has some
information on how to do this on Windows
There probably is a standard way to do this on OSX, too.
For Linux (or Unices using X11 in general) it#s harder, because there
menubars are provided by Qt, GTK or whatever you're using.

Related: https://sourceforge.net/projects/tinyfiledialogs/ provides file
pickers and some other very basic stuff, no menubar though.

Similar: https://github.com/mlabbe/nativefiledialog - it /might/ be
possible to enhance this one to provide a menu bar (with tinyfiledialogs
that doesn't seem feasible as it seems to rely on calling tools like
Xdialog, Zenity etc which do not interact with your SDL window at all
and thus can't modify it to show a menubar).

Cheers,
Daniel

On 26.01.2017 23:23, joymaker wrote:
> I use SDL2, and I would like to put menus in the menubar. The way the
> system likes to do it: top of the screen on the Mac, top of the window
> on Windows, etc. Is there any facility in SDL2 to access these
> system-style menus? Or has anyone written an add-on to do so?
>
> Thanks,
> Ken
>

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org