Tizen Native API
|
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 |
Different types of alignment. More... | |
enum | Scaling |
Scaling determines how actors are scaled, to match the alignment's boundary. More... | |
Public Member Functions | |
Alignment () | |
Create an Alignment handle; this can be initialised 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 |
Get 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) |
Set a padding value. | |
const Padding & | GetPadding () const |
Get 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) |
Downcast a handle to Alignment handle. |
Detailed Description
Alignment is a container which provides an easy way to align other actors inside its boundary.
Additionaly it provides a scaling property to resize the contained actors
- See also:
- Scaling.
- Since :
- 2.4
- Note:
- The use of scaling property will override all constraints applied to 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.
Member Enumeration Documentation
Scaling determines how actors are scaled, to match the alignment's boundary.
- Since :
- 2.4
- Enumerator:
Different types of alignment.
- Since :
- 2.4
- Enumerator:
Constructor & Destructor Documentation
Create an Alignment handle; this can be initialised with Alignment::New().
Calling member functions with an uninitialised handle is not allowed.
- Since :
- 2.4
Dali::Toolkit::Alignment::Alignment | ( | const Alignment & | alignment | ) |
Copy constructor. Creates another handle that points to the same real object.
- Since :
- 2.4
- Parameters:
-
[in] alignment Object to copy
Destructor.
This is non-virtual since derived Handle types must not contain data or virtual methods.
- Since :
- 2.4
Member Function Documentation
static Alignment Dali::Toolkit::Alignment::DownCast | ( | BaseHandle | handle | ) | [static] |
Downcast a handle to Alignment handle.
If handle points to a Alignment the downcast produces valid handle. If not the returned handle is left uninitialized.
- Since :
- 2.4
- Parameters:
-
[in] handle Handle to an object
- Returns:
- A handle to a Alignment or an uninitialized handle
Reimplemented from Dali::Toolkit::Control.
Get 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) { ... }
- Since :
- 2.4
- Returns:
- The alignment value
const Padding& Dali::Toolkit::Alignment::GetPadding | ( | ) | const |
Get the padding values.
- Since :
- 2.4
- Returns:
- The left, right, top, bottom 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.
- Since :
- 2.4
- Parameters:
-
[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.
- Returns:
- A handle to the Alignment control
Assignment operator.
Changes this handle to point to another real object.
- Since :
- 2.4
- Parameters:
-
[in] alignment Object to copy
- Returns:
- A reference to this
void Dali::Toolkit::Alignment::SetAlignmentType | ( | Type | type | ) |
Sets the new alignment. By default ( HorizontalCenter | VerticalCenter ).
- Since :
- 2.4
- Parameters:
-
[in] type The new alignment option
- Note:
- There should only be one horizontal and one vertical policy.
void Dali::Toolkit::Alignment::SetPadding | ( | const Padding & | padding | ) |
Set a padding value.
- Since :
- 2.4
- Parameters:
-
[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.
- Since :
- 2.4
- Parameters:
-
[in] scaling The scaling property
- See also:
- Scaling.