constraints/constraint_template/orconstraint_template_layout.cxx
#include "orconstraint_template_layout.h"
#define ORCONSTRAINT__LAYOUT ORConstraint_Template_Layout
ORCONSTRAINT__CLASSSTR,
bool ORConstraint_Template_Layout::FBCreate()
{
mConstraint = (ORConstraint_Template*) (FBConstraint*) Constraint;
UICreate ();
UIConfigure ();
UIReset ();
return true;
}
void ORConstraint_Template_Layout::FBDestroy()
{
}
void ORConstraint_Template_Layout::UICreate()
{
int lS = 4;
int lH = 18;
int lW = 150;
AddRegion( "LabelDirections", "LabelDirections",
AddRegion(
"ButtonTest",
"ButtonTest", lS,
kFBAttachLeft,
"", 1.0,
SetControl( "LabelDirections", mLabelDirections );
SetControl( "ButtonTest", mButtonTest );
}
void ORConstraint_Template_Layout::UIReset()
{
}
void ORConstraint_Template_Layout::UIConfigure()
{
mLabelDirections.Caption = "This is a sample constraint with no references. Due to the fact\n"
"that there are no references in the constraint only the custom\n"
"user interface layout is created. Below is a button demonstrating\n"
"a simple use of the toolkit and UI callbacks.\n";
mButtonTest.Caption = "Test";
mButtonTest.OnClick.Add(
this, (
FBCallback) &ORConstraint_Template_Layout::EventButtonTestClick );
}
void ORConstraint_Template_Layout::EventButtonTestClick(
HISender pSender,
HKEvent pEvent )
{
}