Tizen Native API
|
Control is the base class for all controls. More...
Classes | |
struct | KeyboardFocus |
Describes the direction to move the keyboard focus towards. More... | |
struct | Property |
An enumeration of properties belonging to the Control class. More... | |
Public Types | |
enum | PropertyRange |
The start and end property ranges for control. More... | |
typedef Signal< bool(Control, const KeyEvent &) > | KeyEventSignalType |
Key Event signal type;. | |
typedef Signal< void(Control) > | KeyInputFocusSignalType |
Key InputFocusType signal type;. | |
Public Member Functions | |
Control () | |
Create an uninitialized Control handle. | |
Control (const Control &uiControl) | |
Copy constructor. | |
~Control () | |
Dali::Control is intended as a base class. | |
Control & | operator= (const Control &handle) |
Assignment operator. | |
void | SetKeyInputFocus () |
This sets the control to receive key events. | |
bool | HasKeyInputFocus () |
Quries whether the control has key input focus. | |
void | ClearKeyInputFocus () |
Once an actor is Set to receive key input focus this function is called to stop it receiving key events. | |
PinchGestureDetector | GetPinchGestureDetector () const |
Retrieves the pinch gesture detector of the control. | |
PanGestureDetector | GetPanGestureDetector () const |
Retrieves the pan gesture detector of the control. | |
TapGestureDetector | GetTapGestureDetector () const |
Retrieves the tap gesture detector of the control. | |
LongPressGestureDetector | GetLongPressGestureDetector () const |
Retrieves the long press gesture detector of the control. | |
void | SetStyleName (const std::string &styleName) |
Sets the name of the style to be applied to the control. | |
const std::string & | GetStyleName () const |
Retrieves the name of the style to be applied to the control (if any). | |
void | SetBackgroundColor (const Vector4 &color) |
Sets the background color of the control. | |
Vector4 | GetBackgroundColor () const |
Retrieves the background color of the control. | |
void | SetBackgroundImage (Image image) |
Sets an image as the background of the control. | |
void | ClearBackground () |
Clears the background. | |
KeyEventSignalType & | KeyEventSignal () |
This signal is emitted when key event is received. | |
KeyInputFocusSignalType & | KeyInputFocusGainedSignal () |
This signal is emitted when the control gets Key Input Focus. | |
KeyInputFocusSignalType & | KeyInputFocusLostSignal () |
This signal is emitted when the control loses Key Input Focus which could be due to it being gained by another Control or Actor or just cleared from this control as no longer required. | |
Control (Internal::Control &implementation) | |
Create an initialised Control. | |
Control (Dali::Internal::CustomActor *internal) | |
This constructor is used by CustomActor within Dali core to create additional Control handles using an Internal CustomActor pointer. | |
Static Public Member Functions | |
static Control | New () |
Create a new instance of a Control. | |
static Control | DownCast (BaseHandle handle) |
Downcast a handle to Control handle. |
Detailed Description
Control is the base class for all controls.
The implementation of the control must be supplied; see Internal::Control for more details.
- Since :
- 2.4
- See also:
- Internal::Control
Member Typedef Documentation
typedef Signal<bool ( Control, const KeyEvent& ) > Dali::Toolkit::Control::KeyEventSignalType |
Key Event signal type;.
- Since :
- 2.4
typedef Signal<void ( Control ) > Dali::Toolkit::Control::KeyInputFocusSignalType |
Key InputFocusType signal type;.
- Since :
- 2.4
Member Enumeration Documentation
The start and end property ranges for control.
- Since :
- 2.4
- Enumerator:
PROPERTY_START_INDEX Start index is used by the property registration macro.
- Since :
- 2.4
CONTROL_PROPERTY_START_INDEX Start index of Control properties.
- Since :
- 2.4
CONTROL_PROPERTY_END_INDEX Reserving 1000 property indices.
- Since :
- 2.4
Reimplemented in Dali::Toolkit::ScrollView, Dali::Toolkit::Button, Dali::Toolkit::TableView, Dali::Toolkit::ItemView, Dali::Toolkit::PushButton, Dali::Toolkit::ScrollBar, Dali::Toolkit::Scrollable, Dali::Toolkit::TextLabel, Dali::Toolkit::TextField, and Dali::Toolkit::ImageView.
Constructor & Destructor Documentation
Create an uninitialized Control handle.
Only derived versions can be instantiated. Calling member functions with an uninitialized Dali::Object is not allowed.
- Since :
- 2.4
Dali::Toolkit::Control::Control | ( | const Control & | uiControl | ) |
Copy constructor.
Creates another handle that points to the same real object.
- Since :
- 2.4
- Parameters:
-
[in] uiControl A handle to copy
Dali::Control is intended as a base class.
This is non-virtual since derived Handle types must not contain data or virtual methods.
- Since :
- 2.4
Dali::Toolkit::Control::Control | ( | Internal::Control & | implementation | ) | [explicit] |
Dali::Toolkit::Control::Control | ( | Dali::Internal::CustomActor * | internal | ) | [explicit] |
This constructor is used by CustomActor within Dali core to create additional Control handles using an Internal CustomActor pointer.
- Since :
- 2.4
- Parameters:
-
[in] internal A pointer to a newly allocated Dali resource
Member Function Documentation
Clears the background.
- Since :
- 2.4
Once an actor is Set to receive key input focus this function is called to stop it receiving key events.
A check is performed to ensure it was previously set, if this check fails then nothing is done.
- Since :
- 2.4
- Precondition:
- The Actor has been initialized.
static Control Dali::Toolkit::Control::DownCast | ( | BaseHandle | handle | ) | [static] |
Downcast a handle to Control handle.
If handle points to a Control 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 Control or an uninitialized handle
Reimplemented from Dali::CustomActor.
Reimplemented in Dali::Toolkit::ScrollView, Dali::Toolkit::TableView, Dali::Toolkit::TextField, Dali::Toolkit::Alignment, Dali::Toolkit::ScrollBar, Dali::Toolkit::Button, Dali::Toolkit::RadioButton, Dali::Toolkit::TextLabel, Dali::Toolkit::ItemView, Dali::Toolkit::Scrollable, Dali::Toolkit::ImageView, Dali::Toolkit::PushButton, and Dali::Toolkit::CheckBoxButton.
Retrieves the background color of the control.
- Since :
- 2.4
- Returns:
- The background color of the control
Retrieves the long press gesture detector of the control.
- Since :
- 2.4
- Returns:
- The long press gesture detector
- Note:
- Will return an empty handle if the control does not handle the gesture itself.
Retrieves the pan gesture detector of the control.
- Since :
- 2.4
- Returns:
- The pan gesture detector
- Note:
- Will return an empty handle if the control does not handle the gesture itself.
Retrieves the pinch gesture detector of the control.
- Since :
- 2.4
- Returns:
- The pinch gesture detector
- Note:
- Will return an empty handle if the control does not handle the gesture itself.
const std::string& Dali::Toolkit::Control::GetStyleName | ( | ) | const |
Retrieves the name of the style to be applied to the control (if any).
- Since :
- 2.4
- Returns:
- A string matching a style or an empty string.
Retrieves the tap gesture detector of the control.
- Since :
- 2.4
- Returns:
- The tap gesture detector
- Note:
- Will return an empty handle if the control does not handle the gesture itself.
Quries whether the control has key input focus.
- Since :
- 2.4
- Returns:
- True if this control has keyboard input focus
- Precondition:
- The Control has been initialized.
- The Control should be on the stage before setting keyboard focus.
- Note:
- The control can be set to have the focus and still not receive all the key events if another control has over ridden it. As the key input focus mechanism works like a stack, the top most control receives all the key events, and passes on the unhandled events to the controls below in the stack. A control in the stack will regain key input focus when there are no more controls above it in the focus stack. To query for the conrol which is on top of the focus stack use Dali::Toolkit::KeyInputFocusManager::GetCurrentKeyboardFocusActor().
This signal is emitted when key event is received.
A callback of the following type may be connected:
bool YourCallbackName(Control control, const KeyEvent& event);
The return value of True, indicates that the event should be consumed. Otherwise the signal will be emitted on the next parent of the actor.
- Since :
- 2.4
- Returns:
- The signal to connect to
- Precondition:
- The Control has been initialized.
This signal is emitted when the control gets Key Input Focus.
A callback of the following type may be connected:
bool YourCallbackName( Control control );
The return value of True, indicates that the event should be consumed. Otherwise the signal will be emitted on the next parent of the actor.
- Since :
- 2.4
- Returns:
- The signal to connect to
- Precondition:
- The Control has been initialized.
This signal is emitted when the control loses Key Input Focus which could be due to it being gained by another Control or Actor or just cleared from this control as no longer required.
A callback of the following type may be connected:
bool YourCallbackName( Control control );
The return value of True, indicates that the event should be consumed. Otherwise the signal will be emitted on the next parent of the actor.
- Since :
- 2.4
- Returns:
- The signal to connect to
- Precondition:
- The Control has been initialized.
static Control Dali::Toolkit::Control::New | ( | ) | [static] |
Create a new instance of a Control.
- Since :
- 2.4
- Returns:
- A handle to a new Control
Reimplemented from Dali::Actor.
Reimplemented in Dali::Toolkit::ScrollView, Dali::Toolkit::TextField, Dali::Toolkit::RadioButton, Dali::Toolkit::PushButton, Dali::Toolkit::CheckBoxButton, Dali::Toolkit::TextLabel, and Dali::Toolkit::ImageView.
Assignment operator.
Changes this handle to point to another real object.
- Since :
- 2.4
- Parameters:
-
[in] handle Object to assign this to
- Returns:
- reference to this
void Dali::Toolkit::Control::SetBackgroundColor | ( | const Vector4 & | color | ) |
Sets the background color of the control.
- Since :
- 2.4
- Parameters:
-
[in] color The required background color of the control
- Note:
- The background color fully blends with the actor color.
void Dali::Toolkit::Control::SetBackgroundImage | ( | Image | image | ) |
Sets an image as the background of the control.
The color of this image is blended with the background color
- See also:
- SetBackgroundColor.
- Since :
- 2.4
- Parameters:
-
[in] image The image to set as the background
void Dali::Toolkit::Control::SetStyleName | ( | const std::string & | styleName | ) |
Sets the name of the style to be applied to the control.
- Since :
- 2.4
- Parameters:
-
[in] styleName A string matching a style described in a stylesheet.