如何使用GTK开发像Eclipse一样的界面? [英] How to develop interface like Eclipse using GTK?

查看:141
本文介绍了如何使用GTK开发像Eclipse一样的界面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用GTKMM编写一个桌面应用程序。我希望界面由不同的面板组成,例如Eclipse中的Project Explorer,Console,Properties等。您应该可以拖动面板来更改它们的位置,关闭它们并弹出它们(不确定是否可以弹出在Eclipse中的面板,但你可以在Visual Studio中完成)。



我在这里使用了字面板,因为我不确定正确的术语是什么。我想有人称之为停靠窗口。



这是如何能在gtkmm的实现任何指针?


解决方案

术语是停靠小工具和 GDL图书馆是最简单的方法。您可能在Anjuta和Inkscape等应用程序中看到过GDL。文档不是很好,但是,源代码包含一个示例应用程序,一旦你开始使用它,它并不难。

基本上,你添加你的小部件到 DockItem 和那些到 Dock 。你可以在你的应用程序的某个地方放置一个 DockBar ,这样停靠的项目可以最小化。您可以将码头布局保存并加载到XML文件中,以便用户不必在每次启动应用程序时重新安排码头项目。


I want a write a desktop application using GTKMM. I want the interface to be made of different panels like in Eclipse you have the Project Explorer, Console, Properties, etc. You should be able to drag the panels to change their position, close them and popout them (not sure if you can popout the panels in Eclipse but you can do it in Visual Studio).

I am using the word panels here as I am not sure what the right term is. I guess some call it dockable windows.

Any pointers on how this can be achieved in GTKMM?

解决方案

The term is "docking" widgets and the GDL Library is the easiest way to get started with that. You may have seen GDL in action in applications like Anjuta and Inkscape. The documentation isn't that great, but, the source code includes a sample app and once you get going with it it's not that hard.

Basically, you add your widgets to a DockItem and those to a Dock. You put a DockBar somewhere in your application to which the docked items can be minimized. You can save and load the dock "layout" to XML files so that the user doesn't have to re-arrange the dock items every time they start the application.

这篇关于如何使用GTK开发像Eclipse一样的界面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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