firstFit = InsertNode( mRoot->child[1], blockWidth, blockHeight );
}
- if( firstFit != NULL )
- {
- firstFit->occupied = true;
- packPositionX = firstFit->rectArea.x;
- packPositionY = firstFit->rectArea.y;
- }
+ DALI_ASSERT_ALWAYS( firstFit != NULL && "It should never happen!")
+
+ firstFit->occupied = true;
+ packPositionX = firstFit->rectArea.x;
+ packPositionY = firstFit->rectArea.y;
}
void AtlasPacker::GrowNode( SizeType blockWidth, SizeType blockHeight )
#define __DALI_TOOLKIT_CHECK_BOX_BUTTON_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* {
* CheckBoxButton button = CheckBoxButton::New();
* button.SetParentOrigin( ParentOrigin::CENTER );
- * button.SetLabelText( "Check" );
+ * button.SetProperty( Button::Property::LABEL, "Check" );
* button.SetSize( 200, 40 );
* button.SetBackgroundColor( Color::WHITE );
* Stage::GetCurrent().Add( button );
#define __DALI_TOOLKIT_PUSH_BUTTON_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* {
* PushButton button = PushButton::New();
* button.SetParentOrigin( ParentOrigin::CENTER );
- * button.SetLabelText( "Press" );
+ * button.SetProperty( Button::Property::LABEL, "Press" );
* Stage::GetCurrent().Add( button );
*
* // Connect to button signals emitted by the button
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
RadioButton RadioButton::New( const std::string& label )
{
RadioButton radioButton = Internal::RadioButton::New();
- radioButton.SetLabelText( label );
+ radioButton.SetProperty( Toolkit::Button::Property::LABEL, label );
return radioButton;
}
#define __DALI_TOOLKIT_RADIO_BUTTON_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Radio buttons are designed to select one of many option at the same time.
*
- * Every button have its own \e label and \e state, which can be modified by Button::SetLabelText and Button::SetSelected.
+ * Every button have its own \e label and \e state, which can be modified by Button::Property::LABEL and Button::Property::SELECTED.
*
* RadioButton can change its current state using Button::SetSelected.
*
*
* // Make the first RadioButton and add it to its parent
* RadioButton button1 = RadioButton::New();
- * button1.SetLabelText( "button1" );
+ * button1.SetProperty( Button::Property::LABEL, "button1" );
* button1.SetBackgroundColor( Color::WHITE );
* button1.SetPosition( 0, -40 );
* radioGroup.Add( button1 );
*
* // Make more RadioButtons and add them to their parent
* RadioButton button2 = RadioButton::New();
- * button2.SetLabelText( "button2" );
+ * button2.SetProperty( Toolkit::Button::Property::LABEL, "button2" );
* button2.SetBackgroundColor( Color::WHITE );
* button2.SetPosition( 0, 40 );
* radioGroup.Add( button2 );