![]() ![]() |
![]() |
||||
![]() |
![]() |
||||
Home News Download Goals & Approach Documentation FAQ Screenshots Adie PathFinder FOX Calculator Projects FXPy FXRuby EiffelFox The FOX Hole Japanese Docs ![]() |
![]() Documentation: The Window Class
The FXWindow Class The FXWindow class manages a window on the screen. FXWindow is the base class of all FOX GUI widgets such as buttons and sliders, in other words, all widgets are ultimately derived from FXWindow. All windows are organized into a so called widget tree; at the root of this widget tree is the root window which is a special window which represents the entire screen. Top level or shell windows are children of the root window; they're special because top level windows, such as the main window and dialog box, are positioned and resized directly by the user. Layout manager windows are composite windows which may have zero or more children, possibly including other layout managers. Layout managers position their child-windows according to certain layout patterns and layout flags. Child windows or simple windows are windows which do not themselves have any children. Child windows are usually simple controls such as buttons and sliders.
Navigating The Widget Tree As each window is positioned somewhere in the widget tree, each window maintains some information about where in the tree it is; this information can be obtained with the following API's: FXWindow::getParent()
Querying Widget Tree Information There are a number of common questions about the various possible relationships between windows in the widget tree. While it is possible to answer them with the API's above, it is cumbersome and so a number of API's are available to make this more easy: FXWindow::isChildOf(window)
Primary,Clipboard, Drag and Drop Selections Many widgets display some data. For example, a text widget can display some text. When the user highlights a range of text, a primary selection is in effect. This primary selection can be obtained by other widgets, or even by other programs. For instance a selection of some text may be pasted into a terminal by means of the middle mouse button under X-Windows (under MS-Windows, the primary selection only works within the same FOX program). When a selection is copied or cut to the clipboard, a clipboard-selection is in effect. Usually, a clipboard selection is made by Ctrl-C for copy, or a Ctrl-X for cut. Again, other widgets or other programs can obtain this data from the clipboard. For instance, an application can obtain the clipboard selection by a paste operation, typically invoked by means of Ctrl-V.
Finally, when a drag operation is started from this widget, a
drag-and-drop selection is in effect.
The following API's pertain to the selections: FXWindow::hasSelection() |
||||
![]() |
![]() |
||||
![]() |
![]() |