Chapter 2. Entering through Windows
The main part of any GUI program is to create windows and define functionalities around it. We will start exploring the ways to create windows and customize it in this chapter, and we will move on to create a real-life windows application in the next chapter.
The widget is the center of the user interface. It receives the user inputs from the mouse, keyboard, and other events of the window system, and paints a representation of itself on the screen. Every widget is rectangular, and sorted in a Z-order. Z-order is an ordering of displayed overlapping windows. The window with a higher Z-order will appear on top of windows with lower Z-orders. A widget is clipped by its parent and by the widgets in front of it. A widget that does not have a parent is called a window and is always independent. Usually, windows have a frame and a title bar at the least, but it is possible to create them without these by setting some windows flags. This chapter explains...