- 1 Forms and the SDK
- 1.1 ILxFormEntryDest
- 1.2 ILxFormEntryDropPreview
- 1.3 ILxFormDeleteEntryDest
Forms and the SDK
Generaly speaking, forms is not accessible through the SDK. You should never create new controls in a form procedurally using the attr.??? commands, and the form hierarchy cannot be read -- it is intended to be a black box defined exclusively through configs. The only way to procedurally create controsl is via a Form Command List, which is described in the command system documentation.
We do present some interfaces for drag and drop of controls into forms. These are primarily used internally, and are likely of little use to the third parties.
Dropping into a Form View exposes an ILxFormEntryDest object describing what is under the mouse.
(1) SDK: LXu_FORMENTRYDEST, etc. defines
The hash of form containing the control that was dropped on is returned by this method. It is important to note that in some cases this may be NULL.
(2) SDK: FormEntryDest::FormHash
This returns the hash of the control under the mouse, or the closest one that can be reasonably dropped on. For example, if the control is synthetic, then the drop location will be between the the control that defined the Form Command List and the one following it.
Note that since some controls can be represented by forms (popover forms, popup forms, etc), the control hash may be a form hash.
(3) SDK: FormEntryDest::ControlHash
This returns the position of the drop within the control as a combination of the following defines.
(4) SDK: LXmFORMDROPPOS_EDGE, etc. defines
#define LXmFORMDROPPOS_EDGE 0x0000000F #define LXmFORMDROPPOS_ON 0x000000F0 #define LXfFORMDROPPOS_NONE 0 // The edges themselves #define LXfFORMDROPPOS_ON 0x00000001 #define LXfFORMDROPPOS_LEFT 0x00000002 #define LXfFORMDROPPOS_RIGHT 0x00000003 #define LXfFORMDROPPOS_TOP 0x00000004 #define LXfFORMDROPPOS_BOTTOM 0x00000005 // These are only used if the edge is LXfFORMDROPPOS_ON #define LXfFORMDROPPOS_ON_ANY 0x00000000 #define LXfFORMDROPPOS_ON_LABEL 0x00000010 #define LXfFORMDROPPOS_ON_HOT 0x00000020 #define LXxFORMDROPPOS_EDGE(x) (LXmFORMDROPPOS_EDGE & (x)) #define LXxFORMDROPPOS_ON(x) (LXmFORMDROPPOS_ON & (x))
(5) SDK: FormEntryDest::Position
The preview interface allows the drop point to be marked within the pane.
(6) SDK: LXu_FORMENTRYDROPPREVIEW, etc. defines
This sets the hash of the control (which may be a form, for controls that are built from forms) that the marker should be associated with, as well as the position relative to the control itself. The EXTENT defines can be combined with the position flag to span the entire pane instead of just the bounds of the control.
(7) SDK: LXmFORMDROPPOS_EXTENT, etc. defines
(8) SDK: FormEntryDropPreview::MarkControl
This very simple interface exists simply to indicate that the drop is in a place that can support deleting form entries.
(9) SDK: LXu_FORMDELETEENTRYDEST, etc. defines
We don't really need a method, but the interface requires it, so we provide a way to delete an entry (control or sheet) given its hash.