Nautilus 文件浏览器和 GtkIconView

发布于 2024-09-11 22:38:17 字数 207 浏览 1 评论 0原文

为了学习 GTK 编程,我正在构建一个简单的 GTK 应用程序,该应用程序读取目录中的文件并将它们显示为图标。我正在尝试构建类似 Nautilus 图标视图文件资源管理器的东西。我知道右窗格使用 GTK IconView,但左窗格用什么来显示地点列表? 我还查看了 Nautilus 源代码,但发现它对我来说非常复杂,有人能给我一个在 C++ 中使用 GTK IconView 的简单示例吗? 谢谢。

In order to learn GTK programming, I am building a simple GTK application that reads files in a directory and displays them as icons. I am trying to build something like the Nautilus icon view file explorer. I know the right pane uses GTK IconView but what does the left pane use to display list of places?
Also I have looked at the Nautilus source code but find it pretty complex for me, can anybody give me a simple example of using GTK IconView in C++?
thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

老旧海报 2024-09-18 22:38:17

我猜测左侧窗格使用以下内容:

  • 位置 - gtk.TreeView
  • 信息 - 由 gtk.Image 和 gtk.Label 小部件组成的自定义布局
  • 树 - gtk.TreeView
  • 历史记录 - gtk.TreeView
  • 注释 - gtk.TextView
  • 标志 - gtk .Layout with gtk.Image widgets located on it

至于 Nautilus 窗口,我听说当以图标视图和紧凑视图模式显示时,它使用自定义表面,因为 gtk.IconView 被认为不够好。列表视图模式很可能使用 gtk.TreeView。

I'm guessing that the left pane uses the following:

  • Places - gtk.TreeView
  • Information - Custom layout made up of gtk.Image and gtk.Label widgets
  • Tree - gtk.TreeView
  • History - gtk.TreeView
  • Notes - gtk.TextView
  • Emblems - gtk.Layout with gtk.Image widgets positioned on it

As for the Nautilus window, I've heard that when showing in Icon View and Compact View modes, it uses a custom surface as the gtk.IconView was not deemed good enough. The List View mode most likely uses a gtk.TreeView.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文