Esempio n. 1
0
		GWEN_CONTROL_INLINE( Checkbox, GUnit )
		{
			Gwen::Controls::CheckBox* check = new Gwen::Controls::CheckBox( this );
			check->SetPos( 10, 10 );
			check->onChecked.Add( this, &Checkbox::OnChecked );
			check->onUnChecked.Add( this, &Checkbox::OnUnchecked );
			check->onCheckChanged.Add( this, &Checkbox::OnCheckChanged );
			Gwen::Controls::CheckBoxWithLabel* labeled = new Gwen::Controls::CheckBoxWithLabel( this );
			labeled->SetPos( 10, 30 );
			labeled->Label()->SetText( "Labeled CheckBox" );
			labeled->Checkbox()->onChecked.Add( this, &Checkbox::OnChecked );
			labeled->Checkbox()->onUnChecked.Add( this, &Checkbox::OnUnchecked );
			labeled->Checkbox()->onCheckChanged.Add( this, &Checkbox::OnCheckChanged );
			{
				Gwen::Controls::CheckBox* check = new Gwen::Controls::CheckBox( this );
				check->SetPos( 10, 54 );
				check->SetDisabled( true );
			}
		}
Esempio n. 2
0
	GWEN_CONTROL_INLINE( Checkbox, GUnit )
	{
		Gwen::Controls::CheckBox* check = new Gwen::Controls::CheckBox( this );
		check->SetPos( 10, 10 );
		check->onChecked.Add( this, &Checkbox::OnChecked );
		check->onUnChecked.Add( this, &Checkbox::OnUnchecked );
		check->onCheckChanged.Add( this, &Checkbox::OnCheckChanged );


		Gwen::Controls::CheckBoxWithLabel* labeled = new Gwen::Controls::CheckBoxWithLabel( this );
		labeled->SetPos( 10, 10 );
		labeled->Label()->SetText( "Labeled CheckBox" );
		labeled->Checkbox()->onChecked.Add( this, &Checkbox::OnChecked );
		labeled->Checkbox()->onUnChecked.Add( this, &Checkbox::OnUnchecked );
		labeled->Checkbox()->onCheckChanged.Add( this, &Checkbox::OnCheckChanged );
		Gwen::Align::PlaceBelow( labeled, check, 10 );

	}