Home |
Obtaining a Pointer to PegPresentationManager Status Flags Determining the Position of an Object |
Status FlagsAll RTPEG-32 objects have system status flags associated with them. The system status flags are important for the correct operation of the library, but are generally not often needed by the application software. PegThing provides public functions to examine and/or modify system status flags for an object. The system status flags have names that start with PSF_, which stands for PEG System Flag. The following code segment can be used to enquire which child of the current object has input focus: PegThing * pTest = First(); while (pTest) { if (pTest->StatusIs(PSF_CURRENT)) break; // this object has input focus pTest = pTest->Next(); } The following status flags are available: PSF_VISIBLEThe object is visible on the screen. This flag should not be modified by the application level software. Clearing or setting this flag will not have the effect of removing or displaying the object. The PegThing member functions Add and Remove are used for that purpose. PSF_CURRENTthe object is in the current branch of the display tree. If the object is a leaf object (i.e. it has no children) and it is current, then it is the object which will receive keyboard input messages. PSF_SELECTABLEThis flag is tested by PegPresentationManager to determine if an object is enabled and allowed to receive input messages. The application level software can modify this flag. PSF_SIZEABLEdetermines whether or not an object can be resized. The application can modify this flag. PSF_MOVEABLEdetermines whether or not an object can be moved. The application can modify this flag. PSF_NONCLIENTallows a child object to draw outside the client area of its parent. The application can modify this flag after the object is constructed but before the object is displayed. PSF_ACCEPTS_FOCUSindicates that the object will become the receiver of input events when selected. The application can modify this flag, but normally this is not advised. If this flag is modified for a particular object, it is important for correct operation that breaks in the tree of objects accepting focus are avoided. In other words, if a parent window cannot accept focus, then neither should any of the window's child objects be allowed to accept focus. PSF_ALWAYS_ON_TOPThis flag insures that the object is always on top of its siblings. The application level software can modify this flag. PSF_VIEWPORTinstructs PegPresentationManager that the object should be given a private screen viewport. Objects that have a viewport are drawn differently than objects that do not have a viewport. In general, large objects or objects which have a very complex drawing routine should be given viewports, while small or simple objects should not. By default all PegWindow derived objects receive viewports, and all other objects do not. This flag should not be changed except immediately after the object is constructed.
|