Tizen Native API
6.5
|
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. |
Detailed Description
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
- See also:
- Scaling.
- Since:
- 3.0, DALi version 1.0.0
- 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:
- 3.0, DALi version 1.0.0
- Enumerator:
Enumeration for different types of alignment.
- Since:
- 3.0, DALi version 1.0.0
- Enumerator:
Constructor & Destructor Documentation
Creates an Alignment handle; this can be initialized with Alignment::New().
Calling member functions with an uninitialized handle is not allowed.
- Since:
- 3.0, DALi version 1.0.0
Dali::Toolkit::Alignment::Alignment | ( | const Alignment & | alignment | ) |
Copy constructor. Creates another handle that points to the same real object.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] alignment Object to copy
Destructor.
This is non-virtual since derived Handle types must not contain data or virtual methods.
- Since:
- 3.0, DALi version 1.0.0
Member Function Documentation
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.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] handle Handle to an object
- Returns:
- A handle to a Alignment or an uninitialized handle
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) { ... }
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- the alignment value
const Padding& Dali::Toolkit::Alignment::GetPadding | ( | ) | const |
Gets the padding values.
- Since:
- 3.0, DALi version 1.0.0
- 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:
- 3.0, DALi version 1.0.0
- 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:
- 3.0, DALi version 1.0.0
- 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:
- 3.0, DALi version 1.0.0
- 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 | ) |
Sets a padding value.
- Since:
- 3.0, DALi version 1.0.0
- 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:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] scaling The scaling property
- See also:
- Scaling.