C语言 图形用户界面 C 语言教程

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4572314/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-02 07:26:01  来源:igfitidea点击:

Graphical user interface Tutorial in C

cuser-interface

提问by devoidfeast

I have a project in C language and the teacher ordered to make a Gui of project. I can only use C or C++ for the GUI part.

我有一个C语言的项目,老师命令做一个项目的gui。我只能将 C 或 C++ 用于 GUI 部分。

Can anyone please suggest me Some easy open source Graphics Library Tutorial because this will be my first ever GUI.

任何人都可以给我推荐一些简单的开源图形库教程,因为这将是我的第一个 GUI。

thanks

谢谢

回答by houbysoft

The two most usual choices are GTK+, which has documentation links here, and is mostly used with C; or Qtwhich has documentation hereand is more used with C++.

这两个最常见的选择是GTK +,它具有文档链接在这里,并且大多与C中使用; 或Qt有文档here并且更多地与C++一起使用。

I posted these two as you do not specify an operating system and these two are pretty cross-platform.

我发布了这两个,因为您没有指定操作系统,而且这两个是非常跨平台的。

回答by devoidfeast

My favourite UI tutorials all come from zetcode.com:

我最喜欢的 UI 教程都来自 zetcode.com:

These are tutorials I'd consider to be "starting tutorials". The example tutorial gets you up and going, but doesn't show you anything too advanced or give much explanation. Still, often, I find the big problem is "how do I start?" and these have always proved useful to me.

这些是我认为是“入门教程”的教程。示例教程让您入门,但不会向您展示任何太高级的内容或给出太多解释。不过,我经常发现最大的问题是“我该如何开始?” 事实证明这些对我很有用。

回答by epatel

You can also have a look at FLTK(C++ and not plain C though)

你也可以看看FLTK(C++ 而不是普通的 C)

FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX?/Linux? (X11), Microsoft? Windows?, and MacOS? X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL? and its built-in GLUT emulation.

FLTK is designed to be small and modular enough to be statically linked, but works fine as a shared library. FLTK also includes an excellent UI builder called FLUID that can be used to create applications in minutes.

FLTK(发音为“fulltick”)是一个跨平台的 C++ GUI 工具包,适用于 UNIX?/Linux? (X11),微软?Windows?和MacOS?X. FLTK 提供现代 GUI 功能而不会膨胀并通过 OpenGL 支持 3D 图形?及其内置的 GLUT 模拟。

FLTK 被设计为足够小且模块化以进行静态链接,但作为共享库工作正常。FLTK 还包括一个名为 FLUID 的优秀 UI 构建器,可用于在几分钟内创建应用程序。

Here are some quickstart screencasts

以下是一些快速入门截屏视频

[Happy New Year!]

[新年快乐!]