Class XbpPartHandler() Foundation

Class function of the XbpPartHandler class.


The XbpPartHandler class is an abstract class that provides the mechanism used by subclass objects to recognize and react to events. XbpPartHandler is the superclass for all Xbase Parts used to program graphic dialogs. All of the Xbase Parts that can process messages or events are derived from the XbpPartHandler class (for example, XbpPushButton() and XbpDialog()).

In addition to event handling, the XbpPartHandler class defines physical and logical relationships between Xbase Parts. This includes the relationships between the parent, owner, and children of each Xbase Part. For example, if a pushbutton is displayed in a dialog window, the pushbutton is considered within the dialog and is therefore a child of the dialog. Similarly, the dialog is the parent of the pushbutton. Parent-child relationships describe a physical relationship: a child is contained in the parent. A parent can have several children (1:n relationship), but a child can have only one parent (1:1 relationship).

Owner relationships are logical relationships. They are generally defined only for applications with a main window and several associated windows that are not contained in the main window. However, these associated windows are closed when the main window is closed, since this indicates that the application has terminated. The main window is the owner of the associated windows.

Since the XbpPartHandler class is an abstract class, instances of it are not created. It is only used as a superclass for defining other classes whose instances are able to process events through inherited behavior.

Instance variables
Instance variable for ad-hoc use.
Life cycle
Initializes an instance of the XbpPartHandler class.
Requests system resources.
Reconfigures the object after system resources have been allocated.
Releases system resources.
Processes events.
Determines the status of an Xbase Part object.
Windows Controls / Xbase Parts
Defines an Xbase Part as a child.
Returns an Xbase Part from the child list based on a numeric ID.
Returns the child list of the Xbase Part.
Deletes an Xbase Part from the child list.
Defines or retrieves a numeric ID associated with self.
Sets or returns the owner of the Xbase Part.
Sets or returns the parent of the Xbase Part.
Create subclass of XbpPartHandler

// The example shows the class declaration 
// and methods in the life cycle of a class 
// inherited from XbpPartHandler. 

CLASS xyz FROM XbpPartHandler 
   METHOD init, create, configure, destroy 
   VAR    iVarA, iVarB 

METHOD xyz:init( oParent, oOwner, varA, varB ) 
   ::XbpPartHandler:init( oParent, oOwner ) 
   ::iVarA := varA 
   ::iVarB := varB 
RETURN self 

METHOD xyz:create() 
RETURN self 

METHOD xyz:configure( oParent, oOwner, varA, varB ) 
   ::XbpPartHandler:configure( oParent, oOwner ) 
   ::iVarA := varA 
   ::iVarB := varB 
RETURN self 

METHOD xyz:destroy() 
   ::iVarA := NIL 
   ::iVarB := NIL 
RETURN self 

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.