index.md 1.39 KB
Newer Older
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
1
2
---
---
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

## Getting Started with GTK

GTK is a [widget toolkit](https://en.wikipedia.org/wiki/Widget_toolkit).
Each user interface created by GTK consists of UI elements known as *widgets*.

The GTK programming interface is based on [Object
Orientation](https://en.wikipedia.org/wiki/Object-oriented_design); widgets
are organized in a *hierarchy* of classes—for instance, the window widget is
also a specialised container, called a "bin", that can hold at most one child
widget. A window will be able to use functions that pertain to the widget,
container, bin, and window classes.

Each user interface is built by adding buttons, text labels, input fields,
drop down menus, and other widgets to a window.

19
If you are creating complex user interfaces, it is recommended to describe
20
the structure of your window using the [GtkBuilder][builder] XML description
beep-boop's avatar
beep-boop committed
21
format, instead of assembling it manually.
22
23
24
25
26

GTK is [event-driven](https://en.wikipedia.org/wiki/Event-driven_programming).
The toolkit listens for events such as a pointer click on a button, or a
window resize, and notifies the widgets in your application.

27
Follow the ["Hello World"](https://www.gtk.org/docs/getting-started/hello-world/)
28
29
to learn how to write your first GTK application.

30
Use the [GTK API reference](https://docs.gtk.org/gtk4/) to
31
32
learn more about the functionality provided by GTK.

33
[builder]: https://docs.gtk.org/gtk4/class.Builder.html