C ++ \ GLUT窗口菜单栏 [英] C++\GLUT window menu bar

查看:92
本文介绍了C ++ \ GLUT窗口菜单栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个简单的glut应用程序,我的老师希望我创建一个顶部菜单栏,就像在任何Windows应用程序中一样(您知道,文件\编辑等,在窗口顶部的标尺).

I am writing a simple glut Application, and my teacher wants me to create a top menu bar, as in any windows app(you know, file\edit etc, the ruler on the window's top).

我查看了过剩的文档并进行了谷歌搜索,我只能找到一个弹出菜单,该菜单用鼠标的右键打开-不是所定义的.

I looked in glut documentation and googled, all I can find is a popup menu that opens with mouse's right button - not what was defined.

推荐答案

GLUT库提供了诸如创建窗口,回调函数,计时器,鼠标​​事件和按键之类的服务.但是,您想使GLUT不提供内置功能的窗口菜单栏. GLUT对于游戏,模拟而不是GUI很有用.为此,您必须使用GUI库.这是GUI库的最佳列表

GLUT library provide service like creating window, callback functions, timer, mouse event and key press. But you want to make window menu bar for which GLUT does not provide the built in function. GLUT is useful for game , simulation not for GUI. For that you have to use the GUI library. Here are the best list of GUI library

  1. FLTK
  2. GTK
  3. QT
  1. FLTK
  2. GTK
  3. QT

在它们当中,我建议您使用QT,因为QT也是面向对象的,适用于C ++.借助 qt-creator ,您可以在一分钟内通过拖放操作制作GUI.

Among them I suggest you to use QT because QT is also object-oriented suitable with C++. With the help of qt-creator you can make GUI by drag and drop in a minute.

这篇关于C ++ \ GLUT窗口菜单栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆