The concept of a window in Screen differs slightly from traditional windowing systems. In Screen, applications are split into several windows when content comes from different sources, when one or more parts of the application must be updated independently from others, or when the application tries to target multiple displays. For example, a user interface that was developed using Cascades can be overlaid on top of a native document viewer, or a plug-in can be embedded within a web view or document. Cascades components can be used to form user interface controls for navigation or media playback. These controls can be contained in a window that is overlaid on top of a map or multimedia. In this example, the background window must be updated independently from the foreground user interface controls.

You can create window groups in order to organize, display, and control the windows in your application. A window group consists of a parent window and one or more child windows. A parent window creates and manages one or more child windows.

To create a group, call screen_create_window_group(), passing the parent window and NULL for the name of the group, which instructs the function to generate a unique name for the window group. The name of the window group is then communicated to the other functions, threads, or even processes, that are responsible for creating child windows. Any child window can join this group as long as it has the associated group name, which can be retrieved by calling screen_get_window_property_cv(). The parent window is notified each time a child window joins the group. A window handle is included in the notification to allow the parent window to control certain properties of a child window such as visibility, position, size, and z-order. A parent window cannot access any of the child windows’ buffers. A child window remains invisible until it is added to a window group and is made visible by the owner of the group.

Last modified: 2015-03-31

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus