These functions make form items and their associated constraints for passing to wxForm::Add.
wxFormItem *wxMakeFormButtonchar *label, wxFunction fun
Makes a button with a conventional callback.
wxFormItem *wxMakeFormMessagechar *label
Makes a message.
wxFormItem *wxMakeFormNewLine
Adds a newline.
wxFormItem *wxMakeFormLongchar *label, long *var,
int item_type = wxFORM_DEFAULT, wxList *constraints = NULL,
char *help_string = NULL, wxEditFunction editor = NULL, int width = -1,
int height = -1
Makes a long integer form item, given a label, a pointer to the variable holding the value, an item type, and a list of constraints (see below). help_string and editor are currently not used.
wxFormItem *wxMakeFormShortchar *label, int *var,
int item_type = wxFORM_DEFAULT, wxList *constraints = NULL,
char *help_string = NULL, wxEditFunction editor = NULL, int width = -1,
int height = -1
Makes an integer form item, given a label, a pointer to the variable holding the value, an item type, and a list of constraints (see below). help_string and editor are currently not used.
wxFormItem *wxMakeFormFloatchar *label, float *var,
int item_type = wxFORM_DEFAULT, wxList *constraints = NULL,
char *help_string = NULL, wxEditFunction editor = NULL,
int width = -1,
int height = -1
Makes a floating-point form item, given a label, a pointer to the variable holding the value, an item type, and a list of constraints (see below). help_string and editor are currently not used.
wxFormItem *wxMakeFormBoolchar *label, Bool *var,
int item_type = wxFORM_DEFAULT, wxList *constraints = NULL,
char *help_string = NULL, wxEditFunction editor = NULL, int width = -1,
int height = -1
Makes a boolean form item, given a label, a pointer to the variable holding the value, an item type, and a list of constraints (see below). help_string and editor are currently not used.
wxFormItem *wxMakeFormStringchar *label, char **var,
int item_type = wxFORM_DEFAULT, wxList *constraints = NULL,
char *help_string = NULL, wxEditFunction editor = NULL,
int width = -1,
int height = -1
Makes a string form item, given a label, a pointer to the variable holding the value, an item type, and a list of constraints (see below). help_string and editor are currently not used.
wxFormItemConstraint *wxMakeConstraintStringswxList *list
Makes a constraint specifying that the value must be one of the strings given in the list.
wxFormItemConstraint *wxMakeConstraintStringschar *first, ...
Makes a constraint specifying that the value must be one of the strings given in the variable-length argument list,terminated with a zero.
wxFormItemConstraint *wxMakeConstraintFunctionwxConstraintFunction func
Makes a constraint with a function that gets called when the value is being checked. The function should return FALSE if the constraint was violated, TRUE otherwise. The function should also write an appropriate message into the buffer passed to it if the constraint was violated. The type wxConstraintFunction is defined as follows:
typedef BoolwxConstraintFunctionint type, char *value, char *label, char *msg
type is the type of the item, for instance wxFORM_STRING. value is the address of the variable containing the value, and should be coerced to the correct type, except for wxFORM_STRING, where no coercion is required.
wxFormItemConstraint *wxMakeConstraintRangefloat lo, float hi
Makes a range constraint; can be used for integer and floating point form items.