Tizen Native API
4.0
|
Alignment is a container which provides an easy way to align other actors inside its boundary. More...
Classes | |
struct | Padding |
Structure describing the padding values. More... | |
Public Types | |
enum | Type |
Enumeration for different types of alignment. More... | |
enum | Scaling |
Scaling determines how actors are scaled to match the alignment's boundary. More... | |
Public Member Functions | |
Alignment () | |
Creates an Alignment handle; this can be initialized with Alignment::New(). | |
Alignment (const Alignment &alignment) | |
Copy constructor. Creates another handle that points to the same real object. | |
~Alignment () | |
Destructor. | |
void | SetAlignmentType (Type type) |
Sets the new alignment. By default, ( HorizontalCenter | VerticalCenter ). | |
Type | GetAlignmentType () const |
Gets the current alignment combined into a single value. | |
void | SetScaling (Scaling scaling) |
Sets how added actors scale to fit the alignment's boundary. | |
Scaling | GetScaling () const |
Retrieves the scaling property. | |
void | SetPadding (const Padding &padding) |
Sets a padding value. | |
const Padding & | GetPadding () const |
Gets the padding values. | |
Alignment & | operator= (const Alignment &alignment) |
Assignment operator. | |
Static Public Member Functions | |
static Alignment | New (Type horizontal=HorizontalCenter, Type vertical=VerticalCenter) |
Creates an alignment control. | |
static Alignment | DownCast (BaseHandle handle) |
Downcasts a handle to Alignment handle. |
Alignment is a container which provides an easy way to align other actors inside its boundary.
Additionally, it provides a scaling property to resize the contained actors
All actors added to an alignment are going to be set with the same anchor point and parent origin. And if the scaling property is set to a value different than ScaleNone, constraints as well.
Scaling determines how actors are scaled to match the alignment's boundary.
Enumeration for different types of alignment.
Creates an Alignment handle; this can be initialized with Alignment::New().
Calling member functions with an uninitialized handle is not allowed.
Dali::Toolkit::Alignment::Alignment | ( | const Alignment & | alignment | ) |
Copy constructor. Creates another handle that points to the same real object.
[in] | alignment | Object to copy |
Destructor.
This is non-virtual since derived Handle types must not contain data or virtual methods.
static Alignment Dali::Toolkit::Alignment::DownCast | ( | BaseHandle | handle | ) | [static] |
Downcasts a handle to Alignment handle.
If handle points to an Alignment, the downcast produces valid handle. If not, the returned handle is left uninitialized.
[in] | handle | Handle to an object |
Reimplemented from Dali::Toolkit::Control.
Gets the current alignment combined into a single value.
The values can be tested by using the & operator and the desired flag. e.g.
if (GetAlignmentType() & HorizontalCentre) { ... }
const Padding& Dali::Toolkit::Alignment::GetPadding | ( | ) | const |
Gets the padding values.
Scaling Dali::Toolkit::Alignment::GetScaling | ( | ) | const |
static Alignment Dali::Toolkit::Alignment::New | ( | Type | horizontal = HorizontalCenter , |
Type | vertical = VerticalCenter |
||
) | [static] |
Creates an alignment control.
[in] | horizontal | Specifies how to align actors horizontally. Could be HorizontalLeft, HorizontalCenter or HorizontalRight. By default, HorizontalCenter |
[in] | vertical | Specifies how to align actors vertically. Could be VerticalTop, VerticalCenter or VerticalBottom. By default, VerticalCenter |
Assignment operator.
Changes this handle to point to another real object.
[in] | alignment | Object to copy |
void Dali::Toolkit::Alignment::SetAlignmentType | ( | Type | type | ) |
Sets the new alignment. By default, ( HorizontalCenter | VerticalCenter ).
[in] | type | The new alignment option |
void Dali::Toolkit::Alignment::SetPadding | ( | const Padding & | padding | ) |
Sets a padding value.
[in] | padding | The left, right, top, bottom padding values |
void Dali::Toolkit::Alignment::SetScaling | ( | Scaling | scaling | ) |
Sets how added actors scale to fit the alignment's boundary.
[in] | scaling | The scaling property |