简体   繁体   English

图形用户界面 C 语言教程

[英]Graphical user interface Tutorial in C

I have a project in C language and the teacher ordered to make a Gui of project.我有一个C语言的项目,老师命令做一个项目的gui。 I can only use C or C++ for the GUI part.我只能将 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谢谢

The two most usual choices are GTK+ , which has documentation links here , and is mostly used with C;这两个最常见的选择是GTK + ,它具有文档链接在这里,并且大多与C中使用; or Qt which has documentation here and is more used with C++.Qt有文档here并且更多地与C++一起使用。

I posted these two as you do not specify an operating system and these two are pretty cross-platform.我发布了这两个,因为您没有指定操作系统,而且这两个是非常跨平台的。

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.事实证明这些对我很有用。

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(发音为“fulltick”)是适用于 UNIX®/Linux® (X11)、Microsoft® Windows® 和 MacOS® X 的跨平台 C++ GUI 工具包。FLTK 提供现代 GUI 功能而不会膨胀,并通过 OpenGL® 支持 3D 图形及其内置的 GLUT 模拟。

FLTK is designed to be small and modular enough to be statically linked, but works fine as a shared library. FLTK 被设计为足够小且模块化以进行静态链接,但作为共享库工作正常。 FLTK also includes an excellent UI builder called FLUID that can be used to create applications in minutes. FLTK 还包括一个名为 FLUID 的优秀 UI 构建器,可用于在几分钟内创建应用程序。

Here are some quickstart screencasts以下是一些快速入门截屏视频

[Happy New Year!] 【新年快乐!】

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM