I am writing a high performance system in portable modern c++. A lot of STL and Boost. I'd like to start building some front ends to this system. Ordinarily I would opt to use a non c++ solution to a UI, however this is meant to be a very high performance UI, meaning low latency to respond to messages, high volume of messages to sort and display, etc. I have written a lot of real-time UIs in .NET, they accomplish the job pretty well. However I really want this to be cross platform with no tricks (such as Mono) and have it just work. What are some of the best options to achieve this?
我在便携式现代c++编写高性能系统。大量的STL和Boost。我想开始建立这个系统的前端。通常我会选择使用一个非c++解决UI,然而这是一个非常高的性能UI,意味着低延迟响应信息,大量的信息并显示,等等。我写了大量的即时UI在。net,他们完成工作很好。然而,我真的希望这是一个没有技巧的跨平台(比如Mono),并且它只是工作。实现这一目标的最佳选择是什么?
EDIT:
编辑:
Let me throw in another one that I just remembered, JUCE. Free for non commercial use, and cross platform. Only problem is that the development is controlled by one person, but the source code is available.
我再讲一个我刚记起来的,JUCE。免费非商业用途,跨平台使用。唯一的问题是开发由一个人控制,但是源代码是可用的。
JUCE
11 个解决方案
#1
44
Althought i'm not sure what you mean by "Tricks", i can only give you these links. Whether it's "best" is for you to decide.
我不知道你说的“把戏”是什么意思,我只能给你这些链接。是否“最好”由你来决定。
- wxWidgets. Free for commercial use. Old, but compatible API design (no exceptions, no templates, no RTTI, no use of STL). It uses the native widgets.
- wxWidgets。免费商业用途。旧的,但是兼容的API设计(没有例外,没有模板,没有RTTI,没有STL的使用)。它使用本地小部件。
-
Qt. Modern Framework. Support for SQL, for embedded ECMA script. Includes a embedded Webbrowser. Widgets are CSS themable and can be put on transformable canvas. Amazing toolkit. It's also fast. Not free for commercial use, but free for Open-Source projects.
Qt。现代框架。支持SQL,用于嵌入式ECMA脚本。包括一个内嵌的浏览器。小部件是CSS的可主题,可以放在可转换的画布上。神奇的工具包。也快。不是免费的商业用途,而是免费的开源项目。
- Edit: as of 14. Jan 2009, Nokia announced to put Qt into the LGPL license, making Qt available for commercial usage - free of charge.
- 编辑:14。2009年1月,诺基亚宣布将Qt纳入LGPL许可,使Qt可用于商业用途——免费。
- GtkMM. C++ binding to the famous gtk+ toolkit used as the foundation of GNOME. Free for commercial (but can't link statically). Modern C++ API. GUI Toolkit only. Like Qt, it draws the widgets itself. This yields to somewhat poor look on Windows (Qt draws the widgets quite well). I haven't tested it, so i can't tell you the performance.
- GtkMM。c++绑定到著名的gtk+ toolkit作为GNOME的基础。免费为商业(但不能静态链接)。现代c++ API。GUI工具包。与Qt一样,它自己绘制窗口小部件。这使得Windows的外观有些糟糕(Qt很好地绘制了窗口小部件)。我还没有测试过它,所以我不能告诉你它的性能。
There are more. But i only know those reasonable well to tell you about them.
有更多的。但我只知道那些合理的事情,告诉你。
#2
20
Qt is by far the most complete, well supported, cross-platform C++ GUI framework in existence today.
Qt是目前为止最完整、最受支持、跨平台的c++ GUI框架。
#3
15
I have recently studied almost all the toolkits mentioned above. I'd say Qt is by far the most advisable toolkit to use. I say 'advisable' but not 'best' because really no toolkit is perfect, in general there are no 'perfect' solutions to cross-platform problems.
我最近研究了上面提到的几乎所有工具包。我认为到目前为止Qt是最合适的工具。我说“可取”,但不是“最佳”,因为实际上没有一个工具包是完美的,一般来说,对于跨平台问题,没有“完美”的解决方案。
Here are some of the pros and cons of Qt 4.5 (aka Qt 2009.01), available under LGPL starting from jan 2009
以下是Qt 4.5(又名Qt 2009.01)的一些优缺点,从2009年1月开始可以在LGPL下使用
advantages:
优点:
- supports a lot of platforms, the most significant ones (i assume) are Windows, Mac OS X and Linux.
- 支持很多平台,最重要的是Windows、Mac OS X和Linux。
- looks native (sometime really using the native stuff under the hood) on Windows, Mac OS X and Linux. It works really nice on windows. Cocoa is supported on Mac OS X, which is a big deal. On Mac OS X, it is possible to make the interface look almost indistinguishable from native Cocoa applications.
- 在Windows、Mac OS X和Linux上看起来是原生的(有时真的是在使用原生的东西)。它在windows上运行得很好。Cocoa都支持Mac OS X,这很重要。在Mac OS X上,可以使界面看起来与本地Cocoa应用程序几乎没有区别。
- it comes with a really really good cross platform build system, which may save loads of time
- 它附带了一个非常好的跨平台构建系统,可以节省大量的时间
- it is a full suite, like some say, an application framework, not just a GUI framework. e.g. database and network. it even gives you a webkit controls.
- 它是一个完整的套件,就像有些人说的,一个应用程序框架,而不仅仅是一个GUI框架。例如,数据库和网络。它甚至给你一个webkit控件。
- great great documentation. one of the best sets of documentation you can find on GUI frameworks. it's even better than MSDN and apple development references.
- 伟大的伟大的文档。您可以在GUI框架上找到的最佳文档集之一。它甚至比MSDN和苹果的开发参考要更好。
- all the other common cross platform stuff
- 所有其他常见的跨平台的东西
disadvantages:
缺点:
- it's big. setup is not so trivia. learning take a bit of time. occupies a lot of disk space.
- 它是大的。设置不是那么简单。学习需要一点时间。占用大量磁盘空间。
#4
8
I believe Ultimate++ (you can easily do a search on Google based on the name Ultimate++) is very good. It takes advantage of C++ templates heavily, but the problem is it only runs on and produces executables for Windows and Linux and not Mac OS. It has its on IDE and its IDE is written using Ultimate++ itself (chicken and egg problem). The advantage of using U++ over .NET and Mono is the resulting apps have smaller footprint as no framework is required to be installed in order for the apps to run.
我相信终极++(你可以很容易地在谷歌上进行搜索,基于终极++)非常好。它充分利用了c++模板,但问题是它只运行在Windows和Linux上并生成可执行文件,而不是Mac OS。它有自己的IDE,它的IDE是用终极+本身(鸡肉和鸡蛋问题)编写的。与. net和Mono相比,使用U++的好处在于,应用程序占用的空间更小,因为应用程序运行不需要安装任何框架。
#5
7
You'll find many cross-platform GUI libraries for C++, but AFAIK Qt is the only real choice.
您会发现许多用于c++的跨平台GUI库,但是AFAIK Qt是惟一的选择。
#6
5
I have always really liked wxWidgets.
我一直都很喜欢wxWidgets。
Regarding the response on installing it on windows, there are a couple great videos on it at... http://blip.tv/file/1068698 and here http://wxwidgets.info/video
关于在windows上安装它的响应,在…http://blip。电视/文件/ 1068698和http://wxwidgets.info/video
#7
4
A list of C++ GUI toolkits can be found in an old blog post I wrote. About half of them are cross platform (across the 'big three'). Alas a few of them have largely been abandoned.
在我写的一篇旧博文中可以找到c++ GUI工具包的列表。其中大约有一半是跨平台的(跨越“三巨头”)。遗憾的是,其中有一些已经基本被抛弃。
Unfortunately none of them come without compromise. IMO there is no obvious choice when it comes to C++ GUI libraries. Investigate thoroughly for your particular requirements.
不幸的是,他们中没有一个是不妥协的。在我看来,在使用c++ GUI库时没有明显的选择。彻底调查你的特殊要求。
If you don't have particularly exotic GUI needs any of wxWidgets, Qt, FLTK or Gtkmm will likely do the trick.
如果您没有任何特殊的GUI需要任何wxWidgets, Qt, FLTK或Gtkmm将很可能成功。
#8
3
One of the best looking open source applications I've seen is Songbird. It's an iTunes-like media player built on top of Modzilla's XULRunner framework.
我见过的最好看的开源应用之一是Songbird。它是一款类似itunes的媒体播放器,构建在Modzilla的XULRunner框架之上。
#9
3
I like wxwidgets in general, but I've mostly used it on Linux. I just recently tried installing on Windows XP with g++ and have had a b**** of a time installing it.
总的来说,我喜欢wxwidgets,但是我在Linux上使用过它。我最近尝试在Windows XP上安装了g++,并且在安装它的时候有一个b****。
Edit: To do a bit more detail, I'm having trouble getting it to build.
编辑:要做得更详细一些,我很难让它构建起来。
#10
3
You say you would not ordinarily write a UI in C++, but are concerned about performance in this case. I therefore Nth the recommendations of Qt, as it has bindings for other languages, e.g. PyQt. Your widgets will all be fast C++ Qt widgets, you can sort your messages with thinly-wrapped native Qt methods, and hold it all together with a bit of python/perl/whatever.
您说您通常不会在c++中编写UI,但是会关心在这种情况下的性能。因此,我不推荐Qt,因为它有其他语言的绑定,例如PyQt。您的小部件都将是快速的c++ Qt小部件,您可以使用简单包装的本机Qt方法对消息进行排序,并使用一些python/perl/随便什么方法将它们组合在一起。
#11
2
Let's not forget XVT it is available as a C++ Object Library and a C API. See www.XVT.com. It lost its way in the middle 90's but is still kept up-to-date and sold. It uses the native widgets where possible rather than emulation. When it was popular it was bought by 19000+ companies to ship software alot of it commerically and has huge depth to its implementation.
不要忘记XVT,它是一个c++对象库和一个C API。见www.XVT.com。它在90年代中期迷失了方向,但仍保持最新和销售。它使用本地小部件,而不是模拟。当它流行的时候,有19000多家公司购买了它以商业的方式发布大量的软件,并且它的实现具有巨大的深度。
and no I don't work for them!
不,我不为他们工作!
Tony
托尼
#1
44
Althought i'm not sure what you mean by "Tricks", i can only give you these links. Whether it's "best" is for you to decide.
我不知道你说的“把戏”是什么意思,我只能给你这些链接。是否“最好”由你来决定。
- wxWidgets. Free for commercial use. Old, but compatible API design (no exceptions, no templates, no RTTI, no use of STL). It uses the native widgets.
- wxWidgets。免费商业用途。旧的,但是兼容的API设计(没有例外,没有模板,没有RTTI,没有STL的使用)。它使用本地小部件。
-
Qt. Modern Framework. Support for SQL, for embedded ECMA script. Includes a embedded Webbrowser. Widgets are CSS themable and can be put on transformable canvas. Amazing toolkit. It's also fast. Not free for commercial use, but free for Open-Source projects.
Qt。现代框架。支持SQL,用于嵌入式ECMA脚本。包括一个内嵌的浏览器。小部件是CSS的可主题,可以放在可转换的画布上。神奇的工具包。也快。不是免费的商业用途,而是免费的开源项目。
- Edit: as of 14. Jan 2009, Nokia announced to put Qt into the LGPL license, making Qt available for commercial usage - free of charge.
- 编辑:14。2009年1月,诺基亚宣布将Qt纳入LGPL许可,使Qt可用于商业用途——免费。
- GtkMM. C++ binding to the famous gtk+ toolkit used as the foundation of GNOME. Free for commercial (but can't link statically). Modern C++ API. GUI Toolkit only. Like Qt, it draws the widgets itself. This yields to somewhat poor look on Windows (Qt draws the widgets quite well). I haven't tested it, so i can't tell you the performance.
- GtkMM。c++绑定到著名的gtk+ toolkit作为GNOME的基础。免费为商业(但不能静态链接)。现代c++ API。GUI工具包。与Qt一样,它自己绘制窗口小部件。这使得Windows的外观有些糟糕(Qt很好地绘制了窗口小部件)。我还没有测试过它,所以我不能告诉你它的性能。
There are more. But i only know those reasonable well to tell you about them.
有更多的。但我只知道那些合理的事情,告诉你。
#2
20
Qt is by far the most complete, well supported, cross-platform C++ GUI framework in existence today.
Qt是目前为止最完整、最受支持、跨平台的c++ GUI框架。
#3
15
I have recently studied almost all the toolkits mentioned above. I'd say Qt is by far the most advisable toolkit to use. I say 'advisable' but not 'best' because really no toolkit is perfect, in general there are no 'perfect' solutions to cross-platform problems.
我最近研究了上面提到的几乎所有工具包。我认为到目前为止Qt是最合适的工具。我说“可取”,但不是“最佳”,因为实际上没有一个工具包是完美的,一般来说,对于跨平台问题,没有“完美”的解决方案。
Here are some of the pros and cons of Qt 4.5 (aka Qt 2009.01), available under LGPL starting from jan 2009
以下是Qt 4.5(又名Qt 2009.01)的一些优缺点,从2009年1月开始可以在LGPL下使用
advantages:
优点:
- supports a lot of platforms, the most significant ones (i assume) are Windows, Mac OS X and Linux.
- 支持很多平台,最重要的是Windows、Mac OS X和Linux。
- looks native (sometime really using the native stuff under the hood) on Windows, Mac OS X and Linux. It works really nice on windows. Cocoa is supported on Mac OS X, which is a big deal. On Mac OS X, it is possible to make the interface look almost indistinguishable from native Cocoa applications.
- 在Windows、Mac OS X和Linux上看起来是原生的(有时真的是在使用原生的东西)。它在windows上运行得很好。Cocoa都支持Mac OS X,这很重要。在Mac OS X上,可以使界面看起来与本地Cocoa应用程序几乎没有区别。
- it comes with a really really good cross platform build system, which may save loads of time
- 它附带了一个非常好的跨平台构建系统,可以节省大量的时间
- it is a full suite, like some say, an application framework, not just a GUI framework. e.g. database and network. it even gives you a webkit controls.
- 它是一个完整的套件,就像有些人说的,一个应用程序框架,而不仅仅是一个GUI框架。例如,数据库和网络。它甚至给你一个webkit控件。
- great great documentation. one of the best sets of documentation you can find on GUI frameworks. it's even better than MSDN and apple development references.
- 伟大的伟大的文档。您可以在GUI框架上找到的最佳文档集之一。它甚至比MSDN和苹果的开发参考要更好。
- all the other common cross platform stuff
- 所有其他常见的跨平台的东西
disadvantages:
缺点:
- it's big. setup is not so trivia. learning take a bit of time. occupies a lot of disk space.
- 它是大的。设置不是那么简单。学习需要一点时间。占用大量磁盘空间。
#4
8
I believe Ultimate++ (you can easily do a search on Google based on the name Ultimate++) is very good. It takes advantage of C++ templates heavily, but the problem is it only runs on and produces executables for Windows and Linux and not Mac OS. It has its on IDE and its IDE is written using Ultimate++ itself (chicken and egg problem). The advantage of using U++ over .NET and Mono is the resulting apps have smaller footprint as no framework is required to be installed in order for the apps to run.
我相信终极++(你可以很容易地在谷歌上进行搜索,基于终极++)非常好。它充分利用了c++模板,但问题是它只运行在Windows和Linux上并生成可执行文件,而不是Mac OS。它有自己的IDE,它的IDE是用终极+本身(鸡肉和鸡蛋问题)编写的。与. net和Mono相比,使用U++的好处在于,应用程序占用的空间更小,因为应用程序运行不需要安装任何框架。
#5
7
You'll find many cross-platform GUI libraries for C++, but AFAIK Qt is the only real choice.
您会发现许多用于c++的跨平台GUI库,但是AFAIK Qt是惟一的选择。
#6
5
I have always really liked wxWidgets.
我一直都很喜欢wxWidgets。
Regarding the response on installing it on windows, there are a couple great videos on it at... http://blip.tv/file/1068698 and here http://wxwidgets.info/video
关于在windows上安装它的响应,在…http://blip。电视/文件/ 1068698和http://wxwidgets.info/video
#7
4
A list of C++ GUI toolkits can be found in an old blog post I wrote. About half of them are cross platform (across the 'big three'). Alas a few of them have largely been abandoned.
在我写的一篇旧博文中可以找到c++ GUI工具包的列表。其中大约有一半是跨平台的(跨越“三巨头”)。遗憾的是,其中有一些已经基本被抛弃。
Unfortunately none of them come without compromise. IMO there is no obvious choice when it comes to C++ GUI libraries. Investigate thoroughly for your particular requirements.
不幸的是,他们中没有一个是不妥协的。在我看来,在使用c++ GUI库时没有明显的选择。彻底调查你的特殊要求。
If you don't have particularly exotic GUI needs any of wxWidgets, Qt, FLTK or Gtkmm will likely do the trick.
如果您没有任何特殊的GUI需要任何wxWidgets, Qt, FLTK或Gtkmm将很可能成功。
#8
3
One of the best looking open source applications I've seen is Songbird. It's an iTunes-like media player built on top of Modzilla's XULRunner framework.
我见过的最好看的开源应用之一是Songbird。它是一款类似itunes的媒体播放器,构建在Modzilla的XULRunner框架之上。
#9
3
I like wxwidgets in general, but I've mostly used it on Linux. I just recently tried installing on Windows XP with g++ and have had a b**** of a time installing it.
总的来说,我喜欢wxwidgets,但是我在Linux上使用过它。我最近尝试在Windows XP上安装了g++,并且在安装它的时候有一个b****。
Edit: To do a bit more detail, I'm having trouble getting it to build.
编辑:要做得更详细一些,我很难让它构建起来。
#10
3
You say you would not ordinarily write a UI in C++, but are concerned about performance in this case. I therefore Nth the recommendations of Qt, as it has bindings for other languages, e.g. PyQt. Your widgets will all be fast C++ Qt widgets, you can sort your messages with thinly-wrapped native Qt methods, and hold it all together with a bit of python/perl/whatever.
您说您通常不会在c++中编写UI,但是会关心在这种情况下的性能。因此,我不推荐Qt,因为它有其他语言的绑定,例如PyQt。您的小部件都将是快速的c++ Qt小部件,您可以使用简单包装的本机Qt方法对消息进行排序,并使用一些python/perl/随便什么方法将它们组合在一起。
#11
2
Let's not forget XVT it is available as a C++ Object Library and a C API. See www.XVT.com. It lost its way in the middle 90's but is still kept up-to-date and sold. It uses the native widgets where possible rather than emulation. When it was popular it was bought by 19000+ companies to ship software alot of it commerically and has huge depth to its implementation.
不要忘记XVT,它是一个c++对象库和一个C API。见www.XVT.com。它在90年代中期迷失了方向,但仍保持最新和销售。它使用本地小部件,而不是模拟。当它流行的时候,有19000多家公司购买了它以商业的方式发布大量的软件,并且它的实现具有巨大的深度。
and no I don't work for them!
不,我不为他们工作!
Tony
托尼