* @brief This is the header file for the %Bitmap class.
*
* This header file contains the declarations of the %Bitmap class. @n
- * The class encapsulates a bitmap, which consists of the pixel data
- * for a graphics image and its attributes.
+ * The class encapsulates a bitmap, which consists of the pixel data for a graphics image and its attributes.
*
*/
*
* @final This class is not intended for extension.
*
- * The %Bitmap class encapsulates a bitmap, which consists of the pixel data
- * for an image and its attributes.
- * @n
+ * The %Bitmap class encapsulates a bitmap, which consists of the pixel data for an image and its attributes.
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/graphics/bitmap.htm">Bitmaps</a>.
*
*
{
public:
/**
- * This is the default constructor for this class.
+ * This is the default constructor for this class. @n
+ * After creating an instance of this class, one of the Construct() methods must be called explicitly to initialize this instance.
*
* @since 2.0
- * @remarks After creating an instance of this class, one of the
- * Construct() methods must be called explicitly to initialize this instance.
- *
*/
Bitmap(void);
* @since 2.0
*
* @return An error code
- * @param[in] rect The rectangular area of the Frame to copy into bitmap @n
- * The width and height of the rectangle must be greater than @c 0. @n
- * The area defined by @c rect is clipped to the edges of the Frame so that
- * the rectangle does not fall outside the edges of the Frame. @n
- * The rectangle must not fall outside the edges of the Frame entirely. @n
- * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned.
+ * @param[in] rect The rectangular area of the Frame to copy into bitmap @n
+ * The width and height of the rectangle must be greater than @c 0. @n
+ * The area defined by @c rect is clipped to the edges of the %Frame so that
+ * the rectangle does not fall outside the edges of the %Frame. @n
+ * The rectangle must not fall outside the edges of the %Frame entirely. @n
+ * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @since 2.0
*
* @return An error code
- * @param[in] dim The dimensions of the bitmap @n
- * The width and height must be greater than @c 0.
- * @param[in] format The pixel format
+ * @param[in] dim The dimensions of the bitmap @n
+ * The width and height must be greater than @c 0.
+ * @param[in] format The pixel format
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @since 2.0
*
* @return An error code
- * @param[in] canvas The canvas to copy @n
- * The canvas must be constructed successfully before it is passed into this method. @n
- * If not, an @c E_INVALID_ARG exception is returned.
- * @param[in] rect The rectangular area of the canvas to copy into a bitmap @n
- * The width and height of the rectangle must be greater than @c 0. @n
- * The rectangle defined by @c rect is clipped to the edges of the canvas so that
- * the rectangle does not fall outside the edges of the canvas. @n
- * The rectangle must not fall outside the edges of the canvas entirely. @n
- * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned.
+ * @param[in] canvas The canvas to copy @n
+ * The canvas must be constructed successfully before it is passed into this method. @n
+ * If not, an @c E_INVALID_ARG exception is returned.
+ * @param[in] rect The rectangular area of the canvas to copy into a bitmap @n
+ * The width and height of the rectangle must be greater than @c 0. @n
+ * The rectangle defined by @c rect is clipped to the edges of the canvas so that
+ * the rectangle does not fall outside the edges of the canvas. @n
+ * The rectangle must not fall outside the edges of the canvas entirely. @n
+ * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @since 2.0
*
* @return An error code
- * @param[in] bitmap The source bitmap @n
- * The bitmap must be constructed successfully before it is passed into this method. @n
- * If not, an @c E_INVALID_ARG exception is returned.
- * @param[in] rect The rectangular area of the source bitmap to copy into this bitmap @n
- * The width and height of the rectangle must be greater than @c 0. @n
- * The rectangle defined by @c rect is clipped to the edges of the source bitmap so that
- * the rectangle does not fall outside the edges of the source bitmap. @n
- * The rectangle must not fall outside the edges of the source bitmap entirely. @n
- * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned.
+ * @param[in] bitmap The source bitmap @n
+ * The bitmap must be constructed successfully before it is passed into this method. @n
+ * If not, an @c E_INVALID_ARG exception is returned.
+ * @param[in] rect The rectangular area of the source bitmap to copy into this bitmap @n
+ * The width and height of the rectangle must be greater than @c 0. @n
+ * The rectangle defined by @c rect is clipped to the edges of the source bitmap so that
+ * the rectangle does not fall outside the edges of the source bitmap. @n
+ * The rectangle must not fall outside the edges of the source bitmap entirely. @n
+ * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @since 2.0
*
* @return An error code
- * @param[in] buffer The buffer containing raw data
- * @param[in] dim The dimensions of the bitmap @n
- * The width and height must be greater than @c 0.
- * @param[in] pixelFormat The pixel format of raw data
+ * @param[in] buffer The buffer containing raw data
+ * @param[in] dim The dimensions of the bitmap @n
+ * The width and height must be greater than @c 0.
+ * @param[in] pixelFormat The pixel format of raw data
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @since 2.0
*
* @return An error code
- * @param[in] buffer The buffer containing raw data
- * @param[in] dim The dimensions of the bitmap @n
- * The width and height must be greater than @c 0.
- * @param[in] pixelFormat The pixel format of raw data
- * @param[in] bufferScaling The buffer scaling type
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @param[in] buffer The buffer containing raw data
+ * @param[in] dim The dimensions of the bitmap @n
+ * The width and height must be greater than @c 0.
+ * @param[in] pixelFormat The pixel format of raw data
+ * @param[in] bufferScaling The buffer scaling type
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @remarks The position property of %ByteBuffer can be changed.
*
* @since 2.1
*
* @return An error code
- * @param[in] rect The rectangular area of the frame that is copied into bitmap @n
- * The width and height of the rectangle must be greater than @c 0. @n
- * The area defined by @c rect is clipped to the edges of the frame so that
- * the rectangle does not fall outside the edges of the frame. @n
- * The rectangle must not fall outside the edges of the frame entirely. @n
- * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned.
+ * @param[in] rect The rectangular area of the frame that is copied into bitmap @n
+ * The width and height of the rectangle must be greater than @c 0. @n
+ * The area defined by @c rect is clipped to the edges of the frame so that
+ * the rectangle does not fall outside the edges of the frame. @n
+ * The rectangle must not fall outside the edges of the frame entirely. @n
+ * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @since 2.1
*
* @return An error code
- * @param[in] dim The dimensions of the bitmap @n
- * The width and height must be greater than @c 0.
- * @param[in] format The pixel format
+ * @param[in] dim The dimensions of the bitmap @n
+ * The width and height must be greater than @c 0.
+ * @param[in] format The pixel format
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @since 2.1
*
* @return An error code
- * @param[in] canvas The canvas to copy @n
- * The canvas must be constructed successfully before it is passed into this method. @n
- * If not, an @c E_INVALID_ARG exception is returned.
- * @param[in] rect The rectangular area of the canvas that is copied into a bitmap @n
- * The width and height of the rectangle must be greater than @c 0. @n
- * The rectangle defined by @c rect is clipped to the edges of the canvas so that
- * the rectangle does not fall outside the edges of the canvas. @n
- * The rectangle must not fall outside the edges of the canvas entirely. @n
- * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned.
+ * @param[in] canvas The canvas to copy @n
+ * The canvas must be constructed successfully before it is passed into this method. @n
+ * If not, an @c E_INVALID_ARG exception is returned.
+ * @param[in] rect The rectangular area of the canvas that is copied into a bitmap @n
+ * The width and height of the rectangle must be greater than @c 0. @n
+ * The rectangle defined by @c rect is clipped to the edges of the canvas so that
+ * the rectangle does not fall outside the edges of the canvas. @n
+ * The rectangle must not fall outside the edges of the canvas entirely. @n
+ * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @since 2.1
*
* @return An error code
- * @param[in] bitmap The source bitmap @n
- * The bitmap must be constructed successfully before it is passed into this method. @n
- * If not, an @c E_INVALID_ARG exception is returned.
- * @param[in] rect The rectangular area of the source bitmap that is copied into this bitmap @n
- * The width and height of the rectangle must be greater than @c 0. @n
- * The rectangle defined by @c rect is clipped to the edges of the source bitmap so that
- * the rectangle does not fall outside the edges of the source bitmap. @n
- * The rectangle must not fall outside the edges of the source bitmap entirely. @n
- * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned.
+ * @param[in] bitmap The source bitmap @n
+ * The bitmap must be constructed successfully before it is passed into this method. @n
+ * If not, an @c E_INVALID_ARG exception is returned.
+ * @param[in] rect The rectangular area of the source bitmap that is copied into this bitmap @n
+ * The width and height of the rectangle must be greater than @c 0. @n
+ * The rectangle defined by @c rect is clipped to the edges of the source bitmap so that
+ * the rectangle does not fall outside the edges of the source bitmap. @n
+ * The rectangle must not fall outside the edges of the source bitmap entirely. @n
+ * If these conditions are not satisfied, an @c E_OUT_OF_RANGE exception is returned.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @since 2.0
*
* @return An error code
- * @param[in] dim The dimensions of the specified rectangular area @n
- * The width and height must be greater than @c 0.
+ * @param[in] dim The dimensions of the specified rectangular area @n
+ * The width and height must be greater than @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
*
* @since 2.1
*
* @return An error code
- * @param[in] dim The dimensions of the specified rectangular area @n
- * The width and height must be greater than @c 0.
+ * @param[in] dim The dimensions of the specified rectangular area @n
+ * The width and height must be greater than @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
*
* @since 2.0
*
* @return An error code
- * @param[in] destPoint The X and Y coordinate of the top-left corner of the destination area in the calling bitmap instance
- * @param[in] srcBitmap The source bitmap instance to copy from
- * @param[in] srcRect The rectangular area to copy from the source bitmap @n
- The width and height of the rectangle must be greater than or equal to @c 0.
+ * @param[in] destPoint The X and Y coordinate of the top-left corner of the destination area in the calling bitmap instance
+ * @param[in] srcBitmap The source bitmap instance to copy from
+ * @param[in] srcRect The rectangular area to copy from the source bitmap @n
+ The width and height of the rectangle must be greater than or equal to @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE Either of the following conditions has occurred: @n
* - The value of the argument is outside the valid range defined by the method. @n
- * - The destX, destY, srcX, or srcY has a negative value. @n
- * - The specified @c srcWidth or @c srcHeight is less than @c 0.
+ * - The destX, destY, srcX, or srcY has a negative value.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*
*/
* @since 2.1
*
* @return An error code
- * @param[in] destPoint The X and Y coordinate of the top-left corner of the destination area in the calling bitmap instance
- * @param[in] srcBitmap The source bitmap instance to copy from
- * @param[in] srcRect The rectangular area to copy from the source bitmap @n
- * The width and height of the rectangle must be greater than or equal to @c 0.
+ * @param[in] destPoint The X and Y coordinate of the top-left corner of the destination area in the calling bitmap instance
+ * @param[in] srcBitmap The source bitmap instance to copy from
+ * @param[in] srcRect The rectangular area to copy from the source bitmap @n
+ * The width and height of the rectangle must be greater than or equal to @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE Either of the following conditions has occurred: @n
* - The value of the argument is outside the valid range defined by the method. @n
* - The destX, destY, srcX, or srcY has a negative value. @n
- * - The specified @c srcWidth or @c srcHeight is less than @c 0.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*
*/
* @since 2.0
*
* @return An error code
- * @param[in] quality The scaling quality to use for bitmap scaling.
+ * @param[in] quality The scaling quality to use for bitmap scaling.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*
*
* @since 2.0
*
- * @return The scaling quality
- * @remarks The default value is @c BITMAP_SCALING_QUALITY_LOW.
+ * @return The scaling quality @n
+ * The default value is @c BITMAP_SCALING_QUALITY_LOW.
*
*/
BitmapScalingQuality GetScalingQuality(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] pColor The color that is treated as transparent @n
- * If the parameter is set to @c null, the masking color is removed from this bitmap. @n
- * Only ::BITMAP_PIXEL_FORMAT_RGB565 is supported.
+ * @param[in] pColor The color that is treated as transparent @n
+ * If the parameter is set to @c null, the masking color is removed from this bitmap. @n
+ * Only ::BITMAP_PIXEL_FORMAT_RGB565 is supported.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*
* @since 2.0
*
* @return An error code
- * @param[out] color The color that is treated as transparent
+ * @param[out] color The color that is treated as transparent
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_DATA The masking color is not defined.
*
* @since 2.0
* @param[in] opacity The opacity of the bitmap @n
* This value ranges from @c 0 to @c 255.
- * @remarks The alpha constant is used for the Canvas::DrawBitmap() method.
+ * @remarks The alpha constant is used for the Canvas::DrawBitmap() method.
*/
void SetAlphaConstant(int opacity);
* @since 2.0
*
* @return An error code
- * @param[out] info The extra information of the bitmap
- * @param[in] timeout The time in milliseconds @n
- * This value determines the time the caller waits for the lock to be obtained. @n
- * If the lock attempt fails, @c E_TIMEOUT is returned. @n
- * The default value is @c INFINITE, which means that the method does not return a value until the lock is acquired.
+ * @param[out] info The extra information of the bitmap
+ * @param[in] timeout The time in milliseconds @n
+ * This value determines the time the caller waits for the lock to be obtained. @n
+ * If the lock attempt fails, @c E_TIMEOUT is returned. @n
+ * The default value is @c INFINITE, which means that the method does not return a value until the lock is acquired.
* @exception E_SUCCESS The method is successful.
* @exception E_TIMEOUT The operation is not completed within the specified time period.
* @exception E_SYSTEM An unknown operating system error has occurred.
result Unlock(void);
/**
- * Gets a non scaled bitmap.
+ * Gets a non-scaled bitmap.
*
* @since 2.0
*
- * @return The non scaled bitmap, @n
+ * @return The non-scaled bitmap, @n
* else @c null if an exception occurs
- * @param[in] buffer The buffer containing raw data
- * @param[in] dim The dimensions of the bitmap @n
- * The width and height must be greater than @c 0.
- * @param[in] pixelFormat The pixel format of raw data
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
+ * @param[in] buffer The buffer containing raw data
+ * @param[in] dim The dimensions of the bitmap @n
+ * The width and height must be greater than @c 0.
+ * @param[in] pixelFormat The pixel format of raw data
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
*
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
*
* The %Canvas class provides a rectangular region to draw objects on the display device. The %Canvas instance is
* associated with a specific context.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/graphics/canvas.htm">Canvas</a>.
*
*/
{
public:
/**
- * This is the default constructor for this class.
+ * This is the default constructor for this class. @n
+ * After creating an instance of this class, one of the Construct() methods must be called explicitly to initialize this instance.
*
* @since 2.0
- * @remarks After creating an instance of this class, one of the Construct() methods must be
- * called explicitly to initialize this instance.
*/
Canvas(void);
*
* @since 2.0
*
- * @return An instance of LineStyle
- * @remarks The default value is @c LINE_STYLE_SOLID.
+ * @return An instance of LineStyle @n
+ * The default value is @c LINE_STYLE_SOLID.
*/
LineStyle GetLineStyle(void) const;
* @since 2.0
*
* @return The line width, @n
- * else @c -1 if the method fails
- * @remarks The default value is @c 1.
+ * else @c -1 if the method fails @n
+ * The default value is @c 1.
*/
int GetLineWidth(void) const;
* @since 2.1
*
* @return The line width, @n
- * else @c -1.0f if the method fails
- * @remarks The default value is @c 1.0f.
+ * else @c -1.0f if the method fails @n
+ * The default value is @c 1.0f.
*/
float GetLineWidthF(void) const;
*
* @return An error code
* @param[in] pattern The list containing the information of dash pattern @n
- * If any value in the specific dash pattern is negative, @c E_INVALID_ARG is returned.
+ * If any value in the specific dash pattern is negative, @c E_INVALID_ARG is returned.
* @param[in] offset The offset into the dash pattern at which the stroke must start
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specific input parameter is invalid.
*
* @return An error code
* @param[in] pattern The list containing the information of dash pattern @n
- * If any value in the specific dash pattern is negative, @c E_INVALID_ARG is returned.
+ * If any value in the specific dash pattern is negative, @c E_INVALID_ARG is returned.
* @param[in] offset The offset into the dash pattern at which the stroke must start
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specific input parameter is invalid.
*
* @since 2.1
*
- * @return The current line cap style
- * @remarks The default style is @c LINE_CAP_STYLE_ROUND.
+ * @return The current line cap style @n
+ * The default style is @c LINE_CAP_STYLE_ROUND.
*/
LineCapStyle GetLineCapStyle(void) const;
*
* @since 2.1
*
- * @return The current line join style
- * @remarks The default style is @c LINE_JOIN_STYLE_ROUND.
+ * @return The current line join style @n
+ * The default style is @c LINE_JOIN_STYLE_ROUND.
*/
LineJoinStyle GetLineJoinStyle(void) const;
* %Canvas control. If these conditions are not satisfied, the
* @c E_OUT_OF_RANGE exception is returned.
* @param[in] arcDim The width and height of the round edge @n
- * The width and height in the @c arcDim parameter must be greater than or equal to @c 0.
+ * The width and height in the @c arcDim parameter must be greater than or equal to @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
*/
* %Canvas control. If these conditions are not satisfied, the
* @c E_OUT_OF_RANGE exception is returned.
* @param[in] arcDim The width and height of the round edge @n
- * The width and height in the @c arcDim parameter must be greater than or equal to @c 0.0f.
+ * The width and height in the @c arcDim parameter must be greater than or equal to @c 0.0f.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
*/
* %Canvas control. If these conditions are not satisfied, the
* @c E_OUT_OF_RANGE exception is returned.
* @param[in] arcDim The width and height of the round edge @n
- * The width and height mentioned in the @c arcDim parameter must be greater than or equal to @c 0.
+ * The width and height mentioned in the @c arcDim parameter must be greater than or equal to @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
*/
* %Canvas control. If these conditions are not satisfied, the
* @c E_OUT_OF_RANGE exception is returned.
* @param[in] arcDim The width and height of the round edge @n
- * The width and height mentioned in the @c arcDim parameter must be greater than or equal to @c 0.0f.
+ * The width and height mentioned in the @c arcDim parameter must be greater than or equal to @c 0.0f.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
*/
* @return The font of the %Canvas control, @n
* else @c null if the method fails
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
* - If a font is not set with the SetFont() method, this method returns the system default font.
* @since 2.0
*
* @return An error code
- * @param[in] destRect The destination rectangle of %Canvas @n
+ * @param[in] destRect The destination rectangle of %Canvas @n
* The width and height of the rectangle must be greater than or equal to @c 0.
* The rectangle defined by @c destRect will be clipped at the edges
* of the %Canvas control to prevent the rectangle from falling
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
- * @remarks ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method. @n
- * The nine-patched bitmap must have a stretchable section by drawing one (or more) 1-pixel-wide black line(s) in the
- * left and top part of the border.
+ * @remarks
+ * - ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method.
+ * - The nine-patched bitmap must have a stretchable section by drawing one (or more) 1-pixel-wide black line(s) in the
+ * left and top part of the border.
* @image html graphics_ninepatchedbitmap.PNG
*
*/
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
- * @remarks ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method. @n
- * The nine-patched bitmap must have a stretchable section by drawing one (or more) 1-pixel-wide black line(s) in the
- * left and top part of the border.
+ * @remarks
+ * - ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method.
+ * - The nine-patched bitmap must have a stretchable section by drawing one (or more) 1-pixel-wide black line(s) in the
+ * left and top part of the border.
* @image html graphics_ninepatchedbitmap.PNG
*
*/
*
* @since 2.0
*
- * @param[in] color The color that is set as background color
+ * @param[in] color The color that is set as background color @n
+ * When a non-premultiplied alpha color blends with another, it can result in an improper color.
*/
void SetBackgroundColor(const Color& color);
*
* @since 2.1
*
- * @return The current composite mode
- * @remarks The default value is @c COMPOSITE_MODE_SRC_OVER.
+ * @return The current composite mode @n
+ * The default value is @c COMPOSITE_MODE_SRC_OVER.
*/
CompositeMode GetCompositeMode(void) const;
* @since 2.1
*
* @param[in] enable Set to @c true to enable anti-aliasing for the current instance of %Canvas, @n
- * else @c false
+ * else @c false
* @remarks By default, the anti-aliasing is enabled.
*/
void SetAntiAliasingEnabled(bool enable);
/**
* @class CanvasTexture
* @brief This class provides a method to bind 2D %Canvas and OpenGL-ES Texture.
- * With this feature, you can easily draw 2D primitives on OpenGL-ES Textures with consistency.
*
* @since 2.0
*
* @final This class is not intended for extension.
*
* The %CanvasTexture class provides a method to bind 2D Canvas and OpenGL-ES Texture.
- * With this feature, you can easily draw 2D primitives on OpenGL-ES Textures with consistency.
+ * With this feature, you can easily draw 2D primitives on OpenGL-ES Textures with consistency.
*
*/
class _OSP_EXPORT_ CanvasTexture
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n For full construction,
+ * the Construct() method be called right after calling this constructor.
*
* @since 2.0
*
* @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0
*
* @return An error code
- * @param[in] textureId Texture ID which points to the texture associated with the 2D canvas @n The texture ID must be generated from glGenTextures().
- * @param[in] width The width of the input texture. The width must be greater than @c 0, and smaller or equal than GL_MAX_TEXTURE_SIZE.
- * @param[in] height The height of the input texture. The height must be greater than @c 0, and smaller or equal than GL_MAX_TEXTURE_SIZE
- * @exception E_SUCCESS Construction is successfully done.
- * @exception E_INVALID_ARG Input parameter is invalid.
+ * @param[in] textureId Texture ID which points to the texture associated with the 2D canvas @n
+ * The texture ID must be generated from glGenTextures().
+ * @param[in] width The width of the input texture @n
+ * The width must be greater than @c 0, and smaller or equal than @c GL_MAX_TEXTURE_SIZE.
+ * @param[in] height The height of the input texture @n
+ * The height must be greater than @c 0, and smaller or equal than @c GL_MAX_TEXTURE_SIZE.
+ * @exception E_SUCCESS Construction is successfully done.
+ * @exception E_INVALID_ARG An input parameter is invalid.
* @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
- * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
- * @exception E_INVALID_STATE Getting egl information failed. It is necessary to bind egl context by using the eglMakeCurrent() method.
+ * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
+ * @exception E_INVALID_STATE Getting egl information failed. It is necessary to bind egl context by using the eglMakeCurrent() method.
* @remarks
- * - Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
- * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
+ * - Before calling this method, check whether the feature is supported by
+ * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
+ * - There is a high probability for an occurrence of an out-of-memory exception. If possible,
+ * check whether the exception is @c E_OUT_OF_MEMORY or not. For more information on how to handle
+ * the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
*/
result Construct(int textureId, int width, int height);
*
* @since 2.0
*
- * @return The 2D canvas of the %CanvasTexture, @n
- * else @c null if an exception occurs
- * @exception E_SUCCESS The method is successful.
+ * @return The 2D canvas of the %CanvasTexture, @n
+ * else @c null if an exception occurs
+ * @exception E_SUCCESS The method is successful.
* @exception E_OPERATION_FAILED The method fails to construct the canvas properly due to some system error.
*/
Tizen::Graphics::Canvas* GetCanvasN(void) const;
/**
* @class Color32
- * @brief This template code makes a 32-bit combination from each color component
+ * @brief This template code makes a 32-bit combination from each color component.
* @since 2.0
*
- * The following example demonstrates how to use this template code
+ * The following example demonstrates how to use this template code.
*
* @code
*
*
* @param[in] rgb The RGB color value
* @param[in] hasAlpha Set to @c true if @c rgb contains an alpha value, @n
- * else @c false
+ * else @c false
*/
Color(unsigned int rgb, bool hasAlpha = true);
/**
* Checks whether the two instances of %Color are equal.
*
- * @since 2.0
+ * @since 2.0
*
* @return @c true if the values of the two instances of %Color are equal, @n
- * else @c false
+ * else @c false
* @param[in] rhs An instance of %Color
*/
bool operator ==(const Color& rhs) const;
/**
* Checks whether the two instances of %Color are not equal.
*
- * @since 2.0
+ * @since 2.0
*
* @return @c true if the values of the two instances of %Color are not equal, @n
- * else @c false
+ * else @c false
* @param[in] rhs An instance of %Color
*
*/
/**
* Assigns the values of the RGB components of the specified instance to the current instance of %Color.
*
- * @since 2.0
+ * @since 2.0
*
* @return The reference to the instance of %Color
* @param[in] rhs An instance of %Color
/**
* Checks whether the current instance of %Color equals the specified instance of %Color.
*
- * @since 2.0
+ * @since 2.0
*
* @return @c true if the values of the current instance is equal to the value of the specified instance, @n
- * else @c false
+ * else @c false
* @param[in] rhs An instance of %Color
- * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the RGB components to compare the two instances.
+ * @remarks
+ * - This method overrides Tizen::Base::Object::Equals().
+ * - This method uses the values of the RGB components to compare the two instances.
*/
virtual bool Equals(const Tizen::Base::Object& rhs) const;
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks Two equal instances must return the same hash value. For better performance,
+ * @remarks Two equal instances must return the same hash value. @n For better performance,
* the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
*
* @since 2.0
*
- * @return A @c byte representation of the alpha component of the current instance of %Color
+ * @return A @c byte representation of the alpha component of the current instance of %Color
*/
byte GetAlpha(void) const;
*
* @since 2.0
*
- * @return A @c byte representation of the red component of the current instance of %Color
+ * @return A @c byte representation of the red component of the current instance of %Color
*/
byte GetRed(void) const;
*
* @since 2.0
*
- * @return A @c byte representation of the blue component of the current instance of %Color
+ * @return A @c byte representation of the blue component of the current instance of %Color
*/
byte GetBlue(void) const;
*
* @since 2.0
*
- * @return A @c byte representation of the green component of the current instance of %Color
+ * @return A @c byte representation of the green component of the current instance of %Color
*/
byte GetGreen(void) const;
/**
* Gets the ARGB components of the current instance of %Color.
*
- * @since 2.0
+ * @since 2.0
*
* @param[out] r The red component
* @param[out] g The green component
*
* @since 2.0
*
- * @return An @c unsigned integer value representing the current instance of %Color
+ * @return An @c unsigned integer value representing the current instance of %Color
*/
unsigned int GetRGB32(void) const;
/**
* Sets the current instance of %Color to the specified 32-bit integer value.
*
- * @since 2.0
+ * @since 2.0
*
* @param[in] rgb The new RGB color value
* @param[in] hasAlpha @c true if @c rgb contains alpha value, @n
void SetRGB32(unsigned int rgb, bool hasAlpha = true);
/**
- * Return the Color object for the specified color
+ * Gets the %Color object for the specified color.
*
* @since 2.0
- * @return The Color object
- * @param[in] colorId The enum value for the specified color
+ * @return The %Color object
+ * @param[in] colorId The enum value for the specified color
*/
static Color GetColor(ColorId colorId);
* @brief <i> [Deprecated] </i>
* @since 2.0
*
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release
- * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_BLACK)
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_BLACK).
* @endif
*/
const static Color COLOR_BLACK;
* @brief <i> [Deprecated] </i>
* @since 2.0
*
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release
- * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_BLUE)
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_BLUE).
* @endif
*/
const static Color COLOR_BLUE;
* @brief <i> [Deprecated] </i>
* @since 2.0
*
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release
- * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_CYAN)
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_CYAN).
* @endif
*/
const static Color COLOR_CYAN;
* @brief <i> [Deprecated] </i>
* @since 2.0
*
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release
- * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_GREEN)
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_GREEN).
* @endif
*/
const static Color COLOR_GREEN;
* @brief <i> [Deprecated] </i>
* @since 2.0
*
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release
- * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_GREY)
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_GREY).
* @endif
*/
const static Color COLOR_GREY;
* @brief <i> [Deprecated] </i>
* @since 2.0
*
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release
- * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_MAGENTA)
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_MAGENTA).
* @endif
*/
const static Color COLOR_MAGENTA;
* @brief <i> [Deprecated] </i>
* @since 2.0
*
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release
- * Instead of us ing this static constant, it is recommended to use GetColor(COLOR_ID_RED)
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_RED).
* @endif
*/
const static Color COLOR_RED;
* @brief <i> [Deprecated] </i>
* @since 2.0
*
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release
- * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_VIOLET)
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_VIOLET).
* @endif
*/
const static Color COLOR_VIOLET;
* @brief <i> [Deprecated] </i>
* @since 2.0
*
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release
- * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_YELLOW)
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_YELLOW).
* @endif
*/
const static Color COLOR_YELLOW;
/**
* @if OSPDEPREC
- * This attribute is pre-defined. Its value is cwhite.
+ * This attribute is pre-defined. Its value is white.
*
* @brief <i> [Deprecated] </i>
* @since 2.0
*
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release
- * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_WHITE)
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * Instead of using this static constant, it is recommended to use GetColor(COLOR_ID_WHITE).
* @endif
*/
const static Color COLOR_WHITE;
* @since 2.0
*
* @return The converted logical value for the physical one
- * @param[in] physicalX An input physical value to convert
+ * @param[in] physicalX An input physical value to convert
*/
static int ConvertToLogicalX(int physicalX);
* @since 2.1
*
* @return The converted logical value for the physical one
- * @param[in] physicalX An input physical value to convert
+ * @param[in] physicalX An input physical value to convert
*/
static float ConvertToLogicalX(float physicalX);
* @since 2.0
*
* @return The converted logical value for the physical one
- * @param[in] physicalY An input physical value to convert
+ * @param[in] physicalY An input physical value to convert
*/
static int ConvertToLogicalY(int physicalY);
* @since 2.1
*
* @return The converted logical value for the physical one
- * @param[in] physicalY An input physical value to convert
+ * @param[in] physicalY An input physical value to convert
*/
static float ConvertToLogicalY(float physicalY);
* @since 2.0
*
* @return The converted physical X value
- * @param[in] logicalX An input logical value to convert
+ * @param[in] logicalX An input logical value to convert
*/
static int ConvertToPhysicalX(int logicalX);
* @since 2.1
*
* @return The converted physical X value
- * @param[in] logicalX An input logical value to convert
+ * @param[in] logicalX An input logical value to convert
*/
static float ConvertToPhysicalX(float logicalX);
* @since 2.0
*
* @return The converted physical Y value
- * @param[in] logicalY An input logical value to convert
+ * @param[in] logicalY An input logical value to convert
*/
static int ConvertToPhysicalY(int logicalY);
* @since 2.1
*
* @return The converted physical Y value
- * @param[in] logicalY An input logical value to convert
+ * @param[in] logicalY An input logical value to convert
*/
static float ConvertToPhysicalY(float logicalY);
*
* @since 2.1
*
- * @return Device aligned point
+ * @return Device aligned point
* @param[in] point The input point to align
*/
static FloatPoint AlignToDevice(const FloatPoint& point);
*
* @since 2.1
*
- * @return Device aligned dimension
+ * @return Device aligned dimension
* @param[in] dimension The input dimension to align
*/
static FloatDimension AlignToDevice(const FloatDimension& dimension);
*
* @since 2.1
*
- * @return Device aligned rectangle
+ * @return Device aligned rectangle
* @param[in] rectangle The input rectangle to align
*/
static FloatRectangle AlignToDevice(const FloatRectangle& rectangle);
{
public:
/**
- * This is the default constructor for this class.
+ * This is the default constructor for this class. @n
+ * After creating an instance of this class, one of the Construct() methods must be called explicitly
+ * to initialize this instance.
*
* @since 2.0
- *
- * @remarks After creating an instance of this class, one of the Construct() methods must be called explicitly
- * to initialize this instance.
*/
EnrichedText(void);
result Construct(const Tizen::Graphics::FloatDimension& dim);
/**
- * Inserts the TextElement instance in the %EnrichedText instance at the specified index.
+ * Inserts a TextElement instance in an %EnrichedText instance at the specified index.
*
* @since 2.0
*
result InsertAt(int elementIndex, TextElement& element);
/**
- * Removes the TextElement instance at the specified index of the %EnrichedText instance.
+ * Removes a TextElement instance at the specified index of an %EnrichedText instance.
*
* @since 2.0
*
result RemoveAt(int elementIndex, bool deallocate);
/**
- * Removes the TextElement instance from the %EnrichedText instance.
+ * Removes a TextElement instance from an %EnrichedText instance.
*
* @since 2.0
*
* @return An error code
- * @param[in] element The TextElement to remove
+ * @param[in] element The TextElement to remove
* @param[in] deallocate Set to @c true to deallocate the TextElement instance, @n
- * else @c false
+ * else @c false
* @exception E_SUCCESS The method is successful.
*
*/
result Remove(TextElement& element, bool deallocate);
/**
- * Adds the specified TextElement instance to the %EnrichedText instance.
+ * Adds the specified TextElement instance to an %EnrichedText instance.
*
* @since 2.0
*
/**
* @if OSPDEPREC
- * Removes all the %TextElement instances from the %EnrichedText instance.
+ * Removes all the %TextElement instances from an %EnrichedText instance.
*
* @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated. Instead of this method, use the RemoveAll().
result RemoveAllTextElements(bool deallocate);
/**
- * Removes all the text and image elements from the %EnrichedText instance.
+ * Removes all the text and image elements from an %EnrichedText instance.
*
* @since 2.0
*
result RemoveAll(bool deallocate);
/**
- * Gets the %TextElement instance at the specified index from the %EnrichedText instance.
+ * Gets a TextElement instance at the specified index from an %EnrichedText instance.
*
* @since 2.0
*
TextElement* GetTextElementAt(int elementIndex) const;
/**
- * Gets the count of the %TextElement instances.
+ * Gets the count of the TextElement instances.
*
* @since 2.0
*
- * @return The count of the %TextElement instances
+ * @return The count of the TextElement instances
*/
int GetTextElementCount(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] width The new width of %EnrichedText @n
- * It must be greater than @c 0.
- * @param[in] height The new height of %EnrichedText @n
- * It must be greater than @c 0.
+ * @param[in] width The new width of %EnrichedText @n
+ * It must be greater than @c 0.
+ * @param[in] height The new height of %EnrichedText @n
+ * It must be greater than @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
*/
* @since 2.1
*
* @return An error code
- * @param[in] width The new width of %EnrichedText @n
- * It must be greater than @c 0.0f.
- * @param[in] height The new height of %EnrichedText @n
- * It must be greater than @c 0.0f.
+ * @param[in] width The new width of %EnrichedText @n
+ * It must be greater than @c 0.0f.
+ * @param[in] height The new height of %EnrichedText @n
+ * It must be greater than @c 0.0f.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
*/
Tizen::Graphics::FloatDimension GetSizeF(void) const;
/**
- * Gets the size of the %EnrichedText instance.
+ * Gets the size of an %EnrichedText instance.
*
* @since 2.0
*
void GetSize(int& width, int& height) const;
/**
- * Gets the size of the %EnrichedText instance.
+ * Gets the size of an %EnrichedText instance.
*
* @since 2.1
*
void GetSize(float& width, float& height) const;
/**
- * Gets the width of the %EnrichedText instance.
+ * Gets the width of an %EnrichedText instance.
*
* @since 2.0
*
int GetWidth(void) const;
/**
- * Gets the width of the %EnrichedText instance.
+ * Gets the width of an %EnrichedText instance.
*
* @since 2.1
*
float GetWidthF(void) const;
/**
- * Gets the height of the %EnrichedText instance.
+ * Gets the height of an %EnrichedText instance.
*
* @since 2.0
*
int GetHeight(void) const;
/**
- * Gets the height of the %EnrichedText instance.
+ * Gets the height of an %EnrichedText instance.
*
* @since 2.1
*
* @since 2.0
*
* @return An error code
- * @param[in] alignment The vertical alignment of the text
+ * @param[in] alignment The vertical alignment of the text
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
float GetLineSpaceF(void) const;
/**
- * Refreshes the texts and bitmap according to the %EnrichedText instance's attributes. @n
+ * Refreshes the texts and bitmap according to an %EnrichedText instance's attributes. @n
* If some attributes are changed (such as changes using @ref SetSize), you can get the exact
* information of the text position or the number of lines after this method is called.
*
void Refresh(void);
/**
- * Gets the total line count of the text in the %EnrichedText instance.
+ * Gets the total line count of the text in an %EnrichedText instance.
*
* @since 2.0
*
int GetTotalLineCount(void) const;
/**
- * Gets the height of the text in the %EnrichedText instance.
+ * Gets the height of the text in an %EnrichedText instance.
*
* @since 2.0
*
int GetTotalLineHeight(void) const;
/**
- * Gets the height of the text in the %EnrichedText instance.
+ * Gets the height of the text in an %EnrichedText instance.
*
* @since 2.1
*
float GetTotalLineHeightF(void) const;
/**
- * Gets the displayed line count of the text in the %EnrichedText instance.
+ * Gets the displayed line count of the text in an %EnrichedText instance.
*
* @since 2.0
*
float GetLineHeightF(int lineIndex) const;
/**
- * Gets the text length of the %EnrichedText object.
+ * Gets the text length of an %EnrichedText object.
*
* @since 2.0
*
int GetTextLength(void) const;
/**
- * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are
+ * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are
* expanded to one line.
*
* @since 2.0
result GetTextExtent(int startTextIndex, int textLength, int& width, int& height, int& actualLength) const;
/**
- * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are
+ * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are
* expanded to one line.
*
* @since 2.1
result GetTextExtent(int startTextIndex, int textLength, float& width, float& height, int& actualLength) const;
/**
- * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are
+ * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are
* expanded to one line.
*
* @since 2.0
result GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::Dimension& size, int& actualLength) const;
/**
- * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are
+ * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are
* expanded to one line.
*
* @since 2.1
result GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::FloatDimension& size, int& actualLength) const;
/**
- * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are
- * not expanded to one line. @n The %GetTextExtent() method is useful for finding the extent of %EnrichedText spanning multiple lines.
+ * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are
+ * not expanded to one line. @n
+ * The %GetTextExtent() method is useful for finding the extent of %EnrichedText spanning multiple lines.
*
* @since 2.0
* @return An instance of Dimension containing the extent of the %EnrichedText instance, @n
Tizen::Graphics::Dimension GetTextExtent(void) const;
/**
- * Gets the extent of the %EnrichedText instance on the assumption that all TextElements are
- * not expanded to one line. @n The %GetTextExtentF() method is useful for finding the extent of %EnrichedText spanning multiple lines.
+ * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are
+ * not expanded to one line. @n
+ * The %GetTextExtentF() method is useful for finding the extent of %EnrichedText spanning multiple lines.
*
* @since 2.1
* @return An instance of FloatDimension containing the extent of the %EnrichedText instance, @n
Tizen::Graphics::FloatDimension GetTextExtentF(void) const;
/**
- * Adds the specified bitmap image to the %EnrichedText instance.
+ * Adds the specified bitmap image to an %EnrichedText instance.
*
* @since 2.0
*
* @return An error code
* @param[in] bitmap The bitmap to draw @n
- * The bitmap must be constructed before being passed to this method.
+ * The bitmap must be constructed before being passed to this method.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM An unknown operating system error has occurred.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
result Add(const Tizen::Graphics::Bitmap& bitmap);
/**
- * Inserts the specified bitmap image to the %EnrichedText instance at the specified index.
+ * Inserts the specified bitmap image to an %EnrichedText instance at the specified index.
*
* @since 2.0
*
* @return An error code
* @param[in] bitmap The @c bitmap to draw @n
- * The bitmap must be constructed before being passed to this method.
+ * The bitmap must be constructed before being passed to this method.
* @param[in] elementIndex The index at which the @c bitmap image is to add
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM An unknown operating system error has occurred.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OBJ_NOT_FOUND The required instance is not found.
* @remarks This method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position.
- * @see Tizen::Base::Utility::LinkInfo
*/
result GetLinkInfoFromPosition(const Point& point, Tizen::Base::Utility::LinkInfo& linkInfo) const;
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OBJ_NOT_FOUND The required instance is not found.
* @remarks This method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position.
- * @see Tizen::Base::Utility::LinkInfo
*/
result GetLinkInfoFromPosition(const FloatPoint& point, Tizen::Base::Utility::LinkInfo& linkInfo) const;
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OBJ_NOT_FOUND The required instance is not found.
* @remarks This method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position.
- * @see Tizen::Base::Utility::LinkInfo
*/
result GetLinkInfoFromPosition(int x, int y, Tizen::Base::Utility::LinkInfo& linkInfo) const;
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OBJ_NOT_FOUND The required instance is not found.
* @remarks This method throws @c E_OBJ_NOT_FOUND if there is no linked text at the specified position.
- * @see Tizen::Base::Utility::LinkInfo
*/
result GetLinkInfoFromPosition(float x, float y, Tizen::Base::Utility::LinkInfo& linkInfo) const;
* @since 2.0
*
* @return An error code
- * @param[in] alignment The vertical alignment among the text and the bitmap element
+ * @param[in] alignment The vertical alignment among the text and the bitmap element @n
+ * The default alignment @c TEXT_ALIGNMENT_BOTTOM.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
- * @remarks This method sets how one element is positioned relative to the other elements. @n
- * The vertical alignment of text and bitmap elements are decided based on the maximum height among elements.
- * @remarks The default alignment @c TEXT_ALIGNMENT_BOTTOM.
+ * @remarks
+ * - This method sets how one element is positioned relative to the other elements.
+ * - The vertical alignment of text and bitmap elements are decided based on the maximum height among elements.
*/
result SetElementVerticalAlignment(TextVerticalAlignment alignment);
*
* @since 2.0
*
- * @param[in] rhs An instance of %FloatMatrix4
+ * @param[in] rhs An instance of %FloatMatrix4
*/
FloatMatrix4(const FloatMatrix4& rhs);
*
* @since 2.0
*
- * @return @c true if all matrix members of the current instance are equal to the corresponding matrix members in the specified instance, @n
- * else @c false
- * @param[in] rhs An instance of %FloatMatrix4
+ * @return @c true if all matrix members of the current instance are equal to the corresponding matrix members in the specified instance, @n
+ * else @c false
+ * @param[in] rhs An instance of %FloatMatrix4
*/
bool operator ==(const FloatMatrix4& rhs) const;
*
* @since 2.0
*
- * @return @c true if all matrix members of the current instance are not equal to the corresponding matrix members in the specified instance, @n
- * else @c false
- * @param[in] rhs An instance of %FloatMatrix4
+ * @return @c true if all matrix members of the current instance are not equal to the corresponding matrix members in the specified instance, @n
+ * else @c false
+ * @param[in] rhs An instance of %FloatMatrix4
*/
bool operator !=(const FloatMatrix4& rhs) const;
*
* @since 2.0
*
- * @return The reference to this instance
- * @param[in] rhs An instance of %FloatMatrix4
+ * @return A reference to this instance
+ * @param[in] rhs An instance of %FloatMatrix4
*/
FloatMatrix4& operator =(const FloatMatrix4& rhs);
/**
- * Assigns the value to each matrix members of current instance of %FloatMatrix4.
+ * Assigns the value to each matrix member of the current instance of %FloatMatrix4.
*
* @since 2.0
*
- * @return The reference to this instance
+ * @return A reference to this instance
* @param[in] value A @c float value to assign
*/
FloatMatrix4& operator =(float value);
*
* @since 2.0
*
- * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
- * @param[in] rhs An instance of %FloatMatrix4
+ * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
+ * @param[in] rhs An instance of %FloatMatrix4
*/
FloatMatrix4 operator *(const FloatMatrix4& rhs) const;
*
* @since 2.0
*
- * @return A new instance of %FloatVector4 containing the resulting value of the operation
- * @param[in] vector An instance of %FloatVector4
+ * @return A new instance of %FloatVector4 containing the resulting value of the operation
+ * @param[in] vector An instance of %FloatVector4
*/
FloatVector4 operator *(const FloatVector4& vector) const;
/**
- * Multiplies the value to each matrix members of current instance of %FloatMatrix4.
+ * Multiplies the value to each matrix member of the current instance of %FloatMatrix4.
*
* @since 2.0
*
- * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
+ * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
* @param[in] value A @c float value to multiply
*/
FloatMatrix4 operator *(float value) const;
*
* @since 2.0
*
- * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
- * @param[in] rhs An instance of %FloatMatrix4
+ * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
+ * @param[in] rhs An instance of %FloatMatrix4
*/
FloatMatrix4 operator +(const FloatMatrix4& rhs) const;
/**
- * Adds the value to each matrix members of current instance of %FloatMatrix4.
+ * Adds the value to each matrix member of the current instance of %FloatMatrix4.
*
* @since 2.0
*
- * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
+ * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
* @param[in] value A @c float value to add
*/
FloatMatrix4 operator +(float value) const;
*
* @since 2.0
*
- * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
+ * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
* @param[in] rhs An instance of %FloatMatrix4
*/
FloatMatrix4 operator -(const FloatMatrix4& rhs) const;
/**
- * Subtracts the value from each matrix members of current instance of %FloatMatrix4.
+ * Subtracts the value from each matrix member of the current instance of %FloatMatrix4.
*
* @since 2.0
*
- * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
+ * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
* @param[in] value A @c float value to subtract
*/
FloatMatrix4 operator -(float value) const;
*
* @since 2.0
*
- * @return The reference to %FloatMatrix4 containing the resulting value of the operation
- * @param[in] rhs An instance of %FloatMatrix4
+ * @return A reference to %FloatMatrix4 containing the resulting value of the operation
+ * @param[in] rhs An instance of %FloatMatrix4
*/
FloatMatrix4& operator *=(const FloatMatrix4& rhs);
/**
- * Multiplies the value to each matrix members of current instance of %FloatMatrix4.
+ * Multiplies the value with each matrix member of the current instance of %FloatMatrix4.
*
* @since 2.0
*
- * @return The reference to %FloatMatrix4 containing the resulting value of the operation
+ * @return A reference to %FloatMatrix4 containing the resulting value of the operation
* @param[in] value A @c float value to multiply
*/
FloatMatrix4& operator *=(float value);
*
* @since 2.0
*
- * @return The reference to %FloatMatrix4 containing the resulting value of the operation
- * @param[in] rhs An instance of %FloatMatrix4
+ * @return The reference to %FloatMatrix4 containing the resulting value of the operation
+ * @param[in] rhs An instance of %FloatMatrix4
*/
FloatMatrix4& operator +=(const FloatMatrix4& rhs);
/**
- * Adds the value to each matrix members of current instance of %FloatMatrix4.
+ * Adds the value to each matrix member of the current instance of %FloatMatrix4.
*
* @since 2.0
*
*
* @since 2.0
*
- * @return The reference to %FloatMatrix4 containing the resulting value of the operation
- * @param[in] rhs An instance of %FloatMatrix4
+ * @return The reference to %FloatMatrix4 containing the resulting value of the operation
+ * @param[in] rhs An instance of %FloatMatrix4
*/
FloatMatrix4& operator -=(const FloatMatrix4& rhs);
/**
- * Subtracts the value from each matrix members of current instance of %FloatMatrix4.
+ * Subtracts the value from each matrix member of the current instance of %FloatMatrix4.
*
* @since 2.0
*
- * @return The reference to %FloatMatrix4 containing the resulting value of the operation
+ * @return The reference to %FloatMatrix4 containing the resulting value of the operation
* @param[in] value A @c float value to subtract
*/
FloatMatrix4& operator -=(float value);
/**
- * Gets the instance of %FloatMatrix4 resulting from the sum of the value and the specified instance of %FloatMatrix4.
+ * Gets an instance of %FloatMatrix4 resulting from the sum of the value and the specified instance of %FloatMatrix4.
*
* @since 2.0
*
- * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
+ * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
* @param[in] value A @c float value to add
- * @param[in] rhs An instance of %FloatMatrix4
+ * @param[in] rhs An instance of %FloatMatrix4
*/
_OSP_EXPORT_ friend FloatMatrix4 operator +(const float& value, const FloatMatrix4& rhs);
/**
- * Gets the instance of %FloatMatrix4 resulting from the product of the value and the specified instance of %FloatMatrix4.
+ * Gets an instance of %FloatMatrix4 resulting from the product of the value and the specified instance of %FloatMatrix4.
*
* @since 2.0
*
- * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
+ * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
* @param[in] value A @c float value to multiply
- * @param[in] rhs An instance of %FloatMatrix4
+ * @param[in] rhs An instance of %FloatMatrix4
*/
_OSP_EXPORT_ friend FloatMatrix4 operator *(const float& value, const FloatMatrix4& rhs);
/**
- * Gets the instance of %FloatMatrix4 resulting from the difference between the value and the specified instance of %FloatMatrix4.
+ * Gets an instance of %FloatMatrix4 resulting from the difference between the value and the specified instance of %FloatMatrix4.
*
* @since 2.0
*
- * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
+ * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
* @param[in] value A @c float value to subtract
- * @param[in] rhs An instance of %FloatMatrix4
+ * @param[in] rhs An instance of %FloatMatrix4
*/
_OSP_EXPORT_ friend FloatMatrix4 operator -(const float& value, const FloatMatrix4& rhs);
*
* @since 2.0
*
- * @return @c true if the values of the current instance is equal to the value of the specified instance, @n
- * else @c false
- * @param[in] obj An instance of %FloatMatrix4
- * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Matrix components to compare the two instances.
+ * @return @c true if the values of the current instance is equal to the value of the specified instance, @n
+ * else @c false
+ * @param[in] obj An instance of %FloatMatrix4
+ * @remarks
+ * - This method overrides Tizen::Base::Object::Equals().
+ * - This method uses the values of the Matrix components to compare the two instances.
*/
virtual bool Equals(const Tizen::Base::Object& obj) const;
*
* @since 2.0
*
- * @return The hash value of the current instance
- * @remarks Two equal instances must return the same hash value. For better performance,
- * the used hash function must generate a random distribution for all inputs.
+ * @return The hash value of the current instance
+ * @remarks Two equal instances must return the same hash value. @n For better performance, the used hash function must
+ * generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
float GetDeterminant(void) const;
/**
- * Gets the inverse matrix of the current instance of %FloatMatrix4.
+ * Gets the current instance of %FloatMatrix4 as an inverse matrix.
*
* @since 2.0
*
- * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
- * @remarks This method must be called after checking whether the matrix is invertible or not.
+ * @return A new instance of %FloatMatrix4 containing the resulting value of the operation
+ * @remarks This method must be called after checking whether the matrix is invertible or not.
*/
FloatMatrix4 GetInverse(void) const;
float GetTrace(void) const;
/**
- * Gets the transpose matrix of the current instance of %FloatMatrix4.
+ * Gets the current instance of %FloatMatrix4 as a transpose matrix.
*
* @since 2.0
*
void Negate(void);
/**
- * Sets the identity matrix to the current instance of %FloatMatrix4.
+ * Sets the current instance of %FloatMatrix4 as an identity matrix.
*
* @since 2.0
*/
void SetAsIdentity(void);
/**
- * Sets the inverse matrix to the current instance of %FloatMatrix4.
+ * Sets the current instance of %FloatMatrix4 as an inverse matrix.
*
* @since 2.0
*
* @return An error code
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current instance is not invertible.
*/
result Invert(void);
/**
- * Sets the transposed matrix to the current instance of %FloatMatrix4.
+ * Sets the current instance of %FloatMatrix4 as a transpose matrix.
*
* @since 2.0
*/
void Transpose(void);
/**
- * Sets the matrix members of current instance of %FloatMatrix4 to zero.
+ * Sets the matrix members of the current instance of %FloatMatrix4 to zero.
*
* @since 2.0
*/
*
* @since 2.0
*
- * The %FloatPoint class represents a location in a two-dimensional coordinate space specified with an single precision floating point.
+ * The %FloatPoint class represents a location in a two-dimensional coordinate space specified with a single precision floating point.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/graphics/shapes.htm">Shapes</a>.
*/
FloatPoint operator+(const FloatPoint& rhs) const;
/**
- * Subtracts the value of the specified instance of %FloatPoint and the current instance.
+ * Subtracts the value of the specified instance of %FloatPoint from the current instance.
*
* @since 2.0
*
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks Two equal instances must return the same hash value. For better performance,
+ * @remarks Two equal instances must return the same hash value. @n For better performance,
* the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
*
* @since 2.0
*
- * @param[in] rhs An instance of %FloatPoint3
+ * @param[in] rhs An instance of %FloatPoint3
*/
FloatPoint3(const FloatPoint3& rhs);
*
* @since 2.0
*
- * @param[in] vector An instance of %FloatVector4
- * @remarks The normalized vector can only be converted to point. Therefore, when the input vector is not normalized then the point is converted from the normal vector of the input instance.
+ * @param[in] vector An instance of %FloatVector4
+ * @remarks The normalized vector can only be converted to point. Therefore, when the input vector is not normalized then
+ * the point is converted from the normal vector of the input instance.
*/
explicit FloatPoint3(const FloatVector4& vector);
*
* @since 2.0
*
- * @param[in] x x component of point instance
- * @param[in] y y component of point instance
- * @param[in] z z component of point instance
+ * @param[in] x The x component of point instance
+ * @param[in] y The y component of point instance
+ * @param[in] z The z component of point instance
*/
FloatPoint3(float x, float y, float z);
*
* @since 2.0
*
- * @return @c true if all members of the current point instance are equal to the corresponding point members in the specified instance, @n
- * else @c false
- * @param[in] rhs An instance of %FloatPoint3
+ * @return @c true if all members of the current point instance are equal to the corresponding point members in the specified instance, @n
+ * else @c false
+ * @param[in] rhs An instance of %FloatPoint3
*/
bool operator ==(const FloatPoint3& rhs) const;
*
* @since 2.0
*
- * @return @c true if all point members of the current instance are not equal to the corresponding point members in the specified instance, @n
- * else @c false
- * @param[in] rhs An instance of %FloatPoint3
+ * @return @c true if all point members of the current instance are not equal to the corresponding point members in the specified instance, @n
+ * else @c false
+ * @param[in] rhs An instance of %FloatPoint3
*/
inline bool operator !=(const FloatPoint3& rhs) const
{
*
* @since 2.0
*
- * @return The reference to this instance
- * @param[in] rhs An instance of %FloatPoint3
+ * @return The reference to this instance
+ * @param[in] rhs An instance of %FloatPoint3
*/
FloatPoint3& operator =(const FloatPoint3& rhs);
/**
- * Multiplies the value to each point members of current instance of %FloatPoint3.
+ * Multiplies the value with each point members of current instance of %FloatPoint3.
*
* @since 2.0
*
- * @return A new instance of %FloatPoint3 containing the resulting value of the operation
- * @param[in] value A @c float value to multiply
+ * @return A new instance of %FloatPoint3 containing the resulting value of the operation
+ * @param[in] value A @c float value to multiply
*/
FloatPoint3 operator *(float value) const;
*
* @since 2.0
*
- * @return A new instance of %FloatPoint3 containing the resulting value of the operation
+ * @return A new instance of %FloatPoint3 containing the resulting value of the operation
* @param[in] value A @c float value to divide
*/
FloatPoint3 operator /(float value) const;
*
* @since 2.0
*
- * @return A new instance of %FloatPoint3 containing the resulting value of the operation
- * @param[in] rhs An instance of %FloatPoint3
+ * @return A new instance of %FloatPoint3 containing the resulting value of the operation
+ * @param[in] rhs An instance of %FloatPoint3
*/
FloatPoint3 operator +(const FloatPoint3& rhs) const;
*
* @since 2.0
*
- * @return A new instance of %FloatPoint3 containing the resulting value of the operation
- * @param[in] rhs An instance of %FloatPoint3
+ * @return A new instance of %FloatPoint3 containing the resulting value of the operation
+ * @param[in] rhs An instance of %FloatPoint3
*/
FloatPoint3 operator -(const FloatPoint3& rhs) const;
*
* @since 2.0
*
- * @return The reference to %FloatPoint3 containing the resulting value of the operation
- * @param[in] rhs An instance of %FloatPoint3
+ * @return The reference to %FloatPoint3 containing the resulting value of the operation
+ * @param[in] rhs An instance of %FloatPoint3
*/
FloatPoint3& operator +=(const FloatPoint3& rhs);
*
* @since 2.0
*
- * @return The reference to %FloatPoint3 containing the resulting value of the operation
- * @param[in] rhs An instance of %FloatPoint3
+ * @return The reference to %FloatPoint3 containing the resulting value of the operation
+ * @param[in] rhs An instance of %FloatPoint3
*/
FloatPoint3& operator -=(const FloatPoint3& rhs);
*
* @since 2.0
*
- * @return @c true if the values of the current instance is equal to the value of the specified instance, @n
- * else @c false
- * @param[in] obj An instance of %FloatPoint3
- * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Point components to compare the two instances.
+ * @return @c true if the values of the current instance is equal to the value of the specified instance, @n
+ * else @c false
+ * @param[in] obj An instance of %FloatPoint3
+ * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Point
+ * components to compare the two instances.
*/
virtual bool Equals(const Tizen::Base::Object& obj) const;
*
* @since 2.0
*
- * @return The hash value of the current instance
- * @remarks Two equal instances must return the same hash value. For better performance,
+ * @return The hash value of the current instance
+ * @remarks Two equal instances must return the same hash value. @n For better performance,
* the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
/**
- * x component of the current instance of %FloatPoint3.
+ * The x component of the current instance of %FloatPoint3.
*
* @since 2.0
*/
float x;
/**
- * y component of the current instance of %FloatPoint3.
+ * The y component of the current instance of %FloatPoint3.
*
* @since 2.0
*/
float y;
/**
- * z component of the current instance of %FloatPoint3.
+ * The z component of the current instance of %FloatPoint3.
*
* @since 2.0
*/
}; // FloatPoint3
/**
- * Gets the instance of %FloatPoint3 resulting from the product of the value and the specified instance of %FloatPoint3.
+ * Gets an instance of %FloatPoint3 resulting from the product of the value and the specified instance of %FloatPoint3.
*
* @since 2.0
*
- * @return A new instance of %FloatPoint3 containing the resulting value of the operation
+ * @return A new instance of %FloatPoint3 containing the resulting value of the operation
* @param[in] value A @c float value to multiply
- * @param[in] rhs An instance of %FloatPoint3
+ * @param[in] rhs An instance of %FloatPoint3
*/
_OSP_EXPORT_ FloatPoint3 operator *(const float& value, const FloatPoint3& rhs);
/**
- * Gets the instance of %FloatPoint3 resulting from the divide of the value and the specified instance of %FloatPoint3.
+ * Gets an instance of %FloatPoint3 resulting from the divide operation of the value and the specified instance of %FloatPoint3.
*
* @since 2.0
*
- * @return A new instance of %FloatPoint3 containing the resulting value of the operation
+ * @return A new instance of %FloatPoint3 containing the resulting value of the operation
* @param[in] value A @c float value to divide
- * @param[in] rhs An instance of %FloatPoint3
+ * @param[in] rhs An instance of %FloatPoint3
*/
_OSP_EXPORT_ FloatPoint3 operator /(const float& value, const FloatPoint3& rhs);
*
* @since 2.0
*
- * @param[in] rhs An instance of %FloatVector4
+ * @param[in] rhs An instance of %FloatVector4
*/
FloatVector4(const FloatVector4& rhs);
* @since 2.0
*
* @param[in] point An instance of %FloatPoint3
- * @remarks The point is converted to normal vector.
+ * @remarks The point is converted to normal vector.
*/
explicit FloatVector4(const FloatPoint3& point);
*
* @since 2.0
*
- * @param[in] x x component of vector instance
- * @param[in] y y component of vector instance
- * @param[in] z z component of vector instance
- * @param[in] w w component of vector instance
+ * @param[in] x The x component of the vector instance
+ * @param[in] y The y component of the vector instance
+ * @param[in] z The z component of the vector instance
+ * @param[in] w The w component of the vector instance
*/
FloatVector4(float x, float y, float z, float w);
*
* @since 2.0
*
- * @return @c true if all members of the current vector instance are equal to the corresponding vector members in the specified instance, @n
- * else @c false
- * @param[in] rhs An instance of %FloatVector4
+ * @return @c true if all members of the current vector instance are equal to the corresponding vector members in the specified instance, @n
+ * else @c false
+ * @param[in] rhs An instance of %FloatVector4
*/
bool operator ==(const FloatVector4& rhs) const;
*
* @since 2.0
*
- * @return @c true if all vector members of the current instance are not equal to the corresponding vector members in the specified instance, @n
- * else @c false
- * @param[in] rhs An instance of %FloatVector4
+ * @return @c true if all vector members of the current instance are not equal to the corresponding vector members in the specified instance, @n
+ * else @c false
+ * @param[in] rhs An instance of %FloatVector4
*/
inline bool operator !=(const FloatVector4& rhs) const
{
*
* @since 2.0
*
- * @return The reference to this instance
- * @param[in] rhs An instance of %FloatVector4
+ * @return The reference to this instance
+ * @param[in] rhs An instance of %FloatVector4
*/
FloatVector4& operator =(const FloatVector4& rhs);
/**
- * Multiplies the value to each vector members of current instance of %FloatVector4.
+ * Multiplies the value to each vector member of the current instance of %FloatVector4.
*
* @since 2.0
*
- * @return A new instance of %FloatVector4 containing the resulting value of the operation
+ * @return A new instance of %FloatVector4 containing the resulting value of the operation
* @param[in] value A @c float value to multiply
*/
FloatVector4 operator *(float value) const;
/**
- * Divides each vector members of current instance of %FloatVector4 with the specified value.
+ * Divides each vector member of the current instance of %FloatVector4 with the specified value.
*
* @since 2.0
*
- * @return A new instance of %FloatVector4 containing the resulting value of the operation
+ * @return A new instance of %FloatVector4 containing the resulting value of the operation
* @param[in] value A @c float value to divide
*/
FloatVector4 operator /(float value) const;
*
* @since 2.0
*
- * @return A new instance of %FloatVector4 containing the resulting value of the operation
- * @param[in] rhs An instance of %FloatVector4
+ * @return A new instance of %FloatVector4 containing the resulting value of the operation
+ * @param[in] rhs An instance of %FloatVector4
*/
FloatVector4 operator +(const FloatVector4& rhs) const;
*
* @since 2.0
*
- * @return A new instance of %FloatVector4 containing the resulting value of the operation
- * @param[in] rhs An instance of %FloatVector4
+ * @return A new instance of %FloatVector4 containing the resulting value of the operation
+ * @param[in] rhs An instance of %FloatVector4
*/
FloatVector4 operator -(const FloatVector4& rhs) const;
*
* @since 2.0
*
- * @return The reference to %FloatVector4 containing the resulting value of the operation
- * @param[in] rhs An instance of %FloatVector4
+ * @return The reference to %FloatVector4 containing the resulting value of the operation
+ * @param[in] rhs An instance of %FloatVector4
*/
FloatVector4& operator +=(const FloatVector4& rhs);
*
* @since 2.0
*
- * @return The reference to %FloatVector4 containing the resulting value of the operation
- * @param[in] rhs An instance of %FloatVector4
+ * @return The reference to %FloatVector4 containing the resulting value of the operation
+ * @param[in] rhs An instance of %FloatVector4
*/
FloatVector4& operator -=(const FloatVector4& rhs);
*
* @since 2.0
*
- * @return The value of the operation.
- * @param[in] rhs An instance of %FloatVector4
+ * @return The value of the operation.
+ * @param[in] rhs An instance of %FloatVector4
*/
float DotProduct(const FloatVector4& rhs) const;
*
* @since 2.0
*
- * @return The value of the operation.
- * @param[in] rhs An instance of %FloatVector4
+ * @return The value of the operation.
+ * @param[in] rhs An instance of %FloatVector4
*/
float operator *(const FloatVector4& rhs) const;
*
* @since 2.0
*
- * @return @c true if the values of the current instance is equal to the value of the specified instance, @n
- * else @c false
- * @param[in] obj An instance of %FloatVector4
- * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Vector components to compare the two instances.
+ * @return @c true if the values of the current instance is equal to the value of the specified instance, @n
+ * else @c false
+ * @param[in] obj An instance of %FloatVector4
+ * @remarks
+ * - This method overrides Tizen::Base::Object::Equals().
+ * - This method uses the values of the Vector components to compare the two instances.
*/
virtual bool Equals(const Tizen::Base::Object& obj) const;
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks Two equal instances must return the same hash value. For better performance,
- * the used hash function must generate a random distribution for all inputs.
+ * @remarks Two equal instances must return the same hash value. @n For better performance,
+ * the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
FloatVector4 GetNormal(void) const;
/**
- * Normalize the current instance of %FloatVector4.
+ * Normalizes the current instance of %FloatVector4.
*
* @since 2.0
*/
void Normalize(void);
/**
- * x component of the current instance of %FloatVector4.
+ * The x component of the current instance of %FloatVector4.
*
* @since 2.0
*/
float x;
/**
- * y component of the current instance of %FloatVector4.
+ * The y component of the current instance of %FloatVector4.
*
* @since 2.0
*/
float y;
/**
- * z component of the current instance of %FloatVector4.
+ * The z component of the current instance of %FloatVector4.
*
* @since 2.0
*/
float z;
/**
- * w component of the current instance of %FloatVector4.
+ * The w component of the current instance of %FloatVector4.
*
* @since 2.0
*/
}; // FloatVector4
/**
- * Gets the instance of %FloatVector4 resulting from the product of the value and the specified instance of %FloatVector4.
+ * Gets an instance of %FloatVector4 resulting from the product of the value and the specified instance of %FloatVector4.
*
* @since 2.0
*
- * @return A new instance of %FloatVector4 containing the resulting value of the operation
+ * @return A new instance of %FloatVector4 containing the resulting value of the operation
* @param[in] value A @c float value to multiply
- * @param[in] rhs An instance of %FloatVector4
+ * @param[in] rhs An instance of %FloatVector4
*/
_OSP_EXPORT_ FloatVector4 operator *(const float& value, const FloatVector4& rhs);
/**
- * Gets the instance of %FloatVector4 resulting from the divide of the value and the specified instance of %FloatVector4.
+ * Gets an instance of %FloatVector4 resulting from the divide operation of the value and the specified instance of %FloatVector4.
*
* @since 2.0
*
- * @return A new instance of %FloatVector4 containing the resulting value of the operation
+ * @return A new instance of %FloatVector4 containing the resulting value of the operation
* @param[in] value A @c float value to divide
- * @param[in] rhs An instance of %FloatVector4
+ * @param[in] rhs An instance of %FloatVector4
*/
_OSP_EXPORT_ FloatVector4 operator /(const float& value, const FloatVector4& rhs);
public:
/**
* This is the default constructor for this class.
+ * After creating an instance of this class, one of the
+ * Construct() methods must be called explicitly to initialize this instance.
*
* @since 2.0
- *
- * @remarks After creating an instance of this class, one of the
- * Construct() methods must be called explicitly to initialize this instance.
*/
Font(void);
* @since 2.0
*
* @return An error code
- * @param[in] style The font style @n
+ * @param[in] style The font style @n
* For more information, see Tizen::Graphics::FontStyle.
* @param[in] size The font size in pixels @n
- * The size must be greater than @c 0.
+ * The size must be greater than @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
* For more information, see @ref CompIoPathPage "IoPath" and @ref CompFontConstructPage "FontConstructor" issues.
* @endif
* @return An error code
- * @param[in] fontNameOrPath The local file path of a font-resource file or app font name or system font name @n
- * The app font name is retrieved using GetFaceName(Tizen::Base::String& filepath).
- * The system font name is retrieved using GetSystemFontListN().
- * @param[in] style The font style @n
- * Multiple styles can be combined using the bitwise OR operator.
- * @param[in] size The font size in pixels @n
- * The size must be greater than @c 0.
+ * @param[in] fontNameOrPath The local file path of a font-resource file or app font name or system font name @n
+ * The app font name is retrieved using GetFaceName(Tizen::Base::String& filepath).
+ * The system font name is retrieved using GetSystemFontListN().
+ * @param[in] style The font style @n
+ * Multiple styles can be combined using the bitwise OR operator.
+ * @param[in] size The font size in pixels @n
+ * The size must be greater than @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_FILE_NOT_FOUND The specified font cannot be found or accessed.
* @exception E_UNSUPPORTED_FORMAT The specified font format is not supported.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @remarks Only TrueType font is supported.
- * The value of fontNameOrPath is considered system font name if it matches one of the retrieved values using GetSystemFontListN().
- * If not, it is considered local file path of a font-resource file.
+ * @remarks
+ * - Only TrueType font is supported.
+ * - The value of @c fontNameOrPath is considered a system font name if it matches one of the retrieved values using GetSystemFontListN().
+ * If not, it is considered a local file path of a font-resource file.
*/
result Construct(const Tizen::Base::String& fontNameOrPath, int style, int size);
* @page CompFontConstructPage Compatibility for Construct().
* @section CompFontConstructPageIssueSection Issues
* Implementing this method in OSP compatible applications has the following issues: @n
- * -# In OSP, the value of 1 st parameter(fontNameOrPath) can be system font name or local font path. At first, it is compared to the retrieved values using GetSystemFontListN(). If the matched value is exist, it is considered system font name. Or, it is considered local file path of a font-resource file.
- * -# In Tizen, the value of 1 st parameter(fontNameOrPath) can be app font name or system font name or local font path. At first, it is compared to the font face names in app font resource folder. If the matched value is exist, it is considered app font name. Or, it is considered system font name if it matches one of the retrieved values using GetSystemFontListN().
+ * -# In OSP, the value of 1st parameter(fontNameOrPath) can be system font name or local font path. At first, it is compared to the retrieved values using GetSystemFontListN(). If the matched value exists, it is considered a system font name, else it is considered a local file path of a font-resource file.
+ * -# In Tizen, the value of 1st parameter(fontNameOrPath) can be app font name or system font name or local font path. At first, it is compared to the font face names in app font resource folder. If the matched value is exist, it is considered an app font name, else it is considered a system font name if it matches one of the retrieved values using GetSystemFontListN().
* @endif
*/
* @since 2.0
*
* @return An error code
- * @param[in] fontData The font data
- * @param[in] style The font style @n
- * Multiple styles can be combined using the bitwise OR operator.
- * @param[in] size The font size in pixels @n
- * The size must be greater than @c 0.
+ * @param[in] fontData The font data
+ * @param[in] style The font style @n
+ * Multiple styles can be combined using the bitwise OR operator.
+ * @param[in] size The font size in pixels @n
+ * The size must be greater than @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_UNSUPPORTED_FORMAT The specified font format is not supported.
* @since 2.1
*
* @return An error code
- * @param[in] style The font style @n
+ * @param[in] style The font style @n
* For more information, see Tizen::Graphics::FontStyle.
* @param[in] size The font size in pixels @n
- * The size must be greater than @c 0.
+ * The size must be greater than @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
* @since 2.1
*
* @return An error code
- * @param[in] fontNameOrPath The local file path of a font-resource file or system font name @n
- * The system font name is retrieved using GetSystemFontListN().
- * @param[in] style The font style @n
- * Multiple styles can be combined using the bitwise OR operator.
- * @param[in] size The font size in pixels @n
- * The size must be greater than @c 0.
+ * @param[in] fontNameOrPath The local file path of a font-resource file or system font name @n
+ * The system font name is retrieved using GetSystemFontListN().
+ * @param[in] style The font style @n
+ * Multiple styles can be combined using the bitwise OR operator.
+ * @param[in] size The font size in pixels @n
+ * The size must be greater than @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_FILE_NOT_FOUND The specified font cannot be found or accessed.
* @exception E_UNSUPPORTED_FORMAT The specified font format is not supported.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @remarks Only TrueType font is supported.
- * The value of @c fontNameOrPath is considered as the default system font name if it matches to any one of the values that is retrieved using GetSystemFontListN().
- * If not, it is considered as the local file path of a font-resource file.
+ * @remarks
+ * - Only TrueType font is supported.
+ * - The value of @c fontNameOrPath is considered as the default system font name if it matches any one of the values
+ * that is retrieved using GetSystemFontListN(). If not, it is considered a local file path of a font-resource file.
*/
result Construct(const Tizen::Base::String& fontNameOrPath, int style, float size);
* @since 2.1
*
* @return An error code
- * @param[in] fontData The font data
- * @param[in] style The font style @n
- * Multiple styles can be combined using the bitwise OR operator.
- * @param[in] size The font size in pixels @n
- * The size must be greater than @c 0.
+ * @param[in] fontData The font data
+ * @param[in] style The font style @n
+ * Multiple styles can be combined using the bitwise OR operator.
+ * @param[in] size The font size in pixels @n
+ * The size must be greater than @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_UNSUPPORTED_FORMAT The specified font format is not supported.
*
* @since 2.0
*
- * @return The ascender of the current instance of %Font, @n
+ * @return The ascender of the current instance of %Font, @n
* else @c -1 if the method fails
*/
int GetAscender(void) const;
*
* @since 2.1
*
- * @return The ascender of the current instance of %Font, @n
+ * @return The ascender of the current instance of %Font, @n
* else @c -1 if the method fails
*/
float GetAscenderF(void) const;
*
* @since 2.0
*
- * @return The descender of the current instance of %Font, @n
+ * @return The descender of the current instance of %Font, @n
* else @c -1 if the method fails
*/
int GetDescender(void) const;
*
* @since 2.1
*
- * @return The descender of the current instance of %Font, @n
+ * @return The descender of the current instance of %Font, @n
* else @c -1 if the method fails
*/
float GetDescenderF(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] character A character for getting left bear
- * @param[out] leftBear The left bear of the specified @c character
- * @exception E_SUCCESS The method is successful.
- * @exception E_DATA_NOT_FOUND The requested data does not exist.
+ * @param[in] character A character for getting left bear
+ * @param[out] leftBear The left bear of the specified @c character
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_DATA_NOT_FOUND The requested data does not exist.
*/
result GetLeftBear(wchar_t character, int& leftBear) const;
* @since 2.1
*
* @return An error code
- * @param[in] character A character for getting left bear
- * @param[out] leftBear The left bear of the specified @c character
- * @exception E_SUCCESS The method is successful.
- * @exception E_DATA_NOT_FOUND The requested data does not exist.
+ * @param[in] character The character for getting left bear
+ * @param[out] leftBear The left bear of the specified @c character
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_DATA_NOT_FOUND The requested data does not exist.
*/
result GetLeftBear(wchar_t character, float& leftBear) const;
* @since 2.0
*
* @return An error code
- * @param[in] character A character for getting the right bear
- * @param[out] rightBear The right bear of the specified @c character
- * @exception E_SUCCESS The method is successful.
- * @exception E_DATA_NOT_FOUND The requested data does not exist.
+ * @param[in] character The character for getting the right bear
+ * @param[out] rightBear The right bear of the specified @c character
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_DATA_NOT_FOUND The requested data does not exist.
*/
result GetRightBear(wchar_t character, int& rightBear) const;
* @since 2.1
*
* @return An error code
- * @param[in] character A character for getting the right bear
- * @param[out] rightBear The right bear of the specified @c character
- * @exception E_SUCCESS The method is successful.
- * @exception E_DATA_NOT_FOUND The requested data does not exist.
+ * @param[in] character A character for getting the right bear
+ * @param[out] rightBear The right bear of the specified @c character
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_DATA_NOT_FOUND The requested data does not exist.
*/
result GetRightBear(wchar_t character, float& rightBear) const;
*
* @return An error code
* @param[in] text The string
- * @param[in] length The length of @c text @n
+ * @param[in] length The length of @c text @n
* The length must be greater than or equal to @c 0.
* @param[out] dim The width and height of the font of the @c text
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The value of @c length is greater than the actual length of @c text.
+ * @exception E_OUT_OF_RANGE The specified @c length is greater than the actual length of @c text.
*/
result GetTextExtent(const Tizen::Base::String& text, int length, Dimension& dim) const;
* @page CompFontGetTextExtentPage Compatibility for the file path.
* @section CompFontGetTextExtentPageIssueSection Issues
* Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns exact height only if the font resource is designed to fit inside the emBox. @n
+ * -# The method returns the exact height only if the font resource is designed to fit inside the emBox. @n
*
* @section CompFontGetTextExtentPageSolutionSection Resolutions
* This issue has been resolved in Tizen. @n
- * -# The method returns exact height regardless of font design. @n
+ * -# The method returns the exact height regardless of font design. @n
*
* @endif
*/
*
* @return An error code
* @param[in] text The string
- * @param[in] length The length of @c text @n
+ * @param[in] length The length of @c text @n
* The length must be greater than or equal to @c 0.
* @param[out] dim The width and height of the font of the @c text
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The value of @c length is greater than the actual length of @c text.
+ * @exception E_OUT_OF_RANGE The specified @c length is greater than the actual length of @c text.
*/
result GetTextExtent(const Tizen::Base::String& text, int length, FloatDimension& dim) const;
* @since 2.0
*
* @return @c true if an extra style is not defined for the current instance, @n
- * else @c false
+ * else @c false
*/
bool IsPlain(void) const;
*
* @return The list of system fonts @n
* The font list consists of Tizen::Base::String items.
- * @remarks After using the system font list, you can call IList::RemoveAll(true) to clean up string items in the list.
+ * @remarks After using the system font list, you can call IList::RemoveAll(true) to clean up string items in the list.
*/
static Tizen::Base::Collection::IList* GetSystemFontListN(void);
*
* @since 2.0
*
- * @return The face name of the font file of the specific path
+ * @return The face name of the font file of the specific path
* @param[in] filePath The path of the font file
*/
static Tizen::Base::String GetFaceName(const Tizen::Base::String& filePath);
/**
* @file FGrpFontCommon.h
- * @brief This is the header file for the enumerations of the Font class.
+ * @brief This is the header file for the enumerations of the %Font class.
*
* This header file contains the definitions of the enumerations of the Font class.
*/
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n For full construction, the Construct() method must
+ * be called right after calling this constructor.
*
* @since 2.0
*
* Initializes this instance of %GlPlayer.
*
* @since 2.0
- * @return An error code
- * @param[in] version EGL Context Client Version @n
- * The version must be 1(OpenGL-ES 1.x) or 2(OpenGL-ES 2.x).
- * @param[in] pControl A pointer of the target control @n
- * Only Tizen::Ui::Controls::Frame and Tizen::Ui::Controls::Form are allowed as the target control.
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG Either the @c pControl is not Form or Frame, or
- * the @c version is not @c EGL_CONTEXT_CLIENT_VERSION_1_X or @c EGL_CONTEXT_CLIENT_VERSION_2_X.
+ * @return An error code
+ * @param[in] version EGL Context Client Version @n
+ * The version must be 1(OpenGL-ES 1.x) or 2(OpenGL-ES 2.x).
+ * @param[in] pControl A pointer of the target control @n
+ * Only Tizen::Ui::Controls::Frame and Tizen::Ui::Controls::Form are allowed as the target control.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c pControl is not Form or Frame.
+ * - The @c version is not @c EGL_CONTEXT_CLIENT_VERSION_1_X or @c EGL_CONTEXT_CLIENT_VERSION_2_X.
* @exception E_INVALID_OPERATION The operation has failed, because of the duplicate call of Construct().
*
*/
* Starts the %GlPlayer, and initializes EGL status.
*
* @since 2.0
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM Player cannot be started properly due to a severe system error.
- * @exception E_INVALID_STATE The state of player is not suitable for start. For example, it is not allowable to start player when its state is pause.
- * @exception E_OPENGL_ERROR There occurs an EGL error during performing EGL function.
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM Player cannot be started properly due to a severe system error.
+ * @exception E_INVALID_STATE The state of player is not suitable for start. @n
+ * For example, it is not allowable to start the player when its state is pause.
+ * @exception E_OPENGL_ERROR An EGL error occurs during performing EGL function.
*
- * @remarks In the case that this returns @c E_OPENGL_ERROR exception, developers can use eglGetError() to query which EGL error is raised.
+ * @remarks If this returns an @c E_OPENGL_ERROR exception, developers can use eglGetError() to query which EGL error is raised.
*
*/
result Start(void);
/**
- * Pause the %GlPlayer.
+ * Pauses the %GlPlayer.
*
* @since 2.0
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM Player cannot be paused properly due to a severe system error.
- * @exception E_INVALID_OPERATION Fail to perform the IGlRenderer::Pause() method which is implemented by developers.
- * @exception E_INVALID_STATE The state of player is not suitable for pause. For example, it is not allowable to pause player when it does not start after the initialization yet.
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM Player cannot be paused properly due to a severe system error.
+ * @exception E_INVALID_OPERATION Fails to execute the IGlRenderer::Pause() method implemented by the developer.
+ * @exception E_INVALID_STATE The state of player is not suitable for pause. @n
+ * For example, it is not allowable to pause the player when it does not start after the initialization.
*
*/
result Pause(void);
/**
- * Resume the %GlPlayer.
+ * Resumes the %GlPlayer.
*
* @since 2.0
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM Player cannot be resumed properly due to a severe system error.
- * @exception E_INVALID_OPERATION Fail to perform the IGlRenderer::Resume() method which is implemented by developers.
- * @exception E_INVALID_STATE The state of player is not suitable for resume. For example, it is not allowable to resume player when its state is stop.
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM Player cannot be resumed properly due to a severe system error.
+ * @exception E_INVALID_OPERATION Fails to execute the IGlRenderer::Resume() method implemented by the developer.
+ * @exception E_INVALID_STATE The state of player is not suitable for resume. @n
+ * For example, it is not allowable to resume the player when its state is stop.
*
*/
result Resume(void);
/**
- * Stop the %GlPlayer, and reset the EGL status.
+ * Stops the %GlPlayer, and resets the EGL status.
*
* @since 2.0
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM Player cannot be stopped properly due to a severe system error.
- * @exception E_INVALID_OPERATION Fail to perform the IGlRenderer::Pause() method which is implemented by developers.
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM Player cannot be stopped properly due to a severe system error.
+ * @exception E_INVALID_OPERATION Fails to execute the IGlRenderer::Pause() method implemented by the developer.
*
- * @remarks Before starting to reset the EGL status, this method calls IGlRenderer::Pause() to prevent unexpected behavior.
+ * @remarks Before starting to reset the EGL status, this method calls IGlRenderer::Pause() to prevent unexpected behavior.
*
*/
result Stop(void);
/**
- * Redraw the scene.
+ * Redraws the scene.
*
* @since 2.0
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_OPENGL_ERROR There occurs an EGL error during performing EGL function.
- * @exception E_INVALID_STATE The state of player is invalid and fails to pause properly.
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OPENGL_ERROR An EGL error occurs when executing an EGL function.
+ * @exception E_INVALID_STATE The state of the player is invalid and it fails to pause properly.
*
- * @remarks In the case that this returns @c E_OPENGL_ERROR exception, developers can use eglGetError() to query which EGL error is raised.
+ * @remarks If this returns @c E_OPENGL_ERROR exception, developers can use eglGetError() to query the EGL error that occurs.
*
*/
result Redraw(void);
/**
- * Set the FPS(frames per second) of the player.
+ * Sets the FPS(frames per second) of the player.
*
* @since 2.0
- * @param[in] fps frames per second
+ * @param[in] fps frames per second
*
- * @remarks When you give negative integer for fps, then the %GlPlayer try to draw frames as fast as possible.
+ * @remarks When you assign a negative integer for fps, the %GlPlayer tries to draw frames as fast as possible.
*
*/
void SetFps(int fps);
/**
- * Set the configuration list of EGL Attributes to initialize the EGL system.
+ * Sets the configuration list of EGL Attributes to initialize the EGL system.
*
* @since 2.0
- * @return An error code
+ * @return An error code
* @param[in] pEglConfigList A list of EGL attributes and their values
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*
- * @remarks %GlPlayer initializes the EGL status with the given EGL attributes, which means that system does not guarantees to set EGL configurations with the given attributes but prefers them.
- * @remarks The format of eglConfigList is the same with the attribute list as the second input parameter of eglChooseConfig function. For detailed description, refer <a href="http://www.khronos.org/opengles/documentation/opengles1_0/html/eglChooseConfig.html">here</a>.
+ * @remarks
+ * - %GlPlayer initializes the EGL status with the given EGL attributes, which means that system does not
+ * guarantee to set EGL configurations with the given attributes but prefers them.
+ * - The format of eglConfigList is the same with the attribute list as the second input parameter of
+ * the eglChooseConfig function. For detailed description, refer <a href="http://www.khronos.org/opengles/documentation/opengles1_0/html/eglChooseConfig.html">here</a>.
*
*/
result SetEglAttributeList(const EGLint* pEglConfigList);
/**
- * Set EGL configuration with the given preset.
+ * Sets the EGL configuration with the given preset.
*
* @since 2.0
* @return An error code
- * @param[in] preset Preset for attributes.
- * @exception E_SUCCESS The method is successful.
+ * @param[in] preset The preset for attributes
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*
- * @remarks %GlPlayer initializes the EGL status with the given EGL attributes, which means that system does not guarantees to set EGL configurations with the given attributes but prefers them.
+ * @remarks %GlPlayer initializes the EGL status with the given EGL attributes, which means that system does not
+ * guarantee to set the EGL configurations with the given attributes but prefers them.
*
*/
result SetEglAttributePreset(EglAttributesPreset preset);
/**
- * Set EGL configuration for the given Attribute with the given value.
+ * Sets the EGL configuration for the given attribute with the given value.
*
* @since 2.0
* @return An error code
- * @param[in] key EGL attribute
- * @param[in] value Value for the attribute
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @param[in] key The EGL attribute
+ * @param[in] value The value for the attribute
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
*
- * @remarks %GlPlayer initializes the EGL status with the given EGL attributes, which means that system does not guarantees to set EGL configurations with the given attributes but prefers them.
+ * @remarks %GlPlayer initializes the EGL status with the given EGL attributes, which means that system does not
+ * guarantee to set the EGL configurations with the given attributes but prefers them.
*
*/
result SetEglAttribute(EGLint key, EGLint value);
/**
- * Set the Renderer which implements %IGlRenderer interface.
+ * Sets the Renderer which implements %IGlRenderer interface.
*
* @since 2.0
* @return An error code
- * @param[in] pRenderer %IGlRenderer defines how to render the scene.
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION Fail to perform the IGlRenderer::InitializeGl() method which is implemented by developers.
- * @see %IGlRenderer
- *
- * @remarks If %GlPlayer already has a renderer, then the previous renderer is replaced by the new one.
- * @remarks If input parameter is null, then the current renderer of %GlPlayer is detached and %GlPlayer does nothing.
- * @remarks When the %IGlRenderer is replaced with the input, the GL status have to be initialized for the input %IGlRenderer. For such purpose, when the input %IGlRenderer is attached, the overrided IGlRenderer::InitializedGl() method is called. On the other hand, the previous %IGlRenderer of %GlPlayer is detached after calling the overrided %IGlRenderer::TerminateGL() method.
+ * @param[in] pRenderer %IGlRenderer defines how to render the scene.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION Fails to execute the IGlRenderer::InitializeGl() method implemented by the developer.
+ * @remarks
+ * - If %GlPlayer already has a renderer, then the previous renderer is replaced by the new one.
+ * - If the input parameter is @c null, then the current renderer of %GlPlayer is detached and %GlPlayer does nothing.
+ * - When the %IGlRenderer is replaced with the input, the GL status has to be initialized for the input %IGlRenderer.
+ * For such purposes, when the input %IGlRenderer is attached, the overridden IGlRenderer::InitializedGl() method is called.
+ * On the other hand, the previous %IGlRenderer of %GlPlayer is detached when the overridden %IGlRenderer::TerminateGL()
+ * method is called.
*
*/
result SetIGlRenderer(IGlRenderer* pRenderer);
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this.
+ * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called
+ * when the destructor of this.
*
* @since 2.0
*
*
* @since 2.0
* @return @c true if this method successfully initializes the GL status and allocate resources, such as shader and textures, @n
- else @c false if this method meets some errors or exceptions
+ * else @c false if this method encounters any errors or exceptions
*
*/
virtual bool InitializeGl(void) = 0;
/**
- * Terminates the Renderer to unload shader and release allocated resources.
+ * Terminates the Renderer to unload the shader and release allocated resources.
*
* @since 2.0
* @return @c true if this method successfully terminates the GL status and releases all the resources, such as shader and textures, @n
- else @c false if this method meets some errors or exceptions
+ * else @c false if this method encounters any errors or exceptions
*
*/
virtual bool TerminateGl(void) = 0;
/**
* Draws a scene. @n
- * Users overload the %Draw() method and calls necessary operations for drawing a scene in this system.
+ * Users overload the %Draw() method and call the necessary operations for drawing a scene in this system.
*
* @since 2.0
* @return @c true if this method successfully draws a scene with gl functions, @n
- else @c false if this method meets some errors or exceptions
+ * else @c false if this method encounters any errors or exceptions
*
*/
virtual bool Draw(void) = 0;
/**
- * Pauses the GlPlayer instance. @n
- * Users overload the %Pause() method and calls necessary operations for the pause of the system, including release of resources.
+ * Pauses a GlPlayer instance. @n
+ * Users overload the %Pause() method and call the necessary operations for the pause of the system, including release of resources.
*
* @since 2.0
- * @return @c true if this method successfully does intended operations for pause state, @n else @c false if this method meets some errors or exceptions
+ * @return @c true if this method successfully does the intended operations for pause state, @n
+ * else @c false if this method encounters any errors or exceptions
*
*/
virtual bool Pause(void) = 0;
/**
- * Resumes the GlPlayer instance. @n
- * Users overload the %Resume method and calls necessary operations for the resume of the system, including allocation of resources.
+ * Resumes a GlPlayer instance. @n
+ * Users overload the %Resume method and call the necessary operations for the resume of the system, including allocation of resources.
*
* @since 2.0
- * @return @c true if this method successfully does intended operations for resume state, @n else @c false if this method meets some errors or exceptions
+ * @return @c true if this method successfully does the intended operations for resume state, @n
+ * else @c false if this method encounters any errors or exceptions
*
*/
virtual bool Resume(void) = 0;
* @since 2.0
*
* @return The width of target control
- * @remarks The control width is determined when you register %IGlRenderer to %GlPlayer with the GlPlayer::SetIGlRenderer() method. Therefore, developers have to declare an integer variable for control width to implement this method.
+ * @remarks The control width is determined when you register %IGlRenderer to %GlPlayer with the GlPlayer::SetIGlRenderer()
+ * method. Therefore, developers have to declare an integer variable for control width to implement this method.
*
*/
virtual int GetTargetControlWidth(void) = 0;
* @since 2.0
*
* @return The height of target control
- * @remarks The control height is determined when you register %IGlRenderer to %GlPlayer with the GlPlayer::SetIGlRenderer() method. Therefore, developers have to declare an integer variable for control height to implement this method.
+ * @remarks The control height is determined when you register %IGlRenderer to %GlPlayer with the GlPlayer::SetIGlRenderer()
+ * method. Therefore, developers have to declare an integer variable for control height to implement this method.
*
*/
virtual int GetTargetControlHeight(void) = 0;
* @since 2.0
*
* @param[in] width The width of target control
- * @remarks The control width is determined when you register %IGlRenderer to %GlPlayer with the GlPlayer::SetIGlRenderer() method. Therefore, developers have to declare an integer variable for control width to implement this method.
+ * @remarks The control width is determined when you register %IGlRenderer to %GlPlayer with
+ * the GlPlayer::SetIGlRenderer() method. Therefore, developers have to declare an integer variable for
+ * control width to implement this method.
*
*/
virtual void SetTargetControlWidth(int width) = 0;
* @since 2.0
*
* @param[in] height The height of target control
- * @remarks The control height is determined when you register %IGlRenderer to %GlPlayer with the GlPlayer::SetIGlRenderer() method. Therefore, developers have to declare an integer variable for control height to implement this method.
+ * @remarks The control height is determined when you register %IGlRenderer to %GlPlayer with
+ * the GlPlayer::SetIGlRenderer() method. Therefore, developers have to declare an integer variable for
+ * control height to implement this method.
*
*/
virtual void SetTargetControlHeight(int height) = 0;
enum PixelFormat
{
PIXEL_FORMAT_RGB565 = 1, /**< The RGB565 pixel format */
- PIXEL_FORMAT_ARGB8888, /**<The ARGB8888 pixel format */
- PIXEL_FORMAT_R8G8B8A8, /**<The R8G8B8A8 pixel format @n
+ PIXEL_FORMAT_ARGB8888, /**< The ARGB8888 pixel format */
+ PIXEL_FORMAT_R8G8B8A8, /**< The R8G8B8A8 pixel format @n
The order of color component is guaranteed by the byte unit. */
- PIXEL_FORMAT_YCbCr420_PLANAR, /**<The 8-bit Y-plane followed by 8-bit 2x2 sub sampled U-plane and V-plane */
- PIXEL_FORMAT_JPEG, /**<The encoded formats */
- PIXEL_FORMAT_NV12, /**<The NV12 pixel formats */
- PIXEL_FORMAT_UYVY, /**<The UYVY pixel format */
+ PIXEL_FORMAT_YCbCr420_PLANAR, /**< The 8-bit Y-plane followed by 8-bit 2x2 sub sampled U-plane and V-plane */
+ PIXEL_FORMAT_JPEG, /**< The encoded format */
+ PIXEL_FORMAT_NV12, /**< The NV12 pixel format */
+ PIXEL_FORMAT_UYVY, /**< The UYVY pixel format */
PIXEL_FORMAT_MAX, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
PIXEL_FORMAT_MIN = 0 // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
};
Point operator +(const Point& rhs) const;
/**
- * Subtracts the value of the specified instance of %Point and the current instance.
+ * Subtracts the value of the specified instance of %Point from the current instance.
*
* @since 2.0
*
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks Two equal instances must return the same hash value. For better performance,
+ * @remarks Two equal instances must return the same hash value. @n For better performance,
* the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
*
* @since 2.0
*
- * @return @c true if the location represented by @c point lies inside the current instance of %Rectangle, @n
+ * @return @c true if the location represented by the specified @c point lies inside the current instance of %Rectangle, @n
* else @c false
* @param[in] point An instance of %Point
*/
/**
* Gets the intersection of the current instance and the specified instance of %Rectangle. @n
- * If the two instances of %Rectangle do not intersect, empty instance is returned.
+ * If the two instances of %Rectangle do not intersect, an empty instance is returned.
*
* @since 2.0
*
/**
* Initializes the current instance of %TextElement with the specified text. @n
- * The canvas is used for initializing the font's color attributes, such as the foreground color and the background color.
+ * The canvas is used for initializing the font color attributes, such as the foreground color and the background color.
*
* @since 2.0
*
* @return An error code
* @param[in] text The text string
* @param[in] canvas The canvas to initialize the text element @n
- * It sets the foreground and background colors of the text element.
+ * It sets the foreground color and background color of the text element.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*
* @since 2.0
*
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_SYSTEM An unknown operating system error has occurred.
- * @remarks To set the text, use the SetText() method.
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SYSTEM An unknown operating system error has occurred.
+ * @remarks To set the text, use the SetText() method.
*/
result Construct(void);
*
* @since 2.0
*
- * @return An error code
- * @param[in] text The linked text string
- * @param[in] linkType The link type
- * @param[in] link The string that contains the actual link
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_INVALID_ARG Either the specified @c text is an empty string or @c linkType is @c LINK_TYPE_NONE
- * @exception E_SYSTEM An unknown operating system error has occurred.
- * @see Tizen::Base::Utility::LinkInfo
+ * @return An error code
+ * @param[in] text The linked text string
+ * @param[in] linkType The link type
+ * @param[in] link The string that contains the actual link
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c text is an empty string.
+ * - The specified @c linkType is @c LINK_TYPE_NONE.
+ * @exception E_SYSTEM An unknown operating system error has occurred.
*/
result Construct(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link);
*
* @since 2.0.
*
- * @return An error code
- * @param[in] text The linked text string
- * @param[in] linkType The link type
- * @param[in] link The string that contains the actual link
- * @param[in] canvas The canvas to initialize the text element @n
- * It sets the foreground and background colors of the text element.
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_INVALID_ARG Either the specified @c text is an empty string or @c linkType is @c LINK_TYPE_NONE.
- * @exception E_SYSTEM An unknown operating system error has occurred.
+ * @return An error code
+ * @param[in] text The linked text string
+ * @param[in] linkType The link type
+ * @param[in] link The string that contains the actual link
+ * @param[in] canvas The canvas to initialize the text element @n
+ * It sets the foreground color and background color of the text element.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c text is an empty string.
+ * - The specified @c linkType is @c LINK_TYPE_NONE.
+ * @exception E_SYSTEM An unknown operating system error has occurred.
*/
result Construct(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link, const Tizen::Graphics::Canvas& canvas);
* @since 2.0
*
* @return An error code
- * @param[in] text The text string @n
- * If the text contains more than one detectable link, the first link is converted to a linked text and rest of the links are ignored.
- * @param[in] autoLink The autolink mask @n
- * Multiple link types can be combined using the bitwise OR operator. @n
- * For more information, see <a href="../org.tizen.native.appprogramming/html/guide/ui/auto_link_detection.htm">AutoLink Detection</a>.
- * @param[in] canvas The canvas to initialize the text element @n
- * It sets the foreground and background colors of the text element.
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_SYSTEM An unknown operating system error has occurred.
+ * @param[in] text The text string @n
+ * If the text contains more than one detectable link, the first link is converted to a linked text
+ * and rest of the links are ignored.
+ * @param[in] autoLink The autolink mask @n
+ * Multiple link types can be combined using the bitwise OR operator. @n
+ * For more information, see <a href="../org.tizen.native.appprogramming/html/guide/ui/auto_link_detection.htm">AutoLink Detection</a>.
+ * @param[in] canvas The canvas to initialize the text element @n
+ * It sets the foreground color and background color of the text element.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SYSTEM An unknown operating system error has occurred.
* @see Tizen::Base::Utility::LinkType
*/
result Construct(const Tizen::Base::String& text, unsigned long autoLink, const Tizen::Graphics::Canvas& canvas);
* @since 2.0
*
* @return The string that contains the actual link @n
- * If the text element contains no linked text, the method returns an empty string.
+ * If the text element contains no linked text, the method returns an empty string.
*/
Tizen::Base::String GetLink(void) const;
/**
- * Gets the type of the link of the text element. @n
+ * Gets the link type of the text element. @n
* The link type is the first auto-detected link.
*
- * @since 2.0
+ * @since 2.0
*
- * @return The string that contains the actual link @n
+ * @return The string that contains the actual link @n
* If the text element contains no linked text, the method returns @c LINK_TYPE_NONE.
*/
Tizen::Base::Utility::LinkType GetLinkType(void) const;
*
* @since 2.0
*
- * @return An error code
- * @param[in] text The string to set
- * @exception E_SUCCESS The method is successful.
+ * @return An error code
+ * @param[in] text The string to set
+ * @exception E_SUCCESS The method is successful.
*/
result SetText(const Tizen::Base::String& text);
*
* @since 2.0
*
- * @return An error code
- * @param[in] font The font to set
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @return An error code
+ * @param[in] font The font to set
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result SetFont(const Tizen::Graphics::Font& font);
*
* @since 2.0
*
- * @return An error code
- * @param[in] color The color to set
- * @exception E_SUCCESS The method is successful.
+ * @return An error code
+ * @param[in] color The color to set
+ * @exception E_SUCCESS The method is successful.
*/
result SetTextColor(const Tizen::Graphics::Color& color);
*
* @since 2.0
*
- * @return An error code
- * @param[in] color The color to set
- * @exception E_SUCCESS The method is successful.
+ * @return An error code
+ * @param[in] color The color to set
+ * @exception E_SUCCESS The method is successful.
*/
result SetBackgroundColor(const Tizen::Graphics::Color& color);
*
* @since 2.0
*
- * @return An error code
- * @param[in] color The color to set
- * @exception E_SUCCESS The method is successful.
+ * @return An error code
+ * @param[in] color The color to set
+ * @exception E_SUCCESS The method is successful.
*/
result SetOutlineColor(const Tizen::Graphics::Color& color);
/**
* Gets the text of %TextElement.
*
- * @since 2.0
+ * @since 2.0
*
- * @return A string containing the text
+ * @return A string containing the text
*/
Tizen::Base::String GetText(void) const;
/**
* Gets the text color of %TextElement.
*
- * @since 2.0
+ * @since 2.0
*
- * @return The foreground color
+ * @return The foreground color
*/
Tizen::Graphics::Color GetTextColor(void) const;
*
* @since 2.0
*
- * @return The background color
+ * @return The background color
*/
Tizen::Graphics::Color GetBackgroundColor(void) const;
*
* @since 2.0
*
- * @return The outline color
+ * @return The outline color
*/
Tizen::Graphics::Color GetOutlineColor(void) const;
/**
* @class VideoTexture
* @brief This class provides a method to bind a video frame to OpenGL-ES Texture.
- * With this feature, you can easily draw a video frame on OpenGL-ES Textures with consistency.
+ * With this feature, you can easily draw a video frame on OpenGL-ES Textures with consistency.
*
* @since 2.0
*
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method be called right after calling this constructor.
*
* @since 2.0
*
* @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0
*
* @return An error code
- * @param[in] textureId Texture ID which points to the texture associated with the video frame @n The texture ID must be generated from glGenTextures().
- * @param[in] width The width of the input texture. The width must be greater than @c 32, and smaller or equal than GL_MAX_TEXTURE_SIZE.
- * @param[in] height The height of the input texture. The height must be greater than @c 32, and smaller or equal than GL_MAX_TEXTURE_SIZE
- * @exception E_SUCCESS Construction is successfully done.
- * @exception E_OUT_OF_RANGE The width or height is bigger than GL_MAX_TEXTURE_SIZE You can get max size of current device to call glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxSize).
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @param[in] textureId Texture ID which points to the texture associated with the video frame @n
+ * The texture ID must be generated from glGenTextures().
+ * @param[in] width The width of the input texture @n
+ * The width must be greater than @c 32, and smaller or equal than @c GL_MAX_TEXTURE_SIZE.
+ * @param[in] height The height of the input texture @n
+ * The height must be greater than @c 32, and smaller or equal than @c GL_MAX_TEXTURE_SIZE
+ * @exception E_SUCCESS Construction is successfully done.
+ * @exception E_OUT_OF_RANGE The width or height is bigger than @c GL_MAX_TEXTURE_SIZE.
+ * You can get the maximum size of the current device to call glGetIntegerv(@c GL_MAX_TEXTURE_SIZE, &maxSize).
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
* For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
- * @exception E_INVALID_STATE Getting egl information failed. It is necessary to bind egl context by using eglMakeCurrent() method.
+ * @exception E_INVALID_STATE Getting egl information failed. It is necessary to bind egl context by calling the eglMakeCurrent() method.
* @remarks
- * - Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
- * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
+ * - Before calling this method, check whether the feature is supported by
+ * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
+ * - There is a high probability for an occurrence of an out-of-memory exception. If possible,
+ * check whether the exception is @c E_OUT_OF_MEMORY or not. For more information on how to handle
+ * the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
*/
result Construct(int textureId, int width, int height);
* @since 2.0
*
* @return An error code
- * @exception E_SUCCESS Binding is successfully done.
- * @exception E_INVALID_STATE Any video frames are not ready in the texture. If IVideoTextureUpdateListener is already registered, please check whether the functions have been called.
+ * @exception E_SUCCESS Binding is successfully done.
+ * @exception E_INVALID_STATE There are no video frames that are ready in the texture. If IVideoTextureUpdateListener is already
+ * registered, please check whether the functions have been called.
*/
result BindTexture(void);
*
* @since 2.0
*
- * @param[in] listener The listener invoked.
+ * @param[in] listener The listener
* @see RemoveVideoTextureUpdateListener()
*/
void AddVideoTextureUpdateListener(IVideoTextureUpdateListener& listener);
* @b Library : @b osp-uifw
*
* The %Ui namespace is used to construct graphical user interfaces (UI). It contains classes and interfaces for handling
- * UI-related events. In addition, it has 4 sub-namespaces: Tizen::Ui::Controls, whose classes handle the display and interaction with UI elements, Tizen::Ui::Scenes, whose classes handle scene transition using the scene management functionalities,
+ * UI-related events. In addition, it has 4 sub-namespaces: Tizen::Ui::Controls, whose classes handle the display and interaction with UI elements,
+ * Tizen::Ui::Scenes, whose classes handle scene transition using the scene management functionalities,
* Tizen::Ui::Animations, whose classes handle animation-related functionalities, and Tizen::Ui::Effects, whose classes
* handle the effect-related functionalities.
*
//
/**
- * @file FUiAccessibilityContainer.h
- * @brief This is the header file for the AccessibilityContainer class.
+ * @file FUiAccessibilityContainer.h
+ * @brief This is the header file for the %AccessibilityContainer class.
*
- * This header file contains the declarations of the AccessibilityContainer class.
+ * This header file contains the declarations of the %AccessibilityContainer class.
*/
#ifndef _FUI_ACCESSIBILITY_CONTAINER_H_
{
public:
/**
- * Gets the owner of the accessibility container
+ * Gets the owner of the accessibility container.
*
* @since 2.0
* @return A pointer to the control which owns this %AccessibilityContainer @n
const Control* GetOwner(void) const;
/**
- * Gets the owner of the accessibility container
+ * Gets the owner of the accessibility container.
*
* @since 2.0
* @return A pointer to the control which owns this %AccessibilityContainer @n
Control* GetOwner(void);
/**
- * Adds the IAccessibilityListener instance to the %AccessibilityContainer. @n
+ * Adds an IAccessibilityListener instance to the %AccessibilityContainer. @n
* The added listener gets notified when the accessibility status has been changed.
*
* @since 2.0
- * @return An error code
- * @param[in] listener The event listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_ALREADY_EXIST The instance of IAccessibilityListener is already registered.
+ * @return An error code
+ * @param[in] listener The event listener to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_ALREADY_EXIST An instance of IAccessibilityListener is already registered.
* @see RemoveAccessibilityListener()
*/
result AddAccessibilityListener(IAccessibilityListener& listener);
/**
- * Removes the IAccessibilityListener listener instance. @n
- * The removed listener is not notified even when the accessibility status has been changed.
+ * Removes an IAccessibilityListener listener instance. @n
+ * The removed listener is not notified when the accessibility status is changed.
*
* @since 2.0
- * @return An error code
- * @param[in] listener The listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND The instance of listener is not found.
+ * @return An error code
+ * @param[in] listener The listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_NOT_FOUND An instance of the listener is not found.
* @see AddAccessibilityListener()
*/
result RemoveAccessibilityListener(IAccessibilityListener& listener);
* Adds the accessibility element to the %AccessibilityContainer.
*
* @since 2.0
- * @return An error code
- * @param[in] element The instance of AccessibilityElement
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_ALREADY_EXIST The instance of AccessibilityElement is already registered.
+ * @return An error code
+ * @param[in] element The instance of AccessibilityElement
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_ALREADY_EXIST An instance of AccessibilityElement is already registered.
* @see RemoveElement()
* @see RemoveAllElements()
*
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
*
- * @param[in] element The instance of AccessibilityElement
+ * @param[in] element The instance of AccessibilityElement
*
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND The instance of AccessibilityElement is not found.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_NOT_FOUND An instance of AccessibilityElement is not found.
* @see AddElement()
*
*/
result RemoveElement(AccessibilityElement& element);
/**
- * Removes all of the accessibility elements in the %AccessibilityContainer.
+ * Removes all the accessibility elements in the %AccessibilityContainer.
*
* @since 2.0
*
void RemoveAllElements(void);
/**
- * Gets the instance of the accessibility element which is the child of the %AccessibilityContainer by the name.
+ * Gets an instance of the AccessibilityElement which is the child of the %AccessibilityContainer with the specified name.
*
* @since 2.0
*
- * @return The instance to the child element, if there exists an element which has the given name, @n
- * else @c null
+ * @return The instance of the child element, @n
+ * else @c null if no element with the specified @c name exists
*
- * @param[in] name The name of AccessibilityElement
+ * @param[in] name The name of AccessibilityElement
*
*/
AccessibilityElement* GetElement(const Tizen::Base::String& name) const;
/**
- * Gets the list of accessibility elements that are the child of the %AccessibilityContainer.
+ * Gets the list of accessibility elements that are children of %AccessibilityContainer.
*
* @since 2.0
*
- * @return A pointer to the list of the child element, if there exists some elements in the container, @n
- * else @c null
+ * @return A pointer to the list of the child elements, @n
+ * else @c null if no elements exist
*/
Tizen::Base::Collection::IList* GetElementsN(void) const;
/**
* @file FUiAccessibilityElement.h
- * @brief This is the header file for the AccessibilityElement class.
+ * @brief This is the header file for the %AccessibilityElement class.
*
- * This header file contains the declarations of the AccessibilityElement class.
+ * This header file contains the declarations of the %AccessibilityElement class.
*
*/
*
* @since 2.0
*
- * @return An error code
- * @param[in] bounds The bounds of the accessibility element
- * @param[in] name The name of the accessibility element
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG Either the length of name parameter is @c 0, or the bounds are smaller than @c 0.
+ * @return An error code
+ * @param[in] bounds The bounds of the accessibility element
+ * @param[in] name The name of the accessibility element
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The length of the specified @c name is @c 0.
+ * - The specified @c bounds are smaller than @c 0.
*/
result Construct(const Tizen::Graphics::Rectangle& bounds, const Tizen::Base::String& name);
*
* @since 2.1
*
- * @return An error code
- * @param[in] bounds The bounds of the accessibility element
- * @param[in] name The name of the accessibility element
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG Either the length of @c name parameter is @c 0, or the @c bounds are smaller than @c 0.
+ * @return An error code
+ * @param[in] bounds The bounds of the accessibility element
+ * @param[in] name The name of the accessibility element
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The length of the specified @c name is @c 0.
+ * - The specified @c bounds are smaller than @c 0.
*/
result Construct(const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Base::String& name);
void SetBounds(const Tizen::Graphics::Rectangle& bounds);
/**
- * Sets the bounds of an element.
+ * Sets the bounds of the element.
*
* @since 2.1
* @param[in] bounds The bounds of the accessibility element
Tizen::Graphics::Rectangle GetBounds(void) const;
/**
- * Gets the bounds of an element.
+ * Gets the bounds of the element.
*
* @since 2.1
* @return The bounds of the element
*/
enum AccessibilityScreenReaderStatus
{
- ACCESSIBILITY_SCREEN_READER_STATUS__NONE, /**< Initial value to which the screen reader is set */
+ ACCESSIBILITY_SCREEN_READER_STATUS__NONE, /**< The initial value to which the screen reader is set */
ACCESSIBILITY_SCREEN_READER_STATUS_ERROR, /**< An error has occurred. */
- ACCESSIBILITY_SCREEN_READER_STATUS_READY, /**< Screen reader is idle. */
- ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING, /**< Screen reader is in use. */
- ACCESSIBILITY_SCREEN_READER_STATUS_PAUSE, /**< Screen reader has been paused. */
+ ACCESSIBILITY_SCREEN_READER_STATUS_READY, /**< The screen reader is idle. */
+ ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING, /**< The screen reader is in use. */
+ ACCESSIBILITY_SCREEN_READER_STATUS_PAUSE, /**< The screen reader has been paused. */
};
}} //Tizen::Ui
* @param[in] milliseconds The offset of the animation in milliseconds
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The value of the specified parameter is negative or greater than the duration of the animation.
- * @remarks If the start value of the animation is @c 0.0, the end value is @c 1.0, the duration is @c 100 ms and the offset value is @c 20 ms,
- * the actual animation starts at @c 0th ms and plays for @c 80 ms with a start value of @c 0.2. @n
- * If @c autoReverseset is set to @c true, the Backward animation plays for 100ms, from @c 1.0 to @c 0.0.
+ * @remarks
+ * - If the start value of the animation is @c 0.0, the end value is @c 1.0, the duration is @c 100 ms and the offset value is @c 20 ms,
+ * the actual animation starts at @c 0th ms and plays for @c 80 ms with a start value of @c 0.2.
+ * - If @c autoReverseset is set to @c true, the Backward animation plays for 100ms, from @c 1.0 to @c 0.0.
*/
result SetOffset(long milliseconds);
/**
- * Sets the AutoReverse property of the animation. @n
+ * Sets the auto reverse state of the animation. @n
* If enabled, the forward and backward animation can also be played.
*
* @since 2.0
*
* @param[in] autoReverse Set to @c true to enable the AutoReverse property of the animation, @n
* else @c false
- * @remarks If @c autoReverseset is set to @c true, the duration of the animation is doubled.
- * If the repeat count is more than 1, @n
- * @c autoReverse is applied to each iteration.
- * Note that if @c autoReverse is set to @c true, one forward animation play and one backward animation play is one
- * iteration.
+ * @remarks
+ * - If @c autoReverse is set to @c true, the duration of the animation is doubled. @n
+ * Note that if @c autoReverse is set to @c true, one forward animation play and one backward animation play is one
+ * iteration.
+ * - If the repeat count is more than @c 1, @c autoReverse is applied to each iteration.
*/
void SetAutoReverseEnabled(bool autoReverse);
/**
* Gets the control points of the Bezier interpolator. @n
- * The %GetBezierControlPoints() method is supported only if the interpolator is @c ANIMATION_INTERPOLATOR_BEZIER. @c 0 is returned for the other interpolators.
+ * The %GetBezierControlPoints() method is supported only if the interpolator is @c ANIMATION_INTERPOLATOR_BEZIER.
+ * @c 0 is returned for the other interpolators.
*
* @since 2.0
*
*
* @since 2.0
*
- * @return The key frame count
+ * @return The keyframe count
*/
int GetKeyFrameCount(void) const;
*
* @since 2.0
*
- * The %AnimationTransaction class enables the applications to define animation transactions that make a set of animations on one or more animators to start or stop at the same time.
+ * The %AnimationTransaction class enables the applications to define animation transactions that make a set of animations
+ * on one or more animators to start or stop at the same time.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/transactions.htm">Transactions</a>.
*
/**
* Initializes a transaction set. @n
- * Calls ControlAnimator::StartUserAnimation() or calls VisualElement::AddAnimation()
- * after calling the %Begin() method and before calling the CommitTransaction() method.
+ * The ControlAnimator::StartUserAnimation() method or VisualElement::AddAnimation() method must be called after
+ * calling the %Begin() method and before calling the CommitTransaction() method.
* Nesting of the transaction set is allowed.
*
* @since 2.0
/**
* Initializes a transaction set. @n
- * Calls ControlAnimator::StartUserAnimation() or calls VisualElement::AddAnimation()
- * after calling the %Begin() method and before calling the CommitTransaction() method.
+ * The ControlAnimator::StartUserAnimation() method or VisualElement::AddAnimation() method must be called after
+ * calling the %Begin() method and before calling the CommitTransaction() method.
* Nesting of the transaction set is allowed.
*
* @since 2.0
* @since 2.0
*
* @return An error code
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
* @see Begin()
*/
* @return An error code
* @param[in] pListener The listener to add
* @exception E_SUCCESS The method is successful.
- * @remarks Only one event listener can be set. @n
- * If @c pListener is @c null, the listener already set is unregistered. @n
- * An application must deregister the registered listener if the listener object needs to be deleted.
+ * @remarks
+ * - Only one event listener can be set. @n
+ * If @c pListener is @c null, the listener already set is unregistered.
+ * - An application must deregister the registered listener if the listener object needs to be deleted.
* @see SetCurrentTransactionEventListener()
*/
static result SetTransactionEventListener(IAnimationTransactionEventListener* pListener);
* @since 2.0
*
* @return An error code
- * @param[in] pListener The listener to set
- * @exception E_SUCCESS The method is successful.
+ * @param[in] pListener The listener to set
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
* @remarks If the listener is set using this method, the set default listener is not called.
* @see SetTransactionEventListener()
* @since 2.0
*
* @return An error code
- * @param[in] enable Set to @c true to enable the implicit animation, @n
- * else @c false
+ * @param[in] enable Set to @c true to enable the implicit animation, @n
+ * else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
- * @remarks The nested transaction created after invoking this method will inherit @c enable as the default value.
- * @remarks Deciding whether to enable implicit animation depends on both the flag of transaction and the flag of VisualElement.
- * If both SetVisualElementImplicitAnimationEnabled() and VisualElement::SetImplicitAnimationEnabled() are set to @c true, @n
- * implicit animation is enabled.
+ * @remarks
+ * - The nested transaction created after invoking this method will inherit @c enable as the default value.
+ * - Deciding whether to enable implicit animation depends on both the flag of transaction and the flag of VisualElement.
+ * If both SetVisualElementImplicitAnimationEnabled() and VisualElement::SetImplicitAnimationEnabled() are set to @c true, @n
+ * implicit animation is enabled.
*/
static result SetVisualElementImplicitAnimationEnabled(bool enable);
*
* @since 2.0
*
- * @return An error code
- * @param[in] pListener The pointer of listener instance to set
- * @exception E_SUCCESS The method is successful.
+ * @return An error code
+ * @param[in] pListener The pointer of listener instance to set
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
* @remarks
- * - This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction.
- * - If an animation that is listening to an animation status event is removed before starting, then the platform skips to call @n
- * the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationStarted() method and directly calls the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationFinished() method.
+ * - This is used as the default value for the newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
+ * - If an animation that is listening to an animation status event is removed before starting, then the
+ * platform skips to call the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationStarted()
+ * method and directly calls the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationFinished() method.
*/
static result SetVisualElementAnimationStatusEventListener(IVisualElementAnimationStatusEventListener* pListener);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] pTimingFunction The reference of interpolator instance to set
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
- * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction.
+ * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
*/
static result SetVisualElementAnimationTimingFunction(const IVisualElementAnimationTimingFunction* pTimingFunction);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] pValueInterpolator The reference of InterpolatorFunction instance to set
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
- * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction.
+ * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
*/
static result SetVisualElementAnimationValueInterpolator(const IVisualElementAnimationValueInterpolator* pValueInterpolator);
*
* @since 2.0
*
- * @return An error code
- * @param[in] milliseconds The duration of the animation in milliseconds
- * @exception E_SUCCESS The method is successful.
+ * @return An error code
+ * @param[in] milliseconds The duration of the animation in milliseconds
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
* @exception E_INVALID_ARG The value of the specified parameter is negative or lesser than the offset of the animation.
- * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction.
+ * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
* @see GetVisualElementAnimationDuration()
*/
static result SetVisualElementAnimationDuration(long milliseconds);
*
* @since 2.0
*
- * @return The duration value of the animation
- * @exception E_SUCCESS The method is successful.
+ * @return The duration value of the animation
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - This is used as the default value for the newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
* @see SetVisualElementAnimationDuration()
*/
static long GetVisualElementAnimationDuration(void);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] milliseconds The offset value of the animation in milliseconds
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
* @exception E_INVALID_ARG The value of the specified parameter is negative or greater than the duration of the animation.
- * @remarks If the start value of the animation is @c 0.0, the end value is @c 1.0, the duration is @c 100 ms and the offset value is @c 20 ms,
- * the actual animation starts at @c 0th ms and plays for @c 80 ms with a start value of @c 0.2. @n
- * If @c autoReverse is set to @c true, the Backward animation plays for @c 100ms, from @c 1.0 to @c 0.0.
- * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction.
+ * @remarks
+ * - If the start value of the animation is @c 0.0, the end value is @c 1.0, the duration is @c 100 ms and
+ * the offset value is @c 20 ms, the actual animation starts at @c 0th ms and plays for @c 80 ms with a
+ * start value of @c 0.2.
+ * - If @c autoReverse is set to @c true, the Backward animation plays for @c 100ms, from @c 1.0 to @c 0.0.
+ * - This is used as the default value for the newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
* @see GetVisualElementAnimationOffset()
*/
static result SetVisualElementAnimationOffset(long milliseconds);
*
* @since 2.0
*
- * @return The offset value of the animation in milliseconds @n
- * The default value of the offset is @c 0.
- * @exception E_SUCCESS The method is successful.
+ * @return The offset value of the animation in milliseconds @n
+ * The default value of the offset is @c 0.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks This is used as the default value for newly created VisualElementAnimation class or its descendant classes in the current transaction.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - This is used as the default value for newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
* @see SetVisualElementAnimationOffset()
*/
static long GetVisualElementAnimationOffset(void);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] milliseconds The delay for the animation to start in milliseconds
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
* @exception E_INVALID_ARG The value of the specified parameter is negative.
- * @remarks This method does not alter the start, end, and duration values of the animation.
- * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction.
+ * @remarks
+ * - This method does not alter the start, end, and duration values of the animation.
+ * - This is used as the default value for the newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
* @see GetVisualElementAnimationDelay()
*/
static result SetVisualElementAnimationDelay(long milliseconds);
*
* @since 2.0
*
- * @return The delay value in milliseconds @n
- * The default value of the delay is @c 0.
- * @exception E_SUCCESS The method is successful.
+ * @return The delay value in milliseconds @n
+ * The default value of the delay is @c 0.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - This is used as the default value for the newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
* @see SetVisualElementAnimationDelay()
*/
static long GetVisualElementAnimationDelay(void);
*
* @since 2.0
*
- * @return An error code
- * @param[in] count The number of times the animation has to repeat
- * @exception E_SUCCESS The method is successful.
+ * @return An error code
+ * @param[in] count The number of times the animation has to repeat
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
* @exception E_INVALID_ARG The value of the specified parameter is negative.
- * @remarks A delay and offset is applied to an animation only when the animation is played for the first time.
- * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction.
+ * @remarks
+ * - A delay and offset is applied to an animation only when the animation is played for the first time.
+ * - This is used as the default value for the newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
* @see GetVisualElementAnimationRepeatCount()
*/
static result SetVisualElementAnimationRepeatCount(long count);
*
* @since 2.0
*
- * @return The repeat count value of the animation @n
- * The default value of the repeat count is @c 1.
- * @exception E_SUCCESS The method is successful.
+ * @return The repeat count value of the animation @n
+ * The default value of the repeat count is @c 1.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - This is used as the default value for the newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
* @see SetVisualElementAnimationRepeatCount()
*/
static long GetVisualElementAnimationRepeatCount(void);
/**
- * Sets the default AutoReverse property of an animation. @n
+ * Sets the default auto reverse state of the animation.. @n
* If enabled, the forward and backward animation can also be played.
*
* @since 2.0
*
- * @param[in] autoReverse Set to @c true to enable the AutoReverse property of the animation, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
+ * @param[in] autoReverse Set to @c true to enable the AutoReverse property of the animation, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
- * @remarks If @c autoReverse is set to @c true, the duration of the animation is doubled.
- * If the repeat count is more than @c 1, @c autoReverse is applied to each iteration.
- * Note that if @c autoReverse is set to @c true, one forward animation play
- * and one backward animation play is one iteration.
- * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction.
+ * @remarks
+ * - If @c autoReverse is set to @c true, the duration of the animation is doubled.
+ * If the repeat count is more than @c 1, @c autoReverse is applied to each iteration.
+ * Note that if @c autoReverse is set to @c true, one forward animation play
+ * and one backward animation play is one iteration.
+ * - This is used as the default value for the newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
* @see IsVisualElementAnimationAutoReverseEnabled()
*/
static result SetVisualElementAnimationAutoReverseEnabled(bool autoReverse);
/**
- * Checks whether the auto reverse is enabled.
+ * Checks whether auto reverse is enabled.
*
* @since 2.0
*
- * @return @c true if the auto reverse is enabled, @n
- * else @c false @n
- * The default auto reverse value is @c false.
- * @exception E_SUCCESS The method is successful.
+ * @return @c true if auto reverse is enabled, @n
+ * else @c false @n
+ * The default auto reverse value is @c false.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - This is used as the default value for the newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
* @see SetVisualElementAnimationAutoReverseEnabled()
*/
static bool IsVisualElementAnimationAutoReverseEnabled(void);
*
* @since 2.0
*
- * @return An error code
- * @param[in] scaleRatio The scale ratio property of the animation
- * @exception E_SUCCESS The method is successful.
+ * @return An error code
+ * @param[in] scaleRatio The scale ratio property of the animation
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
* @exception E_INVALID_ARG The value of the specified parameter is negative.
- * @remarks This is used as the default value for the newly created VisualElementAnimation or its descendant classes in the current transaction.
+ * @remarks This is used as the default value for the newly created VisualElementAnimation or its descendant
+ * classes in the current transaction.
* @see GetVisualElementAnimationScaleRatio()
*/
static result SetVisualElementAnimationScaleRatio(float scaleRatio);
*
* @since 2.0
*
- * @return The scale ratio value of the animation @n
- * The default value of scale ratio is @c 1.0f.
- * @exception E_SUCCESS The method is successful.
+ * @return The scale ratio value of the animation @n
+ * The default value of scale ratio is @c 1.0f.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION An uncommitted transaction does not exist.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks This is used as the default value for the newly created VisualElementAnimation class or its descendant classes in the current transaction.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - This is used as the default value for the newly created VisualElementAnimation class or its descendant
+ * classes in the current transaction.
* @see SetVisualElementAnimationScaleRatio()
*/
static float GetVisualElementAnimationScaleRatio(void);
*
* @since 2.0
*
- * @return The progress(pace) value calculated by bezier equation with control points @n
- * @c 0 and @c 1 are the start and end values of an animation, respectively.
+ * @return The progress(pace) value calculated by bezier equation with control points @n
+ * @c 0 and @c 1 are the start and end values of an animation, respectively.
* @param[in] timeProgress The time progress value @n
* This must be in the range @c 0.0 to @c 1.0.
*/
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] timeProgress1 The time progress of control point 1 @n
* This must be in the range @c 0.0 to @c 1.0.
* @param[in] progress1 The progress of control point 1 @n
*
* @final This class is not intended for extension.
*
- * @remarks This class doesn't support APIs for float type.
+ * @remarks This class does not support APIs for float type.
*
* The %ControlAnimator class is used to control the animations operated in Tizen::Ui::Controls.
*
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* @exception E_SYSTEM A system error has occurred.
* @remarks An animation is deleted at the end of the animation playback. @n
- * RectangleAnimation is used to animate only one animation target at a time.
- * For example, if AnimationTarget is @c ANIMATION_TARGET_SIZE, RectangleAnimation performs only the dimension animation. @n
- * To perform animation using the @c ANIMATION_TARGET_POSITION and @c ANIMATION_TARGET_SIZE properties, AnimationTransaction must be used with
- * a separate call for each animation target.
+ * RectangleAnimation is used to animate only one animation target at a time. @n
+ * For example, if AnimationTarget is @c ANIMATION_TARGET_SIZE, %RectangleAnimation performs only the dimension animation. @n
+ * To perform animation using the @c ANIMATION_TARGET_POSITION and @c ANIMATION_TARGET_SIZE properties, AnimationTransaction
+ * must be used with a separate call for each animation target.
*/
result StartUserAnimation(AnimationTargetType animTarget, const AnimationBase& animation);
/**
- * Adds the IControlAnimatorEventListener listener instance to the current instance of the control. @n
+ * Adds an IControlAnimatorEventListener listener instance to the current instance of the control. @n
* The %IControlAnimatorEventListener listener is called for status changes of animations associated with a control.
* The added listener listens to events on the specified event dispatcher's context when they are fired.
*
/**
- * Removes the IControlAnimatorEventListener listener instance from the current instance of the control. @n
+ * Removes an IControlAnimatorEventListener listener instance from the current instance of the control. @n
* The removed listener cannot listen to events when they are fired.
*
* @since 2.0
/**
- * Adds a IControlAnimatorDetailedEventListener listener instance to the current instance of the control. @n
+ * Adds an IControlAnimatorDetailedEventListener listener instance to the current instance of the control. @n
* The %IControlAnimatorDetailedEventListener listener is called for status changes of each animation associated with the control. @n
* The added listener listens to events on the specified event dispatcher's context when they are fired.
*
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* @exception E_UNSUPPORTED_OPERATION This operation is not supported.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The X and Y position of the object are relative to the top-left corner of its parent. @n
- * Control::Invalidate() need not be called to display the control. The animation uses linear interpolator and is played for a default duration if
- * the user does not overwrite the values using SetAnimation().
+ * @remarks The X and Y position of the object are relative to the top-left corner of its parent. @n
+ * Control::Invalidate() need not be called to display the control. The animation uses linear interpolator
+ * and is played for a default duration if the user does not overwrite the values using SetAnimation().
* @see SetBounds()
* @see SetSize()
*/
* @exception E_UNSUPPORTED_OPERATION This operation is not supported.
* @exception E_SYSTEM A system error has occurred.
* @remarks Control::Invalidate() need not be called to display the control. @n
- * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not overwrite the values using SetAnimation().
+ * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not
+ * overwrite the values using SetAnimation().
* @see SetBounds()
* @see SetPosition()
*/
* @exception E_UNSUPPORTED_OPERATION This operation is not supported.
* @exception E_SYSTEM A system error has occurred.
* @remarks Control::Invalidate() need not be called to display the control. @n
- * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not overwrite the values using SetAnimation().
+ * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not
+ * overwrite the values using SetAnimation().
* @see SetSize()
* @see SetBounds()
* @see SetPosition()
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* @exception E_UNSUPPORTED_OPERATION This operation is not supported.
* @remarks Changing the position of a parent object does not change the position of its children, the top-left position that is relative to the
- * top-left corner of the parent container. If calling this method causes re-positioning of an object or changes the size of the object, the
- * system redraws the object and all its children. @n
+ * top-left corner of the parent container. If calling this method causes re-positioning of an object or changes the size of the object, the
+ * system redraws the object and all its children. @n
* Control::Invalidate() need not be called to display the control. @n
- * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not overwrite the values using SetAnimation().
+ * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not
+ * overwrite the values using SetAnimation().
* @see SetPosition()
* @see SetSize()
*/
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* @exception E_UNSUPPORTED_OPERATION This operation is not supported.
* @remarks Control::Invalidate() need not be called to display the control. @n
- * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not overwrite the values using SetAnimation().
+ * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not
+ * overwrite the values using SetAnimation().
* @see SetBounds()
* @see SetPosition()
* @see SetSize()
* @exception E_UNSUPPORTED_OPERATION This operation is not supported.
* @exception E_SYSTEM A system error has occurred.
* @remarks Control::Invalidate() need not be called to display the control. @n
- * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not overwrite the values using SetAnimation().
+ * The animation uses linear interpolator and is played for a duration of @c 250 ms if the user does not
+ * overwrite the values using SetAnimation().
*/
result SetShowState(bool show);
* @param[in] duration The duration of animation in milliseconds
* @param[in] interpolator The type of interpolator used for the animation's intermediate value calculation
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The value of the specified parameter is negative or the interpolator is of an invalid type.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The value of the specified parameter is negative.
+ * - The interpolator is of an invalid type.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
DimensionAnimation(const Tizen::Graphics::Dimension& startValue, const Tizen::Graphics::Dimension& endValue, long duration, AnimationInterpolatorType interpolator);
*
* @since 2.0
*
- * @param[in] rhs An instance of %DimensionAnimation
+ * @param[in] rhs An instance of %DimensionAnimation
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @return @c true if the value of the current instance equals the value of the specified instance, @n
* else @c false
* @param[in] obj An instance of %DimensionAnimation
- * @remarks The %DimensionAnimation class has a semantic value that means this method checks whether the two instances have the same animation.
+ * @remarks The %DimensionAnimation class has a semantic value that means this method checks whether the two instances
+ * have the same animation.
*/
virtual bool Equals(const Tizen::Base::Object& obj) const;
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random
+ * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function must generate a random
* distribution for all inputs.
*/
virtual int GetHashCode(void) const;
* @param[in] anchorY The Y value of the anchor at which the control's animation is performed
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks A default anchor point value is (0.0, 0.0). The range of an anchor point is @c 0.0 to @c 1.0. @n
+ * @remarks The default anchor point value is (0.0, 0.0). The range of an anchor point is @c 0.0 to @c 1.0. @n
* When the anchor point value is (0.0, 0.0), the object is scaled and the top-left corner of the object remains fixed. @n
* For all the other anchor point values, the position property is changed.
* If the anchor point value is (0.5, 0.5), the object is scaled with respect to the center.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
* @remarks If @c time is greater than the duration, it will become the new duration and @c value becomes the new @c endValue. @n
- * Also, the old duration and @c endValue will be added as a new key frame entry in the list. @n
+ * Also, the old duration and @c endValue will be added as a new keyframe entry in the list. @n
* If a key-value pair with the current key already exists, the old value will be overwritten with the new one. @n
* An exception will be returned if @c time is equal to @c 0 or the duration of the animation.
*/
* @exception E_OUT_OF_RANGE The specified @c index is out of range.
* @exception E_SYSTEM A system error has occurred.
* @remarks The @c time and @c value returned is the one present at the index of the sorted map list(sorted with respect to key). @n
- * For example, if the user adds key-frame in the order (10,value1), (20,value2), (5,value3) and then GetKeyFrameAt(0,time,value) is called, the
- * pair returned is (5,value3).
+ * For example, if the user adds key-frame in the order (10,value1), (20,value2), (5,value3) and
+ * then GetKeyFrameAt(0,time,value) is called, the pair returned is (5,value3).
*/
result GetKeyFrameAt(int index, long& time, Tizen::Graphics::Dimension& value) const;
* @since 2.0
*
* @return An error code
- * @param[in] time The key frame time
+ * @param[in] time The keyframe time
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The keyframe @c time value is invalid.
* @exception E_OBJ_NOT_FOUND The keyframe @c time value is not found in the keyframe List.
* @since 2.0
*
* @return An error code
- * @param[in] index The index value in the Keyframe list @n
+ * @param[in] index The index value in the keyframe list @n
* The value is sorted in an increasing order of time.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index parameter is out of range.
*
* @since 2.0
*
- * @remarks The %DisplayContext instance cannot be created,
- * it is offered by the Tizen::Ui::Window::GetDisplayContext() method.
+ * @remarks The %DisplayContext instance cannot be created,
+ * it is offered by the Tizen::Ui::Window::GetDisplayContext() method.
* @see Window::GetDisplayContext()
*/
DisplayContext(void);
*
* @since 2.0
*
- * @return The progress(pace) value calculated by exp-in equation with scale value @n
- * @c 0 and @c 1 are the start and end values of an animation, respectively.
+ * @return The progress(pace) value calculated by exp-in equation with scale value @n
+ * @c 0 and @c 1 are the start and end values of an animation, respectively.
* @param[in] timeProgress The time progress value @n
* This must be in the range @c 0.0 to @c 1.0.
*/
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] scale The scale value
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The value of the specified parameter is @c 0.0 or negative.
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] scale The scale value
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The value of the specified parameter is @c 0.0 or negative.
* @param[in] duration The duration of animation in milliseconds
* @param[in] interpolator The type of interpolation used for the intermediate value calculation of the animation
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The value of the specified parameter is negative or the interpolator is of an invalid type.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The value of the specified parameter is negative.
+ * - The interpolator is of an invalid type.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
FloatAnimation(float startValue, float endValue, long duration, AnimationInterpolatorType interpolator);
*
* @since 2.0
*
- * @param[in] rhs An instance of %FloatAnimation
+ * @param[in] rhs An instance of %FloatAnimation
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random distribution
- * for all inputs.
+ * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function must
+ * generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
* @return An error code
* @param[in] currentTime The current time value of the animation play @n
* The value must be between @c 0 and the duration of the animation.
- * @param[out] animatedValue The animated value for the @c currentTime passed as input
+ * @param[out] animatedValue The animated value for the @c currentTime that is passed as input
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
/**
- * Adds a key frame to the animation.
+ * Adds a keyframe to the animation.
*
* @since 2.0
*
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks If @c time is greater than the duration, it becomes the new @c duration and value becomes the new @c endValue.
- * Also the old @c duration and @c endValue are added as a new key frame entry in the list.
- * @remarks If a key-value pair with the current key already exists, the old value is overwritten with the new value.
- * @remarks An exception is returned if the @c time is equal to @c 0 or the duration of the animation.
+ * @remarks
+ * - If the specified @c time is greater than the duration, it becomes the new @c duration and value becomes the new @c endValue.
+ * Also the old @c duration and @c endValue are added as a new keyframe entry in the list.
+ * - If a key-value pair with the current key already exists, the old value is overwritten with the new value.
+ * - An exception is returned if the specified @c time is equal to @c 0 or the duration of the animation.
*/
result AddKeyFrame(long time, float value);
* @since 2.0
*
* @return An error code
- * @param[in] index The index value in the Keyframe list @n
+ * @param[in] index The index value in the keyframe list @n
* This value is sorted in an increasing order of time.
* @param[out] time The time stamp at the specified @c index
* @param[out] value The value at the specified @c index
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is out of range.
+ * @exception E_OUT_OF_RANGE The specified @c index is out of range.
* @exception E_SYSTEM A system error has occurred.
* @remarks The @c time and @c value returned, are the one present at the index of the sorted map list (sorted with respect to key).
* For example, if the user adds keyframe in the order (10,value1), (20,value2), (5,value3), and
/**
- * Removes the passed keyframe object from the keyframe list.
+ * Removes the keyframe object from the keyframe list.
*
* @since 2.0
*
* @return An error code
- * @param[in] time The key frame time
+ * @param[in] time The keyframe time
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c time is invalid.
- * @exception E_OBJ_NOT_FOUND The specified @c time is not found in the KeyFrame List.
+ * @exception E_OBJ_NOT_FOUND The specified @c time is not found in the keyframe List.
* @exception E_SYSTEM A system error has occurred.
*/
result RemoveKeyFrame(long time);
* @since 2.0
*
* @return An error code
- * @param[in] index The index value in the Keyframe list @n
+ * @param[in] index The index value in the keyframe list @n
* This value is sorted in an increasing order of time.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is out of range.
*
* @since 2.0
*
- * @return The end value
+ * @return The end value
*/
float GetEndValue(void) const;
* @since 2.1
*
* @return An error code
- * @param[in] pForm A pointer to Form object to set
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c pForm is @c null.
+ * @param[in] pForm A pointer to the Form object to set
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified @c pForm is @c null.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks Control::Invalidate() need not be called to display the form. @n
* To select the animation that is used during this method, use SetFormTransitionAnimation() before calling this method.
*/
*
* @since 2.0
*
- * @param[in] transactionId The transaction ID of the transaction for which the event has occurred
+ * @param[in] transactionId The ID of the transaction for which the event has occurred
*/
virtual void OnAnimationTransactionStarted(int transactionId) = 0;
*
* @since 2.0
*
- * @param[in] transactionId The transaction ID of the transaction for which the event has occurred
+ * @param[in] transactionId The ID of the transaction for which the event has occurred
* @remarks This callback is called when user calls AnimationTransaction::Stop().
*/
virtual void OnAnimationTransactionStopped(int transactionId) = 0;
* @param[in] animTrigger The animator trigger type of the control @n
* The animation event has occurred for the specified trigger type.
* @param[in] animTarget The animation target type @n
- * The animation event has occurred for the specified animation target type. In the case of implicit animations,
- * @c animTarget is @c ANIMATION_TARGET_NONE.
+ * The animation event has occurred for the specified animation target type. In the case of
+ * implicit animations, @c animTarget is @c ANIMATION_TARGET_NONE.
* @param[in] pAnimation The animation object @n
* The event occurs for this animation object. In the case of implicit animations (animations not defined by the
* application), @c pAnimation is @c null.
*
* @since 2.0
*
-* The %IVisualElementAnimationProvider interface customizes implicit animations. The class that needs to override default implicit animations must implement this interface, and
-* the instance created with that class is registered with VisualElement, using the VisualElement::SetAnimationProvider() method.
+* The %IVisualElementAnimationProvider interface customizes implicit animations. The class that needs to override default
+* implicit animations must implement this interface, and the instance created with that class is registered with VisualElement,
+* using the VisualElement::SetAnimationProvider() method.
* When the properties defined in %VisualElement and its descendants are changed, the CreateAnimationForProperty() method of this interface is invoked.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/animating_uicontrols.htm">Implicit and Explicit Animations</a>.
* @param[in] animation The animation that is started
* @param[in] keyName The key name of the animation
* @param[in] target An instance of VisualElement to which the animation is applied
- * @remarks If the key name of the animation is not set, @c keyName is empty string.
+ * @remarks If the key name of the animation is not set, @c keyName is an empty string.
*/
virtual void OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target) = 0;
*
* @since 2.0
*
- * @param[in] animation The animation that is repeated
- * @param[in] keyName The key name of the animation
- * @param[in] target An instance of VisualElement to which the animation is applied
+ * @param[in] animation The animation that is repeated
+ * @param[in] keyName The key name of the animation
+ * @param[in] target An instance of VisualElement to which the animation is applied
* @param[in] currentRepeatCount The current repeat count
- * @remarks If the key name of the animation is not set, @c keyName is empty string.
+ * @remarks If the key name of the animation is not set, @c keyName is an empty string.
*/
virtual void OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount) = 0;
*
* @since 2.0
*
- * @param[in] animation The animation that is finished
- * @param[in] keyName The key name of the animation
- * @param[in] target An instance of VisualElement to which the animation is applied
+ * @param[in] animation The animation that is finished
+ * @param[in] keyName The key name of the animation
+ * @param[in] target An instance of VisualElement to which the animation is applied
* @param[in] completedNormally @c true if the animation is completed normally, @n
* else @c false
- * @remarks If the key name of the animation is not set, @c keyName is empty string.
+ * @remarks If the key name of the animation is not set, @c keyName is an empty string.
*/
virtual void OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally) = 0;
/**
* @interface IVisualElementContentProvider
- * @brief This interface customizes content of %VisualElement.
+ * @brief This interface customizes content of %VisualElement.
*
* @since 2.0
*
- * The %IVisualElementContentProvider interface is the listener interface for providing content and information on it. The class that needs to customize content must implement this interface, and
- * use the VisualElement::SetContentProvider() method to register to the VisualElement.
+ * The %IVisualElementContentProvider interface is the listener interface for providing content and information on it. The class
+ * that needs to customize content must implement this interface, and use the VisualElement::SetContentProvider() method to
+ * register to the VisualElement.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/visualelement_content.htm">Content Provider</a>.
*
public:
/**
- * %PrepareDraw() is invoked by UI framework before DrawContent() is called.
+ * %PrepareDraw() is invoked by the UI framework before DrawContent() is called.
* If this method returns @c true, VisualElement can call the %DrawContent() method.
*
* @since 2.0
/**
* The %HitTest() method is called by VisualElement::GetChildAt(). @n
- * The %GetChildAt() method traverses through a list of all children, and performs a hit test search at the @c point using this method.
- * You can modify hit test search result by overriding this method.
+ * The %GetChildAt() method traverses through a list of all children, and performs a hit test search at the specified @c point using this method.
+ * You can modify the hit test search result by overriding this method.
*
* @since 2.0
*
* @return The hit test result
* @param[in] target An instance of VisualElement to test
* @param[in] point The position of the source to check
- * @remarks Hit test results must be one of the following: @n
- * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_NOWHERE
- * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_MATCH
+ * @remarks Hit test results must be one of the following:
+ * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_NOWHERE
+ * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_MATCH
* @see VisualElement::GetChildAt()
*/
virtual HitTestResult HitTest(Tizen::Ui::Animations::VisualElement& target, const Tizen::Graphics::FloatPoint& point) = 0;
class VisualElement;
/**
-* @interface IVisualElementEventListener
-* @brief This interface implements the event listener for the events generated by %VisualElement.
+* @interface IVisualElementEventListener
+* @brief This interface implements the event listener for the events generated by %VisualElement.
*
* @since 2.0
*
-* The %IVisualElementEventListener interface is for receiving events on status change of VisualElement. The class that processes a status change event of %VisualElement
-* implements this interface, and the instance created with that class is registered with %VisualElement, using the VisualElement::SetVisualElementEventListener() method.
+* The %IVisualElementEventListener interface receives events on status change of VisualElement. The class that processes
+* a status change event of %VisualElement implements this interface, and the instance created with that class is registered with
+* %VisualElement, using the VisualElement::SetVisualElementEventListener() method.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/visualelement_eventhandling.htm">Event Handling</a>.
*
/**
* Called when the child is attached to VisualElement. @n
- * Overrides the %OnChildAttached() method to provide user-specific code just after the child is attached to the %VisualElement.
- * This method is invoked when @c child is attached to @c source by @c AttachChild, @c InsertChild, @c ChangeZOder.
+ * Overrides the %OnChildAttached() method to provide user-specific code just after the child is attached to %VisualElement.
+ * This method is invoked when @c child is attached to @c source by invoking VisualElement::AttachChild(), VisualElement::InsertChild(),
+ * or VisualElement::ChangeZOder().
*
* @since 2.0
*
* @param[in] parent The parent instance
* @param[in] child The child instance
- * @see VisualElement::AttachChild()
- * @see VisualElement::InsertChild()
*/
virtual void OnChildAttached(Tizen::Ui::Animations::VisualElement& parent, Tizen::Ui::Animations::VisualElement& child) = 0;
/**
- * Called when the child is detached to VisualElement. @n
- * Overrides the %OnChildDetached() method to provide user-specific code just after the child is detached from the %VisualElement.
- * This method is invoked when @c child is detached from @c source by @c DetachChild, @c InsertChild, or @c ChangeZOder.
+ * Called when the child is detached from VisualElement. @n
+ * Overrides the %OnChildDetached() method to provide user-specific code just after the child is detached from %VisualElement.
+ * This method is invoked when @c child is detached from @c source by invoking VisualElement::DetachChild(), VisualElement::InsertChild(),
+ * or VisualElement::ChangeZOder().
*
* @since 2.0
*
* @param[in] parent The parent instance
* @param[in] child The child instance
- * @see VisualElement::DetachChild()
*/
virtual void OnChildDetached(Tizen::Ui::Animations::VisualElement& parent, Tizen::Ui::Animations::VisualElement& child) = 0;
/**
* Called when VisualElement is attached to the parent. @n
- * Overrides the %OnAttached() method to provide user-specific code just after the %VisualElement is attached to the parent.
- * This method is invoked when @c source is attached to @c parent by @c AttachChild, @c InsertChild, @c ChangeZOder.
+ * Overrides the %OnAttached() method to provide user-specific code just after %VisualElement is attached to the parent.
+ * This method is invoked when @c source is attached to @c parent by invoking VisualElement::AttachChild(), VisualElement::InsertChild(), or
+ * VisualElement::ChangeZOder().
*
* @since 2.0
*
* @param[in] child The child instance
* @param[in] parent The parent instance
- * @see VisualElement::AttachChild()
- * @see VisualElement::InsertChild()
*/
virtual void OnAttached(Tizen::Ui::Animations::VisualElement& child, Tizen::Ui::Animations::VisualElement& parent) = 0;
/**
- * Called when VisualElement is detached to the parent. @n
- * Overrides the %OnDetached() method to provide user-specific code just after the %VisualElement is detached from the parent.
- * This method is invoked when @c source is detached from @c parent by @c DetachChild, @c InsertChild, or @c ChangeZOder.
+ * Called when VisualElement is detached from the parent. @n
+ * Overrides the %OnDetached() method to provide user-specific code just after %VisualElement is detached from the parent.
+ * This method is invoked when @c source is detached from @c parent by invoking VisualElement::DetachChild(), VisualElement::InsertChild(),
+ * or VisualElement::ChangeZOder().
*
* @since 2.0
*
* @param[in] child The child instance
* @param[in] parent The parent instance
- * @see VisualElement::DetachChild()
*/
virtual void OnDetached(Tizen::Ui::Animations::VisualElement& child, Tizen::Ui::Animations::VisualElement& parent) = 0;
/**
* Called when the transform matrix is about to be changed. @n
* Overrides the %OnTransformChanging() method to provide the user-specific code before the transform matrix is changed.
- * This method is invoked when the transform matrix of @c source is about to be changed by invoking @c SetTransformMatrix.
+ * This method is invoked when the transform matrix of @c source is about to be changed by invoking VisualElement::SetTransformMatrix().
*
* @since 2.0
*
- * @return An error code
- * @param[in] source The VisualElement to change
+ * @return An error code
+ * @param[in] source VisualElement to change
* @param[in,out] newTransform The new transform matrix
- * @remarks If this method returns @c E_SUCCESS, @c source will be applied with @c newTransform matrix, else will be cancelled.
+ * @remarks If this method returns @c E_SUCCESS, @c source will be applied with @c newTransform matrix, else will be cancelled.
*/
virtual result OnTransformChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatMatrix4& newTransform) = 0;
/**
* Called when the transform matrix is changed. @n
* Overrides the %OnTransformChanged() method to provide the user-specific code just after the transform matrix is changed.
- * This method is invoked when the transform matrix of @c source is changed by invoking @c SetTransformMatrix.
+ * This method is invoked when the transform matrix of @c source is changed by invoking VisualElement::SetTransformMatrix().
*
* @since 2.0
*
- * @param[in] source The VisualElement change applied
+ * @param[in] source VisualElement with change applied
* @param[in] previousTransform The previous transform matrix
*/
virtual void OnTransformChanged(Tizen::Ui::Animations::VisualElement& source, const Tizen::Graphics::FloatMatrix4& previousTransform) = 0;
/**
* Called when the children transform matrix is about to be changed. @n
* Overrides the %OnChildrenTransformChanging() method to provide user-specific code before the children transform matrix is changed.
- * This method is invoked when the children transform matrix of @c source is about to be changed by invoking @c SetChildrenTransformMatrix.
+ * This method is invoked when the children transform matrix of @c source is about to be changed by invoking VisualElement::SetChildrenTransformMatrix().
*
* @since 2.0
*
- * @return An error code
- * @param[in] source The VisualElement to change
+ * @return An error code
+ * @param[in] source VisualElement to change
* @param[in,out] newTransform The new transform matrix
- * @remarks If this method returns @c E_SUCCESS, @c source will be applied with @c newTransform matrix, else will be cancelled.
+ * @remarks If this method returns @c E_SUCCESS, @c source will be applied with @c newTransform matrix, else the operation will be cancelled.
*/
virtual result OnChildrenTransformChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatMatrix4& newTransform) = 0;
/**
* Called when the children transform matrix is changed. @n
* Overrides the %OnChildrenTransformChanged() method to provide user-specific code just after the children transform matrix is changed.
- * This method is invoked when the children transform matrix of @c source is changed by invoking @c SetChildrenTransformMatrix.
+ * This method is invoked when the children transform matrix of @c source is changed by invoking VisualElement::SetChildrenTransformMatrix().
*
* @since 2.0
*
- * @param[in] source The VisualElement change applied
+ * @param[in] source VisualElement with change applied
* @param[in] previousTransform The previous transform matrix
*/
virtual void OnChildrenTransformChanged(Tizen::Ui::Animations::VisualElement& source, const Tizen::Graphics::FloatMatrix4& previousTransform) = 0;
/**
* Called when the bounds are about to be changed. @n
* Overrides the %OnBoundsChanging() method to provide user-specific code before the bounds are changed.
- * This method is invoked when the bounds @c source is about to be changed by invoking @c SetBounds.
+ * This method is invoked when the bounds @c source is about to be changed by invoking VisualElement::SetBounds().
*
* @since 2.0
*
- * @return An error code
- * @param[in] source The VisualElement to change
+ * @return An error code
+ * @param[in] source VisualElement to change
* @param[in,out] newBounds The new bounds
- * @remarks If this method does not return @c E_SUCCESS, @c source is not applied with @c newBounds rectangle.
+ * @remarks If this method does not return @c E_SUCCESS, @c source is not applied with @c newBounds rectangle.
*/
virtual result OnBoundsChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatRectangle& newBounds) = 0;
/**
* Called when the bounds are changed. @n
* Overrides the %OnBoundsChanged() method to provide user-specific code just after the bounds are changed.
- * This method is invoked when the bounds of @c source is changed by invoking @c SetBounds.
+ * This method is invoked when the bounds of @c source is changed by invoking VisualElement::SetBounds().
*
* @since 2.0
*
- * @param[in] source The VisualElement change applied
+ * @param[in] source VisualElement with change applied
* @param[in] previousBounds The previous bounds
*/
virtual void OnBoundsChanged(Tizen::Ui::Animations::VisualElement& source, const Tizen::Graphics::FloatRectangle& previousBounds) = 0;
/**
* Called when the show state is changed. @n
* Overrides the %OnShowStateChanged() method to provide user-specific code when the show state is changed.
- * This method is invoked when the show state of @c source is changed by invoking @c SetShowState.
+ * This method is invoked when the show state of @c source is changed by invoking VisualElement::SetShowState().
*
* @since 2.0
*
- * @param[in] source An instance whose show state is changed
+ * @param[in] source VisualElement with change applied
* @param[in] previousShowState The previous show state
*/
virtual void OnShowStateChanged(Tizen::Ui::Animations::VisualElement& source, bool previousShowState) = 0;
*
* @since 2.0
*
- * @param[in] startValue The start value for Integer animation
- * @param[in] endValue The end value for Integer animation
+ * @param[in] startValue The start value for integer animation
+ * @param[in] endValue The end value for integer animation
* @param[in] duration The duration of animation in milliseconds
* @param[in] interpolator The type of Interpolation @n
* This is used for the intermediate value calculation of the animation.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The value of the specified parameter is negative or the interpolator is of an invalid type.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The value of a specified parameter is negative.
+ * - The interpolator is of an invalid type.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
IntegerAnimation(int startValue, int endValue, long duration, AnimationInterpolatorType interpolator);
* @since 2.0
*
* @param[in] integerAnimation An instance of %IntegerAnimation
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
IntegerAnimation(const IntegerAnimation& integerAnimation);
*
* @since 2.0
*
- * @param[in] rhs An instance of %IntegerAnimation
+ * @param[in] rhs An instance of %IntegerAnimation
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
/**
- * Checks whether the specified and current instance of %IntegerAnimation have equal animation values.
+ * Checks whether the specified instance and the current instance of %IntegerAnimation have equal animation values.
*
* @since 2.0
*
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random distribution for all inputs.
+ * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function
+ * must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
/**
- * Adds a key frame to the animation.
+ * Adds a keyframe to the animation.
*
* @since 2.0
*
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks If @c time is greater than the duration, it becomes the new duration and @c value becomes the new @c endValue.
- * Also the old duration and @c endValue are added as a new keyframe entry in the list.
- * @remarks If a key-value pair with the current key already exists, the old value is overwritten with the new one.
- * @remarks An exception is returned if @c time is equal to @c 0 or the duration of the animation.
+ * @remarks
+ * - If the specified @c time is greater than the duration, it becomes the new duration and @c value becomes the new @c endValue.
+ * Also the old duration and @c endValue are added as a new keyframe entry in the list.
+ * - If a key-value pair with the current key already exists, the old value is overwritten with the new one.
+ * - An exception is returned if the specified @c time is equal to @c 0 or the duration of the animation.
*/
result AddKeyFrame(long time, int value);
* @since 2.0
*
* @return An error code
- * @param[in] index The index value in the Keyframe list @n
+ * @param[in] index The index value in the keyframe list @n
* The value is sorted in an increasing order of time.
* @param[out] time The time stamp at the specified @c index
* @param[out] value The value at the specified @c index
* @since 2.0
*
* @return An error code
- * @param[in] time The key frame time
+ * @param[in] time The keyframe time
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c time value is invalid.
- * @exception E_OBJ_NOT_FOUND The specified @c time is not found in the KeyFrame List.
+ * @exception E_OBJ_NOT_FOUND The specified @c time is not found in the keyframe List.
* @exception E_SYSTEM A system error has occurred.
*/
result RemoveKeyFrame(long time);
* @since 2.0
*
* @return An error code
- * @param[in] index The index value in the Keyframe list @n
+ * @param[in] index The index value in the keyframe list @n
* The value is sorted in an increasing order of time.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is out of range.
*
* @since 2.0
*
- * @param[in] rhs An instance of %ParallelAnimationGroup
+ * @param[in] rhs An instance of %ParallelAnimationGroup
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random
+ * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function must generate a random
* distribution for all inputs.
*/
virtual int GetHashCode(void) const;
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks If an animation is added to a target type that already has an animation associated with it, the old animation is overwritten with the new animation.
+ * @remarks If an animation is added to a target type that already has an animation associated with it,
+ * the old animation is overwritten with the new animation.
*/
result AddAnimation(AnimationTargetType animTarget, const AnimationBase& animation);
* @return An error code
* @param[in] animTarget The animation target
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_OBJ_NOT_FOUND The animation with the specified animation target does not exist in the animation group.
* @exception E_SYSTEM A system error has occurred.
*/
*
* @since 2.0
*
- * @param[in] pointAnimation An instance of %PointAnimation
+ * @param[in] pointAnimation An instance of %PointAnimation
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random
- * distribution for all inputs.
+ * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function must
+ * generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
/**
- * Adds a key frame to the animation.
+ * Adds a keyframe to the animation.
*
* @since 2.0
*
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks If @c time is greater than the duration, it becomes the new duration and @c value becomes the new @c endValue. @n
- * The old duration and @c endValue are added as a new key frame entry in the list. @n
- * If a key-value pair with the current key already exists, then the old value will be overwritten with the new one. @n
- * An exception will be returned if time is equal to @c 0 or duration of the animation.
+ * @remarks
+ * - If @c time is greater than the duration, it becomes the new duration and @c value becomes the new @c endValue.
+ * The old duration and @c endValue are added as a new keyframe entry in the list.
+ * - If a key-value pair with the current key already exists, then the old value is overwritten with the new one.
+ * - An exception is returned if time is equal to @c 0 or duration of the animation.
*/
result AddKeyFrame(long time, const Tizen::Graphics::Point& value);
* @since 2.0
*
* @return An error code
- * @param[in] index The index value in the Keyframe list @n
+ * @param[in] index The index value in the keyframe list @n
* The value is sorted in an increasing order of time.
* @param[out] time The time stamp at the specified @c index
* @param[out] value The value at the specified @c index
* @since 2.0
*
* @return An error code
- * @param[in] time The key frame time
+ * @param[in] time The keyframe time
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c time value is invalid.
- * @exception E_OBJ_NOT_FOUND The specified @c time is not found in the KeyFrame List.
+ * @exception E_OBJ_NOT_FOUND The specified @c time is not found in the keyframe List.
* @exception E_SYSTEM A system error has occurred.
*/
result RemoveKeyFrame(long time);
* @since 2.0
*
* @return An error code
- * @param[in] index The index value in the Keyframe list @n
+ * @param[in] index The index value in the keyframe list @n
* The value is sorted in an increasing order of time.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is out of range.
* @since 2.0
*
* @param[in] rectangleAnimation An instance of %RectangleAnimation
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
RectangleAnimation(const RectangleAnimation& rectangleAnimation);
*
* @since 2.0
*
- * @param[in] rhs An instance of %RectangleAnimation
+ * @param[in] rhs An instance of %RectangleAnimation
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random
+ * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function must generate a random
* distribution for all inputs.
*/
virtual int GetHashCode(void) const;
/**
- * Adds a key frame to the animation.
+ * Adds a keyframe to the animation.
*
* @since 2.0
*
* @remarks If @c time is greater than the duration, it becomes the new duration and @c value becomes the new end value. @n
* Also, the old duration and end value are added as a new keyframe entry in the list.
* @remarks If a key-value pair with the current key already exists, the old value is overwritten with the new one.
- * @remarks An exception is returned if @c time is equal to @c 0 or the duration of the animation.
+ * @remarks An exception is returned if @c time is equal to @c 0 or equal to the duration of the animation.
*/
result AddKeyFrame(long time, const Tizen::Graphics::Rectangle& value);
* @since 2.0
*
* @return An error code
- * @param[in] index The index value in the Keyframe list @n
+ * @param[in] index The index value in the keyframe list @n
* This is sorted in an increasing order of time.
* @param[out] time The time stamp at the specified @c index
* @param[out] value The value at the specified @c index
* @since 2.0
*
* @return An error code
- * @param[in] time The key frame time
+ * @param[in] time The keyframe time
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c time value is invalid.
- * @exception E_OBJ_NOT_FOUND The time passed is not found in the KeyFrame list.
+ * @exception E_OBJ_NOT_FOUND The time passed is not found in the keyframe list.
* @exception E_SYSTEM A system error has occurred.
*/
result RemoveKeyFrame(long time);
* @since 2.0
*
* @return An error code
- * @param[in] index The index value in the Keyframe list @n
+ * @param[in] index The index value in the keyframe list @n
* This is sorted in an increasing order of time.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is out of range.
*
* @since 2.0
*
- * @return The start value
+ * @return The start value
*/
Tizen::Graphics::Rectangle GetStartValue(void) const;
* @since 2.0
*
* @param[in] startValue The start value for the rotate animation @n
- * If the value is positive, the control is rotated in the clockwise direction and if the value is negative, the control
- * is rotated in the anti-clockwise direction.
+ * If the value is positive, the control is rotated in the clockwise direction and if the
+ * value is negative, the control is rotated in the anti-clockwise direction.
* @param[in] endValue The end value for the rotate animation @n
- * The value must be @c 0 or @c 360, else ControlAnimator::ControlAnimator() returns an @c E_INVALID_ARG exception.
+ * The value must be @c 0 or @c 360, else ControlAnimator::ControlAnimator() returns an
+ * @c E_INVALID_ARG exception.
* @param[in] duration The duration of animation in milliseconds
* @param[in] interpolator The type of interpolator @n
* This is used for the intermediate value calculation of the animation.
* @since 2.0
*
* @param[in] rotateAnimation An instance of %RotateAnimation
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
RotateAnimation(const RotateAnimation& rotateAnimation);
*
* @since 2.0
*
- * @param[in] rhs An instance of %RotateAnimation
+ * @param[in] rhs An instance of %RotateAnimation
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
/**
* Checks whether the specified instance and the current instance of %RotateAnimation have different animation values.
*
- * @since 2.0
+ * @since 2.0
*
* @return @c true if the values of the animations of the two instances of %RotateAnimation are not equal, @n
* else @c false
* @return @c true if the value of the current instance is equal to the value of the specified instance, @n
* else @c false
* @param[in] obj An instance of %RotateAnimation
- * @remarks The %RotateAnimation class has a semantic value. This means that this method checks whether the two instances have the same animation.
+ * @remarks The %RotateAnimation class has a semantic value. This means that this method checks whether the
+ * two instances have the same animation.
*/
virtual bool Equals(const Tizen::Base::Object& obj) const;
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random
- * distribution for all inputs.
+ * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function
+ * must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
* @since 2.0
*
* @param[in] animationGroup An instance of %SequentialAnimationGroup
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
SequentialAnimationGroup(const SequentialAnimationGroup& animationGroup);
*
* @since 2.0
*
- * @param[in] rhs An instance of %SequentialAnimationGroup
+ * @param[in] rhs An instance of %SequentialAnimationGroup
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random
- * distribution for all inputs.
+ * @remarks The two equal instances must return the same hash value. @n For better performance, the used hash function must
+ * generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OUT_OF_RANGE The specified @c index is out of range.
* @exception E_SYSTEM A system error has occurred.
- * @remarks If an animation is added to the same index which already has an animation associated with it, the old animation will be overwritten with the new one.
+ * @remarks If an animation is added to the same index which already has an animation associated with it,
+ * the old animation will be overwritten with the new one.
*/
result SetAnimationAt(int index, AnimationTargetType animTarget, const AnimationBase& animation);
ANIMATION_TARGET_NONE = -1, /**< An invalid %Animation */
ANIMATION_TARGET_SIZE, /**< An animation for the size property */
ANIMATION_TARGET_POSITION, /**< An animation for the position property */
- ANIMATION_TARGET_ALPHA, /**< An animation for alpha property @n The value range for playing the alpha animation must be between @c 0.0 to @c 1.0. */
- ANIMATION_TARGET_ROTATION, /**< An animation for rotate property @n The control will be rotated in the xy-plane along the z-axis. */
+ ANIMATION_TARGET_ALPHA, /**< An animation for alpha property @n
+ The value range for playing the alpha animation must be between @c 0.0 to @c 1.0. */
+ ANIMATION_TARGET_ROTATION, /**< An animation for rotate property @n
+ The control will be rotated in the xy-plane along the z-axis. */
ANIMATION_TARGET_MAX // This enum value is for internal use only.
// Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
};
ANIMATION_TRIGGER_USER = 0, /**< The animation attached to a control is explicitly triggered by the user */
ANIMATION_TRIGGER_POSITION_CHANGE, /**< The animation attached to a control is implicitly triggered by changing the position of the control */
ANIMATION_TRIGGER_SIZE_CHANGE, /**< The animation attached to a control is implicitly triggered by changing the size of the control */
- ANIMATION_TRIGGER_SHOW_STATE_CHANGE, /**< The animation attached to a control is implicitly triggered by changing the showstate of the control */
+ ANIMATION_TRIGGER_SHOW_STATE_CHANGE, /**< The animation attached to a control is implicitly triggered by changing the show state of the control */
};
* It encapsulates properties about coordinates (bounds, transform matrix, children transform matrix and so on),
* contents (content bounds, clipping, opacity, show state and so on) and tree-hierarchy.
* It also provides infrastructure necessary for animations (AddAnimation(), RemoveAnimation() and so on).
- * A %VisualElement object instantiated by applications works as a model object and may have a cloned counter part for presentation on screen which has a separated life-cycle.
- * The presentation object is managed by system and applications must not change properties of it.
- * Use the presentation instance only to get the current state of a visual element in a tree. Calling the setter methods of a presentation instance can cause unexpected behavior to occur.
- * Most animations of %VisualElement are applied on presentation objects. Properties set by applications are stored in model objects while properties of presentation objects
- * are changing during implicit or explicit animations.
+ * A %VisualElement object instantiated by applications works as a model object and may have a cloned counter part for presentation on screen which has a
+ * separate life-cycle.
+ * The presentation object is managed by system and applications must not change its properties.
+ * Use the presentation instance only to get the current state of a visual element in a tree. Calling the setter methods of a presentation instance
+ * can cause unexpected behavior to occur.
+ * Most animations of %VisualElement are applied on presentation objects. Properties set by applications are stored in model objects while properties of
+ * presentation objects are changing during implicit or explicit animations.
*
- * This class also provides interfaces such as IVisualElementContentProvider, IVisualElementEventListener, and IVisualElementAnimationProvider to override default behaviors
- * without inheritances.
+ * This class also provides interfaces such as IVisualElementContentProvider, IVisualElementEventListener, and IVisualElementAnimationProvider
+ * to override the default behavior without inheritances.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/visualelement.htm">Visual Elements</a>.
*
/**
- * The object is not fully constructed after this constructor is called.
+ * The object is not fully constructed after this constructor is called.@n
* For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
* @since 2.0
*
* @remarks This method must be used to destroy this instance. @n
- * Do not use @c delete operator.
+ * Do not use the @c delete operator.
* @remarks This method first destroys children, and then it destroys the parent(this instance).
* @remarks This method will call OnDestructing() callback before deallocating the instance.
* @remarks The destructing sequence is as follows:
- * 1. Destroy children recursively.
+ * 1. Destroys children recursively.
* 2. Calls %OnDestructing() callback.
* 3. Detaches from parent.
* 4. Removes all animations associated with this instance.
* @param[in] pProvider The animation provider to create implicit animations
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION This instance does not allow to set an animation provider. @n
- * The animation provider can be set to the model instance only.
+ * The animation provider can be set to the model instance only.
*
- * @see IVisualElementAnimationProvider
* @see GetAnimationProvider()
*/
result SetAnimationProvider(IVisualElementAnimationProvider* pProvider);
*
* @return The animation provider
* @exception E_INVALID_OPERATION This instance does not allow to get an animation provider. @n
- * The animation provider can be set to the model instance only.
+ * The animation provider can be set to the model instance only.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @see IVisualElementAnimationProvider
* @see SetAnimationProvider()
*/
IVisualElementAnimationProvider* GetAnimationProvider(void) const;
* @param[in] pProvider The content provider to customize information on content
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION This instance does not allow to set a content provider. @n
- * The content provider can be set to the model instance only.
- * @see IVisualElementContentProvider
+ * The content provider can be set to the model instance only.
* @see GetContentProvider()
*/
result SetContentProvider(IVisualElementContentProvider* pProvider);
*
* @return The content provider
* @exception E_INVALID_OPERATION This instance does not allow to get content provider. @n
- * The content provider can be set to the model instance only.
+ * The content provider can be set to the model instance only.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @see IVisualElementContentProvider
* @see SetContentProvider()
*/
IVisualElementContentProvider* GetContentProvider(void) const;
* @param[in] pListener The %VisualElement event listener
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION This instance does not allow to set an event listener. @n
- * The event listener can be set to the model instance only.
- * @see IVisualElementEventListener
+ * The event listener can be set to the model instance only.
* @see GetVisualElementEventListener()
*/
result SetVisualElementEventListener(IVisualElementEventListener* pListener);
*
* @return The %VisualElement event listener
* @exception E_INVALID_OPERATION This instance does not allow to get an event listener. @n
- * The event listener can be set to the model instance only.
+ * The event listener can be set to the model instance only.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @see IVisualElementEventListener
* @see SetVisualElementEventListener()
*/
IVisualElementEventListener* GetVisualElementEventListener(void) const;
virtual VisualElementAnimation* OnCreateAnimationForProperty(const Tizen::Base::String& property);
/**
- * Overrides the %OnGetPropertyRequested() method to provide user-specific properties or to change default behaviors of %VisualElement class. @n
+ * Overrides the %OnGetPropertyRequested() method to provide user-specific properties or to change the default behavior of the %VisualElement class. @n
* This method is called whenever GetProperty() is called.
*
* @since 2.0
*
- * @return The property's value
+ * @return The property value
* @param[in] property The property name
* @see SetProperty()
* @see GetProperty()
* @return @c true if this instance is a child or descendant of a specified one, @n
* else @c false
* @param[in] pOther A pointer to %VisualElement instance to check its relationship
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c pOther is @c null.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified @c pOther is @c null.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
bool IsChildOf(const VisualElement* pOther) const;
* - The specified @c child is not instantiated successfully. @n
* - The specified @c child is this instance. @n
* - The specified @c child is already an ancestor of this instance.
- * @see SetZOrderGroup()
* @see InsertChild()
* @see DetachChild()
* @see ChangeZOrder()
* - The specified @c pChild is this instance. @n
* - The specified @c pChild is already an ancestor of this instance.@n
* - The specified @c pChild is @c null.
- * @see SetZOrderGroup()
* @see InsertChild()
* @see DetachChild()
* @see ChangeZOrder()
*
* @return An error code
* @param[in] pChild A pointer to %VisualElement instance to detach
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND The specified @c pChild is not a child of this instance.
- * @exception E_INVALID_ARG The specified @c pChild is @c null.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_NOT_FOUND The specified @c pChild is not a child of this instance.
+ * @exception E_INVALID_ARG The specified @c pChild is @c null.
* @remarks This method detaches @c pChild from this instance. To deallocate %VisualElement, call Destroy() method, and not C++ delete.
* @see InsertChild()
* @see AttachChild()
* @param[in] searchDescendants @c true to find a match among all the descendants of this instance, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND There is no %VisualElement with the specified @c name.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If an exception occurs, this method returns @c null.
+ * @exception E_OBJ_NOT_FOUND There is no %VisualElement with the specified @c name.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - If an exception occurs, this method returns @c null.
* @see GetName()
* @see SetName()
*/
* @param[in] point The position in coordinate space of this instance
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND There is no %VisualElement containing the specified @c point.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If an exception occurs, this method returns @c null.
- * @remarks This method assumes that all ancestors of this instance do not clip children.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - If an exception occurs, this method returns @c null.
+ * - This method assumes that all ancestors of this instance do not clip children.
* @see IVisualElementContentProvider::HitTest()
- * @see OnHitTest()
* @see IsClipChildrenEnabled()
* @see SetClipChildrenEnabled()
*/
* @param[in] animation The animation instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The input parameter is incorrect.
- * @exception E_OBJ_ALREADY_EXIST An animation with @c keyName already exists.
+ * @exception E_OBJ_ALREADY_EXIST An animation with the specified @c keyName already exists.
* @exception E_INVALID_OPERATION This instance is not a model object. @n
* An animation can be added to the model instance only.
* @see RemoveAnimation()
* @return An error code
* @param[in] keyName The name of the animation to remove
* @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND An animation with @c keyName does not exist.
+ * @exception E_OBJ_NOT_FOUND An animation with the specified @c keyName does not exist.
* @see AddAnimation()
* @see GetAnimationN()
*/
* @return A pointer to the animation
* @param[in] keyName The name of the animation
* @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND An animation with @c keyName does not exist.
+ * @exception E_OBJ_NOT_FOUND An animation with the specified @c keyName does not exist.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @remarks If an exception occurs, this method returns @c null.
* @see AddAnimation()
* @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_STATE This instance is not attached to the maintained tree for displaying. @n
- * For displaying, this instance should be descendant of the root %VisualElement.
+ * For displaying, this instance should be descendant of the root %VisualElement.
* @exception E_SYSTEM A system error has occurred.
* @see IVisualElementContentProvider
*/
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_INVALID_OPERATION The contents of this instance is set by the SetSurface() method. @n
- The canvas can be created for the model instance only.
- * @remarks This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the %VisualElement.
- * It is the developer's responsibility to deallocate the canvas after use.
- * The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged.
- * Therefore, one must delete previously allocated canvas and create a new canvas using this method,
- * if the size or position of the %VisualElement is changed. @n
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If an exception occurs, this method returns @c null.
+ * The canvas can be created for the model instance only.
+ * @remarks
+ * - This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the %VisualElement.
+ * It is the developer's responsibility to deallocate the canvas after use.
+ * The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged.
+ * Therefore, one must delete previously allocated canvas and create a new canvas using this method,
+ * if the size or position of the %VisualElement is changed. @n
+ * - The specific error code can be accessed using the GetLastResult() method.
* @see GetCanvasN(const Tizen::Graphics::Rectangle& bounds)
* @see GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds)
*/
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_INVALID_OPERATION The contents of this instance is set by the SetSurface() method. @n
- The canvas can be created for the model instance only.
+ * The canvas can be created for the model instance only.
* @exception E_OUT_OF_RANGE The specified @c bounds do not intersect with the bounds of the %VisualElement. @n
* The width and height must be greater than or equal to @c 0.
- * @remarks Only the graphic canvas of displayable %VisualElement can be obtained.
- * If the specified area is not inside the %VisualElement,
- * the graphics canvas of overlapped area between the %VisualElement and the specified @c bound is returned. @n
- * This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the %VisualElement.
- * It is the developer's responsibility to deallocate the canvas after use.
- * The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged.
- * Therefore, one must delete previously allocated canvas and create a new canvas using this method,
- * if the size or position of the control is changed. @n
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If an exception occurs, this method returns @c null.
+ * @remarks
+ * - Only the graphic canvas of displayable %VisualElement can be obtained.
+ * If the specified area is not inside the %VisualElement,
+ * the graphics canvas of overlapped area between the %VisualElement and the specified @c bound is returned. @n
+ * This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the %VisualElement.
+ * It is the developer's responsibility to deallocate the canvas after use.
+ * The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged.
+ * Therefore, one must delete previously allocated canvas and create a new canvas using this method,
+ * if the size or position of the control is changed. @n
+ * - The specific error code can be accessed using the GetLastResult() method.
* @see GetCanvasN()
* @see GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds)
*/
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_INVALID_OPERATION The contents of this instance is set by the SetSurface() method. @n
- The canvas can be created for the model instance only.
+ * The canvas can be created for the model instance only.
* @exception E_OUT_OF_RANGE The specified @c bounds do not intersect with the bounds of %VisualElement. @n
* The width and height must be greater than or equal to @c 0.
- * @remarks Only the graphic canvas of displayable %VisualElement can be obtained.
- * If the specified area is not inside %VisualElement,
- * the graphics canvas of overlapped area between %VisualElement and the specified @c bound is returned. @n
- * This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of %VisualElement.
- * It is the developer's responsibility to deallocate the canvas after use.
- * The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged.
- * Therefore, one must delete previously allocated canvas and create a new canvas using this method,
- * if the size or position of the control is changed.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If an exception occurs, this method returns @c null.
+ * @remarks
+ * - Only the graphic canvas of displayable %VisualElement can be obtained.
+ * If the specified area is not inside %VisualElement,
+ * the graphics canvas of overlapped area between %VisualElement and the specified @c bound is returned. @n
+ * This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of %VisualElement.
+ * It is the developer's responsibility to deallocate the canvas after use.
+ * The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged.
+ * Therefore, one must delete previously allocated canvas and create a new canvas using this method,
+ * if the size or position of the control is changed.
+ * - The specific error code can be accessed using the GetLastResult() method.
* @see GetCanvasN()
* @see GetCanvasN(const Tizen::Graphics::Rectangle& bounds)
*/
*
* @since 2.0
*
- * @return The value of the specified property
+ * @return The value of the specified property, @n
+ * else @c Variant::NULL_VARIANT if an exception occurs
* @param[in] property The %VisualElement's property
* @exception E_SUCCESS The method is successful.
* @exception E_KEY_NOT_FOUND The specified @c property is not found.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If an exception occurs, this method returns @c Variant::NULL_VARIANT.
- * @remarks Additional exceptions can occur according to the behavior of subclasses.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - Additional exceptions can occur according to the behavior of subclasses.
* @see SetProperty()
* @see OnGetPropertyRequested()
*/
* @param[in] bounds The new bounds of this instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_STATE This instance is in an invalid state.
- * @remarks When the size of @c bounds is changed, the entire content area will be added to the update region of this instance if redraw-on-resize feature is enabled.
+ * @remarks When the size of @c bounds is changed, the entire content area will be added to the update region of this instance
+ * if redraw-on-resize feature is enabled.
* @see GetBounds()
* @see IsRedrawOnResizeEnabled()
* @see SetRedrawOnResizeEnabled()
* The matrix for this conversion is singular that has a zero determinant.
* @remarks This instance and @c pFromVisualElement must share a common ancestor. @n
* If @c null, it is regarded that @c point is in the root coordinate space.
- * @see ConvertCoordinates(Tizen::Graphics::FloatRectangle& rectangle, const VisualElement* pFromVisualElement)
+ * @see ConvertCoordinates()
*/
result ConvertCoordinates(Tizen::Graphics::FloatPoint& point, const VisualElement* pFromVisualElement) const;
* The matrix for this conversion is singular that has a zero determinant.
* @remarks This instance and @c pFromVisualElement must share a common ancestor. @n
* If @c null, it is regarded that @c rectangle is in the root coordinate space.
- * @see ConvertCoordinates(Tizen::Graphics::FloatPoint& point, const VisualElement* pFromVisualElement)
+ * @see ConvertCoordinates()
*/
result ConvertCoordinates(Tizen::Graphics::FloatRectangle& rectangle, const VisualElement* pFromVisualElement) const;
* @since 2.1
*
* @return The transformed vector
- * @param[in] originPoint The point in @c pOriginVisualElement coordinate space
+ * @param[in] originPoint The point in @c pOriginVisualElement coordinate space
* @param[in] pOriginVisualElement The %VisualElement instance with @c originPoint in its coordinate space
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The input parameter is incorrect.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
- The matrix for this conversion is singular which has zero determinant.
- * @remarks
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The input parameter is incorrect.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
+ * The matrix for this conversion is singular which has zero determinant.
+ * @remarks
* - This instance and @c pOriginVisualElement must share a common ancestor.
* - The specific error code can be accessed using the GetLastResult() method.
*/
* @since 2.0
*
* @return An error code
- * @param[in] contentBounds The sub-rectangle of contents to display in uniform coordinate space
+ * @param[in] contentBounds The sub-rectangle of contents to display in uniform coordinate space @n
+ * The default value is FloatRectangle(0.0, 0.0, 1.0, 1.0).
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The width and height of @c contentBounds must be greater than @c 0.0.
- * @remarks Default @c contentBounds is FloatRectangle(0.0, 0.0, 1.0, 1.0).
- * @remarks If each component of @c contentBounds is not within the range [0.0, 1.0], the integer portion of the coordinates are
+ * @remarks If each component of @c contentBounds is not within the range [0.0, 1.0], the integer portion of the coordinates are
* ignored and only fractional part is used which creates a repeating contents.
* @see GetContentBounds()
*/
Tizen::Graphics::FloatRectangle GetContentBounds(void) const;
/**
- * Acquires the %VisualElement instance for display.
+ * Acquires a %VisualElement instance for display.
*
* @since 2.0
*
const VisualElement* AcquirePresentationInstance(void);
/**
- * Releases the %VisualElement instance for display.
+ * Releases a %VisualElement instance for display.
*
* @since 2.0
*
void ReleasePresentationInstance(void);
/**
- * Acquires the %VisualElement instance for model.
+ * Acquires a %VisualElement instance for model.
*
* @since 2.0
*
const VisualElement* AcquireModelInstance(void);
/**
- * Releases the %VisualElement instance for model.
+ * Releases a %VisualElement instance for model.
*
* @since 2.0
*
*
* @since 2.0
*
- * @param[in] animation An instance of %VisualElementAnimation
+ * @param[in] animation An instance of %VisualElementAnimation
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @return @c true if the value of the current instance equals the value of the specified instance, @n
* else @c false
* @param[in] obj An instance of %VisualElementAnimation
- * @remarks The %VisualElementAnimation class has a semantic value which means that this method checks whether the two instances have the same animation.
+ * @remarks The %VisualElementAnimation class has a semantic value which means that this method checks whether the two
+ * instances have the same animation.
*/
virtual bool Equals(const Tizen::Base::Object& obj) const;
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks The two equal instances must return the same hash value.
- * For better performance, the used hash function must generate a random distribution for all inputs.
+ * @remarks The two equal instances must return the same hash value.@n
+ * For better performance, the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
/**
- * Gets the copied instance of the class.
+ * Gets a copied instance of the class.
*
* @since 2.0
*
- * @return An instance of %VisualElementAnimation
- * @exception E_SUCCESS The method is successful.
+ * @return An instance of %VisualElementAnimation
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
* @since 2.0
*
* @param[in] pListener The listener instance to set
- * @remarks When the animation that is listening to an animation status event is removed before it starts, the platform skips to call @n
- * the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationStarted() method and directly calls the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationFinished() method.
+ * @remarks When the animation that is listening to an animation status event is removed before it starts, the platform
+ * skips to call the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationStarted() method and
+ * directly calls the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationFinished() method.
*/
void SetVisualElementAnimationStatusEventListener(IVisualElementAnimationStatusEventListener* pListener);
*
* @since 2.0
*
- * @return A pointer to the timing function instance
- * If timing function has not been set, the default timing function is returned.
+ * @return A pointer to the timing function instance @n
+ * If the timing function has not been set, the default timing function is returned.
* @see SetTimingFunction()
*/
const IVisualElementAnimationTimingFunction* GetTimingFunction(void) const;
*
* @since 2.0
*
- * @return A pointer to the interpolator instance
- * If interpolator has not been set, the default interpolator is returned.
+ * @return A pointer to the interpolator instance @n
+ * If the interpolator has not been set, the default interpolator is returned.
* @see SetValueInterpolator()
*/
const IVisualElementAnimationValueInterpolator* GetValueInterpolator(void) const;
* @return An error code
* @param[in] milliseconds The duration of the animation in milliseconds
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The value of the specified parameter is negative or lesser than the offset of the animation.
+ * @exception E_INVALID_ARG The value of the specified parameter is negative or lesser than the offset of the animation.
* @see GetDuration()
*/
result SetDuration(long milliseconds);
/**
* Sets the offset value of the animation. @n
- * Additionally, the %SetOffset() alters the start value and duration for which an animation is played.
+ * Additionally, %SetOffset() alters the start value and duration for which an animation is played.
*
* @since 2.0
*
- * @return An error code
- * @param[in] milliseconds The offset of the animation in milliseconds
+ * @return An error code
+ * @param[in] milliseconds The offset of the animation in milliseconds
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The value of the specified parameter is negative or greater than the duration of the animation.
+ * @exception E_INVALID_ARG The value of the specified parameter is negative or greater than the duration of the animation.
* @remarks If the start value of the animation is @c 0.0, the end value is @c 1.0, the duration is @c 100 ms and the offset value is @c 20 ms,
* the actual animation starts at @c 0th ms and plays for @c 80 ms with a start value of @c 0.2. @n
- * If @c autoReverse is set to @c true, the backward animation plays for @c 100ms, from @c 1.0 to @c 0.0.
+ * If @c autoReverse is set to @c true, the backward animation plays for @c 100ms, from @c 1.0 to @c 0.0.
* @see GetOffset()
*/
result SetOffset(long milliseconds);
* @since 2.0
*
* @return An error code
- * @param[in] milliseconds The delay for the animation to start in milliseconds
+ * @param[in] milliseconds The delay for the animation to start in milliseconds
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The value of the specified parameter is negative.
+ * @exception E_INVALID_ARG The value of the specified parameter is negative.
* @remarks This method does not alter the start, end, and duration values of the animation.
* @see GetDelay()
*/
* @return An error code
* @param[in] count The number of times the animation is repeated
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The value of the specified parameter is negative.
+ * @exception E_INVALID_ARG The value of the specified parameter is negative.
* @remarks A delay and offset is applied to an animation only when the animation is played for the first time.
* If @c count is set to @c 0, the animation is repeated indefinitely.
* @see GetRepeatCount()
/**
- * Sets the @c autoReverse property of the animation. @n
+ * Sets the auto reverse state of the animation. @n
* If enabled, the forward and backward animation can also be played.
*
* @since 2.0
* @return An error code
* @param[in] scaleRatio The scale ratio value of the animation
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The value of the specified parameter is below @c 0.
+ * @exception E_INVALID_ARG The value of the specified parameter is below @c 0.
* @remarks If @c scaleRatio is @c 0.5, then the animation speed is 2 times faster.
* @see GetScaleRatio()
*/
*
* @since 2.0
*
- * @return The specified timing function
- * @param[in] name The timing function name
+ * @return The specified timing function
+ * @param[in] name The timing function name @n
+ * This value must be "Linear", "EaseIn", "EaseOut", "EaseInOut", "EaseOutIn", "Discrete", "Bezier",
+ * "ExpIn", "ExpOut", "EaseElasticIn", or "EaseElasticOut".
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
- * @remarks The parameter @c name must be "Linear", "EaseIn", "EaseOut", "EaseInOut", "EaseOutIn", "Discrete", "Bezier", "ExpIn", "ExpOut", "EaseElasticIn", or "EaseElasticOut".
- * The specific error code can be accessed using the GetLastResult() method.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
static const IVisualElementAnimationTimingFunction* GetTimingFunctionByName(const Tizen::Base::String& name);
*
* @since 2.0
*
- * @param[in] rhs An instance of %VisualElementAnimationGroup
+ * @param[in] rhs An instance of %VisualElementAnimationGroup
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*
* @since 2.0
*
- * @return @c true if the animation of the two instances of %VisualElementAnimationGroup are equal, @n
- * else @c false
+ * @return @c true if the animation of the two instances of %VisualElementAnimationGroup are equal, @n
+ * else @c false
* @param[in] rhs An instance of %VisualElementAnimationGroup
*/
bool operator ==(const VisualElementAnimationGroup& rhs) const;
*
* @since 2.0
*
- * @return @c true if the values of the animations of the two instances of %VisualElementAnimationGroup are not equal, @n
- * else @c false
+ * @return @c true if the values of the animations of the two instances of %VisualElementAnimationGroup are not equal, @n
+ * else @c false
* @param[in] rhs An instance of %VisualElementAnimationGroup
*/
bool operator !=(const VisualElementAnimationGroup& rhs) const;
*
* @since 2.0
*
- * @return @c true if the value of the current instance equals the value of the specified instance, @n
- * else @c false
+ * @return @c true if the value of the current instance equals the value of the specified instance, @n
+ * else @c false
* @param[in] obj An instance of %VisualElementAnimationGroup
- * @remarks The %VisualElementAnimationGroup class has a semantic value that means this method checks whether the two instances have the same animation.
+ * @remarks The %VisualElementAnimationGroup class has a semantic value that means this method checks whether the two
+ * instances have the same animation.
*/
virtual bool Equals(const Tizen::Base::Object& obj) const;
*
* @since 2.0
*
- * @return The hash value of the current instance
- * @remarks The two equal instances must return the same hash value.
- * For better performance, the used hash function must generate a random distribution for all inputs.
+ * @return The hash value of the current instance
+ * @remarks The two equal instances must return the same hash value.@n
+ * For better performance, the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
/**
- * Gets the copied instance of the class.
+ * Gets a copied instance of the class.
*
* @since 2.0
*
- * @return An instance of VisualElementAnimation
- * @exception E_SUCCESS The method is successful.
+ * @return An instance of VisualElementAnimation
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
*
* @since 2.0
*
- * @return The total number of animations stored in a group
- * @remarks If an error occurs, the return value is @c -1. @n
- * An element of %VisualElementAnimationGroup is counted as one.
+ * @return The total number of animations stored in a group, @n
+ * else @c -1 if an error occurs
+ * @remarks An element of %VisualElementAnimationGroup is counted as one.
*/
int GetAnimationCount(void) const;
*
* @since 2.0
*
- * @return An error code
- * @param[in] animation An instance of VisualElementAnimation
- * @exception E_SUCCESS The method is successful.
+ * @return An error code
+ * @param[in] animation An instance of VisualElementAnimation
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @see RemoveAnimationAt()
*/
*
* @since 2.0
*
- * @return An error code
- * @param[in] index The index of the animation
- * @exception E_SUCCESS The method is successful.
+ * @return An error code
+ * @param[in] index The index of the animation
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is out of range.
* @exception E_OBJ_NOT_FOUND The specified @c index is not found.
* @see AddAnimation()
*
* @since 2.0
*
- * @return An animation for the specified @c index in the animation group, @n
- * else @c null if the animation does not exist
- * @param[in] index The index of the animation
- * @exception E_SUCCESS The method is successful.
+ * @return An animation for the specified @c index in the animation group, @n
+ * else @c null if the animation does not exist
+ * @param[in] index The index of the animation
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is out of range.
* @exception E_OBJ_NOT_FOUND The animation is not found.
- * @remarks The specific error code can be accessed using the GetLastResult() method. @n
- * This method allocates a Tizen::Ui::Animations::VisualElementAnimation.
- * It is the developer's responsibility to deallocate the animation after use.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - This method allocates a Tizen::Ui::Animations::VisualElementAnimation.
+ * It is the developer's responsibility to deallocate the animation after use.
* @see AddAnimation()
* @see RemoveAnimationAt()
* @see RemoveAllAnimations()
*
* @since 2.0
*
-* The %VisualElementAnimationProvider class customizes the implicit animations. The class that needs to override default implicit animations must implement this interface, and
+* The %VisualElementAnimationProvider class customizes the implicit animations. The class that needs to override default
+* implicit animations must implement this interface, and
* the instance created with that class is registered with VisualElement, using the VisualElement::SetAnimationProvider() method.
* When the properties defined in %VisualElement and its descendants are changed, the CreateAnimationForProperty() method of this interface is invoked.
*/
*
* @since 2.0
*
-* The %VisualElementContentProvider class provides the content and information on it. The class that needs to customize content must implement this interface, and
-* using the VisualElement::SetContentProvider() method register to the VisualElement.
+* The %VisualElementContentProvider class provides the content and information on it. The class that needs to customize content
+* must implement this interface, and using the VisualElement::SetContentProvider() method register with VisualElement.
* This class implements IVisualElementContentProvider for the default operation of the contents.
*/
class _OSP_EXPORT_ VisualElementContentProvider
public:
/**
- * Checks whether the %PrepareDraw() method is invoked by UI framework before DrawContent() is called. @n
+ * Checks whether the %PrepareDraw() method is invoked by the UI framework before DrawContent() is called. @n
* If this method returns @c true, VisualElement can call the %DrawContent() method.
*
* @since 2.0
*
- * @return @c true if DrawContent() can be called, @n
+ * @return @c true if DrawContent() can be called, @n
* else @c false
* @param[in] target The VisualElement instance to check
*/
/**
* The %HitTest() method is called by VisualElement::GetChildAt(). @n
- * The %VisualElement::GetChildAt() method traverses through a list of all the children, and performs a hit test search at the @c point using this method. @n
- * You can modify hit test search result by overriding this method.
+ * The %VisualElement::GetChildAt() method traverses through a list of all the children, and performs a hit test search
+ * at the specified @c point using this method. @n
+ * You can modify the hit test search result by overriding this method.
*
* @since 2.0
*
* @return The hit test result
* @param[in] target The VisualElement target to test
* @param[in] point The position of source to check
- * @remarks Hit test results must be one of the following: @n
+ * @remarks Hit test results must be one of the following:
* - Tizen::Ui::Animations::HitTestResult::HIT_TEST_NOWHERE
* - Tizen::Ui::Animations::HitTestResult::HIT_TEST_MATCH
* @see VisualElement::GetChildAt()
*
* @since 2.0
*
- * @param[in] animation An instance of %VisualElementPropertyAnimation
+ * @param[in] animation An instance of %VisualElementPropertyAnimation
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*
* @since 2.0
*
- * @param[in] rhs An instance of %VisualElementPropertyAnimation
+ * @param[in] rhs An instance of %VisualElementPropertyAnimation
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*
* @since 2.0
*
- * @return @c true if the animation of the two instances of %VisualElementPropertyAnimation are equal, @n
- * else @c false
+ * @return @c true if the animation of the two instances of %VisualElementPropertyAnimation are equal, @n
+ * else @c false
* @param[in] rhs An instance of %VisualElementPropertyAnimation
*/
bool operator ==(const VisualElementPropertyAnimation& rhs) const;
*
* @since 2.0
*
- * @return @c true if the values of the animations of the two instances of %VisualElementPropertyAnimation are not equal, @n
- * else @c false
+ * @return @c true if the values of the animations of the two instances of %VisualElementPropertyAnimation are not equal, @n
+ * else @c false
* @param[in] rhs An instance of %VisualElementPropertyAnimation
*/
bool operator !=(const VisualElementPropertyAnimation& rhs) const;
*
* @since 2.0
*
- * @return @c true if the value of the current instance equals the value of the specified instance, @n
- * else @c false
+ * @return @c true if the value of the current instance equals the value of the specified instance, @n
+ * else @c false
* @param[in] obj An instance of %VisualElementPropertyAnimation
- * @remarks The %VisualElementPropertyAnimation class has a semantic value that means this method checks whether the two instances have the same animation.
+ * @remarks The %VisualElementPropertyAnimation class has a semantic value that means this method checks
+ * whether the two instances have the same animation.
*/
virtual bool Equals(const Tizen::Base::Object& obj) const;
*
* @since 2.0
*
- * @return The hash value of the current instance
- * @remarks The two equal instances must return the same hash value.
+ * @return The hash value of the current instance
+ * @remarks The two equal instances must return the same hash value.@n
* For better performance, the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
/**
- * Gets the copied instance of the class.
+ * Gets a copied instance of the class.
*
* @since 2.0
*
- * @return An instance of VisualElementAnimation
- * @exception E_SUCCESS The method is successful.
+ * @return An instance of VisualElementAnimation
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
*
* @since 2.0
*
- * @return An error code
- * @param[in] property The property name to which the animation is applied
- * @exception E_SUCCESS The method is successful.
+ * @return An error code
+ * @param[in] property The property name to which the animation is applied
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @see GetPropertyName()
*/
*
* @param[in] rhs An instance of %VisualElementSurface
* @exception E_SUCCESS The method is successful.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks It does not perform a deep copy (shared with the source).
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - It does not perform a deep copy (shared with the source).
*/
VisualElementSurface(const VisualElementSurface& rhs);
*
* @param[in] rhs An instance of %VisualElementSurface
* @exception E_SUCCESS The method is successful.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks It does not perform a deep copy (shared with the source).
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - It does not perform a deep copy (shared with the source).
*/
VisualElementSurface& operator =(const VisualElementSurface& rhs);
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
* @exception E_INVALID_ARG The display context is invalid.
- * @remarks The width and height of the @c size parameter is the logical size and must be greater than @c 0.
- * @remarks If this condition is not satisfied, the E_OUT_OF_RANGE exception is returned.
- * @see Tizen::Ui::Window::GetDisplayContext()
+ * @remarks The width and height of the @c size parameter is the logical size and must be greater than @c 0. @n
+ * If this condition is not satisfied, the @c E_OUT_OF_RANGE exception is returned.
+ * @see Window::GetDisplayContext()
*/
result Construct(const DisplayContext& displayContext, const Tizen::Graphics::Dimension& size);
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
* @exception E_INVALID_ARG The display context is invalid.
- * @remarks The width and height of the @c size parameter is the logical size and must be greater than @c 0.
- * @remarks If this condition is not satisfied, the E_OUT_OF_RANGE exception is returned.
- * @see Tizen::Ui::Window::GetDisplayContext()
+ * @remarks The width and height of the @c size parameter is the logical size and must be greater than @c 0. @n
+ * If this condition is not satisfied, the E_OUT_OF_RANGE exception is returned.
+ * @see Window::GetDisplayContext()
*/
result Construct(const DisplayContext& displayContext, const Tizen::Graphics::FloatDimension& size);
/**
- * Gets the buffer-related information of the %VisualElementSurface instance.
+ * Gets the buffer-related information of a %VisualElementSurface instance.
*
* @since 2.0
*
result GetBufferInfo(Tizen::Graphics::BufferInfo& bufferInfo) const;
/**
- * Gets the size of the %VisualElementSurface instance.
+ * Gets the size of a %VisualElementSurface instance.
*
* @since 2.0
*
- * @return The size of the %VisualElementSurface instance
+ * @return The size of the %VisualElementSurface instance, @n
+ * else Tizen::Graphics::Dimension(0, 0) if an error occurs
* @exception E_SUCCESS The method is successful.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If an error occurs, this method returns Tizen::Graphics::Dimension(0, 0).
*/
Tizen::Graphics::Dimension GetSize(void) const;
/**
- * Gets the size of the %VisualElementSurface instance.
+ * Gets the size of a %VisualElementSurface instance.
*
* @since 2.1
*
- * @return The size of the %VisualElementSurface instance
+ * @return The size of the %VisualElementSurface instance, @n
+ * else Tizen::Graphics::Dimension(0, 0) if an error occurs
* @exception E_SUCCESS The method is successful.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If an error occurs, this method returns Tizen::Graphics::Dimension(0, 0).
*/
Tizen::Graphics::FloatDimension GetSizeF(void) const;
/**
- * Compares the Tizen::Base::Object instance with the calling %VisualElementSurface instance for equivalence.
+ * Compares a Tizen::Base::Object instance with the calling %VisualElementSurface instance for equivalence.
*
* @since 2.0
*
- * @return @c true if the specified instance share the content with the current instance, @n
+ * @return @c true if the value of the specified instance is equal to the value of the current instance, @n
* else @c false
* @param[in] obj The object to compare with the current instance
* @see GetHashCode()
*
* @since 2.0
*
- * @param[in] animation An instance of %VisualElementValueAnimation
+ * @param[in] animation An instance of %VisualElementValueAnimation
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*
* @since 2.0
*
- * @param[in] rhs An instance of %VisualElementValueAnimation
+ * @param[in] rhs An instance of %VisualElementValueAnimation
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*
* @since 2.0
*
- * @return @c true if the animation of the two instances of %VisualElementValueAnimation are equal, @n
- * else @c false
+ * @return @c true if the animation of the two instances of %VisualElementValueAnimation are equal, @n
+ * else @c false
* @param[in] rhs An instance of %VisualElementValueAnimation
*/
bool operator ==(const VisualElementValueAnimation& rhs) const;
*
* @since 2.0
*
- * @return @c true if the values of the animations of the two instances of %VisualElementValueAnimation are not equal, @n
- * else @c false
+ * @return @c true if the values of the animations of the two instances of %VisualElementValueAnimation are not equal, @n
+ * else @c false
* @param[in] rhs An instance of %VisualElementValueAnimation
*/
bool operator !=(const VisualElementValueAnimation& rhs) const;
*
* @since 2.0
*
- * @return @c true if the value of the current instance equals the value of the specified instance, @n
- * else @c false
+ * @return @c true if the value of the current instance equals the value of the specified instance, @n
+ * else @c false
* @param[in] obj An instance of %VisualElementValueAnimation
- * @remarks The %VisualElementValueAnimation class has a semantic value which means that this method checks whether the two instances have the same animation.
+ * @remarks The %VisualElementValueAnimation class has a semantic value which means that this method checks whether the
+ * two instances have the same animation.
*/
virtual bool Equals(const Tizen::Base::Object& obj) const;
*
* @since 2.0
*
- * @return The hash value of the current instance
- * @remarks The two equal instances must return the same hash value.
+ * @return The hash value of the current instance
+ * @remarks The two equal instances must return the same hash value.@n
* For better performance, the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
/**
- * Gets the copied instance of the class.
+ * Gets a copied instance of the class.
*
* @since 2.0
*
- * @return An instance of %VisualElementAnimation
- * @exception E_SUCCESS The method is successful.
+ * @return An instance of %VisualElementAnimation
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
*
* @since 2.0
*
- * @return A pointer to the IVisualElementAnimationTickEventListener instance @n
- * If listener has not been set, @c null is returned.
+ * @return A pointer to the IVisualElementAnimationTickEventListener instance @n
+ * else @c null if the listener has not been set
* @see SetVisualElementAnimationTickEventListener()
*/
IVisualElementAnimationTickEventListener* GetVisualElementAnimationTickEventListener(void) const;
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] startValue The start value of the animation to set
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The type of Variant is empty.
+ * @exception E_INVALID_ARG The type of Variant is empty.
* @see GetStartValue()
*/
result SetStartValue(const Tizen::Ui::Variant& startValue);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] endValue The end value of the animation to set
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The type of Variant is empty.
+ * @exception E_INVALID_ARG The type of Tizen::Ui::Variant is empty.
* @see GetEndValue()
*/
result SetEndValue(const Tizen::Ui::Variant& endValue);
* @param[in] apply Set to @c true to apply the end values of the animation, @n
* else @c false
* @remarks There is no difference in behavior with this method in value animation. @n
- * So you must set the end value by seeing this value.
+ * So you must set the end value based on this value.
* @see IsEndValueApplied()
*/
void SetEndValueApplied(bool apply);
/**
- * Adds the key frame information for the animation.
+ * Adds the keyframe information for the animation.
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] timeProgress The specified time progress value @n
* This must be in the range @c 0.0 to @c 1.0 and cannot be @c 0.0 and @c 1.0.
* @param[in] value The value at the specified time
- * @param[in] pTimingFunction The timing function instance that is used in keyframe segment
+ * @param[in] pTimingFunction The timing function instance that is used in the keyframe segment
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c value parameter is invalid.
* @exception E_OUT_OF_RANGE The specified @c timeProgress is not within the range @c 0 to @c 1 (exclusive).
- * @remarks If a key-value pair with the current key already exists, the old value is overwritten with the new one.
- * If timing function is @c null, the default timing function is applied.
- * The timing function is applied to current pace from previous pace.
+ * @remarks
+ * - If a key-value pair with the current key already exists, the old value is overwritten with the new one.
+ * - If timing function is @c null, the default timing function is applied.
+ * - The timing function is applied to current pace from previous pace.
* @see RemoveKeyFrame()
* @see RemoveAllKeyFrames()
*/
/**
- * Removes the key frame information for the animation.
+ * Removes the keyframe information for the animation.
*
* @since 2.0
*
- * @return An error code
- * @param[in] timeProgress The time progress for the key frame to remove
+ * @return An error code
+ * @param[in] timeProgress The time progress for the keyframe to remove @n
* This must be in the range @c 0.0 to @c 1.0 and cannot be @c 0.0 and @c 1.0.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the specified parameter is not within the range @c 0 to @c 1 (exclusive).
- * @exception E_OBJ_NOT_FOUND The key frame with @c timeProgress does not exist.
+ * @exception E_OBJ_NOT_FOUND The keyframe with the specified @c timeProgress does not exist.
* @see AddKeyFrame()
* @see RemoveAllKeyFrames()
*/
/**
- * Removes all the key frame information for the animation.
+ * Removes all the keyframe information for the animation.
*
* @since 2.0
*
{
/**
* @namespace Tizen::Ui::Animations
- * @brief This namespace contains the classes for the animation-related functionalities.
+ * @brief This namespace contains classes for the animation-related functionalities.
* @since 2.0
*
* @remarks @b Header @b %file: @b \#include @b <FUiAnimations.h> @n
*
* The %CardLayout class defines the card layout for a container.@n
*
+ * The following example demonstrates how to use the %CardLayout class.
+ *
* @code
// Sample code for CardLayoutSample.h
#include <FUi.h>
class CardLayoutSample
: public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::ITouchEventListener
{
public:
bool Initialize(void);
virtual result OnInitializing(void);
+
+ // ITouchEventListener
+ virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
+ virtual void OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
+ virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
+ virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
+ virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
+ virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
};
* @endcode
*
{
result r = E_SUCCESS;
- // Creates an instance of 1st panel
- Panel* pFirstPanel = new Panel();
- pFirstPanel->Construct(Rectangle(0, 0, 50, 50));
- pFirstPanel->SetBackgroundColor(Color(0xFF, 0x40, 0x40, 0xFF));
+ CardLayout layout;
+ layout.Construct();
+
+ Panel* pPanels[5];
+ for (int i = 0; i < 5; i++)
+ {
+ // Creates an instance of panel
+ pPanels[i] = new Panel();
+ pPanels[i]->Construct(Rectangle(0, 0, 50, 50));
+ pPanels[i]->SetBackgroundColor(Color(0xFF, 0x30, i*100, 0xFF));
- // Adds the 1st panel to the form
- AddControl(pFirstPanel);
+ // Add the label to the panel
+ Label* pLabel = new Label;
+ Tizen::Base::String panelLabel(L"nd");
+ panelLabel.Insert(i+1, 0);
+ pLabel->Construct(Rectangle(100, 100, 100, 100), panelLabel);
+ pPanels[i]->AddControl(pLabel);
- // Creates an instance of 2nd panel
- Panel* pSecondPanel = new Panel();
- pSecondPanel->Construct(Rectangle(0, 0, 50, 50));
- pSecondPanel->SetBackgroundColor(Color(0x40, 0x40, 0xFF, 0xFF));
+ // Adds the panel to the form
+ AddControl(pPanels[i]);
- // Adds the 2nd panel to the form
- AddControl(pSecondPanel);
+ // Adds the touch event listener
+ pPanels[i]->AddTouchEventListener(*this);
+ }
return r;
}
+
+void
+CardLayoutSample::OnTouchReleased(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
+{
+ Panel* pPanel = dynamic_cast<Panel*>(const_cast<Control*>(&source));
+ pPanel->SetShowState(false);
+}
* @endcode
*
*/
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n For full construction,
+ * the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
/**
* @class Clipboard
- * @brief This class defines a common behavior for %Clipboard.
+ * @brief This class defines the common behavior for %Clipboard.
*
* @since 2.0
*
{
public:
/**
- * Gets the system clipboard.
+ * Gets a pointer to the %Clipboard instance.
*
* @since 2.0
*
- * @return The pointer to the system clipboard, @n
+ * @return A pointer to the system clipboard, @n
* else @c null if a system error has occurred
* @remarks The copy and paste operation is performed through the system clipboard.
*/
* @since 2.0
*
* @return An error code
- * @param[in] item The item to save in the system clipboard
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is either invalid or not constructed.
- * @exception E_SYSTEM A system error has occurred.
+ * @param[in] item The item to save in the system clipboard
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified input parameter is either invalid or not constructed.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks For the text, image data, and html types, the data itself is copied by the method and kept by the system clipboard. @n
- * For the other types, only the file path is copied and kept.
+ * For the other types, only the file path is copied and kept.
*/
result CopyItem(const ClipboardItem& item);
/**
- * Retrieves a collection of items that matches the specified data types from the
- * system clipboard.
+ * Retrieves a collection of items that matches the specified data types from the system clipboard.
*
* @since 2.0
*
- * @return The pointer to a Tizen::Base::Collection::IList that contains a collection of ClipboardItem, @n
- * else @c null if an error has occurred @n
- * The items are sorted in the reverse order in which they are copied to the system clipboard. So, the first item is the latest one among them.
+ * @return The pointer to a Tizen::Base::Collection::IList that contains a collection of ClipboardItem, @n
+ * else @c null if an error has occurred @n
+ * The items are sorted in the reverse order in which they are copied to the system clipboard.
+ * So, the first item is the latest one among them.
* @param[in] dataTypes The types of items @n
- * Multiple data types of ClipboardDataType can be combined using bitwise OR.
+ * Multiple data types of ClipboardDataType can be combined using bitwise OR.
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The item of the specified data types is not found.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Base::Collection::IList* RetrieveItemsN(unsigned long dataTypes);
*
* @return The pointer to a ClipboardItem instance, @n
* else @c null if an error has occurred or there is no matched item in the system clipboard
- * @param[in] dataTypes The types of items @n Multiple data types of ClipboardDataType can be
- * combined using bitwise OR.
+ * @param[in] dataTypes The types of items @n
+ * Multiple data types of ClipboardDataType can be combined using bitwise OR.
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The item of the specified data types is not found.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Ui::ClipboardItem* RetrieveLatestItemN(unsigned long dataTypes);
/**
- * Shows the clipboard popup that is including the current contents of the system clipboard with the specified parameters.
+ * Shows the clipboard popup that contains the current contents of the system clipboard with the specified parameters.
*
* @since 2.0
*
- * @return An error code
- * @param[in] dataTypes The types of items to decide whether the clipboard popup shows image items or not @n
- * Multiple data types of ClipboardDataType can be combined using bitwise OR. @n
- * If the value contains #CLIPBOARD_DATA_TYPE_IMAGE, all types of items are shown. @n
- * If not, text items, html items, video items, and audio items are shown except image items.
- * @param[in] listener The clipboard popup event listener
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION Either the clipboard popup is currently being shown or attempting to show the clipboard popup
- * when the application is in the background.
- * @exception E_SYSTEM A system error has occurred.
- * @remarks The user can operate the system clipboard when the clipboard popup is shown,
- * for example, clear the system clipboard or choose a clipboard item for the paste operation.
+ * @return An error code
+ * @param[in] dataTypes The types of items to decide whether the clipboard popup shows image items or not @n
+ * Multiple data types of ClipboardDataType can be combined using bitwise OR. @n
+ * If the value contains #CLIPBOARD_DATA_TYPE_IMAGE, all types of items are shown. @n
+ * If not, text items, html items, video items, and audio items are shown except image items.
+ * @param[in] listener The clipboard popup event listener
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred:
+ * - The clipboard popup is currently being shown.
+ * - Attempt is made to show the clipboard popup when the application is in the background.
+ * @exception E_SYSTEM A system error has occurred.
+ * @remarks The user can operate the system clipboard when the clipboard popup is shown.
+ * For example, clear the system clipboard or choose a clipboard item for the paste operation.
*/
static result ShowPopup(unsigned long dataTypes, const IClipboardPopupEventListener& listener);
* @since 2.0
*
* @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * - No clipboard popup is currently being shown.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
+ * - No clipboard popup is currently being shown.
+ * @exception E_SYSTEM A system error has occurred.
*/
static result HidePopup(void);
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n For full construction,
+ * the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
* @since 2.0
*
* @return An error code
- * @param[in] dataType The data type
- * @param[in] data The data to copy
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_SYSTEM A system error has occurred.
+ * @param[in] dataType The data type
+ * @param[in] data The data to copy
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks For the image data type, the bitmap instance must be deleted
* by the application after the item is copied to the clipboard.
*/
CLIPBOARD_DATA_TYPE_IMAGE = 0x0004, /**< The image data type */
CLIPBOARD_DATA_TYPE_VIDEO = 0x0008, /**< The video data type */
CLIPBOARD_DATA_TYPE_AUDIO = 0x0010, /**< The audio data type */
- CLIPBOARD_DATA_TYPE_MAX = 0x7fff, // The data type max
+ CLIPBOARD_DATA_TYPE_MAX = 0x7fff, // The max data type
CLIPBOARD_DATA_TYPE_NONE = 0x0000 // No data type
};
/**
* @file FUiCompositeMode.h
- * @brief This is the header file for the Container class.
+ * @brief This is the header file for the %Container class.
*
* This header file contains the declarations of the enumerations of the Container class.
*/
* The specified @c control is an instance of Window, or this control's parent container.
* @exception E_MAX_EXCEEDED The number of child controls has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
- * @remarks When the control is added, it is placed at the top of the drawing stack maintained by the container.@n
- * This means the last control added is drawn last
- * @remarks A control becomes displayable only after it has been added to a displayable container. Some methods may not work normally if the methods
- * of the control are called before adding the control to a container. After the control is added to a %Container, the OnInitializing()
- * method of the control are called before adding the control to a container. After the control is added to a %Container, the
- * OnInitializing() method of the control is invoked for the initialization of the control such as creating and adding child controls.
- * @see Tizen::Ui::Control::OnInitializing()
- * @see Tizen::Ui::Control::OnTerminating()
+ * @remarks
+ * - When the control is added, it is placed at the top of the drawing stack maintained by the container.@n
+ * This means the last control added is drawn last
+ * - A control becomes displayable only after it has been added to a displayable container. Some methods may not work normally if the methods
+ * of the control are called before adding the control to a container. After the control is added to a %Container, the Control::OnInitializing()
+ * method of the control are called before adding the control to a container. After the control is added to a %Container, the
+ * %Control::OnInitializing() method of the control is invoked for the initialization of the control such as creating and adding child controls.
+ * @see Control::OnTerminating()
* @code
* {
* // Uses Panel instead of Container, because Container is an abstract class.
* pPanel->Construct(Rectangle(100, 250, 300, 300));
*
* Form* pForm = new Form();
- * pForm->Construct(FORM_STYLE_NORMAL|FORM_STYLE_TITLE|FORM_STYLE_PORTRAIT_INDICATOR);
+ * pForm->Construct(FORM_STYLE_NORMAL|FORM_STYLE_PORTRAIT_INDICATOR);
* pForm->AddControl(*pPanel);
*
* //...
* @since 2.1
*
* @return An error code
- * @param[in] pControl A pointer to the control to add to the container
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c pControl is @c null.
- * The specified @c control is an instance of Window or the control's parent container.
- * @exception E_MAX_EXCEEDED The number of child controls has exceeded the maximum limit.
- * @exception E_INVALID_ARG
- * @exception E_SYSTEM A system error has occurred.
+ * @param[in] pControl A pointer to the control to add to the container
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c pControl is @c null.
+ * - The specified @c control is an instance of Window or the control's parent container.
+ * @exception E_MAX_EXCEEDED The number of child controls has exceeded the maximum limit.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks
* - When a control is added, it is placed at the top of the drawing stack maintained by the container.@n
- * This means the control that is added last is drawn last.
+ * This means the control that is added last is drawn last.
* - A control becomes displayable only after it has been added to a displayable container.
- * Some methods may not work normally if the methods of the control are called before adding the control to a container. After the control is added to a %Container, the OnInitializing()
- * method of the control are called before adding the control to a container. After the control is added to a %Container, the
- * OnInitializing() method of the control is invoked for the initialization of the control such as creating and adding child controls.
- * @see Tizen::Ui::Control::OnInitializing()
- * @see Tizen::Ui::Control::OnTerminating()
+ * Some methods may not work normally if the methods of the control are called before adding the control to a container.
+ * After the control is added to a %Container, the Control::OnInitializing()
+ * method of the control is called before adding the control to a container. After the control is added to a %Container, the
+ * %Control::OnInitializing() method of the control is invoked for the initialization of the control such as creating and adding child controls.
+ * @see Control::OnTerminating()
* @code
* {
* // Uses Panel instead of Container, because Container is an abstract class.
* pPanel->Construct(Rectangle(100, 250, 300, 300));
*
* Form* pForm = new Form();
- * pForm->Construct(FORM_STYLE_NORMAL|FORM_STYLE_TITLE|FORM_STYLE_PORTRAIT_INDICATOR);
+ * pForm->Construct(FORM_STYLE_NORMAL|FORM_STYLE_PORTRAIT_INDICATOR);
* pForm->AddControl(pPanel);
*
* //...
result AddControl(Control* pControl);
/**
- * Before the system calls OnDraw() method to allow the user to do custom drawing, this method is called to clear the canvas. The user can override this method to change this default behavior.
+ * Before the system calls the OnDraw() method to allow the user to do custom drawing, this method is called to clear the canvas. @n
+ * The user can override this method to change this default behavior.
*
* @since 2.0
*
*
* @section CompOnDrawPageSolutionSection Resolutions
* This issue has been resolved in Tizen. @n
- * -# The platform does not call the parent's OnDraw() callback before invoking the control's OnDraw() callback. Therefore, you needs to call the parent container's OnDraw() callback in the OnDraw() callback if you override this method.
+ * -# The platform does not call the parent's OnDraw() callback before invoking the control's OnDraw() callback. Therefore, you need to call the parent container's OnDraw() callback in the OnDraw() callback if you override this method.
* @endif
*/
*
* @since 2.0
*
- * @param[in] showState The new show state of the control
- * @see Tizen::Ui::Control::SetShowState()
+ * @param[in] showState The new show state of the control
+ * @see Control::SetShowState()
*/
virtual void OnShowStateChanging(bool showState);
*
* @since 2.0
*
- * @param[in] showState The new show state of the control
- * @see Tizen::Ui::Control::SetShowState()
+ * @param[in] showState The new show state of the control
+ * @see Control::SetShowState()
*/
virtual void OnShowStateChanged(bool showState);
* @since 2.0
*
* @return An error code
- * @param[in] oldRect The old position and size values of the control
- * @param[in] newRect The new position and size values of the control
+ * @param[in] oldRect The old position and size values of the control
+ * @param[in] newRect The new position and size values of the control
* @remarks If the method returns an exception, the resulting exception
* is propagated and the control's size is unchanged.@n
* Provide control specific exceptions.
- * @see Tizen::Ui::Control::SetBounds()
- * @see Tizen::Ui::Control::SetSize()
+ * @see Control::SetBounds()
+ * @see Control::SetSize()
*/
virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect);
* @since 2.0
*
* @return An error code
- * @param[in] oldRect The old position and size values of the control
- * @param[in] newRect The new position and size values of the control
- * @see Tizen::Ui::Control::SetBounds()
- * @see Tizen::Ui::Control::SetSize()
+ * @param[in] oldRect The old position and size values of the control
+ * @param[in] newRect The new position and size values of the control
+ * @see Control::SetBounds()
+ * @see Control::SetSize()
*/
virtual void OnBoundsChanged(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect);
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The specified instance is not found within the indicated range (that is, the @c control is not found).
* @exception E_SYSTEM A system error has occurred.
- * @remarks The removed child control is deleted from the memory. Before deletion, OnTerminating() of the child control is called.
- * If OnTerminating() method is overridden and returns an exception, that exception is propagated.
- * @see Tizen::Ui::Control::OnTerminating()
+ * @remarks The removed child control is deleted from the memory. Before deletion, Control::OnTerminating() of the child control is called.
+ * If %Control::OnTerminating() method is overridden and returns an exception, that exception is propagated.
*/
result RemoveControl(const Control& control);
*
* @since 2.1
*
- * @return An error code
+ * @return An error code
* @param[in] pControl A pointer to the child control to remove
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The specified instance is not found within the indicated range (that is, the @c control is not found).
* @exception E_INVALID_ARG The specified @c pControl is @c null.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The removed child control is deleted from the memory. Before deletion, OnTerminating() of the child control is called.
- * If OnTerminating() method is overridden and returns an exception, that exception is propagated.
- * @see Tizen::Ui::Control::OnTerminating()
+ * @remarks The removed child control is deleted from the memory. Before deletion, Control::OnTerminating() of the child control is called.
+ * If %Control::OnTerminating() method is overridden and returns an exception, that exception is propagated.
*/
result RemoveControl(Control* pControl);
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is out of range.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The removed child control is deleted from the memory. Before deletion, OnTerminating() of the child control is called.
- * If OnTerminating() method is overridden and returns an exception, that exception is propagated.
- * @see Tizen::Ui::Control::OnTerminating()
+ * @remarks The removed child control is deleted from the memory. Before deletion, Control::OnTerminating() of the child control is called.
+ * If %Control::OnTerminating() method is overridden and returns an exception, that exception is propagated.
*/
result RemoveControl(int index);
*
* @since 2.0
*
- * @remarks The removed child controls are deleted from the memory. Before deletion, OnTerminating() of the child control is called.
- * @see Tizen::Ui::Control::OnTerminating()
+ * @remarks The removed child controls are deleted from the memory. Before deletion, Control::OnTerminating()
+ * of the child control is called.
*/
void RemoveAllControls(void);
*
* @return The control at the specified index of the list, @n
* else @c null if the index is not valid
- * @param[in] index The index of the control
+ * @param[in] index The index of the control
*/
Control* GetControl(int index) const;
* @page CompGetControlPage Compatibility for GetControl()
* @section CompGetControlPageIssueSection Issues
* Implementing this method in OSP compatible applications has the following issues: @n
- * -# GetControl() method searches for itself first and then child controls in API version 2.0, whereas only @n
+ * -# GetControl() method searches for itself first and then child controls in API version 2.0, whereas only
* child controls are searched for from 2.1.
*
* @section CompGetControlPageSolutionSection Resolutions
* else @c null if the layout does not exist
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @remarks The returned layout can be @c null, if it is not set.
*/
Layout* GetPortraitLayoutN(void) const;
* else @c null if the layout does not exist
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @remarks The returned layout can be @c null, if it is not set.
*/
Layout* GetLandscapeLayoutN(void) const;
* else @c null if the layout does not exist
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @remarks The returned layout can be @c null, if it is not set.
*/
Layout* GetLayoutN(void) const;
*
* @return @c true if a specified control is within the containment hierarchy of the container, @n
* else @c false
- * @param[in] pControl A pointer to the control
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c pControl is null.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @param[in] pControl A pointer to the control
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified @c pControl is @c null.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
bool IsAncestorOf(const Control* pControl) const;
* @exception E_INVALID_ARG A specified input parameter is invalid.@n
* The specified control is not a child of this
* container.
- * @remarks If multiple child control are set as "always on top", then
- * their relative order is not specified. If the specified child
- * control is a container, then all its children inherit this
- * property and they are "always on top" of other controls.@n
- * If the method is called on a child control with a @c false
- * value, then it's state becomes normal. The relative order
- * of child controls in normal state is not specified.
+ * @remarks
+ * - If multiple child control are set as "always on top", then
+ * their relative order is not specified. If the specified child
+ * control is a container, then all its children inherit this
+ * property and they are "always on top" of other controls.
+ * - If the method is called on a child control with a @c false
+ * value, then its state becomes normal. The relative order
+ * of child controls in normal state is not specified.
* @see IsControlAlwaysOnTop()
*/
result SetControlAlwaysOnTop(Tizen::Ui::Control& control, bool alwaysOnTop);
*
* @return An error code
* @param[in] control The child control
- * @param[in] alwaysAtBottom The Boolean value indicating that @c control
+ * @param[in] alwaysAtBottom The boolean value indicating that @c control
* must always be at the bottom.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.@n
* The specified control is not a child of this
* container.
- * @remarks If multiple child control are set as "always at bottom", then
- * their relative order is not specified. If the specified child
- * control is a container, then all its children inherit this
- * property and they become "always at bottom" as well.@n
- * If the method is called on a child control with a @c false
- * value, then it's state becomes normal. The relative order
- * of child controls in normal state is not specified.
+ * @remarks
+ * - If multiple child control are set as "always at bottom", then
+ * their relative order is not specified. If the specified child
+ * control is a container, then all its children inherit this
+ * property and they become "always at bottom" as well.
+ * - If the method is called on a child control with a @c false
+ * value, then its state becomes normal. The relative order
+ * of child controls in normal state is not specified.
* @see IsControlAlwaysAtBottom()
*/
result SetControlAlwaysAtBottom(Tizen::Ui::Control& control, bool alwaysAtBottom);
* @deprecated This method is deprecated.
* @since 2.0
*
- * @return @c true if the specified child control is set as always at the bottom, @n
- * else @c false
+ * @return @c true if the specified child control is set as always at the bottom, @n
+ * else @c false
* @param[in] control The child control
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.@n
- * The specified control is not a child of this
- * container.
- * @remarks The specific error code can be accessed using the GetLastResult()
- * method.
+ * The specified control is not a child of this container.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetControlAlwaysAtBottom()
*/
bool IsControlAlwaysAtBottom(const Tizen::Ui::Control& control) const;
*
* @since 2.1
*
- * @return @c true if a specified child control is set as always at the bottom, @n
- * else @c false
+ * @return @c true if a specified child control is set as always at the bottom, @n
+ * else @c false
* @param[in] pControl A pointer to child control
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.@n
- * The specified control is not a child of this
- * container or @c pControl is @c null .
+ * The specified control is not a child of this container or @c pControl is @c null .
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetControlAlwaysAtBottom()
*/
bool IsControlAlwaysAtBottom(const Tizen::Ui::Control* pControl) const;
/**
- * Checks whether the specified child control is always on the top of
- * the drawing stack.
+ * Checks whether the specified child control is always on the top of the drawing stack.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This method is deprecated.
+ * @deprecated This method is deprecated.
* @since 2.0
*
* @return @c true if the specified child control is set as always on the top, @n
* @param[in] control The child control
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The specified control is not a child of this
- * container.
- * @remarks The specific error code can be accessed using the GetLastResult()
- * method.
+ * The specified control is not a child of this container.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetControlAlwaysOnTop()
*/
bool IsControlAlwaysOnTop(const Tizen::Ui::Control& control) const;
protected:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
* @since 2.0
*
* @return An error code
- * @param[in] rect The rectangle bounds to set
- * @param[in] resizable Set to @c true to make the container resizable, @n
- * else @c false
- * @param[in] movable Set to @c true to make the container movable, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks This method must be called from the derived classes's construct methods.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
- * @see IsResizable()
+ * @param[in] rect The rectangle bounds to set
+ * @param[in] resizable Set to @c true to make the container resizable, @n
+ * else @c false
+ * @param[in] movable Set to @c true to make the container movable, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @remarks
+ * - This method must be called from the construct methods of the derived class.
+ * - If the specified @c resizable is @c false, IsResizable() returns @c false.
*/
result Construct(const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true);
* @since 2.1
*
* @return An error code
- * @param[in] rect The rectangle bounds to set
- * @param[in] resizable Set to @c true to make the container resizable, @n
- * else @c false
- * @param[in] movable Set to @c true to make the container movable, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks This method must be called from the derived classes's construct methods.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
- * @see IsResizable()
+ * @param[in] rect The rectangle bounds to set
+ * @param[in] resizable Set to @c true to make the container resizable, @n
+ * else @c false
+ * @param[in] movable Set to @c true to make the container movable, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @remarks
+ * - This method must be called from the construct methods of the derived class.
+ * - If the specified @c resizable is @c false, IsResizable() returns @c false.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true);
*
* @since 2.0
*
- * @return An error code
- * @param[in] layout The layout for both the portrait and landscape mode
- * @param[in] rect The location and size of the %Container
- * @param[in] resizable Set to @c true to make the container resizable, @n
- * else @c false
- * @param[in] movable Set to @c true to make the container movable, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks This method must be called from the derived classes's construct methods.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
- * @see IsResizable()
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Container::GetLayoutN()
+ * @return An error code
+ * @param[in] layout The layout for both the portrait and landscape mode
+ * @param[in] rect The location and size of the %Container
+ * @param[in] resizable Set to @c true to make the container resizable, @n
+ * else @c false
+ * @param[in] movable Set to @c true to make the container movable, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @remarks
+ * - This method must be called from the construct methods of the derived class.
+ * - If the specifed @c resizable is @c false, IsResizable() returns @c false.
+ * @see Container::GetLayoutN()
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true);
*
* @since 2.1
*
- * @return An error code
- * @param[in] layout The layout for both the portrait and landscape mode
- * @param[in] rect The location and size of the %Container
- * @param[in] resizable Set to @c true to make the container resizable, @n
- * else @c false
- * @param[in] movable Set to @c true to make the container movable, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks This method must be called from the derived classes's construct methods.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
- * @see IsResizable()
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Container::GetLayoutN()
+ * @return An error code
+ * @param[in] layout The layout for both the portrait and landscape mode
+ * @param[in] rect The location and size of the %Container
+ * @param[in] resizable Set to @c true to make the container resizable, @n
+ * else @c false
+ * @param[in] movable Set to @c true to make the container movable, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @remarks
+ * - This method must be called from the construct methods of the derived class.
+ * - If the specified @c resizable is @c false, IsResizable() returns @c false.
+ * @see Container::GetLayoutN()
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true);
*
* @since 2.0
*
- * @return An error code
- * @param[in] portraitLayout The layout for the portrait mode
- * @param[in] landscapeLayout The layout for the landscape mode
- * @param[in] rect The location and size of the %Container
- * @param[in] resizable Set to @c true to make the container resizable, @n
+ * @return An error code
+ * @param[in] portraitLayout The layout for the portrait mode
+ * @param[in] landscapeLayout The layout for the landscape mode
+ * @param[in] rect The location and size of the %Container
+ * @param[in] resizable Set to @c true to make the container resizable, @n
* else @c false
- * @param[in] movable Set to @c true to make the container movable, @n
+ * @param[in] movable Set to @c true to make the container movable, @n
* else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
- * @see IsResizable()
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Container::GetLayoutN()
- * @see Tizen::Ui::Container::GetPortraitLayoutN()
- * @see Tizen::Ui::Container::GetLandscapeLayoutN()
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @remarks If the specified @c resizable is @c false, IsResizable() returns @c false.
+ * @see Container::GetLayoutN()
+ * @see Container::GetPortraitLayoutN()
+ * @see Container::GetLandscapeLayoutN()
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true);
*
* @since 2.1
*
- * @return An error code
- * @param[in] portraitLayout The layout for the portrait mode
- * @param[in] landscapeLayout The layout for the landscape mode
- * @param[in] rect The location and size of the %Container
- * @param[in] resizable Set to @c true to make the container resizable, @n
+ * @return An error code
+ * @param[in] portraitLayout The layout for the portrait mode
+ * @param[in] landscapeLayout The layout for the landscape mode
+ * @param[in] rect The location and size of the %Container
+ * @param[in] resizable Set to @c true to make the container resizable, @n
* else @c false
- * @param[in] movable Set to @c true to make the container movable, @n
+ * @param[in] movable Set to @c true to make the container movable, @n
* else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
- * @see IsResizable()
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Container::GetLayoutN()
- * @see Tizen::Ui::Container::GetPortraitLayoutN()
- * @see Tizen::Ui::Container::GetLandscapeLayoutN()
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @remarks If the specified @c resizable is @c false, IsResizable() returns @c false.
+ * @see Container::GetLayoutN()
+ * @see Container::GetPortraitLayoutN()
+ * @see Container::GetLandscapeLayoutN()
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true);
* @deprecated This method is deprecated.
* @since 2.0
* @return An error code
- * @param[in] control The control
- * @param[out] index The index of the control
+ * @param[in] control The control
+ * @param[out] index The index of the control
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The specified instance of Control is not found.
* @see SetControlAt()
/**
* Gets the index of a specified control.
*
- * @since 2.1
- * @return An error code
- * @param[in] pControl A pointer to the control
- * @param[out] index The index of the control
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c pControl is @c null.
- * @exception E_OBJ_NOT_FOUND The specified instance of Control is not found.
- * @see SetControlAt()
+ * @since 2.1
+ * @return An error code
+ * @param[in] pControl A pointer to the control
+ * @param[out] index The index of the control
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified @c pControl is @c null.
+ * @exception E_OBJ_NOT_FOUND The specified instance of Control is not found.
+ * @see SetControlAt()
*
*/
result GetControlAt(const Control* pControl, int& index) const;
* @exception E_SYSTEM A system error has occurred.
* @remarks The @c control must be first added to this container. @n
* Call the Invalidate() method after this, to apply the change to be shown.
- * @see Invalidate()
* @see GetControlAt()
*
*/
* @exception E_SYSTEM A system error has occurred.
* @remarks The @c control must be first added to this container. @n
* Then the Invalidate() method is called to show the applied changes.
- * @see Invalidate()
* @see GetControlAt()
*
*/
* @since 2.1
*
* @return An error code
- * @param[in] oldRect The old position and size values of the control
- * @param[in] newRect The new position and size values of the control
+ * @param[in] oldRect The old position and size values of the control
+ * @param[in] newRect The new position and size values of the control
* @remarks If the method returns an exception, the resulting exception
* is propagated and the control's size is unchanged.@n
* Provide control specific exceptions.
- * @see Tizen::Ui::Control::SetBounds()
- * @see Tizen::Ui::Control::SetSize()
+ * @see Control::SetBounds()
+ * @see Control::SetSize()
*/
virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& oldRect, const Tizen::Graphics::FloatRectangle& newRect);
* @return An error code
* @param[in] oldRect The old position and size values of the control
* @param[in] newRect The new position and size values of the control
- * @see Tizen::Ui::Control::SetBounds()
- * @see Tizen::Ui::Control::SetSize()
+ * @see Control::SetBounds()
+ * @see Control::SetSize()
*/
virtual void OnBoundsChanged(const Tizen::Graphics::FloatRectangle& oldRect, const Tizen::Graphics::FloatRectangle& newRect);
virtual ~Control(void);
/**
- * Adds the IFocusEventListener instance to the %Control instance. @n
+ * Adds an IFocusEventListener instance to the %Control instance. @n
* The added listener gets notified when the control gains or loses its focus.
*
* @since 2.0
void AddFocusEventListener(IFocusEventListener& listener);
/**
- * Adds the IKeyEventListener instance to the %Control instance. @n
+ * Adds an IKeyEventListener instance to the %Control instance. @n
* The added listener gets notified when a key is pressed, released, or long pressed.
*
* @since 2.0
void AddKeyEventListener(IKeyEventListener& listener);
/**
- * Adds the ITouchEventListener instance to the %Control instance. @n
+ * Adds an ITouchEventListener instance to the %Control instance. @n
* The added listener gets notified when a touch event such as a press or a release is fired.
*
* @since 2.0
void AddTouchEventListener(ITouchEventListener& listener);
/**
- * Adds the ITouchModeChangedEventListener instance to the %Control instance. @n
+ * Adds an ITouchModeChangedEventListener instance to the %Control instance. @n
* The added listener gets notified when the device's touch mode is changed.
*
* @since 2.0
void AddTouchModeChangedEventListener(Tizen::Ui::ITouchModeChangedEventListener& listener);
/**
- * Adds the IDragDropEventListener instance to the %Control instance. @n
+ * Adds an IDragDropEventListener instance to the %Control instance. @n
* The added listener gets notified when a drag or a drop happens in the control.
*
* @since 2.0
void AddDragDropEventListener(IDragDropEventListener& listener);
/**
- * Adds the IDragDropEventListenerF instance to the %Control instance. @n
+ * Adds an IDragDropEventListenerF instance to the %Control instance. @n
* The added listener gets notified when a drag or a drop happens in the control.
*
* @since 2.1
void AddDragDropEventListener(IDragDropEventListenerF& listener);
/**
- * Removes the focus listener instance. @n
- * The removed listener is not notified even when focus events are fired.
+ * Removes a focus listener instance. @n
+ * The removed listener is not notified when focus events are fired.
*
* @since 2.0
*
void RemoveFocusEventListener(IFocusEventListener& listener);
/**
- * Removes the key event listener instance. @n
- * The removed listener is not notified even when key events are fired.
+ * Removes a key event listener instance. @n
+ * The removed listener is not notified when key events are fired.
*
* @since 2.0
*
void RemoveKeyEventListener(IKeyEventListener& listener);
/**
- * Removes the touch event listener instance. @n
- * The removed listener is not notified even when touch events are fired.
+ * Removes a touch event listener instance. @n
+ * The removed listener is not notified when touch events are fired.
*
* @since 2.0
*
void RemoveTouchEventListener(ITouchEventListener& listener);
/**
- * Removes the touch mode changed event listener instance. @n
- * The removed listener is not notified even when the touch mode changed events are fired.
+ * Removes a touch mode changed event listener instance. @n
+ * The removed listener is not notified when the touch mode changed events are fired.
*
* @since 2.0
*
void RemoveTouchModeChangedEventListener(Tizen::Ui::ITouchModeChangedEventListener& listener);
/**
- * Adds the IDragDropEventListener instance to the %Control instance. @n
- * The added listener gets notified when a drag or a drop happens in the control.
+ * Removes a IDragDropEventListener instance. @n
+ * The removed listener is not notified when drag or drop events are fired.
*
* @since 2.0
*
* @param[in] listener The event listener to add
- * @see Tizen::Ui::IDragDropEventListener::OnTouchDragged()
- * @see Tizen::Ui::IDragDropEventListener::OnTouchDropped()
+ * @see IDragDropEventListener::OnTouchDragged()
+ * @see IDragDropEventListener::OnTouchDropped()
* @see RemoveDragDropEventListener()
*/
void RemoveDragDropEventListener(IDragDropEventListener& listener);
/**
- * Adds the IDragDropEventListenerF instance to the %Control instance. @n
- * The added listener gets notified when a drag or a drop happens in the control.
+ * Removes a IDragDropEventListenerF instance. @n
+ * The removed listener is not notified when drag or drop events are fired.
*
* @since 2.1
*
* @param[in] listener The event listener to add
- * @see Tizen::Ui::IDragDropEventListenerF::OnTouchDraggedF()
- * @see Tizen::Ui::IDragDropEventListenerF::OnTouchDroppedF()
+ * @see IDragDropEventListenerF::OnTouchDraggedF()
+ * @see IDragDropEventListenerF::OnTouchDroppedF()
* @see RemoveDragDropEventListenerF()
*/
void RemoveDragDropEventListenerF(IDragDropEventListenerF& listener);
/**
- * Overrides this method to provide user-specific initialization code before the control is added to a container.
+ * Overrides this method to provide user-specific initialization code before the control is added to a container. @n
+ * The %OnInitializing() method is called when the control is about to be added to a container.
+ * To cancel adding the control to the parent, return any exception other than @c E_SUCCESS.
*
* @since 2.0
*
* @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_FAILURE The method has failed.
- * @remarks This method is called when the control is about to be added to a container.
- * @remarks To cancel adding this control to the parent, return @c E_FAILURE in this method.
* @see OnTerminating()
*/
virtual result OnInitializing(void);
/**
- * Overrides this method to provide user-specific termination code.
+ * Overrides this method to provide user-specific termination code. @n
+ * The %OnTerminating() method is called right before the control is removed from the container, or Destroy() method is called. @n
+ * To cancel the removal or %Destroy() operation, return any exception other than @c E_SUCCESS.
*
* @if OSPCOMPAT
* @brief <i> [Compatibility] </i>
* @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_FAILURE The method has failed.
- * @remarks
- * - This method is called right before the control is removed from the container, or Destroy() method is called.
- * - To cancel the removal or Destroy() operation, return any exception other than @c E_SUCCESS.
* @see OnInitializing()
*/
virtual result OnTerminating(void);
*/
/**
- * Called asynchronously when the user event that is sent by SendUserEvent() method is
+ * Called asynchronously when the user event that is sent by the SendUserEvent() method is
* dispatched to the control.
*
* @since 2.0
*
* @param[in] requestId The user-defined event ID
- * @param[in] pArgs A pointer to the argument list
+ * @param[in] pArgs A pointer to the argument list
* @see SendUserEvent()
*/
virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
/**
- * Deallocates this instance after removing all child controls of this control.
+ * Deallocates this instance after removing all the child controls of this control.
*
* @since 2.1
*
* @exception E_SUCCESS The method is successful.
- * @remarks The control is deleted from memory. Before it is deleted, OnTerminating() is called if it is attached to the main tree.
- * @remarks If OnTerminating() method is overridden and returns an exception, that exception is propagated.
- * @see Tizen::Ui::Control:OnTerminating()
+ * @remarks
+ * - The control is deleted from memory. Before it is deleted, Control::OnTerminating() is called if it is attached to the main tree.
+ * - If %Control::OnTerminating() method is overridden and returns an exception, that exception is propagated.
*/
result Destroy(void);
*
* @return @c true if the control is movable, @n
* else @c false
+ *
* @exception E_SUCCESS The method is successful.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks When control is not movable SetPosition() and SetBounds() return @c E_UNSUPPORTED_OPERATION.
- * @see SetPosition()
- * @see SetBounds()
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - If the control is not movable, SetPosition() and SetBounds() return @c E_UNSUPPORTED_OPERATION.
*/
bool IsMovable(void) const;
* @return @c true if the control is resizable, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @remarks Even if this method returns @c true, the size can be changed internally.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks When control is not resizable,
- * SetSize(), SetBounds(), SetMinimumSize() and SetMaximumSize() return @c E_UNSUPPORTED_OPERATION.
- * @see SetSize()
- * @see SetBounds()
- * @see SetMinimumSize()
- * @see SetMaximumSize()
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - If the control is not resizable, SetSize(), SetBounds(), SetMinimumSize() and SetMaximumSize() return @c E_UNSUPPORTED_OPERATION.
*/
bool IsResizable(void) const;
*
* @since 2.0
*
- * @return An instance of the Tizen::Graphics::Rectangle that represents the position of top-left corner,
+ * @return An instance of Tizen::Graphics::Rectangle that represents the position of top-left corner,
* the width, and the height of the control
- * @remarks The shape of the control is rectangular that is defined by the top-left point,
- * and the width or height. The position
- * of the top-left point is relative to the top-left corner of the parent container.
+ * @remarks The position of the top-left point is relative to the top-left corner of the parent container.
* @see SetBounds()
*/
Tizen::Graphics::Rectangle GetBounds(void) const;
*
* @since 2.1
*
- * @return An instance of the Tizen::Graphics::FloatRectangle that represents the position of top-left corner,
+ * @return An instance of Tizen::Graphics::FloatRectangle that represents the position of top-left corner,
* the width, and the height of the control
- * @remarks The shape of the control is rectangular that is defined by the top-left point,
- * and the width or height. The position
- * of the top-left point is relative to the top-left corner of the parent container.
+ * @remarks The position of the top-left point is relative to the top-left corner of the parent container.
* @see SetBounds()
*/
Tizen::Graphics::FloatRectangle GetBoundsF(void) const;
* @param[out] y The y position of top-left corner of the control
* @param[out] width The width of the rectangular region
* @param[out] height The height of the rectangular region
- * @remarks The shape of the control is regarded as a rectangle that is defined
- * by the top-left point and the width or height.
- * The position of the top-left point is relative to the top-left corner of
- * the parent container.
+ * @remarks The position of the top-left point is relative to the top-left corner of the parent container.
* @see SetBounds()
*/
void GetBounds(int& x, int& y, int& width, int& height) const;
* @param[out] y The y position of top-left corner of the control
* @param[out] width The width of the rectangular region
* @param[out] height The height of the rectangular region
- * @remarks The shape of the control is regarded as a rectangle that is defined
- * by the top-left point and the width or height.
- * The position of the top-left point is relative to the top-left corner of
- * the parent container.
+ * @remarks The position of the top-left point is relative to the top-left corner of the parent container.
* @see SetBounds()
*/
void GetBounds(float& x, float& y, float& width, float& height) const;
*
* @since 2.0
*
- * @return The position of the control's top-left corner
- * @remarks The position of top-left corner is relative to the top-left corner of its parent container.
+ * @return The position of the control's top-left corner that is relative to the top-left corner of its parent container
* @see GetBounds()
*/
Tizen::Graphics::Point GetPosition(void) const;
*
* @since 2.1
*
- * @return The position of the control's top-left corner
- * @remarks The position of top-left corner is relative to the top-left corner of its parent container.
+ * @return The position of the control's top-left corner that is relative to the top-left corner of its parent container
* @see GetBounds()
*/
Tizen::Graphics::FloatPoint GetPositionF(void) const;
*
* @since 2.0
*
- * @param[out] x The x position of the control's top-left corner
- * @param[out] y The y position of the control's top-left corner
- * @remarks The position of top-left corner is relative to the top-left corner of its parent container.
+ * @param[out] x The x position of the control's top-left corner that is relative to the top-left corner of its parent container
+ * @param[out] y The y position of the control's top-left corner that is relative to the top-left corner of its parent container
* @see GetBounds()
*/
void GetPosition(int& x, int& y) const;
*
* @since 2.1
*
- * @param[out] x The x position of the control's top-left corner
- * @param[out] y The y position of the control's top-left corner
- * @remarks The position of top-left corner is relative to the top-left corner of its parent container.
+ * @param[out] x The x position of the control's top-left corner that is relative to the top-left corner of its parent container
+ * @param[out] y The y position of the control's top-left corner that is relative to the top-left corner of its parent container
* @see GetBounds()
*/
void GetPosition(float& x, float& y) const;
void GetSize(float& width, float& height) const;
/**
- * Gets the x position of the control. @n
- * The position of control is relative to the top-left corner of its parent container.
+ * Gets the x position of the control.
*
* @since 2.0
*
- * @return The x position of the control
+ * @return The x position of the control @n
+ * The position of control is relative to the top-left corner of its parent container.
* @see GetBounds()
* @see GetPosition()
* @see GetY()
int GetX(void) const;
/**
- * Gets the x position of the control. @n
- * The position of control is relative to the top-left corner of its parent container.
+ * Gets the x position of the control.
*
* @since 2.1
*
- * @return The x position of the control
+ * @return The x position of the control @n
+ * The position of control is relative to the top-left corner of its parent container.
* @see GetBounds()
* @see GetPosition()
* @see GetYF()
float GetXF(void) const;
/**
- * Gets the y position of the control. @n
- * The position of control is relative to the top-left corner of its parent container.
+ * Gets the y position of the control.
*
* @since 2.0
*
- * @return The y position of the control
+ * @return The y position of the control @n
+ * The position of control is relative to the top-left corner of its parent container.
* @see GetBounds()
* @see GetPosition()
* @see GetX()
int GetY(void) const;
/**
- * Gets the y position of the control. @n
- * The position of control is relative to the top-left corner of its parent container.
+ * Gets the y position of the control.
*
* @since 2.1
*
- * @return The y position of the control
+ * @return The y position of the control @n
+ * The position of control is relative to the top-left corner of its parent container.
* @see GetBounds()
* @see GetPosition()
* @see GetXF()
*
* @since 2.0
*
- * @return The minimum size of the control
+ * @return The minimum size of the control @n
+ * The first call of the method returns the system-defined minimum size.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The first call of the method returns the system-defined minimum size.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::Dimension GetMinimumSize(void) const;
*
* @since 2.1
*
- * @return The minimum size of the control
+ * @return The minimum size of the control @n
+ * The first call of the method returns the system-defined minimum size.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The first call of the method returns the system-defined minimum size.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::FloatDimension GetMinimumSizeF(void) const;
*
* @since 2.0
*
- * @return The maximum size of the control
+ * @return The maximum size of the control @n
+ * The first call of the method returns the system-defined maximum size.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The first call of the method returns the system-defined maximum size.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::Dimension GetMaximumSize(void) const;
*
* @since 2.1
*
- * @return The maximum size of the control
+ * @return The maximum size of the control @n
+ * The first call of the method returns the system-defined maximum size.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The first call of the method returns the system-defined maximum size.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::FloatDimension GetMaximumSizeF(void) const;
/**
- * Gets a font of the control.
+ * Gets the font of the control.
*
* @since 2.0
*
- * @return The font name set in the control @n
- * else an empty string if the font is not set
- * @see SetFont()
+ * @return The font name set in the control @n
+ * else an empty string if the font is not set
+ * @see SetFont()
*/
Tizen::Base::String GetFont(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] rect The new bounds of the control
+ * @param[in] rect The new bounds of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The control has not been constructed as yet.
+ * @exception E_INVALID_OPERATION The control has not been constructed yet.
* @exception E_UNSUPPORTED_OPERATION This control is neither movable nor resizable.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
- * @remarks The size of the control must be within the range defined by the minimum size and the maximum size.
* @see IsMovable()
* @see IsResizable()
* @see GetMinimumSize()
* @since 2.1
*
* @return An error code
- * @param[in] rect The new bounds of the control
+ * @param[in] rect The new bounds of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The control has not been constructed as yet.
+ * @exception E_INVALID_OPERATION The control has not been constructed yet.
* @exception E_UNSUPPORTED_OPERATION This control is neither movable nor resizable.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
- * @remarks The size of the control must be within the range defined by the minimum size and the maximum size.
* @see IsMovable()
* @see IsResizable()
* @see GetMinimumSize()
* @since 2.0
*
* @return An error code
- * @param[in] x The new x position of the control
- * @param[in] y The new y position of the control
- * @param[in] width The new width of the control
- * @param[in] height The new height of the control
+ * @param[in] x The new x position of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
+ * @param[in] y The new y position of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
+ * @param[in] width The new width of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
+ * @param[in] height The new height of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The control has not been constructed as yet.
+ * @exception E_INVALID_OPERATION The control has not been constructed yet.
* @exception E_UNSUPPORTED_OPERATION This control is neither movable nor resizable.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
- * @remarks The size of the control must be within the range defined by the minimum size and the maximum size.
* @see IsMovable()
* @see IsResizable()
* @see GetMinimumSize()
* @since 2.1
*
* @return An error code
- * @param[in] x The new x position of the control
- * @param[in] y The new y position of the control
- * @param[in] width The new width of the control
- * @param[in] height The new height of the control
+ * @param[in] x The new x position of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
+ * @param[in] y The new y position of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
+ * @param[in] width The new width of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
+ * @param[in] height The new height of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The control has not been constructed as yet.
+ * @exception E_INVALID_OPERATION The control has not been constructed yet.
* @exception E_UNSUPPORTED_OPERATION This control is neither movable nor resizable.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
- * @remarks The size of the control must be within the range defined by the minimum size and the maximum size.
* @see IsMovable()
* @see IsResizable()
* @see GetMinimumSize()
* @since 2.0
*
* @return An error code
- * @param[in] position The new position
+ * @param[in] position The new position @n
+ * The position of the control are relative to the top-left corner of its parent.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The control has not been constructed as yet.
+ * @exception E_INVALID_OPERATION The control has not been constructed yet.
* @exception E_UNSUPPORTED_OPERATION This control is not movable.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
- * @remarks The position of the control are relative to the top-left corner of its parent.
* @see IsMovable()
* @see SetBounds()
*/
* @since 2.1
*
* @return An error code
- * @param[in] position The new position
+ * @param[in] position The new position @n
+ * The position of the control are relative to the top-left corner of its parent.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The control has not been constructed as yet.
+ * @exception E_INVALID_OPERATION The control has not been constructed yet.
* @exception E_UNSUPPORTED_OPERATION This control is not movable.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
- * @remarks The position of the control are relative to the top-left corner of its parent.
* @see IsMovable()
* @see SetBounds()
*/
*
* @since 2.0
* @return An error code
- * @param[in] x The new x position of the control
- * @param[in] y The new y position of the control
+ * @param[in] x The new x position of the control @n
+ * The value is relative to the top-left corner of its parent.
+ * @param[in] y The new y position of the control @n
+ * The value is relative to the top-left corner of its parent.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The control has not been constructed as yet.
+ * @exception E_INVALID_OPERATION The control has not been constructed yet.
* @exception E_UNSUPPORTED_OPERATION This control is not movable.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
- * @remarks The x,y position of the control are relative to the top-left corner of its parent.
* @see IsMovable()
* @see SetBounds()
*/
*
* @since 2.1
* @return An error code
- * @param[in] x The new x position of the control
- * @param[in] y The new y position of the control
+ * @param[in] x The new x position of the control @n
+ * The value is relative to the top-left corner of its parent.
+ * @param[in] y The new y position of the control @n
+ * The value is relative to the top-left corner of its parent.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The control has not been constructed as yet.
+ * @exception E_INVALID_OPERATION The control has not been constructed yet.
* @exception E_UNSUPPORTED_OPERATION This control is not movable.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
- * @remarks The x,y position of the control are relative to the top-left corner of its parent.
* @see IsMovable()
* @see SetBounds()
*/
result SetPosition(float x, float y);
/**
- * Sets the size of the control. @n
- * The @c width and @c height parameters contain the width and height values of the object, respectively.
+ * Sets the size of the control.
*
* @since 2.0
*
* @return An error code
- * @param[in] size The new width and height
+ * @param[in] size The new width and height @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The control has not been constructed as yet.
+ * @exception E_INVALID_OPERATION The control has not been constructed yet.
* @exception E_UNSUPPORTED_OPERATION This control is not resizable.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
- * @remarks The size of the control must be within the range defined by the minimum size and the maximum size.
* @see IsResizable()
* @see GetMinimumSize()
* @see GetMaximumSize()
/**
* Sets the size of the control.
- * The @c width and @c height parameters contain the width and height values of the object, respectively.
*
* @since 2.1
*
* @return An error code
- * @param[in] size The new width and height
+ * @param[in] size The new width and height @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The control has not been constructed as yet.
+ * @exception E_INVALID_OPERATION The control has not been constructed yet.
* @exception E_UNSUPPORTED_OPERATION This control is not resizable.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
- * @remarks The size of the control must be within the range defined by the minimum size and the maximum size.
* @see IsResizable()
* @see GetMinimumSize()
* @see GetMaximumSize()
result SetSize(const Tizen::Graphics::FloatDimension& size);
/**
- * Sets the size of the control. @n
- * The @c width and @c height parameters contain the width and height values of the object, respectively.
+ * Sets the size of the control.
*
* @since 2.0
*
* @return An error code
- * @param[in] width The new width of the control
- * @param[in] height The new height of the control
+ * @param[in] width The new width of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
+ * @param[in] height The new height of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The control has not been constructed as yet.
+ * @exception E_INVALID_OPERATION The control has not been constructed yet.
* @exception E_UNSUPPORTED_OPERATION This control is not resizable.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
- * @remarks The size of the control must be within the range defined by the minimum size and the maximum size.
* @see IsResizable()
* @see GetMinimumSize()
* @see GetMaximumSize()
/**
* Sets the size of the control.
- * The @c width and @c height parameters contain the width and height values of the object, respectively.
*
* @since 2.1
*
* @return An error code
- * @param[in] width The new width of the control
- * @param[in] height The new height of the control
+ * @param[in] width The new width of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
+ * @param[in] height The new height of the control @n
+ * The size of the control must be within the range defined by the minimum size and the maximum size.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The control has not been constructed as yet.
+ * @exception E_INVALID_OPERATION The control has not been constructed yet.
* @exception E_UNSUPPORTED_OPERATION This control is not resizable.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
- * @remarks The size of the control must be within the range defined by the minimum size and the maximum size.
* @see IsResizable()
* @see GetMinimumSize()
* @see GetMaximumSize()
* @exception E_UNSUPPORTED_OPERATION This control is not resizable.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks This method can affect the maximum size and the current size of the control. @n
- * The control needs to be redrawn to reflect the change in its size. @n
- * If the current maximum size or the control size is smaller than the new minimum size,
- * it becomes the same as the new minimum size.
+ * @remarks
+ * - This method can affect the maximum size and the current size of the control.
+ * - The control needs to be redrawn to reflect the change in its size.
+ * - If the current maximum size or the control size is smaller than the new minimum size,
+ * it becomes the same as the new minimum size.
* @see IsResizable()
*/
result SetMinimumSize(const Tizen::Graphics::Dimension& newMinDim);
* @exception E_UNSUPPORTED_OPERATION This control is not resizable.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks This method can affect the maximum size and the current size of the control. @n
- * The control needs to be redrawn to reflect the change in its size. @n
- * If the current maximum size or the control size is smaller than the new minimum size,
- * it becomes the same as the new minimum size.
+ * @remarks
+ * - This method can affect the maximum size and the current size of the control.
+ * - The control needs to be redrawn to reflect the change in its size.
+ * - If the current maximum size or the control size is smaller than the new minimum size,
+ * it becomes the same as the new minimum size.
* @see IsResizable()
*/
result SetMinimumSize(const Tizen::Graphics::FloatDimension& newMinDim);
* @since 2.0
*
* @return An error code
- * @param[in] newMaxDim The new maximum size of the control
+ * @param[in] newMaxDim The new maximum size of the control
* @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_OPERATION This control is not resizable.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks This method can affect the minimum size and the current size of the control. @n
- * The control needs to be redrawn to reflect the change in its size. @n
- * If the current minimum size or the control size is greater than the new maximum size,
- * it becomes the same as the new maximum size.
+ * @remarks
+ * - This method can affect the minimum size and the current size of the control.
+ * - The control needs to be redrawn to reflect the change in its size.
+ * - If the current minimum size or the control size is greater than the new maximum size,
+ * it becomes the same as the new maximum size.
* @see IsResizable()
*/
result SetMaximumSize(const Tizen::Graphics::Dimension& newMaxDim);
* @since 2.1
*
* @return An error code
- * @param[in] newMaxDim The new maximum size of the control
+ * @param[in] newMaxDim The new maximum size of the control
* @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_OPERATION This control is not resizable.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks This method can affect the minimum size and the current size of the control. @n
- * The control needs to be redrawn to reflect the change in its size. @n
- * If the current minimum size or the control size is greater than the new maximum size,
- * it becomes the same as the new maximum size.
+ * @remarks
+ * - This method can affect the minimum size and the current size of the control.
+ * - The control needs to be redrawn to reflect the change in its size.
+ * - If the current minimum size or the control size is greater than the new maximum size,
+ * it becomes the same as the new maximum size.
* @see IsResizable()
*/
result SetMaximumSize(const Tizen::Graphics::FloatDimension& newMaxDim);
*
* @since 2.0
*
- * @return The position relative to the top-left corner of the control's client-area
- * @param[in] screenPosition The position relative to the top-left corner of the screen
- * @see ConvertToScreenPosition()
+ * @return The position relative to the top-left corner of the control's client-area
+ * @param[in] screenPosition The position relative to the top-left corner of the screen
+ * @see ConvertToScreenPosition()
*/
Tizen::Graphics::Point ConvertToControlPosition(const Tizen::Graphics::Point& screenPosition) const;
*
* @since 2.1
*
- * @return The position relative to the top-left corner of the control's client-area
- * @param[in] screenPosition The position relative to the top-left corner of the screen
- * @see ConvertToScreenPosition()
+ * @return The position relative to the top-left corner of the control's client-area
+ * @param[in] screenPosition The position relative to the top-left corner of the screen
+ * @see ConvertToScreenPosition()
*/
Tizen::Graphics::FloatPoint ConvertToControlPosition(const Tizen::Graphics::FloatPoint& screenPosition) const;
* @since 2.0
*
* @return An error code
- * @param[in] fontName The app font name or system font name @n
- * The app font name is retrieved using Tizen::Graphics::Font::GetFaceName(Tizen::Base::String& filepath). @n
- * The system font name is retrieved using Tizen::Graphics::Font::GetSystemFontListN().
- * Sets an empty string to reset.
+ * @param[in] fontName The app font name or system font name @n
+ * The app font name is retrieved using Tizen::Graphics::Font::GetFaceName(Tizen::Base::String& filepath). @n
+ * The system font name is retrieved using Tizen::Graphics::Font::GetSystemFontListN().
+ * Set an empty string to reset.
* @exception E_SUCCESS The method is successful.
- * @exception E_FILE_NOT_FOUND The specified font cannot be found or accessed.
- * @remarks At first, the value of @c fontName is considered app font name if it matches one of the face names of the font files which are located in @b '/res/font'.
- * If not, the value of @c fontName is considered system font name if it matches one of the retrieved values using Tizen::Graphics::Font::GetSystemFontListN().
- * @remarks The control first attempts to find the control font. If it fails, then it searches for the application default font and the system font, in sequence.
+ * @exception E_FILE_NOT_FOUND The specified font cannot be found or accessed.
+ * @remarks
+ * - At first, the value of @c fontName is considered app font name if it matches one of the face names of the font files which are located in @b '/res/font'.
+ * If not, the value of @c fontName is considered system font name if it matches one of the retrieved values using
+ * Tizen::Graphics::Font::GetSystemFontListN().
+ * - The control first attempts to find the control font. If it fails, then it searches for the application default font and the system font, in sequence.
* @see GetFont()
*/
result SetFont(const Tizen::Base::String& fontName);
*
* @return @c true if the specified @c point is inside the control, @n
* else @c false
- * @param[in] point The point to check
- * @remarks The specified @c point must be defined relative to the top-left corner of the control.
+ * @param[in] point The point to check @n
+ * The value must be defined relative to the top-left corner of the control.
*/
bool Contains(const Tizen::Graphics::Point& point) const;
*
* @return @c true if the specified @c point is inside the control, @n
* else @c false
- * @param[in] point The point to check
- * @remarks The specified @c point must be defined relative to the top-left corner of the control.
+ * @param[in] point The point to check @n
+ * The value must be defined relative to the top-left corner of the control.
*/
bool Contains(const Tizen::Graphics::FloatPoint& point) const;
*
* @return @c true if the specified point is inside the control, @n
* else @c false
- * @param[in] x The x position of the point to check
- * @param[in] y The y position of the point to check
- * @remarks The specified point must be defined relative to the top-left corner of the control.
+ * @param[in] x The x position of the point to check @n
+ * The value must be defined relative to the top-left corner of the control.
+ * @param[in] y The y position of the point to check @n
+ * The value must be defined relative to the top-left corner of the control.
*/
bool Contains(int x, int y) const;
*
* @return @c true if the specified point is inside the control, @n
* else @c false
- * @param[in] x The x position of the point to check
- * @param[in] y The y position of the point to check
- * @remarks The specified point must be defined relative to the top-left corner of the control.
+ * @param[in] x The x position of the point to check @n
+ * The value must be defined relative to the top-left corner of the control.
+ * @param[in] y The y position of the point to check @n
+ * The value must be defined relative to the top-left corner of the control.
*/
bool Contains(float x, float y) const;
* @compatibility This method has compatibility issues with OSP compatible applications. @n
* For more information, see @ref CompDrawPage "here".
* @endif
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
- * Note: This control cannot be displayed.
- * @exception E_SYSTEM A system error has occurred.
- * @remarks This method calls OnDraw() immediately in a synchronous way.
- * @see Show()
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
+ * Note: This control cannot be displayed.
+ * @exception E_SYSTEM A system error has occurred.
+ * @remarks This method calls OnDraw() immediately in a synchronous way.
+ * @see Show()
*/
result Draw(void);
/**
* @if OSPCOMPAT
- * @page CompDrawPage Compatibility for Draw()
- * @section CompDrawPageIssueSection Issues
+ * @page CompDrawPage Compatibility for Draw()
+ * @section CompDrawPageIssueSection Issues
* Implementation of this method in %Tizen API versions prior to 2.1 has the following issue: @n
- * -# Draw() method draws child controls in a recursive way regardless of the visibility of the parent.
+ * -# The Draw() method draws child controls in a recursive way regardless of the visibility of the parent.
*
- * @section CompDrawPageSolutionSection Resolutions
+ * @section CompDrawPageSolutionSection Resolutions
* The issue mentioned above is resolved in %Tizen API version 2.1 as follows: @n
- * -# Draw() method does not draw child controls if the control itself is not visible.
+ * -# The Draw() method does not draw child controls if the control itself is not visible.
* @endif
*/
*
* @since 2.0
*
- * @param[in] recursive Set to @c true to draw child controls recursively, @n
- * else @c false
- * @return An error code
- * @exception E_SUCCESS The method is successful.
+ * @param[in] recursive Set to @c true to draw child controls recursively, @n
+ * else @c false
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
- * Note: This control cannot be displayed.
- * @exception E_SYSTEM A system error has occurred.
- * @remarks This method calls OnDraw() immediately in a synchronous way.
- * @see Show()
+ * Note: This control cannot be displayed.
+ * @exception E_SYSTEM A system error has occurred.
+ * @remarks This method calls OnDraw() immediately in a synchronous way.
+ * @see Show()
*/
result Draw(bool recursive);
* Shows the control on the screen.
*
* @since 2.0
- * @final Although this method is virtual, it should not be overridden.
- * If overridden, it may not work as expected.
+ * @final Although this method is virtual, it should not be overridden.
+ * If overridden, it may not work as expected.
*
* @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* Note: This control cannot be displayed.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
*/
virtual result Show(void);
*
* @since 2.0
*
- * @param[in] recursive Set to @c true to invalidate child controls recursively, @n
- * else @c false
+ * @param[in] recursive Set to @c true to invalidate child controls recursively, @n
+ * else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* Note: This control cannot be displayed.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks OnDraw() is not called immediately, but called asynchronously just before the screen is updated.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - OnDraw() is not called immediately, but called asynchronously just before the screen is updated.
* @see InvalidateBounds()
* @see Show()
*/
*
* @since 2.0
*
- * @param[in] bounds The position relative to the top-left corner of the control
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
- * Note: This control cannot be displayed.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @param[in] bounds The position relative to the top-left corner of the control
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
+ * Note: This control cannot be displayed.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
* @see Invalidate()
* @see Show()
*/
*
* @since 2.1
*
- * @param[in] bounds The position relative to the top-left corner of the control
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
- * Note: This control cannot be displayed.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @param[in] bounds The position relative to the top-left corner of the control
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
+ * Note: This control cannot be displayed.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
* @see Invalidate()
* @see Show()
*/
void InvalidateBounds(const Tizen::Graphics::FloatRectangle& bounds);
/**
- * Draws the control asynchronously.
+ * Draws the control asynchronously. @n
+ * This method posts a draw event in the event queue. @n
+ * Drawing requested by %RequestRedraw() occurs when the draw event is fired to the control.
*
* @since 2.0
*
- * @param[in] show Set to @c true to also show the %Control, @n
+ * @param[in] show Set to @c true to also show the control, @n
* else @c false
- * @remarks This method posts a draw event in the event queue. @n
- * Drawing requested by %RequestRedraw() occurs when the draw event is fired to the control.
*/
void RequestRedraw(bool show = true) const;
*
* @return The graphic canvas of the control, @n
* else @c null if an exception occurs
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @remarks The method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the control.
- * It is the developer's responsibility to deallocate the canvas after use.
- * The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged.
- * Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method
- * if the size or position of the control is changed.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,
- * if custom drawing is performed on the graphic canvas of Frame and Form
- * then it will appear on the screen regardless of which control is currently visible on the screen.
- * @see GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const
- * @see GetCanvasN(int x, int y, int width, int height) const
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the control.
+ * The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged.
+ * Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method
+ * if the size or position of the control is changed.
+ * - The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,
+ * if custom drawing is performed on the graphic canvas of Frame and Form
+ * then it will appear on the screen regardless of which control is currently visible on the screen.
+ * @see GetCanvasN(const Tizen::Graphics::Rectangle&) const
+ * @see GetCanvasN(int, int, int, int) const
* @code
* result
* MyForm::OnDraw(void)
* Canvas* pCanvas = GetCanvasN();
* if (pCanvas != null)
* {
- * // add your drawing code here
- * }
- * if (pCanvas)
+ * // adds your drawing code here
+ *
* delete pCanvas;
- * // Do not call Show(). It will be called automatically after OnDraw() callback.
+ * }
+ * Form::OnDraw();
+ * // Do not call Show(). It will be called automatically after OnDraw() callback.
* return r;
* }
* @endcode
*
* @return The graphic canvas of the control, @n
* else @c null if an exception occurs
- * @param[in] bounds The bounds of the graphic canvas
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified bounds does not intercept with the bounds of the control.
+ * @param[in] bounds The bounds of the graphic canvas
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE The specified bounds does not intercept with the bounds of the control.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @remarks Only the graphic canvas of displayable controls can be obtained.
- * If the specified area is not inside the control,
- * the graphics canvas of overlapped area between the control and the specified bound is returned. @n
- * @remarks The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control.
- * It is the developer's responsibility to deallocate the canvas after use.
- * The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged.
- * Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method
- * if the size or position of the control is changed.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,
- * if custom drawing is performed on the graphic canvas of Frame and Form
- * then it will appear on the screen regardless of which control is currently visible on the screen.
- * @see GetCanvasN(void) const
- * @see GetCanvasN(int x, int y, int width, int height) const
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - Only the graphic canvas of displayable controls can be obtained.
+ * If the specified area is not inside the control,
+ * the graphics canvas of overlapped area between the control and the specified bound is returned.
+ * - The method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the control.
+ * The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged.
+ * Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method
+ * if the size or position of the control is changed.
+ * - The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,
+ * if custom drawing is performed on the graphic canvas of Frame and Form
+ * then it will appear on the screen regardless of which control is currently visible on the screen.
+ * @see GetCanvasN() const
+ * @see GetCanvasN(int, int, int, int) const
*/
Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const;
*
* @return The graphic canvas of the control, @n
* else @c null if an exception occurs
- * @param[in] bounds The bounds of the graphic canvas
+ * @param[in] bounds The bounds of the graphic canvas
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified bounds does not intercept with the bounds of the control.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @remarks Only the graphic canvas of displayable controls can be obtained.
- * If the specified area is not inside the control,
- * the graphics canvas of overlapped area between the control and the specified bound is returned. @n
- * @remarks The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control.
- * It is the developer's responsibility to deallocate the canvas after use.
- * The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged.
- * Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method
- * if the size or position of the control is changed.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,
- * if custom drawing is performed on the graphic canvas of Frame and Form
- * then it will appear on the screen regardless of which control is currently visible on the screen.
- * @see GetCanvasN(void) const
- * @see GetCanvasN(float x, float y, float width, float height) const
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - Only the graphic canvas of displayable controls can be obtained.
+ * If the specified area is not inside the control,
+ * the graphics canvas of overlapped area between the control and the specified bound is returned.
+ * - The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control.
+ * The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged.
+ * Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method
+ * if the size or position of the control is changed.
+ * - The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,
+ * if custom drawing is performed on the graphic canvas of Frame and Form
+ * then it will appear on the screen regardless of which control is currently visible on the screen.
+ * @see GetCanvasN() const
+ * @see GetCanvasN(float, float, float, float) const
*/
Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds) const;
*
* @return The graphic canvas of the control, @n
* else @c null if an exception occurs
- * @param[in] x The x position relative to the top-left corner of the control
- * @param[in] y The y position relative to the top-left corner of the control
- * @param[in] width The width of a graphic canvas
- * @param[in] height The height of a graphic canvas
+ * @param[in] x The x position relative to the top-left corner of the control
+ * @param[in] y The y position relative to the top-left corner of the control
+ * @param[in] width The width of a graphic canvas
+ * @param[in] height The height of a graphic canvas
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified bounds do not intercept with the bounds of the control.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @remarks Only the graphic canvas of displayable controls can be obtained.
- * If the specified area is not inside the control,
- * the graphics canvas of the overlapped area between the control and the specified bound is returned. @n
- * @remarks The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control.
- * It is the developer's responsibility to deallocate the canvas after use.
- * The canvas is guaranteed to be valid only if properties of the parent controls of the canvas remain unchanged.
- * Therefore, one must delete the previously allocated canvas and create a new canvas using the %GetCanvasN() method
- * if the size or position of the control is changed.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,
- * if custom drawing is performed on the graphic canvas of Frame and Form
- * then it will appear on the screen regardless of which control is currently visible on the screen.
- * @see GetCanvasN(void) const
- * @see GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - Only the graphic canvas of displayable controls can be obtained.
+ * If the specified area is not inside the control,
+ * the graphics canvas of the overlapped area between the control and the specified bound is returned.
+ * - The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control.
+ * The canvas is guaranteed to be valid only if properties of the parent controls of the canvas remain unchanged.
+ * Therefore, one must delete the previously allocated canvas and create a new canvas using the %GetCanvasN() method
+ * if the size or position of the control is changed.
+ * - The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,
+ * if custom drawing is performed on the graphic canvas of Frame and Form
+ * then it will appear on the screen regardless of which control is currently visible on the screen.
+ * @see GetCanvasN() const
+ * @see GetCanvasN(const Tizen::Graphics::Rectangle&) const
*/
Tizen::Graphics::Canvas* GetCanvasN(int x, int y, int width, int height) const;
*
* @return The graphic canvas of the control, @n
* else @c null if an exception occurs
- * @param[in] x The x position relative to the top-left corner of the control
- * @param[in] y The y position relative to the top-left corner of the control
- * @param[in] width The width of a graphic canvas
- * @param[in] height The height of a graphic canvas
+ * @param[in] x The x position relative to the top-left corner of the control
+ * @param[in] y The y position relative to the top-left corner of the control
+ * @param[in] width The width of a graphic canvas
+ * @param[in] height The height of a graphic canvas
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified bounds do not intercept with the bounds of the control.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @remarks Only the graphic canvas of displayable controls can be obtained.
- * If the specified area is not inside the control,
- * the graphics canvas of the overlapped area between the control and the specified bound is returned. @n
- * @remarks The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control.
- * It is the developer's responsibility to deallocate the canvas after use.
- * The canvas is guaranteed to be valid only if properties of the parent controls of the canvas remain unchanged.
- * Therefore, one must delete the previously allocated canvas and create a new canvas using the %GetCanvasN() method
- * if the size or position of the control is changed.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,
- * if custom drawing is performed on the graphic canvas of Frame and Form
- * then it will appear on the screen regardless of which control is currently visible on the screen.
- * @see GetCanvasN(void) const
- * @see GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds) const
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - Only the graphic canvas of displayable controls can be obtained.
+ * If the specified area is not inside the control,
+ * the graphics canvas of the overlapped area between the control and the specified bound is returned.
+ * - The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control.
+ * It is the developer's responsibility to deallocate the canvas after use.
+ * The canvas is guaranteed to be valid only if properties of the parent controls of the canvas remain unchanged.
+ * Therefore, one must delete the previously allocated canvas and create a new canvas using the %GetCanvasN() method
+ * if the size or position of the control is changed.
+ * - The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,
+ * if custom drawing is performed on the graphic canvas of Frame and Form
+ * then it will appear on the screen regardless of which control is currently visible on the screen.
+ * @see GetCanvasN() const
+ * @see GetCanvasN(const Tizen::Graphics::FloatRectangle&) const
*/
Tizen::Graphics::Canvas* GetCanvasN(float x, float y, float width, float height) const;
*
* @since 2.0
*
- * @return @c true if the control is currently visible on the screen, @n
- * else @c false
- * @remarks If this method is called before the control is added to a parent, @c false is returned.
+ * @return @c true if the show states of the specified control and its ancestor controls are set to @c true, @n
+ * else @c false if this method is called before the control is added to a parent or the show state
+ * of the specified control or its parent control is set to @c false.
* @see GetShowState()
* @see SetShowState()
*/
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* Note: This control cannot be displayed.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
- * @remarks Even if this method is invoked, the control is not drawn or shown. @n
- * To display the control, use the Invalidate() methods. @n
- * Once the control's show state is set to @c false,
- * the show state needs to be set to @c true again before you invalidate the control.
+ * @remarks
+ * - Even if this method is invoked, the control is not drawn or shown. @n
+ * To display the control, use the Invalidate() methods. @n
+ * Once the control's show state is set to @c false,
+ * the show state needs to be set to @c true again before you invalidate the control.
* @see GetShowState()
* @see Invalidate()
*/
result SetShowState(bool state);
/**
- * Gets the dedicated %VisualElement instance for this control.
+ * Gets a dedicated %VisualElement instance for this control.
*
* @since 2.0
*
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* Note: The control does not permit to change its focus ability.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The focus ability of the container classes like Panel is @c false by default.
- * @remarks The RadioGroup class does not render the UI.
+ * @remarks
+ * - The focus ability of the container classes like Panel is @c false by default.
+ * - The RadioGroup class does not render the UI.
* Therefore, RadioGroup::SetFocusable() returns @c E_SYSTEM.
*/
result SetFocusable(bool focusable);
* @since 2.0
*
* @return @c true if the control currently has the input focus, @n
- * else @c false
- * @remarks If this method is called before the control is added to a parent, @c false is returned.
+ * else @c false either this method is called before the control is added to a parent or the control currently has not the input focus
* @see SetFocus()
*/
bool HasFocus(void) const;
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* Note: This control cannot be displayed.
* @exception E_INVALID_CONDITION The control is not contained in, or is not the top z-order frame or form.
- * @remarks Do not override this method.
*/
result SetFocus(void);
* @since 2.0
*
* @return @c true if the control is enabled, @n
- * else @c false
- * @remarks If this method is called before the control is added to a parent, @c false is returned.
+ * else @c false either this method is called before the control is added to a parent or the control is disabled
* @see SetEnabled()
*/
bool IsEnabled(void) const;
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Do not override this method.
*/
result SetEnabled(bool enable);
* @since 2.0
*
* @return @c true if the device is in touch mode, @n
- * else @c false
- * @remarks This method returns @c false, for devices with QWERTY keyboard.
- * The user can navigate the UI using directional keys.
+ * else @c false the device is either with QWERTY keyboard or not in touch mode
+ * @remarks The user can navigate the UI using directional keys if the device is with QWERTY keyboard.
*/
bool IsInTouchMode(void) const;
* @since 2.0
*
* @param[in] enable Set to @c true to enable drop operations, @n
- * else @c false
+ * else @c false
* @remarks To receive drop event, control's drag property has to be enabled.
* @see SetDragEnabled()
*/
void SetDropEnabled(bool enable);
/**
- * Sends a user event to the control.
+ * Sends a user event to the control. @n
+ * The %SendUserEvent() method posts a user event in the event queue and returns immediately to support asynchronous actions of the framework.
*
* @since 2.0
*
- * @param[in] requestId The user-defined event ID
- * @param[in] pArgs A pointer to the argument list
- * @remarks This method posts a user event in the event queue
- * and returns immediately to support asynchronous actions of the framework.
- * @see OnUserEventReceived()
+ * @param[in] requestId The user-defined event ID
+ * @param[in] pArgs A pointer to the argument list
+ * @see OnUserEventReceivedN()
*/
void SendUserEvent(RequestId requestId, const Tizen::Base::Collection::IList* pArgs) const;
* Stops the current UI event dispatch sequence by indicating the current input event is consumed.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This method is deprecated. Instead of using this method, use IPropagatedKeyEventListener or IPropagatedTouchEventListener to consume event. @n To propagate the event, return @c true inside the implementation of IPropagatedKeyEventListener or IPropagatedTouchEventListener.
+ * @deprecated This method is deprecated. Instead of using this method, use IPropagatedKeyEventListener or IPropagatedTouchEventListener to consume event. @n
+ * To propagate the event, return @c true inside the implementation of IPropagatedKeyEventListener or IPropagatedTouchEventListener.
* @since 2.0
*
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
- * @remarks If this method is invoked during an UI event (key or touch) propagation sequence,
- * the method will stop the propagation and consequently the system will not be notified of the event.@n
- * The method will not have any effect if no UI event is being dispatched. @n
- * It is recommended that this method is called within IKeyEventListener or
- * ITouchEventListener to stop the event from propagating to the next step.
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
+ * @remarks
+ * - If this method is invoked during an UI event (key or touch) propagation sequence,
+ * the method will stop the propagation and consequently the system will not be notified of the event.
+ * - The method will not have any effect if no UI event is being dispatched.
+ * - It is recommended that this method is called within IKeyEventListener or ITouchEventListener to stop the event from propagating to
+ * the next step.
*/
result ConsumeInputEvent(void);
* @since 2.0
*
* @return An error code
- * @param[in] gestureDetector The gesture detector
+ * @param[in] gestureDetector The gesture detector
* @exception E_SUCCESS The method is successful.
* @see RemoveGestureDetector()
*/
* @deprecated This method is deprecated.
* @since 2.0
*
- * @return An error code
- * @param[in] gestureDetector The gesture detector
+ * @return An error code
+ * @param[in] gestureDetector The gesture detector
* @exception E_SUCCESS The method is successful.
* @see AddGestureDetector()
*/
*
* @return The composite mode
* @exception E_SUCCESS The method is successful.
- * @remarks Since API version 2.1, this method only returns COMPOSITE_MODE_ALPHA_BLENDING.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks
+ * - Since API version 2.1, this method only returns @c COMPOSITE_MODE_ALPHA_BLENDING.
+ * - The specific error code can be accessed using the GetLastResult() method.
* @endif
*/
Tizen::Ui::CompositeMode GetCompositeMode(void) const;
* @param[in] compositeMode The composite mode
* @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_OPERATION The method is not supported.
- * @remarks In Tizen, only @c COMPOSITE_MODE_ALPHA_BLENDING is allowed.
+ * @remarks In %Tizen, only @c COMPOSITE_MODE_ALPHA_BLENDING is allowed.
* Otherwise, this method returns @c E_UNSUPPORTED_OPERATION.
* @endif
*/
*
* @return The chroma key color
* @exception E_UNSUPPORTED_OPERATION The method is not supported.
- * @remarks In Tizen, this method always fails and returns Tizen::Graphics::Color(0, 0, 0, 0).
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks
+ * - In %Tizen, this method always fails and returns Tizen::Graphics::Color(0, 0, 0, 0).
+ * - The specific error code can be accessed using the GetLastResult() method.
* @endif
*/
Tizen::Graphics::Color GetChromaKeyColor(void) const;
* @return An error code
* @param[in] chromaKeyColor The chroma key color
* @exception E_UNSUPPORTED_OPERATION The method is not supported.
- * @remarks In Tizen, this method always fails.
+ * @remarks In %Tizen, this method always fails.
* @endif
*/
result SetChromaKeyColor(Tizen::Graphics::Color chromaKeyColor);
/**
* Sets the bounds of the content area.
*
- * @since 2.1
+ * @since 2.1
*
- * @param[in] rect The bounds of the content area
- * @see GetContentAreaBounds()
+ * @param[in] rect The bounds of the content area
+ * @remarks The content area can be used for the fitting policy of layout is ::FIT_POLICY_CONTENT.
+ * @see GetContentAreaBounds()
*/
void SetContentAreaBounds(const Tizen::Graphics::Rectangle& rect);
*
* @since 2.1
*
- * @param[in] rect The bounds of the content area
- * @see GetContentAreaBoundsF()
+ * @param[in] rect The bounds of the content area
+ * @remarks The content area can be used for the fitting policy of layout is ::FIT_POLICY_CONTENT.
+ * @see GetContentAreaBoundsF()
*/
void SetContentAreaBounds(const Tizen::Graphics::FloatRectangle& rect);
*
* @since 2.1
*
- * @return The bounds of the content area
- * @see SetContentAreaBounds()
+ * @return The bounds of the content area
+ * @see SetContentAreaBounds()
*/
Tizen::Graphics::Rectangle GetContentAreaBounds(void) const;
*
* @since 2.1
*
- * @return The bounds of the content area
- * @see SetContentAreaBoundsF()
+ * @return The bounds of the content area
+ * @see SetContentAreaBounds()
*/
Tizen::Graphics::FloatRectangle GetContentAreaBoundsF(void) const;
* @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_OPERATION This method is not supported.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks This method is not supported in the following class that is derived from Panel class:
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - This method is not supported in the following class that is derived from Panel class:
* @li OverlayPanel
- * @remarks The bounds of the %Panel control must be within the client area of the Form control to get a valid composited scene.
+ * - The bounds of the %Panel control must be within the client area of the Form control to get a valid composited scene.
*/
Tizen::Graphics::Bitmap* GetCapturedBitmapN(void) const;
AccessibilityContainer* GetAccessibilityContainer(void);
/**
- * Sets a propagated touch event listener to the %Control instance. @n
- * The registered listener is notified when a touch event occurs in the control. Using the propagated touch event listener, an application can control the touch event routing path.
+ * Sets a propagated touch event listener to a %Control instance. @n
+ * The registered listener is notified when a touch event occurs in the control. Using the propagated touch event listener,
+ * an application can control the touch event routing path.
*
* @since 2.1
*
- * @param[in] pListener The event listener to which the propagated touch events are dispatched
+ * @param[in] pListener The event listener to which the propagated touch events are dispatched @n
+ * Pass @c null to unregister the event listener.
* @remarks The specified event listener should be allocated in heap memory.
- * To unregister the event listener, pass @c null to @c pListener.
-
*/
void SetPropagatedTouchEventListener(IPropagatedTouchEventListener* pListener);
/**
- * Sets a propagated key event listener to the %Control instance.
- * The registered listener is notified when a key event occurs in the control. Using the propagated key event listener, an application can control the key event routing path.
+ * Sets a propagated key event listener to a %Control instance.
+ * The registered listener is notified when a key event occurs in the control. Using the propagated key event listener, an application
+ * can control the key event routing path.
*
* @since 2.1
*
- * @param[in] pListener The event listener to which the propagated touch events are dispatched
+ * @param[in] pListener The event listener to which the propagated touch events are dispatched @n
+ * Pass @c null to unregister the event listener.
* @remarks The specified event listener should be allocated in heap memory.
- * To unregister the event listener, pass @c null to @c pListener.
-
*/
void SetPropagatedKeyEventListener(IPropagatedKeyEventListener* pListener);
*
* @since 2.1
*
- * @param[in] pPreviousFocus The pointer to the previous focus of the control
- * @remarks Focus UI supports linear navigation of controls from top-left to bottom-right direction. This method allows for customizing the default navigation behavior.
- * @remarks The platform will not take the ownership of @c pPreviousFocus after this call.
+ * @param[in] pPreviousFocus The pointer to the previous focus of the control
+ * @remarks
+ * - Focus UI supports linear navigation of controls from top-left to bottom-right direction.
+ * This method allows for customizing the default navigation behavior.
+ * - The platform will not take the ownership of @c pPreviousFocus after this call.
* @see SetNextFocus()
* @see GetPreviousFocus()
*/
*
* @since 2.1
*
- * @param[in] pNextFocus The pointer to the next focus of the control
- * @remarks Focus UI supports linear navigation of controls from top-left to bottom-right direction. This method allows for customizing the default navigation behavior.
- * @remarks The platform will not take the ownership of @c pNextFocus after this call.
+ * @param[in] pNextFocus The pointer to the next focus of the control
+ * @remarks
+ * - Focus UI supports linear navigation of controls from top-left to bottom-right direction.
+ * This method allows for customizing the default navigation behavior.
+ * - The platform will not take the ownership of @c pNextFocus after this call.
* @see SetPreviousFocus()
* @see GetNextFocus()
*/
Control* GetNextFocus(void) const;
/**
- * Sets the touch press threshold of the Control in inch.
+ * Sets the touch press threshold of the Control in inch. @n
+ * The touch move events will be fired if the move distance exceeds the set allowance value. For example, set 0.5 if the distance is 0.5 inch.
*
* @since 2.1
*
* @param[in] distance The logical threshold to fire touch move event
- * @remarks A touch move events will start to fire if the move distance exceeds the set allowance value.
- * For example, Set 0.5 if the distance is 0.5 inch.
- * This method is offered to control sensitivity of move events.
- */
+ * @remarks This method is offered to control sensitivity of move events.
+ */
void SetTouchPressThreshold(float distance);
/**
*
* @param[in] enable Set to @c true to enable effect sound, @n
* else @c false
- * @remarks If the effect sound is disabled for a container, then all of its child controls also will have the effect sound disabled.
+ * @remarks If the effect sound is disabled for a container, then all of its child controls also will have the effect sound disabled.
*/
void SetEffectSoundEnabled (bool enable);
* @deprecated This method is deprecated.
* @since 2.0
*
- * @return The default touch event listener @n
- * If no listener has been set or a system error has occurred @c null is returned.
+ * @return The default touch event listener @n
+ * If no listener has been set or a system error has occurred @c null is returned.
* @see SetDefaultTouchEventListener()
*/
ITouchEventListener* GetDefaultTouchEventListener(void) const;
/**
- * Sets the default key event listener.
+ * Sets the default key event listener. @n
+ * The registered listener will be notified to handle the key events after all application event listeners has been notified.
*
* @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated. Instead of using this method, use the SetPropagatedKeyEventListener() method.
* @since 2.0
*
- * @return An error code
- * @param[in] pDefaultListener The default key event listener
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
- * @remarks The registered listener will be notified to handle the key events
- * after all application event listeners has been notified.
- * @see GetDefaultkeyEventListener()
+ * @return An error code
+ * @param[in] pDefaultListener The default key event listener
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
+ * @see GetDefaultkeyEventListener()
*/
result SetDefaultKeyEventListener(IKeyEventListener* pDefaultListener);
/**
- * Sets the default touch event listener.
+ * Sets the default touch event listener. @n
+ * The registered listener will be notified to handle the touch events after all application event listeners has been notified.
*
* @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated. Instead of using this method, use the SetPropagatedTouchEventListener() method.
* @since 2.0
*
- * @return An error code
- * @param[in] pDefaultListener The default key event listener
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
- * @remarks The registered listener will be notified to handle the touch events
- * after all application event listeners has been notified.
- * @see GetDefaultTouchEventListener()
+ * @return An error code
+ * @param[in] pDefaultListener The default key event listener
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
+ * @see GetDefaultTouchEventListener()
*/
result SetDefaultTouchEventListener(ITouchEventListener* pDefaultListener);
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n For full construction,
+ * the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
/**
* @file FUiControls.h
- * @brief This is the header file for the %Tizen::Ui::Controls namespace.
+ * @brief This is the header file for the %Controls namespace.
*
- * This header file contains the declarations and descriptions of the %Tizen::Ui::Controls namespace.
+ * This header file contains the declarations and descriptions of the Controls namespace.
*/
#ifndef _FUI_CONTROLS_H_
{
/**
* @namespace Tizen::Ui::Controls
- * @brief This namespace contains the classes and interfaces for creating rich user interface components for the applications.
+ * @brief This namespace contains classes and interfaces for creating rich user interface components for the applications.
* @since 2.0
*
* @remarks @b %Header @b %file: @b \#include @b <FUi.h> @n
* The system color for the text that appears in the indicator and the command area (for example, Header and Footer).
*
* @brief <i> [Deprecated] </i>
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
- * @since 2.0
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * @since 2.0
*
- * @remarks Different color values can be defined for different device models.
+ * @remarks Different color values can be defined for different device models.
* @endif
*/
_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_TITLE_TEXT;
* The system color for the text that appears in controls, has a different background color than that of its parent (for example, Button).
*
* @brief <i> [Deprecated] </i>
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
- * @since 2.0
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * @since 2.0
*
- * @remarks Different color values can be defined for different device models.
+ * @remarks Different color values can be defined for different device models.
* @endif
*/
_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_BODY_TEXT;
* The system default foreground color (for example, Label and CheckButton).
*
* @brief <i> [Deprecated] </i>
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
- * @since 2.0
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * @since 2.0
*
- * @remarks Different color values can be defined for different device models.
+ * @remarks Different color values can be defined for different device models.
* @endif
*/
_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_FOREGROUND;
* The system default background color (for example, Label, Panel, and ScrollPanel).
*
* @brief <i> [Deprecated] </i>
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
- * @since 2.0
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * @since 2.0
*
- * @remarks Different color values can be defined for different device models.
+ * @remarks Different color values can be defined for different device models.
* @endif
*/
_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_BACKGROUND;
* The system default color for the List background.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
- * @since 2.0
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * @since 2.0
*
- * @remarks Different color values can be defined for different device models.
+ * @remarks Different color values can be defined for different device models.
* @endif
*/
_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_LIST_BACKGROUND;
* The system default color for the Form background.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
- * @since 2.0
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * @since 2.0
*
- * @remarks Different color values can be defined for different device models.
+ * @remarks Different color values can be defined for different device models.
* @endif
*/
_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_FORM_BACKGROUND;
* The system default color for the background of the Form with grouped style child controls.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
- * @since 2.0
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * @since 2.0
*
- * @remarks Different color values can be defined for different device models.
+ * @remarks Different color values can be defined for different device models.
* @endif
*/
_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_FORM_GROUP_BACKGROUND;
* The system default color for the Popup background.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
- * @since 2.0
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * @since 2.0
*
- * @remarks Different color values can be defined for different device models.
+ * @remarks Different color values can be defined for different device models.
* @endif
*/
_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_POPUP_BACKGROUND;
* The system default color of the group item text.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
- * @since 2.0
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * @since 2.0
*
- * @remarks Different color values can be defined for different device models.
+ * @remarks Different color values can be defined for different device models.
* @endif
*/
_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_GROUP_ITEM_TEXT;
* The system default color of the list text.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
- * @since 2.0
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * @since 2.0
*
- * @remarks Different color values can be defined for different device models.
+ * @remarks Different color values can be defined for different device models.
* @endif
*/
_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_LIST_ITEM_TEXT;
/**
* @if OSPDEPREC
- * The system default color of the list item text, when an item is selected.
+ * The system default color of the list item text when an item is selected.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
- * @since 2.0
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * @since 2.0
*
- * @remarks Different color values can be defined for different device models.
+ * @remarks Different color values can be defined for different device models.
* @endif
*/
_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_LIST_ITEM_PRESSED_TEXT;
/**
* @if OSPDEPREC
- * The system default color of the list element text when the item is highlighted.
+ * The system default color of the list element text when an item is highlighted.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
- * @since 2.0
+ * @deprecated This object is provided only for backward compatibility and will be deleted in a future release.
+ * @since 2.0
*
- * @remarks Different color values can be defined for different device models.
+ * @remarks Different color values can be defined for different device models.
* @endif
*/
_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_LIST_ITEM_HIGHLIGHTED_TEXT;
/**
* @class Animation
- * @brief This class defines the common behavior of an %Animation control.
+ * @brief This class defines the common behavior of an %Animation control.
*
* @since 2.0
*
* @param[in] rect An instance of the Tizen::Graphics::Rectangle class @n
* This instance represents the x and y coordinates of the top-left corner of the created window along with
* its width and height.@n
+ * The size of the control must be within the range defined by the minimum size and the maximum size. @n
* The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
- * @param[in] aniFrames An IList of %AnimationFrames used in the animation
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * @param[in] aniFrames An Tizen::Base::Collection::IList of %AnimationFrames used in the animation
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks
- * - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
- * - The size of the control must be within the range defined by the minimum size and the maximum size.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @remarks A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
*/
result Construct(const Tizen::Graphics::Rectangle& rect, const Tizen::Base::Collection::IList& aniFrames);
* @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
* This instance represents the x and y coordinates of the top-left corner of the created window along with
* its width and height.@n
+ * The size of the control must be within the range defined by the minimum size and the maximum size. @n
* The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
- * @param[in] aniFrames An IList of %AnimationFrames used in the animation
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * @param[in] aniFrames An Tizen::Base::Collection::IList of %AnimationFrames used in the animation
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks
- * - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
- * - The size of the control must be within the range defined by the minimum size and the maximum size.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @remarks A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::Collection::IList& aniFrames);
/**
- * Sets the repeat count of the animation. @n
- * If this value is not set, the default value is @c 1.
+ * Sets the repeat count of the animation.
*
* @since 2.0
*
- * @param[in] count The repeat count
+ * @param[in] count The repeat count @n
+ * If this value is not set, the default value is @c 1.
*/
void SetRepeatCount(int count);
~AnimationFrame(void);
/**
- * Sets the bitmap to be displayed during animation play.
+ * Sets the bitmap to be displayed during animation play.
*
* @since 2.0
*
*
* @return An error code
* @param[in] rect An instance of the Tizen::Graphics::Rectangle class @n
- * This instance represents the x and y coordinates of the top-left corner
- * of the created window along with its width and height.@n
+ * This instance represents the x and y coordinates of the top-left corner of the created
+ * window along with its width and height.@n
* The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
- * @param[in] text The text to display on the button
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * @param[in] text The text to display on the button @n
* To display the text in multi-lines or to denote the end of line, use '\\n'.
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SYSTEM A system error has occurred.
*/
result Construct(const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& text = L"");
*
* @return An error code
* @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
- * This instance represents the x and y coordinates of the top-left corner
- * of the created window along with its width and height.@n
+ * This instance represents the x and y coordinates of the top-left corner of the created window
+ * along with its width and height.@n
* The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @param[in] text The text to display on the button @n
- * To display the text in multi-lines or to denote the end of line, use '\\n'.
- * @exception E_SUCCESS The method is successful.
+ * To display the text in multi-lines or to denote the end of line, use '\\n'.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SYSTEM A system error has occurred.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& text = L"");
* @since 2.0
*
* @param[in] text The text of the button @n
- * To display text in multi-lines or to denote the end of line, use '\\n'.
+ * To display text in multi-lines or to denote the end of line, use '\\n'.
*/
void SetText(const Tizen::Base::String& text);
*
* @since 2.0
*
- * @param[in] color The color to set
+ * @param[in] color The color to set
* @remarks When a user navigates the user interface using the directional keys, the focused UI control is highlighted.
*/
void SetHighlightedTextColor(const Tizen::Graphics::Color& color);
*
* @since 2.0
*
- * @return The highlighted text color
- * @remarks When a user navigates the user interface using the directional keys, the focused UI control is highlighted.
+ * @return The highlighted text color
+ * @remarks When a user navigates the user interface using the directional keys, the focused UI control is highlighted.
*/
Tizen::Graphics::Color GetHighlightedTextColor(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] size The text size
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The specified @c size must be greater than @c 0.
- * @exception E_SYSTEM A system error has occurred.
- * @see GetTextSize()
+ * @param[in] size The text size @n
+ * The size must be greater than @c 0.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_SYSTEM A system error has occurred.
+ * @see GetTextSize()
*/
result SetTextSize(int size);
* @since 2.1
*
* @return An error code
- * @param[in] size The text size
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The specified @c size must be greater than @c 0.
- * @exception E_SYSTEM A system error has occurred.
- * @see GetTextSize()
+ * @param[in] size The text size @n
+ * The size must be greater than @c 0.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_SYSTEM A system error has occurred.
+ * @see GetTextSize()
*/
result SetTextSize(float size);
*
* @return An error code
* @param[in] style The style of the button item
- * @param[in] actionId The action ID of the button item
+ * @param[in] actionId The action ID of the button item @n
+ * The value must be a positive integer.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The specified @c actionId of the specified item must be a positive integer.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
*/
result Construct(ButtonItemStyle style, int actionId);
*
* @since 2.0
* @return An error code
- * @param[in] actionId The action ID of the button item
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The specified @c actionId of the specified item must be a positive integer.
+ * @param[in] actionId The action ID of the button item @n
+ * The value must be a positive integer.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
*/
result SetActionId(int actionId);
* else @c null if no bitmap image is displayed
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @remarks If the size is greater than the default size, the bitmap image is scaled accordingly.
+ * @remarks If the size of the bitmap is greater than the default size, the bitmap image is scaled accordingly.
*/
result SetBackgroundBitmap(ButtonItemStatus status, const Tizen::Graphics::Bitmap* pBitmap);
* @return An error code
* @param[in] status The item status
* @param[in] pIcon The icon to set, @n
- * else @c null if no icon is displayed
+ * else @c null if no icon is displayed @n
+ * If an icon is not set for a state, the icon for @c BUTTON_ITEM_STATUS_NORMAL is used.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @remarks
- * - If the style of %ButtonItem is @c BUTTON_ITEM_STYLE_TEXT, the method returns @c E_INVALID_OPERATION.
- * - If an icon is not set for a state, the icon for @c BUTTON_ITEM_STATUS_NORMAL is used.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
+ * - The style of %ButtonItem is @c BUTTON_ITEM_STYLE_TEXT.
*/
result SetIcon(ButtonItemStatus status, const Tizen::Graphics::Bitmap* pIcon);
* @since 2.0
*
* @return An error code
- * @param[in] text The text to set
+ * @param[in] text The text to set @n
+ * Use @htmlonly '\n' @endhtmlonly to denote the end of the first line.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
- * The style of %ButtonItem is ::BUTTON_ITEM_STYLE_ICON.
- * @remarks
- * - If the text cannot be displayed in a line, then the text is automatically displayed in two lines and the ellipsis is applied if the text
- * is longer than two lines.
- * - Use @htmlonly '\n' @endhtmlonly to denote the end of the first line.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
+ * - The style of %ButtonItem is ::BUTTON_ITEM_STYLE_ICON.
+ * @remarks If the text cannot be displayed in a line, then the text is automatically displayed in two lines and
+ * the ellipsis is applied if the text is longer than two lines.
*/
result SetText(const Tizen::Base::String& text);
* @since 2.0
*
* @return An error code
- * @param[in] rect An instance of the Tizen::Graphics::Rectangle class @n
+ * @param[in] rect An instance of the Tizen::Graphics::Rectangle class @n
* This instance represents the x and y coordinates of the top-left corner of the created window
* along with the width and height of the window.@n
* The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @param[in] style The style of the %CheckButton control
* @param[in] backgroundStyle The background style set of the %CheckButton control
- * @param[in] showTitle Set to @c true to enable the title, @n
- * else @c false
+ * @param[in] showTitle Set to @c true to enable the title, @n
+ * else @c false
* @param[in] text The text of the %CheckButton control
* @param[in] groupStyle The group style of the %CheckButton control
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.@n
- * The specified size is less than the minimum size of the control.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
- * The background style of @c BACKGROUND_STYLE_NONE does not work with group styles except ::GROUP_STYLE_NONE.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * - The specified size is less than the minimum size of the control.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * - The background style of @c BACKGROUND_STYLE_NONE does not work with group styles except ::GROUP_STYLE_NONE.
* @exception E_SYSTEM A system error has occurred.
- * @remarks A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
+ * @remarks A control is fully usable only after it has been added to a container. Therefore some methods may fail if used earlier.
*/
result Construct(const Tizen::Graphics::Rectangle& rect, CheckButtonStyle style, BackgroundStyle backgroundStyle =
BACKGROUND_STYLE_DEFAULT, bool showTitle = false, const Tizen::Base::String& text = L"", GroupStyle groupStyle = GROUP_STYLE_NONE);
/**
* Initializes this instance of %CheckButton with the specified parameters.
*
- * @since 2.1
+ * @since 2.1
*
* @return An error code
- * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
+ * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
* This instance represents the x and y coordinates of the top-left corner of the created window
* along with the width and height of the window.@n
* The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @param[in] style The style of the %CheckButton control
* @param[in] backgroundStyle The background style set of the %CheckButton control
- * @param[in] showTitle Set to @c true to enable the title, @n
- * else @c false
+ * @param[in] showTitle Set to @c true to enable the title, @n
+ * else @c false
* @param[in] text The text of the %CheckButton control
* @param[in] groupStyle The group style of the %CheckButton control
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.@n
- * The specified size is less than the minimum size of the control.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
- * The background style of @c BACKGROUND_STYLE_NONE does not work with group styles except ::GROUP_STYLE_NONE.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * - The specified size is less than the minimum size of the control.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * - The background style of @c BACKGROUND_STYLE_NONE does not work with group styles except ::GROUP_STYLE_NONE.
* @exception E_SYSTEM A system error has occurred.
- * @remarks A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
+ * @remarks A control is fully usable only after it has been added to a container. Therefore some methods may fail if used earlier.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, CheckButtonStyle style, BackgroundStyle backgroundStyle =
BACKGROUND_STYLE_DEFAULT, bool showTitle = false, const Tizen::Base::String& text = L"", GroupStyle groupStyle = GROUP_STYLE_NONE);
* @since 2.0
*
* @param[in] select Set to @c true if the %CheckButton control is selected, @n
- * else @c false
+ * else @c false
*/
void SetSelected(bool select);
* @param[in] color The color to set
* @param[in] status The status
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.@n
- * The operation is not supported if the background style is ::BACKGROUND_STYLE_NONE.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * - The operation is not supported if the background style is ::BACKGROUND_STYLE_NONE.
* @exception E_SYSTEM A system error has occurred.
*/
result SetColor(CheckButtonStatus status, const Tizen::Graphics::Color& color);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] color The text color to set
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
/**
* Gets the text color of the %CheckButton control for the pressed status.
*
- * @since 2.0
- * @return The text color, @n
- * else RGBA (0, 0, 0, 0) if an error occurs
+ * @since 2.0
+ * @return The text color, @n
+ * else RGBA (0, 0, 0, 0) if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::Color GetPressedTextColor(void) const;
*
* @since 2.0
*
- * @return An error code
- * @param[in] color The pressed title text color
+ * @return An error code
+ * @param[in] color The pressed title text color
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*/
*
* @since 2.0
*
- * @return The title text color, @n
- * else RGBA (0, 0, 0, 0) if an error occurs
+ * @return The title text color, @n
+ * else RGBA (0, 0, 0, 0) if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::Color GetPressedTitleTextColor(void) const;
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] color The text color to set
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*
* @since 2.0
*
- * @return The text color, @n
- * else RGBA (0, 0, 0, 0) if an error occurs
+ * @return The text color, @n
+ * else RGBA (0, 0, 0, 0) if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::Color GetHighlightedTextColor(void) const;
*
* @since 2.0
*
- * @return An error code
- * @param[in] color The highlighted title text color
+ * @return An error code
+ * @param[in] color The highlighted title text color
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*/
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] color The text color to set
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*
* @since 2.0
*
- * @return The text color, @n
- * else RGBA (0, 0, 0, 0) if an error occurs
+ * @return The text color, @n
+ * else RGBA (0, 0, 0, 0) if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::Color GetDisabledTextColor(void) const;
*
* @since 2.0
*
- * @return An error code
- * @param[in] color The disabled title text color
+ * @return An error code
+ * @param[in] color The disabled title text color
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*/
*
* @since 2.0
*
- * @return The title text color, @n
- * else RGBA (0, 0, 0, 0) if an error occurs
+ * @return The title text color, @n
+ * else RGBA (0, 0, 0, 0) if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::Color GetDisabledTitleTextColor(void) const;
/**
* @class ColorPicker
-* @brief This class defines the common behavior of a %ColorPicker control.
+* @brief This class defines the common behavior of a %ColorPicker control.
*
* @since 2.0
*
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] point The position of this %ColorPicker in the container @n
* The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control is used earlier.
+ * @remarks A control is fully usable only after it has been added to a container. Therefore, some methods may fail if
+ * the control is used earlier.
*/
result Construct(const Tizen::Graphics::Point& point);
*
* @since 2.1
*
- * @return An error code
+ * @return An error code
* @param[in] point The position of this %ColorPicker in the container @n
* The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control is used earlier.
+ * @remarks A control is fully usable only after it has been added to a container. Therefore, some methods may fail if
+ * the control is used earlier.
*/
result Construct(const Tizen::Graphics::FloatPoint& point);
*
* @since 2.0
*
- * @return The current hue value between @c 0 to @c 100.
+ * @return The current hue value between @c 0 to @c 100
*/
int GetHue(void) const;
*
* @since 2.0
*
- * @return The current saturation value between @c 0 to @c 100.
+ * @return The current saturation value between @c 0 to @c 100
*/
int GetSaturation(void) const;
*
* @since 2.0
*
- * @return The current luminance value between @c 0 to @c 100.
+ * @return The current luminance value between @c 0 to @c 100
*/
int GetLuminance(void) const;
/**
* Sets the color value of %ColorPicker.
*
- * @since 2.0
+ * @since 2.0
*
* @param[in] color The color value
*/
/**
* Sets the hue value of %ColorPicker.
*
- * @since 2.0
+ * @since 2.0
*
- * @param[in] hue The hue value of this object between @c 0 to @c 100.
+ * @param[in] hue The hue value of this object between @c 0 to @c 100
*
*/
void SetHue(int hue);
/**
* Sets the saturation value of %ColorPicker.
*
- * @since 2.0
+ * @since 2.0
*
- * @param[in] saturation The saturation value between @c 0 to @c 100.
+ * @param[in] saturation The saturation value between @c 0 to @c 100
*
*/
void SetSaturation(int saturation);
/**
* Sets the luminance value of %ColorPicker.
*
- * @since 2.0
+ * @since 2.0
*
- * @param[in] luminance The luminance value between @c 0 to @c 100.
+ * @param[in] luminance The luminance value between @c 0 to @c 100
*
*/
void SetLuminance(int luminance);
*
* @since 2.0
*
- * @param[in] listener The event listener to add
+ * @param[in] listener The event listener to add
* @see RemoveColorChangeEventListener()
*/
void AddColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener);
*
* @since 2.0
*
- * @param[in] listener The event listener to remove
+ * @param[in] listener The event listener to remove
* @see AddColorChangeEventListener()
*/
void RemoveColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener);
* For full construction, the %Construct() method must be called right after calling this constructor.
*
* @since 2.0
- *
*/
ContextMenu(void);
* @return An error code
* @param[in] point The x and y coordinates of the anchor of %ContextMenu @n
* The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @param[in] style The context menu style
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_STATE This instance has already been constructed.
* @exception E_SYSTEM A system error has occurred.
* @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
+ * due to this ownership relationship. In this case, use the SetOwner() method to change the ownership to the top-most window.
*/
result Construct(const Tizen::Graphics::Point& point, ContextMenuStyle style);
* @param[in] point The x and y coordinates of the anchor of %ContextMenu
* @param[in] style The context menu style
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_STATE This instance has already been constructed.
* @exception E_SYSTEM A system error has occurred.
* @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
+ * due to this ownership relationship. In this case, use the SetOwner() method to change the ownership to the top-most window.
*/
result Construct(const Tizen::Graphics::FloatPoint& point, ContextMenuStyle style);
* @param[in] style The context menu style
* @param[in] direction The anchor arrow direction
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_STATE This instance has already been constructed.
* @exception E_SYSTEM A system error has occurred.
* @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
+ * due to this ownership relationship. In this case, use the SetOwner() method to change the ownership to the top-most window.
*/
result Construct(const Tizen::Graphics::Point& point, ContextMenuStyle style, ContextMenuAnchorDirection direction);
* @param[in] style The context menu style
* @param[in] direction The anchor arrow direction
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_STATE This instance has already been constructed.
* @exception E_SYSTEM A system error has occurred.
* @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
+ * due to this ownership relationship. In this case, use the SetOwner() method to change the ownership to the top-most window.
*/
result Construct(const Tizen::Graphics::FloatPoint& point, ContextMenuStyle style, ContextMenuAnchorDirection direction);
* @return The color of %ContextMenu control, @n
* else RGBA(0, 0, 0, 0) if an error occurs
* @param[in] status The menu item status @n
- * The item color for the @c CONTEXT_MENU_ITEM_STATUS_NORMAL status is always the same as the
- * color of the %ContextMenu control.
+ * The item color for the @c CONTEXT_MENU_ITEM_STATUS_NORMAL status is always the same as the
+ * color of the %ContextMenu control.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The item color for @c CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * - The item color for @c CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported.
* @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*
* @return An error code
* @param[in] status The menu item status @n
- * The item color for the @c CONTEXT_MENU_ITEM_STATUS_NORMAL status is always the same
- * as the color of the %ContextMenu control.
- * @param[in] color The color to set
+ * The item color for the @c CONTEXT_MENU_ITEM_STATUS_NORMAL status is always the same
+ * as the color of the %ContextMenu control.
+ * @param[in] color The color to set
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The item color for @c CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * - The item color for @c CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported.
* @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_SYSTEM A system error has occurred.
* @see GetItemColor()
*
* @return An error code
* @param[in] maxItemsCount The maximum number of the visible menu items @n
- * The value should be greater than @c 0 and less than @c 8, and the default value of the visible menu items is @c 4.
+ * The value should be greater than @c 0 and less than @c 8, and the default value of
+ * the visible menu items is @c 4.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified parameter is out of possible range.
* @exception E_INVALID_STATE This instance is in an invalid state.
/**
* @class CustomItem
- * @brief This class defines the common behavior for %CustomItem.
+ * @brief This class defines the common behavior for %CustomItem.
*
* @since 2.0
*
- * The %CustomItem class displays a list item, which is the unit of handling a ListView or GroupedListView. It provides customized formatting of specific list items.
+ * The %CustomItem class displays a list item, which is the unit for handling a ListView or GroupedListView. It provides
+ * customized formatting of specific list items.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
*
{
public:
/**
- * The object is not fully constructed after this constructor is
- * called. @n For full construction, the %Construct() method must be
- * called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the %Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
*
* @since 2.0
*
- * @return An error code
- * @param[in] itemSize The size of the item
- * @param[in] style The style of the annex
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
+ * @return An error code
+ * @param[in] itemSize The size of the item
+ * @param[in] style The style of the annex
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
*/
result Construct(const Tizen::Graphics::Dimension& itemSize, ListAnnexStyle style);
*
* @since 2.1
*
- * @return An error code
- * @param[in] itemSize The size of the item
- * @param[in] style The style of the annex
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
+ * @return An error code
+ * @param[in] itemSize The size of the item
+ * @param[in] style The style of the annex
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
*/
result Construct(const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style);
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks If the width of the specified @c text exceeds the width of the element and @c textSliding is set to @c true, the text slides
- * automatically when the user long-presses.
+ * @remarks If the width of the specified @c text exceeds the width of the element and @c textSliding is set to @c true,
+ * the text slides automatically when the user long-presses.
*/
result AddElement(const Tizen::Graphics::Rectangle& rect, int elementId, const Tizen::Base::String& text, bool textSliding = true);
* @param[in] elementId The element ID
* @param[in] text The text string to add
* @param[in] textSize The size of the text @n
- * The default size of text is @c 38 on a WVGA screen, @c 22 on a HVGA screen and @c 20 on a WQVGA screen.
+ * The default size of text is @c 38 on a WVGA screen, @c 22 on a HVGA screen and @c 20 on a WQVGA screen.
* @param[in] normalTextColor The color of the text in the normal status
* @param[in] pressedTextColor The color of the text in the pressed status
* @param[in] highlightedTextColor The color of the text in the highlighted status
* @param[in] elementId The element ID
* @param[in] text The text string to add
* @param[in] textSize The size of the text @n
- * The default size of text is @c 38 on a WVGA screen, @c 22 on a HVGA screen and @c 20 on a WQVGA screen.
+ * The default size of text is @c 38 on a WVGA screen, @c 22 on a HVGA screen and @c 20 on a WQVGA screen.
* @param[in] normalTextColor The color of the text in the normal status
* @param[in] pressedTextColor The color of the text in the pressed status
* @param[in] highlightedTextColor The color of the text in the highlighted status
result AddElement(const Tizen::Graphics::FloatRectangle& rect, int elementId, ICustomElementF& element);
/**
- * Removes the element from the %CustomItem control.
+ * Removes all the elements from the %CustomItem control.
*
* @since 2.0
*
*
* @since 2.0
*
- * @return An error code
- * @param[in] elementId The element ID
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_SYSTEM A system error has occurred.
+ * @return An error code
+ * @param[in] elementId The element ID
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_SYSTEM A system error has occurred.
*/
result RemoveElement(int elementId);
*
* @since 2.0
*
- * @param[in] elementId The element ID
- * @param[in] enable Set to @c true to make only the element selected when touched, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_SYSTEM A system error has occurred.
- * @remarks Based on the selection type of an element, the area within which the background color changes is different when an element is touched.
+ * @param[in] elementId The element ID
+ * @param[in] enable Set to @c true to make only the element selected when touched, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_SYSTEM A system error has occurred.
+ * @remarks Based on the selection type of an element, the area within which the background color changes is different when an element is touched.
*/
result SetElementSelectionEnabled(int elementId, bool enable);
*
* @since 2.0
*
- * @param[in] elementId The element ID
- * @param[in] alignment The horizontal alignment of text
+ * @param[in] elementId The element ID
+ * @param[in] alignment The horizontal alignment of text
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The specified element does not handle text.@n
- * The specified element does not contain text.
+ * @exception E_INVALID_OPERATION The specified element either does not handle text or does not contain text.
* @exception E_SYSTEM A system error has occurred.
*/
result SetElementTextHorizontalAlignment(int elementId, HorizontalAlignment alignment);
*
* @since 2.0
*
- * @param[in] elementId The element ID
- * @param[in] alignment The vertical alignment of text
+ * @param[in] elementId The element ID
+ * @param[in] alignment The vertical alignment of text
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The specified element does not handle text.@n
- * The specified element does not contain text.
+ * @exception E_INVALID_OPERATION The specified element either does not handle text or does not contain text.
* @exception E_SYSTEM A system error has occurred.
*/
result SetElementTextVerticalAlignment(int elementId, VerticalAlignment alignment);
* @since 2.0
*
* @return An error code
- * @param[in] elementId The element ID
- * @param[in] mask The auto-link mask @n
- * Multiple link types can be combined using bitwise OR operator. @n For more information,
- * see <a href="../org.tizen.native.appprogramming/html/guide/ui/auto_link_detection.htm">AutoLink Detection</a>. @n
- * If it is set to @c 0, the auto-link detection is disabled.
+ * @param[in] elementId The element ID
+ * @param[in] mask The auto-link mask @n
+ * Multiple link types of Tizen::Base::Utility::LinkType can be combined using bitwise OR operator. @n
+ * For more information, see <a href="../org.tizen.native.appprogramming/html/guide/ui/auto_link_detection.htm">AutoLink Detection</a>. @n
+ * If the value is set to @c 0, the auto-link detection is disabled.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_INVALID_OPERATION The specified element does not handle text.
* @exception E_SYSTEM A system error has occurred.
- * @see Tizen::Base::Utility::LinkType
*/
result SetElementAutoLinkMask(int elementId, unsigned long mask);
* list item is selected and deselected, it must implement ICustomItemEventListener and register the listener to receive events from
* the custom list by calling the custom list's AddCustomItemEventListener() method.
*
- * Note that CustomListItem and CustomListItemFormat need to be created on a heap. The items of a custom list are deleted automatically
- * when the %CustomList control is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat
+ * Note that %CustomListItem and %CustomListItemFormat need to be created on a heap. The items of a custom list are deleted automatically
+ * when the %CustomList control is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). %CustomListItemFormat
* must be deleted by the application.
*
- * Refer to CustomListItem and CustomListItemFormat.
+ * For more information, see CustomListItem and CustomListItemFormat.
*
- * Example:
+ * The following example demonstrates how to use the %CustomList control.
*
* @image html ui_controls_customlist.png
*
* @param[in] itemDivider Set to @c true to display the divider, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - The size of the control must be within the range as defined by the minimum and maximum size.
/**
* @if OSPDEPREC
- * Adds the custom item event listener instance. @n
+ * Adds a custom item event listener instance. @n
* The added listener gets notified when the state of CustomListItem is changed.
*
* @brief <i> [Deprecated] </i>
/**
* @if OSPDEPREC
- * Removes the custom item event listener instance. @n
- * The removed listener is not notified even when custom item events are fired.
+ * Removes a custom item event listener instance. @n
+ * The removed listener is not notified when custom item events are fired.
*
* @brief <i> [Deprecated] </i>
* @deprecated This class is deprecated. Instead of using this class, use ListView class.
*
* @return An error code
* @param[in] item The custom list item to add
- * @param[in] itemId The item ID for the item
+ * @param[in] itemId The ID for the item
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - The specified @c itemId can be used to identify a specific CustomListItem or
- * to associate user-allocated resources.
- * - Note that the custom list does not throw an exception if the same itemID is assigned to multiple items.
+ * to associate user-allocated resources.
+ * - Note that the custom list does not throw an exception if the same itemID is assigned to multiple items.
* - The added item is deleted automatically when the list is destroyed.
* - Do not add, insert, or set an item that already belongs to the %CustomList control.
* @endif
/**
* @if OSPDEPREC
- * Gets the color of the text to display when there is no item in the CustomList control.
+ * Gets the color of the text to display when there is no item in the %CustomList control.
*
* @brief <i> [Deprecated] </i>
* @deprecated This class is deprecated. Instead of using this class, use ListView class.
* @deprecated This class is deprecated. Instead of using this class, use ListView class.
* @since 2.0
*
- * @return The index of the item, @n
- * else @c -1 if no item has the specified item ID
+ * @return The index of the item, @n
+ * else @c -1 if no item has the specified item ID
* @param[in] itemId The item ID of the %CustomList control item
- * @remarks One or more indexes can have the same item ID, @n
- * and this method returns the first item from such items.
+ * @remarks One or more indexes can have the same item ID, and this method returns the first item from such items.
* @endif
*/
int GetItemIndexFromItemId(int itemId) const;
/**
* @if OSPDEPREC
- * Gets the item ID of the item at the specified index.
+ * Gets the ID of the item at the specified index.
*
* @brief <i> [Deprecated] </i>
* @deprecated This class is deprecated. Instead of using this class, use ListView class.
* @since 2.0
*
- * @return The item ID of the item, @n
+ * @return The ID of the item, @n
* else @c -1 if the specified @c index is less than @c 0 or greater than the item count
* @param[in] index The index of the %CustomList control item
* @endif
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The specified @c index is less than @c 0 or greater than the item count.
+ * The specified @c index is less than @c 0 or greater than the item count.
* @endif
*/
result ScrollToTop(int index);
* @class CustomListItem
* @brief <i> [Deprecated] </i> This class defines the common behavior of an item of the CustomList control.
*
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
+ * @deprecated This class is deprecated. Instead of using this class, use the CustomItem class.
* @since 2.0
*
- * The %CustomListItem class represents a custom list item which is the unit of
- * handling of a custom list. A custom list item is composed of one or more elements,
- * which can be texts and bitmaps. Custom drawable elements are also supported via
+ * The %CustomListItem class represents a custom list item which is the unit of handling of a custom list. A custom list item is
+ * composed of one or more elements, which can be texts and bitmaps. Custom drawable elements are also supported via
* ICustomListElement. The value of the elements is set using %CustomListItem.
*
* Note that %CustomListItem needs to be created on a heap. CustomListItems will be deleted automatically
- * when the CustomList is destroyed. If you want to remove certain list items, you must use RemoveItemAt().
+ * when CustomList is destroyed. If you want to remove certain list items, you must use RemoveItemAt().
*
- * Refer to CustomListItemFormat.
+ * For more information, see CustomListItemFormat.
*
* @endif
*/
* For full construction, the CustomListItem::Construct() method must be called right after calling this constructor.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
+ * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
*
* @since 2.0
* @endif
* This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
+ * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
* @since 2.0
* @endif
*/
* Initializes this instance of %CustomListItem with the specified parameter.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
- * @since 2.0
+ * @deprecated This class is deprecated. Instead of using this class, use the CustomItem class.
+ * @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] itemHeight The height of %CustomListItem
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* Sets the format of %CustomListItem.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
- * @since 2.0
+ * @deprecated This class is deprecated. Instead of using this class, use the CustomItem class.
+ * @since 2.0
*
- * @param[in] itemFormat An instance of %CustomListItemFormat
- * @remarks Do not delete @c itemFormat before the associated %CustomListItem is removed from %CustomList,
- * because %CustomListItemFormat is constantly used while %CustomListItem is added to CustomList.
+ * @param[in] itemFormat An instance of CustomListItemFormat
+ * @remarks Do not delete @c itemFormat before the associated %CustomListItem is removed from CustomList,
+ * because %CustomListItemFormat is constantly used while %CustomListItem is added to %CustomList.
* @endif
*/
void SetItemFormat(const CustomListItemFormat& itemFormat);
* Sets the background bitmap image which is displayed when the item is focused.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
- * @since 2.0
+ * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
+ * @since 2.0
*
- * @param[in] bitmap The background bitmap image
- * @remarks The specified bitmap is automatically scaled to the size of an associated item.
+ * @param[in] bitmap The background bitmap image
+ * @remarks The specified bitmap is automatically scaled to the size of an associated item.
* @see SetNormalItemBackgroundBitmap()
* @endif
*/
* Sets the background image of the item which is displayed when the item is in normal state.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
- * @since 2.0
+ * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
+ * @since 2.0
*
- * @param[in] bitmap The background bitmap image
- * @remarks The specified bitmap is automatically scaled to the size of an+B6 associated item.
+ * @param[in] bitmap The background bitmap image
+ * @remarks The specified bitmap is automatically scaled to the size of an+B6 associated item.
* @see SetFocusedItemBackgroudBitmap()
* @endif
*/
* Sets the highlighted background image on the rectangle of each list item.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
- * @since 2.0
+ * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
+ * @since 2.0
*
- * @param[in] bitmap The background image
- * @remarks When a user navigates the user interface using the directional keys, @n
- * the selected UI control is highlighted and takes the focus.
+ * @param[in] bitmap The background image
+ * @remarks When a user navigates the user interface using the directional keys,
+ * the selected UI control is highlighted and takes the focus.
* @endif
*/
* Sets the text of the element for %CustomListItem.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
- * @since 2.0
+ * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
+ * @since 2.0
*
* @return An error code
* @param[in] elementId The ID of the element
- * @param[in] text The text string to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
- * @remarks To display text in multi-lines or to denote the end of line use '\\n'.
+ * @param[in] text The text string to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
+ * @remarks To display text in multi-lines or to denote the end of line, use '\\n'.
* @endif
*/
result SetElement(int elementId, const Tizen::Base::String& text);
* Sets the bitmap of the element for %CustomListItem.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
- * @since 2.0
+ * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
+ * @since 2.0
*
* @return An error code
- * @param[in] elementId The ID of the element
- * @param[in] normalBitmap The bitmap displayed when the item is in the normal state
- * @param[in] pFocusedBitmap The bitmap displayed when the item is focused
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
+ * @param[in] elementId The ID of the element
+ * @param[in] normalBitmap The bitmap displayed when the item is in the normal state
+ * @param[in] pFocusedBitmap The bitmap displayed when the item is focused
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
* @endif
*/
result SetElement(int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap);
* Sets the bitmap of the element for %CustomListItem.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
- * @since 2.0
+ * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
+ * @since 2.0
*
- * @return An error code
- * @param[in] elementId The ID of the element
- * @param[in] normalBitmap The bitmap displayed when the item is in the normal state
- * @param[in] pFocusedBitmap The bitmap displayed when the item is selected
- * @param[in] pHighlightedBitmap The bitmap displayed when the item is highlighted
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
+ * @return An error code
+ * @param[in] elementId The ID of the element
+ * @param[in] normalBitmap The bitmap displayed when the item is in the normal state
+ * @param[in] pFocusedBitmap The bitmap displayed when the item is selected
+ * @param[in] pHighlightedBitmap The bitmap displayed when the item is highlighted
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
* @endif
*/
result SetElement(int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
* Sets the custom element for %CustomListItem.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
- * @since 2.0
+ * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
+ * @since 2.0
*
* @return An error code
- * @param[in] elementId The ID of the element
- * @param[in] element The custom element
+ * @param[in] elementId The ID of the element
+ * @param[in] element The custom element
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
- * @remarks Do not delete @c element before the associated %CustomListItem is removed from CustomList, @n
- * as ICustomListElement is constantly used while %CustomListItem is added to %CustomList. @n
- * Call RefreshItem() to draw the custom element that has been set with this method.
+ * @exception E_SYSTEM A system error has occurred.
+ * @remarks Do not delete @c element before the associated %CustomListItem is removed from CustomList,
+ * as ICustomListElement is constantly used while %CustomListItem is added to %CustomList. @n
+ * Call RefreshItem() to draw the custom element that has been set with this method.
* @endif
*/
result SetElement(int elementId, const ICustomListElement& element);
* Sets the element ID of the checkbox of %CustomListItem.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
+ * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
* @since 2.0
*
* @return An error code
- * @param[in] elementId The ID of the element
+ * @param[in] elementId The ID of the element
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SYSTEM A system error has occurred.
* @endif
*/
result SetCheckBox(int elementId);
* Gets the percentage value of %CustomListItem.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
- * @since 2.0
+ * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
+ * @since 2.0
*
* @return The percentage value, @n
- * else @c -1 if a system error occurs
+ * else @c -1 if a system error occurs
* @endif
*/
int GetValue(void) const;
* be manually deleted because items are removed from memory by the List when
* it is destroyed.
*
- * Refer to CustomListItem.
* @endif
*/
class _OSP_EXPORT_ CustomListItemFormat
* @since 2.0
*
* @return An error code
- * @param[in] elementId The ID of the element
- * @param[in] rect The bounds of the element
+ * @param[in] elementId The ID of the element
+ * @param[in] rect The bounds of the element
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @endif
/**
* @if OSPDEPREC
- * Adds the %CustomListElement with bounds equal to @c rect and size of the text @c textSize.
+ * Adds the %CustomListElement with bounds equal to @c rect and size of the text equal to @c textSize.
*
* @brief <i> [Deprecated] </i>
* @deprecated This class is deprecated. There is no need to use this class.
* @deprecated This class is deprecated. There is no need to use this class.
* @since 2.0
*
- * @return An error code
- * @param[in] elementId The ID of the element
- * @param[in] rect The bounds of the element
- * @param[in] textSize The size of the text
- * @param[in] normalTextColor The color of the text in the normal status
- * @param[in] focusedTextColor The color of the text in the focused status
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
+ * @return An error code
+ * @param[in] elementId The ID of the element
+ * @param[in] rect The bounds of the element
+ * @param[in] textSize The size of the text
+ * @param[in] normalTextColor The color of the text in the normal status
+ * @param[in] focusedTextColor The color of the text in the focused status
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
* @endif
*/
result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& focusedTextColor);
* @deprecated This class is deprecated. There is no need to use this class.
* @since 2.0
*
- * @return An error code
- * @param[in] elementId The ID of the element
- * @param[in] rect The bounds of the element
- * @param[in] textSize The size of the text
- * @param[in] normalTextColor The color of the text in the normal status
- * @param[in] focusedTextColor The color of the text in the focused status
- * @param[in] highlightedTextColor The color of the text in the highlighted status
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
+ * @return An error code
+ * @param[in] elementId The ID of the element
+ * @param[in] rect The bounds of the element
+ * @param[in] textSize The size of the text
+ * @param[in] normalTextColor The color of the text in the normal status
+ * @param[in] focusedTextColor The color of the text in the focused status
+ * @param[in] highlightedTextColor The color of the text in the highlighted status
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
* @endif
*/
result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& focusedTextColor, const Tizen::Graphics::Color& highlightedTextColor);
* @deprecated This class is deprecated. There is no need to use this class.
* @since 2.0
*
- * @return The ID of the next element of the specified element, @n
- * else @c -1 if there is no element next to the element specified by @c elementId
- * @param[in] elementId The ID of the element
+ * @return The ID of the next element of the specified element, @n
+ * else @c -1 if there is no element next to the element specified by @c elementId
+ * @param[in] elementId The ID of the element
* @endif
*/
int GetNextElementId(int elementId) const;
*
* @return The ID of the next enabled element, @n
* else @c -1 if no element after the specified element is enabled
- * @param[in] elementId The ID of the element
+ * @param[in] elementId The ID of the element
* @endif
*/
int GetNextEnabledElementId(int elementId) const;
*
* @return The ID of the previous enabled element, @n
* else @c -1 if no element before the specified element is enabled
- * @param[in] elementId The ID of the element
+ * @param[in] elementId The ID of the element
* @endif
*/
int GetPreviousEnabledElementId(int elementId) const;
* @deprecated This class is deprecated. There is no need to use this class.
* @since 2.0
*
- * @param[in] elementId The ID of the element
- * @param[in] enable Set to @c true to allow the specified element to handle the events, @n
- * else @c false
+ * @param[in] elementId The ID of the element
+ * @param[in] enable Set to @c true to allow the specified element to handle the events, @n
+ * else @c false
* @endif
*/
void SetElementEventEnabled(int elementId, bool enable);
*
* @brief <i> [Deprecated] </i>
* @deprecated This class is deprecated. There is no need to use this class.
- * @since 2.0
+ * @since 2.0
*
* @return @c true if the event status is enabled, @n
* else @c false
- * @param[in] elementId The ID of the element
+ * @param[in] elementId The ID of the element
* @endif
*/
bool IsElementEventEnabled(int elementId);
* Defines the styles of CustomList.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This enum is deprecated. Instead of using this enum, use the ListAnnexStyle enumeration for the CustomItem or SimpleItem class.
+ * @deprecated This enum is deprecated. Instead of using this enum, use the ListAnnexStyle enumeration for the CustomItem or SimpleItem class.
* @since 2.0
* @endif
*/
*
* @since 2.0
*
- * @return An error code
- * @param[in] year The year value
+ * @return An error code
+ * @param[in] year The year value
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified year value is invalid.
*/
*
* @since 2.0
*
- * @return An error code
- * @param[in] minYear The minimum year for the valid range
- * @param[in] maxYear The maximum year for the valid range
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The given year range is invalid.
- * @exception E_SYSTEM A system error has occurred.
+ * @return An error code
+ * @param[in] minYear The minimum year for the valid range
+ * @param[in] maxYear The maximum year for the valid range
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The given year range is invalid.
+ * @exception E_SYSTEM A system error has occurred.
*/
result SetYearRange(int minYear, int maxYear);
*
* @since 2.0
*
- * @return An error code
- * @param[out] minYear The minimum year for the valid range
- * @param[out] maxYear The maximum year for the valid range
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
+ * @return An error code
+ * @param[out] minYear The minimum year for the valid range
+ * @param[out] maxYear The maximum year for the valid range
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
*/
result GetYearRange(int& minYear, int& maxYear) const;
virtual ~DateTimePicker(void);
/**
- * Adds the IDateTimeChangeEventListener instance. @n
- * The added listener gets notified when date or time of the %DateTimePicker instance is changed either by user manipulation or by calling one of its
- * setters.
+ * Adds an IDateTimeChangeEventListener instance. @n
+ * The added listener gets notified when date or time of the %DateTimePicker instance is changed either by user manipulation
+ * or by calling one of its setters.
*
* @since 2.0
*
void AddDateTimeChangeEventListener(Tizen::Ui::IDateTimeChangeEventListener& listener);
/**
- * Removes the IDateTimeChangeEventListener instance. @n
- * The removed listener is not called even when the date and time change events are fired.
+ * Removes an IDateTimeChangeEventListener instance. @n
+ * The removed listener is not called when the date and time change events are fired.
*
* @since 2.0
*
result Construct(const Tizen::Base::String& title = L"");
/**
- * Sets the date and time value of the %DateTimePicker control.
+ * Sets the date and time value of the %DateTimePicker control.
*
* @since 2.0
*
*
* @return An error code
* @param[in] year The year value @n
- * It should be in the range set by SetYearRange(). The default year range is from @c 1 to @c 9999.
+ * It should be in the range set by SetYearRange(). The default year range is from @c 1 to @c 9999.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c year value is invalid.
* @exception E_SYSTEM A system error has occurred.
* @since 2.0
*
* @return An error code
- * @param[in] month The month value between @c 1 and @c 12.
+ * @param[in] month The month value between @c 1 and @c 12
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c month value is invalid.
* @exception E_SYSTEM A system error has occurred.
* @since 2.0
*
* @return An error code
- * @param[in] day The day value between @c 1 and @c 31.
+ * @param[in] day The day value between @c 1 and @c 31
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c day value is invalid.
* @exception E_SYSTEM A system error has occurred.
* @since 2.0
*
* @return An error code
- * @param[in] hour The hour value between @c 0 and @c 23.
+ * @param[in] hour The hour value between @c 0 and @c 23
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c hour value is invalid.
* @exception E_SYSTEM A system error has occurred.
* @since 2.0
*
* @return An error code
- * @param[in] minute The minute value between @c 0 and @c 59.
+ * @param[in] minute The minute value between @c 0 and @c 59
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c minute value is invalid.
* @exception E_SYSTEM A system error has occurred.
Tizen::Base::DateTime GetDateTime(void) const;
/**
- * Gets the current year value of %DateTimePicker. @n
+ * Gets the current year value of %DateTimePicker.
*
* @since 2.0
*
int GetYear(void) const;
/**
- * Gets the current month value of %DateTimePicker. @n
+ * Gets the current month value of %DateTimePicker.
*
* @since 2.0
*
int GetMonth(void) const;
/**
- * Gets the current day value of %DateTimePicker. @n
+ * Gets the current day value of %DateTimePicker.
*
* @since 2.0
*
int GetDay(void) const;
/**
- * Gets the current hour value of the %DateTimePicker control. @n
+ * Gets the current hour value of the %DateTimePicker control.
*
* @since 2.0
*
- * @return The current hour value between @c 0 to @c 23, @n
+ * @return The current hour value between @c 0 to @c 23 regardless of whether the time display mode is 12-hour or 24-hour, @n
* else @c -1 if an error occurs
- * @remarks Whether the time display mode is 12-hour or 24-hour, this method always returns the hour value ranging from @c 0 to @c 23.
*/
int GetHour(void) const;
bool Is24HourNotationEnabled(void) const;
/**
- * Sets the valid year range. @n
+ * Sets the valid year range.
*
* @since 2.0
*
* @return An error code
- * @param[in] minYear The minimum year for the valid range between @c 1 and @c 9999
- * @param[in] maxYear The maximum year for the valid range
+ * @param[in] minYear The minimum year for the valid range between @c 1 and @c 9999
+ * @param[in] maxYear The maximum year for the valid range
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified year range is invalid.
+ * @exception E_INVALID_ARG The specified year range is invalid.
* @exception E_SYSTEM A system error has occurred.
*/
result SetYearRange(int minYear, int maxYear);
* @since 2.0
*
* @return An error code
- * @param[out] minYear The minimum year for the valid range
- * @param[out] maxYear The maximum year for the valid range
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
+ * @param[out] minYear The minimum year for the valid range
+ * @param[out] maxYear The maximum year for the valid range
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
*/
result GetYearRange(int& minYear, int& maxYear) const;
EditArea(void);
/**
- * This polymorphic destructor should be overridden if required.@n
+ * This polymorphic destructor should be overridden if required. @n
* This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
* @param[in] limitLength The maximum limit of the length of the text that can be displayed by %EditArea
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.@n
- * The specified @c limitLength is less than or equal to @c 0. @n
- * The @c rect.width or the @c rect.height is less than 0.
+ * Either of the following conditions has occurred:
+ * - The specified @c limitLength is less than or equal to @c 0.
+ * - The @c rect.width or the @c rect.height is less than 0.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - Some methods of the control will only work as expected when it becomes 'displayable'.
* @param[in] limitLength The maximum limit of the length of the text that can be displayed by %EditArea
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.@n
- * The specified @c limitLength is less than or equal to @c 0. @n
- * The @c rect.width or the @c rect.height is less than 0.
+ * Either of the following conditions has occurred:
+ * - The specified @c limitLength is less than or equal to @c 0.
+ * - The @c rect.width or the @c rect.height is less than 0.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - Some methods of the control will only work as expected when it becomes 'displayable'.
* @param[in] multiplier The line spacing multiplier
* @param[in] extra The extra line spacing
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or @n
- * the specified line spacing value cannot be supported.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The specified line spacing value cannot be supported.
* @exception E_SYSTEM A system error has occurred.
* @see GetLineSpacing()
*/
* @param[in] multiplier The line spacing multiplier
* @param[in] extra The extra line spacing
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or @n
- * the specified line spacing value cannot be supported.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The specified line spacing value cannot be supported.
* @exception E_SYSTEM A system error has occurred.
* @see GetLineSpacingF()
*/
* Checks whether the text prediction is enabled.
*
* @since 2.0
- * @return @c true if the text prediction is enabled, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @see SetTextPredictionEnabled()
+ * @return @c true if the text prediction is enabled, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @see SetTextPredictionEnabled()
*/
bool IsTextPredictionEnabled(void) const;
* Enables or disables the text prediction.
*
* @since 2.0
- * @param[in] enable Set to @c true to enable the text prediction, @n
- * else @c false
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
- * @see IsTextPredictionEnabled()
+ * @param[in] enable Set to @c true to enable the text prediction, @n
+ * else @c false
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
+ * @see IsTextPredictionEnabled()
*/
result SetTextPredictionEnabled(bool enable);
* @since 2.0
*
* @return An error code
- * @param[in] size The text size
+ * @param[in] size The text size @n
+ * The value should be greater than or equal to minimum font size which is 4.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid. @n
* The specified @c size cannot be a negative integer.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The specified @c size should be greater than or equal to minimum font size which is 4.
* @see GetTextSize()
*/
result SetTextSize(int size);
* @since 2.1
*
* @return An error code
- * @param[in] size The text size
+ * @param[in] size The text size @n
+ * The value should be greater than or equal to minimum font size which is 4.0f.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid. @n
* The specified @c size cannot be a negative integer.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The specified @c size should be greater than or equal to minimum font size which is 4.0f.
* @see GetTextSizeF()
*/
result SetTextSize(float size);
* @param[in] enable The category value to set
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input mode category is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @n
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* The specified @c categories cannot be supported with the current keypad style.
* @exception E_SYSTEM A system error has occurred.
* @see EditInputModeCategory
*
* @since 2.0
*
- * @param[in] guideText The guide text
- * @remarks This is the default text that is displayed in the %EditArea control when the focus is given to it.
+ * @param[in] guideText The guide text that is displayed in the %EditArea control when the focus is given to it.
*/
void SetGuideText(const Tizen::Base::String& guideText);
result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode);
/**
- * Gets the current input language.
+ * Gets the current input language of the keypad that is associated with the current %EditArea.
*
* @since 2.0
*
* @return An error code
* @param[out] language The current input language
* @exception E_SUCCESS The method is successful.
- * @remarks The application can get the current language of the keypad that is associated with the current %EditArea.
*/
result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const;
/**
- * Sets the text filter.
+ * Sets the text filter. @n
+ * The %EditArea control checks with the registered filter to decide whether the user-entered text should be replaced or not.
*
* @since 2.1
*
* @param[in] pFilter The filter to set
- * @remarks The %EditArea control checks with the registered filter to decide whether the user-entered text should be replaced or not.
*/
void SetEditTextFilter(IEditTextFilter* pFilter);
*
* @since 2.0
*
-* The %EditDate class displays a small, fixed-size selector that allows the user to select a date. Unlike the DatePicker, %EditDate can be placed in a container.
+* The %EditDate class displays a small, fixed-size selector that allows the user to select a date. Unlike the DatePicker,
+* %EditDate can be placed in a container.
*
* For more information on the class features,
* see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_edittime_editdate.htm">EditDate and EditTime</a>.
public:
/**
* The object is not fully constructed after this constructor is called. @n
- * For full construction, the %Construct() method must be called right after calling this constructor.
+ * For full construction, the %Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
/**
* This polymorphic destructor should be overridden if required.@n
- * This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
/**
* Adds a data change event listener instance. @n
- * Added listener is called when the date of the DatePicker is changed either through user manipulation or by calling one of its setters.
+ * The added listener is called when the date of the DatePicker is changed either through user manipulation or
+ * by calling one of its setters.
*
* @since 2.0
*
- * @param[in] listener The listener to add
+ * @param[in] listener The listener to add
* @see IDateChangeEventListener::OnDateChanged()
* @see IDateChangeEventListener::OnDateChangeCanceled()
* @see RemoveDateChangeEventListener()
*
* @since 2.0
*
- * @return An error code
- * @param[in] point The position of the %EditDate in the container @n
+ * @return An error code
+ * @param[in] point The position of %EditDate in the container @n
* The optimal size of the control is defined in
* <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @param[in] title The title
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks A control is fully usable only after it has been added to a container, therefore, some methods may fail if used earlier.
+ * @remarks A control is fully usable only after it has been added to a container. Therefore, some methods may fail if used earlier.
*/
result Construct(const Tizen::Graphics::Point& point, const Tizen::Base::String& title = L"");
*
* @since 2.1
*
- * @return An error code
- * @param[in] point The position of the %EditDate in the container @n
+ * @return An error code
+ * @param[in] point The position of %EditDate in the container @n
* The optimal size of the control is defined in
* <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @param[in] title The title
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks A control is fully usable only after it has been added to a container, therefore, some methods may fail if used earlier.
+ * @remarks A control is fully usable only after it has been added to a container. Therefore, some methods may fail if used earlier.
*/
result Construct(const Tizen::Graphics::FloatPoint& point, const Tizen::Base::String& title = L"");
* @since 2.0
*
* @return The current day value @n
- * The default day value is the current system day.
+ * The default day value is the current system day.
*/
int GetDay(void) const;
* @since 2.0
*
* @return The current month value as an integer @n
- * The default month value is the current system month.
+ * The default month value is the current system month.
*/
int GetMonth(void) const;
* @since 2.0
*
* @return The current year value @n
- * The default year value is the current system year.
+ * The default year value is the current system year.
*/
int GetYear(void) const;
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] year The year to set
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The given year value is invalid.
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] month The month to set
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The given month value is invalid.
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] day The day to set
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The given day value is invalid.
result SetDay(int day);
/**
- * Enables the %DatePicker control.
+ * Enables the DatePicker control.
*
- * @since 2.0
+ * @since 2.0
*
- * @param[in] enable Set to @c true to enable the DatePicker control, @n
+ * @param[in] enable Set to @c true to enable the %DatePicker control, @n
* else @c false
*/
void SetDatePickerEnabled(bool enable);
*
* @since 2.0
*
- * @return @c true if the DatePicker control is enabled, @n
+ * @return @c true if the %DatePicker control is enabled, @n
* else @c false
*/
bool IsDatePickerEnabled(void) const;
*
* @since 2.0
*
- * @return An error code
- * @param[in] minYear The minimum year for the valid range
- * @param[in] maxYear The maximum year for the valid range
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The given year range is invalid.
- * @exception E_SYSTEM A system error has occurred.
+ * @return An error code
+ * @param[in] minYear The minimum year for the valid range
+ * @param[in] maxYear The maximum year for the valid range
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The given year range is invalid.
+ * @exception E_SYSTEM A system error has occurred.
*/
result SetYearRange(int minYear, int maxYear);
*
* @since 2.0
*
- * @return An error code
- * @param[out] minYear The minimum year for the valid range
- * @param[out] maxYear The maximum year for the valid range
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
+ * @return An error code
+ * @param[out] minYear The minimum year for the valid range
+ * @param[out] maxYear The maximum year for the valid range
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
*/
result GetYearRange(int& minYear, int& maxYear) const;
/**
* This polymorphic destructor should be overridden if required.@n
- * This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
*
* @return An error code
* @param[in] rect An instance of the Graphics::Rectangle class @n
- * This instance represents the x and y coordinates of the top-left corner of the created window along with
- * the width and height of the control. @n
- * The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * This instance represents the x and y coordinates of the top-left corner of the created window along with
+ * the width and height of the control. @n
+ * If the size is less than the minimum size, %EditField is constructed with the minimum size. @n
+ * The optimal size of the control is defined in
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @param[in] style The style of the %EditField control
* @param[in] inputStyle The input style of the %EditField control
* @param[in] showTitle Set to @c true to display the title, @n
* @param[in] limitLength The limit for the length of the text in the %EditField control
* @param[in] groupStyle The table view style of the %EditField control
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c limitLength is less than or equal to @c 0, or @n
- * either the @c rect.width or the @c rect.height is less than @c 0.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c limitLength is less than or equal to @c 0.
+ * - Either the @c rect.width or the @c rect.height is less than @c 0.
* @exception E_UNSUPPORTED_OPTION The specified option is not supported. @n
* The title is not supported by small style %EditField.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control has been used
* earlier. The %EditField style of SMALL property cannot be used together with group styles.
- * - If the specified size is less than the minimum size, %EditField is constructed with the minimum size.
- * - Following are the input styles used for creating the different orientations of a keypad: @n
- * @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value. @n
- * @c INPUT_STYLE_OVERLAY: The orientation is the same as that of a parent form.
+ * - Following are the input styles used for creating the different orientations of a keypad:
+ * - @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value.
+ * - @c INPUT_STYLE_OVERLAY: The orientation is the same as that of a parent form.
*/
result Construct(const Tizen::Graphics::Rectangle& rect, EditFieldStyle style = EDIT_FIELD_STYLE_NORMAL, InputStyle inputStyle = INPUT_STYLE_FULLSCREEN, bool showTitle = false, int limitLength = 100, GroupStyle groupStyle = GROUP_STYLE_NONE);
*
* @return An error code
* @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
- * This instance represents the x and y coordinates of the top-left corner of the created window along with
- * the width and height of the control. @n
- * The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * This instance represents the x and y coordinates of the top-left corner of the created window along with
+ * the width and height of the control. @n
+ * If the size is less than the minimum size, %EditField is constructed with the minimum size. @n
+ * The optimal size of the control is defined in
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @param[in] style The style of the %EditField control
* @param[in] inputStyle The input style of the %EditField control
* @param[in] showTitle Set to @c true to display the title, @n
* @param[in] limitLength The limit for the length of the text in the %EditField control
* @param[in] groupStyle The table view style of the %EditField control
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c limitLength is less than or equal to @c 0, or @n
- * either the @c rect.width or the @c rect.height is less than @c 0.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c limitLength is less than or equal to @c 0.
+ * - Either the @c rect.width or the @c rect.height is less than @c 0.
* @exception E_UNSUPPORTED_OPTION The specified option is not supported. @n
* The title is not supported by small style %EditField.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control has been used
* earlier. The %EditField style of SMALL property cannot be used together with group styles.
- * - If the specified size is less than the minimum size, %EditField is constructed with the minimum size.
- * - Following are the input styles used for creating the different orientations of a keypad: @n
- * @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value. @n
- * @c INPUT_STYLE_OVERLAY: The orientation is the same as that of a parent form.
+ * - Following are the input styles used for creating the different orientations of a keypad:
+ * - @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value.
+ * - @c INPUT_STYLE_OVERLAY: The orientation is the same as that of a parent form.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, EditFieldStyle style = EDIT_FIELD_STYLE_NORMAL, InputStyle inputStyle = INPUT_STYLE_FULLSCREEN, bool showTitle = false, int limitLength = 100, GroupStyle groupStyle = GROUP_STYLE_NONE);
*
* @return An error code
* @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
- * This instance represents the x and y coordinates of the top-left corner of the created window along with
- * the width and height of the control. @n
- * The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * This instance represents the x and y coordinates of the top-left corner of the created window along with
+ * the width and height of the control. @n
+ * If the size is less than the minimum size, EditFied() is constructed with the minimum size. @n
+ * The optimal size of the control is defined in
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @param[in] style The style of the %EditField control
* @param[in] inputStyle The input style of the %EditField control
* @param[in] titleStyle The title style
* @param[in] groupStyle The table view style of the %EditField control
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The specified @c limitLength is less than or equal to @c 0. @n
- * The specified @c rect.width or the @c rect.height is less than @c 0.
+ * Either of the following conditions has occurred:
+ * - The specified @c limitLength is less than or equal to @c 0.
+ * - The specified @c rect.width or the @c rect.height is less than @c 0.
* @exception E_UNSUPPORTED_OPTION The specified option is not supported. @n
* Title is not supported in small style %EditField.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control is used earlier.
* The %EditField style of SMALL property cannot be used together with group styles.
- * - If the specified size is less than the minimum size, EditFied() is constructed with the minimum size.
- * - Following are the input styles used for creating different orientations of a keypad: @n
- * @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value.@n
- * @c INPUT_STYLE_OVERLAY: The orientation is similar to the parent form.
+ * - Following are the input styles used for creating different orientations of a keypad:
+ * - @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value.
+ * - @c INPUT_STYLE_OVERLAY: The orientation is similar to the parent form.
*/
result Construct(const Tizen::Graphics::Rectangle& rect, EditFieldStyle style, InputStyle inputStyle, EditFieldTitleStyle titleStyle, bool enableClear = false, int limitLength = 100, GroupStyle groupStyle = GROUP_STYLE_NONE);
*
* @return An error code
* @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
- * This instance represents the x and y coordinates of the top-left corner of the created window along with
- * the width and height of the control. @n
- * The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * This instance represents the x and y coordinates of the top-left corner of the created window along with
+ * the width and height of the control. @n
+ * If the size is less than the minimum size, EditFied() is constructed with the minimum size. @n
+ * The optimal size of the control is defined in
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @param[in] style The style of the %EditField control
* @param[in] inputStyle The input style of the %EditField control
* @param[in] titleStyle The title style
* @param[in] groupStyle The table view style of the %EditField control
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The specified @c limitLength is less than or equal to @c 0. @n
- * The specified @c rect.width or the @c rect.height is less than @c 0.
+ * Either of the following conditions has occurred:
+ * - The specified @c limitLength is less than or equal to @c 0.
+ * - The specified @c rect.width or the @c rect.height is less than @c 0.
* @exception E_UNSUPPORTED_OPTION The specified option is not supported. @n
* Title is not supported in small style %EditField.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control is used earlier.
* The %EditField style of SMALL property cannot be used together with group styles.
- * - If the specified size is less than the minimum size, EditFied() is constructed with the minimum size.
- * - Following are the input styles used for creating different orientations of a keypad: @n
- * @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value.@n
- * @c INPUT_STYLE_OVERLAY: The orientation is similar to the parent form.
+ * - Following are the input styles used for creating different orientations of a keypad:
+ * - @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value.
+ * - @c INPUT_STYLE_OVERLAY: The orientation is similar to the parent form.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, EditFieldStyle style, InputStyle inputStyle, EditFieldTitleStyle titleStyle, bool enableClear = false, int limitLength = 100, GroupStyle groupStyle = GROUP_STYLE_NONE);
* For more information, see <a href="../org.tizen.native.appprogramming/html/guide/ui/auto_link_detection.htm">AutoLink Detection</a>. @n
* When it is set to @c 0, the auto-link detection is disabled.
* @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation @n
+ * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* The input style is not ::INPUT_STYLE_OVERLAY.
* @exception E_SYSTEM A system error has occurred.
* @see Tizen::Base::Utility::LinkType
*
* @return The auto-link mask
* @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation @n
+ * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* The input style is not ::INPUT_STYLE_OVERLAY.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @since 2.0
*
* @return An error code
- * @param[in] size The text size
+ * @param[in] size The text size @n
+ * The size should be greater than or equal to minimum font size which is 4.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid. @n
* The @c size cannot be a negative integer.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The specified @c size should be greater than or equal to minimum font size which is 4.
* @see GetTextSize()
*/
result SetTextSize(int size);
* @since 2.1
*
* @return An error code
- * @param[in] size The text size
+ * @param[in] size The text size @n
+ * The size should be greater than or equal to minimum font size which is 4.0f.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid. @n
* The @c size cannot be a negative integer.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The specified @c size should be greater than or equal to minimum font size which is 4.0f.
* @see GetTextSizeF()
*/
result SetTextSize(float size);
* @param[in] start The starting index of the range
* @param[in] end The last index of the range
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or @n
- * the index is greater than the number of elements or less than @c 0.
+ * @exception E_OUT_OF_RANGE Either of the following conditions has occurred:
+ * - The specified index is outside the bounds of the data structure.
+ * - The index is greater than the number of elements or less than @c 0.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetText()
void RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener);
/**
- * Adds the ITextEventListener instance. @n
+ * Adds an ITextEventListener instance. @n
* The added listener listens to events on the context of the specified event dispatcher when they are fired.
*
* @since 2.0
void AddTextEventListener(Tizen::Ui::ITextEventListener& listener);
/**
- * Removes the ITextEventListener instance. @n
+ * Removes an ITextEventListener instance. @n
* The removed listener cannot listen to events when they are fired.
*
* @since 2.0
* @param[in] enable The category value to set
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input mode category is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @n
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* The specified @c categories cannot be supported with the current keypad style.
* @exception E_SYSTEM A system error has occurred.
* @endif
*
* @since 2.0
*
- * @param[in] guideText The guide text
- * @remarks This is the default text that is displayed in the %EditField
- * control when the focus is given to it and no text is entered.
+ * @param[in] guideText The guide text that is displayed in the %EditField control when the focus is given to it and no text is entered.
*/
void SetGuideText(const Tizen::Base::String& guideText);
* @since 2.0
*
* @return An error code
- * @param[out] language The current input language
+ * @param[out] language The current input language of the keypad that is associated with the current %EditField
* @exception E_SUCCESS The method is successful.
- * @remarks The application can get the current language of the keypad that is associated with the current %EditField.
*/
result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const;
/**
* @file FUiCtrlEditTypes.h
- * @brief This is the header file for the Ui::Controls edit control enumerations.
+ * @brief This is the header file for the %Edit enumerations.
*
- * This header file contains the declarations of the Ui::Controls edit control enumerations.
+ * This header file contains the declarations of the Edit enumerations.
*/
#ifndef _FUI_CTRL_EDIT_ENUM_H_
#define _FUI_CTRL_EDIT_ENUM_H_
* Defines the input modes.
*
* @brief <i> [Deprecated] </i>
- * @deprecated We no longer provide a method to specify the list of styles which the user can set the keypad to, or the current mode to initially set the keypad to, @n
- * from this list. It is recommended to use the styles offered in EditFieldStyle or KeypadStyle enumerations instead.
+ * @deprecated We no longer provide a method to specify the list of styles which the user can set the keypad to, or the current
+ * mode to initially set the keypad to, from this list. It is recommended to use the styles offered in EditFieldStyle or
+ * KeypadStyle enumerations instead.
+ *
* @since 2.0
* @endif
*/
/**
* @enum EditTextColor
*
- * Defines the possible Edit's text colors.
+ * Defines the possible Edit text colors.
*
* @since 2.0
*/
/**
* @enum EditStatus
*
- * Defines the possible Edit's states.
+ * Defines the possible Edit states.
*
* @since 2.0
*/
*
* @since 2.0
*
- * The %ExpandableEditArea class displays a multi-line text editor the height of that is automatically adjusted according to the number of lines currently visible in the text box.
+ * The %ExpandableEditArea class displays a multi-line text editor, the height of which is automatically adjusted according to the number of lines
+ * currently visible in the text box.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_exp_editarea.htm">ExpandableEditArea</a>.
*
*
* @since 2.0
*
- * @return An error code
- * @param[in] text The text to append @n
- * It will be displayed by the @c textImage.
- * @param[in] textImage The alternate bitmap to display
- * @exception E_SUCCESS The method is successful.
- * @exception E_MAX_EXCEEDED The length of the specified @c text exceeds the maximum length of the text that can be displayed by % ExpanableEditArea.
- * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
- * The operation is not supported if the style is ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
+ * @return An error code
+ * @param[in] text The text to append @n
+ * It will be displayed by the @c textImage.
+ * @param[in] textImage The alternate bitmap to display
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_MAX_EXCEEDED The length of the specified @c text exceeds the maximum length of the text that can be displayed by % ExpanableEditArea.
+ * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
+ * The operation is not supported if the style is ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
* @remarks The method modifies the text buffer that is managed by the %ExpanableEditArea control. To display the changes, the control must be drawn again.
*/
result AppendText(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage);
* Either the specified @c position is greater than the number of existing text in the % ExpanableEditArea or less than @c 0.
* @exception E_MAX_EXCEEDED The length of the specified @c text exceeds the maximum length of the text that can be displayed by % ExpanableEditArea.
* @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
- * The operation is not supported if the style is ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
+ * The operation is not supported if the style is ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
* @remarks The method modifies the text buffer that is managed by the %ExpanableEditArea control. To display the changes, the control must be drawn again.
*/
result InsertTextAt(int position, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage);
* @since 2.0
*
* @param[in] text The text to set @n
- * To denote the end of a line use '\\n'.
+ * To denote the end of a line use '\\n'.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid, @n
- * or the length of the specified @c text exceeds system limitations.
+ * @exception E_INVALID_ARG Either of teh following conditions has occurred:
+ * - The specified input parameter is invalid.
+ * - The length of the specified @c text exceeds system limitations.
* @exception E_SYSTEM A system error has occurred.
* @remarks The method modifies the text buffer that is managed by the %ExpandableEditArea control. To display the changes, the control must be drawn again.
*/
* @since 2.0
* @return An error code
* @param[in] multiplier The line spacing multiplier
- * @param[in] extra The extra line spacing
+ * @param[in] extra The extra line spacing
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG This exception is returned when @c multiplier or @c extra is less than 0.
* @see GetLineSpacing ()
* @param[in] multiplier The line spacing multiplier
* @param[in] extra The extra line spacing
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG This exception is returned when @c multiplier or @c extra is less than 0.
+ * @exception E_INVALID_ARG This exception is returned when the specified @c multiplier or @c extra is less than 0.
* @see GetLineSpacing ()
*/
result SetLineSpacing(int multiplier, float extra);
* @return An error code
* @param[in] size The text size
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c size is invalid, @n
- * or the specified @c size is a negative integer.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c size is invalid.
+ * - The specified @c size is a negative integer.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specified @c size should be greater than or equal to minimum font size which is 4.
* @see GetTextSize()
* @since 2.1
*
* @return An error code
- * @param[in] size The text size
+ * @param[in] size The text size @n
+ * The size should be greater than or equal to minimum font size which is 4.0f.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c size is invalid, @n
- * or the specified @c size is a negative integer.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c size is invalid.
+ * - The specified @c size is a negative integer.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The specified @c size should be greater than or equal to minimum font size which is 4.0f.
* @see GetTextSizeF()
*/
result SetTextSize(float size);
* @since 2.0
*
* @return An error code
- * @param[out] start The start index of the text block
- * @param[out] end The end index of the text block
+ * @param[out] start The start index of the text block @n
+ * The value is @c 0 if no text block is selected.
+ * @param[out] end The end index of the text block @n
+ * The value is @c 0 if no text block is selected.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The method returns the start and end indexes as @c 0 if no text block is selected.
* @see ReleaseBlock()
* @see SetBlockRange()
*/
*
* @return An error code
* @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND The specified instance is not found, @n
- * or the text block is not selected.
+ * @exception E_OBJ_NOT_FOUND Either of the following conditions has occurred:
+ * - The specified instance is not found.
+ * - The text block is not selected.
* @exception E_SYSTEM A system error has occurred.
*/
result RemoveTextBlock(void);
*
* @since 2.0
* @return @c true if the text prediction is enabled, @n
- * else @c false
+ * else @c false
* @see SetTextPredictionEnabled()
*/
bool IsTextPredictionEnabled(void) const;
* Enables or disables the text prediction.
*
* @since 2.0
- * @param[in] enable Set to @c true to enable the text prediction, @n
- * else @c false
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
- * @see IsTextPredictionEnabled()
+ * @param[in] enable Set to @c true to enable the text prediction, @n
+ * else @c false
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
+ * @see IsTextPredictionEnabled()
*/
result SetTextPredictionEnabled(bool enable);
* @param[in] enable Set to @c true to enable the virtual keypad, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SYSTEM A system error has occurred.
* @see IsKeypadEnabled()
*/
result SetKeypadEnabled(bool enable);
* @since 2.0
*
* @return The filter, @n
- * else @c null if an error occurs
+ * else @c null if an error occurs
* @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
+ * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @return An error code
* @param[in] token The token to append
* @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
- * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
+ * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
+ * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
* @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The length of the specified @c token is @c 0.
+ * The length of the specified @c token is @c 0.
* @exception E_SYSTEM A system error has occurred.
*/
result AppendToken(const Tizen::Base::String& token);
*
* @return The token text at the specified index, @n
* else an empty string if an error occurs
- * @param[in] index The position to get the token
+ * @param[in] index The position to get the token
* @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
*
* @return The limit length, @n
* else @c -1 if an error occurs @n
- * The default limit length is @c 2048.
+ * The default limit length is @c 2048.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @return An error code
* @param[in] limitLength The limit text length to set
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid, @n
- * or the specified limit length is @c 0 or negative.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified input parameter is invalid.
+ * - The specified limit length is @c 0 or negative.
* @exception E_SYSTEM A system error has occurred.
* @remarks The method modifies the text buffer that is managed by the %ExpandableEditArea control. To display the changes, the control must be drawn again.
* @see GetLimitLength()
* else RGBA (0,0,0,0) if an error occurs
* @param[in] type The text type
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified type is not supported, or @n
- * the specified @c type is @c EDIT_TEXT_COLOR_LINK.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified type is not supported.
+ * - The specified @c type is @c EDIT_TEXT_COLOR_LINK.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetTextColor()
* generated if the candidate word list pop-up appears during the predictive texting. @n
* The operation is not supported by the token style %ExpandableEditArea.
* @see IsAutoResizingEnabled()
- * @see Tizen::Ui::Controls::IExpandableEditAreaEventListener
+ * @see Controls::IExpandableEditAreaEventListener
* @endif
*/
result SetAutoResizingEnabled(bool enable);
* @deprecated We no longer provide a method to set the language of the current keypad. @n
* This method is provided only for backward compatibility and will be deleted in the near future.
* @return An error code
- * @param[in] languageCode The language to set
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @param[in] languageCode The language to set
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The application can set the language of the current keypad that is associated with the current %ExpandableEditArea.
*/
result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode);
* @since 2.0
*
* @return An error code
- * @param[out] language The current input language
- * @exception E_SUCCESS The method is successful.
+ * @param[out] language The current input language
+ * @exception E_SUCCESS The method is successful.
* @remarks The application can get the current language of the keypad that is associated with the current %ExpandableEditArea.
*/
result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const;
* @since 2.0
*
* @param[in] listener The event listener to remove
- * @see AddActionEventListener()
+ * @see AddExpandableEditAreaEventListener()
*/
void RemoveExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener);
* it must implement IExpandableItemEventListener and register it to the expandable list,
* It will then receive related events from %ExpandableList.
*
- * Unlike GroupedList which is also a list with the hierarch of depth 2, main items of
+ * Unlike GroupedList which is also a list with the hierarchy of depth 2, main items of
* %ExpandableList can be expanded or closed.
*
- * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
- * when the %ExpandableList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat
+ * Note that %CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
+ * when the %ExpandableList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). %CustomListItemFormat
* must be deleted by the application.
*
- * Refer to CustomListItem and CustomListItemFormat.
+ * The following example demonstrates how to use the %ExpandableList class.
*
* Example:
*
/**
* @if OSPDEPREC
- * Adds the ExpandableItemEventListener instance. @n
+ * Adds an ExpandableItemEventListener instance. @n
* The added listener gets notified when the state of an item is changed.
*
* @brief <i> [Deprecated] </i>
/**
* @if OSPDEPREC
- * Removes the ExpandableItemEventListener instance. @n
+ * Removes an ExpandableItemEventListener instance. @n
* The removed listener is not notified even when the expandable item events are fired.
*
* @brief <i> [Deprecated] </i>
* The %Footer class displays a multi-purpose area at the bottom of the screen. It is used to switch between different application
* "views", or to host buttons for performing user-defined actions.
*
- *For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_footer.htm">Footer</a>.
+ * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_footer.htm">Footer</a>.
*
- *The following examples demonstrate how to use the %Footer class.
+ * The following examples demonstrate how to use the %Footer class.
* - Constructing a footer
* When creating a %Form, specify the FORM_STYLE_FOOTER parameter in the Form::Construct() method.
*
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
- * However, the content of the specified item is copied to the %Footer control.
+ * However, the content of the specified item is copied to the %Footer control.
* - Depending on the style of the %Footer control, several types of items can be added or inserted.
*/
result AddItem(const FooterItem& item);
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
- * However, the content of the specified item is copied to the %Footer control.
+ * However, the content of the specified item is copied to the %Footer control.
* - Depending on the style of the %Footer control, several types of items can be added or inserted.
*/
result InsertItemAt(int itemIndex, const FooterItem& item);
*
* @return An error code
* @param[in] position The position at which to set the specified button item. @n
- * If there is an existing button item at the specified position, it is replaced with the new item.
- * However, the contents of the specified item are copied to the %Footer control.
+ * If there is an existing button item at the specified position, it is replaced with the new item.
+ * However, the contents of the specified item are copied to the %Footer control.
* @param[in] button The button item to set
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
* The specified item is not constructed.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.@n
* There are more than 2 footer items.
- * @exception E_UNSUPPORTED_OPERATION The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE.
+ * @exception E_UNSUPPORTED_OPERATION The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB
+ * or ::FOOTER_STYLE_TAB_LARGE.
* @exception E_SYSTEM A system error has occurred.
*/
result SetButton(ButtonPosition position, const ButtonItem& button);
* @return An error code
* @param[in] position The button item position
* @param[in] number The number value that should be displayed as the badge icon @n
- * If it is set to @c 0, the numbered badge icon is removed from an item.
+ * If it is set to @c 0, the numbered badge icon is removed from an item.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c number must be in the range defined by @c 0 and @c 99999.
* @exception E_UNSUPPORTED_OPERATION This operation is not supported. @n
* @exception E_UNSUPPORTED_OPERATION This operation is not supported. @n
* This device does not support the software back button.
* @exception E_SYSTEM A system error has occurred.
- * @remarks
- * - When the back button is pressed, IFormBackEventListener::OnFormBackRequested() is called.
- * @see Tizen::Ui::Controls::IFormBackEventListener
+ * @remarks When the back button is pressed, IFormBackEventListener::OnFormBackRequested() is called.
+ * @see Controls::IFormBackEventListener
*/
result SetBackButton(void);
* @return An error code
* @param[in] itemIndex The item index
* @param[in] number The number value that must be displayed as the badge icon @n
- * If it is set to @c 0, the numbered badge icon is removed from an item.
+ * If it is set to @c 0, the numbered badge icon is removed from an item.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c number must be in the range defined by @c 0 and @c 99999.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
* @param[in] enable Set to @c true to enable the edit mode, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION The operation is supported when the style of the %Footer control style is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE.
+ * @exception E_UNSUPPORTED_OPERATION The operation is supported when the style of the %Footer control style is ::FOOTER_STYLE_TAB
+ * or ::FOOTER_STYLE_TAB_LARGE.
*/
result SetTabEditModeEnabled(bool enable);
* @param[in] position The position of the button item
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
- * There is no button set at the specified position.
+ * There is no button set at the specified position.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::FloatRectangle GetButtonBoundsF(ButtonPosition position) const;
* @return An error code
* @param[in] status The status of the footer item
* @param[in] pBitmap The background bitmap to set, @n
- * else @c null if no bitmap is displayed @n
- * If the size of the bitmap is greater than the size of the item, the bitmap is scaled down.
+ * else @c null if no bitmap is displayed @n
+ * If the size of the bitmap is greater than the size of the item, the bitmap is scaled down.
* @exception E_SUCCESS The method is successful.
*/
result SetBackgroundBitmap(FooterItemStatus status, const Tizen::Graphics::Bitmap* pBitmap);
*
* @return An error code
* @param[in] status The status of the footer item @n
- * If it is set to @c FOOTER_ITEM_STATUS_NORMAL, the bitmap will be applied for all other statues unless different bitmaps are explicitly
- * set for those by using this method. @n
- * If it is set to @c FOOTER_ITEM_STATUS_SELECTED, the bitmap for the status is also ignored.
+ * If it is set to @c FOOTER_ITEM_STATUS_NORMAL, the bitmap will be applied for all
+ * other statues unless different bitmaps are explicitly set for those by using this method. @n
+ * If it is set to @c FOOTER_ITEM_STATUS_SELECTED, the bitmap for the status is also ignored.
* @param[in] pIcon The icon to set, @n
* else @c null if no bitmap is displayed @n
- * If the size of the bitmap is greater than the default icon size, the bitmap is scaled down.
+ * If the size of the bitmap is greater than the default icon size, the bitmap is scaled down.
* @exception E_SUCCESS The method is successful.
*/
result SetIcon(FooterItemStatus status, const Tizen::Graphics::Bitmap* pIcon);
*
* @return An error code
* @param[in] text The text to set @n
- * Use @htmlonly '\n' @endhtmlonly to denote the end of the first line. @n
- * If it is too long to display in a line, it is automatically displayed in two lines and the ellipsis is applied if it is longer than two lines.
- * @exception E_SUCCESS The method is successful.
+ * Use @htmlonly '\n' @endhtmlonly to denote the end of the first line. @n
+ * If it is too long to display in a line, it is automatically displayed in two lines and
+ * the ellipsis is applied if it is longer than two lines.
+ * @exception E_SUCCESS The method is successful.
*/
result SetText(const Tizen::Base::String& text);
*
* @return An error code
* @param[in] formStyle The form style @n
- * Multiple form styles can be combined using bitwise OR.
+ * Multiple form styles of FormStyle can be combined using bitwise OR.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @if OSPDEPREC - ::FORM_STYLE_HEADER and ::FORM_STYLE_TITLE are specified at the same time.
* @exception E_MAX_EXCEEDED The total number of Frames and Forms exceeds the system limitation.
* @exception E_SYSTEM A system error has occurred.
* @remarks The maximum number of Forms that an application can construct is limited by available memory.
- * @see FormStyle
*/
result Construct(unsigned long formStyle);
* @return An error code
* @param[in] layout The layout for both the portrait and landscape mode
* @param[in] formStyle The form style @n
- * Multiple form styles can be combined using bitwise OR.
+ * Multiple form styles of FormStyle can be combined using bitwise OR.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the specified layout is already bound to another container.
* @remarks
* - The maximum number of Forms that an application can construct is limited by available memory.
* - The children are arranged within the client area bounds of the form area by @c layout.
- * @see FormStyle
*/
result Construct(const Tizen::Ui::Layout& layout, unsigned long formStyle);
* @param[in] portraitLayout The layout for the portrait mode
* @param[in] landscapeLayout The layout for the landscape mode
* @param[in] formStyle The form style @n
- * Multiple form styles can be combined using bitwise OR.
+ * Multiple form styles of FormStyle can be combined using bitwise OR.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the specified layout is already bound to another container.
* @remarks
* - The maximum number of Forms that an application can construct is limited by available memory.
* - The children are arranged within the bounds of the form area by @c layout.
- * @see FormStyle
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, unsigned long formStyle);
*
* @since 2.0
*
- * @return The bounds of the client area
- * @remarks The client area of the %Form control does not include the title, indicator, header and footer areas.
- * header and footer areas.
- *
+ * @return The bounds of the client area @n
+ * The client area of the %Form control does not include the title, indicator, header and footer areas.
*/
Tizen::Graphics::Rectangle GetClientAreaBounds(void) const;
*
* @since 2.1
*
- * @return The bounds of the client area
- * @remarks The client area of the %Form control does not include the title, indicator, header and footer areas.
- * header and footer areas.
+ * @return The bounds of the client area @n
+ * The client area of the %Form control does not include the title, indicator, header and footer areas.
*
*/
Tizen::Graphics::FloatRectangle GetClientAreaBoundsF(void) const;
/**
* @if OSPDEPREC
- * Gets the pointer of the Tab control if it exists.
+ * Gets a pointer to the Tab control if it exists.
*
* @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated because the use of the Tab control is no longer recommended.
*
* @feature %http://tizen.org/feature/screen.auto_rotation for the @c ORIENTATION_AUTOMATIC_FOUR_DIRECTION or
* @c ORIENTATION_AUTOMATIC value of @c orientation
- * @param[in] orientation The orientation of the %Form control
- * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 @n
+ * @param[in] orientation The orientation of the %Form control
+ * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 @n
* For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
* - Before calling this method, check whether the feature is supported by
- * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
+ * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
*/
void SetOrientation(Orientation orientation);
* @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
* @since 2.0
*
- * @param[in] softkey The softkey
- * @param[in] enable Set to @c true to enable this softkey @n
+ * @param[in] softkey The softkey
+ * @param[in] enable Set to @c true to enable this softkey @n
* else @c false
* @endif
*/
void SetSoftkeyText(Softkey softkey, const Tizen::Base::String& text);
/**
- * Gets the pointer to the Footer control if it exists.
+ * Gets a pointer to the Footer control if it exists.
*
* @since 2.0
*
* @return A pointer to the Footer control, @n
* else @c null if there is no %Footer
- * @remarks The retrieved pointer may be temporary. Therefore, it should not be stored after immediate use. @n
- * The optimal size of the control is defined in
+ * @remarks
+ * - The retrieved pointer may be temporary. Therefore, it should not be stored after immediate use.
+ * - The optimal size of the control is defined in
* <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
*/
Footer* GetFooter(void) const;
/**
- * Gets the pointer to the Header control if it exists.
+ * Gets a pointer to the Header control if it exists.
*
* @since 2.0
*
* @return A pointer to the Header control, @n
* else @c null if there is no %Header
- * @remarks The retrieved pointer may be temporary. Therefore, it should not be
- * stored after immediate use. @n
- * The optimal size of the control is defined in
+ * @remarks
+ * - The retrieved pointer may be temporary. Therefore, it should not be
+ * stored after immediate use.
+ * - The optimal size of the control is defined in
* <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
*/
Header* GetHeader(void) const;
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
* - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations
- * of the overlay region. @n
- * In such cases, it returns the @c E_INVALID_ARG exception. To prevent this problem,
- * the application should use the OverlayRegion::EvaluateBounds() method to get the validated bounds that
- * can be used as the input bounds of this method.
+ * of the overlay region. @n
+ * In such cases, it returns the @c E_INVALID_ARG exception. To prevent this problem,
+ * the application should use the OverlayRegion::EvaluateBounds() method to get the validated bounds that
+ * can be used as the input bounds of this method.
* - Do not use OverlayRegion with OverlayPanel. If used, the @c E_SYSTEM exception is thrown.
*/
OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::Rectangle& rect, OverlayRegionType regionType);
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
* - If the application runs on multi-screen resolutions, the specified bounds may
- * not meet the hardware limitations of the overlay region. @n
- * In such cases, it returns the @c E_INVALID_ARG exception. @n
- * To prevent this problem, the application should use the OverlayRegion::EvaluateBoundsF() method to
- * get the validated bounds that can be used as the input bounds of this method.
+ * not meet the hardware limitations of the overlay region. @n
+ * In such cases, it returns the @c E_INVALID_ARG exception. @n
+ * To prevent this problem, the application should use the OverlayRegion::EvaluateBoundsF() method to
+ * get the validated bounds that can be used as the input bounds of this method.
* - Do not use OverlayRegion with OverlayPanel. If used, the @c E_SYSTEM exception is thrown.
*/
OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::FloatRectangle& rect, OverlayRegionType regionType);
* - The method allocates Tizen::Graphics::Canvas whose bounds are equal to that of the client area of the %Form.
* - It is the responsibility of the developers to deallocate the canvas after use.
* - The canvas is valid only if the properties of the parent control of the canvas remain unchanged. @n
- * Therefore, delete the previously allocated canvas and create a new canvas using this method
- * if the size or position of the control is changed.
+ * Therefore, delete the previously allocated canvas and create a new canvas using this method
+ * if the size or position of the control is changed.
* - The specific error code can be accessed using the GetLastResult() method.
* - The Frame and %Form instances share a single frame-buffer. @n
- * Therefore, the custom drawing on the graphic canvas of the Frame and %Form controls appears on the
- * screen regardless of whether the control is currently visible on the screen.
+ * Therefore, the custom drawing on the graphic canvas of the Frame and %Form controls appears on the
+ * screen regardless of whether the control is currently visible on the screen.
*/
Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;
* @since 2.0
*
* @param[in] pFormBackEventListener The %Form back event listener to set
- * @see Tizen::Ui::Controls::IFormBackEventListener.
*/
void SetFormBackEventListener(IFormBackEventListener* pFormBackEventListener);
* @since 2.2
*
* @param[in] pFormMenuEventListener The %Form menu event listener to set
- * @see Tizen::Ui::Controls::IFormMenuEventListener.
*/
void SetFormMenuEventListener(IFormMenuEventListener* pFormMenuEventListener);
* @since 2.1
*
* @return An error code
- * @param[in] enable Set to @c true to enable the notification tray to remain open, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation. @n
- * If the style of %Form is not ::FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE,
- * the method returns @c E_INVALID_OPERATION.
+ * @param[in] enable Set to @c true to enable the notification tray to remain open, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation. @n
+ * If the style of %Form is not ::FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE
* @remarks If this method is not explicitly called, the notification tray is opened.
* @see IsNotificationTrayOpenEnabled()
*/
*
* @return @c true if the notification tray is open, @n
* else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation. @n
- * If the style of %Form is not ::FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE,
- * the method returns @c E_INVALID_OPERATION.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation. @n
+ * If the style of %Form is not ::FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetNotificationTrayOpenEnabled()
*/
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_frame.htm">Frame</a>.
*
- * The following example demonstrates how to use the %Frame class
+ * The following example demonstrates how to use the %Frame class.
*
* @code
// Gets a pointer of the frame
*
* @return An error code
* @param[in] rect An instance of the Tizen::Graphics::Rectangle class @n
- * This instance represents the x and y coordinates of the top-left corner @n
- * of the created window along with its width and height. @n
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * This instance represents the x and y coordinates of the top-left corner of the created window along
+ * with its width and height.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation (that
* is, the method is called on an instance that is constructed).
- * @exception E_MAX_EXCEEDED The number of Frames and Forms exceeds the system limitation.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_MAX_EXCEEDED The number of Frames and Forms exceeds the system limitation.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks
* - The maximum number of Forms that an application can construct is limited by available memory.
* - The specified position and size are only applied when the show mode is not ::FRAME_SHOW_MODE_FULL_SCREEN.
*
* @since 2.1
*
- * @return An error code
- * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
- * This instance represents the x and y coordinates of the top-left corner @n
- * of the created window along with its width and height. @n
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @return An error code
+ * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
+ * This instance represents the x and y coordinates of the top-left corner of the created window along with
+ * its width and height.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation (that
* is, the method is called on an instance that is constructed).
- * @exception E_MAX_EXCEEDED The number of Frames and Forms exceeds the system limitation.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_MAX_EXCEEDED The number of Frames and Forms exceeds the system limitation.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks
* - The maximum number of Forms that an application can construct is limited by available memory.
* - The specified position and size are only applied when the show mode is not ::FRAME_SHOW_MODE_FULL_SCREEN.
*
* @since 2.0
*
- * @param[in] listener The listener to add
- * @remarks When OnOrientationChanged() event is fired, re-position and draw the child controls, but do not explicitly call
+ * @param[in] listener The listener to add
+ * @remarks When the OnOrientationChanged() event is fired, re-position and draw the child controls, but do not explicitly call
* the Show() method.
* @see RemoveOrientationEventListener()
*/
// Accessor
public:
/**
- * Gets the current %Form control of the %Frame control.
+ * Gets the current Form control of the %Frame control.
*
* @since 2.0
*
* @remarks
* - If a form is set as the current form, it becomes the topmost form amongst its siblings.
* - This method does not call Invalidate() internally, so if the current form needs to be drawn
- * immediately, Invalidate() should be called after SetCurrentForm().
- * - Only Frame whose show mode is ::FRAME_SHOW_MODE_FULL_SCREEN
- * can set a Form which has the style of ::FORM_STYLE_PORTRAIT_INDICATOR as the current form.
+ * immediately, Invalidate() should be called after SetCurrentForm().
+ * - Only %Frame whose show mode is ::FRAME_SHOW_MODE_FULL_SCREEN
+ * can set a Form which has the style of ::FORM_STYLE_PORTRAIT_INDICATOR as the current form.
*/
result SetCurrentForm(const Form& form);
* @remarks
* - If a form is set as the current form, it becomes the topmost form amongst its siblings.
* - This method does not call Invalidate() internally, so if the current form needs to be drawn
- * immediately, Invalidate() should be called after SetCurrentForm().
- * - Only Frame whose show mode is ::FRAME_SHOW_MODE_FULL_SCREEN can set a Form which has
- * the style of ::FORM_STYLE_PORTRAIT_INDICATOR as the current form.
+ * immediately, Invalidate() should be called after SetCurrentForm().
+ * - Only %Frame whose show mode is ::FRAME_SHOW_MODE_FULL_SCREEN can set a %Form which has
+ * the style ::FORM_STYLE_PORTRAIT_INDICATOR as the current form.
*/
result SetCurrentForm(Form* pForm);
void SetBackgroundColor(const Tizen::Graphics::Color& color);
/**
- * Sets the orientation mode of a frame.
+ * Sets the orientation mode of the %Frame control.
*
* @since 2.0
*
* @feature %http://tizen.org/feature/screen.auto_rotation for the @c ORIENTATION_AUTOMATIC_FOUR_DIRECTION or
* @c ORIENTATION_AUTOMATIC value of @c orientation
- * @param[in] orientation The orientation mode of the %Frame control
- * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 @n
+ * @param[in] orientation The orientation mode of the %Frame control
+ * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 @n
* For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
void SetOrientation(Tizen::Ui::Orientation orientation);
/**
- * Gets the orientation mode of the frame.
+ * Gets the orientation mode of the %Frame control.
*
* @since 2.0
*
- * @return The orientation mode of the frame
+ * @return The orientation mode of the %Frame control
*/
Tizen::Ui::Orientation GetOrientation(void) const;
/**
- * Gets the current orientation status of the frame.
+ * Gets the current orientation status of the %Frame control.
*
* @since 2.0
*
- * @return The orientation status
+ * @return The orientation status of the %Frame control
* @remarks The method returns @c ORIENTATION_STATUS_NONE if the %Frame control is not drawn.
* Once it is drawn, the orientation of the %Frame control is set to portrait and the method
* returns @c ORIENTATION_STATUS_PORTRAIT if the application has not specified its orientation.
Tizen::Ui::OrientationStatus GetOrientationStatus(void) const;
/**
- * Gets the FrameAnimator of %Frame.
+ * Gets the FrameAnimator of the %Frame control.
*
* @since 2.0
*
- * @return %FrameAnimator, @n
+ * @return The %FrameAnimator of the %Frame control, @n
* else @c null if this instance is not constructed as yet
*/
Tizen::Ui::Animations::FrameAnimator* GetFrameAnimator(void) const;
*
* @since 2.0
*
- * @return An error code
- * @param[in] mode The mode to show the %Frame control
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
- * @remarks The default mode is ::FRAME_SHOW_MODE_FULL_SCREEN.
+ * @return An error code
+ * @param[in] mode The mode to show the %Frame control @n
+ * The default mode is ::FRAME_SHOW_MODE_FULL_SCREEN.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
*/
result SetShowMode(FrameShowMode mode);
*
* @since 2.0
*
- * @return The mode to show the %Frame control
- * @remarks The default mode is ::FRAME_SHOW_MODE_FULL_SCREEN.
+ * @return The mode to show the %Frame control @n
+ * The default mode is ::FRAME_SHOW_MODE_FULL_SCREEN.
*/
FrameShowMode GetShowMode(void) const;
/**
* @file FUiCtrlFrameTypes.h
- * @brief This is the header file for the Frame type.
+ * @brief This is the header file for the %Frame type.
*
* This header file contains the declarations of the Frame type.
*
* @since 2.0
*
* @return An error code
- * @param[in] rect An instance of the Graphics::Rectangle class @n
- * This instance represents the x and y coordinates of the top-left corner of the created %Gallery control along with the
- * width and height. @n
- * The optimal size of the control is defined in
+ * @param[in] rect An instance of the Graphics::Rectangle class @n
+ * This instance represents the x and y coordinates of the top-left corner of the
+ * created %Gallery control along with the width and height. @n
+ * The optimal size of the control is defined in
* <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SYSTEM A system error has occurred.
*/
result Construct(const Tizen::Graphics::Rectangle& rect);
*
* @return An error code
* @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
- * This instance represents the x and y coordinates of the top-left corner of the created %Gallery control along with the
- * width and height.@n
- * The optimal size of the control is defined in
+ * This instance represents the x and y coordinates of the top-left corner of the
+ * created %Gallery control along with the width and height.@n
+ * The optimal size of the control is defined in
* <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SYSTEM A system error has occurred.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect);
* @since 2.0
*
* @return An error code
- * @param[in] provider The item provider to create and delete items
+ * @param[in] provider The item provider to create and delete items
* @exception E_SUCCESS The method is successful.
* @remarks If an item provider is not set for the %Gallery control, the method does not work. @n
* The item provider should be allocated on a heap memory.
*
* @return An error code
* @param[in] itemIndex The index of the item to refresh
- * @param[in] type The type of change for an item
+ * @param[in] type The type of change for an item
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified @c index is out of range.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OUT_OF_RANGE The specified @c index is out of range.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* @exception E_SYSTEM A system error has occurred.
*/
result RefreshGallery(int itemIndex, GalleryRefreshType type);
*
* @since 2.0
*
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_SYSTEM A system error has occurred.
- * @remarks This method clears items in the list and reinvokes methods of the item provider to fill the list.
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_SYSTEM A system error has occurred.
+ * @remarks This method clears items in the list and reinvokes methods of the item provider to fill the list.
*/
result UpdateGallery(void);
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - When @c pBitmap is @c null, the %Gallery control does not have a background bitmap. @n
- * The default value for the background bitmap is @c null.
+ * The default value for the background bitmap is @c null.
* - The background bitmap has a priority over the background color. When both the background bitmap and
- * the background color are specified, only the bitmap is displayed.
+ * the background color are specified, only the bitmap is displayed.
*/
result SetBitmapOfEmptyGallery(const Tizen::Graphics::Bitmap* pBitmap);
*
* @since 2.0
*
- * @param[in] duration The animation duration
+ * @param[in] duration The animation duration
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c duration is out of the possible duration range. @n
* The specified duration should be greater than or equal to 300 or less than or equals to @c 20000.
* @since 2.0
*
* @param[in] duration The item view duration
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c duration is out of possible duration range. @n
* - The specified @c duration should be greater than @c 10.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks
* - The unit of the duration is in milliseconds.
* - The default animation duration is different for each slide show animation type.
* @since 2.0
*
* @return An error code
- * @param[in] repeat The repeat status
+ * @param[in] repeat The repeat status
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_SYSTEM A system error has occurred.
*/
result StartSlideShow(bool repeat = false);
* @since 2.0
*
* @return An error code
- * @param[in] color The background color
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
+ * @param[in] color The background color
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks The method ignores the alpha value of the @c color parameter and sets the alpha value to @c 255.
*/
result SetBackgroundColor(const Tizen::Graphics::Color& color);
/**
* @class GalleryItem
- * @brief This class defines the common behavior for a %GalleryItem control.
+ * @brief This class defines the common behavior for a %GalleryItem control.
*
* @since 2.0
*
* The %GalleryItem class represents an item of the Gallery control. An instance of the %GalleryItem class
- * comprises of a bitmap image and its image rotation. @n @n
+ * comprises of a bitmap image and its image rotation. @n
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_gallery.htm">Gallery</a>.
*/
* @compatibility This method has compatibility issues with OSP compatible applications. @n
* For more information, see @ref CompIoPathPage "here".
* @endif
- * @return An error code
- * @param[in] bitmap The default bitmap image
- * @param[in] filePath The bitmap file path
- * @param[in] rotation The rotation of the bitmap image
- * @exception E_SUCCESS The method is successful.
- * @exception E_OVERFLOW The image specified by @c filePath has caused an overflow.
- * @exception E_UNSUPPORTED_FORMAT The image specified by @c filePath is not supported.
- * @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed.
- * @exception E_INTERRUPTED The requested operation cannot be performed due to an interruption from another thread. @n
- * @exception E_ILLEGAL_ACCESS The image specified by @c filePath parameter, is protected with DRM.
- * @exception E_SYSTEM A system error has occurred.
- * @remarks The specified file path is used to decode the original bitmap to show a more higher quality image when the corresponding item is zoomed.
+ * @return An error code
+ * @param[in] bitmap The default bitmap image
+ * @param[in] filePath The bitmap file path
+ * @param[in] rotation The rotation of the bitmap image
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OVERFLOW The image specified by @c filePath has caused an overflow.
+ * @exception E_UNSUPPORTED_FORMAT The image specified by @c filePath is not supported.
+ * @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed.
+ * @exception E_INTERRUPTED The requested operation cannot be performed due to an interruption from another thread.
+ * @exception E_ILLEGAL_ACCESS The image specified by @c filePath parameter is protected with DRM.
+ * @exception E_SYSTEM A system error has occurred.
+ * @remarks The specified @c filePath is used to decode the original bitmap to show a more higher quality image when the corresponding item is zoomed.
*/
result Construct(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Base::String& filePath, GalleryImageRotation rotation = GALLERY_IMAGE_ROTATION_0);
/**
* @file FUiCtrlGalleryTypes.h
- * @brief This is the header file for the Gallery enumerations.
+ * @brief This is the header file for the %Gallery enumerations.
*
* This header file contains the declarations of the Gallery enumerations.
*
*/
enum GalleryImageRotation
{
- GALLERY_IMAGE_ROTATION_0 = 0, /**< The no rotation */
+ GALLERY_IMAGE_ROTATION_0 = 0, /**< No rotation */
GALLERY_IMAGE_ROTATION_90, /**< The 90 degree clockwise rotation */
GALLERY_IMAGE_ROTATION_180, /**< The clockwise rotation */
GALLERY_IMAGE_ROTATION_270 /**< The anticlockwise rotation */
namespace Tizen { namespace Ui { namespace Controls
{
/**
-* @class GroupContainer
-* @brief This class defines common behavior for a %GroupContainer container.
+* @class GroupContainer
+* @brief This class defines common behavior for a %GroupContainer container.
*
* @since 2.1
*
* @since 2.1
*
* @return An error code
- * @param[in] rect The location and size of the %GroupContainer control as an instance of Rectangle
- * @param[in] rowCount The number of rows
- * @param[in] columnCount The number of columns
- * @param[in] lineWidth Width of the grid lines to draw
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The width or height of @c rect or @c rowCount or @c columnnCount is negative or the value of @c lineWidth is @c 0 or negative.
+ * @param[in] rect The location and size of the %GroupContainer control as an instance of Rectangle
+ * @param[in] rowCount The number of rows
+ * @param[in] columnCount The number of columns
+ * @param[in] lineWidth The width of the grid lines to draw
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid. @n
+ * Either of the following conditions has occured:
+ * - The width or height of @c rect or @c rowCount or @c columnnCount is negative.
+ * - The value of @c lineWidth is @c 0 or negative.
* @exception E_OPERATION_FAILED The operation has failed.
* @remarks The available space for controls is less than the width or height of the container by the total width or height of the grid lines.
*/
* @since 2.1
*
* @return An error code
- * @param[in] rect The location and size of the %GroupContainer control as an instance of FloatRectangle
- * @param[in] rowCount The number of rows
- * @param[in] columnCount The number of columns
- * @param[in] lineWidth Width of the grid lines to draw
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The width or height of @c rect or @c rowCount or @c columnnCount is negative or the value of @c lineWidth is @c 0 or negative.
+ * @param[in] rect The location and size of the %GroupContainer control as an instance of FloatRectangle
+ * @param[in] rowCount The number of rows
+ * @param[in] columnCount The number of columns
+ * @param[in] lineWidth The width of the grid lines to draw
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid. @n
+ * Either of the following conditions has occurred:
+ * - The width or height of @c rect or @c rowCount or @c columnnCount is negative.
+ * - The value of @c lineWidth is @c 0 or negative.
* @exception E_OPERATION_FAILED The operation has failed.
* @remarks The available space for controls is less than the width or height of the container by the total width or height of the grid lines.
*/
*
* @return An error code
* @param[in] control The control to add to the container
- * @param[in] rowIndex The row index of the cell
+ * @param[in] rowIndex The row index of the cell
* @param[in] columnIndex The column index of the cell
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified @c rowIndex or @c columnIndex is greater than the number of elements or less than @c 0.
- * @exception E_INVALID_ARG A specified input parameter @c control is invalid.
- * @exception E_INVALID_OPERATION The cell specified by @c rowIndex and @c columnIndex is already bound to another control.
+ * @exception E_OUT_OF_RANGE The specified @c rowIndex or @c columnIndex is greater than the number of elements or less than @c 0.
+ * @exception E_INVALID_ARG A specified input parameter @c control is invalid.
+ * @exception E_INVALID_OPERATION The cell specified by @c rowIndex and @c columnIndex is already bound to another control.
* @see Merge()
* @remarks
* - If a control is being added to the merged cells, the row index and column index of a representative cell should be given.
result AddControlAt(Control& control, int rowIndex, int columnIndex);
/**
- * Gets the control at a specified cell index in the GroupContainer.
+ * Gets the control at a specified cell index in the %GroupContainer.
*
* @since 2.1
*
* @return The control at a specified index of the list, @n
- * else @c null if the cell index is not valid or no control is added
+ * else @c null if the cell index is not valid or no control is added
* @param[in] rowIndex The row index of the cell
- * @param[in] columnIndex The column index of the cell
+ * @param[in] columnIndex The column index of the cell
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c rowIndex or @c columnIndex is greater than the number of elements or less than @c 0.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
const Tizen::Ui::Control* GetControlAt(int rowIndex, int columnIndex) const;
/**
- * Gets the control at a specified cell index in the GroupContainer.
+ * Gets the control at a specified cell index in the %GroupContainer.
*
* @since 2.1
*
* @return The control at a specified index of the list, @n
- * else @c null if the cell index is not valid or no control is added
+ * else @c null if the cell index is not valid or no control is added
* @param[in] rowIndex The row index of the cell
* @param[in] columnIndex The column index of the cell
* @exception E_SUCCESS The method is successful.
Tizen::Ui::Control* GetControlAt(int rowIndex, int columnIndex);
/**
- * Removes a specified control from a specified row and column index
+ * Removes a specified control from a specified row and column index.
*
* @since 2.1
*
* @param[in] columnIndex The column index of the control to remove
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c rowIndex or @c columnIndex is greater than the number of elements or less than @c 0.
- * @exception E_OPERATION_FAILED The operation has failed.
- * @exception E_INVALID_OPERATION No control has been bound to the specified cell.
+ * @exception E_OPERATION_FAILED The operation has failed.
+ * @exception E_INVALID_OPERATION No control has been bound to the specified cell.
* @remarks
* - When you remove the control from the merged cell, the row index and column index of a representative cell should be given.
* - The removed child control is deleted from the memory. Before it is removed from the container, OnTerminating()
- * of the child control is called.
- * @see Tizen::Ui::Control::OnTerminating()
+ * of the child control is called.
+ * @see Control::OnTerminating()
*/
result RemoveControlAt (int rowIndex, int columnIndex);
* @param[in] width The new width of the column
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c columnIndex is greater than the number of elements or less than @c 0.
- * @exception E_INVALID_ARG The specified @c width must be greater than or equal to @c 0.
+ * @exception E_INVALID_ARG The specified @c width must be greater than or equal to @c 0.
*
*/
result SetColumnWidth(int columnIndex, int width);
* @param[in] width The new width of the column
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c columnIndex is greater than the number of elements or less than @c 0.
- * @exception E_INVALID_ARG The specified @c width must be greater than or equal to @c 0.0f.
+ * @exception E_INVALID_ARG The specified @c width must be greater than or equal to @c 0.0f.
*
*/
result SetColumnWidth(int columnIndex, float width);
* @param[in] rowCount The number of cells to merge along the row
* @param[in] columnCount The number of cells to merge along the column
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG One or more cells in the specified range is(are) already merged.
+ * @exception E_INVALID_ARG One or more cells in the specified range is(are) already merged.
* @exception E_OUT_OF_RANGE The specified @c rowStartIndex or @c columnStartIndex is greater than the number of elements or less than @c 0
* @remarks
* - When the cells are merged, the top-left cell will play the role of representative cell on behalf of merged cells.
* - To manipulate the merge cell, the row index and column index of the representative cell has to be given. Merging cells
- * with the merged cell is allowed, but the newly merged cell should completely contain the all cells to merge.
+ * with the merged cell is allowed, but the newly merged cell should completely contain all the cells to merge.
*/
result Merge(int rowStartIndex, int columnStartIndex, int rowCount, int columnCount);
/**
- * Enables/disables resizing of the control in a cell
+ * Enables/disables resizing of the control in a cell.
*
* @since 2.1
*
* @return An error code
- * @param[in] rowIndex The row index of the row in which the control is resized
- * @param[in] columnIndex The column index of the column in which the control is resized
- * @param[in] enable boolean value to enable or disable the resizing of control
+ * @param[in] rowIndex The index of the row in which the control is resized
+ * @param[in] columnIndex The index of the column in which the control is resized
+ * @param[in] enable The boolean value to enable or disable the resizing of control
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c rowIndex or @c columnIndex is greater than the number of elements or less than @c 0.
*
result SetChildResizingEnabled(int rowIndex, int columnIndex, bool enable);
/**
- * Sets the margin of a cell
+ * Sets the margin of a cell.
*
* @since 2.1
*
result SetMargin(int rowIndex, int columnIndex, int leftMargin, int rightMargin, int topMargin, int bottomMargin);
/**
- * Sets the margin of a cell
+ * Sets the margin of a cell.
*
* @since 2.1
*
result SetMargin(int rowIndex, int columnIndex, float leftMargin, float rightMargin, float topMargin, float bottomMargin);
/**
- * Splits the merged cells
+ * Splits the merged cells.
*
* @since 2.1
*
* @since 2.1
*
* @return An instance of the Tizen::Graphics::Rectangle that represents the position of top-left corner,
- * the width, and the height of the cell, @n else Rectangle(0, 0, -1, -1) if an error occurs
+ * the width, and the height of the cell, @n
+ * else Rectangle(0, 0, -1, -1) if an error occurs
* @param[in] rowIndex The row index of the cell
* @param[in] columnIndex The column index of the cell
* @exception E_SUCCESS The method is successful.
* @since 2.1
*
* @return An instance of the Tizen::Graphics::FloatRectangle that represents the position of top-left corner,
- * the width, and the height of the cell, @n else Rectangle(0.0f, 0.0f, -1.0f, -1.0f) if an error occurs
+ * the width, and the height of the cell, @n
+ * else Rectangle(0.0f, 0.0f, -1.0f, -1.0f) if an error occurs
* @param[in] rowIndex The row index of the cell
* @param[in] columnIndex The column index of the cell
* @exception E_SUCCESS The method is successful.
Tizen::Graphics::FloatRectangle GetBoundsAtF(int rowIndex, int columnIndex) const;
/**
- * Enables/disables stretchable or shrinkable property of a column
+ * Enables/disables stretchable or shrinkable property of a column.
*
* @since 2.1
*
* @return An error code
* @param[in] columnIndex The column index of the cell
- * @param[in] stretchable boolean value to set stretchable or shrinkable property
+ * @param[in] stretchable The boolean value to set stretchable or shrinkable property
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c columnIndex is greater than the number of elements or less than @c 0.
*/
result SetColumnStretchable(int columnIndex, bool stretchable);
/**
- * Checks whether the column is stretchable or shrinkable
+ * Checks whether the column is stretchable or shrinkable.
*
* @since 2.1
*
* @return @c true if the column is stretchable or shrinkable
- * else @c false
+ * else @c false
* @param[in] columnIndex The column index of the cell
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c columnIndex is greater than the number of elements or less than @c 0.
bool IsColumnStretchable(int columnIndex) const;
/**
- * Enables/disables stretchable or shrinkable property of a row
+ * Enables/disables stretchable or shrinkable property of a row.
*
* @since 2.1
*
* @return An error code
* @param[in] rowIndex The row index of the cell
- * @param[in] stretchable boolean value to set stretchable or shrinkable property
+ * @param[in] stretchable The boolean value to set stretchable or shrinkable property
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c rowIndex is greater than the number of elements or less than @c 0.
*/
result SetRowStretchable(int rowIndex, bool stretchable);
/**
- * Checks whether the row is stretchable or shrinkable
+ * Checks whether the row is stretchable or shrinkable.
*
* @since 2.1
*
* @return @c true if the row is stretchable or shrinkable
- * else @c false
+ * else @c false
* @param[in] rowIndex The row index of the cell
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c rowIndex is greater than the number of elements or less than @c 0.
* @since 2.1
*
* @return The row and column divider line color, @n
- * else RGBA(0, 0, 0, 255) if line color is not set.
+ * else RGBA(0, 0, 0, 255) if line color is not set.
*/
Tizen::Graphics::Color GetLineColor(void) const;
{
public:
/**
- * The object is not fully constructed after this constructor is
- * called. @n For full construction, the %Construct() method must be
- * called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the %Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
*
* @since 2.1
*
- * @return An error code
+ * @return An error code
* @param[in] itemSize The size of the item
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] pBitmap The background bitmap image
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The background bitmap has priority over the background color. When both the background bitmap and background color are
- * specified, only the bitmap is displayed.
+ * @remarks The background bitmap has priority over the background color. When both the background bitmap and background color
+ * are specified, only the bitmap is displayed.
*/
result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] color The background color
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - The background bitmap has priority over the background color. When both the background bitmap and the
- * background color are specified, only the bitmap is displayed.
+ * background color are specified, only the bitmap is displayed.
* - The background color of the item is not applied when the item is inserted into the GroupedListView of section style.
*/
result SetBackgroundColor(const Tizen::Graphics::Color& color);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] color The text color
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] size The size of the text
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*
* @since 2.1
*
- * @return An error code
+ * @return An error code
* @param[in] size The size of the text to set
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] text The text string to add
* @param[in] pBitmap The bitmap to display
*
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @remarks
- * - The behavior of %GroupItem is different according to the style of GroupedListView.
+ * - The behavior of %GroupItem differs according to the style of GroupedListView.
* - When the style is ::GROUPED_LIST_VIEW_STYLE_INDEXED, the text and bitmap of %GroupItem are displayed,
- * if they are given. However, when the style is ::GROUPED_LIST_VIEW_STYLE_SECTION, the bitmap is not displayed in any
- * case and setting an empty text to %GroupItem does not show %GroupItem.
+ * if they are given. However, when the style is ::GROUPED_LIST_VIEW_STYLE_SECTION, the bitmap is not displayed in any
+ * case. When %GroupItem is set to an empty text, %GroupItem is not shown.
*/
result SetElement(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null);
*
* A typical use case of %GroupedList would be a list which groups all items alphabetically.
*
- * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
- * when the %GroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat
+ * Note that %CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
+ * when the %GroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). %CustomListItemFormat
* must be deleted by the application.
*
* Refer to CustomListItem and CustomListItemFormat.
*
+ * The following example demonstrates how to use the %GroupedList class.
+ *
* Example:
*
* @image html ui_controls_groupedlist.png
*
* @return An error code
* @param[in] rect An instance of the Graphics::Rectangle class @n
- * This instance represents the X, Y coordinates of the top-left corner of the created %GroupedList along with the width and
- * height.
+ * This instance represents the X, Y coordinates of the top-left corner of the created %GroupedList
+ * along with the width and height.
* @param[in] style The style of the %GroupedList control
* @param[in] itemDivider Set to @c true to display an item divider, @n
* else @c false
* @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
* @since 2.0
*
- * @return The color of the text to be displayed
+ * @return The color of the text to be displayed
* @endif
*/
Tizen::Graphics::Color GetTextColorOfEmptyList(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] rect An instance of the Graphics::Rectangle class
+ * @param[in] rect An instance of the Graphics::Rectangle class @n
* This instance represents the x and y coordinates of the top-left corner of the created
* %GroupedListView control along with the width and height.@n
* The optimal size of the control is defined in
* @since 2.0
*
* @return An error code
- * @param[in] rect An instance of the Graphics::Rectangle class
+ * @param[in] rect An instance of the Graphics::Rectangle class @n
* This instance represents the x and y coordinates of the top-left corner of the created
* %GroupedListView control along with the width and height.@n
* The optimal size of the control is defined in
* @since 2.1
*
* @return An error code
- * @param[in] rect An instance of the Graphics::Rectangle class
+ * @param[in] rect An instance of the Graphics::Rectangle class @n
* This instance represents the x and y coordinates of the top-left corner of the created
* %GroupedListView control along with the width and height.@n
* The optimal size of the control is defined in
* @param[out] groupIndex The index of the group that the item belongs to
* @param[out] itemIndex The index of the item
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred, or @n
- * there is no item at the specified position.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - There is no item at the specified position.
* @remarks This method should be called only after list items are created. @n
* If this method needs to be called early in the lifecycle of the ListView,
* then UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
* @param[out] groupIndex The index of the group that the item belongs to
* @param[out] itemIndex The index of the item
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred, or @n
- * there is no item at the specified position.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - There is no item at the specified position.
* @remarks This method should be called only after list items are created. @n
* If this method needs to be called early in the lifecycle of the ListView,
* then UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
* @param[out] groupIndex The index of the group that the item belongs to
* @param[out] itemIndex The index of the item
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred, or @n
- * there is no item at the specified position.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - There is no item at the specified position.
* @remarks This method should be called only after list items are created. @n
* If this method needs to be called early in the lifecycle of the ListView,
* then UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
* @param[out] groupIndex The index of the group that the item belongs to
* @param[out] itemIndex The index of the item
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred, or @n
- * there is no item at the specified position.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - There is no item at the specified position.
* @remarks This method should be called only after list items are created. @n
* If this method needs to be called early in the lifecycle of the ListView,
* then UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
* @param[out] itemIndex The index of the item
* @param[out] elementId The ID of the element
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred, or
- * there is no item at the specified position.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - There is no item at the specified position.
* @remarks
* - @c groupIndex and @c itemIndex are @c -1 when there is no list item at the specified position.
* - @c elementId is @c -1 when there is no element at the specified position
* @param[out] itemIndex The index of the item
* @param[out] elementId The ID of the element
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred, or
- * there is no item at the specified position.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - There is no item at the specified position.
* @remarks
* - @c groupIndex and @c itemIndex are @c -1 when there is no list item at the specified position.
* - @c elementId is @c -1 when there is no element at the specified position
* @param[out] itemIndex The index of the item
* @param[out] elementId The ID of the element
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred, or
- * there is no item at the specified position.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - There is no item at the specified position.
* @remarks
* - @c groupIndex and @c itemIndex are @c -1 when there is no list item at the specified position.
* - @c elementId is @c -1 when there is no element at the specified position
* @param[out] itemIndex The index of the item
* @param[out] elementId The ID of the element
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred, or
- * there is no item at the specified position.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - There is no item at the specified position.
* @remarks
* - @c groupIndex and @c itemIndex are @c -1 when there is no list item at the specified position.
* - @c elementId is @c -1 when there is no element at the specified position
/**
* @file FUiCtrlGroupedListViewTypes.h
- * @brief This is the header file for the GroupedListView enumerations.
+ * @brief This is the header file for the %GroupedListView enumerations.
*
* This header file contains the declarations of the GroupedListView enumerations.
*/
/**
* @enum GroupedListViewStyle
*
- * Defines the style of %GroupedListView.
+ * Defines the styles of GroupedListView.
*
* @since 2.0
*/
* @since 2.0
*
* @return An error code
- * @param[in] rect An instance of the Graphics::Rectangle class @n
- * This instance represents the x and y coordinates of the left top corner of the created %GroupedTableView along with
- * the width and height.@n
+ * @param[in] rect An instance of the Graphics::Rectangle class @n
+ * This instance represents the x and y coordinates of the left top corner of the created %GroupedTableView along with
+ * the width and height.@n
* The optimal size of the control is defined in
* <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
- * @param[in] itemDivider Set to @c true to display an item divider, @n
- * else @c false
- * @param[in] scrollStyle The style of %GroupedTableView scroll bar style
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value.
+ * @param[in] itemDivider Set to @c true to display an item divider, @n
+ * else @c false
+ * @param[in] scrollStyle The style of %GroupedTableView scroll bar style
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value.
*
*/
result Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle);
* @since 2.1
*
* @return An error code
- * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
- * This instance represents the x and y coordinates of the left top corner of the created %GroupedTableView along with
- * the width and height.@n
+ * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
+ * This instance represents the x and y coordinates of the left top corner of the created %GroupedTableView along with
+ * the width and height.@n
* The optimal size of the control is defined in
* <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
- * @param[in] itemDivider Set to @c true to display an item divider, @n
- * else @c false
- * @param[in] scrollStyle The style of %GroupedTableView scroll bar style
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value.
+ * @param[in] itemDivider Set to @c true to display an item divider, @n
+ * else @c false
+ * @param[in] scrollStyle The style of %GroupedTableView scroll bar style
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value.
*
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle);
*
* @since 2.0
*
- * @param[in] pProvider The item provider to create and delete items
+ * @param[in] pProvider The item provider to create and delete items
* @remarks
* - If an item provider is not set for the table view, the table view does not work.
* - The specified provider should be allocated in heap memory.
*
* @since 2.1
*
- * @param[in] pProvider The item provider to create and delete items
+ * @param[in] pProvider The item provider to create and delete items
* @remarks
* - If an item provider is not set for the table view, the table view does not work.
* - The specified provider should be allocated in heap memory.
* @since 2.0
*
* @return An error code
- * @param[in] groupIndex The index of the group
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
+ * @param[in] groupIndex The index of the group
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
* @remarks
* - This method does not work during the ITableViewItemProvider call-back procedure.
* - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the
*
* @since 2.0
*
- * @return An error code
- * @param[in] groupIndex The index of the group
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
+ * @return An error code
+ * @param[in] groupIndex The index of the group
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
* @remarks
* - This method does not work during the ITableViewItemProvider call-back procedure.
* - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the
- * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result CollapseGroup(int groupIndex);
*
* @since 2.0
*
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
* @remarks This method does not work during the ITableViewItemProvider call-back procedure.
*/
result ExpandAllGroups(void);
*
* @since 2.0
*
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
* @remarks This method does not work during the ITableViewItemProvider call-back procedure.
*/
result CollapseAllGroups(void);
}
/**
- * Returns whether the group is expanded or not.
+ * Checks whether the group is expanded or not.
*
* @since 2.0
*
- * @return @c true if the group is expanded, @n
- * else @c false
- * @param[in] groupIndex The index of the group
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @remarks This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the
- * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * @return @c true if the group is expanded, @n
+ * else @c false
+ * @param[in] groupIndex The index of the group
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @remarks This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the
+ * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
bool IsGroupExpanded(int groupIndex) const;
void SetGroupedLookEnabled(bool enable);
/**
- * Returns whether the grouped look is enabled or not.
+ * Checks whether the grouped look is enabled or not.
*
* @since 2.0
*
- * @return @c true if the grouped look is enabled, @n
- * else @c false
+ * @return @c true if the grouped look is enabled, @n
+ * else @c false
*/
bool IsGroupedLookEnabled(void) const;
*
* @since 2.0
*
- * @return An error code
- * @param[in] listener The event listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_ALREADY_EXIST The listener is already added.
- * @remarks The specified listener should be allocated in heap memory.
+ * @return An error code
+ * @param[in] listener The event listener to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_ALREADY_EXIST The listener is already added.
+ * @remarks The specified listener should be allocated in heap memory.
*/
result AddGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener);
*
* @since 2.0
*
- * @return An error code
- * @param[in] listener The event listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND The listener is not found.
+ * @return An error code
+ * @param[in] listener The event listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_NOT_FOUND The listener is not found.
*/
result RemoveGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener);
*
* @since 2.0
*
- * @return An error code
- * @param[in] listener The event listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_ALREADY_EXIST The listener is already added.
+ * @return An error code
+ * @param[in] listener The event listener to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_ALREADY_EXIST The listener is already added.
* @remarks The specified listener should be allocated in heap memory.
*/
result AddFastScrollListener(IFastScrollListener& listener);
*
* @since 2.0
*
- * @return An error code
- * @param[in] listener The event listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_NOT_FOUND The listener is not found.
+ * @return An error code
+ * @param[in] listener The event listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_NOT_FOUND The listener is not found.
*/
result RemoveFastScrollListener(IFastScrollListener& listener);
*
* @since 2.0
*
- * @return An error code
- * @param[in] listener The event listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_ALREADY_EXIST The listener is already added.
- * @remarks The specified listener should be allocated in heap memory.
+ * @return An error code
+ * @param[in] listener The event listener to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_ALREADY_EXIST The listener is already added.
+ * @remarks The specified listener should be allocated in heap memory.
* @see IScrollEventListener::OnScrollEndReached()
* @see RemoveScrollEventListener()
*/
*
* @since 2.0
*
- * @return An error code
- * @param[in] listener The event listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_NOT_FOUND The listener is not found.
+ * @return An error code
+ * @param[in] listener The event listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_NOT_FOUND The listener is not found.
* @see IScrollEventListener::OnScrollEndReached()
* @see AddScrollEventListener()
*/
*
* @since 2.1
*
- * @return An error code
- * @param[in] listener The event listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_ALREADY_EXIST The listener is already added.
- * @remarks The specified listener should be allocated in heap memory.
+ * @return An error code
+ * @param[in] listener The event listener to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_ALREADY_EXIST The listener is already added.
+ * @remarks The specified listener should be allocated in heap memory.
* @see IScrollEventListenerF::OnScrollEndReached()
* @see RemoveScrollEventListenerF()
*/
*
* @since 2.1
*
- * @return An error code
- * @param[in] listener The event listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_NOT_FOUND The listener is not found.
+ * @return An error code
+ * @param[in] listener The event listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_NOT_FOUND The listener is not found.
* @see IScrollEventListenerF::OnScrollEndReached()
* @see AddScrollEventListenerF()
*/
*
* @since 2.0
*
- * @param[in] enable Set to @c true to enable the collapse by pinch gesture, else @c false
+ * @param[in] enable Set to @c true to enable the collapse by pinch gesture, @n
+ * else @c false
*/
void SetCollapseByPinchGestureEnabled(bool enable);
/**
- * Returns whether the collapse by pinch gesture is enabled or not.
+ * Checks whether the collapse by pinch gesture is enabled or not.
*
* @since 2.0
*
- * @return @c true if the collapse by pinch gesture is enabled, @n
- * else @c false
+ * @return @c true if the collapse by pinch gesture is enabled, @n
+ * else @c false
*/
bool IsCollapseByPinchGestureEnabled(void) const;
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] text The text of the index
* @param[in] useSearchIcon Set to @c true to show the magnifying icon, @n
* else @c false
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[out] groupIndex The group index
* @param[out] itemIndex The item index
* @exception E_SUCCESS The method is successful.
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[out] groupIndex The group index
* @param[out] itemIndex The item index
* @exception E_SUCCESS The method is successful.
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] groupIndex The group index
* @param[in] itemIndex The item index
* @param[in] itemAlignment The item alignment
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
* @remarks
* - If the specified item. itemIndex is @c -1, then the method is applied to the group item with the given index.
- * This method does not work during the ITableViewItemProvider call-back procedure.
+ * - This method does not work during the ITableViewItemProvider call-back procedure.
* - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the
- * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result ScrollToItem(int groupIndex, int itemIndex, TableViewScrollItemAlignment itemAlignment = TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
*
* @since 2.0
*
- * @return An error code
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @param[in] check Set to @c true to select the item, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The item is disabled or the current state of the instance prohibits the execution of the specified operation.
+ * @return An error code
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @param[in] check Set to @c true to select the item, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The item is disabled or the current state of the instance prohibits the execution of the specified operation.
* @remarks
* - This method works only when the annex style of the item allows selection.
- * This method does not work during the ITableViewItemProvider call-back procedure.
+ * - This method does not work during the ITableViewItemProvider call-back procedure.
* - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the
- * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result SetItemChecked(int groupIndex, int itemIndex, bool check);
/**
- * Returns whether the item at the specified index is selected or not.
+ * Checks whether the item at the specified index is selected or not.
*
* @since 2.0
*
- * @return @c true if the item is selected, @n
- * else @c false
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @return @c true if the item is selected, @n
+ * else @c false
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
* @remarks
* - This method returns @c false, if the annex style of the item does not allow selection.
* - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the
- * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
bool IsItemChecked(int groupIndex, int itemIndex) const;
*
* @since 2.0
*
- * @return An error code
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @param[in] enable Set to @c true to enable the specified item, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
+ * @return An error code
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @param[in] enable Set to @c true to enable the specified item, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
* @remarks
* - This method does not work during the ITableViewItemProvider call-back procedure.
* - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the
- * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result SetItemEnabled(int groupIndex, int itemIndex, bool enable);
/**
- * Returns whether the item at the specified index is enabled or disabled.
+ * Checks whether the item at the specified index is enabled or disabled.
*
* @since 2.0
*
- * @return @c true if the item is enabled, @n
- * else @c false
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @return @c true if the item is enabled, @n
+ * else @c false
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
* @remarks This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the
* TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
*
* @since 2.0
*
- * @return The total number of items in the specified group
- * @param[in] groupIndex The group index
- * @exception E_SUCCESS The method is successful.
+ * @return The total number of items in the specified group
+ * @param[in] groupIndex The group index
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE A specified input parameter is invalid.
*/
int GetItemCountAt(int groupIndex) const;
*
* @since 2.0
*
- * @return An error code
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @param[in] type The item to add, remove, or modify
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
+ * @return An error code
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @param[in] type The item to add, remove, or modify
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
* @remarks
* - If the specified @c itemIndex is @c -1, then the method is applied to the group item with the given index.
* - Note that if @c TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE option is used to a group item, all the items in the
- * group (including the group item itself) are removed from the table view.
+ * group (including the group item itself) are removed from the table view.
* - This method does not work during the ITableViewItemProvider call-back procedure.
*/
result RefreshItem(int groupIndex, int itemIndex, TableViewRefreshType type);
*
* @since 2.1
*
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The %GroupedTableView item provider is processing another request.
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The %GroupedTableView item provider is processing another request.
*/
result RefreshAllItems(void);
*
* @since 2.0
*
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
* @remarks
* - This method will delete all the items and recreate them, so it should not be called from the inside of
- * OnGroupedTableViewItemStateChanged() call-back as this leads to self deletion. If you need to update an Item, you should use RefreshItem() method.
+ * OnGroupedTableViewItemStateChanged() call-back as this leads to self deletion. If you need to update an Item, you should
+ * use the RefreshItem() method.
* - This method should not be called from IGroupedTableViewItemProvider implementation because of recursion.
* - The specific error code can be accessed using the GetLastResult() method.
*/
*
* @since 2.0
*
- * @param[in] position The position of the item
- * @param[out] groupIndex The group index of the item on specified position
- * @param[out] itemIndex The item index of the item on specified position
+ * @param[in] position The position of the item
+ * @param[out] groupIndex The group index of the item on specified position
+ * @param[out] itemIndex The item index of the item on specified position
* @remarks
* - This method sets both of groupIndex and itemIndex to @c -1 if no item is found at the given position.
* - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the
- * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
void GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const;
*
* @since 2.1
*
- * @param[in] position The position of the item
- * @param[out] groupIndex The group index of the item on specified position
- * @param[out] itemIndex The item index of the item on specified position
+ * @param[in] position The position of the item
+ * @param[out] groupIndex The group index of the item on specified position
+ * @param[out] itemIndex The item index of the item on specified position
* @remarks
* - This method sets both of groupIndex and itemIndex to @c -1 if no item is found at the given position.
* - This method should be called only after TableView items are created. @n
- * If this method needs to be called early in the lifecycle of the TableView, then UpdateTableView() method should be called
- * explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * If this method needs to be called early in the lifecycle of the TableView, then UpdateTableView() method should be called
+ * explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
void GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const;
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] color The division line color
*/
void SetItemDividerColor(const Tizen::Graphics::Color& color);
* @since 2.0
*
* @param[in] color The background color
- * @remarks The background bitmap has priority over the background color. When both the background bitmap and the background color are specified,
+ * @remarks The background bitmap has priority over the background color. When both the background bitmap and the background color are specified,
* only the bitmap image is displayed.
*/
void SetBackgroundColor(const Tizen::Graphics::Color& color);
*
* @since 2.1
*
- * @return An error code
- * @param[in] pixel The amount of pixels to scroll
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified @c pixel is out of range.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation
+ * @return An error code
+ * @param[in] pixel The amount of pixels to scroll
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE The specified @c pixel is out of range.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation
* @remarks
* - If you call ScrollByPixel() with negative @c pixel when position of scroll is already top of contents then it
- * will return @c E_OUT_OF_RANGE. @n
- * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE.
+ * will return @c E_OUT_OF_RANGE. @n
+ * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE.
* - This method does not work during the ITableViewItemProvider call-back procedure.
*/
result ScrollByPixel(int pixel);
*
* @since 2.1
*
- * @return An error code
- * @param[in] pixel The amount of pixels to scroll
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified @c pixel is out of range.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation
+ * @return An error code
+ * @param[in] pixel The amount of pixels to scroll
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE The specified @c pixel is out of range.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation
* @remarks
* - If you call ScrollByPixel() with negative @c pixel when position of scroll is already top of contents then
- * it will return @c E_OUT_OF_RANGE. @n
- * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE.
+ * it will return @c E_OUT_OF_RANGE. @n
+ * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE.
* - This method does not work during the ITableViewItemProvider call-back procedure.
*/
result ScrollByPixel(float pixel);
* @since 2.1
*
* @return An error code
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
*/
result OpenContextItem(int groupIndex, int itemIndex);
*
* @since 2.1
*
- * @return An error code
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @return An error code
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
*/
result CloseContextItem(int groupIndex, int itemIndex);
*
* @return @c true if the context item has been opened, @n
* else @c false
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
*/
bool IsContextItemOpened(int groupIndex, int itemIndex) const;
* @exception E_SUCCESS The method is successful.
* @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or the index is greater than or equal to
- * the number of elements or less than @c 0.
+ * the number of elements or less than @c 0.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
* The specified @c item is not constructed.
* @exception E_SYSTEM A system error has occurred.
* @return The selected item index, @n
* else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION This operation is supported when the style of the %Header control is ::HEADER_STYLE_SEGMENTED, @n
- * ::HEADER_STYLE_SEGMENTED_WITH_TITLE, ::HEADER_STYLE_TAB, ::HEADER_STYLE_TAB_WITH_TITLE or ::HEADER_STYLE_TAB_LARGE.
+ * @exception E_UNSUPPORTED_OPERATION This operation is supported when the style of the %Header control is
+ * ::HEADER_STYLE_SEGMENTED, ::HEADER_STYLE_SEGMENTED_WITH_TITLE, ::HEADER_STYLE_TAB,
+ * ::HEADER_STYLE_TAB_WITH_TITLE or ::HEADER_STYLE_TAB_LARGE.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
int GetSelectedItemIndex(void) const;
* @param[in] pBadgeIcon The bitmap for the icon
* @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_OPERATION This operation is not supported. @n
- * The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TAB @n
- * or ::HEADER_STYLE_TAB_LARGE.
+ * The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TAB
+ * or ::HEADER_STYLE_TAB_LARGE.
*/
result SetButtonBadgeIcon(ButtonPosition position, const Tizen::Graphics::Bitmap* pBadgeIcon);
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c number must be in the range defined by @c 0 and @c 99999.
* @exception E_UNSUPPORTED_OPERATION This operation is not supported. @n
- * The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TAB @n
- * or ::HEADER_STYLE_TAB_LARGE.
+ * The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TAB
+ * or ::HEADER_STYLE_TAB_LARGE.
* @remarks To remove the numbered badge icon from an item, pass @c 0 as the value of @c number.
*/
result SetButtonNumberedBadgeIcon(ButtonPosition position, int number);
*
* @return An error code
* @param[in] itemIndex The index of the item to set
- * @param[in] enable Set to @c true to enable the item state, @n
+ * @param[in] enable Set to @c true to enable the item state, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
* @param[in] pIcon The title icon to set @n
* Set to @c null to remove the title icon.
* @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE, @n
+ * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE,
* ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE.
* @exception E_SYSTEM A system error has occurred.
*/
* @return An error code
* @param[in] text The text to set
* @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE, @n
+ * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE,
* ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE.
* @exception E_SYSTEM A system error has occurred.
* @remarks If the text cannot be displayed in a line, then the ellipsis is applied at the end. @n
* @return An error code
* @param[in] color The title text color to set
* @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE, @n
+ * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE,
* ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE.
* @exception E_SYSTEM A system error has occurred.
*/
* @param[in] enable Set to @c true to enable the edit mode, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION The operation is supported when the style of the %Header control style is ::HEADER_STYLE_TAB, @n
- * ::HEADER_STYLE_TAB_WITH_TITLE or ::HEADER_STYLE_TAB_LARGE.
+ * @exception E_UNSUPPORTED_OPERATION The operation is supported when the style of the %Header control style is ::HEADER_STYLE_TAB,
+ * ::HEADER_STYLE_TAB_WITH_TITLE or ::HEADER_STYLE_TAB_LARGE.
*/
result SetTabEditModeEnabled(bool enable);
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION This operation is invalid. @n
* The operation is invalid when the style of the %Header control is not ::HEADER_STYLE_TITLE
- * or ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE.
+ * or ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE.
* @remarks For icon size details, see <a href="../org.tizen.native.appprogramming/html/guide/ui/control_iconsize.htm">here</a>.
*/
result SetTitleBadgeIcon(const Tizen::Graphics::Bitmap* pBadgeIcon);
* @exception E_INVALID_ARG The specified @c number must be in the range defined by @c 0 and @c 99999.
* @exception E_INVALID_OPERATION This operation is invalid. @n
* The operation is invalid when the style of the %Header control is not ::HEADER_STYLE_TITLE
- * or ::HEADER_STYLE_SEGMENTED_WITH_TITLE TITLE or ::HEADER_STYLE_TAB_WITH_TITLE.
+ * or ::HEADER_STYLE_SEGMENTED_WITH_TITLE TITLE or ::HEADER_STYLE_TAB_WITH_TITLE.
* @remarks To remove the numbered badge icon from an item, pass @c 0 as the value of @c number.
*/
result SetTitleNumberedBadgeIcon(int number);
* @exception E_SUCCESS The method is successful.
* @remarks
* - If the size of the bitmap is greater than the default size, the bitmap is scaled down.
- * - The bitmap specified for the @c HEADER_ITEM_STATUS_NORMAL will be applied for all other statuses unless different bitmaps
- * are explicitly set for those by using this method.
+ * - The bitmap specified for @c HEADER_ITEM_STATUS_NORMAL will be applied for all other statuses unless different bitmaps
+ * are explicitly set for those by using this method.
* - Note that the specified bitmaps are ignored if the style of the Header control is not ::HEADER_STYLE_TITLE_BUTTON. @n
- * Furthermore, the title button does not support @c HEADER_ITEM_STATUS_SELECTED status and the bitmap for the status is also ignored.
+ * Furthermore, the title button does not support @c HEADER_ITEM_STATUS_SELECTED status and the bitmap for
+ * the status is also ignored.
*/
result SetIcon(HeaderItemStatus status, const Tizen::Graphics::Bitmap* pIcon);
* @param[in] text The text to set
* @exception E_SUCCESS The method is successful.
* @remarks
- * - If the text cannot be displayed in a line, then the text is automatically displayed in two lines and the ellipsis is applied if the text
- * is longer than two lines.
+ * - If the text cannot be displayed in a line, then the text is automatically displayed in two lines and
+ * the ellipsis is applied if the text is longer than two lines.
* - Use @htmlonly '\n' @endhtmlonly to denote the end of the line.
*/
result SetText(const Tizen::Base::String& text);
* @since 2.0
*
* @return @c true if the drawing is successful, @n
- * else @c false
+ * else @c false
* @param[in] canvas The graphic canvas of the list control
* @param[in] rect The position and size of the element
* @param[in] status The status of the element
* @since 2.1
*
* @return @c true if the drawing is successful, @n
- * else @c false
+ * else @c false
* @param[in] canvas The graphic canvas of the list control
* @param[in] rect The position and size of the element
* @param[in] status The status of the element
*
* @return An error code
* @param[in] canvas The graphic canvas of the list control
- * @param[in] rect The location and size of the CustomList element
+ * @param[in] rect The location and size of the CustomList element
* @param[in] itemStatus The status of the item
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*
* @param[in] source The source of the event
* @param[in] newLineCount The new line count
- * @remarks For ExpandableEditArea created with EXPANDABLE_EDIT_AREA_STYLE_TOKEN, newLineCount will be 0.
+ * @remarks For ExpandableEditArea created with @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN, @c newLineCount will be @c 0.
*/
virtual void OnExpandableEditAreaLineAdded(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount) = 0;
*
* @param[in] source The source of the event
* @param[in] newLineCount The new line count
- * @remarks For ExpandableEditArea created with EXPANDABLE_EDIT_AREA_STYLE_TOKEN, newLineCount will be 0.
+ * @remarks For ExpandableEditArea created with @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN, @c newLineCount will be @c 0.
*/
virtual void OnExpandableEditAreaLineRemoved(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount) = 0;
//
/**
* @file FUiCtrlIFormMenuEventListener.h
- * @brief This is the header file for the %IFormMenuventListener interface.
+ * @brief This is the header file for the %IFormMenuEventListener interface.
*
- * This header file contains the declarations of the %IFormMenuventListener interface.
+ * This header file contains the declarations of the %IFormMenuEventListener interface.
*/
#ifndef _FUI_CTRL_IFORM_MENU_EVENT_LISTENER_H_
#define _FUI_CTRL_IFORM_MENU_EVENT_LISTENER_H_
public:
/**
* Called when a Frame instance is about to be destroyed. @n
- * The %OnFrameTerminating() method is called just before the system destroys the %Frame instance of an application during the application termination sequence.
+ * The %OnFrameTerminating() method is called just before the system destroys the %Frame instance of an application during
+ * the application termination sequence.
*
* @since 2.0
*
*
* @return An item of the Gallery control
* @param[in] index The index of the item
- * @see DeleteItem()
* @remarks An application that uses the Gallery control must implement this method. This method is expected to return an item that is allocated on a
- * heap memory. The returned item can be of type GalleryItem. Note that when the item is not required, the Gallery control calls the
+ * heap memory. The returned item can be of type GalleryItem. Note that when the item is not required, the %Gallery control calls the
* IGalleryItemProvider::DeleteItem() method.
- * The returned item should not be a null pointer.
+ * The returned item should not be a @c null pointer.
+ * @see DeleteItem()
*/
virtual Tizen::Ui::Controls::GalleryItem* CreateItem(int index) = 0;
* else @c false
* @param[in] index The index of the item
* @param[in] pItem The pointer to GalleryItem to delete
- * @see CreateItem()
* @remarks An application that uses the Gallery control must implement this method. Using this method, an application can deallocate the item. If an
* application deallocates the item, this method returns @c true. This notifies the Gallery control to not release the item.
- * Otherwise, the item is deallocated by the Gallery control.
+ * Otherwise, the item is deallocated by the %Gallery control.
+ * @see CreateItem()
*/
virtual bool DeleteItem(int index, Tizen::Ui::Controls::GalleryItem* pItem) = 0;
*
* The %IGroupedListViewItemEventListener interface is the listener interface for receiving GroupedListView item events.
* The class that processes a list item event implements this interface, and the instance created with that class is registered
- * with a UI control, using the control's AddGroupedListViewItemEventListener() method. When the list item event occurs, a
- * method of that instance is invoked.
+ * with a UI control, using the control's AddGroupedListViewItemEventListener() method. When the list item event occurs, a
+ * method of that instance is invoked.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
*/
* @param[in] status The status of the element
*
* @remarks
- * - This method is called when an element of the %CustomItem control in the %GroupedListView control is checked, unchecked,
- * or selected.
- * - If the method is called to notify the state change of an item's annex or the item itself, the specified elementId is set to @c -1.
+ * - This method is called when an element of the CustomItem control in the %GroupedListView control is checked, unchecked,
+ * or selected.
+ * - If the method is called to notify the state change of an item's annex or the item itself, the specified
+ * elementId is set to @c -1.
*/
virtual void OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus status) = 0;
*
* @since 2.0
*
- * @param[in] listView The source of the event
- * @param[in] groupIndex The index of the group
- * @param[in] itemIndex The index of the item in the group
- * @param[in] elementId The element ID
- * @param[in,out] invokeListViewItemCallback Indicates whether to invoke %GroupedListView item callback after this method returns
+ * @param[in] listView The source of the event
+ * @param[in] groupIndex The index of the group
+ * @param[in] itemIndex The index of the item in the group
+ * @param[in] elementId The element ID
+ * @param[in,out] invokeListViewItemCallback Indicates whether to invoke GroupedListView item callback after this method returns
* @remarks
* - This method is invoked when an item or an element is long pressed. @n
- * When the event comes from the annex or the whole item, @c elementId is always -1.
- * - Setting @c invokeListViewItemCallback to @c true invokes GroupedListView item callbacks after this method returns.
+ * When the event comes from the annex or the whole item, @c elementId is always -1.
+ * - Setting @c invokeListViewItemCallback to @c true invokes %GroupedListView item callbacks after this method returns.
* - Set @c invokeListViewItemCallback to @c false to not invoke %GroupedListView item callbacks. The default value of
- * @c invokeListViewItemCallback is @c true.
+ * @c invokeListViewItemCallback is @c true.
* - Note that other %GroupedListView item callbacks are not called even though @c invokeListViewItemCallback is @c true, if
- * %GroupedListView loses focus, for example, due to invoking a Popup or a ContextMenu in this method.
+ * %GroupedListView loses focus, for example, due to invoking a Popup or a ContextMenu in this method.
*/
virtual void OnGroupedListViewItemLongPressed(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, bool& invokeListViewItemCallback);
*
* @since 2.0
*
- * @param[in] listView The source of the event
- * @param[in] groupIndexFrom The source group index of the item
- * @param[in] itemIndexFrom The source item index of the item
- * @param[in] groupIndexTo The target group index of the item
- * @param[in] itemIndexTo The target item index of the item
+ * @param[in] listView The source of the event
+ * @param[in] groupIndexFrom The source group index of the item
+ * @param[in] itemIndexFrom The source item index of the item
+ * @param[in] groupIndexTo The target group index of the item
+ * @param[in] itemIndexTo The target item index of the item
*/
virtual void OnGroupedListViewItemReordered(Tizen::Ui::Controls::GroupedListView& listView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo);
* @since 2.0
*
* @return The total number of groups
- * @remarks This method must be implemented so that it returns the total number of groups in the GroupedListView control.
+ * @remarks This method must be implemented so that it returns the total number of groups in the GroupedListView control.
*/
virtual int GetGroupCount(void) = 0;
*
* @since 2.0
*
- * @return The total number of items in the specified group
- * @param[in] groupIndex The index of the group
- * @remarks This method must be implemented so that it returns the total number of items for the specified group in the GroupedListView control.
+ * @return The total number of items in the specified group
+ * @param[in] groupIndex The index of the group
+ * @remarks This method must be implemented so that it returns the total number of items for the specified group
+ * in the GroupedListView control.
*/
virtual int GetItemCount(int groupIndex) = 0;
*
* @since 2.0
*
- * @return A group item of the GroupedListView control
- * @param[in] groupIndex The index of the group
- * @param[in] itemWidth The width of the item
+ * @return A group item of the GroupedListView control
+ * @param[in] groupIndex The index of the group
+ * @param[in] itemWidth The width of the item
* @remarks
- * - An application that uses the GroupedListView control must implement this method. This method is expected to return a group item that is
- * allocated on a heap memory.
- * - Note that when the item is not required, the GroupedListView control calls %IGroupedListViewItemProvider::DeleteGroupItem() and the
- * application deallocates the item.
- * - The returned item should not be a null pointer.
+ * - An application that uses the GroupedListView control must implement this method. This method is expected to
+ * return a group item that is allocated on a heap memory.
+ * - Note that when the item is not required, the GroupedListView control calls
+ * %IGroupedListViewItemProvider::DeleteGroupItem() and the application deallocates the item.
+ * - The returned item should not be a @c null pointer.
*/
virtual Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, int itemWidth) = 0;
*
* @since 2.0
*
- * @return @c true if the item is deallocated by this method, @n
- * else @c false
- * @param[in] groupIndex The index of the group
- * @param[in] pItem The pointer to GroupItem to delete
- * @param[in] itemWidth The width of the item
+ * @return @c true if the item is deallocated by this method, @n
+ * else @c false
+ * @param[in] groupIndex The index of the group
+ * @param[in] pItem The pointer to GroupItem to delete
+ * @param[in] itemWidth The width of the item
* @remarks
- * - An application that uses the %GroupedListView control must implement this method.
+ * - An application that uses the GroupedListView control must implement this method.
* - Using this method, an application can deallocate the item.
- * - If an application deallocates the item, this method must return true. This notifies the GroupedListView control not to release the
- * item. Otherwise, the item is deallocated by the GroupedListView control.
+ * - If an application deallocates the item, this method must return true. This notifies the GroupedListView
+ * control not to release the item. Otherwise, the item is deallocated by the %GroupedListView control.
* @see CreateItem()
*/
virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth) = 0;
*
* @since 2.0
*
- * @return An item of the list
- * @param[in] groupIndex The index of the group
- * @param[in] itemIndex The index of the item
- * @param[in] itemWidth The width of the item
+ * @return An item of the list
+ * @param[in] groupIndex The index of the group
+ * @param[in] itemIndex The index of the item
+ * @param[in] itemWidth The width of the item
* @remarks
* - An application that uses the GroupedListView control must implement this method.
* - This method is expected to return an item that is allocated on a heap memory.
* - The returned item can be a simple or custom item.
- * - Note that when the item is not required, the GroupedListView control calls %IGroupedListViewItemProvider::DeleteItem() and the application
- * deallocates the item.
+ * - Note that when the item is not required, the GroupedListView control calls
+ * %IGroupedListViewItemProvider::DeleteItem() and the application deallocates the item.
* @see DeleteItem()
*/
virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int groupIndex, int itemIndex, int itemWidth) = 0;
*
* @since 2.0
*
- * @return @c true if the item is deallocated by this method, @n
- * else @c false
- * @param[in] groupIndex The index of the group
- * @param[in] itemIndex The index of the item
- * @param[in] pItem The pointer to ListItemBase to delete
- * @param[in] itemWidth The width of the item
+ * @return @c true if the item is deallocated by this method, @n
+ * else @c false
+ * @param[in] groupIndex The index of the group
+ * @param[in] itemIndex The index of the item
+ * @param[in] pItem The pointer to ListItemBase to delete
+ * @param[in] itemWidth The width of the item
* @remarks
* - An application that uses the GroupedListView control must implement this method.
* - Using this method, an application can deallocate the item.
- * - If the application deallocates the item, this method must return true. This notifies the %GroupedListView control not to release the
- * item. Otherwise, the item is deallocated by the %GroupedListView control.
+ * - If the application deallocates the item, this method must return true. This notifies
+ * the GroupedListView control not to release the item. Otherwise, the item is deallocated by
+ * the %GroupedListView control.
* @see CreateItem()
*/
virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth) = 0;
*
* @since 2.0
*
- * @return @c true if the item can be reordered, @n
- * else @c false
- * @param[in] groupIndexFrom The source group index of the item
- * @param[in] groupIndexTo The target group index of the item
+ * @return @c true if the item can be reordered, @n
+ * else @c false
+ * @param[in] groupIndexFrom The source group index of the item
+ * @param[in] groupIndexTo The target group index of the item
*/
virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo);
*
* @since 2.1
*
- * @return The total number of groups
- * @remarks This method must be implemented so that it returns the total number of groups in the GroupedListView control.
+ * @return The total number of groups
+ * @remarks This method must be implemented so that it returns the total number of groups in the GroupedListView control.
*/
virtual int GetGroupCount(void) = 0;
*
* @since 2.1
*
- * @return The total number of items in the specified group
- * @param[in] groupIndex The index of the group
- * @remarks This method must be implemented so that it returns the total number of items for the specified group in the GroupedListView control.
+ * @return The total number of items in the specified group
+ * @param[in] groupIndex The index of the group
+ * @remarks This method must be implemented so that it returns the total number of items for the specified group
+ * in the GroupedListView control.
*/
virtual int GetItemCount(int groupIndex) = 0;
*
* @since 2.1
*
- * @return A group item of the GroupedListView control
- * @param[in] groupIndex The index of the group
- * @param[in] itemWidth The width of the item
+ * @return A group item of the GroupedListView control
+ * @param[in] groupIndex The index of the group
+ * @param[in] itemWidth The width of the item
* @remarks
- * - An application that uses the GroupedListView control must implement this method. This method is expected to return a group item that is
- * allocated on a heap memory.
- * - Note that when the item is not required, the GroupedListView control calls IGroupedListViewItemProvider::DeleteGroupItem() and the
- * application deallocates the item.
- * - The returned item should not be a null pointer.
+ * - An application that uses the GroupedListView control must implement this method. This method is expected
+ * to return a group item that is allocated on a heap memory.
+ * - Note that when the item is not required, the GroupedListView control calls IGroupedListViewItemProvider::DeleteGroupItem()
+ * and the application deallocates the item.
+ * - The returned item should not be a @c null pointer.
*/
virtual Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, float itemWidth) = 0;
*
* @since 2.1
*
- * @return @c true if the item is deallocated by this method, @n
- * else @c false
- * @param[in] groupIndex The index of the group
- * @param[in] pItem The pointer to GroupItem to delete
- * @param[in] itemWidth The width of the item
+ * @return @c true if the item is deallocated by this method, @n
+ * else @c false
+ * @param[in] groupIndex The index of the group
+ * @param[in] pItem The pointer to GroupItem to delete
+ * @param[in] itemWidth The width of the item
* @remarks
* - An application that uses the GroupedListView control must implement this method.
* - Using this method, an application can deallocate the item.
- * - If an application deallocates the item, this method must return @c true. This notifies the %GroupedListView control not to release the
- * item. Otherwise, the item is deallocated by the %GroupedListView control.
+ * - If an application deallocates the item, this method must return @c true. This notifies
+ * the GroupedListView control not to release the item. Otherwise, the item is deallocated by
+ * the %GroupedListView control.
* @see CreateItem()
*/
virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, float itemWidth) = 0;
*
* @since 2.1
*
- * @return An item of the list
- * @param[in] groupIndex The index of the group
- * @param[in] itemIndex The index of the item
- * @param[in] itemWidth The width of the item
+ * @return An item of the list
+ * @param[in] groupIndex The index of the group
+ * @param[in] itemIndex The index of the item
+ * @param[in] itemWidth The width of the item
* @remarks
* - An application that uses the GroupedListView control must implement this method.
* - This method is expected to return an item that is allocated on a heap memory.
* - The returned item can be a simple or custom item.
- * - Note that when the item is not required, the %GroupedListView control calls IGroupedListViewItemProvider::DeleteItem() and the application
- * deallocates the item.
+ * - Note that when the item is not required, the %GroupedListView control calls
+ * IGroupedListViewItemProvider::DeleteItem() and the application deallocates the item.
* @see DeleteItem()
*/
virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int groupIndex, int itemIndex, float itemWidth) = 0;
*
* @since 2.1
*
- * @return @c true if the item is deallocated by this method, @n
- * else @c false
- * @param[in] groupIndex The index of the group
- * @param[in] itemIndex The index of the item
- * @param[in] pItem The pointer to ListItemBase to delete
- * @param[in] itemWidth The width of the item
+ * @return @c true if the item is deallocated by this method, @n
+ * else @c false
+ * @param[in] groupIndex The index of the group
+ * @param[in] itemIndex The index of the item
+ * @param[in] pItem The pointer to ListItemBase to delete
+ * @param[in] itemWidth The width of the item
* @remarks
* - An application that uses the GroupedListView control must implement this method.
* - Using this method, an application can deallocate the item.
- * - If the application deallocates the item, this method must return @c true. This notifies the %GroupedListView control not to release the
- * item. Otherwise, the item is deallocated by the %GroupedListView control.
+ * - If the application deallocates the item, this method must return @c true. This notifies
+ * the %GroupedListView control not to release the item. Otherwise, the item is deallocated by
+ * the %GroupedListView control.
* @see CreateItem()
*/
virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, float itemWidth) = 0;
*
* @since 2.1
*
- * @return @c true if the item can be reordered, @n
- * else @c false
- * @param[in] groupIndexFrom The source group index of the item
- * @param[in] groupIndexTo The target group index of the item
+ * @return @c true if the item can be reordered, @n
+ * else @c false
+ * @param[in] groupIndexFrom The source group index of the item
+ * @param[in] groupIndexTo The target group index of the item
*/
virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo);
// limitations under the License.
//
/**
-* @file FUiCtrlIGroupedTableViewItemEventListener.h
-* @brief This is the header file for the %IGroupedTableViewItemEventListener interface.
+* @file FUiCtrlIGroupedTableViewItemEventListener.h
+* @brief This is the header file for the %IGroupedTableViewItemEventListener interface.
*
* This header file contains the declarations of the %IGroupedTableViewItemEventListener interface. @n
* If an item event is generated, a method of this interface is called.
/**
-* @interface IGroupedTableViewItemEventListener
-* @brief This interface implements the listener for item event.
+* @interface IGroupedTableViewItemEventListener
+* @brief This interface implements the listener for item event.
*
* @since 2.0
*
//
/**
-* @file FUiCtrlIGroupedTableViewItemProvider.h
-* @brief This is the header file for the %IGroupedTableViewItemProvider interface.
+* @file FUiCtrlIGroupedTableViewItemProvider.h
+* @brief This is the header file for the %IGroupedTableViewItemProvider interface.
*
* This header file contains the declarations of the %IGroupedTableViewItemProvider interface.
* If the event is generated, a method of this interface is called.
class TableViewGroupItem;
/**
-* @interface IGroupedTableViewItemProvider
-* @brief This interface implements the listener for events on %GroupedTableView.
+* @interface IGroupedTableViewItemProvider
+* @brief This interface implements the listener for events on %GroupedTableView.
*
* @since 2.0
*
-* The %IGroupedTableViewItemProvider interface implements an item provider which generates items for GroupedTableView. %GroupedTableView calls the item provider
-* to request an item which is about to be displayed on a screen. Applications which use %GroupedTableView must implement the item provider.
-* The class is registered with a %GroupedTableView, using the GroupedTableView::SetItemProvider() method.
+* The %IGroupedTableViewItemProvider interface implements an item provider which generates items for GroupedTableView.
+* %GroupedTableView calls the item provider to request an item which is about to be displayed on a screen. Applications
+* which use %GroupedTableView must implement the item provider. The class is registered with a %GroupedTableView, using
+* the GroupedTableView::SetItemProvider() method.
*/
class _OSP_EXPORT_ IGroupedTableViewItemProvider
{
*
* @since 2.0
*
- * @return The total number of groups
- * @remarks This method must be implemented so that it returns the total number of groups in the GroupedTableView control.
+ * @return The total number of groups
+ * @remarks This method must be implemented so that it returns the total number of groups in the GroupedTableView control.
*/
virtual int GetGroupCount(void) = 0;
*
* @since 2.0
*
- * @return The total number of items in the specified group
- * @param[in] groupIndex The index of the group
- * @remarks This method must be implemented so that it returns the total number of items for the specified group in the GroupedTableView control.
+ * @return The total number of items in the specified group
+ * @param[in] groupIndex The index of the group
+ * @remarks This method must be implemented so that it returns the total number of items for the specified group
+ * in the GroupedTableView control.
*/
virtual int GetItemCount(int groupIndex) = 0;
*
* @since 2.0
*
- * @return A group item of the GroupedTableView control
- * @param[in] groupIndex The index of the group
- * @param[in] itemWidth The width of the item
+ * @return A group item of the GroupedTableView control
+ * @param[in] groupIndex The index of the group
+ * @param[in] itemWidth The width of the item
* @remarks
- * - An application that uses the GroupedTableView control must implement this method. This method is expected to return a group item that is
- * allocated on a heap memory.
- * - Note that when the group item is not required, the %GroupedTableView control calls IGroupedTableViewItemProvider::DeleteGroupItem() and the
- * application deallocates the item.
- * - The returned item should not be a null pointer.
+ * - An application that uses the GroupedTableView control must implement this method. This method is expected to
+ * return a group item that is allocated on a heap memory.
+ * - Note that when the group item is not required, the GroupedTableView control calls
+ * IGroupedTableViewItemProvider::DeleteGroupItem() and the application deallocates the item.
+ * - The returned item should not be a @c null pointer.
*/
virtual TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth) = 0;
*
* @since 2.0
*
- * @return @c true if the group item is deallocated by this method,
- * else @c false
- * @param[in] groupIndex The index of the group
- * @param[in] pItem The pointer to TableViewGroupItem to delete
+ * @return @c true if the group item is deallocated by this method,
+ * else @c false
+ * @param[in] groupIndex The index of the group
+ * @param[in] pItem The pointer to TableViewGroupItem to delete
* @remarks
* - An application that uses the GroupedTableView control must implement this method.
* - Using this method, an application can deallocate the item.
- * - If an application deallocates the item, this method must return @c true. This notifies the %GroupedTableView control not to release the
- * item. Otherwise, the item is deallocated by the %GroupedTableView control.
+ * - If an application deallocates the item, this method must return @c true. This notifies the GroupedTableView
+ * control not to release the item. Otherwise, the item is deallocated by the %GroupedTableView control.
* @see CreateGroupItem()
*/
virtual bool DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) = 0;
*
* @since 2.0
*
- * @param[in] groupIndex The group index
- * @param[in] pItem The pointer to TableViewGroupItem to update
+ * @param[in] groupIndex The group index
+ * @param[in] pItem The pointer to TableViewGroupItem to update
* @remarks
* - An application that uses the GroupedTableView control must implement this method.
* - This method is called when the modification of a group item is requested.
*
* @since 2.0
*
- * @return An item of the GroupedTableView
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @param[in] itemWidth The width of the item
+ * @return An item of the GroupedTableView
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @param[in] itemWidth The width of the item
* @remarks
* - An application that uses the GroupedTableView control must implement this method.
* - This method is expected to return an item that is allocated on a heap memory.
* - The returned item can be a simple or custom item.
- * - Note that when the item is not required, the %GroupedTableView control calls IGroupedTableViewItemProvider::DeleteItem()
- * and the application deallocates the item.
+ * - Note that when the item is not required, the GroupedTableView control calls
+ * IGroupedTableViewItemProvider::DeleteItem() and the application deallocates the item.
* @see DeleteItem()
*/
virtual TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth) = 0;
*
* @since 2.0
*
- * @return @c true if the item is deallocated by this method, @n
- * else @c false
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @param[in] pItem The pointer to TableViewItem to delete
+ * @return @c true if the item is deallocated by this method, @n
+ * else @c false
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @param[in] pItem A pointer to TableViewItem to delete
* @remarks
* - An application that uses the GroupedTableView control must implement this method.
* - Using this method, an application can deallocate the item.
- * - If the application deallocates the item, this method must return @c true. This notifies the %GroupedTableView control not to release the
- * item. Otherwise, the item is deallocated by the %GroupedTableView control.
+ * - If the application deallocates the item, this method must return @c true. This notifies
+ * the %GroupedTableView control not to release the item. Otherwise, the item is deallocated by
+ * the %GroupedTableView control.
* @see CreateItem()
*/
virtual bool DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem) = 0;
*
* @since 2.0
*
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @param[in] pItem The pointer to TableViewItem to update
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @param[in] pItem A pointer to TableViewItem to update
* @remarks
* - An application that uses the GroupedTableView control must implement this method.
* - This method is called when the modification of an item is requested.
*
* @since 2.0
*
- * @return The default height of a group item
- * @remarks This method must be implemented so that it returns the default height of group items in the GroupedTableView control.
+ * @return The default height of a group item
+ * @remarks This method must be implemented so that it returns the default height of group items in the GroupedTableView control.
*/
virtual int GetDefaultGroupItemHeight(void) = 0;
*
* @since 2.0
*
- * @return The default height of an item
- * @remarks This method must be implemented so that it returns the default height of items in the GroupedTableView control.
+ * @return The default height of an item
+ * @remarks This method must be implemented so that it returns the default height of items in the GroupedTableView control.
*/
virtual int GetDefaultItemHeight(void) = 0;
*
* @since 2.1
*
- * @return @c true if the item can be reordered, @n
- * else @c false
- * @param[in] groupIndexFrom The source group index of the item
- * @param[in] groupIndexTo The target group index of the item
+ * @return @c true if the item can be reordered, @n
+ * else @c false
+ * @param[in] groupIndexFrom The source group index of the item
+ * @param[in] groupIndexTo The target group index of the item
*/
virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo) { return false; }
//
/**
-* @file FUiCtrlIGroupedTableViewItemProviderF.h
-* @brief This is the header file for the %IGroupedTableViewItemProviderF interface.
+* @file FUiCtrlIGroupedTableViewItemProviderF.h
+* @brief This is the header file for the %IGroupedTableViewItemProviderF interface.
*
* This header file contains the declarations of the %IGroupedTableViewItemProviderF interface.
* If the event is generated, a method of this interface is called.
class TableViewGroupItem;
/**
-* @interface IGroupedTableViewItemProviderF
-* @brief This interface implements the listener for events on %GroupedTableView.
+* @interface IGroupedTableViewItemProviderF
+* @brief This interface implements the listener for events on %GroupedTableView.
*
* @since 2.1
*
-* The %IGroupedTableViewItemProviderF interface implements an item provider which generates items for GroupedTableView. %GroupedTableView calls the item provider
-* to request an item which is about to be displayed on a screen. Applications which use %GroupedTableView must implement the item provider.
-* The class is registered with a %GroupedTableView, using the GroupedTableView::SetItemProviderF() method.
+* The %IGroupedTableViewItemProviderF interface implements an item provider which generates items for GroupedTableView.
+* %GroupedTableView calls the item provider to request an item which is about to be displayed on a screen. Applications
+* which use %GroupedTableView must implement the item provider.
+* The class is registered with %GroupedTableView, using the GroupedTableView::SetItemProviderF() method.
*/
class _OSP_EXPORT_ IGroupedTableViewItemProviderF
{
*
* @since 2.1
*
- * @return The total number of groups
- * @remarks This method must be implemented so that it returns the total number of groups in the GroupedTableView control.
+ * @return The total number of groups
+ * @remarks This method must be implemented so that it returns the total number of groups in the GroupedTableView control.
*/
virtual int GetGroupCount(void) = 0;
*
* @since 2.1
*
- * @return The total number of items in the specified group
- * @param[in] groupIndex The index of the group
- * @remarks This method must be implemented so that it returns the total number of items for the specified group in the GroupedTableView control.
+ * @return The total number of items in the specified group
+ * @param[in] groupIndex The index of the group
+ * @remarks This method must be implemented so that it returns the total number of items for the specified group in
+ * the GroupedTableView control.
*/
virtual int GetItemCount(int groupIndex) = 0;
*
* @since 2.1
*
- * @return A group item of the GroupedTableView control
- * @param[in] groupIndex The index of the group
- * @param[in] itemWidth The width of the item
+ * @return A group item of the GroupedTableView control
+ * @param[in] groupIndex The index of the group
+ * @param[in] itemWidth The width of the item
* @remarks
- * - An application that uses the GroupedTableView control must implement this method. This method is expected to return a group item that is
- * allocated on a heap memory.
- * - Note that when the group item is not required, the %GroupedTableView control calls IGroupedTableViewItemProviderF::DeleteGroupItem() and the
- * application deallocates the item.
- * - The returned item should not be a null pointer.
+ * - An application that uses the GroupedTableView control must implement this method. This method is expected to
+ * return a group item that is allocated on a heap memory.
+ * - Note that when the group item is not required, the GroupedTableView control calls
+ * IGroupedTableViewItemProviderF::DeleteGroupItem() and the application deallocates the item.
+ * - The returned item should not be a @c null pointer.
*/
virtual TableViewGroupItem* CreateGroupItem(int groupIndex, float itemWidth) = 0;
*
* @since 2.1
*
- * @return @c true if the group item is deallocated by this method,
- * else @c false
- * @param[in] groupIndex The index of the group
- * @param[in] pItem The pointer to TableViewGroupItem to delete
+ * @return @c true if the group item is deallocated by this method,
+ * else @c false
+ * @param[in] groupIndex The index of the group
+ * @param[in] pItem The pointer to TableViewGroupItem to delete
* @remarks
* - An application that uses the GroupedTableView control must implement this method.
* - Using this method, an application can deallocate the item.
- * - If an application deallocates the item, this method must return @c true. This notifies the %GroupedTableView control not to release the
- * item. Otherwise, the item is deallocated by the %GroupedTableView control.
+ * - If an application deallocates the item, this method must return @c true. This notifies
+ * the GroupedTableView control not to release the item. Otherwise, the item is deallocated
+ * by the %GroupedTableView control.
* @see CreateGroupItem()
*/
virtual bool DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) = 0;
*
* @since 2.1
*
- * @return An item of the GroupedTableView control
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @param[in] itemWidth The width of the item
+ * @return An item of the GroupedTableView control
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @param[in] itemWidth The width of the item
* @remarks
* - An application that uses the GroupedTableView control must implement this method.
* - This method is expected to return an item that is allocated on a heap memory.
* - The returned item can be a simple or custom item.
- * - Note that when the item is not required, the %GroupedTableView control calls IGroupedTableViewItemProviderF::DeleteItem() and the application
- * deallocates the item.
+ * - Note that when the item is not required, the GroupedTableView control calls
+ * IGroupedTableViewItemProviderF::DeleteItem() and the application deallocates the item.
* @see DeleteItem()
*/
virtual TableViewItem* CreateItem(int groupIndex, int itemIndex, float itemWidth) = 0;
*
* @since 2.1
*
- * @return @c true if the item is deallocated by this method, @n
- * else @c false
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @param[in] pItem The pointer to TableViewItem to delete
+ * @return @c true if the item is deallocated by this method, @n
+ * else @c false
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @param[in] pItem The pointer to TableViewItem to delete
* @remarks
* - An application that uses the GroupedTableView control must implement this method.
* - Using this method, an application can deallocate the item.
- * - If the application deallocates the item, this method must return @c true. This notifies the %GroupedTableView control not to release the
- * item. Otherwise, the item is deallocated by the %GroupedTableView control.
+ * - If the application deallocates the item, this method must return @c true. This notifies the GroupedTableView control not to release the
+ * item. Otherwise, the item is deallocated by the %GroupedTableView control.
* @see CreateItem()
*/
virtual bool DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem) = 0;
*
* @since 2.1
*
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @param[in] pItem The pointer to TableViewItem to update
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @param[in] pItem The pointer to TableViewItem to update
* @remarks
* - An application that uses the GroupedTableView control must implement this method.
* - This method is called when the modification of an item is requested.
*
* @since 2.1
*
- * @return The default height of a group item
- * @remarks This method must be implemented so that it returns the default height of group items in the GroupedTableView control.
+ * @return The default height of a group item
+ * @remarks This method must be implemented so that it returns the default height of group items in the GroupedTableView control.
*/
virtual float GetDefaultGroupItemHeight(void) = 0;
*
* @since 2.1
*
- * @return The default height of an item
- * @remarks This method must be implemented so that it returns the default height of items in the GroupedTableView control.
+ * @return The default height of an item
+ * @remarks This method must be implemented so that it returns the default height of items in the GroupedTableView control.
*/
virtual float GetDefaultItemHeight(void) = 0;
*
* @since 2.1
*
- * @return @c true if the item can be reordered, @n
- * else @c false
- * @param[in] groupIndexFrom The source group index of the item
- * @param[in] groupIndexTo The target group index of the item
+ * @return @c true if the item can be reordered, @n
+ * else @c false
+ * @param[in] groupIndexFrom The source group index of the item
+ * @param[in] groupIndexTo The target group index of the item
*/
virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo) { return false; }
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n This way, the destructors of the derived classes are called
+ * when the destructor of this interface is called.
*
* @since 2.0
*/
* @since 2.0
*
* The %IIconListViewItemProvider interface is the interface for handling IconListView items.
- * The class that handles list items implements this interface, and the instance created using the IconListView::Construct(const Tizen::Graphics::Rectangle&, const Tizen::Graphics::Dimension&, IconListViewStyle, IconListViewScrollDirection, IconListViewScrollStyle) method.
+ * The class that handles list items implements this interface, and the instance created using
+ * the IconListView::Construct(const Tizen::Graphics::Rectangle&, const Tizen::Graphics::Dimension&, IconListViewStyle, IconListViewScrollDirection, IconListViewScrollStyle) method.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
*/
*
* @since 2.0
*
- * @return The item count of the IconListView
- * @remarks Applications that use IconListView must implement this method. This method is expected to return the number of total items in the
- * %IconListView.
+ * @return The item count of IconListView
+ * @remarks Applications that use IconListView must implement this method. This method is expected to return the number of
+ * total items in the %IconListView.
*/
virtual int GetItemCount(void) = 0;
*
* @since 2.0
*
- * @return The item of the IconListView
- * @param[in] index The index of the item
- * @remarks Applications that use IconListView must implement this method. This method is expected to return an item that is allocated in a heap
- * memory. The returned item can be IconListViewItem. Note that, when the item becomes unnecessary, the %IconListView calls
- * DeleteItem() and applications are in charge of deallocating the item. @n
- * The returned item should not be a null pointer.
+ * @return The item of the IconListView
+ * @param[in] index The index of the item
+ * @remarks Applications that use IconListView must implement this method. This method is expected to return an item that
+ * is allocated in a heap memory. The returned item can be IconListViewItem. Note that, when the item is not required any more,
+ * the %IconListView calls DeleteItem() and applications are in charge of deallocating the item. @n
+ * The returned item should not be a @c null pointer.
*
*/
virtual Tizen::Ui::Controls::IconListViewItem* CreateItem(int index) = 0;
virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction) = 0;
/**
- * Called when the state of an element in the %ListContextItem is changed.
+ * Called when the state of an element in the ListContextItem is changed.
*
* @since 2.0
*
*
* @since 2.0
*
- * @param[in] listView The source of the event
- * @param[in] index The index of the list
- * @param[in] elementId The element ID
- * @param[in,out] invokeListViewItemCallback Indicates whether to invoke ListView item callback after this method returns
+ * @param[in] listView The source of the event
+ * @param[in] index The index of the list
+ * @param[in] elementId The element ID
+ * @param[in,out] invokeListViewItemCallback Indicates whether to invoke ListView item callback after this method returns
* @remarks
* - This method is invoked when an item or an element is long pressed.
* - When the event comes from the annex or the whole item, @c elementId is always @c -1.
- * - Setting @c invokeListViewItemCallback to @c true invokes %ListView item callbacks after this method returns.
- * - Set @c invokeListViewItemCallback to @c false to not invoke %ListView item callbacks. The default value of
- * @c invokeListViewItemCallback is @c true.
- * - Note that other %ListView item callbacks are not called even though @c invokeListViewItemCallback is @c true, in case that ListView
- * loses the focus, for example, due to invoking a Popup or a ContextMenu in this method.
+ * - Setting @c invokeListViewItemCallback to @c true invokes ListView item callbacks after this method returns.
+ * - Set @c invokeListViewItemCallback to @c false to not invoke ListView item callbacks. The default value of
+ * @c invokeListViewItemCallback is @c true.
+ * - Note that other ListView item callbacks are not called even though @c invokeListViewItemCallback is @c true,
+ * if ListView loses the focus, for example, due to invoking a Popup or a ContextMenu in this method.
*/
virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback);
*
* @since 2.0
*
- * @param[in] listView The source of the event
- * @param[in] indexFrom The start index of the item
- * @param[in] indexTo The final index of the item
+ * @param[in] listView The source of the event
+ * @param[in] indexFrom The start index of the item
+ * @param[in] indexTo The final index of the item
*/
virtual void OnListViewItemReordered(Tizen::Ui::Controls::ListView& listView, int indexFrom, int indexTo);
*
* @since 2.0
*
- * @return An item of the ListView
- * @param[in] index The index of the item
- * @param[in] itemWidth The width of the item
+ * @return An item of the ListView
+ * @param[in] index The index of the item
+ * @param[in] itemWidth The width of the item
* @remarks
* - The applications that use ListView must implement this method.
* - This method is expected to return an item which is allocated in a heap memory.
* - The returned item can be a SimpleItem or CustomItem.
- * - The returned item should not be a null pointer.
- * - Note that when the item becomes unnecessary, the ListView calls IListViewItemProvider::DeleteItem() and the application is in charge of
- * deallocating the item.
+ * - The returned item should not be a @c null pointer.
+ * - Note that when the item becomes unnecessary, the ListView calls IListViewItemProvider::DeleteItem() and
+ * the application is in charge of deallocating the item.
* @see DeleteItem()
*/
virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth) = 0;
* @remarks
* - Applications which use ListView must implement this method.
* - In this method, the applications have the chance of deallocating the item.
- * - If the application deallocates the item, this method returns @c true, notifying the %ListView not to free the item. @n
- * Otherwise, the item will be deallocated by %ListView.
+ * - If the application deallocates the item, this method returns @c true, notifying the ListView not to free the item. @n
+ * Otherwise, the item will be deallocated by %ListView.
* @see CreateItem()
*/
virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth) = 0;
*
* @since 2.1
*
- * @return An item of the ListView
- * @param[in] index The index of the item
- * @param[in] itemWidth The width of the item
+ * @return An item of the ListView
+ * @param[in] index The index of the item
+ * @param[in] itemWidth The width of the item
* @remarks
* - The applications that use ListView must implement this method.
* - This method is expected to return an item which is allocated in a heap memory.
* - The returned item can be a SimpleItem or CustomItem.
- * - The returned item should not be a null pointer.
- * - Note that when the item becomes unnecessary, the %ListView calls IListViewItemProvider::DeleteItem() and the application is in charge of
- * deallocating the item.
+ * - The returned item should not be a @c null pointer.
+ * - Note that when the item becomes unnecessary, the ListView calls IListViewItemProvider::DeleteItem() and the application is in charge of
+ * deallocating the item.
* @see DeleteItem()
*/
virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, float itemWidth) = 0;
* @remarks
* - Applications which use ListView must implement this method.
* - In this method, the applications have the chance of deallocating the item.
- * - If the application deallocates the item, this method returns @c true, notifying the %ListView not to free the item. @n
- * Otherwise, the item will be deallocated by %ListView.
+ * - If the application deallocates the item, this method returns @c true, notifying the ListView not to free the item. @n
+ * Otherwise, the item will be deallocated by %ListView.
* @see CreateItem()
*/
virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, float itemWidth) = 0;
namespace Tizen { namespace Ui
{
/**
- * @interface IProgressPopupEventListener
- * @brief This interface implements the listener for ProgressPopup event.
+ * @interface IProgressPopupEventListener
+ * @brief This interface implements the listener for ProgressPopup event.
* @since 2.0
*
* The %IProgressPopupEventListener interface is the listener interface for receiving an event for closing the ProgressPopup.
- * The class that processes a ProgressPopup event
+ * The class that processes a %ProgressPopup event
* implements this interface, and the instance created with that class is registered with a UI control, using the control's
- * AddProgressPopupEventListener() method. When the ProgressPopup event occurs, the OnProgressPopupCanceled() method of that instance is invoked.
+ * AddProgressPopupEventListener() method. When the %ProgressPopup event occurs, the OnProgressPopupCanceled() method of that instance is invoked.
*
* For more information on the class features,
- * see in individual control topics under <a href="../org.tizen.native.appprogramming/html/guide/ui/controls.htm">UI Controls</a>.
+ * see individual control topics under <a href="../org.tizen.native.appprogramming/html/guide/ui/controls.htm">UI Controls</a>.
*/
class _OSP_EXPORT_ IProgressPopupEventListener
: virtual public Tizen::Base::Runtime::IEventListener
/**
* @interface IScrollEventListener
- * @brief This interface implements a listener for scroll events.
+ * @brief This interface implements a listener for scroll events.
*
* @since 2.0
*
* The %IScrollEventListener interface is the listener interface for receiving scroll events.
* The class that processes a scroll event implements this interface, and the instance created with that class is registered with
- * a UI control, using the control(GroupedListView, GroupedTableView, IconListView, ListView, ScrollPanel, SectionTableView, TableView)'s AddScrollEventListener() method.
- * When the scroll event occurs, the OnScrollEndReached()
- * method of that instance is invoked.
+ * a UI control, using the control(GroupedListView, GroupedTableView, IconListView, ListView, ScrollPanel, SectionTableView, TableView)'s
+ * AddScrollEventListener() method.
+ * When the scroll event occurs, the OnScrollEndReached() method of that instance is invoked.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_panels.htm">Panels</a> and
* <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
*
* @since 2.0
*
- *@param[in] source The control being scrolled
- *@param[in] scrollPosition The scrolled position
+ *@param[in] source The control being scrolled
+ *@param[in] scrollPosition The scrolled position
*/
virtual void OnScrollPositionChanged(Tizen::Ui::Control& source, int scrollPosition) {};
/**
* @interface IScrollEventListenerF
- * @brief This interface implements a listener for scroll events.
+ * @brief This interface implements a listener for scroll events.
*
* @since 2.1
*
* The %IScrollEventListenerF interface is the listener interface for receiving scroll events.
* The class that processes a scroll event implements this interface, and the instance created with that class is registered with
- * a UI control, using the control(GroupedListView, GroupedTableView, IconListView, ListView, ScrollPanel, SectionTableView, TableView)'s AddScrollEventListener() method.
+ * a UI control, using the control(GroupedListView, GroupedTableView, IconListView, ListView, ScrollPanel, SectionTableView, TableView)'s
+ * AddScrollEventListener() method.
* When the scroll event occurs, the OnScrollEndReached() method of that instance is invoked.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_panels.htm">Panels</a>
*
* @since 2.1
*
- *@param[in] source The control being scrolled
- *@param[in] scrollPosition The scrolled position
+ *@param[in] source The control being scrolled
+ *@param[in] scrollPosition The scrolled position
*/
virtual void OnScrollPositionChanged(Tizen::Ui::Control& source, float scrollPosition) = 0;
/**
-* @interface ISectionTableViewItemEventListener
-* @brief This interface implements the listener for item event.
+* @interface ISectionTableViewItemEventListener
+* @brief This interface implements the listener for item event.
*
* @since 2.0
*
* @param[in] itemIndex The item index
* @param[in] pContextItem The context item which is opened or closed
* @param[in] activated @c true if a context item is opened, @n
- * else @c false
+ * else @c false
*/
virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::SectionTableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated) = 0;
*
* @return The total number of items in the specified section
* @param[in] sectionIndex The index of the section
- * @remarks This method must be implemented so that it returns the total number of items for the specified section in the %SectionTableView control.
+ * @remarks This method must be implemented so that it returns the total number of items for the specified section in the SectionTableView control.
*/
virtual int GetItemCount(int sectionIndex) = 0;
*
* @since 2.0
*
- * @return An item of the SectionTableView
+ * @return The item of the SectionTableView
* @param[in] sectionIndex The section index
* @param[in] itemIndex The item index
* @param[in] itemWidth The width of the item
* - An application that uses the SectionTableView control must implement this method.
* - This method is expected to return an item that is allocated on a heap memory.
* - The returned item can be a simple or custom item.
- * - The returned item should not be a null pointer.
+ * - The returned item should not be a @c null pointer.
* - Note that when the item is not required, the %SectionTableView control calls ISectionTableViewItemProvider::DeleteItem() and the application
* deallocates the item.
* @see DeleteItem()
* else @c false
* @param[in] sectionIndex The section index
* @param[in] itemIndex The item index
- * @param[in] pItem The pointer to TableViewItem to delete
+ * @param[in] pItem A pointer to TableViewItem to delete
* @remarks
* - An application that uses the SectionTableView control must implement this method.
* - Using this method, an application can deallocate the item.
*
* @param[in] sectionIndex The section index
* @param[in] itemIndex The item index
- * @param[in] pItem The pointer to TableViewItem to update
+ * @param[in] pItem A pointer to TableViewItem to update
* @remarks
* - An application that uses the SectionTableView control must implement this method.
* - This method is called when the modification of an item is requested.
virtual void UpdateItem(int sectionIndex, int itemIndex, TableViewItem* pItem) = 0;
/**
- * Gets the header text of a specified section.
+ * Gets the header text of the specified section.
*
* @since 2.0
*
- * @return The section header text of specified section
+ * @return The section header text of the specified section
* @param[in] sectionIndex The index of the group
* @remarks
* - An application that uses the SectionTableView control must implement this method.
- * - The header text will be aligned left
+ * - The header text will be aligned left.
*/
virtual Tizen::Base::String GetSectionHeader(int sectionIndex) = 0;
/**
- * Returns whether the section has the section header or not.
+ * Checks whether the section has a section header or not.
*
* @since 2.0
*
- * @return @c true if the section has an header, @n
+ * @return @c true if the section has a header, @n
* else @c false
* @param[in] sectionIndex The index of the section
* @remarks An application that uses the SectionTableView control must implement this method.
virtual bool HasSectionHeader(int sectionIndex) = 0;
/**
- * Gets the footer text of a specified section.
+ * Gets the footer text of the specified section.
*
* @since 2.0
*
- * @return The footer text of specified section
+ * @return The footer text of the specified section
* @param[in] sectionIndex The index of the section
* @remarks
* - An application that uses the SectionTableView control must implement this method.
virtual Tizen::Base::String GetSectionFooter(int sectionIndex) = 0;
/**
- * Returns whether the section has the footer or not.
+ * Checks whether the section has a footer or not.
*
* @since 2.0
*
- * @return @c true, if the section has the footer @n
+ * @return @c true, if the section has a footer @n
* @c false,
* @param[in] sectionIndex The index of the section
* @remarks An application that uses the SectionTableView control must implement this method.
virtual int GetSectionCount(void) = 0;
/**
- * Gets the total number of items in a specified group.
+ * Gets the total number of items in the specified group.
*
* @since 2.1
*
virtual int GetItemCount(int sectionIndex) = 0;
/**
- * Creates a specified item.
+ * Creates the specified item.
*
* @since 2.1
*
- * @return An item of the SectionTableView
+ * @return The item of the SectionTableView
* @param[in] sectionIndex The section index
* @param[in] itemIndex The item index
* @param[in] itemWidth The width of the item
* - An application that uses the SectionTableView control must implement this method.
* - This method is expected to return an item that is allocated on a heap memory.
* - The returned item can be a simple or custom item.
- * - The returned item should not be a null pointer.
+ * - The returned item should not be a @c null pointer.
* - Note that when the item is not required, the %SectionTableView control calls ISectionTableViewItemProviderF::DeleteItem() and the application
* deallocates the item.
* @see DeleteItem()
virtual TableViewItem* CreateItem(int sectionIndex, int itemIndex, float itemWidth) = 0;
/**
- * Deletes a specified item.
+ * Deletes the specified item.
*
* @since 2.1
*
* else @c false
* @param[in] sectionIndex The section index
* @param[in] itemIndex The item index
- * @param[in] pItem The pointer to TableViewItem to delete
+ * @param[in] pItem A pointer to TableViewItem to delete
* @remarks
* - An application that uses the SectionTableView control must implement this method.
* - Using this method, an application can deallocate the item.
virtual bool DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pItem) = 0;
/**
- * Updates a specified item.
+ * Updates the specified item.
*
* @since 2.1
*
* @param[in] sectionIndex The section index
* @param[in] itemIndex The item index
- * @param[in] pItem The pointer to TableViewItem to update
+ * @param[in] pItem A pointer to TableViewItem to update
* @remarks
* - An application that uses the SectionTableView control must implement this method.
* - This method is called when the modification of an item is requested.
virtual void UpdateItem(int sectionIndex, int itemIndex, TableViewItem* pItem) = 0;
/**
- * Gets the header text of a specified section.
+ * Gets the header text of the specified section.
*
* @since 2.1
*
*
* @since 2.1
*
- * @return @c true if the section has the header, @n
+ * @return @c true if the section has a header, @n
* else @c false
* @param[in] sectionIndex The index of the section
* @remarks An application that uses the SectionTableView control must implement this method.
virtual bool HasSectionHeader(int sectionIndex) = 0;
/**
- * Gets the footer text of a specified section.
+ * Gets the footer text of the specified section.
*
* @since 2.1
*
*
* @since 2.1
*
- * @return @c true if the section has the footer, @n
+ * @return @c true if the section has a footer, @n
* else @c false
* @param[in] sectionIndex The index of the section
* @remarks An application that uses the SectionTableView control must implement this method.
* @since 2.0
*
* @param[in] source The source of the event
- * @remarks This method is invoked when an divider is double pressed.
+ * @remarks This method is invoked when a divider is double pressed.
*/
virtual void OnDividerDoublePressed(Tizen::Ui::Controls::SplitPanel& source) = 0;
*
* @since 2.0
*
- * @return An item of the TableView
+ * @return The item of the TableView
* @param[in] itemIndex The item index
* @param[in] itemWidth The width of the item
* @remarks
* - An application that uses the TableView control must implement this method.
* - This method is expected to return an item that is allocated on a heap memory.
* - The returned item can be a %TableViewItem or a class derived from TableViewItem.
- * - The returned item should not be a null pointer.
+ * - The returned item should not be a @c null pointer.
* - Note that when the item is not required, the %TableView control calls ITableViewItemProvider::DeleteItem(),
* allowing the application to deallocate the item.
* @see DeleteItem()
* @return @c true if the item is deallocated by this method, @n
* else @c false
* @param[in] itemIndex The item index
- * @param[in] pItem The pointer to TableViewItem to delete
+ * @param[in] pItem A pointer to TableViewItem to delete
* @remarks
* - An application that uses the TableView control must implement this method.
* - Using this method, an application can deallocate the item.
* @since 2.0
*
* @param[in] itemIndex The item index
- * @param[in] pItem The pointer to TableViewItem to update
+ * @param[in] pItem A pointer to TableViewItem to update
* @remarks
* - An application that uses the TableView control must implement this method.
* - This method is called when the modification of an item is requested.
virtual ~ITableViewItemProviderF(void) {}
/**
- * Gets the total number of items in a specified group.
+ * Gets the total number of items in the specified group.
*
* @since 2.1
*
virtual int GetItemCount(void) = 0;
/**
- * Creates a specified item.
+ * Creates the specified item.
*
* @since 2.1
*
- * @return An item of the TableView
+ * @return The item of the TableView
* @param[in] itemIndex The item index
* @param[in] itemWidth The width of the item
* @remarks
* - An application that uses the TableView control must implement this method.
* - This method is expected to return an item that is allocated on a heap memory.
* - The returned item can be a %TableViewItem or a class derived from TableViewItem.
- * - The returned item should not be a null pointer.
+ * - The returned item should not be a @c null pointer.
* - Note that when the item is not required, the %TableView control calls ITableViewItemProvider::DeleteItem(),
* allowing the application to deallocate the item.
* @see DeleteItem()
virtual TableViewItem* CreateItem(int itemIndex, float itemWidth) = 0;
/**
- * Deletes a specified item.
+ * Deletes the specified item.
*
* @since 2.1
*
* @return @c true if the item is deallocated by this method, @n
* else @c false
* @param[in] itemIndex The item index
- * @param[in] pItem The pointer to TableViewItem to delete
+ * @param[in] pItem A pointer to TableViewItem to delete
* @remarks
* - An application that uses the TableView control must implement this method.
* - Using this method, an application can deallocate the item.
virtual bool DeleteItem(int itemIndex, TableViewItem* pItem) = 0;
/**
- * Updates a specified item.
+ * Updates the specified item.
*
* @since 2.1
*
* @param[in] itemIndex The item index
- * @param[in] pItem The pointer to TableViewItem to update
+ * @param[in] pItem A pointer to TableViewItem to update
* @remarks
* - An application that uses the TableView control must implement this method.
* - This method is called when the modification of an item is requested.
* must be freed after they are passed to Additem()/InsertItem()/SetItem() to
* minimize memory usage. @n
*
+ * The following example demonstrates how to use the %IconList class.
+ *
* Example:
*
* @image html ui_controls_iconlist.png
/**
* @if OSPDEPREC
* The object is not fully constructed after this constructor is called. @n
- * For full construction, the IconList::Construct() method must be called right after calling this constructor.
+ * For full construction, the IconList::Construct() method must be called right after calling this constructor.
*
* @brief <i> [Deprecated] </i>
* @deprecated This class is deprecated. Instead of using this class, use the IconListView class.
* @return An error code
* @param[in] rect An instance of the Graphics::Rectangle class @n
* This instance represents the X and Y coordinates of the top-left corner of the created %IconList along with
- * the width and height. @n
+ * the width and height.
* @param[in] style The style set of %IconList
* @param[in] itemWidth The width of the items in the %IconList
* @param[in] itemHeight The height of the items in the %IconList
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - The contents of the specified texts and bitmaps are copied and kept by %IconList.
- * Call RefreshItem() to update item images.
+ * Call RefreshItem() to update item images.
* - To display text in multi-lines or to denote the end of line, use '\\n'.
* @endif
*/
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*
- * @remarks This method can only be used when the style of the list allows selection (ICON_LIST_STYLE_MARK).
- * @remarks The method only changes the state of the list item. %IconList needs to be redrawn to reflect the change on the screen.
+ * @remarks
+ * - This method can only be used when the style of the list allows selection (ICON_LIST_STYLE_MARK).
+ * - The method only changes the state of the list item. %IconList needs to be redrawn to reflect the change on the screen.
* @endif
*/
result SetItemChecked(int index, bool check);
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks This method can only be used when the style of the list allows multiple selections (ICON_LIST_STYLE_MARK).
- * @remarks The method only changes the states of the list items. %IconList needs to be redrawn to reflect the changes on the screen.
+ * @remarks
+ * - This method can only be used when the style of the list allows multiple selections (ICON_LIST_STYLE_MARK).
+ * - The method only changes the states of the list items. %IconList needs to be redrawn to reflect the changes on the screen.
* @endif
*/
result SetAllItemsChecked(bool check);
/**
* @if OSPDEPREC
- * Gets the next checked items at the specified index of the %IconList control.
+ * Gets the next checked item at the specified index of the %IconList control.
*
* @brief <i> [Deprecated] </i>
* @deprecated This class is deprecated. Instead of using this class, use the IconListView class.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If @c size is less than the minimum size, this method fails. The minimum font size is 6 on devices of high screen density.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - If @c size is less than the minimum size, this method fails. The minimum font size is 6 on devices of high screen density.
* @endif
*/
void SetTextSize(int size);
* @since 2.0
*
* @param[in] position The position of the checkbox of the current %IconList control
- * @remarks This method changes the position of the checkbox image displayed for the "selected" item(s), when the style of %IconList is either
- * ICON_LIST_STYLE_RADIO or ICON_LIST_STYLE_MARK.
+ * @remarks This method changes the position of the checkbox image displayed for the "selected" item(s),
+ * when the style of %IconList is either @c ICON_LIST_STYLE_RADIO or @c ICON_LIST_STYLE_MARK.
* @endif
*/
void SetCheckBoxPosition(IconListCheckBoxPosition position);
//
/**
* @file FUiCtrlIconListTypes.h
- * @brief This is the header file for the enumerations of the IconList class.
+ * @brief This is the header file for the %IconList enumerations.
*
* This header file contains the declarations of the enumerations of the IconList class.
*
*/
enum IconListStyle
{
- ICON_LIST_STYLE_NORMAL = 0, /**< @if OSPDEPREC The No mark or radio check @endif */
+ ICON_LIST_STYLE_NORMAL = 0, /**< @if OSPDEPREC No mark or radio check @endif */
ICON_LIST_STYLE_RADIO, /**< @if OSPDEPREC The radio style for single selection @endif */
ICON_LIST_STYLE_MARK, /**< @if OSPDEPREC The mark style for multiple selection @endif */
};
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct(const Tizen::Graphics::Rectangle&, const Tizen::Graphics::Dimension&, IconListViewStyle, IconListViewScrollDirection, IconListViewScrollStyle) method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n For full construction,
+ * the Construct(const Tizen::Graphics::Rectangle&, const Tizen::Graphics::Dimension&, IconListViewStyle, IconListViewScrollDirection,
+ * IconListViewScrollStyle) method must be called right after calling this constructor.
*
* @since 2.0
*/
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_SYSTEM A system error has occurred.
- * @remarks A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
- * @remarks The number of items to be displayed on a screen is calculated based on %IconListView size, item size, item spacing, and margins. @n
- * %IconListView cannot display more than @c 256 items on the screen at once.
- * @remarks The actual size of bitmap to be displayed in %IconListView is smaller than the specified size when the border style is @c ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW.
+ * @remarks
+ * - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
+ * - The number of items to be displayed on a screen is calculated based on %IconListView size, item size, item spacing, and margins. @n
+ * %IconListView cannot display more than @c 256 items on the screen at once.
+ * - The actual size of bitmap to be displayed in %IconListView is smaller than the specified size when the border style
+ * is @c ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW.
*/
result Construct(const Tizen::Graphics::Rectangle& rect, const Tizen::Graphics::Dimension& itemBitmapSize, IconListViewStyle style = ICON_LIST_VIEW_STYLE_NORMAL, IconListViewScrollDirection direction = ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL, IconListViewScrollStyle scrollStyle = ICON_LIST_SCROLL_STYLE_FADE_OUT);
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_SYSTEM A system error has occurred.
- * @remarks A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
- * @remarks The number of items to be displayed on a screen is calculated based on %IconListView size, item size, item spacing, and margins. @n
- * %IconListView cannot display more than @c 256 items on the screen at once.
- * @remarks The actual size of bitmap to be displayed in %IconListView is smaller than the specified size when the border style is @c ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW.
+ * @remarks
+ * - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
+ * - The number of items to be displayed on a screen is calculated based on %IconListView size, item size, item spacing, and margins. @n
+ * %IconListView cannot display more than @c 256 items on the screen at once.
+ * - The actual size of bitmap to be displayed in %IconListView is smaller than the specified size when the border style
+ * is @c ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, const Tizen::Graphics::FloatDimension& itemBitmapSize, IconListViewStyle style = ICON_LIST_VIEW_STYLE_NORMAL, IconListViewScrollDirection direction = ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL, IconListViewScrollStyle scrollStyle = ICON_LIST_SCROLL_STYLE_FADE_OUT);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] provider The item provider to create and delete items
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks If an item provider is not set for %IconListView, it does not work. @n
- * The specified @c provider should be allocated in heap memory.
+ * @remarks If an item provider is not set for %IconListView, it does not work. @n
+ * The specified @c provider should be allocated in heap memory.
*/
result SetItemProvider(IIconListViewItemProvider& provider);
* @param[in] pBitmap The background bitmap
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks When @c pBitmap is @c null, %IconListView does not have a background bitmap. The default value for the background bitmap is @c null.
- * @remarks The background bitmap has priority over the background color. When both the background bitmap and the background color are specified,
- * only the bitmap is displayed.
+ * @remarks
+ * - When @c pBitmap is @c null, %IconListView does not have a background bitmap. The default value for the background bitmap is @c null.
+ * - The background bitmap has priority over the background color. When both the background bitmap and the background color
+ * are specified, only the bitmap is displayed.
*/
result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] color The background color
* @exception E_SUCCESS The method is successful.
- * @remarks This method sets the alpha value of the specified color to @c 255, when a device does not support @c 32 bit color space.
- * @remarks The background bitmap has priority over the background color. When both the background bitmap and the background color are specified,
- * only the bitmap is displayed.
+ * @remarks
+ * - This method sets the alpha value of the specified color to @c 255, when a device does not support @c 32 bit color space.
+ * - The background bitmap has priority over the background color. When both the background bitmap and the background color
+ * are specified, only the bitmap is displayed.
*/
result SetBackgroundColor(const Tizen::Graphics::Color& color);
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @exception E_OUT_OF_RANGE The specified @c index is out of range.
- * @remarks This method can only be used when the style of the list allows selection.
- * @remarks This method only changes the state of the list item. %IconListView needs to be redrawn to reflect the change on the screen.
+ * @remarks
+ * - This method can only be used when the style of the list allows selection.
+ * - This method only changes the state of the list item. %IconListView needs to be redrawn to reflect the change on the screen.
*/
result SetItemChecked(int index, bool check);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] enable Set to @c true to enable touch animation, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks If you want to use a separate selected bitmap, the animation effect must be disabled.
- * @remarks In case a touch animation is disabled, the normal bitmap of IconListViewItem is displayed in response to touch interaction if the
- * selected bitmap of %IconListViewItem is @c null.
+ * @remarks
+ * - If you want to use a separate selected bitmap, the animation effect must be disabled.
+ * - In case a touch animation is disabled, the normal bitmap of IconListViewItem is displayed in response to touch
+ * interaction if the selected bitmap of %IconListViewItem is @c null.
*/
result SetTouchAnimationEnabled(bool enable);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] index The index of the item
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @param[in] pixel The amount of pixels to scroll
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c pixel is out of range.
- * @remarks If you call ScrollByPixel() with negative @c pixel when position of scroll is already top of contents then it will return @c E_OUT_OF_RANGE.
- * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE.
+ * @remarks If you call ScrollByPixel() with negative @c pixel when the position of scroll is already at the top of the contents then it will
+ * return @c E_OUT_OF_RANGE.
+ * Likewise, in case of positive @c pixel at the bottom position of the scroll it will also return @c E_OUT_OF_RANGE.
*/
result ScrollByPixel(int pixel);
*
* @since 2.1
*
- * @return An error code
+ * @return An error code
* @param[in] pixel The amount of pixels to scroll
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c pixel is out of range.
- * @remarks If you call ScrollByPixel() with negative @c pixel when position of scroll is already top of contents then it will return @c E_OUT_OF_RANGE.
- * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE.
+ * @remarks If you call ScrollByPixel() with negative @c pixel when the position of scroll is already at the top of the contents then it will
+ * return @c E_OUT_OF_RANGE.
+ * Likewise, in case of positive @c pixel at the bottom position of the scroll it will also return @c E_OUT_OF_RANGE.
*/
result ScrollByPixel(float pixel);
* @param[in] type The type of change of an item
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
- * That is, %IconListView cannot execute RefreshList() before first drawn.
+ * That is, %IconListView cannot execute RefreshList() before it is first drawn.
* @exception E_SYSTEM A system error has occurred.
* @exception E_OUT_OF_RANGE The specified @c index is out of range.
*/
*
* @since 2.0
*
- * The %IconListViewItem class displays an IconListView item. It comprises of bitmap images and text. The value is set using the %IconListView control.
+ * The %IconListViewItem class displays an IconListView item. It comprises of bitmap images and text. The value is set using
+ * the %IconListView control.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
*/
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct(const Tizen::Graphics::Bitmap&, const Tizen::Base::String*, const Tizen::Graphics::Bitmap*, const Tizen::Graphics::Bitmap*) method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n For full construction,
+ * the Construct(const Tizen::Graphics::Bitmap&, const Tizen::Base::String*, const Tizen::Graphics::Bitmap*, const Tizen::Graphics::Bitmap*) method
+ * must be called right after calling this constructor.
*
* @since 2.0
*/
* @param[in] pHighlightedBitmap The displayed bitmap image when an item is highlighted
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @remarks If @c pSelectedBitmap or @c pHighlightedBitmap is @c null, @c bitmap plays its role.
+ * @remarks If the specified @c pSelectedBitmap or @c pHighlightedBitmap is @c null, @c bitmap plays its role.
*/
result Construct(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Base::String* pText = null, const Tizen::Graphics::Bitmap* pSelectedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null);
/**
* @file FUiCtrlIconListViewTypes.h
- * @brief This is the header file for the enumerations of the IconListView class.
+ * @brief This is the header file for the enumerations of the %IconListView class.
*
* This header file contains the declarations of the enumerations of the IconListView class.
* These enumerations define the various properties of the %IconListView control.
/**
* @enum InputStyle
*
- * Defines the input style.
+ * Defines the input styles.
*
* @since 2.0
*/
*
* @brief <i> [Deprecated] </i>
* @deprecated We no longer provide a method to specify the list of styles which the user can set the keypad to, @n
-* or the current mode to initially set the keypad to, from this list. It is recommended to use the styles offered KeypadStyle enumeration instead.
+* or the current mode to initially set the keypad to, from this list. It is recommended to use the styles offered by KeypadStyle enumeration instead.
* @since 2.0
* @endif
*/
*
* @return An error code
* @param[in] keypadStyle The style of %Keypad
- * @param[in] limitLength The limit of the length of text in EditField
+ * @param[in] limitLength The limit of the length of the text in EditField
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or @n
- * the specified @c limitLength is less than or equal to @c 0.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid. @n
+ * - The specified @c limitLength is less than or equal to @c 0.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - If the keypad style is set to password, the input mode category is ignored.
* - The orientation mode of the keypad is decided based on the G-sensor value.
* - The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
+ * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
*/
result Construct(KeypadStyle keypadStyle, int limitLength);
* @return An error code
* @param[in] keypadStyle The style of %Keypad
* @param[in] category The initial category that the keypad would show first
- * @param[in] limitLength The limit of the length of text in EditField
+ * @param[in] limitLength The limit of the length of the text in EditField
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or @n
- * the specified @c limitLength is less than or equal to @c 0.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid. @n
+ * - The specified @c limitLength is less than or equal to @c 0.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - If the keypad style is set to password, the input mode category is ignored.
*
* @since 2.0
* @return @c true if the text prediction is enabled, @n
- * else @c false
+ * else @c false
* @see SetTextPredictionEnabled()
*/
bool IsTextPredictionEnabled(void) const;
* Enables or disables the text prediction.
*
* @since 2.0
- * @param[in] enable Set to @c true to enable the text prediction, @n
- * else @c false
+ * @param[in] enable Set to @c true to enable the text prediction, @n
+ * else @c false
* @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_OPERATION This operation is not supported.
bool IsSingleLineEnabled(void) const;
/**
- * Adds a ITextEventListener instance. @n
+ * Adds an ITextEventListener instance. @n
* The added listener can listen to text changed events when they are fired.
*
* @since 2.0
void AddTextEventListener(Tizen::Ui::ITextEventListener& listener);
/**
- * Removes a ITextEventListener instance. @n
+ * Removes an ITextEventListener instance. @n
* The removed listener cannot listen to events when they are fired.
*
* @since 2.0
void SetEditTextFilter(IEditTextFilter* pFilter);
/**
- * Sends opaque command to the input method.
+ * Sends an opaque command to the input method.
*
* @since 2.1
*
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
- * - To display text in multi-lines or to denote the end of line use '\\n'.
- * - The size of the control must be within the range defined by the minimum size and the maximum size.
+ * - To display text in multi-lines or to denote the end of the line use '\\n'.
+ * - The size of the control must be within the range defined by the minimum size and maximum size.
*/
result Construct(const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& text);
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
- * - To display text in multi-lines or to denote the end of line use '\\n'.
- * - The size of the control must be within the range defined by the minimum size and the maximum size.
+ * - To display text in multi-lines or to denote the end of the line use '\\n'.
+ * - The size of the control must be within the range defined by the minimum size and maximum size.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& text);
* @since 2.0
*
* @param[in] text The string to set
- * @remarks To display text in multi-lines or to denote the end of line use '\\n'.
+ * @remarks To display text in multi-lines or to denote the end of the line use '\\n'.
*/
void SetText(const Tizen::Base::String& text);
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
- * - If @c size is less than the minimum size, this method fails. The minimum font size is 6 on devices of high screen density.
+ * - If @c size is less than the minimum size, this method fails. The minimum font size is @c 6 on devices of high screen density.
*/
void SetTextConfig(int size, LabelTextStyle style);
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
- * - If @c size is less than the minimum size, this method fails. The minimum font size is 6 on devices of high screen density.
+ * - If @c size is less than the minimum size, this method fails. The minimum font size is @c 6 on devices of high screen density.
*/
void SetTextConfig(float size, LabelTextStyle style);
* @since 2.0
*
* @return An error code
- * @param[in] topMargin The top margin.
- * @param[in] leftMargin The left margin.
+ * @param[in] topMargin The top margin
+ * @param[in] leftMargin The left margin
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The specified @c size must be greater than @c 0.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The specified @c size must be greater than @c 0.
+ * @remarks The margin values must be greater than or equal to 0.
* @see GetTopMargin()
* @see GetLeftMargin()
*/
* @since 2.1
*
* @return An error code
- * @param[in] topMargin The top margin.
- * @param[in] leftMargin The left margin.
+ * @param[in] topMargin The top margin
+ * @param[in] leftMargin The left margin
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The specified @c size must be greater than @c 0.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified input parameter is invalid.
+ * - The specified @c size must be greater than @c 0.
+ * @remarks The margin values must be greater than or equal to 0.0f
* @see GetTopMargin()
* @see GetLeftMargin()
*/
* @since 2.0
*
* @return The size of the left margin, @n
- * else @c -1 if an error occurs.
+ * else @c -1 if an error occurs
* @see SetMargin()
*/
int GetLeftMargin(void) const;
* @since 2.1
*
* @return The size of the left margin, @n
- * else @c -1.0f if an error occurs.
+ * else @c -1.0f if an error occurs
* @see SetMargin()
*/
float GetLeftMarginF(void) const;
//
/**
* @file FUiCtrlLabelTypes.h
-* @brief This is the header file for the LabelTextStyle enumeration.
+* @brief This is the header file for the %LabelTextStyle enumeration.
*
* This header file contains the declarations of the LabelTextStyle enumeration.
*/
enum LabelTextStyle
{
LABEL_TEXT_STYLE_NORMAL, /**< The plain text style */
- LABEL_TEXT_STYLE_BOLD, /**< The bold text style */
+ LABEL_TEXT_STYLE_BOLD, /**< The bold text style */
LABEL_TEXT_STYLE_ITALIC, /**< The italic text style */
};
enum LabelContentHint
{
LABEL_CONTENT_HINT_DYNAMIC, /**< The contents will change */
- LABEL_CONTENT_HINT_STATIC /**< The contents will not change */
+ LABEL_CONTENT_HINT_STATIC /**< The contents will not change */
};
}}} // Tizen::Ui::Controls
* any item event listeners that have registered an interest in item events generated
* by this list.
*
- * If an application wants to perform something based on a list being selected and
+ * If an application wants to perform an action based on a list being selected and
* deselected, it must realize IItemEventListener and register the listener to
* receive events from this list, by calling the list's AddItemEventListener() method.
*
* If the application directly allocates resources, the resources must be deleted
* (for example, text or bitmap).
*
+ * The following example demonstrates how to use the %List class.
+ *
* Example:
*
* @image html ui_controls_list.png
* @param[in] pText2 A pointer to the second string
* @param[in] pBitmap1 A pointer to the first normal bitmap
* @param[in] pBitmap2 A pointer to the second normal bitmap
- * @param[in] itemId The item ID for this item
- * @exception E_SUCCESS The method is successful.
+ * @param[in] itemId The item ID for this item
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is less than @c 0 or greater than or equal to the item count.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks
* - The contents of the specified texts and bitmaps are copied and kept in the list.
* - If the size of the text exceeds the displayable area, the text will slide automatically when a list item is selected.
* @since 2.0
*
* @return The item text color
- * @param[in] textIndex The index of the text, @n
- * else RGBA(0, 0, 0, 0) if the instance is invalid
+ * @param[in] textIndex The index of the text, @n
+ * else RGBA(0, 0, 0, 0) if the instance is invalid
* @endif
*/
Tizen::Graphics::Color GetItemTextColor(ListItemText textIndex) const;
* @deprecated This class is deprecated. Instead of using this class, use the ListView class.
* @since 2.0
*
- * @param[in] textIndex The text index of the list item format to slide
+ * @param[in] textIndex The text index of the list item format to slide
* @remarks If text slide is enabled, the texts which are too long to fit in the given list item slide show the remnant contents when a user touches
* the item for a long time.
* @endif
* @param[in] row1Height The row1 height of the list item
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks In logical pixels, the minimum height of the rows is 48.
+ * @remarks In logical pixels, the minimum height of the rows is @c 48.
* @endif
*/
result SetRow1Height(int row1Height);
* @param[in] row2Height The row2 height of the list item
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks In logical pixels, the minimum height of the rows is 48.
+ * @remarks In logical pixels, the minimum height of the rows is @c 48.
* @endif
*/
result SetRow2Height(int row2Height);
/**
* @class ListContextItem
- * @brief This class defines common behavior for %ListContextItem.
+ * @brief This class defines the common behavior for %ListContextItem.
*
* @since 2.0
*
* @since 2.0
* @return An error code
* @param[in] elementId The ID of the element
- * @param[in] normalBitmap The bitmap displayed when the item is in normal status
+ * @param[in] normalBitmap The bitmap displayed when the item is in the normal status
* @param[in] pressedBitmap The bitmap displayed when the item is pressed
* @param[in] pHighlightedBitmap The bitmap displayed when the item is highlighted
* @param[in] enable Set to @c true, to enable this element, @n
* @return An error code
* @param[in] elementId The ID of the element
* @param[in] text The text to display
- * @param[in] normalBitmap The bitmap displayed when the item is in normal status
+ * @param[in] normalBitmap The bitmap displayed when the item is in the normal status
* @param[in] pressedBitmap The bitmap displayed when the item is pressed
* @param[in] pHighlightedBitmap The bitmap displayed when the item is highlighted
* @param[in] enable Set to @c true, to enable this element, @n
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - The background bitmap has priority over the background color. When both the background bitmap and the background color are specified, only
- * the bitmap is displayed. @n
+ * the bitmap is displayed. @n
* - When @c pBitmap is set as @c null, the background color of the context item is drawn.
*/
result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap);
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c elementId is invalid.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @remarks If the element text color is not set by the application, the default color is set by theme.
+ * @remarks If the element text color is not set by the application, the default color is set by the theme.
* @see GetElementTextColor()
*/
result SetElementTextColor(int elementId, ListContextItemElementStatus status, const Tizen::Graphics::Color& textColor);
/**
* @class ListItemBase
- * @brief This class defines common behavior for a %ListItemBase.
+ * @brief This class defines the common behavior for a %ListItemBase.
*
* @since 2.0
*
- * The %ListItemBase class is a base class, which represents a list item which is the unit of handling of the ListView or
+ * The %ListItemBase class is a base class, which represents a list item which is the unit of handling the ListView or
* GroupedListView classes.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
result SetBackgroundBitmap(ListItemDrawingStatus status, const Tizen::Graphics::Bitmap* pBitmap);
/**
- * Sets the background color of the item which is displayed when the item is in specified state.
+ * Sets the background color of the item which is displayed when the item is in the specified state.
*
* @since 2.0
*
* @since 2.0
*
* @return An error code
- * @param[in] pItem The %ListContextItem instance
+ * @param[in] pItem The ListContextItem instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
* @since 2.0
*
* @return An error code
- * @param[in] text Description text
+ * @param[in] text The description text
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*/
//
/**
* @file FUiCtrlListTypes.h
- * @brief This is the header file for the List enumerations.
+ * @brief This is the header file for the %List enumerations.
*
* This header file contains the declarations of the List enumerations.
*/
namespace Tizen { namespace Ui { namespace Controls
{
-//
-//This integer is for internal use only. Using this integer can cause behavioral, security-related,
-//and consistency-related issues in the application.
-//
-static const int LIST_ITEM_NOTFOUND = 0;
-
/**
* The integer value that represents the unspecified item ID
*
{
public:
/**
- * The object is not fully constructed after this constructor is
- * called. @n For full construction, the %Construct() method must be
- * called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the %Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
* @exception E_OUT_OF_RANGE The specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
* @remarks This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method
+ * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method
* should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result ScrollToItem(int index);
* @since 2.0
*
* @return An error code
- * @param[in] index The item index
- * @param[in] check The check status
+ * @param[in] index The item index
+ * @param[in] check The check status
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE A specified input parameter is invalid.
* @exception E_INVALID_OPERATION The item is disabled.
* @exception E_SYSTEM A system error has occurred.
* @remarks This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method
+ * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method
* should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result SetItemChecked(int index, bool check);
* else @c false
* @param[in] index The item index
* @remarks This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method
+ * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method
* should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
bool IsItemChecked(int index) const;
* @exception E_OUT_OF_RANGE A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
* @remarks This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView,
+ * If this method needs to be called early in the lifecycle of %ListView,
* then UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*
*/
* else @c false
* @param[in] index The item index
* @remarks This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method
+ * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method
* should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
bool IsItemEnabled(int index) const;
* @remarks
* - If no description text is set to the item of the specified index, this method does not show the description text.
* - This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method
- * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method
+ * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result ShowItemDescriptionText(int index);
* @exception E_OUT_OF_RANGE The specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
* @remarks This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method
- * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method
+ * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result HideItemDescriptionText(int index);
* @since 2.0
*
* @return An error code
- * @param[in] index The item index
- * @param[in] type The item to add, remove, or modify
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_SYSTEM A system error has occurred.
+ * @param[in] index The item index
+ * @param[in] type The item to add, remove, or modify
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks
- * - 3 refresh types are supported:@c LIST_REFRESH_TYPE_ITEM_ADD, @c LIST_REFRESH_TYPE_ITEM_REMOVE, and @c LIST_REFRESH_TYPE_ITEM_MODIFY. @n
- * @c LIST_REFRESH_TYPE_ITEM_ADD is used when new data is added to the data model. @n
- * @c LIST_REFRESH_TYPE_ITEM_REMOVE is used when a data is deleted from the data model. @n
- * @c LIST_REFRESH_TYPE_ITEM_MODIFY is used when an existing data has changes and needs to be updated. @n
- * Calling this method with @c LIST_REFRESH_TYPE_ITEM_MODIFY invokes the item provider to call DeleteItem() and CreateItem() for the given index in
- * sequence.
+ * - 3 refresh types are supported: @c LIST_REFRESH_TYPE_ITEM_ADD, @c LIST_REFRESH_TYPE_ITEM_REMOVE, and @c LIST_REFRESH_TYPE_ITEM_MODIFY. @n
+ * @c LIST_REFRESH_TYPE_ITEM_ADD is used when new data is added to the data model. @n
+ * @c LIST_REFRESH_TYPE_ITEM_REMOVE is used when data is deleted from the data model. @n
+ * @c LIST_REFRESH_TYPE_ITEM_MODIFY is used when an existing data has changes and needs to be updated. @n
+ * Calling this method with @c LIST_REFRESH_TYPE_ITEM_MODIFY invokes the item provider to call DeleteItem() and CreateItem() for the
+ * given index in sequence.
* - This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method
- * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
-This method internally calls Invalidate(), so you do not need to call them to update the screen.
+ * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method
+ * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * This method internally calls Invalidate(), so you do not need to call them to update the screen.
*/
result RefreshList(int index, ListRefreshType type);
* @return An error code
* @param[in] index The item index
* @param[in] elementId The item element ID
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks This method internally calls Invalidate(), so you do not need to call them to update the screen.
*/
result RefreshList(int index, int elementId);
* @remarks
* - The method returns @c -1 when there is no list item at the specified position.
* - This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method
- * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method
+ * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*
*/
int GetItemIndexFromPosition(int x, int y) const;
* @param[in] y The Y position of the point
* @remarks
* - This method returns @c -1 when there is no list item at the specified position.
- * - This method should be called only after list items are created. @n If this method needs to
- * be called early in the lifecycle of the ListView, then the UpdateList() method should be called explicitly
- * (for example, during Tizen::Ui::Control::OnInitializing()).
+ * - This method should be called only after list items are created. @n
+ * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method
+ * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
int GetItemIndexFromPosition(float x, float y) const;
* @return The index of the item
* @param[in] position The position of the point, @n
* else @c -1 if there is no list item at the specified position
- * @remarks This method should be called only after list items are created. @n If this method needs to
- * be called early in the lifecycle of the ListView, then the UpdateList() method should be called
- * explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * @remarks This method should be called only after list items are created. @n
+ * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method
+ * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const;
* @param[in] position The position of the point, @n
* else @c -1 if there is no list item at the specified position
* @remarks This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView, then the UpdateList() method
+ * If this method needs to be called early in the lifecycle of %ListView, then the UpdateList() method
* should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const;
* @param[out] itemIndex The index of the item
* @param[out] elementId The ID of the element
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred, or @n
- * there is no item at the specified position.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - There is no item at the specified position.
* @remarks
* - The specified @c itemIndex is -1 when there is no list item at the specified position.
* - The specified @c elementId is -1 when there is no element at the specified position.
* - This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView,
- * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * If this method needs to be called early in the lifecycle of %ListView,
+ * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result GetItemIndexFromPosition(int x, int y, int& itemIndex, int& elementId) const;
* @param[out] itemIndex The index of the item
* @param[out] elementId The ID of the element
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred, or @n
- * there is no item at the specified position.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - There is no item at the specified position.
* @remarks
* - The specified @c itemIndex is @c -1 when there is no list item at the specified position.
* - The specified @c elementId is @c -1 when there is no element at the specified position.
* - This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView,
- * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * If this method needs to be called early in the lifecycle of %ListView,
+ * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result GetItemIndexFromPosition(float x, float y, int& itemIndex, int& elementId) const;
* @param[out] itemIndex The index of the item
* @param[out] elementId The ID of the element
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred, or @n
- * there is no item at the specified position.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - There is no item at the specified position.
* @remarks
* - The specified @c itemIndex is -1 when there is no list item at the specified position.
* - The specified @c elementId is -1 when there is no element at the specified position.
* - This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView,
- * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * If this method needs to be called early in the lifecycle of %ListView,
+ * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& itemIndex, int& elementId) const;
* @param[out] itemIndex The index of the item
* @param[out] elementId The ID of the element
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred, or @n
- * there is no item at the specified position.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - There is no item at the specified position.
* @remarks
* - The specified @c itemIndex is @c -1 when there is no list item at the specified position.
* - The specified @c elementId is @c -1 when there is no element at the specified position.
* - This method should be called only after list items are created. @n
- * If this method needs to be called early in the lifecycle of the ListView,
- * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * If this method needs to be called early in the lifecycle of %ListView,
+ * then the UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& itemIndex, int& elementId) const;
* @exception E_SUCCESS The method is successful.
* @remarks
* - The method sets the alpha value of the specified @c color to @c 255, when a device does not support 32bit color space.
- * - The background bitmap has priority over the background color. When both the background bitmap and the background color are specified, only
- * the bitmap image is displayed.
+ * - The background bitmap has priority over the background color. When both the background bitmap and the background color
+ * are specified, only the bitmap image is displayed.
*/
result SetBackgroundColor(const Tizen::Graphics::Color& color);
/**
* @file FUiCtrlListViewTypes.h
- * @brief This is the header file for the List enumerations.
+ * @brief This is the header file for the %List enumerations.
*
* This header file contains the declarations of the List enumerations.
*/
*/
enum ListAnnexStyle
{
- LIST_ANNEX_STYLE_NORMAL = 0, /**< The no style annex */
+ LIST_ANNEX_STYLE_NORMAL = 0, /**< No style annex */
LIST_ANNEX_STYLE_MARK, /**< The mark style annex for multiple selection */
LIST_ANNEX_STYLE_ONOFF_SLIDING, /**< The slider style On/Off */
LIST_ANNEX_STYLE_DETAILED, /**< Detailed style for further interaction */
*/
enum ListScrollItemAlignment
{
- LIST_SCROLL_ITEM_ALIGNMENT_TOP = 0, /**< The item is aligned at the top of the ListView at item scroll*/
+ LIST_SCROLL_ITEM_ALIGNMENT_TOP = 0, /**< The item is aligned at the top of the ListView at item scroll */
LIST_SCROLL_ITEM_ALIGNMENT_BOTTOM /**< The item is aligned at the bottom of the ListView at item scroll */
};
{
public:
/**
- * The object is not fully constructed after this constructor is called. @n
+ * The object is not fully constructed after this constructor is called. @n
* For full construction, the MessageBox::Construct() method must be called right after calling this constructor.
*
* @since 2.0
* @remarks
* - To create a %MessageBox control, call ShowAndWait() after the Construct() method is called.
* - The message box text cannot contain over @c 399 characters.
- * - To display the text in multi-lines or to denote the end of line use '\\n'.
+ * - To display the text in multi-lines or to denote the end of the line use '\\n'.
* - The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
+ * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
* @see ShowAndWait()
*/
result Construct(const Tizen::Base::String& title, const Tizen::Base::String& text, MessageBoxStyle style, unsigned long timeout = 0);
{
public:
/**
- * The object is not fully constructed after this constructor is called. @n
+ * The object is not fully constructed after this constructor is called. @n
* For full construction, the OptionMenu::Construct() method must be called right after calling this constructor.
*
* @since 2.2
*
* @return An error code
* @param[in] text The text string of the item to append
- * @param[in] actionId The action ID set by user @n
- * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
+ * @param[in] actionId The action ID set by user @n
+ * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method has failed.
* @remarks %OptionMenu can have a maximum of @c 12 main items.
* @param[in] pPressedBitmap The pressed bitmap of the item
* @param[in] pHighlightedBitmap The highlighted bitmap of the item
* @param[in] actionId The action ID set by user. @n
- * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
+ * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method has failed.
* @remarks When a user navigates the user interface using the directional keys, @n
* @return An error code
* @param[in] text The text string of the item to append
* @param[in] actionId The action ID set by user @n
- * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
+ * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
* @param[in] normalBitmap The normal bitmap of the item
* @param[in] pPressedBitmap The pressed bitmap of the item
* @param[in] pHighlightedBitmap The highlighted bitmap of the item
* @return An error code
* @param[in] mainIndex The main index
* @param[in] text The text string of the item to set
- * @param[in] actionId The action ID set by user @n
- * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
+ * @param[in] actionId The action ID set by user @n
+ * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified parameter is invalid.
* @exception E_SYSTEM The method has failed.
* @param[in] pPressedBitmap The pressed bitmap of the item
* @param[in] pHighlightedBitmap The highlighted bitmap of the item
* @param[in] actionId The action ID set by user. @n
- * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
+ * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified parameter is invalid.
+ * @exception E_INVALID_ARG A specified parameter is invalid.
* @remarks When a user navigates the user interface using the directional keys, @n
* the selected UI control is highlighted and the control takes the focus.
*/
* @param[in] mainIndex The main index
* @param[in] text The text string of the item to append
* @param[in] actionId The action ID set by user. @n
- * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
+ * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
* @param[in] normalBitmap The normal bitmap of the item
* @param[in] pPressedBitmap The pressed bitmap of the item
* @param[in] pHighlightedBitmap The highlighted bitmap of the item
* @return An error code
* @param[in] mainIndex The main index
* @param[in] text The text string of the item to set
- * @param[in] actionId The action ID set by user @n
- * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
+ * @param[in] actionId The action ID set by user @n
+ * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified parameter is invalid.
* @exception E_SYSTEM The method has failed.
* @param[in] pPressedBitmap The pressed bitmap of the item
* @param[in] pHighlightedBitmap The highlighted bitmap of the item
* @param[in] actionId The action ID set by user. @n
- * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
+ * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified parameter is invalid.
+ * @exception E_INVALID_ARG A specified parameter is invalid.
* @remarks When a user navigates the user interface using the directional keys, @n
* the selected UI control is highlighted and the control takes the focus.
*/
* @param[in] mainIndex The main index
* @param[in] text The text string of the item to set
* @param[in] actionId The action ID set by user. @n
- * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
+ * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
* @param[in] normalBitmap The normal bitmap of the item
* @param[in] pPressedBitmap The pressed bitmap of the item
* @param[in] pHighlightedBitmap The highlighted bitmap of the item
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified parameter is invalid.
+ * @exception E_INVALID_ARG A specified parameter is invalid.
*/
result SetItemAt (int mainIndex, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap=null, const Tizen::Graphics::Bitmap* pHighlightedBitmap=null);
*
* @return The index of the item
* @param[in] actionId The action ID set by user. @n
- * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
+ * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
*/
int GetItemIndexFromActionId(int actionId) const;
* @return An error code
* @param[in] mainIndex The index of the main item
* @param[in] text The text string of the item to append
- * @param[in] actionId The action ID set by user @n
- * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
+ * @param[in] actionId The action ID set by user @n
+ * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified parameter is invalid.
* @exception E_SYSTEM The method has failed.
* @param[in] mainIndex The index of the main item
* @param[in] subIndex The index of the sub-item
* @param[in] text The text string of the item to set
- * @param[in] actionId The action ID set by user. @n
- * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
+ * @param[in] actionId The action ID set by user. @n
+ * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified parameter is invalid.
* @exception E_SYSTEM The method has failed.
* @param[in] mainIndex The index of the main item
* @param[in] subIndex The index of the sub-item
* @param[in] text The text string of the item to set
- * @param[in] actionId The action ID set by user. @n
- * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
+ * @param[in] actionId The action ID set by user. @n
+ * This will be given as a parameter to Tizen::Ui::IActionEventListener::OnActionPerformed() callback.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified parameter is invalid.
* @exception E_SYSTEM The method has failed.
* @param[in] color The item color to set
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The item color for @c OPTION_MENU_ITEM_STATUS_NORMAL is not supported.
- * @remarks The item color for the @c OPTION_MENU_ITEM_STATUS_NORMAL status is always the same as the color of the %OptionMenu control.
+ * The item color for @c OPTION_MENU_ITEM_STATUS_NORMAL is not supported.
+ * @remarks The item color for the @c OPTION_MENU_ITEM_STATUS_NORMAL status is always the same as the color of the %OptionMenu control.
* @see GetItemColor()
*/
result SetItemColor(OptionMenuItemStatus status, const Tizen::Graphics::Color& color);
enum BufferPixelFormat
{
BUFFER_PIXEL_FORMAT_ARGB8888, /**< The ARGB8888 pixel format */
- BUFFER_PIXEL_FORMAT_RGB565, /**< The RGB565 pixel format */
+ BUFFER_PIXEL_FORMAT_RGB565, /**< The RGB565 pixel format */
BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR, /**< The 8 bit Y plane followed by 8 bit 2 X 2 subsampled U and V planes */
BUFFER_PIXEL_FORMAT_NV12, /**< The NV12 pixel format */
BUFFER_PIXEL_FORMAT_UYVY /**< The UYVY pixel format */
* @since 2.1
*
* @return An error code
- * @param[in] rect The location and size of the %OverlayPanel control @n
+ * @param[in] rect The location and size of the %OverlayPanel control @n
* The maximum size is equal to screen size. for example 720 x 1280 on a HD screen, or 480 x 800 on a
* WVGA screen.
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter @c is invalid.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks
* - The size of the control must be within the range defined by the minimum size and the maximum size.
- * - To guarantee the size of the render buffer equal to the size of the %OverlayPanel after constructed, checks bounds of
- * @c rect using EvaluateBounds() method before calling this method.
+ * - To guarantee the size of the render buffer equal to the size of the %OverlayPanel after constructed, check the bounds of
+ * @c rect using EvaluateBounds() method before calling this method.
* - Do not use %OverlayPanel in combination with %OverlayRegion. If used, %OverlayPanel may not work as expected.
- * @see %Tizen::Ui::Container
+ * @see Container
*/
result Construct(const Tizen::Graphics::Rectangle& rect);
* @since 2.1
*
* @return An error code
- * @param[in] rect The location and size of the %OverlayPanel control @n
+ * @param[in] rect The location and size of the %OverlayPanel control @n
* The maximum size is equal to screen size. for example 720 x 1280 on a HD screen, or 480 x 800 on a
* WVGA screen.
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter @c is invalid.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks
* - The size of the control must be within the range defined by the minimum size and the maximum size.
- * - To guarantee the size of the render buffer equal to the size of the %OverlayPanel after constructed, checks bounds of
- * @c rect using EvaluateBounds() method before calling this method.
+ * - To guarantee the size of the render buffer equal to the size of the %OverlayPanel after constructed, check the bounds of
+ * @c rect using EvaluateBounds() method before calling this method.
* - Do not use %OverlayPanel in combination with %OverlayRegion. If used, %OverlayPanel may not work as expected.
- * @see %Tizen::Ui::Container
+ * @see Container
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect);
* camera preview.
* @since 2.0
*
- * @param[in] dim The dimension of the window to draw
+ * @param[in] dim The dimension of the window to draw
*
* @endif
*/
* @since 2.1
*
* @return An error code
- * @param[in] dim The dimension of the window to draw
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @param[in] dim The dimension of the window to draw
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* @remarks
* - A %OverlayPanel becomes displayable only after it has been added to a form.
- * - If you want to resize window to draw render buffer, calls this function after the %OverlayPanel is added to a %Form control
+ * - If you want to resize window to draw render buffer, call this function after the %OverlayPanel is added to a Form control.
* @code
* OverlayPanel* pOverlayPanel = new OverlayPanel();
* pOverlayPanel->Construct(Rectangle(100, 250, 300, 300));
* @since 2.1
*
* @return An error code
- * @param[in] dim The dimension of the window to draw
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @param[in] dim The dimension of the window to draw
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* @remarks
* - A %OverlayPanel becomes displayable only after it has been added to a form.
- * - If you want to resize window to draw render buffer, calls this function after the %OverlayPanel is added to a %Form control
+ * - If you want to resize window to draw render buffer, call this function after the %OverlayPanel is added to a Form control
* @code
* OverlayPanel* pOverlayPanel = new OverlayPanel();
* pOverlayPanel->Construct(FloatRectangle(100.0, 250.0, 300.0, 300.0));
* @since 2.1
*
* @param[in] destDim The dimension of the window to draw
- * @param[in] srcBuffer The source buffer
+ * @param[in] srcBuffer The source buffer
* @param[in] srcDim The source dimension
* @param[in] srcFormat The pixel format of buffer data
* @exception E_SUCCESS The method is successful.
* @since 2.1
*
* @param[in] destDim The dimension of the window to draw
- * @param[in] srcBuffer The source buffer
+ * @param[in] srcBuffer The source buffer
* @param[in] srcDim The source dimension
* @param[in] srcFormat The pixel format of buffer data
* @exception E_SUCCESS The method is successful.
* @since 2.1
*
* @return An error code
- * @param[out] info The information of the background buffer
- * @exception E_SUCCESS The method is successful.
- * @exception E_OPERATION_FAILED The operation has failed.
+ * @param[out] info The information of the background buffer
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OPERATION_FAILED The operation has failed.
* @remarks Currently, this method provides buffer information except the pointer of the RGB color buffer. @n
* Therefore, info.pPixels is always assigned @c null.
*/
* @deprecated This method is deprecated because the renderer aspect ratio is not guaranteed any more.
* @since 2.0
*
- * @param[in] fix Set to @c true if the renderer will display the aspect ratio of the input buffer even if the renderer and input data have
- * different aspect ratios, @n
- * else @c false
+ * @param[in] fix Set to @c true if the renderer will display the aspect ratio of the input buffer even if the renderer and input data have
+ * different aspect ratios, @n
+ * else @c false
* @remarks This method has no effects for hardware accelerated GL backend.
* @endif
*/
*
* @since 2.1
*
- * @return An error code
- * @param[in] option The option for evaluating the bounds of the overlay panel
+ * @return An error code
+ * @param[in] option The option for evaluating the bounds of the overlay panel
* @param[in, out] rect An instance of %Tizen::Graphics::Rectangle that represents the validated bounds of %OverlayPanel @n
- * The width and height of the input rectangle must be greater than @c 0.
- * @param[out] modified A boolean flag that indicates whether the specified @c rectangle is modified
- * @exception E_SUCCESS The method is successful.
+ * The width and height of the input rectangle must be greater than @c 0.
+ * @param[out] modified A boolean flag that indicates whether the specified @c rectangle is modified
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter @c is invalid.
* @exception E_UNSUPPORTED_OPTION The specified input parameter @c is not supported.
* @exception E_OPERATION_FAILED The operation has failed.
* - Due to the hardware accelerated rendering, there are limitations for an overlay panel.
* - The hardware capability for an overlay panel is checked by using the GetWidthUnit(), GetHeightUnit() and GetMaxCount().
* - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations of the overlay
- * panel. In such cases, Construct() will return @c E_INVALID_ARG. @n
- * To prevent this kind of problem, the application must the this method to get a validated bounds
+ * panel. In such cases, Construct() will return @c E_INVALID_ARG. @n
+ * To prevent this kind of problem, the application must the this method to get a validated bounds.
* - The specific error code can be accessed using the GetLastResult() method.
*/
static result EvaluateBounds(OverlayPanelEvaluationOption option, Tizen::Graphics::Rectangle& rect, bool& modified);
*
* @since 2.1
*
- * @return An error code
- * @param[in] option The option for evaluating the bounds of the overlay panel
+ * @return An error code
+ * @param[in] option The option for evaluating the bounds of the overlay panel
* @param[in, out] rect An instance of %Tizen::Graphics::FloatRectangle that represents the validated bounds of %OverlayPanel @n
- * The width and height of the input float rectangle must be greater than @c 0.
- * @param[out] modified A boolean flag that indicates whether the specified @c rectangle is modified
- * @exception E_SUCCESS The method is successful.
+ * The width and height of the input float rectangle must be greater than @c 0.
+ * @param[out] modified A boolean flag that indicates whether the specified @c rectangle is modified
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter @c is invalid.
* @exception E_UNSUPPORTED_OPTION The specified input parameter @c is not supported.
* @exception E_OPERATION_FAILED The operation has failed.
* - Due to the hardware accelerated rendering, there are limitations for an overlay panel.
* - The hardware capability for an overlay panel is checked by using the GetWidthUnit(), GetHeightUnit() and GetMaxCount().
* - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations of the overlay
- * panel. In such cases, Construct() will return E_INVALID_ARG. @n
- * To prevent this kind of problem, the application must use this method to get a validated bounds
+ * panel. In such cases, Construct() will return E_INVALID_ARG. @n
+ * To prevent this kind of problem, the application must use this method to get a validated bounds.
* - The specific error code can be accessed using the GetLastResult() method.
*/
static result EvaluateBounds(OverlayPanelEvaluationOption option, Tizen::Graphics::FloatRectangle& rect, bool& modified);
*
* @return
* - A list of the pixel formats supported by the %OverlayPanel class, @n
- * else @c null if no pixel format is supported or an exception occurs
+ * else @c null if no pixel format is supported or an exception occurs
+ * @remarks
* - The specific error code can be accessed using the GetLastResult() method.
* - The return value and each item in the list must be deleted by the caller.
* - The format list can vary depending on the device. After checking the supported formats using this method,
- * it's better to use a proper pixel format.
+ * it is better to use a proper pixel format.
*/
static Tizen::Base::Collection::IListT<BufferPixelFormat>* GetSupportedBufferPixelFormatListN(void);
enum OverlayRegionBufferPixelFormat
{
OVERLAY_REGION_BUFFER_PIXEL_FORMAT_ARGB8888 = 1, /**< The ARGB8888 pixel format */
- OVERLAY_REGION_BUFFER_PIXEL_FORMAT_RGB565, /**< The RGB565 pixel format */
- OVERLAY_REGION_BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR, /**< The 8-bit Y plane followed by the 8-bit 2x2 subsampled U and V planes */
- OVERLAY_REGION_BUFFER_PIXEL_FORMAT_NV12, /**< The NV12 pixel format */
- OVERLAY_REGION_BUFFER_PIXEL_FORMAT_UYVY, /**< The UYVY pixel format */
+ OVERLAY_REGION_BUFFER_PIXEL_FORMAT_RGB565, /**< The RGB565 pixel format */
+ OVERLAY_REGION_BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR, /**< The 8-bit Y plane followed by the 8-bit 2x2 subsampled U and V planes */
+ OVERLAY_REGION_BUFFER_PIXEL_FORMAT_NV12, /**< The NV12 pixel format */
+ OVERLAY_REGION_BUFFER_PIXEL_FORMAT_UYVY, /**< The UYVY pixel format */
OVERLAY_REGION_BUFFER_PIXEL_FORMAT_MAX, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
OVERLAY_REGION_BUFFER_PIXEL_FORMAT_MIN = 0 // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
};
enum OverlayRegionType
{
OVERLAY_REGION_TYPE_PRIMARY_CAMERA = 1, /**< The primary camera type @n An overlay region displays the auto-rotated
- primary camera input that comes from Camera. */
- OVERLAY_REGION_TYPE_SECONDARY_CAMERA, /**< The secondary camera type @n An overlay region displays the auto-rotated
- and mirrored secondary camera input that comes from Camera. */
- OVERLAY_REGION_TYPE_NORMAL, /**< The normal type @n An overlay region displays the user input as it is. */
+ primary camera input that comes from Camera */
+ OVERLAY_REGION_TYPE_SECONDARY_CAMERA, /**< The secondary camera type @n An overlay region displays the auto-rotated
+ and mirrored secondary camera input that comes from Camera */
+ OVERLAY_REGION_TYPE_NORMAL, /**< The normal type @n An overlay region displays the user input as it is */
OVERLAY_REGION_TYPE_MAX, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
OVERLAY_REGION_TYPE_MIN = 0 // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
};
OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN, /**< The option evaluating the overlay region bounds and finding the minimum
bounds greater than the input bounds */
OVERLAY_REGION_EVALUATION_OPTION_LESS_THAN, /**< The option evaluating the overlay region bounds and finding the maximum
- bounds smaller than input bounds */
+ bounds smaller than the input bounds */
};
*
* @since 2.0
*
- * @return An instance of Tizen::Graphics::Rectangle that represents the position of the top-left corner, the width, and
- * the height of the overlay region
- * @remarks The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n
- * The position of the top-left point is relative to the top-left corner of the parent form.
+ * @return An instance of Tizen::Graphics::Rectangle that represents the position of the top-left corner, width, and
+ * height of the overlay region
+ * @remarks
+ * - The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n
+ * - The position of the top-left point is relative to the top-left corner of the parent form.
*
*/
Tizen::Graphics::Rectangle GetBounds(void) const;
*
* @since 2.1
*
- * @return An instance of Tizen::Graphics::FloatRectangle that represents the position of the top-left corner, the width,
- * and the height of the overlay region
- * @remarks The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n
- * The position of the top-left point is relative to the top-left corner of the parent form.
+ * @return An instance of Tizen::Graphics::FloatRectangle that represents the position of the top-left corner, width,
+ * and height of the overlay region
+ * @remarks - The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n
+ * - The position of the top-left point is relative to the top-left corner of the parent form.
*
*/
Tizen::Graphics::FloatRectangle GetBoundsF(void) const;
* @param[out] y The y position of the top-left corner of the overlay region
* @param[out] width The width of the rectangular region
* @param[out] height The height of the rectangular region
- * @remarks The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n
- * The position of the top-left point is relative to the top-left corner of the parent form.
+ * @remarks
+ * - The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n
+ * - The position of the top-left point is relative to the top-left corner of the parent form.
*
*/
void GetBounds(int& x, int& y, int& width, int& height) const;
* @param[out] y The y position of the top-left corner of the overlay region
* @param[out] width The width of the rectangular region
* @param[out] height The height of the rectangular region
- * @remarks The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n
- * The position of the top-left point is relative to the top-left corner of the parent form.
+ * @remarks
+ * - The shape of an overlay region is rectangular, which is defined by the top-left point, and the width or height. @n
+ * - The position of the top-left point is relative to the top-left corner of the parent form.
*
*/
void GetBounds(float& x, float& y, float& width, float& height) const;
* Due to the hardware accelerated rendering, there are limitations for an input buffer. @n
* The input buffer has the same restriction regarding its size as the overlay region and it can be checked by using the GetWidthUnit(),
* GetHeightUnit() and GetMaxCount(). If the specified condition is not satisfied, the @c E_INVALID_ARG exception is returned. @n
- * If an input buffer does not fit to the bounds of the overlay region, it will be scaled up or down to the overlay region bounds without
+ * If an input buffer does not fit the bounds of the overlay region, it will be scaled up or down to the overlay region bounds without
* keeping the ratio of input.
*
* @since 2.0
* @return An error code
* @param[in] srcBuffer The source buffer
* @param[in] srcDim The source dimension
- * @param[in] srcFormat The pixel format of buffer data
+ * @param[in] srcFormat The pixel format of the buffer data
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_UNSUPPORTED_FORMAT The specified pixel format is not supported.
*
* @since 2.0
*
- * @return @c true if the evaluation process does not meet an error, @n
+ * @return @c true if the evaluation process does not give an error, @n
* else @c false
* @param[in] option The option for evaluating the bounds of the overlay region
- * @param[in, out] rect An instance of %Rectangle that represents the validated bounds of %OverlayRegion @n
+ * @param[in, out] rect An instance of Rectangle that represents the validated bounds of %OverlayRegion @n
* The width and height of the input rectangle must be greater than @c 0.
- * @param[out] modified A boolean flag that indicates whether the specified @c rectangle is modified
+ * @param[out] modified The boolean flag that indicates whether the specified @c rectangle is modified
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_UNSUPPORTED_OPTION A specified input parameter is not supported.
* - Due to the hardware accelerated rendering, there are limitations for an overlay region.
* - The hardware capability for an overlay region is checked by using the GetWidthUnit(), GetHeightUnit() and GetMaxCount().
* - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations of the
- * overlay region. In such cases, Form::GetOverlayRegionN(const Tizen::Graphics::Rectangle&, OverlayRegionType) will return
- * @c E_INVALID_ARG. @n To prevent this kind of problem, the application must use this method to get a validated bounds that can be
- * used as the input bounds of the %Form::GetOverlayRegionN() method.
+ * overlay region. In such cases, Form::GetOverlayRegionN(const Tizen::Graphics::Rectangle&, OverlayRegionType) will return
+ * @c E_INVALID_ARG. @n To prevent this kind of problem, the application must use this method to get the validated bounds that can be
+ * used as the input bounds of the %Form::GetOverlayRegionN() method.
* - The specific error code can be accessed using the GetLastResult() method.
*/
static bool EvaluateBounds(OverlayRegionEvaluationOption option, Tizen::Graphics::Rectangle& rect, bool& modified);
*
* @since 2.1
*
- * @return @c true if the evaluation process does not meet an error, @n
+ * @return @c true if the evaluation process does not give an error, @n
* else @c false
* @param[in] option The option for evaluating the bounds of the overlay region
- * @param[in, out] rect An instance of %FloatRectangle that represents the validated bounds of %OverlayRegion @n
+ * @param[in, out] rect An instance of FloatRectangle that represents the validated bounds of %OverlayRegion @n
* The width and height of the input rectangle must be greater than @c 0.
* @param[out] modified A boolean flag that indicates whether the specified @c rectangle is modified
* @exception E_SUCCESS The method is successful.
* - Due to the hardware accelerated rendering, there are limitations for an overlay region.
* - The hardware capability for an overlay region is checked by using the GetWidthUnit(), GetHeightUnit() and GetMaxCount().
* - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations of the overlay
- * region. In such cases, Form::GetOverlayRegionN(const Tizen::Graphics::FloatRectangle&, OverlayRegionType) will return @c E_INVALID_ARG. @n To prevent this kind of problem, the application
- * must use this method to get a validated bounds that can be used as the input bounds of the %Form::GetOverlayRegionN() method.
+ * region. In such cases, Form::GetOverlayRegionN(const Tizen::Graphics::FloatRectangle&, OverlayRegionType) will return @c E_INVALID_ARG. @n To prevent this kind of problem, the application
+ * must use this method to get the validated bounds that can be used as the input bounds of the %Form::GetOverlayRegionN() method.
* - The specific error code can be accessed using the GetLastResult() method.
*/
static bool EvaluateBounds(OverlayRegionEvaluationOption option, Tizen::Graphics::FloatRectangle& rect, bool& modified);
*
* @since 2.0
*
- * @return The value of width
+ * @return The value of the width
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*
* @since 2.0
*
- * @return A list of the pixel formats supported by the %OverlayRegion class, @n
+ * @return The list of pixel formats supported by the %OverlayRegion class, @n
* else @c null if no pixel format is supported or an exception occurs
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* - The specific error code can be accessed using the GetLastResult() method.
* - The return value and each item in the list must be deleted by the caller.
* - The format list can vary depending on the device. After checking the supported formats using this method,
- * it's better to use a proper pixel format.
+ * it's better to use a proper pixel format.
*/
static Tizen::Base::Collection::IListT< OverlayRegionBufferPixelFormat >* GetSupportedBufferPixelFormatListN(void);
public:
/**
* The object is not fully constructed after this constructor is called. @n
- * For full construction, the %Construct() method must be called right after calling this constructor.
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specified group style determines the border look of the %Panel control.
- * @see Tizen::Ui::Container
+ * @see Container
*/
result Construct(const Tizen::Graphics::Rectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE);
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specified group style determines the border look of the %Panel control.
- * @see Tizen::Ui::Container
+ * @see Container
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] resourceId The resource ID describing the %Panel control
* @exception E_SUCCESS The method is successful.
* @exception E_FILE_NOT_FOUND The specified file cannot be found.
* @exception E_INVALID_FORMAT The specified XML format is invalid.
* @exception E_OPERATION_FAILED The operation has failed.
- * @remarks If SetBounds(), SetSize(), SetPosition() methods are called before the control is added to the parent via AddControl(), then the new value is applied
+ * @remarks If the SetBounds(), SetSize(), and SetPosition() methods are called before the control is added to the parent via AddControl(), then the new value is applied
* to both orientations because the current orientation is not known. After AddControl() is called, then the values are applied only to the current orientation.
*/
result Construct(const Tizen::Base::String& resourceId);
* The specified layout is already bound to another container.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specified group style determines the border look of the %Panel control.
- * @see Tizen::Ui::Container, Tizen::Ui::GroupStyle
+ * @see Container
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE);
* The specified layout is already bound to another container.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specified group style determines the border look of the %Panel control.
- * @see Tizen::Ui::Container, Tizen::Ui::GroupStyle
+ * @see Container
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE);
* The specified layout is already bound to another container.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specified group style determines the border look of the %Panel control.
- * @see Tizen::Ui::Container, Tizen::Ui::GroupStyle
+ * @see Container
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE);
* The specified layout is already bound to another container.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specified group style determines the border look of the %Panel control.
- * @see Tizen::Ui::Container, Tizen::Ui::GroupStyle
+ * @see Container
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE);
* Enables the %Panel control to be composited to the screen buffer.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This method is deprecated because changing composition mode is not allowed any more.
+ * @deprecated This method is deprecated because the changing composition mode is not allowed any more.
* @since 2.0
*
* @return An error code
* Checks whether the %Panel control is composite to the screen buffer.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This method is deprecated because changing composition mode is not allowed any more.
+ * @deprecated This method is deprecated because the changing composition mode is not allowed any more.
* @since 2.0
*
* @return @c true if the %Panel control is composite to the screen buffer, @n
using namespace Tizen::Graphics;
using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui;
bool
PopupEventListener::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
* @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
+ * due to this ownership relationship. @n
+ * In this case, use the SetOwner() method to change the ownership to the top-most window.
*/
result Construct(bool hasTitle, const Tizen::Graphics::Dimension& dim);
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
* @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
+ * due to this ownership relationship. @n
+ * In this case, use the SetOwner() method to change the ownership to the top-most window.
*/
result Construct(bool hasTitle, const Tizen::Graphics::FloatDimension& dim);
/**
- * Initializes this instance of %Popup and child controls with the specified resource ID @n
+ * Initializes this instance of %Popup and child controls with the specified resource ID. @n
* This method first attempts to find the resource file in the folder that corresponds to the current screen resolution. @n
- * If it fails to find the resource file, it searches in other folders in the following order when CoordinateSystem is Logical in the application manifest file
- * the density folder that corresponds to the current screen size category "res/screen-size-normal/" folder.
+ * If it fails to find the resource file, it searches in other folders in the following order when CoordinateSystem is Logical
+ * in the application manifest file the density folder that corresponds to the current screen size category "res/screen-size-normal/" folder.
*
* @since 2.0
*
* @exception E_FILE_NOT_FOUND The specified file cannot be found.
* @exception E_INVALID_FORMAT The specified XML format is invalid.
* @exception E_OPERATION_FAILED The operation has failed.
- * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
- * @remarks If SetBounds(), SetSize(), SetPosition() methods are called before Show(), then the new value is applied to both orientations
- * because the current orientation is not known. After Show() is called, then the values are applied only to the current orientation.
+ * @remarks
+ * - The default owner will be the current Form (or Frame). It is possible that this control may not be visible
+ * due to this ownership relationship. @n
+ * In this case, use the SetOwner() method to change the ownership to the top-most window.
+ * - If SetBounds(), SetSize(), SetPosition() methods are called before Show(), then the new value is applied to both orientations
+ * because the current orientation is not known. After Show() is called, then the values are applied only to the current orientation.
*/
result Construct(const Tizen::Base::String& resourceId);
* the specified layout is already bound to another container.
* @exception E_SYSTEM A system error has occurred.
* @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
+ * due to this ownership relationship. @n
+ * In this case, use the SetOwner() method to change the ownership to the top-most window.
*/
result Construct(const Tizen::Ui::Layout& layout, bool hasTitle, const Tizen::Graphics::Dimension& dim);
* the specified layout is already bound to another container.
* @exception E_SYSTEM A system error has occurred.
* @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
+ * due to this ownership relationship. @n
+ * In this case, use the SetOwner() method to change the ownership to the top-most window.
*/
result Construct(const Tizen::Ui::Layout& layout, bool hasTitle, const Tizen::Graphics::FloatDimension& dim);
* the specified layout is already bound to another container.
* @exception E_SYSTEM A system error has occurred.
* @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
+ * due to this ownership relationship. @n
+ * In this case, use the SetOwner() method to change the ownership to the top-most window.
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, bool hasTitle, const Tizen::Graphics::Dimension& dim);
* the specified layout is already bound to another container.
* @exception E_SYSTEM A system error has occurred.
* @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window.
+ * due to this ownership relationship. @n
+ * In this case, use the SetOwner() method to change the ownership to the top-most window.
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, bool hasTitle, const Tizen::Graphics::FloatDimension& dim);
* Shows the modal window. @n
*
* @since 2.0
- * @return An error code
- * @param[out] modalResult The %Popup's notification. @n
- * This value is the 'modalResult' parameter of the EndModal() method
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_STATE The %Popup is not visible. The visible state of the %Popup should be set @c true.
+ * @return An error code
+ * @param[out] modalResult The %Popup's notification. @n
+ * This value is the 'modalResult' parameter of the EndModal() method
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_STATE The %Popup is not visible. The visible state of the %Popup should be set @c true.
* @remarks
* - Do not call this method from Tizen::App::App::OnAppInitializing().
* - To show a %Popup properly from Tizen::Ui::Controls::Form::OnInitializing(), theForm must
* Closes the modal window. @n
*
* @since 2.0
- * @return An error code
- * @param[in] modalResult The result value of the modal window. @n
+ * @return An error code
+ * @param[in] modalResult The result value of the modal window. @n
* The value which needs to be returned as the output parameter of DoModal() method
* should be passed as the input argument
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_STATE The method is not supported because this popup isn't running as a modal window.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_STATE The method is not supported because this popup isn't running as a modal window.
*/
result EndModal(int modalResult);
* - The method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the client area of the %Popup control.
* - It is the responsibility of the developers to deallocate the canvas after use.
* - The canvas is valid only if the properties of the parent control of the canvas remain unchanged. @n
- * Therefore, delete the previously allocated canvas and create a new canvas using this method if the size or position of the
- * control is changed.
+ * Therefore, delete the previously allocated canvas and create a new canvas using this method if the size or position of the
+ * control is changed.
* - The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;
* @return The position in relative to the top-left corner of the %Popup control, @n
* else @c (-1.0f,-1.0f) if the instance is invalid
* @param[in] clientPosition The position relative to the top-left corner of the client area
- * @see TranslateToClientAreaPositionF()
+ * @see TranslateToClientAreaPosition()
*/
Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const;
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OUT_OF_RANGE The value of an argument is outside the valid range defined by the method. @n
- * The specified values should be positive and @c minValue should be less than @c maxValue.
+ * Either of the following conditions has occurred:
+ * - The specified values is not positive.
+ * - The specified @c minValue is not less than the specified @c maxValue.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
- * - The size of the control must be within the range defined by the minimum size and the maximum size.
+ * - The size of the control must be within the range defined by the minimum size and maximum size.
*/
result Construct(const Tizen::Graphics::Rectangle& rect, int minValue, int maxValue);
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OUT_OF_RANGE The value of an argument is outside the valid range defined by the method. @n
- * The specified values should be positive and @c minValue should be less than @c maxValue.
+ * Either of the following conditions has occurred:
+ * - The specified values is not positive.
+ * - The specified @c minValue is not less than the specified @c maxValue.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
- * - The size of the control must be within the range defined by the minimum size and the maximum size.
+ * - The size of the control must be within the range defined by the minimum size and maximum size.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, int minValue, int maxValue);
public:
/**
* Sets the current value of the %Progress control. @n
- * If the given value is greater than the @c maxValue with which %Progress is constructed, it will be set to %maxValue. The same applies for @c minValue.
+ * If the given value is greater than the @c maxValue with which %Progress is constructed, it will be set to @c maxValue. The same applies for @c minValue.
*
* @since 2.0
*
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OUT_OF_RANGE The value of an argument is outside the valid range defined by the method. @n
- * The specified values should be positive.
+ * The specified values are not positive.
* @exception E_SYSTEM A system error has occurred.
*/
result SetRange(int minValue, int maxValue);
*
* @since 2.0
*
- * @return An integer value representing the current value of progress, @n
+ * @return The integer value that represents the current value of progress, @n
* else @c -1 if an error occurs
*/
int GetValue(void) const;
/**
- * Gets the minimum value and the maximum value of the %Progress control.
+ * Gets the minimum value and maximum value of the %Progress control.
*
* @since 2.0
*
*
* @since 2.0
*
- * The %ProgressPopup class displays processing animation to show processing status.
+ * The %ProgressPopup class displays the processing animation to show the processing status.
* It can contain a title, body text and cancel button.
*
* For more information on the class features,
* see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_progresspopup.htm">ProgressPopup</a>.
*
- * @see Tizen::Ui::Window
+ * @see Window
*
* The following example demonstrates how to use the %ProgressPopup class.
*
* @since 2.0
* @return An error code
* @param[in] cancelButton Set to @c true if the %ProgressPopup window has a cancel button, @n
- * else @c false
- * @param[in] transparent Set to @c true if the %ProgressPopup window is translucent, @n
- * else @c false
+ * else @c false
+ * @param[in] transparent Set to @c true if the %ProgressPopup window is translucent, @n
+ * else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred. @n
- This error occurs when the internal resource is not loaded.
+ * This error occurs when the internal resource is not loaded.
* @remarks
* - To show a %ProgressPopup window, call Show() or DoModal() after calling this method.
* - By default, the title area and the body text are not shown. @n
- * Use SetTitleText() and SetText() to show the title area and the body text.
+ * Use SetTitleText() and SetText() to show the title area and body text.
* - If @c transparent is set to true, a progress icon is only shown and a cancel button is not shown. @n
- * Also, the texts set by %SetTitleText() and %SetText() are not shown.
- * - If the specified @c cancelButton is set to true and ProgressPopup is closed by pressing a Cancel Button,
- * out parameter of %DoModal(), modalResult, is @c -1.
+ * Also, the texts set by %SetTitleText() and %SetText() are not shown.
+ * - If the specified @c cancelButton is set to @c true and %ProgressPopup is closed by pressing a Cancel Button,
+ * out parameter of %DoModal(), modalResult, is @c -1.
*/
result Construct(bool cancelButton, bool transparent);
* @since 2.0
* @return An error code
* @param[in] listener The event listener to add @n Listener should be allocated at heap, not stack.
- * @exception E_SUCCESS This method was successful.
- * @exception E_OBJ_ALREADY_EXIST The listener was already exist.
+ * @exception E_SUCCESS This method is successful.
+ * @exception E_OBJ_ALREADY_EXIST The listener already exists.
* @see RemoveProgressPopupEventListener()
*/
result AddProgressPopupEventListener(Tizen::Ui::IProgressPopupEventListener& listener);
* @since 2.0
* @return An error code
* @param[in] listener The event listener to remove @n
- * The listener should be referring to previously allocated instance which is passed as an argument to
+ * The listener should be referring to a previously allocated instance which is passed as an argument to
* AddProgressPopupEventListener().
- * @exception E_SUCCESS This method was successful.
- * @exception E_OBJ_NOT_FOUND The listener was not found.
+ * @exception E_SUCCESS This method is successful.
+ * @exception E_OBJ_NOT_FOUND The listener is not found.
*/
result RemoveProgressPopupEventListener(Tizen::Ui::IProgressPopupEventListener& listener);
*
* @since 2.0
* @return The color, @n
- * else RGBA(0, 0, 0, 0) if an error occurs
+ * else RGBA(0, 0, 0, 0) if an error occurs
*/
Tizen::Graphics::Color GetTextColor(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] checkButton The %CheckButton instance to add
+ * @param[in] checkButton The CheckButton instance to add
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
* @since 2.1
*
* @return An error code
- * @param[in] pCheckButton The %CheckButton instance to add
+ * @param[in] pCheckButton The CheckButton instance to add
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid. @n
* The specified @c pCheckButton is @c null.
* @since 2.0
*
* @return An error code
- * @param[in] checkButton The %CheckButton instance to remove
+ * @param[in] checkButton The CheckButton instance to remove
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The object is not found.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Before removing %CheckButton from its parent container, it must be removed from %RadioGroup.
+ * @remarks Before removing CheckButton from its parent container, it must be removed from %RadioGroup.
*/
result Remove(const CheckButton& checkButton);
* @since 2.1
*
* @return An error code
- * @param[in] pCheckButton The %CheckButton instance to remove
+ * @param[in] pCheckButton The CheckButton instance to remove
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The object is not found.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Before removing %CheckButton from its parent container, it must be removed from %RadioGroup.
+ * @remarks Before removing CheckButton from its parent container, it must be removed from %RadioGroup.
*/
result Remove(CheckButton* pCheckButton);
*
* @since 2.0
*
- * @return The pointer to the selected check button, @n
- * else @c null if an error occurs or no check button in the radio group is selected
+ * @return A pointer to the selected check button, @n
+ * else @c null if an error occurs or no check button in the radio group is selected
*
*/
const CheckButton* GetSelectedItem(void) const;
/**
* @file FUiCtrlScrollEventTypes.h
- * @brief This is the header file for the List enumerations.
+ * @brief This is the header file for the %List enumerations.
*
* @since 2.0
*
*/
enum ScrollEndEvent
{
- SCROLL_END_EVENT_END_TOP = 0, /**< The scroll reaches top end */
- SCROLL_END_EVENT_END_BOTTOM, /**< The scroll reaches bottom end */
- SCROLL_END_EVENT_END_LEFT, /**< The scroll reaches left end */
- SCROLL_END_EVENT_END_RIGHT /**< The scroll reaches right end */
+ SCROLL_END_EVENT_END_TOP = 0, /**< The scroll reaches the top end */
+ SCROLL_END_EVENT_END_BOTTOM, /**< The scroll reaches the bottom end */
+ SCROLL_END_EVENT_END_LEFT, /**< The scroll reaches the left end */
+ SCROLL_END_EVENT_END_RIGHT /**< The scroll reaches the right end */
};
}}} // Tizen::Ui::Controls
* @exception E_INVALID_ARG The given width or height is less than 0.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the scroll direction is vertical and the scroll area is resized automatically.
- * @see Tizen::Ui::Container
+ * @see Container
*/
result Construct(const Tizen::Graphics::Rectangle& rect);
* @exception E_INVALID_ARG The given width or height is less than 0.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the scroll direction is vertical and the scroll area is resized automatically.
- * @see Tizen::Ui::Container
+ * @see Container
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect);
/**
- * Initializes this instance of %ScrollPanel and child controls with the specified resource ID @n
- * This method first attempts to find the resource file in the folder that corresponds to the current screen resolution. @n
- * If it fails to find the resource file, it searches in other folders in the following order when CoordinateSystem is Logical in the application manifest file
- * the density folder that corresponds to the current screen size category "res/screen-size-normal/" folder.
+ * Initializes this instance of %ScrollPanel and child controls with the specified resource ID. @n
+ * This method first attempts to find the resource file in the folder that corresponds to the current screen resolution.
+ * If it fails to find the resource file, it searches in other folders in the following order when CoordinateSystem is Logical
+ * in the application manifest file the density folder that corresponds to the current screen size category "res/screen-size-normal/" folder.
*
* @since 2.0
*
* @exception E_FILE_NOT_FOUND The specified file cannot be found.
* @exception E_INVALID_FORMAT The specified XML format is invalid.
* @exception E_OPERATION_FAILED The operation has failed.
- * @remarks If SetBounds(), SetSize(), SetPosition() methods are called before the control is added to the parent via AddControl(), then the new value is applied
- * to both orientations because the current orientation is not known. After AddControl() is called, then the values are applied only to the current orientation.
+ * @remarks If SetBounds(), SetSize(), SetPosition() methods are called before the control is added to the parent via AddControl(),
+ * then the new value is applied to both orientations because the current orientation is not known. After AddControl() is called,
+ * then the values are applied only to the current orientation.
*/
result Construct(const Tizen::Base::String& resourceId);
*
* @return An error code
* @param[in] rect The location and size of the %ScrollPanel control
- * @param[in] scrollDirection The scroll direction of %ScrollPanel
- * @param[in] autoResizingEnable Whether to resize the client area automatically
+ * @param[in] scrollDirection The scroll direction of %ScrollPanel
+ * @param[in] autoResizingEnable The flag that indicates whether to resize the client area automatically
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The given width or height is less than 0.
- * @see Tizen::Ui::Container
+ * @exception E_INVALID_ARG The given width or height is less than @c 0.
+ * @see Container
*/
result Construct(const Tizen::Graphics::Rectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable);
*
* @return An error code
* @param[in] rect The location and size of the %ScrollPanel control
- * @param[in] scrollDirection The scroll direction of %ScrollPanel
- * @param[in] autoResizingEnable Whether to resize the client area automatically
+ * @param[in] scrollDirection The scroll direction of %ScrollPanel
+ * @param[in] autoResizingEnable The flag that indicates whether to resize the client area automatically
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The given width or height is less than 0.
- * @see Tizen::Ui::Container
+ * @exception E_INVALID_ARG The given width or height is less than @c 0.
+ * @see Container
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable);
* @param[in] layout The layout for both the portrait and landscape mode
* @param[in] rect The location and size of the %ScrollPanel control
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG @c layout is already bound to another container, or the given width or the height is less than 0.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c layout is already bound to another container.
+ * - The given width or the height is less than @c 0.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the scroll direction is vertical and the scroll area is resized automatically.
- * @see Tizen::Ui::Container
+ * @see Container
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect);
* @param[in] layout The layout for both the portrait and landscape mode
* @param[in] rect The location and size of the %ScrollPanel control
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG @c layout is already bound to another container, or the given width or the height is less than 0.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c layout is already bound to another container.
+ * - The given width or the height is less than @c 0.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the scroll direction is vertical and the scroll area is resized automatically.
- * @see Tizen::Ui::Container
+ * @see Container
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect);
* @return An error code
* @param[in] layout The layout for both the portrait and landscape mode
* @param[in] rect The location and size of the %ScrollPanel control
- * @param[in] scrollDirection The scroll direction of %ScrollPanel
- * @param[in] autoResizingEnable Whether to resize the client area automatically
+ * @param[in] scrollDirection The scroll direction of %ScrollPanel
+ * @param[in] autoResizingEnable The flag that indicates whether to resize the client area automatically
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG @c layout is already bound to another container, or the given width or height is less than 0.
- * @see Tizen::Ui::Container
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c layout is already bound to another container.
+ * - The given width or height is less than @c 0.
+ * @see Container
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable);
* @return An error code
* @param[in] layout The layout for both the portrait and landscape mode
* @param[in] rect The location and size of the %ScrollPanel control
- * @param[in] scrollDirection The scroll direction of %ScrollPanel
- * @param[in] autoResizingEnable Whether to resize the client area automatically
+ * @param[in] scrollDirection The scroll direction of %ScrollPanel
+ * @param[in] autoResizingEnable The flag that indicates whether to resize the client area automatically
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG @c layout is already bound to another container, or the given width or height is less than 0.
- * @see Tizen::Ui::Container
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c layout is already bound to another container.
+ * - The given width or height is less than @c 0.
+ * @see Container
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable);
* @param[in] landscapeLayout The layout for the landscape mode
* @param[in] rect The location and size of the %ScrollPanel control
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG @c portraitLayout or @c landscapeLayout is already bound to another container, or the given width or
- * height is less than @c 0.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c portraitLayout or @c landscapeLayout is already bound to another container.
+ * - The given width or height is less than @c 0.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the scroll direction is vertical and the scroll area is resized automatically.
- * @see Tizen::Ui::Container
+ * @see Container
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect);
* @param[in] landscapeLayout The layout for the landscape mode
* @param[in] rect The location and size of the %ScrollPanel control
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG @c portraitLayout or @c landscapeLayout is already bound to another container, or the given width or
- * height is less than @c 0.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * The specified @c portraitLayout or @c landscapeLayout is already bound to another container.
+ * - The given width or height is less than @c 0.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the scroll direction is vertical and the scroll area is resized automatically.
- * @see Tizen::Ui::Container
+ * @see Container
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect);
* @param[in] portraitLayout The layout for the portrait mode
* @param[in] landscapeLayout The layout for the landscape mode
* @param[in] rect The location and size of the %ScrollPanel control
- * @param[in] scrollDirection The scroll direction of %ScrollPanel
- * @param[in] autoResizingEnable Whether to resize the client area automatically
+ * @param[in] scrollDirection The scroll direction of %ScrollPanel
+ * @param[in] autoResizingEnable The flag that indicates whether to resize the client area automatically
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG @c portraitLayout or @c landscapeLayout is already bound to another container, or the given width or
- * height is less than @c 0.
- * @see Tizen::Ui::Container
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c portraitLayout or @c landscapeLayout is already bound to another container.
+ * - The given width or height is less than @c 0.
+ * @see Container
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable);
* @param[in] portraitLayout The layout for the portrait mode
* @param[in] landscapeLayout The layout for the landscape mode
* @param[in] rect The location and size of the %ScrollPanel control
- * @param[in] scrollDirection The scroll direction of %ScrollPanel
- * @param[in] autoResizingEnable Whether to resize the client area automatically
+ * @param[in] scrollDirection The scroll direction of %ScrollPanel
+ * @param[in] autoResizingEnable The flag that indicates whether to resize the client area automatically
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG @c portraitLayout or @c landscapeLayout is already bound to another container, or
- * the given width or height is less than 0.
- * @see Tizen::Ui::Container
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c portraitLayout or @c landscapeLayout is already bound to another container.
+ * - The given width or height is less than @c 0.
+ * @see Container
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable);
*
* @since 2.0
*
- * @param[in] listener The listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @see Tizen::Ui::Controls::IScrollEventListener
+ * @param[in] listener The listener to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @see Controls::IScrollEventListener
* @see RemoveScrollEventListener()
*/
void AddScrollEventListener(IScrollEventListener& listener);
*
* @since 2.1
*
- * @param[in] listener The listener to add
- * @exception E_SUCCESS The method is successful.
+ * @param[in] listener The listener to add
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @see Tizen::Ui::Controls::IScrollEventListenerF
+ * @see Controls::IScrollEventListenerF
* @see RemoveScrollEventListener()
*/
void AddScrollEventListener(IScrollEventListenerF& listener);
* @since 2.0
*
* @param[in] listener The listener to remove
- * @see Tizen::Ui::Controls::IScrollEventListener
+ * @see Controls::IScrollEventListener
* @see AddScrollEventListener()
*/
void RemoveScrollEventListener(IScrollEventListener& listener);
* @since 2.1
*
* @param[in] listener The listener to remove
- * @see Tizen::Ui::Controls::IScrollEventListenerF
+ * @see Controls::IScrollEventListenerF
* @see AddScrollEventListener()
*/
void RemoveScrollEventListener(IScrollEventListenerF& listener);
* Sets the scroll position.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This method is deprecated. Instead of using this method, use the SetScrollPosition(int, bool), which supports animated scroll.
+ * @deprecated This method is deprecated. Instead of using this method, use the SetScrollPosition(int, bool),
+ * which supports animated scroll.
* @since 2.0
*
* @param[in] position The scroll position
* @since 2.0
*
* @param[in] position The scroll position in pixel
- * @param[in] withAnimation @c true to scroll the %ScrollPanel smoothly. @n
- * else @c false.
+ * @param[in] withAnimation @c true to scroll the %ScrollPanel smoothly. @n
+ * else @c false.
*
*/
void SetScrollPosition(int position, bool withAnimation);
* @since 2.1
*
* @param[in] position The scroll position in pixel
- * @param[in] withAnimation @c true to scroll the %ScrollPanel smoothly. @n
- * else @c false.
+ * @param[in] withAnimation @c true to scroll the %ScrollPanel smoothly. @n
+ * else @c false.
*
*/
void SetScrollPosition(float position, bool withAnimation);
*
* @since 2.0
*
- * @return An error code
- * @param[in] width The width of the client area to set
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG @c width is less than the width of %ScrollPanel
- * @exception E_INVALID_OPERATION The width of the client area cannot be set when auto resizing of the client area is on,
- * or the scroll direction is vertical.
+ * @return An error code
+ * @param[in] width The width of the client area to set
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified @c width is less than the width of %ScrollPanel
+ * @exception E_INVALID_OPERATION The width of the client area cannot be set when auto resizing of the client area is on,
+ * or the scroll direction is vertical.
*
*/
result SetClientAreaWidth(int width);
*
* @since 2.1
*
- * @return An error code
- * @param[in] width The width of the client area to set
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG @c width is less than the width of %ScrollPanel
- * @exception E_INVALID_OPERATION The width of the client area cannot be set when auto resizing of the client area is on,
- * or the scroll direction is vertical.
+ * @return An error code
+ * @param[in] width The width of the client area to set
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified @c width is less than the width of %ScrollPanel
+ * @exception E_INVALID_OPERATION The width of the client area cannot be set when auto resizing of the client area is on,
+ * or the scroll direction is vertical.
*
*/
result SetClientAreaWidth(float width);
*
* @since 2.0
*
- * @return An error code
- * @param[in] height The height of the client area to set
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG @c height is less than the height of %ScrollPanel
- * @exception E_INVALID_OPERATION The height of the client area cannot be set when auto resizing of the client area is on,
- * or the scroll direction is horizontal.
+ * @return An error code
+ * @param[in] height The height of the client area to set
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified @c height is less than the height of %ScrollPanel
+ * @exception E_INVALID_OPERATION The height of the client area cannot be set when auto resizing of the client area is on,
+ * or the scroll direction is horizontal.
*
*/
result SetClientAreaHeight(int height);
*
* @since 2.1
*
- * @return An error code
- * @param[in] height The height of the client area to set
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG @c height is less than the height of %ScrollPanel
- * @exception E_INVALID_OPERATION The height of the client area cannot be set when auto resizing of the client area is on,
- * or the scroll direction is horizontal.
+ * @return An error code
+ * @param[in] height The height of the client area to set
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified @c height is less than the height of %ScrollPanel.
+ * @exception E_INVALID_OPERATION The height of the client area cannot be set when auto resizing of the client area is on,
+ * or the scroll direction is horizontal.
*
*/
result SetClientAreaHeight(float height);
*
* @since 2.0
*
- * @return Direction of %ScrollPanel
+ * @return The direction of %ScrollPanel
*
*/
ScrollPanelScrollDirection GetScrollDirection(void) const;
/**
- * Gets how the scroll area the %ScrollPanel is resized.
+ * Checks whether auto-resizing is enabled for the scroll area.
*
* @since 2.0
*
- * @return Whether to resize the client area automatically
+ * @return @c true if auto-resizing is enabled for the scroll area, @n
+ * else @c false
*
*/
bool IsScrollAreaAutoResizingEnabled(void) const;
*
* @since 2.0
*
- * @param[in] enable Set to @c true to enable page scroll.
+ * @param[in] enable Set to @c true to enable page scroll, @n
+ * @c false to disable page scroll
*
*/
void SetPageScrollEnabled(bool enable);
* @since 2.0
*
* @return @c true if the page scroll is enabled. @n
- * else @c false.
+ * else @c false.
*
*/
bool IsPageScrollEnabled(void) const;
* @since 2.0
*
* @param[in] visible Set to @c true to show scroll bar. @n
- * else @c false.
+ * else @c false.
*
*/
void SetScrollBarVisible(bool visible);
* @since 2.0
*
* @param[in] mode The scroll input handling mode
- * @see GetScrollInputMode()
+ * @see GetScrollInputMode()
*/
void SetScrollInputMode(ScrollInputMode mode);
/**
* @file FUiCtrlScrollPanelTypes.h
- * @brief This is the header file for the enumerations of the ScrollPanel class.
+ * @brief This is the header file for the enumerations of the %ScrollPanel class.
*
* This header file defines the data types for the ScrollPanel class.
*/
enum ScrollInputMode
{
SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION = 0, /**< %Content can be scrolled in any direction */
- SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION /**<%Content can be scrolled only in the first direction */
+ SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION /**< %Content can be scrolled only in the first direction */
};
}}} // Tizen::Ui::Controls
* else @c false
* @param[in] keypadAction The keypad action
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or @n
- * the action ID of the specified item must be a positive integer.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The action ID of the specified item is not a positive integer.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - It is recommended that %SearchBar should be placed at the top-left corner of Form's client area.
- * - By default, a "Cancel" button is displayed if @c searchBarButton is set to @c true. When the user presses the cancel button,
- * the %SearchBar control returns to ::SEARCH_BAR_MODE_NORMAL automatically.
+ * - By default, a "Cancel" button is displayed if @c searchBarButton is set to @c true. When the user
+ * presses the cancel button, the %SearchBar control returns to ::SEARCH_BAR_MODE_NORMAL automatically.
*/
result Construct(const Tizen::Graphics::Rectangle& rect, bool searchBarButton = true, KeypadAction keypadAction = KEYPAD_ACTION_SEARCH);
* else @c false
* @param[in] keypadAction The keypad action
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or @n
- * the action ID of the specified item must be a positive integer.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The action ID of the specified item is not a positive integer.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - It is recommended that %SearchBar should be placed at the top-left corner of Form's client area.
- * - By default, a "Cancel" button is displayed if @c searchBarButton is set to @c true. When the user presses the cancel button,
- * the %SearchBar control returns to ::SEARCH_BAR_MODE_NORMAL automatically.
+ * - By default, a "Cancel" button is displayed if @c searchBarButton is set to @c true. When the user presses
+ * the cancel button, the %SearchBar control returns to ::SEARCH_BAR_MODE_NORMAL automatically.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, bool searchBarButton = true, KeypadAction keypadAction = KEYPAD_ACTION_SEARCH);
* @page CompSetContentPage Compatibility for SetContent()
* @section CompSetContentPage IssueSection Issues
* Implementing this method in OSP compatible applications has the following issue: @n
- * SetContent() method passes the ownership of Content control to SearchBar in OSP,
- * whereas the Content control ownership remains with the caller in Tizen.
+ * The SetContent() method passes the ownership of the Content control to %SearchBar in OSP,
+ * whereas the %Content control ownership remains with the caller in Tizen.
*
* @section CompSetContentPage SolutionSection Resolutions
- * In Tizen, the caller should delete the previous Content control, if this method is called more than once.
+ * In Tizen, the caller should delete the previous %Content control, if this method is called more than once.
*/
/**
* @since 2.0
*
* @return An error code
- * @param[in] invalidate Set to @c true to perform invalidate on the content area, @n
+ * @param[in] invalidate Set to @c true to perform invalidate on the content area, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* @since 2.0
*
* @return The size of the content area
- * @remarks The content area is the area where the 'content' of the %SearchBar control is displayed. The size of the content areas can
+ * @remarks The content area is the area where the 'content' of the %SearchBar control is displayed. The size of the content area can
* be changed at runtime.
* @see AddSearchBarEventListener()
* @see ISearchBarEventListener
* @since 2.1
*
* @return The size of the content area
- * @remarks The content area is the area where the 'content' of the %SearchBar control is displayed. The size of the content areas can
+ * @remarks The content area is the area where the 'content' of the %SearchBar control is displayed. The size of the content area can
* be changed at runtime.
* @see AddSearchBarEventListener()
* @see ISearchBarEventListener
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @see SetModeLock()
+ * @see SetModeLocked()
*/
bool IsModeLocked(void) const;
* @return An error code
* @param[in] mode The search bar mode
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or @n
- * the mode is locked.
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred:
+ * - The current state of the instance prohibits the execution of the specified operation.
+ * - The mode is locked.
* @exception E_SYSTEM A system error has occurred.
* @see GetMode()
- * @see SetModeLock()
+ * @see SetModeLocked()
*/
result SetMode(SearchBarMode mode);
* @param[in] text The button text
* @param[in] actionId The button action ID
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or @n
- * the specified @c actionId must be greater than or equal to @c 0.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The specified @c actionId is not greater than or equal to @c 0.
* @exception E_SYSTEM A system error has occurred.
*/
result SetButton(const Tizen::Base::String& text, int actionId);
* @param[in] start The starting index of range
* @param[in] end The last index of range
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or @n
- * either the @c start or @c end parameter is greater than the number of elements or less than @c 0.
+ * @exception E_OUT_OF_RANGE Either of the following conditions has occurred:
+ * - The specified index is outside the bounds of the data structure.
+ * - Either the @c start or @c end parameter is greater than the number of elements or less than @c 0.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetText()
* @return An error code
* @param[in] limitLength The limit text length to set
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid, or @n
- * the specified limit length cannot be @c 0 or negative.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified input parameter is invalid.
+ * - The specified limit length is @c 0 or negative.
* @exception E_SYSTEM A system error has occurred.
* @see GetLimitLength()
*/
* @return An error code
* @param[in] size The text size
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid, or @n
- * the specified @c size cannot be a negative value.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified input parameter is invalid.
+ * - The specified @c size is a negative value.
* @exception E_SYSTEM A system error has occurred.
* @see GetSearchFieldTextSize()
*/
* @return An error code
* @param[in] size The text size
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid, or @n
- * the specified @c size cannot be a negative value.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified input parameter is invalid.
+ * - The specified @c size cannot be a negative value.
* @exception E_SYSTEM A system error has occurred.
* @see GetSearchFieldTextSizeF()
*/
* @param[in] start The start index of the text block
* @param[in] end The end index of the text block
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or @n
- * either the @c start or @c end parameter is greater than the number of elements or less than @c 0.
+ * @exception E_OUT_OF_RANGE Either of the following conditions has occurred:
+ * - The specified index is outside the bounds of the data structure.
+ * - Either the @c start or @c end parameter is greater than the number of elements or less than @c 0.
* @exception E_SYSTEM A system error has occurred.
* @see ReleaseBlock()
* @see GetBlockRange()
* @deprecated We no longer provide a method to set the language of the current keypad. @n
* This method is provided only for backward compatibility and will be deleted in the near future.
* @return An error code
- * @param[in] languageCode The language to set
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @param[in] languageCode The language to set
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks
* - The application can set the language of the current keypad that is associated with the current %SearchBar.
* - This method only works if the language to set is supported by the current preloaded keypad.
* @since 2.0
*
* @return An error code
- * @param[out] language The current input language
- * @exception E_SUCCESS The method is successful.
+ * @param[out] language The current input language
+ * @exception E_SUCCESS The method is successful.
* @remarks The application can get the current language of the keypad that is associated with the current %SearchBar.
*/
* Checks whether the text prediction is enabled.
*
* @since 2.0
- * @return @c true if the text prediction is enabled, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
+ * @return @c true if the text prediction is enabled, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
* @see SetTextPredictionEnabled()
*/
bool IsTextPredictionEnabled(void) const;
* Enables or disables the text prediction.
*
* @since 2.0
- * @param[in] enable Set to @c true to enable the text prediction, @n
- * else @c false
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
- * @see IsTextPredictionEnabled()
+ * @param[in] enable Set to @c true to enable the text prediction, @n
+ * else @c false
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
+ * @see IsTextPredictionEnabled()
*/
result SetTextPredictionEnabled(bool enable);
*
* @since 2.0
*
- * @param[in] listener The listener to remove
+ * @param[in] listener The listener to remove
* @see AddLanguageEventListener()
*/
*
* @since 2.1
*
- * @param[in] pFilter The filter
+ * @param[in] pFilter The filter
* @remarks The %SearchBar control checks with the registered filter to decide whether the user-entered text should be replaced.
*/
void SetEditTextFilter(IEditTextFilter* pFilter);
* @since 2.0
*
* @return An error code
- * @param[in] rect An instance of the Graphics::Rectangle class
- * This instance represents the x and y coordinates of the left top corner of the created %SectionTableView along with the width and height.
- * @param[in] itemDivider Set to @c true to display an item divider, @n
- * else @c false
- * @param[in] scrollStyle The style of %SectionTableView scroll bar style
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value.
+ * @param[in] rect An instance of the Graphics::Rectangle class
+ * This instance represents the x and y coordinates of the left top corner of the
+ * created %SectionTableView along with the width and height.
+ * @param[in] itemDivider Set to @c true to display an item divider, @n
+ * else @c false
+ * @param[in] scrollStyle The style of %SectionTableView scroll bar style
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value.
*
*/
result Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle);
* @since 2.1
*
* @return An error code
- * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
- * This instance represents the x and y coordinates of the left top corner of the created %SectionTableView along with the width and height.
- * @param[in] itemDivider Set to @c true to display an item divider, @n
- * else @c false
- * @param[in] scrollStyle The style of %SectionTableView scroll bar style
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or either the @c rect.width or @c rect.height parameter has a negative value.
+ * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
+ * This instance represents the x and y coordinates of the left top corner of the
+ * created %SectionTableView along with the width and height.
+ * @param[in] itemDivider Set to @c true to display an item divider, @n
+ * else @c false
+ * @param[in] scrollStyle The style of %SectionTableView scroll bar style
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid, or either the @c rect.width or @c rect.height parameter has a negative value.
*
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle);
*
* @since 2.0
*
- * @param[in] pProvider The item provider to create and delete items
+ * @param[in] pProvider The item provider to create and delete items
* @remarks If an item provider is not set for the table view, the table view does not work.
* The specified provider should be allocated in heap memory.
*/
*
* @since 2.1
*
- * @param[in] pProvider The item provider to create and delete items
+ * @param[in] pProvider The item provider to create and delete items
* @remarks If an item provider is not set for the table view, the table view does not work.
* The specified provider should be allocated in heap memory.
*/
void SetGroupedLookEnabled(bool enable);
/**
- * Returns whether the grouped look is enabled or not.
+ * Checks whether the grouped look is enabled or not.
*
* @since 2.0
*
- * @return @c true if the grouped look is enabled, @n
- * else @c false
+ * @return @c true if the grouped look is enabled, @n
+ * else @c false
*/
bool IsGroupedLookEnabled(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] listener The event listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_ALREADY_EXIST The listener is already added.
+ * @param[in] listener The event listener to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_ALREADY_EXIST The listener is already added.
* @remarks The specified listener should be allocated in heap memory.
*/
result AddSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener);
* @since 2.0
*
* @return An error code
- * @param[in] listener The event listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND The listener is not found.
+ * @param[in] listener The event listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_NOT_FOUND The listener is not found.
*/
result RemoveSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener);
*
* @since 2.0
*
- * @return An error code
- * @param[in] listener The event listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @return An error code
+ * @param[in] listener The event listener to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* @exception E_OBJ_ALREADY_EXIST The listener is already added.
* @remarks The specified listener should be allocated in heap memory.
*/
*
* @since 2.0
*
- * @return An error code
- * @param[in] listener The event listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_NOT_FOUND The listener is not found.
+ * @return An error code
+ * @param[in] listener The event listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_NOT_FOUND The listener is not found.
*/
result RemoveFastScrollListener(IFastScrollListener& listener);
*
* @since 2.0
*
- * @return An error code
- * @param[in] listener The event listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_ALREADY_EXIST The listener is already added.
- * @remarks The specified listener should be allocated in heap memory.
+ * @return An error code
+ * @param[in] listener The event listener to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_ALREADY_EXIST The listener is already added.
+ * @remarks The specified listener should be allocated in heap memory.
* @see IScrollEventListener::OnScrollEndReached()
* @see RemoveScrollEventListener()
*/
* @since 2.1
*
* @return An error code
- * @param[in] listener The event listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_NOT_FOUND The listener is not found.
+ * @param[in] listener The event listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_NOT_FOUND The listener is not found.
* @see IScrollEventListener::OnScrollEndReached()
* @see AddScrollEventListener()
*/
* @since 2.1
*
* @return An error code
- * @param[in] listener The event listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_ALREADY_EXIST The listener is already added.
+ * @param[in] listener The event listener to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_ALREADY_EXIST The listener is already added.
* @remarks The specified listener should be allocated in heap memory.
* @see IScrollEventListenerF::OnScrollEndReached()
* @see RemoveScrollEventListener()
*
* @since 2.1
*
- * @return An error code
- * @param[in] listener The event listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_NOT_FOUND The listener is not found.
+ * @return An error code
+ * @param[in] listener The event listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_NOT_FOUND The listener is not found.
* @see IScrollEventListenerF::OnScrollEndReached()
* @see AddScrollEventListener()
*/
* @since 2.0
*
* @return An error code
- * @param[in] text The text of the index
- * @param[in] useSearchIcon Set to @c true to show the magnifying icon, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @param[in] text The text of the index
+ * @param[in] useSearchIcon Set to @c true to show the magnifying icon, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
*/
result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon);
*
* @since 2.0
*
- * @return An error code
- * @param[out] sectionIndex The section index
- * @param[out] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND Top drawn item is not found.
+ * @return An error code
+ * @param[out] sectionIndex The section index
+ * @param[out] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_NOT_FOUND Top drawn item is not found.
*/
result GetTopDrawnItemIndex(int& sectionIndex, int& itemIndex) const;
result GetBottomDrawnItemIndex(int& sectionIndex, int& itemIndex) const;
/**
- * Scrolls to the item at the specified index.
+ * Scrolls to the item at the specified index. @n
* The specified item is drawn at the position specified by the item alignment.
*
* @since 2.0
* @param[in] itemAlignment The item alignment
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
* @remarks
* - This method does not work during the ITableViewItemProvider call-back procedure.
* - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle
- * of the TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * of the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result ScrollToItem(int sectionIndex, int itemIndex, TableViewScrollItemAlignment itemAlignment = TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
* @param[in] itemIndex The item index
* @param[in] check Set to @c true to select the item, @n
* else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The item is disabled or the current state of the instance prohibits the execution of the specified operation.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The item is disabled or the current state of the instance prohibits the execution of the specified operation.
* @remarks
* - This method works only when the annex style of the item allows selection.
- * This method does not work during the ITableViewItemProvider call-back procedure.
+ * This method does not work during the ITableViewItemProvider call-back procedure.
* - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle
- * of the TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * of the TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result SetItemChecked(int sectionIndex, int itemIndex, bool check);
/**
- * Returns whether the item at the specified index is selected or not.
+ * Checks whether the item at the specified index is selected or not.
*
* @since 2.0
*
- * @return @c true if the item is selected, @n
- * else @c false
- * @param[in] sectionIndex The section index
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @return @c true if the item is selected, @n
+ * else @c false
+ * @param[in] sectionIndex The section index
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
* @remarks
* - This method returns @c false, if the annex style of the item does not allow selection.
- * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the
- * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of
+ * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
bool IsItemChecked(int sectionIndex, int itemIndex) const;
* @param[in] itemIndex The item index
* @param[in] enable Set to @c true to enable the specified item, @n
* else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
* @remarks
* - This method does not work during the ITableViewItemProvider call-back procedure.
- * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the
- * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of
+ * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result SetItemEnabled(int sectionIndex, int itemIndex, bool enable);
*
* @since 2.0
*
- * @return @c true if the item is enabled, @n
- * else @c false
- * @param[in] sectionIndex The section index
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @remarks This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of the
- * TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * @return @c true if the item is enabled, @n
+ * else @c false
+ * @param[in] sectionIndex The section index
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @remarks This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of
+ * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
bool IsItemEnabled(int sectionIndex, int itemIndex) const;
*
* @since 2.0
*
- * @return The total number of items in the specified section
- * @param[in] sectionIndex The section index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @return The total number of items in the specified section
+ * @param[in] sectionIndex The section index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
*/
int GetItemCountAt(int sectionIndex) const;
* Updates the specified item. @n
* For instance, @c TABLE_VIEW_REFRESH_TYPE_ITEM_ADD is used when a new item needs to be added and @c TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE is
* used when an item is deleted from the table view. Moreover, @c TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY is used when the content of an existing item has
- * changed and it needs to be updated. @n Note that calling the %RefreshAllItems() method with @c TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY
+ * changed and it needs to be updated. @n
+ * Note that calling the %RefreshAllItems() method with @c TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY
* invokes ISectionTableViewItemProvider::UpdateItem() or ISectionTableViewItemProviderF::UpdateItem() for the given index in sequence.
*
* @since 2.0
*
- * @return An error code
- * @param[in] sectionIndex The section index
- * @param[in] itemIndex The item index
- * @param[in] type The item to add, remove, or modify
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
+ * @return An error code
+ * @param[in] sectionIndex The section index
+ * @param[in] itemIndex The item index
+ * @param[in] type The item to add, remove, or modify
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
* @remarks
* - If the specified item.itemIndex is @c -1, then the method is applied to the section item with the given index.
* - Note that if @c TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE option is used to a section item, all the items in the section
- * (including the section item itself) are removed from the table view.
+ * (including the section item itself) are removed from the table view.
* - This method does not work during the ITableViewItemProvider call-back procedure.
*/
result RefreshItem(int sectionIndex, int itemIndex, TableViewRefreshType type);
*
* @since 2.0
*
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation @b Since: @b 2.1.
* @remarks
* - This method will delete all the items and recreate them, so it should not be called from the inside of
- * OnSectionTableViewItemStateChanged() call-back as this leads to self deletion. If you need to update an Item, you should use RefreshItem() method.
+ * OnSectionTableViewItemStateChanged() call-back as this leads to self deletion. If you need to update an Item, you should
+ * use the RefreshItem() method.
* - This method should not be called from ISectionTableViewItemProvider implementation because of recursion.
* - The specific error code can be accessed using the GetLastResult() method.
*/
*
* @since 2.0
*
- * @param[in] position The position of the item
- * @param[out] sectionIndex The section index of the item on specified position
- * @param[out] itemIndex The item index of the item on specified position
+ * @param[in] position The position of the item
+ * @param[out] sectionIndex The section index of the item on specified position
+ * @param[out] itemIndex The item index of the item on specified position
* @remarks
- * - This method sets both of sectionIndex and itemIndex to @c -1 if no item is found at the given position.
+ * - This method sets both @c sectionIndex and @c itemIndex to @c -1 if no item is found at the given position.
* - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle
- * of the TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * of %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& sectionIndex, int& itemIndex) const;
*
* @since 2.1
*
- * @param[in] position The position of the item
- * @param[out] sectionIndex The section index of the item on specified position
- * @param[out] itemIndex The item index of the item on specified position
+ * @param[in] position The position of the item
+ * @param[out] sectionIndex The section index of the item on specified position
+ * @param[out] itemIndex The item index of the item on specified position
* @remarks
- * - This method sets both of sectionIndex and itemIndex to -1 if no item is found at the given position.
+ * - This method sets both @c sectionIndex and @c itemIndex to -1 if no item is found at the given position.
* - This method should be called only after TableView items are created. If this method needs to be called early in the lifecycle of
- * the TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& sectionIndex, int& itemIndex) const;
ScrollInputMode GetScrollInputMode(void) const;
/**
- * Scrolls the list contents by a specified number of pixels. @n When it is negative, it scrolls to opposite direction in current scroll style.
+ * Scrolls the list contents by a specified number of pixels. @n
+ * When it is negative, it scrolls to opposite direction in current scroll style.
*
* @since 2.1
*
* @return An error code
- * @param[in] pixel The amount of pixels to scroll
- * @exception E_SUCCESS The method is successful.
+ * @param[in] pixel The amount of pixels to scroll
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c pixel is out of range.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* @remarks
* - If you call this method with negative @c pixel when position of scroll is already top of contents then it will return
* @c E_OUT_OF_RANGE. @n
*
* @since 2.1
*
- * @return An error code
- * @param[in] pixel The amount of pixels to scroll
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified @c pixel is out of range.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation
+ * @return An error code
+ * @param[in] pixel The amount of pixels to scroll
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE The specified @c pixel is out of range.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation
* @remarks
* - If you call this method with negative @c pixel when position of scroll is already top of contents then it will @c
* return E_OUT_OF_RANGE. @n
* @since 2.1
*
* @return An error code
- * @param[in] sectionIndex The section index
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @param[in] sectionIndex The section index
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
*/
result OpenContextItem(int sectionIndex, int itemIndex);
*
* @since 2.1
*
- * @return An error code
- * @param[in] sectionIndex The section index
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @return An error code
+ * @param[in] sectionIndex The section index
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
*/
result CloseContextItem(int sectionIndex, int itemIndex);
*
* @since 2.1
*
- * @return @c true if the context item is opened, @n
- * else @c false
- * @param[in] sectionIndex The section index
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @return @c true if the context item is opened, @n
+ * else @c false
+ * @param[in] sectionIndex The section index
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
*/
bool IsContextItemOpened(int sectionIndex, int itemIndex) const;
*
* @since 2.1
*
- * @return An error code
- * @param[in] sectionIndex The index of the section
- * @param[in] alignment The horizontal alignment of the section header text
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @return An error code
+ * @param[in] sectionIndex The index of the section
+ * @param[in] alignment The horizontal alignment of the section header text
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
* @exception E_INVALID_OPERATION There is no header in the section.
* @remarks By default, the text of the section header is left aligned.
* @see GetSectionHeaderTextHorizontalAlignment()
*
* @since 2.1
*
- * @return The horizontal alignment of the text
- * @param[in] sectionIndex The index of the section
- * @exception E_SUCCESS The method is successful
- * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
- * @exception E_INVALID_OPERATION There is no header in the section.
+ * @return The horizontal alignment of the text
+ * @param[in] sectionIndex The index of the section
+ * @exception E_SUCCESS The method is successful
+ * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION There is no header in the section.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetSectionHeaderTextHorizontalAlignment()
*/
* @since 2.1
*
* @return An error code
- * @param[in] sectionIndex The index of the section
- * @param[in] alignment The horizontal alignment of the section footer text
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION There is no footer in the section.
+ * @param[in] sectionIndex The index of the section
+ * @param[in] alignment The horizontal alignment of the section footer text
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION There is no footer in the section.
* @remarks By default, the text of the section footer is right aligned.
* @see GetSectionFooterTextHorizontalAlignment()
*/
*
* @since 2.1
*
- * @return The horizontal alignment of the text
- * @param[in] sectionIndex The index of the section
- * @exception E_SUCCESS The method is successful
- * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
- * @exception E_INVALID_OPERATION There is no footer in the section.
+ * @return The horizontal alignment of the text
+ * @param[in] sectionIndex The index of the section
+ * @exception E_SUCCESS The method is successful
+ * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION There is no footer in the section.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetSectionFooterTextHorizontalAlignment()
*/
*
* @return An error code
* @param[in] itemSize The size of the item
- * @param[in] style The style of Annex
+ * @param[in] style The style of the annex
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*/
*
* @return An error code
* @param[in] itemSize The size of the item
- * @param[in] style The style of Annex
+ * @param[in] style The style of the annex
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*/
*
* The %SlidableGroupedList class represents a list which loads grouped
* items on demand and unloads unused grouped items to save memory. Like GroupedList,
- * the list items of GroupedList consist of groups and items. A group represents grouped
+ * the list items of %GroupedList consist of groups and items. A group represents grouped
* items and is inserted into the first level just as items are inserted into List. Items
* which are from CustomListItems are inserted under related groups. So, items are uniquely
* identified with two indices: group index and item index.
* grouped list. It will then receive related events from %SlidableGroupedList.
*
* Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
- * when the %SlidableGroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat
+ * when the %SlidableGroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). %CustomListItemFormat
* must be deleted by the application.
*
- * Refer to CustomListItem and CustomListItemFormat.
+ * For more information, see CustomListItem and CustomListItemFormat.
+ *
+ * The following example demonstrates how to use the %SlidableGroupedList class.
*
* Example:
*
* For full construction, the SlidableGroupedList::Construct() method must be called right after calling this constructor.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
* @endif
*/
* This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
* @endif
*/
* Initializes this instance of %SlidableGroupedList with the specified parameters.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
- * @param[in] rect An instance of the Graphics::Rectangle class @n
- * This instance represents the x and y coordinates of the top-left corner of the created %SlidableGroupedList along with
- * the width and height.
- * @param[in] style The style of the CustomListItem instances
+ * @param[in] rect An instance of the Graphics::Rectangle class @n
+ * This instance represents the x and y coordinates of the top-left corner of the
+ * created %SlidableGroupedList along with the width and height.
+ * @param[in] style The style of the CustomListItem instances
* @param[in] itemDivider Set to @c true to display an item divider, @n
* else @c false
* @param[in] fastScroll Set to @c true to use fast scroll, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - The size of the control must be within the range defined by the minimum size and the maximum size.
* The added listener can listen to the events on the context of the given event dispatcher when they are fired.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @param[in] listener The event listener to add
* The removed listener cannot listen to the events when they are fired.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @param[in] listener The event listener to remove
* Loads the item to the top of the %SlidableGroupedList control.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Loads the item to the end of the %SlidableGroupedList control.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Unloads all the loaded items of the %SlidableGroupedList control.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* The group is not removed.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The removed list items are deleted from the memory.
+ * @remarks The removed list items are deleted from the memory.
* @endif
*/
result RemoveAllItemsAt(int groupIndex);
* Removes all the items in the list.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* The removed listener cannot listen to events when they are fired.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @param[in] listener The event listener to remove
* The removed listener cannot listen to events when they are fired.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @param[in] listener The event listener to remove
* Scrolls to the bottom of the %SlidableGroupedList control.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
* @endif
*/
* Scrolls to the top of the %SlidableGroupedList control.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
* @endif
*/
* The specified item is drawn at the top of the %SlidableGroupedList control.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] groupIndex The group index
* @param[in] itemIndex The item index
* @exception E_SUCCESS The method is successful.
* The specified group is drawn at the top of the %SlidableGroupedList control.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
- * @since 2.0
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
+ * @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] groupIndex The group index
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* Sets all the items at the specified group index.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
- * @since 2.0
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
+ * @since 2.0
*
- * @param[in] groupIndex The group index
- * @param[in] check Set to @c true to check the item, @n
+ * @param[in] groupIndex The group index
+ * @param[in] check Set to @c true to check the item, @n
* else @c false to uncheck
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* Sets the contents of the group of the %SlidableGroupedList control at the specified group index.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
*
* @brief <i> [Deprecated] </i>
* @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
- * @since 2.0
+ * @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] groupIndex The group index of the item to check
* @param[in] itemIndex The index of the item to check
* @param[in] check Set to @c true to check the item, @n
* Enables or disables the item at the specified index of the %SlidableGroupedList.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
- * @since 2.0
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
+ * @since 2.0
*
* @return An error code
* @param[in] groupIndex The group index of the item to check
* Removes all the checked items from the group.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Removes the specified item from the group.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
+ * @param[in] itemIndex The item index
* @param[in] height The estimated/real height of the item
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* Removes the group of the %SlidableGroupedList control at the group index.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Gets the item at the specified indexes if the item is currently loaded.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return A pointer to the loaded item, @n
* Gets the item ID at the specified index if the item is currently loaded.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return The item ID, @n
* Gets the item index from the specified item ID.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code, @n
* Removes all the checked items of the %SlidableGroupedList control.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* @param[in] height The height of the item to delete
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The removed list items are deleted from the memory.
+ * @remarks The removed list items are deleted from the memory.
* @remarks This method can only be used when the style of the list allows multiple selections.
* @endif
*/
* Gets the index of the first loaded item.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Gets the index of the last loaded item.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Sets the first index list of the scroll by text.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Sets the background color of this control.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @param[in] color The background color
* Sets the text of the empty list.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @param[in] text The text of the empty list
* Sets the color of the text to be displayed in the absence of a %SlidableGroupedList item.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @param[in] color The color of the text to display
* Gets the color of the text to be displayed in the absence of a %SlidableGroupedList item.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return The color of the text to be displayed
*
* @return An error code
* @param[in] groupIndex The group index
- * @param[in] itemIndex The %CustomListItem object
+ * @param[in] itemIndex The CustomListItem object
* @param[in] item The item
* @param[in] itemId The item ID
* @exception E_SUCCESS The method is successful.
* The added listener can listen to events on the context of the given event dispatcher when they are fired.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @param[in] listener The event listener to add
* The added listener can listen to events on the context of the given event dispatcher when they are fired.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @param[in] listener The event listener to add
* Adds the item to the specified group.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Gets the index of the current bottom drawn item.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Gets the index of the first checked list item.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Gets the group ID from the specified group index.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return The group ID
* Gets the group index from the specified group ID.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return The group index
* Gets the index of the last checked item.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Gets the index of the next checked item after the specified item.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Gets the index of the current top drawn item.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Gets the index of the item at the specified item position.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Gets the index of the item at the specified item position.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Inserts the group at the specified group index.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Checks whether the item at the specified index is checked.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return @c true if the item is checked, @n
* Checks whether the item at the specified index is enabled.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return @c true if the item is enabled, @n
* Checks whether the item at the specified index is currently loaded to the slidable list.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return @c true if the item is loaded, @n
* Removes all the groups of the %SlidableGroupedList control.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Gets the count of all the groups of the %SlidableGroupedList control.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return The count of all the groups
* Inserts the item to the specified group and item indices.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* Gets the count of all the items in the specified group.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return The count of all the items in the specified group
* Draws and shows the specified item of %SlidableGroupedList.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
- * @param[in] groupIndex The group index
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
+ * @param[in] groupIndex The group index
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
* @exception E_INVALID_OPERATION The item has never been drawn before calling this method.
- * @exception E_SYSTEM A system error has occurred.
+ * @exception E_SYSTEM A system error has occurred.
* @endif
*/
result RefreshItem(int groupIndex, int itemIndex);
* Draws and shows the specified group of %SlidableGroupedList.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
+ * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class.
* @since 2.0
*
* @return An error code
* It will then receive related events from %SlidableList.
*
* Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
- * when the %SlidableList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat
+ * when the %SlidableList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). %CustomListItemFormat
* must be deleted by the application.
*
- * Refer to CustomListItem and CustomListItemFormat.
+ * For more information, see CustomListItem and CustomListItemFormat.
+ *
+ * The following example demonstrates how to use the %SlidableList class.
*
* Example:
*
* @since 2.0
*
* @return An error code
- * @param[in] rect This instance represents the X and Y coordinates of the top-left corner of the created %SlidableList along with the width and height
+ * @param[in] rect This instance represents the X and Y coordinates of the top-left corner of the created
+ * %SlidableList along with the width and height
* @param[in] style The style set of %CustomList
* @param[in] itemDivider Set to @c true to display an item divider, @n
* else @c false
* @deprecated This class is deprecated. Instead of using this class, use the ListView class.
* @since 2.0
*
- * @return The next item index
+ * @return The next item index
* @param[in] index The item index
* @remarks This method can only be used when the style of the list allows multiple selections.
* @endif
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c index is less than @c 0 or greater than the item count.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The inserted item is deleted automatically when the list is destroyed.
+ * @remarks The inserted item is deleted automatically when the list is destroyed.
* Do not add, insert, or set an item that already belongs to %SlidableList.
* @endif
*/
* @deprecated This class is deprecated. Instead of using this class, use the ListView class.
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] index The item index
* @param[in] check The check status
* @exception E_SUCCESS The method is successful.
* @since 2.0
*
* @return A CustomListItem
- * @param[in] index The item index
+ * @param[in] index The item index
* @endif
*/
const CustomListItem* GetLoadedItemAt(int index) const;
* @since 2.0
*
* @return The item ID
- * @param[in] index The item index
+ * @param[in] index The item index
* @endif
*/
int GetLoadedItemIdAt(int index) const;
* @deprecated This class is deprecated. Instead of using this class, use the ListView class.
* @since 2.0
*
- * @return The index of the item
- * @param[in] itemId The item ID
+ * @return The index of the item
+ * @param[in] itemId The item ID
* @endif
*/
int GetLoadedItemIndexFromItemId(int itemId) const;
*
* @since 2.0
*
- * The %Slider class displays a slider that represents changing progress or setting information. The difference between %Slider
+ * The %Slider class displays a slider that represents the changing progress or setting information. The difference between %Slider
* and Progress is that the former accepts user input by the touch of the slider icon.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_slider.htm">Slider</a>.
public:
/**
* The object is not fully constructed after this constructor is called. @n
- * For full construction, the %Construct() method must be called right after calling this constructor.
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
* @remarks
* - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if used earlier.
* - If the given size is less than the minimum, it returns @c E_INVALID_ARG.
- * - The size of the control must be within the range defined by the minimum size and the maximum size.
+ * - The size of the control must be within the range defined by the minimum size and maximum size.
*/
result Construct(const Tizen::Graphics::Rectangle& rect, BackgroundStyle backgroundStyle = BACKGROUND_STYLE_DEFAULT, bool showTitle = false, int minValue = 0, int maxValue = 100, GroupStyle groupStyle = GROUP_STYLE_NONE);
* @remarks
* - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if used earlier.
* - If the given size is less than the minimum, it returns @c E_INVALID_ARG.
- * - The size of the control must be within the range defined by the minimum size and the maximum size.
+ * - The size of the control must be within the range defined by the minimum size and maximum size.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, BackgroundStyle backgroundStyle = BACKGROUND_STYLE_DEFAULT, bool showTitle = false, int minValue = 0, int maxValue = 100, GroupStyle groupStyle = GROUP_STYLE_NONE);
/**
- * Adds a IAdjustmentEventListener instance. @n
+ * Adds an IAdjustmentEventListener instance. @n
* The added listener listens to events on the context of the specified event dispatcher when they are fired.
*
* @since 2.0
void AddAdjustmentEventListener(Tizen::Ui::IAdjustmentEventListener& listener);
/**
- * Removes a IAdjustmentEventListener instance. @n
+ * Removes an IAdjustmentEventListener instance. @n
* The removed listener cannot listen to events when they are fired.
*
* @since 2.0
result SetRange(int minValue, int maxValue);
/**
- * Gets the minimum value and the maximum value of the slider.
+ * Gets the minimum value and maximum value of the slider.
*
* @since 2.0
*
*
* @return The title text of the entered string
*
- * @remarks By default returns an empty string.
+ * @remarks By default this method returns an empty string.
*/
Tizen::Base::String GetTitleText(void) const;
* The optimal size of the control is defined in
* <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @param[in] sliderStyle The style of the slider @n
- * Multiple link types can be combined using bitwise OR operator.
+ * Multiple link types can be combined using the bitwise OR operator.
* @param[in] minValue The minimum slider value
* @param[in] maxValue The maximum slider value
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified minimum and maximum values are less than @c -99, or greater than @c 999.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or the specified @c minValue is greater than @c maxVaue.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The specified @c minValue is greater than @c maxVaue.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - A control is fully functional only after it has been added to a container. Therefore, some methods may fail if they are used before
- * adding the control to the container.
+ * adding the control to the container.
* - If the specified size is less than the minimum size, the %Slider control is constructed with the minimum size.
- * - The width and the height of the control must be greater than @c 0.
- * - The size of the control must be within the range defined by the minimum size and the maximum size.
+ * - The width and height of the control must be greater than @c 0.
+ * - The size of the control must be within the range defined by the minimum size and maximum size.
* @see SliderStyle
*/
result Construct(const Tizen::Graphics::Rectangle& rect, unsigned long sliderStyle, int minValue = 0, int maxValue = 100);
* The optimal size of the control is defined in
* <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @param[in] sliderStyle The style of the slider @n
- * Multiple link types can be combined using bitwise OR operator.
+ * Multiple link types can be combined using the bitwise OR operator.
* @param[in] minValue The minimum slider value
* @param[in] maxValue The maximum slider value
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified minimum and maximum values are less than @c -99, or greater than @c 999.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or the specified @c minValue is greater than @c maxVaue.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The specified @c minValue is greater than @c maxVaue.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - A control is fully functional only after it has been added to a container. Therefore, some methods may fail if they are used before
- * adding the control to the container.
+ * adding the control to the container.
* - If the specified size is less than the minimum size, the %Slider control is constructed with the minimum size.
- * - The width and the height of the control must be greater than @c 0.
- * - The size of the control must be within the range defined by the minimum size and the maximum size.
+ * - The width and height of the control must be greater than @c 0.
+ * - The size of the control must be within the range defined by the minimum size and maximum size.
* @see SliderStyle
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, unsigned long sliderStyle, int minValue = 0, int maxValue = 100);
/**
- * Adds a ISliderEventListener instance. @n
+ * Adds an ISliderEventListener instance. @n
* The added listener can listen to the slider-related events.
*
* @since 2.0
void AddSliderEventListener(ISliderEventListener& listener);
/**
- * Removes a ISliderEventListener instance. @n
+ * Removes an ISliderEventListener instance. @n
* The removed listener cannot listen to events when they are fired.
*
* @since 2.0
* @return An error code
* @param[in] status The state of the slider thumb
* @param[in] bitmap The Thumb bitmap image
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result SetThumbBitmap(SliderThumbStatus status, const Tizen::Graphics::Bitmap& bitmap);
*
* @return An error code
* @param[in] status The state of the slider thumb
- * @param[in] color The color should be set for the thumb text
+ * @param[in] color The color to be set for the thumb text
*/
void SetThumbTextColor(SliderThumbStatus status, const Tizen::Graphics::Color& color);
/**
* @file FUiCtrlSliderTypes.h
- * @brief This is the header file for the enumerations of the Slider class.
+ * @brief This is the header file for the enumerations of the %Slider class.
*
* This header files contains the declarations of the enumerations of the Slider class.
*
, __pFirstPanel(null)
, __pSecondPanel(null){}
- bool Initialize(void);
+ bool Initialize(void);
virtual result OnInitializing(void);
virtual result OnTerminating(void);
+ virtual void OnDividerPositionChanged(Tizen::Ui::Controls::SplitPanel& source, int position){};
+ virtual void OnDividerDoublePressed(Tizen::Ui::Controls::SplitPanel& source) {};
private:
Tizen::Ui::Controls::SplitPanel* __pSplitPanel;
// Creates instances of Panel
__pFirstPanel = new (std::nothrow) Panel();
__pFirstPanel->Construct(Rectangle(0, 0, 400, 480));
+ __pFirstPanel->SetBackgroundColor(Color::GetColor(COLOR_ID_YELLOW));
__pSecondPanel = new (std::nothrow) Panel();
__pSecondPanel->Construct(Rectangle(0, 0, 400, 480));
+ __pSecondPanel->SetBackgroundColor(Color::GetColor(COLOR_ID_RED));
//Sets the divider position to the slit panel
__pSplitPanel->SetDividerPosition(400);
* @since 2.0
*
* @return An error code
- * @param[in] rect The location and size of the %SplitPanel control as a Tizen::Graphics::Rectangle instance.
+ * @param[in] rect The location and size of the %SplitPanel control as a Tizen::Graphics::Rectangle instance
* @param[in] splitPanelDividerStyle The divider style of the %SplitPanel control
* @param[in] splitPanelDividerDirection The divider direction of the %SplitPanel control @n
- * The specified divider direction determines the divider is vertical or horizontal.
+ * The specified divider direction determines whether the divider is vertical or horizontal.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
* @since 2.1
*
* @return An error code
- * @param[in] rect The location and size of the %SplitPanel control as a Tizen::Graphics::FloatRectangle instance.
+ * @param[in] rect The location and size of the %SplitPanel control as a Tizen::Graphics::FloatRectangle instance
* @param[in] splitPanelDividerStyle The divider style of the %SplitPanel control
* @param[in] splitPanelDividerDirection The divider direction of the %SplitPanel control @n
- * The specified divider direction determines the divider is vertical or horizontal.
+ * The specified divider direction determines whether the divider is vertical or horizontal.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
/**
- * Adds a ISplitPanelEventListener instance. @n
+ * Adds an ISplitPanelEventListener instance. @n
* The added listener listens to events on the context of the specified event dispatcher when they are fired.
*
* @since 2.0
result AddSplitPanelEventListener(ISplitPanelEventListener& listener);
/**
- * Adds a ISplitPanelEventListenerF instance. @n
+ * Adds an ISplitPanelEventListenerF instance. @n
* The added listener listens to events on the context of the specified event dispatcher when they are fired.
*
* @since 2.1
result AddSplitPanelEventListener(ISplitPanelEventListenerF& listener);
/**
- * Removes a ISplitPanelEventListener instance. @n
+ * Removes an ISplitPanelEventListener instance. @n
* The removed listener cannot listen to events when they are fired.
*
* @since 2.0
result RemoveSplitPanelEventListener(ISplitPanelEventListener& listener);
/**
- * Removes a ISplitPanelEventListenerF instance. @n
+ * Removes an ISplitPanelEventListenerF instance. @n
* The removed listener cannot listen to events when they are fired.
*
* @since 2.1
*
* @return An error code
* @param[in] pControl The control to set
- * @param[in] paneOrder The order of pane. @c SPLIT_PANEL_PANE_FIRST is displayed on the left side @n
- * and @c SPLIT_PANEL_PANE_SECOND is displayed on the right side of the %SplitPanel when its direction is
- * @c SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL.
+ * @param[in] paneOrder The order of the pane @n @c SPLIT_PANEL_PANE_FIRST is displayed on the left side @n
+ * and @c SPLIT_PANEL_PANE_SECOND is displayed on the right side of the %SplitPanel when its direction is
+ * @c SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @remarks The %SplitPanel control must contain exactly two panes and the user can change their relative sizes.
*
* @since 2.0
*
- * @return The control at the specified pane order of the %SplitPanel @n
- * @c null, if there is no panel.
- * @param[in] paneOrder The order of pane. @c SPLIT_PANEL_PANE_FIRST is displayed on the left side @n
- * and @c SPLIT_PANEL_PANE_SECOND is displayed on the right side of the %SplitPanel when
- * its direction is @c SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL.
+ * @return The control at the specified pane order of the %SplitPanel, @n
+ * else @c null if there is no panel
+ * @param[in] paneOrder The order of pane @n @c SPLIT_PANEL_PANE_FIRST is displayed on the left side @n
+ * and @c SPLIT_PANEL_PANE_SECOND is displayed on the right side of the %SplitPanel when
+ * its direction is @c SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Control* GetPane(SplitPanelPaneOrder paneOrder) const;
* @since 2.0
*
* @return An error code
- * @param[in] position The position of divider
+ * @param[in] position The position of the divider
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @remarks This Api sets the value to current orientation. The divider position must be reset when the orientation of the form is changed.
+ * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
+ * @remarks
+ * - This API sets the value to the current orientation.
+ * - The divider position must be reset when the orientation of the form is changed.
* @see GetDividerPosition()
* @see SetMaximumDividerPosition()
* @see GetMaximumDividerPosition()
* @since 2.1
*
* @return An error code
- * @param[in] position The position of divider
+ * @param[in] position The position of the divider
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @remarks This Api sets the value to current orientation. The divider position must be reset when the orientation of the form is changed.
+ * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
+ * @remarks
+ * - This API sets the value to the current orientation.
+ * - The divider position must be reset when the orientation of the form is changed.
* @see GetDividerPosition()
* @see SetMaximumDividerPosition()
* @see GetMaximumDividerPosition()
float GetDividerPositionF(void) const;
/**
- * Sets the divider maximum position of the control.
+ * Sets the maximum divider position of the control.
*
* @since 2.0
*
* @return An error code
- * @param[in] position The position of divider.
+ * @param[in] position The position of the divider
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @remarks This Api sets the value to current orientation. The maximum divider position must be reset when the orientation of the form is changed.
+ * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
+ * @remarks
+ * - This API sets the value to the current orientation.
+ * - The maximum divider position must be reset when the orientation of the form is changed.
* @see GetMaximumDividerPosition()
* @see SetMinimumDividerPosition()
* @see GetMinimumDividerPosition()
result SetMaximumDividerPosition(int position);
/**
- * Sets the divider maximum position of the control.
+ * Sets the maximum divider position of the control.
*
* @since 2.1
*
* @return An error code
- * @param[in] position The position of divider.
+ * @param[in] position The position of the divider
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @remarks This Api sets the value to current orientation. The maximum divider position must be reset when the orientation of the form is changed.
+ * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
+ * @remarks
+ * - This API sets the value to the current orientation.
+ * - The maximum divider position must be reset when the orientation of the form is changed.
* @see GetMaximumDividerPosition()
* @see SetMinimumDividerPosition()
* @see GetMinimumDividerPosition()
*
* @since 2.0
*
- * @return The maximum divider position of the control.
+ * @return The maximum divider position of the control
* @see SetMaximumDividerPosition()
* @see SetMinimumDividerPosition()
* @see GetMinimumDividerPosition()
*
* @since 2.1
*
- * @return The maximum divider position of the control.
+ * @return The maximum divider position of the control
* @see SetMaximumDividerPosition()
* @see SetMinimumDividerPosition()
* @see GetMinimumDividerPosition()
* @since 2.0
*
* @return An error code
- * @param[in] position The position of divider.
+ * @param[in] position The position of divider
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @remarks This Api sets the value to current orientation. The minimum divider position must be reset when the orientation of the form is changed.
+ * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
+ * @remarks
+ * - This API sets the value to the current orientation.
+ * - The minimum divider position must be reset when the orientation of the form is changed.
* @see GetMinimumDividerPosition()
* @see SetMaximumDividerPosition()
* @see GetMaximumDividerPosition()
* @since 2.1
*
* @return An error code
- * @param[in] position The position of divider.
+ * @param[in] position The position of the divider
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @remarks This Api sets the value to current orientation. The minimum divider position must be reset when the orientation of the form is changed.
+ * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
+ * @remarks
+ * - This API sets the value to the current orientation.
+ * - The minimum divider position must be reset when the orientation of the form is changed.
* @see GetMinimumDividerPosition()
* @see SetMaximumDividerPosition()
* @see GetMaximumDividerPosition()
*
* @since 2.0
*
- * @return The minimum divider position of the control.
+ * @return The minimum divider position of the control
* @see SetMinimumDividerPosition()
* @see SetMaximumDividerPosition()
* @see GetMaximumDividerPosition()
*
* @since 2.1
*
- * @return The minimum divider position of the control.
+ * @return The minimum divider position of the control
* @see SetMinimumDividerPosition()
* @see SetMaximumDividerPosition()
* @see GetMaximumDividerPosition()
* @since 2.0
*
* @return An error code
- * @param[in] paneOrder The order of pane.
+ * @param[in] paneOrder The order of the pane
* @see IsPaneMaximized()
*/
result MaximizePane(SplitPanelPaneOrder paneOrder);
/**
* @file FUiCtrlSplitPanelTypes.h
- * @brief This is the header file for the enumerations of the SplitPanel class.
+ * @brief This is the header file for the %SplitPanel enumerations.
*
* This header file contains the declarations of the enumerations of the SplitPanel class.
*
* item of %Tab control consists of its text string and optional bitmap image.
* Items can be added to an itemlist of the tab model with AddItem(). Items can
* be inserted into an itemlist by InsertItemAt(), updated into an itemlist by SetItemAt(),
- * removed from an itemlist by RemoveItemAt(), etc. It is possible to customize the
+ * removed from an itemlist by RemoveItemAt(), and so on. It is possible to customize the
* background image of the tab shelf, and the image of the currently selected tab item.
* A badge icon can also be used to give more information for each tab item.
*
+ * The following example demonstrates how to use the %Tab class.
+ *
* Example:
*
* @image html ui_controls_tab.png
* @param[in] actionId The action ID for this item
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c actionId is out of range.
- * @exception E_SYSTEM A system error has occurred, or @n
- * the total number of items has exceed the %Tab control's maximum item count.
- * @remarks The @c actionId range is @c 0-999. @n
- * The maximum number of items for %Tab with text style is @c 9. @n
- * The maximum number of items for icon style %Tab is @c 8.
- * @remarks This method can only be used when the %Form control has the FORM_STYLE_TEXT_TAB style.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - The total number of items has exceed the %Tab control's maximum item count.
+ * @remarks
+ * - The @c actionId range is @c 0-999. @n
+ * The maximum number of items for %Tab with text style is @c 9. @n
+ * The maximum number of items for icon style %Tab is @c 8.
+ * - This method can only be used when the %Form control has the FORM_STYLE_TEXT_TAB style.
* @endif
*/
result AddItem(const Tizen::Base::String& text, int actionId);
* @param[in] actionId The specified @c actionId for this item
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c actionId is out of range.
- * @exception E_SYSTEM A system error has occurred, or @n
- * the total number of items has exceed the %Tab control's maximum item count.
- * @remarks The @c actionId range is @c 0-999. @n
- * The maximum number of items for %Tab with text style is @c 9. @n
- * The maximum number of items for icon style %Tab is @c 8. @n
- * This method can only be used when the %Form control has the FORM_STYLE_TEXT_TAB style.
- * @remarks If the size of bitmap is greater than the default size , the bitmap is scaled down.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - The total number of items has exceed the %Tab control's maximum item count.
+ * @remarks
+ * - The @c actionId range is @c 0-999. @n
+ * The maximum number of items for %Tab with text style is @c 9. @n
+ * The maximum number of items for icon style %Tab is @c 8.
+ * - This method can only be used when the %Form control has the FORM_STYLE_TEXT_TAB style.
+ * - If the size of bitmap is greater than the default size , the bitmap is scaled down.
* @endif
*/
result AddItem(const Tizen::Graphics::Bitmap& titleIcon, const Tizen::Base::String& text, int actionId);
* @param[in] actionId The specified @c actionId for this item
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c actionId is out of range.
- * @exception E_SYSTEM A system error has occurred, or @n
- * the total number of items has exceed the %Tab control's maximum item count.
- * @remarks The @c actionId range is @c 0-999. @n
- * The maximum number of items for %Tab with text style is @c 9. @n
- * The maximum number of items for icon style %Tab is @c 8. @n
- * This method can only be used when the Form control has the FORM_STYLE_ICON_TAB style. @n
- * If the size of the bitmap is greater than the default size, the bitmap is scaled down.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - The total number of items has exceed the %Tab control's maximum item count.
+ * @remarks
+ * - The @c actionId range is @c 0-999. @n
+ * The maximum number of items for %Tab with text style is @c 9. @n
+ * The maximum number of items for icon style %Tab is @c 8.
+ * - This method can only be used when the Form control has the FORM_STYLE_ICON_TAB style.
+ * - If the size of the bitmap is greater than the default size, the bitmap is scaled down.
* @endif
*/
result AddItem(const Tizen::Graphics::Bitmap& icon, int actionId);
* @param[in] actionId The specified @c actionId for this item
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c actionId is out of range.
- * @exception E_SYSTEM A system error has occurred, or @n
- * the total number of items has exceed the %Tab control's maximum item count.
- * @remarks The @c actionId range is @c 0-999. @n
- * The maximum number of items for %Tab with text style is @c 9. @n
- * The maximum number of items for icon style %Tab is @c 8.
- * @remarks This method can only be used when the Form control has the FORM_STYLE_TEXT_TAB style.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - The total number of items has exceed the %Tab control's maximum item count.
+ * @remarks
+ * - The @c actionId range is @c 0-999. @n
+ * The maximum number of items for %Tab with text style is @c 9. @n
+ * The maximum number of items for icon style %Tab is @c 8.
+ * - This method can only be used when the Form control has the FORM_STYLE_TEXT_TAB style.
* @endif
*/
result InsertItemAt(int index, const Tizen::Base::String& text, int actionId);
* @param[in] actionId The specified @c actionId for this item
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c actionId is out of range.
- * @exception E_SYSTEM A system error has occurred, or @n
- * the total number of items has exceed the %Tab control's maximum item count.
- * @remarks The @c actionId range is @c 0-999.
- * @remarks The maximum number of items for %Tab with text style is @c 9. @n
- * The maximum number of items for icon style %Tab is @c 8. @n
- * This method can only be used when the %Form control has the FORM_STYLE_TEXT_TAB style. @n
- * If the size of bitmap is greater than the default size, the bitmap is scaled down.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - The total number of items has exceed the %Tab control's maximum item count.
+ * @remarks
+ * - The @c actionId range is @c 0-999.
+ * - The maximum number of items for %Tab with text style is @c 9. @n
+ * The maximum number of items for icon style %Tab is @c 8.
+ * - This method can only be used when the %Form control has the FORM_STYLE_TEXT_TAB style.
+ * - If the size of bitmap is greater than the default size, the bitmap is scaled down.
* @endif
*/
result InsertItemAt(int index, const Tizen::Graphics::Bitmap& titleIcon, const Tizen::Base::String& text, int actionId);
* @param[in] actionId The specified @c actionId for this item
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c actionId is out of range.
- * @exception E_SYSTEM A system error has occurred, or @n
- * the total number of items has exceed the %Tab control's maximum item count.
- * @remarks The @c actionId range is @c 0-999.
- * @remarks The maximum number of items for %Tab with text style is @c 9. @n
- * The maximum number of items for icon style %Tab is @c 8. @n
- * This method can only be used when the Form control has the FORM_STYLE_ICON_TAB style. @n
- * If the size of bitmap is greater than the default size, the bitmap is scaled down.
+ * @exception E_SYSTEM Either of the following conditions has occurred:
+ * - A system error has occurred.
+ * - The total number of items has exceed the %Tab control's maximum item count.
+ * @remarks
+ * - The @c actionId range is @c 0-999.
+ * - The maximum number of items for %Tab with text style is @c 9. @n
+ * The maximum number of items for icon style %Tab is @c 8.
+ * - This method can only be used when the Form control has the FORM_STYLE_ICON_TAB style.
+ * - If the size of bitmap is greater than the default size, the bitmap is scaled down.
* @endif
*/
result InsertItemAt(int index, const Tizen::Graphics::Bitmap& icon, int actionId);
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c actionId is out of range.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The @c actionId range is @c 0-999. @n
- * This method can only be used when the Form control has the FORM_STYLE_TEXT_TAB style.
+ * @remarks
+ * - The @c actionId range is @c 0-999.
+ * - This method can only be used when the Form control has the FORM_STYLE_TEXT_TAB style.
* @endif
*/
result SetItemAt(int index, const Tizen::Base::String& text, int actionId);
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c actionId is out of range.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The @c actionId range is @c 0-999. @n
- * This method can only be used when the Form control has the FORM_STYLE_TEXT_TAB style. @n
- * If the size of bitmap is greater than the default size, the bitmap is scaled down.
+ * @remarks
+ * - The @c actionId range is @c 0-999.
+ * - This method can only be used when the Form control has the FORM_STYLE_TEXT_TAB style.
+ * - If the size of bitmap is greater than the default size, the bitmap is scaled down.
* @endif
*/
result SetItemAt(int index, const Tizen::Graphics::Bitmap& titleIcon, const Tizen::Base::String& text, int actionId);
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c actionId is out of range.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The @c actionId range is @c 0-999. @n
- * This method can only be used when the Form control has the FORM_STYLE_ICON_TAB style. @n
- * If the size of bitmap is greater than the default size, the bitmap is scaled down.
+ * @remarks
+ * - The @c actionId range is @c 0-999.
+ * - This method can only be used when the Form control has the FORM_STYLE_ICON_TAB style.
+ * - If the size of bitmap is greater than the default size, the bitmap is scaled down.
* @endif
*/
result SetItemAt(int index, const Tizen::Graphics::Bitmap& icon, int actionId);
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c actionId is out of range.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The @c actionId range is @c 0-999. @n
- * If the size of bitmap is greater than the default size, the bitmap is scaled down.
+ * @remarks
+ * - The @c actionId range is @c 0-999.
+ * - If the size of bitmap is greater than the default size, the bitmap is scaled down.
* @endif
*/
result SetBadgeIcon(int actionId, const Tizen::Graphics::Bitmap* pBadgeIcon);
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The background bitmap is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The background bitmap must use the 9-patched bitmap.
- * @remarks When a user navigates the user interface using the directional keys, the focused UI control is highlighted.
+ * @remarks
+ * - The background bitmap must use the 9-patched bitmap.
+ * @remarks - When a user navigates the user interface using the directional keys, the focused UI control is highlighted.
* @endif
*/
result SetHighlightedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap);
* <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_SYSTEM A system error has occurred.
*/
result Construct(int x, int y, int width);
* <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_SYSTEM A system error has occurred.
*/
result Construct(float x, float y, float width);
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
* The specified @c item is not constructed.
* @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit.
- * @exception E_OUT_OF_RANGE The specified @c index is out of the range of the data structure. @n
- * The specified @c index is either greater than or equal to the number of items or is less than @c 0.
+ * @exception E_OUT_OF_RANGE Either of the following conditions has occurred:
+ * - The specified @c index is out of the range of the data structure.
+ * - The specified @c index is greater than or equal to the number of items.
+ * - The specified @c index is less than @c 0.
* @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* @return An error code
* @param[in] index The index of the item
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified @c index is out of the range of the data structure. @n
- * The specified @c index is either greater than or equal to the number of items or is less than @c 0.
+ * @exception E_OUT_OF_RANGE Either of the following conditions has occurred:
+ * - The specified @c index is out of the range of the data structure.
+ * - The specified @c index is greater than or equal to the number of items.
+ * - The specified @c index is less than @c 0.
* @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_SYSTEM A system error has occurred.
* @remarks If the currently selected item is removed, the next item is selected automatically.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
* The specified @c item is not constructed.
- * @exception E_OUT_OF_RANGE The specified @c index is out of the range of the data structure. @n
- * The specified @c index is either greater than or equal to the number of items or is less than @c 0.
+ * @exception E_OUT_OF_RANGE Either of the following conditions has occurred:
+ * - The specified @c index is out of the range of the data structure.
+ * - The specified @c index is greater than or equal to the number of items.
+ * - The specified @c index is less than @c 0.
* @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* @return An error code
* @param[in] index The index of the item to select
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified @c index is not within the range of the data structure. @n
- * The specified @c index is either greater than or equal to the number of items or is less than @c 0.
+ * @exception E_OUT_OF_RANGE Either of the following conditions has occurred:
+ * - The specified @c index is out of the range of the data structure.
+ * - The specified @c index is greater than or equal to the number of items.
+ * - The specified @c index is less than @c 0.
* @exception E_INVALID_STATE This instance is in an invalid state.
* @exception E_SYSTEM A system error has occurred.
*/
* @param[in] actionId The action ID of this item
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The @c actionId of the specified item must be greater than or equal to @c 0.
- * @exception E_INVALID_STATE This instance is in an invalid state.
+ * The @c actionId of the specified item is not greater than or equal to @c 0.
*/
result Construct(const Tizen::Base::String& text, int actionId);
// Creates an instance of TableView
__pTableView = new TableView();
__pTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), true, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
- __pTableView->SetItemProvider(*this);
- __pTableView->AddTableViewItemEventListener(this);
+ __pTableView->SetItemProvider(this);
+ __pTableView->AddTableViewItemEventListener(*this);
// Adds the TableView to the form
AddControl(__pTableView);
* @since 2.0
*
* @return An error code
- * @param[in] rect An instance of the Graphics::Rectangle class
- * This instance represents the x and y coordinates of the left top corner of the created %TableView along with the width and height.
- * @param[in] itemDivider Set to @c true to display an item divider, @n
- * else @c false
- * @param[in] scrollStyle The style of %TableView scroll bar style
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or either the rect.width or rect.height parameter has a negative value.
+ * @param[in] rect An instance of the Graphics::Rectangle class
+ * This instance represents the x and y coordinates of the left top corner of the created
+ * %TableView along with the width and height.
+ * @param[in] itemDivider Set to @c true to display an item divider, @n
+ * else @c false
+ * @param[in] scrollStyle The style of %TableView scroll bar style
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - Either the rect.width or rect.height parameter has a negative value.
*
*/
result Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle);
* @since 2.1
*
* @return An error code
- * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
- * This instance represents the x and y coordinates of the left top corner of the created %TableView along with the width and height.
- * @param[in] itemDivider Set to @c true to display an item divider, @n
- * else @c false
- * @param[in] scrollStyle The style of %TableView scroll bar style
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or either the @c rect.width or @c rect.height parameter has a negative value.
+ * @param[in] rect An instance of the Tizen::Graphics::FloatRectangle class @n
+ * This instance represents the x and y coordinates of the left top corner of the created
+ * %TableView along with the width and height.
+ * @param[in] itemDivider Set to @c true to display an item divider, @n
+ * else @c false
+ * @param[in] scrollStyle The style of %TableView scroll bar style
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - Either the @c rect.width or @c rect.height parameter has a negative value.
*
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle);
*
* @since 2.0
*
- * @see ITableViewViewItemEventListener::OnTableViewItemReordered()
+ * @see ITableViewItemEventListener::OnTableViewItemReordered()
*/
void BeginReorderingMode(void);
*
* @since 2.0
*
- * @see ITableViewViewItemEventListener::OnTableViewItemReordered()
+ * @see ITableViewItemEventListener::OnTableViewItemReordered()
*/
void EndReorderingMode(void);
/**
- * Returns whether the %TableView control is in reordering mode or not.
+ * Checks whether the %TableView control is in reordering mode.
*
* @since 2.0
*
*
* @return An error code
* @param[in] listener The event listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_ALREADY_EXIST The listener is already added.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_ALREADY_EXIST The listener is already added.
* @remarks The specified listener should be allocated in heap memory.
*/
result AddTableViewItemEventListener(ITableViewItemEventListener& listener);
*
* @since 2.0
*
- * @return An error code
- * @param[in] listener The event listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND The listener is not found.
+ * @return An error code
+ * @param[in] listener The event listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_NOT_FOUND The listener is not found.
*/
result RemoveTableViewItemEventListener(ITableViewItemEventListener& listener);
* @since 2.0
*
* @return An error code
- * @param[in] listener The event listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_ALREADY_EXIST The listener is already added.
+ * @param[in] listener The event listener to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_ALREADY_EXIST The listener is already added.
* @remarks The specified listener should be allocated in heap memory.
*/
result AddFastScrollListener(IFastScrollListener& listener);
* @since 2.0
*
* @return An error code
- * @param[in] listener The event listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_NOT_FOUND The listener is not found.
+ * @param[in] listener The event listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_NOT_FOUND The listener is not found.
*/
result RemoveFastScrollListener(IFastScrollListener& listener);
* @since 2.0
*
* @return An error code
- * @param[in] listener The event listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_ALREADY_EXIST The listener is already added.
- * @remarks The specified listener should be allocated in heap memory.
+ * @param[in] listener The event listener to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_ALREADY_EXIST The listener is already added.
+ * @remarks The specified listener should be allocated in heap memory.
* @see IScrollEventListener::OnScrollEndReached()
* @see RemoveScrollEventListener()
*/
*
* @since 2.0
*
- * @return An error code
- * @param[in] listener The event listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_NOT_FOUND The listener is not found.
+ * @return An error code
+ * @param[in] listener The event listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_NOT_FOUND The listener is not found.
* @see IScrollEventListener::OnScrollEndReached()
* @see AddScrollEventListener()
*/
*
* @since 2.1
*
- * @return An error code
- * @param[in] listener The event listener to add
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_ALREADY_EXIST The listener is already added.
- * @remarks The specified listener should be allocated in heap memory.
+ * @return An error code
+ * @param[in] listener The event listener to add
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_ALREADY_EXIST The listener is already added.
+ * @remarks The specified listener should be allocated in heap memory.
* @see IScrollEventListenerF::OnScrollEndReached()
* @see RemoveScrollEventListenerF()
*/
* @since 2.1
*
* @return An error code
- * @param[in] listener The event listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @exception E_OBJ_NOT_FOUND The listener is not found.
+ * @param[in] listener The event listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_OBJ_NOT_FOUND The listener is not found.
* @see IScrollEventListenerF::OnScrollEndReached()
* @see AddScrollEventListenerF()
*/
*
* @since 2.0
*
- * @return An error code
- * @param[in] text The text of the index
- * @param[in] useSearchIcon Set to @c true to show the magnifying icon, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @return An error code
+ * @param[in] text The text of the index
+ * @param[in] useSearchIcon Set to @c true to show the magnifying icon, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
*/
result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon);
* @since 2.0
*
* @return An error code
- * @param[in] itemIndex The targeted item index
- * @param[in] itemAlignment The item alignment
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
+ * @param[in] itemIndex The targeted item index
+ * @param[in] itemAlignment The item alignment
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
* @remarks
* - This method does not work inside the ITableViewItemProvider callback.
* - This method should be called only after %TableView items are created. If this method needs to be called early in the lifecycle of
- * the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result ScrollToItem(int itemIndex, TableViewScrollItemAlignment itemAlignment = TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
* @since 2.0
*
* @return An error code
- * @param[in] itemIndex The item index to check
- * @param[in] check Set to @c true to select the item, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The item is disabled or the current state of the instance prohibits the execution of the specified operation.
+ * @param[in] itemIndex The item index to check
+ * @param[in] check Set to @c true to select the item, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The item is disabled or the current state of the instance prohibits the execution of the specified operation.
* @remarks
* - This method works only when the annex style of the item allows selection.
* - This method does not work during the ITableViewItemProvider call-back procedure.
* - This method should be called only after %TableView items are created. If this method needs to be called early in the lifecycle of
- * the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result SetItemChecked(int itemIndex, bool check);
*
* @since 2.0
*
- * @return @c true if the item is selected, @n
- * else @c false
- * @param[in] itemIndex The item itemIndex
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @return @c true if the item is selected, @n
+ * else @c false
+ * @param[in] itemIndex The item itemIndex
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
* @remarks
* - This method returns @c false, if the annex style of the item does not allow selection.
* - This method should be called only after %TableView items are created. If this method needs to be called early in the lifecycle of
- * the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
bool IsItemChecked(int itemIndex) const;
* @since 2.0
*
* @return An error code
- * @param[in] itemIndex The item index
- * @param[in] enable Set to @c true to enable the specified item, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
+ * @param[in] itemIndex The item index
+ * @param[in] enable Set to @c true to enable the specified item, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
* @remarks
* - This method does not work during the ITableViewItemProvider call-back procedure.
* - This method should be called only after %TableView items are created. If this method needs to be called early in the lifecycle of
- * the %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
result SetItemEnabled(int itemIndex, bool enable);
/**
- * Returns whether the item at the specified index is enabled or disabled.
+ * Checks whether the item at the specified index is enabled.
*
* @since 2.0
*
- * @return @c true if the item is enabled, @n
- * else @c false
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @return @c true if the item is enabled, @n
+ * else @c false
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
* @remarks
* - This method should be called only after %TableView items are created.
- * - If this method needs to be called early in the lifecycle of the
+ * - If this method needs to be called early in the lifecycle of
* %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
bool IsItemEnabled(int itemIndex) const;
*
* @since 2.0
*
- * @return An error code
- * @param[in] itemIndex The item index
- * @param[in] type The item to add, remove, or modify
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
+ * @return An error code
+ * @param[in] itemIndex The item index
+ * @param[in] type The item to add, remove, or modify
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE A specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
* @remarks This method does not work during the ITableViewItemProvider call-back procedure.
*/
result RefreshItem(int itemIndex, TableViewRefreshType type);
/**
* Updates all items of the table view. @n
- * Note that calling the %RefreshAllItems() method invokes ITableViewItemProvider::UpdateItem() or ITableViewItemProviderF::UpdateItem() for all loaded items.
+ * Note that calling the %RefreshAllItems() method invokes ITableViewItemProvider::UpdateItem() or ITableViewItemProviderF::UpdateItem()
+ * for all loaded items.
*
* @since 2.1
*
- * @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The %TableView item provider is processing the other request.
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The %TableView item provider is processing the other request.
*/
result RefreshAllItems(void);
*
* @since 2.0
*
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @b Since: @b 2.1
* @remarks
* - This method will delete all the items and recreate them, so it should not be called from the inside of
- * OnTableViewItemStateChanged() call-back as this leads to self deletion. If you need to update an Item, you should use RefreshItem() method.
+ * OnTableViewItemStateChanged() call-back as this leads to self deletion. If you need to update an Item, you should use RefreshItem() method.
* - This method should not be called from ITableViewItemProvider implementation because of recursion.
* - The specific error code can be accessed using the GetLastResult() method.
*/
* @since 2.0
*
* @return The item index of the item on specified position
- * @param[in] position The position of the item
+ * @param[in] position The position of the item
* @remarks
* - This method returns @c -1 if no item is found at the given position.
* - This method should be called only after %TableView items are created.
- * - If this method needs to be called early in the lifecycle of the %TableView,
- * then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
+ * - If this method needs to be called early in the lifecycle of %TableView,
+ * then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const;
* @since 2.1
*
* @return The item index of the item on specified position
- * @param[in] position The position of the item
+ * @param[in] position The position of the item
* @remarks
* - This method returns @c -1 if no item is found at the given position.
* - This method should be called only after %TableView items are created.
- ** - If this method needs to be called early in the lifecycle of the %TableView, then UpdateTableView() method should be called
+ ** - If this method needs to be called early in the lifecycle of %TableView, then UpdateTableView() method should be called
* explicitly (for example, during Tizen::Ui::Control::OnInitializing()).
*/
int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const;
ScrollInputMode GetScrollInputMode(void) const;
/**
- * Scrolls the list contents by a specified number of pixels. @n When it is negative, it scrolls to opposite direction in current scroll style.
+ * Scrolls the list contents by a specified number of pixels. @n
+ * When it is negative, it scrolls to opposite direction in current scroll style.
*
* @since 2.1
*
* @return An error code
- * @param[in] pixel The amount of pixels to scroll
- * @exception E_SUCCESS The method is successful.
+ * @param[in] pixel The amount of pixels to scroll
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c pixel is out of range.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* @remarks
* - If you call this method with negative @c pixel when position of scroll is already top of contents then
* it will return @c E_OUT_OF_RANGE. @n
result ScrollByPixel(int pixel);
/**
- * Scrolls the list contents by a specified number of pixels. @n When it is negative, it scrolls to opposite direction in current scroll style.
+ * Scrolls the list contents by a specified number of pixels. @n
+ * When it is negative, it scrolls to opposite direction in current scroll style.
*
* @since 2.1
*
* @return An error code
- * @param[in] pixel The amount of pixels to scroll
- * @exception E_SUCCESS The method is successful.
+ * @param[in] pixel The amount of pixels to scroll
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c pixel is out of range.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
* @remarks
* - If you call this method with negative @c pixel when position of scroll is already top of contents then it will
- * return @c E_OUT_OF_RANGE. @n
- * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE.
+ * return @c E_OUT_OF_RANGE. @n
+ * Likewise, in case of positive @c pixel on the bottom position of scroll it will also return @c E_OUT_OF_RANGE.
* - This method does not work during the ITableViewItemProvider call-back procedure.
*/
result ScrollByPixel(float pixel);
* @since 2.1
*
* @return An error code
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
*/
result OpenContextItem(int itemIndex);
* @since 2.1
*
* @return An error code
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
+ * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
*/
result CloseContextItem(int itemIndex);
*
* @return @c true if the context item is opened, @n
* else @c false
- * @param[in] itemIndex The item index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
+ * @param[in] itemIndex The item index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE The specified input parameter is invalid.
*/
bool IsContextItemOpened(int itemIndex) const;
{
/**
* @class TableViewContextItem
-* @brief This class defines common behavior for a %TableViewContextItem.
+* @brief This class defines the common behavior for a %TableViewContextItem.
*
* @since 2.0
*
{
/**
* @class TableViewGroupItem
-* @brief This class defines common behavior of %TableViewGroupItem.
+* @brief This class defines the common behavior of %TableViewGroupItem.
*
* @since 2.0
*
* @return An error code
* @param[in] itemSize The size of the item
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Graphics::Dimension& itemSize);
* @since 2.0
*
* @return An error code
- * @param[in] layout The layout for both of the portrait and landscape modes
+ * @param[in] layout The layout for both the portrait and landscape modes
* @param[in] itemSize The size of the item
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @since 2.0
*
* @return An error code
- * @param[in] portraitLayout The layout for portrait mode
- * @param[in] landscapeLayout The layout for landscape mode
+ * @param[in] portraitLayout The layout for the portrait mode
+ * @param[in] landscapeLayout The layout for the landscape mode
* @param[in] itemSize The size of the item
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @return An error code
* @param[in] itemSize The size of the item
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Graphics::FloatDimension& itemSize);
* @since 2.1
*
* @return An error code
- * @param[in] layout The layout for both of the portrait and landscape modes
+ * @param[in] layout The layout for both the portrait and landscape modes
* @param[in] itemSize The size of the item
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @since 2.1
*
* @return An error code
- * @param[in] portraitLayout The layout for portrait mode
- * @param[in] landscapeLayout The layout for landscape mode
+ * @param[in] portraitLayout The layout for the portrait mode
+ * @param[in] landscapeLayout The layout for the landscape mode
* @param[in] itemSize The size of the item
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
/**
* @class TableViewItem
-* @brief This class defines common behavior for a %TableViewItem.
+* @brief This class defines the common behavior for a %TableViewItem.
*
* @since 2.0
*
-* The %TableViewItem class is a base class which represents a table view item which is the unit of handling of TableView.
+* The %TableViewItem class is a base class which represents a table view item which is the unit of handling TableView.
*
*/
public:
/**
* The object is not fully constructed after this constructor is called. @n
- * For full construction, the %Construct() method must be called right after calling this constructor.
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
*
* @return An error code
* @param[in] itemSize The size of the item
- * @param[in] style The style of Annex
+ * @param[in] style The style of the annex
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
* @since 2.0
*
* @return An error code
- * @param[in] layout The layout for both of the portrait and landscape modes
+ * @param[in] layout The layout for both the portrait and landscape modes
* @param[in] itemSize The size of the item
- * @param[in] style The style of Annex
+ * @param[in] style The style of the annex
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
* @since 2.0
*
* @return An error code
- * @param[in] portraitLayout The layout for portrait mode
- * @param[in] landscapeLayout The layout for landscape mode
+ * @param[in] portraitLayout The layout for the portrait mode
+ * @param[in] landscapeLayout The layout for the landscape mode
* @param[in] itemSize The size of the item
- * @param[in] style The style of Annex
+ * @param[in] style The style of the annex
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
*
* @return An error code
* @param[in] itemSize The size of the item
- * @param[in] style The style of Annex
+ * @param[in] style The style of the annex
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
* @since 2.1
*
* @return An error code
- * @param[in] layout The layout for both of the portrait and landscape modes
+ * @param[in] layout The layout for both the portrait and landscape modes
* @param[in] itemSize The size of the item
- * @param[in] style The style of Annex
+ * @param[in] style The style of the annex
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
* @since 2.1
*
* @return An error code
- * @param[in] portraitLayout The layout for portrait mode
- * @param[in] landscapeLayout The layout for landscape mode
+ * @param[in] portraitLayout The layout for the portrait mode
+ * @param[in] landscapeLayout The layout for the landscape mode
* @param[in] itemSize The size of the item
* @param[in] style The style of Annex
* @exception E_SUCCESS The method is successful.
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
/**
- * Sets context item that is displayed when an item is swept.
+ * Sets the context item that is displayed when an item is swept.
*
* @since 2.0
*
* @return An error code
* @param[in] pItem The object of TableViewContextItem
- * @remarks If context item is not set, TableView() does not display context item and an item sweep event is generated when an item is swept.
- * pItem must be deleted by applications when it is no longer used.
+ * @remarks
+ * - If a context item is not set, TableView() does not display the context item and an item sweep event is generated when an item is swept.
+ * - @c pItem must be deleted by applications when it is no longer used.
*/
void SetContextItem(const TableViewContextItem* pItem);
/**
- * Get the width of the annex area.
+ * Gets the width of the annex area.
*
* @since 2.0
*
static int GetAnnexWidth(TableViewAnnexStyle style);
/**
- * Get the width of the annex area.
+ * Gets the width of the annex area.
*
* @since 2.1
*
* @return The width of the annex
* @param[in] style The style of the annex
- * @remarks The width of the annex area is different among annex styles.
+ * @remarks The width of the annex area is different from the annex styles.
*/
static float GetAnnexWidthF(TableViewAnnexStyle style);
/**
* @class TableViewItemBase
-* @brief This class defines common behavior for a %TableViewItemBase.
+* @brief This class defines the common behavior for a %TableViewItemBase.
*
* @since 2.0
*
-* The %TableViewItemBase class is a base class which represents a table view item which is the unit of handling of TableView.
+* The %TableViewItemBase class is a base class which represents a table view item which is the unit of handling TableView.
*
*/
{
public:
/**
- * Sets the background image of the item which is displayed when the item is in specified state.
+ * Sets the background image of the item which is displayed when the item is in the specified state.
*
* @since 2.0
*
* @param[in] pBitmap The background bitmap image
* @param[in] status The item drawing state
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The background bitmap has priority over the background color. When both the background bitmap and the background color are specified, only the bitmap is displayed.
*/
result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
/**
- * Sets the background color of the item which is displayed when the item is in specified state.
+ * Sets the background color of the item which is displayed when the item is in the specified state.
*
* @since 2.0
*
*
* @return An error code
* @param[in] pControl The child control to select individually
- * @param[in] enable Set to @c true to enable the individual selection of a control, else @c false
+ * @param[in] enable Set to @c true to enable the individual selection of a control, @n
+ * else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
result SetIndividualSelectionEnabled(const Tizen::Ui::Control* pControl, bool enable);
/**
- * Returns whether the individual selection of a control is enabled or not.
+ * Checks whether the individual selection of a control is enabled or not.
*
* @since 2.0
*
- * @return @c true if the individual selection of a control is enabled, else @c false
- * @param[in] pControl The target control.
+ * @return @c true if the individual selection of a control is enabled, @n
+ * else @c false
+ * @param[in] pControl The target control
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
*/
bool IsIndividualSelectionEnabled(const Tizen::Ui::Control* pControl);
{
/**
* @class TableViewSimpleGroupItem
-* @brief This class defines common behavior of %TableViewSimpleGroupItem.
+* @brief This class defines the common behavior of %TableViewSimpleGroupItem.
*
* @since 2.0
*
* @return An error code
* @param[in] itemSize The size of the item
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Graphics::Dimension& itemSize);
* @since 2.0
*
* @return An error code
- * @param[in] layout The layout for both of the portrait and landscape modes
+ * @param[in] layout The layout for both the portrait and landscape modes
* @param[in] itemSize The size of the item
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @return An error code
* @param[in] itemSize The size of the item
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
*/
result Construct(const Tizen::Graphics::FloatDimension& itemSize);
* @since 2.1
*
* @return An error code
- * @param[in] layout The layout for both of the portrait and landscape modes
+ * @param[in] layout The layout for both the portrait and landscape modes
* @param[in] itemSize The size of the item
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
{
/**
* @class TableViewSimpleItem
- * @brief This class defines common behavior for a %TableViewSimpleItem.
+ * @brief This class defines the common behavior for a %TableViewSimpleItem.
*
* @since 2.0
*
public:
/**
* The object is not fully constructed after this constructor is called. @n
- * For full construction, the %Construct() method must be called right after calling this constructor.
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
*
* @return An error code
* @param[in] itemSize The size of the item
- * @param[in] style The style of Annex
+ * @param[in] style The style of the annex
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
* @since 2.0
*
* @return An error code
- * @param[in] layout The layout for both of the portrait and landscape modes
+ * @param[in] layout The layout for both the portrait and landscape modes
* @param[in] itemSize The size of the item
- * @param[in] style The style of Annex
+ * @param[in] style The style of the annex
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
*
* @return An error code
* @param[in] itemSize The size of the item
- * @param[in] style The style of Annex
+ * @param[in] style The style of the annex
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
* @since 2.1
*
* @return An error code
- * @param[in] layout The layout for both of the portrait and landscape modes
+ * @param[in] layout The layout for both the portrait and landscape modes
* @param[in] itemSize The size of the item
- * @param[in] style The style of Annex
+ * @param[in] style The style of the annex
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
* @since 2.0
*
* @return An error code
- * @param[in] text The text string to add
+ * @param[in] text The text string to add
* @param[in] pBitmap The bitmap image to display
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null);
* @return An error code
* @param[in] size The size of the text
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The given text size is less than 1.
+ * @exception E_INVALID_ARG The given text size is less than @c 1.
* @see GetTextSize()
*/
result SetTextSize(int size);
*
* @since 2.0
*
- * @return The size of the text,
+ * @return The size of the text
* @see SetTextSize()
*/
int GetTextSize(void) const;
/**
* @file FUiCtrlTableViewTypes.h
-* @brief This is the header file for the TableView enumerations.
+* @brief This is the header file for the %TableView enumerations.
*
* This header file contains the declarations of the TableView enumerations.
*/
*
* @return An error code
* @param[in] autoLinks The auto-link mask @n
- * Multiple link types can be combined using the bitwise OR operator (see Tizen::Base::Utility::LinkType). @n For more information,
+ * Multiple link types can be combined using the bitwise OR operator (see Tizen::Base::Utility::LinkType). @n
+ * For more information,
* see <a href="../org.tizen.native.appprogramming/html/guide/ui/auto_link_detection.htm">AutoLink Detection</a>.
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
result Clear(void);
/**
- * Gets the number of the lines contained in the %TextBox control.
+ * Gets the number of lines contained in the %TextBox control.
*
* @since 2.0
*
*
* @since 2.0
*
- * @return A bitwise combination of Tizen::Ui::Controls::TextBoxTextStyle
- * @see SetTextStyle()
- * @see TextBoxTextStyle
+ * @return A bitwise combination of Tizen::Ui::Controls::TextBoxTextStyle
+ * @see SetTextStyle()
+ * @see TextBoxTextStyle
*/
unsigned long GetTextStyle(void) const;
* @param[in] style The text style @n
* Multiple styles can be combined using the bitwise OR operator(see TextBoxTextStyle).
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or the specified font typeface is not supported.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - A specified input parameter is invalid.
+ * - The specified font typeface is not supported.
* @exception E_SYSTEM A system error has occurred.
* @remarks The specified font typeface must be one of the system fonts. @n
* @c italic and @c bold cannot be applied at the same time. If the specified style mask contains both @c italic and @c bold, @c italic will
*
* @since 2.0
*
- * @return An error code
- * @param[in] style The text style @n
- * Multiple styles can be combined using the bitwise OR operator (see Tizen::Ui::Controls::TextBoxTextStyle).
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @see GetTextStyle()
- * @see TextBoxTextStyle
+ * @return An error code
+ * @param[in] style The text style @n
+ * Multiple styles can be combined using the bitwise OR operator (see Tizen::Ui::Controls::TextBoxTextStyle).
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @see GetTextStyle()
+ * @see TextBoxTextStyle
*/
result SetTextStyle(unsigned long style);
*
* @return The color of the %TextBox control, @n
* else RGBA (0,0,0,0) if an error occurs
- * @param[in] status The state of the %TextBox control
+ * @param[in] status The state of the %TextBox control
* @exception E_SUCCESS The method is successful.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetColor()
* @param[in] bitmap The background bitmap
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @see SetBackgroundColor()
*/
result SetBackgroundBitmap(TextBoxStatus status, const Tizen::Graphics::Bitmap& bitmap);
*
* @since 2.0
*
- * @param[in] listener The event listener to add
+ * @param[in] listener The event listener to add
* @remarks Programmatically modifying the text selection does not cause the text block selection event to fire.
* @see RemoveTextBlockEventListener()
*/
void RemoveTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener);
/**
- * Initializes this instance of %TimePicker to the current date and time in wall time mode.
+ * Initializes this instance of %TimePicker to the current date and time in the wall time mode.
*
* @since 2.0
*
* @param[in] title The title
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The default owner will be the current Form (or Frame). It is possible that this control may not be visible
- * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. @n
- * The optimal size of the control is defined in
- * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
+ * @remarks
+ * - The default owner will be the current Form (or Frame). It is possible that this control may not be visible
+ * due to this ownership relationship. @n In this case, use the SetOwner() method to change the ownership to the top-most window. @n
+ * - The optimal size of the control is defined in
+ * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
*/
result Construct(const Tizen::Base::String& title = L"");
* @return An error code
* @param[in] oldRect The old position and size values of the control
* @param[in] newRect The new position and size values of the control
- * @remarks If the method returns an exception, the resulting exception
- * is propagated and the control's size is unchanged. @n
- * Provide control specific exceptions.
- * @see Tizen::Ui::Control::SetBounds()
- * @see Tizen::Ui::Control::SetSize()
+ * @remarks
+ * - If the method returns an exception, the resulting exception
+ * is propagated and the control's size is unchanged.
+ * - Provide control specific exceptions.
+ * @see Control::SetBounds()
+ * @see Control::SetSize()
* @endif
*/
virtual result PrepareBoundsChange(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect);
* @deprecated This class is deprecated. Instead of using this class, use the Container class.
* @since 2.0
*
- * @return A Boolean flag that indicates whether the specified @c width
- * and @ height are supported
- * @param[in, out] width The width that needs to evaluate
- * @param[in, out] height The height that needs to evaluate
+ * @return The Boolean flag that indicates whether the specified @c width
+ * and @c height are supported
+ * @param[in, out] width The width to evaluate
+ * @param[in, out] height The height to evaluate
* @endif
*/
virtual bool EvaluateSize(int& width, int& height);
protected:
/**
* @if OSPDEPREC
- * The object is not fully constructed after this constructor is called. For full construction, one of the %Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, one of the Construct() methods must be called right after calling this constructor.
*
* @brief <i> [Deprecated] </i>
* @deprecated This class is deprecated. Instead of using this class, use the Container class.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks This method must be called from the derived classes's construct methods.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
+ * @remarks
+ * - This method must be called from the derived classes' construct methods.
+ * - If @c resizable is @c false, IsResizable() returns @c false.
* @see IsResizable()
* @endif
*/
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks This method must be called from the derived classes's construct methods.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
+ * @remarks
+ * - This method must be called from the derived classes' construct methods.
+ * - If @c resizable is @c false, IsResizable() returns @c false.
* @see IsResizable()
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Container::GetLayoutN()
+ * @see Container::GetLayoutN()
* @endif
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true);
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM A system error has occurred.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
+ * @remarks If @c resizable is @c false, IsResizable() returns @c false.
* @see IsResizable()
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Container::GetLayoutN()
- * @see Tizen::Ui::Container::GetPortraitLayoutN()
- * @see Tizen::Ui::Container::GetLandscapeLayoutN()
+ * @see Container::GetLayoutN()
+ * @see Container::GetPortraitLayoutN()
+ * @see Container::GetLandscapeLayoutN()
* @endif
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true);
*
* @return An error code
* @param[in] bindingId The binding ID
- * @param[in] controlName The name of target property owner
+ * @param[in] controlName The name of the target property owner
* @param[in] propertyName The target property name
* @param[in] dataSource The data binding source
* @param[in] sourceType The data type of the @c dataSource
* @param[in] pListener The data binding listener
* @param[in] pValidator The data validator
* @param[in] pTransformer The data transformer
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
- * @exception E_INVALID_ARG 1. sourceType is not of a supported type.
- 2. flow is not of a supported type.
- 3. trigger is not of a supported type.
- * @exception E_OBJ_NOT_FOUND 1. The control named controlName does not exist.
- 2. The parameter "propertyName" is not found in control properties.
- * @exception E_UNSUPPORTED_FORMAT The given transformer does not supported changing source type to target type.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c sourceType is not of a supported type.
+ * - The flow is not of a supported type.
+ * - The trigger is not of a supported type.
+ * @exception E_OBJ_NOT_FOUND Either of the following conditions has occurred:
+ * - The control named @c controlName does not exist.
+ * - The parameter "propertyName" is not found in the control properties.
+ * @exception E_UNSUPPORTED_FORMAT The given transformer does not support changing source type to target type.
* @exception E_UNSUPPORTED_OPERATION In this system, binding with the given trigger and flow is not supported.
- * @remarks The propertyName parameter is defined in "UI Builder Guide". @n
- * There is no duplication check for each binding ID. @n
- * Please use a unique binding ID for each binding setting.
+ * @remarks
+ * - The propertyName parameter is defined in "UI Builder Guide". @n
+ * - There is no duplication check for each binding ID. @n
+ * Please use a unique binding ID for each binding setting.
*/
result Bind(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName, const Tizen::Base::String& propertyName, Tizen::Base::Object& dataSource, DataBindingDataType sourceType, DataBindingFlow flow, DataBindingTrigger trigger, const IDataBindingListener* pListener, const IDataBindingDataValidator* pValidator, const IDataBindingDataTransformer* pTransformer = null);
* @param[in] pListener The data binding listener
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @exception E_OBJ_NOT_FOUND The given binding ID is not registered.
- * @exception E_INVALID_ARG The given listener is not valid.
- * @remarks If you give pListener parameter as 'null', the existing dataBindingEventListener will be removed.
+ * @exception E_OBJ_NOT_FOUND The specified @c bindingId is not registered.
+ * @exception E_INVALID_ARG The specified @c pListener is not valid.
+ * @remarks If you set @c pListener as @c null, the existing dataBindingEventListener is removed.
*/
result SetDataBindingEventListener(const Tizen::Base::String& bindingId, IDataBindingListener* pListener);
* @param[in] bindingId The binding ID
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @exception E_OBJ_NOT_FOUND The given binding ID is not registered.
+ * @exception E_OBJ_NOT_FOUND The specified @c bindingId is not registered.
*/
result Unbind(const Tizen::Base::String& bindingId);
* @param[in] destType The destination type
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
- * @exception E_OBJ_NOT_FOUND The given binding ID is not registered.
- * @exception E_INVALID_OPERATION The given binding's trigger is not 'explicit' type.
- * @exception E_INVALID_ARG The specified @c destType is not supported in binding ID.
+ * @exception E_OBJ_NOT_FOUND The specified @c bindingId is not registered.
+ * @exception E_INVALID_OPERATION The given binding's trigger is not of the 'explicit' type.
+ * @exception E_INVALID_ARG The specified @c destType is not supported in the binding ID.
* @remarks
* - If you have set a data binding listener, @n
- * this method is returned after that listener is called.
+ * this method is returned after that listener is called.
* - The behavior of this method is dependent on the system default locale setting.
* @see IDataBindingListener
*/
enum DataBindingFlow
{
DATA_BINDING_FLOW_ONE_WAY = 0, /**< The data flow is one way from source to target */
- DATA_BINDING_FLOW_ONE_WAY_TO_SOURCE = 1, /**< The data flow is one way from target to source */
- DATA_BINDING_FLOW_TWO_WAY = 2 /**< The data flow is two way */
+ DATA_BINDING_FLOW_ONE_WAY_TO_SOURCE = 1, /**< The data flow is one way from target to source */
+ DATA_BINDING_FLOW_TWO_WAY = 2 /**< The data flow is two way */
};
/**
*/
enum DataBindingTrigger
{
- DATA_BINDING_TRIGGER_IMMEDIATE = 0, /**< Immediate trigger */
+ DATA_BINDING_TRIGGER_IMMEDIATE = 0, /**< Immediate trigger */
DATA_BINDING_TRIGGER_EXPLICIT = 1, /**< Explicit trigger */
};
enum DataBindingDataType
{
DATA_BINDING_DATA_TYPE_BOOLEAN = 0, /**< Boolean type */
- DATA_BINDING_DATA_TYPE_COLOR = 1, /**< Color type */
- DATA_BINDING_DATA_TYPE_DIMENSION = 2, /**< Dimension type */
- DATA_BINDING_DATA_TYPE_DOUBLE = 3, /**< Double type */
- DATA_BINDING_DATA_TYPE_FLOAT = 4, /**< Float type */
- DATA_BINDING_DATA_TYPE_INTEGER = 5, /**< Integer type */
- DATA_BINDING_DATA_TYPE_LONG = 6, /**< Long type */
- DATA_BINDING_DATA_TYPE_POINT = 7, /**< Point type */
+ DATA_BINDING_DATA_TYPE_COLOR = 1, /**< Color type */
+ DATA_BINDING_DATA_TYPE_DIMENSION = 2, /**< Dimension type */
+ DATA_BINDING_DATA_TYPE_DOUBLE = 3, /**< Double type */
+ DATA_BINDING_DATA_TYPE_FLOAT = 4, /**< Float type */
+ DATA_BINDING_DATA_TYPE_INTEGER = 5, /**< Integer type */
+ DATA_BINDING_DATA_TYPE_LONG = 6, /**< Long type */
+ DATA_BINDING_DATA_TYPE_POINT = 7, /**< Point type */
DATA_BINDING_DATA_TYPE_RECTANGLE = 8, /**< Rectangle type */
- DATA_BINDING_DATA_TYPE_STRING = 9, /**< String type */
- DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION = 10, /**< Dimension type in floating-point number @b Since: @b 2.1 */
- DATA_BINDING_DATA_TYPE_FLOAT_POINT = 11, /**<Point type in floating-point number @b Since: @b 2.1 */
- DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE = 12 /**<Rectangle type in floating-point number @b Since: @b 2.1 */
+ DATA_BINDING_DATA_TYPE_STRING = 9, /**< String type */
+ DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION = 10, /**< Dimension type in floating-point number @b Since: @b 2.1 */
+ DATA_BINDING_DATA_TYPE_FLOAT_POINT = 11, /**<Point type in floating-point number @b Since: @b 2.1 */
+ DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE = 12 /**<Rectangle type in floating-point number @b Since: @b 2.1 */
};
/**
/**
* @class Effect
-* @brief This class contains API for managing effects.
+* @brief This class contains methods for managing effects.
*
* @since 2.0
*
-* The %Effect class contains API for managing effects.
+* The %Effect class contains methods for managing effects.
*/
class _OSP_EXPORT_ Effect
: public Tizen::Base::Object
{
public:
/**
- * Binds the effect to Tizen::UI::Control for rendering effect.
+ * Binds the effect to Tizen::UI::Control for rendering an effect.
*
* @since 2.0
*
* @return An error code
- * @param [in] pControl Tizen::UI::Control whose content is filled by the effect
- * @exception E_SUCCESS The specified effect is bound with @c control successfully.
+ * @param [in] pControl Tizen::UI::Control whose content is filled by the effect
+ * @exception E_SUCCESS The specified effect is bound with @c control successfully.
* @exception E_OPERATION_FAILED The system has failed to initialize the 3D system.
- * @exception E_IN_PROGRESS The specified effect is running now, setting, changing or resetting render target is impossible
+ * @exception E_IN_PROGRESS The specified effect is in progress, so it is unable to run, set, change, or reset the render target.
*/
result SetRenderTarget(Tizen::Ui::Control* pControl);
* @since 2.0
*
* @return An error code
- * @param [in] effectStartInfo A list of input arguments to pass to the OnEffectStarted() method of the scripts @n
+ * @param [in] effectStartInfo The list of input arguments to pass to the OnEffectStarted() method of the scripts @n
* All arguments must be represented in @c float data type.
* @exception E_SUCCESS The specified effect is started successfully.
* @exception E_INVALID_STATE The specified effect has already started.
*
* @return An error code
* @param [in] touchEventInfo The touch event information
- * @param [in] offset The effect will regard the touch position in @c touchEventInfo translated by @c offset
+ * @param [in] offset The effect regards the touch position in @c touchEventInfo translated by @c offset
* @exception E_SUCCESS The specified effect is successfully sent with a TouchPress event.
* @exception E_INVALID_STATE The specified effect has not started as yet.
- * @exception E_OPERATION_FAILED There is a runtime error in the OnTouchPressed() script method or the effect is time-based.
+ * @exception E_OPERATION_FAILED Either of the following conditions has occurred:
+ * - There is a runtime error in the OnTouchPressed() script method.
+ * - The effect is time-based.
*/
result FeedTouchPressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset);
* @param [in] touchEventInfo The touch event information
* @exception E_SUCCESS The specified effect is successfully sent with a TouchPress event.
* @exception E_INVALID_STATE The specified effect has not started as yet.
- * @exception E_OPERATION_FAILED There is a runtime error in the OnTouchPressed() script method or the effect is time-based.
+ * @exception E_OPERATION_FAILED Either of the following conditions has occurred:
+ * - There is a runtime error in the OnTouchPressed() script method.
+ * - The effect is time-based.
*/
result FeedTouchPressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo);
*
* @return An error code
* @param [in] touchEventInfo The touch event information
- * @param [in] offset The effect will regard the touch position in @c touchEventInfo translated by @c offset
+ * @param [in] offset The effect regards the touch position in @c touchEventInfo translated by @c offset
* @exception E_SUCCESS The specified effect is successfully sent with a TouchMove event.
* @exception E_INVALID_STATE The specified effect has not started as yet.
- * @exception E_OPERATION_FAILED There is a runtime error in the OnTouchMoved() script method or the effect is time-based.
+ * @exception E_OPERATION_FAILED Either of the following conditions has occurred:
+ * - There is a runtime error in the OnTouchMoved() script method.
+ * - The effect is time-based.
*/
result FeedTouchMoveEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset);
* @param [in] touchEventInfo The touch event information
* @exception E_SUCCESS The specified effect is successfully sent with a TouchMove event.
* @exception E_INVALID_STATE The specified effect has not started as yet.
- * @exception E_OPERATION_FAILED There is a runtime error in the OnTouchMoved() script method or the effect is time-based.
+ * @exception E_OPERATION_FAILED Either of the following conditions has occurred:
+ * - There is a runtime error in the OnTouchMoved() script method.
+ * - The effect is time-based.
*/
result FeedTouchMoveEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo);
*
* @return An error code
* @param [in] touchEventInfo The touch event information
- * @param [in] offset The effect will regard the touch position in @c touchEventInfo translated by @c offset
+ * @param [in] offset The effect regards the touch position in @c touchEventInfo translated by @c offset
* @exception E_SUCCESS The specified effect is successfully sent with a TouchRelease event.
* @exception E_INVALID_STATE The specified effect has not started as yet.
- * @exception E_OPERATION_FAILED There is a runtime error in the OnTouchReleased() script method or the effect is time-based.
+ * @exception E_OPERATION_FAILED Either of the following conditions has occurred:
+ * - There is a runtime error in the OnTouchReleased() script method.
+ * - The effect is time-based.
*/
result FeedTouchReleaseEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset);
* @param [in] touchEventInfo The touch event information
* @exception E_SUCCESS The specified effect is successfully sent with a TouchRelease event.
* @exception E_INVALID_STATE The specified effect has not started as yet.
- * @exception E_OPERATION_FAILED There is a runtime error in the OnTouchReleased() script method or the effect is time-based.
+ * @exception E_OPERATION_FAILED Either of the following conditions has occurred:
+ * - There is a runtime error in the OnTouchReleased() script method.
+ * - The effect is time-based.
*/
result FeedTouchReleaseEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo);
*
* @return An error code
* @param [in] touchEventInfo The touch event information
- * @param [in] offset The effect will regard the touch position in @c touchEventInfo translated by @c offset
+ * @param [in] offset The effect regards the touch position in @c touchEventInfo translated by @c offset
* @exception E_SUCCESS The specified effect is successfully sent with a TouchDoublePress event.
* @exception E_INVALID_STATE The specified effect has not started as yet.
- * @exception E_OPERATION_FAILED There is a runtime error in the OnTouchDoublePressed() script method or the effect is time-based.
+ * @exception E_OPERATION_FAILED Either of the following conditions has occurred:
+ * - There is a runtime error in the OnTouchDoublePressed() script method.
+ * - The effect is time-based.
*/
result FeedTouchDoublePressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset);
* @param [in] touchEventInfo The touch event information
* @exception E_SUCCESS The specified effect is successfully sent with a TouchDoublePress event.
* @exception E_INVALID_STATE The specified effect has not started as yet.
- * @exception E_OPERATION_FAILED There is a runtime error in the OnTouchDoublePressed() script method or the effect is time-based.
+ * @exception E_OPERATION_FAILED Either of the following conditions has occurred:
+ * - There is a runtime error in the OnTouchDoublePressed() script method.
+ * - The effect is time-based.
*/
result FeedTouchDoublePressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo);
* @param [in] bitmapId The bitmap ID to update
* @param [in] bitmap The bitmap content
* @exception E_SUCCESS The bitmap is updated successfully.
- * @exception E_OPERATION_FAILED Updating the bitmap contents has failed.
+ * @exception E_OPERATION_FAILED Updating the bitmap content has failed.
*/
result SetBitmap(long bitmapId, const Tizen::Graphics::Bitmap& bitmap);
*
* @since 2.0
*
- * @return The name of the effect.
+ * @return The name of the effect
*/
Tizen::Base::String GetName(void) const;
/**
- * Sets the IEffectsEventListener instance to get notified when the state of the effect is changed.
+ * Sets an IEffectsEventListener instance to get notified when the state of the effect is changed.
*
* @since 2.0
*
void SetEffectEventListener(IEffectEventListener* pListener);
/**
- * Gets the IEffectsEventListener instance that is registered to the instance.
+ * Gets an IEffectsEventListener instance that is registered to the instance.
*
* @since 2.0
*
IEffectEventListener* GetEffectEventListener(void) const;
/**
- * Sets the IEffectsResourceProvider instance to get notified when resources are needed by the effect.
+ * Sets an IEffectsResourceProvider instance to get notified when resources are needed by the effect.
*
* @since 2.0
*
void SetResourceProvider(IEffectResourceProvider* pProvider);
/**
- * Gets the IEffectsResourceProvider instance that is registered to the instance.
+ * Gets an IEffectsResourceProvider instance that is registered to the instance.
*
* @since 2.0
*
/**
* @class EffectManager
- * @brief This class contains API for managing effects.
+ * @brief This class contains an API for managing effects.
*
* @since 2.0
*
- * The %EffectManager class contains API for managing effects.
+ * The %EffectManager class contains an API for managing effects.
*/
class _OSP_EXPORT_ EffectManager
: public Tizen::Base::Object
{
public:
/**
- * Gets the effect manager instance.
+ * Gets a pointer to the %EffectManager instance.
*
* @since 2.0
*
/**
* Destroys all previously created effects and their resources. @n
- * Application can use OpenGL APIs only after invoking this method.
+ * Applications can use OpenGL APIs only after invoking this method.
*
* @since 2.0
*/
Effect* CreateEffect(const Tizen::Base::String& filePath);
/**
- * Destroys the Effect instance.
+ * Destroys an Effect instance.
*
* @since 2.0
*
/**
* @interface IEffectEventListener
- * @brief This interface provides listeners for the effects.
+ * @brief This interface provides listeners for effects.
*
* @since 2.0
*
- * This interface provides methods for notifying applications about the state change of the effects.
+ * This interface provides methods for notifying applications about the state change of effects.
*/
class _OSP_EXPORT_ IEffectEventListener
: virtual public Tizen::Base::Runtime::IEventListener
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
*
* @param [in] effect The effect that is finished
* @param [in] effectResult The result of the effect
- * @param [in] lastShownBitmapIds A list of last shown bitmaps @n
- The listener will be notified with the bitmaps shown at the last frame.
+ * @param [in] lastShownBitmapIds The list of last shown bitmaps @n
+ The listener is notified with the bitmaps shown at the last frame.
* The item type of @c lastShownBitmapIds is Tizen::Base::Long.
*/
virtual void OnEffectFinished(Effect& effect, Tizen::Ui::Effects::EffectResult effectResult, const Tizen::Base::Collection::IList& lastShownBitmapIds) = 0;
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
* @since 2.0
*
* @return An error code
- * @param [in,out] effect The effect that needs a bitmap.
- * @param [in] bitmapId The bitmap ID needed.
+ * @param [in,out] effect The effect that needs a bitmap
+ * @param [in] bitmapId The bitmap ID that is needed
* @remarks In general, EffectManager::SetBitmap should be used to provide this instance with a bitmap in this callback.
* @see Effect::SetBitmap()
*/
*/
enum EffectType
{
- EFFECT_TYPE_TIME_BASED, /**< The effect model is not managed by user, that is, at the start of the effect @n
- the final results and duration are known @n
- For example, pressing the button leads to new form appearance with animation. */
+ EFFECT_TYPE_TIME_BASED, /**< The effect model is not managed by the user, that is, at the start of the effect @n
+ the final results and duration are known @n
+ For example, pressing the button leads to new form appearance with animation */
- EFFECT_TYPE_INTERACTIVE /**< The effect model is managed by user, that is, at the start of the effect it is @n
- unknown when and how it will be finished */
+ EFFECT_TYPE_INTERACTIVE /**< The effect model is managed by the user, that is, at the start of the effect it is @n
+ unknown as to when and how it will be finished */
};
{
public:
/**
- * Gets the pointer to the current focus manager.
+ * Gets a pointer to the %FocusManager instance.
*
* @since 2.0
*
* @since 2.0
*
* @return The current focus owner
- * @remarks The method returns the current focus owner of this application.
+ * @remarks This method returns the current focus owner of this application.
*/
Control* GetCurrentFocusOwner(void) const;
* @since 2.0
*
* The %GridLayout class defines the grid layout for a Container. The layout positions the children of the %Container in a rectangular grid.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/grid_layout.htm">Grid Layout</a>.
*
* @code
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*
* @param[in] rowCount The number of rows
* @param[in] columnCount The number of columns
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified index is out of range. @n
- * Either @c rowCount or @c columnCount is @c 0 or negative.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified index is out of the valid range.
+ * - Either @c rowCount or @c columnCount is @c 0.
+ * - Either @c rowCount or @c columnCount is negative.
* @exception E_SYSTEM A system error has occurred.
*/
result Construct(int rowCount, int columnCount);
* @param[in] stretchable Set to @c true to make the column stretchable, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is out of range.
+ * @exception E_OUT_OF_RANGE The specified index is out of the valid range.
* @exception E_SYSTEM A system error has occurred.
*/
result SetColumnStretchable(int columnIndex, bool stretchable);
* @param[in] shrinkable Set to @c true to make the column shrinkable, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is out of range.
+ * @exception E_OUT_OF_RANGE The specified index is out of the valid range.
* @exception E_SYSTEM A system error has occurred.
*/
result SetColumnShrinkable(int columnIndex, bool shrinkable);
* @param[in] collapsed Set to @c true to make the column collapsible, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is out of range.
+ * @exception E_OUT_OF_RANGE The specified index is out of the valid range.
* @exception E_SYSTEM A system error has occurred.
*/
result SetColumnCollapsed(int columnIndex, bool collapsed);
* @since 2.0
*
* @return An error code
- * @param[in] stretchable Set to @c true to set all columns as stretchable, @n
+ * @param[in] stretchable Set to @c true to set all the columns as stretchable, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @since 2.0
*
* @return An error code
- * @param[in] shrinkable Set to @c true to set all columns as shrinkable, @n
+ * @param[in] shrinkable Set to @c true to set all the columns as shrinkable, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*
* @return An error code
* @param[in] columnIndex The column index
- * @param[in] space An @c int representing the space
+ * @param[in] space The @c int that represents the space
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_OUT_OF_RANGE The specified index is out of range.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_OUT_OF_RANGE The specified index is out of the valid range.
* @exception E_SYSTEM A system error has occurred.
- * @remarks This method does not perform any operation if the value of @c columnIndex is 0.
- * @remarks The column spacing cannot be applied to the first column.
+ * @remarks
+ * - This method does not perform any operation if the value of @c columnIndex is @c 0.
+ * - The column spacing cannot be applied to the first column.
*/
result SetColumnSpacing(int columnIndex, int space);
*
* @return An error code
* @param[in] columnIndex The column index
- * @param[in] space An @c int representing the space
+ * @param[in] space The @c int that represents the space
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_OUT_OF_RANGE The specified index is out of range.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_OUT_OF_RANGE The specified index is out of the valid range.
* @exception E_SYSTEM A system error has occurred.
- * @remarks This method does not perform any operation if the value of @c columnIndex is 0.
- * @remarks The column spacing cannot be applied to the first column.
+ * @remarks
+ * - This method does not perform any operation if the value of @c columnIndex is @c 0.
+ * - The column spacing cannot be applied to the first column.
*/
result SetColumnSpacing(int columnIndex, float space);
* @param[in] stretchable Set to @c true to make the row stretchable, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is out of range.
+ * @exception E_OUT_OF_RANGE The specified index is out of the valid range.
* @exception E_SYSTEM A system error has occurred.
*/
result SetRowStretchable(int rowIndex, bool stretchable);
* @param[in] shrinkable Set to @c true to make the row shrinkable, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is out of range.
+ * @exception E_OUT_OF_RANGE The specified index is out of the valid range.
* @exception E_SYSTEM A system error has occurred.
*/
result SetRowShrinkable(int rowIndex, bool shrinkable);
*
* @return An error code
* @param[in] rowIndex The row index
- * @param[in] collapsed Set to @c true to make the row as collapsible, @n
+ * @param[in] collapsed Set to @c true to make the row collapsible, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is out of range.
+ * @exception E_OUT_OF_RANGE The specified index is out of the valid range.
* @exception E_SYSTEM A system error has occurred.
*/
result SetRowCollapsed(int rowIndex, bool collapsed);
*
* @return An error code
* @param[in] rowIndex The row index
- * @param[in] space An @c int representing the space
+ * @param[in] space The @c int that represents the space
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_OUT_OF_RANGE The specified index is out of range.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_OUT_OF_RANGE The specified index is out of the valid range.
* @exception E_SYSTEM A system error has occurred.
- * @remarks This method does not perform any operation if the value of @c rowIndex is @c 0.
- * @remarks The row spacing cannot be applied to the first column.
+ * @remarks
+ * - This method does not perform any operation if the value of @c rowIndex is @c 0.
+ * - The row spacing cannot be applied to the first column.
*/
result SetRowSpacing(int rowIndex, int space);
*
* @return An error code
* @param[in] rowIndex The row index
- * @param[in] space An @c int representing the space
+ * @param[in] space The @c int that represents the space
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_OUT_OF_RANGE The specified index is out of range.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_OUT_OF_RANGE The specified index is out of the valid range.
* @exception E_SYSTEM A system error has occurred.
- * @remarks This method does not perform any operation if the value of @c rowIndex is @c 0.
- * @remarks The row spacing cannot be applied to the first column.
+ * @remarks
+ * - This method does not perform any operation if the value of @c rowIndex is @c 0.
+ * - The row spacing cannot be applied to the first column.
*/
result SetRowSpacing(int rowIndex, float space);
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG Either of the following conditions has occurred: @n
* - A specified input parameter is invalid. @n
- * - Either @c rowSpan or @c columnSpan is @c 0 or negative. @n
- * - The specified @c childControl parameter is not a child of the container that owns the layout. @n
+ * - Either @c rowSpan or @c columnSpan is @c 0.
+ * - Either @c rowSpan or @c columnSpan is negative. @n
+ * - The specified @c childControl is not a child of the container that owns the layout. @n
* - The specified span has tried to include a cell, which is already included in another span.
- * @exception E_OUT_OF_RANGE The specified index is out of range, or @n
- * the calculated range of the cell is out of the grid.
+ * @exception E_OUT_OF_RANGE Either of the following conditions has occurred:
+ * - The specified index is out of the valid range.
+ * - The calculated range of the cell is out of the grid.
* @exception E_SYSTEM A system error has occurred.
*/
result SetPosition(Control& childControl, int rowStartIndex, int columnStartIndex, int rowSpan, int columnSpan);
/**
- * Sets the horizontal alignment and the vertical alignment.
+ * Sets the horizontal alignment and vertical alignment.
*
* @since 2.0
*
* @param[in] verticalAlignment The vertical alignment
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
- * @remarks By default, the value of @c horizontalAlignment is HORIZONTAL_ALIGN_LEFT and the value of @c verticalAlignment is
- * VERTICAL_ALIGN_TOP.
- * The column width is set to the largest width amongst controls in the column, and the row height is set to the largest
- * height amongst controls in the row.
- * Therefore, the smaller controls have vertical or horizontal margins around them, and they are repositioned in cells
- * according to the alignment options.
+ * @remarks
+ * - By default, the value of @c horizontalAlignment is HORIZONTAL_ALIGN_LEFT and the value of @c verticalAlignment is
+ * VERTICAL_ALIGN_TOP.
+ * - The column width is set to the largest width amongst controls in the column, and the row height is set to the largest
+ * height amongst controls in the row.
+ * Therefore, the smaller controls have vertical or horizontal margins around them, and they are repositioned in cells
+ * according to the alignment options.
*/
result SetAlignment(Control& childControl, LayoutHorizontalAlignment horizontalAlignment, LayoutVerticalAlignment verticalAlignment);
* @param[in] bottom The bottom margin
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the margins are set to @c 0.
*/
* @param[in] bottom The bottom margin
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the margins are set to @c 0.
*/
* @since 2.0
*
* The %HorizontalBoxLayout class defines the horizontal box layout for a Container. The layout positions the children of the %Container horizontally.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/single_dimensional_layout.htm">Vertical and Horizontal Box Layouts</a>.
*
* @code
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*
* @param[in] childControl The control for which the alignment is set
* @param[in] alignment The vertical alignment
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
- * @remarks By default, the horizontal alignment is VERTICAL_ALIGN_TOP.
+ * @remarks By default, the horizontal alignment is @c VERTICAL_ALIGN_TOP.
*/
result SetVerticalAlignment(Control& childControl, LayoutVerticalAlignment alignment);
* @param[in] childControl The control for which the space is set
* @param[in] space The space
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the spacing is set to @c 0.
*/
* @param[in] childControl The control for which the space is set
* @param[in] space The space
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the spacing is set to @c 0.
*/
* @param[in] top The top margin
* @param[in] bottom The bottom margin
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the margins are set to @c 0.
*/
* @param[in] top The top margin
* @param[in] bottom The bottom margin
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the margins are set to @c 0.
*/
* @param[in] childControl The control for which the width is set
* @param[in] width The value of the width
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetWidth(Control& childControl, int width);
- /*
+ /**
* Sets the width of the specified control with the fixed length.
*
* @since 2.1
* @param[in] childControl The control for which the width is set
* @param[in] width The value of the width
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetWidth(Control& childControl, float width);
* @param[in] childControl The control for which the width is set
* @param[in] policy The fitting policy for the width
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Setting FIT_POLICY_PARENT as @c policy does not cause the width of control to change.
+ * @remarks Setting @c FIT_POLICY_PARENT as @c policy does not cause the width of the control to change.
*/
result SetHorizontalFitPolicy(Control& childControl, FitPolicy policy);
* @param[in] childControl The control for which the height is set
* @param[in] height The value of the height
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetHeight(Control& childControl, int height);
* @param[in] childControl The control for which the height is set
* @param[in] height The value of the height
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetHeight(Control& childControl, float height);
* @param[in] childControl The control for which the height is set
* @param[in] policy The fitting policy for the height
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetVerticalFitPolicy(Control& childControl, FitPolicy policy);
* @param[in] childControl The control for which the weight is set
* @param[in] weight The weight that indicates how much extra space the control occupies in proportion to it, in the %HorizontalBoxLayout
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the weight is set to @c 0.0f.
*/
virtual void OnAccessibilityFocusIn(const Control& control, const AccessibilityElement& element) = 0;
/**
- * Called when the accessibility element losts a focus.
+ * Called when the accessibility element loses a focus.
*
* @since 2.0
* @param[in] control The control that has an accessibility element
{
/**
* @interface IActionEventListener
- * @brief This interface implements the listener for action event.
+ * @brief This interface implements the listener for an action event.
*
* @since 2.0
*
* The class that processes an action event
* implements this interface, and the instance created with that class is registered with a UI control, using the control's
* AddActionEventListener() method. When the action event occurs, the OnActionPerformed() method of that instance is invoked.
- * @n
+ *
* For more information on the class features, see in individual control topics under <a href="../org.tizen.native.appprogramming/html/guide/ui/controls.htm">UI Controls</a>.
*/
class _OSP_EXPORT_ IActionEventListener
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
* are fired when the knob of a Slider moves. The class that processes an adjustment event implements this interface, and the
* instance created with that class is registered with a UI control, using the control's AddAdjustmentEventListener() method.
* When the adjustment event occurs, the OnAdjustmentValueChanged() method of that instance is invoked.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_slider.htm">Slider</a>.
*/
* The %IAnimationEventListener interface is the listener interface for receiving animation events.
* The class that processes an animation event implements this interface, and the instance created with that class is registered
* with a UI control, using the control's @ref Tizen::Ui::Controls::Animation::AddAnimationEventListener() method. When the animation event occurs, the
- * @ref OnAnimationStopped() method of that instance is invoked.
- * @n
+ * OnAnimationStopped() method of that instance is invoked.
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_animation.htm">Animation</a>.
*
*
* @brief This is the header file for the %IClipboardPopupEventListener interface.
*
* This header file contains the declarations of the %IClipboardPopupEventListener interface. @n
- * If the item event is generated, a method of this interface will be called. @n
+ * If an item event is generated, a method of this interface will be called. @n
* The applications that perform tasks related to the item event, must call methods of this interface.
*/
* @since 2.0
*
* The %IClipboardPopupEventListener interface is the listener interface for receiving clipboard pop-up events.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/clipboard.htm">Clipboard</a>.
*/
class _OSP_EXPORT_ IClipboardPopupEventListener
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
*
* @since 2.0
*
- * @param[in] pClipboardItem The pointer to ClipboardItem that
- * is selected, @n
- * else @c null if no item is selected
- * @remarks @c pClipboardItem is deleted by the system after this method call.
+ * @param[in] pClipboardItem A pointer to ClipboardItem that is selected, @n
+ * else @c null if no item is selected
+ * @remarks The @c pClipboardItem is deleted by the system after this method call.
*/
virtual void OnClipboardPopupClosed(const ClipboardItem* pClipboardItem) = 0;
* The class that processes a color change event implements this interface, and the instance created with that class is
* registered with a UI control, using the control's AddColorChangeEventListener() method. When the color change event occurs,
* the OnColorChanged() method of that instance is invoked.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_colorpicker.htm">ColorPicker</a>.
*/
class IColorChangeEventListener
*
* This header file contains the declarations of the ICustomItemEventListener interface. @n
* If an item event is generated, a method of this interface is called. @n
- * Application doing tasks related to the item event use the methods of this interface.
+ * Applications doing tasks related to the item event use the methods of this interface.
*
*/
#ifndef _FUI_ICUSTOM_ITEM_EVENT_LISTENER_H_
* @param[in] index The index of the item
* @param[in] itemId The item ID
* @param[in] status The state of the item
- * @remarks Implement this method in a class which derives %ICustomItemEventListener to handle the user interaction at the CustomListItem.
- * @remarks If CustomList is constructed with CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER, this method is called when the radio button is selected.
+ * @remarks
+ * - Implement this method in a class which derives %ICustomItemEventListener to handle the user interaction at the CustomListItem.
+ * - If CustomList is constructed with @c CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER, this method is called when the radio button is selected.
* @endif
*/
virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status) = 0;
* @param[in] itemId The item ID
* @param[in] elementId The element ID
* @param[in] status The state of the element
- * @remarks Implement this method in a class which derives %ICustomItemEventListener to handle the user interaction at the element in
- * CustomListItem.
- * @remarks If CustomList is constructed with CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER, this method is not called when the radio button is selected.
- * Instead, OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status) is called.
+ * @remarks
+ * - Implement this method in a class which derives %ICustomItemEventListener to handle the user interaction at the element in
+ * CustomListItem.
+ * - If CustomList is constructed with @c CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER, this method is not called when the radio button is selected.
+ * Instead, OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status) is called.
* @endif
*/
virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, int elementId, Tizen::Ui::ItemStatus status) = 0;
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
* Transforms the value of the data of source type to value of target type.
* @since 2.0
* @return @c true if it is successful to convert source to target @n
- * else @c false
+ * else @c false
* @param[in] bindingId The specified binding ID
- * @param[in] sourceType The source data type
- * @param[in] sourceData The data source
- * @param[in] targetType The target data type
- * @param[out] targetData The data target
+ * @param[in] sourceType The source data type
+ * @param[in] sourceData The data source
+ * @param[in] targetType The target data type
+ * @param[out] targetData The data target
*/
virtual bool TransformSourceToTarget(const Tizen::Base::String& bindingId, DataBindingDataType sourceType, const Tizen::Base::Object& sourceData, DataBindingDataType targetType, Tizen::Base::Object& targetData) = 0;
virtual bool TransformTargetToSource(const Tizen::Base::String& bindingId, DataBindingDataType targetType, const Tizen::Base::Object& targetData, DataBindingDataType sourceType, Tizen::Base::Object& sourceData) = 0;
/**
- * Checks whether the this transformer can convert the source type to target type.
+ * Checks whether this transformer can convert the source type to target type.
*
* @since 2.0
* @return @c true if it is possible to transform source type to target type, @n
- * else @c false
+ * else @c false
* @param[in] bindingId The specified binding ID
* @param[in] sourceType The source data type
* @param[in] targetType The target data type
virtual bool IsSourceToTargetTransformable(const Tizen::Base::String& bindingId, DataBindingDataType sourceType, DataBindingDataType targetType) = 0;
/**
- * Checks whether the this transformer can convert the target type to source type.
+ * Checks whether this transformer can convert the target type to source type.
*
* @since 2.0
* @return @c true if it is possible to transform target type to source type, @n
/**
* @interface IDataBindingDataValidator
-* @brief This interface defines methods for validating the value of transformed data that will be updated to the binding
+* @brief This interface defines methods for validating the value of the transformed data that is updated to the binding
* target or source.
*
* @since 2.0
*
-* The %IDataBindingDataValidator interface defines methods for validating the value of transformed data that will be updated to the binding.
+* The %IDataBindingDataValidator interface defines methods for validating the value of the transformed data that is updated to the binding.
*/
class _OSP_EXPORT_ IDataBindingDataValidator
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
virtual ~IDataBindingDataValidator(void) {};
/**
- * Validates the value of the transformed data that will be updated to the binding target.
+ * Validates the value of the transformed data that is updated to the binding target.
*
* @since 2.0
* @return @c true if the specified value is valid, @n
- * else @c false
+ * else @c false
* @param[in] bindingId The binding ID to validate
- * @param[in] data The data to validate
+ * @param[in] data The data to validate
*/
virtual bool ValidateDataToTarget(const Tizen::Base::String& bindingId, const Tizen::Base::Object& data) = 0;
/**
- * Validates the value of the transformed data that will be updated to the binding source.
+ * Validates the value of the transformed data that is updated to the binding source.
*
* @since 2.0
* @return @c true if the specified value is valid, @n
- * else @c false
- * @param[in] bindingId The binding ID to validate
- * @param[in] data The data to validate
+ * else @c false
+ * @param[in] bindingId The binding ID to validate
+ * @param[in] data The data to validate
*/
virtual bool ValidateDataToSource( const Tizen::Base::String& bindingId, const Tizen::Base::Object& data) = 0;
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
* @since 2.0
*
* @param[in] bindingId The binding ID
- * @param[in] controlName The name of binding target control
- * @param[in] propertyName The name of binding target property
+ * @param[in] controlName The name of the binding target control
+ * @param[in] propertyName The name of the binding target property
*/
virtual void OnDataBindingSourceUpdated(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName
, const Tizen::Base::String& propertyName) = 0;
* @since 2.0
*
* @param[in] bindingId The binding ID
- * @param[in] controlName The name of binding target control
- * @param[in] propertyName The name of binding target property
+ * @param[in] controlName The name of the binding target control
+ * @param[in] propertyName The name of the binding target property
*/
virtual void OnDataBindingTargetUpdated(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName
, const Tizen::Base::String& propertyName) = 0;
* @since 2.0
*
* @param[in] bindingId The binding ID
- * @param[in] controlName The name of binding target control
- * @param[in] propertyName The name of binding target property
+ * @param[in] controlName The name of the binding target control
+ * @param[in] propertyName The name of the binding target property
* @param[in] destType The data binding destination type
*/
virtual void OnDataBindingValidationFailed(const Tizen::Base::String& bindingId, const Tizen::Base::String& controlName
* The class that processes a date change event implements this interface, and the instance created with that class is registered
* with a UI control, using the control's AddDateChangeEventListener() method. When the date change event occurs, the
* OnDateChanged() method of that instance is invoked.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_edittime_editdate.htm">EditDate and EditTime</a> and <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_datepicker.htm">DatePicker, TimePicker, and DateTimePicker</a>.
*/
class _OSP_EXPORT_ IDateChangeEventListener
/**
- * Called when the change in date is canceled.
+ * Called when the change in the date is cancelled.
*
* @since 2.0
*
* The class that processes a date and time change event implements this interface, and the instance created with that class is
* registered with a UI control, using the DateTimePicker::AddDateTimeChangeEventListener() method. When the date and time change event
* occurs, the OnDateTimeChanged() method of that instance is invoked.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_datepicker.htm">DatePicker, TimePicker, and DateTimePicker</a>.
*/
class _OSP_EXPORT_ IDateTimeChangeEventListener
/**
- * Called when the date and time change is canceled.
+ * Called when the date and time change is cancelled.
*
* @since 2.0
*
* The class that processes a drag and drop event implements this interface, and the instance created with that class is
* registered with a UI control, using the Control::AddDragDropEventListener() method. When the drag and drop event occurs, a
* method of that instance is invoked.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/event_listener.htm">Event Listeners</a>.
*/
class _OSP_EXPORT_ IDragDropEventListener
* The class that processes a drag and drop event implements this interface, and the instance created with that class is
* registered with a UI control, using the control's AddDragDropEventListenerF() method. When the drag and drop event occurs, a
* method of that instance is invoked.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/event_listener.htm">Event Listeners</a>.
*/
class _OSP_EXPORT_ IDragDropEventListenerF
/**
* @if OSPDEPREC
- * Called when the state of an element in CustomListItem in ExpandableList is changed. @n
+ * Called when the state of an element or CustomListItem in the ExpandableList is changed. @n
* If a main item is selected, the index of the sub-item is @c -1.
* @brief <i> [Deprecated] </i>
* @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedTableViewEventListener interface.
* @brief This is the header file for the %IFastScrollEventListener interface.
*
* This header file contains declarations of the %IFastScrollEventListener interface.
- * If item event is generated, a method of this interface will be called.
- * Applications that do some jobs related to item event, call methods of this interface.
+ * If an item event is generated, a method of this interface will be called.
+ * Applications that do some jobs related to item events, call methods of this interface.
*
*/
#ifndef _FUI_IFAST_SCROLL_EVENT_LISTENER_H_
/**
* @if OSPDEPREC
* @interface IFastScrollEventListener
- * @brief <i> [Deprecated] </i> This interface implements the listener for fast scroll event.
+ * @brief <i> [Deprecated] </i> This interface implements the listener for a fast scroll event.
*
* @deprecated This interface is deprecated. Instead of using this interface, use the IFastScrollListener interface.
* @since 2.0
* The class that processes a focus event implements this interface, and the instance created with that class is registered with a
* UI control, using the Control::AddFocusEventListener() method. When the focus event occurs, a method of that instance is
* invoked.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/event_listener.htm">Event Listeners</a>.
*/
class _OSP_EXPORT_ IFocusEventListener
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*
*
* @since 2.0
*
- * The %IInputConnectionEventListener interface defines methods for processing between the InputConnection and the input method. It is possible to not work the callback depending on the current InputMethod.
+ * The %IInputConnectionEventListener interface defines methods for processing between the InputConnection and the input method. It is possible for the callback to not work depending on the current InputMethod.
*/
class _OSP_EXPORT_ IInputConnectionEventListener
: virtual public Tizen::Base::Runtime::IEventListener
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
*
* @since 2.1
*
- * The %IInputConnectionEventListener interface defines methods for processing between the InputConnection and the input method. It is possible to not work the callback depending on the current InputMethod.
+ * The %IInputConnectionEventListener interface defines methods for processing between the InputConnection and the input method. It is possible for the callback to not work depending on the current InputMethod.
*/
class _OSP_EXPORT_ IInputConnectionEventListenerF
: virtual public Tizen::Base::Runtime::IEventListener
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.1
*/
*
* @since 2.0
*
- * The %IInputConnectionProvider interface defines methods for processing between the InputConnection and the input method. It is possible to not work the callback depending on the current active Input Method.
+ * The %IInputConnectionProvider interface defines methods for processing between the InputConnection and the input method. It is possible for the callback to not work depending on the current active Input Method.
*/
class _OSP_EXPORT_ IInputConnectionProvider
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
* The class that processes a software keypad event implements this interface, and the instance created with that class is
* registered with a UI control, using the control's AddKeypadEventListener() method. When the software keypad event occurs, a
* method of that instance is invoked.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_editfield_editarea.htm">EditArea and EditField</a>, <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_searchbar.htm">SearchBar</a> and <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_exp_editarea.htm">ExpandableEditArea</a>.
*/
// Lifecycle
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
* @param[in] source The source of the event
* @remarks When the software keypad appears on the screen, the client area of the current Form is adjusted to account for the space that is taken
* up by the software keypad.
- * @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
+ * @see Controls::Form::GetClientAreaBounds()
*/
virtual void OnKeypadWillOpen(Tizen::Ui::Control& source) = 0;
* @param[in] source The source of the event
* @remarks When the software keypad appears on the screen, the client area of the current Form is adjusted to account for the space that is taken
* up by the software keypad.
- * @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
+ * @see Controls::Form::GetClientAreaBounds()
*/
virtual void OnKeypadOpened(Tizen::Ui::Control& source) = 0;
* @since 2.0
*
* @param[in] source The source of the event
- * @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
+ * @see Controls::Form::GetClientAreaBounds()
*/
virtual void OnKeypadClosed(Tizen::Ui::Control& source) = 0;
* @since 2.0
*
* @param[in] source The source of the event
- * @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
+ * @see Controls::Form::GetClientAreaBounds()
*/
virtual void OnKeypadBoundsChanged(Tizen::Ui::Control& source) {};
ILanguageEventListener(void) {};
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
*
* @since 2.0
*
- * @param[in] source The source of the event
+ * @param[in] source The source of the event
* @param[in] oldLanguage The previous input language
- * @param[in] newLanguage The current input language
+ * @param[in] newLanguage The current input language
*/
virtual void OnLanguageChanged(const Tizen::Ui::Control& source, Tizen::Locales::LanguageCode oldLanguage, Tizen::Locales::LanguageCode newLanguage) = 0;
* The class that processes an orientation event implements this interface, and the instance created with that class is registered
* with a UI control, using the control's AddOrientationEventListener() method. When the orientation event occurs, the
* OnOrientationChanged() method of that instance is invoked.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_form.htm">Form</a>.
*/
class _OSP_EXPORT_ IOrientationEventListener
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
* @param[in] source The source of the event
* @param[in] orientationStatus The information about the orientation event
* @remarks The orientation changed event is fired on Control for which orientation mode change has been enabled by calling SetOrientation().
- * @see Tizen::Ui::Controls::Frame
- * @see Tizen::Ui::Controls::Form
+ * @see Controls::Frame
+ * @see Controls::Form
*/
virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus) = 0;
* In both previewing and bubbling paths, event routing can be controlled by the value returned by the listener. Returning @c true, which means
* the event is processed in the listener of the notified control, stops further routing. Returning @c false allows the next event listener
* to listen to the event.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/event_listener.htm">Event Listeners</a>.
*/
class _OSP_EXPORT_ IPropagatedKeyEventListener
{
public:
/**
- * This polymorphic destructor should be overridden if required.
+ * This polymorphic destructor should be overridden if required. @n
* This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.1
*
* @since 2.1
*
- * @return Whether the key event is processed by the listener or not
- * @param[in] source The source of the event
+ * @return The boolean value that indicates whether the key event is processed by the listener or not
+ * @param[in] source The source of the event
* @param[in] keyEventInfo The key event information
*/
virtual bool OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo) = 0;
*
* @since 2.1
*
- * @return Whether the key event is processed by the listener or not
+ * @return The boolean value that indicates whether the key event is processed by the listener or not
* @param[in] source The source of the event
* @param[in] keyEventInfo The key event information
*/
*
* @since 2.1
*
- * @return Whether the key event is processed by the listener or not
+ * @return The boolean value that indicates whether the key event is processed by the listener or not
* @param[in] source The source of the event
* @param[in] keyEventInfo The key event information
*/
*
* @since 2.1
*
- * @return Whether the key event is processed by the listener or not
+ * @return The boolean value that indicates whether the key event is processed by the listener or not
* @param[in] source The source of the event
* @param[in] keyEventInfo The key event information
*/
*
* @since 2.1
*
- * @return Whether the KeyEventInfo instance is modified or not
+ * @return The boolean value that indicates whether the KeyEventInfo instance is modified or not
* @param[in] source The source of the event
* @param[in,out] keyEventInfo The key event information that can be converted by this method
*/
}; //IPropagatedKeyEventListener
}} // Tizen::Ui
-#endif // _FUI_IPROPAGATED_KEY_EVENT_LISTENER_H_
\ No newline at end of file
+#endif // _FUI_IPROPAGATED_KEY_EVENT_LISTENER_H_
* In both previewing and bubbling paths, event routing can be controlled by the value returned by the listener. Returning @c true, which means
* the event is processed in the listener of the notified control, stops further routing. Returning @c false allows the next event listener
* to listen to the event.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/event_listener.htm">Event Listeners</a>.
*/
class _OSP_EXPORT_ IPropagatedTouchEventListener
*
* @since 2.1
*
- * @return Whether the touch event is processed by the listener or not
+ * @return The boolean value that indicates whether the touch event is processed by the listener or not
* @param[in] source The source of the event
* @param[in] touchEventInfo The touch event information
*/
*
* @since 2.1
*
- * @return Whether the touch event is processed by the listener or not
+ * @return The boolean value that indicates whether the touch event is processed by the listener or not
* @param[in] source The source of the event
* @param[in] touchEventInfo The touch event information
*/
*
* @since 2.1
*
- * @return Whether the touch event is processed by the listener or not
+ * @return The boolean value that indicates whether the touch event is processed by the listener or not
* @param[in] source The source of the event
* @param[in] touchEventInfo The touch event information
*/
virtual bool OnTouchMoved(Control& source, const TouchEventInfo& touchEventInfo) = 0;
/**
- * Called during the bubbling step when a touch is canceled.
+ * Called during the bubbling step when a touch is cancelled.
*
* @since 2.1
*
- * @return Whether the touch event is processed by the listener or not
+ * @return The boolean value that indicates whether the touch event is processed by the listener or not
* @param[in] source The source of the event
* @param[in] touchEventInfo The touch event information
*/
*
* @since 2.1
*
- * @return Whether the touch event is processed by the listener or not
+ * @return The boolean value that indicates whether the touch event is processed by the listener or not
* @param[in] source The source of the event
* @param[in] touchEventInfo The touch event information
*/
*
* @since 2.1
*
- * @return Whether the touch event is processed by the listener or not
+ * @return The boolean value that indicates whether the touch event is processed by the listener or not
* @param[in] source The source of the event
* @param[in] touchEventInfo The touch event information
*/
*
* @since 2.1
*
- * @return Whether the touch event is processed by the listener or not
+ * @return The boolean value that indicates whether the touch event is processed by the listener or not
* @param[in] source The source of the event
* @param[in] touchEventInfo The touch event information
*/
}; // IPropagatedTouchEventListener
}} // Tizen::Ui
-#endif // _FUI_IPROPAGATED_TOUCH_EVENT_LISTENER_H_
\ No newline at end of file
+#endif // _FUI_IPROPAGATED_TOUCH_EVENT_LISTENER_H_
* ScrollPanel. The class that processes a change event implements this interface, and the instance created with that class is
* registered with a UI control, using the control's AddScrollPanelEventListener() method. When the change event occurs, a method
* of that instance is invoked.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_panels.htm">Panels</a> and <a href="../org.tizen.native.appprogramming/html/tutorials/ui_tutorial/using_overlay_keypad_with_scroll.htm">Using EditArea or EditField Overlay Keypad with ScrollPanel</a>.
*/
// Operation
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
/**
* @if OSPDEPREC
- * Called when an item is about to be unloaded from memory. @n
+ * Called when an item is about to be unloaded from the memory. @n
* The user-allocated resources associated with the item to be unloaded need to be freed when OnUnloadItemRequested() is called.
*
* @brief <i> [Deprecated] </i> This interface implements the listener for events on SlidableGroupedList.
/**
* @if OSPDEPREC
* @interface ISlidableListEventListener
- * @brief <i> [Deprecated] </i> This interface implements the listener for events on SlidableList.
+ * @brief <i> [Deprecated] </i> This interface implements the listener for events on %SlidableList.
* @deprecated This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface.
* @since 2.0
*
*
* The %ISlidableListEventListener interface implements a listener for receiving scroll events on SlidableList. This listener is implemented
* to allow the application to load the items as needed, as the user scrolls through the list.
- * The class is registered with a SlidableList, using the control's AddSlidableListEventListener() method.
+ * The class is registered with a %SlidableList, using the control's AddSlidableListEventListener() method.
* @endif
*/
class _OSP_EXPORT_ ISlidableListEventListener
/**
* @if OSPDEPREC
- * Called when an item is about to be unloaded from memory. @n
+ * Called when an item is about to be unloaded from the memory. @n
* The user-allocated resources associated with the item must be freed before unloading, when OnUnloadItemRequested() is called.
*
* @brief <i> [Deprecated] </i> This interface implements the listener for events on SlidableList.
// Lifecycle
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
* @since 2.0
*
* @param[in] source The source of the event
- * @remarks For EditField or EditArea with INPUT_STYLE_FULLSCREEN input style, this listener method is invoked when the user presses "Done"
- * soft-key. Whereas, for %EditField or %EditArea with INPUT_STYLE_OVERLAY input style, this method is called whenever the user presses a
- * key.
- * @remarks Note that when a non-character key is pressed, OnTextValueChanged() callback is invoked.
+ * @remarks
+ * - For EditField or EditArea with Controls::INPUT_STYLE_FULLSCREEN input style, this listener method is invoked when the user presses "Done"
+ * soft-key. Whereas, for %EditField or %EditArea with Controls::INPUT_STYLE_OVERLAY input style, this method is called whenever the user presses a
+ * key.
+ * - Note that when a non-character key is pressed, OnTextValueChanged() callback is invoked.
*/
virtual void OnTextValueChanged(const Tizen::Ui::Control& source) = 0;
/**
- * Called when a change made to the text is canceled.
+ * Called when a change made to the text is cancelled.
*
* @since 2.0
*
* @param[in] source The source of the event
- * @remarks This listener method is called when the user presses "Cancel" soft-key for EditField or EditArea with INPUT_STYLE_FULLSCREEN input
+ * @remarks This listener method is called when the user presses "Cancel" soft-key for EditField or EditArea with Controls::INPUT_STYLE_FULLSCREEN input
* style.
*/
virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source) = 0;
virtual void OnTimeChanged(const Tizen::Ui::Control& source, int hour, int minute) = 0;
/**
- * Called when a time change is canceled.
+ * Called when a time change is cancelled.
*
* @since 2.0
*
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
virtual void OnCustomGestureFinished(Tizen::Ui::TouchGestureDetector& gestureDetector) = 0;
/**
- * Called when a custom gesture detection is canceled.
+ * Called when a custom gesture detection is cancelled.
*
* @since 2.0
*
/**
* @interface ITouchEventListener
- * @brief This interface is used as the argument to the touch event listener.
+ * @brief This interface is used as an argument to the touch event listener.
*
* @since 2.0
*
* The class that processes a touch event implements this interface, and the instance created with that class is registered with a
* UI control, using the Control::AddTouchEventListener() method. When the touch event occurs, a method of that instance is
* invoked.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/event_listener.htm">Event Listeners</a>.
*/
class _OSP_EXPORT_ ITouchEventListener
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*
*
* @brief <i> [Deprecated] </i>
* @deprecated This callback is deprecated.
- * If you want to listen to "long press" touch event, it is recommended to use the TouchLongPressGestureDetector class.
+ * If you want to listen to the "long press" touch event, it is recommended to use the TouchLongPressGestureDetector class.
* @since 2.0
*
* @param[in] source The source of the event
virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) = 0;
/**
- * Called when the touch is canceled.
+ * Called when the touch is cancelled.
*
* @since 2.0
*
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
virtual void OnFlickGestureDetected(Tizen::Ui::TouchFlickGestureDetector& gestureDetector) = 0;
/**
- * Called when a flick gesture detection is canceled.
+ * Called when a flick gesture detection is cancelled.
*
* @since 2.0
*
* @since 2.0
*
* The %ITouchGestureEventListener interface is a base interface that all gesture event listeners must implement.
- * The event listener can listen when the specific event occurs. The event listener
+ * The event listener can listen when a specific event occurs. The event listener
* has several methods, and each method is called when a specific event occurs.
*
*/
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
* This is the destructor for this class.
*
* @since 2.0
virtual void OnLongPressGestureDetected(Tizen::Ui::TouchLongPressGestureDetector& gestureDetector) = 0;
/**
- * Called when a long press detection is canceled.
+ * Called when a long press detection is cancelled.
*
* @since 2.0
*
* @since 2.0
*
* The %ITouchModeChangedEventListener interface is the listener interface for receiving touch mode change events.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/event_listener.htm">Event Listeners</a>.
*/
class _OSP_EXPORT_ ITouchModeChangedEventListener
{
public:
/**
- * This polymorphic destructor should be overridden if required.
+ * This polymorphic destructor should be overridden if required. @n
* This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
{
public:
/**
- * This polymorphic destructor should be overridden if required.
+ * This polymorphic destructor should be overridden if required. @n
* This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
virtual void OnPanningGestureFinished(Tizen::Ui::TouchPanningGestureDetector& gestureDetector) = 0;
/**
- * Called when a panning gesture detection is canceled.
+ * Called when a panning gesture detection is cancelled.
*
* @since 2.0
*
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
virtual void OnPinchGestureFinished(Tizen::Ui::TouchPinchGestureDetector& gestureDetector) = 0;
/**
- * Called when a pinch gesture detection is canceled.
+ * Called when a pinch gesture detection is cancelled.
*
* @since 2.0
*
{
public:
/**
- * This polymorphic destructor should be overridden if required.
+ * This polymorphic destructor should be overridden if required. @n
* This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
virtual void OnRotationGestureFinished(Tizen::Ui::TouchRotationGestureDetector& gestureDetector) = 0;
/**
- * Called when a rotation gesture detection is canceled.
+ * Called when a rotation gesture detection is cancelled.
*
* @since 2.0
*
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
virtual void OnTapGestureDetected(Tizen::Ui::TouchTapGestureDetector& gestureDetector) = 0;
/**
- * Called when a tap gesture detection is canceled.
+ * Called when a tap gesture detection is cancelled.
*
* @since 2.0
*
* The class that processes a link click event implements this interface, and the instance created with that class is registered
* with a UI control, using the control's AddUiLinkEventListener() method. When the link click event occurs, the OnLinkClicked()
* method of that instance is invoked.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_editfield_editarea.htm">EditArea and EditField</a>, <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_textbox.htm">TextBox</a>, and <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
*/
// Lifecycle
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
// Operation
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
*
* @since 2.0
* @return An error code
- * @param[in] pControl The source object for connecting the Input Method.
- * @param[in] listener An instance of the %IInputConnectionEventListener for processing the event
+ * @param[in] pControl The source object for connecting the Input Method
+ * @param[in] listener An instance of %IInputConnectionEventListener for processing the event
* @param[in] provider The %InputConnection provider
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
result Construct(const Control* pControl, IInputConnectionEventListener& listener, IInputConnectionProvider& provider);
/**
- * Initializes this instance of %InputConnection with a specified parameter.
+ * Initializes this instance of %InputConnection with the specified parameter.
*
* @since 2.1
*
* @return An error code
- * @param[in] pControl The source object for connecting the Input Method
+ * @param[in] pControl The source object for connecting the Input Method
* @param[in] listener An instance of %IInputConnectionEventListenerF for processing the event
* @param[in] provider The %InputConnection provider
* @exception E_SUCCESS The method is successful.
* @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
- * @see UnbindInputMethod()
- * @remarks This method should be called when the %Control object has the input focus.
+ * @remarks This method should be called when the Control object has the input focus.
+ * * @see UnbindInputMethod()
*/
result BindInputMethod(void);
* Sets the auto-capitalization mode.
*
* @since 2.0
- * @param[in] autoCapitalizationMode The auto-capitalization mode.
+ * @param[in] autoCapitalizationMode The auto-capitalization mode
* @remarks This method may not work, depending on the current active Input Method.
*/
void SetAutoCapitalizationMode(AutoCapitalizationMode autoCapitalizationMode);
* @since 2.0
*
* @return An error code
- * @param[in] position The cursor position that is to set
+ * @param[in] position The cursor position to set
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_INVALID_STATE This exception is thrown when BindInputMethod() is not called before calling this method.
*
* @since 2.0
* @return An instance of the rectangle that represents the position of the top-left corner,
- * the width, and the height of the Input Panel.
+ * width, and height of the Input Panel
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_STATE This exception is thrown when BindInputMethod() is not called before calling this method.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @since 2.1
*
* @return An instance of the rectangle that represents the position of the top-left corner,
- * the width, and the height of the Input Panel
+ * width, and height of the Input Panel
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_STATE This exception is thrown when BindInputMethod() is not called before calling this method.
* @remarks The specific error code can be accessed using the GetLastResult() method.
void SetTextPredictionEnabled(bool enable);
/**
- * Sends opaque command to the input method.
+ * Sends an opaque command to the input method.
*
* @since 2.1
*
* @param[in] command The opaque command
- * @remarks This method can be used to provide domain-specific features that are only known between certain input methods and their clients.
- * This method may not work, depending on the active Input Method.
+ * @remarks
+ * - This method can be used to provide domain-specific features that are only known between certain input methods and their clients.
+ * - This method may not work, depending on the active Input Method.
*/
void SendOpaqueCommand (const Tizen::Base::String& command);
{
INPUT_PANEL_STYLE_NORMAL, /**< Default style */
INPUT_PANEL_STYLE_EMAIL, /**< Email style */
- INPUT_PANEL_STYLE_URL, /**< URL style */
+ INPUT_PANEL_STYLE_URL, /**< URL style */
INPUT_PANEL_STYLE_NUMBER, /**< Number style */
INPUT_PANEL_STYLE_NUMBER_ONLY, /**< Number Only style */
- INPUT_PANEL_STYLE_PHONE_NUMBER, /**< Phone Number style */
+ INPUT_PANEL_STYLE_PHONE_NUMBER, /**< Phone Number style */
INPUT_PANEL_STYLE_IP /**< IP style */
};
enum InputPanelShowState
{
INPUT_PANEL_SHOW_STATE_SHOW, /**< Show State */
- INPUT_PANEL_SHOW_STATE_HIDE /**< Hide State */
+ INPUT_PANEL_SHOW_STATE_HIDE /**< Hide State */
};
/**
AUTO_CAPITALIZATION_MODE_NONE, /**< Auto-capitalization mode is set to None */
AUTO_CAPITALIZATION_MODE_WORD, /**< Auto-capitalization mode is Word */
AUTO_CAPITALIZATION_MODE_SENTENCE, /**< Auto-capitalization mode is Sentence */
- AUTO_CAPITALIZATION_MODE_ALL /**< Auto-capitalization mode is set to All */
+ AUTO_CAPITALIZATION_MODE_ALL /**< Auto-capitalization mode is set to All */
};
/**
INPUT_PANEL_ACTION_ENTER, /**< The Enter key */
INPUT_PANEL_ACTION_GO, /**< The Go key */
INPUT_PANEL_ACTION_NEXT, /**< The Next key */
- INPUT_PANEL_ACTION_SEND, /**< The Send key */
+ INPUT_PANEL_ACTION_SEND, /**< The Send key */
INPUT_PANEL_ACTION_SEARCH, /**< The Search key */
INPUT_PANEL_ACTION_LOGIN, /**< The Login key */
INPUT_PANEL_ACTION_SIGN_IN, /**< The Sign-In key */
/**
* @class KeyEventInfo
- * @brief This class stores the information of each key events.
+ * @brief This class stores the information of each key event.
*
* @since 2.1
*
* @since 2.1
*
* @param[in] keyCode The key code that represents the key of interest
- * @param[in] keyModifiers The key modifier that modifies the normal action of the key
- * @see Tizen::Ui::KeyCode
- * @see Tizen::Ui::KeyModifier
+ * @param[in] keyModifiers The key modifier that modifies the normal action of the key
+ * @see KeyModifier
*/
KeyEventInfo(KeyCode keyCode, int keyModifiers);
*
* @param[in] keyModifiers The key modifiers that can be combined using the bitwise OR operator
* @see GetKeyModifier()
- * @see Tizen::Ui::KeyModifier
+ * @see KeyModifier
*
*/
void SetKeyModifier(int keyModifiers);
*
* @return The bitwise ORing key modifiers
* @see SetKeyModifier()
- * @see Tizen::Ui::KeyModifier
+ * @see KeyModifier
*/
int GetKeyModifier(void) const;
* @final This class is not intended for extension.
*
* The %KeyEventManager class listens to all key events that are generated within the application's context.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/event_listener.htm">Event Listeners</a>.
*/
class _OSP_EXPORT_ KeyEventManager
virtual ~KeyEventManager(void);
/**
- * Gets the pointer to the current key event manager.
+ * Gets a pointer to the current key event manager.
*
* @since 2.0
*
void AddKeyEventListener(IKeyEventListener& listener);
/**
- * Removes the %IKeyEventListener instance. @n
+ * Removes an %IKeyEventListener instance. @n
* The removed listener is not notified even when the key events are fired.
*
* @since 2.0
*
* Defines the list of keys supported by the system. @n
* Note that certain keys may not be available on all devices. @n
- * Please use the Tizen::Ui::KeyboardMap class to query the availability of a specific key on a target device.
*
* @since 2.0
*/
/**
* @if OSPDEPREC
- * The second label to be displayed after KEY_CAPSLOCK or KEY_FN is pressed
+ * The second label to be displayed after @c KEY_CAPSLOCK or @c KEY_FN is pressed
* @endif
*/
KEYBOARD_KEY_LABEL_2,
/**
* @if OSPDEPREC
- * The third label to be displayed when the key is toggled twice (without pressing KEY_CAPSLOCK or KEY_FN)
+ * The third label to be displayed when the key is toggled twice (without pressing @c KEY_CAPSLOCK or @c KEY_FN)
* @endif
*/
KEYBOARD_KEY_LABEL_3,
/**
* @if OSPDEPREC
- * The fourth label to be displayed when the key is toggled the third time (without pressing KEY_CAPSLOCK or KEY_FN)
+ * The fourth label to be displayed when the key is toggled the third time (without pressing @c KEY_CAPSLOCK or @c KEY_FN)
* @endif
*/
KEYBOARD_KEY_LABEL_4,
/**
* @if OSPDEPREC
- * Gets the pointer to the %KeyboardMap instance.
+ * Gets a pointer to the %KeyboardMap instance.
*
* @brief <i> [Deprecated] </i>
* @deprecated This class is deprecated because it is not supported by the platform.
* @since 2.0
*
* The %Layout class is the abstract base class of all the %Layout classes.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/layout.htm">Layout</a>.
*/
class _OSP_EXPORT_ Layout
*
* @return An error code
*
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
*/
result Update(void);
/**
* @enum LayoutType
*
- * Defines the layout type.
+ * Defines the layout types.
*
* @since 2.0
*/
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*
virtual LayoutType GetLayoutType(void) const;
/**
- * Sets the relation of the specified child control for the edge with other control.
+ * Sets the relation of the specified child control with the edge of another control.
*
* @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated.
* It must be a parent or sibling.
* @param[in] edgeRelation The edge of the specified control to align with the edge of the target control
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
+ * @exception E_INVALID_ARG A specified input parameter is invalid. @n
* Either the specified @c childControl or the specified @c targetControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetRelation(Control& childControl, const Control& targetControl, RectangleEdgeRelation edgeRelation);
/**
- * Sets the relation of a specified child control for the edge with other control.
+ * Sets the relation of the specified child control with the edge of another control.
*
* @since 2.1
*
* @param[in] childControl The control for which the relation is reset
* @param[in] edgeType The edge type of the specified control
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG A specified input parameter is invalid. @n
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result ResetRelation(Control& childControl, RectangleEdgeType edgeType);
* @since 2.0
*
* @return An error code
- * @param[in] childControl The control to center aligned
+ * @param[in] childControl The control to center align
* @param[in] alignment The center alignment for a control either vertically or horizontally
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG A specified input parameter is invalid. @n
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks The relation value that is set to a child control is ignored when the center-alignment is applied to the control.
*/
* @since 2.0
*
* @return An error code
- * @param[in] childControl The control to center aligned
+ * @param[in] childControl The control to center align
* @param[in] alignment The center alignment for a control either vertically or horizontally
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG A specified input parameter is invalid. @n
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result ResetCenterAligned(Control& childControl, CenterAlignmentType alignment);
* @param[in] top The top margin
* @param[in] bottom The bottom margin
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG A specified input parameter is invalid. @n
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the margins are set to @c 0.
*/
result SetMargin(Control& childControl, int left, int right, int top, int bottom);
/**
- * Sets the margins of a specified control.
+ * Sets the margins of the specified control.
*
* @since 2.1
*
* @param[in] bottom The bottom margin
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the margins are set to @c 0.
*/
* @param[in] childControl The control for which the width is set
* @param[in] width The value of the width
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG A specified input parameter is invalid. @n
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetWidth(Control& childControl, int width);
/**
- * Sets the width of a specified control to the fixed size.
+ * Sets the width of the specified control to the fixed size.
*
* @since 2.1
*
* @param[in] width The value of the width
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetWidth(Control& childControl, float width);
* @param[in] childControl The control for which the width is set
* @param[in] policy The fitting policy for the width
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG A specified input parameter is invalid. @n
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetHorizontalFitPolicy(Control& childControl, FitPolicy policy);
* @param[in] childControl The control for which the height is set
* @param[in] height The value of the height
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG A specified input parameter is invalid. @n
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetHeight(Control& childControl, int height);
/**
- * Sets the height of a specified control to the fixed size.
+ * Sets the height of the specified control to the fixed size.
*
* @since 2.1
*
* @param[in] height The value of the height
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetHeight(Control& childControl, float height);
* @param[in] childControl The control for which the height is set
* @param[in] policy The fitting policy for the height
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid. @n
- * The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG A specified input parameter is invalid. @n
+ * The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetVerticalFitPolicy(Control& childControl, FitPolicy policy);
* @file FUiScenes.h
* @brief This is the header file for the %Scenes namespace.
*
- * This header file contains the declarations and descriptions of the %Tizen::Ui::Scenes namespace.
+ * This header file contains the declarations and descriptions of the %Scenes namespace.
*/
#ifndef _FUI_SCENES_H_
{
/**
* @namespace Tizen::Ui::Scenes
- * @brief This namespace contains the classes for the scene management and its related functions.
+ * @brief This namespace contains classes for scene management and its related functions.
* @since 2.0
*
* @remarks @b Header @b %file: @b \#include @b <FUi.h> @n
* @b Library : @b osp-uifw
*
* The %Scenes namespace provides easy and simplified screen transition methods for form-based UI applications using the scene management feature.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/scene_management.htm">Scene Management</a>.
*
* The following diagram illustrates the relationships between the classes belonging to the %Scenes namespace.
* @since 2.0
*
* @param[in] animationType The transition animation type
- * @param[in] destroyOption The destroy option whether to destroy the current scene or not
+ * @param[in] destroyOption The destroy option that indicates whether to destroy the current scene or not
* @remarks Use this constructor for adjacent backward transition.
*/
BackwardSceneTransition(SceneTransitionAnimationType animationType,
*
* @param[in] destinationSceneId The scene ID of transition destination
* @param[in] animationType The transition animation type
- * @param[in] destroyOption The destroy option whether to destroy the current scene or not
+ * @param[in] destroyOption The destroy option that indicates whether to destroy the current scene or not
* @remarks Use this constructor for non-adjacent backward transition.
*/
BackwardSceneTransition(const SceneId& destinationSceneId,
*
* @param[in] destinationSceneId The scene ID of transition destination
* @param[in] animationType The transition animation type
- * @param[in] historyOption The history option whether to add the current scene to the history or not
- * @param[in] destroyOption The destroy option whether to destroy the current scene or not
+ * @param[in] historyOption The history option that indicates whether to add the current scene to the history or not
+ * @param[in] destroyOption The destroy option that indicates whether to destroy the current scene or not
* @remarks Use this constructor for transition to the specified @c destinationSceneId with options.
*/
ForwardSceneTransition(const SceneId& destinationSceneId,
* @since 2.0
*
* @param[in] animationType The transition animation type
- * @param[in] historyOption The history option whether to add the current scene to the history or not
- * @param[in] destroyOption The destroy option whether to destroy the current scene or not
+ * @param[in] historyOption The history option that indicates whether to add the current scene to the history or not
+ * @param[in] destroyOption The destroy option that indicates whether to destroy the current scene or not
* @remarks Use this constructor for transition through the policy provider.
*/
ForwardSceneTransition(SceneTransitionAnimationType animationType,
/**
* @interface IFormFactory
- * @brief This interface is the factory interface for creating the Form control instance.
+ * @brief This interface is the factory interface for creating the %Form control instance.
*
* @since 2.0
*
* The %IFormFactory interface is the factory interface for creating the Form control instance.
- * The SceneManager calls CreateFormN() with form ID string when an instance of %Form control is required.
+ * The SceneManager calls CreateFormN() with a form ID string when an instance of %Form control is required.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/scene_management.htm">Scene Management</a>.
*/
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way,
- * the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
*
* @since 2.0
*
- * @return A pointer to a new Form instance
+ * @return A pointer to the new Form instance
* @param[in] formId The form ID string that specifies the ID of the Form to create
* @param[in] sceneId The scene ID corresponding to the Form
* @remarks The new instance managed by the SceneManager class must not be deleted manually.
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way,
- * the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
*
* @since 2.0
*
- * @return A pointer to a new Panel instance
+ * @return A pointer to the new Panel instance
* @param[in] panelId The panel ID string that specifies the ID of the Panel to create
* @param[in] sceneId The scene ID corresponding to the Panel
* @remarks The new instance managed by the SceneManager class must not be deleted manually.
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way,
- * the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
virtual ~ISceneAnimationProvider(void) {}
/**
- * Called on scene transition exactly before current Form (form to form transition) is changed or show state
+ * Called on scene transition exactly before the current Form (form to form transition) or show state
* (panel to panel transition) is changed.
*
* @since 2.0
*
* @param[in] sceneId The scene ID that requires the animator settings
- * @param[in] pArgs A pointer to an argument list
+ * @param[in] pArgs A pointer to the argument list
* @param[in] type The animation type
- * @param[in] formTransition Set to @c true if the transition is form to form transition, @n
- * else @c false if the transition is panel to panel transition (Based on same Form)
- * @remarks To show custom scene transition animation, add animator modification code in this callback. @n
- * Animation is initiated by SceneManager after this method is called.
- * The form to form transition animation is triggered by Tizen::Ui::Animations::FrameAnimator::SetCurrentForm(),
- * and the panel to panel transition animation is triggered by Tizen::Ui::Animations::ControlAnimator::SetShowState().
+ * @param[in] formTransition Set to @c true if the transition is a form to form transition, @n
+ * else @c false if the transition is a panel to panel transition (Based on same Form)
+ * @remarks
+ * - To show custom scene transition animation, add animator modification code in this callback. @n
+ * - Animation is initiated by SceneManager after this method is called.
+ * - The form to form transition animation is triggered by Tizen::Ui::Animations::FrameAnimator::SetCurrentForm(),
+ * and the panel to panel transition animation is triggered by Tizen::Ui::Animations::ControlAnimator::SetShowState().
*
*/
virtual void PrepareAnimation(const Tizen::Ui::Scenes::SceneId& sceneId, Tizen::Base::Collection::IList* pArgs,
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way,
- * the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
virtual ~ISceneEventListener(void) {}
/**
- * Called after setting as current scene. @n
+ * Called after setting the current scene. @n
* The UI element (Tizen::Ui::Controls::Form or Tizen::Ui::Controls::Panel)
* has been added to a container (Frame or Form) and is ready to update.
*
*
* @param[in] previousSceneId The scene ID of the deactivated scene
* @param[in] currentSceneId The scene ID of the newly activated scene
- * @param[in] pArgs A pointer to an argument list that is user-specified
- * @remarks The argument list must be cleaned up to free memory.
+ * @param[in] pArgs A pointer to the argument list that is user-specified
+ * @remarks The argument list must be cleaned up to free the memory.
*/
virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs) = 0;
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way,
- * the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way,
- * the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
*
* @return A scene ID
* @param[in] currentSceneId The scene ID of the active Scene
- * @param[in] pArgs A pointer to an argument list
+ * @param[in] pArgs A pointer to the argument list
*/
virtual Tizen::Ui::Scenes::SceneId GetNextScene(const Tizen::Ui::Scenes::SceneId& currentSceneId,
const Tizen::Base::Collection::IList* pArgs) = 0;
*
* The %Scene is the basic unit of UI switching. @n
* The %Scene class is the item class for scene management. It represents individual UI scene.
- * A scene is combination of form and panel, panel can be omitted.
+ * A scene is a combination of form and panel, panel can be omitted.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/scene_management.htm">Scene Management</a>.
*/
Tizen::Base::String GetPanelId(void) const;
/**
- * Gets the associated Form instance pointer.
+ * Gets an associated Form instance pointer.
*
* @since 2.0
*
Tizen::Ui::Controls::Form* GetForm(void) const;
/**
- * Gets the associated Panel instance pointer.
+ * Gets an associated Panel instance pointer.
*
* @since 2.0
*
* @return The Panel instance pointer, @n
* else a @c null pointer if the %Panel is not specified
- * @remarks The Panel is optional component of %Scene so it may not be always valid.
+ * @remarks The Panel is an optional component of %Scene so it may not always be valid.
*/
Tizen::Ui::Controls::Panel* GetPanel(void) const;
*
* @final This class is not intended for extension.
*
- * The %SceneManager class provides methods to manage scenes and scene states. This class is simplified to a single method call for UI Scene transition that changes the GUI, such as
- * form to form transition or tab to tab transition. @n
+ * The %SceneManager class provides methods to manage scenes and scene states. This class is simplified to a single method call for UI
+ * Scene transition that changes the GUI, such as form to form transition or tab to tab transition. @n
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/scene_management.htm">Scene Management</a> and <a href="../org.tizen.native.appprogramming/html/guide/ui/transition_animation.htm">Transition Animations</a>.
*/
{
public:
/**
- * Gets the %SceneManager instance.
+ * Gets the pointer to the %SceneManager instance.
*
* @since 2.0
*
- * @return A pointer to the %SceneManager instance if successful, @n
+ * @return The pointer to the %SceneManager instance if successful, @n
* else @c null if it fails
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
*
* @return An error code
* @param[in] resourceId The resource ID of the scene(s) @n
- * A duplicated scene (scene ID) will not be registered.
+ * A duplicated scene (scene ID) will not be registered.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_FILE_NOT_FOUND The corresponding resource file is not found.
*
* @return An error code
* @param[in] sceneId The target scene ID
- * @param[in] pSceneAnimationProvider An instance of ISceneAnimationProvider to set, @n else @c null to clear previous one
+ * @param[in] pSceneAnimationProvider An instance of ISceneAnimationProvider to set, @n
+ * else @c null to clear previous one
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c sceneId is invalid.
* @exception E_OBJ_NOT_FOUND The specified scene is not found.
* @return An error code
* @param[in] pSceneTransitionPolicyProvider An instance of ISceneTransitionPolicyProvider to set, @n
* else @c null to clear previous one
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @see ISceneTransitionPolicyProvider::GetNextScene()
* @see GoForward()
*/
* @param[in] duration The duration of the animation in milliseconds @n The maximum duration is one second.
* @param[in] interpolatorType The type of interpolator used for the intermediate value calculation of the animation
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c animationType is either @c SCENE_TRANSITION_ANIMATION_TYPE_NONE or
- * @c SCENE_TRANSITION_ANIMATION_TYPE_CUSTOM.
+ * @exception E_INVALID_ARG The specified @c animationType is either @c SCENE_TRANSITION_ANIMATION_TYPE_NONE or
+ * @c SCENE_TRANSITION_ANIMATION_TYPE_CUSTOM.
* @see GoForward()
* @see GoBackward()
*/
SceneId GetCurrentSceneId(void) const;
/**
- * Checks whether the Scene instance with the specified sceneId has been destroyed or not.
+ * Checks whether the Scene instance with the specified @c sceneId has been destroyed or not.
*
* @since 2.0
*
*
* @since 2.0
*
- * @param[in] rhs An instance of %SceneTransition
+ * @param[in] rhs An instance of %SceneTransition to copy
*/
SceneTransition(const SceneTransition& rhs);
* @since 2.0
*
* @param[in] direction The transition direction
- * @param[in] destinationSceneId The scene ID of transition destination
+ * @param[in] destinationSceneId The scene ID of the transition destination
* @param[in] animationType The transition animation type
- * @param[in] historyOption The history option whether to add the current scene to the history or not
- * @param[in] destroyOption The destroy option whether to destroy the current scene or not
+ * @param[in] historyOption The history option that indicates whether to add the current scene to the history or not
+ * @param[in] destroyOption The destroy option that indicates whether to destroy the current scene or not
*/
SceneTransition(SceneTransitionDirection direction, const SceneId& destinationSceneId,
SceneTransitionAnimationType animationType,
*
* @since 2.0
*
- * @return The direction of scene transition
+ * @return The direction of the scene transition
*
*/
SceneTransitionDirection GetDirection(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] sceneId The scene ID of transition destination
+ * @param[in] sceneId The scene ID of the transition destination
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*
*
* @since 2.0
*
- * @return The scene ID of transition destination
+ * @return The scene ID of the transition destination
*
*/
SceneId GetDestinationSceneId(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] historyOption The history option whether to add the current scene to the history or not
+ * @param[in] historyOption The history option that indicates whether to add the current scene to the history or not
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*
* @since 2.0
*
* @return An error code
- * @param[in] destroyOption The destroy option whether to destroy the current scene or not
+ * @param[in] destroyOption The destroy option that indicates whether to destroy the current scene or not
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*
/**
* @enum SceneTransitionDirection
*
- * Defines the scene transition directions whether forward or backward.
+ * Defines the scene transition directions, that is, whether forward or backward.
*
* @since 2.0
*/
/**
* @enum SceneHistoryOption
*
- * Defines the scene history operation options whether to add to history or not.
+ * Defines the scene history operation options that indicate whether to add to history or not.
*
* @since 2.0
*/
*
* @since 2.0
*
- * @see Tizen::Ui::Animations::FrameAnimatorFormTransitionAnimation
+ * @see Animations::FrameAnimatorFormTransitionAnimation
*/
enum SceneTransitionAnimationType
{
* @privilege %http://tizen.org/privilege/inputmanager
*
* @return An error code
- * @param[in] keyEvent The event type of the key to generate
+ * @param[in] keyEvent The event type of the key to generate
* @param[in] keyCode The code of the key
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_OPERATION_FAILED An error has occurred in the underlying system.
- * @exception E_INVALID_ARG The specified @c keyEvent or @c keyCode is not supported.
+ * @exception E_OPERATION_FAILED An error has occurred in the underlying system.
+ * @exception E_INVALID_ARG The specified @c keyEvent or @c keyCode is not supported.
*/
static result GenerateKeyEvent(KeyEventType keyEvent, KeyCode keyCode);
*
* @return An error code
* @param[in] touchEvent The event type of the touch to generate
- * @param[in] point The point on which the touch occurs
- * @exception E_SUCCESS The method is successful.
+ * @param[in] point The point on which the touch occurs
+ * @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_OPERATION_FAILED An error has occurred in the underlying system.
- * @exception E_INVALID_ARG The specified @c touchEvent is not supported.
+ * @exception E_OPERATION_FAILED An error has occurred in the underlying system.
+ * @exception E_INVALID_ARG The specified @c touchEvent is not supported.
*/
static result GenerateTouchEvent(TouchEventType touchEvent, const Tizen::Graphics::Point& point);
* @return An error code
* @param[in] touchEvent The event type of the touch to generate
* @param[in] point The point on which the touch occurs
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_OPERATION_FAILED An error has occurred in the underlying system.
+ * @exception E_OPERATION_FAILED An error has occurred in the underlying system.
* @exception E_INVALID_ARG The specified @c touchEvent is not supported.
*/
static result GenerateTouchEvent(TouchEventType touchEvent, const Tizen::Graphics::FloatPoint& point);
* @privlevel platform
* @privilege %http://tizen.org/privilege/inputmanager
*
- * @return A pointer to the captured screen bitmap, @n
- * else @c null if it fails to capture screen
- * @exception E_SUCCESS The method is successful.
+ * @return A pointer to the captured screen bitmap, @n
+ * else @c null if it fails to capture the screen
+ * @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_OPERATION_FAILED An error has occurred in the underlying system.
- * @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
- * @remarks The specific error code can be accessed using the GetLastResult() method. @n
- * The returned bitmap must be deleted by the application after use.
+ * @exception E_OPERATION_FAILED An error has occurred in the underlying system.
+ * @remarks
+ * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
+ * - The specific error code can be accessed using the GetLastResult() method. @n
+ * - The returned bitmap must be deleted by the application after use.
*/
static Tizen::Graphics::Bitmap* CaptureScreenN(void);
* @file FUiTouch.h
* @brief This is the header file for the %Touch class.
*
- * This header file contains the declarations of the %Touch class.get
+ * This header file contains the declarations of the %Touch class.
* @endif
*/
{
public:
/**
- * @if OSPDEPREC
+ * @if OSPDEPREC
* This is the default constructor for this class.
*
* @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated because the %Touch class is not supported any more. Instead, use the Tizen::Ui::TouchEventManager class.
* @since 2.0
- * @endif
+ * @endif
*/
Touch(void);
/**
- * @if OSPDEPREC
+ * @if OSPDEPREC
* This destructor overrides Tizen::Base::Object::~Object().
*
* @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated because the %Touch class is not supported any more. Instead, use the Tizen::Ui::TouchEventManager class.
* @since 2.0
- * @endif
+ * @endif
*/
virtual ~Touch(void);
public:
/**
- * @if OSPDEPREC
+ * @if OSPDEPREC
* Enables or disables the multi-point touch of the Control.
*
* @brief <i> [Deprecated] </i>
*
* @return An error code
* @param[in] control The control
- * @param[in] enable A Boolean flag indicating whether to enable to the multi-point touch
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
+ * @param[in] enable The Boolean flag that indicates whether to enable the multi-point touch
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM A system error has occurred.
* @see IsMultipointEnabled()
- * @endif
+ * @endif
*/
result SetMultipointEnabled(const Tizen::Ui::Control& control, bool enable);
/**
- * @if OSPDEPREC
+ * @if OSPDEPREC
* Checks whether the multi-point touch is enabled.
*
* @brief <i> [Deprecated] </i>
* @return @c true if the multi-point touch is enabled, @n
* else @c false
* @see IsMultipointEnabled()
- * @endif
+ * @endif
*/
bool IsMultipointEnabled(const Tizen::Ui::Control& control) const;
/**
- * @if OSPDEPREC
+ * @if OSPDEPREC
* Gets the touch position. @n
* If there is only a single touch, that is returned. If there are multi-point touches, then the position of the last touch is returned.
*
*
* @return The coordinates of the touch
* @remarks If an error occurs, this method returns Point(-1, -1).
- * @endif
+ * @endif
*/
Tizen::Graphics::Point GetPosition(void) const;
/**
- * @if OSPDEPREC
+ * @if OSPDEPREC
* Gets the touch position by ID.
*
* @brief <i> [Deprecated] </i>
* @return The coordinates of the touch
* @param[in] id The ID of the touch
* @remarks If an error occurs, this method returns Point(-1, -1).
- * @endif
+ * @endif
*/
Tizen::Graphics::Point GetPosition(unsigned long id) const;
/**
- * @if OSPDEPREC
+ * @if OSPDEPREC
* Gets the touch position relative to the specified control.
*
* @brief <i> [Deprecated] </i>
* @return The coordinates of the touch
* @param[in] control The source control
* @remarks If an error occurs, this method returns Point(-1, -1).
- * @endif
+ * @endif
*/
Tizen::Graphics::Point GetPosition(const Tizen::Ui::Control& control) const;
/**
- * @if OSPDEPREC
+ * @if OSPDEPREC
* Gets the touch position relative to the specified control by ID.
*
* @brief <i> [Deprecated] </i>
* Instead, get the Tizen::Ui::TouchEventManager::GetTouchInfoListN() method and use the Tizen::Ui::TouchEventInfo::GetCurrentPosition() method.
* @since 2.0
*
- * @return The coordinates of the touch
+ * @return The coordinates of the touch
* @param[in] control The source control
* @param[in] id The ID of the touch
* @remarks If an error occurs, this method returns Point(-1, -1).
- * @endif
+ * @endif
*/
Tizen::Graphics::Point GetPosition(const Tizen::Ui::Control& control, unsigned long id) const;
/**
- * @if OSPDEPREC
+ * @if OSPDEPREC
* Gets the status of the touch by ID.
*
* @brief <i> [Deprecated] </i>
*
* @param[in] id The ID of the touch
* @return The touch status
- * @endif
+ * @endif
*/
TouchStatus GetTouchStatus(unsigned long id) const;
/**
- * @if OSPDEPREC
+ * @if OSPDEPREC
* Gets the list of the multi-point touches, each represented by TouchInfo.
*
* @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated because the %Touch class is not supported any more. Instead, use the Tizen::Ui::TouchEventManager::GetTouchInfoListN() method.
* @since 2.0
*
- * @return A list of the TouchInfo instances
- * @see Tizen::Ui::TouchInfo
- * @endif
+ * @return The list of TouchInfo instances
+ * @endif
*/
Tizen::Base::Collection::IList* GetTouchInfoListN(void) const;
/**
- * @if OSPDEPREC
- * Gets the list of the multi-point touch positions relative to the specified control, each represented by TouchInfo.
+ * @if OSPDEPREC
+ * Gets the list of multi-point touch positions relative to the specified control, each represented by TouchInfo.
*
* @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated because the %Touch class is not supported any more. Instead, use the Tizen::Ui::TouchEventManager::GetTouchInfoListN() method.
* @since 2.0
*
- * @return A list of the TouchInfo instances
+ * @return The list of TouchInfo instances
* @param[in] control The source object for calculating the coordinates
- * @see Tizen::Ui::TouchInfo
- * @endif
+ * @endif
*/
Tizen::Base::Collection::IList* GetTouchInfoListN(const Tizen::Ui::Control& control) const;
/**
- * @if OSPDEPREC
+ * @if OSPDEPREC
* Gets the count of the multi-point touches.
*
* @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated because the %Touch class is not supported any more. Instead, get the count of Tizen::Ui::TouchEventManager::GetTouchInfoListN() method.
* @since 2.0
*
- * @return The number of the multi-point touches
- * @endif
+ * @return The number of multi-point touches
+ * @endif
*/
int GetPointCount(void) const;
/**
- * @if OSPDEPREC
+ * @if OSPDEPREC
* Gets the point ID at the given index.
*
* @brief <i> [Deprecated] </i>
- * @deprecated This method is deprecated because the %Touch class is not supported any more.
+ * @deprecated This method is deprecated because the %Touch class is not supported any more.
* Instead, get the Tizen::Ui::TouchEventManager::GetTouchInfoListN() method and use the Tizen::Ui::TouchEventInfo::GetPointId() method.
* @since 2.0
*
* @return The touch point ID
* @param[in] index The index of the touch
- * @endif
+ * @endif
*/
unsigned long GetPointId(int index) const;
/**
* @class TouchEffect
- * @brief This class is used for TouchEffect feature.
+ * @brief This class is used for the %TouchEffect feature.
* @since 2.2
*
*
*
* }
* @endcode
- * @n
+ *
*/
class _OSP_EXPORT_ TouchEffect
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, @n
- * the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.2
*/
* @since 2.2
*
* @return An error code
- * @param[in] type The type of touch for which effect is to be played e.g. SIP, TAP
+ * @param[in] type The type of touch for which the effect is to be played e.g. SIP, TAP
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
* @exception E_INVALID_ARG The specified @c type is invalid.
/**
* @file FUiTouchEffectTypes.h
-* @brief This is the header file for the types of TouchEffect classes.
+* @brief This is the header file for the types of %TouchEffect classes.
*
* This header file contains the common things required for TouchEffect classes and its associated classes.
*/
TOUCH_DOUBLE_PRESSED, /**< The touch double pressed event type */
TOUCH_FOCUS_IN, /**< The touch focus-in event type */
TOUCH_FOCUS_OUT, /**< The touch focus-out event type */
- TOUCH_CANCELED, /**< The touch canceled event type */
+ TOUCH_CANCELED, /**< The touch cancelled event type */
};
/**
class _TouchEventManagerImpl;
/**
* @class TouchEventManager
- * @brief This class stores the information of each touch events.
+ * @brief This class stores the information of each touch event.
*
* @since 2.0
*
{
public:
/**
- * Gets the instance of %TouchEventManager.
+ * Gets a pointer to the %TouchEventManager instance.
*
* @since 2.0
- * @return An instance of %TouchEventManager
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @remarks This method provides a global point of access to the TouchEventManager. The specific error code can be accessed using the
- * GetLastResult() method.
+ * @return The pointer to the %TouchEventManager instance
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @remarks
+ * - This method provides a global point of access to the TouchEventManager.
+ * - The specific error code can be accessed using the GetLastResult() method.
*/
static TouchEventManager* GetInstance(void);
/**
- * Gets the list of the multi-point touches, each represented by TouchEventInfo.
+ * Gets the list of multi-point touches, each represented by TouchEventInfo.
*
* @since 2.0
- * @return A list of TouchEventInfo
- * @see Tizen::Ui::TouchEventInfo
+ * @return The list of TouchEventInfo
*
*/
Tizen::Base::Collection::IListT<TouchEventInfo*>* GetTouchInfoListN(void) const;
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
result Construct(void);
/**
- * Adds the ITouchFlickGestureEventListener instance to the flick gesture detector instance. @n
+ * Adds an ITouchFlickGestureEventListener instance to the flick gesture detector instance. @n
* The added listener gets notified when a gesture is recognized.
*
* @since 2.0
result AddFlickGestureEventListener(Tizen::Ui::ITouchFlickGestureEventListener& listener);
/**
- * Removes the IFlickGestureEventListener instance from the flick gesture detector instance.
+ * Removes an IFlickGestureEventListener instance from the flick gesture detector instance.
*
* @since 2.0
*
result RemoveFlickGestureEventListener(Tizen::Ui::ITouchFlickGestureEventListener& listener);
/**
- * Gets the distance of flick.
+ * Gets the distance of the flick.
*
* @since 2.0
*
* @return An error code
- * @param[out] xDistance The distance in x direction
- * @param[out] yDistance The distance in y direction
+ * @param[out] xDistance The distance in x direction, @n
+ * else @c -1 if an error occurs
+ * @param[out] yDistance The distance in y direction, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns the x distance of -1 and the y distance of -1.
*/
result GetDistance(int& xDistance, int& yDistance) const;
/**
- * Gets the distance of flick.
+ * Gets the distance of the flick.
*
* @since 2.1
*
* @return An error code
- * @param[out] xDistance The distance in x direction
- * @param[out] yDistance The distance in y direction
+ * @param[out] xDistance The distance in x direction, @n
+ * else @c -1 if an error occurs
+ * @param[out] yDistance The distance in y direction, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns the x distance of -1 and the y distance of -1.
*/
result GetDistance(float& xDistance, float& yDistance) const;
/**
- * Gets the duration of flick.
+ * Gets the duration of the flick.
*
* @since 2.0
*
- * @return The duration of flick
+ * @return The duration of the flick, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns @c -1.
*/
int GetDuration(void) const;
/**
- * Gets the direction of flick.
+ * Gets the direction of the flick.
*
* @since 2.0
*
- * @return The direction of flick
+ * @return The direction of the flick, @n
+ * else @c FLICK_DIRECTION_NONE if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns FLICK_DIRECTION_NONE.
*/
Tizen::Ui::FlickDirection GetDirection(void) const;
private:
enum TouchGestureDetectorState
{
GESTURE_DETECTOR_STATE_READY, /**< The gesture detector is ready to recognize the gesture */
- GESTURE_DETECTOR_STATE_STARTED, /**< The gesture detector first recognizes the continuous gesture */
- GESTURE_DETECTOR_STATE_CHANGED, /**< A subsequent change happens to the continuous gesture */
- GESTURE_DETECTOR_STATE_FINISHED, /**< The discrete gesture is recognized or the continuous gesture ends */
- GESTURE_DETECTOR_STATE_FAILED, /**< The gesture detector fails in recognizing the gesture */
+ GESTURE_DETECTOR_STATE_STARTED, /**< The gesture detector first recognizes the continuous gesture */
+ GESTURE_DETECTOR_STATE_CHANGED, /**< A subsequent change happens to the continuous gesture */
+ GESTURE_DETECTOR_STATE_FINISHED, /**< The discrete gesture is recognized or the continuous gesture ends */
+ GESTURE_DETECTOR_STATE_FAILED, /**< The gesture detector fails in recognizing the gesture */
};
class Control;
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
result Construct(void);
/**
- * Gets the control to which the gesture detector is attached. @n
- * If an error occurs, this method returns @c null.
+ * Gets the control to which the gesture detector is attached.
*
* @since 2.0
*
- * @return The control to which the gesture detector is attached
+ * @return The control to which the gesture detector is attached, @n
+ * else @c null if an error occurs
* @exception E_SUCCESS The method is successful.
*/
Control* GetControl(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] enable Whether to delay events
+ * @param[in] enable The boolean value that indicates whether to delay events
* @exception E_SUCCESS The method is successful.
* @see IsDelayTouchEventEnabled()
* @see SetCancelTouchEventOnSuccessEnabled()
bool IsDelayTouchEventEnabled(void) const;
/**
- * Enables or disables canceling touch event after a gesture is recognized. @n
- * If canceling touch event is enabled and a gesture is recognized, touch events which have been queued are not delivered to a UI control and discarded.
+ * Enables or disables cancelling touch event after a gesture is recognized. @n
+ * If cancelling touch event is enabled and a gesture is recognized, touch events which have been queued are not delivered to a UI control and discarded.
* The default value is @c false.
*
* @since 2.0
*
* @return An error code
- * @param[in] enable Whether to cancel touch event
+ * @param[in] enable The boolean value that indicates whether to cancel a touch event
* @exception E_SUCCESS The method is successful.
* @see IsCancelTouchEventOnSuccessEnabled()
* @see SetDelayTouchEventEnabled()
result SetCancelTouchEventOnSuccessEnabled(bool enable);
/**
- * Checks whether touch events are canceled after a gesture is recognized.
+ * Checks whether touch events are cancelled after a gesture is recognized.
*
* @since 2.0
*
- * @return @c true if canceling touch event is enabled, @n
+ * @return @c true if cancelling a touch event is enabled, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* @see SetCancelTouchEventOnSuccessEnabled()
* @since 2.0
*
* @return An error code
- * @param[in] gestureDetector The gesture detector
+ * @param[in] gestureDetector The gesture detector
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c gestureDetector is invalid.
- * @remarks If you want to set relationship between gesture detectors, call this method.
- * If @c gestureDetector fails in recognizing a gesture, the gesture detector which waits for it starts the processing of recognizing.
- * If @c gestureDetector succeeds in recognizing a gesture,
- * the state of the gesture detector which waits for it changes to @c GESTURE_DETECTOR_STATE_FAIL.
+ * @remarks
+ * - If you want to set relationship between gesture detectors, call this method.
+ * - If @c gestureDetector fails in recognizing a gesture, the gesture detector which waits for it starts the processing of recognizing.
+ * - If @c gestureDetector succeeds in recognizing a gesture,
+ * the state of the gesture detector which waits for it changes to @c GESTURE_DETECTOR_STATE_FAIL.
*/
result StartOnFailureOf(const TouchGestureDetector& gestureDetector);
* @return An error code
* @param[in] pGestureDetector A pointer of gesture detector
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The @c pGestureDetector is null.
- * @remarks If you want to set relationship between gesture detectors, call this method.
- * If @c gestureDetector fails in recognizing a gesture, the gesture detector which waits for it starts the processing of recognizing.
- * If @c gestureDetector succeeds in recognizing a gesture,
- * the state of the gesture detector which waits for it changes to @c GESTURE_DETECTOR_STATE_FAIL.
+ * @exception E_INVALID_ARG The @c pGestureDetector is @c null.
+ * @remarks
+ * - If you want to set relationship between gesture detectors, call this method.
+ * - If @c gestureDetector fails in recognizing a gesture, the gesture detector which waits for it starts the processing of recognizing.
+ * - If @c gestureDetector succeeds in recognizing a gesture,
+ * the state of the gesture detector which waits for it changes to @c GESTURE_DETECTOR_STATE_FAIL.
*/
result StartOnFailureOf(TouchGestureDetector* pGestureDetector);
virtual void OnTouchReleased(Tizen::Ui::Control& source, const Tizen::Ui::TouchEventInfo& touchInfo);
/**
- * Called when touch is canceled in the Control to which the gesture detector is attached.
+ * Called when touch is cancelled in the Control to which the gesture detector is attached.
*
* @since 2.0
*
protected:
/**
- * Sets the current state of gesture detector. @n
+ * Sets the current state of the gesture detector. @n
* You can call this method only inherit %TouchGestureDetector directly.
*
* @since 2.0
*
* @return An error code
- * @param[in] state Gesture detector state
+ * @param[in] state The gesture detector state
* @exception E_SUCCESS The method is successful.
* @see GetDetectorState()
*/
result SetDetectorState(Tizen::Ui::TouchGestureDetectorState state);
/**
- * Gets the current state of gesture detector. @n
- * If an error occurs, this method returns @c GESTURE_DETECTOR_STATE_READY.
+ * Gets the current state of the gesture detector.
*
* @since 2.0
*
- * @return The current state of gesture detector
+ * @return The current state of gesture detector, @n
+ * else @c GESTURE_DETECTOR_STATE_READY if an error occurs
* @exception E_SUCCESS The method is successful.
* @see SetDetectorState()
*/
Tizen::Ui::TouchGestureDetectorState GetDetectorState(void) const;
/**
- * Adds the IGestureEventListener instance to the gesture detector instance. @n
+ * Adds an IGestureEventListener instance to the gesture detector instance. @n
* The added listener gets notified when a gesture is recognized.
*
* @since 2.0
* @return An error code
* @param[in] listener The event listener to add
* @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_ALREADY_EXIST The listener is already added.
+ * @exception E_OBJ_ALREADY_EXIST The listener is already added.
* @see RemoveGestureEventListener()
*/
result AddGestureEventListener(Tizen::Ui::ITouchGestureEventListener& listener);
/**
- * Removes the gesture listener instance.
+ * Removes a gesture listener instance.
*
* @since 2.0
*
*
* @final This class is not intended for extension.
*
- * The %TouchLongPressGestureDetector class supports changing conditions of long press gesture, and provides information about long press gesture detector.
+ * The %TouchLongPressGestureDetector class supports the changing conditions of the long press gesture, and provides information about the long press gesture detector.
*
*/
class _OSP_EXPORT_ TouchLongPressGestureDetector
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
result Construct(void);
/**
- * Adds the ITouchLongPressGestureEventListener instance to the long press gesture detector instance. @n
+ * Adds an ITouchLongPressGestureEventListener instance to the long press gesture detector instance. @n
* The added listener gets notified when a gesture is recognized.
*
* @since 2.0
result AddLongPressGestureEventListener(Tizen::Ui::ITouchLongPressGestureEventListener& listener);
/**
- * Removes the ITouchLongPressGestureEventListener instance from the long press gesture detector instance.
+ * Removes an ITouchLongPressGestureEventListener instance from the long press gesture detector instance.
*
* @since 2.0
*
result RemoveLongPressGestureEventListener(Tizen::Ui::ITouchLongPressGestureEventListener& listener);
/**
- * Sets the duration needed for the recognition of long press gesture.
+ * Sets the duration needed for the recognition of the long press gesture.
*
* @since 2.0
*
result SetDuration(int duration);
/**
- * Gets the duration needed for the recognition of long press gesture.
+ * Gets the duration needed for the recognition of the long press gesture.
*
* @since 2.0
*
- * @return The time duration
+ * @return The time duration, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns @c -1.
* @see SetDuration()
*/
int GetDuration(void) const;
/**
- * Sets the allowed displacement of touch move for the recognition of long press gesture.
+ * Sets the allowed displacement of touch move for the recognition of the long press gesture.
*
* @since 2.0
*
- * @param[in] allowance The allowed move displacement
+ * @param[in] allowance The allowed move displacement @n
+ * The default allowance is @c 10.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c allowance is less than @c 0.
* @remarks The long press gesture is recognized when touch is pressed and moved within the given allowed displacement from the first touch point for the given duration.
- * The default allowance is @c 10.
* @see GetMoveAllowance()
*
*/
*
* @since 2.1
*
- * @param[in] allowance The allowed move displacement
+ * @param[in] allowance The allowed move displacement @n
+ * The default allowance is @c 10.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c allowance is less than @c 0.
* @remarks The long press gesture is recognized when touch is pressed and moved within the given allowed displacement from the first touch point for the given duration.
- * The default allowance is @c 10.
* @see GetMoveAllowance()
*
*/
*
* @since 2.0
*
- * @return The allowed move bounds
+ * @return The allowed move bounds, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns @c -1.
* @see SetMoveAllowance()
*
*/
*
* @since 2.1
*
- * @return The allowed move bounds
+ * @return The allowed move bounds, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns @c -1.
* @see SetMoveAllowance()
*
*/
float GetMoveAllowanceF(void) const;
/**
- * Sets the finger count for the recognition of long press gesture at the same time.
+ * Sets the finger count for the recognition of the long press gesture at the same time.
*
* @since 2.0
*
- * @param[in] count The finger count for long press gesture
+ * @param[in] count The finger count for the long press gesture
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c count is less than @c 0.
- * @remarks The default value is @c 1.
- * It is recommended to check the maximum touch count of a device before changing the touch count of a gesture detector.
- * You can set the gesture touch count to more than the maximum device touch count, but the gesture recognition may not work as you expected.
+ * @remarks
+ * - The default value is @c 1.
+ * It is recommended to check the maximum touch count of a device before changing the touch count of a gesture detector.
+ * - You can set the gesture touch count to more than the maximum device touch count, but the gesture recognition may not work as you expected.
* @see GetTouchCount()
*
*/
result SetTouchCount(int count);
/**
- * Gets the finger count for the recognition of long press gesture at the same time.
+ * Gets the finger count for the recognition of the long press gesture at the same time.
*
* @since 2.0
*
- * @return The finger count for long press gesture
+ * @return The finger count for the long press gesture, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns @c -1.
* @see GetTouchCount()
*
*/
*
* @final This class is not intended for extension.
*
- * The %TouchPanningGestureDetector class supports changing condition of panning gesture, and provides information about panning gesture detector.
+ * The %TouchPanningGestureDetector class supports the changing condition of the panning gesture, and provides information about the panning gesture detector.
*
*/
class _OSP_EXPORT_ TouchPanningGestureDetector
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
* Initializes this instance of %TouchPanningGestureDetector.
*
* @since 2.0
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result Construct(void);
/**
- * Adds the ITouchPanningGestureEventListener instance to the panning gesture detector instance. @n
+ * Adds an ITouchPanningGestureEventListener instance to the panning gesture detector instance. @n
* The added listener gets notified when a gesture is recognized.
*
* @since 2.0
result AddPanningGestureEventListener(Tizen::Ui::ITouchPanningGestureEventListener& listener);
/**
- * Removes the ITouchPanningGestureEventListener instance from the panning gesture detector instance.
+ * Removes an ITouchPanningGestureEventListener instance from the panning gesture detector instance.
*
* @since 2.0
*
*
* @since 2.0
*
- * @return A list of the TouchInfo
+ * @return The list of the TouchInfo, @n
+ * else @c null if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns @c null.
- * @see Tizen::Ui::TouchInfo
*/
Tizen::Base::Collection::IList* GetTouchInfoListN(void) const;
/**
- * Sets the finger count for the recognition of panning gesture at the same time.
+ * Sets the finger count for the recognition of the panning gesture at the same time.
*
* @since 2.0
*
- * @param[in] count The finger count for panning gesture
+ * @param[in] count The finger count for the panning gesture
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c count is less than @c 0.
- * @remarks The default value is @c 1.
- * It is recommended to check the maximum touch count of a device before changing the touch count of a gesture detector.
- * You can set the gesture touch count to more than the maximum device touch count, but the gesture recognition may not work as you expected.
+ * @remarks
+ * - The default value is @c 1.
+ * It is recommended to check the maximum touch count of a device before changing the touch count of a gesture detector.
+ * - You can set the gesture touch count to more than the maximum device touch count, but the gesture recognition may not work as you expected.
* @see GetTouchCount()
*
*/
result SetTouchCount(int count);
/**
- * Gets the finger count for the recognition of panning gesture at the same time.
+ * Gets the finger count for the recognition of the panning gesture at the same time.
*
* @since 2.0
*
- * @return The finger count for panning gesture
+ * @return The finger count for the panning gesture, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns @c -1.
* @see SetTouchCount()
*
*/
*
* @final This class is not intended for extension.
*
- * The %TouchPinchGestureDetector class provides information about pinch gesture detector.
+ * The %TouchPinchGestureDetector class provides information about a pinch gesture detector.
*
*/
class _OSP_EXPORT_ TouchPinchGestureDetector
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
/**
- * Adds the ITouchPinchGestureEventListener instance to the pinch gesture detector instance. @n
+ * Adds an ITouchPinchGestureEventListener instance to the pinch gesture detector instance. @n
* The added listener gets notified when a gesture is recognized.
*
* @since 2.0
result AddPinchGestureEventListener(Tizen::Ui::ITouchPinchGestureEventListener& listener);
/**
- * Removes the ITouchPinchGestureEventListener instance from the pinch gesture detector instance.
+ * Removes an ITouchPinchGestureEventListener instance from the pinch gesture detector instance.
*
* @since 2.0
*
*
* @since 2.0
*
- * @return The center point
+ * @return The center point, @n
+ * else Point(-1, -1) if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns Point(-1, -1).
*/
Tizen::Graphics::Point GetCenterPoint(void) const;
*
* @since 2.1
*
- * @return The center point
+ * @return The center point, @n
+ * else Point(-1, -1) if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns Point(-1, -1).
*/
Tizen::Graphics::FloatPoint GetCenterPointF(void) const;
/**
- * Gets the scale factor among touched points.
+ * Gets the scale factor among the touched points.
*
* @since 2.0
*
- * @return The scale factor among touched points
+ * @return The scale factor among the touched points
* @remarks Gets the scale factor for a pinch gesture in progress.
*/
int GetScale(void) const;
/**
- * Gets the scale factor among touched point
+ * Gets the scale factor among the touched points.
*
* @since 2.1
*
- * @return The scale factor among touched points
+ * @return The scale factor among the touched points
* @remarks Gets the scale factor for a pinch gesture in progress.
*/
float GetScaleF(void) const;
*
* @final This class is not intended for extension.
*
- * The %TouchRotationGestureDetector class provides information about rotation gesture detector.
+ * The %TouchRotationGestureDetector class provides information about a rotation gesture detector.
*
*/
class _OSP_EXPORT_ TouchRotationGestureDetector
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
result Construct(void);
/**
- * Adds the ITouchRotationGestureEventListener instance to the rotation gesture detector instance. @n
+ * Adds an ITouchRotationGestureEventListener instance to the rotation gesture detector instance. @n
* The added listener gets notified when a gesture is recognized.
*
* @since 2.0
result AddRotationGestureEventListener(Tizen::Ui::ITouchRotationGestureEventListener& listener);
/**
- * Removes the ITouchRotationGestureEventListener instance from the rotation gesture detector instance.
+ * Removes an ITouchRotationGestureEventListener instance from the rotation gesture detector instance.
*
* @since 2.0
*
*
* @since 2.0
*
- * @return The angle between two touch points
+ * @return The angle between two touch points, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns @c -1.
*/
float GetAngle(void) const;
*
* @since 2.0
*
- * @return The distance between two touch points
+ * @return The distance between two touch points, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns @c -1.
*/
int GetDistance(void) const;
*
* @since 2.1
*
- * @return The distance between two touch points
+ * @return The distance between two touch points, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns @c -1.
*/
float GetDistanceF(void) const;
*
* @final This class is not intended for extension.
*
- * The %TouchTapGestureDetector class supports changing conditions of tap gesture, and provides information about tap gesture detector.
+ * The %TouchTapGestureDetector class supports the changing conditions of the tap gesture, and provides information about tap gesture detector.
*
*/
class _OSP_EXPORT_ TouchTapGestureDetector
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
result Construct(void);
/**
- * Adds the ITouchTapGestureEventListener instance to the tap gesture detector instance. @n
+ * Adds an ITouchTapGestureEventListener instance to the tap gesture detector instance. @n
* The added listener gets notified when a gesture is recognized.
*
* @since 2.0
result AddTapGestureEventListener(Tizen::Ui::ITouchTapGestureEventListener& listener);
/**
- * Removes the ITouchTapGestureEventListener instance from the tap gesture detector instance.
+ * Removes an ITouchTapGestureEventListener instance from the tap gesture detector instance.
*
* @since 2.0
*
result RemoveTapGestureEventListener(Tizen::Ui::ITouchTapGestureEventListener& listener);
/**
- * Sets the tap count required for the recognition of tap gesture.
+ * Sets the tap count required for the recognition of the tap gesture.
*
* @since 2.0
*
result SetTapCount(int count);
/**
- * Gets the tap count required for the recognition of tap gesture.
+ * Gets the tap count required for the recognition of the tap gesture.
*
* @since 2.0
*
- * @return The tap count
+ * @return The tap count, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If an error occurs, this method returns @c -1.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetTapCount()
*/
int GetTapCount(void) const;
*
* @since 2.0
*
- * @param[in] interval The time interval between taps
+ * @param[in] interval The time interval between taps
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c interval is less than @c 0.
* @remarks If the interval between touches is longer than @c interval, the sequence of touch actions is not recognized as a tap gesture. The default value is @c 330.
*
* @since 2.0
*
- * @return The time interval between taps
+ * @return The time interval between taps, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If an error occurs, this method returns @c -1.
* @see SetTapInterval()
*/
int GetTapInterval(void) const;
/**
- * Sets the finger count for the recognition of tap gesture at the same time.
+ * Sets the finger count for the recognition of the tap gesture at the same time.
*
* @since 2.0
*
- * @param[in] count The finger count for long press gesture
+ * @param[in] count The finger count for the long press gesture
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c count is less than @c 0.
- * @remarks If the touch count at the same time is less than @c count, the sequence of touch actions is not recognized as a tap gesture. The default value is @c 1. @n
- * It is recommended to check the maximum touch count of a device before changing the touch count of a gesture detector.
- * You can set the gesture touch count to more than the maximum device touch count, but the gesture recognition may not work as you expected.
+ * @remarks
+ * - If the touch count at the same time is less than @c count, the sequence of touch actions is not recognized as a tap gesture. The default value is @c 1. @n
+ * It is recommended to check the maximum touch count of a device before changing the touch count of a gesture detector.
+ * - You can set the gesture touch count to more than the maximum device touch count, but the gesture recognition may not work as you expected.
* @see GetTouchCount()
*
*/
result SetTouchCount(int count);
/**
- * Gets the finger count for the recognition of tap gesture at the same time.
+ * Gets the finger count for the recognition of the tap gesture at the same time.
*
* @since 2.0
*
- * @return The finger count for tap gesture
+ * @return The finger count for the tap gesture, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If an error occurs, this method returns @c -1.
* @see GetTouchCount()
*
*/
int GetTouchCount(void) const;
/**
- * Sets the allowed displacement between touches for the recognition of tap gesture.
+ * Sets the allowed displacement between touches for the recognition of the tap gesture.
*
* @since 2.0
*
* @param[in] allowance The allowed displacement between touches
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c allowance is less than @c 0.
- * @exception E_INVALID_CONDITION %Touch count is more than @c 2.
- * @remarks The tap gesture is recognized when touches are pressed within the given allowed displacement from the first touch point. The default allowance is @c 10. @n
- * MoveAllowance is effective only when touch count is @c 1. If touch count is more than 1, MoveAllowance is ignored.
+ * @exception E_INVALID_CONDITION Touch count is more than @c 2.
+ * @remarks
+ * - The tap gesture is recognized when touches are pressed within the given allowed displacement from the first touch point. The default allowance is @c 10. @n
+ * - MoveAllowance is effective only when touch count is @c 1. If touch count is more than @c 1, MoveAllowance is ignored.
* @see GetMoveAllowance()
*
*/
result SetMoveAllowance(int allowance);
/**
- * Sets the allowed displacement between touches for the recognition of tap gesture.
+ * Sets the allowed displacement between touches for the recognition of the tap gesture.
*
* @since 2.1
*
* @param[in] allowance The allowed displacement between touches
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c allowance is less than @c 0.
- * @exception E_INVALID_CONDITION %Touch count is more than @c 2.
- * @remarks The tap gesture is recognized when touches are pressed within the given allowed displacement from the first touch point. The default allowance is @c 10. @n
- * MoveAllowance is effective only when touch count is @c 1. If touch count is more than 1, MoveAllowance is ignored.
+ * @exception E_INVALID_CONDITION Touch count is more than @c 2.
+ * @remarks
+ * - The tap gesture is recognized when touches are pressed within the given allowed displacement from the first touch point. The default allowance is @c 10. @n
+ * - MoveAllowance is effective only when touch count is @c 1. If touch count is more than 1, MoveAllowance is ignored.
* @see GetMoveAllowance()
*
*/
*
* @since 2.0
*
- * @return The allowed displacement between touches
+ * @return The allowed displacement between touches, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns @c -1.
* @see SetMoveAllowance()
*/
int GetMoveAllowance(void) const;
*
* @since 2.1
*
- * @return The allowed displacement between touches
+ * @return The allowed displacement between touches, @n
+ * else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
- * @remarks If an error occurs, this method returns @c -1.
* @see SetMoveAllowance()
*/
float GetMoveAllowanceF(void) const;
* Sets an empty string if you want to reset
* @exception E_SUCCESS The method is successful.
* @exception E_FILE_NOT_FOUND The specified font cannot be found or accessed.
- * @remarks At First, the value of fontName is considered app font name if it matches one of the face names of the font files which is located in '/res/font'.
- * If not, the value of fontName is considered system font name if it matches one of the retrieved values using GetSystemFontListN().
- * @remarks The control first attempt to find the control font. If it fails, then it searches for the application default font and the system font, in sequence.
+ * @remarks
+ * - At First, the value of fontName is considered as the app font name if it matches one of the face names of the font files which is located in '/res/font'.
+ * If not, the value of fontName is considered as the system font name if it matches one of the retrieved values using GetSystemFontListN().
+ * - The control first attempt to find the control font. If it fails, then it searches for the application default font and the system font, in sequence.
* @see GetDefaultFont()
*/
static result SetDefaultFont(const Tizen::Base::String& fontName);
*
* @return An error code
* @param[in] fileName The file name of a font-resource located in @b '/res/font', @n
- * else sets an empty string to reset
- * @exception E_SUCCESS The method is successful.
+ * else sets an empty string to reset
+ * @exception E_SUCCESS The method is successful.
* @exception E_FILE_NOT_FOUND The specified font cannot be found or accessed.
- * @exception E_UNSUPPORTED_FORMAT The specified font format is not supported.
+ * @exception E_UNSUPPORTED_FORMAT The specified font format is not supported.
* @see GetDefaultFontFile()
*/
static result SetDefaultFontFromFile(const Tizen::Base::String& fileName);
/**
- * Gets a font file name of the control.
+ * Gets the font file name of the control.
*
* @since 2.1
*
*
* @since 2.1
*
- * @return An actual font size of given font size string
+ * @return The actual font size of the given font size string
* @param[in] sizeString The predefined string value, such as "giant", "huge", "large", "medium", or "small" @n
- * It is case-insensitive and can be retrieved using Tizen::System::SettingInfo::GetValue().
- * @remarks If the specified @c sizeString is not defined, @c -1 is returned.
+ * It is case-insensitive and can be retrieved using Tizen::System::SettingInfo::GetValue().
+ * @remarks If the specified @c sizeString is not defined, @c -1 is returned.
*/
static float GetFontSize(const Tizen::Base::String& sizeString);
/**
* @struct ColorKey
- * @brief This struct provides the color keys of controls.
+ * @brief This struct provides the color keys of controls.
*
* @since 2.1
*
{
/**
* @struct Button
- * @brief This struct provides the color keys of %Button.
+ * @brief This struct provides the color keys of %Button.
*
* @since 2.1
*
/**
* @struct ColorPicker
- * @brief This struct provides the color keys of %ColorPicker.
+ * @brief This struct provides the color keys of %ColorPicker.
*
* @since 2.1
*
_OSP_EXPORT_ static const int ITEM_TEXT_HIGHLIGHTED;
/**
- * The property key to get the diabled text color of the item of context menu.
+ * The property key to get the disabled text color of the item of context menu.
*
* @since 2.2
*/
_OSP_EXPORT_ static const int BG_NORMAL;
/**
- * The property key to get the normal background color of button of date time picker.
+ * The property key to get the normal background color of the button of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int AM_PM_BG_NORMAL;
/**
- * The property key to get the pressed background color of AM/PM button of date time picker.
+ * The property key to get the pressed background color of the AM/PM button of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int AM_PM_BG_PRESSED;
/**
- * The property key to get the highlighted background color of AM/PM button of date time picker.
+ * The property key to get the highlighted background color of the AM/PM button of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int AM_PM_BG_HIGHLIGHTED;
/**
- * The property key to get the disabled background color of AM/PM button of date time picker.
+ * The property key to get the disabled background color of the AM/PM button of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int TEXT_DISABLED;
/**
- * The property key to get the normal text color of AM/PM button of date time picker.
+ * The property key to get the normal text color of the AM/PM button of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int AM_PM_TEXT_NORMAL;
/**
- * The property key to get the pressed text color of AM/PM button of date time picker.
+ * The property key to get the pressed text color of the AM/PM button of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int AM_PM_TEXT_PRESSED;
/**
- * The property key to get the highlighted text color of AM/PM button of date time picker.
+ * The property key to get the highlighted text color of the AM/PM button of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int AM_PM_TEXT_HIGHLIGHTED;
/**
- * The property key to get the disabled text color of AM/PM button of date time picker.
+ * The property key to get the disabled text color of the AM/PM button of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int DIVIDER_RIGHT_HALF;
/**
- * The property key to get the normal background color of the picker button of date time picker
+ * The property key to get the normal background color of the picker button of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int CONTENT_BG_NORMAL;
/**
- * The property key to get the pressed background color of the picker button of date time picker
+ * The property key to get the pressed background color of the picker button of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int CONTENT_BG_PRESSED;
/**
- * The property key to get the disabled background color of the picker button of date time picker
+ * The property key to get the disabled background color of the picker button of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int CONTENT_BG_DISABLED;
/**
- * The property key to get the highlighted background color of the picker button of date time picker
+ * The property key to get the highlighted background color of the picker button of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int CONTENT_BG_HIGHLIGHTED;
/**
- * The property key to get the display area background color of date time picker
+ * The property key to get the display area background color of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int DISPLAY_BG_NORMAL;
/**
- * The property key to get the normal title color of date time picker
+ * The property key to get the normal title color of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int TITLE_NORMAL;
/**
- * The property key to get the disabled title color of date time picker
+ * The property key to get the disabled title color of date time picker.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int TITLE_TEXT_DISABLED;
/**
- * The property key to get the normal background color of the picker button of edit date
+ * The property key to get the normal background color of the picker button of edit date.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int CONTENT_BG_NORMAL;
/**
- * The property key to get the pressed background color of the picker button of edit date
+ * The property key to get the pressed background color of the picker button of edit date.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int CONTENT_BG_PRESSED;
/**
- * The property key to get the disabled background color of the picker button of edit date
+ * The property key to get the disabled background color of the picker button of edit date.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int CONTENT_BG_DISABLED;
/**
- * The property key to get the highlighted background color of the picker button of edit date
+ * The property key to get the highlighted background color of the picker button of edit date.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int TITLE_TEXT_DISABLED;
/**
- * The property key to get the highlighted text color of the button of edit time
+ * The property key to get the highlighted text color of the button of edit time.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BUTTON_BG_HIGHLIGHTED;
/**
- * The property key to get the normal background color of the picker button of edit time
+ * The property key to get the normal background color of the picker button of edit time.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int CONTENT_BG_NORMAL;
/**
- * The property key to get the pressed background color of the picker button of edit time
+ * The property key to get the pressed background color of the picker button of edit time.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int CONTENT_BG_PRESSED;
/**
- * The property key to get the disabled background color of the picker button of edit time
+ * The property key to get the disabled background color of the picker button of edit time.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int CONTENT_BG_DISABLED;
/**
- * The property key to get the highlighted background color of the picker button of edit time
+ * The property key to get the highlighted background color of the picker button of edit time.
*
* @since 2.1
*/
/**
* @struct Footer
- * @brief This struct provides the color keys of %Footer.
+ * @brief This struct provides the color keys of %Footer.
*
* @since 2.1
*
/**
* @struct Form
- * @brief This struct provides the color keys of %Form.
+ * @brief This struct provides the color keys of %Form.
*
* @since 2.1
*
/**
* @struct Gallery
- * @brief This struct provides the color keys of %Gallery.
+ * @brief This struct provides the color keys of %Gallery.
*
* @since 2.1
*
_OSP_EXPORT_ static const int TITLE_TEXT_NORMAL;
/**
- * The property key to get the color of the title text of translucent style of header.
+ * The property key to get the color of the title text of the translucent style of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_TEXT_SELECTED;
/**
- * The property key to get the normal background color of badge icon of header.
+ * The property key to get the normal background color of the badge icon of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BADGE_ICON_BG_NORMAL;
/**
- * The property key to get the disabled background color of badge icon of header.
+ * The property key to get the disabled background color of the badge icon of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BADGE_ICON_BG_DISABLED;
/**
- * The property key to get the pressed background color of badge icon of header.
+ * The property key to get the pressed background color of the badge icon of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BADGE_ICON_BG_PRESSED;
/**
- * The property key to get the highlighted background color of badge icon of header.
+ * The property key to get the highlighted background color of the badge icon of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BADGE_ICON_BG_HIGHLIGHTED;
/**
- * The property key to get the normal text color of badge icon of header.
+ * The property key to get the normal text color of the badge icon of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BADGE_ICON_TEXT_NORMAL;
/**
- * The property key to get the disabled text color of badge icon of header.
+ * The property key to get the disabled text color of the badge icon of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BADGE_ICON_TEXT_DISABLED;
/**
- * The property key to get the pressed text color of badge icon of header.
+ * The property key to get the pressed text color of the badge icon of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BADGE_ICON_TEXT_PRESSED;
/**
- * The property key to get the highlighted text color of badge icon of header.
+ * The property key to get the highlighted text color of the badge icon of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BADGE_ICON_TEXT_HIGHLIGHTED;
- /**
+ /**
* The property key to get the color of the left divider line of header.
*
* @since 2.1
_OSP_EXPORT_ static const int BUTTON_ITEM_BG_HIGHLIGHTED;
/**
- * The property key to get the normal background color of the button item of the translucent style of header
+ * The property key to get the normal background color of the button item of the translucent style of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_BG_NORMAL;
/**
- * The property key to get the disabled background color of the button item of the translucent style of header
+ * The property key to get the disabled background color of the button item of the translucent style of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_BG_DISABLED;
/**
- * The property key to get the pressed background color of the button item of the translucent style of header
+ * The property key to get the pressed background color of the button item of the translucent style of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_BG_PRESSED;
/**
- * The property key to get the highlighted background color of the button item of the translucent style of header
+ * The property key to get the highlighted background color of the button item of the translucent style of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED;
/**
- * The property key to get the normal text color of the button item of header
+ * The property key to get the normal text color of the button item of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BUTTON_ITEM_TEXT_NORMAL;
/**
- * The property key to get the disabled text color of the button item of header
+ * The property key to get the disabled text color of the button item of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BUTTON_ITEM_TEXT_DISABLED;
/**
- * The property key to get the pressed text color of the button item of header
+ * The property key to get the pressed text color of the button item of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BUTTON_ITEM_TEXT_PRESSED;
/**
- * The property key to get the highlighted text color of the button item of header
+ * The property key to get the highlighted text color of the button item of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BUTTON_ITEM_TEXT_HIGHLIGHTED;
/**
- * The property key to get the normal text color of the button item of the translucent style of header
+ * The property key to get the normal text color of the button item of the translucent style of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL;
/**
- * The property key to get the disabled text color of the button item of the translucent style of header
+ * The property key to get the disabled text color of the button item of the translucent style of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED;
/**
- * The property key to get the pressed text color of the button item of the translucent style of header
+ * The property key to get the pressed text color of the button item of the translucent style of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED;
/**
- * The property key to get the highlighted text color of the button item of the translucent style of header
+ * The property key to get the highlighted text color of the button item of the translucent style of header.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int INNER_TEXT_HIGHLIGHTED;
/**
- * The property key to get the background color of inner text area of icon list.
+ * The property key to get the background color of the inner text area of icon list.
*
* @since 2.1
*/
/**
* @struct InputPad
- * @brief This struct provides the color keys of %InputPad.
+ * @brief This struct provides the color keys of %InputPad.
*
* @since 2.1
*
/**
* @struct Label
- * @brief This struct provides the color keys of %Label.
+ * @brief This struct provides the color keys of %Label.
*
* @since 2.1
*
/**
* @struct MessageBox
- * @brief This struct provides the color keys of %MessageBox.
+ * @brief This struct provides the color keys of %MessageBox.
*
* @since 2.1
*
/**
* @struct OptionMenu
- * @brief This struct provides the color keys of %OptionMenu.
+ * @brief This struct provides the color keys of %OptionMenu.
*
* @since 2.1
*
/**
* @struct Panel
- * @brief This struct provides the color keys of %Panel.
+ * @brief This struct provides the color keys of %Panel.
*
* @since 2.1
*
/**
* @struct Popup
- * @brief This struct provides the color keys of %Popup.
+ * @brief This struct provides the color keys of %Popup.
*
* @since 2.1
*
/**
* @struct Progress
- * @brief This struct provides the color keys of %Progress.
+ * @brief This struct provides the color keys of %Progress.
*
* @since 2.1
*
/**
* @struct Scroll
- * @brief This struct provides the color keys of %Scroll.
+ * @brief This struct provides the color keys of %Scroll.
*
* @since 2.1
*
_OSP_EXPORT_ static const int JUMP_TO_TOP_PRESSED;
/**
- * The property key to get the normal background color of the button of scroll
+ * The property key to get the normal background color of the button of scroll.
*
* @since 2.1
*/
/**
* @struct Slider
- * @brief This struct provides the color keys of %Slider.
+ * @brief This struct provides the color keys of %Slider.
*
* @since 2.1
*
/**
* @struct SplitPanel
- * @brief This struct provides the color keys of %SplitPanel.
+ * @brief This struct provides the color keys of %SplitPanel.
*
* @since 2.1
*
/**
* @struct TableView
- * @brief This struct provides the color keys of %TableView.
+ * @brief This struct provides the color keys of %TableView.
*
* @since 2.1
*
_OSP_EXPORT_ static const int BG_NORMAL;
/**
- * The property key to get the color of top divider of table view.
+ * The property key to get the color of the top divider of table view.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int ITEM_DIVIDER_TOP_BG_NORMAL;
/**
- * The property key to get the color of bottom divider of table view.
+ * The property key to get the color of the bottom divider of table view.
*
* @since 2.1
*/
_OSP_EXPORT_ static const int EMPTY_TEXT_NORMAL;
/**
- * The property key to get the normal color of Left Divider of table view.
+ * The property key to get the normal color of the Left Divider of table view.
*
* @since 2.2
*/
_OSP_EXPORT_ static const int ITEM_ANNEX_DIVIDER_LEFT_BG_NORMAL;
/**
- * The property key to get the normal color of Right Divider of table view.
+ * The property key to get the normal color of the Right Divider of table view.
*
* @since 2.2
*/
/**
* @struct TokenEdit
- * @brief This struct provides the color keys of %TokenEdit.
+ * @brief This struct provides the color keys of %TokenEdit.
*
* @since 2.1
*
* @return The @c signed @c int equivalent of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_INT.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_INT.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_INT.
*
*/
int ToInt(void) const;
* @return The @c unsigned @c int equivalent of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_UINT.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_UINT.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_UINT.
*
*/
unsigned int ToUInt(void) const;
* @return The @c bool equivalent of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_BOOL.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns @c false and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_BOOL.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns @c false and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_BOOL.
*
*/
bool ToBool(void) const;
* @return The @c float equivalent of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_FLOAT.
*
*/
float ToFloat(void) const;
* @return The @c double equivalent of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_DOUBLE.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_DOUBLE.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_DOUBLE.
*
*/
double ToDouble(void) const;
* @return The @c signed @c long equivalent of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_LONG.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_LONG.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_LONG.
*
*/
long ToLong(void) const;
* @return The @c unsigned @c long equivalent of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_ULONG.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_ULONG.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_ULONG.
*
*/
unsigned long ToULong(void) const;
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_LONGLONG.
*
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_LONGLONG.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_LONGLONG.
*
*/
long long ToLongLong(void) const;
* @return The @c unsigned @c long @c long equivalent of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_ULONGLONG.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_ULONGLONG.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_ULONGLONG.
*
*/
unsigned long long ToULongLong(void) const;
* @return A Tizen::Base::String representing the value of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_STRING.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns String("") and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_STRING.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns String("") and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_STRING.
*
*/
Tizen::Base::String ToString(void) const;
* @return A Tizen::Base::DateTime representing the value of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_DATETIME.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns DateTime and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_DATETIME.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns DateTime and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_DATETIME.
*
*/
Tizen::Base::DateTime ToDateTime(void) const;
* @return A Tizen::Graphics::Color representing the value of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_COLOR.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns Color and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_COLOR.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns Color and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_COLOR.
*
*/
Tizen::Graphics::Color ToColor(void) const;
* @return A Tizen::Graphics::Point representing the value of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_POINT.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns Point and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_POINT.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns Point and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_POINT.
*
*/
Tizen::Graphics::Point ToPoint(void) const;
* @return A Tizen::Graphics::FloatPoint representing the value of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_POINT.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns FloatPoint and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT_POINT.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns FloatPoint and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_FLOAT_POINT.
*
*/
Tizen::Graphics::FloatPoint ToFloatPoint(void) const;
* @return A Tizen::Graphics::Rectangle representing the value of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_RECTANGLE.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns Rectangle and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_RECTANGLE.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns Rectangle and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_RECTANGLE.
*
*/
Tizen::Graphics::Rectangle ToRectangle(void) const;
* @return A Tizen::Graphics::FloatRectangle representing the value of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_RECTANGLE.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns FloatRectangle and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT_RECTANGLE.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns FloatRectangle and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_FLOAT_RECTANGLE.
*
*/
Tizen::Graphics::FloatRectangle ToFloatRectangle(void) const;
* @return A Tizen::Graphics::Dimension representing the value of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_DIMENSION.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns Dimension and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_DIMENSION.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns Dimension and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_DIMENSION.
*
*/
Tizen::Graphics::Dimension ToDimension(void) const;
* @return A Tizen::Graphics::FloatDimension representing the value of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_DIMENSION.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns FloatDimension and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT_DIMENSION.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns FloatDimension and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_FLOAT_DIMENSION.
*
*/
Tizen::Graphics::FloatDimension ToFloatDimension(void) const;
* @return A Tizen::Graphics::FloatMatrix4 representing the value of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_MATRIX4.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns FloatMatrix4() and generates E_INVALID_OPERATION exception if the current variant type is not VARIANT_TYPE_FLOAT_MATRIX4.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns FloatMatrix4() and generates E_INVALID_OPERATION exception if the current
+ * variant type is not VARIANT_TYPE_FLOAT_MATRIX4.
*
*/
Tizen::Graphics::FloatMatrix4 ToFloatMatrix4(void) const;
* @return A Tizen::Graphics::FloatPoint3 representing the value of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_POINT3.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns FloatPoint3 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT_POINT3.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns FloatPoint3 and generates @c E_INVALID_OPERATION exception if the current
+ * variant type is not @c VARIANT_TYPE_FLOAT_POINT3.
*
*/
Tizen::Graphics::FloatPoint3 ToFloatPoint3(void) const;
* @return A Tizen::Graphics::FloatVector4 representing the value of the current instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_VECTOR4.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * The method returns FloatVector4() and generates E_INVALID_OPERATION exception if the current variant type is not VARIANT_TYPE_FLOAT_VECTOR4.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - The method returns FloatVector4() and generates E_INVALID_OPERATION exception if the current
+ * variant type is not VARIANT_TYPE_FLOAT_VECTOR4.
*
*/
Tizen::Graphics::FloatVector4 ToFloatVector4(void) const;
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks Two equal instances must return the same hash value. For better performance, the used hash function must generate a random distribution for all inputs.
+ * @remarks Two equal instances must return the same hash value. @n
+ * For better performance, the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*
* @param[in] childControl The control for which the alignment is set
* @param[in] alignment The horizontal alignment
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
- * @remarks By default, the horizontal alignment is HORIZONTAL_ALIGNLEFT.
+ * @remarks By default, the horizontal alignment is @c HORIZONTAL_ALIGNLEFT.
*/
result SetHorizontalAlignment(Control& childControl, LayoutHorizontalAlignment alignment);
* @param[in] childControl The control for which the space is set
* @param[in] space The space
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the spacing is set to @c 0.
*/
result SetSpacing(Control& childControl, int space);
/**
- * Sets the space between a specified control and its predecessor.
+ * Sets the space between the specified control and its predecessor.
*
* @since 2.1
*
* @param[in] childControl The control for which the space is set
* @param[in] space The space
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the spacing is set to @c 0.
*/
* @param[in] left The left margin
* @param[in] right The right margin
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the margins are set to @c 0.
*/
result SetHorizontalMargin(Control& childControl, int left, int right);
/**
- * Sets the horizontal margins of a specified control.
+ * Sets the horizontal margins of the specified control.
*
* @since 2.1
*
* @param[in] left The left margin
* @param[in] right The right margin
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the margins are set to @c 0.
*/
* @param[in] childControl The control for which the width is set
* @param[in] width The value of the width
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetWidth(Control& childControl, int width);
/**
- * Sets the width of a specified control with the fixed length.
+ * Sets the width of the specified control with the fixed length.
*
* @since 2.1
*
* @param[in] childControl The control for which the width is set
* @param[in] width The value of the width
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetWidth(Control& childControl, float width);
* @param[in] childControl The control for which the width is set
* @param[in] policy The fitting policy for the width
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetHorizontalFitPolicy(Control& childControl, FitPolicy policy);
* @param[in] childControl The control for which the height is set
* @param[in] height The value of the height
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetHeight(Control& childControl, int height);
/**
- * Sets the height of a specified control with a fixed length.
+ * Sets the height of the specified control with a fixed length.
*
* @since 2.1
*
* @param[in] childControl The control for which the height is set
* @param[in] height The value of the height
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
*/
result SetHeight(Control& childControl, float height);
* @param[in] childControl The control for which the height is set
* @param[in] policy The fitting policy for the height
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
- * @remarks Setting FIT_POLICY_PARENT as @c policy does not cause the height of the control to change.
+ * @remarks Setting @c FIT_POLICY_PARENT as @c policy does not cause the height of the control to change.
*/
result SetVerticalFitPolicy(Control& childControl, FitPolicy policy);
* @param[in] childControl The control for which the weight is set
* @param[in] weight The weight that indicates how much extra space the control occupies in proportion to it, in the %VerticalBoxLayout.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c childControl parameter is not a child of the container that owns the layout.
+ * @exception E_INVALID_ARG The specified @c childControl is not a child of the container that owns the layout.
* @exception E_SYSTEM A system error has occurred.
* @remarks By default, the weight is set to @c 0.0f.
*/
*
* The %Window class is an abstract base class.
* The %Window is a top-level window such as Controls::Frame, Controls::MessageBox, and Controls::Popup.
- * The descendants of a %Window can exist outside of their applications's bounds.
+ * The descendants of a %Window can exist outside their applications' bounds.
*
*/
class _OSP_EXPORT_ Window
public:
/**
- * Adds the listener instance. @n
+ * Adds a listener instance. @n
* The added listener can listen to events on when they are fired.
*
* @since 2.0
* @since 2.0
*
* @final Although this method is virtual, it should not be overridden.
- * If overridden, it may not work as expected.
+ * If overridden, it may not work as expected.
*
* @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
- * this control is not 'displayable'.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred:
+ * - The current state of the instance prohibits the execution of the specified operation.
+ * - This control is not 'displayable'.
* @exception E_SYSTEM A system error has occurred.
*/
virtual result Show(void);
* @since 2.0
*
* @return An error code
- * @param[in] rect The rectangle bounds to set
- * @param[in] resizable Set to @c true to make the window resizable, @n
+ * @param[in] rect The rectangle bounds to set
+ * @param[in] resizable Set to @c true to make the window resizable, @n
* else @c false
- * @param[in] movable Set to @c true to make the window movable, @n
+ * @param[in] movable Set to @c true to make the window movable, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks This method must be called from the derived classes's construct methods.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @remarks
+ * - This method must be called from the derived classes' construct methods.
+ * - If @c resizable is @c false, IsResizable() returns @c false.
* @see IsResizable()
*/
result Construct(const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true);
* @since 2.1
*
* @return An error code
- * @param[in] rect The rectangle bounds to set
- * @param[in] resizable Set to @c true to make the window resizable, @n
+ * @param[in] rect The rectangle bounds to set
+ * @param[in] resizable Set to @c true to make the window resizable, @n
* else @c false
- * @param[in] movable Set to @c true to make the window movable, @n
+ * @param[in] movable Set to @c true to make the window movable, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks This method must be called from the derived classes's construct methods.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @remarks
+ * - This method must be called from the derived classes' construct methods.
+ * - If @c resizable is @c false, IsResizable() returns @c false.
* @see IsResizable()
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true);
* @since 2.0
*
* @return An error code
- * @param[in] layout The layout for both the portrait and landscape mode
- * @param[in] rect The location and size of the %window
- * @param[in] resizable Set to @c true to make the window resizable, @n
- * else @c false
- * @param[in] movable Set to @c true to make the window movable, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks This method must be called from the derived classes's construct methods.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
+ * @param[in] layout The layout for both the portrait and landscape mode
+ * @param[in] rect The location and size of the %window
+ * @param[in] resizable Set to @c true to make the window resizable, @n
+ * else @c false
+ * @param[in] movable Set to @c true to make the window movable, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @remarks
+ * - This method must be called from the derived classes' construct methods.
+ * - If @c resizable is @c false, IsResizable() returns @c false.
* @see IsResizable()
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Container::GetLayoutN()
+ * @see Container::GetLayoutN()
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true);
/**
- * Initializes this instance of %Window with a specified layout and rectangular region.
+ * Initializes this instance of %Window with the specified layout and rectangular region.
*
* @since 2.1
*
* @return An error code
- * @param[in] layout The layout for both the portrait and landscape mode
- * @param[in] rect The location and size of the window
- * @param[in] resizable Set to @c true to make the window resizable, @n
- * else @c false
- * @param[in] movable Set to @c true to make the window movable, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @param[in] layout The layout for both the portrait and landscape mode
+ * @param[in] rect The location and size of the window
+ * @param[in] resizable Set to @c true to make the window resizable, @n
+ * else @c false
+ * @param[in] movable Set to @c true to make the window movable, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
* @remarks
- * - This method must be called from the derived classes's construct methods.
- * - If the @c resizable is @c false, IsResizable() returns @c false.
+ * - This method must be called from the derived classes' construct methods.
+ * - If @c resizable is @c false, IsResizable() returns @c false.
* @see IsResizable()
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Container::GetLayoutN()
+ * @see Container::GetLayoutN()
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true);
* @since 2.0
*
* @return An error code
- * @param[in] portraitLayout The layout for the portrait mode
+ * @param[in] portraitLayout The layout for the portrait mode
* @param[in] landscapeLayout The layout for the landscape mode
- * @param[in] rect The location and size of the %Window
- * @param[in] resizable Set to @c true to make the window resizable, @n
- * else @c false
- * @param[in] movable Set to @c true to make the window movable, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
+ * @param[in] rect The location and size of the %Window
+ * @param[in] resizable Set to @c true to make the window resizable, @n
+ * else @c false
+ * @param[in] movable Set to @c true to make the window movable, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @remarks If @c resizable is @c false, IsResizable() returns @c false.
* @see IsResizable()
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Container::GetLayoutN()
- * @see Tizen::Ui::Container::GetPortraitLayoutN()
- * @see Tizen::Ui::Container::GetLandscapeLayoutN()
+ * @see Container::GetLayoutN()
+ * @see Container::GetPortraitLayoutN()
+ * @see Container::GetLandscapeLayoutN()
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true);
* @since 2.1
*
* @return An error code
- * @param[in] portraitLayout The layout for the portrait mode
+ * @param[in] portraitLayout The layout for the portrait mode
* @param[in] landscapeLayout The layout for the landscape mode
- * @param[in] rect The location and size of the %Window
- * @param[in] resizable Set to @c true to make the window resizable, @n
- * else @c false
- * @param[in] movable Set to @c true to make the window movable, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
+ * @param[in] rect The location and size of the %Window
+ * @param[in] resizable Set to @c true to make the window resizable, @n
+ * else @c false
+ * @param[in] movable Set to @c true to make the window movable, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @remarks If @c resizable is @c false, IsResizable() returns @c false.
* @see IsResizable()
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Layout
- * @see Tizen::Ui::Container::GetLayoutN()
- * @see Tizen::Ui::Container::GetPortraitLayoutN()
- * @see Tizen::Ui::Container::GetLandscapeLayoutN()
+ * @see Container::GetLayoutN()
+ * @see Container::GetPortraitLayoutN()
+ * @see Container::GetLandscapeLayoutN()
*/
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true);
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
*-----------------------------------------------------------------------*/
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef void GLvoid
-// \brief A type definition for GLvoid.
-// @since 2.0
-//
+/**
+* A type definition for GLvoid
+* @since 2.0
+*/
typedef void GLvoid;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef char GLchar
-// \brief A type definition for GLchar.
-// @since 2.0
-//
+/**
+* A type definition for GLchar
+* @since 2.0
+*/
typedef char GLchar;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef unsigned int GLenum
-// \brief A type definition for GLenum.
-// @since 2.0
-//
+/**
+* A type definition for GLenum
+* @since 2.0
+*/
typedef unsigned int GLenum;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef unsigned char GLboolean
-// \brief A type definition for GLboolean.
-// @since 2.0
-//
+/**
+* A type definition for GLboolean
+* @since 2.0
+*/
typedef unsigned char GLboolean;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef unsigned int GLbitfield
-// \brief A type definition for GLbitfield.
-// @since 2.0
-//
+/**
+* A type definition for GLbitfield
+* @since 2.0
+*/
typedef unsigned int GLbitfield;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef signed char GLbyte
-// \brief A type definition for GLbyte.
-// @since 2.0
-//
+/**
+* A type definition for GLbyte
+* @since 2.0
+*/
typedef khronos_int8_t GLbyte;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef short GLshort
-// \brief A type definition for GLshort.
-// @since 2.0
-//
+/**
+* A type definition for GLshort
+* @since 2.0
+*/
typedef short GLshort;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef int GLint
-// \brief A type definition for GLint.
-// @since 2.0
-//
+/**
+* A type definition for GLint
+* @since 2.0
+*/
typedef int GLint;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef int GLsizei
-// \brief A type definition for GLsizei.
-// @since 2.0
-//
+/**
+* A type definition for GLsizei
+* @since 2.0
+*/
typedef int GLsizei;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef khronos_uint8_t GLubyte
-// \brief A type definition for GLubyte.
-// @since 2.0
-//
+/**
+* A type definition for GLubyte
+* @since 2.0
+*/
typedef khronos_uint8_t GLubyte;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef unsigned short GLushort
-// \brief A type definition for GLushort.
-// @since 2.0
-//
+/**
+* A type definition for GLushort
+* @since 2.0
+*/
typedef unsigned short GLushort;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var unsigned int GLuint
-// \brief A type definition for GLuint.
-// @since 2.0
-//
+/**
+* A type definition for GLuint
+* @since 2.0
+*/
typedef unsigned int GLuint;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef khronos_float_t GLfloat
-// \brief A type definition for GLfloat.
-// @since 2.0
-//
+/**
+* A type definition for GLfloat
+* @since 2.0
+*/
typedef khronos_float_t GLfloat;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef khronos_float_t GLclampf
-// \brief A type definition for GLclampf.
-// @since 2.0
-//
+/**
+* A type definition for GLclampf
+* @since 2.0
+*/
typedef khronos_float_t GLclampf;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef khronos_int32_t GLfixed
-// \brief A type definition for GLfixed.
-// @since 2.0
-//
+/**
+* A type definition for GLfixed
+* @since 2.0
+*/
typedef khronos_int32_t GLfixed;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef khronos_int32_t GLclampx
-// \brief A type definition for GLclampx.
-// @since 2.0
-//
+/**
+* A type definition for GLclampx
+* @since 2.0
+*/
typedef khronos_int32_t GLclampx;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef khronos_intptr_t GLintptr
-// \brief A type definition for GLintptr.
-// @since 2.0
-//
+/**
+* A type definition for GLintptr
+* @since 2.0
+*/
typedef khronos_intptr_t GLintptr;
//
-// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
-// \var typedef khronos_ssize_t GLsizeiptr
-// \brief A type definition for GLsizeiptr.
-// @since 2.0
-//
+/**
+* A type definition for GLsizeiptr
+* @since 2.0
+*/
typedef khronos_ssize_t GLsizeiptr;
/**
%build
+%if 0%{?tizen_build_binary_release_type_eng}
+CXXFLAGS="$CXXFLAGS -D_SECURE_LOG"
+%endif
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%ifarch %{ix86}
-CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=x86
+%if 0%{?simulator}
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=x86
+%else
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=x86
+%endif
%else
-CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=arm
+%if 0%{?tizen_build_binary_release_type_eng}
+CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_SECURE_LOG -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=arm
+%else
+CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=arm
+%endif
%endif
# Call make instruction with smp support
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/share/license
cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
-cp %{_builddir}/%{name}-%{version}/LICENSE.Flora %{buildroot}/usr/share/license/%{name}
+cat %{_builddir}/%{name}-%{version}/LICENSE.Flora >> %{buildroot}/usr/share/license/%{name}
%make_install
mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/multi-user.target.wants
{
__pUiAppImpl = new (std::nothrow) _UiAppImpl(this);
SysAssertf(__pUiAppImpl != null, "Allocating memory for UiApp instance failed.");
- SysTryReturnVoidResult(NID_APP, __pUiAppImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturnVoidResult(NID_APP, __pUiAppImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
}
std::unique_ptr< _AppResourceBitmapUtil > pAppResourceBitmapUtil(_AppResourceBitmapUtil::GetInstanceN(type, value));
- SysTryReturn(NID_APP, pAppResourceBitmapUtil != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_APP, pAppResourceBitmapUtil != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_AppResourceBitmap* pAppResourceBitmap = new (std::nothrow) _AppResourceBitmap();
- SysTryReturn(NID_APP, pAppResourceBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_APP, pAppResourceBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pAppResourceBitmap->__pAppResourceBitmapUtil = std::move(pAppResourceBitmapUtil);
}
std::unique_ptr< _AppResourceBitmapUtil > pAppResourceBitmapUtil(new (std::nothrow) _AppResourceBitmapUtil());
- SysTryReturn(NID_APP, pAppResourceBitmapUtil != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient." );
+ SysTryReturn(NID_APP, pAppResourceBitmapUtil != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed." );
pAppResourceBitmapUtil->__resourceType = appResourceType;
int deviceDPI = 0;
result r = Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/screen.dpi", deviceDPI);
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Failed to get Screen DPI", GetErrorMessage(r));
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Failed to get Screen DPI");
// 1. Get directory path matched device's resolution (e.g.720x1280)
if (GetDirectoryPath(resourceFolder, DENSITY_NONE, __resolutionDirectories) == false)
if (lazyDecoding)
{
pBitmap.reset(new (std::nothrow) Bitmap());
- SysTryReturn(NID_APP, pBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_APP, pBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = _BitmapImpl::GetInstance(*pBitmap)->Construct(resourcePath, pixelFormat);
}
r = GetLastResult();
SysTryReturn(NID_APP, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred.");
+ if (!_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap))
+ {
+ pBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_HIGH);
+ }
+
r = pBitmap->Scale(logicalImageSize);
+ pBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_LOW);
+
SysTryReturn(NID_APP, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred.");
}
String uiScalabilityInfoString;
result r = E_SUCCESS;
const String appId(_AppInfo::GetApplicationId());
- SysTryReturnResult(NID_APP, appId != null, E_OBJ_NOT_FOUND, "[%s] Cannot get application id", GetErrorMessage(r));
+ SysTryReturnResult(NID_APP, appId != null, E_OBJ_NOT_FOUND, "Cannot get application id");
{
File uiScalabilityInfoFile;
// Get UI Scalability Infomation
r = uiScalabilityInfoFile.Construct(_AppInfo::GetAppRootPath() + scalabilityInfoFilePath, L"r");
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
r = uiScalabilityInfoFile.Read(uiScalabilityInfoString);
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
}
StringTokenizer infoTokenizer(uiScalabilityInfoString, L" ");
{
String magicNumString(null);
r = infoTokenizer.GetNextToken(magicNumString);
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
int magicNumber = 0;
r = Integer::Parse(magicNumString, magicNumber);
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- SysTryReturnResult(NID_APP, magicNumber == 1, E_SYSTEM, "[E_SYSTEM] The magic number(%d) is invalid.", magicNumber);
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
+ SysTryReturnResult(NID_APP, magicNumber == 1, E_SYSTEM, "The magic number(%d) is invalid.", magicNumber);
}
// Get Application Coordinate Status (Logical or Physical)
String coordinateSystem(null);
r = infoTokenizer.GetNextToken(coordinateSystem);
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
if (coordinateSystem.Equals(L"Physical", false))
{
// Get Base Screen
String baseScreenSize(null);
r = infoTokenizer.GetNextToken(baseScreenSize);
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
// logicalBaseScreenSize
if (baseScreenSize.Equals(L"Large", false))
// Get Application Logical Resolution
String logicalCoordinate(null);
r = infoTokenizer.GetNextToken(logicalCoordinate);
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
r = Integer::Parse(logicalCoordinate, logicalCoordinateSystemInt);
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
SysLog(NID_APP, "The current values of UI scalability information are coordinate status : %ls, base resolution : %ls and logical resolution : %ls.", coordinateSystem.GetPointer(), baseScreenSize.GetPointer(), logicalCoordinate.GetPointer());
r = _ThemeInfo::LoadThemeInfoFromInfoFile(systemTheme, userTheme);
if( r != E_SUCCESS)
- _ThemeInfo::LoadThemeInfoFromDatabase(systemTheme, userTheme);
+ {
+ r = _ThemeInfo::LoadThemeInfoFromDatabase(systemTheme, userTheme);
+ }
return r;
}
result
_ThemeInfo::LoadThemeInfoFromInfoFile(String& systemTheme, String& userTheme)
{
- AppId appId = _AppInfo::GetApplicationId();
- SysLog(NID_UI, "AppId = %ls" , appId.GetPointer());
+ AppId appId = _AppInfo::GetApplicationId();
+ SysLog(NID_UI, "AppId = %ls" , appId.GetPointer());
String uiThemeInfoString;
result r;
// Get UI theme info from info/[appId]/uitheme.info
{
- File uiThemeInfoFile;
const String themeInfoFilePath(L"info/" + appId + L"/" + _theme_info_file);
- r = uiThemeInfoFile.Construct(_AppInfo::GetAppRootPath() + themeInfoFilePath, L"r");
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = uiThemeInfoFile.Read(uiThemeInfoString);
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ if (File::IsFileExist(_AppInfo::GetAppRootPath() + themeInfoFilePath)) {
+ File uiThemeInfoFile;
+ r = uiThemeInfoFile.Construct(_AppInfo::GetAppRootPath() + themeInfoFilePath, L"r");
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
+
+ r = uiThemeInfoFile.Read(uiThemeInfoString);
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
+ } else {
+ ClearLastResult();
+ return E_FILE_NOT_FOUND;
+ }
}
StringTokenizer infoTokenizer(uiThemeInfoString, L" ");
{
String magicNumString(null);
r = infoTokenizer.GetNextToken(magicNumString);
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
int magicNumber = 0;
r = Integer::Parse(magicNumString, magicNumber);
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- SysTryReturnResult(NID_APP, magicNumber == 1, E_SYSTEM, "[E_SYSTEM] The magic number(%d) is invalid.", magicNumber);
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
+ SysTryReturnResult(NID_APP, magicNumber == 1, E_SYSTEM, "The magic number(%d) is invalid.", magicNumber);
}
// Get application UI theme info (SystemTheme, UserDefinedTheme)
String _systemTheme(null);
r = infoTokenizer.GetNextToken(_systemTheme);
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
if (_systemTheme.Equals(L"White", false))
{
// By default, black system theme
systemTheme = L"black";
}
- SysLog(NID_UI, "Application UI Theme : %ls" , systemTheme.GetPointer());
+ SysLog(NID_UI, "Application UI Theme : %ls" , systemTheme.GetPointer());
// Get User Defined Theme
String _userTheme(null);
r = infoTokenizer.GetNextToken(_userTheme);
- if (!(_userTheme.IsEmpty()))
+ if (!(_userTheme.IsEmpty()))
{
SysLog(NID_UI, "Custom theme :%ls" , _userTheme.GetPointer());
userTheme = _userTheme;
_ThemeInfo::LoadThemeInfoFromDatabase(String& systemTheme, String& userTheme)
{
AppId appId = _AppInfo::GetApplicationId();
- SysLog(NID_UI, "AppId = %ls" , appId.GetPointer());
- _PackageAppInfoImpl packageManager;
- packageManager.Construct(appId);
- String key = packageManager.GetAppFeature(L"UserDefinedTheme");
- if (!(key.IsEmpty()))
- {
- SysLog(NID_UI, "Custom theme %ls" , key.GetPointer());
- userTheme = key;
- }
- key = packageManager.GetAppFeature(L"SystemTheme");
- if (key.IsEmpty())
- {
- systemTheme = L"black";
- }
- else
- {
- SysLog(NID_UI, "System theme %ls" , key.GetPointer());
- systemTheme = key;
- systemTheme.ToLowerCase();
- }
- return E_SUCCESS;
+ SysLog(NID_UI, "AppId = %ls" , appId.GetPointer());
+ _PackageAppInfoImpl packageManager;
+ packageManager.Construct(appId);
+ String key = packageManager.GetAppFeature(L"UserDefinedTheme");
+ if (!(key.IsEmpty()))
+ {
+ SysLog(NID_UI, "Custom theme %ls" , key.GetPointer());
+ userTheme = key;
+ }
+ key = packageManager.GetAppFeature(L"SystemTheme");
+ if (key.IsEmpty())
+ {
+ systemTheme = L"black";
+ }
+ else
+ {
+ SysLog(NID_UI, "System theme %ls" , key.GetPointer());
+ systemTheme = key;
+ systemTheme.ToLowerCase();
+ }
+ return E_SUCCESS;
}
} } //Tizen::App
#include <FUi_UiEventManager.h>
#include <FUiCtrl_FrameImpl.h>
#include <FSys_PowerManagerImpl.h>
-#include <FSys_SettingInfoImpl.h>
#include "FApp_AppFrame.h"
#include "FApp_AppInfo.h"
void
_UiAppImpl::OnService(service_s* service, bool initial)
{
- Frame* pFrame = dynamic_cast<Frame*>(__pFrameList->GetAt(0));
+ Frame* pFrame = (__pFrameList) ? dynamic_cast<Frame*>(__pFrameList->GetAt(0)) : null;
_EcoreEvas* pEvas = GetEcoreEvasMgr()->GetEcoreEvas();
const int type = _AppInfo::GetAppType();
long handle = -1;
const int type = _AppInfo::GetAppType();
- if (type & _APP_TYPE_IME_APP)
- {
- handle = GetTargetWindowHandle();
- }
- else
+ if (!(type & _APP_TYPE_IME_APP))
{
const _EcoreEvas* const pEvas = GetEcoreEvasMgr()->GetEcoreEvas();
handle = (pEvas) ? static_cast<long>(pEvas->GetXWindow()) : -1;
result
_UiAppImpl::RemoveFrame(const Frame& frame)
{
- result r = E_SUCCESS;
- SysTryReturnResult(NID_APP, __pFrameList != null, E_INVALID_STATE, "Getting FrameList failed.");
+ if (__pFrameList == null)
+ {
+ SysLog(NID_APP, "No framelist available.");
+ return E_SUCCESS;
+ }
Frame& tmpFrame = const_cast <Frame&>(frame);
_WindowImpl* pFrameImpl = _WindowImpl::GetInstance(tmpFrame);
- r = __pFrameList->Remove(frame, false);
+ const result r = __pFrameList->Remove(frame, false);
if (pFrameImpl)
{
result
_UiAppImpl::RemoveAllFrames(void)
{
- result r = E_SUCCESS;
- SysTryReturnResult(NID_APP, __pFrameList != null, E_INVALID_STATE, "Getting FrameList failed.");
+ if (__pFrameList == null)
+ {
+ SysLog(NID_APP, "No framelist available.");
+ return E_SUCCESS;
+ }
int frameCount = __pFrameList->GetCount();
for (int i = 0; i < frameCount; i++)
delete __pFrameList;
__pFrameList = null;
- return r;
+ return E_SUCCESS;
}
Frame*
_UiAppImpl::GetFrame(const String& name)
{
- Frame* pFrame = null;
SysTryReturn(NID_APP, __pFrameList != null, null, E_INVALID_STATE, "[E_INVALID_STATE] Getting FrameList failed.");
int frameCount = __pFrameList->GetCount();
for (int i = 0; i < frameCount; i++)
{
- pFrame = dynamic_cast <Frame*>(__pFrameList->GetAt(i));
+ Frame* pFrame = dynamic_cast <Frame*>(__pFrameList->GetAt(i));
if (pFrame != null && pFrame->GetName() == name)
{
Frame*
_UiAppImpl::GetFrameAt(int index)
{
- Frame* pFrame = null;
SysTryReturn(NID_APP, __pFrameList != null, null, E_INVALID_STATE, "[E_INVALID_STATE] Getting FrameList failed.");
SysTryReturn(NID_APP, index >= 0, null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is less than 0.");
int frameCount = __pFrameList->GetCount();
SysTryReturn(NID_APP, index < frameCount, null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is greater than the number of frames.");
- pFrame = dynamic_cast <Frame*>(__pFrameList->GetAt(index));
+ Frame* pFrame = dynamic_cast <Frame*>(__pFrameList->GetAt(index));
return pFrame;
}
const bool bReturn = __pUiApp->OnAppInitializing(*(AppRegistry::GetInstance()));
SysLog(NID_APP, "Back to the platform initializing routine.");
- _SettingInfoImpl::AddSettingEventListenerForInternal(*this);
return bReturn;
}
return __pUiApp;
}
-void
-_UiAppImpl::OnSettingChanged(String& key)
-{
- SysLog(NID_APP,"Changed Key: %ls", key.GetPointer());
-
- if (key == L"http://tizen.org/setting/locale.language")
- {
- _AppImpl::OnLanguageChanged(null);
- }
-}
-
} } //Tizen::App
#include <FAppUiApp.h>
#include <FBaseRtIEventListener.h>
-#include <FSysISettingEventListener.h>
#include <FUi_IKeyEventListener.h>
#include <FUi_IUiEventListener.h>
: public Tizen::Base::Object
, public Tizen::App::_IAppImpl
, public Tizen::Ui::_IKeyEventListener
- , public Tizen::System::ISettingEventListener
, virtual public Tizen::Ui::_IUiEventListener
, virtual public Tizen::Base::Runtime::IEventListener
{
*/
virtual bool OnKeyReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_KeyInfo& keyInfo);
- virtual void OnSettingChanged(Tizen::Base::String& key);
private:
/**
* This is the default constructor for this class.
FGrp_Screen.cpp
FGrp_TextElementImpl.cpp
FGrp_EnrichedTextImpl.cpp
+ FGrp_FontFromImage.cpp
+ FGrp_FontPrivate.cpp
util/FGrp_Util.cpp
util/FGrp_UtilPixmap.cpp
util/FGrp_UtilScratchpad.cpp
#define CHECK_INSTANCE \
- SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.")
+ SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.")
#define CHECK_INSTANCE_EX(_result) \
- SysTryReturn(NID_GRP, this->__pImpl != null, _result, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.")
+ SysTryReturn(NID_GRP, this->__pImpl != null, _result, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.")
#define CHECK_INSTANCE_VOID \
- SysTryReturnVoidResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.")
+ SysTryReturnVoidResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.")
#define CHECK_NOT_CONSTRUCTED \
{
__pImpl = new (std::nothrow) _BufferInfoImpl;
- SysTryReturnVoidResult(NID_GRP, __pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_GRP, __pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
}
BufferInfo::BufferInfo(const BufferInfo& rhs)
{
__pImpl = new (std::nothrow) _BufferInfoImpl(*_BufferInfoImpl::GetInstance(rhs));
- SysTryReturnVoidResult(NID_GRP, __pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_GRP, __pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
}
}
#define CHECK_INSTANCE \
- SysTryReturnResult(NID_GRP, this->__pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.")
+ SysTryReturnResult(NID_GRP, this->__pImpl, E_OUT_OF_MEMORY, "Memory allocation failed.")
#define CHECK_INSTANCE_EX(_result) \
- SysTryReturn(NID_GRP, this->__pImpl, _result, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.")
+ SysTryReturn(NID_GRP, this->__pImpl, _result, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.")
#define CHECK_INSTANCE_VOID \
- SysTryReturnVoidResult(NID_GRP, this->__pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.")
+ SysTryReturnVoidResult(NID_GRP, this->__pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.")
#define CHECK_NOT_CONSTRUCTED \
float convertedX = pTransformer->TransformHorizontalFloatToInt(rectangle.x);
float convertedY = pTransformer->TransformVerticalFloatToInt(rectangle.y);
- float convertedW = pTransformer->TransformHorizontalFloatToInt(rectangle.width);
- float convertedH = pTransformer->TransformVerticalFloatToInt(rectangle.height);
+ float convertedW = pTransformer->TransformHorizontalFloatToInt(rectangle.x + rectangle.width) - convertedX;
+ float convertedH = pTransformer->TransformVerticalFloatToInt(rectangle.y + rectangle.height) - convertedY;
output.x = CoordinateSystem::ConvertToLogicalX(convertedX);
output.y = CoordinateSystem::ConvertToLogicalY(convertedY);
using namespace Tizen::Base::Utility;
#define CHECK_NOT_CONSTRUCTED \
- SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.") \
+ SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.") \
SysAssertf(!this->__pImpl->IsConstructed(), \
"Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class.");
#include "FGrp_ResUtil.h"
#define CHECK_NOT_CONSTRUCTED \
- SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.") \
+ SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.") \
SysAssertf(!this->__pImpl->IsConstructed(), \
"Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class.");
using namespace Tizen::Base::Utility;
#define CHECK_NOT_CONSTRUCTED \
- SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory.") \
+ SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.") \
SysAssertf(!this->__pImpl->IsConstructed(), \
"Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class.");
, __pLockCallbackParam(null)
, __pUnlockCallbackFunc(null)
, __pUnlockCallbackParam(null)
+ , __pPostlockCallbackFunc(null)
+ , __pPostlockCallbackParam(null)
{
_Util::CarveMagicKey(*this, __magicKey);
}
std::unique_ptr<unsigned char[]> pAllocated(new (std::nothrow) unsigned char[allocSize]);
- SysTryReturnResult(NID_GRP, pAllocated, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The bitmap memory is insufficient");
+ SysTryReturnResult(NID_GRP, pAllocated, E_OUT_OF_MEMORY, "The bitmap memory is insufficient");
result r = this->Construct((void*) pAllocated.get(), width, height, systemBpp);
- SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating.");
// copy contents from the current screen
{
std::unique_ptr<unsigned char[]> pAllocated(new (std::nothrow) unsigned char[allocSize]);
- SysTryReturnResult(NID_GRP, pAllocated, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The bitmap memory is insufficient");
+ SysTryReturnResult(NID_GRP, pAllocated, E_OUT_OF_MEMORY, "The bitmap memory is insufficient");
result r = this->Construct((void*) pAllocated.get(), width, height, bytesPerPixel * 8);
- SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating.");
memset(pAllocated.get(), 0, allocSize);
std::unique_ptr<unsigned char[]> pAllocated(new (std::nothrow) unsigned char[allocSize]);
- SysTryReturnResult(NID_GRP, pAllocated, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The bitmap memory is insufficient");
+ SysTryReturnResult(NID_GRP, pAllocated, E_OUT_OF_MEMORY, "The bitmap memory is insufficient");
result r = this->Construct((void*) pAllocated.get(), width, height, bytesPerPixel * 8);
- SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating.");
memcpy(pAllocated.get(), buffer.GetPointer(), allocSize);
return E_SYSTEM;
}
- SysTryReturnResult(NID_GRP, __pScratchPad16 || __pScratchPad32, E_OUT_OF_MEMORY, "The memory is insufficient");
+ SysTryReturnResult(NID_GRP, __pScratchPad16 || __pScratchPad32, E_OUT_OF_MEMORY, "Memory allocation failed.");
this->__hasOwnership = false;
- this->__isOpaqueAllOver = true;
+ this->__isOpaqueAllOver = 0;
this->__bitmapPixelFormat = (bitsPerPixel == 32) ? BITMAP_PIXEL_FORMAT_ARGB8888 : BITMAP_PIXEL_FORMAT_RGB565;
return E_SUCCESS;
}
- // TODO, shkim, I'm not sure why it's E_OUT_OF_RANGE?
- // TryReturnI(NID_GRP, srcRect.x >= 0 && srcRect.y >= 0, E_OUT_OF_RANGE, "the argument is out of range.\n");
-
SysTryReturnResult(NID_GRP, src.IsValid(), E_INVALID_ARG, "The specified source bitmap is invalid.\n");
result r = this->__Merge(dest.x, dest.y, src, srcRect.x, srcRect.y, srcRect.width, srcRect.height);
this->__pLockCallbackFunc(this->__pLockCallbackParam);
}
- return this->__Lock(info, timeout);
+ result r = this->__Lock(info, timeout);
+
+ if (r == E_SUCCESS && this->__pPostlockCallbackFunc)
+ {
+ this->__pPostlockCallbackFunc(info, this->__pPostlockCallbackParam);
+ }
+
+ return r;
}
result
void
_Bitmap::SetCallback(void (* LockCallback)(void*), void* pLockCallbackParam,
- void (* UnlockCallback)(void*), void* pUnlockCallbackParam)
+ void (* UnlockCallback)(void*), void* pUnlockCallbackParam,
+ void (* PostlockCallback)(BufferInfo&, void*), void* pPostlockCallbackParam)
{
this->__pLockCallbackFunc = LockCallback;
this->__pLockCallbackParam = pLockCallbackParam;
this->__pUnlockCallbackFunc = UnlockCallback;
this->__pUnlockCallbackParam = pUnlockCallbackParam;
+
+ this->__pPostlockCallbackFunc = PostlockCallback;
+ this->__pPostlockCallbackParam = pPostlockCallbackParam;
}
result
void AssignUserBuffer(unsigned char* pBuffer, int bytesPerLine);
void SetCallback(void (* LockCallback)(void*), void* pLockCallbackParam,
- void (* UnlockCallback)(void*), void* pUnlockCallbackParam);
+ void (* UnlockCallback)(void*), void* pUnlockCallbackParam,
+ void (* PostlockCallback)(BufferInfo&, void*), void* pPostlockCallbackParam);
protected:
void _SetOwnership(bool ownership);
void* __pLockCallbackParam;
void (* __pUnlockCallbackFunc)(void*);
void* __pUnlockCallbackParam;
+ void (* __pPostlockCallbackFunc)(BufferInfo&, void*);
+ void* __pPostlockCallbackParam;
friend class _Canvas;
friend class _BitmapImpl;
this->_sharedItem->pLockCallbackParam = null;
this->_sharedItem->pUnlockCallbackFunc = null;
this->_sharedItem->pUnlockCallbackParam = null;
+ this->_sharedItem->pPostlockCallbackFunc = null;
+ this->_sharedItem->pPostlockCallbackParam = null;
+
this->_sharedItem->isMutable = true;
this->_sharedItem->associated.pixelFormat = BITMAP_PIXEL_FORMAT_ARGB8888;
this->_sharedItem->associated.hasBeenDetectedByUsingName = false;
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, _CheckValidityOfRectangle(vc_rect), E_INVALID_ARG, "Both of width(%d) and height(%d) of 'rect' MUST be greater than 0.", vc_rect.width, vc_rect.height);
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
// check arg.
SysTryReturnResult(NID_GRP, vc_dim.width > 0 && vc_dim.height > 0, E_INVALID_ARG, "Both of width(%d) and height(%d) of 'dim' MUST be greater than 0.", vc_dim.width, vc_dim.height);
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, &canvas, E_INVALID_ARG, "A canvas is invalid.");
SysTryReturnResult(NID_GRP, canvas._pNativeCanvas && canvas._pNativeCanvas->IsValid(), E_INVALID_ARG, "A canvas is invalid.");
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, BITMAPIMPL_IS_VALID(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.");
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, __pImpl && this->_nativeBitmap, E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, __pImpl && this->_nativeBitmap, E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, rq_dim.width > 0 && rq_dim.height > 0, E_INVALID_ARG, "Both of width(%d) and height(%d) of a dimension MUST be greater than 0.", rq_dim.width, rq_dim.height);
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, (bufferInfo.width > 0) && (bufferInfo.height > 0) && (bufferInfo.pitch > 0)
, E_INVALID_ARG
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, rq_dim.width > 0 && rq_dim.height > 0, E_INVALID_ARG, "Both of width(%d) and height(%d) of a dimension MUST be greater than 0.", rq_dim.width, rq_dim.height);
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, pBuffer, E_INVALID_ARG, "The specified buffer pointer is invalid.");
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, pExtBuffer, E_INVALID_ARG, "The specified buffer pointer is invalid.", width, height);
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, rq_dim.width > 0 && rq_dim.height > 0, E_INVALID_ARG, "Both of width(%d) and height(%d) of a dimension MUST be greater than 0.", rq_dim.width, rq_dim.height);
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
switch (pixelFormat)
{
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, vcRectF.width > 0.0f && vcRectF.height > 0.0f, E_INVALID_ARG, "Both of width(%f) and height(%f) of a rectangle MUST be greater than 0.", vcRectF.width, vcRectF.height);
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, vcDimF.width > 0.0f && vcDimF.height > 0.0f, E_INVALID_ARG, "Both of width(%f) and height(%f) of a dimension MUST be greater than 0.", vcDimF.width, vcDimF.height);
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, &canvas, E_INVALID_ARG, "A canvas is invalid.");
SysTryReturnResult(NID_GRP, canvas._pNativeCanvas && canvas._pNativeCanvas->IsValid(), E_INVALID_ARG, "A canvas is invalid.");
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, BITMAPIMPL_IS_VALID(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.");
}
result
-_BitmapImpl::Merge(const Point& vc_dest, const _BitmapImpl& src, const Rectangle& vc_srcRect)
+_BitmapImpl::Merge(const Point& vcDest, const _BitmapImpl& src, const Rectangle& vcSrcRect)
{
SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet.");
SysTryReturnResult(NID_GRP, src._sharedItem->nativeBitmap->IsValid(), E_INVALID_ARG, "The source bitmap is invalid.");
- SysTryReturnResult(NID_GRP, &vc_srcRect, E_INVALID_ARG, "The source rectangle is invalid.");
- SysTryReturnResult(NID_GRP, &vc_dest, E_INVALID_ARG, "The destination position is invalid.");
- SysTryReturnResult(NID_GRP, vc_dest.x >= 0 && vc_dest.y >= 0, E_OUT_OF_RANGE, "The argument is out of range. (dest(x:%d,y:%d)).", vc_dest.x, vc_dest.y);
+ SysTryReturnResult(NID_GRP, &vcSrcRect, E_INVALID_ARG, "The source rectangle is invalid.");
+ SysTryReturnResult(NID_GRP, &vcDest, E_INVALID_ARG, "The destination position is invalid.");
+ SysTryReturnResult(NID_GRP, vcDest.x >= 0 && vcDest.y >= 0, E_OUT_OF_RANGE, "The argument is out of range. (dest(x:%d,y:%d)).", vcDest.x, vcDest.y);
+ SysTryReturnResult(NID_GRP, vcSrcRect.x >= 0 && vcSrcRect.y >= 0, E_OUT_OF_RANGE, "The argument is out of range. (source(x:%d,y:%d)).", vcSrcRect.x, vcSrcRect.y);
- SysTryReturnResult(NID_GRP, (vc_srcRect.width >= 0) && (vc_srcRect.height >= 0), E_INVALID_ARG, "The given rectangle(width:%d,height:%d) is invalid.", vc_srcRect.width, vc_srcRect.height);
+ SysTryReturnResult(NID_GRP, (vcSrcRect.width >= 0) && (vcSrcRect.height >= 0), E_INVALID_ARG, "The given rectangle(width:%d,height:%d) is invalid.", vcSrcRect.width, vcSrcRect.height);
- if ((vc_srcRect.width == 0) || (vc_srcRect.height == 0))
+ if ((vcSrcRect.width == 0) || (vcSrcRect.height == 0))
{
return E_SUCCESS;
}
else
{
Rectangle rtBitmap(0, 0, src.GetWidth(), src.GetHeight());
- SysTryReturnResult(NID_GRP, _CheckValidity(vc_srcRect, rtBitmap), E_OUT_OF_RANGE, "The argument is out of range. (srcRect(x:%d,y:%d,w:%d,h:%d)).", vc_srcRect.x, vc_srcRect.y, vc_srcRect.width, vc_srcRect.height);
+ SysTryReturnResult(NID_GRP, _CheckValidity(vcSrcRect, rtBitmap), E_OUT_OF_RANGE, "The argument is out of range. (srcRect(x:%d,y:%d,w:%d,h:%d)).", vcSrcRect.x, vcSrcRect.y, vcSrcRect.width, vcSrcRect.height);
- return this->Merge(FloatPoint(float(vc_dest.x), float(vc_dest.y)), src, FloatRectangle(float(vc_srcRect.x), float(vc_srcRect.y), float(vc_srcRect.width), float(vc_srcRect.height)));
+ return this->Merge(FloatPoint(float(vcDest.x), float(vcDest.y)), src, FloatRectangle(float(vcSrcRect.x), float(vcSrcRect.y), float(vcSrcRect.width), float(vcSrcRect.height)));
}
}
SysTryReturnResult(NID_GRP, &srcVcRectF, E_INVALID_ARG, "The source rectangle is invalid.");
SysTryReturnResult(NID_GRP, &destVcPosF, E_INVALID_ARG, "The destination position is invalid.");
SysTryReturnResult(NID_GRP, destVcPosF.x >= 0.0f && destVcPosF.y >= 0.0f, E_OUT_OF_RANGE, "The argument is out of range. (destPoint(x:%f,y:%f)).", destVcPosF.x, destVcPosF.y);
+ SysTryReturnResult(NID_GRP, srcVcRectF.x >= 0.0f && srcVcRectF.y >= 0.0f, E_OUT_OF_RANGE, "The argument is out of range. (source(x:%f,y:%f)).", srcVcRectF.x, srcVcRectF.y);
SysTryReturnResult(NID_GRP, srcVcRectF.width >= 0.0f && srcVcRectF.height >= 0.0f, E_INVALID_ARG, "The given rectangle(width:%f,height:%f) is invalid.", srcVcRectF.width, srcVcRectF.height);
r = srcResizedBitmap.Construct(srcVcDim, pSrcBitmapEx->GetPixelColorFormat());
- SysTryReturnResult(NID_GRP, !IsFailed(r), E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, !IsFailed(r), E_OUT_OF_MEMORY, "Memory allocation failed.");
}
_UpdateScaledBitmapEx(pSrcBitmapEx, &srcResizedBitmap);
}
}
+void
+_BitmapImpl::SetNinePatchedTagByForce(bool isNinePatched)
+{
+ _sharedItem->associated.hasBeenDetectedByUsingName = true;
+ _sharedItem->associated.determinedNinePatchedAtFirst = isNinePatched;
+}
+
bool
_BitmapImpl::_SetCallback(void (* DestroyCallback)(void*), void* pDestroyCallbackParam,
void (* LockCallback)(void*), void* pLockCallbackParam,
- void (* UnlockCallback)(void*), void* pUnlockCallbackParam)
+ void (* UnlockCallback)(void*), void* pUnlockCallbackParam,
+ void (* PostlockCallback)(BufferInfo&, void*), void* pPostlockCallbackParam)
{
if (!(INSTANCE_IS_VALID))
{
this->_sharedItem->pUnlockCallbackFunc = UnlockCallback;
this->_sharedItem->pUnlockCallbackParam = pUnlockCallbackParam;
+ this->_sharedItem->pPostlockCallbackFunc = PostlockCallback;
+ this->_sharedItem->pPostlockCallbackParam = pPostlockCallbackParam;
+
if (this->_sharedItem->nativeBitmap.get())
{
- this->_sharedItem->nativeBitmap->SetCallback(LockCallback, pLockCallbackParam, UnlockCallback, pUnlockCallbackParam);
+ this->_sharedItem->nativeBitmap->SetCallback(LockCallback, pLockCallbackParam, UnlockCallback, pUnlockCallbackParam, PostlockCallback, pPostlockCallbackParam);
}
if (this->_sharedItem->scaledNativeBitmap.get())
{
- this->_sharedItem->scaledNativeBitmap->SetCallback(LockCallback, pLockCallbackParam, UnlockCallback, pUnlockCallbackParam);
+ this->_sharedItem->scaledNativeBitmap->SetCallback(LockCallback, pLockCallbackParam, UnlockCallback, pUnlockCallbackParam, PostlockCallback, pPostlockCallbackParam);
}
return true;
_BitmapTool::SetCallback(Tizen::Graphics::Bitmap& bitmap,
void (* DestroyCallback)(void*), void* pCallbackParam,
void (* LockCallback)(void*), void* pLockParam,
- void (* UnlockCallback)(void*), void* pUnlockParam)
+ void (* UnlockCallback)(void*), void* pUnlockParam,
+ void (* PostlockCallback)(Tizen::Graphics::BufferInfo& bufferInfo, void*), void* pPostlockParam)
{
- return _BitmapUtil::SetCallback(bitmap, DestroyCallback, pCallbackParam, LockCallback, pLockParam, UnlockCallback, pUnlockParam);
+ return _BitmapUtil::SetCallback(bitmap, DestroyCallback, pCallbackParam, LockCallback, pLockParam, UnlockCallback, pUnlockParam, PostlockCallback, pPostlockParam);
}
void
std::auto_ptr <Tizen::Graphics::Bitmap> bitmap(new (std::nothrow) Tizen::Graphics::Bitmap);
- SysTryReturn(NID_GRP, bitmap.get() != 0, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, bitmap.get() != 0, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
// change the implentation instance of Bitmap class
{
std::auto_ptr <Tizen::Graphics::_BitmapTemp> bitmapTemp(new (std::nothrow) Tizen::Graphics::_BitmapTemp(pBuffer, width, height,
depth));
- SysTryReturn(NID_GRP, bitmapTemp.get() && bitmapTemp->IsValid(), 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, bitmapTemp.get() && bitmapTemp->IsValid(), 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
Tizen::Graphics::Bitmap* pBitmap = Tizen::Graphics::_BitmapUtil::CreateBitmapN(bitmapTemp.get());
{
std::auto_ptr <Tizen::Graphics::_BitmapTemp> bitmapTemp(new (std::nothrow) Tizen::Graphics::_BitmapTemp(physicalSize, depth));
- SysTryReturn(NID_GRP, bitmapTemp.get() && bitmapTemp->IsValid(), 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, bitmapTemp.get() && bitmapTemp->IsValid(), 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
Tizen::Graphics::Bitmap* pBitmap = Tizen::Graphics::_BitmapUtil::CreateBitmapN(bitmapTemp.get());
return E_SYSTEM;
}
- if (!SetCallback(srcBitmap, DestroyCallback, pCallbackParam, null, null, null, null))
+ if (!SetCallback(srcBitmap, DestroyCallback, pCallbackParam, null, null, null, null, null, null))
{
return E_SYSTEM;
}
Tizen::Graphics::_BitmapUtil::SetCallback(Tizen::Graphics::Bitmap& bitmap,
void (* DestroyCallback)(void*), void* pCallbackParam,
void (* LockCallback)(void*), void* pLockParam,
- void (* UnlockCallback)(void*), void* pUnlockParam)
+ void (* UnlockCallback)(void*), void* pUnlockParam,
+ void (* PostlockCallback)(Tizen::Graphics::BufferInfo& bufferInfo, void*), void* pPostlockParam)
{
Tizen::Graphics::_BitmapImpl* pBitmapImpl = _BitmapImpl::GetInstance(bitmap);
_BitmapImplHack* pBitmapImplHack = static_cast <_BitmapImplHack*>(pBitmapImpl);
- return (pBitmapImplHack) ? pBitmapImplHack->SetCallback(DestroyCallback, pCallbackParam, LockCallback, pLockParam, UnlockCallback, pUnlockParam) : false;
+ return (pBitmapImplHack) ? pBitmapImplHack->SetCallback(DestroyCallback, pCallbackParam, LockCallback, pLockParam, UnlockCallback, pUnlockParam, PostlockCallback, pPostlockParam) : false;
}
void
bool SetCallback(Tizen::Graphics::Bitmap& bitmap,
void (* DestroyCallback)(void*), void* pCallbackParam,
void (* LockCallback)(void*), void* pLockParam,
- void (* UnlockCallback)(void*), void* pUnlockParam);
+ void (* UnlockCallback)(void*), void* pUnlockParam,
+ void (* PostlockCallback)(Tizen::Graphics::BufferInfo& bufferInfo, void*), void* pPostlockParam);
void ResetCallback(Tizen::Graphics::Bitmap& bitmap);
bool SetCallback(void (* DestroyCallback)(void*), void* pDestroyCallbackParam,
void (* LockCallback)(void*), void* pLockCallbackParam,
- void (* UnlockCallback)(void*), void* pUnlockCallbackParam)
+ void (* UnlockCallback)(void*), void* pUnlockCallbackParam,
+ void (* PostlockCallback)(BufferInfo&, void*), void* pPostlockCallbackParam)
{
if (this->_sharedItem.get() == 0)
{
return false;
}
- return this->_SetCallback(DestroyCallback, pDestroyCallbackParam, LockCallback, pLockCallbackParam, UnlockCallback, pUnlockCallbackParam);
+ return this->_SetCallback(DestroyCallback, pDestroyCallbackParam, LockCallback, pLockCallbackParam, UnlockCallback, pUnlockCallbackParam, PostlockCallback, pPostlockCallbackParam);
}
void ResetCallback(void)
this->_sharedItem->pLockCallbackParam = null;
this->_sharedItem->pUnlockCallbackFunc = null;
this->_sharedItem->pUnlockCallbackParam = null;
+ this->_sharedItem->pPostlockCallbackFunc = null;
+ this->_sharedItem->pPostlockCallbackParam = null;
}
}; // _BitmapImplHack
case HANDLE_TYPE_OVERLAY_REGION:
case HANDLE_TYPE_VE_SURFACE:
case HANDLE_TYPE_CANVAS_TEXTURE:
+ case HANDLE_TYPE_NATIVE_PIXMAP:
return (__handleType == handleType) ? __handle : INVALID_BUFFER_HANDLE;
case HANDLE_TYPE_NONE:
default:
case HANDLE_TYPE_OVERLAY_REGION:
case HANDLE_TYPE_VE_SURFACE:
case HANDLE_TYPE_CANVAS_TEXTURE:
+ case HANDLE_TYPE_NATIVE_PIXMAP:
__handleType = handleType;
__handle = handle;
__pUserData = pUserData;
typedef Tizen::Graphics::_Canvas::SystemPixel _SystemPixel;
typedef Tizen::Graphics::_Util::ScratchPad<_SystemPixel> _ScratchPad32;
-static std::unique_ptr<_SystemPixel[]> _systemFontBuffer;
-static std::auto_ptr<_ScratchPad32> _systemFont;
-
}
////////////////////////////////////////////////////////////////////////////////
, __lineJoinStyle(LINE_JOIN_STYLE_ROUND)
, __isClipBoundsSet(false)
, __textOrigin(TEXT_ORIGIN_LEFT_TOP)
- , __applyEmoji(true)
, __bitmapDrawingQuality(BITMAP_DRAWING_QUALITY_LOW)
, __compositeMode(COMPOSITE_MODE_SRC_OVER)
, __useStableRenderer(false)
const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo();
{
- if (srcBufferInfo.bitsPerPixel == 32 && (GetCompositeMode() != COMPOSITE_MODE_SRC_OVER || srcBitmap.__isPremultiplied))
+ if (srcBufferInfo.bitsPerPixel == 32)
{
_Util::Rectangle<int> outRect = { 0, 0, -1, -1 };
_Util::Rectangle<int> dstRect = { destRect.x, destRect.y, destRect.width, destRect.height };
bool __isClipBoundsSet;
Rectangle __clipBounds;
TextOrigin __textOrigin;
- bool __applyEmoji;
struct
{
{
const int _ARC_DELTA_SOLID_LINE = 4;
-const int _ARC_DELTA_DOT_LINE = 1;
const int _MAX_ARC_OUTLINE_POINTS = 20000;
const int _MAX_STACK_COUNT = 200;
std::unique_ptr<_Util::Point<double>[]> pPointArray(new (std::nothrow) _Util::Point<double>[count]);
- SysTryReturn(NID_GRP, pPointArray, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, pPointArray, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
{
for (int i = 0; i < count; i++)
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed.");
result r = this->_pNativeCanvas->Construct();
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, vcRect.width > 0 && vcRect.height > 0, E_OUT_OF_RANGE,
"The given rectangle(width:%d,height:%d) is out of range.", vcRect.width,
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, (bufferInfo.width > 0) && (bufferInfo.height > 0) && (bufferInfo.pitch > 0)
, E_INVALID_ARG
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed.");
return this->_pNativeCanvas->Construct(windowHandle);
}
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, vcRect.width >= 0 && vcRect.height >= 0, E_OUT_OF_RANGE,
"The given rectangle(width:%d,height:%d) is out of range.", vcRect.width,
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, vcRectF.width > 0.0f && vcRectF.height > 0.0f, E_OUT_OF_RANGE,
"The given rectangle(width:%f,height:%f) is out of range.", vcRectF.width,
{
SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet.");
- SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, this->_pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed.");
SysTryReturnResult(NID_GRP, vcRectF.width >= 0.0f && vcRectF.height >= 0.0f, E_OUT_OF_RANGE,
"The given rectangle(width:%f,height:%f) is out of range.", vcRectF.width,
case LINE_CAP_STYLE_SQUARE:
break;
default:
- SysTryReturn(NID_GRP, false, E_INVALID_ARG, E_INVALID_ARG, "The given line cap style is out of range.");
+ SysTryReturnResult(NID_GRP, false, E_INVALID_ARG, "The given line cap style is out of range.");
}
return this->_pNativeCanvas->SetLineCapStyle(lineCapStyle);
case LINE_JOIN_STYLE_BEVEL:
break;
default:
- SysTryReturn(NID_GRP, false, E_INVALID_ARG, E_INVALID_ARG, "The given line join style is out of range.");
+ SysTryReturnResult(NID_GRP, false, E_INVALID_ARG, "The given line join style is out of range.");
}
return this->_pNativeCanvas->SetLineJoinStyle(lineJoinStyle);
else
{
pFont = new Font();
- SysTryCatch(NID_GRP, pFont, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory.");
+ SysTryCatch(NID_GRP, pFont, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
const float defaultFontSize = _ResUtil::ConvertToVirCoordY(16.0f);
result r = pFont->Construct(FONT_STYLE_PLAIN, defaultFontSize);
if (IsSucceeded(r))
{
- _Util::Rectangle<int> vcRect =
+ _Util::Rectangle<int> vcRevisedRect =
{
revisedVcRect.x,
revisedVcRect.y,
revisedVcRect.height
};
- this->_pCoordHolder->AssignClipBoundsFromVcSize(vcRect);
+ this->_pCoordHolder->AssignClipBoundsFromVcSize(vcRevisedRect);
}
return r;
if (IsSucceeded(r))
{
- _Util::Rectangle<int> vcRect =
+ _Util::Rectangle<int> vcRevisedRect =
{
revisedVcRect.x,
revisedVcRect.y,
revisedVcRect.height
};
- this->_pCoordHolder->AssignClipBoundsFromVcSize(vcRect);
+ this->_pCoordHolder->AssignClipBoundsFromVcSize(vcRevisedRect);
}
return r;
Canvas*
_CanvasImpl::GetSubCanvasN(const Rectangle& subRegion) const
{
- SysTryReturn(NID_GRP, INSTANCE_IS_VALID, null, E_OPERATION_FAILED, "This instance is not constructed yet.");
+ SysTryReturn(NID_GRP, INSTANCE_IS_VALID, null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.");
_Canvas* pSourceNativeCanvas = this->_pNativeCanvas;
Canvas* pSubCanvas = subCanvas.get();
- SysTryReturn(NID_GRP, pSubCanvas, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, pSubCanvas, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_CanvasImpl* pSubCanvasImpl = _CanvasImpl::GetInstance(*pSubCanvas);
- SysTryReturn(NID_GRP, pSubCanvasImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, pSubCanvasImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
if (_ResUtil::NeedToConvertCoord())
{
void
_CanvasImpl::SetAntialiasingEnabled(bool enable)
{
- SysTryReturnVoidResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet.");
+ SysTryReturnVoidResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "[E_OUT_OF_MEMORY] This instance is not constructed yet.");
return this->_pNativeCanvas->SetAntialiasingEnabled(enable);
}
return CompositePixmap(dstImage, srcImage, rop, filter, transform, PIXMAN_REPEAT_NONE);
}
+ case PIXMAN_OP_SRC:
+ case PIXMAN_OP_CLEAR:
+ {
+ int dstX1 = int(floor(xDest));
+ int dstX2 = int(ceil(xDest + srcImage.width));
+ int dstY1 = int(floor(yDest));
+ int dstY2 = int(ceil(yDest + srcImage.height));
+
+ Tizen::Graphics::_Util::Pixmap dstImageSub = dstImage.GetSubBitmap(dstX1, dstY1, dstX2 - dstX1, dstY2 - dstY1);
+ Tizen::Graphics::_Util::Pixmap srcImageSub = srcImage.GetSubBitmap((dstX1 >= 0) ? 0 : -dstX1, (dstY1 >= 0) ? 0 : -dstY1, srcImage.width, srcImage.height);
+
+ pixman_transform_t transform;
+ pixman_transform_init_identity(&transform);
+ pixman_transform_translate(&transform, NULL, pixman_double_to_fixed(dstX1 -(xDest - 0.5)), pixman_double_to_fixed(dstY1 -(yDest - 0.5)));
+ return CompositePixmap(dstImageSub, srcImageSub, rop, filter, transform, PIXMAN_REPEAT_REFLECT);
+ }
default:
{
int dstX1 = int(floor(xDest));
return true;
}
+ if (dstImage.width == srcImage.width && dstImage.height == srcImage.height)
+ {
+ return CopyPixmap(dstImage, srcImage, drawingQuality, compositeMode);
+ }
+
pixman_op_t rop = Tizen::Graphics::_Pixman::GetRop(compositeMode);
pixman_filter_t filter = Tizen::Graphics::_Pixman::GetFilter(drawingQuality);
pixman_transform_t transform = Tizen::Graphics::_Pixman::GetTransform(srcImage.width, srcImage.height, dstImage.width, dstImage.height);
std::auto_ptr<_CoordinateSystemImpl> pImpl(new _CoordinateSystemImpl());
- SysTryReturnResult(NID_GRP, pImpl.get() != null, E_OUT_OF_MEMORY, "Insufficient memory.");
+ SysTryReturnResult(NID_GRP, pImpl.get() != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = pImpl->Initialize(logicalResolution, logicalBaseScreenSize);
std::auto_ptr<_CoordinateSystemImpl> pImpl(new _CoordinateSystemImpl());
- SysTryReturnResult(NID_GRP, pImpl.get() != null, E_OUT_OF_MEMORY, "Insufficient memory.");
+ SysTryReturnResult(NID_GRP, pImpl.get() != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = pImpl->Initialize(srcResolution, srcBaseScreenSize, destResolution, destBaseScreenSize);
TextElementType type = TEXT_ELEMENT_TYPE_NONE;
Dimension dim = this->GetSize();
- TextVerticalAlignment verticalAlignment = this->GetElementVerticalAlignment();
+ TextVerticalAlignment verticalAlignment = this->GetVerticalAlignment();
TextHorizontalAlignment horizontalAlignment = this->GetHorizontalAlignment();
TextVerticalAlignment elementVerticalAlignment = this->GetElementVerticalAlignment();
TextWrap wrap = this->GetTextWrapStyle();
#include "FGrp_Canvas.h"
+#include "FGrp_FontPrivate.h"
#include "util/FGrp_UtilTemplate.h"
//#define USE_FONTCONFIG
-#define USE_EMOJI
+//#define APPLY_BOLD_SPACE
#define SYNCHRONIZATION_2_0
#define __pNativeFont __sharedFont.get()
if (FcPatternGetString(pSet->fonts[i], FC_FILE, 0, &pName) == FcResultMatch)
{
String* pFamilyName = new (std::nothrow) String(Tizen::Graphics::_Font::GetFaceName(String((char*)pName)));
- SysTryCatch(NID_GRP, pFamilyName, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocated memory");
+ SysTryCatch(NID_GRP, pFamilyName, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
list.Add(*pFamilyName);
if (defaultFontExists == false)
{
String* pDefaultFontName = new (std::nothrow) String(defaultFontFaceName);
- SysTryCatch(NID_GRP, pDefaultFontName, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocated memory");
+ SysTryCatch(NID_GRP, pDefaultFontName, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
list.InsertAt(*pDefaultFontName, 0);
}
bool isNewFont = true;
String* pFamilyName = new (std::nothrow) String(Tizen::Graphics::_Font::GetFaceName(fullName));
- SysTryCatch(NID_GRP, pFamilyName, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocated memory");
+ SysTryCatch(NID_GRP, pFamilyName, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
for (int idx = 0; idx < list.GetCount(); idx++)
{
const int _sampleLanguageCount = sizeof(_SampleLanguages) / sizeof(_SampleLanguages[0]);
-unsigned long
-GetPredefinedColor(const wchar_t unicode, unsigned long fgColor)
-{
-#ifdef USE_EMOJI
- //
- // Emoji Unicode List 176 + 76
- //
- static const unsigned long _EMOJI_BLACK = 0xFF000000;
- static const unsigned long _EMOJI_BLUE = 0xFF0000FF;
- static const unsigned long _EMOJI_GREEN = 0xFF00FF00;
- static const unsigned long _EMOJI_RED = 0xFFFF0000;
- static const unsigned long _EMOJI_ORANGE = 0xFFFF6600;
- static const unsigned long _EMOJI_PURPLE = 0xFF9370DB;
- static const unsigned long _EMOJI_DEEP_PURPLE = 0xFF800080;
- static const unsigned long _EMOJI_DARK_BLUE = 0xFF00008B;
- static const unsigned long _EMOJI_BROWN = 0xFFA52A2A;
- static const unsigned long _NOT_EMOJI = 0;
-
- static const wchar_t _MAX_EMOJI_UNICODE = 0xE757;
- static const wchar_t _MIN_EMOJI_UNICODE = 0xE63E;
-
- static const unsigned long _emojiTable[] =
- {
- _EMOJI_RED, _EMOJI_BLUE, _EMOJI_BLUE, _EMOJI_BLUE, _EMOJI_ORANGE, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_ORANGE,
- _EMOJI_GREEN, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_ORANGE, _EMOJI_GREEN, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_ORANGE, _EMOJI_GREEN, _EMOJI_BLUE,
- _EMOJI_PURPLE, _EMOJI_BLACK, _EMOJI_BLUE, _EMOJI_GREEN, _EMOJI_BLACK, _EMOJI_BLUE, _EMOJI_ORANGE, _EMOJI_BLACK, _EMOJI_PURPLE, _EMOJI_GREEN,
- _EMOJI_ORANGE, _EMOJI_BLUE, _EMOJI_BLACK, _EMOJI_GREEN, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_RED,
- _EMOJI_BLACK, _EMOJI_PURPLE, _EMOJI_RED, _EMOJI_GREEN, _EMOJI_BLUE, _EMOJI_PURPLE, _EMOJI_BLUE, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK,
- _EMOJI_GREEN, _EMOJI_PURPLE, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_ORANGE,
- _EMOJI_BLUE, _EMOJI_PURPLE, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_ORANGE, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_ORANGE,
- _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_ORANGE, _EMOJI_BLUE, _EMOJI_BLACK, _EMOJI_BLUE, _EMOJI_RED,
- _EMOJI_BLACK, _EMOJI_RED, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_BLACK, _EMOJI_BLACK,
- _EMOJI_ORANGE, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLUE, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_ORANGE,
- _EMOJI_ORANGE, _EMOJI_BLUE, _EMOJI_GREEN, _EMOJI_BLACK, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI,
- _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _NOT_EMOJI, _NOT_EMOJI, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _NOT_EMOJI, _NOT_EMOJI,
- _NOT_EMOJI, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI,
- _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI,
- _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _NOT_EMOJI, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_BLACK,
- _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_RED,
- _EMOJI_RED, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK,
- _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_PURPLE, _EMOJI_RED,
- _EMOJI_BLUE, _EMOJI_GREEN, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_RED, _EMOJI_RED, _EMOJI_PURPLE, _EMOJI_RED, _EMOJI_ORANGE, _EMOJI_ORANGE,
- _EMOJI_BLACK, _EMOJI_RED, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_PURPLE, _EMOJI_RED, _EMOJI_RED,
- _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_BLUE, _EMOJI_BLACK,
- _EMOJI_RED, _EMOJI_DARK_BLUE, _EMOJI_BLUE, _EMOJI_ORANGE, _EMOJI_BROWN, _EMOJI_BROWN, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_BLACK, _EMOJI_GREEN,
- _EMOJI_ORANGE, _EMOJI_PURPLE, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_GREEN, _EMOJI_BLACK, _EMOJI_GREEN, _EMOJI_PURPLE, _EMOJI_BLUE, _EMOJI_BLUE,
- _EMOJI_RED, _EMOJI_DEEP_PURPLE, _EMOJI_PURPLE, _EMOJI_ORANGE, _EMOJI_RED, _EMOJI_PURPLE, _EMOJI_PURPLE, _EMOJI_DARK_BLUE, _EMOJI_ORANGE, _EMOJI_BLUE,
- _EMOJI_BLUE, _EMOJI_RED, _EMOJI_BLUE, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_GREEN, _EMOJI_BLACK, _EMOJI_ORANGE,
- _EMOJI_RED, _EMOJI_BLUE, _EMOJI_RED, _EMOJI_RED, _EMOJI_BLACK, _EMOJI_BLACK, _EMOJI_GREEN, _EMOJI_BLUE, _EMOJI_BLUE, _EMOJI_GREEN,
- _EMOJI_RED, _EMOJI_RED, _EMOJI_ORANGE, _EMOJI_RED, _EMOJI_GREEN, _EMOJI_RED, _EMOJI_PURPLE, _EMOJI_BLACK, _EMOJI_RED, _EMOJI_BROWN,
- _EMOJI_ORANGE, _EMOJI_BROWN, _EMOJI_BROWN, _EMOJI_ORANGE, _EMOJI_DARK_BLUE, _EMOJI_BLUE, _EMOJI_ORANGE, _EMOJI_ORANGE, _EMOJI_BROWN, _EMOJI_ORANGE,
- _EMOJI_DEEP_PURPLE, _EMOJI_DEEP_PURPLE
- };
-
- if (unicode >= _MIN_EMOJI_UNICODE && unicode <= _MAX_EMOJI_UNICODE)
- {
- if (_emojiTable[unicode - _MIN_EMOJI_UNICODE] != _NOT_EMOJI)
- {
- fgColor = _emojiTable[unicode - _MIN_EMOJI_UNICODE];
- }
- }
-#endif
-
- return fgColor;
-}
-
struct _TextFragment
{
_Util::String textFragment;
return __fontAttrib.size;
}
+result
+_Font::SetXExpansion(_Util::FixedPoint26_6 xExpansion)
+{
+ __fontAttrib.xExpansion = xExpansion;
+
+ return E_SUCCESS;
+}
+
void
_Font::SetStrikeOut(bool strikeout)
{
_Font::GetSystemFontListN(void)
{
std::auto_ptr<ArrayList> pList(new (std::nothrow) Tizen::Base::Collection::ArrayList);
- SysTryReturn(NID_GRP, pList.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fails to allocate memory");
+ SysTryReturn(NID_GRP, pList.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
result r = _GetSystemFontList(*pList);
SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
return pList.release();
-
}
Tizen::Base::String
{
// make the clone
_Font* pNativeFont = new (std::nothrow) _Font(*this);
- SysTryReturn(NID_GRP, pNativeFont, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocated memory");
+ SysTryReturn(NID_GRP, pNativeFont, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
// done
return pNativeFont;
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0;
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0;
fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0;
+ fontAttrib.xExpansion = __fontAttrib.xExpansion;
rtn = __pNativeFont->SetAttrib(fontAttrib);
SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to set font attribute");
result
_Font::GetTextExtent(int width, const _Util::String& text, bool outline, int& count, Dimension& pcDim) const
{
- if (text.pStart == null || text.length <= 0)
+ if (text.pStart == null)
{
pcDim.SetSize(0, 0);
count = 0;
- return E_SUCCESS;
+ SysTryReturn(NID_GRP, false, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The given string is invalid.");
}
- result r = this->__GetTextExtentEx(width, text, outline, count, pcDim);
+ if (text.length <= 0)
+ {
+ pcDim.SetSize(0, 0);
+ count = 0;
+ return E_SUCCESS;
+ }
- if (r == E_SUCCESS)
+ if (_GetTextBidiHint() != TEXT_BIDI_HINT_RTL)
{
- return r;
+ result r = this->__GetTextExtentEx(width, text, outline, count, pcDim);
+
+ if (r == E_SUCCESS)
+ {
+ return r;
+ }
}
_TextBidiPropertyWithReorder bidiProperty(text.pStart, text.length, _Util::Convert<TextBidiHint, _TextBidiProperty::BidiHint>(_GetTextBidiHint()));
_IFont::Property property;
GET_FONT_PROPERTY(property, false);
+#ifdef APPLY_BOLD_SPACE
if (__fontAttrib.style & FONT_STYLE_BOLD && property.weightClass < _MEDIUM_FONT_BOLD_WEIGHT)
{
_IFont::Attrib attr;
pThis->GetAttrib(attr);
boldSpace = static_cast<int>(attr.boldWeight.ToFloat() + 0.5f);
}
+#endif
const wchar_t* pText = text.pStart;
int length = text.length;
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0;
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0;
fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0;
+ fontAttrib.xExpansion = __fontAttrib.xExpansion;
rtn = pFont->SetAttrib(fontAttrib);
//SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to set font attribute");
}
#ifdef SYNCHRONIZATION_2_0
// adjusting x2 bounds for synchronizing fuctionality with 2.0
- glyphBoundX2 = glyphBoundX1 + pFontGlyphData->xAdvance.ToInt() + italicSpace + boldSpace;
+ glyphBoundX2 = glyphBoundX1 + pFontGlyphData->xAdvance.ToInt() + boldSpace;
#endif
if (outline)
{
_ExpandBounds(glyphBoundX1, glyphBoundY2, x1, y1, x2, y2);
_ExpandBounds(glyphBoundX2, glyphBoundY2, x1, y1, x2, y2);
-#ifdef SYNCHRONIZATION_2_0
- curX += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + italicSpace + boldSpace;
-#else
curX += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace;
-#endif
curY += pFontGlyphData->yAdvance.ToInt();
pFont->UnloadGlyph(&pFontGlyphData);
SysTryCatch(NID_GRP, preX1 <= preX2 && preY1 <= preY2, pcDim.SetSize(0, 0); count = 0, E_SYSTEM, "[E_SYSTEM] Failed to calculate text extent");
count = characters;
- pcDim.width = preX2 - preX1;
+ pcDim.width = preX2 - preX1 + italicSpace;
#ifdef SYNCHRONIZATION_2_0
pcDim.height = __fontAttrib.size.ToInt();
#else
result
_Font::__GetTextExtent(int width, const _Util::String& text, bool outline, int& count, Dimension& pcDim) const
{
- if (text.pStart == null)
- {
- pcDim.SetSize(0, 0);
- SysTryReturn(NID_GRP, false, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The given string is invalid.");
- }
-
int preX1 = 0x7FFFFFFF;
int preY1 = 0x7FFFFFFF;
int preX2 = -0x7FFFFFFF;
}
}
+#ifdef APPLY_BOLD_SPACE
_IFont::Property property;
GET_FONT_PROPERTY(property, false);
pThis->GetAttrib(attr);
boldSpace = static_cast<int>(attr.boldWeight.ToFloat() + 0.5f);
}
+#endif
const wchar_t* pText = text.pStart;
int length = text.length;
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0;
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0;
fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0;
+ fontAttrib.xExpansion = __fontAttrib.xExpansion;
rtn = pFont->SetAttrib(fontAttrib);
//SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to set font attribute");
}
#ifdef SYNCHRONIZATION_2_0
// adjusting x2 bounds for synchronizing fuctionality with 2.0
- glyphBoundX2 = glyphBoundX1 + pFontGlyphData->xAdvance.ToInt() + italicSpace + boldSpace;
+ glyphBoundX2 = glyphBoundX1 + pFontGlyphData->xAdvance.ToInt() + boldSpace;
#endif
if (outline)
{
_ExpandBounds(glyphBoundX1, glyphBoundY2, x1, y1, x2, y2);
_ExpandBounds(glyphBoundX2, glyphBoundY2, x1, y1, x2, y2);
-#ifdef SYNCHRONIZATION_2_0
- curX += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + italicSpace + boldSpace;
-#else
curX += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace;
-#endif
curY += pFontGlyphData->yAdvance.ToInt();
pFont->UnloadGlyph(&pFontGlyphData);
SysTryCatch(NID_GRP, preX1 <= preX2 && preY1 <= preY2, pcDim.SetSize(0, 0); count = 0, E_SYSTEM, "[E_SYSTEM] Failed to calculate text extent");
count = characters;
- pcDim.width = preX2 - preX1;
+ pcDim.width = preX2 - preX1 + italicSpace;
#ifdef SYNCHRONIZATION_2_0
pcDim.height = __fontAttrib.size.ToInt();
#else
result
_Font::GetTextExtent(int width, const _Util::String& text, bool outline, const Tizen::Base::String& delimiter, int& count, Dimension& dim) const
{
+ if (text.pStart == null)
+ {
+ dim.SetSize(0, 0);
+ count = 0;
+ SysTryReturn(NID_GRP, false, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The given string is invalid.");
+ }
+
+ if (text.length <= 0)
+ {
+ dim.SetSize(0, 0);
+ count = 0;
+ return E_SUCCESS;
+ }
+
const wchar_t* pText = text.pStart;
const wchar_t* pTextEnd = pText + text.length;
result
_Font::__GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pair<int, int> >& outList) const
{
- SysAssert(text.pStart != null && text.length > 0);
-
outList.Clear();
_Font* pThis = const_cast <_Font*>(this);
APPLY_ATTRIBUTE(E_SYSTEM);
- int addingSpace = __fontAttrib.charSpace;
+ int italicSpace = 0;
+ int boldSpace = 0;
#ifdef SYNCHRONIZATION_2_0
{
if (__fontAttrib.style & FONT_STYLE_ITALIC)
{
- addingSpace += (sizeProperty.ascender.ToInt() * 2) >> 4;
+ italicSpace = (sizeProperty.ascender.ToInt() * 2) >> 4;
}
}
#endif
+#ifdef APPLY_BOLD_SPACE
_IFont::Property property;
GET_FONT_PROPERTY(property, false);
if (pThis->GetAttrib(attr))
{
- addingSpace += static_cast<int>(attr.boldWeight.ToFloat() + 0.5f);
+ boldSpace = static_cast<int>(attr.boldWeight.ToFloat() + 0.5f);
}
}
+#endif
int curX = 0;
int curY = 0;
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0;
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0;
fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0;
+ fontAttrib.xExpansion = __fontAttrib.xExpansion;
pFont->SetAttrib(fontAttrib);
}
}
int prevX = curX;
- curX += pFontGlyphData->xAdvance.ToInt() + addingSpace;
+ curX += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace;
curY += pFontGlyphData->yAdvance.ToInt();
pFont->UnloadGlyph(&pFontGlyphData);
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0;
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0;
fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0;
-
+ fontAttrib.xExpansion = __fontAttrib.xExpansion;
textFragment->pUsingFont->SetAttrib(fontAttrib);
}
}
result
_Font::GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pair<int, int> >& outList) const
{
- if (text.pStart == null || text.length <= 0)
+ if (text.pStart == null)
+ {
+ outList.Clear();
+ SysTryReturn(NID_GRP, false, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The given string is invalid.");
+ }
+
+ if (text.length <= 0)
{
outList.Clear();
return E_SUCCESS;
}
result
-_Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length)
+_Font::__DrawText(_Canvas& canvas, const Point& point, const _Util::String& text, unsigned long color, bool ignorePredefinedColor)
{
SysTryReturnResult(NID_GRP, canvas.__pScratchPad != null, E_INVALID_ARG, "A canvas is invalid");
- const wchar_t* pText = text.GetPointer() + startIndex;
-
bool rtn = this->ApplyAttribute();
SysTryReturn(NID_GRP, rtn, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fails to apply font attribute.");
}
}
+#ifdef APPLY_BOLD_SPACE
_IFont::Property property;
GET_FONT_PROPERTY(property, false);
this->GetAttrib(attr);
boldSpace = static_cast<int>(attr.boldWeight.ToFloat() + 0.5f);
}
+#endif
+
+ const wchar_t* pText = text.pStart;
+ int length = text.length;
- unsigned long canvasFgColor = canvas.__fgColor;
+ unsigned long canvasFgColor = color;
_TextBidiPropertyWithReorder bidiProperty(pText, length, _Util::Convert<TextBidiHint, _TextBidiProperty::BidiHint>(_GetTextBidiHint()));
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0;
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0;
fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0;
-
+ fontAttrib.xExpansion = __fontAttrib.xExpansion;
textFragment->pUsingFont->SetAttrib(fontAttrib);
}
}
yDest -= pGlyph->yAdvance.ToInt();
}
+ // temporary indent for convenience of code review
+ switch (pGlyph->image.depth)
+ {
+ case 8:
+ {
for (int h = 0; h < pGlyph->image.height; h++)
{
int y = yDest - pGlyph->yOffset.ToInt() + h;
++pDest32;
}
}
+ }
+ break;
+
+ case 16:
+ {
+ scratchPad.RegisterFillRect(_RasterOp::FnFillRectAlpha32Bit);
+
+ for (int h = 0; h < pFontGlyphData->image.height; h++)
+ {
+ int y = yDest - pFontGlyphData->yOffset.ToInt() + h;
+
+ if (y < clipY1)
+ {
+ continue;
+ }
+
+ if (y >= clipY2)
+ {
+ break;
+ }
+
+ for (int w = 0; w < pFontGlyphData->image.width; w++)
+ {
+ int x = xDest + pFontGlyphData->xOffset.ToInt() + w;
+
+ if (x < clipX1)
+ {
+ continue;
+ }
+
+ if (x >= clipX2)
+ {
+ break;
+ }
+
+ unsigned short* pSource = (unsigned short*)&pFontGlyphData->image.pBitmap[h * pFontGlyphData->image.bytesPerLine];
+ pSource += w;
+
+ TPixel dest32 = ((*pSource & 0xF000) << 16) | ((*pSource & 0x0F00) << 12) | ((*pSource & 0x00F0) << 8) | ((*pSource & 0x000F) << 4);
+ dest32 |= (dest32 >> 4);
+
+ scratchPad.FillRect(x, y, 1, 1, dest32, 255);
+ }
+ }
+ scratchPad.RegisterFillRect(_RasterOp::FnFillRectFont32Bit);
+ }
+ break;
+
+ case 32:
+ {
+ scratchPad.RegisterFillRect(_RasterOp::FnFillRectAlpha32Bit);
+
+ for (int h = 0; h < pGlyph->image.height; h++)
+ {
+ int y = yDest - pGlyph->yOffset.ToInt() + h;
+
+ if (y < clipY1)
+ {
+ continue;
+ }
+
+ if (y >= clipY2)
+ {
+ break;
+ }
+
+ TPixel* pDest32 = pBufferStartAddr + y * bufferPitch + xDest + pGlyph->xOffset.ToInt();
+
+ for (int w = 0; w < pGlyph->image.width; w++)
+ {
+ int x = xDest + pGlyph->xOffset.ToInt() + w;
+
+ if (x < clipX1)
+ {
+ ++pDest32;
+ continue;
+ }
+
+ if (x >= clipX2)
+ {
+ break;
+ }
+
+ unsigned long* pSource = (unsigned long*)&pGlyph->image.pBitmap[h * pGlyph->image.bytesPerLine];
+ pSource += w;
+
+ scratchPad.FillRect(x, y, 1, 1, *pSource, 255);
+ }
+ }
+
+ scratchPad.RegisterFillRect(_RasterOp::FnFillRectFont32Bit);
+ }
+ break;
+ }
+
if (_TextBidiUtil::IsTextBidiBaseLtr())
{
}
else
{
+ _FontRsrcManager& mgr = _FontRsrcManager::GetInstance();
+
while (*pText && --length >= 0)
{
+ if (mgr.SearchSpaceList(*pText))
+ {
+ pText++;
+
+ continue;
+ }
+
// find out proper native font
_IFont* pFont = this->__GetFont(*pText);
if (pFont == null)
{
+ pText++;
+
continue;
}
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0;
fontAttrib.style |= (__fontAttrib.style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0;
fontAttrib.style |= (__fontAttrib.underline) ? _IFont::STYLE_UNDERLINE : 0;
-
+ fontAttrib.xExpansion = __fontAttrib.xExpansion;
rtn = pFont->SetAttrib(fontAttrib);
//SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to set font attribute");
}
_IFont::Property property;
pFont->GetFontProperty(property);
- unsigned long fgColor = (canvas.__applyEmoji && pFont->IsEmoji()) ? GetPredefinedColor(*pText, canvasFgColor) : canvasFgColor;
+ unsigned long fgColor = (!ignorePredefinedColor && pFont->hasPredefinedColor()) ? _GetPredefinedColor(*pText, canvasFgColor) : canvasFgColor;
if (left > 0)
{
continue;
}
+ if (pFontGlyphData->xAdvance == 0 && pFontGlyphData->image.width == 0)
+ {
+ mgr.AddSpaceList(*(pText - 1));
+
+ pFont->UnloadGlyph(&pFontGlyphData);
+
+ continue;
+ }
+
typedef unsigned long TPixel;
+ // temporary indent for convenience of code review
+ switch (pFontGlyphData->image.depth)
+ {
+ case 8:
+ {
TPixel srcA = (fgColor >> 24) & 0xFF;
srcA += (srcA >> 7);
}
}
- xDest += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + italicSpace + boldSpace;
+ xDest += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace;
yDest += pFontGlyphData->yAdvance.ToInt();
left++;
leftChar = *(pText - 1);
pFont->UnloadGlyph(&pFontGlyphData);
+ }
+ break;
+
+ case 16:
+ {
+ scratchPad.RegisterFillRect(_RasterOp::FnFillRectAlpha32Bit);
+
+ for (int h = 0; h < pFontGlyphData->image.height; h++)
+ {
+ int y = yDest - pFontGlyphData->yOffset.ToInt() + h;
+
+ if (y < clipY1)
+ {
+ continue;
+ }
+
+ if (y >= clipY2)
+ {
+ break;
+ }
+
+ for (int w = 0; w < pFontGlyphData->image.width; w++)
+ {
+ int x = xDest + pFontGlyphData->xOffset.ToInt() + w;
+
+ if (x < clipX1)
+ {
+ continue;
+ }
+
+ if (x >= clipX2)
+ {
+ break;
+ }
+
+ unsigned short* pSource = (unsigned short*)&pFontGlyphData->image.pBitmap[h * pFontGlyphData->image.bytesPerLine];
+ pSource += w;
+
+ TPixel dest32 = ((*pSource & 0xF000) << 16) | ((*pSource & 0x0F00) << 12) | ((*pSource & 0x00F0) << 8) | ((*pSource & 0x000F) << 4);
+ dest32 |= (dest32 >> 4);
+
+ scratchPad.FillRect(x, y, 1, 1, dest32, 255);
+ }
+ }
+
+ xDest += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace;
+ yDest += pFontGlyphData->yAdvance.ToInt();
+ left++;
+ leftChar = *(pText - 1);
+
+ pFont->UnloadGlyph(&pFontGlyphData);
+
+ scratchPad.RegisterFillRect(_RasterOp::FnFillRectFont32Bit);
+ }
+ break;
+
+ case 32:
+ {
+ scratchPad.RegisterFillRect(_RasterOp::FnFillRectAlpha32Bit);
+
+ for (int h = 0; h < pFontGlyphData->image.height; h++)
+ {
+ int y = yDest - pFontGlyphData->yOffset.ToInt() + h;
+
+ if (y < clipY1)
+ {
+ continue;
+ }
+
+ if (y >= clipY2)
+ {
+ break;
+ }
+
+ for (int w = 0; w < pFontGlyphData->image.width; w++)
+ {
+ int x = xDest + pFontGlyphData->xOffset.ToInt() + w;
+
+ if (x < clipX1)
+ {
+ continue;
+ }
+
+ if (x >= clipX2)
+ {
+ break;
+ }
+
+ unsigned long* pSource = (unsigned long*)&pFontGlyphData->image.pBitmap[h * pFontGlyphData->image.bytesPerLine];
+ pSource += w;
+
+ scratchPad.FillRect(x, y, 1, 1, *pSource, 255);
+ }
+ }
+
+ xDest += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace;
+ yDest += pFontGlyphData->yAdvance.ToInt();
+ left++;
+ leftChar = *(pText - 1);
+
+ pFont->UnloadGlyph(&pFontGlyphData);
+
+ scratchPad.RegisterFillRect(_RasterOp::FnFillRectFont32Bit);
+ }
+ break;
+ }
}
}
scratchPad.RegisterFillRect(null);
-
return E_SUCCESS;
}
#undef BLEND_ALPHA_COMPONEMT
result
-_Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor)
+_Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length)
{
- unsigned long textColor = canvas.__fgColor;
- bool applyEmoji = canvas.__applyEmoji;
+ _Util::String utilText(text.GetPointer(), text.GetLength(), startIndex, length);
+
+ return this->__DrawText(canvas, point, utilText, canvas.__fgColor, false);
+}
- //sunmi557.shin: draw border of font
- canvas.__fgColor = outlineColor.GetRGB32();
- canvas.__applyEmoji = false;
+result
+_Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor)
+{
+ unsigned long textColor32 = canvas.__fgColor;
+ unsigned long outlineColor32 = outlineColor.GetRGB32();;
- this->__DrawText(canvas, Point(point.x - 1, point.y), text, startIndex, length);
- this->__DrawText(canvas, Point(point.x + 1, point.y), text, startIndex, length);
- this->__DrawText(canvas, Point(point.x, point.y - 1), text, startIndex, length);
- this->__DrawText(canvas, Point(point.x, point.y + 1), text, startIndex, length);
+ _Util::String utilText(text.GetPointer(), text.GetLength(), startIndex, length);
- //sunmi557.shin: draw original shape of font
- canvas.__applyEmoji = applyEmoji;
- canvas.__fgColor = textColor;
+ this->__DrawText(canvas, Point(point.x - 1, point.y), utilText, outlineColor32, true);
+ this->__DrawText(canvas, Point(point.x + 1, point.y), utilText, outlineColor32, true);
+ this->__DrawText(canvas, Point(point.x, point.y - 1), utilText, outlineColor32, true);
+ this->__DrawText(canvas, Point(point.x, point.y + 1), utilText, outlineColor32, true);
- this->__DrawText(canvas, point, text, startIndex, length);
+ this->__DrawText(canvas, point, utilText, textColor32, false);
return E_SUCCESS;
}
return __pNativeFont->CheckGlyph(character);
}
+float
+_Font::GetFontSizeFromMaxHeight(const _Util::FixedPoint26_6 expectedMaxHeight)
+{
+ return __pNativeFont->GetFontSizeFromMaxHeight(expectedMaxHeight);
+}
+
+float
+_Font::GetFontSizeFromMaxHeight(int style, const _Util::FixedPoint26_6 expectedMaxHeight)
+{
+ _FontRsrcManager& mgr = _FontRsrcManager::GetInstance();
+ _FontRsrcManager::SharedFontResource out;
+
+ result r = mgr.GetFont(style, expectedMaxHeight, out);
+ SysTryReturn(NID_GRP, r == E_SUCCESS, -1.0f, r, "[%s] Getting system default font failed.", GetErrorMessage(r));
+
+ _IFont* pTempFont = out.get();
+
+ return pTempFont->GetFontSizeFromMaxHeight(expectedMaxHeight);
+}
+
+float
+_Font::GetFontSizeFromMaxHeight(const Tizen::Base::String& fontName, int style, const _Util::FixedPoint26_6 expectedMaxHeight)
+{
+ _FontRsrcManager& mgr = _FontRsrcManager::GetInstance();
+ _FontRsrcManager::SharedFontResource out;
+
+ result r = mgr.GetFont(fontName, style, expectedMaxHeight, out);
+ SysTryReturn(NID_GRP, r == E_SUCCESS, -1.0f, r, "[%s] Getting font failed.", GetErrorMessage(r));
+
+ _IFont* pTempFont = out.get();
+
+ return pTempFont->GetFontSizeFromMaxHeight(expectedMaxHeight);
+}
+
void
_Font::__UpdateFontAttribute(int style, _Util::FixedPoint26_6 pcSize)
{
_IFont*
_Font::__GetFont(wchar_t character)
{
- //------------------------------------------------------
- //
- // 1. check if this font has a requested glyph
- //
- //------------------------------------------------------
- unsigned long idx = __pNativeFont->CheckGlyph(character);
+ _FontRsrcManager& mgr = _FontRsrcManager::GetInstance();
- if (idx > 0)
+ if (!_HasEmoticonImage(character))
{
- return __pNativeFont;
- }
+ //------------------------------------------------------
+ //
+ // 1. check if this font has a requested glyph
+ //
+ //------------------------------------------------------
+ unsigned long idx = __pNativeFont->CheckGlyph(character);
- // Check the BlackList
- _FontRsrcManager& mgr = _FontRsrcManager::GetInstance();
+ if (idx > 0)
+ {
+ return __pNativeFont;
+ }
- if (mgr.SearchBlackList(character))
- {
- return __pNativeFont;
+ // Check the BlackList
+ if (mgr.SearchBlackList(character))
+ {
+ return __pNativeFont;
+ }
}
//------------------------------------------------------
{
if (mgr.SearchFont(key))
{
- if (pTempFont.get()->CheckGlyph(character) > 0)
+ if (pTempFont->CheckGlyph(character) > 0)
{
return pTempFont.get();
}
}
}
#else
- for (_FontRsrcManager::FontMapT::const_iterator fontIterator = pFallbackFontMap->begin(); fontIterator != pFallbackFontMap->end(); ++fontIterator)
+ for (_IFont::FontMapT::const_iterator fontIterator = pFallbackFontMap->begin(); fontIterator != pFallbackFontMap->end(); ++fontIterator)
{
if (fontIterator->second != null)
{
if (r == E_SUCCESS)
{
- unsigned long idx = out.get()->CheckGlyph(character);
+ unsigned long idx = out->CheckGlyph(character);
if (idx > 0)
{
bool
_Font::__GetFallbackFontFileList(wchar_t character, Tizen::Base::Collection::IListT<String>& out)
{
+ if (_HasEmoticonImage(character))
+ {
+ out.Add(String(_GetVirtualFileNameForEmoticon()));
+ return true;
+ }
+
GUnicodeScript script = g_unichar_get_script(character);
if (script < 0 || script >= _sampleLanguageCount)
{
{
if (FcPatternGetString(pSet->fonts[i], FC_FILE, 0, &pName) == FcResultMatch)
{
- out.Add(String((char*)pName));
+ out.Add(String((char*)pName));
}
}
int lineThickness;
bool strikeout;
bool underline;
+ _Util::FixedPoint26_6 xExpansion;
void Init()
{
lineThickness = -1;
strikeout = false;
underline = false;
+ xExpansion.Reset(_Util::FixedPoint26_6(1.0f));
}
};
_Util::FixedPoint26_6 GetSize(void) const;
+ result SetXExpansion(_Util::FixedPoint26_6 xExpansion);
+
void SetStrikeOut(bool strikeOut);
void SetUnderline(bool underline);
bool UnloadGlyph(_IFont::Glyph** ppFontGlyphData);
unsigned long CheckGlyph(unsigned long character);
+ float GetFontSizeFromMaxHeight(const _Util::FixedPoint26_6 expectedMaxHeight);
+
+ static float GetFontSizeFromMaxHeight(int style, const _Util::FixedPoint26_6 expectedMaxHeight);
+ static float GetFontSizeFromMaxHeight(const Tizen::Base::String& fontName, int style, const _Util::FixedPoint26_6 expectedMaxHeight);
+
static result DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length);
static result DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor);
result __DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length);
result __DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor);
+ result __DrawText(_Canvas& canvas, const Point& point, const _Util::String& text, unsigned long color, bool ignorePredefinedColor);
static result __DrawTextLastFallback(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length);
static result __DrawTextDefault(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length);
// precondition check
{
- CHECK_IF((pText) && _IsRtl(pText, len));
+ CHECK_IF((pText) && (hint == Tizen::Graphics::_TextBidiProperty::BIDI_HINT_RTL || _IsRtl(pText, len)));
size_t textLength = _GetStringLength(pText);
len = (len < textLength) ? len : textLength;
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/*
+ * @file FGrp_FontFromImage.cpp
+ * @brief This is the implementation file for _FontFromImage class.
+ *
+ */
+
+#include "FGrp_FontFromImage.h"
+#include "FGrp_FontPrivate.h"
+
+namespace
+{
+
+bool _CreateNullGlyph(Tizen::Graphics::_IFont::Glyph** ppFontGlyphData)
+{
+ using namespace Tizen::Graphics;
+ using Tizen::Graphics::_IFont;
+
+ _IFont::Glyph* pFontGlyphData = (_IFont::Glyph*) new (std::nothrow) char[sizeof(_IFont::Glyph)];
+
+ if (pFontGlyphData)
+ {
+ pFontGlyphData->id = 0;
+ pFontGlyphData->xOffset = _Util::FixedPoint22_10(0);
+ pFontGlyphData->yOffset = _Util::FixedPoint22_10(0);
+ pFontGlyphData->xAdvance = _Util::FixedPoint22_10(0);
+ pFontGlyphData->yAdvance = _Util::FixedPoint22_10(0);
+ pFontGlyphData->hasOwnerShip = 1;
+
+ pFontGlyphData->image.width = 0;
+ pFontGlyphData->image.height = 0;
+ pFontGlyphData->image.bytesPerLine = 0;
+ pFontGlyphData->image.depth = 32;
+ pFontGlyphData->image.pBitmap = 0;
+
+ pFontGlyphData->ptrAux = 0;
+
+ *ppFontGlyphData = pFontGlyphData;
+
+ return true;
+ }
+
+ return false;
+}
+
+}
+
+namespace Tizen { namespace Graphics
+{
+_FontFromImage::_FontFromImage()
+ : __timeStamp(0)
+{
+ __fontAttrib.size = _Util::FixedPoint26_6(48);
+ __fontAttrib.angle = 0.0f;
+ __fontAttrib.style = _IFont::STYLE_NONE;
+ __fontAttrib.quality = _IFont::QUALITY_HIGH;
+ __fontAttrib.xExpansion.Reset(_Util::FixedPoint26_6(1.0f));
+ __fontAttrib.boldWeight.Reset(_Util::FixedPoint26_6(1.0f));
+
+ memset(__fontImageCache, 0, sizeof(__fontImageCache));
+}
+
+bool
+_FontFromImage::SetAttrib(const Attrib& fontAttrib)
+{
+ __fontAttrib = fontAttrib;
+ return true;
+}
+
+bool
+_FontFromImage::GetAttrib(Attrib& fontAttrib) const
+{
+ fontAttrib = __fontAttrib;
+ return true;
+}
+
+bool
+_FontFromImage::GetKerning(unsigned long ch1, unsigned long ch2, long& xVector, long& yVector) const
+{
+ return false;
+}
+
+bool
+_FontFromImage::LoadGlyph(unsigned long character, Glyph** ppFontGlyphData)
+{
+ bool rtn = __FindCache(character, __fontAttrib.size, ppFontGlyphData);
+
+ if (rtn)
+ {
+ return true;
+ }
+
+ rtn = _GetImageGlyph(character, __fontAttrib.size.ToFloat(), ppFontGlyphData);
+
+ if (rtn)
+ {
+ (*ppFontGlyphData)->hasOwnerShip = 0;
+
+ rtn = __AddCache(character, __fontAttrib.size, *ppFontGlyphData);
+
+ if (!rtn)
+ {
+ (*ppFontGlyphData)->hasOwnerShip = 1;
+ }
+ }
+
+ return rtn;
+}
+
+bool
+_FontFromImage::UnloadGlyph(Glyph** ppFontGlyphData)
+{
+ if ((*ppFontGlyphData) && ((*ppFontGlyphData)->hasOwnerShip == 0))
+ {
+ //?? ykahn: false?
+ return false;
+ }
+
+ delete[] (char*) (*ppFontGlyphData);
+
+ *ppFontGlyphData = null;
+
+ return true;
+}
+
+unsigned long
+_FontFromImage::CheckGlyph(unsigned long character)
+{
+ return _HasEmoticonImage(character);
+}
+
+float
+_FontFromImage::GetFontSizeFromMaxHeight(_Util::FixedPoint26_6 expectedMaxHeight) const
+{
+ SizeProperty sizeProperty;
+
+ const float testSize = 100.0f;
+
+ if (!_GetImageGlyphSizeProperty(testSize, sizeProperty))
+ {
+ return 0.0f;
+ }
+
+ return expectedMaxHeight * testSize / sizeProperty.maxHeight;
+}
+
+bool
+_FontFromImage::GetFontSizeProperty(SizeProperty& sizeProperty) const
+{
+ return _GetImageGlyphSizeProperty(__fontAttrib.size.ToFloat(), sizeProperty);
+}
+
+bool
+_FontFromImage::GetFontProperty(Property& property) const
+{
+ property.fontCaps = _IFont::CAPS_SCALABLE;
+ property.styleCaps = _IFont::STYLE_NONE;
+
+ property.pEngineName = "";
+ property.pFamilyName = "";
+ property.pStyleName = "";
+ property.styleFlag = 0;
+ property.weightClass = 400;
+
+ return true;
+}
+
+bool
+_FontFromImage::GetGlyphList(const _Util::String& text, Tizen::Base::Collection::IListT<Glyph *>& out, int script)
+{
+ out.RemoveAll();
+
+ const wchar_t* pBegin = text.pStart;
+ const wchar_t* pEnd = pBegin + text.length;
+
+ for ( ; pBegin < pEnd; ++pBegin)
+ {
+ _IFont::Glyph* pFontGlyphData = 0;
+
+ if (!_GetImageGlyph(*pBegin, __fontAttrib.size.ToFloat(), &pFontGlyphData))
+ {
+ _CreateNullGlyph(&pFontGlyphData);
+ }
+
+ if (pFontGlyphData)
+ {
+ out.Add(pFontGlyphData);
+ }
+ }
+
+ return true;
+}
+
+_IFont::FontMapT*
+_FontFromImage::GetFallbackMap(void)
+{
+ return 0;
+}
+
+bool
+_FontFromImage::hasPredefinedColor(void) const
+{
+ return false;
+}
+
+bool
+_FontFromImage::Create(const void* pBuffer, long bufSize, long face)
+{
+ return false;
+}
+
+bool
+_FontFromImage::Create(const char* pFilePath, long face)
+{
+ return _IsVirtualFontFileName(pFilePath);
+}
+
+bool
+_FontFromImage::CreateStatic(const void* pBuffer, long bufSize, long face)
+{
+ return false;
+}
+
+bool
+_FontFromImage::Reload(const void* pBuffer, long bufSize, long face)
+{
+ return false;
+}
+
+bool
+_FontFromImage::Reload(const char* pFilePath, long face)
+{
+ return _IsVirtualFontFileName(pFilePath);
+}
+
+void
+_FontFromImage::Destroy(void)
+{
+}
+
+bool
+_FontFromImage::_ClearCache(void)
+{
+ return true;
+}
+
+bool
+_FontFromImage::__FindCache(unsigned long characterIndex, _Util::FixedPoint26_6 size, Glyph** pOut)
+{
+ for (unsigned int i = 0; i < _MAX_FONT_IMAGE_CACHE; i++)
+ {
+ if (__fontImageCache[i].character == characterIndex && __fontImageCache[i].size.__fixedPoint == size.__fixedPoint)
+ {
+ *pOut = __fontImageCache[i].pGlyph.get();
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool
+_FontFromImage::__AddCache(unsigned long characterIndex, _Util::FixedPoint26_6 size, Glyph* pGlyph)
+{
+ if (pGlyph->xAdvance == 0 && pGlyph->image.width == 0)
+ {
+ return false;
+ }
+
+ if (__fontAttrib.xExpansion != 1.0f)
+ {
+ return false;
+ }
+
+ unsigned long addIndex = __timeStamp % _MAX_FONT_IMAGE_CACHE;
+
+ __fontImageCache[addIndex].character = characterIndex;
+ __fontImageCache[addIndex].size = size;
+ __fontImageCache[addIndex].pGlyph.reset(pGlyph);
+ __timeStamp++;
+
+ return true;;
+}
+
+
+}} // Tizen::Graphics
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/*
+ * @file FGrp_FontFromImage.h
+ * @brief This is the header file for _FontFromImage class.
+ *
+ */
+
+#ifndef _FGRP_INTERNAL_FONT_FROM_IMAGE_H_
+#define _FGRP_INTERNAL_FONT_FROM_IMAGE_H_
+
+#include "FGrp_IFont.h"
+
+
+namespace Tizen { namespace Graphics
+{
+const unsigned int _MAX_FONT_IMAGE_CACHE = 20;
+
+struct _FontImageCache
+{
+ unsigned long character;
+ _Util::FixedPoint26_6 size;
+ std::auto_ptr<_IFont::Glyph> pGlyph;
+};
+
+
+class _FontFromImage
+ : public _IFont
+{
+public:
+ _FontFromImage();
+ virtual ~_FontFromImage(void) {}
+
+ //! Changes the attribute using fontAttrib.
+ virtual bool SetAttrib(const Attrib& fontAttrib);
+ //! Gets current attribute and store it in fontAttrib.
+ virtual bool GetAttrib(Attrib& fontAttrib) const;
+
+ //! Gets the value of the interval correctness between two characters.
+ virtual bool GetKerning(unsigned long ch1, unsigned long ch2, long& xVector, long& yVector) const;
+
+ //! Loads the font glyph data for displaying font.
+ virtual bool LoadGlyph(unsigned long character, Glyph** pFontGlyphData);
+ //! Releases the resource of the font glyph data that is not needed any more.
+ virtual bool UnloadGlyph(Glyph** pFontGlyphData);
+ //! Check if specified glyph is included.
+ virtual unsigned long CheckGlyph(unsigned long character);
+
+ virtual float GetFontSizeFromMaxHeight(_Util::FixedPoint26_6 expectedMaxHeight) const;
+
+ //! Gets the support range and the property for this font engine.
+ virtual bool GetFontSizeProperty(SizeProperty& sizeProperty) const;
+ virtual bool GetFontProperty(Property& property) const;
+
+ //! Harfbuzz test
+ virtual bool GetGlyphList(const _Util::String& text, Tizen::Base::Collection::IListT<Glyph *>& out, int script);
+
+ //! Gets the font fallback map.
+ virtual FontMapT* GetFallbackMap(void);
+
+ virtual bool hasPredefinedColor(void) const;
+
+protected:
+ //! Initializes a font instance with the font data on the memory buffer.
+ virtual bool Create(const void* pBuffer, long bufSize, long face);
+ //! Initializes a font instance with the font file.
+ virtual bool Create(const char* pFilePath, long face);
+ //! Initializes a font instance with the font data on the static memory buffer.
+ virtual bool CreateStatic(const void* pBuffer, long bufSize, long face);
+ //! Reloads a font instance with the font data on the memory buffer.
+ virtual bool Reload(const void* pBuffer, long bufSize, long face);
+ //! Reloads a font instance with the font file
+ virtual bool Reload(const char* filePath, long face);
+ //! Destroys the instance.
+ virtual void Destroy(void);
+ //! Clean cache
+ virtual bool _ClearCache(void);
+
+private:
+ _FontFromImage(const _FontFromImage& font);
+ _FontFromImage& operator =(const _FontFromImage& rhs);
+
+ bool __FindCache(unsigned long characterIndex, _Util::FixedPoint26_6 size, Glyph** pOut);
+ bool __AddCache(unsigned long characterIndex, _Util::FixedPoint26_6 size, Glyph* pGlyph);
+
+ _IFont::Attrib __fontAttrib;
+
+ //_FontImageCache
+ _FontImageCache __fontImageCache[_MAX_FONT_IMAGE_CACHE];
+ unsigned long __timeStamp;
+
+}; // _FontFromImage
+
+}} // Tizen::Graphics
+
+#endif // _FGRP_INTERNAL_FONT_FROM_IMAGE_H_
#include "FGrp_FontFt2.h"
#include "FGrp_FontCache.h"
#include "FGrp_FontBidiUtil.h"
+#include "FGrp_FontPrivate.h"
+
#include "util/FGrp_UtilTemplate.h"
#include "util/FGrp_UtilType.h"
const long _MEDIUM_FONT_BOLD_WEIGHT = 600;
-bool
-_CompareFamilyForTitling(const char* pFamilyName)
-{
- static const char* _compNames[] =
- {
- "TitlingGothicFB Comp",
- "TitlingGothicFB Cond",
- "TitlingGothicFB Narrow",
- "TitlingGothicFB Skyline"
- };
-
- for (unsigned int i = 0; i < sizeof(_compNames) / sizeof(_compNames[0]); i++)
- {
- if (strcmp(pFamilyName, _compNames[i]) == 0)
- {
- return true;
- }
- }
-
- return false;
-}
-
#ifdef USE_HASHMAP_FOR_FONT
template<class T>
class _FontHashCodeProvider
, __pFontFace(null)
, __pFontBuffer(null)
, __isStaticBuffer(false)
- , __isEmoji(false)
+ , __hasPredefinedColor(false)
{
__fontAttrib.size = _SYSTEM_DEFAULT_FONT_SIZE;
__fontAttrib.angle = 0.0f;
__fontAttrib.style = _IFont::STYLE_NONE;
__fontAttrib.quality = _IFont::QUALITY_HIGH;
- __fontAttrib.xExpansion = 100;
- __fontAttrib.boldWeight = _Util::FixedPoint26_6(1.0f);
+ __fontAttrib.xExpansion.Reset(_Util::FixedPoint26_6(1.0f));
+ __fontAttrib.boldWeight.Reset(_Util::FixedPoint26_6(1.0f));
#ifdef USE_HASHMAP_FOR_FONT
__fallbackFontMap.Construct(1, 0, _fontHashCodeProviderEx, _fontComparerEx);
}
bool
+_FontFt2::_ClearCache()
+{
+ return (__fontCache.get()) ? __fontCache->Cleanup() : false;
+}
+
+bool
_FontFt2::FindCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph** pOut)
{
return (__fontCache.get()) ? __fontCache->Find(glyphIndex, __fontAttrib.size, __fontAttrib.style, pOut) : false;
return false;
}
- return (__fontCache.get()) ? __fontCache->Add(glyphIndex, size, style, pGlyph) : false;
-}
+ if (__fontAttrib.xExpansion != 1.0f)
+ {
+ return false;
+ }
-bool
-_FontFt2::CleanCache()
-{
- return (__fontCache.get()) ? __fontCache->Cleanup() : false;
+ return (__fontCache.get()) ? __fontCache->Add(glyphIndex, size, style, pGlyph) : false;
}
bool
if (!(fontAttrib.size >= 1) ||
!(fontAttrib.quality >= 0 && fontAttrib.quality <= 3) ||
- !(fontAttrib.xExpansion >= 1) ||
- !(fontAttrib.size.ToInt() * fontAttrib.xExpansion >= _DEFAULT_RES) ||
+ !(fontAttrib.xExpansion > 0.0f) ||
!(fontAttrib.boldWeight > 0))
{
return false;
if (isSynthetic)
{
+#if 1
+ FT_Pos strength = FT_MulFix(pFace->units_per_EM, pFace->size->metrics.y_scale) / 64;
+
+ FT_Outline_Embolden(&pFace->glyph->outline, strength);
+#else
FT_Outline_Embolden(&pFace->glyph->outline, __fontAttrib.boldWeight.__fixedPoint);
+#endif
}
FT_Render_Glyph(pFace->glyph, FT_RENDER_MODE_NORMAL);
CHECK_NULL_PARAM(ppFontGlyphData);
- if ((*ppFontGlyphData) && ((*ppFontGlyphData)->hasOwnerShip == 0))
+ if ((*ppFontGlyphData) && ((*ppFontGlyphData)->hasOwnerShip != 1))
{
+ // s.woo Need to check condition.
return false;
}
*ppFontGlyphData = null;
__isLoadGlyph = false;
- return false;
+ return true;
}
unsigned long
FT_Set_Char_Size(FT_Face(__pFontFace), __fontAttrib.size.__fixedPoint * _DEFAULT_RES, __fontAttrib.size.__fixedPoint * _DEFAULT_RES, 1, 1);
- static const char* emojiFaceNames[] =
- {
- "keitaiemoji"
- };
-
- __isEmoji = false;
-
- for (unsigned int i = 0; i < sizeof(emojiFaceNames) / sizeof(emojiFaceNames[0]); i++)
- {
- if (strcmp(__fontProperty.pFamilyName, emojiFaceNames[i]) == 0)
- {
- __isEmoji = true;
- break;
- }
- }
+ __hasPredefinedColor = _CompareFamilyForPredefinedColor(__fontProperty.pFamilyName);
}
else
{
}
bool
-_FontFt2::IsEmoji(void) const
+_FontFt2::hasPredefinedColor(void) const
{
- return __isEmoji;
+ return __hasPredefinedColor;
}
bool
if (isSynthetic)
{
+#if 1
+ FT_Pos strength = FT_MulFix(pFace->units_per_EM, pFace->size->metrics.y_scale) / 64;
+
+ FT_Outline_Embolden(&pFace->glyph->outline, strength);
+#else
FT_Outline_Embolden(&pFace->glyph->outline, __fontAttrib.boldWeight.__fixedPoint);
+#endif
}
error = FT_Render_Glyph(pFace->glyph, FT_RENDER_MODE_NORMAL);
pFontGlyphData->xOffset = _Util::FixedPoint22_10(pSlot->bitmap_left);
pFontGlyphData->yOffset = _Util::FixedPoint22_10(pSlot->bitmap_top);
- AddCache(glyphIndex, __fontAttrib.size, __fontAttrib.style, pFontGlyphData);
+ if (*(reorderedText.pStart + i) > 255)
+ {
+ AddCache(glyphIndex, __fontAttrib.size, __fontAttrib.style, pFontGlyphData);
- pFontGlyphData->hasOwnerShip = 1;
+ pFontGlyphData->hasOwnerShip = 1;
+ }
}
return true;
}
+float
+_FontFt2::GetFontSizeFromMaxHeight(_Util::FixedPoint26_6 expectedMaxHeight) const
+{
+ FT_Face pFace = (FT_Face) __pFontFace;
+
+ if (pFace == null)
+ {
+ return -1.0f;
+ }
+
+ int verticalResolution = 1;
+
+ _Util::FixedPoint26_6 fontSize;
+ fontSize.Reset(pFace->units_per_EM * expectedMaxHeight / (pFace->height * verticalResolution) - (1 / (2 * verticalResolution)));
+
+ return fontSize.ToFloat();
+}
+
void
_FontFt2::__CleanUp()
{
if (_IsEqual(0.0f, __fontAttrib.angle))
{
// apply font size
- pTrans->xx = (FT_Fixed) (0x10000 * (__fontAttrib.xExpansion)) / 100;
+ pTrans->xx = (FT_Fixed) 0x10000 * __fontAttrib.xExpansion.ToDouble();
pTrans->xy = (FT_Fixed) 0;
pTrans->yx = (FT_Fixed) 0;
pTrans->yy = (FT_Fixed) 0x10000;
{
double radAngle = __fontAttrib.angle * radian;
- pTrans->xx = (FT_Fixed) (cos(radAngle) * (__fontAttrib.xExpansion) * 0x10000) / 100;
+ pTrans->xx = (FT_Fixed) (cos(radAngle) * __fontAttrib.xExpansion.ToDouble() * 0x10000);
pTrans->xy = (FT_Fixed) (-sin(radAngle) * 0x10000);
- pTrans->yx = (FT_Fixed) (sin(radAngle) * (__fontAttrib.xExpansion) * 0x10000) / 100;
+ pTrans->yx = (FT_Fixed) (sin(radAngle) * __fontAttrib.xExpansion.ToDouble() * 0x10000);
pTrans->yy = (FT_Fixed) (cos(radAngle) * 0x10000);
// apply italic style
/*
* @file FGrp_FontFt2.h
- * @brief This is the header file for FGrp_FontFt2 class.
+ * @brief This is the header file for _FontFt2 class.
*
*/
virtual _IFont::FontMapT* GetFallbackMap(void);
- virtual bool IsEmoji(void) const;
+ virtual float GetFontSizeFromMaxHeight(_Util::FixedPoint26_6 expectedMaxHeight) const;
+
+ virtual bool hasPredefinedColor(void) const;
protected:
virtual bool Create(const void* pBuffer, long bufSize, long face = 0);
virtual bool Reload(const void* pBuffer, long bufSize, long face = 0);
virtual bool Reload(const char* filePath, long face = 0);
virtual void Destroy(void);
- virtual bool FindCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph** pOut);
- virtual bool AddCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph* pGlyph);
- virtual bool CleanCache(void);
+ virtual bool _ClearCache(void);
+
+ bool FindCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph** pOut);
+ bool AddCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph* pGlyph);
private:
_FontFt2(const _FontFt2& font);
void* __pFontFace;
void* __pFontBuffer;
bool __isStaticBuffer;
- bool __isEmoji;
+ bool __hasPredefinedColor;
//_FontCache fontCache;
std::auto_ptr<_FontCache> __fontCache;
#define IsSucceeded(X) (!IsFailed(X))
-#if 1
-#define CRITICAL_SECTION _MutexGuard __mutexGuard__
+#ifdef _MUTEX_GUARD_NOT_SUPPORTED
+ #define CRITICAL_SECTION
#else
-#define CRITICAL_SECTION
+ #define CRITICAL_SECTION _MutexGuard __mutexGuard__
#endif
struct _FontCoordHolder
{
- _ResUtil::CoordHolder <int> size;
- _ResUtil::CoordHolder <int> charSpace;
- _ResUtil::CoordHolder <float> sizeF;
- _ResUtil::CoordHolder <float> charSpaceF;
+ _ResUtil::CoordinateHolder <float, int> size;
+ _ResUtil::CoordinateHolder <float, int> charSpace;
_FontCoordHolder()
+ : __pcBaseScale(1.0f)
+ , __vcBaseScale(1.0f)
{
- Reset(-1);
- Reset(-1.0f);
+ _CoordinateSystem* pCoordinateSystem = _CoordinateSystem::GetInstance();
+
+ if (pCoordinateSystem)
+ {
+ __pcBaseScale = pCoordinateSystem->GetTargetBaseScaleFactor();
+ __vcBaseScale = pCoordinateSystem->GetAppBaseScaleFactor();
+ }
+
+ ResetFromVc(-1);
}
- void Reset(int _size)
+ void ResetFromVc(int intVcSize)
{
- size = _size;
- charSpace = 0;
- sizeF = static_cast<float>(_size);
- charSpaceF = 0.0f;
+ this->ResetFromVc(static_cast<float>(intVcSize));
+ size.vcInt = intVcSize;
+ size.vcFloatActual = static_cast<float>(intVcSize);
}
- void Reset(float _size)
+ void ResetFromVc(float floatVcSize)
{
- size = static_cast<int>(_size);
- charSpace = 0;
- sizeF = _size;
- charSpaceF = 0.0f;
+ size.vcInt = _FloatToIntForSize(floatVcSize);
+ size.pcInt = _FloatToIntForSize(static_cast<float>(__ConvertToPhyCoord(floatVcSize)));
+ size.vcFloat = floatVcSize;
+ size.vcFloatActual = size.vcFloat;
+
+ SetCharSpaceFromVc(0.0f);
+ }
+
+ void ResetFromPc(int intPcSize)
+ {
+ this->ResetFromPc(static_cast<float>(intPcSize));
+ size.pcInt = intPcSize;
+ }
+
+ void ResetFromPc(float floatPcSize)
+ {
+ size.vcInt = _FloatToIntForSize(static_cast<float>(__ConvertToVirCoord(floatPcSize)));
+ size.pcInt = _FloatToIntForSize(floatPcSize);
+ size.vcFloat = static_cast<float>(__ConvertToVirCoord(floatPcSize));
+ size.vcFloatActual = static_cast<float>(__ConvertToVirCoord(static_cast<double>(size.pcInt)));
+
+ SetCharSpaceFromVc(0.0f);
+ }
+
+ void SetCharSpaceFromVc(int intVcSize)
+ {
+ this->SetCharSpaceFromVc(static_cast<float>(intVcSize));
+ charSpace.vcInt = intVcSize;
+ charSpace.vcFloatActual = static_cast<float>(intVcSize);
+ }
+
+ void SetCharSpaceFromVc(float floatVcSize)
+ {
+ charSpace.vcInt = _FloatToIntForPos(floatVcSize);
+ charSpace.pcInt = _FloatToIntForPos(static_cast<float>(__ConvertToPhyCoord(floatVcSize)));
+ charSpace.vcFloat = floatVcSize;
+ charSpace.vcFloatActual = floatVcSize;
+ }
+
+private:
+ double __pcBaseScale;
+ double __vcBaseScale;
+
+ inline double __ConvertToPhyCoord(double val)
+ {
+ return val * __pcBaseScale / __vcBaseScale;
+ }
+
+ inline double __ConvertToVirCoord(double val)
+ {
+ return val * __vcBaseScale / __pcBaseScale;
}
};
result r = _pNativeFont->Construct(style, pcSize);
SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r));
- _pCoordHolder->Reset(vcSize);
+ _pCoordHolder->ResetFromVc(vcSize);
return E_SUCCESS;
}
result r = _pNativeFont->Construct(fontName, style, pcSize, isPathEnabled);
SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r));
- _pCoordHolder->Reset(vcSize);
+ _pCoordHolder->ResetFromVc(vcSize);
return E_SUCCESS;
}
result r = _pNativeFont->Construct(fontData, style, pcSize);
SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r));
- _pCoordHolder->Reset(vcSize);
+ _pCoordHolder->ResetFromVc(vcSize);
return E_SUCCESS;
}
result r = _pNativeFont->Construct(style, pcSize);
SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r));
- _pCoordHolder->Reset(vcSize);
+ _pCoordHolder->ResetFromVc(vcSize);
return E_SUCCESS;
}
result r = _pNativeFont->Construct(fontName, style, pcSize, isPathEnabled);
SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r));
- _pCoordHolder->Reset(vcSize);
+ _pCoordHolder->ResetFromVc(vcSize);
return E_SUCCESS;
}
result r = _pNativeFont->Construct(fontData, style, pcSize);
SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r));
- _pCoordHolder->Reset(vcSize);
+ _pCoordHolder->ResetFromVc(vcSize);
return E_SUCCESS;
}
CRITICAL_SECTION;
IF_NOT_CONSTRUCTED(return -1);
- return _pCoordHolder->size.required;
+ return _FloatToIntForSize(_pCoordHolder->size.vcFloatActual);
}
float
CRITICAL_SECTION;
IF_NOT_CONSTRUCTED(return -1.0f);
- return _pCoordHolder->sizeF.required;
+ return _pCoordHolder->size.vcFloatActual;
+}
+
+result
+_FontImpl::SetXExpansion(float xExpansion)
+{
+ CRITICAL_SECTION;
+ IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED);
+ SysTryReturnResult(NID_GRP, xExpansion > 0.0f, E_INVALID_ARG, "Expansion value should be greater than 0");
+
+ return _pNativeFont->SetXExpansion(_Util::FixedPoint26_6(xExpansion));
}
void
IF_NOT_CONSTRUCTED(return);
// save it
- _pCoordHolder->charSpace = vcSpace;
+ _pCoordHolder->SetCharSpaceFromVc(vcSpace);
- // convert VC -> PC
- int pcSpace = _ResUtil::ConvertToPhyCoordWidth(vcSpace);
-
- _pNativeFont->SetCharSpace(pcSpace);
+ _pNativeFont->SetCharSpace(_pCoordHolder->charSpace.pcInt);
return;
}
IF_NOT_CONSTRUCTED(return);
// save it
- _pCoordHolder->charSpaceF = vcSpace;
-
- // convert VC -> PC
- float pcSpace = _ResUtil::ConvertToPhyCoordWidth(vcSpace);
+ _pCoordHolder->SetCharSpaceFromVc(vcSpace);
- _pNativeFont->SetCharSpace(_FloatToIntForPos(pcSpace));
+ _pNativeFont->SetCharSpace(_pCoordHolder->charSpace.pcInt);
return;
}
CRITICAL_SECTION;
IF_NOT_CONSTRUCTED(return 0);
- return _pCoordHolder->charSpace.required;
+ return _pCoordHolder->charSpace.vcInt;
}
float
CRITICAL_SECTION;
IF_NOT_CONSTRUCTED(return 0.0f);
- return _pCoordHolder->charSpaceF.required;
+ return _pCoordHolder->charSpace.vcFloatActual;
}
Tizen::Base::String
std::auto_ptr<_FontImpl> pFontImpl(new (std::nothrow) _FontImpl(*this));
- SysTryReturn(NID_GRP, pFontImpl.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocated memory");
+ SysTryReturn(NID_GRP, pFontImpl.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
SysTryReturn(NID_GRP, pFontImpl->_pNativeFont, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] FontEx::CloneN() has been failed");
return pFontImpl.release();
// make sure if the copy construction is well done
std::auto_ptr<Font> pFont(new (std::nothrow) Font(font));
- SysTryReturn(NID_GRP, pFont.get() && pFont->__pImpl && pFont->__pImpl->IsConstructed(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
+ SysTryReturn(NID_GRP, pFont.get() && pFont->__pImpl && pFont->__pImpl->IsConstructed(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ return pFont.release();
+}
+
+Font*
+_FontImpl::CreateFontN(int style, float expectedMaxHeight)
+{
+ CRITICAL_SECTION;
+ SysTryReturn(NID_GRP, expectedMaxHeight > 0.0f, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified max-height MUST be greater than 0.0f.");
+
+ _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(expectedMaxHeight));
+
+ std::auto_ptr<Font> pFont(new (std::nothrow) Font());
+ SysTryReturn(NID_GRP, pFont.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ _FontImpl* pFontImpl = _FontImpl::GetInstance(*pFont);
+ SysTryReturn(NID_GRP, pFontImpl, null, E_SYSTEM, "[E_SYSTEM] Getting native font instance failed.");
+
+ result r = pFontImpl->_pNativeFont->Construct(style, _Util::FixedPoint26_6(expectedMaxHeight));
+ SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] _Font construct is failed.", GetErrorMessage(r));
+
+ _Util::CarveMagicKey(*pFontImpl, pFontImpl->_magicKey);
+ SysTryReturn(NID_GRP, pFontImpl->IsConstructed(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ float fontPcSize = pFontImpl->_pNativeFont->GetFontSizeFromMaxHeight(pcSize);
+
+ pFontImpl->_pCoordHolder->ResetFromPc(fontPcSize);
+ pFontImpl->SetSize(pFontImpl->_pCoordHolder->size.vcFloat);
+
+ return pFont.release();
+}
+
+Font*
+_FontImpl::CreateFontN(const Tizen::Base::String& fontName, int style, float expectedMaxHeight)
+{
+ CRITICAL_SECTION;
+ SysTryReturn(NID_GRP, expectedMaxHeight > 0.0f, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified max-height MUST be greater than 0.0f.");
+
+ _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(expectedMaxHeight));
+
+ std::auto_ptr<Font> pFont(new (std::nothrow) Font());
+ SysTryReturn(NID_GRP, pFont.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ _FontImpl* pFontImpl = _FontImpl::GetInstance(*pFont);
+ SysTryReturn(NID_GRP, pFontImpl, null, E_SYSTEM, "[E_SYSTEM] Getting native font instance failed.");
+
+ result r = pFontImpl->_pNativeFont->Construct(fontName, style, _Util::FixedPoint26_6(expectedMaxHeight));
+ SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] _Font construct is failed.", GetErrorMessage(r));
+
+ _Util::CarveMagicKey(*pFontImpl, pFontImpl->_magicKey);
+ SysTryReturn(NID_GRP, pFontImpl->IsConstructed(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ float fontPcSize = pFontImpl->_pNativeFont->GetFontSizeFromMaxHeight(pcSize);
+
+ pFontImpl->_pCoordHolder->ResetFromPc(fontPcSize);
+ pFontImpl->SetSize(pFontImpl->_pCoordHolder->size.vcFloat);
return pFont.release();
}
IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED);
SysTryReturnResult(NID_GRP, vcSize > 0, E_INVALID_ARG, "Font size should be greater than 0");
- _pCoordHolder->Reset(vcSize);
+ _pCoordHolder->ResetFromVc(vcSize);
// convert VC -> PC
_Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(vcSize));
{
pcSize = _Util::FixedPoint26_6(1);
- _pCoordHolder->size.phyCoord = 1;
- _pCoordHolder->size.virCoord = vcSize;
+ _pCoordHolder->ResetFromPc(1);
+ _pCoordHolder->size.vcInt = vcSize;
+ _pCoordHolder->size.vcFloat = static_cast<float>(vcSize);
+ _pCoordHolder->size.vcFloatActual = _pCoordHolder->size.vcFloat;
}
result r = _pNativeFont->SetSize(pcSize);
IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED);
SysTryReturnResult(NID_GRP, vcSize > 0.0f, E_INVALID_ARG, "Font size should be greater than 0");
- _pCoordHolder->Reset(vcSize);
+ _pCoordHolder->ResetFromVc(vcSize);
// convert VC -> PC
_Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(vcSize));
{
pcSize = _Util::FixedPoint26_6(1.0f);
- _pCoordHolder->sizeF.phyCoord = 1.0f;
- _pCoordHolder->sizeF.virCoord = vcSize;
+ _pCoordHolder->ResetFromPc(1.0f);
+ _pCoordHolder->size.vcInt = static_cast<int>(vcSize);
+ _pCoordHolder->size.vcFloat = vcSize;
+ _pCoordHolder->size.vcFloatActual = _pCoordHolder->size.vcFloat;
}
result r = _pNativeFont->SetSize(pcSize);
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/*
+ * @file FGrp_FontPrivate.cpp
+ * @brief This is the implementation file for the private part of _Font class.
+ *
+ */
+
+#include "FGrp_FontPrivate.h"
+
+
+namespace Tizen { namespace Graphics
+{
+
+namespace
+{
+
+static const char* _familyForTitling[] =
+{
+ 0 // NULL
+};
+
+static const char* _familyForPredefinedColor[] =
+{
+ 0 // NULL
+};
+
+inline unsigned long
+_GetPredefinedColorPrivate(unsigned long unicode, unsigned long defaultColor)
+{
+ return defaultColor;
+}
+
+inline bool
+_CompareFamily(const char** ppTableBegin, const char** ppTableEnd, const char* pFamilyName)
+{
+ while (*ppTableBegin && ppTableBegin < ppTableEnd)
+ {
+ if (strcmp(pFamilyName, *ppTableBegin) == 0)
+ {
+ return true;
+ }
+
+ ++ppTableBegin;
+ }
+
+ return false;
+}
+
+}
+
+
+bool
+_CompareFamilyForTitling(const char* pFamilyName)
+{
+ const char** pBegin = &_familyForTitling[0];
+ const char** pEnd = pBegin + sizeof(_familyForTitling) / sizeof(_familyForTitling[0]);
+
+ return _CompareFamily(pBegin, pEnd, pFamilyName);
+}
+
+bool
+_CompareFamilyForPredefinedColor(const char* pFamilyName)
+{
+ const char** pBegin = &_familyForPredefinedColor[0];
+ const char** pEnd = pBegin + sizeof(_familyForPredefinedColor) / sizeof(_familyForPredefinedColor[0]);
+
+ return _CompareFamily(pBegin, pEnd, pFamilyName);
+}
+
+unsigned long
+_GetPredefinedColor(unsigned long unicode, unsigned long defaultColor)
+{
+ return _GetPredefinedColorPrivate(unicode, defaultColor);
+}
+
+}} // Tizen::Graphics
+
+
+namespace Tizen { namespace Graphics
+{
+
+bool
+_HasEmoticonImage(unsigned long character)
+{
+ return false;
+}
+
+const wchar_t*
+_GetVirtualFileNameForEmoticon(void)
+{
+ return L"";
+}
+
+bool
+_IsVirtualFontFileName(const char* pFileName)
+{
+ return false;
+}
+
+bool
+_IsVirtualFontFileName(const wchar_t* pFileName)
+{
+ return false;
+}
+
+bool _GetImageGlyph(unsigned long character, float size, _IFont::Glyph** ppFontGlyphData)
+{
+ return false;
+}
+
+bool _GetImageGlyphSizeProperty(float size, _IFont::SizeProperty& sizeProperty)
+{
+ return false;
+}
+
+}} // Tizen::Graphics
\ No newline at end of file
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/*
+ * @file FGrp_FontPrivate.h
+ * @brief This is the header file for the private part of _Font class.
+ *
+ */
+
+#ifndef _FGRP_INTERNAL_FONT_PRIVATE_H_
+#define _FGRP_INTERNAL_FONT_PRIVATE_H_
+
+#include "FGrp_IFont.h"
+
+
+namespace Tizen { namespace Graphics
+{
+
+bool _CompareFamilyForTitling(const char* pFamilyName);
+bool _CompareFamilyForPredefinedColor(const char* pFamilyName);
+unsigned long _GetPredefinedColor(unsigned long unicode, unsigned long defaultColor);
+
+}} // Tizen::Graphics
+
+
+namespace Tizen { namespace Graphics
+{
+
+bool _HasEmoticonImage(unsigned long character);
+const wchar_t* _GetVirtualFileNameForEmoticon(void);
+bool _IsVirtualFontFileName(const char* pFileName);
+bool _IsVirtualFontFileName(const wchar_t* pFileName);
+
+}} // Tizen::Graphics
+
+
+namespace Tizen { namespace Graphics
+{
+
+bool _GetImageGlyph(unsigned long character, float size, _IFont::Glyph** ppFontGlyphData);
+bool _GetImageGlyphSizeProperty(float size, _IFont::SizeProperty& pSizeProperty);
+
+}} // Tizen::Graphics
+
+#endif // _FGRP_INTERNAL_FONT_PRIVATE_H_
#include "FGrp_FontRsrcManager.h"
#include "FGrp_FontMemoryManager.h"
#include "FGrp_FontFt2.h"
+#include "FGrp_FontFromImage.h"
+#include "FGrp_FontPrivate.h"
#define USE_REMOVE_ALL_CACHE
#define USE_MMAP
{
const int _DEFAULT_FONT_ENGINE = 0;
+const int _FONT_ENGINE_IMAGE = 1;
const int _DEFAULT_FONT_FACE = 0;
const char* _DEFAULT_SYSTEM_FONT = "DefaultSystemFont";
const char* _DEFAULT_SYSTEM_BOLD_FONT = "DefaultSystemBoldFont";
const _Util::FixedPoint26_6 _SYSTEM_DEFAULT_FONT_SIZE(16);
-const int _BLACK_LIST_MAX_COUNT = 1000;
+const unsigned int _BLACK_LIST_MAX_COUNT = 1000;
+const unsigned int _SPACE_LIST_MAX_COUNT = 1000;
class _FontNull
: public Tizen::Graphics::_IFont
return null;
}
- virtual bool IsEmoji(void) const
+ virtual float GetFontSizeFromMaxHeight(_Util::FixedPoint26_6 expectedMaxHeight) const
+ {
+ return 0.0f;
+ }
+
+ virtual bool hasPredefinedColor(void) const
{
return false;
}
virtual void Destroy(void) {}
- virtual bool FindCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph** pOut)
- {
- return false;
- }
-
- virtual bool AddCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph* pGlyph)
- {
- return false;
- }
-
- virtual bool CleanCache(void)
+ virtual bool _ClearCache(void)
{
return false;
}
static _FontComparerEx<_Util::WString> fontComparerEx;
__fontRsrcMap.Construct(0, 0, fontHashCodeProviderEx, fontComparerEx);
__appFontMap.Construct(0, 0, fontHashCodeProviderEx, fontComparerEx);
+#else
+ __fontRsrcMap.clear();
+ __appFontMap.clear();
#endif
+ __blackListUnicodeSet.clear();
+ __spaceListUnicodeSet.clear();
+
__defaultSystemFontPath.Clear();
__defaultSystemBoldFontPath.Clear();
__pDefaultSystemFont = null;
__appFontMap.clear();
#endif
+ __blackListUnicodeSet.clear();
+ __spaceListUnicodeSet.clear();
+
delete __pDefaultSystemFont;
delete __pFontMemoryManager;
// create font
rtn = __CreateFont(_DEFAULT_FONT_ENGINE, buffer.get(), fileLength, _DEFAULT_FONT_FACE, &pFont);
#endif
- std::auto_ptr<_IFont> autoPtrFont(pFont);
- SysTryReturnResult(NID_GRP, rtn && autoPtrFont.get() != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance");
+ SysTryReturnResult(NID_GRP, rtn && pFont != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance");
// make shared resource
- sharedFont.reset(autoPtrFont.release());
+ sharedFont.reset(pFont);
_IFont::Attrib fontAttrib;
rtn = pFont->GetAttrib(fontAttrib);
bool rtn = false;
//unsigned char* pBuffer = null;
- //--------------------------------------------------------------------------
- // validation check of input param
- //
- // in case input fontPath is indicating folder,
- // we should return 'E_UNSUPPORTED_FORMAT' as bads 2.0 did.
- //--------------------------------------------------------------------------
+ if (!_IsVirtualFontFileName(fontPath.GetPointer()))
{
- FileAttributes attr;
- result r = File::GetAttributes(fontPath, attr);
- if (IsFailed(r))
- {
- return E_FILE_NOT_FOUND;
- }
- else if (attr.IsDirectory())
+ //--------------------------------------------------------------------------
+ // validation check of input param
+ //
+ // in case input fontPath is indicating folder,
+ // we should return 'E_UNSUPPORTED_FORMAT' as bads 2.0 did.
+ //--------------------------------------------------------------------------
{
- return E_UNSUPPORTED_FORMAT;
+ FileAttributes attr;
+ result r = File::GetAttributes(fontPath, attr);
+ if (IsFailed(r))
+ {
+ return E_FILE_NOT_FOUND;
+ }
+ else if (attr.IsDirectory())
+ {
+ return E_UNSUPPORTED_FORMAT;
+ }
}
}
std::auto_ptr<ByteBuffer> pathString(pBuffer);
rtn = __CreateFont(_DEFAULT_FONT_ENGINE, (char*)pathString->GetPointer(), _DEFAULT_FONT_FACE, &pFont);
-
- std::auto_ptr<_IFont> autoPtrFont(pFont);
- SysTryReturnResult(NID_GRP, rtn && autoPtrFont.get() != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance");
+ SysTryReturnResult(NID_GRP, rtn && pFont != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance");
// make shared resource
- sharedFont.reset(autoPtrFont.release());
+ sharedFont.reset(pFont);
_IFont::Attrib fontAttrib;
rtn = pFont->GetAttrib(fontAttrib);
__blackListUnicodeSet.clear();
}
+void
+_FontRsrcManager::AddSpaceList(const wchar_t unicode)
+{
+ if (__spaceListUnicodeSet.size() > _SPACE_LIST_MAX_COUNT)
+ {
+ this->ClearSpaceList();
+ }
+
+ __spaceListUnicodeSet.insert(unicode);
+}
+
+bool
+_FontRsrcManager::SearchSpaceList(const wchar_t unicode) const
+{
+ SpaceListSetT::const_iterator spaceListIterator = __spaceListUnicodeSet.find(unicode);
+
+ return (spaceListIterator != __spaceListUnicodeSet.end());
+}
+
+void
+_FontRsrcManager::ClearSpaceList()
+{
+ __spaceListUnicodeSet.clear();
+}
+
result
_FontRsrcManager::GetFont(const byte* pFontData, int fontDataSize, int style, _Util::FixedPoint26_6 size, SharedFontResource& out)
{
// create new font with user resource.
//--------------------------------------------------------------------------
bool rtn = __CreateFont(_DEFAULT_FONT_ENGINE, pFontData, fontDataSize, _DEFAULT_FONT_FACE, &pFont);
- std::auto_ptr<_IFont> autoPtrFont(pFont);
- SysTryReturnResult(NID_GRP, rtn && autoPtrFont.get() != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont");
+ SysTryReturnResult(NID_GRP, rtn && pFont != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont");
// make shared resource
- sharedFont.reset(autoPtrFont.release());
+ sharedFont.reset(pFont);
_IFont::Attrib fontAttrib;
rtn = pFont->GetAttrib(fontAttrib);
rtn = __CreateFont(_DEFAULT_FONT_ENGINE, autoPtrBuffer.get(), fileLength, _DEFAULT_FONT_FACE, &pFont);
#endif
- std::auto_ptr<_IFont> autoPtrFont(pFont);
- SysTryReturnResult(NID_GRP, rtn && autoPtrFont.get() != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance");
+ SysTryReturnResult(NID_GRP, rtn && pFont != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance");
// make shared resource
- sharedFont.reset(autoPtrFont.release());
+ sharedFont.reset(pFont);
_IFont::Attrib fontAttrib;
rtn = pFont->GetAttrib(fontAttrib);
switch (fontEngine)
{
- case 0:
+ case _DEFAULT_FONT_ENGINE:
autoPtrFont.reset(new (std::nothrow) _FontFt2);
break;
break;
}
- SysTryReturn(NID_GRP, autoPtrFont.get() != null, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory");
+ SysTryReturn(NID_GRP, autoPtrFont.get() != null, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
bool rtn = autoPtrFont->Create(pBuffer, bufSize, face);
SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to create font resource");
// check input param
SysTryReturn(NID_GRP, ppOut, false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid out param is given");
+ if (_IsVirtualFontFileName(filePath))
+ {
+ fontEngine = _FONT_ENGINE_IMAGE;
+ }
+
std::auto_ptr<_IFont> autoPtrFont;
switch (fontEngine)
{
- case 0:
+ case _DEFAULT_FONT_ENGINE:
autoPtrFont.reset(new (std::nothrow) _FontFt2);
break;
-
+ case _FONT_ENGINE_IMAGE:
+ autoPtrFont.reset(new (std::nothrow) _FontFromImage);
+ break;
default:
autoPtrFont.reset(new (std::nothrow) _FontNull);
break;
}
- SysTryReturn(NID_GRP, autoPtrFont.get() != null, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory");
+ SysTryReturn(NID_GRP, autoPtrFont.get() != null, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
bool rtn = autoPtrFont->Create(filePath, face);
SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to create font resource");
break;
}
- SysTryReturn(NID_GRP, autoPtrFont.get() != null, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory");
+ SysTryReturn(NID_GRP, autoPtrFont.get() != null, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
bool rtn = autoPtrFont->CreateStatic(pBuffer, bufSize, face);
SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to create font resource");
SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to reload font");
#endif
- pFont->CleanCache();
+ pFont->_ClearCache();
this->ClearBlackList();
}
SharedFontResource fontRsrc;
r = enumerator->GetValue(fontRsrc);
- fontRsrc.get()->CleanCache();
+ fontRsrc->_ClearCache();
}
return true;
{
SharedFontResource fontRsrc(fontIterator->second);
- fontRsrc.get()->CleanCache();
+ fontRsrc->_ClearCache();
}
return true;
SharedFontResource fontRsrc;
r = enumerator->GetValue(fontRsrc);
- while (!fontRsrc.get()->second->IsEmpty())
+ while (!fontRsrc->second->IsEmpty())
{
- fontRsrc.get()->second->RemoveFirst();
+ fontRsrc->second->RemoveFirst();
remainedMemory = __pFontMemoryManager->GetRemainedMemory();
//dirName = L"/usr/share/app_font";
dirName = Tizen::App::App::GetInstance()->GetAppResourcePath() + L"font";
+ if (File::IsFileExist(dirName) == false)
+ {
+ return fontPath;
+ }
+
// Open the directory
if (IsFailed(dir.Construct(dirName)))
{
public:
typedef std::tr1::shared_ptr<_IFont> SharedFontResource;
typedef std::set<wchar_t> BlackListSetT;
+ typedef std::set<wchar_t> SpaceListSetT;
#ifdef USE_HASHMAP_FOR_FONT
typedef Tizen::Base::Collection::HashMapT <_Util::WString, SharedFontResource> FontMapT;
typedef Tizen::Base::Collection::HashMapT <_Util::WString, _Util::WString> AppFontMapT;
bool SearchBlackList(const wchar_t) const;
void ClearBlackList(void);
+ void AddSpaceList(const wchar_t);
+ bool SearchSpaceList(const wchar_t) const;
+ void ClearSpaceList(void);
+
bool ReloadDefaultSystemFont(void);
_FontMemoryManager& GetMemoryManager(void);
_Font& GetDefaultSystemFont(void);
FontMapT __fontRsrcMap;
AppFontMapT __appFontMap;
BlackListSetT __blackListUnicodeSet;
+ SpaceListSetT __spaceListUnicodeSet;
Tizen::Base::String __defaultSystemFontPath;
Tizen::Base::String __defaultSystemBoldFontPath;
}} // Tizen::Graphics
#endif // _FGRP_INTERNAL_FONT_RSRC_MANAGER_H_
+
unsigned int style; //!< Style of the font. (_IFont::Style)
int quality; //!< Quality of the font. (_IFont::Quality)
float angle; //!< Angle of the font.
- long xExpansion; //!< Expansion of the font.
+ _Util::FixedPoint26_6 xExpansion; //!< Expansion of the font.
_Util::FixedPoint26_6 boldWeight; //!< Bold weight of the font
};
//! Check if specified glyph is included.
virtual unsigned long CheckGlyph(unsigned long character) = 0;
+ virtual float GetFontSizeFromMaxHeight(_Util::FixedPoint26_6 expectedMaxHeight) const = 0;
+
//! Gets the support range and the property for this font engine.
virtual bool GetFontSizeProperty(SizeProperty& sizeProperty) const = 0;
virtual bool GetFontProperty(Property& property) const = 0;
//! Gets the font fallback map.
virtual FontMapT* GetFallbackMap(void) = 0;
- virtual bool IsEmoji(void) const = 0;
+ virtual bool hasPredefinedColor(void) const = 0;
protected:
//! Initializes a font instance with the font data on the memory buffer.
virtual bool Reload(const char* filePath, long face = 0) = 0;
//! Destroys the instance.
virtual void Destroy(void) = 0;
- //! Finds glyph in the cache
- virtual bool FindCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph** pOut) = 0;
- //! Adds glyph in the cache
- virtual bool AddCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph* pGlyph) = 0;
//! Clean cache
- virtual bool CleanCache(void) = 0;
+ virtual bool _ClearCache(void) = 0;
private:
friend class _FontRsrcManager;
/*
* @file FGrp_NonScale.cpp
- * @brief This is the header file for internal util class.
+ * @brief This is the implementation file for internal util class.
*
*/
////////////////////////////////////////////////////////////////////////////////
-template<typename T>
-struct CoordHolder
-{
- T required;
- T phyCoord;
- T virCoord;
-
- void operator =(const T& in)
- {
- required = in;
- phyCoord = ConvertToPhyCoord(required);
- virCoord = ConvertToVirCoord(phyCoord);
- }
-};
-
template<typename FloatType, typename IntType>
struct CoordinateHolder
{
/*
* @file FGrp_Screen.cpp
- * @brief This is the header file for internal _Screen namespace.
+ * @brief This is the implementation file for internal _Screen namespace.
*
*/
_TextElementImpl::SetText(const Tizen::Base::String& text)
{
SysTryReturn(NID_GRP, text.IsEmpty() == false, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "E_OPERATION_FAILED] Not Construct yet");
+ SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Not Construct yet");
result r = E_SUCCESS;
{
SysTryReturn(NID_GRP, _Util::CheckValidity(&font), E_INVALID_ARG, E_INVALID_ARG
, "[E_INVALID_ARG] The infomation of the given font is invalid.");
- SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "E_OPERATION_FAILED] Not Construct yet");
+ SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Not Construct yet");
result r = E_SUCCESS;
TextSimple* pTextElement = null;
result
_TextElementImpl::SetTextColor(const Tizen::Graphics::Color& color)
{
- SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "E_OPERATION_FAILED] Not Construct yet");
+ SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Not Construct yet");
__foregroundColor = color;
result
_TextElementImpl::SetBackgroundColor(const Tizen::Graphics::Color& color)
{
- SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "E_OPERATION_FAILED] Not Construct yet");
+ SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Not Construct yet");
__backgroundColor = color;
__bgColorEnable = true;
result
_TextElementImpl::SetOutlineColor(const Tizen::Graphics::Color& color)
{
- SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "E_OPERATION_FAILED] Not Construct yet");
+ SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Not Construct yet");
__outlineColor = color;
__outlineColorEnable = true;
{
std::auto_ptr <_Util::Pixmap> dstImage(new (std::nothrow) _Util::Pixmap(width, height, sizeof(Pixel) * 8));
- SysTryReturn(NID_GRP, dstImage.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, dstImage.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
Pixel* pDest = (Pixel*) dstImage->pBitmap;
std::unique_ptr<long[]> tempLeftVertices(new (std::nothrow) long[numVerticalPixel]);
std::unique_ptr<long[]> tempRightVertices(new (std::nothrow) long[numVerticalPixel]);
- SysTryReturn(NID_GRP, tempLeftVertices && tempRightVertices, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, tempLeftVertices && tempRightVertices, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
// left <- max value of 'x', right <- min value of 'x'
memset(tempRightVertices.get(), 0x80, numVerticalPixel * sizeof(long));
_Util::GenericBuffer <Pixel> srcBuffer(new (std::nothrow) _GenericBufferPixmap <Pixel>(*pSrcImage, null));
_Util::GenericBuffer <Pixel> dstBuffer(new (std::nothrow) _GenericBufferPixmap <Pixel>(*pRetImage, null));
- SysTryReturn(NID_GRP, srcBuffer.IsValid() && dstBuffer.IsValid(), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, srcBuffer.IsValid() && dstBuffer.IsValid(), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
FIXED16x16 xSour = 0;
FIXED16x16 ySour = 0;
_Util::GenericBuffer <SourPixel> srcBuffer(new (std::nothrow) _GenericBufferPixmap <SourPixel>(*pSrcImage, null));
_Util::GenericBuffer <DestPixel> dstBuffer(new (std::nothrow) _GenericBufferPixmap <DestPixel>(*pRetImage, null));
- SysTryReturn(NID_GRP, srcBuffer.IsValid() && dstBuffer.IsValid(), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, srcBuffer.IsValid() && dstBuffer.IsValid(), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
FIXED16x16 xSour = 0;
FIXED16x16 ySour = 0;
_Util::GenericBuffer <SourPixel> srcBuffer(new (std::nothrow) _GenericBufferPixmap <SourPixel>(*pSrcImage, null));
_Util::GenericBuffer <DestPixel> dstBuffer(new (std::nothrow) _GenericBufferPixmap <DestPixel>(*pRetImage, null));
- SysTryReturn(NID_GRP, srcBuffer.IsValid() && dstBuffer.IsValid(), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, srcBuffer.IsValid() && dstBuffer.IsValid(), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
FIXED16x16 xSour = 0;
FIXED16x16 ySour = 0;
result LockFast(BufferInfo& info, long timeout = INFINITE);
result UnlockFast(void);
+ void SetNinePatchedTagByForce(bool isNinePatched);
+
static bool CheckNinePatchedBitmapStrictly(const Bitmap& bitmap);
/**
* @param[in] height The height of the returned bitmap.
* @exception E_SUCCESS The method was successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_OUT_OF_MEMORY Insufficient memory.
+ * @exception E_OUT_OF_MEMORY Memory allocation failed.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_SYSTEM An unknown operating system error has occurred.
*
* @param[in] newColor The color replacing.
* @exception E_SUCCESS The method was successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_OUT_OF_MEMORY Memory allocation failed.
* @exception E_SYSTEM An unknown operating system error has occurred.
*
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @param[in] bitmap The source bitmap
* @exception E_SUCCESS The method was successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_OUT_OF_MEMORY Memory allocation failed.
* @exception E_SYSTEM An unknown operating system error has occurred.
*
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @exception E_SUCCESS The method was successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
- * @exception E_OUT_OF_MEMORY Insufficient memory.
+ * @exception E_OUT_OF_MEMORY Memory allocation failed.
*
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
protected:
bool _SetCallback(void (* DestroyCallback)(void*), void* pDestroyCallbackParam,
void (* LockCallback)(void*), void* pLockCallbackParam,
- void (* UnlockCallback)(void*), void* pUnlockCallbackParam);
+ void (* UnlockCallback)(void*), void* pUnlockCallbackParam,
+ void (* PostlockCallback)(BufferInfo&, void*), void* pPostlockCallbackParam);
static _BitmapImpl*& _GetBitmapImpl(Bitmap* pBitmap);
private:
void* pLockCallbackParam;
void (* pUnlockCallbackFunc)(void*);
void* pUnlockCallbackParam;
+ void (* pPostlockCallbackFunc)(BufferInfo&, void*);
+ void* pPostlockCallbackParam;
struct
{
#include <FBaseDataType.h>
#include <FGrpBitmap.h>
+#include <FGrpBufferInfo.h>
namespace Tizen { namespace Graphics
SetCallback(Tizen::Graphics::Bitmap& bitmap,
void (* DestroyCallback)(void*), void* pCallbackParam,
void (* LockCallback)(void*), void* pLockParam,
- void (* UnlockCallback)(void*), void* pUnlockParam);
+ void (* UnlockCallback)(void*), void* pUnlockParam,
+ void (* PostlockCallback)(Tizen::Graphics::BufferInfo& bufferInfo, void*) = 0, void* pPostlockParam = 0);
void
ResetCallback(Tizen::Graphics::Bitmap& bitmap);
HANDLE_TYPE_NONE,
HANDLE_TYPE_OVERLAY_REGION,
HANDLE_TYPE_VE_SURFACE,
- HANDLE_TYPE_CANVAS_TEXTURE
+ HANDLE_TYPE_CANVAS_TEXTURE,
+ HANDLE_TYPE_NATIVE_PIXMAP
};
enum Rotation
int GetSize(void) const;
float GetSizeF(void) const;
+ result SetXExpansion(float xExpansion);
+
void SetStrikeOut(bool strikeOut);
void SetUnderline(bool underline);
_FontImpl* CloneN(void);
static Font* CloneN(const Font& font);
+ static Font* CreateFontN(int style, float expectedMaxHeight);
+ static Font* CreateFontN(const Tizen::Base::String& fontName, int style, float expectedMaxHeight);
+
/*
* Gets the count and dimension of characters which can be get in the given width. @n
*
* @exception E_SUCCESS The method was successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported
- * @exception E_OUT_OF_MEMORY Insufficient memory.
+ * @exception E_OUT_OF_MEMORY Memory allocation failed.
*/
_OSP_EXPORT_ _BitmapImpl* CreateBitmapN(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat);
_OSP_EXPORT_ _BitmapImpl* CreateBitmapN(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat, const FloatDimension& logicalSizeF);
* @exception E_SUCCESS The method was successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
* @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_OUT_OF_MEMORY Insufficient memory.
+ * @exception E_OUT_OF_MEMORY Memory allocation failed.
*/
_OSP_EXPORT_ _BitmapImpl* CreateBitmapN(const Dimension& dim, BitmapPixelFormat pixelFormat);
const Bitmap* pBitmap;
};
+struct TextObjectColorRGB
+{
+ float R;
+ float G;
+ float B;
+};
+
+struct TextObjectColorHSL
+{
+ float H;
+ float S;
+ float L;
+};
+
typedef int TextObjectAlignment;
//special character definistion
static const unsigned short TEXT_LINE_FEED = 0x0A;
static const unsigned short TEXT_CARRIAGE_RETURN = 0x0D;
static const unsigned short TEXT_ABBREV_CHARACTER = 0x2026;
-static const unsigned short TEXT_LINE_SEPARATOR = 0x2028;
+//static const unsigned short TEXT_LINE_SEPARATOR = 0x2028;
static const unsigned short TEXT_PARAGRAPH_SEPARATOR = 0x2029;
-static const unsigned short TEXT_TAB_CHARACTER = 0x09;
-static const unsigned short TEXT_JAPANESE_DOT = 0x3001;
-static const unsigned short TEXT_JAPANESE_COMMA = 0x3002;
+//static const unsigned short TEXT_TAB_CHARACTER = 0x09;
+//static const unsigned short TEXT_JAPANESE_DOT = 0x3001;
+//static const unsigned short TEXT_JAPANESE_COMMA = 0x3002;
static const unsigned short TEXT_JAPANESE_SPACE = 0x3000;
static const unsigned short TEXT_ZERO_WIDTH_SPACE = 0x200B;
bool IsDelimiter(const wchar_t ch) const;
-private:
+ void SetOutlineEnabled(bool enable);
+
+ bool IsOutlineEnable(void) const;
+
+ void SetTextShadowEnabled(bool enable);
+
+ bool IsTextShadowEnable(void) const;
+
+ void SetTextShadowColor(const Color color);
+
+ Color GetTextShadowColor(void) const;
+
+ void SetTextShadowOffset(const FloatPoint& offset);
+
+ FloatPoint GetTextShadowOffset(void) const;
+
static int ConvertEnterToSpace(wchar_t* pDstText, const wchar_t* pSrcText, int textLength);
+private:
bool IsKorean(const wchar_t* ch) const;
bool IsChinese(const wchar_t ch) const;
int GetGlyphedLength(const wchar_t* pText, int textLength, int& actualLength) const;
+ void SetTextShadowColor(void);
+
protected:
virtual Font* GetCurrentFont(void) const;
bool _outline;
int _offset;
bool _isBackgroundDrawingModeEnabled;
+ bool _shadow;
+ Color _shadowColor;
+ FloatPoint _shadowOffset;
+ int _opacity;
private:
BitmapDisplayProperty __bitmapProperty;
result
CanvasTexture::Construct(int textureId, int width, int height)
{
- SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Fails to allocate memory.\n");
+ SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.\n");
result r = this->__pImpl->Construct(textureId, width, height);
#include <FUiCtrlForm.h>
#include <FUiCtrlFrame.h>
#include <FUiWindow.h>
+#include <FBaseRtThread.h>
#include <FBaseColQueue.h>
#include <FGrp_BitmapTool.h>
#include <FGrp_BitmapImpl.h>
+#include <FGrp_BufferInfoImpl.h>
#include <FUi_ControlImpl.h>
#include <FUi_Control.h>
#include <FUi_WindowImpl.h>
namespace // unnamed
{
+PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR = null;
+PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR = null;
+
class _SglInfo;
#define FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT
&& pSglInfo->sglIndex > INVALID_SGL_INDEX
&& pSglInfo->pVisualElement != null
&& pSglInfo->pWindow != null
- , E_INVALID_STATE, "Invalid state.");
+ , E_INVALID_STATE, "[E_INVALID_STATE] Invalid state.");
if (__pSwapQueue != null && __pSwapQueue->Contains(*pSglInfo))
{
EGLDisplay eglDisplay = eglGetCurrentDisplay();
EGLSurface drawSurface = _SglGetCurrentSurface(EGL_DRAW);
EGLSurface readSurface = _SglGetCurrentSurface(EGL_READ);
- EGLSurface eglContext = eglGetCurrentContext();
+ EGLContext eglContext = eglGetCurrentContext();
if (drawSurface != EGL_NO_SURFACE && readSurface != EGL_NO_SURFACE)
{
eglMakeCurrent(pSglInfo->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
EGLBoolean ret = eglDestroySurface(pSglInfo->display, pSglInfo->surface);
pSglInfo->surface = null;
- SysTryReturnVoidResult(NID_GRP, ret == EGL_TRUE, E_OPERATION_FAILED, "eglDestroySurface failed.");
+ SysTryReturnVoidResult(NID_GRP, ret == EGL_TRUE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] eglDestroySurface failed.");
#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER)
if (pSglInfo->pEcoreImage != null)
FloatRectangle rect = pSglInfo->pVisualElement->GetBounds();
int width = int(rect.width);
int height = int(rect.height);
- SysTryReturnVoidResult(NID_GRP, width > 0 && height > 0, E_OUT_OF_RANGE, "Invalid size. w:%d h:%d", width, height);
+ SysTryReturnVoidResult(NID_GRP, width > 0 && height > 0, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Invalid size. w:%d h:%d", width, height);
int widthPhysical = static_cast<int> (CoordinateSystem::ConvertToPhysicalX(rect.width));
int heightPhysical = static_cast<int> (CoordinateSystem::ConvertToPhysicalY(rect.height));
- SysTryReturnVoidResult(NID_GRP, widthPhysical > 0 && heightPhysical > 0, E_OUT_OF_RANGE, "Invalid size. w:%d h:%d", widthPhysical, heightPhysical);
+ SysTryReturnVoidResult(NID_GRP, widthPhysical > 0 && heightPhysical > 0, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Invalid size. w:%d h:%d", widthPhysical, heightPhysical);
evas_object_image_size_set(pSglInfo->pObject, widthPhysical, heightPhysical);
evas_object_resize(pSglInfo->pObject, widthPhysical, heightPhysical);
delete pSglInfo->pBitmap;
pSglInfo->pBitmap = null;
std::auto_ptr <Bitmap> bitmap(new (std::nothrow) Bitmap);
- SysTryReturnVoidResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ SysTryReturnVoidResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
result r = bitmap.get()->Construct(Rectangle(0, 0, width, height));
- SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "Propagating.");
+ SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
EGLNativePixmapType nativePixmap = _CreateNativePixmap(pSglInfo->sglIndex, bitmap.get());
- SysTryReturnVoidResult(NID_GRP, nativePixmap != (EGLNativePixmapType)0, E_OPERATION_FAILED, "Propagating.");
+ SysTryReturnVoidResult(NID_GRP, nativePixmap != (EGLNativePixmapType)0, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Creating NativePixmap failed.");
EGLSurface eglSurface = eglCreatePixmapSurface(pSglInfo->display, pSglInfo->config, nativePixmap, null);
- SysTryReturnVoidResult(NID_GRP, eglSurface != EGL_NO_SURFACE, E_OPERATION_FAILED, "eglCreatePixmapSurface failed.");
+ SysTryReturnVoidResult(NID_GRP, eglSurface != EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] eglCreatePixmapSurface failed.");
pSglInfo->nativePixmap = nativePixmap;
pSglInfo->surface = eglSurface;
if (__isDoublePixmapEnabled)
{
_SglInfo* pSglInfoSecond = pSglInfo->pSecondSglInfo;
- SysTryReturnVoidResult(NID_GRP, pSglInfoSecond != null, E_INVALID_STATE, "Invalid pSecondSglInfo.");
+ SysTryReturnVoidResult(NID_GRP, pSglInfoSecond != null, E_INVALID_STATE, "[E_INVALID_STATE] Invalid pSecondSglInfo.");
eglMakeCurrent(pSglInfo->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
ret = eglDestroySurface(pSglInfoSecond->display, pSglInfoSecond->surface);
pSglInfoSecond->surface = null;
- SysTryReturnVoidResult(NID_GRP, ret == EGL_TRUE, E_OPERATION_FAILED, "eglDestroySurface failed.");
+ SysTryReturnVoidResult(NID_GRP, ret == EGL_TRUE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] eglDestroySurface failed.");
evas_object_image_size_set(pSglInfoSecond->pObject, widthPhysical, heightPhysical);
evas_object_resize(pSglInfoSecond->pObject, widthPhysical, heightPhysical);
delete pSglInfoSecond->pBitmap;
pSglInfoSecond->pBitmap = null;
std::auto_ptr <Bitmap> bitmapSecond(new (std::nothrow) Bitmap);
- SysTryReturnVoidResult(NID_GRP, bitmapSecond.get() != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ SysTryReturnVoidResult(NID_GRP, bitmapSecond.get() != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = bitmapSecond.get()->Construct(Rectangle(0, 0, width, height));
- SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "Propagating.");
+ SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
EGLNativePixmapType nativePixmap = _CreateNativePixmap(pSglInfoSecond->sglIndex, bitmapSecond.get());
- SysTryReturnVoidResult(NID_GRP, nativePixmap != (EGLNativePixmapType)0, E_OPERATION_FAILED, "Propagating.");
+ SysTryReturnVoidResult(NID_GRP, nativePixmap != (EGLNativePixmapType)0, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Creating NativePixmap failed.");
EGLSurface eglSurface = eglCreatePixmapSurface(pSglInfoSecond->display, pSglInfoSecond->config, nativePixmap, null);
- SysTryReturnVoidResult(NID_GRP, eglSurface != EGL_NO_SURFACE, E_OPERATION_FAILED, "eglCreatePixmapSurface failed.");
+ SysTryReturnVoidResult(NID_GRP, eglSurface != EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] eglCreatePixmapSurface failed.");
pSglInfoSecond->nativePixmap = nativePixmap;
pSglInfoSecond->surface = eglSurface;
_EvasObjectImageChange(pSglInfoSecond);
}
+ if (pSglInfo->isCopyNeeded)
+ {
+ delete pSglInfo->pBitmapCopyNeeded;
+ std::auto_ptr <Bitmap> bitmap(new (std::nothrow) Bitmap);
+ SysTryReturnVoidResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ result r = bitmap.get()->Construct(Rectangle(0, 0, width, height));
+ SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ pSglInfo->pBitmapCopyNeeded = bitmap.release();
+ }
+
pSglInfo->pBitmap = bitmap.release();
_EvasObjectImageChange(pSglInfo);
__needRestoreContext = false;
#endif
- if (pSglInfo->isCopyNeeded)
- {
- delete pSglInfo->pBitmapCopyNeeded;
- std::auto_ptr <Bitmap> bitmap(new (std::nothrow) Bitmap);
- SysTryReturnVoidResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
- result r = bitmap.get()->Construct(Rectangle(0, 0, width, height));
- SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "Propagating.");
- pSglInfo->pBitmapCopyNeeded = bitmap.release();
- }
-
return;
}
_SglInfoTableManipulator()
{
result r = __SglMutex.Create();
- SysTryLog(NID_GRP, r == E_SUCCESS, "Failed to create mutex. [%s]", GetErrorMessage(r));
+ SysTryLog(NID_GRP, r == E_SUCCESS, "[%s] Failed to create mutex.", GetErrorMessage(r));
__SglIndexLastUsed = INVALID_SGL_INDEX;
__SglInitialized = false;
}
delete (_PixmapInfo*)pCallbackParam;
}
+void
+_PixmapPostLockCallback(BufferInfo& bufferInfo, void* pData)
+{
+ _BufferInfoImpl* pBufferInfoImpl = _BufferInfoImpl::GetInstance(bufferInfo);
+ SysTryReturnVoidResult(NID_GRP, pBufferInfoImpl != null,
+ E_INVALID_STATE, "[E_INVALID_STATE] Invalid pBufferInfoImpl:%#x.", (unsigned int)pBufferInfoImpl);
+
+ pBufferInfoImpl->SetHandle(_BufferInfoImpl::HANDLE_TYPE_NATIVE_PIXMAP, (int)pData, null);
+}
+
+result
+_GetNativePixmap(Bitmap* pBitmap, EGLNativePixmapType& nativePixmap, BufferInfo& bufferInfo)
+{
+ SysTryReturnResult(NID_GRP, pBitmap != null,
+ E_INVALID_ARG, "Invalid pBitmap:%#x", (unsigned int)pBitmap);
+
+ _BitmapImpl* pBitmapImpl = _BitmapImpl::GetInstance(*pBitmap);
+ SysTryReturnResult(NID_GRP, (pBitmapImpl != null && pBitmapImpl->IsConstructed()),
+ E_INVALID_ARG, "Invalid pBitmapImpl:%#x", (unsigned int)pBitmapImpl);
+
+ result r = pBitmapImpl->LockFast(bufferInfo);
+ SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating.");
+ r = pBitmapImpl->UnlockFast();
+ SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating.");
+
+ _BufferInfoImpl* pBufferInfoImpl = _BufferInfoImpl::GetInstance(bufferInfo);
+ SysTryReturnResult(NID_GRP, pBufferInfoImpl != null,
+ E_INVALID_ARG, "Invalid pBufferInfoImpl:%#x", (unsigned int)pBufferInfoImpl);
+
+ nativePixmap = (EGLNativePixmapType)pBufferInfoImpl->GetHandle(_BufferInfoImpl::HANDLE_TYPE_NATIVE_PIXMAP);
+
+ return E_SUCCESS;
+}
+
#if defined(FGRAPHICS_INTERNAL_USE_DRM)
void
_PixmapLockCallBack(void* pCallbackParam)
Evas* pEvas = evas_object_evas_get(pObject);
if (pEvas == null)
{
- SysLogException(NID_GRP, E_OPERATION_FAILED, "Getting pEvas failed.");
+ SysLogException(NID_GRP, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Getting pEvas failed.");
return ENGINE_TYPE_SOFEWARE_X11;
}
Ecore_Evas* pEcoreEvas = ecore_evas_ecore_evas_get(pEvas);
if (pEcoreEvas == null)
{
- SysLogException(NID_GRP, E_OPERATION_FAILED, "Getting pEcoreEvas failed.");
+ SysLogException(NID_GRP, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Getting pEcoreEvas failed.");
return ENGINE_TYPE_SOFEWARE_X11;
}
Evas* pEvas = evas_object_evas_get(pSglInfo->pObject);
if (pEvas == null)
{
- SysLogException(NID_GRP, E_OPERATION_FAILED, "Getting pEvas failed.");
+ SysLogException(NID_GRP, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Getting pEvas failed.");
return;
}
}
#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT)
+bool
+__isMainThread(void)
+{
+ Tizen::Base::Runtime::Thread* pThread = Tizen::Base::Runtime::Thread::GetCurrentThread();
+ if (pThread == null)
+ {
+ return false;
+ }
+
+ String string = pThread->GetName();
+ if (string.Equals(L"MainThread", true))
+ {
+ return true;
+ }
+
+ return false;
+}
+
void
__RestoreContext(void)
{
}
}
- if (__pPreviousSglInfo != null)
+ if (__pPreviousSglInfo != null && __isMainThread())
{
EGLDisplay display = __pPreviousSglInfo->display;
EGLSurface surface = __pPreviousSglInfo->surface;
void
_SaveCurrentContext(_SglInfo* pSglInfo)
{
- if (pSglInfo != null)
+ if (pSglInfo != null && __isMainThread())
{
__pPreviousSglInfo = pSglInfo;
}
if (__pSwapQueue == null)
{
std::auto_ptr <Queue> swapQueue(new (std::nothrow) Queue);
- SysTryReturnVoidResult(NID_GRP, swapQueue.get() != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ SysTryReturnVoidResult(NID_GRP, swapQueue.get() != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
result r = swapQueue.get()->Construct(MAX_SGL_INDEX / 2);
- SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "Propagating.");
+ SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
__pSwapQueue = swapQueue.release();
}
#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT)
void _RestoreContext(void)
{
- if (__needRestoreContext && __pPreviousSglInfo != null)
+ if (__needRestoreContext && __pPreviousSglInfo != null && __isMainThread())
{
EGLDisplay display = __pPreviousSglInfo->display;
EGLSurface surface = __pPreviousSglInfo->surface;
Object* pObj = (Object*)win;
VisualElement* pVisualElement = dynamic_cast<VisualElement*> (pObj);
Tizen::Ui::Control* pControl = dynamic_cast<Tizen::Ui::Control*> (pObj);
-#if 0//!defined(_OSP_EMUL_)
+
+//#define FGRAPHICS_INTERNAL_USE_WINDOWSURFACE
+#if defined (FGRAPHICS_INTERNAL_USE_WINDOWSURFACE)
Tizen::Ui::Controls::Frame* pFrame = dynamic_cast<Tizen::Ui::Controls::Frame*> (pControl);
#endif
- SysTryReturn(NID_GRP, pControl != null || pVisualElement != null, EGL_NO_SURFACE, E_INVALID_ARG, "Invalid NativeWindow.");
+ SysTryReturn(NID_GRP, pControl != null || pVisualElement != null, EGL_NO_SURFACE, E_INVALID_ARG, "[E_INVALID_ARG] Invalid NativeWindow.");
_SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance();
-#if 0//!defined(_OSP_EMUL_)
+#if defined (FGRAPHICS_INTERNAL_USE_WINDOWSURFACE)
if (pFrame != null && _GetEvasEngineType(null) != ENGINE_TYPE_OPENGL_X11)
{
_ControlImpl* pControlImpl = _ControlImpl::GetInstance(*pControl);
_WindowImpl* pWindowImpl = dynamic_cast<_WindowImpl*> (pControlImpl);
- SysTryReturn(NID_GRP, pWindowImpl != null, EGL_NO_SURFACE, E_INVALID_STATE, "Invalid window state.");
+ SysTryReturn(NID_GRP, pWindowImpl != null, EGL_NO_SURFACE, E_INVALID_STATE, "[E_INVALID_STATE] Invalid window state.");
EGLNativeWindowType nativeWindow = (EGLNativeWindowType)pWindowImpl->GetNativeHandle();
sglIndex = pSglInfoTableManipulatorInstance->CreateSglIndex();
- SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "Invalid SglIndex.");
+ SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Invalid SglIndex.");
EGLSurface windowSurface = eglCreateWindowSurface(dpy, config, nativeWindow, pAttribList);
if (windowSurface == EGL_NO_SURFACE)
return (EGLSurface)sglIndex;
}
else
-#endif //#if !defined(_OSP_EMUL_)
+#endif //#if defined (FGRAPHICS_INTERNAL_USE_WINDOWSURFACE)
{
result r = E_SUCCESS;
{
pVisualElement = pControl->GetVisualElement();
}
- SysTryReturn(NID_GRP, pVisualElement != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating.");
+ SysTryReturn(NID_GRP, pVisualElement != null, EGL_NO_SURFACE, E_INVALID_ARG, "[E_INVALID_ARG] Invalid NativeWindow.");
_VisualElementImpl* pVisualElementImpl = _VisualElementImpl::GetInstance(*pVisualElement);
- SysTryReturn(NID_GRP, pVisualElementImpl != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating.");
+ SysTryReturn(NID_GRP, pVisualElementImpl != null, EGL_NO_SURFACE, E_INVALID_ARG, "[E_INVALID_ARG] Invalid NativeWindow.");
FloatRectangle rect = pVisualElement->GetBounds();
int width = int(rect.width);
int height = int(rect.height);
- SysTryReturn(NID_GRP, width > 0 && height > 0, EGL_NO_SURFACE, E_OUT_OF_RANGE, "Invalid size. w:%d h:%d", width, height);
+ SysTryReturn(NID_GRP, width > 0 && height > 0, EGL_NO_SURFACE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Invalid size. w:%d h:%d", width, height);
Control* pFrame = pControl;
Control* pTemp = pFrame->GetParent();
}
Tizen::Ui::Window* pWindow = dynamic_cast<Tizen::Ui::Window*> (pFrame);
- SysTryReturn(NID_GRP, pWindow != null, EGL_NO_SURFACE, E_INVALID_STATE, "Invalid window.");
+ SysTryReturn(NID_GRP, pWindow != null, EGL_NO_SURFACE, E_INVALID_STATE, "[E_INVALID_STATE] Invalid window.");
VisualElementSurface* pVisualElementSurface = pVisualElement->GetSurfaceN();
- SysTryReturn(NID_GRP, pVisualElementSurface != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating.");
+ SysTryReturn(NID_GRP, pVisualElementSurface != null, EGL_NO_SURFACE, E_INVALID_STATE, "[E_INVALID_STATE] Getting VisualElementSurface failed.");
_VisualElementSurfaceImpl* pVisualElementSurfaceImpl = _VisualElementSurfaceImpl::GetInstance(*pVisualElementSurface);
if (pVisualElementSurfaceImpl == null)
{
- SysLogException(NID_GRP, E_OPERATION_FAILED, "Propagating.");
+ SysLogException(NID_GRP, E_INVALID_STATE, "[E_INVALID_STATE] Getting VisualElementSurface failed.");
delete pVisualElementSurface;
return EGL_NO_SURFACE;
}
Evas* pEvas = evas_object_evas_get(pObject);
pObject = evas_object_image_filled_add(pEvas);
- SysTryReturn(NID_GRP, pObject != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Invalid object.");
+ SysTryReturn(NID_GRP, pObject != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Invalid object.");
__evasEngineType = _GetEvasEngineType(pObject);
pVisualElementSurface = _VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN(
*pWindow->GetDisplayContext(), (Handle)pObject, Dimension(width, height));
- SysTryReturn(NID_GRP, pVisualElementSurface != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating.");
+ r = GetLastResult();
+ SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_SURFACE, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_GRP, pVisualElementSurface != null, EGL_NO_SURFACE, E_INVALID_STATE, "[E_INVALID_STATE] Getting VisualElementSurface failed.");
std::auto_ptr <Bitmap> bitmap(new (std::nothrow) Bitmap);
- SysTryReturn(NID_GRP, bitmap.get() != null, EGL_NO_SURFACE, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ SysTryReturn(NID_GRP, bitmap.get() != null, EGL_NO_SURFACE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = bitmap.get()->Construct(Rectangle(0, 0, width, height));
- SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_SURFACE, r, "Propagating.");
+ SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_SURFACE, r, "[%s] Propagating.", GetErrorMessage(r));
sglIndex = (_SglIndex)_SglCreatePixmapSurface(dpy, config, (EGLNativePixmapType)bitmap.get(), null);
- SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating.");
+ SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Invalid sglIndex.");
_SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex);
pSglInfo->sglIndex = sglIndex;
if (__isDoublePixmapEnabled)
{
pObject = evas_object_image_filled_add(pEvas);
- SysTryReturn(NID_GRP, pObject != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Invalid object.");
+ SysTryReturn(NID_GRP, pObject != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Invalid object.");
evas_object_image_alpha_set(pObject, EINA_TRUE);
evas_object_image_size_set(pObject, widthPhysical, heightPhysical);
pVisualElementSurface = _VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN(
*pWindow->GetDisplayContext(), (Handle)pObject, Dimension(width, height));
- SysTryReturn(NID_GRP, pSglInfo->pVisualElementSurface != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating.");
+ r = GetLastResult();
+ SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_SURFACE, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_GRP, pVisualElementSurface != null, EGL_NO_SURFACE, E_INVALID_STATE, "[E_INVALID_STATE] Getting VisualElementSurface failed.");
delete pSglInfo->pBitmap;
pSglInfo->pBitmap = null;
std::auto_ptr <Bitmap> bitmapSecond(new (std::nothrow) Bitmap);
- SysTryReturn(NID_GRP, bitmapSecond.get() != null, EGL_NO_SURFACE, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ SysTryReturn(NID_GRP, bitmapSecond.get() != null, EGL_NO_SURFACE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = bitmapSecond.get()->Construct(Rectangle(0, 0, width, height));
- SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_SURFACE, r, "Propagating.");
+ SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_SURFACE, r, "[%s] Propagating.", GetErrorMessage(r));
sglIndex = (_SglIndex)_SglCreatePixmapSurface(dpy, config, (EGLNativePixmapType)bitmapSecond.get(), null);
- SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating.");
+ SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Invalid sglIndex.");
_SglInfo* pSglInfoSecond = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex);
pSglInfoSecond->sglIndex = sglIndex;
result r = E_FAILURE;
Tizen::Graphics::BufferInfo bufferInfo;
_PixmapInfo* pPixmapInfo = null;
+ EGLNativePixmapType nativePixmap = 0;
+ _BitmapImpl* pBitmapImpl = null;
#if defined(FGRAPHICS_INTERNAL_USE_DRM)
unsigned int attachments[] = { DRI2BufferFrontLeft };
char* pDeviceName = null;
}
pSglInfoTableManipulatorInstance->UnlockSglInfoTable();
- r = pBitmap->Lock(bufferInfo);
+ pBitmapImpl = _BitmapImpl::GetInstance(*pBitmap);
+ if (pBitmapImpl == null)
+ {
+ goto CATCH_01;
+ }
+
+ r = _GetNativePixmap(pBitmap, nativePixmap, bufferInfo);
if (r != E_SUCCESS)
{
goto CATCH_01;
}
+ if (nativePixmap != (Pixmap)0)
+ {
+ return nativePixmap;
+ }
+
width = bufferInfo.width;
height = bufferInfo.height;
bitsPerPixel = bufferInfo.bitsPerPixel;
-
- r = pBitmap->Unlock();
if (r != E_SUCCESS || width <= 0 || height <= 0 || bitsPerPixel <= 0)
{
goto CATCH_01;
goto CATCH_06;
}
- if (!Tizen::Graphics::_BitmapTool::SetCallback(*pBitmap, _PixmapSurfaceDestroyCallback, pPixmapInfo,
- _PixmapLockCallBack, pPixmapInfo->pTbmBufferObject,_PixmapUnlockCallBack, pPixmapInfo->pTbmBufferObject))
+ if (!_BitmapTool::SetCallback(*pBitmap,
+ _PixmapSurfaceDestroyCallback, pPixmapInfo,
+ _PixmapLockCallBack, pPixmapInfo->pTbmBufferObject,
+ _PixmapUnlockCallBack, pPixmapInfo->pTbmBufferObject,
+ _PixmapPostLockCallback, (void*)pPixmapInfo->nativePixmap))
{
goto CATCH_06;
}
#endif //#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER)
#endif //#if defined(FGRAPHICS_INTERNAL_USE_DRM)
- pBitmap->Lock(bufferInfo);
+ pBitmapImpl->Lock(bufferInfo);
{
Canvas canvas;
canvas.Construct(bufferInfo);
canvas.SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK));
canvas.Clear();
}
- pBitmap->Unlock();
+ pBitmapImpl->Unlock();
return (EGLNativePixmapType)pPixmapInfo->nativePixmap;
return (EGLNativePixmapType)0;
}
+EGLNativePixmapType
+__CreateNativePixmapEx(Bitmap* pBitmap)
+{
+ int width = 0;
+ int height = 0;
+ int bitsPerPixel = 0;
+ Display* pNativeDisplay = null;
+ Drawable nativeWindow = 0;
+ result r = E_FAILURE;
+ BufferInfo bufferInfo;
+ EGLNativePixmapType nativePixmap = 0;
+ _BitmapImpl* pBitmapImpl = null;
+#if defined(FGRAPHICS_INTERNAL_USE_DRM)
+ _PixmapInfo* pPixmapInfo = null;
+ unsigned int attachments[] = { DRI2BufferFrontLeft };
+ char* pDeviceName = null;
+ char* pDriverName = null;
+ DRI2Buffer* pDri2Buffer = null;
+ int dri2Width = 0;
+ int dri2Height = 0;
+ int dri2BufferCount = 0;
+ tbm_bo_handle tbmData = { null, };
+
+ Bool ret = False;
+ drm_magic_t magic = 0;
+ int pitch = 0;
+#endif
+ pBitmapImpl = _BitmapImpl::GetInstance(*pBitmap);
+ if (pBitmapImpl == null)
+ {
+ goto CATCH_01;
+ }
+
+ r = _GetNativePixmap(pBitmap, nativePixmap, bufferInfo);
+ if (r != E_SUCCESS)
+ {
+ goto CATCH_01;
+ }
+
+ if (nativePixmap != (Pixmap)0)
+ {
+ return nativePixmap;
+ }
+
+ width = bufferInfo.width;
+ height = bufferInfo.height;
+ bitsPerPixel = bufferInfo.bitsPerPixel;
+ if (r != E_SUCCESS || width <= 0 || height <= 0 || bitsPerPixel <= 0)
+ {
+ goto CATCH_01;
+ }
+
+ pNativeDisplay = (Display*) ecore_x_display_get();
+ nativeWindow = DefaultRootWindow(pNativeDisplay);
+
+#if defined(FGRAPHICS_INTERNAL_USE_DRM)
+ pPixmapInfo = new (std::nothrow) _PixmapInfo;
+ if (pPixmapInfo == null)
+ {
+ goto CATCH_01;
+ }
+
+
+ pPixmapInfo->nativePixmap = XCreatePixmap(pNativeDisplay, nativeWindow, width, height,
+ ecore_x_default_depth_get(pNativeDisplay, ecore_x_default_screen_get()));
+ if (pPixmapInfo->nativePixmap == (Pixmap)0)
+ {
+ goto CATCH_02;
+ }
+
+ DRI2CreateDrawable(pNativeDisplay, pPixmapInfo->nativePixmap);
+ XSync(pNativeDisplay, False);
+
+ ret = DRI2Connect(pNativeDisplay, nativeWindow, &pDriverName, &pDeviceName);
+ free(pDriverName);
+ if (!ret || pDeviceName == null)
+ {
+ goto CATCH_03;
+ }
+
+ pPixmapInfo->drmFd = open(pDeviceName, O_RDWR);
+
+ free(pDeviceName);
+ if (pPixmapInfo->drmFd < 0)
+ {
+ goto CATCH_03;
+ }
+
+ drmGetMagic(pPixmapInfo->drmFd, &magic);
+ ret = DRI2Authenticate(pNativeDisplay, nativeWindow, (unsigned int)magic);
+ if (!ret)
+ {
+ goto CATCH_04;
+ }
+
+ pPixmapInfo->pTbmBufMgr = tbm_bufmgr_init(pPixmapInfo->drmFd);
+ if (pPixmapInfo->pTbmBufMgr == null)
+ {
+ goto CATCH_04;
+ }
+
+ pDri2Buffer = DRI2GetBuffers(pNativeDisplay, pPixmapInfo->nativePixmap, &dri2Width, &dri2Height, attachments, 1, &dri2BufferCount);
+ if (pDri2Buffer == null)
+ {
+ goto CATCH_05;
+ }
+
+ pPixmapInfo->pTbmBufferObject = tbm_bo_import(pPixmapInfo->pTbmBufMgr, pDri2Buffer->name);
+ pitch = pDri2Buffer->pitch;
+ free(pDri2Buffer);
+ if (pPixmapInfo->pTbmBufferObject == null)
+ {
+ goto CATCH_05;
+ }
+
+ tbmData = tbm_bo_get_handle(pPixmapInfo->pTbmBufferObject, TBM_DEVICE_CPU);
+ if (tbmData.ptr == null)
+ {
+ goto CATCH_06;
+ }
+
+ r = _BitmapTool::ChangeBuffer(*pBitmap, tbmData.ptr, pitch,
+ _PixmapSurfaceDestroyCallback, (void*)pPixmapInfo);
+ if (r != E_SUCCESS)
+ {
+ goto CATCH_06;
+ }
+
+ if (!_BitmapTool::SetCallback(*pBitmap,
+ _PixmapSurfaceDestroyCallback, (void*)pPixmapInfo,
+ _PixmapLockCallBack, (void*)pPixmapInfo->pTbmBufferObject,
+ _PixmapUnlockCallBack, (void*)pPixmapInfo->pTbmBufferObject,
+ _PixmapPostLockCallback, (void*)pPixmapInfo->nativePixmap))
+ {
+ goto CATCH_06;
+ }
+
+ pBitmapImpl->Lock(bufferInfo);
+ {
+ Canvas canvas;
+ canvas.Construct(bufferInfo);
+ canvas.SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK));
+ canvas.Clear();
+ }
+ pBitmapImpl->Unlock();
+
+ return (EGLNativePixmapType)pPixmapInfo->nativePixmap;
+#else
+ return (EGLNativePixmapType)XCreatePixmap(pNativeDisplay, nativeWindow, width, height,
+ ecore_x_default_depth_get(pNativeDisplay, ecore_x_default_screen_get()));
+#endif //#if defined(FGRAPHICS_INTERNAL_USE_DRM)
+
+#if defined(FGRAPHICS_INTERNAL_USE_DRM)
+CATCH_06:
+ tbm_bo_unmap(pPixmapInfo->pTbmBufferObject);
+ tbm_bo_unref(pPixmapInfo->pTbmBufferObject);
+ //fall through
+
+CATCH_05:
+ tbm_bufmgr_deinit(pPixmapInfo->pTbmBufMgr);
+ //fall through
+
+CATCH_04:
+ close(pPixmapInfo->drmFd);
+ //fall through
+
+CATCH_03:
+ DRI2DestroyDrawable(pNativeDisplay, pPixmapInfo->nativePixmap);
+ XFreePixmap(pNativeDisplay, pPixmapInfo->nativePixmap);
+ //fall through
+
+CATCH_02:
+ delete pPixmapInfo;
+ //fall through
+#endif
+
+CATCH_01:
+ SysLog(NID_GRP, "_CreateNativePixmap failed!! pBitmap:%#x", (unsigned int)pBitmap);
+ return (EGLNativePixmapType)0;
+}
+
_OSP_LOCAL_ EGLNativePixmapType
_CreateNativePixmapEx(Tizen::Graphics::Bitmap* pBitmap, Tizen::Graphics::BufferInfo bufferInfo)
{
Display* pNativeDisplay = null;
Drawable nativeWindow = 0;
Tizen::Graphics::_BitmapImpl* pBitmapImpl = null;
- _PixmapInfo* pPixmapInfo = null;
#if defined(FGRAPHICS_INTERNAL_USE_DRM)
+ _PixmapInfo* pPixmapInfo = null;
unsigned int attachments[] = { DRI2BufferFrontLeft };
char* pDeviceName = null;
char* pDriverName = null;
pNativeDisplay = (Display*) ecore_x_display_get();
nativeWindow = DefaultRootWindow(pNativeDisplay);
+#if defined(FGRAPHICS_INTERNAL_USE_DRM)
pPixmapInfo = new (std::nothrow) _PixmapInfo;
if (pPixmapInfo == null)
{
goto CATCH_02;
}
-#if defined(FGRAPHICS_INTERNAL_USE_DRM)
DRI2CreateDrawable(pNativeDisplay, pPixmapInfo->nativePixmap);
XSync(pNativeDisplay, False);
{
goto CATCH_06;
}
-#endif //#if defined(FGRAPHICS_INTERNAL_USE_DRM)
return (EGLNativePixmapType)pPixmapInfo->nativePixmap;
+#else
+ return (EGLNativePixmapType)XCreatePixmap(pNativeDisplay, nativeWindow, width, height, bitsPerPixel);
+#endif //#if defined(FGRAPHICS_INTERNAL_USE_DRM)
+
#if defined(FGRAPHICS_INTERNAL_USE_DRM)
CATCH_06:
DRI2DestroyDrawable(pNativeDisplay, pPixmapInfo->nativePixmap);
XFreePixmap(pNativeDisplay, pPixmapInfo->nativePixmap);
//fall through
-#endif
CATCH_02:
delete pPixmapInfo;
//fall through
+#endif
CATCH_01:
SysLog(NID_GRP, "_CreateNativePixmap failed!! pBitmap:%#x", (unsigned int)pBitmap);
return EGL_TRUE;
}
+EGLImageKHR _SglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint* pAttribList)
+{
+ if (eglCreateImageKHR == null)
+ {
+ eglCreateImageKHR = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR");
+ }
+ SysTryReturn(NID_GRP, eglCreateImageKHR != null, EGL_NO_IMAGE_KHR
+ , E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] eglCreateImageKHR is not supported on this device.");
+
+ switch (target)
+ {
+ case EGL_NATIVE_PIXMAP_KHR:
+ {
+ Bitmap* pBitmap = dynamic_cast<Bitmap*> ((Bitmap*)buffer);
+ if (pBitmap != null)
+ {
+ EGLNativePixmapType nativePixmap = (EGLNativePixmapType)0;
+ BufferInfo bufferInfo;
+ result r = _GetNativePixmap(pBitmap, nativePixmap, bufferInfo);
+ SysTryReturn(NID_GRP, r == E_SUCCESS, EGL_NO_IMAGE_KHR, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ if (nativePixmap != (EGLNativePixmapType)0)
+ {
+ buffer = (EGLClientBuffer)nativePixmap;
+ }
+ else
+ {
+ buffer = (EGLClientBuffer)__CreateNativePixmapEx(pBitmap);
+ }
+ }
+ }
+ break;
+
+ default :
+ break;
+ }
+
+ return eglCreateImageKHR(dpy, ctx, target, buffer, pAttribList);
+}
+
+EGLBoolean _SglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
+{
+ if (eglDestroyImageKHR == null)
+ {
+ eglDestroyImageKHR = (PFNEGLDESTROYIMAGEKHRPROC)eglGetProcAddress("eglDestroyImageKHR");
+ }
+ SysTryReturn(NID_GRP, eglDestroyImageKHR != null, EGL_FALSE, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] eglDestroyImageKHR is not supported on this device.");
+
+ return eglDestroyImageKHR(dpy, image);
+}
+
+
__EglMustCastToProperFunctionPointerType
_SglGetProcAddress(const char* pProcName)
{
{
return (__EglMustCastToProperFunctionPointerType)_SglUnlockSurfaceKHR;
}
-
- return eglGetProcAddress(pProcName);
+ else if (name.CompareTo(String("eglCreateImageKHR")) == 0)
+ {
+ return (__EglMustCastToProperFunctionPointerType)_SglCreateImageKHR;
+ }
+ else if (name.CompareTo(String("eglDestroyImageKHR")) == 0)
+ {
+ return (__EglMustCastToProperFunctionPointerType)_SglDestroyImageKHR;
+ }
+ else if (name.CompareTo(String("eglCreateImageKHR_INTERNAL")) == 0)
+ {
+ return (__EglMustCastToProperFunctionPointerType)eglGetProcAddress("eglCreateImageKHR");
+ }
+ else
+ {
+ return eglGetProcAddress(pProcName);
+ }
}
EGLBoolean
GlPlayer::Construct(EglContextClientVersion version, Tizen::Ui::Control* pControl)
{
ClearLastResult();
- SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Fails to allocate memory.")
+ SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.")
SysAssertf(this->__pImpl->IsValid() == false , "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class. ");
result r = this->__pImpl->Construct(version, pControl);
this->__eglSurface = eglGetCurrentSurface(EGL_DRAW);
this->__eglContext = eglGetCurrentContext();
- eglQueryContext(this->__eglDisplay, this->__eglContext, EGL_CONTEXT_CLIENT_VERSION, &this->__glVersion);
+ eglQueryContext(this->__eglDisplay, this->__eglContext, EGL_CONTEXT_CLIENT_VERSION, &this->__glVersion);
SysTryReturnResult(NID_GRP
, this->__eglDisplay != EGL_NO_DISPLAY
&& this->__eglSurface != EGL_NO_SURFACE
, E_INVALID_ARG, "width(%d) or height(%d) not supported.", width, height);
std::auto_ptr <Bitmap> bitmap(new (std::nothrow) Bitmap);
- SysTryReturnResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ SysTryReturnResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
result r = bitmap.get()->Construct(Rectangle(0, 0, width, height));
- SysTryReturnResult(NID_GRP, !IsFailed(r), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating.");
if (IsSupported(L"GL_EXT_texture_format_BGRA8888"))
{
else
{
std::auto_ptr <Bitmap> bitmapColorConvert(new (std::nothrow) Bitmap);
- SysTryReturnResult(NID_GRP, bitmapColorConvert.get() != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ SysTryReturnResult(NID_GRP, bitmapColorConvert.get() != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = bitmapColorConvert.get()->Construct(Rectangle(0, 0, width, height));
- SysTryReturnResult(NID_GRP, !IsFailed(r), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating.");
this->__pBitmapColorConvert = bitmapColorConvert.release();
}
_CanvasTexture::ShowCallback(void* pParam)
{
_CanvasTexture* pCanvasTexture = dynamic_cast<_CanvasTexture*> ((_CanvasTexture*)pParam);
- SysTryReturnResult(NID_GRP, pCanvasTexture != null, true, "Invalid parameter.");
+ SysTryLogReturn(NID_GRP, pCanvasTexture != null, false, "Invalid parameter.");
pCanvasTexture->UpdateTexture();
_CanvasTexture::GetCanvasN(void) const
{
std::auto_ptr <Canvas> canvas(new (std::nothrow) Canvas);
- SysTryReturnResult(NID_GRP, canvas.get() != null, null, "The memory is insufficient.");
+ SysTryReturn(NID_GRP, canvas.get() != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
result r = canvas.get()->Construct(__bufferInfo);
- SysTryReturnResult(NID_GRP, !IsFailed(r), null, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
bool ret = _CanvasTool::SetCallback(*canvas.get(), this->ShowCallback, (void*)this);
- SysTryReturnResult(NID_GRP, ret, null, "[%s] Propagating.");
+ SysTryReturn(NID_GRP, ret, null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Registering callback failed.");
return canvas.release();
}
result
_CanvasTextureImpl::Construct(int textureId, int width, int height)
{
- SysTryReturnResult(NID_GRP, this->__pNativeCanvasTexture != null, E_OUT_OF_MEMORY, "Fails to allocate memory.\n");
+ SysTryReturnResult(NID_GRP, this->__pNativeCanvasTexture != null, E_OUT_OF_MEMORY, "Memory allocation failed.\n");
return this->__pNativeCanvasTexture->Construct(textureId, width, height);
}
Canvas*
_CanvasTextureImpl::GetCanvasN(void) const
{
- SysTryReturn(NID_GRP, this->__pNativeCanvasTexture != null, null, E_OUT_OF_MEMORY, "[Fails to allocate memory.\n");
+ SysTryReturn(NID_GRP, this->__pNativeCanvasTexture != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.\n");
return this->__pNativeCanvasTexture->GetCanvasN();
}
//
/*
- * @file FGrp_GlPlayerImpl.cpp
- * @brief This is the implementation file for _GlPlayerImpl class.
+ * @file FGrp_GlPlayerImpl.cpp
+ * @brief This is the implementation file for _GlPlayerImpl class.
*
*/
Tizen::Ui::Controls::Form* pForm = dynamic_cast<Tizen::Ui::Controls::Form*> (pControl);
Tizen::Ui::Controls::Frame* pFrame = dynamic_cast<Tizen::Ui::Controls::Frame*> (pControl);
- SysTryReturnResult(NID_GRP, pForm != null || pFrame != null, E_INVALID_ARG,
+ SysTryReturnResult(NID_GRP, pForm != null || pFrame != null, E_INVALID_ARG,
"The input target pControl is not allowable. Only Form/Frame are acceptable. ");
- SysTryReturnResult(NID_GRP, __pTargetControl == null, E_INVALID_OPERATION,
+ SysTryReturnResult(NID_GRP, __pTargetControl == null, E_INVALID_OPERATION,
"It is not allowable to call Construct() function, and the target pControl is not replacable.");
std::auto_ptr<Tizen::Base::Runtime::Timer> timer(new (std::nothrow) Tizen::Base::Runtime::Timer);
pRenderer->SetTargetControlWidth(width);
pRenderer->SetTargetControlHeight(height);
- SysTryReturnResult(NID_GRP, pRenderer->InitializeGl(), E_INVALID_OPERATION, "Fail to InitializeGl() for the given pRenderer. ");
+ SysTryReturnResult(NID_GRP, pRenderer->InitializeGl(), E_INVALID_OPERATION, "Fail to InitializeGl() for the given pRenderer. ");
}
if (__pRenderer != null)
{
void
_GlPlayerImpl::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
{
- if (__pTimer == null)
- {
- return;
- }
- __pTimer->Start(__renderTimeInterval);
-
- if (Redraw() != E_SUCCESS)
- {
- SysLog(NID_GRP, "Redraw() in OnTimerExpired() has failed. ");
- }
+ if (__pTimer == null)
+ {
+ return;
+ }
+ __pTimer->Start(__renderTimeInterval);
+
+ if (Redraw() != E_SUCCESS)
+ {
+ SysLog(NID_GRP, "Redraw() in OnTimerExpired() has failed. ");
+ }
}
_GlPlayerImpl*
_DamageEvent::~_DamageEvent(void)
{
- for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++)
+ for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++)
{
- XDamageDestroy(__pDisplay, __damage[i]);
+ XDamageDestroy(__pDisplay, __damage[i]);
}
XCloseDisplay(__pDisplay);
}
{
__pVideoTexture = pVideoTexture;
- int errorBaseReturn = 0;
- __pDisplay = (Display*)XOpenDisplay(NULL);
+ int errorBaseReturn = 0;
+ __pDisplay = (Display*)XOpenDisplay(NULL);
- if (!XDamageQueryExtension(__pDisplay, &__eventBaseReturn, &errorBaseReturn))
- {
- return E_SYSTEM;
- }
+ if (!XDamageQueryExtension(__pDisplay, &__eventBaseReturn, &errorBaseReturn))
+ {
+ return E_SYSTEM;
+ }
- for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++)
- {
- __pixmap[i] = (Drawable)__pVideoTexture->__pBuffer[i].__nativePixmap;
- __damage[i] = XDamageCreate (__pDisplay, __pixmap[i], XDamageReportRawRectangles);
- }
+ for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++)
+ {
+ __pixmap[i] = (Drawable)__pVideoTexture->__pBuffer[i].__nativePixmap;
+ __damage[i] = XDamageCreate (__pDisplay, __pixmap[i], XDamageReportRawRectangles);
+ }
return Thread::Construct();
}
{
XDamageNotifyEvent* pDamageEvent = (XDamageNotifyEvent*)&ev;
- for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++)
- {
+ for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++)
+ {
if (__pVideoTexture != null && pDamageEvent != null && pDamageEvent->drawable == __pixmap[i])
{
__pVideoTexture->__pBuffer[i].__bufferState = _BUFFER_STATE_ENQUEUE;
}
break;
}
- }
+ }
XDamageSubtract (__pDisplay, pDamageEvent->damage, None, None );
}
}
_VideoTexture::_VideoTexture(void)
- : __textureId(0)
+ : __textureId(0)
, __isEglSyncAvailable(false)
, __glVersion(0)
, __eglDisplay(EGL_NO_DISPLAY)
__eglDisplay = eglGetCurrentDisplay();
EGLContext eglContext = eglGetCurrentContext();
- eglQueryContext(__eglDisplay, eglContext, EGL_CONTEXT_CLIENT_VERSION, &__glVersion);
+ eglQueryContext(__eglDisplay, eglContext, EGL_CONTEXT_CLIENT_VERSION, &__glVersion);
SysTryReturnResult(NID_GRP, __eglDisplay != EGL_NO_DISPLAY && eglContext != EGL_NO_CONTEXT
&& (__glVersion == 1 || __glVersion == 2)
, E_INVALID_STATE, "Getting egl informations failed! eglDisplay:%#x eglContext:%#x glVersion:%d"
, (unsigned int)__eglDisplay, (unsigned int)eglContext, __glVersion);
__funcGlEglImageTargetTexture2dOes = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)eglGetProcAddress("glEGLImageTargetTexture2DOES");
- PFNEGLCREATEIMAGEKHRPROC funcEglCreateImageKhr = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR");
+ PFNEGLCREATEIMAGEKHRPROC funcEglCreateImageKhr = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR_INTERNAL");
#if !defined(_OSP_EMUL_) //fixme
SysTryReturnResult(NID_GRP, IsSupported(L"GL_OES_EGL_image")
for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++)
{
__pBuffer[i].__pBitmap = new (std::nothrow) Bitmap;
- SysTryCatch(NID_GRP, __pBuffer[i].__pBitmap != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryCatch(NID_GRP, __pBuffer[i].__pBitmap != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pBuffer[i].__nativePixmap = _CreateNativePixmapEx(__pBuffer[i].__pBitmap, bufferInfo);
__pBuffer[i].__eglImage =
}
__pDamageEvent = new (std::nothrow)_DamageEvent;
- SysTryReturnResult(NID_GRP, __pDamageEvent != null, E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryReturnResult(NID_GRP, __pDamageEvent != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pDamageEvent->Construct(this);
SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pDamageEvent->Start();
__pVideoTextureUpdateListener = new (std::nothrow) VideoTextureUpdateListenerList;
- SysTryCatch(NID_GRP, __pVideoTextureUpdateListener != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Fails to allocate memory.");
+ SysTryCatch(NID_GRP, __pVideoTextureUpdateListener != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return r;
{
__pVideoTexture = pVideoTexture;
result r = __pVideoTextureUpdateListener->Add(const_cast <IVideoTextureUpdateListener*>(&listener));
- SysTryLog(NID_GRP, r != E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryLog(NID_GRP, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r));
}
void
_VideoTexture::RemoveVideoTextureUpdateListener(IVideoTextureUpdateListener& listener)
{
result r = __pVideoTextureUpdateListener->Remove(const_cast <IVideoTextureUpdateListener*>(&listener));
- SysTryLog(NID_GRP, r != E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryLog(NID_GRP, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r));
}
int
if (__funcEglDestroySyncKhr != null && __pBuffer[i].__eglSync != EGL_NO_SYNC_KHR)
{
- __funcEglDestroySyncKhr(__eglDisplay, __pBuffer[i].__eglSync);
+ __funcEglDestroySyncKhr(__eglDisplay, __pBuffer[i].__eglSync);
__pBuffer[i].__eglSync = EGL_NO_SYNC_KHR;
}
Drawable __pixmap[_VIDEO_TEXTURE_BUFFER_MAX];
Damage __damage[_VIDEO_TEXTURE_BUFFER_MAX];
Display* __pDisplay;
- int __eventBaseReturn;
- _VideoTexture* __pVideoTexture;
- bool __keepRunning;
+ int __eventBaseReturn;
+ _VideoTexture* __pVideoTexture;
+ bool __keepRunning;
- friend class _VideoTexture;
+ friend class _VideoTexture;
};
class _VideoTexture
result
_VideoTextureImpl::Construct(int textureId, int width, int height)
{
- SysTryReturnResult(NID_GRP, this->__pNativeVideoTexture != null, E_OUT_OF_MEMORY, "Fails to allocate memory.\n");
+ SysTryReturnResult(NID_GRP, this->__pNativeVideoTexture != null, E_OUT_OF_MEMORY, "Memory allocation failed.\n");
return this->__pNativeVideoTexture->Construct(textureId, width, height);
}
pChangeActionEventInfo = new (std::nothrow)ChangeActionEventInfo;
SysTryReturn(NID_GRP
, pChangeActionEventInfo
- , E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ , E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pChangeActionEventInfo->action = changeAction;
pChangeActionEventInfo->changedTextIndex = textIndexBeforeChanged;
pChangeActionEventInfo = new (std::nothrow)ChangeActionEventInfo;
SysTryReturn(NID_GRP
, pChangeActionEventInfo
- , E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ , E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pChangeActionEventInfo->action = changeAction;
pChangeActionEventInfo->changedTextIndex = textIndexBeforeChanged;
{
pTextLine = static_cast < TextLine* >(pTextLineNode->pObject);
pKeepTextLine = pTextLine->CopyN();
- SysTryReturn(NID_GRP, pKeepTextLine, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pKeepTextLine, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pNextTextLineNode = pTextLineNode->pNext;
TextComposite::TextComposite(TextElement* pTextElement)
{
__pTextElementList = new (std::nothrow) LinkedList;
- SysTryReturn(NID_GRP, __pTextElementList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, __pTextElementList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__wrap = TEXT_OBJECT_WRAP_TYPE_WORD;
__workStart = 0;
drawAbbrevText = false;
}
- blockRect = FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height);
+ blockRect = adjustedRect;
+ blockRect.y = displayRect.y;
currentLength = Math::Min(textLength, currentLength);
while (textLength > 0)
int LTRTextLength = 0;
int RTLTextLength = 0;
bool drawAbbrevText = false;
+ bool isEndRTL = false;
+ int savedLTRTextLength = 0;
if (__ignoreRearBlank && __rearSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE)
{
- pTextElement = GetElementAtTextIndex(startTextIndex + textLength - 1, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset);
- SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+ pLastDisplayTextElement = GetElementAtTextIndex(startTextIndex + textLength - 1, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset);
+ SysTryCatch(NID_GRP, pLastDisplayTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
- const TextSimple* pSimpleText = dynamic_cast <const TextSimple*>(pTextElement);
+ const TextSimple* pSimpleText = dynamic_cast <const TextSimple*>(pLastDisplayTextElement);
if (pSimpleText != null)
{
int length = startTextIndex + textLength - elementTextOffset - 1;
, TEXT_OBJECT_WRAP_TYPE_NONE, textLength, textSize.width, textSize.height);
}
- pLastDisplayTextElement = (textLength == 0) ? GetElementAtTextIndex(startTextIndex) : GetElementAtTextIndex(startTextIndex + textLength - 1);
- SysTryCatch(NID_GRP, pLastDisplayTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
-
- if (pLastDisplayTextElement->GetType() == TEXT_ELEMENT_TYPE_TEXT || pLastDisplayTextElement->GetType() == TEXT_ELEMENT_TYPE_CUTLINK)
+ do
{
- TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pLastDisplayTextElement);
- SysTryCatch(NID_GRP, pSimpleText, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to cast text element.");
+ TextElement* pLastTextElement = (textLength == 0) ? GetElementAtTextIndex(startTextIndex) : GetElementAtTextIndex(startTextIndex + textLength - 1);
+ SysTryCatch(NID_GRP, pLastTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
- SetAbbrevObjectFontInfo(pSimpleText);
- }
- __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height);
+ if (pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_TEXT || pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_CUTLINK)
+ {
+ TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pLastTextElement);
+ SysTryCatch(NID_GRP, pSimpleText, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to cast text element.");
- ForwardAnalyze(startTextIndex, __length - startTextIndex, adjustedRect.width - abbrevTextDim.width
- , TEXT_OBJECT_WRAP_TYPE_CHARACTER, textLength, textSize.width, textSize.height);
+ SetAbbrevObjectFontInfo(pSimpleText);
+ }
+ __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height);
+
+ ForwardAnalyze(startTextIndex, __length - startTextIndex, adjustedRect.width - abbrevTextDim.width
+ , TEXT_OBJECT_WRAP_TYPE_CHARACTER, textLength, textSize.width, textSize.height);
+
+ if (textLength > 0)
+ {
+ TextElement* pPrevTextElement = GetElementAtTextIndex(startTextIndex + textLength -1);
+ SysTryCatch(NID_GRP, pPrevTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+
+ if (pLastTextElement == pPrevTextElement)
+ {
+ break;
+ }
+ }
+ }
+ while (textLength > 0);
textSize.width += abbrevTextDim.width;
currentLength = Math::Min(currentLength, textLength);
SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to move next element.", GetErrorMessage(r));
}
- blockRect = FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height);
+ blockRect = adjustedRect;
+ blockRect.y = displayRect.y;
currentLength = Math::Min(textLength, currentLength);
if (drawAbbrevText)
{
- if (IsRTLCharacter(startTextIndex + currentLength))
+ if (IsRTLCharacter(startTextIndex + currentLength)) // LTR + RTL
{
+ isEndRTL = true;
LTRTextLength = SearchLTRTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex;
RTLTextLength = textLength - LTRTextLength;
if (LTRTextLength <= 0)
{
- if (pLastDisplayTextElement->IsBackGroundDrawingModeEnable())
+ if (pLastDisplayTextElement && pLastDisplayTextElement->IsBackGroundDrawingModeEnable())
{
r = canvasImpl.FillRectangle(pLastDisplayTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
drawAbbrevText = false;
}
}
- else
+ else // RTL + LTR
{
- LTRTextLength = textLength;
- RTLTextLength = 0;
+ RTLTextLength= SearchRTLTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex;
+ LTRTextLength= textLength - RTLTextLength;
+
+ if (LTRTextLength <= 0)
+ {
+ if (pLastDisplayTextElement && pLastDisplayTextElement->IsBackGroundDrawingModeEnable())
+ {
+ r = canvasImpl.FillRectangle(pLastDisplayTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
+ SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
+
+ adjustedRect.x += abbrevTextDim.width;
+ adjustedRect.width -= abbrevTextDim.width;
+
+ drawAbbrevText = false;
+ }
}
}
- if (LTRTextLength > 0)
+ if (isEndRTL == false)
{
- currentLength = Math::Min(LTRTextLength, currentLength);
-
- while (LTRTextLength > 0)
+ if (LTRTextLength > 0)
{
- LTRTextLength -= currentLength;
-
- pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
+ savedLTRTextLength = LTRTextLength;
+ currentLength = Math::Min(LTRTextLength, currentLength);
- switch (alignment & TEXT_ALIGNMASK_VERT)
+ while (LTRTextLength > 0)
{
- case TEXT_OBJECT_ALIGNMENT_MIDDLE:
- adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2;
- break;
+ LTRTextLength -= currentLength;
- case TEXT_OBJECT_ALIGNMENT_BOTTOM:
- adjustedRect.y = displayRect.y + (displayRect.height - textSize.height);
- break;
+ //pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
+ pTextElement->GetRegion(textIndexFromElementOffset+RTLTextLength, currentLength, textSize.width, textSize.height);
- case TEXT_OBJECT_ALIGNMENT_TOP:
- // fall through
- default:
- adjustedRect.y = displayRect.y;
- break;
+ switch (alignment & TEXT_ALIGNMASK_VERT)
+ {
+ case TEXT_OBJECT_ALIGNMENT_MIDDLE:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2;
+ break;
+
+ case TEXT_OBJECT_ALIGNMENT_BOTTOM:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height);
+ break;
+
+ case TEXT_OBJECT_ALIGNMENT_TOP:
+ // fall through
+ default:
+ adjustedRect.y = displayRect.y;
+ break;
+ }
+
+ if (pTextElement->IsBackGroundDrawingModeEnable())
+ {
+ DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
+ }
+
+ bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
+ if (__displayBlock && isAlternateLookEnabled == false)
+ {
+ DrawBlock(canvasImpl, blockRect, startTextIndex+RTLTextLength, currentLength, alignment, action);
+ }
+
+ pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset+RTLTextLength, currentLength, alignment, action);
+
+ adjustedRect.x += textSize.width;
+ adjustedRect.width -= textSize.width;
+
+ if (!LTRTextLength || adjustedRect.width <= 0)
+ {
+ break;
+ }
+
+ startTextIndex += currentLength;
+
+ if (pEnum->MoveNext() != E_SUCCESS)
+ {
+ break;
+ }
+
+ pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+
+ textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
+ currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength());
+
+ if (currentLength == 0)
+ {
+ break;
+ }
}
+ textLength -= savedLTRTextLength;
+ }
+
+ if (drawAbbrevText && (RTLTextLength > 0))
+ {
if (pTextElement->IsBackGroundDrawingModeEnable())
{
- DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
+ r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
+ SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
- bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
- if (__displayBlock && isAlternateLookEnabled == false)
- {
- DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action);
- }
+ __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
- pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action);
+ adjustedRect.x += abbrevTextDim.width;
+ adjustedRect.width -= abbrevTextDim.width;
- adjustedRect.x += textSize.width;
- adjustedRect.width -= textSize.width;
+ drawAbbrevText = false;
+ }
- if (!LTRTextLength || adjustedRect.width <= 0)
- {
- break;
- }
+ pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset);
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
- startTextIndex += currentLength;
+ if (RTLTextLength > 0)
+ {
+ pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
+
+ currentLength = Math::Min(RTLTextLength, currentLength);
- if (pEnum->MoveNext() != E_SUCCESS)
+ while (RTLTextLength > 0)
{
- break;
+ RTLTextLength -= currentLength;
+
+ pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
+
+ switch (alignment & TEXT_ALIGNMASK_VERT)
+ {
+ case TEXT_OBJECT_ALIGNMENT_MIDDLE:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2;
+ break;
+
+ case TEXT_OBJECT_ALIGNMENT_BOTTOM:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height);
+ break;
+
+ case TEXT_OBJECT_ALIGNMENT_TOP:
+ // fall through
+ default:
+ adjustedRect.y = displayRect.y;
+ break;
+ }
+
+ if (pTextElement->IsBackGroundDrawingModeEnable())
+ {
+ DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
+ }
+
+ bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
+ if (__displayBlock && isAlternateLookEnabled == false)
+ {
+ DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action);
+ }
+
+ pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action);
+
+ adjustedRect.x += textSize.width;
+ adjustedRect.width -= textSize.width;
+
+ if (!RTLTextLength)
+ {
+ break;
+ }
+
+ startTextIndex += currentLength;
+
+ if (pEnum->MoveNext() != E_SUCCESS)
+ {
+ break;
+ }
+
+ pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+
+ textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
+ currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength());
+
+ if (currentLength == 0)
+ {
+ break;
+ }
}
- pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
- SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+ textLength -= RTLTextLength;
+ }
- textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
- currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength());
- if (currentLength == 0)
+ if (drawAbbrevText)
+ {
+ if (pTextElement->IsBackGroundDrawingModeEnable())
{
- break;
+ r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
+ SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
- }
- textIndexFromElementOffset += LTRTextLength;
- textLength -= LTRTextLength;
- }
+ __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
- if (drawAbbrevText && (RTLTextLength > 0))
+ adjustedRect.x += abbrevTextDim.width;
+ adjustedRect.width -= abbrevTextDim.width;
+ }
+ }
+ else
{
- if (pTextElement->IsBackGroundDrawingModeEnable())
+ if (LTRTextLength > 0)
{
- r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
- SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- }
+ currentLength = Math::Min(LTRTextLength, currentLength);
- __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
+ while (LTRTextLength > 0)
+ {
+ LTRTextLength -= currentLength;
- adjustedRect.x += abbrevTextDim.width;
- adjustedRect.width -= abbrevTextDim.width;
+ pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
- drawAbbrevText = false;
- }
+ switch (alignment & TEXT_ALIGNMASK_VERT)
+ {
+ case TEXT_OBJECT_ALIGNMENT_MIDDLE:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2;
+ break;
- if (RTLTextLength > 0)
- {
- currentLength = Math::Min(RTLTextLength, currentLength);
+ case TEXT_OBJECT_ALIGNMENT_BOTTOM:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height);
+ break;
- while (RTLTextLength > 0)
- {
- RTLTextLength -= currentLength;
+ case TEXT_OBJECT_ALIGNMENT_TOP:
+ // fall through
+ default:
+ adjustedRect.y = displayRect.y;
+ break;
+ }
- pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
+ if (pTextElement->IsBackGroundDrawingModeEnable())
+ {
+ DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
+ }
- switch (alignment & TEXT_ALIGNMASK_VERT)
- {
- case TEXT_OBJECT_ALIGNMENT_MIDDLE:
- adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2;
- break;
+ bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
+ if (__displayBlock && isAlternateLookEnabled == false)
+ {
+ DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action);
+ }
- case TEXT_OBJECT_ALIGNMENT_BOTTOM:
- adjustedRect.y = displayRect.y + (displayRect.height - textSize.height);
- break;
+ pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action);
- case TEXT_OBJECT_ALIGNMENT_TOP:
- // fall through
- default:
- adjustedRect.y = displayRect.y;
- break;
+ adjustedRect.x += textSize.width;
+ adjustedRect.width -= textSize.width;
+
+ startTextIndex += currentLength;
+ if (!LTRTextLength || adjustedRect.width <= 0)
+ {
+ break;
+ }
+
+ if (pEnum->MoveNext() != E_SUCCESS)
+ {
+ break;
+ }
+
+ pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+
+ textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
+ currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength());
+
+ if (currentLength == 0)
+ {
+ break;
+ }
}
+ textIndexFromElementOffset += LTRTextLength;
+ textLength -= LTRTextLength;
+ }
+
+ if (drawAbbrevText && (RTLTextLength > 0))
+ {
if (pTextElement->IsBackGroundDrawingModeEnable())
{
- DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
+ r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
+ SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
- bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
- if (__displayBlock && isAlternateLookEnabled == false)
- {
- DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action);
- }
+ __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
- pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action);
+ adjustedRect.x += abbrevTextDim.width;
+ adjustedRect.width -= abbrevTextDim.width;
- adjustedRect.x += textSize.width;
- adjustedRect.width -= textSize.width;
+ drawAbbrevText = false;
+ }
- if (!RTLTextLength)
- {
- break;
- }
+ pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset);
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
- startTextIndex += currentLength;
+ if (RTLTextLength > 0)
+ {
+ currentLength = Math::Min(RTLTextLength, currentLength);
- if (pEnum->MoveNext() != E_SUCCESS)
+ while (RTLTextLength > 0)
{
- break;
- }
+ RTLTextLength -= currentLength;
- pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
- SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+ pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
- textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
- currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength());
+ switch (alignment & TEXT_ALIGNMASK_VERT)
+ {
+ case TEXT_OBJECT_ALIGNMENT_MIDDLE:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2;
+ break;
- if (currentLength == 0)
- {
- break;
+ case TEXT_OBJECT_ALIGNMENT_BOTTOM:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height);
+ break;
+
+ case TEXT_OBJECT_ALIGNMENT_TOP:
+ // fall through
+ default:
+ adjustedRect.y = displayRect.y;
+ break;
+ }
+
+ if (pTextElement->IsBackGroundDrawingModeEnable())
+ {
+ DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
+ }
+
+ bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
+ if (__displayBlock && isAlternateLookEnabled == false)
+ {
+ DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action);
+ }
+
+ pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action);
+
+ adjustedRect.x += textSize.width;
+ adjustedRect.width -= textSize.width;
+
+ if (!RTLTextLength)
+ {
+ break;
+ }
+
+ startTextIndex += currentLength;
+
+ if (pEnum->MoveNext() != E_SUCCESS)
+ {
+ break;
+ }
+
+ pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+
+ textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
+ currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength());
+
+ if (currentLength == 0)
+ {
+ break;
+ }
}
- }
- textLength -= RTLTextLength;
- }
+ textLength -= RTLTextLength;
+ }
- if (drawAbbrevText)
- {
- if (pTextElement->IsBackGroundDrawingModeEnable())
+ if (drawAbbrevText)
{
- r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
- SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- }
+ if (pTextElement->IsBackGroundDrawingModeEnable())
+ {
+ r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
+ SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
- __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
+ __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
- adjustedRect.x += abbrevTextDim.width;
- adjustedRect.width -= abbrevTextDim.width;
+ adjustedRect.x += abbrevTextDim.width;
+ adjustedRect.width -= abbrevTextDim.width;
+ }
}
Release(pEnum);
SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to move next element.", GetErrorMessage(r));
}
- blockRect = FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height);
+ blockRect = adjustedRect;
+ blockRect.y = displayRect.y;
adjustedRect.y = displayRect.y + displayRect.height - baseline;
canvasImpl.SetTextOrigin(TEXT_ORIGIN_BASELINE);
DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action);
}
- FloatRectangle imageRect = adjustedRect;
- imageRect.y -= textSize.height;
TextElementType objectType = pTextElement->GetType();
-
if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT)
{
pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action);
}
else
{
+ FloatRectangle imageRect = adjustedRect;
+ imageRect.y -= textSize.height;
+
pTextElement->Draw(canvasImpl, imageRect, textIndexFromElementOffset, currentLength, alignment, action);
}
return r;
}
+
result
TextComposite::DrawWithBaselineWithEllipsis(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment,
const TextObjectActionType action, int baseline)
int LTRTextLength = 0;
int RTLTextLength = 0;
bool drawAbbrevText = false;
+ bool isEndRTL = false;
+ int savedLTRTextLength = 0;
if (__ignoreRearBlank && __rearSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE)
{
, TEXT_OBJECT_WRAP_TYPE_NONE, textLength, textSize.width, textSize.height);
}
- TextElement* pLastTextElement = (textLength == 0) ? GetElementAtTextIndex(startTextIndex) : GetElementAtTextIndex(startTextIndex + textLength - 1);
- SysTryCatch(NID_GRP, pLastTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+ do
+ {
+ TextElement* pLastTextElement = (textLength == 0) ? GetElementAtTextIndex(startTextIndex) : GetElementAtTextIndex(startTextIndex + textLength - 1);
+ SysTryCatch(NID_GRP, pLastTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
- if (pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_TEXT || pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_CUTLINK)
+ if (pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_TEXT || pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_CUTLINK)
+ {
+ TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pLastTextElement);
+ SysTryCatch(NID_GRP, pSimpleText, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to cast text element.");
+
+ SetAbbrevObjectFontInfo(pSimpleText);
+ }
+ __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height);
+
+ ForwardAnalyze(startTextIndex, __length - startTextIndex, adjustedRect.width - abbrevTextDim.width
+ , TEXT_OBJECT_WRAP_TYPE_CHARACTER, textLength, textSize.width, textSize.height);
+
+ if (textLength > 0)
+ {
+ TextElement* pPrevTextElement = GetElementAtTextIndex(startTextIndex + textLength -1);
+ SysTryCatch(NID_GRP, pPrevTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+
+ if (pLastTextElement == pPrevTextElement)
+ {
+ break;
+ }
+ }
+ }
+ while (textLength > 0);
+
+ textSize.width += abbrevTextDim.width;
+ currentLength = Math::Min(currentLength, textLength);
+ drawAbbrevText = true;
+ }
+
+ switch (alignment & TEXT_ALIGNMASK_HORIZ)
+ {
+ case TEXT_OBJECT_ALIGNMENT_CENTER:
+ if (textSize.width < adjustedRect.width)
{
- TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pLastTextElement);
- SysTryCatch(NID_GRP, pSimpleText, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to cast text element.");
+ adjustedRect.x += (adjustedRect.width - textSize.width) / 2;
+ }
+ break;
- SetAbbrevObjectFontInfo(pSimpleText);
+ case TEXT_OBJECT_ALIGNMENT_RIGHT:
+ if (textSize.width < adjustedRect.width)
+ {
+ adjustedRect.x += adjustedRect.width - textSize.width;
}
- __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height);
+ break;
+
+ case TEXT_OBJECT_ALIGNMENT_LEFT:
+ // fall through
+ default:
+ break;
+ }
+
+ pEnum = __pTextElementList->GetEnumeratorN();
+ for (int i = 0; i <= elementIndex; i++)
+ {
+ r = pEnum->MoveNext();
+ SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to move next element.", GetErrorMessage(r));
+ }
+
+ currentLength = Math::Min(textLength, currentLength);
+ blockRect = adjustedRect;
+ blockRect.y = displayRect.y;
+ adjustedRect.y = displayRect.y + displayRect.height - baseline;
+ canvasImpl.SetTextOrigin(TEXT_ORIGIN_BASELINE);
+
+ if (drawAbbrevText)
+ {
+ if (IsRTLCharacter(startTextIndex + currentLength)) // LTR + RTL
+ {
+ isEndRTL = true;
+ LTRTextLength = SearchLTRTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex;
+ RTLTextLength = textLength - LTRTextLength;
+
+ if (LTRTextLength <= 0)
+ {
+ if (pLastDisplayTextElement && pLastDisplayTextElement->IsBackGroundDrawingModeEnable())
+ {
+ r = canvasImpl.FillRectangle(pLastDisplayTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
+ SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
+
+ adjustedRect.x += abbrevTextDim.width;
+ adjustedRect.width -= abbrevTextDim.width;
+
+ drawAbbrevText = false;
+ }
+ }
+ else // RTL + LTR
+ {
+ RTLTextLength= SearchRTLTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex;
+ LTRTextLength= textLength - RTLTextLength;
+
+ if (LTRTextLength <= 0)
+ {
+ if (pLastDisplayTextElement && pLastDisplayTextElement->IsBackGroundDrawingModeEnable())
+ {
+ r = canvasImpl.FillRectangle(pLastDisplayTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
+ SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
+
+ adjustedRect.x += abbrevTextDim.width;
+ adjustedRect.width -= abbrevTextDim.width;
+
+ drawAbbrevText = false;
+ }
+ }
+ }
+
+ if (isEndRTL == false)
+ {
+ if (LTRTextLength > 0)
+ {
+ savedLTRTextLength = LTRTextLength;
+ currentLength = Math::Min(LTRTextLength, currentLength);
+
+ while (LTRTextLength > 0)
+ {
+ LTRTextLength -= currentLength;
+
+ //pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
+ pTextElement->GetRegion(textIndexFromElementOffset+RTLTextLength, currentLength, textSize.width, textSize.height);
+
+ switch (alignment & TEXT_ALIGNMASK_VERT)
+ {
+ case TEXT_OBJECT_ALIGNMENT_MIDDLE:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2;
+ break;
+
+ case TEXT_OBJECT_ALIGNMENT_BOTTOM:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height);
+ break;
+
+ case TEXT_OBJECT_ALIGNMENT_TOP:
+ // fall through
+ default:
+ adjustedRect.y = displayRect.y;
+ break;
+ }
+
+ if (pTextElement->IsBackGroundDrawingModeEnable())
+ {
+ DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
+ }
+
+ bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
+ if (__displayBlock && isAlternateLookEnabled == false)
+ {
+ DrawBlock(canvasImpl, blockRect, startTextIndex+RTLTextLength, currentLength, alignment, action);
+ }
+
+ TextElementType objectType = pTextElement->GetType();
+ if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT)
+ {
+ pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset+RTLTextLength, currentLength, alignment, action);
+ }
+ else
+ {
+ FloatRectangle imageRect = adjustedRect;
+ imageRect.y -= textSize.height;
+
+ pTextElement->Draw(canvasImpl, imageRect, textIndexFromElementOffset, currentLength, alignment, action);
+ }
+
+ adjustedRect.x += textSize.width;
+ adjustedRect.width -= textSize.width;
+
+ if (!LTRTextLength || adjustedRect.width <= 0)
+ {
+ break;
+ }
+
+ startTextIndex += currentLength;
+
+ if (pEnum->MoveNext() != E_SUCCESS)
+ {
+ break;
+ }
+
+ pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+
+ textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
+ currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength());
+
+ if (currentLength == 0)
+ {
+ break;
+ }
+ }
+
+ textLength -= savedLTRTextLength;
+ }
+
+ if (drawAbbrevText && (RTLTextLength > 0))
+ {
+ if (pTextElement->IsBackGroundDrawingModeEnable())
+ {
+ r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
+ SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
+
+ adjustedRect.x += abbrevTextDim.width;
+ adjustedRect.width -= abbrevTextDim.width;
+
+ drawAbbrevText = false;
+ }
+
+ pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset);
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+
+ if (RTLTextLength > 0)
+ {
+ pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
+
+ currentLength = Math::Min(RTLTextLength, currentLength);
+
+ while (RTLTextLength > 0)
+ {
+ RTLTextLength -= currentLength;
+
+ pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
+
+ switch (alignment & TEXT_ALIGNMASK_VERT)
+ {
+ case TEXT_OBJECT_ALIGNMENT_MIDDLE:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2;
+ break;
- ForwardAnalyze(startTextIndex, __length - startTextIndex, adjustedRect.width - abbrevTextDim.width
- , TEXT_OBJECT_WRAP_TYPE_CHARACTER, textLength, textSize.width, textSize.height);
+ case TEXT_OBJECT_ALIGNMENT_BOTTOM:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height);
+ break;
- textSize.width += abbrevTextDim.width;
- currentLength = Math::Min(currentLength, textLength);
- drawAbbrevText = true;
- }
+ case TEXT_OBJECT_ALIGNMENT_TOP:
+ // fall through
+ default:
+ adjustedRect.y = displayRect.y;
+ break;
+ }
- switch (alignment & TEXT_ALIGNMASK_HORIZ)
- {
- case TEXT_OBJECT_ALIGNMENT_CENTER:
- if (textSize.width < adjustedRect.width)
- {
- adjustedRect.x += (adjustedRect.width - textSize.width) / 2;
- }
- break;
+ if (pTextElement->IsBackGroundDrawingModeEnable())
+ {
+ DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
+ }
- case TEXT_OBJECT_ALIGNMENT_RIGHT:
- if (textSize.width < adjustedRect.width)
- {
- adjustedRect.x += adjustedRect.width - textSize.width;
- }
- break;
+ bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
+ if (__displayBlock && isAlternateLookEnabled == false)
+ {
+ DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action);
+ }
- case TEXT_OBJECT_ALIGNMENT_LEFT:
- // fall through
- default:
- break;
- }
+ pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action);
- pEnum = __pTextElementList->GetEnumeratorN();
- for (int i = 0; i <= elementIndex; i++)
- {
- r = pEnum->MoveNext();
- SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to move next element.", GetErrorMessage(r));
- }
+ adjustedRect.x += textSize.width;
+ adjustedRect.width -= textSize.width;
- currentLength = Math::Min(textLength, currentLength);
- blockRect = FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height);
- adjustedRect.y = displayRect.y + displayRect.height - baseline;
- canvasImpl.SetTextOrigin(TEXT_ORIGIN_BASELINE);
+ if (!RTLTextLength)
+ {
+ break;
+ }
- if (drawAbbrevText)
- {
- if (IsRTLCharacter(startTextIndex + currentLength))
- {
- LTRTextLength = SearchLTRTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex;
- RTLTextLength = textLength - LTRTextLength;
+ startTextIndex += currentLength;
- if (LTRTextLength <= 0)
- {
- if (pLastDisplayTextElement && pLastDisplayTextElement->IsBackGroundDrawingModeEnable())
+ if (pEnum->MoveNext() != E_SUCCESS)
{
- r = canvasImpl.FillRectangle(pLastDisplayTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
- SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ break;
}
- __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
+ pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
- adjustedRect.x += abbrevTextDim.width;
- adjustedRect.width -= abbrevTextDim.width;
+ textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
+ currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength());
- drawAbbrevText = false;
+ if (currentLength == 0)
+ {
+ break;
+ }
}
+
+ textLength -= RTLTextLength;
}
- else
- {
- LTRTextLength = textLength;
- RTLTextLength = 0;
- }
- }
- if (LTRTextLength > 0)
- {
- currentLength = Math::Min(LTRTextLength, currentLength);
- while (LTRTextLength > 0)
+ if (drawAbbrevText)
{
- LTRTextLength -= currentLength;
-
- pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
-
if (pTextElement->IsBackGroundDrawingModeEnable())
{
- DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
+ r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
+ SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
- bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
- if (__displayBlock && isAlternateLookEnabled == false)
- {
- DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action);
- }
+ __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
- FloatRectangle imageRect = adjustedRect;
- imageRect.y -= textSize.height;
- TextElementType objectType = pTextElement->GetType();
+ adjustedRect.x += abbrevTextDim.width;
+ adjustedRect.width -= abbrevTextDim.width;
+ }
+ }
+ else
+ {
+ if (LTRTextLength > 0)
+ {
+ currentLength = Math::Min(LTRTextLength, currentLength);
- if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT)
+ while (LTRTextLength > 0)
{
+ LTRTextLength -= currentLength;
+
+ pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
+
+ switch (alignment & TEXT_ALIGNMASK_VERT)
+ {
+ case TEXT_OBJECT_ALIGNMENT_MIDDLE:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2;
+ break;
+
+ case TEXT_OBJECT_ALIGNMENT_BOTTOM:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height);
+ break;
+
+ case TEXT_OBJECT_ALIGNMENT_TOP:
+ // fall through
+ default:
+ adjustedRect.y = displayRect.y;
+ break;
+ }
+
+ if (pTextElement->IsBackGroundDrawingModeEnable())
+ {
+ DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
+ }
+
+ bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
+ if (__displayBlock && isAlternateLookEnabled == false)
+ {
+ DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action);
+ }
+
pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action);
- }
- else
- {
- pTextElement->Draw(canvasImpl, imageRect, textIndexFromElementOffset, currentLength, alignment, action);
- }
- adjustedRect.x += textSize.width;
- adjustedRect.width -= textSize.width;
+ adjustedRect.x += textSize.width;
+ adjustedRect.width -= textSize.width;
- if (!LTRTextLength || adjustedRect.width <= 0)
- {
- break;
+ startTextIndex += currentLength;
+ if (!LTRTextLength || adjustedRect.width <= 0)
+ {
+ break;
+ }
+
+ if (pEnum->MoveNext() != E_SUCCESS)
+ {
+ break;
+ }
+
+ pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+
+ textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
+ currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength());
+
+ if (currentLength == 0)
+ {
+ break;
+ }
}
- startTextIndex += currentLength;
+ textIndexFromElementOffset += LTRTextLength;
+ textLength -= LTRTextLength;
+ }
- if (pEnum->MoveNext() != E_SUCCESS)
+ if (drawAbbrevText && (RTLTextLength > 0))
+ {
+ if (pTextElement->IsBackGroundDrawingModeEnable())
{
- break;
+ r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
+ SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
- pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
- SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+ __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
- textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
- currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength());
+ adjustedRect.x += abbrevTextDim.width;
+ adjustedRect.width -= abbrevTextDim.width;
- if (currentLength == 0)
- {
- break;
- }
+ drawAbbrevText = false;
}
- textIndexFromElementOffset += LTRTextLength;
- textLength -= LTRTextLength;
- }
+ pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset);
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
- if (drawAbbrevText && (RTLTextLength > 0))
- {
- if (pTextElement->IsBackGroundDrawingModeEnable())
+ if (RTLTextLength > 0)
{
- r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
- SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- }
+ currentLength = Math::Min(RTLTextLength, currentLength);
- __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
+ while (RTLTextLength > 0)
+ {
+ RTLTextLength -= currentLength;
- adjustedRect.x += abbrevTextDim.width;
- adjustedRect.width -= abbrevTextDim.width;
+ pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
- drawAbbrevText = false;
- }
+ switch (alignment & TEXT_ALIGNMASK_VERT)
+ {
+ case TEXT_OBJECT_ALIGNMENT_MIDDLE:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height) / 2;
+ break;
- if (RTLTextLength > 0)
- {
- currentLength = Math::Min(RTLTextLength, currentLength);
+ case TEXT_OBJECT_ALIGNMENT_BOTTOM:
+ adjustedRect.y = displayRect.y + (displayRect.height - textSize.height);
+ break;
- while (RTLTextLength > 0)
- {
- RTLTextLength -= currentLength;
+ case TEXT_OBJECT_ALIGNMENT_TOP:
+ // fall through
+ default:
+ adjustedRect.y = displayRect.y;
+ break;
+ }
- pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
+ if (pTextElement->IsBackGroundDrawingModeEnable())
+ {
+ DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
+ }
- if (pTextElement->IsBackGroundDrawingModeEnable())
- {
- DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
- }
+ bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
+ if (__displayBlock && isAlternateLookEnabled == false)
+ {
+ DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action);
+ }
- bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
- if (__displayBlock && isAlternateLookEnabled == false)
- {
- DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action);
- }
+ TextElementType objectType = pTextElement->GetType();
- FloatRectangle imageRect = adjustedRect;
- imageRect.y -= textSize.height;
- TextElementType objectType = pTextElement->GetType();
+ if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT)
+ {
+ pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action);
+ }
+ else
+ {
+ FloatRectangle imageRect = adjustedRect;
+ imageRect.y -= textSize.height;
- if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT)
- {
- pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, alignment, action);
- }
- else
- {
- pTextElement->Draw(canvasImpl, imageRect, textIndexFromElementOffset, currentLength, alignment, action);
- }
+ pTextElement->Draw(canvasImpl, imageRect, textIndexFromElementOffset, currentLength, alignment, action);
+ }
- adjustedRect.x += textSize.width;
- adjustedRect.width -= textSize.width;
+ adjustedRect.x += textSize.width;
+ adjustedRect.width -= textSize.width;
- if (!RTLTextLength)
- {
- break;
- }
+ if (!RTLTextLength)
+ {
+ break;
+ }
- startTextIndex += currentLength;
+ startTextIndex += currentLength;
- if (pEnum->MoveNext() != E_SUCCESS)
- {
- break;
- }
+ if (pEnum->MoveNext() != E_SUCCESS)
+ {
+ break;
+ }
- pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
- SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
+ pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
- textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
- currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength());
+ textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
+ currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength());
- if (currentLength == 0)
- {
- break;
+ if (currentLength == 0)
+ {
+ break;
+ }
}
- }
- textLength -= RTLTextLength;
- }
+ textLength -= RTLTextLength;
+ }
- if (drawAbbrevText)
- {
- if (pTextElement->IsBackGroundDrawingModeEnable())
+ if (drawAbbrevText)
{
- r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
- SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- }
+ if (pTextElement->IsBackGroundDrawingModeEnable())
+ {
+ r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
+ SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
- __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
+ __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), action);
- adjustedRect.x += abbrevTextDim.width;
- adjustedRect.width -= abbrevTextDim.width;
+ adjustedRect.x += abbrevTextDim.width;
+ adjustedRect.width -= abbrevTextDim.width;
+ }
}
canvasImpl.SetTextOrigin(TEXT_ORIGIN_LEFT_TOP);
int lineOffset = 0;
int lineLength = 0;
- FloatRectangle adjustedRect;
- FloatRectangle lineBounds;
- FloatDimension lineTextSize;
+ FloatRectangle adjustedRect = displayRect;
lineLength = pTextLine->GetTextLength();
lineOffset = pTextLine->GetTextOffset();
- lineBounds = pTextLine->GetBoundsF();
- pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
-
- adjustedRect = displayRect;
- adjustedRect.height = lineBounds.height;
+ adjustedRect.height = pTextLine->GetBoundsF().height;
if (action == TEXT_OBJECT_ACTION_TYPE_ABBREV)
{
int textIndexFromElementOffset = 0;
wchar_t* pText = new (std::nothrow) wchar_t[textLength+1];
- SysTryReturn(NID_GRP, pText, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pText, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
wchar_t* pTextPointer = pText;
{
TextSimple* pSimpleText = null;
pSimpleText = new (std::nothrow)TextSimple(pText, gap, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, pFont, fgColor, bgColor, outlineColor);
- SysTryReturn(NID_GRP, pSimpleText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pSimpleText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pSimpleText->SetTextOffset(__workStart - startTextIndex);
InsertElementAt(*pSimpleText, __workStart);
TextSimple* pSimpleText = null;
pSimpleText = new (std::nothrow)TextSimple(pText, gap, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, pFont, fgColor, bgColor,
outlineColor);
- SysTryReturn(NID_GRP, pSimpleText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pSimpleText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pSimpleText->SetTextOffset(__workStart - startTextIndex);
InsertElementAt(*pSimpleText, __workStart);
__pAbbrevTextElement->SetForegroundColor(pSimpleText->GetForegroundColor());
__pAbbrevTextElement->SetBackgroundColor(pSimpleText->GetBackgroundColor());
__pAbbrevTextElement->SetOutlineColor(pSimpleText->GetOutlineColor());
+ __pAbbrevTextElement->SetOutlineEnabled(pSimpleText->IsOutlineEnable());
__pAbbrevTextElement->SetAlternativeForegroundColor(pSimpleText->GetAlternativeForegroundColor());
__pAbbrevTextElement->SetAlternateLookEnabled(pSimpleText->IsAlternateLookEnabled());
+ if (pSimpleText->IsTextShadowEnable() == true)
+ {
+ __pAbbrevTextElement->SetTextShadowEnabled(true);
+ __pAbbrevTextElement->SetTextShadowOffset(pSimpleText->GetTextShadowOffset());
+ }
+
return true;
}
SysTryReturn(NID_GRP, __pCurrentTextColumn, -1, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet.");
TextLine* pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
FloatRectangle lineBounds;
FloatDimension lineTextSize;
Collection::ArrayListT<_FloatPair> pCurrentElementGapListF;
- const wchar_t* pText = pSimpleText->GetTextSource();
- pFontImpl->GetTextExtentList(pText, textIndexFromElementOffset, currentLength, pCurrentElementGapListF);
+ if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE)
+ {
+ const wchar_t* pText = pSimpleText->GetText();
+ int textLength = pSimpleText->GetTextLength();
+
+ wchar_t* pModifiedText = new (std::nothrow) wchar_t[textLength + 1];
+ SysTryCatch(NID_GRP, pModifiedText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ int length = TextSimple::ConvertEnterToSpace(pModifiedText, pText, textLength);
+ if (length > 0)
+ {
+ pModifiedText[textLength] = 0;
+ pFontImpl->GetTextExtentList(pModifiedText, 0, currentLength, pCurrentElementGapListF);
+ }
+
+ delete[] pModifiedText;
+ pModifiedText = null;
+ }
+ else
+ {
+ const wchar_t* pText = pSimpleText->GetTextSource();
+ pFontImpl->GetTextExtentList(pText, textIndexFromElementOffset, currentLength, pCurrentElementGapListF);
+ }
IEnumeratorT<_FloatPair >* pCurrentElementGapEnum = pCurrentElementGapListF.GetEnumeratorN();
while (pCurrentElementGapEnum->MoveNext() == E_SUCCESS)
lineTextSize.height = lineBounds.height;
pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
lineBounds.y = nextY;
if (!hasPrevLine)
{
pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
lineBounds.x = rect.x;
lineBounds.width = rect.width;
float nextY = lineBounds.y + lineBounds.height;
pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
lineBounds.x = rect.x;
lineBounds.y = nextY;
lineTextSize.height = lineBounds.height;
pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
lineBounds.x = rect.x;
lineBounds.y = nextY;
lineTextSize.height = lineBounds.height;
pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
lineBounds.y = nextY;
if (!hasPrevLine)
{
pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
lineBounds.x = rect.x;
lineBounds.width = rect.width;
textCount = 1;
}
+ if ((__frontSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE) &&
+ (textIndex+textCount < __length) && (GetCharacter(textIndex+textCount) == ' '))
+ {
+ textCount++;
+ }
+
lineOffset = textIndex;
lineLength = textCount;
lineTextSize.width = textSize.width;
while(pPrevTextLine)
{
TextLine* pNewTextLine = pPrevTextLine->CopyN();
- SysTryReturn(NID_GRP, pNewTextLine, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pNewTextLine, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pNewTextLine->SetTextOffset(pNewTextLine->GetTextOffset() + __workLength);
GetTextExtentList(pNewTextLine);
while(pPrevTextLine)
{
TextLine* pNewTextLine = pPrevTextLine->CopyN();
- SysTryReturn(NID_GRP, pNewTextLine, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pNewTextLine, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pNewTextLine->SetTextOffset(pNewTextLine->GetTextOffset() - __workLength);
GetTextExtentList(pNewTextLine);
float nextY = lineBounds.y + lineBounds.height;
pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
lineBounds.x = rect.x;
lineBounds.y = nextY;
lineTextSize.height = lineBounds.height;
pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
lineBounds.x = rect.x;
lineBounds.y = nextY;
lineTextSize.height = lineBounds.height;
pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
lineBounds.y = nextY;
if (!hasPrevLine)
{
pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
lineBounds.x = rect.x;
lineBounds.width = rect.width;
float nextY = lineBounds.y + lineBounds.height;
pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
lineBounds.x = rect.x;
lineBounds.y = nextY;
lineTextSize.height = lineBounds.height;
pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
lineBounds.x = rect.x;
lineBounds.y = nextY;
maxHeight = (maxHeight < textSize.height) ? textSize.height : maxHeight;
TextLine* pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pTextLine->SetBounds(lineBounds);
pTextLine->SetRegion(lineBounds.width, maxHeight);
maxHeight = textSize.height;
TextLine* pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pTextLine->SetBounds(lineBounds);
pTextLine->SetRegion(lineBounds.width, maxHeight);
displayableTextLength += lineLength;
wchar_t* pText = GetTextN(firstDisplayTextIndex, displayableTextLength);
- SysTryReturn(NID_GRP, pText, String(L""), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pText, String(L""), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
String text(pText);
delete[] pText;
return LTRTextIndex;
}
+int
+TextComposite::SearchRTLTextIndex(int startTextIndex,int fromTextIndex) const
+{
+ SysTryReturn(NID_GRP, 0 <= fromTextIndex, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+
+ bool isRTL = false;
+ int RTLTextIndex = -1;
+ wchar_t ch = 0;
+
+ for (int i = fromTextIndex; i >= startTextIndex; i--)
+ {
+ ch = GetCharacter(i);
+
+ if (TextUtility::IsRTLCharacter(ch))
+ {
+ isRTL = true;
+ }
+
+ if (isRTL == true)
+ {
+ RTLTextIndex = i + 1;
+
+ while(1)
+ {
+ ch = GetCharacter(RTLTextIndex);
+ if (TextUtility::IsStrongCharacter(ch))
+ {
+ break;
+ }
+
+ RTLTextIndex++;
+ }
+
+ break;
+ }
+ }
+
+ RTLTextIndex = (startTextIndex <= RTLTextIndex && RTLTextIndex <= fromTextIndex) ? RTLTextIndex : startTextIndex;
+
+ return RTLTextIndex;
+}
+
}}} // Tizen::Graphics::_Text
int SearchLTRTextIndex(int startTextIndex,int fromTextIndex) const;
+ int SearchRTLTextIndex(int startTextIndex,int fromTextIndex) const;
+
private:
int ComposeInNoneWrap(FloatRectangle& rect, NoneWrapComposeInfo* pNoneWrapComposeInfo = null);
pLinkElement = new (std::nothrow) TextCutLink(__isEditable, __linkType, _pText, _length,
TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, _pFont, _foregroundColor, _backgroundColor, _outlineColor);
- SysTryReturn(NID_GRP, pLinkElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pLinkElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
TextElement::CopyMembers(pLinkElement);
pLinkElement = new (std::nothrow) TextCutLink(__isEditable, __linkType, pText, textLength, _sourceType,
_pFont, _foregroundColor, _backgroundColor, _outlineColor);
- SysTryReturn(NID_GRP, pLinkElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pLinkElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pLinkElement->_isBackgroundDrawingModeEnabled = _isBackgroundDrawingModeEnabled;
pLinkElement->__isEdited = __isEdited;
CutLinkTextElementInfo* pCutlinkTextElementInfo = new (std::nothrow) CutLinkTextElementInfo;
SysTryCatch(NID_GRP
, pCutlinkTextElementInfo
- , r = E_INVALID_ARG, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ , r = E_INVALID_ARG, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pEnum = __pCutLinkTextElementInfoList->GetEnumeratorN();
while (pEnum->MoveNext() == E_SUCCESS)
int linkOffset = index;
const wchar_t* pText = text.GetPointer();
- if (pText[index + 1] == L'@')
+ if ((index+1 < totalLength) && (pText[index + 1] == L'@'))
{
return false;
}
if (index > lastLinkEndIndex)
{
- while (IsEmailCharacter(pText[linkOffset]) && lastLinkEndIndex <= linkOffset)
+ while (lastLinkEndIndex <= linkOffset && IsEmailCharacter(pText[linkOffset]))
{
linkOffset--;
}
if (!gpUrlPrefixes)
{
gpUrlPrefixes = new (std::nothrow) ArrayListT <String>;
- SysTryCatch(NID_GRP, gpUrlPrefixes != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_GRP, gpUrlPrefixes != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = gpUrlPrefixes->Construct();
SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r));
if (!gpDomainNames)
{
gpDomainNames = new (std::nothrow) ArrayListT <Tizen::Base::String>;
- SysTryCatch(NID_GRP, gpDomainNames != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_GRP, gpDomainNames != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = gpDomainNames->Construct();
SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r));
}
pTextLink = CreateTextLinkInfo(0, 0, LINK_TYPE_NONE);
- SysTryCatch(NID_GRP, pTextLink != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_GRP, pTextLink != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pTextLink->index = -1;
else
{
TextLinkInfo* pNextLink = CreateTextLinkInfo(linkStartIndex, linkLength, linkType);
- SysTryCatch(NID_GRP, pNextLink != null,r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient");
+ SysTryCatch(NID_GRP, pNextLink != null,r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
AppendTextLinkInfo(pTextLink, pNextLink);
}
TextCutLinkParser::CreateTextLinkInfo(int offset, int length, LinkType linkType)
{
TextLinkInfo* pTextLinkInfo = new (std::nothrow) TextLinkInfo;
- SysTryReturn(NID_GRP, pTextLinkInfo != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient");
+ SysTryReturn(NID_GRP, pTextLinkInfo != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pTextLinkInfo->index = 0;
pTextLinkInfo->srcOffset = offset;
__pBitmap = new (std::nothrow) Bitmap();
SysTryCatch(NID_GRP
, __pBitmap
- , , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ , , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pBitmap->Construct(bitmap, Rectangle(0, 0, bitmap.GetWidth(), bitmap.GetHeight()));
SysTryCatch(NID_GRP
pImageText = new (std::nothrow) TextImage(*__pBitmap, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, __align);
SysTryReturn(NID_GRP
, pImageText
- , null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ , null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
TextElement::CopyMembers(pImageText);
}
TextImage* pImageText = new (std::nothrow) TextImage(*__pBitmap, _sourceType, __align);
- SysTryReturn(NID_GRP, pImageText, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pImageText, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pImageText;
}
#include "FGrp_TextCommon.h"
#include "FGrp_TextTextComposite.h"
#include "FGrp_TextTextLine.h"
+#include "FGrp_TextTextUtility.h"
#include "FGrp_CoordinateSystemUtils.h"
#include <fribidi.h>
pTextLine = new (std::nothrow) TextLine(__pCompositeText);
- SysTryReturn(NID_GRP, pTextLine, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextLine, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pTextLine->__rect = __rect;
pTextLine->__endType = __endType;
pEnum->GetCurrent(currentGap);
- FriBidiChar text[1] = { __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1) };
- FriBidiCharType type[1] = { 0 };
- fribidi_get_bidi_types(text, 1, type);
- bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0;
+ TextBidiHint bidiHint = _GetTextBidiHint();
+ wchar_t ch = __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1);
+ bool isRtl = TextUtility::IsRTLCharacter(ch);
+ bool isLtr = TextUtility::IsLTRCharacter(ch);
+ bool isNeutral = TextUtility::IsNeutralCharacter(ch);
+
+ bool isBidiEnabled = (bidiHint == TEXT_BIDI_HINT_RTL) ? true : false;
+
+ isRtl = (!isRtl && !isLtr && isNeutral) ? isBidiEnabled : isRtl;
extent.x = (isRtl == true) ? currentGap.first : currentGap.second;
extent.width = 0;
}
else
{
+ TextBidiHint bidiHint = _GetTextBidiHint();
float prevLeft = 0;
float prevRight = 0;
- FriBidiChar text[2] = { __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1), __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset)};
- FriBidiCharType type[2] = { 0, 0 };
- fribidi_get_bidi_types(text, 2, type);
- bool isRtl[2] = {(type[0] & FRIBIDI_MASK_RTL) > 0, (type[1] & FRIBIDI_MASK_RTL) > 0};
+ wchar_t text[2] = { __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1), __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset)};
+ bool isRtl[2] = {TextUtility::IsRTLCharacter(text[0]), TextUtility::IsRTLCharacter(text[1])};
+ bool isLtr[2] = {TextUtility::IsLTRCharacter(text[0]), TextUtility::IsLTRCharacter(text[1])};
+ bool isNeutral[2] = {TextUtility::IsNeutralCharacter(text[0]), TextUtility::IsNeutralCharacter(text[1])};
+ bool isWeak[2] = {TextUtility::IsWeakCharacter(text[0]), TextUtility::IsWeakCharacter(text[1])};
+
+ bool isBidiEnabled = (bidiHint == TEXT_BIDI_HINT_RTL) ? true : false;
+ isRtl[0] = (!isRtl[0] && !isLtr[0] && isNeutral[0]) ? isBidiEnabled : isRtl[0];
+ isRtl[1] = (!isRtl[1] && !isLtr[1] && isNeutral[1]) ? isBidiEnabled : isRtl[1];
for (int i = 0; i < textIndexFromLineOffset; i++)
{
if (isRtl[0] && isRtl[1]) // R + R
{
- extent.x = prevLeft;
+ if (isNeutral[0] && isNeutral[1])
+ {
+ extent.x = prevRight;
+ }
+ else
+ {
+ extent.x = prevLeft;
+ }
}
else if (isRtl[0] && !isRtl[1]) // R + L
{
}
else if (!isRtl[0] && !isRtl[1]) // L + L
{
- extent.x = currentGap.first;
+ if ((isWeak[0] && isWeak[1]) && (prevLeft != currentGap.second))
+ {
+ extent.x = prevRight;
+ }
+ else
+ {
+ extent.x = currentGap.first;
+ }
}
else if (!isRtl[0] && isRtl[1]) // L + R
{
}
extent.width = 0;
-
for (int i = 0; i < textLength; i++)
{
pEnum->GetCurrent(currentGap);
__bidiHint = TEXT_BIDI_HINT_NONE;
__pCompositeText = new (std::nothrow)TextComposite();
- SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pTextColumn = new (std::nothrow)TextColumn(__pCompositeText);
- SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pDefaultFont = new (std::nothrow)Font();
- SysTryCatch(NID_GRP, __pDefaultFont, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryCatch(NID_GRP, __pDefaultFont, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pDefaultFont->Construct(FONT_STYLE_PLAIN, DEFAULT_FONT_SIZE);
SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Fail to set font.");
__rect = _CoordinateSystemUtils::ConvertToFloat(rect);
__pCompositeText = new (std::nothrow)TextComposite();
- SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pTextColumn = new (std::nothrow)TextColumn(__pCompositeText);
- SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pDefaultFont = new (std::nothrow)Font();
- SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pDefaultFont->Construct(FONT_STYLE_PLAIN, DEFAULT_FONT_SIZE);
SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Fail to set font.");
__rect = rect;
__pCompositeText = new (std::nothrow)TextComposite();
- SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pTextColumn = new (std::nothrow)TextColumn(__pCompositeText);
- SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pDefaultFont = new (std::nothrow)Font();
- SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryCatch(NID_GRP, __pTextColumn, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pDefaultFont->Construct(FONT_STYLE_PLAIN, DEFAULT_FONT_SIZE);
SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Fail to set font.");
int count = __pCompositeText->GetElementCount();
pTextObject = new (std::nothrow)TextObject();
- SysTryReturn(NID_GRP, pTextObject, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pTextObject, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pTextObject->Construct();
SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
{
if (GetTotalLineCount() != 0)
{
+ _SetTextBidiHint(bidiHint);
return E_SUCCESS;
}
}
{
if (!__isChanged || __pTextColumn->GetChangeActionEventCount() == 0)
{
+ _SetTextBidiHint(bidiHint);
return E_SUCCESS;
}
}
__pDefaultFont = pTmpFont;
__pCompositeText->SetRange(startTextIndex, textLength);
- r = __pCompositeText->SetFont(__pDefaultFont);
- SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- UpdateChangedInfo(__pCompositeText->GetWorkStart(), 0);
+ if (textLength > 0)
+ {
+ r = __pCompositeText->SetFont(__pDefaultFont);
+ SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ UpdateChangedInfo(__pCompositeText->GetWorkStart(), 0);
+ }
return E_SUCCESS;
}
IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
TextImage* pImageText = new (std::nothrow)TextImage(bitmap, sourceType, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP));
- SysTryReturn(NID_GRP, pImageText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pImageText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
int addedTextLength = pImageText->GetTextLength();
__pCompositeText->InsertElementAt(*pImageText, textIndex);
result r = E_SUCCESS;
TextImage* pImageText = new (std::nothrow)TextImage(bitmap, sourceType, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP));
- SysTryReturn(NID_GRP, pImageText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pImageText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pCompositeText->AppendElement(*pImageText);
SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
break;
}
- if (x < 0.0f)
- {
- x = 0.0f;
- }
-
int index = pTextLine->GetTextIndexFromPosition(x);
_SetTextBidiHint(bidiHint);
int lineOffset = 0;
int lineEndIndex = 0;
int lineLength = 0;
- int count = 0;
float firstDisplayPositionX = __pTextColumn->GetFirstDisplayPositionX();
FloatRectangle lineBounds;
FloatDimension lineTextSize;
- FloatDimension currentLinetextSize;
- FloatDimension prevTextSize;
+
+ FloatRectangle currentLinetextSizeRect;
+ FloatRectangle prevTextSizeRect;
_FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont);
SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
TextLine* pTextLine = __pTextColumn->GetTextLine(0);
- SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
+ if (!pTextLine)
+ {
+ SysLog(NID_GRP, "Fail to get text line");
+ return E_SYSTEM;
+ }
lineOffset = pTextLine->GetTextOffset();
lineLength = pTextLine->GetTextLength();
pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
- __pCompositeText->ForwardAnalyze(lineOffset, textIndex, lineBounds.width, __wrap, count, currentLinetextSize.width, currentLinetextSize.height);
+ currentLinetextSizeRect = pTextLine->GetTextExtentF(textIndex, 1);
if (0 < textIndex)
{
- __pCompositeText->ForwardAnalyze(lineOffset, textIndex - 1, lineBounds.width,__wrap, count, prevTextSize.width, prevTextSize.height);
+ prevTextSizeRect = pTextLine->GetTextExtentF(textIndex - 1, 1);
}
- if (prevTextSize.width < firstDisplayPositionX)
+ if (textIndex == 0)
{
- SetFirstDisplayPositionX(prevTextSize.width);
+ SetFirstDisplayPositionX(lineBounds.x);
pTextLine->SetBounds(lineBounds);
pTextLine->SetRegion(lineTextSize.width, lineTextSize.height);
pTextLine->SetTextLength(lineLength);
- __pCompositeText->GetTextExtentList(pTextLine);
}
- else if (firstDisplayPositionX + __rect.width <= currentLinetextSize.width) // 글자가 display 영역 뒤로 계속 쓸 때
+ else if (prevTextSizeRect.x < firstDisplayPositionX)
{
- float tempWidth = 0.0f;
- float tempHeight = 0.0f;
- int textCount = 0;
+ SetFirstDisplayPositionX(prevTextSizeRect.x);
- __pCompositeText->ForwardAnalyze(0, textIndex, lineBounds.width, __wrap, textCount, tempWidth, tempHeight);
- SetFirstDisplayPositionX(tempWidth - __rect.width);
+ pTextLine->SetBounds(lineBounds);
+ pTextLine->SetRegion(lineTextSize.width, lineTextSize.height);
+ pTextLine->SetTextLength(lineLength);
+ }
+ else if (firstDisplayPositionX + __rect.width <= currentLinetextSizeRect.x) // 글자가 display 영역 뒤로 계속 쓸 때
+ {
+ FloatRectangle tempTextSize;
+
+ tempTextSize = pTextLine->GetTextExtentF(textIndex, 1);
+
+ SetFirstDisplayPositionX(tempTextSize.x - __rect.width);
pTextLine->SetBounds(lineBounds);
pTextLine->SetRegion(lineTextSize.width, lineTextSize.height);
pTextLine->SetTextOffset(0);
pTextLine->SetTextLength(lineLength);
- __pCompositeText->GetTextExtentList(pTextLine);
}
else if (lineBounds.width < firstDisplayPositionX + __rect.width && lineLength <= textIndex) // 글 꽉 채운 후 한글자씩 지울 때
{
- float tempWidth = 0.0f;
- float tempHeight = 0.0f;
- int textCount = 0;
+ FloatRectangle tempTextSize;
- __pCompositeText->ForwardAnalyze(0, textIndex, lineBounds.width, __wrap, textCount, tempWidth, tempHeight);
- SetFirstDisplayPositionX(tempWidth - __rect.width);
+ tempTextSize = pTextLine->GetTextExtentF(textIndex, 1);
+
+ SetFirstDisplayPositionX(tempTextSize.x - __rect.width);
pTextLine->SetBounds(lineBounds);
pTextLine->SetRegion(lineTextSize.width, lineTextSize.height);
pTextLine->SetTextOffset(0);
pTextLine->SetTextLength(lineLength);
- __pCompositeText->GetTextExtentList(pTextLine);
}
else if (lineBounds.width < firstDisplayPositionX + __rect.width) // 글 꽉 채운 후에, 중간에 글자를 지울 때,
{
- float tempWidth = 0.0f;
- float tempHeight = 0.0f;
- int textCount = 0;
+ FloatRectangle tempTextSize;
- float gap = __rect.width - (lineBounds.width - currentLinetextSize.width);
+ float gap = __rect.width - (lineBounds.width - currentLinetextSizeRect.x);
+ tempTextSize = pTextLine->GetTextExtentF(textIndex, 1);
- __pCompositeText->ForwardAnalyze(0, textIndex, lineBounds.width, __wrap, textCount, tempWidth, tempHeight);
- SetFirstDisplayPositionX(tempWidth - gap);
+ SetFirstDisplayPositionX(tempTextSize.x - gap);
pTextLine->SetBounds(lineBounds);
pTextLine->SetRegion(lineTextSize.width, lineTextSize.height);
pTextLine->SetTextOffset(0);
pTextLine->SetTextLength(lineLength);
- __pCompositeText->GetTextExtentList(pTextLine);
}
__pTextColumn->SetFirstDisplayLineIndex(0);
float lineY = lineBounds.y;
SysTryReturn(NID_GRP, lineOffset <= textIndex && textIndex <= lineOffset + lineLength
- , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (row = %d column = %d)", row, column);
+ , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (row = %d, column = %d)", row, column);
FloatDimension lineTextSize;
pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
float posX = 0.0f;
float posY = 0.0f;
+ SysTryReturn(NID_GRP, 0 <= column && column <= lineLength, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (row = %d, column = %d)", row, column);
+
_FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont);
SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
namespace // unnamed
{
const int DEFAULT_FONT_SIZE = 42;
- const int LINE_FEED_WIDTH = 8;
+ //const int LINE_FEED_WIDTH = 8;
}
namespace Tizen { namespace Graphics
__bitmapProperty.displayEnable = false;
__bitmapProperty.pBitmap = null;
+
+ _shadow = false;
+ _shadowOffset.x = 0;
+ _shadowOffset.y = 2;
+ _opacity = 191;
+ _shadowColor = Color::GetColor(COLOR_ID_WHITE);
+ _shadowColor.SetAlpha(_opacity);
}
TextSimple::~TextSimple(void)
if (_userWrap == TEXT_OBJECT_WRAP_TYPE_NONE)
{
wchar_t* pModifiedText = new (std::nothrow) wchar_t[textLength + 1];
- SysTryReturn(NID_GRP, pModifiedText, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pModifiedText, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
int length = ConvertEnterToSpace(pModifiedText, pText, textLength);
pModifiedText[length] = 0;
case TEXT_OBJECT_WRAP_TYPE_NONE:
{
wchar_t* pModifiedText = new (std::nothrow) wchar_t[textLength + 1];
- SysTryReturn(NID_GRP, pModifiedText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pModifiedText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
int length = ConvertEnterToSpace(pModifiedText, pText, textLength);
pModifiedText[textLength] = 0;
{
if (_outline)
{
+ if (_shadow)
+ {
+ canvasImpl.SetForegroundColor(_shadowColor);
+ r = TextUtility::DrawOutlineText(canvasImpl, displayRect.x + _shadowOffset.x, displayRect.y + _shadowOffset.y, &_pText[startTextIndex], textLength, outlineColor);
+ }
+
+ canvasImpl.SetForegroundColor(foregroundColor);
return TextUtility::DrawOutlineText(canvasImpl, displayRect.x, displayRect.y, &_pText[startTextIndex], textLength, outlineColor);
}
else
{
+ if (_shadow)
+ {
+ canvasImpl.SetForegroundColor(_shadowColor);
+ r = TextUtility::DrawText(canvasImpl, displayRect.x + _shadowOffset.x, displayRect.y + _shadowOffset.y, &_pText[startTextIndex], textLength);
+ }
+
+ canvasImpl.SetForegroundColor(foregroundColor);
return TextUtility::DrawText(canvasImpl, displayRect.x, displayRect.y, &_pText[startTextIndex], textLength);
}
}
else
{
wchar_t* pModifiedText = new (std::nothrow) wchar_t[textLength + 1];
- SysTryReturn(NID_GRP, pModifiedText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pModifiedText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
int length = ConvertEnterToSpace(pModifiedText, &_pText[startTextIndex], textLength);
pModifiedText[length] = 0;
if (_outline)
{
+ if (_shadow)
+ {
+ canvasImpl.SetForegroundColor(_shadowColor);
+ TextUtility::DrawOutlineText(canvasImpl, displayRect.x + _shadowOffset.x, displayRect.y + _shadowOffset.y, pModifiedText, length, outlineColor);
+ }
+
+ canvasImpl.SetForegroundColor(foregroundColor);
TextUtility::DrawOutlineText(canvasImpl, displayRect.x, displayRect.y, pModifiedText, length, outlineColor);
}
else
{
+ if (_shadow)
+ {
+ canvasImpl.SetForegroundColor(_shadowColor);
+ TextUtility::DrawText(canvasImpl, displayRect.x + _shadowOffset.x, displayRect.y + _shadowOffset.y, pModifiedText, length);
+ }
+
+ canvasImpl.SetForegroundColor(foregroundColor);
TextUtility::DrawText(canvasImpl, displayRect.x, displayRect.y, pModifiedText, length);
}
pSimpleTextElement = new (std::nothrow) TextSimple(_pText, _length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, _pFont,
_foregroundColor, _backgroundColor, _outlineColor);
- SysTryReturn(NID_GRP, pSimpleTextElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pSimpleTextElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
TextElement::CopyMembers(pSimpleTextElement);
pText = &_pText[_offset + startTextIndex];
pSimpleTextElement = new (std::nothrow) TextSimple(pText, textLength, _sourceType, _pFont, _foregroundColor, _backgroundColor, _outlineColor);
- SysTryReturn(NID_GRP, pSimpleTextElement, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pSimpleTextElement, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pSimpleTextElement->SetUserWrap(_userWrap);
pSimpleTextElement->_isBackgroundDrawingModeEnabled = _isBackgroundDrawingModeEnabled;
case SET_FONT_FGCOLOR:
_foregroundColor = Color(value);
+ if (_shadow)
+ {
+ SetTextShadowColor();
+ }
break;
case SET_FONT_BGCOLOR:
TextSimple::SetForegroundColor(const Color& color)
{
_foregroundColor = color;
+ if (_shadow)
+ {
+ SetTextShadowColor();
+ }
}
void
_outline = true;
}
+void
+TextSimple::SetOutlineEnabled(bool enable)
+{
+ _outline = enable;
+}
+
+bool
+TextSimple::IsOutlineEnable(void) const
+{
+ return _outline;
+}
+
const Font*
TextSimple::GetFont(void) const
{
TextSimple::GetGlyphedLength(const wchar_t* pText, int textLength, int& actualLength) const
{
FriBidiChar* pBidiText = new (std::nothrow) FriBidiChar[textLength];
- SysTryReturn(NID_GRP, pBidiText, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pBidiText, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
for (int i = 0; i < textLength; i++)
{
pBidiText[i] = pText[i];
}
FriBidiCharType* pBidiType = new (std::nothrow) FriBidiCharType[textLength];
- SysTryCatch(NID_GRP, pBidiText, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryCatch(NID_GRP, pBidiText, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
fribidi_get_bidi_types(pBidiText, textLength, pBidiType);
result r = E_SUCCESS;
Bitmap* pBitmap = new (std::nothrow) Bitmap();
- SysTryReturn(NID_GRP, pBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, pBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pBitmap->Construct(bitmap, Rectangle(0, 0, bitmap.GetWidth(), bitmap.GetHeight()));
SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to insert element.", GetErrorMessage(r));
result r = E_SUCCESS;
Bitmap* pBitmap = new (std::nothrow) Bitmap();
- SysTryReturn(NID_GRP, pBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, pBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pBitmap->Construct(*bitmapDisplayProperty.pBitmap, Rectangle(0, 0, bitmapDisplayProperty.pBitmap->GetWidth(), bitmapDisplayProperty.pBitmap->GetHeight()));
SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to insert element.", GetErrorMessage(r));
return isDelimiter;
}
+void
+TextSimple::SetTextShadowColor(void)
+{
+ TextObjectColorRGB rgb;
+ TextObjectColorHSL hsl;
+
+ rgb.R = _foregroundColor.GetRed();
+ rgb.G = _foregroundColor.GetGreen();
+ rgb.B = _foregroundColor.GetBlue();
+
+ hsl = TextUtility::ConvertRGBToHSL(rgb);
+ float minL = (50.0f - ((pow(9, 0.5f) - 1.0f)/8.0f * 50.0f));
+
+ hsl.L = hsl.L / 100;
+
+ if (0.0f <= hsl.L && hsl.L < 0.5f)
+ {
+ hsl.L = (50.0f - ((pow(9, hsl.L) - 1.0f)/8.0f * 50.0f)) + 50.0f;
+ }
+ else if (0.5f <= hsl.L && hsl.L <= 1.0f)
+ {
+ hsl.L -= 0.5f;
+ hsl.L = (50.0f - ((pow(9, hsl.L) - 1.0f)/8.0f * 50.0f)) - minL;
+ }
+
+ hsl.H = 0;
+ hsl.S = 0;
+
+ rgb = TextUtility::ConvertHSLToRGB(hsl);
+
+ _shadowColor = Color(rgb.R, rgb.G, rgb.B, (float)_foregroundColor.GetAlpha() * (float)_opacity / 255.0f);
+}
+
+void
+TextSimple::SetTextShadowColor(const Color color)
+{
+ _shadowColor = color;
+ _opacity = color.GetAlpha();
+}
+
+Color
+TextSimple::GetTextShadowColor(void) const
+{
+ return _shadowColor;
+}
+
+void
+TextSimple::SetTextShadowOffset(const FloatPoint& offset)
+{
+ _shadowOffset = offset;
+}
+
+FloatPoint
+TextSimple::GetTextShadowOffset(void) const
+{
+ return _shadowOffset;
+}
+
+void
+TextSimple::SetTextShadowEnabled(bool enable)
+{
+ if (_shadow != enable)
+ {
+ _shadow = enable;
+
+ if (_shadow)
+ {
+ SetTextShadowColor();
+ }
+ }
+}
+
+bool
+TextSimple::IsTextShadowEnable(void) const
+{
+ return _shadow;
+}
+
}}} // Tizen::Graphics::_Text
return false;
}
+bool
+TextUtility::IsNeutralCharacter(wchar_t ch)
+{
+ FriBidiChar text[1] = { ch };
+ FriBidiCharType type[1] = { 0 };
+ fribidi_get_bidi_types(text, 1, type);
+
+ if (type[0] & (FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_LETTER))
+ {
+ return true;
+ }
+
+ return false;
+}
+
+bool
+TextUtility::IsWeakCharacter(wchar_t ch)
+{
+ FriBidiChar text[1] = { ch };
+ FriBidiCharType type[1] = { 0 };
+ fribidi_get_bidi_types(text, 1, type);
+
+ if (type[0] & (FRIBIDI_MASK_WEAK | FRIBIDI_MASK_LETTER))
+ {
+ return true;
+ }
+
+ return false;
+}
+
float
TextUtility::Abs(const float t)
{
const float
TextUtility::Min(const float a, const float b)
{
- if (a < b)
- return a;
- return b;
+ return (a < b) ? a : b;
+}
+
+const float
+TextUtility::Max(const float a, const float b)
+{
+ return (a >= b) ? a : b;
}
bool
return (p1 < p2 && Abs(p1 - p2) >= ALMOST_ZERO_FLOAT * Min(Abs(p1), Abs(p2)));
}
+TextObjectColorHSL
+TextUtility::ConvertRGBToHSL(TextObjectColorRGB rgb)
+{
+ float min;
+ float max;
+ float delta;
+ TextObjectColorHSL hsl;
+
+ rgb.R = rgb.R / 255;
+ rgb.G = rgb.G / 255;
+ rgb.B = rgb.B / 255;
+
+ min = Min(rgb.R,Min(rgb.G,rgb.B));
+ max = Max(rgb.R,Max(rgb.G,rgb.B));
+ delta = max - min;
+ hsl.L = (min + max) / 2;
+
+ hsl.S = 0;
+ if (hsl.L > 0 && hsl.L < 1)
+ {
+ hsl.S = delta / (hsl.L < 0.5 ? (2 * hsl.L) : (2 - 2 * hsl.L));
+ }
+ hsl.H = 0;
+
+ if (delta > 0)
+ {
+ if (max == rgb.R && max != rgb.G)
+ {
+ hsl.H += (rgb.G - rgb.B) / delta;
+ }
+ if (max == rgb.G && max != rgb.B)
+ {
+ hsl.H += (2 + (rgb.B - rgb.R) / delta);
+ }
+ if (max == rgb.B && max != rgb.R)
+ {
+ hsl.H += (4 + (rgb.R - rgb.G) / delta);
+ }
+ hsl.H *= 60;
+ }
+
+ hsl.S = hsl.S * 100;
+ hsl.L = hsl.L * 100;
+
+ return(hsl);
+}
+
+TextObjectColorRGB
+TextUtility::ConvertHSLToRGB(TextObjectColorHSL hsl)
+{
+ TextObjectColorRGB rgb,sat,ctmp;
+
+ hsl.S = hsl.S / 100;
+ hsl.L = hsl.L / 100;
+
+ while (hsl.H < 0)
+ {
+ hsl.H += 360;
+ }
+ while (hsl.H > 360)
+ {
+ hsl.H -= 360;
+ }
+
+ if (hsl.H < 120)
+ {
+ sat.R = (120 - hsl.H) / 60.0;
+ sat.G = hsl.H / 60.0;
+ sat.B = 0;
+ }
+ else if (hsl.H < 240)
+ {
+ sat.R = 0;
+ sat.G = (240 - hsl.H) / 60.0;
+ sat.B = (hsl.H - 120) / 60.0;
+ }
+ else
+ {
+ sat.R = (hsl.H - 240) / 60.0;
+ sat.G = 0;
+ sat.B = (360 - hsl.H) / 60.0;
+ }
+
+ sat.R = Min(sat.R,1);
+ sat.G = Min(sat.G,1);
+ sat.B = Min(sat.B,1);
+
+ ctmp.R = 2 * hsl.S * sat.R + (1 - hsl.S);
+ ctmp.G = 2 * hsl.S * sat.G + (1 - hsl.S);
+ ctmp.B = 2 * hsl.S * sat.B + (1 - hsl.S);
+
+ if (hsl.L < 0.5)
+ {
+ rgb.R = hsl.L * ctmp.R;
+ rgb.G = hsl.L * ctmp.G;
+ rgb.B = hsl.L * ctmp.B;
+ }
+ else
+ {
+ rgb.R = (1 - hsl.L) * ctmp.R + 2 * hsl.L - 1;
+ rgb.G = (1 - hsl.L) * ctmp.G + 2 * hsl.L - 1;
+ rgb.B = (1 - hsl.L) * ctmp.B + 2 * hsl.L - 1;
+ }
+
+ rgb.R = rgb.R * 255;
+ rgb.G = rgb.G * 255;
+ rgb.B = rgb.B * 255;
+
+ return(rgb);
+}
+
}}} // Tizen::Graphics::_Texts
static bool IsStrongCharacter(wchar_t ch);
+ static bool IsNeutralCharacter(wchar_t ch);
+
+ static bool IsWeakCharacter(wchar_t ch);
+
static float Abs(const float t);
static const float Min(const float a, const float b);
+ static const float Max(const float a, const float b);
+
static bool FloatCompareL(float p1, float p2);
+ static TextObjectColorHSL ConvertRGBToHSL(TextObjectColorRGB rgb);
+
+ static TextObjectColorRGB ConvertHSLToRGB(TextObjectColorHSL hsl);
+
}; // TextUtility
}}} // Tizen::Graphics::_Text
if (rtSrc.width <= 0 || rtSrc.height <= 0 || rtDest.width <= 0 || rtDest.height <= 0)
{
SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
- SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(w:%d,h:%d), dst(w:%d,h:%d)).\n", rtSrc.width, rtSrc.height, rtDest.width, rtDest.height);
+ SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(w:%d,h:%d), dst(w:%d,h:%d)).\n", rtSrc.width, rtSrc.height, rtDest.width, rtDest.height);
}
// check 2. is src exiting outside of dest entirely?
rtSrc.x + rtSrc.width - 1 < rtDest.x)
{
SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
- SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n",rtSrc.x, rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width, rtDest.height);
+ SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n",rtSrc.x, rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width, rtDest.height);
}
if (rtSrc.y > rtDest.y + rtDest.height - 1 ||
rtSrc.y + rtSrc.height - 1 < rtDest.y)
{
SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
- SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n",rtSrc.x, rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width, rtDest.height);
+ SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n",rtSrc.x, rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width, rtDest.height);
}
return E_SUCCESS;
if (rtSrcF.width <= 0.0f || rtSrcF.height <= 0.0f || rtDestF.width <= 0.0f || rtDestF.height <= 0.0f)
{
SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
- SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(w:%f,h:%f), dst(w:%f,h:%f)).\n", rtSrcF.width, rtSrcF.height, rtDestF.width, rtDestF.height);
+ SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(w:%f,h:%f), dst(w:%f,h:%f)).\n", rtSrcF.width, rtSrcF.height, rtDestF.width, rtDestF.height);
}
// check 2. is src exiting outside of dest entirely?
if (rtSrcF.x >= rtDestF.x + rtDestF.width || rtSrcF.x + rtSrcF.width <= rtDestF.x)
{
SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
- SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", rtSrcF.x, rtSrcF.y, rtSrcF.width, rtSrcF.height, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height);
+ SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", rtSrcF.x, rtSrcF.y, rtSrcF.width, rtSrcF.height, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height);
}
if (rtSrcF.y >= rtDestF.y + rtDestF.height || rtSrcF.y + rtSrcF.height <= rtDestF.y)
{
SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
- SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", rtSrcF.x, rtSrcF.y, rtSrcF.width, rtSrcF.height, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height);
+ SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", rtSrcF.x, rtSrcF.y, rtSrcF.width, rtSrcF.height, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height);
}
return E_SUCCESS;
}
SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
- SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%d,y:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n", ptSrc.x, ptSrc.y, rtDest.x, rtDest.y, rtDest.width, rtDest.height);
+ SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(x:%d,y:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n", ptSrc.x, ptSrc.y, rtDest.x, rtDest.y, rtDest.width, rtDest.height);
}
result
}
SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
- SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%f,y:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", ptSrcF.x, ptSrcF.y, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height);
+ SysSecureTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "(src(x:%f,y:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", ptSrcF.x, ptSrcF.y, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height);
}
bool
// APPLY_SRC_BITMAP_ATTRIB(srcImage, bitmap);
std::unique_ptr<int[]> pRegionWidthes(new (std::nothrow) int[srcImage.width]);
- SysTryReturnResult(NID_GRP, pRegionWidthes, E_OUT_OF_MEMORY, "Fails to allocate memory.\n");
+ SysTryReturnResult(NID_GRP, pRegionWidthes, E_OUT_OF_MEMORY, "Memory allocation failed.\n");
std::unique_ptr<bool[]> pWidthStretchable(new (std::nothrow) bool[srcImage.width]);
- SysTryReturnResult(NID_GRP, pWidthStretchable, E_OUT_OF_MEMORY, "Fails to allocate memory.\n");
+ SysTryReturnResult(NID_GRP, pWidthStretchable, E_OUT_OF_MEMORY, "Memory allocation failed.\n");
memset(pRegionWidthes.get(), 0, sizeof(int) * srcImage.width);
memset(pWidthStretchable.get(), 0, sizeof(bool) * srcImage.width);
std::unique_ptr<int[]> pRegionHeights(new (std::nothrow) int[srcImage.height]);
- SysTryReturnResult(NID_GRP, pRegionHeights, E_OUT_OF_MEMORY, "Fails to allocate memory.\n");
+ SysTryReturnResult(NID_GRP, pRegionHeights, E_OUT_OF_MEMORY, "Memory allocation failed.\n");
std::unique_ptr<bool[]> pHeightStretchable(new (std::nothrow) bool[srcImage.height]);
- SysTryReturnResult(NID_GRP, pHeightStretchable, E_OUT_OF_MEMORY, "Fails to allocate memory.\n");
+ SysTryReturnResult(NID_GRP, pHeightStretchable, E_OUT_OF_MEMORY, "Memory allocation failed.\n");
memset(pRegionHeights.get(), 0, sizeof(int) * srcImage.height);
memset(pHeightStretchable.get(), 0, sizeof(bool) * srcImage.height);
// 2. Split source image into separate stretchable/unstretchable regions.
std::unique_ptr< ::Tizen::Graphics::Rectangle[]> pSrcRectLists(new (std::nothrow) ::Tizen::Graphics::Rectangle[numWidth * numHeight]);
- SysTryReturnResult(NID_GRP, pSrcRectLists, E_OUT_OF_MEMORY, "Fails to allocate memory.\n");
+ SysTryReturnResult(NID_GRP, pSrcRectLists, E_OUT_OF_MEMORY, "Memory allocation failed.\n");
int vertical = 0;
int horizontal = 0;
}
std::unique_ptr< ::Tizen::Graphics::Rectangle[]> pDstRectLists(new (std::nothrow) ::Tizen::Graphics::Rectangle[numWidth * numHeight]);
- SysTryReturnResult(NID_GRP, pDstRectLists, E_OUT_OF_MEMORY, "Fails to allocate memory.\n");
+ SysTryReturnResult(NID_GRP, pDstRectLists, E_OUT_OF_MEMORY, "Memory allocation failed.\n");
index = 0;
pBitmap = new (std::nothrow) unsigned char[bytesPerLine * height];
- SysTryReturnVoidResult(NID_GRP, pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_GRP, pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
// ¸ðµç °ÍÀÌ ¼º°øÇßÀ» ¶§¸¸ 1ÀÇ °ªÀ» °¡Áö°Ô µÈ´Ù.
reserved = 1;
{
std::unique_ptr<DestPixel[]> buffer(new (std::nothrow) DestPixel[srcBitmap.width * srcBitmap.height]);
- SysTryReturn(NID_GRP, buffer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, buffer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
DestPixel* pDest = (DestPixel*) buffer.get();
SourPixel* pSour = (SourPixel*) srcBitmap.pBitmap;
_Util::Pixmap* pImageEx = new (std::nothrow) _Util::Pixmap(this->width, this->height, depth, pConvertedBuffer, this->width * depth / 8);
- SysTryReturn(NID_GRP, pImageEx, pImageEx, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_GRP, pImageEx, pImageEx, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pImageEx->reserved = 1;
{
}
+ explicit FixedPoint(double value)
+ : __fixedPoint(value * ((1 << SHIFT) * 1.0))
+ {
+ }
+
inline int
ToInt() const
{
FUiClipboardItem.cpp
FUi_ClipboardItemImpl.cpp
FUi_ClipboardItem.cpp
+ FUi_DragAndDropEvent.cpp
+ FUi_DragAndDropItem.cpp
FUi_ClipboardPopupEvent.cpp
FUi_CustomControlBaseImpl.cpp
FUiDataBindingContext.cpp
FUi_CardLayoutImpl.cpp
FUiInputConnection.cpp
FUi_InputConnectionImpl.cpp
+ FUi_InputConnectionUtils.cpp
FUi_Matrix3Df.cpp
FUi_TouchEventManagerImpl.cpp
FUiTouchEventManager.cpp
return E_SUCCESS;
}
-
+/*
KeyboardMapType
GetKeyboardMapType(void)
{
-/*
KeyboardMapType type = KEYBOARD_MAP_NONE;
// get keyboard type
CATCH:
return KEYBOARD_MAP_NONE;
-*/
- return KEYBOARD_MAP_NONE;
}
+*/
result
LoadKeyboardMap(void)
}
LinkedList* pReturnList = new (std::nothrow) LinkedList;
- SysTryReturn(NID_UI, pReturnList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pReturnList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
Tizen::Base::Collection::IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN();
SysTryCatch(NID_UI, pFingerInfoList, , E_SYSTEM, "[E_SYSTEM] System error occurred.");
}
TouchInfo* pTouchInfo = new (std::nothrow) TouchInfo;
- SysTryCatch(NID_UI, pTouchInfo, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, pTouchInfo, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
if (pFingerInfo->GetStatus() == _TOUCH_PRESSED ||pFingerInfo->GetStatus() == _TOUCH_MOVED )
{
Touch::SetMultipointEnabled(const Control& control, bool enable)
{
_ControlImpl* pControlImpl = const_cast<_ControlImpl*>(_ControlImpl::GetInstance(control));
- SysTryReturnResult(NID_UI, pControlImpl, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+ SysTryReturnResult(NID_UI, pControlImpl, E_SYSTEM, "System error occurred.");
pControlImpl->SetMultiTouchEnabled(enable);
SysAssertf(__pTouchEventInfoImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
const _TouchEventArg* pTouchArg = dynamic_cast <const _TouchEventArg*>(&eventArg);
- SysTryReturnResult(NID_UI, pTouchArg, E_INVALID_ARG, "[E_INVALID_ARG] pTouchArg is invalid.");
+ SysTryReturnResult(NID_UI, pTouchArg, E_INVALID_ARG, "pTouchArg is invalid.");
_TouchEventInfoImpl* pImpl = _TouchEventInfoImpl::CreateInstanceN(this);
result r = GetLastResult();
: __pTouchEventManagerImpl(null)
{
__pTouchEventManagerImpl = new _TouchEventManagerImpl;
- SysTryReturnVoidResult(NID_UI, __pTouchEventManagerImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pTouchEventManagerImpl, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
}
TouchEventManager::~TouchEventManager(void)
if (__pTouchEventManager == null)
{
__pTouchEventManager = new TouchEventManager;
- SysTryReturn(NID_UI, __pTouchEventManager, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
+ SysTryReturn(NID_UI, __pTouchEventManager, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
}
return __pTouchEventManager;
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
}
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
__pVariantImpl = new (std::nothrow) _VariantImpl;
if (__pVariantImpl == null)
{
- SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] pImpl is null.");
+ SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
}
else
{
}
void
-Window::SetOwner(Tizen::Ui::Control *pControl)
+Window::SetOwner(Tizen::Ui::Control* pControl)
{
_WindowImpl* pImpl = _WindowImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
namespace Tizen { namespace Ui {
-const wchar_t* _traitString[] =
-{
- L"",//ACCESSIBILITY_TRAITS_NONE,
- L"TITLE",//ACCESSIBILITY_TRAITS_TITLE,
- L"OPTION HEADER",//ACCESSIBILITY_TRAITS_OPTION_HEADER,
- L"PICTURE",//ACCESSIBILITY_TRAITS_PICTURE,
- L"STATUS BAR",//ACCESSIBILITY_TRAITS_STATUS_BAR,
- L"TEXT FIELD",//ACCESSIBILITY_TRAITS_TEXT_FIELD,
- L"RATING",//ACCESSIBILITY_TRAITS_RATING,
- L"ACTION BAR",//ACCESSIBILITY_TRAITS_ACTION_BAR,
- L"ACTION BAR MENU",//ACCESSIBILITY_TRAITS_ACTION_BAR_MENU,
- L"BACK BUTTON",//ACCESSIBILITY_TRAITS_BUTTON,
- L"BUTTON",//ACCESSIBILITY_TRAITS_BUTTON,
- L"LABEL",//ACCESSIBILITY_TRAITS_LABEL,
- L"LIST",//ACCESSIBILITY_TRAITS_LIST,
- L"SELECTOR",//ACCESSIBILITY_TRAITS_DATA_SELECTOR,
- L"SCROLL",//ACCESSIBILITY_TRAITS_DRAG_SCROLL,
- L"EXPAND BUTTON",//ACCESSIBILITY_TRAITS_EXPAND_BUTTON,
- L"FUNCTION PANEL",//ACCESSIBILITY_TRAITS_FUNCTION_PANEL,
- L"IN DEPTH BUTTON",//ACCESSIBILITY_TRAITS_IN_DEPTH_BUTTON,
- L"INDEX SCROLL",//ACCESSIBILITY_TRAITS_INDEX_SCROLL,
- L"IMAGE",//ACCESSIBILITY_TRAITS_IMAGE
- L"INDICATOR",//ACCESSIBILITY_TRAITS_INDICATOR,
- L"NOTIFICATION",//ACCESSIBILITY_TRAITS_NOTIFICATION,
- L"RADIO BUTTON",//ACCESSIBILITY_TRAITS_RADIO_BUTTON,
- L"SCROLL BAR",//ACCESSIBILITY_TRAITS_SCROLL_BAR,
- L"SEARCH FIELD",//ACCESSIBILITY_TRAITS_SEARCH_FIELD,
- L"SEGMENT",//ACCESSIBILITY_TRAITS_SEGMENT,
- L"SLIDER",//ACCESSIBILITY_TRAITS_SLIDER,
- L"SOFT KEY",//ACCESSIBILITY_TRAITS_SOFT_KEY,
- L"SUB MENU TITLE",//ACCESSIBILITY_TRAITS_SUB_MENU_TITLE,
- L"TAB",//ACCESSIBILITY_TRAITS_TAB,
- L"TICK BOX",//ACCESSIBILITY_TRAITS_TICKBOX,
- L"TIME SELECTOR",//ACCESSIBILITY_TRAITS_TIME_SELECTOR,
- L"VOLUME SLIDER",//ACCESSIBILITY_TRAITS_VOLUME_SLIDER,
- L"HOUR",//ACCESSIBILITY_TRAITS_HOUR,
- L"MINUTE",//ACCESSIBILITY_TRAITS_MINUTE,
- L"SECOND",//ACCESSIBILITY_TRAITS_SECOND,
- L"YEAR",//ACCESSIBILITY_TRAITS_YEAR,
- L"MONTH",//ACCESSIBILITY_TRAITS_MONTH,
- L"DAY",//ACCESSIBILITY_TRAITS_DAY,
- L"END",//ACCESSIBILITY_TRAITS_END = 0xff
-};
-
-
_AccessibilityElement::_AccessibilityElement(bool systemElement)
: __name(L"")
, __bounds(0,0,0,0)
x = CoordinateSystem::ConvertToLogicalX(x);
y = CoordinateSystem::ConvertToLogicalY(y);
//ConvertTouchPosition(type, x,y);
- _AccessibilityManager::GetInstance()->ProcessGesture(type,Tizen::Graphics::FloatPoint(x, y));
- return true;
+ return _AccessibilityManager::GetInstance()->ProcessGesture(type,Tizen::Graphics::FloatPoint(x, y));
}
}} //Tizen::Ui
__pTargetContainer->SetCurrentFocusedElement(null);
}
__pTargetContainer = null;
-
+
}
else
{
{
switch(type)
{
+ case _ACCESSIBILITY_GESTURE_TYPE_HIGHLIGHT_PREV:
+ if(IsFirstElementGainedFocus())
+ {
+ return false;
+ }
+ //fall through
case _ACCESSIBILITY_GESTURE_TYPE_FLICK_UP:
case _ACCESSIBILITY_GESTURE_TYPE_FLICK_LEFT:
if (MoveFocus(_ACCESSIBILITY_FOCUS_DIRECTION_PREVIOUS))
SetGestureMode(MODE_FOCUS_MOVE);
}
break;
+ case _ACCESSIBILITY_GESTURE_TYPE_HIGHLIGHT_NEXT:
+ if(IsLastElementGainedFocus())
+ {
+ return false;
+ }
+ //fall through
case _ACCESSIBILITY_GESTURE_TYPE_FLICK_DOWN:
case _ACCESSIBILITY_GESTURE_TYPE_FLICK_RIGHT:
if (MoveFocus(_ACCESSIBILITY_FOCUS_DIRECTION_NEXT))
{
return false;
}
+ if (__pTargetContainer->IsContains(*__pTargetElement) == false)
+ {
+ return false;
+ }
if (_pControl == null)
{
return false;
}
}
break;
-
- case _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_LONGPRESS:
+ case _ACCESSIBILITY_GESTURE_TYPE_UNHIGHLIGHT:
+ ResetFocusInformation();
break;
case _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_PANNING_STARTED:
case _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_PANNING_CHANGED:
: __pManager(&manager)
{
_screenReaderActivated = IsScreenReaderActivated();
- _SettingInfoImpl::AddSettingEventListenerForInternal(*this);
vconf_notify_key_changed(VCONF_KEY_ACCESSIBILITY_SCREEN_READER, _AccessibilitySystemSettingLoader::SetSystemSetting, null);
+ result r = _SettingInfoImpl::AddSettingEventListenerForInternal(*this);
+ SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
_AccessibilitySystemSettingLoader::~_AccessibilitySystemSettingLoader(void)
{
namespace Tizen { namespace Ui {
+const int MAX_TTS_CHARACTER_COUNT = 400;
+
_AccessibilityTtsPlayer::_AccessibilityTtsPlayer(_AccessibilityManager& manager)
: __initialized(false)
, __activated(false)
+ , __extra(false)
, __ttsHandle(0)
, __localeIdx(-1)
, __speed(TTS_SPEED_AUTO)
, __status(ACCESSIBILITY_SCREEN_READER_STATUS_ERROR)
, __grammar(L"")
+ , __readingContents(L"")
, __pCurrentLocale(null)
, __pSupportedLocaleList(null)
, __pManager(&manager)
_AccessibilityTtsPlayer::Construct(void)
{
Locale *pLocale = new (std::nothrow) Locale(LANGUAGE_INVALID, COUNTRY_INVALID);
- SysTryReturnResult(NID_UI, pLocale != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ SysTryReturnResult(NID_UI, pLocale != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
ArrayList* pLocaleList = new (std::nothrow) ArrayList();
- SysTryReturnResult(NID_UI, pLocaleList != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ SysTryReturnResult(NID_UI, pLocaleList != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
result r = pLocaleList->Construct();
- SysTryReturnResult(NID_UI, r == E_SUCCESS, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ SysTryReturnResult(NID_UI, r == E_SUCCESS, E_OUT_OF_MEMORY, "Memory allocation failed.");
__pCurrentLocale = pLocale;
__pSupportedLocaleList = pLocaleList;
SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_SYSTEM, "Failed to create.");
ttsError = tts_set_error_cb(__ttsHandle, TtsErrorReceiver, (void*)(this));
- SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
ttsError = tts_set_state_changed_cb(__ttsHandle, TtsStateChangedReceiver, (void*)(this));
- SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
ttsError = tts_set_utterance_started_cb(__ttsHandle, TtsStartedReceiver, (void*)(this));
- SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
ttsError = tts_set_utterance_completed_cb(__ttsHandle, TtsCompletedReceiver, (void*)(this));
- SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
tts_set_mode(__ttsHandle, TTS_MODE_SCREEN_READER);
ttsError = tts_prepare(__ttsHandle);
- SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__activated = true;
return E_SUCCESS;
ttsError = tts_foreach_supported_voices(ttsHandle, TtsSupportedLocaleListGetter, (void*)(static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->__pSupportedLocaleList));
SysTryLog(NID_UI, ttsError == TTS_ERROR_NONE, "[%s] Failed to get supported voices", GetEngineErrorMessage(ttsError));
- static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->__initialized = true;
+ static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->__initialized = true;
static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->OnStatusChanged(ACCESSIBILITY_SCREEN_READER_STATUS_READY);
}
else if ((previousState == TTS_STATE_READY || previousState == TTS_STATE_PAUSED) && (currentState == TTS_STATE_PLAYING))
void
_AccessibilityTtsPlayer::TtsCompletedReceiver(tts_h ttsHandle, int utteranceId, void* pTtsInstance)
{
- int ttsError = tts_stop(ttsHandle);
- SysTryReturnVoidResult(NID_UI, ttsError == TTS_ERROR_NONE, E_SYSTEM,
- "[CB] Failed to stop, error[%s]", GetEngineErrorMessage(ttsError));
_AccessibilityTtsPlayer* pPlayer = static_cast<_AccessibilityTtsPlayer*>(pTtsInstance);
- pPlayer->SetStatus(ACCESSIBILITY_SCREEN_READER_STATUS_READY);
- pPlayer->__pManager->OnFinishReading(pPlayer->__grammar);
+ if(static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->__extra)
+ {
+ pPlayer->Speak(pPlayer->__readingContents);
+ }
+ else
+ {
+ int ttsError = tts_stop(ttsHandle);
+ SysTryReturnVoidResult(NID_UI, ttsError == TTS_ERROR_NONE, E_SYSTEM,
+ "[CB] Failed to stop, error[%s]", GetEngineErrorMessage(ttsError));
+ pPlayer->SetStatus(ACCESSIBILITY_SCREEN_READER_STATUS_READY);
+ pPlayer->__pManager->OnFinishReading(pPlayer->__grammar);
+ }
}
void
_AccessibilityTtsPlayer::TtsErrorReceiver(tts_h ttsHandle, int ttsUtteranceId, tts_error_e error, void* pTtsInstance)
"Not yet initialized! This method should be called after initialized.");
result r = E_SUCCESS;
+ String _text = text;
tts_state_e ttsState = TTS_STATE_READY;
int ttsError = tts_get_state(__ttsHandle, &ttsState);
SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_SYSTEM, "Failed to get the current state.");
Stop();
- const char* pTextN = _StringConverter::CopyToCharArrayN(text);
+ if(_text.GetLength() > MAX_TTS_CHARACTER_COUNT)
+ {
+ bool find = false;
+ int index = -1;
+ r = _text.IndexOf(L' ', MAX_TTS_CHARACTER_COUNT, index);
+ if (r == E_SUCCESS)
+ {
+ if(index < MAX_TTS_CHARACTER_COUNT + MAX_TTS_CHARACTER_COUNT * 0.2)
+ {
+ find = true;
+ }
+ }
+ if(find == false)
+ {
+ r = _text.IndexOf(L'\n', MAX_TTS_CHARACTER_COUNT, index);
+ if (r == E_SUCCESS)
+ {
+ if(index < MAX_TTS_CHARACTER_COUNT + MAX_TTS_CHARACTER_COUNT * 0.2)
+ {
+ find = true;
+ }
+ }
+ }
+ if(find == false)
+ {
+ r = _text.IndexOf(L'\t', MAX_TTS_CHARACTER_COUNT, index);
+ if (r == E_SUCCESS)
+ {
+ if(index < MAX_TTS_CHARACTER_COUNT + MAX_TTS_CHARACTER_COUNT * 0.2)
+ {
+ find = true;
+ }
+ }
+ }
+ if(find == false)
+ {
+ r = _text.IndexOf(L'.', MAX_TTS_CHARACTER_COUNT, index);
+ if (r == E_SUCCESS)
+ {
+ if(index < MAX_TTS_CHARACTER_COUNT + MAX_TTS_CHARACTER_COUNT * 0.2)
+ {
+ find = true;
+ }
+ }
+ }
+ if(find == false)
+ {
+ r = _text.IndexOf(L',', MAX_TTS_CHARACTER_COUNT, index);
+ if (r == E_SUCCESS)
+ {
+ if(index < MAX_TTS_CHARACTER_COUNT + MAX_TTS_CHARACTER_COUNT * 0.2)
+ {
+ find = true;
+ }
+ }
+ }
+ if (find == false)
+ {
+ index = MAX_TTS_CHARACTER_COUNT;
+ }
+ if(_text.GetLength() > index + 1)
+ {
+ _text.SubString(index+1, _text.GetLength() - index-1, __readingContents);
+ _text.SubString(0,index, const_cast<String&>(_text));
+ __extra = true;
+ }
+ else
+ {
+ __extra = false;
+ }
+ }
+ else
+ {
+ __extra = false;
+ }
+ const char* pTextN = _StringConverter::CopyToCharArrayN(_text);
int ttsUtteranceId = 0;
ttsError = tts_add_text(__ttsHandle, pTextN, null, TTS_VOICE_TYPE_AUTO, __speed, &ttsUtteranceId);
void
_AccessibilityTtsPlayer::OnStatusChanged(AccessibilityScreenReaderStatus status)
{
+ if(__extra)
+ {
+ return;
+ }
switch(status)
{
case ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING:
#include <FMedia_ImageDecoder.h>
#include <FMedia_ImageUtil.h>
#include <FGrp_BitmapImpl.h>
+#include <FSysSystemTime.h>
#include "FUi_Clipboard.h"
#include "FUi_ClipboardItem.h"
#include "FUi_ControlManager.h"
using namespace Tizen::Media;
using namespace Tizen::Text;
using namespace Tizen::Ui::Controls;
+using namespace Tizen::System;
namespace
{
const int _CLIPBOARD_ITEM_MAX = 20;
const int _CBHM_ITEM_MAX = 20;
-const String _CLIPBOARD_DEFAULT_PATH = L"/tmp/clipboard/clipboard_";
+const String _CLIPBOARD_DEFAULT_PATH = L"/tmp/clipboard/OSP_";
const String _CLIPBOARD_DEFAULT_EXTENSION = L".png";
} // Anonymous
String filePath;
String extension(_CLIPBOARD_DEFAULT_EXTENSION);
-
- bool find = false;
- for (int i = 0; i < _CLIPBOARD_ITEM_MAX; i++)
- {
- filePath = _CLIPBOARD_DEFAULT_PATH;
-
- r = filePath.Append(i);
- SysTryReturn(NID_UI, r == E_SUCCESS, String(""), r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = filePath.Append(extension);
- SysTryReturn(NID_UI, r == E_SUCCESS, String(""), r, "[%s] Propagating.", GetErrorMessage(r));
-
- if (File::IsFileExist(filePath) == false)
- {
- find = true;
- break;
- }
- }
-
- SysTryReturn(NID_UI, find == true, String(""), E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ Tizen::Base::DateTime dateTime;
+ r = SystemTime::GetCurrentTime(TIME_MODE_STANDARD, dateTime);
+ SysTryReturn(NID_UI, r == E_SUCCESS, L"", r, "[%s] Propagating.", GetErrorMessage(r));
+ int month = dateTime.GetMonth();
+ int day = dateTime.GetDay();
+ int hour = dateTime.GetHour();
+ int minute = dateTime.GetMinute();
+ int second = dateTime.GetSecond();
+
+ filePath = _CLIPBOARD_DEFAULT_PATH;
+
+ filePath.Append(month);
+ filePath.Append(day);
+ filePath.Append(hour);
+ filePath.Append(minute);
+ filePath.Append(second);
+ filePath.Append(extension);
SetLastResult(E_SUCCESS);
}
r = GetCore().AttachChild(pChild->GetCore());
+ if (IsFailed(r))
+ {
+ result listResult = RemoveChild(pChild, false);
+ if (IsFailed(listResult))
+ {
+ SysLogException(NID_UI, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Unable to find the specified child.");
+ }
+ }
+
SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r));
return E_SUCCESS;
*/
#include <new>
+#include <execinfo.h>
#include <unique_ptr.h>
#include <FBaseColLinkedListT.h>
#include <FBaseColArrayListT.h>
#include <FBase_Log.h>
#include <FGrp_BitmapImpl.h>
#include <FSys_SystemInfoImpl.h>
+#include "FUi_Math.h"
#include "FUi_Control.h"
#include "FUi_ControlManager.h"
#include "FUi_FocusManagerImpl.h"
#include "FUiCtrl_Form.h"
#include "FUiCtrl_Frame.h"
#include "FUi_ContainerImpl.h"
+#include "FUi_DragAndDropItem.h"
+#include "FUi_UiEventManager.h"
+#include "FUiAnim_MatrixUtil.h"
using namespace std;
using namespace Tizen::Base;
if (pVisualElement)
{
FloatMatrix4 inverseMatrix(newTransform);
- inverseMatrix.Invert();
+ _MatrixUtilInvert(inverseMatrix);
result r = pVisualElement->SetTransformMatrix(inverseMatrix);
if (r != E_SUCCESS)
result SetItemBounds(const FloatRectangle& rect)
{
SysAssert(__pControl->IsInSizeRange(FloatDimension(rect.width, rect.height)));
- return __pControl->SetBoundsFinal(rect, false, true);
+ bool animating = __pControl->GetControlDelegate().IsAnimating();
+ return __pControl->SetBoundsFinal(rect, false, true, animating);
}
FloatRectangle GetItemBounds(void) const
FloatDimension GetItemContentSize(bool horizontalMode, bool verticalMode) const
{
- return __pControl->GetControlDelegate().GetContentSizeF(horizontalMode, verticalMode);
+ FloatRectangle rect = __pControl->GetContentAreaBoundsF();
+ if (rect == FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
+ {
+ return __pControl->GetControlDelegate().GetContentSizeF(horizontalMode, verticalMode);
+ }
+ else
+ {
+ return FloatDimension(rect.width, rect.height);
+ }
}
FloatDimension GetItemMinimumSize(void) const
return _UI_TOUCH_EVENT_DELIVERY_YES;
}
+_UiTouchEventDelivery
+_Control::OnPreviewTouchWheeled(const _Control& source, const _TouchInfo& touchinfo)
+{
+ return _UI_TOUCH_EVENT_DELIVERY_YES;
+}
+
bool
_Control::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
return false;
}
-_UiTouchEventDelivery
-_Control::OnPreviewMousePressed(const _Control& source, const _MouseInfo& mouseinfo)
-{
- return _UI_TOUCH_EVENT_DELIVERY_YES;
-}
-
-_UiTouchEventDelivery
-_Control::OnPreviewMouseReleased(const _Control& source, const _MouseInfo& mouseinfo)
-{
- return _UI_TOUCH_EVENT_DELIVERY_YES;
-}
-
-_UiTouchEventDelivery
-_Control::OnPreviewMouseMoved(const _Control& source, const _MouseInfo& mouseinfo)
-{
- return _UI_TOUCH_EVENT_DELIVERY_YES;
-}
-
-_UiTouchEventDelivery
-_Control::OnPreviewMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo)
-{
- return _UI_TOUCH_EVENT_DELIVERY_YES;
-}
-
-bool
-_Control::OnMousePressed(const _Control& source, const _MouseInfo& mouseinfo)
-{
- return false;
-}
-
-bool
-_Control::OnMouseReleased(const _Control& source, const _MouseInfo& mouseinfo)
-{
- return false;
-}
-
bool
-_Control::OnMouseMoved(const _Control& source, const _MouseInfo& mouseinfo)
-{
- return false;
-}
-
-bool
-_Control::OnMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo)
+_Control::OnTouchWheeled(const _Control& source, const _TouchInfo& touchinfo)
{
return false;
}
}
return false;
}
-
+bool
+_Control::OnTraversalControlFocusGained(void)
+{
+ return false;
+}
+bool
+_Control::OnTraversalControlFocusLost(void)
+{
+ return false;
+}
bool
_Control::OnPreviewNotifiedN(const _Control& source, IList* pArgs)
{
}
void
+_Control::OnChildAttaching(const _Control& child)
+{
+}
+
+void
_Control::OnChildDetaching(const _Control& child)
{
}
if(pTouchManager->GetTouchControlSource() == this)
{
SysLog(NID_UI, "VisibleState changed false, Call SetTouchCanceled");
- pTouchManager->SetTouchCanceled(null);
+
+ _UiEventManager* pUiEventManager = _UiEventManager::GetInstance();
+ if (pUiEventManager)
+ {
+ pUiEventManager->ClearEventQueue();
+ }
}
}
}
}
void
-_Control::InvalidateHierarchyRootWindow(void)
+_Control::InvalidateHierarchyRootWindow(_Control& control)
{
- struct _Visitor
- : public Visitor
+ control.__needRecalcRootWindow = true;
+ control.__pRootWindow = null;
+
+ for (int i = 0; i < control.GetChildCount(); ++i)
{
- virtual VisitType Visit(_Control& control)
+ _Control* pChild = control.GetChild(i);
+ if (pChild)
{
- control.__needRecalcRootWindow = true;
- control.__pRootWindow = null;
-
- return VISIT_DOWNWARD;
+ pChild->InvalidateHierarchyRootWindow(*pChild);
}
- };
-
- _Visitor visitor;
- Accept(visitor);
+ }
}
void
-_Control::InvalidateHierarchyAbsoluteBounds(void)
+_Control::InvalidateHierarchyAbsoluteBounds(_Control& control)
{
- struct _Visitor
- : public Visitor
+ control.__needRecalcAbsBounds = true;
+ control.__needRecalcAbsBoundsF = true;
+
+ for (int i = 0; i < control.GetChildCount(); ++i)
{
- virtual VisitType Visit(_Control& control)
+ _Control* pChild = control.GetChild(i);
+ if (pChild)
{
- control.__needRecalcAbsBounds = true;
- control.__needRecalcAbsBoundsF = true;
-
- return VISIT_DOWNWARD;
+ pChild->InvalidateHierarchyAbsoluteBounds(*pChild);
}
- };
-
- _Visitor visitor;
- Accept(visitor);
+ }
}
void
}
void
-_Control::ChangeLayout(_ControlOrientation orientation, bool callRotation)
+_Control::ChangeLayout(_Control& control, _ControlOrientation orientation)
{
- ClearLastResult();
-
- struct _Visitor
- : public Visitor
+ if (control.__orientation != orientation)
{
- _Visitor(_ControlOrientation orientation)
- : __orientation(orientation){}
+ control.__orientation = orientation;
+ control.GetControlDelegate().OnChangeLayout(orientation);
+ }
- virtual VisitType Visit(_Control& control)
+ for (int i = 0; i < control.GetChildCount(); ++i)
+ {
+ _Control* pChild = control.GetChild(i);
+ if (pChild)
{
- if (control.__orientation != __orientation)
- {
- control.__orientation = __orientation;
- control.GetControlDelegate().OnChangeLayout(__orientation);
- ClearLastResult();
- }
-
- return VISIT_DOWNWARD;
+ ChangeLayout(*pChild, orientation);
}
+ }
+}
-private:
- _ControlOrientation __orientation;
- };
-
- _Visitor visitor(orientation);
- Accept(visitor);
-
- SysAssert(GetLastResult() == E_SUCCESS);
+void
+_Control::ChangeLayout(_ControlOrientation orientation, bool callRotation)
+{
+ ClearLastResult();
+ ChangeLayout(*this, orientation);
if (callRotation == true)
{
}
void
-_Control::ChangeLayout(_ControlRotation rotation)
+_Control::ChangeLayout(_Control& control, _ControlRotation rotation)
{
- ClearLastResult();
-
- struct _Visitor
- : public Visitor
+ if (control.__rotation != rotation)
{
- _Visitor(_ControlRotation rotation)
- : __rotation(rotation){}
+ control.__rotation = rotation;
+ control.GetControlDelegate().OnChangeLayout(rotation);
+ ClearLastResult();
+ }
- virtual VisitType Visit(_Control& control)
+ for (int i = 0; i < control.GetChildCount(); ++i)
+ {
+ _Control* pChild = control.GetChild(i);
+ if (pChild)
{
- if (control.__rotation != __rotation)
- {
- control.__rotation = __rotation;
- control.GetControlDelegate().OnChangeLayout(__rotation);
- ClearLastResult();
- }
-
- return VISIT_DOWNWARD;
+ ChangeLayout(*pChild, rotation);
}
+ }
+}
-private:
- _ControlRotation __rotation;
- };
-
- _Visitor visitor(rotation);
- Accept(visitor);
-
- SysAssert(GetLastResult() == E_SUCCESS);
+void
+_Control::ChangeLayout(_ControlRotation rotation)
+{
+ ClearLastResult();
+ ChangeLayout(*this, rotation);
}
bool
{
ClearLastResult();
- struct _Visitor
- : public Visitor
- {
- virtual VisitType Visit(_Control& control)
- {
- if (control.GetVisibleState() == false)
- {
- return VISIT_STOP;
- }
-
- control.Invalidate();
-
- // Ownee
- int owneeCount = control.GetOwneeCount();
- for (int i = 0; i < owneeCount; ++i)
- {
- _Window* pOwnee = control.GetOwnee(i);
- if (pOwnee)
- {
- pOwnee->Invalidate(true);
- }
- }
-
- return VISIT_DOWNWARD;
- }
- };
-
// Update layout
_Layout::Layout* pLayout = GetLayout();
if (pLayout)
}
else
{
- _Visitor visitor;
- Accept(visitor);
+ Invalidate(*this);
+ }
+}
+
+void
+_Control::Invalidate(_Control& control)
+{
+ if (control.GetVisibleState() == false)
+ {
+ return;
+ }
+
+ control.Invalidate();
+
+ // Ownee
+ int owneeCount = control.GetOwneeCount();
+ for (int i = 0; i < owneeCount; ++i)
+ {
+ _Window* pOwnee = control.GetOwnee(i);
+ if (pOwnee)
+ {
+ pOwnee->Invalidate(true);
+ }
+ }
+
+ for (int i = 0; i < control.GetChildCount(); ++i)
+ {
+ _Control* pChild = control.GetChild(i);
+ if (pChild)
+ {
+ pChild->Invalidate(*pChild);
+ }
}
}
SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback.
r = EndAttaching(child);
- if (IsFailed(r))
- {
- return r;
- }
+ SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r));
SysAssert(GetLastResult() == E_SUCCESS);
}
bool
-_Control::IsCalledCallAttachingToMainTree(void)
+_Control::IsCalledCallAttachingToMainTree(void) const
{
return __isCalledCallOnAttachingToMainTree;
}
}
bool
-_Control::IsCalledCallPreAttachedToMainTree(void)
+_Control::IsCalledCallPreAttachedToMainTree(void) const
{
return __isCalledCallOnPreAttachedToMainTree;
}
bool
-_Control::IsCalledCallAttachedToMainTree(void)
+_Control::IsCalledCallAttachedToMainTree(void) const
{
return __isCalledCallOnAttachedToMainTree;
}
}
void
-_Control::CallOnAncestorVisibleStateChanged(void)
+_Control::CallOnAncestorVisibleStateChanged(_Control& control)
{
- struct _Visitor
- : public Visitor
- {
- _Visitor(_Control& parent)
- : __parent(parent){}
+ control.GetControlDelegate().OnAncestorVisibleStateChanged(*this);
- virtual VisitType Visit(_Control& control)
+ for (int i = 0; i < control.GetChildCount(); ++i)
+ {
+ _Control* pChild = control.GetChild(i);
+ if (pChild)
{
- control.GetControlDelegate().OnAncestorVisibleStateChanged(__parent);
- return VISIT_DOWNWARD;
+ CallOnAncestorVisibleStateChanged(*pChild);
}
-
- _Control& __parent;
- };
-
- _Visitor visitor(*this);
- Accept(visitor);
+ }
}
void
-_Control::CallOnAncestorEnableStateChanged(void)
+_Control::CallOnAncestorEnableStateChanged(_Control& control)
{
- struct _Visitor
- : public Visitor
- {
- _Visitor(_Control& parent)
- : __parent(parent){}
+ control.GetControlDelegate().OnAncestorEnableStateChanged(*this);
- virtual VisitType Visit(_Control& control)
+ for (int i = 0; i < control.GetChildCount(); ++i)
+ {
+ _Control* pChild = control.GetChild(i);
+ if (pChild)
{
- control.GetControlDelegate().OnAncestorEnableStateChanged(__parent);
- return VISIT_DOWNWARD;
+ CallOnAncestorEnableStateChanged(*pChild);
}
-
- _Control& __parent;
- };
-
- _Visitor visitor(*this);
- Accept(visitor);
+ }
}
void
-_Control::CallOnAncestorInputEnableStateChanged(void)
+_Control::CallOnAncestorInputEnableStateChanged(_Control& control)
{
- struct _Visitor
- : public Visitor
- {
- _Visitor(_Control& parent)
- : __parent(parent){}
+ control.GetControlDelegate().OnAncestorInputEnableStateChanged(*this);
- virtual VisitType Visit(_Control& control)
+ for (int i = 0; i < control.GetChildCount(); ++i)
+ {
+ _Control* pChild = control.GetChild(i);
+ if (pChild)
{
- control.GetControlDelegate().OnAncestorInputEnableStateChanged(__parent);
- return VISIT_DOWNWARD;
+ CallOnAncestorInputEnableStateChanged(*pChild);
}
-
- _Control& __parent;
- };
-
- _Visitor visitor(*this);
- Accept(visitor);
+ }
}
// E_INVALID_ARG
r = child.GetControlDelegate().OnAttaching(this);
SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ GetControlDelegate().OnChildAttaching(child);
+
if (IsAttachedToMainTree())
{
r = CallOnAttachingToMainTree(child);
_Control::EndAttaching(_Control& child)
{
child.SetParent(this);
- child.InvalidateHierarchyRootWindow();
- child.InvalidateHierarchyAbsoluteBounds();
+ InvalidateHierarchyRootWindow(child);
+ InvalidateHierarchyAbsoluteBounds(child);
FloatRectangle floatBounds(child.GetBoundsF().x, child.GetBoundsF().y, child.GetBoundsF().width, child.GetBoundsF().height);
ClearLastResult();
result r = E_SUCCESS;
+ SysTryReturn(NID_UI,
+ IsChildAttachable(child), E_INVALID_ARG,
+ E_INVALID_ARG, "[E_INVALID_ARG] %ls cannot be a child of %ls.",
+ child.GetName().GetPointer(), GetName().GetPointer());
+
r = StartAttaching(child, _CONTROL_AREA_CLIENT);
if (IsFailed(r))
{
r = GetVisualElement()->AttachChild(*child.GetVisualElement());
r = EndAttaching(child);
- if (IsFailed(r))
- {
- return r;
- }
+ SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r));
SysAssert(GetLastResult() == E_SUCCESS);
UpdateFocusList();
}
void
-_Control::RemoveFocusRing(void)
+_Control::RemoveFocusRing(bool needToDelete)
{
if (__pFocusVisualElement)
{
- __pFocusVisualElement->SetShowState(false);
+ if (needToDelete)
+ {
+ __pFocusVisualElement.reset();
+ }
+ else
+ {
+ __pFocusVisualElement->SetShowState(false);
+ }
}
}
void
_Control::SetFocusNavigateEnabled(bool enable)
{
- __isNavigatable = enable;
+ __isNavigatable = enable;
}
bool
SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback.
r = EndAttaching(child);
- if (IsFailed(r))
- {
- return r;
- }
+ SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r));
SysAssert(GetLastResult() == E_SUCCESS);
+ UpdateFocusList();
return E_SUCCESS;
}
SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback.
r = EndAttaching(child);
- if (IsFailed(r))
- {
- return r;
- }
+ SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r));
SysAssert(GetLastResult() == E_SUCCESS);
+ UpdateFocusList();
return E_SUCCESS;
}
SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback.
r = EndAttaching(child);
- if (IsFailed(r))
- {
- return r;
- }
+ SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r));
SysAssert(GetLastResult() == E_SUCCESS);
+ UpdateFocusList();
return E_SUCCESS;
}
SysAssert(GetLastResult() == E_SUCCESS);
UpdateFocusList();
- child.InvalidateHierarchyRootWindow();
+ InvalidateHierarchyRootWindow(child);
return E_SUCCESS;
}
_Control::GetChildCount(void) const
{
ClearLastResult();
+
+ if (__pChildren == null)
+ {
+ return 0;
+ }
+
return GetChildList().GetCount();
}
_Control::IsAncestorOf(const _Control& control) const
{
ClearLastResult();
+ return IsAncestorOf(control, *this);
+}
+bool
+_Control::IsAncestorOf(const _Control& control, const _Control& ancestor) const
+{
const _Control* pParent = control.GetParent();
- if (!pParent)
- {
- return false;
- }
-
- struct _Visitor
- : public Visitor
+ if (pParent)
{
-private:
- const _Control& __ancestor;
-
-public:
- bool yes;
-
- _Visitor(const _Control& ancestor)
- : __ancestor(ancestor)
- , yes(false){}
-
- virtual VisitType Visit(_Control& control)
+ if (pParent == &ancestor)
{
- if (&__ancestor == &control)
- {
- yes = true;
- return VISIT_STOP;
- }
- else
- {
- return VISIT_UPWARD;
- }
+ return true;
}
- };
-
- _Visitor visitor(*this);
- pParent->Accept(visitor);
+ return IsAncestorOf(*pParent, ancestor);
+ }
- SysAssert(GetLastResult() == E_SUCCESS);
- return visitor.yes;
+ return false;
}
_Window*
return __pRootWindow;
}
- struct _Visitor
- : public Visitor
- {
- _Window* pRoot;
-
- _Visitor(void)
- : pRoot(null){}
+ _Window* pRoot = null;
+ _Control* pControl = const_cast<_Control*>(this);
- virtual VisitType Visit(_Control& control)
+ while (pControl)
+ {
+ pRoot = dynamic_cast <_Window*>(pControl);
+ if (pRoot)
{
- pRoot = dynamic_cast <_Window*>(&control);
- if (pRoot != null)
- {
- return VISIT_STOP;
- }
-
- return VISIT_UPWARD;
+ break;
}
- };
-
- _Visitor visitor;
- Accept(visitor);
-
- SysAssert(GetLastResult() == E_SUCCESS);
+ pControl = pControl->GetParent();
+ }
- const_cast<_Control*>(this)->__pRootWindow = visitor.pRoot;
+ const_cast<_Control*>(this)->__pRootWindow = pRoot;
const_cast<_Control*>(this)->__needRecalcRootWindow = false;
- return visitor.pRoot;
+ return pRoot;
}
bool
}
bool
-_Control::IsFocusWindowActivationChecked(void)
+_Control::IsFocusWindowActivationChecked(void) const
{
return __isFocusWindowActivationChecked;
}
pTop->SetFocusControl(this, false);
}
+ bool isFocusControlListControl = _FocusManagerImpl::GetInstance()->IsFocusControlListControl(this);
+ if (isFocusControlListControl)
+ {
+ pTop->SetFocusTraversalControl(this, true);
+ }
return E_SUCCESS;
}
{
ClearLastResult();
- struct _Visitor
- : public Visitor
- {
- bool enabled;
-
- _Visitor(void)
- : enabled(true){}
+ bool enabled = true;
+ const _Control* pControl = this;
- virtual VisitType Visit(_Control& control)
+ while (pControl)
+ {
+ if (!pControl->GetEnableState())
{
- if (!control.GetEnableState())
- {
- enabled = false;
- return VISIT_STOP;
- }
-
- return VISIT_UPWARD;
+ enabled = false;
+ break;
}
- };
+ pControl = pControl->GetParent();
+ }
- _Visitor visitor;
- Accept(visitor);
- return visitor.enabled;
+ return enabled;
}
bool
if (changed)
{
__enabledState = enabledState;
- CallOnAncestorEnableStateChanged();
+ CallOnAncestorEnableStateChanged(*this);
}
__pAccessibilityContainer->SetEnableState(enabledState);
}
{
ClearLastResult();
- struct _Visitor
- : public Visitor
- {
- bool inputEnabled;
-
- _Visitor(void)
- : inputEnabled(true){}
+ bool inputEnabled = true;
+ const _Control* pControl = this;
- virtual VisitType Visit(_Control& control)
+ while (pControl)
+ {
+ if (!pControl->GetInputEnableState())
{
- if (!control.GetInputEnableState())
- {
- inputEnabled = false;
- return VISIT_STOP;
- }
-
- return VISIT_UPWARD;
+ inputEnabled = false;
+ break;
}
- };
+ pControl = pControl->GetParent();
+ }
- _Visitor visitor;
- Accept(visitor);
- return visitor.inputEnabled;
+ return inputEnabled;
}
bool
_Control::LockInputEvent(void)
{
__inputLockRefCount++;
- CallOnAncestorInputEnableStateChanged();
+ CallOnAncestorInputEnableStateChanged(*this);
}
void
return false;
}
- struct _Visitor
- : public Visitor
- {
- bool visible;
-
- _Visitor(void)
- : visible(true){}
+ bool visible = true;
+ const _Control* pControl = this;
- virtual VisitType Visit(_Control& control)
+ while (pControl)
+ {
+ if (!pControl->GetVisibleState())
{
- if (!control.GetVisibleState())
- {
- visible = false;
- return VISIT_STOP;
- }
-
- return VISIT_UPWARD;
+ visible = false;
+ break;
}
- };
-
- _Visitor visitor;
- Accept(visitor);
+ pControl = pControl->GetParent();
+ }
- SysAssert(GetLastResult() == E_SUCCESS);
- return visitor.visible;
+ return visible;
}
bool
_Control::SetVisibleState(bool visibleState)
{
ClearLastResult();
+ UpdateFocusList();
const bool changed = (__visibleState != visibleState) || !__initVisibleState;
if (changed)
{
GetControlDelegate().OnVisibleStateChanged();
- CallOnAncestorVisibleStateChanged();
+ CallOnAncestorVisibleStateChanged(*this);
_Control* pParent = GetParent();
if (pParent)
{
}
result
-_Control::AdjustAbsoluteBounds(void)
+_Control::AdjustAbsoluteBounds(_Control& control, bool update)
{
- struct _Visitor
- : public Visitor
+ result r = E_SUCCESS;
+
+ if (update && (&control != this))
{
- _Visitor(_Control* pControl)
- : __pControl(pControl){}
+ FloatRectangle fbounds = control.GetBoundsF();
- virtual VisitType Visit(_Control& control)
+ if (control.IsLayoutChangable() == false)
+ {
+ r = control.UpdateBoundsOfVisualElement(FloatRectangle(0.0f, 0.0f, fbounds.width, fbounds.height));
+ }
+ else
+ {
+ r = control.UpdateBoundsOfVisualElement(fbounds);
+ }
+ }
+
+ for (int i = 0; i < control.GetChildCount(); ++i)
+ {
+ _Control* pChild = control.GetChild(i);
+ if (pChild)
{
- result r = E_SUCCESS;
- if (__pControl == &control)
+ if (pChild == this)
{
- return VISIT_DOWNWARD;
+ r = AdjustAbsoluteBounds(*pChild, false);
}
- FloatRectangle fbounds = control.GetBoundsF();
- if (control.IsLayoutChangable() == false)
+ else
{
- r = control.UpdateBoundsOfVisualElement(FloatRectangle(0.0f, 0.0f, fbounds.width, fbounds.height));
+ r = AdjustAbsoluteBounds(*pChild);
}
- else
+ if (IsFailed(r))
{
- r = control.UpdateBoundsOfVisualElement(fbounds);
+ SysLog(NID_UI_CTRL, "[%s] Propagated", GetErrorMessage(GetLastResult()));
}
+ }
+ }
+
+ return r;
+}
+
+result
+_Control::AdjustAbsoluteBounds(void)
+{
+ result r = E_SUCCESS;
+
+ FloatRectangle fbounds = GetBoundsF();
- ControlList& children = control.GetChildList();
+ if (IsLayoutChangable() == false)
+ {
+ r = UpdateBoundsOfVisualElement(FloatRectangle(0.0f, 0.0f, fbounds.width, fbounds.height));
+ }
+ else
+ {
+ r = UpdateBoundsOfVisualElement(fbounds);
+ }
+
+ for (int i = 0; i < GetChildCount(); ++i)
+ {
+ _Control* pChild = GetChild(i);
+ if (pChild)
+ {
- int childrenCount = children.GetCount();
- if (childrenCount <= 0)
+ if (pChild == this)
{
- return VISIT_STOP;
+ r = AdjustAbsoluteBounds(*pChild, false);
}
else
{
- return VISIT_DOWNWARD;
+ r = AdjustAbsoluteBounds(*pChild);
+ }
+ if (IsFailed(r))
+ {
+ SysLog(NID_UI_CTRL, "[%s] Propagated", GetErrorMessage(GetLastResult()));
}
}
- private :
- _Control* __pControl;
- };
-
- _Visitor visitor(this);
- Accept(visitor);
+ }
- return E_SUCCESS;
+ return r;
}
+
bool
_Control::IsInSizeRange(const Dimension& size) const
{
bool
_Control::IsInSizeRange(const FloatDimension& size) const
{
- return (__minSize.width <= size.width) && (size.width <= __maxSize.width) &&
- (__minSize.height <= size.height) && (size.height <= __maxSize.height);
+ return (_FloatCompareLE(__minSize.width, size.width)) && (_FloatCompareLE(size.width, __maxSize.width)) &&
+ (_FloatCompareLE(__minSize.height, size.height)) && (_FloatCompareLE(size.height, __maxSize.height));
}
// Custom Exception: ex) Location::Map
result
-_Control::SetBoundsFinal(const FloatRectangle& newBounds, bool changeLayoutBaseRect, bool callBoundsChangeCallbacks)
+_Control::SetBoundsFinal(const FloatRectangle& newBounds, bool changeLayoutBaseRect, bool callBoundsChangeCallbacks, bool animating)
{
result r = E_SUCCESS;
const FloatRectangle fbounds(bounds.x, bounds.y, bounds.width, bounds.height);
if (IsLayoutChangable() == false)
{
- r = UpdateBoundsOfVisualElement(FloatRectangle(0.0f, 0.0f, fbounds.width, fbounds.height));
+ if (animating == false)
+ {
+ r = UpdateBoundsOfVisualElement(FloatRectangle(0.0f, 0.0f, fbounds.width, fbounds.height));
+ }
}
else
{
- r = UpdateBoundsOfVisualElement(fbounds);
+ bool isAdjustPosition = false;
+
+ _Window* pWindow = dynamic_cast<_Window*>(this);
+ _Window* pRootWindow = null;
+ if (pWindow)
+ {
+ _WindowType winType = pWindow->GetWindowType();
+ if (winType == _WINDOW_TYPE_VE)
+ {
+ _Control* pOwner = pWindow->GetOwner();
+ if (pOwner)
+ {
+ pRootWindow = pOwner->GetRootWindow();
+ if (pRootWindow)
+ {
+ if (pRootWindow->IsLayoutChangable() == false)
+ {
+ isAdjustPosition = true;
+ }
+ }
+ }
+ }
+ }
+
+ if (isAdjustPosition == true)
+ {
+ FloatPoint ownerPosition = pRootWindow->GetPositionF();
+ if (animating == false)
+ {
+ r = UpdateBoundsOfVisualElement(FloatRectangle(fbounds.x - ownerPosition.x, fbounds.y - ownerPosition.y, fbounds.width, fbounds.height));
+ }
+ }
+ else
+ {
+ if (animating == false)
+ {
+ r = UpdateBoundsOfVisualElement(fbounds);
+ }
+ }
}
}
if (moved || resized)
{
- InvalidateHierarchyAbsoluteBounds();
+ InvalidateHierarchyAbsoluteBounds(*this);
}
ClearLastResult();
_Control::SetBoundsInternal(const FloatRectangle& bounds, bool callBoundsChangeCallbacks)
{
SysTryReturn(NID_UI,
- IsInSizeRange(Dimension(bounds.width, bounds.height)), E_INVALID_ARG,
+ IsInSizeRange(FloatDimension(bounds.width, bounds.height)), E_INVALID_ARG,
E_INVALID_ARG,
- "[E_INVALID_ARG] The specified size(%f, %f) is out of range from min size(%d, %d) to max size(%d, %d).",
+ "[E_INVALID_ARG] The specified size(%f, %f) is out of range from min size(%f, %f) to max size(%f, %f).",
bounds.width, bounds.height, __minSize.width, __minSize.height, __maxSize.width, __maxSize.height);
SetUpdateLayoutState(true);
{
ClearLastResult();
+ __isChangedPositionByUser = true;
+
if (callBoundsChangeCallbacks)
{
SysTryReturn(NID_UI,
{
ClearLastResult();
+ __isChangedPositionByUser = true;
+
if (callBoundsChangeCallbacks)
{
SysTryReturn(NID_UI,
{
ClearLastResult();
+ __isChangedPositionByUser = true;
+
SysTryReturn(NID_UI,
IsMovable(), E_UNSUPPORTED_OPERATION,
E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not movable.");
{
ClearLastResult();
+ __isChangedPositionByUser = true;
+
SysTryReturn(NID_UI,
IsMovable(), E_UNSUPPORTED_OPERATION,
E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not movable.");
return SetBoundsInternal(FloatRectangle(__bounds.x, __bounds.y, size.width, size.height), true);
}
+bool
+_Control::IsChangedPositionByUser(void) const
+{
+ return __isChangedPositionByUser;
+}
+
+void
+_Control::SetChangedPositionByUser(bool change)
+{
+ __isChangedPositionByUser = change;
+}
+
Dimension
_Control::GetMinimumSize(void) const
{
const _Control* pSelf = this;
const _Control* pParent = GetParent();
+ bool needRecalc = true;
while (pParent)
{
- if ((pSelf->GetArea() == _CONTROL_AREA_CLIENT) && pParent)
+ if (pParent->__needRecalcAbsBounds)
{
- clientBounds = pParent->GetClientBounds();
- accumPoint += Point(clientBounds.x, clientBounds.y);
- accumPoint.x -= pParent->GetHorizontalScrollPosition();
- accumPoint.y -= pParent->GetVerticalScrollPosition();
+ if ((pSelf->GetArea() == _CONTROL_AREA_CLIENT))
+ {
+ clientBounds = pParent->GetClientBounds();
+ accumPoint += Point(clientBounds.x, clientBounds.y);
+ accumPoint.x -= pParent->GetHorizontalScrollPosition();
+ accumPoint.y -= pParent->GetVerticalScrollPosition();
+ }
+
+ accumPoint += pSelf->GetPosition();
+ pSelf = pParent;
+ pParent = pParent->GetParent();
}
+ else
+ {
+ Rectangle parentAbsoluteBounds = pParent->GetAbsoluteBounds(false);
+ accumPoint += Point(parentAbsoluteBounds.x, parentAbsoluteBounds.y);
- accumPoint += pSelf->GetPosition();
- pSelf = pParent;
- pParent = pParent->GetParent();
- }
+ if ((pSelf->GetArea() == _CONTROL_AREA_CLIENT))
+ {
+ clientBounds = pParent->GetClientBounds();
+ accumPoint += Point(clientBounds.x, clientBounds.y);
+ accumPoint.x -= pParent->GetHorizontalScrollPosition();
+ accumPoint.y -= pParent->GetVerticalScrollPosition();
+ }
- _Window* pWindow = GetRootWindow();
+ accumPoint += pSelf->GetPosition();
+ needRecalc = false;
+ break;
+ }
+ }
- if (pWindow)
+ if (needRecalc)
{
- Point winPoint = pWindow->GetPosition();
-
- accumPoint.x += winPoint.x;
- accumPoint.y += winPoint.y;
+ _Window* pWindow = GetRootWindow();
+ if (pWindow)
+ {
+ Point winPoint = pWindow->GetPosition();
+ accumPoint.x += winPoint.x;
+ accumPoint.y += winPoint.y;
+ }
}
absoluteBounds.x = accumPoint.x;
if (!recalcAlways && !__needRecalcAbsBoundsF)
{
return __absoluteBoundsF;
- }
+ }
FloatPoint accumPoint;
FloatRectangle absoluteBounds;
const _Control* pSelf = this;
const _Control* pParent = GetParent();
+ bool needRecalc = true;
while (pParent)
{
- if ((pSelf->GetArea() == _CONTROL_AREA_CLIENT) && pParent)
+ if (pParent->__needRecalcAbsBoundsF)
{
- clientBounds = pParent->GetClientBoundsF();
- accumPoint += FloatPoint(clientBounds.x, clientBounds.y);
- accumPoint.x -= pParent->GetHorizontalScrollPosition();
- accumPoint.y -= pParent->GetVerticalScrollPosition();
+ if ((pSelf->GetArea() == _CONTROL_AREA_CLIENT) && pParent)
+ {
+ clientBounds = pParent->GetClientBoundsF();
+ accumPoint += FloatPoint(clientBounds.x, clientBounds.y);
+ accumPoint.x -= pParent->GetHorizontalScrollPosition();
+ accumPoint.y -= pParent->GetVerticalScrollPosition();
+ }
+
+ accumPoint += pSelf->GetPositionF();
+ pSelf = pParent;
+ pParent = pParent->GetParent();
}
+ else
+ {
+ FloatRectangle parentAbsoluteBounds = pParent->GetAbsoluteBoundsF(false);
+ accumPoint += FloatPoint(parentAbsoluteBounds.x, parentAbsoluteBounds.y);
- accumPoint += pSelf->GetPositionF();
- pSelf = pParent;
- pParent = pParent->GetParent();
- }
+ if ((pSelf->GetArea() == _CONTROL_AREA_CLIENT) && pParent)
+ {
+ clientBounds = pParent->GetClientBoundsF();
+ accumPoint += FloatPoint(clientBounds.x, clientBounds.y);
+ accumPoint.x -= pParent->GetHorizontalScrollPosition();
+ accumPoint.y -= pParent->GetVerticalScrollPosition();
+ }
- _Window* pWindow = GetRootWindow();
+ accumPoint += pSelf->GetPositionF();
+ needRecalc = false;
+ break;
+ }
+ }
- if (pWindow)
+ if (needRecalc)
{
- FloatPoint winPoint = pWindow->GetPositionF();
-
- accumPoint.x += winPoint.x;
- accumPoint.y += winPoint.y;
+ _Window* pWindow = GetRootWindow();
+ if (pWindow)
+ {
+ FloatPoint winPoint = pWindow->GetPositionF();
+ accumPoint.x += winPoint.x;
+ accumPoint.y += winPoint.y;
+ }
}
absoluteBounds.x = accumPoint.x;
if (moved || resized)
{
- result r = AdjustAbsoluteBounds();
+ result r = AdjustAbsoluteBounds(*this);
SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
SetUpdateLayoutState(true);
+ InvalidateHierarchyAbsoluteBounds(*this);
}
return E_SUCCESS;
}
if (moved || resized)
{
- result r = AdjustAbsoluteBounds();
+ result r = AdjustAbsoluteBounds(*this);
SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
SetUpdateLayoutState(true);
+ InvalidateHierarchyAbsoluteBounds(*this);
}
return E_SUCCESS;
}
bool
-_Control::IsCalledSetClientBounds(void)
+_Control::IsCalledSetClientBounds(void) const
{
return __isSetClientBounds;
}
_Control::~_Control(void)
{
- __destroying = true;
+ if (!__destroying)
+ {
+ __destroying = true;
+ }
+
+ DoBacktrace(__pDeleteBacktrace.get());
DetachAllChildren();
DetachAllOwnees();
, __isFocusMode(false)
, __isNavigatable(true)
, __isFocusWindowActivationChecked(false)
+ , __isChangedPositionByUser(false)
, __pVisualElementContentProvider(null)
, __pVisualElement(null)
, __pVisualElementEventListener(null)
, __fontFileName(L"")
, __pPreviousFocus(null)
, __pNextFocus(null)
+ , __pDragWindow(null)
+ , __isDragAndDropSource(false)
{
ClearLastResult();
+ std::unique_ptr<Tizen::Base::Collection::ArrayListT<void*> > pNewBacktrace(new (std::nothrow) ArrayListT<void*>);
+ SysTryReturnVoidResult(NID_SHELL, pNewBacktrace, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ result r = pNewBacktrace->Construct();
+ SysTryReturnVoidResult(NID_SHELL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pNewBacktrace = move(pNewBacktrace);
+
+// DoBacktrace(__pNewBacktrace.get());
+
+ std::unique_ptr<Tizen::Base::Collection::ArrayListT<void*> > pDeleteBacktrace(new (std::nothrow) ArrayListT<void*>);
+ SysTryReturnVoidResult(NID_SHELL, pDeleteBacktrace, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ r = pDeleteBacktrace->Construct();
+ SysTryReturnVoidResult(NID_SHELL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pDeleteBacktrace = move(pDeleteBacktrace);
+
SetControlDelegate(*this);
__pAccessibilityContainer = new (std::nothrow) _AccessibilityContainer(*this);
__pAccessibilityContainer->Activate(true);
}
bool
-_Control::IsDrawWhenVisible(void)
+_Control::IsDrawWhenVisible(void) const
{
return __drawWhenVisible;
}
}
bool
-_Control::IsPostOrderTraversal(void)
+_Control::IsPostOrderTraversal(void) const
{
return __isPostOrderTraversal;
}
__pDataBindingContext = pDataBindingContext;
}
+void
+_Control::DoBacktrace(Tizen::Base::Collection::ArrayListT<void*>* pBacktraceList)
+{
+ SysTryReturnVoidResult(NID_SHELL, pBacktraceList, E_INVALID_ARG, "[E_INVALID_ARG].");
+
+ const static int ADDR_SIZE = 100;
+ int retSize = 0;
+ void* pBuffer[ADDR_SIZE];
+
+ retSize = backtrace(pBuffer, ADDR_SIZE);
+ for (int i = 0; i < retSize; i++)
+ {
+ if (pBuffer[i])
+ {
+ pBacktraceList->Add(pBuffer[i]);
+ }
+ }
+}
+
+void
+_Control::SetDestroying(bool destroying)
+{
+ __destroying = destroying;
+}
+
+bool
+_Control::IsDestroying(void) const
+{
+ return __destroying;
+}
+
Tizen::Base::String
_Control::GetDescription(void) const
{
FloatRectangle
_Control::GetContentAreaBoundsF(void) const
{
+ if (__contentAreaBounds != FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
+ {
+ return __contentAreaBounds;
+ }
+
+ _Layout::Layout* pLayout = GetLayout();
+ SysTryReturn(NID_UI, pLayout, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), E_SYSTEM, "[E_SYSTEM] System error occurred.");
+
+ _Layout::LayoutMatchMode widthMatchMode = _Layout::NONE_MODE;
+ _Layout::LayoutMatchMode heightMatchMode = _Layout::NONE_MODE;
+
+ _Layout::LayoutItem& layoutItem = GetLayoutContainer();
+
+ pLayout->GetItemWidthMatchMode(layoutItem, widthMatchMode);
+ pLayout->GetItemHeightMatchMode(layoutItem, heightMatchMode);
+
+ bool widthWrapContent = widthMatchMode == _Layout::WRAP_CONTENT;
+ bool heightWrapContent = heightMatchMode == _Layout::WRAP_CONTENT;
+
+ if (widthWrapContent || heightWrapContent)
+ {
+ FloatDimension contentSize = GetContentSizeF(widthWrapContent, heightWrapContent);
+ return FloatRectangle(__bounds.x, __bounds.y, contentSize.width, contentSize.height);
+ }
+
return __contentAreaBounds;
}
SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r));
GetVisualElement()->Draw();
- ClearLastResult(); // [ToDo] Temp.
+ ClearLastResult();
rect.SetBounds(boundsInCanvas.x, boundsInCanvas.y, boundsInCanvas.width, boundsInCanvas.height);
SysTryCatch(NID_UI, pBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
r = pBitmap->Construct(*pCanvas, boundsInCanvas);
- if (IsFailed(r))
- {
- SysAssert(r == E_OUT_OF_MEMORY);
- SysTryCatch(NID_UI, r == E_SUCCESS, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
- }
+ SysTryCatch(NID_UI, r == E_SUCCESS, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
SysLog(NID_UI, "Bitmap (width:%d, height:%d)", pBitmap->GetWidth(), pBitmap->GetHeight());
ClearLastResult();
bool exist = __pCoreGestureDetectors->Contains(const_cast<_TouchGestureDetector*>(&gestureDetector));
- SysTryReturnResult(NID_UI, exist == false, E_OBJ_ALREADY_EXIST, "[E_OBJ_ALREADY_EXIST]__pCoreGestureDetectors has gesture already");
+ SysTryReturnResult(NID_UI, exist == false, E_OBJ_ALREADY_EXIST, "__pCoreGestureDetectors has gesture already");
result r = __pCoreGestureDetectors->Add(const_cast<_TouchGestureDetector*>(&gestureDetector));
SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
// Core
- SysSecureLog(NID_UI, "%ls 0x%x(%d %ls) enable(%d) enableState(%d) visible(%d) visibleState(%d) focusable(%d) focused(%d) clip(%d) movable(%d) resizable(%d) inputEnableState(%d)",
+ SysSecureLog(NID_UI, "%ls 0x%x(%d %ls) enable(%d) enableState(%d) visible(%d) visibleState(%d) clip(%d) movable(%d) resizable(%d)",
indent.GetPointer(), this, __controlHandle.ToInt(), GetName().GetPointer(), IsEnabled(), GetEnableState(), IsVisible(), GetVisibleState(),
- IsFocusable(), focused, IsClipToParent(), IsMovable(), IsResizable(), GetInputEnableState());
+ IsClipToParent(), IsMovable(), IsResizable());
+
+ SysSecureLog(NID_UI, "%ls inputEnableState(%d) focusable(%d) focused(%d) prevFocus(0x%x) nextFocus(0x%x) font(0x%x) fontName(%ls) fontFileName(%ls)",
+ indent.GetPointer(), GetInputEnableState(), IsFocusable(), focused, __pPreviousFocus, __pNextFocus, __pFont, __fontName.GetPointer(), __fontFileName.GetPointer());
Rectangle bounds = GetBounds();
Dimension min = GetMinimumSize();
delete pEnumerator;
// Print Started Gesture List
- IMapEnumeratorT <_TouchGestureDetector*, _TouchGestureDetectorState>* pStartedGestureEnumerator = GetStartedGestureDetectorEnumeratorN();
+ unique_ptr<IMapEnumeratorT <_TouchGestureDetector*, _TouchGestureDetectorState> > pStartedGestureEnumerator(GetStartedGestureDetectorEnumeratorN());
SysTryReturn(NID_UI, pStartedGestureEnumerator, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
while (pStartedGestureEnumerator->MoveNext() == E_SUCCESS)
}
}
- delete pStartedGestureEnumerator;
+ // new backtrace
+ unique_ptr<IEnumeratorT<void*> > pNewEnumerator(__pNewBacktrace->GetEnumeratorN());
+ SysTryReturn(NID_SHELL, pNewEnumerator, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ String newBacktrace;
+
+ while (pNewEnumerator->MoveNext() == E_SUCCESS)
+ {
+ void* pAddr = null;
+ pNewEnumerator->GetCurrent(pAddr);
+
+ String addr(L"");
+ addr.Format(LOG_LEN_MAX, L"0x%x ", pAddr);
+ newBacktrace.Append(addr);
+ }
+
+ if (!newBacktrace.IsEmpty())
+ {
+ SysSecureLog(NID_UI, "%ls new [%ls]", indent.GetPointer(), newBacktrace.GetPointer());
+ }
+
+ // delete backtrace
+ unique_ptr<IEnumeratorT<void*> > pDeleteEnumerator(__pDeleteBacktrace->GetEnumeratorN());
+ SysTryReturn(NID_SHELL, pDeleteEnumerator, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ String deleteBacktrace;
+
+ while (pDeleteEnumerator->MoveNext() == E_SUCCESS)
+ {
+ void* pAddr = null;
+ pDeleteEnumerator->GetCurrent(pAddr);
+
+ String addr(L"");
+ addr.Format(LOG_LEN_MAX, L"0x%x ", pAddr);
+ deleteBacktrace.Append(addr);
+ }
+
+ if (!deleteBacktrace.IsEmpty())
+ {
+ SysSecureLog(NID_UI, "%ls delete [%ls]", indent.GetPointer(), deleteBacktrace.GetPointer());
+ }
// Print VE and Evas
switch (level)
return totalCount;
}
+void
+_Control::PrintBacktrace(bool printChildren, bool newBacktrace)
+{
+ int count = PrintBacktrace(printChildren, 0, newBacktrace);
+
+ SysSecureLog(NID_UI, "%d controls were printed.", count);
+}
+
+int
+_Control::PrintBacktrace(bool printChildren, int depth, bool newBacktrace)
+{
+ String indent(L"");
+ String format(L"");
+
+ format.Format(LOG_LEN_MAX, L"%d", depth);
+
+ for (int i = 0; i < depth; i++)
+ {
+ indent.Append(L" ");
+ }
+
+ indent.Append(format);
+
+ String delimiter(L"-------------------------------------------------------------------------------------------");
+ SysSecureLog(NID_UI, "%ls", delimiter.GetPointer());
+
+ SysSecureLog(NID_UI, "%ls 0x%x(%d %ls)", indent.GetPointer(), this, __controlHandle.ToInt(), GetName().GetPointer());
+
+ Tizen::Base::Collection::ArrayListT<void*>* pBacktraceList = null;
+
+ if (newBacktrace)
+ {
+ pBacktraceList = __pNewBacktrace.get();
+ }
+ else
+ {
+ pBacktraceList = __pDeleteBacktrace.get();
+ }
+
+ SysTryReturn(NID_UI, pBacktraceList, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ int backtraceCount = pBacktraceList->GetCount();
+ SysTryReturn(NID_UI, backtraceCount > 0, 0, E_INVALID_ARG, "[E_INVALID_ARG].");
+
+ unique_ptr<void*[]> pBacktrace(new (std::nothrow) void*[backtraceCount]);
+ SysTryReturn(NID_UI, pBacktrace, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ unique_ptr<IEnumeratorT<void*> > pEnumerator(pBacktraceList->GetEnumeratorN());
+ SysTryReturn(NID_UI, pEnumerator, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ int i = 0;
+ while (pEnumerator->MoveNext() == E_SUCCESS)
+ {
+ void* pAddr = null;
+ pEnumerator->GetCurrent(pAddr);
+
+ pBacktrace[i++] = pAddr;
+ }
+
+ char** pSymbols = backtrace_symbols(pBacktrace.get(), backtraceCount);
+ SysTryReturn(NID_UI, pSymbols, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ for (int j = 0; j < backtraceCount; j++)
+ {
+ SysSecureLog(NID_UI, "%ls [%s]", indent.GetPointer(), pSymbols[j]);
+ }
+
+ free(pSymbols);
+
+ static int totalCount = 0;
+
+ if (depth == 0)
+ {
+ totalCount = 0;
+ }
+
+ if (printChildren)
+ {
+ depth ++;
+
+ int count = GetChildCount();
+ totalCount += count;
+
+ for (int i = count - 1; i >= 0; --i)
+ {
+ _Control* pChild = GetChild(i);
+ if (pChild)
+ {
+ pChild->PrintBacktrace(printChildren, depth, newBacktrace);
+ }
+ }
+ }
+
+ return totalCount;
+}
+
+void
+_Control::DragAndDropBegin(const _DragAndDropItem& dragAndDropItem)
+{
+ _Window* pRootWindow = GetRootWindow();
+ if (!pRootWindow)
+ {
+ return;
+ }
+
+ __isDragAndDropSource = true;
+
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ if (!pEcoreEvas)
+ {
+ return;
+ }
+
+ pEcoreEvas->SetDragAndDropState(true);
+ pEcoreEvas->DragAndDropBegin(*pRootWindow, dragAndDropItem.GetData());
+
+ __pDragWindow = GetControlDelegate().OnDragAndDropBeginning();
+}
+
+void
+_Control::DragAndDropDrop(void)
+{
+ _Window* pRootWindow = GetRootWindow();
+ if (!pRootWindow)
+ {
+ return;
+ }
+
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ pEcoreEvas->DragAndDropDrop(*pRootWindow);
+
+ GetControlDelegate().OnDragAndDropDropping();
+
+ // Check self drop.
+ Point dropPosition = pEcoreEvas->GetDropPosition();
+ Rectangle bounds = GetRootWindow()->GetBounds();
+ if (bounds.Contains(dropPosition))
+ {
+ _Control* pDropControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(dropPosition, true);
+ if (pDropControl)
+ {
+// Send dnd events to Source.
+#if 0
+ if (pDropControl->IsDragAndDropSource() == false)
+#endif
+ {
+ int pid = pEcoreEvas->GetProcessId(pRootWindow->GetNativeHandle());
+ String dropData = pEcoreEvas->GetDropData();
+ SysLog(NID_UI, "[DND][S:%d][0x%x] DROPPED(%ls)", pid, pDropControl, dropData.GetPointer());
+ _DragAndDropItem* pDragAndDropItem = _DragAndDropItem::CreateInstanceN(_DRAG_AND_DROP_TYPE_TEXT, dropData);
+ pDropControl->GetControlDelegate().OnDragAndDropDropped(*pDragAndDropItem);
+ delete pDragAndDropItem;
+ }
+ }
+ }
+
+ __isDragAndDropSource = false;
+}
+
+void
+_Control::DragAndDropCancel(void)
+{
+}
+
+_Window*
+_Control::GetDragWindow(void) const
+{
+ return __pDragWindow;
+}
+
+_Control*
+_Control::GetDragSourceControl(void) const
+{
+ return null;
+}
+
+bool
+_Control::IsDragAndDropSource(void) const
+{
+ return __isDragAndDropSource;
+}
+
+_Window*
+_Control::OnDragAndDropBeginning(void)
+{
+ FloatPoint dragPosition(0.0f, 0.0f);
+ FireDragAndDropEvent(_DRAG_AND_DROP_STATE_BEGINNING, dragPosition, null);
+
+ return null;
+}
+
+void
+_Control::OnDragAndDropDropping(void)
+{
+ FloatPoint dragPosition(0.0f, 0.0f);
+ FireDragAndDropEvent(_DRAG_AND_DROP_STATE_DROPPING, dragPosition, null);
+}
+
+void
+_Control::OnDragAndDropEntered(void)
+{
+ FloatPoint dragPosition(0.0f, 0.0f);
+ FireDragAndDropEvent(_DRAG_AND_DROP_STATE_ENTERED, dragPosition, null);
+}
+
+void
+_Control::OnDragAndDropMoved(const FloatPoint& position)
+{
+ FloatPoint dragPosition(position.x, position.y);
+ FireDragAndDropEvent(_DRAG_AND_DROP_STATE_MOVED, dragPosition, null);
+}
+
+void
+_Control::OnDragAndDropLeft(void)
+{
+ FloatPoint dragPosition(0.0f, 0.0f);
+ FireDragAndDropEvent(_DRAG_AND_DROP_STATE_LEFT, dragPosition, null);
+}
+
+void
+_Control::OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem)
+{
+ FloatPoint dragPosition(0.0f, 0.0f);
+ FireDragAndDropEvent(_DRAG_AND_DROP_STATE_DROPPED, dragPosition, const_cast<_DragAndDropItem*>(&dragAndDropItem));
+}
+
+result
+_Control::AddDragAndDropEventListener(const _IDragAndDropEventListener& listener)
+{
+ result r = E_SUCCESS;
+
+ if (__pDragAndDropEvent.get() == null)
+ {
+ unique_ptr<_DragAndDropEvent> pDragAndDropEvent(_DragAndDropEvent::CreateInstanceN(*this));
+ SysTryReturnResult(NID_UI, pDragAndDropEvent, E_OUT_OF_MEMORY, "Memory is insufficient.");
+
+ r = GetLastResult();
+ SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pDragAndDropEvent = move(pDragAndDropEvent);
+ }
+
+ r = __pDragAndDropEvent->AddListener(listener);
+
+ return r;
+}
+
+result
+_Control::RemoveDragAndDropEventListener(const _IDragAndDropEventListener& listener)
+{
+ SysTryReturnResult(NID_UI, __pDragAndDropEvent.get(), E_OBJ_NOT_FOUND, "The _IDragAndDropEventListener does not exist in the event listener list.");
+
+ result r = __pDragAndDropEvent->RemoveListener(listener);
+ SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
+void
+_Control::FireDragAndDropEvent(_DragAndDropState dragState, FloatPoint& dragPosition, _DragAndDropItem* pDragItem)
+{
+ if (__pDragAndDropEvent.get() == null)
+ {
+ return;
+ }
+
+ IEventArg* pArg = _DragAndDropEvent::CreateDragAndDropEventArgN(*this, dragState, dragPosition, pDragItem);
+
+ result r = GetLastResult();
+ SysTryReturnVoidResult(NID_UI, pArg, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pDragAndDropEvent->Fire(*pArg);
+
+ SetLastResult(E_SUCCESS);
+}
+
_ITouchEventPreviewer*
_Control::GetEventPreviewer(_IntToType<_UI_EVENT_TOUCH>) const
{
_Control::GetFocusListN(void) const
{
unique_ptr<IListT<_Control*> > pControlFocusList (new (std::nothrow) ArrayListT<_Control*>);
- SysTryReturn(NID_UI_CTRL, pControlFocusList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pControlFocusList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
MakeFocusList(this, pControlFocusList.get());
unique_ptr<IEnumeratorT<_Control*> > pEnum(pControlFocusList->GetEnumeratorN());
- SysTryReturn(NID_UI_CTRL, pEnum, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pEnum, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
int i =0;
int nextContainerIndex = -1;
while (pEnum->MoveNext() == E_SUCCESS)
}
return pControlFocusList.release();
}
-}} // Tizen::Ui
+bool
+_Control::IsChildAttachable(_Control& child) const
+{
+ if (dynamic_cast <_Window*>(&child) != null)
+ {
+ return false;
+ }
+
+ return true;
+}
+
+bool
+_Control::IsAnimating(void) const
+{
+ return false;
+}
+
+}} // Tizen::Ui
#include "FUiAnim_VisualElementImpl.h"
#include "FUiCtrl_Popup.h"
#include "FUi_Window.h"
+#include "FUi_DragAndDropItem.h"
//#define _TC_PASS
{
bool isPublicKey = false;
- if (keyCode <= _KEY_HARDWARE_MAX)
+ if (keyCode <= _KEY_CLIPBOARD)
{
isPublicKey = true;
}
{
result r = E_SUCCESS;
+ if (keyCode == KEY_INVALID)
+ {
+ return r;
+ }
+
switch (keyState)
{
case KEY_PRESSED:
_TouchEventArg* pEventArg = new (std::nothrow) _TouchEventArg(__public, touchInfo.GetTouchStatus());
SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
- Point startPoint(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBounds().x,
- __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBounds().y);
+ FloatPoint startPoint(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBoundsF().x,
+ __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBoundsF().y);
pEventArg->SetTouchPosition(touchInfo.GetPointId(), startPoint.x, startPoint.y,
touchInfo.GetCurrentPosition().x, touchInfo.GetCurrentPosition().y);
_TouchManager* pTouchManager = _TouchManager::GetInstance();
SysTryReturn(NID_UI, pTouchManager, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+ _Control* pTouchedControl = pTouchManager->GetTouchControlSource();
+
+ if (&__impl.GetCore() != pTouchedControl)
+ {
+ return filterd;
+ }
switch (gestureType)
{
_TouchManager* __pTouchManager = _TouchManager::GetInstance();
SysTryReturn(NID_UI, __pTouchManager, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] __pTouchManager == null.");
- Point startPoint(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBounds().x,
- __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBounds().y);
+ FloatPoint startPoint(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBoundsF().x,
+ __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBoundsF().y);
pEventArg->SetTouchPosition(touchInfo.GetPointId(), startPoint.x, startPoint.y,
touchInfo.GetCurrentPosition().x, touchInfo.GetCurrentPosition().y);
if (__impl.__pPublicPropagatedTouchEventListener != null)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
+ if (pControlImpl == null)
+ {
+ _Control* pParentControl = source.GetParent();
+ while (pParentControl)
+ {
+ pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData());
+ if (pControlImpl)
+ {
+ break;
+ }
+
+ pParentControl = pParentControl->GetParent();
+ }
+ }
SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null.");
Control& control = static_cast<Control&>(pControlImpl->GetPublic());
if (__impl.__pPublicPropagatedTouchEventListener != null)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
+ if (pControlImpl == null)
+ {
+ _Control* pParentControl = source.GetParent();
+ while (pParentControl)
+ {
+ pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData());
+ if (pControlImpl)
+ {
+ break;
+ }
+
+ pParentControl = pParentControl->GetParent();
+ }
+ }
SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null.");
Control& control = static_cast<Control&>(pControlImpl->GetPublic());
if (__impl.__pPublicPropagatedTouchEventListener != null)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
+ if (pControlImpl == null)
+ {
+ _Control* pParentControl = source.GetParent();
+ while (pParentControl)
+ {
+ pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData());
+ if (pControlImpl)
+ {
+ break;
+ }
+
+ pParentControl = pParentControl->GetParent();
+ }
+ }
SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null.");
Control& control = static_cast<Control&>(pControlImpl->GetPublic());
if (__impl.__pPublicPropagatedTouchEventListener != null)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
+ if (pControlImpl == null)
+ {
+ _Control* pParentControl = source.GetParent();
+ while (pParentControl)
+ {
+ pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData());
+ if (pControlImpl)
+ {
+ break;
+ }
+
+ pParentControl = pParentControl->GetParent();
+ }
+ }
SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null.");
Control& control = static_cast<Control&>(pControlImpl->GetPublic());
return __impl.CallOnTouchCanceled(source, touchInfo);
}
+ virtual bool OnTouchWheeled(const _Control& source, const _TouchInfo& touchInfo)
+ {
+ //SysLog(NID_UI, "OnWheelMoved, source = 0x%x", &source);
+ bool isFiltered = false;
+
+ // 3. Impl
+ isFiltered = __impl.OnTouchWheeled(__impl, touchInfo);
+ if (isFiltered)
+ {
+ return true;
+ }
+
+ // 4. Core
+ isFiltered = __core.OnTouchWheeled(source, touchInfo);
+
+ return isFiltered;
+ }
+
virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
{
_UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO;
if (__impl.__pPublicPropagatedTouchEventListener != null)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
+ if (pControlImpl == null)
+ {
+ _Control* pParentControl = source.GetParent();
+ while (pParentControl)
+ {
+ pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData());
+ if (pControlImpl)
+ {
+ break;
+ }
+
+ pParentControl = pParentControl->GetParent();
+ }
+ }
SysTryReturn(NID_UI, pControlImpl, _UI_TOUCH_EVENT_DELIVERY_YES, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null.");
Control& control = static_cast<Control&>(pControlImpl->GetPublic());
if (__impl.__pPublicPropagatedTouchEventListener != null)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
+ if (pControlImpl == null)
+ {
+ _Control* pParentControl = source.GetParent();
+ while (pParentControl)
+ {
+ pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData());
+ if (pControlImpl)
+ {
+ break;
+ }
+
+ pParentControl = pParentControl->GetParent();
+ }
+ }
SysTryReturn(NID_UI, pControlImpl, _UI_TOUCH_EVENT_DELIVERY_YES, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null.");
Control& control = static_cast<Control&>(pControlImpl->GetPublic());
if (__impl.__pPublicPropagatedTouchEventListener != null)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
+ if (pControlImpl == null)
+ {
+ _Control* pParentControl = source.GetParent();
+ while (pParentControl)
+ {
+ pControlImpl = static_cast<_ControlImpl*>(pParentControl->GetUserData());
+ if (pControlImpl)
+ {
+ break;
+ }
+
+ pParentControl = pParentControl->GetParent();
+ }
+ }
SysTryReturn(NID_UI, pControlImpl, _UI_TOUCH_EVENT_DELIVERY_YES, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null.");
Control& control = static_cast<Control&>(pControlImpl->GetPublic());
virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchInfo)
{
- return _UI_TOUCH_EVENT_DELIVERY_YES;
- }
-
- virtual bool OnMousePressed(const _Control& source, const _MouseInfo& mouseInfo)
- {
- SysLog(NID_UI, "OnMousePressed, source = 0x%x", &source);
- bool isFiltered = false;
+ _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_YES;
// 3. Impl
- isFiltered = __impl.OnMousePressed(__impl, mouseInfo);
- if (isFiltered)
- {
- return true;
- }
-
- // 4. Core
- isFiltered = __core.OnMousePressed(source, mouseInfo);
-
- return isFiltered;
- }
-
- virtual bool OnMouseReleased(const _Control& source, const _MouseInfo& mouseInfo)
- {
- SysLog(NID_UI, "OnMouseReleased, source = 0x%x", &source);
- bool isFiltered = false;
-
- // 3. Impl
- isFiltered = __impl.OnMouseReleased(__impl, mouseInfo);
- if (isFiltered)
- {
- return true;
- }
-
- // 4. Core
- isFiltered = __core.OnMouseReleased(source, mouseInfo);
-
- return isFiltered;
- }
-
- virtual bool OnMouseMoved(const _Control& source, const _MouseInfo& mouseInfo)
- {
- return false;
- }
-
- virtual bool OnMouseWheeled(const _Control& source, const _MouseInfo& mouseInfo)
- {
- SysLog(NID_UI, "OnWheelMoved, source = 0x%x", &source);
- bool isFiltered = false;
-
- // 3. Impl
- isFiltered = __impl.OnMouseWheeled(__impl, mouseInfo);
- if (isFiltered)
- {
- return true;
- }
-
- // 4. Core
- isFiltered = __core.OnMouseWheeled(source, mouseInfo);
-
- return isFiltered;
- }
-
- virtual _UiTouchEventDelivery OnPreviewMousePressed(const _Control& source, const _MouseInfo& mouseInfo)
- {
- _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO;
-
- // 3. Impl
- isFiltered = __impl.OnPreviewMousePressed(__impl, mouseInfo);
- if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO)
- {
- return _UI_TOUCH_EVENT_DELIVERY_NO;
- }
-
- // 4. Core
- isFiltered = __core.OnPreviewMousePressed(source, mouseInfo);
-
- return isFiltered;
- }
-
- virtual _UiTouchEventDelivery OnPreviewMouseReleased(const _Control& source, const _MouseInfo& mouseInfo)
- {
- _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO;
-
- // 3. Impl
- isFiltered = __impl.OnPreviewMouseReleased(__impl, mouseInfo);
+ isFiltered = __impl.OnPreviewTouchCanceled(__impl, touchInfo);
if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO)
{
return _UI_TOUCH_EVENT_DELIVERY_NO;
}
// 4. Core
- isFiltered = __core.OnPreviewMouseReleased(source, mouseInfo);
-
+ isFiltered = __core.OnPreviewTouchCanceled(source, touchInfo);
return isFiltered;
}
- virtual _UiTouchEventDelivery OnPreviewMouseMoved(const _Control& source, const _MouseInfo& mouseInfo)
+ virtual _UiTouchEventDelivery OnPreviewTouchWheeled(const _Control& source, const _TouchInfo& touchInfo)
{
_UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO;
// 3. Impl
- isFiltered = __impl.OnPreviewMouseMoved(__impl, mouseInfo);
+ isFiltered = __impl.OnPreviewTouchWheeled(__impl, touchInfo);
if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO)
{
return _UI_TOUCH_EVENT_DELIVERY_NO;
}
// 4. Core
- isFiltered = __core.OnPreviewMouseMoved(source, mouseInfo);
-
- return isFiltered;
- }
-
- virtual _UiTouchEventDelivery OnPreviewMouseWheeled(const _Control& source, const _MouseInfo& mouseInfo)
- {
- _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO;
-
- // 3. Impl
- isFiltered = __impl.OnPreviewMouseWheeled(__impl, mouseInfo);
- if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO)
- {
- return _UI_TOUCH_EVENT_DELIVERY_NO;
- }
-
- // 4. Core
- isFiltered = __core.OnPreviewMouseWheeled(source, mouseInfo);
+ isFiltered = __core.OnPreviewTouchWheeled(source, touchInfo);
return isFiltered;
}
{
SysTryReturnVoidResult(NID_UI, __impl.__pCoreKeyEvent, E_SYSTEM, "[E_SYSTEM] System error occurred.");
- __impl.__pCoreKeyEvent->ProcessListener(KEY_LONGPRESSED, __keyInfo.GetKeyCode());
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+ _Control* pControl = pControlManager->GetFocusControl();
+ SysTryReturnVoidResult(NID_UI, pControl, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControl == null.");
+
+ if (pControl == &__impl.GetCore())
+ {
+ __impl.__pCoreKeyEvent->ProcessListener(KEY_LONGPRESSED, __keyInfo.GetKeyCode());
+ }
}
}
bool isFiltered = false;
- if (__impl.__pPublicPropagatedKeyEventListener != null)
+ if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != KEY_INVALID)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
SysTryReturn(NID_UI, pControlImpl, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pControlImpl == null.");
bool isFiltered = false;
- if (__impl.__pPublicPropagatedKeyEventListener != null)
+ if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != KEY_INVALID)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
if (pControlImpl == null)
bool isFiltered = false;
- if (__impl.__pPublicPropagatedKeyEventListener != null)
+ if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != KEY_INVALID)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
if (pControlImpl == null)
{
bool isFiltered = false;
- if (__impl.__pPublicPropagatedKeyEventListener != null)
+ if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != KEY_INVALID)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
if (pControlImpl == null)
{
bool isFiltered = false;
- if (__impl.__pPublicPropagatedKeyEventListener != null)
+ if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != KEY_INVALID)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
if (pControlImpl == null)
result
_ControlImpl::OnAttachedToMainTree(void)
{
- result r = E_SUCCESS;
result returnResultPublic = E_SUCCESS;
result returnResultCore = E_SUCCESS;
}
returnResultPublic = GetPublic().OnInitializing();
- returnResultCore = GetCore().OnAttachedToMainTree();
-
- if (IsFailed(returnResultPublic) || IsFailed(returnResultCore))
- {
- _ContainerImpl* pParent = GetParent();
- SysTryReturn(NID_UI, pParent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- r = pParent->RemoveChild(this, false);
- SysAssert(r == E_SUCCESS);
+ SysTryReturn(NID_UI, returnResultPublic == E_SUCCESS, returnResultPublic, returnResultPublic, "[%s] propagated.", GetErrorMessage(returnResultPublic));
- SysTryReturn(NID_UI, returnResultPublic == E_SUCCESS, returnResultPublic, returnResultPublic, "[%s] propagated.", GetErrorMessage(returnResultPublic));
- SysTryReturn(NID_UI, returnResultCore == E_SUCCESS, returnResultCore, returnResultCore, "[%s] propagated.", GetErrorMessage(returnResultCore));
- }
+ returnResultCore = GetCore().OnAttachedToMainTree();
+ SysTryReturn(NID_UI, returnResultCore == E_SUCCESS, returnResultCore, returnResultCore, "[%s] propagated.", GetErrorMessage(returnResultCore));
return returnResultPublic;
}
}
void
+_ControlImpl::OnChildAttaching(const _Control& child)
+{
+ GetCore().OnChildAttaching(child);
+}
+
+void
_ControlImpl::OnChildDetaching(const _Control& child)
{
GetCore().OnChildDetaching(child);
return false;
}
+bool
+_ControlImpl::OnTouchWheeled(const _ControlImpl& source, const _TouchInfo& touchinfo)
+{
+ return false;
+}
+
_UiTouchEventDelivery
_ControlImpl::OnPreviewTouchPressed(const _ControlImpl& source, const _TouchInfo& touchInfo)
{
return _UI_TOUCH_EVENT_DELIVERY_YES;
}
+_UiTouchEventDelivery
+_ControlImpl::OnPreviewTouchWheeled(const _ControlImpl& source, const _TouchInfo& touchInfo)
+{
+ return _UI_TOUCH_EVENT_DELIVERY_YES;
+}
+
bool
-_ControlImpl::OnMousePressed(const _ControlImpl& source, const _MouseInfo& mouseinfo)
+_ControlImpl::OnFocusGained(const _ControlImpl& source)
{
return false;
}
bool
-_ControlImpl::OnMouseReleased(const _ControlImpl& source, const _MouseInfo& mouseinfo)
+_ControlImpl::OnFocusLost(const _ControlImpl& source)
{
return false;
}
bool
-_ControlImpl::OnMouseMoved(const _ControlImpl& source, const _MouseInfo& mouseinfo)
+_ControlImpl::OnTraversalControlFocusGained(void)
+{
+ return false;
+}
+bool
+_ControlImpl::OnTraversalControlFocusLost(void)
{
return false;
}
-
bool
-_ControlImpl::OnMouseWheeled(const _ControlImpl& source, const _MouseInfo& mouseinfo)
+_ControlImpl::OnNotifiedN(const _ControlImpl& source, Tizen::Base::Collection::IList* pArgs)
{
return false;
}
-_UiTouchEventDelivery
-_ControlImpl::OnPreviewMousePressed(const _ControlImpl& source, const _MouseInfo& mouseinfo)
+void
+_ControlImpl::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
{
- return _UI_TOUCH_EVENT_DELIVERY_YES;
+ GetPublic().OnUserEventReceivedN(requestId, pArgs);
}
-_UiTouchEventDelivery
-_ControlImpl::OnPreviewMouseReleased(const _ControlImpl& source, const _MouseInfo& mouseinfo)
+_Window*
+_ControlImpl::OnDragAndDropBeginning(void)
{
- return _UI_TOUCH_EVENT_DELIVERY_YES;
+ return GetCore().OnDragAndDropBeginning();
}
-_UiTouchEventDelivery
-_ControlImpl::OnPreviewMouseMoved(const _ControlImpl& source, const _MouseInfo& mouseinfo)
+void
+_ControlImpl::OnDragAndDropDropping(void)
{
- return _UI_TOUCH_EVENT_DELIVERY_YES;
+ GetCore().OnDragAndDropDropping();
}
-_UiTouchEventDelivery
-_ControlImpl::OnPreviewMouseWheeled(const _ControlImpl& source, const _MouseInfo& mouseinfo)
+void
+_ControlImpl::OnDragAndDropEntered(void)
{
- return _UI_TOUCH_EVENT_DELIVERY_YES;
+ GetCore().OnDragAndDropEntered();
}
-bool
-_ControlImpl::OnFocusGained(const _ControlImpl& source)
+void
+_ControlImpl::OnDragAndDropMoved(const FloatPoint& position)
{
- return false;
+ GetCore().OnDragAndDropMoved(position);
}
-bool
-_ControlImpl::OnFocusLost(const _ControlImpl& source)
+void
+_ControlImpl::OnDragAndDropLeft(void)
{
- return false;
+ GetCore().OnDragAndDropLeft();
}
-bool
-_ControlImpl::OnNotifiedN(const _ControlImpl& source, Tizen::Base::Collection::IList* pArgs)
+void
+_ControlImpl::OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem)
{
- return false;
+ GetCore().OnDragAndDropDropped(dragAndDropItem);
}
-void
-_ControlImpl::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+bool
+_ControlImpl::IsAnimating(void) const
{
- GetPublic().OnUserEventReceivedN(requestId, pArgs);
+ Animations::ControlAnimator* pControlAnimator = GetControlAnimator();
+ if (pControlAnimator)
+ {
+ AnimatorStatus sizeAnimationStatus = pControlAnimator->GetStatus(ANIMATION_TARGET_SIZE);
+ AnimatorStatus positionAnimationStatus = pControlAnimator->GetStatus(ANIMATION_TARGET_POSITION);
+
+ if ((sizeAnimationStatus == ANIMATOR_STATUS_PLAYING) || (positionAnimationStatus == ANIMATOR_STATUS_PLAYING))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ return false;
}
bool
}
result
-_ControlImpl::SetBoundsAndUpdateLayoutF(const Tizen::Graphics::FloatRectangle& bounds)
+_ControlImpl::SetBoundsAndUpdateLayout(const Tizen::Graphics::FloatRectangle& bounds)
{
result r = E_SUCCESS;
r = GetCore().SetBounds(bounds);
, __fontSize(0)
, __inputEventConsumed(false)
, __focusableChangable(true)
+ , __destroying(false)
, __pCoreEventListener(null)
, __pCoreKeyEvent(null)
, __pCoreTouchEvent(null)
return GetCore().GetTouchPressThresholdPixel();
}
+bool
+_ControlImpl::IsDestroying(void) const
+{
+ return __destroying;
+}
+
+void
+_ControlImpl::SetDestroyingFlag(bool destroying)
+{
+ __destroying = destroying;
+}
+
result
_ControlImpl::SetFontFromFile(const String& fileName)
{
#include "FUiCtrl_FormImpl.h"
#include "FUiCtrl_Frame.h"
#include "FUiCtrl_IndicatorManager.h"
+#include "FUiAnim_ControlVisualElement.h"
using namespace std;
using namespace Tizen::App;
extern "C"
{
_OSP_EXPORT_ void
-_UiPrintControl(const _Control& control, bool printChildren, int level)
+_UiPrintBacktrace(_Control* pControl, int printChildren, int newBacktrace)
{
- const_cast<_Control&>(control).PrintDescription(printChildren, level);
+ SysTryReturnVoidResult(NID_UI, pControl, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+
+ pControl->PrintBacktrace((bool)printChildren, (bool)newBacktrace);
+}
+
+_OSP_EXPORT_ void
+_UiPrintBacktraceAll(int newBacktrace)
+{
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+
+ if (pControlManager->GetWindowCount() == 0)
+ {
+ return;
+ }
+
+ int count = pControlManager->GetWindowCount();
+ for (int i = 0; i < count; i++)
+ {
+ _Window* pWindow = pControlManager->GetWindow((count-1) - i);
+ _UiPrintBacktrace(pWindow, 1, newBacktrace);
+ }
+}
+
+_OSP_EXPORT_ void
+_UiPrintControl(_Control* pControl, int printChildren, int level)
+{
+ SysTryReturnVoidResult(NID_UI, pControl, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+
+ pControl->PrintDescription((bool)printChildren, level);
}
_OSP_EXPORT_ void
for (int i = 0; i < count; i++)
{
_Window* pWindow = pControlManager->GetWindow((count-1) - i);
- _UiPrintControl(*pWindow, true, level);
+ _UiPrintControl(pWindow, 1, level);
}
}
if (pControl != null)
{
SysSecureLog(NID_UI, "[Control Manager] pControl index %d", i);
- _UiPrintControl(*pControl, true, level);
+ _UiPrintControl(pControl, true, level);
}
else
{
_ControlHandle
_ControlManager::Register(_Control* pObject)
{
- if (pObject)
- {
- SysLog(NID_UI, "A _Control Registered()");
- }
-
if (pObject == null)
{
return _ControlHandle();
__pAllControlList->Add(pObject);
}
+ _HistoryInfo* pHistoryInfo = new (std::nothrow) _HistoryInfo(pObject);
+ SysTryReturn(NID_UI, pHistoryInfo, _ControlHandle(), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+// pHistoryInfo->SetBacktrace(*pObject->__pNewBacktrace.get());
+
+ AddHistory(__pNewHistory, pHistoryInfo);
+
return __objectManager.Register(*pObject);
}
_ControlManager::Release(const _ControlHandle& handle)
{
_Control* pObject = GetObject(handle);
- if (pObject)
+ if (!pObject)
{
- SysLog(NID_UI, "A _Control Released()");
+ return null;
}
if (__pAllControlList)
__pAllControlList->Remove(pObject);
}
+ _HistoryInfo* pHistoryInfo = new (std::nothrow) _HistoryInfo(pObject);
+ SysTryReturn(NID_UI, pHistoryInfo, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ pHistoryInfo->SetBacktrace(*pObject->__pDeleteBacktrace.get());
+
+ AddHistory(__pDeleteHistory, pHistoryInfo);
+
return __objectManager.Unregister(handle);
}
return __objectManager.GetObject(handle);
}
+_Control*
+_ControlManager::GetObject(int handle)
+{
+ _ControlHandle controlHandle = __objectManager.GetHandle(handle);
+ return __objectManager.GetObject(controlHandle);
+}
+
+const _Control*
+_ControlManager::GetObject(int handle) const
+{
+ _ControlHandle controlHandle = const_cast<_ControlManager*>(this)->__objectManager.GetHandle(handle);
+ return __objectManager.GetObject(controlHandle);
+}
+
int
_ControlManager::GetUsedHandleCount(void) const
{
, __screenDpi(0)
, __pClipboardOwner(null)
, __pControlManagerEventListenerList(new (std::nothrow) LinkedListT<_IControlManagerEventListener*>)
+ , __pNewHistory(null)
+ , __pDeleteHistory(null)
{
result r = _CoordinateInfo::GetAppCoordinateSystem(__isCoordinateSystemLogical, __logicalCoordinateSystem, __logicalBaseScreenSize);
SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] System error occurred.");
_EcoreEvas::CreateInstanceN();
+ __pNewHistory = new (std::nothrow) ArrayListT<_HistoryInfo*>;
+ SysTryReturnVoidResult(NID_UI, __pNewHistory, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ r = __pNewHistory->Construct();
+ SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pDeleteHistory = new (std::nothrow) ArrayListT<_HistoryInfo*>;
+ SysTryReturnVoidResult(NID_UI, __pDeleteHistory, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ r = __pDeleteHistory->Construct();
+ SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
__pWindowList = new (std::nothrow)LinkedListT<_Window*>;
SysTryCatch(NID_UI, __pWindowList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pGestureList = null;
}
+ if (__pNewHistory)
+ {
+ unique_ptr<IEnumeratorT<_HistoryInfo*> > pEnumerator(__pNewHistory->GetEnumeratorN());
+ if (pEnumerator)
+ {
+ while (pEnumerator->MoveNext() == E_SUCCESS)
+ {
+ _HistoryInfo* pHistoryInfo = null;
+ pEnumerator->GetCurrent(pHistoryInfo);
+
+ delete pHistoryInfo;
+ }
+ }
+
+ delete __pNewHistory;
+ __pNewHistory = null;
+ }
+
+ if (__pDeleteHistory)
+ {
+ unique_ptr<IEnumeratorT<_HistoryInfo*> > pEnumerator(__pDeleteHistory->GetEnumeratorN());
+ if (pEnumerator)
+ {
+ while (pEnumerator->MoveNext() == E_SUCCESS)
+ {
+ _HistoryInfo* pHistoryInfo = null;
+ pEnumerator->GetCurrent(pHistoryInfo);
+
+ delete pHistoryInfo;
+ }
+ }
+
+ delete __pDeleteHistory;
+ __pDeleteHistory = null;
+ }
+
DestroyEcoreEvasMgr();
_IndicatorManager::ReleaseInstance();
r = CallOnPreAttachedToMainTree(window);
SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = CallOnAttachedToMainTree(window);
+ SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (invalidate)
{
window.Invalidate(true);
}
- r = CallOnAttachedToMainTree(window);
- SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
if (window.IsDimmingEnabled())
{
r = _DimmingManager::GetInstance()->ShowDimmingLayer(&window);
{
_IControlManagerEventListener* pListener = null;
pEnumerator->GetCurrent(pListener);
-
+
if (pListener)
{
pListener->OnControlManagerTerminating();
return E_SUCCESS;
}
- bool wasWindowOnTop = IsWindowOnTop(window);
+ _Window* pTopWindow = GetTopWindow();
r = CallOnDetachingFromMainTree(window);
SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = DetachWindow(window);
SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- if (wasWindowOnTop)
+ _Window* pNewTopWindow = GetTopWindow();
+
+ if (pNewTopWindow != pTopWindow)
{
- _Window* pNewTopWindow = GetTopWindow();
if (pNewTopWindow && pNewTopWindow->IsActivationEnabled())
{
pNewTopWindow->Activate();
SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
+ }
+
+ if (dynamic_cast <_Frame*>(pNewTopWindow) != null)
+ {
+ __pCurrentFrame = pNewTopWindow;
+ }
+ else
+ {
+ bool findFrame = false;
+ int count = GetWindowCount();
+ for (int i = 0; i < count; i++)
+ {
+ _Window* pWindow = GetWindow((count-1) - i);
+ _Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
+ if (pFrame)
+ {
+ __pCurrentFrame = pFrame;
+ findFrame = true;
+ break;
+ }
+ }
- if (dynamic_cast <_Frame*>(pNewTopWindow) != null)
+ if (!findFrame)
{
- __pCurrentFrame = pNewTopWindow;
+ __pCurrentFrame = null;
}
}
int
_ControlManager::GetControlCount(void) const
{
- return __pAllControlList->GetCount();
+ if (__pAllControlList)
+ {
+ return __pAllControlList->GetCount();
+ }
+ return -1;
}
_Window*
int
_ControlManager::GetWindowCount(void) const
{
- return __pWindowList->GetCount();
+ if (__pWindowList)
+ {
+ return __pWindowList->GetCount();
+ }
+ return -1;
}
}
_Control*
-_ControlManager::GetTopmostTouchedControl(const Point& point)
+_ControlManager::GetTopmostTouchedControl(const Point& point, bool activation)
{
_Control* pControl = null;
_Window* pTopWindow = null;
_Control* pCapturedControl = pTouchManager->GetCapturedControl();
- if (pCapturedControl)
- {
- if (pTouchManager->IsCaptureAllowedOwnerBounds())
- {
- if (pTouchManager->IsCaptureAllowedOutOfBounds())
- {
- pControl = pCapturedControl;
- }
-
- _Window * pWindow = dynamic_cast<_Window*>(pCapturedControl);
- if (pWindow)
- {
- _Control* pOwner = pWindow->GetOwner();
- if (pOwner)
- {
- Tizen::Graphics::Rectangle ownerRc(pOwner->GetAbsoluteBounds());
- if ((point.x >= ownerRc.x) && (point.x <= (ownerRc.x + ownerRc.width)) && (point.y >= ownerRc.y) && (point.y <= (ownerRc.y + ownerRc.height)))
- {
- pControl = pOwner;
- }
- }
- }
-
- Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds());
- if ((point.x >= rc.x) && (point.x <= (rc.x + rc.width)) && (point.y >= rc.y) && (point.y <= (rc.y + rc.height)))
- {
- pControl = pCapturedControl;
- }
- }
- else
- {
- if (pTouchManager->IsCaptureAllowedOutOfBounds())
- {
- pControl = pCapturedControl;
- }
- else
- {
- Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds());
-
- if ((point.x < rc.x) || (point.x > (rc.x + rc.width)) || (point.y < rc.y) || (point.y > (rc.y + rc.height)))
- {
- pControl = pCapturedControl;
- }
- }
- }
-
- if (pControl != null)
- {
- return pControl;
- }
- }
-
int count = GetWindowCount();
if (count != 0)
{
continue;
}
+ if (activation == true)
+ {
+ if (pWindow->IsActivationEnabled() == false)
+ {
+ continue;
+ }
+ }
+
_EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer());
Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas();
if (pTopWindow != null)
{
- Point winPos(0, 0);
- winPos = pTopWindow->GetPosition();
+ _RootVisualElement* pRootVisualElement = pTopWindow->GetRootVisualElement();
+ if (pRootVisualElement == null)
+ {
+ SetLastResult(E_SYSTEM);
+ return null;
+ }
- Point relPos(point.x - winPos.x, point.y - winPos.y);
- pControl = pTopWindow->GetTopmostChildAt(relPos);
- if (pControl != null)
+ Tizen::Graphics::Rectangle touchedWindowBounds = pTopWindow->GetBounds();
+
+ Tizen::Base::Collection::IList* pList = pRootVisualElement->GetChildrenN();
+ if (!pList)
+ {
+ SetLastResult(E_SYSTEM);
+ return null;
+ }
+
+ int count = pList->GetCount();
+ for (int i = count-1; i>=0; i--)
{
- if (pControl->GetRootWindow() == pTopWindow)
+ _ControlVisualElement* pChildControlVisualElement = dynamic_cast<_ControlVisualElement*>(pList->GetAt(i));
+ if (pChildControlVisualElement)
{
- return pControl;
+ _Control* pChildControl = static_cast<_Control*>(pChildControlVisualElement->GetUserData());
+ if (pChildControl == null)
+ {
+ continue;
+ }
+
+ _Window* pChildWindow = dynamic_cast<_Window*>(pChildControl);
+ if (pChildWindow == null)
+ {
+ continue;
+ }
+
+ Tizen::Graphics::FloatPoint tempPoint(point.x, point.y);
+
+ if (pChildWindow && pChildWindow->GetWindowType() == _WINDOW_TYPE_VE)
+ {
+ Tizen::Graphics::Rectangle windowBounds = pChildWindow->GetBounds();
+ tempPoint.x = static_cast<float>(tempPoint.x - windowBounds.x);
+ tempPoint.y = static_cast<float>(tempPoint.y - windowBounds.y);
+ }
+ else
+ {
+ tempPoint.x = static_cast<float>(tempPoint.x - touchedWindowBounds.x);
+ tempPoint.y = static_cast<float>(tempPoint.y - touchedWindowBounds.y);
+ }
+
+ _ControlVisualElement* pControlVisualElement = pChildControlVisualElement->GetControlChildAtPoint(tempPoint);
+ if (pControlVisualElement)
+ {
+ pControl = static_cast <_Control*>(pControlVisualElement->GetUserData());
+ if (pControl)
+ {
+ break;
+ }
+ }
}
}
+ delete pList;
}
- return null;
+ if (pCapturedControl)
+ {
+ if (pTouchManager->IsCaptureAllowedOwnerBounds())
+ {
+ if (pTouchManager->IsCaptureAllowedOutOfBounds())
+ {
+ pControl = pCapturedControl;
+ }
+
+ _Window * pWindow = dynamic_cast<_Window*>(pCapturedControl);
+ if (pWindow)
+ {
+ _Control* pOwner = pWindow->GetOwner();
+ if (pOwner)
+ {
+ Tizen::Graphics::Rectangle ownerRc(pOwner->GetAbsoluteBounds());
+ if ((point.x >= ownerRc.x) && (point.x <= (ownerRc.x + ownerRc.width)) && (point.y >= ownerRc.y) && (point.y <= (ownerRc.y + ownerRc.height)))
+ {
+ pControl = pOwner;
+ }
+ }
+ }
+
+ Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds());
+ if ((point.x >= rc.x) && (point.x <= (rc.x + rc.width)) && (point.y >= rc.y) && (point.y <= (rc.y + rc.height)))
+ {
+ pControl = pCapturedControl;
+ }
+ }
+ else
+ {
+ if (pTouchManager->IsCaptureAllowedOutOfBounds())
+ {
+ pControl = pCapturedControl;
+ }
+ else
+ {
+ Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds());
+
+ if ((point.x < rc.x) || (point.x > (rc.x + rc.width)) || (point.y < rc.y) || (point.y > (rc.y + rc.height)))
+ {
+ pControl = pCapturedControl;
+ }
+ }
+ }
+
+ if (pControl != null)
+ {
+ return pControl;
+ }
+ }
+
+ return pControl;
}
// [review] rename __InvXformer
_ControlManager::OnSettingChanged(Tizen::Base::String& key)
{
const wchar_t* FONT_TYPE = L"http://tizen.org/setting/font.type";
- const wchar_t* LOCALE_COUNTRY = L"http://tizen.org/setting/locale.country";
- const wchar_t* LOCALE_LANGUAGE = L"http://tizen.org/setting/locale.language";
+ const wchar_t* LOCALE_COUNTRY = L"http://tizen.org/setting/locale.country";
+ const wchar_t* LOCALE_LANGUAGE = L"http://tizen.org/setting/locale.language";
- if (key == FONT_TYPE || key == LOCALE_COUNTRY || key == LOCALE_LANGUAGE)
+ if (key == FONT_TYPE || key == LOCALE_COUNTRY || key == LOCALE_LANGUAGE)
{
_FontImpl::UpdateDefaultFont(key);
__isSystemFontChanged = true;
struct _Visitor
- : public _Control::Visitor
+ : public _Control::Visitor
{
- virtual _Control::VisitType Visit(_Control& control)
+ virtual _Control::VisitType Visit(_Control& control)
{
control.GetFallbackFont();
_IControlDelegate& delegate = control.GetControlDelegate();
IEnumeratorT<_TouchGestureDetector*>* pEnumerator = __pGestureList->GetEnumeratorN();
SysTryReturnVoidResult(NID_UI, pEnumerator, E_SYSTEM, "[E_SYSTEM] System error occurred.")
- int duration = static_cast<int>(elm_config_longpress_timeout_get() * 1000);
+ int duration = static_cast<int>(elm_config_longpress_timeout_get() * 1000);
if (duration == 0)
{
duration = 500;
{
_TouchLongPressGestureDetector* pGestureLongPress= dynamic_cast<_TouchLongPressGestureDetector*>(const_cast<_TouchGestureDetector*>(pGestureDetector));
SysTryReturnVoidResult(NID_UI, pGestureLongPress, E_SYSTEM, "[E_SYSTEM] System error occurred.")
- pGestureLongPress->SetDuration(duration);
+ pGestureLongPress->SetDuration(duration);
}
}
}
}
+void
+_ControlManager::AddHistory(ArrayListT<_HistoryInfo*>* pHistoryList, _HistoryInfo* pHistoryInfo)
+{
+ SysTryReturnVoidResult(NID_UI, pHistoryList, E_INVALID_ARG, "[E_INVALID_ARG].");
+ SysTryReturnVoidResult(NID_UI, pHistoryInfo, E_INVALID_ARG, "[E_INVALID_ARG].");
+
+ const int COUNT_MAX = 500;
+
+ int count = pHistoryList->GetCount();
+ if (count > COUNT_MAX)
+ {
+ _HistoryInfo* pInfo = null;
+ pHistoryList->GetAt(0, pInfo);
+ delete pInfo;
+
+ pHistoryList->RemoveAt(0);
+ }
+
+ pHistoryList->Add(pHistoryInfo);
+}
+
+_ControlManager::_HistoryInfo::_HistoryInfo(_Control* pControl)
+ : __pControl(pControl)
+ , __backtraceCount(0)
+ , __pBacktrace(null)
+{
+}
+
+_ControlManager::_HistoryInfo::~_HistoryInfo(void)
+{
+ if (__pBacktrace)
+ {
+ delete [] __pBacktrace;
+ __pBacktrace = null;
+ }
+}
+
+void
+_ControlManager::_HistoryInfo::SetBacktrace(Tizen::Base::Collection::ArrayListT<void*>& backtrace)
+{
+ __backtraceCount = backtrace.GetCount();
+ SysTryReturnVoidResult(NID_UI, __backtraceCount > 0, E_INVALID_ARG, "[E_INVALID_ARG].");
+
+ __pBacktrace = new (std::nothrow) void*[__backtraceCount];
+ SysTryReturnVoidResult(NID_UI, __pBacktrace, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ unique_ptr<IEnumeratorT<void*> > pEnumerator(backtrace.GetEnumeratorN());
+ SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ int i = 0;
+ while (pEnumerator->MoveNext() == E_SUCCESS)
+ {
+ void* pAddr = null;
+ pEnumerator->GetCurrent(pAddr);
+
+ __pBacktrace[i++] = pAddr;
+ }
+}
+
}} // Tizen::Ui
void
_CustomControlBaseImpl::OnBoundsChanged(void)
{
+ bool isFocusMode = GetCore().IsFocusModeStateEnabled();
+ bool isFocus = GetCore().IsFocused();
+ if (isFocusMode)
+ {
+ GetCore().RemoveFocusRing(true);
+ if (isFocus)
+ {
+ GetCore().DrawFocus();
+ }
+ }
GetPublic().OnBoundsChanged(__oldBounds, GetBounds());
}
*/
#include <stdio.h>
+#include <wchar.h>
#include <FBaseInteger.h>
#include <FBaseString.h>
#include <FGrpColor.h>
default:
{
return false;
- }\r
+ }
}
break;
case DATA_BINDING_DATA_TYPE_BOOLEAN:
return false;
}
pTarget->value = static_cast<Float&>(const_cast<Object&>(sourceData)).CompareTo(0.0f) == 0 ?false:true;
- }
+ }
break;
case DATA_BINDING_DATA_TYPE_DOUBLE:
{
return dataType;
}
-VariantType
-ConvertDataBindingDataTypeToVariantType(DataBindingDataType dataType)
-{
- VariantType variantType = VARIANT_TYPE_NONE;
- switch (dataType)
- {
- case DATA_BINDING_DATA_TYPE_BOOLEAN:
- variantType = VARIANT_TYPE_BOOL;
- break;
-
- case DATA_BINDING_DATA_TYPE_COLOR:
- variantType = VARIANT_TYPE_COLOR;
- break;
-
- case DATA_BINDING_DATA_TYPE_DIMENSION:
- variantType = VARIANT_TYPE_DIMENSION;
- break;
-
- case DATA_BINDING_DATA_TYPE_DOUBLE:
- variantType = VARIANT_TYPE_DOUBLE;
- break;
-
- case DATA_BINDING_DATA_TYPE_FLOAT:
- variantType = VARIANT_TYPE_FLOAT;
- break;
-
- case DATA_BINDING_DATA_TYPE_INTEGER:
- variantType = VARIANT_TYPE_INT;
- break;
-
- case DATA_BINDING_DATA_TYPE_LONG:
- variantType = VARIANT_TYPE_LONG;
- break;
-
- case DATA_BINDING_DATA_TYPE_POINT:
- variantType = VARIANT_TYPE_POINT;
- break;
-
- case DATA_BINDING_DATA_TYPE_RECTANGLE:
- variantType = VARIANT_TYPE_RECTANGLE;
- break;
-
- case DATA_BINDING_DATA_TYPE_STRING:
- variantType = VARIANT_TYPE_STRING;
- break;
-
- case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION:
- variantType = VARIANT_TYPE_FLOAT_DIMENSION;
- break;
-
- case DATA_BINDING_DATA_TYPE_FLOAT_POINT:
- variantType = VARIANT_TYPE_FLOAT_POINT;
- break;
-
- case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE:
- variantType = VARIANT_TYPE_FLOAT_RECTANGLE;
- break;
-
- default:
- break;
- }
- return variantType;
-}
-
-
class _DataBindingPropertyChangeEventListner
: public _IPropertyChangeEventListener
, virtual public Tizen::Base::Runtime::IEventListener
#include "FUiAnim_ControlVisualElement.h"
#include "FUiAnim_RootVisualElement.h"
#include "FUiAnim_VisualElementImpl.h"
-#include "FUiCtrl_Indicator.h"
#include "FUiCtrl_Popup.h"
using namespace Tizen::Graphics;
FloatDimension size = _ControlManager::GetInstance()->GetScreenSizeF();
- _Popup* pPopup = dynamic_cast<_Popup*>(__pControl);
- _Indicator* pIndicator = null;
- if (pPopup)
- {
- pIndicator = pPopup->GetIndicator();
- }
-
_VisualElement* pControlVisualElement = __pControl->GetVisualElement();
SysTryReturnResult(NID_UI, pControlVisualElement, E_SYSTEM, "A system error has been occurred.");
{
pParent->InsertChild(*__pDimmingElement, pControlVisualElement, false);
}
- r = __pDimmingElement->AttachChild(*pIndicator);
- _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*pIndicator);
-
- r = pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 4);
-
DrawBackground();
}
else
{
- r = __pDimmingElement->DetachChild(*pIndicator);
_Window* pWindow = __pControl->GetRootWindow();
_RootVisualElement* pParent = pWindow->GetRootVisualElement();
if (pParent)
r = GetLastResult();
SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
Color bgColor(0x7F000000);
- pCanvas->SetBackgroundColor(bgColor);
- pCanvas->Clear();
+
+ if (pCanvas)
+ {
+ pCanvas->SetBackgroundColor(bgColor);
+ pCanvas->Clear();
+ }
delete pCanvas;
}
_Window* pOldWindow = null;
r = __pWindowList->GetAt(count - 1, pOldWindow);
SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- DeleteDimmingLayer(pOldWindow);
}
r = CreateDimmingLayer(pWindow);
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FUi_DragAndDropEvent.cpp
+ * @brief This is the implementation for the _DragAndDropEvent class.
+ * @version 1.0
+ */
+
+#include <new>
+#include <unique_ptr.h>
+#include <FBaseErrors.h>
+#include <FBaseSysLog.h>
+#include "FUi_DragAndDropEvent.h"
+
+using namespace std;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Graphics;
+
+namespace Tizen { namespace Ui
+{
+class _DragAndDropEventArg
+ : public Tizen::Base::Runtime::IEventArg
+ , public Tizen::Base::Object
+{
+public:
+ _DragAndDropEventArg(const _Control& source, _DragAndDropState state, FloatPoint& point, _DragAndDropItem* pItem);
+
+ virtual ~_DragAndDropEventArg(void);
+
+ const _Control* GetSource(void) const;
+
+ _DragAndDropState GetState(void) const;
+ FloatPoint GetPoint(void) const;
+ const _DragAndDropItem* GetItem(void) const;
+
+private:
+ _DragAndDropEventArg(const _DragAndDropEventArg& rhs);
+ _DragAndDropEventArg& operator =(const _DragAndDropEventArg& rhs);
+
+private:
+ _Control* __pSource;
+ _DragAndDropState __state;
+ FloatPoint __point;
+ _DragAndDropItem* __pItem;
+}; // _DragAndDropEventArg
+
+_DragAndDropEventArg::_DragAndDropEventArg(const _Control& source, _DragAndDropState state, FloatPoint& point, _DragAndDropItem* pItem)
+ : __pSource(const_cast <_Control*>(&source))
+ , __state(state)
+ , __point(point)
+ , __pItem(pItem)
+{
+}
+
+_DragAndDropEventArg::~_DragAndDropEventArg(void)
+{
+}
+
+const _Control*
+_DragAndDropEventArg::GetSource(void) const
+{
+ return __pSource;
+}
+
+_DragAndDropState
+_DragAndDropEventArg::GetState(void) const
+{
+ return __state;
+}
+
+FloatPoint
+_DragAndDropEventArg::GetPoint(void) const
+{
+ return __point;
+}
+
+const _DragAndDropItem*
+_DragAndDropEventArg::GetItem(void) const
+{
+ return __pItem;
+}
+
+_DragAndDropEvent*
+_DragAndDropEvent::CreateInstanceN(const _Control& source)
+{
+ unique_ptr<_DragAndDropEvent> pDragAndDropEvent(new (std::nothrow) _DragAndDropEvent(source));
+ SysTryReturn(NID_UI, pDragAndDropEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ result r = GetLastResult();
+ SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ SetLastResult(E_SUCCESS);
+
+ return pDragAndDropEvent.release();
+}
+
+IEventArg*
+_DragAndDropEvent::CreateDragAndDropEventArgN(const _Control& source, _DragAndDropState state, Tizen::Graphics::FloatPoint& point, _DragAndDropItem* pItem)
+{
+ _DragAndDropEventArg* pEventArg = new (std::nothrow) _DragAndDropEventArg(source, state, point, pItem);
+ SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+
+ SetLastResult(E_SUCCESS);
+
+ return pEventArg;
+}
+
+_DragAndDropEvent::~_DragAndDropEvent(void)
+{
+}
+
+const _Control*
+_DragAndDropEvent::GetSource(void) const
+{
+ return __pSource;
+}
+
+void
+_DragAndDropEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
+{
+ _IDragAndDropEventListener* pEventListener = dynamic_cast <_IDragAndDropEventListener*>(&listener);
+ SysTryReturnVoidResult(NID_UI, pEventListener, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid.");
+
+ const _DragAndDropEventArg* pArg = dynamic_cast <const _DragAndDropEventArg*>(&arg);
+ SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid.");
+
+ _DragAndDropState dragState = pArg->GetState();
+ SysLog(NID_UI, "[DND][0x%x] Fire %d.", pArg->GetSource(), dragState);
+ switch (dragState)
+ {
+ case _DRAG_AND_DROP_STATE_BEGINNING:
+ pEventListener->OnDragAndDropBeginning(*pArg->GetSource());
+ break;
+ case _DRAG_AND_DROP_STATE_DROPPING:
+ pEventListener->OnDragAndDropDropping(*pArg->GetSource());
+ break;
+ case _DRAG_AND_DROP_STATE_ENTERED:
+ pEventListener->OnDragAndDropEntered(*pArg->GetSource());
+ break;
+ case _DRAG_AND_DROP_STATE_MOVED:
+ pEventListener->OnDragAndDropMoved(*pArg->GetSource(), pArg->GetPoint());
+ break;
+ case _DRAG_AND_DROP_STATE_LEFT:
+ pEventListener->OnDragAndDropLeft(*pArg->GetSource());
+ break;
+ case _DRAG_AND_DROP_STATE_DROPPED:
+ pEventListener->OnDragAndDropDropped(*pArg->GetSource(), *pArg->GetItem());
+ break;
+ default:
+ break;
+ }
+
+ SetLastResult(E_SUCCESS);
+}
+
+_DragAndDropEvent::_DragAndDropEvent(const _Control& source)
+ : __pSource(null)
+{
+ result r = _Event::Initialize();
+ SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pSource = &source;
+
+ SetLastResult(E_SUCCESS);
+}
+
+}} // Tizen::Ui
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FUi_DragAndDropItem.cpp
+ * @brief This is the implementation file for the _DragAndDropItem class.
+ */
+
+#include <new>
+#include <FBaseString.h>
+#include <FGrpBitmap.h>
+#include <FBaseResult.h>
+#include <FBaseSysLog.h>
+#include "FUi_DragAndDropItem.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+
+namespace Tizen { namespace Ui
+{
+_DragAndDropItem*
+_DragAndDropItem::CreateInstanceN(_DragAndDropType type, const String& data)
+{
+ _DragAndDropItem* pItem = new (std::nothrow) _DragAndDropItem(type, data);
+ SysTryReturn(NID_UI, pItem, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ result r = GetLastResult();
+ SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ SetLastResult(E_SUCCESS);
+
+ return pItem;
+
+CATCH:
+ delete pItem;
+ return null;
+}
+
+_DragAndDropItem::~_DragAndDropItem(void)
+{
+}
+
+_DragAndDropType
+_DragAndDropItem::GetDataType(void) const
+{
+ return __type;
+}
+
+String
+_DragAndDropItem::GetData(void) const
+{
+ return __data;
+}
+
+_DragAndDropItem::_DragAndDropItem(_DragAndDropType type, const String& data)
+ : __type(type)
+ , __data(data)
+{
+ SysTryReturnVoidResult(NID_UI,
+ (_DRAG_AND_DROP_TYPE_TEXT & type)
+ , E_INVALID_ARG, "[E_INVALID_ARG] The data type is invalid.");
+
+ SetLastResult(E_SUCCESS);
+
+ return;
+}
+
+}} // Tizen::Ui
* @brief This is the implementation file for the _EcoreEvas class.
*/
+#include <unique_ptr.h>
#include <app.h>
#include <appcore-common.h>
#include <runtime_info.h>
#include "FUi_ControlManager.h"
#include "FUi_ControlImplManager.h"
#include "FUiCtrl_Popup.h"
+#include "FUiCtrl_Keypad.h"
#include "FUiCtrl_ContextMenu.h"
#include "FUiAnim_DisplayContextImpl.h"
#include "FUiAnimDisplayContext.h"
#include "FUi_TouchManager.h"
+#include "FUi_DragAndDropItem.h"
+#include <FAppApp.h>
+using namespace std;
+using namespace Tizen::App;
using namespace Tizen::Base;
using namespace Tizen::Base::Runtime;
using namespace Tizen::App;
return EINA_FALSE;
}
-int frameX = 0;
-int frameY = 0;
-int frameW = 0;
-int frameH = 0;
-
Eina_Bool
OnWindowConfigured(void* pData, int type, void* pEvent)
{
- Ecore_X_Event_Window_Configure* pEv = (Ecore_X_Event_Window_Configure*)pEvent;
- if (!pEv)
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ if (!pControlManager)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
+ if (!pTouchManager)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ if (pTouchManager->GetPointCount() > 0)
{
return ECORE_CALLBACK_PASS_ON;
}
- if (pEv->from_wm == EINA_FALSE)
+ SysLog(NID_UI, "[WM ROTATION]<M>");
+
+ Ecore_X_Event_Window_Configure* pE = (Ecore_X_Event_Window_Configure*)pEvent;
+ if (!pE)
{
return ECORE_CALLBACK_PASS_ON;
}
- Ecore_X_Window targetWin = pEv->win;
- if (targetWin == 0)
+ if ((pE->from_wm == EINA_FALSE))
{
return ECORE_CALLBACK_PASS_ON;
}
- if ((frameX == pEv->x) && (frameY == pEv->y) && (frameW == pEv->w) && (frameH == pEv->h))
+ _Window* pCurFrame = pControlManager->GetCurrentFrame();
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ if (!pCurFrame || !pEcoreEvas)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ if (pCurFrame->IsOrientationRoot() == false)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ Ecore_X_Window targetWin = pE->win;
+ _Frame* pFrame = static_cast<_Frame*>(pCurFrame);
+ Ecore_X_Window win = (Ecore_X_Window)pFrame->GetNativeHandle();
+ Dimension screenSize = pControlManager->GetScreenSize();
+
+#if defined(PARTIAL_SCREEN)
+ if (win != targetWin)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ if (pFrame->GetShowMode() == FRAME_SHOW_MODE_FULL_SCREEN)
+ {
+ Dimension winSize = _CoordinateSystemUtils::InverseTransform(Dimension(pE->w, pE->h));
+ if (winSize == screenSize)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+ else
+ {
+ pFrame->SetPartialScreenEnabled(true);
+ }
+ }
+ else if (pFrame->GetShowMode() == FRAME_SHOW_MODE_PARTIAL_SCREEN)
+ {
+ Dimension winSize = _CoordinateSystemUtils::InverseTransform(Dimension(pE->w, pE->h));
+ if (winSize == screenSize)
+ {
+ pFrame->SetPartialScreenEnabled(false);
+ }
+ }
+#else
+ if ((pFrame->GetShowMode() == FRAME_SHOW_MODE_FULL_SCREEN) || (win != targetWin))
{
return ECORE_CALLBACK_PASS_ON;
}
+#endif
+
+ Rectangle winBounds = _CoordinateSystemUtils::InverseTransform(Rectangle(pE->x, pE->y, pE->w, pE->h));
+ Rectangle newBounds(winBounds.x, winBounds.y, winBounds.width, winBounds.height);
+ int rotation = pEcoreEvas->GetWindowRotation(*pFrame);
+ if ((rotation == 270) || (rotation == 90))
+ {
+ newBounds.width = winBounds.height;
+ newBounds.height = winBounds.width;
+ }
+
+ switch (rotation)
+ {
+ case 270:
+ newBounds.x = winBounds.y;
+ newBounds.y = screenSize.width - winBounds.x - newBounds.height;
+ break;
+ case 180:
+ newBounds.x = screenSize.width - winBounds.x - newBounds.width;
+ newBounds.y = screenSize.height - winBounds.y - newBounds.height;
+ break;
+ case 90:
+ newBounds.x = screenSize.height - winBounds.y - newBounds.width;
+ newBounds.y = winBounds.x;
+ break;
+ default:
+ newBounds.x = winBounds.x;
+ newBounds.y = winBounds.y;
+ break;
+ }
+
+ Rectangle prevBounds = pFrame->GetBounds();
+ if (prevBounds != newBounds)
+ {
+ pFrame->SetChangingBoundsEnabled(false);
+ SysLog(NID_UI, "[WM ROTATION]<M>[WIN 0x%x] Frame bounds Updated by WM(%d, %d, %d, %d).", win, newBounds.x, newBounds.y, newBounds.width, newBounds.height);
+ bool isChanged = pFrame->IsChangedPositionByUser();
+ pFrame->SetBounds(newBounds);
+ pFrame->SetChangedPositionByUser(isChanged);
+ pFrame->SetChangingBoundsEnabled(true);
+
+#if defined(PARTIAL_SCREEN)
+ Rectangle frameBounds = pFrame->GetBounds();
+ Rectangle frameClientBounds = pFrame->GetClientBounds();
+ Rectangle frameAbsoluteBounds = pFrame->GetAbsoluteBounds();
+
+ SysLog(NID_UI, "[WM ROTATION]<P>[WIN 0x%x] FRAME bounds(%d %d %d %d) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
+ win, frameBounds.x, frameBounds.y, frameBounds.width, frameBounds.height,
+ frameClientBounds.x, frameClientBounds.y, frameClientBounds.width, frameClientBounds.height,
+ frameAbsoluteBounds.x, frameAbsoluteBounds.y, frameAbsoluteBounds.width, frameAbsoluteBounds.height);
+
+ int formCount = pFrame->GetChildCount();
+ for (int i = 0 ; i < formCount ; i++)
+ {
+ _Control* pForm = pFrame->GetChild(i);
+
+ Rectangle formBounds = pForm->GetBounds();
+ Rectangle formClientBounds = pForm->GetClientBounds();
+ Rectangle formAbsoluteBounds = pForm->GetAbsoluteBounds();
+
+ SysLog(NID_UI, "[WM ROTATION]<P> FORM bounds(%d %d %d %d) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
+ formBounds.x, formBounds.y, formBounds.width, formBounds.height,
+ formClientBounds.x, formClientBounds.y, formClientBounds.width, formClientBounds.height,
+ formAbsoluteBounds.x, formAbsoluteBounds.y, formAbsoluteBounds.width, formAbsoluteBounds.height);
+ }
+#endif
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+Eina_Bool
+OnWindowShown(void* pData, int type, void* pEvent)
+{
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+// For DnD
- frameX = pEv->x;
- frameY = pEv->y;
- frameW = pEv->w;
- frameH = pEv->h;
+int __dndTargetX = 0; // Logical value with rotation
+int __dndTargetY = 0; // Logical value with rotation
+bool __isEnteredTarget = false;
+Eina_Bool OnWindowDragAndDropEntered(void* pData, int type, void* pEvent)
+{
_ControlManager* pControlManager = _ControlManager::GetInstance();
if (!pControlManager)
{
return ECORE_CALLBACK_PASS_ON;
}
- _TouchManager* pTouchManager = _TouchManager::GetInstance();
- if (!pTouchManager)
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ if (!pEcoreEvas)
{
return ECORE_CALLBACK_PASS_ON;
}
- if (pTouchManager->GetPointCount() > 0)
+ _Window* pCurFrame = pControlManager->GetCurrentFrame();
+ if (!pCurFrame)
{
return ECORE_CALLBACK_PASS_ON;
}
- _Window* pWindow = pControlManager->GetCurrentFrame();
- if (!pWindow)
+ Ecore_X_Window win = (Ecore_X_Window)pCurFrame->GetNativeHandle();
+
+ // Tell the acceptable action to the source
+ _RootVisualElement* pRootVE = pCurFrame->GetRootVisualElement();
+ _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer());
+ Evas_Object* pWinObj = pLayer->GetElmWin();
+ Evas_Coord x = 0;
+ Evas_Coord y = 0;
+ Evas_Coord w = 0;
+ Evas_Coord h = 0;
+ evas_object_geometry_get(pWinObj, &x, &y, &w, &h);
+ Ecore_X_Rectangle rect;
+ rect.x = x;
+ rect.y = y;
+ rect.width = w;
+ rect.height = h;
+ ecore_x_dnd_send_status(EINA_TRUE, EINA_TRUE, rect, ECORE_X_ATOM_XDND_DROP);
+
+ // Initiate the supporting action list and type list.
+ // <1> This is supporting the COPY & DROP actions
+ Ecore_X_Atom atoms[] = { ECORE_X_ATOM_XDND_ACTION_COPY, };
+ ecore_x_dnd_actions_set(win, atoms, 1);
+
+ // <2> Type is only support the UTF8_STRING
+ const char* types[] = { ECORE_X_SELECTION_TARGET_UTF8_STRING, };
+ ecore_x_dnd_types_set(win, types, 1);
+
+ __isEnteredTarget = true;
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+Eina_Bool OnWindowDragAndDropPosition(void* pData, int type, void* pEvent)
+{
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ if (!pControlManager)
{
return ECORE_CALLBACK_PASS_ON;
}
- if (pWindow->IsOrientationRoot() == false)
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ if (!pEcoreEvas)
{
return ECORE_CALLBACK_PASS_ON;
}
- _Frame* pFrame = static_cast<_Frame*>(pWindow);
- if (pFrame->GetShowMode() == FRAME_SHOW_MODE_FULL_SCREEN)
+ _Window* pCurFrame = pControlManager->GetCurrentFrame();
+ if (!pCurFrame)
{
return ECORE_CALLBACK_PASS_ON;
}
- Ecore_X_Window win = (Ecore_X_Window)pFrame->GetNativeHandle();
- if (win != targetWin)
+ Ecore_X_Event_Xdnd_Position* pEv = (Ecore_X_Event_Xdnd_Position*)pEvent;
+ if (!pEv)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ Point devicePos = _CoordinateSystemUtils::InverseTransform(Point(pEv->position.x, pEv->position.y));
+ int rotation = pEcoreEvas->GetWindowRotation(*pCurFrame);
+ Dimension screenSize = pControlManager->GetScreenSize();
+
+ Point movePos(0, 0);
+ switch (rotation)
+ {
+ case 270:
+ movePos.x = devicePos.y;
+ movePos.y = screenSize.width - devicePos.x;
+ break;
+ case 180:
+ movePos.x = screenSize.width - devicePos.x;
+ movePos.y = screenSize.height - devicePos.y;
+ break;
+ case 90:
+ movePos.x = screenSize.height - devicePos.y;
+ movePos.y = devicePos.x;
+ break;
+ default:
+ movePos.x = devicePos.x;
+ movePos.y = devicePos.y;
+ break;
+ }
+
+ __dndTargetX = movePos.x;
+ __dndTargetY = movePos.y;
+
+ int pid = pEcoreEvas->GetProcessId(pCurFrame->GetNativeHandle());
+
+ _Control* pNextControl = pControlManager->GetTopmostTouchedControl(movePos, true);
+ if (pNextControl)
+ {
+ _ControlHandle nextHandle = pNextControl->GetHandle();
+
+ if (__isEnteredTarget == true)
+ {
+ SysLog(NID_UI, "[DND][T:%d][0x%x] ENTERED", pid, pNextControl);
+ pNextControl->GetControlDelegate().OnDragAndDropEntered();
+ __isEnteredTarget = false;
+ pEcoreEvas->SetDragAndDropTargetHandle(nextHandle);
+ }
+ else
+ {
+ if (pEcoreEvas->GetDragAndDropTargetHandle() != nextHandle)
+ {
+ _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropTargetHandle());
+ if (pPrevControl)
+ {
+ SysLog(NID_UI, "[DND][T:%d][0x%x] LEFT", pid, pPrevControl);
+ pPrevControl->GetControlDelegate().OnDragAndDropLeft();
+ }
+
+ SysLog(NID_UI, "[DND][T:%d][0x%x] ENTERED", pid, pNextControl);
+ pNextControl->GetControlDelegate().OnDragAndDropEntered();
+ pEcoreEvas->SetDragAndDropTargetHandle(nextHandle);
+ }
+ else
+ {
+ Rectangle absBounds = pNextControl->GetAbsoluteBounds();
+ int x = movePos.x - absBounds.x;
+ int y = movePos.y - absBounds.y;
+ FloatPoint point = _CoordinateSystemUtils::ConvertToFloat(Point(x, y));
+ SysLog(NID_UI, "[DND][T:%d][0x%x] MOVED(%d, %d)", pid, pNextControl, x, y);
+ pNextControl->GetControlDelegate().OnDragAndDropMoved(point);
+ }
+ }
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+Eina_Bool OnWindowDragAndDropLeft(void* pData, int type, void* pEvent)
+{
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ if (!pControlManager)
{
return ECORE_CALLBACK_PASS_ON;
}
return ECORE_CALLBACK_PASS_ON;
}
- Rectangle frameBounds = pFrame->GetBounds();
- int rotation = pEcoreEvas->GetWindowRotation(*pFrame);
+ _Window* pCurFrame = pControlManager->GetCurrentFrame();
+ if (!pCurFrame)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
- Dimension winSize = _CoordinateSystemUtils::InverseTransform(Dimension(pEv->w, pEv->h));
- Dimension newSize(winSize.width, winSize.height);
- if ((rotation == 270) || (rotation == 90))
+ _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropTargetHandle());
+ if (pPrevControl)
{
- newSize.width = winSize.height;
- newSize.height = winSize.width;
+ int pid = pEcoreEvas->GetProcessId(pCurFrame->GetNativeHandle());
+ SysLog(NID_UI, "[DND][T:%d][0x%x] LEFT", pid, pPrevControl);
+ pPrevControl->GetControlDelegate().OnDragAndDropLeft();
}
- if ((frameBounds.width != newSize.width) || (frameBounds.height != newSize.height))
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+Eina_Bool OnWindowDragAndDropSelection(void* pData, int type, void* pEvent)
+{
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ if (!pControlManager)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ if (!pEcoreEvas)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ _Window* pCurFrame = pControlManager->GetCurrentFrame();
+ if (!pCurFrame)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ Ecore_X_Event_Selection_Notify* pEv = (Ecore_X_Event_Selection_Notify*)pEvent;
+ if (!pEv)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ Ecore_X_Selection_Data* pSelection = (Ecore_X_Selection_Data*)pEv->data;
+ if (!pSelection)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ // After the source handles the selection data request,
+ // This callback will be called.
+ // It mean we get the data successfully.
+ if (pSelection)
+ {
+ if (pSelection->length > 0)
+ {
+ Point dropPosition(__dndTargetX, __dndTargetY);
+ _Control* pDropControl = pControlManager->GetTopmostTouchedControl(dropPosition, true);
+ if (pDropControl)
+ {
+ String dropData((char*)pSelection->data);
+ _DragAndDropItem* pDragAndDropItem = _DragAndDropItem::CreateInstanceN(_DRAG_AND_DROP_TYPE_TEXT, dropData);
+ int pid = pEcoreEvas->GetProcessId(pCurFrame->GetNativeHandle());
+ SysLog(NID_UI, "[DND][T:%d][0x%x] DROPPED(%ls)", pid, pDropControl, dropData.GetPointer());
+ pDropControl->GetControlDelegate().OnDragAndDropDropped(*pDragAndDropItem);
+ delete pDragAndDropItem;
+ }
+ }
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+Eina_Bool OnWindowDragAndDropDropped(void* pData, int type, void* pEvent)
+{
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ if (!pControlManager)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ if (!pEcoreEvas)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ _Window* pCurFrame = pControlManager->GetCurrentFrame();
+ if (!pCurFrame)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ Ecore_X_Event_Xdnd_Drop* pEv = (Ecore_X_Event_Xdnd_Drop*)pEvent;
+ if (!pEv)
{
return ECORE_CALLBACK_PASS_ON;
}
+ // Send the selection request to the owner (source)
+ // Then the source will set the requested data to property of my target window.
+ ecore_x_selection_xdnd_request(pEv->win, ECORE_X_SELECTION_TARGET_UTF8_STRING);
+
+ // User made drop action.
+ // So target window can catch the drop action.
+ ecore_x_dnd_send_finished();
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+Eina_Bool OnWindowDragAndDropFinished(void* pData, int type, void* pEvent)
+{
+ // After the target processed all its work,
+ // This callback will be called.
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+Eina_Bool OnWindowDragAndDropStatus(void* pData, int type, void* pEvent)
+{
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+int __dndSourceX = 0; // Logical value with rotation
+int __dndSourceY = 0; // Logical value with rotation
+#if 1 // For sending DnD events to Source.
+bool __isDndBegan = false;
+#else
+bool __isCalledFirst = false;
+#endif
+bool __isOutOfSource = false;
+
+void OnWindowDragAndDropUpdated(void* pData, Ecore_X_Xdnd_Position* pPosition)
+{
+ if (!pPosition)
+ {
+ return;
+ }
+
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ if (!pControlManager)
+ {
+ return;
+ }
+
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ if (!pEcoreEvas)
+ {
+ return;
+ }
+
+ _Window* pCurFrame = pControlManager->GetCurrentFrame();
+ if (!pCurFrame)
+ {
+ return;
+ }
+
+#if 1 // For sending DnD events to Source.
+ if (pEcoreEvas->GetDragAndDropState() == true)
+ {
+ __isDndBegan = true;
+ __isOutOfSource = false;
+ pEcoreEvas->SetDragAndDropState(false);
+ }
+
+ Point devicePos = _CoordinateSystemUtils::InverseTransform(Point(pPosition->position.x, pPosition->position.y));
+ int rotation = pEcoreEvas->GetWindowRotation(*pCurFrame);
Dimension screenSize = pControlManager->GetScreenSize();
- Point winPosition = _CoordinateSystemUtils::InverseTransform(Point(pEv->x, pEv->y));
- Point newPosition(0, 0);
+ Point movePos(0, 0);
switch (rotation)
{
case 270:
- newPosition.x = winPosition.y;
- newPosition.y = screenSize.width - winPosition.x - frameBounds.height;
+ movePos.x = devicePos.y;
+ movePos.y = screenSize.width - devicePos.x;
break;
case 180:
- newPosition.x = screenSize.width - winPosition.x - frameBounds.width;
- newPosition.y = screenSize.height - winPosition.y - frameBounds.height;
+ movePos.x = screenSize.width - devicePos.x;
+ movePos.y = screenSize.height - devicePos.y;
break;
case 90:
- newPosition.x = screenSize.height - winPosition.y - frameBounds.width;
- newPosition.y = winPosition.x;
+ movePos.x = screenSize.height - devicePos.y;
+ movePos.y = devicePos.x;
break;
default:
- newPosition.x = winPosition.x;
- newPosition.y = winPosition.y;
+ movePos.x = devicePos.x;
+ movePos.y = devicePos.y;
break;
}
- if ((frameBounds.x != newPosition.x) || (frameBounds.y != newPosition.y))
- {
- pFrame->SetChangingBoundsEnabled(false);
- pFrame->SetPosition(newPosition);
- pFrame->SetChangingBoundsEnabled(true);
+ __dndSourceX = movePos.x;
+ __dndSourceY = movePos.y;
+
+ int pid = pEcoreEvas->GetProcessId(pCurFrame->GetNativeHandle());
+
+ _Control* pNextControl = pControlManager->GetTopmostTouchedControl(movePos, true);
+ if (pNextControl)
+ {
+ _ControlHandle nextHandle = pNextControl->GetHandle();
+
+ if (__isOutOfSource == true)
+ {
+ SysLog(NID_UI, "[DND][S:%d][0x%x] ENTERED", pid, pNextControl);
+ pNextControl->GetControlDelegate().OnDragAndDropEntered();
+ pEcoreEvas->SetDragAndDropSourceHandle(nextHandle);
+ __isOutOfSource = false;
+
+ return;
+ }
+
+ if (__isDndBegan == true)
+ {
+ SysLog(NID_UI, "[DND][S:%d][0x%x] ENTERED", pid, pNextControl);
+ pNextControl->GetControlDelegate().OnDragAndDropEntered();
+ pEcoreEvas->SetDragAndDropSourceHandle(nextHandle);
+ __isDndBegan = false;
+ }
+ else
+ {
+ if (pEcoreEvas->GetDragAndDropSourceHandle() == nextHandle)
+ {
+ Rectangle absBounds = pNextControl->GetAbsoluteBounds();
+ int x = movePos.x - absBounds.x;
+ int y = movePos.y - absBounds.y;
+ FloatPoint point = _CoordinateSystemUtils::ConvertToFloat(Point(x, y));
+ SysLog(NID_UI, "[DND][S:%d][0x%x] MOVED(%d, %d)", pid, pNextControl, x, y);
+ pNextControl->GetControlDelegate().OnDragAndDropMoved(point);
+ }
+ else
+ {
+ _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropSourceHandle());
+ if (pPrevControl)
+ {
+ SysLog(NID_UI, "[DND][S:%d][0x%x] LEFT", pid, pPrevControl);
+ pPrevControl->GetControlDelegate().OnDragAndDropLeft();
+ }
+
+ SysLog(NID_UI, "[DND][S:%d][0x%x] ENTERED", pid, pNextControl);
+ pNextControl->GetControlDelegate().OnDragAndDropEntered();
+ pEcoreEvas->SetDragAndDropSourceHandle(nextHandle);
+ }
+
+ }
+ }
+ else
+ {
+ if (__isOutOfSource == false)
+ {
+ _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropSourceHandle());
+ if (pPrevControl)
+ {
+ SysLog(NID_UI, "[DND][S:%d][0x%x] LEFT", pid, pPrevControl);
+ pPrevControl->GetControlDelegate().OnDragAndDropLeft();
+ }
+
+ __isOutOfSource = true;
+ }
+ }
+#else
+ if (pEcoreEvas->GetDragAndDropState() == true)
+ {
+ __isCalledFirst = false;
+ __isOutOfSource = false;
+ pEcoreEvas->SetDragAndDropState(false);
+ }
+
+ int pid = pEcoreEvas->GetProcessId(pCurFrame->GetNativeHandle());
+ Point movePos = _CoordinateSystemUtils::InverseTransform(Point(__dndSourceX, __dndSourceY));
+
+ _Control* pNextControl = pControlManager->GetTopmostTouchedControl(movePos, true);
+ if (pNextControl)
+ {
+ _ControlHandle nextHandle = pNextControl->GetHandle();
+
+ if (__isOutOfSource == true)
+ {
+ SysLog(NID_UI, "[DND][S:%d][0x%x] ENTERED", pid, pNextControl);
+ pNextControl->GetControlDelegate().OnDragAndDropEntered();
+
+ pEcoreEvas->SetDragAndDropSourceHandle(nextHandle);
+ __isOutOfSource = false;
+
+ return;
+ }
+
+ __isOutOfSource = false;
+
+ if (pNextControl->IsDragAndDropSource() == true)
+ {
+ if (__isCalledFirst == true)
+ {
+ _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropSourceHandle());
+ if (pPrevControl)
+ {
+ SysLog(NID_UI, "[DND][S:%d][0x%x] LEFT", pid, pPrevControl);
+ pPrevControl->GetControlDelegate().OnDragAndDropLeft();
+ }
+
+ pEcoreEvas->SetDragAndDropSourceHandle(nextHandle);
+ __isCalledFirst = false;
+ }
+ }
+ else
+ {
+ if (__isCalledFirst == false)
+ {
+ SysLog(NID_UI, "[DND][S:%d][0x%x] ENTERED", pid, pNextControl);
+ pNextControl->GetControlDelegate().OnDragAndDropEntered();
+
+ pEcoreEvas->SetDragAndDropSourceHandle(nextHandle);
+ __isCalledFirst = true;
+ }
+ else
+ {
+ if (pEcoreEvas->GetDragAndDropSourceHandle() == nextHandle)
+ {
+ Rectangle absBounds = pNextControl->GetAbsoluteBounds();
+ int x = movePos.x - absBounds.x;
+ int y = movePos.y - absBounds.y;
+ FloatPoint point = _CoordinateSystemUtils::ConvertToFloat(Point(x, y));
+ SysLog(NID_UI, "[DND][S:%d][0x%x] MOVED(%d, %d)", pid, pNextControl, x, y);
+ pNextControl->GetControlDelegate().OnDragAndDropMoved(point);
+ }
+ else
+ {
+ _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropSourceHandle());
+ if (pPrevControl)
+ {
+ SysLog(NID_UI, "[DND][S:%d][0x%x] LEFT", pid, pPrevControl);
+ pPrevControl->GetControlDelegate().OnDragAndDropLeft();
+ }
+
+ SysLog(NID_UI, "[DND][S:%d][0x%x] ENTERED", pid, pNextControl);
+ pNextControl->GetControlDelegate().OnDragAndDropEntered();
+
+ pEcoreEvas->SetDragAndDropSourceHandle(nextHandle);
+ }
+ }
+ }
}
+ else
+ {
+ if (__isOutOfSource == false)
+ {
+ _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropSourceHandle());
+ if (pPrevControl)
+ {
+ SysLog(NID_UI, "[DND][S:%d][0x%x] LEFT", pid, pPrevControl);
+ pPrevControl->GetControlDelegate().OnDragAndDropLeft();
+ }
- return ECORE_CALLBACK_PASS_ON;
-}
-
-Eina_Bool
-OnWindowShown(void* pData, int type, void* pEvent)
-{
- return ECORE_CALLBACK_PASS_ON;
+ __isOutOfSource = true;
+ }
+ }
+#endif
}
Eina_Bool
SysLog(NID_UI, "Accessibility action : value increased");
_AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_VALUE_INCREASED);
}
- else if ((unsigned int)pClientEvent->data.l[1] == ecore_x_atom_get("_E_MOD_SCREEN_READER_ACTION_SCROLL_"))
+ else if ((unsigned int)pClientEvent->data.l[1] == ELM_ACCESS_ACTION_UNHIGHLIGHT)
{
- SysLog(NID_UI, "Accessibility action : scroll %d, %d, %d", pClientEvent->data.l[2], pClientEvent->data.l[3], pClientEvent->data.l[4]);
- x = (Evas_Coord)pClientEvent->data.l[3];
- y = (Evas_Coord)pClientEvent->data.l[4];
- if (pClientEvent->data.l[2] == 0)
- {
- _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_STARTED, x, y);
- }
- else if (pClientEvent->data.l[2] == 1)
- {
- _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_CHANGED, x, y);
- }
- else if (pClientEvent->data.l[2] == 2)
- {
- _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_FINISHED, x, y);
- }
+ SysLog(NID_UI, "Accessibility action : ELM_ACCESS_ACTION_UNHIGHLIGHT");
+ _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_UNHIGHLIGHT);
+ }
+ else if ((unsigned int)pClientEvent->data.l[1] == ELM_ACCESS_ACTION_HIGHLIGHT_PREV)
+ {
+ SysLog(NID_UI, "Accessibility action : ELM_ACCESS_ACTION_HIGHLIGHT_PREV");
+ return _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_HIGHLIGHT_PREV);
+ }
+ else if ((unsigned int)pClientEvent->data.l[1] == ELM_ACCESS_ACTION_HIGHLIGHT_NEXT)
+ {
+ SysLog(NID_UI, "Accessibility action : ELM_ACCESS_ACTION_HIGHLIGHT_NEXT");
+ return _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_HIGHLIGHT_NEXT);
}
else if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_SCROLL)
{
return ECORE_CALLBACK_RENEW;
}
+void
+OnDestroyingWindowRequested(void* pData, Evas_Object* pObj, void* pEventInfo)
+{
+ SysLog(NID_UI, "[WM ROTATION]<M> OnDestroyingWindowRequested is called.");
+
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ if (!pControlManager)
+ {
+ return;
+ }
+
+ App* pApp = App::GetInstance();
+ if (pApp)
+ {
+ SysLog(NID_UI, "[WM ROTATION]<M> Terminate App.");
+ pApp->Terminate();
+ }
+ else
+ {
+ SysLog(NID_UI, "[WM ROTATION]<M> pApp is null.");
+ }
+}
+
} // Anonymous
// For Clipboard
Eina_Bool ConvertClipIntoEdje(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize);
Eina_Bool ConvertClipIntoUri(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize);
Eina_Bool ConvertClipIntoImage(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize);
-Eina_Bool ConvertClipIntoVCard(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize);
int NotifyTarget(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify);
int NotifyText(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify);
return EINA_TRUE;
}
-Eina_Bool
-ConvertClipIntoVCard(char* pTarget __UNUSED__, void* pData, int size __UNUSED__, void** outData __UNUSED__, int* outSize __UNUSED__, Ecore_X_Atom* pType __UNUSED__, int* pTypeSize __UNUSED__)
-{
- return EINA_TRUE;
-}
-
int
RequestClip(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify)
{
, __pFrame(null)
, __changeBounds(true)
, __openClipboard(false)
+ , __pDragAndDropEnter(null)
+ , __pDragAndDropPosition(null)
+ , __pDragAndDropLeave(null)
+ , __pDragAndDropDrop(null)
+ , __pDragAndDropSelection(null)
+ , __pDragAndDropFinish(null)
+ , __pDragAndDropStatus(null)
+ , __dropData(L"")
+ , __dragAndDropState(false)
{
int ret = appcore_unset_rotation_cb();
SysLog(NID_UI, "[WM ROTATION] appcore_unset_rotation_cb = %d", ret);
__pWindowPropertyChanged = null;
}
+ if (__pDragAndDropEnter)
+ {
+ ecore_event_handler_del(__pDragAndDropEnter);
+ __pDragAndDropEnter = null;
+ }
+
+ if (__pDragAndDropPosition)
+ {
+ ecore_event_handler_del(__pDragAndDropPosition);
+ __pDragAndDropPosition = null;
+ }
+
+ if (__pDragAndDropLeave)
+ {
+ ecore_event_handler_del(__pDragAndDropLeave);
+ __pDragAndDropLeave = null;
+ }
+
+ if (__pDragAndDropDrop)
+ {
+ ecore_event_handler_del(__pDragAndDropDrop);
+ __pDragAndDropDrop = null;
+ }
+
+ if (__pDragAndDropSelection)
+ {
+ ecore_event_handler_del(__pDragAndDropSelection);
+ __pDragAndDropSelection = null;
+ }
+
+ if (__pDragAndDropFinish)
+ {
+ ecore_event_handler_del(__pDragAndDropFinish);
+ __pDragAndDropFinish = null;
+ }
+
+ if (__pDragAndDropStatus)
+ {
+ ecore_event_handler_del(__pDragAndDropStatus);
+ __pDragAndDropStatus = null;
+ }
+
//runtime_info_unset_changed_cb(RUNTIME_INFO_KEY_ROTATION_LOCK_ENABLED);
}
rotatePartial = false;
}
}
- else
- {
- if (orientation != 0) //(orientation == 90 || orientation == 270 )
- {
- //WARNNING: It's for the issue that popup window does not mapped.
- // when orientation
- pLayer->SetOrientationChanged();
- }
- }
_Window* pWindow = const_cast<_Window*>(&window);
if (pWindow->IsLayoutChangable() == true)
{
ecore_evas_rotation_with_resize_set(pEcoreEvas, orientation);
+ pLayer->SetOrientationChanged(orientation);
+
if ((orientation == 0) || (orientation == 180))
{
- pLayer->SetBounds(FloatRectangle(0, 0, rootW, rootH));
+ if (pWindow->IsOrientationRoot())
+ {
+ pLayer->SetSize(FloatDimension(rootW, rootH));
+ }
+ else
+ {
+ pLayer->SetBounds(FloatRectangle(0, 0, rootW, rootH));
+ }
}
else
{
- pLayer->SetBounds(FloatRectangle(0, 0, rootH, rootW));
+ if (pWindow->IsOrientationRoot())
+ {
+ pLayer->SetSize(FloatDimension(rootH, rootW));
+ }
+ else
+ {
+ pLayer->SetBounds(FloatRectangle(0, 0, rootH, rootW));
+ }
}
SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, FULL SCREEN] Rotate bounds(ROT %d).", win, orientation);
if (rotateEvas == true)
{
ecore_evas_rotation_set(pEcoreEvas, orientation);
+
+ pLayer->SetOrientationChanged(orientation);
}
Rectangle winBounds = _CoordinateSystemUtils::Transform(window.GetBounds());
int w = 0;
int h = 0;
Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
-
-
if (ret == EINA_FALSE)
{
- pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height));
- SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, PARTIAL SCREEN] Rotate bounds(ROT %d, %d, %d, %d, %d).", win, orientation, winX, winY, winBounds.width, winBounds.height);
+ if (pWindow->IsOrientationRoot() && (pWindow->IsChangedPositionByUser() == false))
+ {
+ pLayer->SetSize(FloatDimension(winBounds.width, winBounds.height));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, PARTIAL SCREEN] Rotate bounds(ROT %d, %d, %d) ONLY RESIZE.", win, orientation, winBounds.width, winBounds.height);
+ }
+ else
+ {
+ pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, PARTIAL SCREEN] Rotate bounds(ROT %d, %d, %d, %d, %d).", win, orientation, winX, winY, winBounds.width, winBounds.height);
+ }
}
else
{
- pLayer->SetBounds(FloatRectangle(winX, winY, w, h));
+ pLayer->SetPosition(FloatPoint(winX, winY));
SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, PARTIAL SCREEN] Rotate bounds(ROT %d, %d, %d) ONLY MOVE.", win, orientation, winX, winY);
}
}
result
_EcoreEvas::SetIndicatorShowState(const _Window& window, bool showState)
{
+ // For indicator active window
+ if (window.IsLayoutChangable() == true)
+ {
+ _Window* pWindow = _ControlManager::GetInstance()->GetCurrentFrame();
+ if (pWindow)
+ {
+ _Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
+ if (pFrame)
+ {
+ FrameShowMode showMode = pFrame->GetShowMode(false);
+ if (showMode != FRAME_SHOW_MODE_FULL_SCREEN)
+ {
+ SysLog(NID_UI, "[WM ROTATION]<M>");
+ return E_SUCCESS;
+ }
+ }
+ }
+ }
+
_EflLayer* pLayer = GetEflLayer(window);
SysTryReturn(NID_UI, pLayer, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer.");
Evas_Object* pWinObj = pLayer->GetElmWin();
SysTryReturnVoidResult(NID_UI, pWinObj, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas();
+ SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
const char* windowName = _StringConverter::CopyToCharArrayN(name);
if (windowName)
{
- elm_win_title_set(pWinObj, windowName);
+ // For indicator active window
+ bool changeName = false;
+ if (window.IsLayoutChangable() == true)
+ {
+ _Keypad* pKeypad = dynamic_cast<_Keypad*>(&const_cast<_Window&>(window));
+ if (pKeypad == null)
+ {
+ changeName = true;
+ }
+ }
+
+ if (changeName == true)
+ {
+ SysLog(NID_UI, "[WM ROTATION]<M>");
+// ecore_evas_name_class_set(pEcoreEvas, "APP_SELECTOR", "APP_SELECTOR");
+ elm_win_title_set(pWinObj, "APP_POPUP");
+ ecore_evas_name_class_set(pEcoreEvas, "APP_POPUP", "APP_POPUP");
+ }
+ else
+ {
+ elm_win_title_set(pWinObj, windowName);
+ ecore_evas_name_class_set(pEcoreEvas, windowName, windowName);
+ }
delete[] windowName;
}
}
}
+Rectangle
+_EcoreEvas::GetWindowBounds(const _Window& window) const
+{
+ _EflLayer* pLayer = GetEflLayer(window);
+ SysTryReturn(NID_UI, pLayer, Rectangle(0, 0, 0, 0), E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer.");
+
+ Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas();
+ SysTryReturn(NID_UI, pEcoreEvas, Rectangle(0, 0, 0, 0), E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+ int x = 0;
+ int y = 0;
+ int w = 0;
+ int h = 0;
+ ecore_evas_geometry_get(pEcoreEvas, &x, &y, &w, &h);
+
+ Rectangle bounds = _CoordinateSystemUtils::InverseTransform(Rectangle(x, y, w, h));
+ Dimension screenSize = _ControlManager::GetInstance()->GetScreenSize();
+ Rectangle winBounds(0, 0, bounds.width, bounds.height);
+
+ int rotation = ecore_evas_rotation_get(pEcoreEvas);
+ switch (rotation)
+ {
+ case 270:
+ winBounds.x = bounds.y;
+ winBounds.y = screenSize.width - bounds.x - winBounds.height;
+ break;
+ case 180:
+ winBounds.x = screenSize.width - bounds.x - winBounds.width;
+ winBounds.y = screenSize.height - bounds.y - winBounds.height;
+ break;
+ case 90:
+ winBounds.x = screenSize.height - bounds.y - winBounds.width;
+ winBounds.y = bounds.x;
+ break;
+ default:
+ winBounds.x = bounds.x;
+ winBounds.y = bounds.y;
+ break;
+ }
+
+ return winBounds;
+}
+
+void
+_EcoreEvas::SetPartialScreenEnabled(const _Window& window)
+{
+ _EflLayer* pLayer = GetEflLayer(window);
+ SysTryReturnVoidResult(NID_UI, pLayer, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer.");
+
+ Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas();
+ SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+ Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas);
+ SysLog(NID_UI, "[WM ROTATION]<P>[WIN 0x%x] Enable PARTIAL SCREEN", win);
+ Ecore_X_Atom atomLayout = ecore_x_atom_get("_E_ATOM_WINDOW_DESKTOP_LAYOUT_SUPPORTED");
+ unsigned int val = 1;
+ ecore_x_window_prop_card32_set(win, atomLayout, &val, 1);
+}
+
// [ToDo] Remove API
void
_EcoreEvas::SetQuickPanelScrollEnabled(const _Window& window, bool enable)
}
void
-_EcoreEvas::SetWindowBounds(const _Window& window, const Rectangle& bounds)
+_EcoreEvas::SetWindowBounds(const _Window& window, const Rectangle& bounds, bool resizeOnly)
{
if (__changeBounds == false)
{
int h = 0;
Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
-
if (ret == EINA_FALSE)
{
- pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height));
- SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
+ if (resizeOnly == true)
+ {
+ pLayer->SetSize(FloatDimension(winBounds.width, winBounds.height));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d) ONLY RESIZE.", win, rotate, winBounds.width, winBounds.height);
+ }
+ else
+ {
+ pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
+ }
}
else
{
- pLayer->SetBounds(FloatRectangle(winX, winY, w, h));
- SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY, w, h);
+ pLayer->SetPosition(FloatPoint(winX, winY));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY);
}
SetLastResult(E_SUCCESS);
}
void
-_EcoreEvas::SetWindowBounds(const _Window& window, const FloatRectangle& bounds)
+_EcoreEvas::SetWindowBounds(const _Window& window, const FloatRectangle& bounds, bool resizeOnly)
{
if (__changeBounds == false)
{
int h = 0;
Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
-
if (ret == EINA_FALSE)
{
- pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height));
- SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
+ if (resizeOnly == true)
+ {
+ pLayer->SetSize(FloatDimension(winBounds.width, winBounds.height));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d) ONLY RESIZE.", win, rotate, winBounds.width, winBounds.height);
+ }
+ else
+ {
+ pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
+ }
}
else
{
- pLayer->SetBounds(FloatRectangle(winX, winY, w, h));
- SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY, w, h);
+ pLayer->SetPosition(FloatPoint(winX, winY));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY);
}
SetLastResult(E_SUCCESS);
}
ecore_evas_callback_state_change_set(pLayer->GetEcoreEvas(), OnWindowStateChanged);
+
+ if (window.IsOrientationRoot())
+ {
+ Evas_Object* pWinObject = pLayer->GetElmWin();
+ if (pWinObject)
+ {
+ SysLog(NID_UI, "[WM ROTATION]<M> Register OnDestroyingWindowRequested callback.");
+ evas_object_smart_callback_add(pWinObject, "delete,request", OnDestroyingWindowRequested, NULL);
+ }
+ }
}
void
return acc;
}
-void* _GetEcoreEvasHandle(void)
+void
+_EcoreEvas::SetDragAndDropEnabled(const _Window& window)
{
- _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr();
- if (pEcoreEvasMgr == null)
- {
- return null;
- }
+ _EflLayer* pLayer = GetEflLayer(window);
+ SysTryReturnVoidResult(NID_UI, pLayer, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer.");
- _EcoreEvas* pUiEcoreEvas = pEcoreEvasMgr->GetEcoreEvas();
- if (pUiEcoreEvas == null)
- {
- return null;
+ Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas();
+ SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+ Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas);
+ SysLog(NID_UI, "[DND] 0x%x, aware_set(TRUE)", win);
+ ecore_x_dnd_aware_set(win, EINA_TRUE);
+
+ if (!__pDragAndDropEnter)
+ {
+ // Register dnd handlers.
+ SysLog(NID_UI, "[DND] add handlers");
+ // For Target
+ __pDragAndDropEnter = ecore_event_handler_add(ECORE_X_EVENT_XDND_ENTER, OnWindowDragAndDropEntered, NULL);
+ __pDragAndDropPosition = ecore_event_handler_add(ECORE_X_EVENT_XDND_POSITION, OnWindowDragAndDropPosition, NULL);
+ __pDragAndDropLeave = ecore_event_handler_add(ECORE_X_EVENT_XDND_LEAVE, OnWindowDragAndDropLeft, NULL);
+ __pDragAndDropDrop = ecore_event_handler_add(ECORE_X_EVENT_XDND_DROP, OnWindowDragAndDropDropped, NULL);
+ __pDragAndDropSelection = ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, OnWindowDragAndDropSelection, NULL);
+ // For Source
+ __pDragAndDropFinish = ecore_event_handler_add(ECORE_X_EVENT_XDND_FINISHED, OnWindowDragAndDropFinished, NULL);
+ __pDragAndDropStatus = ecore_event_handler_add(ECORE_X_EVENT_XDND_STATUS, OnWindowDragAndDropStatus, NULL);
+ ecore_x_dnd_callback_pos_update_set(OnWindowDragAndDropUpdated, NULL);
}
+}
+
+result
+_EcoreEvas::DragAndDropBegin(const _Window& window, const String& string)
+{
+ Ecore_X_Window win = (Ecore_X_Window)window.GetNativeHandle();
+ unique_ptr<char[]> pChar(_StringConverter::CopyToCharArrayN(string));
+ __dropData = string;
+
+ Eina_Bool ret = ecore_x_dnd_begin(win, (unsigned char*)pChar.get(), strlen(pChar.get()) + 1);
+ SysTryReturn(NID_UI, ret == EINA_TRUE, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
- return (void*)pUiEcoreEvas->GetEcoreEvas();
+ ecore_x_dnd_type_set(win, ECORE_X_SELECTION_TARGET_UTF8_STRING, EINA_TRUE);
+ ecore_x_dnd_source_action_set(ECORE_X_ATOM_XDND_ACTION_COPY);
+
+ return E_SUCCESS;
}
-void* _GetEvasHandle(void)
+result
+_EcoreEvas::DragAndDropDrop(const _Window& window)
{
- _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr();
- if (pEcoreEvasMgr == null)
- {
- return null;
- }
+ Ecore_X_Window win = (Ecore_X_Window)window.GetNativeHandle();
- _EcoreEvas* pUiEcoreEvas = pEcoreEvasMgr->GetEcoreEvas();
- if (pUiEcoreEvas == null)
- {
- return null;
- }
+ int ret = ecore_x_dnd_drop();
+ SysTryReturn(NID_UI, ret, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+ ecore_x_dnd_type_set(win, ECORE_X_SELECTION_TARGET_UTF8_STRING, EINA_FALSE);
+
+ return E_SUCCESS;
+}
+
+Point
+_EcoreEvas::GetDropPosition(void)
+{
+ return Point(__dndSourceX, __dndSourceY);
+}
+
+String
+_EcoreEvas::GetDropData(void)
+{
+ return __dropData;
+}
+
+void
+_EcoreEvas::SetDragAndDropState(bool state)
+{
+ __dragAndDropState = state;
+}
+
+bool
+_EcoreEvas::GetDragAndDropState(void) const
+{
+ return __dragAndDropState;
+}
+
+void
+_EcoreEvas::SetDragAndDropSourceHandle(_ControlHandle handle)
+{
+ __dragAndDropSourceHandle = handle;
+}
+
+_ControlHandle
+_EcoreEvas::GetDragAndDropSourceHandle(void) const
+{
+ return __dragAndDropSourceHandle;
+}
+
+void
+_EcoreEvas::SetDragAndDropTargetHandle(_ControlHandle handle)
+{
+ __dragAndDropTargetHandle = handle;
+}
- return (void*)pUiEcoreEvas->GetEvas();
+_ControlHandle
+_EcoreEvas::GetDragAndDropTargetHandle(void) const
+{
+ return __dragAndDropTargetHandle;
}
result
}} // Tizen::Ui
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-// [ToDo] Remove API
-_OSP_EXPORT_ unsigned int
-_GetActiveWindow(void)
-{
- return GetEcoreEvasMgr()->GetEcoreEvas()->GetActiveWindow();
-}
-
-// [ToDo] Remove API
-_OSP_EXPORT_ int
-_GetProcessId(unsigned int window)
-{
- return GetEcoreEvasMgr()->GetEcoreEvas()->GetProcessId(window);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
#ifdef KEY_CAMERA
#undef KEY_CAMERA
#endif
-#if defined KEY_BACK
+#ifdef KEY_BACK
#undef KEY_BACK
#endif
-#if defined KEY_HOME
+#ifdef KEY_HOME
#undef KEY_HOME
#endif
-#if defined KEY_MAIL
+#ifdef KEY_MAIL
#undef KEY_MAIL
#endif
-#if defined KEY_MUTE
+#ifdef KEY_MUTE
#undef KEY_MUTE
#endif
-#if defined KEY_APPS
+#ifdef KEY_APPS
#undef KEY_APPS
#endif
-#if defined KEY_MENU
+#ifdef KEY_MENU
#undef KEY_MENU
#endif
-#if defined KEY_SEARCH
+#ifdef KEY_SEARCH
#undef KEY_SEARCH
#endif
-#if defined KEY_VOICE
+#ifdef KEY_VOICE
#undef KEY_VOICE
#endif
+#include <list>
#include <X11/Xlib.h>
#include <Evas.h>
#include <FBaseColIEnumeratorT.h>
{
#define __UNUSED__
-Ecore_X_Atom keyboardExist = 0;
-const wchar_t* KEYBOARD_INSERTED_EVENT = L"KEYBOARD_INSERTED";
-const int DEVICE_COUNT = 999;
-bool touchPressed[DEVICE_COUNT] = {false,};
-bool evasTouchPressed = false;
+int __touchTailCount = 0;
const int KEY_COUNT = 300;
-bool keyPressed[KEY_COUNT] = {false,};
+const int DEVICE_COUNT = 999;
+const wchar_t* KEYBOARD_INSERTED_EVENT = L"KEYBOARD_INSERTED";
+bool __keyPressed[KEY_COUNT] = {false,};
+bool __touchPressed[DEVICE_COUNT] = {false,};
+Ecore_X_Atom __keyboardExist = 0;
+Ecore_Timer* __pVSyncTimer = null;
+
+struct RawTouchInfo{
+ unsigned int window;
+ int x;
+ int y;
+ int type;
+ int buttons;
+ int device;
+ unsigned int timeStamp;
+};
+std::list<RawTouchInfo>* __pRawTouchInfoList = null;
+
+bool QueueTouchPressEvent(void* pEventInfo);
+bool QueueTouchReleaseEvent(void* pEventInfo);
+bool QueueTouchMoveEvent(void* pEventInfo);
+bool DequeueTouchPressEvent(unsigned int& window, int& x, int& y, int& device, unsigned int& timeStamp, int& buttons, int& type);
+
+Eina_Bool OnTouchPressedReal(Ecore_Event_Mouse_Button* pEventInfo);
+Eina_Bool OnTouchReleasedReal(Ecore_Event_Mouse_Button* pEventInfo);
+Eina_Bool OnTouchMovedReal(Ecore_Event_Mouse_Move* pEventInfo);
+Eina_Bool TouchEventHandlerVSync(void* pData);
Evas_Object*
GetEvasObject(const _Control& control)
return (Evas_Object*)pEflNode->GetGroupContainer();
}
+/*
Evas*
GetEvas(const _Control& control)
{
return pEvas;
}
+*/
class _Event
{
if (__pInstance == null)
{
__pInstance = new (std::nothrow) _TouchEventManager;
- SysTryReturn(NID_UI, __pInstance, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturn(NID_UI, __pInstance, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
}
SetLastResult(E_SUCCESS);
if (exist)
{
r = __pTargetMap->Remove(pointId);
- SysTryReturnResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ SysTryReturnResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "A system error occurred.");
}
r = __pTargetMap->Add(pointId, controlHandle);
- SysTryReturnResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ SysTryReturnResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "A system error occurred.");
return r;
}
{
result r = E_SUCCESS;
unique_ptr<HashMapT<int, _ControlHandle> > pTargetMap(new (std::nothrow) HashMapT<int, _ControlHandle>);
- SysTryReturnVoidResult(NID_UI, pTargetMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pTargetMap, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pTargetMap->Construct();
SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
: public _Event
{
public:
- _TouchEvent(int deviceId, _TouchStatus status, int x, int y, unsigned int timeStamp, const _Control* pRootControl)
+ _TouchEvent(int deviceId, _TouchStatus status, int x, int y, unsigned int timeStamp, const _Control* pRootControl, int z = 0, unsigned int buttons = _TOUCH_BUTTON_NONE)
: __pTouchEventManager(null)
{
__pTouchEventManager = _TouchEventManager::GetInstance();
if (status == _TOUCH_PRESSED)
{
IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN();
- SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
const int count = pFingerInfoList->GetCount();
current = _CoordinateSystemUtils::InverseTransform(current);
}
- __touchInfo.SetTouchInfo(pointId, status, current, false, timeStamp);
+ __touchInfo.SetTouchInfo(pointId, status, current, false, timeStamp, z, buttons);
if (status == _TOUCH_PRESSED)
{
- _Control* pControl = GetTarget(current.x, current.y, pRootControl);
+ pTouchManager->SetListenerOnly(pointId, false);
+ _Control* pControl = GetTarget(current.x, current.y, pRootControl, pointId);
if (pControl == null)
{
_TouchEvent(const _TouchEvent& rhs);
_TouchEvent& operator =(const _TouchEvent& rhs);
- _Control* GetTarget(int x, int y, const _Control* pRootControl) const
+ _Control* GetTarget(int x, int y, const _Control* pRootControl, int pointId) const
{
ClearLastResult();
_TouchManager* pTouchManager = _TouchManager::GetInstance();
SysTryReturn(NID_UI, pTouchManager, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
- _Control* pCapturedControl = pTouchManager->GetCapturedControl();
- _Control* pControl = null;
-
_ControlManager* pControlManager = _ControlManager::GetInstance();
SysTryReturn(NID_UI, pControlManager, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ _Control* pControl = null;
+
Tizen::Graphics::FloatPoint ptf(static_cast<float>(x), static_cast<float>(y));
- _ControlVisualElement* pRootControlElement = null;
if (pRootControl)
{
- pRootControlElement = dynamic_cast<_ControlVisualElement*>(pRootControl->GetVisualElement());
+ _ControlVisualElement* pRootControlElement = dynamic_cast<_ControlVisualElement*>(pRootControl->GetVisualElement());
+ if (pRootControlElement == null)
+ {
+ SetLastResult(E_SYSTEM);
+ return null;
+ }
+
+ _ControlVisualElement* pControlVisualElement = pRootControlElement->GetControlChildAtPoint(ptf);
+ if (pControlVisualElement)
+ {
+ pControl = static_cast <_Control*>(pControlVisualElement->GetUserData());
+ }
}
else
{
- _Window* pWindow = null;
- pWindow = pControlManager->GetTouchedWindow();
- if (pWindow == null)
+ _Window* pTouchedWindow = pControlManager->GetTouchedWindow();
+ if (pTouchedWindow == null)
{
SetLastResult(E_SYSTEM);
return null;
}
- Rectangle winBounds = pWindow->GetBounds();
+ _RootVisualElement* pRootVisualElement = pTouchedWindow->GetRootVisualElement();
+ if (pRootVisualElement == null)
+ {
+ SetLastResult(E_SYSTEM);
+ return null;
+ }
- ptf.x = static_cast<float>(x - winBounds.x);
- ptf.y = static_cast<float>(y - winBounds.y);
+ Tizen::Graphics::Rectangle touchedWindowBounds = pTouchedWindow->GetBounds();
+ /*ptf.x = static_cast<float>(x - touchedWindowBounds.x);
+ ptf.y = static_cast<float>(y - touchedWindowBounds.y);*/
- pRootControlElement = dynamic_cast <_ControlVisualElement*>(pWindow->GetVisualElement());
- }
+ Tizen::Base::Collection::IList* pList = pRootVisualElement->GetChildrenN();
+ if (!pList)
+ {
+ SetLastResult(E_SYSTEM);
+ return null;
+ }
- if (pRootControlElement == null)
- {
- SetLastResult(E_SYSTEM);
- return null;
- }
+ int count = pList->GetCount();
+ for (int i = count-1; i>=0; i--)
+ {
+ _ControlVisualElement* pChildControlVisualElement = dynamic_cast<_ControlVisualElement*>(pList->GetAt(i));
+ if (pChildControlVisualElement)
+ {
+ _Control* pChildControl = static_cast<_Control*>(pChildControlVisualElement->GetUserData());
+ if (pChildControl == null)
+ {
+ continue;
+ }
- _ControlVisualElement* pControlVisualElement = pRootControlElement->GetControlChildAtPoint(ptf);
- if (pControlVisualElement == null)
- {
- SetLastResult(E_SYSTEM);
- return null;
- }
+ _Window* pChildWindow = dynamic_cast<_Window*>(pChildControl);
+ if (pChildWindow == null)
+ {
+ continue;
+ }
- pControl = static_cast <_Control*>(pControlVisualElement->GetUserData());
- if (pControl == null)
- {
- SetLastResult(E_SYSTEM);
- return null;
+ Tizen::Graphics::FloatPoint tempPoint(ptf);
+
+ if (pChildWindow && pChildWindow->GetWindowType() == _WINDOW_TYPE_VE)
+ {
+ Tizen::Graphics::Rectangle windowBounds = pChildWindow->GetBounds();
+ tempPoint.x = static_cast<float>(tempPoint.x - windowBounds.x);
+ tempPoint.y = static_cast<float>(tempPoint.y - windowBounds.y);
+ }
+ else
+ {
+ tempPoint.x = static_cast<float>(tempPoint.x - touchedWindowBounds.x);
+ tempPoint.y = static_cast<float>(tempPoint.y - touchedWindowBounds.y);
+ }
+
+ _ControlVisualElement* pControlVisualElement = pChildControlVisualElement->GetControlChildAtPoint(tempPoint);
+ if (pControlVisualElement)
+ {
+ pControl = static_cast <_Control*>(pControlVisualElement->GetUserData());
+ if (pControl == null)
+ {
+ pControl = dynamic_cast<_Control*>(pTouchedWindow);
+ pTouchManager->SetListenerOnly(pointId, true);
+ }
+ break;
+ }
+ }
+ }
+ delete pList;
}
+ _Control* pCapturedControl = pTouchManager->GetCapturedControl();
if (pCapturedControl)
{
if (pTouchManager->IsCaptureAllowedOwnerBounds())
_TouchEventManager* __pTouchEventManager;
}; // _TouchEvent
-class _MouseEvent
- : public _Event
+Eina_Bool
+OnNotified(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
{
-public:
- _MouseEvent(int deviceId, _TouchStatus status, int x, int y, int z, unsigned int buttons, unsigned int timeStamp, const _Control* pRootControl)
- : __pTouchEventManager(null)
+ if (pEventInfo)
{
- __pTouchEventManager = _TouchEventManager::GetInstance();
- SysTryReturnVoidResult(NID_UI, __pTouchEventManager, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
- result r = E_SUCCESS;
- Tizen::Graphics::Point current(x, y);
+ _UiEvent* pUiEvent = static_cast <_UiEvent*>(pEventInfo);
+ SysTryReturn(NID_UI, pUiEvent, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- _TouchManager* pTouchManager = _TouchManager::GetInstance();
- SysTryReturnVoidResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ _UiEventManager* pEventManager = _UiEventManager::GetInstance();
+ SysTryReturn(NID_UI, pEventManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
- unsigned int pointId = 0;
+ result r = pEventManager->SendEvent(*pUiEvent);
+ SysTryReturn(NID_UI, r == E_SUCCESS, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ }
- if (status == _TOUCH_PRESSED)
- {
- IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN();
- SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SetLastResult(E_SUCCESS);
- const int count = pFingerInfoList->GetCount();
+ return ECORE_CALLBACK_PASS_ON;
+}
- for (int i = 0; i < count; i++)
- {
- _FingerInfo* pFingerInfo = null;
- pFingerInfoList->GetAt(i, pFingerInfo);
- if (pFingerInfo == null)
- {
- continue;
- }
+void
+FreeEvent(void* pData __UNUSED__, void* pEventInfo)
+{
+ _UiEvent* pUiEvent = static_cast <_UiEvent*>(pEventInfo);
+ if (pUiEvent)
+ {
+ delete pUiEvent;
+ }
+}
- if (static_cast<int>(pFingerInfo->GetDeviceId()) == deviceId && pFingerInfo->GetStatus() == _TOUCH_PRESSED)
- {
- pTouchManager->ResetTouchInfo();
- SysSecureLog(NID_UI, "ResetTouchInfo x(%d), y(%d), deviceID(%d), pointID(%d)", current.x, current.y, deviceId, pFingerInfo->GetPointId());
- break;
- }
- }
- delete pFingerInfoList;
+Eina_Bool
+OnKeyPressed(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
+{
+ Ecore_Event_Key* pEv = static_cast <Ecore_Event_Key*>(pEventInfo);
+ SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- pointId = pTouchManager->GeneratePointId(deviceId);
- }
- else
- {
- pointId = pTouchManager->GetPointId(deviceId);
- }
+ _KeyEvent event(KEY_PRESSED, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers), pEv);
+ result r = GetLastResult();
+ if (r != E_SUCCESS)
+ {
+ SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r));
+ return ECORE_CALLBACK_PASS_ON;
+ }
+ SysSecureLog(NID_UI, "KeyName = %s, KeyCode = %d, KeyModifier = %x", pEv->keyname, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers));
+ event.Send();
- if (pointId == INVALID_POINT_ID)
- {
- if (status == _TOUCH_RELEASED)
- {
- _ControlManager* pControlManager = _ControlManager::GetInstance();
- SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ __keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] = true;
- _Window* pWindow = pControlManager->GetTouchedWindow();
- if (pWindow == null)
- {
- _TouchManager* pTouchManager = _TouchManager::GetInstance();
- if (pTouchManager)
- {
- pTouchManager->ResetTouchInfo();
- SysLog(NID_UI, "pWindow is null, ResetTouchInfo");
- }
- }
- }
- SetLastResult(E_INVALID_CONDITION);
- return;
- }
+ SetLastResult(E_SUCCESS);
- if (!pRootControl)
- {
- r = GetPosition(status, x, y, current);
- SysTryReturnVoidResult(NID_UI, r != E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] A system error occurred.");
- SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
- }
- else
- {
- current = _CoordinateSystemUtils::InverseTransform(current);
- }
+ return ECORE_CALLBACK_PASS_ON;
+}
- __mouseInfo.SetTouchInfo(pointId, status, current, z, buttons, false, timeStamp);
+Eina_Bool
+OnKeyReleased(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
+{
+ Ecore_Event_Key* pEv = static_cast <Ecore_Event_Key*>(pEventInfo);
+ SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- if (status == _TOUCH_PRESSED)
- {
- _Control* pControl = GetTarget(current.x, current.y, pRootControl);
+ if (__keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] != true)
+ {
+ SysLog(NID_UI, "KeyCode %s is not pressed", pEv->keyname);
+ return ECORE_CALLBACK_PASS_ON;
+ }
- if (pControl == null)
- {
- pTouchManager->ResetTouchInfo();
- SysSecureLog(NID_UI, "ResetTouchInfo x(%d), y(%d), deviceID(%d), pointID(%d)", current.x, current.y, deviceId, pointId);
- SysTryReturnVoidResult(NID_UI, false, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
- }
- else
- {
- r = __pTouchEventManager->AddControl(pointId, pControl->GetHandle());
- SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
- }
- }
- else
- {
- _Control* pControl = pTouchManager->GetChangedTouchableTarget();
- if (pControl == null)
- {
- ClearLastResult();
- }
- else
- {
- if (pControl->GetChangingEventTarget() == true && pControl->GetVisibleState() == true)
- {
- r = __pTouchEventManager->AddControl(pointId, pControl->GetHandle());
- SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
- }
- }
- }
+ _KeyEvent event(KEY_RELEASED, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers), pEv);
+ result r = GetLastResult();
+ if (r != E_SUCCESS)
+ {
+ SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r));
+ return ECORE_CALLBACK_PASS_ON;
}
+ SysSecureLog(NID_UI, "KeyName = %s, KeyCode = %d, KeyModifier = %x", pEv->keyname, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers));
+ event.Send();
+
+ __keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] = false;
+
+ SetLastResult(E_SUCCESS);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+Eina_Bool
+OnClipboardMessageReceived(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
+{
+ Ecore_X_Event_Client_Message *pEv = static_cast<Ecore_X_Event_Client_Message*>(pEventInfo);
- virtual ~_MouseEvent(void)
+ if (pEv->message_type != ecore_x_atom_get("CBHM_MSG"))
{
+ return ECORE_CALLBACK_PASS_ON;
}
-private:
- virtual result SendImpl(void)
+ if (!strcmp("SET_OWNER", pEv->data.b))
{
- _Control* pTarget = __pTouchEventManager->GetControl(__mouseInfo.GetPointId());
- if (pTarget == null)
- {
- _TouchManager* pTouchManager = _TouchManager::GetInstance();
- pTouchManager->ResetTouchInfo();
+ _KeyEvent event(KEY_PRESSED, _KEY_CLIPBOARD, 0, pEv);
+ SysSecureLog(NID_UI, "KeyName = clipboard, KeyCode = _KEY_CLIPBOARD, KeyModifier = 0");
+ event.Send();
- SysLog(NID_UI, "ResetTouchInfo");
- return E_SUCCESS;
- }
+ SetLastResult(E_SUCCESS);
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
- _UiMouseEvent event(pTarget->GetHandle(), __mouseInfo);
- return _pEventManager->SendEvent(event);
+void
+ResetTouchQueueStatus(void)
+{
+ __touchTailCount = 20;
+ if (!__pVSyncTimer)
+ {
+ __pVSyncTimer = ecore_timer_add(1.0 / 60.0, TouchEventHandlerVSync, null);
}
+}
-private:
- _MouseEvent(const _MouseEvent& rhs);
- _MouseEvent& operator =(const _MouseEvent& rhs);
+bool
+QueueTouchPressEvent(Ecore_Event_Mouse_Button* pEv)
+{
+ SysTryReturn(NID_UI, pEv, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturn(NID_UI, __pRawTouchInfoList, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+
+ RawTouchInfo rawInfo;
+ rawInfo.window = pEv->window;
+ rawInfo.device = pEv->multi.device;
+ rawInfo.buttons = pEv->buttons;
+ rawInfo.x = pEv->root.x;
+ rawInfo.y = pEv->root.y;
+ rawInfo.type = Tizen::Ui::_TOUCH_PRESSED;
+ rawInfo.timeStamp = pEv->timestamp;
+
+ __pRawTouchInfoList->push_back(rawInfo);
+ ResetTouchQueueStatus();
+
+ return true;
+}
+
+bool
+QueueTouchReleaseEvent(Ecore_Event_Mouse_Button* pEv)
+{
+ SysTryReturn(NID_UI, pEv, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturn(NID_UI, __pRawTouchInfoList, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+
+ RawTouchInfo rawInfo;
+ rawInfo.window = pEv->window;
+ rawInfo.device = pEv->multi.device;
+ rawInfo.buttons = pEv->buttons;
+ rawInfo.x = pEv->root.x;
+ rawInfo.y = pEv->root.y;
+ rawInfo.type = Tizen::Ui::_TOUCH_RELEASED;
+ rawInfo.timeStamp = pEv->timestamp;
+
+ __pRawTouchInfoList->push_back(rawInfo);
+ ResetTouchQueueStatus();
+
+ return true;
+}
+
+bool
+QueueTouchMoveEvent(Ecore_Event_Mouse_Move* pEv)
+{
+ SysTryReturn(NID_UI, pEv, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturn(NID_UI, __pRawTouchInfoList, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+
+ RawTouchInfo rawInfo;
+ rawInfo.window = pEv->window;
+ rawInfo.device = pEv->multi.device;
+ rawInfo.buttons = 0;
+ rawInfo.x = pEv->root.x;
+ rawInfo.y = pEv->root.y;
+ rawInfo.type = Tizen::Ui::_TOUCH_MOVED;
+ rawInfo.timeStamp = pEv->timestamp;
+
+ __pRawTouchInfoList->push_back(rawInfo);
+ ResetTouchQueueStatus();
+
+ return true;
+}
- _Control* GetTarget(int x, int y, const _Control* pRootControl) const
+bool
+FindTouchEventAtTime(RawTouchInfo* pRawInfo, unsigned int timeStamp)
+{
+ SysTryReturn(NID_UI, __pRawTouchInfoList, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+
+ int count = __pRawTouchInfoList->size();
+
+ if (count == 0)
{
- ClearLastResult();
+ return false;
+ }
- _TouchManager* pTouchManager = _TouchManager::GetInstance();
- SysTryReturn(NID_UI, pTouchManager, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ std::list<RawTouchInfo>::iterator pos = __pRawTouchInfoList->begin();
+ RawTouchInfo cur = *pos;
+ if (cur.timeStamp >= timeStamp)
+ {
+ return false;
+ }
- _Control* pCapturedControl = pTouchManager->GetCapturedControl();
- _Control* pControl = null;
+ std::list<RawTouchInfo>::iterator iter = __pRawTouchInfoList->erase(pos);
+ int devId = cur.device;
- if (pCapturedControl)
+ for (; iter != __pRawTouchInfoList->end(); iter++)
+ {
+ if (cur.timeStamp >= timeStamp)
{
- if (pTouchManager->IsCaptureAllowedOwnerBounds())
- {
- if (pTouchManager->IsCaptureAllowedOutOfBounds())
- {
- pControl = pCapturedControl;
- }
+ *pRawInfo = cur;
+ return true;
+ }
- _Window * pWindow = dynamic_cast<_Window*>(pCapturedControl);
- if (pWindow)
- {
- _Control* pOwner = pWindow->GetOwner();
- if (pOwner)
- {
- Tizen::Graphics::Rectangle ownerRc(pOwner->GetAbsoluteBounds(true));
- if ((x >= ownerRc.x) && (x <= (ownerRc.x + ownerRc.width)) && (y >= ownerRc.y) && (y <= (ownerRc.y + ownerRc.height)))
- {
- pControl = pOwner;
- }
- }
- }
+ switch (cur.type)
+ {
+ case Tizen::Ui::_TOUCH_PRESSED:
+ case Tizen::Ui::_TOUCH_RELEASED:
+ *pRawInfo = cur;
+ return true;
+ break;
- Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds(true));
- if ((x >= rc.x) && (x <= (rc.x + rc.width)) && (y >= rc.y) && (y <= (rc.y + rc.height)))
- {
- pControl = pCapturedControl;
- }
- }
- else
+ case Tizen::Ui::_TOUCH_MOVED:
+ if ((*iter).device != devId)
{
- if (pTouchManager->IsCaptureAllowedOutOfBounds())
- {
- pControl = pCapturedControl;
- }
- else
- {
- Tizen::Graphics::Rectangle rc(pCapturedControl->GetAbsoluteBounds(true));
-
- if ((x < rc.x) || (x > (rc.x + rc.width)) || (y < rc.y) || (y > (rc.y + rc.height)))
- {
- pControl = pCapturedControl;
- }
- }
+ continue;
}
- if (pControl != null)
+ if (cur.type != (*iter).type || cur.window != (*iter).window || cur.buttons != (*iter).buttons)
{
- return pControl;
+ *pRawInfo = cur;
+ return true;
}
- }
-
- _ControlManager* pControlManager = _ControlManager::GetInstance();
- SysTryReturn(NID_UI, pControlManager, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
- Tizen::Graphics::FloatPoint ptf(static_cast<float>(x), static_cast<float>(y));
-
- _ControlVisualElement* pRootControlElement = null;
- if (pRootControl)
- {
- pRootControlElement = dynamic_cast<_ControlVisualElement*>(pRootControl->GetVisualElement());
- }
- else
- {
- _Window* pWindow = null;
- pWindow = pControlManager->GetTouchedWindow();
- SysTryReturn(NID_UI, pWindow, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
- Rectangle winBounds = pWindow->GetBounds();
-
- ptf.x = static_cast<float>(x - winBounds.x);
- ptf.y = static_cast<float>(y - winBounds.y);
-
- pRootControlElement = dynamic_cast <_ControlVisualElement*>(pWindow->GetVisualElement());
- }
- SysTryReturn(NID_UI, pRootControlElement, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
- _ControlVisualElement* pControlVisualElement = pRootControlElement->GetControlChildAtPoint(ptf);
- SysTryReturn(NID_UI, pControlVisualElement, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
- pControl = static_cast <_Control*>(pControlVisualElement->GetUserData());
- SysTryReturn(NID_UI, pControl, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
- return pControl;
- }
-
- result GetPosition(_TouchStatus status, int x, int y, Point& point) const
- {
- result r = E_SUCCESS;
+ if ((*iter).timeStamp >= timeStamp)
+ {
+ float ratio = (float)(timeStamp - cur.timeStamp) / (float)((*iter).timeStamp - cur.timeStamp);
+ if (ratio < 0.0f)
+ {
+ // suspicious error
+ *pRawInfo = cur;
+ return true;
+ }
- _ControlManager* pControlManager = _ControlManager::GetInstance();
- SysTryReturn(NID_UI, pControlManager, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ pRawInfo->x = cur.x + ((*iter).x - cur.x) * ratio;
+ pRawInfo->y = cur.y + ((*iter).y - cur.y) * ratio;
+ pRawInfo->timeStamp = cur.timeStamp;
+ pRawInfo->buttons = cur.buttons; // 0 ?
+ pRawInfo->type = cur.type; // Tizen::Ui::_TOUCH_MOVED ?
+ pRawInfo->window = cur.window;
+ pRawInfo->device = cur.device;
- _Window* pWindow = pControlManager->GetTouchedWindow();
- if (pWindow == null)
- {
- _TouchManager* pTouchManager = _TouchManager::GetInstance();
- if (pTouchManager)
+ return true;
+ }
+ else
{
- pTouchManager->ResetTouchInfo();
- SysLog(NID_UI, "pWindow is null, ResetTouchInfo");
+ cur = *iter;
+ iter = __pRawTouchInfoList->erase(iter);
}
- }
- SysTryReturn(NID_UI, pWindow, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] A system error occurred.");
-
- _RootVisualElement* pRootVE = pWindow->GetRootVisualElement();
- SysTryReturn(NID_UI, pRootVE, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
- _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer());
- SysTryReturn(NID_UI, pLayer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
- Ecore_Evas* pEE = pLayer->GetEcoreEvas();
- SysTryReturn(NID_UI, pEE, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
- const int PORTRAIT = 0;
- const int LANDSCAPE = 270;
- const int PORTRAIT_REVERSE = 180;
- const int LANDSCAPE_REVERSE = 90;
-
- Dimension dimension = pControlManager->GetScreenSize();
- Point output(_CoordinateSystemUtils::InverseTransform(point));
- int rotation = ecore_evas_rotation_get(pEE);
-
- switch (rotation)
- {
- case PORTRAIT:
- point.x = output.x;
- point.y = output.y;
- break;
-
- case LANDSCAPE:
- point.x = output.y;
- point.y = dimension.width - output.x;
- break;
-
- case PORTRAIT_REVERSE:
- point.x = dimension.width - output.x;
- point.y = dimension.height - output.y;
- break;
-
- case LANDSCAPE_REVERSE:
- point.x = dimension.height - output.y;
- point.y = output.x;
break;
default:
- SysAssertf(0, "[E_SYSTEM][%d]", rotation);
- r = E_SYSTEM;
break;
}
-
- return r;
}
-private:
- _MouseInfo __mouseInfo;
- _TouchEventManager* __pTouchEventManager;
-};
-
-Eina_Bool
-OnNotified(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
-{
- if (pEventInfo)
- {
- _UiEvent* pUiEvent = static_cast <_UiEvent*>(pEventInfo);
- SysTryReturn(NID_UI, pUiEvent, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ *pRawInfo = cur;
- _UiEventManager* pEventManager = _UiEventManager::GetInstance();
- SysTryReturn(NID_UI, pEventManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
- result r = pEventManager->SendEvent(*pUiEvent);
- SysTryReturn(NID_UI, r == E_SUCCESS, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
- }
-
- SetLastResult(E_SUCCESS);
-
- return ECORE_CALLBACK_PASS_ON;
+ return true;
}
-void
-FreeEvent(void* pData __UNUSED__, void* pEventInfo)
-{
- _UiEvent* pUiEvent = static_cast <_UiEvent*>(pEventInfo);
- if (pUiEvent)
- {
- delete pUiEvent;
- }
-}
-Eina_Bool
-OnKeyPressed(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
+bool
+DequeueTouchPressEvent(unsigned int& window, int& x, int& y, int& device, unsigned int& timeStamp, int& buttons, int& type, bool forceNow)
{
- Ecore_Event_Key* pEv = static_cast <Ecore_Event_Key*>(pEventInfo);
- SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
-
- if (_KeyEvent::GetKeyCode(pEv->keyname) == _KEY_INVALID)
- {
- SysLog(NID_UI, "KeyCode %s is invalid", pEv->keyname);
- return ECORE_CALLBACK_PASS_ON;
- }
-
- _KeyEvent event(KEY_PRESSED, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers), pEv);
- result r = GetLastResult();
- if (r != E_SUCCESS)
- {
- SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r));
- return ECORE_CALLBACK_PASS_ON;
- }
- SysSecureLog(NID_UI, "KeyName = %s, KeyCode = %d, KeyModifier = %x", pEv->keyname, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers));
- event.Send();
+ RawTouchInfo cur;
- keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] = true;
+ cur.window = 0;
+ cur.x = -1;
+ cur.y = -1;
+ cur.type = -1;
+ cur.buttons = -1;
+ cur.device = -1;
+ cur.timeStamp = 0;
- SetLastResult(E_SUCCESS);
-
- return ECORE_CALLBACK_PASS_ON;
-}
-
-Eina_Bool
-OnKeyReleased(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
-{
- Ecore_Event_Key* pEv = static_cast <Ecore_Event_Key*>(pEventInfo);
- SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ double checkTime = 0.0;
- if (_KeyEvent::GetKeyCode(pEv->keyname) == _KEY_INVALID)
+ if (forceNow)
{
- SysLog(NID_UI, "KeyCode %s is invalid", pEv->keyname);
- return ECORE_CALLBACK_PASS_ON;
+ checkTime = ecore_time_get() * 1000.0;
}
-
- if (keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] != true)
+ else
{
- SysLog(NID_UI, "KeyCode %s is not pressed", pEv->keyname);
- return ECORE_CALLBACK_PASS_ON;
+ checkTime = ecore_time_get() * 1000.0 - 8.0;
}
- _KeyEvent event(KEY_RELEASED, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers), pEv);
- result r = GetLastResult();
- if (r != E_SUCCESS)
+ if (!FindTouchEventAtTime(&cur, (unsigned int)checkTime))
{
- SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r));
- return ECORE_CALLBACK_PASS_ON;
+ return false;
}
- SysSecureLog(NID_UI, "KeyName = %s, KeyCode = %d, KeyModifier = %x", pEv->keyname, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers));
- event.Send();
- keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] = false;
+ window = cur.window;
+ x = cur.x;
+ y = cur.y;
+ device = cur.device;
+ timeStamp = cur.timeStamp;
+ buttons = cur.buttons;
+ type = cur.type;
- SetLastResult(E_SUCCESS);
-
- return ECORE_CALLBACK_PASS_ON;
+ return true;
}
Eina_Bool
-OnClipboardMessageReceived(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
+TouchEventHandlerVSync(void* pData)
{
- Ecore_X_Event_Client_Message *pEv = static_cast<Ecore_X_Event_Client_Message*>(pEventInfo);
+ SysTryReturn(NID_UI, __pRawTouchInfoList, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- if (pEv->message_type != ecore_x_atom_get("CBHM_MSG"))
+ if (__pRawTouchInfoList->size() <= 0)
{
- return ECORE_CALLBACK_PASS_ON;
+ if (--__touchTailCount <= 0)
+ {
+ __pVSyncTimer = null;
+ return EINA_FALSE;
+ }
}
- if (!strcmp("SET_OWNER", pEv->data.b))
+ unsigned int window = 0;
+ int x = -1;
+ int y = -1;
+ int device = -1;
+ unsigned int timeStamp = 0;
+ int buttons = -1;
+ int type = -1;
+
+ Ecore_Event_Mouse_Button evTouch;
+ evTouch.window = window;
+ evTouch.root.x = x;
+ evTouch.root.y = y;
+ evTouch.multi.device = device;
+ evTouch.buttons = buttons;
+ evTouch.timestamp = timeStamp;
+
+ Ecore_Event_Mouse_Move evMove;
+ evMove.window = window;
+ evMove.root.x = x;
+ evMove.root.y = y;
+ evMove.multi.device = device;
+ evMove.timestamp = timeStamp;
+
+ if (DequeueTouchPressEvent(window, x, y, device, timeStamp, buttons, type, false))
{
- _KeyEvent event(KEY_PRESSED, _KEY_OEM_1, 0, pEv);
- SysSecureLog(NID_UI, "KeyName = clipboard, KeyCode = _KEY_OEM_1, KeyModifier = 0");
- event.Send();
+ switch (type)
+ {
+ case Tizen::Ui::_TOUCH_PRESSED:
+ evTouch.window = window;
+ evTouch.root.x = x;
+ evTouch.root.y = y;
+ evTouch.multi.device = device;
+ evTouch.buttons = buttons;
+ evTouch.timestamp = timeStamp;
+ OnTouchPressedReal(&evTouch);
+ break;
- SetLastResult(E_SUCCESS);
+ case Tizen::Ui::_TOUCH_RELEASED:
+ evTouch.window = window;
+ evTouch.root.x = x;
+ evTouch.root.y = y;
+ evTouch.multi.device = device;
+ evTouch.buttons = buttons;
+ evTouch.timestamp = timeStamp;
+ OnTouchReleasedReal(&evTouch);
+ break;
+
+ case Tizen::Ui::_TOUCH_MOVED:
+ evMove.window = window;
+ evMove.root.x = x;
+ evMove.root.y = y;
+ evMove.multi.device = device;
+ evMove.timestamp = timeStamp;
+ OnTouchMovedReal(&evMove);
+ break;
+ }
}
- return ECORE_CALLBACK_PASS_ON;
+ return EINA_TRUE;
}
-
Eina_Bool
OnTouchPressed(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
{
Ecore_Event_Mouse_Button* pEv = static_cast <Ecore_Event_Mouse_Button*>(pEventInfo);
SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- SysSecureLog(NID_UI, "OnTouchPressed - x(%d), y(%d), deviceId(%d), buttons(%d)", pEv->root.x, pEv->root.y, pEv->multi.device, pEv->buttons);
+ if (pEv->multi.device != 0)
+ {
+ bool touchableApp = false;
+ for (int deviceCount = 0; deviceCount<DEVICE_COUNT; deviceCount++)
+ {
+ if (__touchPressed[deviceCount] == true)
+ {
+ touchableApp = true;
+ break;
+ }
+ }
- _ControlManager* pControlManager = _ControlManager::GetInstance();
- SysTryReturn(NID_UI, pControlManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ if (touchableApp == false)
+ {
+ SysTryReturn(NID_UI, false, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] This application is not allowed to touch.");
+ }
+ }
- pControlManager->SetTouchedWindow((unsigned int)pEv->window);
+ SysSecureLog(NID_UI, "OnTouchPressed - x(%d), y(%d), deviceId(%d), buttons(%d)", pEv->root.x, pEv->root.y, pEv->multi.device, pEv->buttons);
- if (touchPressed[pEv->multi.device] == true)
+ if (__touchPressed[pEv->multi.device] == true)
{
_TouchManager* pTouchManager = _TouchManager::GetInstance();
if (pTouchManager)
for(int i=0; i<DEVICE_COUNT; i++)
{
- touchPressed[i] = false;
+ __touchPressed[i] = false;
}
pTouchManager->ResetTouchInfo();
}
}
- touchPressed[pEv->multi.device] = true;
+ __touchPressed[pEv->multi.device] = true;
- if (pEv->buttons == _MOUSE_BUTTON_LEFT || pEv->buttons == _MOUSE_BUTTON_NONE)
+ if (!QueueTouchPressEvent(pEv))
{
- _TouchEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, pEv->timestamp, null);
+ return OnTouchPressedReal(pEv);
+ }
+
+ SetLastResult(E_SUCCESS);
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+Eina_Bool
+OnTouchPressedReal(Ecore_Event_Mouse_Button* pEv)
+{
+ SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ SysTryReturn(NID_UI, pControlManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+ pControlManager->SetTouchedWindow((unsigned int)pEv->window);
+
+ if (pEv->buttons == _TOUCH_BUTTON_LEFT || pEv->buttons == _TOUCH_BUTTON_NONE)
+ {
+ _TouchEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, pEv->timestamp, null, 0, pEv->buttons);
result r = GetLastResult();
if (r != E_SUCCESS)
}
else
{
- //_MouseEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, 0, pEv->buttons, pEv->timestamp, null);
- _MouseEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, 0, _MOUSE_BUTTON_RIGHT, pEv->timestamp, null);
-
- result r = GetLastResult();
- if (r != E_SUCCESS)
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
+ if (pTouchManager)
{
- SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r));
- return ECORE_CALLBACK_PASS_ON;
+ pTouchManager->ResetTouchInfo();
+ SysLog(NID_UI, "Mouse right/wheel button is pressed, ResetTouchInfo");
}
- event.Send();
-
_UiEventManager* pEventManager = _UiEventManager::GetInstance();
SysTryReturn(NID_UI, pEventManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+ if (pEv->buttons == _TOUCH_BUTTON_RIGHT)
+ {
pEventManager->GenerateKeyEvent(KEY_PRESSED, _KEY_BACK, _KEY_MODIFIER_NONE, false);
pEventManager->GenerateKeyEvent(KEY_RELEASED, _KEY_BACK, _KEY_MODIFIER_NONE, false);
}
+ }
SetLastResult(E_SUCCESS);
Ecore_Event_Mouse_Button* pEv = static_cast <Ecore_Event_Mouse_Button*>(pEventInfo);
SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ if (pEv->multi.device != 0)
+ {
+ bool touchableApp = false;
+ for (int deviceCount = 0; deviceCount<DEVICE_COUNT; deviceCount++)
+ {
+ if (__touchPressed[deviceCount] == true)
+ {
+ touchableApp = true;
+ break;
+ }
+ }
+
+ if (touchableApp == false)
+ {
+ SysTryReturn(NID_UI, false, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] This application is not allowed to touch.");
+ }
+ }
+
SysSecureLog(NID_UI, "OnTouchReleased - x(%d), y(%d), deviceId(%d) buttons(%d)", pEv->root.x, pEv->root.y, pEv->multi.device, pEv->buttons);
+ __touchPressed[pEv->multi.device] = false;
+
+ if (!QueueTouchReleaseEvent(pEv))
+ {
+ return OnTouchReleasedReal(pEv);
+ }
+
+ SetLastResult(E_SUCCESS);
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+Eina_Bool
+OnTouchReleasedReal(Ecore_Event_Mouse_Button* pEv)
+{
+ SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+
_TouchManager* pTouchManager = _TouchManager::GetInstance();
SysTryReturn(NID_UI, pTouchManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist.");
- touchPressed[pEv->multi.device] = false;
+ int pointId = pTouchManager->GetPointId(pEv->multi.device);
- if (pEv->buttons == _MOUSE_BUTTON_LEFT || pEv->buttons == _MOUSE_BUTTON_NONE)
+ if (pEv->buttons == _TOUCH_BUTTON_LEFT || pEv->buttons == _TOUCH_BUTTON_NONE)
{
- _TouchEvent event(pEv->multi.device, _TOUCH_RELEASED, pEv->root.x, pEv->root.y, pEv->timestamp, null);
+ _TouchEvent event(pEv->multi.device, _TOUCH_RELEASED, pEv->root.x, pEv->root.y, pEv->timestamp, null, 0, pEv->buttons);
result r = GetLastResult();
if (r!= E_SUCCESS)
}
else
{
- //_MouseEvent event(pEv->multi.device, _TOUCH_RELEASED, pEv->root.x, pEv->root.y, 0, pEv->buttons, pEv->timestamp, null);
- _MouseEvent event(pEv->multi.device, _TOUCH_RELEASED, pEv->root.x, pEv->root.y, 0, _MOUSE_BUTTON_RIGHT, pEv->timestamp, null);
-
- result r = GetLastResult();
- if (r!= E_SUCCESS)
- {
- SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r));
- return ECORE_CALLBACK_PASS_ON;
- }
-
- event.Send();
-
_TouchManager* pTouchManager = _TouchManager::GetInstance();
if (pTouchManager)
{
pTouchManager->ResetTouchInfo();
- SysLog(NID_UI, "ResetTouchInfo");
+ SysLog(NID_UI, "Mouse right/wheel button is released, ResetTouchInfo");
}
}
+ pTouchManager->SetListenerOnly(pointId,false);
+
IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN();
- SysTryReturn(NID_UI, pFingerInfoList, ECORE_CALLBACK_PASS_ON, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pFingerInfoList, ECORE_CALLBACK_PASS_ON, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
int count = pFingerInfoList->GetCount();
Ecore_Event_Mouse_Move* pEv = static_cast <Ecore_Event_Mouse_Move*>(pEventInfo);
SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ if (pEv->multi.device != 0)
+ {
+ bool touchableApp = false;
+ for (int deviceCount = 0; deviceCount<DEVICE_COUNT; deviceCount++)
+ {
+ if (__touchPressed[deviceCount] == true)
+ {
+ touchableApp = true;
+ break;
+ }
+ }
+
+ if (touchableApp == false)
+ {
+ SysTryReturn(NID_UI, false, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] This application is not allowed to touch.");
+ }
+ }
+
//SysSecureLog(NID_UI, "OnTouchMoved - x(%d), y(%d), deviceId(%d)", pEv->root.x, pEv->root.y, pEv->multi.device);
- _TouchEvent event(pEv->multi.device, _TOUCH_MOVED, pEv->root.x, pEv->root.y, pEv->timestamp, null);
+
+ if (__touchPressed[pEv->multi.device] != true)
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ if (!QueueTouchMoveEvent(pEv))
+ {
+ return OnTouchMovedReal(pEv);
+ }
+
+ SetLastResult(E_SUCCESS);
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+Eina_Bool
+OnTouchMovedReal(Ecore_Event_Mouse_Move* pEv)
+{
+ SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+
+ _TouchEvent event(pEv->multi.device, _TOUCH_MOVED, pEv->root.x, pEv->root.y, pEv->timestamp, null, 0, _TOUCH_BUTTON_NONE);
result r = GetLastResult();
if (r != E_SUCCESS)
}
Eina_Bool
-OnMouseWheeled(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
+OnTouchWheeled(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
{
_Ecore_Event_Mouse_Wheel* pEv = static_cast <_Ecore_Event_Mouse_Wheel*>(pEventInfo);
SysTryReturn(NID_UI, pEv, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- SysSecureLog(NID_UI, "OnMouseWheeled - x(%d), y(%d), z(%d)", pEv->root.x, pEv->root.y, pEv->z);
- _MouseEvent event(0, _WHEEL_MOVED, pEv->root.x, pEv->root.y, pEv->z, _MOUSE_BUTTON_NONE, pEv->timestamp, null);
+ SysSecureLog(NID_UI, "OnTouchWheeled - x(%d), y(%d), z(%d)", pEv->root.x, pEv->root.y, pEv->z);
+ _TouchEvent event(0, _TOUCH_WHEELED, pEv->root.x, pEv->root.y, pEv->timestamp, null, pEv->z, _TOUCH_BUTTON_NONE);
result r = GetLastResult();
if (r != E_SUCCESS)
OnKeyboardInserted(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
{
Ecore_X_Event_Window_Property *pEv = static_cast <Ecore_X_Event_Window_Property*>(pEventInfo);
- if ( pEv->atom != keyboardExist)
+ if ( pEv->atom != __keyboardExist)
{
-// SysLog(NID_UI, "OnKeyboardInserted - atom of event(%d), keyboardExist(%d)", pEv->atom, keyboardExist);
+// SysLog(NID_UI, "OnKeyboardInserted - atom of event(%d), __keyboardExist(%d)", pEv->atom, __keyboardExist);
return ECORE_CALLBACK_PASS_ON;
}
unsigned int value = 0;
int returnResult = -1;
- returnResult = ecore_x_window_prop_card32_get(pEv->win, keyboardExist, &value, 1);
+ returnResult = ecore_x_window_prop_card32_get(pEv->win, __keyboardExist, &value, 1);
if (returnResult)
{
if (value > 0)
}
pArgs = new (std::nothrow) ArrayList;
- SysTryReturn(NID_UI, pArgs, ECORE_CALLBACK_PASS_ON, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pArgs, ECORE_CALLBACK_PASS_ON, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pArgs->Construct();
SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
_Control* pControl = static_cast<_Control*>(pData);
SysTryReturnVoidResult(NID_UI, pControl, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- if (evasTouchPressed == true)
+ if (__touchPressed[0] == true)
{
_TouchManager* pTouchManager = _TouchManager::GetInstance();
if (pTouchManager)
pTouchManager->SetTouchCanceled(null);
SysLog(NID_UI, "pWindow is null, CancelTouch");
- evasTouchPressed = false;
+ __touchPressed[0] = false;
pTouchManager->ResetTouchInfo();
SysLog(NID_UI, "pWindow is null, ResetTouchInfo");
}
}
- evasTouchPressed = true;
+ __touchPressed[0] = true;
SysSecureLog(NID_UI, "OnEvasTouchPressed - x(%d), y(%d)", pEv->canvas.x, pEv->canvas.y);
_TouchEvent event(0, _TOUCH_PRESSED, pEv->canvas.x, pEv->canvas.y, pEv->timestamp, pControl);
_Control* pControl = static_cast<_Control*>(pData);
SysTryReturnVoidResult(NID_UI, pControl, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- evasTouchPressed = false;
+ __touchPressed[0] = false;
SysSecureLog(NID_UI, "OnEvasTouchReleased - x(%d), y(%d)", pEv->canvas.x, pEv->canvas.y);
_TouchEvent event(0, _TOUCH_RELEASED, pEv->canvas.x, pEv->canvas.y, pEv->timestamp, pControl);
: __notificaitonEventType(-1)
{
unique_ptr<LinkedListT<Ecore_Event_Handler*> > pEventHandlers(new (std::nothrow) LinkedListT<Ecore_Event_Handler*>);
- SysTryReturnVoidResult(NID_UI, pEventHandlers, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturnVoidResult(NID_UI, pEventHandlers, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
// Noti
__notificaitonEventType = ecore_event_type_new();
pEventHandlers->Add(pEventHandler);
+ pEventHandler = ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, OnTouchWheeled, null);
+ SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+ pEventHandlers->Add(pEventHandler);
+
// WIndow property
pEventHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, OnKeyboardInserted, null);
SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
__pEventHandlers = move(pEventHandlers);
- keyboardExist = XInternAtom(static_cast<Display*>(ecore_x_display_get()), "X External Keyboard Exist", 0);
+ __keyboardExist = XInternAtom(static_cast<Display*>(ecore_x_display_get()), "X External Keyboard Exist", 0);
+
+ __pRawTouchInfoList = new std::list<RawTouchInfo>;
+ SysTryReturnVoidResult(NID_UI, __pRawTouchInfoList, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
SetLastResult(E_SUCCESS);
}
_EflUiEventManager::~_EflUiEventManager(void)
{
Tizen::Base::Collection::IEnumeratorT<Ecore_Event_Handler*>* pEnumerator = __pEventHandlers->GetEnumeratorN();
- SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ if (__pRawTouchInfoList)
+ {
+ delete __pRawTouchInfoList;
+ __pRawTouchInfoList = null;
+ }
while (pEnumerator->MoveNext() == E_SUCCESS)
{
delete pEnumerator;
}
+void
+_EflUiEventManager::ClearEventQueue(void)
+{
+ int count = __pRawTouchInfoList->size();
+ if (count > 0)
+ {
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
+ if (pTouchManager)
+ {
+ pTouchManager->SetTouchCanceled(null);
+ }
+ __pVSyncTimer = null;
+
+ for(std::list<RawTouchInfo>::iterator iter =__pRawTouchInfoList->begin(); iter != __pRawTouchInfoList->end();)
+ {
+ __pRawTouchInfoList->erase(iter++);
+ }
+ __pRawTouchInfoList->clear();
+ }
+}
+
result
_EflUiEventManager::RegisterKeyEventHandler(const _Control& control)
{
virtual result UnregisterKeyEventHandler(const _Control& control);
virtual result UnregisterTouchEventHandler(const _Control& control);
virtual result PostEvent(const _UiEvent& event);
+ virtual void ClearEventQueue(void);
private:
int __notificaitonEventType;
#include "FUi_UiKeyEvent.h"
#include "FUi_Window.h"
#include "FUiCtrl_Frame.h"
+#include "FUi_TouchManager.h"
using namespace std;
using namespace Tizen::Base::Collection;
return null;
}
_Window* pWindow = pFocus->GetRootWindow();
- SysAssert(pWindow);
-
+ if (pWindow == null)
+ {
+ return null;
+ }
+
_WindowImpl* pWindowImpl = static_cast <_WindowImpl*>(static_cast <_ControlImpl*>(pWindow->GetUserData()));
- SysAssert(pWindowImpl);
+ if (pWindowImpl == null)
+ {
+ return null;
+ }
+
return pWindowImpl;
}
{
return __isFocusMode;
}
-
+void
+_FocusManagerImpl::SetFocusModeStateEnabled(bool enabled)
+{
+ __isFocusMode = enabled;
+}
int
_FocusManagerImpl::GetNextIndex(int currentIndex, FocusDirection focusDirection, const IListT<_Control*>* pFocusControlList) const
{
if (pFocusTraversalControl)
{
pControl = pFocusTraversalControl;
+ pControl->SetFocused();
}
else
{
bool focusMode = pControl->IsFocusModeStateEnabled();
- if (__isFocusMode == false)
+ if (IsFocusModeStateEnabled() == false)
{
- __isFocusMode = true;
+ SetFocusModeStateEnabled(true);
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
+ if (pTouchManager && IsFocusModeStateEnabled())
+ {
+ pTouchManager ->SetTouchCanceled(null);
+ }
if (pOriginalControl)
{
pOriginalControl->OnFocusModeStateChanged();
{
pTop->SetFocusTraversalControl(pControl, true);
}
+ _Control* pParentControl = pControl->GetParent();
+ if (pParentControl)
+ {
+ pParentControl->OnChildControlFocusMoved(*pControl);
+ while(pParentControl)
+ {
+ pParentControl->OnDescendantControlFocusMoved(*pControl);
+ pParentControl = pParentControl->GetParent();
+ }
+ }
pControl->DrawFocus();
return;
}
count ++;
while (pFocusControlList->GetAt(index, pNextFocusControl) == E_SUCCESS)
{
-
+
if (IsFocusable(pNextFocusControl))
{
if (pNextFocusControl != pControl)
else
{
count ++;
- if (loopCount == count)
+ if (loopCount == count)
{
return;
}
if (keyInfo.GetKeyModifier() & _KEY_MODIFIER_SHIFT)
{
__focusDirection = FOCUS_DIRECTION_UPWARD;
- }
+ }
break;
}
case _KEY_UP :
default :
{
return false;
- }
+ }
}
- StartFocusTraversal(pControl, __focusDirection);
+ StartFocusTraversal(pControl, __focusDirection);
return false;
}
bool
_FocusManagerImpl::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
+ if (!IsFocusModeStateEnabled())
+ {
+ return false;
+ }
+
_Control* pSourceControl = const_cast<_Control*>(&source);
- __isFocusMode = false;
+ SetFocusModeStateEnabled(false);
_Window* pTop = source.GetRootWindow();
+ bool isFocusListControl = IsFocusControlListControl(pSourceControl);
if (pTop)
{
- _Control* pControl = pTop->GetFocusControl(pSourceControl);
- if (pControl)
+ _Control* pControl = null;
+ if (isFocusListControl)
+ {
+ pControl = pTop->GetFocusControl(pSourceControl);
+ }
+ else
{
- pControl->OnFocusModeStateChanged();
- pControl->RemoveFocusRing();
+ pControl = pTop->GetCurrentFocusControl();
+ }
+ while(pControl)
+ {
+ if (pControl)
+ {
+ pControl->OnFocusModeStateChanged();
+ pControl->RemoveFocusRing();
+ }
+ pControl = pControl->GetParent();
}
}
#include <Elementary.h>
#include <FBaseDataType.h>
#include <FBaseSysLog.h>
+#include <FGrp_CoordinateSystem.h>
#include <FUiInputConnection.h>
#include <new>
#include "FUi_BidiUtils.h"
#include "FUi_EcoreEvas.h"
#include "FUi_EcoreEvasMgr.h"
#include "FUi_InputConnectionImpl.h"
+#include "FUi_InputConnectionUtils.h"
#include "FUi_UiEventManager.h"
#include "FUiAnim_EflNode.h"
#include "FUiAnim_VisualElement.h"
}
//This memory will be released by ECORE IMF
pSurroundingText = (char*)malloc(len+1);
- SysTryReturn(NID_UI, pSurroundingText, EINA_FALSE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] OnRetrieveSurrounding pSurroundingText == null.");
+ SysTryReturn(NID_UI, pSurroundingText, EINA_FALSE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
len = wcstombs(pSurroundingText, static_cast<const wchar_t*>(string.GetPointer()), len);
pSurroundingText[len] = null;
ClearLastResult();
_InputConnectionImpl* pImpl = new (std::nothrow) _InputConnectionImpl(pInputConnection);
- SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pImpl;
SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use.");
- int x = 0;
- int y = 0;
- int w = 0;
- int h = 0;
+ Rectangle inputPanelPhysicalRect;
+ Rectangle inputPanelLogicalRect;
- ecore_imf_context_input_panel_geometry_get(__pContext, &x, &y, &w, &h);
- return Rectangle(x, y, w, h);
+ ecore_imf_context_input_panel_geometry_get(__pContext, &inputPanelPhysicalRect.x, &inputPanelPhysicalRect.y, &inputPanelPhysicalRect.width, &inputPanelPhysicalRect.height);
+
+ _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
+ SysTryReturn(NID_UI, pCoordSystem != null, Rectangle(0,0,0,0), E_SYSTEM, "Coordinate system load failed.");
+
+ _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer();
+ SysTryReturn(NID_UI, pXformer, Rectangle(0,0,0,0), E_SYSTEM, "Coordinate system load failed.");
+
+ inputPanelLogicalRect = pXformer->Transform(inputPanelPhysicalRect);
+
+ return inputPanelLogicalRect;
}
FloatRectangle
int h = 0;
ecore_imf_context_input_panel_geometry_get(__pContext, &x, &y, &w, &h);
- FloatRectangle inputPanelFloatRect;
- inputPanelFloatRect.x = _CoordinateSystemUtils::ConvertToFloat(x);
- inputPanelFloatRect.y = _CoordinateSystemUtils::ConvertToFloat(y);
- inputPanelFloatRect.width = _CoordinateSystemUtils::ConvertToFloat(w);
- inputPanelFloatRect.height = _CoordinateSystemUtils::ConvertToFloat(h);
- return inputPanelFloatRect;
+ FloatRectangle inputPanelPhysicalFloatRect;
+ FloatRectangle inputPanelLogicalFloatRect;
+
+ inputPanelPhysicalFloatRect.x = _CoordinateSystemUtils::ConvertToFloat(x);
+ inputPanelPhysicalFloatRect.y = _CoordinateSystemUtils::ConvertToFloat(y);
+ inputPanelPhysicalFloatRect.width = _CoordinateSystemUtils::ConvertToFloat(w);
+ inputPanelPhysicalFloatRect.height = _CoordinateSystemUtils::ConvertToFloat(h);
+
+ _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
+ SysTryReturn(NID_UI, pCoordSystem != null, FloatRectangle(0.0f,0.0f,0.0f,0.0f), E_SYSTEM, "Coordinate system load failed.");
+
+ _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer();
+ SysTryReturn(NID_UI, pXformer, FloatRectangle(0.0f,0.0f,0.0f,0.0f), E_SYSTEM, "Coordinate system load failed.");
+
+ inputPanelLogicalFloatRect = pXformer->Transform(inputPanelPhysicalFloatRect);
+
+ return inputPanelLogicalFloatRect;
}
Rectangle
SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use.");
- int x = 0;
- int y = 0;
- int w = 0;
- int h = 0;
+ Rectangle predictionPhysicalRect;
+ Rectangle predictionLogicalRect;
- ecore_imf_context_candidate_panel_geometry_get(__pContext, &x, &y, &w, &h);
- return Rectangle(x, y, w, h);
+ ecore_imf_context_candidate_panel_geometry_get(__pContext, &predictionPhysicalRect.x, &predictionPhysicalRect.y, &predictionPhysicalRect.width, &predictionPhysicalRect.height);
+
+ _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
+ SysTryReturn(NID_UI, pCoordSystem != null, Rectangle(0,0,0,0), E_SYSTEM, "Coordinate system load failed.");
+
+ _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer();
+ SysTryReturn(NID_UI, pXformer, Rectangle(0,0,0,0), E_SYSTEM, "Coordinate system load failed.");
+
+ predictionLogicalRect = pXformer->Transform(predictionPhysicalRect);
+
+ return predictionLogicalRect;
}
FloatRectangle
int h = 0;
ecore_imf_context_candidate_panel_geometry_get(__pContext, &x, &y, &w, &h);
- FloatRectangle inputPredictionFloatRect;
- inputPredictionFloatRect.x = _CoordinateSystemUtils::ConvertToFloat(x);
- inputPredictionFloatRect.y = _CoordinateSystemUtils::ConvertToFloat(y);
- inputPredictionFloatRect.width = _CoordinateSystemUtils::ConvertToFloat(w);
- inputPredictionFloatRect.height = _CoordinateSystemUtils::ConvertToFloat(h);
- return inputPredictionFloatRect;
+ FloatRectangle predictionPhysicalFloatRect;
+ FloatRectangle predictionLogicalFloatRect;
+
+ predictionPhysicalFloatRect.x = _CoordinateSystemUtils::ConvertToFloat(x);
+ predictionPhysicalFloatRect.y = _CoordinateSystemUtils::ConvertToFloat(y);
+ predictionPhysicalFloatRect.width = _CoordinateSystemUtils::ConvertToFloat(w);
+ predictionPhysicalFloatRect.height = _CoordinateSystemUtils::ConvertToFloat(h);
+
+ _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
+ SysTryReturn(NID_UI, pCoordSystem != null, FloatRectangle(0.0f,0.0f,0.0f,0.0f), E_SYSTEM, "Coordinate system load failed.");
+
+ _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer();
+ SysTryReturn(NID_UI, pXformer, FloatRectangle(0.0f,0.0f,0.0f,0.0f), E_SYSTEM, "Coordinate system load failed.");
+
+ predictionLogicalFloatRect = pXformer->Transform(predictionPhysicalFloatRect);
+
+ return predictionLogicalFloatRect;
}
result
char* pLanguage = null;
int len = wcstombs(0, static_cast<const wchar_t*>(language.GetPointer()), 0);
pLanguage = (char*)malloc(len+1);
- SysTryReturn(NID_UI, pLanguage, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] pLanguage is null.");
+ SysTryReturn(NID_UI, pLanguage, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
len = wcstombs(pLanguage, static_cast<const wchar_t*>(language.GetPointer()), len);
pLanguage[len] = null;
int length = 0;
length = wcstombs(0, static_cast<const wchar_t*>(command.GetPointer()), 0);
- SysTryReturnVoidResult(NID_UI, length != -1, E_OUT_OF_MEMORY, "A system error occurred.");
+ SysTryReturnVoidResult(NID_UI, length != -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pCommand = (char*)malloc(length+1);
- SysTryReturnVoidResult(NID_UI, pCommand, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pCommand, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
length = wcstombs(pCommand, static_cast<const wchar_t*>(command.GetPointer()), length);
pCommand[length] = null;
}
_KeyCode keyCode = keyInfo.GetKeyCode();
- if (keyCode == _KEY_OEM_1)
+ if (keyCode == _KEY_CLIPBOARD)
{
return false;
}
SysTryReturn(NID_UI, pEvent, false, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
Ecore_IMF_Event_Key_Down* pKeyDown = (Ecore_IMF_Event_Key_Down*)malloc(sizeof(Ecore_IMF_Event_Key_Down));
- SysTryReturn(NID_UI, pKeyDown, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturn(NID_UI, pKeyDown, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pKeyDown->keyname = pEvent->keyname;
{
if ((pEvent->modifiers & ECORE_EVENT_MODIFIER_CTRL) || (pEvent->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_ALT) || (pEvent->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_WIN))
{
+ free(pKeyDown);
return false;
}
if (!pEvent->compose)
{
+ free(pKeyDown);
return false;
}
}
_KeyCode keyCode = keyInfo.GetKeyCode();
- if (keyCode == _KEY_OEM_1)
+ if (keyCode == _KEY_CLIPBOARD)
{
return false;
}
SysTryReturn(NID_UI, pEvent, false, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
Ecore_IMF_Event_Key_Up* pKeyUp = (Ecore_IMF_Event_Key_Up*)malloc(sizeof(Ecore_IMF_Event_Key_Up));
- SysTryReturn(NID_UI, pKeyUp, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturn(NID_UI, pKeyUp, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pKeyUp->keyname = pEvent->keyname;
int
_InputConnectionImpl::CheckUSBKeyboardStatus(void)
{
- Ecore_X_Window rootWindow = ecore_x_window_root_first_get();
- Ecore_X_Atom keyboardExist = 0;
- unsigned int keyboardNumber = 0;
- int ret = 0;
-
- if (!keyboardExist)
- {
- keyboardExist = ecore_x_atom_get("X External Keyboard Exist");
- }
- ret = ecore_x_window_prop_card32_get(rootWindow, keyboardExist, &keyboardNumber, 1);
-
- return keyboardNumber;
+ return _InputConnectionUtils::CheckUSBKeyboardStatus();
}
result
char TempKey[20] = {0,};
const char keyOnNumOnlyStyle[10] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/};
- const char keyOnPhoneNumStyle[13] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/,
- 0x2a/***/, 0x2b/*+*/, 0x23/*#*/};
+ const char keyOnPhoneNumStyle[14] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/,
+ 0x2a/***/, 0x2b/*+*/, 0x23/*#*/, 0x70/*p*/};
const char keyOnIPStyle[18] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/,
0x3a/*:*/, 0x2e/*.*/, 0x61/*a*/, 0x62/*b*/, 0x63/*c*/, 0x64/*d*/, 0x65/*e*/, 0x66/*f*/};
bool isExist = false;
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FUi_InputConnectionUtils.cpp
+ * @brief This is the implementation file for the _InputConnectionUtils class.
+ */
+#include <Ecore.h>
+#include "FUi_EcoreEvas.h"
+#include "FUi_EcoreEvasMgr.h"
+#include "FUi_InputConnectionUtils.h"
+
+namespace Tizen { namespace Ui
+{
+
+_InputConnectionUtils::_InputConnectionUtils(void)
+{
+}
+
+_InputConnectionUtils::~_InputConnectionUtils(void)
+{
+}
+
+int
+_InputConnectionUtils::CheckUSBKeyboardStatus(void)
+{
+ Ecore_X_Window rootWindow = ecore_x_window_root_first_get();
+ Ecore_X_Atom keyboardExist = 0;
+ unsigned int keyboardNumber = 0;
+ int ret = 0;
+
+ if (!keyboardExist)
+ {
+ keyboardExist = ecore_x_atom_get("X External Keyboard Exist");
+ }
+ ret = ecore_x_window_prop_card32_get(rootWindow, keyboardExist, &keyboardNumber, 1);
+
+ return keyboardNumber;
+}
+
+}} // Tizen::Ui
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FUi_InputConnectionUtils.h
+ * @brief This is the header file for the _InputConnectionUtils class.
+ *
+ * This header file contains the declarations of the _InputConnectionUtils class.
+ */
+
+#ifndef _FUI_INTERNAL_INPUTCONNECTION_UTILS_H_
+#define _FUI_INTERNAL_INPUTCONNECTION_UTILS_H_
+
+namespace Tizen { namespace Ui
+{
+
+class _InputConnectionUtils
+{
+public:
+ static int CheckUSBKeyboardStatus(void);
+
+private:
+ _InputConnectionUtils(void);
+ ~_InputConnectionUtils(void);
+
+ _InputConnectionUtils(const _InputConnectionUtils& rhs);
+ _InputConnectionUtils& operator =(const _InputConnectionUtils& rhs);
+}; //_InputConnectionUtils
+
+}} // Tizen::Ui
+
+#endif //_FUI_INTERNAL_INPUTCONNECTION_UTILS_H_
\ No newline at end of file
ClearLastResult();
_KeyEventInfoImpl* pImpl = new (std::nothrow) _KeyEventInfoImpl(pPublic);
- SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pImpl;
}
SysTryReturnVoidResult(NID_UI, pEventManager, E_SYSTEM, "[E_SYSTEM] System error occurred.");
__pKeyEventListener = new (std::nothrow)_KeyEventListener;
- SysTryReturnVoidResult(NID_UI, __pKeyEventListener, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pKeyEventListener, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pKeyCapturingMap = new (std::nothrow) HashMapT<_KeyCode, _ControlHandle>;
- SysTryCatch(NID_UI, __pKeyCapturingMap, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, __pKeyCapturingMap, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
SysTryCatch(NID_UI, __pKeyCapturingMap->Construct() == E_SUCCESS, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
__pKeyEventListeners = new (std::nothrow) LinkedListT<Tizen::Ui::_IKeyEventListener*>;
- SysTryCatch(NID_UI, __pKeyEventListeners, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, __pKeyEventListeners, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pEventManager->AddKeyEventListener(*__pKeyEventListener);
if (__pInstance == null)
{
__pInstance = new (std::nothrow) _KeyEventManager;
- SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
}
}
virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
- if (keyInfo.GetKeyCode() > _KEY_HARDWARE_MAX)
- {
- return false;
- }
-
Tizen::Base::Collection::IEnumeratorT<IKeyEventListener*>* pEnum = __keyMgrImpl.__pPublicKeyEventListeners->GetEnumeratorN();
_ControlImpl* pImpl = static_cast<_ControlImpl*>(source.GetUserData());
SysTryCatch(NID_UI, pImpl != null, , E_SYSTEM, "[E_SYSTEM] System error occurred. ");
virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
- if (keyInfo.GetKeyCode() > _KEY_HARDWARE_MAX)
- {
- return false;
- }
-
Tizen::Base::Collection::IEnumeratorT<IKeyEventListener*>* pEnum = __keyMgrImpl.__pPublicKeyEventListeners->GetEnumeratorN();
_ControlImpl* pImpl = static_cast<_ControlImpl*>(source.GetUserData());
SysTryCatch(NID_UI, pImpl != null, , E_SYSTEM, "[E_SYSTEM] System error occurred. ");
_KeyEventManagerImpl::_KeyEventManagerImpl(void)
{
__pPublicKeyEventListeners = new (std::nothrow) Tizen::Base::Collection::LinkedListT <IKeyEventListener*>;
- SysTryReturnVoidResult(NID_UI, __pPublicKeyEventListeners, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pPublicKeyEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pKeyEventListeners = new (std::nothrow) PublicEventListener(*this);
- SysTryReturnVoidResult(NID_UI, __pKeyEventListeners, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pKeyEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
_KeyEventManager* pKeyMgr = _KeyEventManager::GetInstance();
if (pKeyMgr != null)
if (__pInstance == null)
{
__pInstance = new (std::nothrow) _KeyEventManagerImpl;
- SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
}
}
if (pImplLayout == null)
{
delete pCoreLayout;
- SysLogException(NID_UI, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysLogException(NID_UI, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return E_OUT_OF_MEMORY;
}
case LAYOUT_RELATIVE:
{
RelativeLayout* pPublicLayout = new (std::nothrow) RelativeLayout;
- SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl);
case LAYOUT_VERTICAL_BOX:
{
VerticalBoxLayout* pPublicLayout = new (std::nothrow) VerticalBoxLayout;
- SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl);
case LAYOUT_HORIZONTAL_BOX:
{
HorizontalBoxLayout* pPublicLayout = new (std::nothrow) HorizontalBoxLayout;
- SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl);
case LAYOUT_GRID:
{
GridLayout* pPublicLayout = new (std::nothrow) GridLayout;
- SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl);
case LAYOUT_CARD:
{
CardLayout* pPublicLayout = new (std::nothrow) CardLayout;
- SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl);
}
void
+_ModalLoopManager::SetLastExitCode(int lastExitCode)
+{
+ __lastExitCode = lastExitCode;
+}
+
+void
_ModalLoopManager::OnTimerExpired(Timer& timer)
{
const int count = __pTimerInfoList->GetCount();
{
return;
}
+ pRootWindow->ResetFocusList();
int rotation = pEcoreEvas->GetWindowRotation(*pRootWindow);
OrientationStatus status = ORIENTATION_STATUS_NONE;
__status = status;
pEcoreEvas->AllowSetWindowBounds(false);
+ // depend on WM.
+ // <1> Update Frame(not Full Screen) bounds by WM.
+ if (pRootWindow->IsOrientationRoot() == true)
+ {
+ _Frame* pFrame = static_cast<_Frame*>(pRootWindow);
+ if (pFrame->GetShowMode(false) != FRAME_SHOW_MODE_FULL_SCREEN)
+ {
+ Rectangle winBounds = pEcoreEvas->GetWindowBounds(*pRootWindow);
+ SysLog(NID_UI, "[WM ROTATION]<M>[WIN 0x%x] Frame bounds Updated by WM(%d, %d, %d, %d).", pRootWindow->GetNativeHandle(), winBounds.x, winBounds.y, winBounds.width, winBounds.height);
+ pRootWindow->SetBounds(winBounds);
+ }
+ }
+
+ // <2> Skip RotateWindow if Frame bounds is not changed by APP.
+ FloatRectangle preBounds = pRootWindow->GetBoundsF();
FireEvent(status, true);
+ FloatRectangle nextBounds = pRootWindow->GetBoundsF();
pEcoreEvas->AllowSetWindowBounds(true);
// For the form to be made by Ui-Builder
}
}
- pEcoreEvas->RotateWindow(*pRootWindow, rotation, false);
+ if (preBounds != nextBounds)
+ {
+ pEcoreEvas->RotateWindow(*pRootWindow, rotation, false);
+ }
if (__statusChanged == true)
{
_TouchManager* pTouchManager = _TouchManager::GetInstance();
if (pTouchManager)
{
- pTouchManager->SetTouchCanceled(null);
+ pTouchManager->ResetTouchInfo();
+ SysLog(NID_UI, "ResetTouchInfo");
+ }
+
+ _UiEventManager* pUiEventManger = _UiEventManager::GetInstance();
+ if (pUiEventManger)
+ {
+ pUiEventManger->ClearEventQueue();
}
}
#include <FBaseColIMap.h>
#include <FBaseColArrayListT.h>
#include <FBaseSysLog.h>
+#include <FBaseUtilStringTokenizer.h>
#include <FIoDirectory.h>
#include <FIoFile.h>
#include <FGrpBitmap.h>
#include "FUi_ResourceConfigLoader.h"
#include "FUi_ResourceConfigParser.h"
#include "FUi_ResourceMapContainer.h"
+#include "FUi_ResourceConfigTypes.h"
using namespace Tizen::App;
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Utility;
using namespace Tizen::Io;
using namespace Tizen::Graphics;
using namespace Tizen::Media;
}
};
+class _ResourceConfigInitiator
+{
+public:
+ _ResourceConfigInitiator(void)
+ {
+ }
+ ~_ResourceConfigInitiator(void)
+ {
+ }
+private:
+ Tizen::Ui::_Resource::_ACCESSIBILITY __ACESSIBILITY;
+ Tizen::Ui::_Resource::_BASIC __BASIC;
+ Tizen::Ui::_Resource::_BUTTON __BUTTON;
+ Tizen::Ui::_Resource::_CHECKBUTTON __CHECKBUTTON;
+ Tizen::Ui::_Resource::_COLORPICKER __COLORPICKER;
+ Tizen::Ui::_Resource::_CONTEXTMENU __CONTEXTMENU;
+ Tizen::Ui::_Resource::_DATETIMEBAR __DATETIMEBAR;
+ Tizen::Ui::_Resource::_DATETIMEPICKER __DATETIMEPICKER;
+ Tizen::Ui::_Resource::_DIMMINGLAYER __DIMMINGLAYER;
+ Tizen::Ui::_Resource::_EDIT __EDIT;
+ Tizen::Ui::_Resource::_EDITDATE __EDITDATE;
+ Tizen::Ui::_Resource::_EDITTIME __EDITTIME;
+ Tizen::Ui::_Resource::_FASTSCROLL __FASTSCROLL;
+ Tizen::Ui::_Resource::_FOCUSUI __FOCUSUI;
+ Tizen::Ui::_Resource::_FOOTER __FOOTER;
+ Tizen::Ui::_Resource::_FORM __FORM;
+ Tizen::Ui::_Resource::_GALLERY __GALLERY;
+ Tizen::Ui::_Resource::_GROUPCONTAINER __GROUPCONTAINER;
+ Tizen::Ui::_Resource::_HEADER __HEADER;
+ Tizen::Ui::_Resource::_ICONLIST __ICONLIST;
+ Tizen::Ui::_Resource::_INPUTPAD __INPUTPAD;
+ Tizen::Ui::_Resource::_LABEL __LABEL;
+ Tizen::Ui::_Resource::_LIST __LIST;
+ Tizen::Ui::_Resource::_LISTVIEW __LISTVIEW;
+ Tizen::Ui::_Resource::_APPWIDGET __APPWIDGET;
+ Tizen::Ui::_Resource::_MESSAGEBOX __MESSAGEBOX;
+ Tizen::Ui::_Resource::_OPTIONMENU __OPTIONMENU;
+ Tizen::Ui::_Resource::_OVERLAYPANEL __OVERLAYPANEL;
+ Tizen::Ui::_Resource::_PANEL __PANEL;
+ Tizen::Ui::_Resource::_POPUP __POPUP;
+ Tizen::Ui::_Resource::_PROGRESS __PROGRESS;
+ Tizen::Ui::_Resource::_RADIOGROUP __RADIOGROUP;
+ Tizen::Ui::_Resource::_SCROLL __SCROLL;
+ Tizen::Ui::_Resource::_SEARCHBAR __SEARCHBAR;
+ Tizen::Ui::_Resource::_SLIDER __SLIDER;
+ Tizen::Ui::_Resource::_SPLITPANEL __SPLITPANEL;
+ Tizen::Ui::_Resource::_TABBAR __TABBAR;
+ Tizen::Ui::_Resource::_TAB __TAB;
+ Tizen::Ui::_Resource::_TABLEVIEW __TABLEVIEW;
+ Tizen::Ui::_Resource::_TOKENEDIT __TOKENEDIT;
+};
+
MediaPixelFormat ConvertBitmapPixelFormatToMediaPixelFormat(BitmapPixelFormat format)
{
MediaPixelFormat out = MEDIA_PIXEL_FORMAT_NONE;
}
return outPattern;
}
-}
+extern "C"
+{
+ __attribute__((constructor)) void _OSP_EXPORT_ _ResourceManager_PreInitialize(void)
+ {
+ Tizen::Ui::_ResourceManager::PreInitialize();
+ }
+}
+}
namespace Tizen { namespace Graphics
{
result
_ResourceManager*
_ResourceManager::GetInstance(void)
{
- static pthread_once_t onceBlock = PTHREAD_ONCE_INIT;
-
- if (pRsrcMgr == null)
+ if(unlikely(pRsrcMgr == null))
{
- pthread_once(&onceBlock, CreateInstance);
- pRsrcMgr->DoPostInitialization();
+ PreInitialize();
+ }
+ if(unlikely(!(pRsrcMgr->__postInitialize)))
+ {
+ pRsrcMgr->PostInitialize();
}
return pRsrcMgr;
}
void
_ResourceManager::CreateInstance(void)
{
+ static _ResourceConfigInitiator initiator;
static _ResourceManager pManager;
pRsrcMgr = &pManager;
- _CanvasImpl::SetThemeInfoCallback(_GetDefaultForegroundColor, _GetDefaultBackgroundColor);
}
_ResourceManager::_ResourceManager(void)
: __pStringLoader(null)
+ , __pParser(null)
, __pTransformer(null)
, __appBasePortraitMode("")
, __appBaseLandscapeMode("")
, __userTheme(L"")
, __appliedUserTheme(false)
, __initializeFeedback(false)
+ , __preInitialize(false)
+ , __postInitialize(false)
, __appBaseWidth(-1)
, __appBaseHeight(-1)
- , __targetWidth(0)
- , __targetHeight(0)
- , __deviceDPI(0)
+ , __targetWidth(-1)
+ , __targetHeight(-1)
+ , __deviceDPI(-1)
, __feedbackStatus(_RESOURCE_FEEDBACK_STATUS_INIT)
, __feedbackAcquireCount(0)
, __pFallbackList(null)
{
- __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT] = null;
- __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE] = null;
- __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT] = null;
- __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE] = null;
+ if(__preInitialize == false)
+ {
+ __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT] = null;
+ __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE] = null;
+ __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT] = null;
+ __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE] = null;
+ __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT] = new (std::nothrow) MapContainer();
+ SysTryReturnVoidResult(NID_UI, __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT], E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
+ if (!(InitializeTheme(*__pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT])))
+ {
+ SysAssert(0);
+ }
+ __pStringLoader = new (std::nothrow) StringLoader();
+ SysTryReturnVoidResult(NID_UI, __pStringLoader, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
+ __pParser = new _Resource::ConfigParser();
+ __preInitialize = true;
+ }
+ result r = E_SUCCESS;
- int appBaseWidth = DEFAULT_SCREEN_WIDTH;
- int appBaseHeight = DEFAULT_SCREEN_HEIGHT;
+ r = Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/screen.dpi", __deviceDPI);
+ SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred");
+ r = Tizen::System::_SystemInfoImpl::GetSysInfo("http://tizen.org/feature/screen.width", __targetWidth);
+ SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred");
+ r = Tizen::System::_SystemInfoImpl::GetSysInfo("http://tizen.org/feature/screen.height", __targetHeight);
+ SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred");
- result r = E_SUCCESS;
+ __targetPortraitMode.Append(__targetWidth);
+ __targetPortraitMode.Append(L"x");
+ __targetPortraitMode.Append(__targetHeight);
- int appLogicalResolution = _CoordinateSystem::GetInstance()->GetLogicalResolutionInt();
+ __targetLandscapeMode.Append(__targetHeight);
+ __targetLandscapeMode.Append(L"x");
+ __targetLandscapeMode.Append(__targetWidth);
+ ClearLastResult();
+}
- if (_CreateCoordinateTransformer(__pTransformer,DEFAULT_SCREEN_WIDTH, _CoordinateSystem::GetInstance()->GetLogicalBaseScreenSize(),
- Dimension(appLogicalResolution, appLogicalResolution), _CoordinateSystem::GetInstance()->GetPhysicalBaseScreenSize()) != E_SUCCESS)
+void
+_ResourceManager::PreInitialize(void)
+{
+ static pthread_once_t onceBlock = PTHREAD_ONCE_INIT;
+ if (pRsrcMgr == null)
{
-
- SysAssert(0);
+ pthread_once(&onceBlock, CreateInstance);
}
- r = Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/screen.dpi", __deviceDPI);
- SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred");
-
- _ControlManager::GetInstance()->SetScreenDpi(__deviceDPI);
+}
+void
+_ResourceManager::PostInitialize(void)
+{
+ int appLogicalResolution = _CoordinateSystem::GetInstance()->GetLogicalResolutionInt();
+ int appBaseWidth = 0;
+ int appBaseHeight = 0;
+ result r = E_FAILURE;
switch(appLogicalResolution)
{
case 240:
appBaseHeight = 1280;
break;
default:
- r = Tizen::System::_SystemInfoImpl::GetSysInfo("http://tizen.org/feature/screen.width", appBaseWidth);
- SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred");
- r = Tizen::System::_SystemInfoImpl::GetSysInfo("http://tizen.org/feature/screen.height", appBaseHeight);
- SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred");
+ appBaseWidth = __targetWidth;
+ appBaseHeight = __targetHeight;
break;
}
__appBaseWidth = appBaseWidth;
__appBaseLandscapeMode.Append(appBaseHeight);
__appBaseLandscapeMode.Append(L"x");
__appBaseLandscapeMode.Append(appBaseWidth);
- int _width = 0;
- int _height = 0;
- r = Tizen::System::_SystemInfoImpl::GetSysInfo("http://tizen.org/feature/screen.width", _width);
- SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred");
- r = Tizen::System::_SystemInfoImpl::GetSysInfo("http://tizen.org/feature/screen.height", _height);
- SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] system error occurred");
-
- __targetWidth = _width;
- __targetHeight = _height;
- __targetPortraitMode.Append(_width);
- __targetPortraitMode.Append(L"x");
- __targetPortraitMode.Append(_height);
-
- __targetLandscapeMode.Append(_height);
- __targetLandscapeMode.Append(L"x");
- __targetLandscapeMode.Append(_width);
-
+ _ControlManager::GetInstance()->SetScreenDpi(__deviceDPI);
+ if (_CreateCoordinateTransformer(__pTransformer,DEFAULT_SCREEN_WIDTH, _CoordinateSystem::GetInstance()->GetLogicalBaseScreenSize(),
+ Dimension(appLogicalResolution, appLogicalResolution), _CoordinateSystem::GetInstance()->GetPhysicalBaseScreenSize()) != E_SUCCESS)
+ {
+ SysAssert(0);
+ }
Dimension dim = _CoordinateSystemUtils::InverseTransform(Dimension(_Screen::GetWidth(), _Screen::GetHeight()));
__logicalWidth = dim.width;
__logicalHeight = dim.height;
_ThemeInfo::LoadThemeInformation(__systemTheme, __userTheme);
-
- // theme 2.0
- __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT] = new (std::nothrow) MapContainer();
- SysTryReturnVoidResult(NID_UI, __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT], E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
__pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->SetResolution(__appBasePortraitMode);
- if (!(InitializeTheme(*__pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT])))
+ SelectConfigTable();
+ if (__userTheme.GetLength() > 0)
{
- SysAssert(0);
+ String themeFile = String(_AppInfo::GetAppRootPath()+L"res/themes/" +__userTheme + L"/" +__userTheme + ".xml");
+ if(File::IsFileExist(themeFile))
+ {
+ r = __pParser->Parse(themeFile, *(__pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]));
+ }
}
- __pStringLoader = new (std::nothrow) StringLoader();
- SysTryReturnVoidResult(NID_UI, __pStringLoader, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
+ _CanvasImpl::SetThemeInfoCallback(_GetDefaultForegroundColor, _GetDefaultBackgroundColor);
+ __postInitialize = true;
+ DoPostInitialization();
+ ClearLastResult();
+}
+
+void
+_ResourceManager::SelectConfigTable(void)
+{
+ __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->SetPalette(__systemTheme);
}
bool
{
bool r = true;
String themeFile(L"");
- mapContainer.CreateMap(RESOURCE_TYPE_SHAPE);
- mapContainer.CreateMap(RESOURCE_TYPE_FIXED_VALUE);
- mapContainer.CreateMap(RESOURCE_TYPE_DIMENSION);
mapContainer.CreateMap(RESOURCE_TYPE_IMAGE);
mapContainer.CreateMap(RESOURCE_TYPE_COLOR);
mapContainer.CreateMap(RESOURCE_TYPE_ANIMATION);
- mapContainer.SetResolution(__appBasePortraitMode);
-
- themeFile = String(L"/usr/share/osp/themes/"+__systemTheme + ".xml");
-
- LoadPaletteInformation(__systemTheme);
- LoadConfig(__appBasePortraitMode, mapContainer, __appBaseWidth, __appBaseHeight);
- if (__userTheme.GetLength() > 0)
- {
- themeFile = String(_AppInfo::GetAppRootPath()+L"res/themes/" +__userTheme + L"/" +__userTheme + ".xml");
- if(File::IsFileExist(themeFile))
- {
- ConfigParser* pParser = new (std::nothrow) ConfigParser();
- SysTryReturn(NID_UI, pParser, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
- r = pParser->Parse(themeFile, mapContainer);
- delete pParser;
- }
- }
-
+ LoadPaletteInformation("black");
+ LoadPaletteInformation("white");
+ LoadPaletteInformation("default");
+ LoadConfig(L"", mapContainer, 0, 0, true);
return r;
}
void
-_ResourceManager::LoadConfig(const String& resolution, MapContainer& mapContainer, int width, int height)
+_ResourceManager::LoadConfig(const String& resolution, MapContainer& mapContainer, int width, int height, bool preInit)
{
- _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetTransformerN(__appBaseWidth, _CoordinateSystem::GetInstance()->GetLogicalBaseScreenSize(),
- Dimension(width, height), BASE_SCREEN_SIZE_NORMAL);
+ _ICoordinateSystemTransformer* pTransformer = null;
+ if(!preInit)
+ {
+ pTransformer = _CoordinateSystem::GetTransformerN(__appBaseWidth, _CoordinateSystem::GetInstance()->GetLogicalBaseScreenSize(),Dimension(width, height), BASE_SCREEN_SIZE_NORMAL);
+ }
if (pTransformer)
{
_SCREEN_HEIGHT_ = pTransformer->Transform(__logicalHeight);
+ delete pTransformer;
}
else
{
ConfigLoader::GetInstance()->GetInitFunc(i, func);
if (func)
{
- func(mapContainer, resolution);
+ func(mapContainer, resolution, preInit);
}
}
- delete pTransformer;
}
void
_ResourceManager::GetMapContainer(MapContainerType type)
{
MapContainer* pContainer = null;
+ static bool preinit = false;
switch (type)
{
case MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT:
pContainer = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT];
+ if(preinit)
+ {
+ break;
+ }
+ pContainer->CreateMap(RESOURCE_TYPE_SHAPE);
+ pContainer->CreateMap(RESOURCE_TYPE_FIXED_VALUE);
+ pContainer->CreateMap(RESOURCE_TYPE_DIMENSION);
+ pContainer->SetResolution(__appBasePortraitMode);
+ LoadConfig(__appBasePortraitMode, *pContainer, __appBaseWidth, __appBaseHeight, false);
+ preinit = true;
break;
case MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE:
if (__pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE])
pContainer->CreateMap(RESOURCE_TYPE_SHAPE);
pContainer->CreateMap(RESOURCE_TYPE_DIMENSION);
pContainer->CreateMap(RESOURCE_TYPE_FIXED_VALUE);
- LoadConfig(__appBaseLandscapeMode, *pContainer, __appBaseWidth, __appBaseHeight);
+ LoadConfig(__appBaseLandscapeMode, *pContainer, __appBaseWidth, __appBaseHeight, false);
__pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE] = pContainer;
}
break;
pContainer->CreateMap(RESOURCE_TYPE_SHAPE);
pContainer->CreateMap(RESOURCE_TYPE_DIMENSION);
pContainer->CreateMap(RESOURCE_TYPE_FIXED_VALUE);
- LoadConfig(__defaultPortraitMode, *pContainer, DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT);
+ LoadConfig(__defaultPortraitMode, *pContainer, DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT, false);
__pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT] = pContainer;
}
}
pContainer->CreateMap(RESOURCE_TYPE_SHAPE);
pContainer->CreateMap(RESOURCE_TYPE_DIMENSION);
pContainer->CreateMap(RESOURCE_TYPE_FIXED_VALUE);
- LoadConfig(__defaultLandscapeMode, *pContainer, DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT);
+ LoadConfig(__defaultLandscapeMode, *pContainer, DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT, false);
__pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE] = pContainer;
}
}
delete __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE];
__pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE] = null;
}
-
+ delete __pParser;
+ __pParser = null;
feedback_deinitialize();
}
void
}
result
-_ResourceManager::GetBitmapInternalN(const String& fileName, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool isCustom, bool replacementColor, int color, Bitmap*& pBitmap)
+_ResourceManager::GetBitmapInternalN(const String& fileName, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool isCustom, bool replacementColor, const Color& color, Bitmap*& pBitmap)
{
- result r = E_SYSTEM;
+ result r = E_SUCCESS;
Bitmap* pTempBitmap = null;
int foundFolderWidth = 0;
String fullName = FindImagePath(fileName, foundFolderWidth, isCustom);
if(foundFolderWidth == __targetWidth)
{
- pTempBitmap = new (std::nothrow) Bitmap;
- SysTryReturn(NID_UI, pTempBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(r));
- r = _BitmapImpl::GetInstance(*pTempBitmap)->Construct(fullName, pixelFormat);
- SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- pBitmap = pTempBitmap;
- return r;
- }
- else
- {
- if (_BitmapImpl::HasNinePatchedBitmapTag(fileName))
+ if (replacementColor)
+ {
+ ByteBuffer* pImageBuffer = null;
+ int imageWidth = 0;
+ int imageHeight = 0;
+ MediaPixelFormat format = ConvertBitmapPixelFormatToMediaPixelFormat(pixelFormat);
+ pImageBuffer = _ImageDecoder::DecodeToBufferN(fullName, format, imageWidth, imageHeight);
+ if (pImageBuffer)
+ {
+ pTempBitmap = _BitmapImpl::GetNonScaledBitmapN(*pImageBuffer, Dimension(imageWidth, imageHeight), pixelFormat);
+ delete pImageBuffer;
+ }
+ if( pTempBitmap)
+ {
+ Bitmap* pReplacementBitmap = null;
+ pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), color);
+ if(pReplacementBitmap)
+ {
+ delete pTempBitmap;
+ pBitmap = pReplacementBitmap;
+ }
+ }
+ }
+ else
{
pTempBitmap = new (std::nothrow) Bitmap;
SysTryReturn(NID_UI, pTempBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(r));
pBitmap = pTempBitmap;
return r;
}
- else
+ }
+ else
+ {
+ if (_BitmapImpl::HasNinePatchedBitmapTag(fileName))
+ {
+ if (replacementColor)
+ {
+ ByteBuffer* pImageBuffer = null;
+ int imageWidth = 0;
+ int imageHeight = 0;
+ MediaPixelFormat format = ConvertBitmapPixelFormatToMediaPixelFormat(pixelFormat);
+ pImageBuffer = _ImageDecoder::DecodeToBufferN(fullName, format, imageWidth, imageHeight);
+ if (pImageBuffer)
+ {
+ pTempBitmap = _BitmapImpl::GetNonScaledBitmapN(*pImageBuffer, Dimension(imageWidth, imageHeight), pixelFormat);
+ delete pImageBuffer;
+ }
+ if( pTempBitmap)
+ {
+ Bitmap* pReplacementBitmap = null;
+ pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), color);
+ if(pReplacementBitmap)
+ {
+ delete pTempBitmap;
+ pBitmap = pReplacementBitmap;
+ }
+ }
+ }
+ else // no replacementColor
+ {
+ pTempBitmap = new (std::nothrow) Bitmap;
+ SysTryReturn(NID_UI, pTempBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(r));
+ r = _BitmapImpl::GetInstance(*pTempBitmap)->Construct(fullName, pixelFormat);
+ SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ pBitmap = pTempBitmap;
+ return r;
+ }
+ }
+ else // no ninepatched
{
ByteBuffer* pImageBuffer = null;
int imageWidth = 0;
pTempBitmap = _BitmapImpl::GetNonScaledBitmapN(*pImageBuffer, Dimension(imageWidth, imageHeight), pixelFormat);
delete pImageBuffer;
}
+ else
+ {
+ r = E_SYSTEM;
+ }
if(pTempBitmap != null)
{
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pTempBitmap))
delete pTempBitmap;
pTempBitmap = pReplacementBitmap;
}
+
}
+
+ pTempBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_HIGH);
+
float scaleFactor = (float)((float)__targetWidth/(float)foundFolderWidth);
r = pTempBitmap->Scale(Dimension(pTempBitmap->GetWidth()*scaleFactor, pTempBitmap->GetHeight()*scaleFactor));
if (r == E_SUCCESS)
}
result
-_ResourceManager::GetBitmapN(int bitmapId, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool replacementColor, int color, Bitmap*& pBitmap)
+_ResourceManager::GetBitmapN(int bitmapId, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool replacementColor, const Color& color, Bitmap*& pBitmap)
{
result r = E_SYSTEM;
ResourceItem* pItem = null;
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
- r = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetShapeMap()->GetValue(shapeId, pItem);
+ r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem);
if (r != E_SUCCESS)
{
r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem);
r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem);
if (r != E_SUCCESS)
{
- r = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetShapeMap()->GetValue(shapeId, pItem);
+ r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem);
}
}
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
- r = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetShapeMap()->GetValue(shapeId, pItem);
+ r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem);
if (r != E_SUCCESS)
{
r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem);
r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem);
if (r != E_SUCCESS)
{
- r = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetShapeMap()->GetValue(shapeId, pItem);
+ r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem);
}
}
}
__initializeFeedback = true;
}
+
if (__feedbackStatus == _RESOURCE_FEEDBACK_STATUS_PLAYED)
{
SysLog(NID_UI, "feedback is already played.");
return r;
}
-#define ADD_PALETTE(id, value)\
+#define ADD_PALETTE(id, value, theme)\
{\
ResourceKey resourceKey(#id);\
ResourceItem* pItem = new (std::nothrow) ResourceItem(RESOURCE_TYPE_COLOR); \
pItem->SetRawDataColor(value);\
- __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetPalette()->Add(resourceKey, pItem);\
+ __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetPalette(theme)->Add(resourceKey, pItem);\
}
void
_ResourceManager::LoadBlackPalette(void)
{
- ADD_PALETTE(BASIC::foreground, 0xFFFFFFFF);
- ADD_PALETTE(BASIC::background, 0xFF000000);
- ADD_PALETTE(BASIC::B011, 0xFF000000);
- ADD_PALETTE(BASIC::B012, 0xFF000000);
- ADD_PALETTE(BASIC::B013, 0xFF000000);
- ADD_PALETTE(BASIC::B014, 0xFFFFFFFF);
- ADD_PALETTE(BASIC::B015, 0xFFF8F6EF);
- ADD_PALETTE(BASIC::B016, 0xFF000000);
- ADD_PALETTE(BASIC::B017, 0xFF000000);
- ADD_PALETTE(BASIC::B018, 0xFF6590FF);
- ADD_PALETTE(BASIC::B0211, 0xFF000000);
- ADD_PALETTE(BASIC::B0211D, 0xFF000000);
- ADD_PALETTE(BASIC::B0212, 0xFF1C1E28);
- ADD_PALETTE(BASIC::B0213, 0xFF404040);
- ADD_PALETTE(BASIC::B0214, 0xFF222C47);
- ADD_PALETTE(BASIC::B0215, 0xFF1D263C);
- ADD_PALETTE(BASIC::B0216, 0xFF222C47);
- ADD_PALETTE(BASIC::B0217, 0xFF11131B);
- ADD_PALETTE(BASIC::B0217D, 0x7F11131B);
- ADD_PALETTE(BASIC::B0221, 0xFFFFFFFF);
- ADD_PALETTE(BASIC::B0221L1, 0xFF838CA3);
- ADD_PALETTE(BASIC::B0221L2, 0xFF697082);
- ADD_PALETTE(BASIC::B0221L3, 0xFF6B707E);
- ADD_PALETTE(BASIC::B0221L4, 0xFF525252);
- ADD_PALETTE(BASIC::B0222, 0xFF404040);
- ADD_PALETTE(BASIC::B0223, 0x00000000);
- ADD_PALETTE(BASIC::B0224, 0xFF27282B);
- ADD_PALETTE(BASIC::B0225, 0xFF2A5181);
- ADD_PALETTE(BASIC::B0226, 0xFF4B73A3);
- ADD_PALETTE(BASIC::B0227, 0xFF000000);
- ADD_PALETTE(BASIC::B0228, 0xFF1A5274);
- ADD_PALETTE(BASIC::B0232, 0x00000000);
- ADD_PALETTE(BASIC::B0233, 0x00000000);
- ADD_PALETTE(BASIC::B031, 0x00000000);
- ADD_PALETTE(BASIC::B041, 0xFF2B3AAF);
- ADD_PALETTE(BASIC::B041P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B042, 0xFF2A39AC);
- ADD_PALETTE(BASIC::B043, 0x00001BEA);
- ADD_PALETTE(BASIC::B044, 0xFF2B3AAF);
- ADD_PALETTE(BASIC::B0511, 0xFF313F66);
- ADD_PALETTE(BASIC::B0511P, 0xFF2A39AC);
- ADD_PALETTE(BASIC::B0512, 0x00000000);
- ADD_PALETTE(BASIC::B0513, 0xFFF8F6EF);
- ADD_PALETTE(BASIC::B0514, 0xFF313F66);
- ADD_PALETTE(BASIC::B0514P1, 0xFF303FB2);
- ADD_PALETTE(BASIC::B0514P2, 0xFF5163E9);
- ADD_PALETTE(BASIC::B0514L3, 0xFF6590FF);
- ADD_PALETTE(BASIC::B0515L1, 0xFF464C5E);
- ADD_PALETTE(BASIC::B0515L2, 0x7F454442);
- ADD_PALETTE(BASIC::B0516, 0x00000000);
- ADD_PALETTE(BASIC::B0517, 0x00000000);
- ADD_PALETTE(BASIC::B0517P1, 0x00000000);
- ADD_PALETTE(BASIC::B0517P2, 0x00000000);
- ADD_PALETTE(BASIC::B0518, 0xFF2E4468);
- ADD_PALETTE(BASIC::B0518P, 0x00000000);
- ADD_PALETTE(BASIC::B0519, 0xFFF25D28);
- ADD_PALETTE(BASIC::B0520, 0xFF2E4468);
- ADD_PALETTE(BASIC::B0520P, 0xFF3C649B);
- ADD_PALETTE(BASIC::B052L1, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L1P, 0xFF5D83FF);
- ADD_PALETTE(BASIC::B052L1D, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L2, 0x00000000);
- ADD_PALETTE(BASIC::B052L2P, 0x005787B8);
- ADD_PALETTE(BASIC::B052L3, 0x00000000);
- ADD_PALETTE(BASIC::B052L3P, 0x00000000);
- ADD_PALETTE(BASIC::B052L4, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L4D, 0x66FAFAFA);
- ADD_PALETTE(BASIC::B052L5, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L5D, 0x66FAFAFA);
- ADD_PALETTE(BASIC::B052L5P, 0xFF5D83FF);
- ADD_PALETTE(BASIC::B052L6, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L6D, 0x99FAFAFA);
- ADD_PALETTE(BASIC::B052L6P1, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L6P2, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L7, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L8, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L8P, 0xFF5D83FF);
- ADD_PALETTE(BASIC::B052L8D, 0x66FAFAFA);
- ADD_PALETTE(BASIC::B052L9, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L9P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L9D, 0x66FAFAFA);
- ADD_PALETTE(BASIC::B052L10, 0x00000000);
- ADD_PALETTE(BASIC::B0531, 0xFFF8F6EF);
- ADD_PALETTE(BASIC::B0532, 0x00000000);
- ADD_PALETTE(BASIC::B0533, 0x00000000);
- ADD_PALETTE(BASIC::B0534, 0x00000000);
- ADD_PALETTE(BASIC::B0535, 0x00000000);
- ADD_PALETTE(BASIC::B0536, 0x00000000);
- ADD_PALETTE(BASIC::B0537, 0x00000000);
- ADD_PALETTE(BASIC::B0541, 0xFF6B728A);
- ADD_PALETTE(BASIC::B0541P, 0xFF0D1D96);
- ADD_PALETTE(BASIC::B0541D, 0x996B728A);
- ADD_PALETTE(BASIC::B0542, 0x00000000);
- ADD_PALETTE(BASIC::B0542P, 0x00000000);
- ADD_PALETTE(BASIC::B0543, 0x00000000);
- ADD_PALETTE(BASIC::B0544, 0x00000000);
- ADD_PALETTE(BASIC::B0545, 0x00000000);
- ADD_PALETTE(BASIC::B0551, 0x00000000);
- ADD_PALETTE(BASIC::B0552, 0x00000000);
- ADD_PALETTE(BASIC::B0553, 0xFFA5A5A5);
- ADD_PALETTE(BASIC::B0554, 0xFFFFFFFF);
- ADD_PALETTE(BASIC::B0555, 0x00000000);
- ADD_PALETTE(BASIC::B0556, 0x00000000);
- ADD_PALETTE(BASIC::B0557, 0x00000000);
- ADD_PALETTE(BASIC::B0558, 0x00000000);
- ADD_PALETTE(BASIC::B061L1, 0xFF1D263C);
- ADD_PALETTE(BASIC::B061L2, 0xFF49577B);
- ADD_PALETTE(BASIC::B061L3, 0xFF969A9C);
- ADD_PALETTE(BASIC::B061L4, 0xFF1D263C);
- ADD_PALETTE(BASIC::B061L5, 0xFF000000);
- ADD_PALETTE(BASIC::B061L6, 0xFF333537);
- ADD_PALETTE(BASIC::B0621L1, 0x00000000);
- ADD_PALETTE(BASIC::B0621L2, 0x00000000);
- ADD_PALETTE(BASIC::B0622L1, 0x001D263C);
- ADD_PALETTE(BASIC::B0622L2, 0x3FFFFFFF);
- ADD_PALETTE(BASIC::B0623L1, 0xFF1D263C);
- ADD_PALETTE(BASIC::B0623L2, 0xFF626675);
- ADD_PALETTE(BASIC::B0624L1, 0xFF1D263C);
- ADD_PALETTE(BASIC::B0624L2, 0xFF626675);
- ADD_PALETTE(BASIC::B0624L3, 0xFF313F66);
- ADD_PALETTE(BASIC::B0624L4, 0xFF000000);
- ADD_PALETTE(BASIC::B0624L5, 0xFF5783FF);
- ADD_PALETTE(BASIC::B0624L6, 0xFF5783FF);
- ADD_PALETTE(BASIC::B063L1, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B063L1P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B063L1D, 0x99FAFAFA);
- ADD_PALETTE(BASIC::B063L2, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B063L3, 0xFF6E6F76);
- ADD_PALETTE(BASIC::B063L4, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B063L5, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B063L5D, 0x99FAFAFA);
- ADD_PALETTE(BASIC::B063L6, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B063L6P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B063L6D, 0x99FAFAFA);
- ADD_PALETTE(BASIC::B063L7, 0xFF656565);
- ADD_PALETTE(BASIC::B063L8, 0xFF6E6F76);
- ADD_PALETTE(BASIC::B063L8P, 0x00000000);
- ADD_PALETTE(BASIC::B063L8D, 0x996E6F76);
- ADD_PALETTE(BASIC::B063L9, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B064L1, 0xFF6890FF);
- ADD_PALETTE(BASIC::B064L2, 0xFFD7D7D7);
- ADD_PALETTE(BASIC::B064L2P, 0xFFD7D7D7);
- ADD_PALETTE(BASIC::B064L2D, 0xFFD7D7D7);
- ADD_PALETTE(BASIC::B064L3, 0xFF000000);
- ADD_PALETTE(BASIC::B064L3P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B064L3D, 0x7F000000);
- ADD_PALETTE(BASIC::B065L1, 0x00000000);
- ADD_PALETTE(BASIC::B065L2, 0x00000000);
- ADD_PALETTE(BASIC::B065L3, 0x00000000);
- ADD_PALETTE(BASIC::B065L3P, 0x00000000);
- ADD_PALETTE(BASIC::B065L4, 0xFFEEEEEE);
- ADD_PALETTE(BASIC::B065L4D, 0x99EEEEEE);
- ADD_PALETTE(BASIC::B065L4P, 0xFF2A39AC);
- ADD_PALETTE(BASIC::B065L5, 0x00000000);
- ADD_PALETTE(BASIC::B071, 0xFF393B41);
- ADD_PALETTE(BASIC::B0721, 0xFFA09F9A);
- ADD_PALETTE(BASIC::B0722, 0xFF5D83FF);
- ADD_PALETTE(BASIC::B0723, 0xFF212428);
- ADD_PALETTE(BASIC::B0724, 0xFF404040);
- ADD_PALETTE(BASIC::B0725, 0xFF4F66A7);
- ADD_PALETTE(BASIC::B0726, 0xFF404040);
- ADD_PALETTE(BASIC::B0731, 0xFF2B3AAF);
- ADD_PALETTE(BASIC::B0732, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B0741, 0xFFA09F9A);
- ADD_PALETTE(BASIC::B0742, 0xFF5D83FF);
- ADD_PALETTE(BASIC::B0743, 0xFF212428);
- ADD_PALETTE(BASIC::B0744, 0xFF404040);
- ADD_PALETTE(BASIC::B0745, 0x00000000);
- ADD_PALETTE(BASIC::B0751, 0xFF3B73B6);
- ADD_PALETTE(BASIC::F011L1, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F011L1P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F011L1D, 0x7FFAFAFA);
- ADD_PALETTE(BASIC::F011L2, 0xFF6890FF);
- ADD_PALETTE(BASIC::F011L2D, 0x996890FF);
- ADD_PALETTE(BASIC::F011L3, 0xFF6E6F76);
- ADD_PALETTE(BASIC::F011L3D, 0x996E6F76);
- ADD_PALETTE(BASIC::F011L4, 0xFF6E6F76);
- ADD_PALETTE(BASIC::F011L4D, 0x996E6F76);
- ADD_PALETTE(BASIC::F011L5, 0xFF5D83FF);
- ADD_PALETTE(BASIC::F011L6, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F011L7, 0xFF6E6F76);
- ADD_PALETTE(BASIC::F011L7D, 0x996E6F76);
- ADD_PALETTE(BASIC::F011L8, 0xFFD10000);
- ADD_PALETTE(BASIC::F011L9, 0xFFFFFFFF);
- ADD_PALETTE(BASIC::F011L10, 0xFFF9F9F9);
- ADD_PALETTE(BASIC::F011L11, 0xFF808080);
- ADD_PALETTE(BASIC::F011L12, 0xFF4093F7);
- ADD_PALETTE(BASIC::F011L13, 0x00000000);
- ADD_PALETTE(BASIC::F011L14, 0x00000000);
- ADD_PALETTE(BASIC::F011L15, 0xFFD10000);
- ADD_PALETTE(BASIC::F011L16, 0xFF6E6F76);
- ADD_PALETTE(BASIC::F011L17, 0xFF8B8B8B);
- ADD_PALETTE(BASIC::F011L18, 0xFF686868);
- ADD_PALETTE(BASIC::F011L19, 0xFF6E6F76);
- ADD_PALETTE(BASIC::F011L20, 0x00000000);
- ADD_PALETTE(BASIC::F011L21, 0xFF6E6F76);
- ADD_PALETTE(BASIC::F011L22, 0xFF6E6F76);
- ADD_PALETTE(BASIC::F011L23, 0xFF1382FF);
- ADD_PALETTE(BASIC::F021L1i, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F021L1iP, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F021L1iD, 0x99FAFAFA);
- ADD_PALETTE(BASIC::F022L1i, 0xFF6C6E77);
- ADD_PALETTE(BASIC::F022L2i, 0xFF2B3AAF);
- ADD_PALETTE(BASIC::F022L2iD, 0x992B3AAF);
- ADD_PALETTE(BASIC::F031L1, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F031L1P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F031L1D, 0x99FAFAFA);
- ADD_PALETTE(BASIC::F031L2, 0x00000000);
- ADD_PALETTE(BASIC::F031L2P, 0x00000000);
- ADD_PALETTE(BASIC::F031L2D, 0x00000000);
- ADD_PALETTE(BASIC::F031L3, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F031L3P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F031L3D, 0x99FAFAFA);
- ADD_PALETTE(BASIC::F032L1, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F032L1P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F032L1D, 0x99FAFAFA);
- ADD_PALETTE(BASIC::F032L2, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F032L2P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F032L2D, 0x99FAFAFA);
- ADD_PALETTE(BASIC::F032L3, 0xFFF9F9F9);
- ADD_PALETTE(BASIC::F032L3P, 0xFFF9F9F9);
- ADD_PALETTE(BASIC::F041i, 0xFF5D6176);
- ADD_PALETTE(BASIC::F041iD, 0x995D6176);
- ADD_PALETTE(BASIC::F051, 0xFF485D93);
- ADD_PALETTE(BASIC::F052, 0xFF3A72FF);
- ADD_PALETTE(BASIC::F053, 0xFF485D93);
- ADD_PALETTE(BASIC::F053P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F053D, 0x99485D93);
- ADD_PALETTE(BASIC::F054, 0xFF202432);
- ADD_PALETTE(BASIC::F055, 0xFF3A72FF);
- ADD_PALETTE(BASIC::W011, 0xFF4B4D56);
- ADD_PALETTE(BASIC::W011D, 0x994B4D56);
- ADD_PALETTE(BASIC::W012, 0xFF095FD4);
- ADD_PALETTE(BASIC::W012D, 0x99095FD4);
- ADD_PALETTE(BASIC::W012P, 0xFF232F91);
- ADD_PALETTE(BASIC::W013, 0x00000000);
- ADD_PALETTE(BASIC::W0141, 0xFFDB0000);
- ADD_PALETTE(BASIC::W0141P, 0xFFA10808);
- ADD_PALETTE(BASIC::W0141D, 0x99DB0000);
- ADD_PALETTE(BASIC::W015, 0xFF343432);
- ADD_PALETTE(BASIC::W021L1, 0xFF000000);
- ADD_PALETTE(BASIC::W021L1P, 0xFF2B3AAF);
- ADD_PALETTE(BASIC::W021L2, 0xFF425790);
- ADD_PALETTE(BASIC::W021L2P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W021L3, 0xFF425790);
- ADD_PALETTE(BASIC::W021L3P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W021L4, 0xFFF0F0F0);
- ADD_PALETTE(BASIC::W031L1, 0xFF000000);
- ADD_PALETTE(BASIC::W031L1D, 0x99000000);
- ADD_PALETTE(BASIC::W031L2, 0xFF000000);
- ADD_PALETTE(BASIC::W031L2D, 0x99000000);
- ADD_PALETTE(BASIC::W032, 0xFF5D6176);
- ADD_PALETTE(BASIC::W032P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W032D, 0x99FAFAFA);
- ADD_PALETTE(BASIC::W041, 0xFFE1DDD1);
- ADD_PALETTE(BASIC::W051, 0xFF000000);
- ADD_PALETTE(BASIC::W0611, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W0611P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W0611D, 0x99FAFAFA);
- ADD_PALETTE(BASIC::W062L1, 0xFF555861);
- ADD_PALETTE(BASIC::W062L1D, 0x99555861);
- ADD_PALETTE(BASIC::W062L2, 0xFF415BFE);
- ADD_PALETTE(BASIC::W062L2D, 0x7F415BFE);
- ADD_PALETTE(BASIC::W062L3, 0xFFD8D7D2);
- ADD_PALETTE(BASIC::W062L3D, 0x4CD8D7D2);
- ADD_PALETTE(BASIC::W062L4, 0xFF3677C3);
- ADD_PALETTE(BASIC::W062L4D, 0x4C3677C3);
- ADD_PALETTE(BASIC::W062L5, 0xFFC7D3E3);
- ADD_PALETTE(BASIC::W0631, 0xFFEEEEEE);
- ADD_PALETTE(BASIC::W0632, 0xFF4C5158);
- ADD_PALETTE(BASIC::W0641, 0xFF6B6D79);
- ADD_PALETTE(BASIC::W0641P, 0xFF2A39AC);
- ADD_PALETTE(BASIC::W0641D, 0x996B6D79);
- ADD_PALETTE(BASIC::W0651, 0xFF3A3A3A);
- ADD_PALETTE(BASIC::W0711, 0xFF525767);
- ADD_PALETTE(BASIC::W0711P, 0xFF2B3AAF);
- ADD_PALETTE(BASIC::W0711D, 0xFF3E414E);
- ADD_PALETTE(BASIC::W0712, 0xFF4267A9);
- ADD_PALETTE(BASIC::W0713, 0xFF2B3AAF);
- ADD_PALETTE(BASIC::W0714, 0xFF263E5F);
- ADD_PALETTE(BASIC::W0715, 0xFF2B3AAF);
- ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA);
- ADD_PALETTE(BASIC::W0811, 0xFF253296);
- ADD_PALETTE(BASIC::W0812, 0x00000000);
- ADD_PALETTE(BASIC::W0813, 0xFF595959);
- ADD_PALETTE(BASIC::W082, 0x00000000);
- ADD_PALETTE(BASIC::W083, 0x00000000);
- ADD_PALETTE(BASIC::W084, 0xB2FAFAFA);
- ADD_PALETTE(BASIC::W084P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W085, 0x00000000);
- ADD_PALETTE(BASIC::W091, 0xFF2B3AAF);
- ADD_PALETTE(BASIC::W092, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W101, 0xFF4884D6);
- ADD_PALETTE(BASIC::W111, 0xFFC8CEDB);
- ADD_PALETTE(BASIC::W112L1, 0xFF8995AE);
- ADD_PALETTE(BASIC::W112L2, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W1121, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W1122, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W1123, 0x4C000000);
- ADD_PALETTE(BASIC::W1211, 0x00000000);
- ADD_PALETTE(BASIC::W1212, 0x00000000);
- ADD_PALETTE(BASIC::W1221, 0xFF000000);
- ADD_PALETTE(BASIC::W1222, 0xFF878580);
- ADD_PALETTE(BASIC::W1223, 0xFFFFFFFF);
- ADD_PALETTE(BASIC::W131, 0xFF343739);
- ADD_PALETTE(BASIC::W132, 0xFF2B3AAF);
- ADD_PALETTE(BASIC::W141, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W151, 0x66000000);
- ADD_PALETTE(BASIC::W152, 0xFF42434B);
- ADD_PALETTE(BASIC::W153, 0xFF2B3AAF);
- ADD_PALETTE(BASIC::W154, 0xFF1C1E28);
- ADD_PALETTE(BASIC::W161, 0xFF001BEA);
+ String theme = L"black";
+ ADD_PALETTE(BASIC::foreground, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::background, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B011, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B012, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B013, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B014, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::B015, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::B016, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B017, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B018, 0xFF6590FF, theme);
+ ADD_PALETTE(BASIC::B0211, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B0211D, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B0212, 0xFF1C1E28, theme);
+ ADD_PALETTE(BASIC::B0213, 0xFF404040, theme);
+ ADD_PALETTE(BASIC::B0214, 0xFF222C47, theme);
+ ADD_PALETTE(BASIC::B0215, 0xFF1D263C, theme);
+ ADD_PALETTE(BASIC::B0216, 0xFF222C47, theme);
+ ADD_PALETTE(BASIC::B0217, 0xFF11131B, theme);
+ ADD_PALETTE(BASIC::B0217D, 0x7F11131B, theme);
+ ADD_PALETTE(BASIC::B0221, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::B0221L1, 0xFF838CA3, theme);
+ ADD_PALETTE(BASIC::B0221L2, 0xFF697082, theme);
+ ADD_PALETTE(BASIC::B0221L3, 0xFF6B707E, theme);
+ ADD_PALETTE(BASIC::B0221L4, 0xFF525252, theme);
+ ADD_PALETTE(BASIC::B0222, 0xFF404040, theme);
+ ADD_PALETTE(BASIC::B0223, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0224, 0xFF27282B, theme);
+ ADD_PALETTE(BASIC::B0225, 0xFF2A5181, theme);
+ ADD_PALETTE(BASIC::B0226, 0xFF4B73A3, theme);
+ ADD_PALETTE(BASIC::B0227, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B0228, 0xFF1A5274, theme);
+ ADD_PALETTE(BASIC::B0232, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0233, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B031, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B041, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::B041P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B042, 0xFF2A39AC, theme);
+ ADD_PALETTE(BASIC::B043, 0x00001BEA, theme);
+ ADD_PALETTE(BASIC::B044, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::B0511, 0xFF313F66, theme);
+ ADD_PALETTE(BASIC::B0511P, 0xFF2A39AC, theme);
+ ADD_PALETTE(BASIC::B0512, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0513, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::B0514, 0xFF313F66, theme);
+ ADD_PALETTE(BASIC::B0514P1, 0xFF303FB2, theme);
+ ADD_PALETTE(BASIC::B0514P2, 0xFF5163E9, theme);
+ ADD_PALETTE(BASIC::B0514L3, 0xFF6590FF, theme);
+ ADD_PALETTE(BASIC::B0515L1, 0xFF464C5E, theme);
+ ADD_PALETTE(BASIC::B0515L2, 0x7F454442, theme);
+ ADD_PALETTE(BASIC::B0516, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0517, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0517P1, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0517P2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0518, 0xFF2E4468, theme);
+ ADD_PALETTE(BASIC::B0518P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0519, 0xFFF25D28, theme);
+ ADD_PALETTE(BASIC::B0520, 0xFF2E4468, theme);
+ ADD_PALETTE(BASIC::B0520P, 0xFF3C649B, theme);
+ ADD_PALETTE(BASIC::B052L1, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L1P, 0xFF5D83FF, theme);
+ ADD_PALETTE(BASIC::B052L1D, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B052L2P, 0x005787B8, theme);
+ ADD_PALETTE(BASIC::B052L3, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B052L3P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B052L4, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L4D, 0x66FAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L5, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L5D, 0x66FAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L5P, 0xFF5D83FF, theme);
+ ADD_PALETTE(BASIC::B052L6, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L6D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L6P1, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L6P2, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L7, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L8, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L8P, 0xFF5D83FF, theme);
+ ADD_PALETTE(BASIC::B052L8D, 0x66FAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L9, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L9P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L9D, 0x66FAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L10, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0531, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::B0532, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0533, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0534, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0535, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0536, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0537, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0541, 0xFF6B728A, theme);
+ ADD_PALETTE(BASIC::B0541P, 0xFF0D1D96, theme);
+ ADD_PALETTE(BASIC::B0541D, 0x996B728A, theme);
+ ADD_PALETTE(BASIC::B0542, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0542P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0543, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0544, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0545, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0551, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0552, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0553, 0xFFA5A5A5, theme);
+ ADD_PALETTE(BASIC::B0554, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::B0555, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0556, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0557, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0558, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B061L1, 0xFF1D263C, theme);
+ ADD_PALETTE(BASIC::B061L2, 0xFF49577B, theme);
+ ADD_PALETTE(BASIC::B061L3, 0xFF969A9C, theme);
+ ADD_PALETTE(BASIC::B061L4, 0xFF1D263C, theme);
+ ADD_PALETTE(BASIC::B061L5, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B061L6, 0xFF333537, theme);
+ ADD_PALETTE(BASIC::B0621L1, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0621L2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0622L1, 0x001D263C, theme);
+ ADD_PALETTE(BASIC::B0622L2, 0x3FFFFFFF, theme);
+ ADD_PALETTE(BASIC::B0623L1, 0xFF1D263C, theme);
+ ADD_PALETTE(BASIC::B0623L2, 0xFF626675, theme);
+ ADD_PALETTE(BASIC::B0624L1, 0xFF1D263C, theme);
+ ADD_PALETTE(BASIC::B0624L2, 0xFF626675, theme);
+ ADD_PALETTE(BASIC::B0624L3, 0xFF313F66, theme);
+ ADD_PALETTE(BASIC::B0624L4, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B0624L5, 0xFF5783FF, theme);
+ ADD_PALETTE(BASIC::B0624L6, 0xFF5783FF, theme);
+ ADD_PALETTE(BASIC::B063L1, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L1P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L1D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L2, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L3, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::B063L4, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L5, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L5D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L6, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L6P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L6D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L7, 0xFF656565, theme);
+ ADD_PALETTE(BASIC::B063L8, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::B063L8P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B063L8D, 0x996E6F76, theme);
+ ADD_PALETTE(BASIC::B063L9, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B064L1, 0xFF6890FF, theme);
+ ADD_PALETTE(BASIC::B064L2, 0xFFD7D7D7, theme);
+ ADD_PALETTE(BASIC::B064L2P, 0xFFD7D7D7, theme);
+ ADD_PALETTE(BASIC::B064L2D, 0xFFD7D7D7, theme);
+ ADD_PALETTE(BASIC::B064L3, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B064L3P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B064L3D, 0x7F000000, theme);
+ ADD_PALETTE(BASIC::B065L1, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B065L2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B065L3, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B065L3P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B065L4, 0xFFEEEEEE, theme);
+ ADD_PALETTE(BASIC::B065L4D, 0x99EEEEEE, theme);
+ ADD_PALETTE(BASIC::B065L4P, 0xFF2A39AC, theme);
+ ADD_PALETTE(BASIC::B065L5, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B071, 0xFF393B41, theme);
+ ADD_PALETTE(BASIC::B0721, 0xFFA09F9A, theme);
+ ADD_PALETTE(BASIC::B0722, 0xFF5D83FF, theme);
+ ADD_PALETTE(BASIC::B0723, 0xFF212428, theme);
+ ADD_PALETTE(BASIC::B0724, 0xFF404040, theme);
+ ADD_PALETTE(BASIC::B0725, 0xFF4F66A7, theme);
+ ADD_PALETTE(BASIC::B0726, 0xFF404040, theme);
+ ADD_PALETTE(BASIC::B0731, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::B0732, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B0741, 0xFFA09F9A, theme);
+ ADD_PALETTE(BASIC::B0742, 0xFF5D83FF, theme);
+ ADD_PALETTE(BASIC::B0743, 0xFF212428, theme);
+ ADD_PALETTE(BASIC::B0744, 0xFF404040, theme);
+ ADD_PALETTE(BASIC::B0745, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0751, 0xFF3B73B6, theme);
+ ADD_PALETTE(BASIC::F011L1, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F011L1P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F011L1D, 0x7FFAFAFA, theme);
+ ADD_PALETTE(BASIC::F011L2, 0xFF6890FF, theme);
+ ADD_PALETTE(BASIC::F011L2D, 0x996890FF, theme);
+ ADD_PALETTE(BASIC::F011L3, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L3D, 0x996E6F76, theme);
+ ADD_PALETTE(BASIC::F011L4, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L4D, 0x996E6F76, theme);
+ ADD_PALETTE(BASIC::F011L5, 0xFF5D83FF, theme);
+ ADD_PALETTE(BASIC::F011L6, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F011L7, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L7D, 0x996E6F76, theme);
+ ADD_PALETTE(BASIC::F011L8, 0xFFD10000, theme);
+ ADD_PALETTE(BASIC::F011L9, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::F011L10, 0xFFF9F9F9, theme);
+ ADD_PALETTE(BASIC::F011L11, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::F011L12, 0xFF4093F7, theme);
+ ADD_PALETTE(BASIC::F011L13, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F011L14, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F011L15, 0xFFD10000, theme);
+ ADD_PALETTE(BASIC::F011L16, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L17, 0xFF8B8B8B, theme);
+ ADD_PALETTE(BASIC::F011L18, 0xFF686868, theme);
+ ADD_PALETTE(BASIC::F011L19, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L20, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F011L21, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L22, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L23, 0xFF1382FF, theme);
+ ADD_PALETTE(BASIC::F021L1i, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F021L1iP, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F021L1iD, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::F022L1i, 0xFF6C6E77, theme);
+ ADD_PALETTE(BASIC::F022L2i, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::F022L2iD, 0x992B3AAF, theme);
+ ADD_PALETTE(BASIC::F031L1, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F031L1P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F031L1D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::F031L2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F031L2P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F031L2D, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F031L3, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F031L3P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F031L3D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L1, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L1P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L1D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L2, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L2P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L2D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L3, 0xFFF9F9F9, theme);
+ ADD_PALETTE(BASIC::F032L3P, 0xFFF9F9F9, theme);
+ ADD_PALETTE(BASIC::F041i, 0xFF5D6176, theme);
+ ADD_PALETTE(BASIC::F041iD, 0x995D6176, theme);
+ ADD_PALETTE(BASIC::F051, 0xFF485D93, theme);
+ ADD_PALETTE(BASIC::F052, 0xFF3A72FF, theme);
+ ADD_PALETTE(BASIC::F053, 0xFF485D93, theme);
+ ADD_PALETTE(BASIC::F053P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F053D, 0x99485D93, theme);
+ ADD_PALETTE(BASIC::F054, 0xFF202432, theme);
+ ADD_PALETTE(BASIC::F055, 0xFF3A72FF, theme);
+ ADD_PALETTE(BASIC::W011, 0xFF4B4D56, theme);
+ ADD_PALETTE(BASIC::W011D, 0x994B4D56, theme);
+ ADD_PALETTE(BASIC::W012, 0xFF095FD4, theme);
+ ADD_PALETTE(BASIC::W012D, 0x99095FD4, theme);
+ ADD_PALETTE(BASIC::W012P, 0xFF232F91, theme);
+ ADD_PALETTE(BASIC::W013, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W0141, 0xFFDB0000, theme);
+ ADD_PALETTE(BASIC::W0141P, 0xFFA10808, theme);
+ ADD_PALETTE(BASIC::W0141D, 0x99DB0000, theme);
+ ADD_PALETTE(BASIC::W015, 0xFF343432, theme);
+ ADD_PALETTE(BASIC::W021L1, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W021L1P, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::W021L2, 0xFF425790, theme);
+ ADD_PALETTE(BASIC::W021L2P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W021L3, 0xFF425790, theme);
+ ADD_PALETTE(BASIC::W021L3P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W021L4, 0xFFF0F0F0, theme);
+ ADD_PALETTE(BASIC::W031L1, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W031L1D, 0x99000000, theme);
+ ADD_PALETTE(BASIC::W031L2, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W031L2D, 0x99000000, theme);
+ ADD_PALETTE(BASIC::W032, 0xFF5D6176, theme);
+ ADD_PALETTE(BASIC::W032P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W032D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::W041, 0xFFE1DDD1, theme);
+ ADD_PALETTE(BASIC::W051, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W0611, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W0611P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W0611D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::W062L1, 0xFF555861, theme);
+ ADD_PALETTE(BASIC::W062L1D, 0x99555861, theme);
+ ADD_PALETTE(BASIC::W062L2, 0xFF415BFE, theme);
+ ADD_PALETTE(BASIC::W062L2D, 0x7F415BFE, theme);
+ ADD_PALETTE(BASIC::W062L3, 0xFFD8D7D2, theme);
+ ADD_PALETTE(BASIC::W062L3D, 0x4CD8D7D2, theme);
+ ADD_PALETTE(BASIC::W062L4, 0xFF3677C3, theme);
+ ADD_PALETTE(BASIC::W062L4D, 0x4C3677C3, theme);
+ ADD_PALETTE(BASIC::W062L5, 0xFFC7D3E3, theme);
+ ADD_PALETTE(BASIC::W0631, 0xFFEEEEEE, theme);
+ ADD_PALETTE(BASIC::W0632, 0xFF4C5158, theme);
+ ADD_PALETTE(BASIC::W0641, 0xFF6B6D79, theme);
+ ADD_PALETTE(BASIC::W0641P, 0xFF2A39AC, theme);
+ ADD_PALETTE(BASIC::W0641D, 0x996B6D79, theme);
+ ADD_PALETTE(BASIC::W0651, 0xFF3A3A3A, theme);
+ ADD_PALETTE(BASIC::W0711, 0xFF525767, theme);
+ ADD_PALETTE(BASIC::W0711P, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::W0711D, 0xFF3E414E, theme);
+ ADD_PALETTE(BASIC::W0712, 0xFF4267A9, theme);
+ ADD_PALETTE(BASIC::W0713, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::W0714, 0xFF263E5F, theme);
+ ADD_PALETTE(BASIC::W0715, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::W0811, 0xFF253296, theme);
+ ADD_PALETTE(BASIC::W0812, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W0813, 0xFF595959, theme);
+ ADD_PALETTE(BASIC::W082, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W083, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W084, 0xB2FAFAFA, theme);
+ ADD_PALETTE(BASIC::W084P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W085, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W091, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::W092, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W101, 0xFF4884D6, theme);
+ ADD_PALETTE(BASIC::W111, 0xFFC8CEDB, theme);
+ ADD_PALETTE(BASIC::W112L1, 0xFF8995AE, theme);
+ ADD_PALETTE(BASIC::W112L2, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W1121, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W1122, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W1123, 0x4C000000, theme);
+ ADD_PALETTE(BASIC::W1211, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W1212, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W1221, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W1222, 0xFF878580, theme);
+ ADD_PALETTE(BASIC::W1223, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::W131, 0xFF343739, theme);
+ ADD_PALETTE(BASIC::W132, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::W141, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W151, 0x66000000, theme);
+ ADD_PALETTE(BASIC::W152, 0xFF42434B, theme);
+ ADD_PALETTE(BASIC::W153, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::W154, 0xFF1C1E28, theme);
+ ADD_PALETTE(BASIC::W161, 0xFF001BEA, theme);
}
void
_ResourceManager::LoadWhitePalette(void)
{
- ADD_PALETTE(BASIC::foreground, 0xFF000000);
- ADD_PALETTE(BASIC::background, 0xFFF8F6EF);
- ADD_PALETTE(BASIC::B011, 0xFFF8F6EF);
- ADD_PALETTE(BASIC::B012, 0xFFF8F6EF);
- ADD_PALETTE(BASIC::B013, 0xFF000000);
- ADD_PALETTE(BASIC::B014, 0xFFFFFFFF);
- ADD_PALETTE(BASIC::B015, 0xFF202327);
- ADD_PALETTE(BASIC::B016, 0xFF000000);
- ADD_PALETTE(BASIC::B017, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B018, 0xFF6590FF);
- ADD_PALETTE(BASIC::B0211, 0xFFF8F6EF);
- ADD_PALETTE(BASIC::B0211D, 0xFFF8F6EF);
- ADD_PALETTE(BASIC::B0212, 0xFFEDEBE4);
- ADD_PALETTE(BASIC::B0213, 0xFF5B5656);
- ADD_PALETTE(BASIC::B0214, 0xFFDCDAD3);
- ADD_PALETTE(BASIC::B0215, 0xFFDEDCD5);
- ADD_PALETTE(BASIC::B0216, 0xFFBDBBB5);
- ADD_PALETTE(BASIC::B0217, 0xFFEFEDE5);
- ADD_PALETTE(BASIC::B0217D, 0x7FEFEDE5);
- ADD_PALETTE(BASIC::B0221, 0xFF8A8A8A);
- ADD_PALETTE(BASIC::B0221L1, 0xFF8A8A8A);
- ADD_PALETTE(BASIC::B0221L2, 0xFF808080);
- ADD_PALETTE(BASIC::B0221L3, 0xFF8C8C8C);
- ADD_PALETTE(BASIC::B0221L4, 0xFFCCCBC7);
- ADD_PALETTE(BASIC::B0222, 0xFFFFFFFF);
- ADD_PALETTE(BASIC::B0223, 0xFFD3D1CB);
- ADD_PALETTE(BASIC::B0224, 0xFFB9B8B2);
- ADD_PALETTE(BASIC::B0225, 0xFF2A5181);
- ADD_PALETTE(BASIC::B0226, 0xFF4B73A3);
- ADD_PALETTE(BASIC::B0227, 0xFF000000);
- ADD_PALETTE(BASIC::B0228, 0xFF1A5274);
- ADD_PALETTE(BASIC::B0232, 0x00000000);
- ADD_PALETTE(BASIC::B0233, 0x00000000);
- ADD_PALETTE(BASIC::B031, 0x00000000);
- ADD_PALETTE(BASIC::B041, 0xFF5787C2);
- ADD_PALETTE(BASIC::B041P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B042, 0xFF0079D4);
- ADD_PALETTE(BASIC::B043, 0xFF5787C2);
- ADD_PALETTE(BASIC::B044, 0xFF2A89C2);
- ADD_PALETTE(BASIC::B0511, 0xFFEDEBE4);
- ADD_PALETTE(BASIC::B0511P, 0xFF0E66AA);
- ADD_PALETTE(BASIC::B0512, 0x00000000);
- ADD_PALETTE(BASIC::B0513, 0xFF202327);
- ADD_PALETTE(BASIC::B0514, 0xFFEDEBE4);
- ADD_PALETTE(BASIC::B0514P1, 0xFF0E66AA);
- ADD_PALETTE(BASIC::B0514P2, 0xFF007BDA);
- ADD_PALETTE(BASIC::B0514L3, 0xFF6590FF);
- ADD_PALETTE(BASIC::B0515L1, 0xFFDEDCD5);
- ADD_PALETTE(BASIC::B0515L2, 0x7F626262);
- ADD_PALETTE(BASIC::B0516, 0x00000000);
- ADD_PALETTE(BASIC::B0517, 0x00000000);
- ADD_PALETTE(BASIC::B0517P1, 0x00000000);
- ADD_PALETTE(BASIC::B0517P2, 0x00000000);
- ADD_PALETTE(BASIC::B0518, 0x003567A3);
- ADD_PALETTE(BASIC::B0518P, 0x00000000);
- ADD_PALETTE(BASIC::B0519, 0xFFF25D28);
- ADD_PALETTE(BASIC::B0520, 0xFF3567A3);
- ADD_PALETTE(BASIC::B0520P, 0xFF2A89C2);
- ADD_PALETTE(BASIC::B052L1, 0xFF656565);
- ADD_PALETTE(BASIC::B052L1P, 0xFF007BDA);
- ADD_PALETTE(BASIC::B052L1D, 0x7F656565);
- ADD_PALETTE(BASIC::B052L2, 0xFF525252);
- ADD_PALETTE(BASIC::B052L2P, 0xFF4093F7);
- ADD_PALETTE(BASIC::B052L3, 0x00000000);
- ADD_PALETTE(BASIC::B052L3P, 0x00000000);
- ADD_PALETTE(BASIC::B052L4, 0xFF282828);
- ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L4D, 0x7F282828);
- ADD_PALETTE(BASIC::B052L5, 0xFF282828);
- ADD_PALETTE(BASIC::B052L5D, 0x7F282828);
- ADD_PALETTE(BASIC::B052L5P, 0xFF007BDA);
- ADD_PALETTE(BASIC::B052L6, 0xFF282828);
- ADD_PALETTE(BASIC::B052L6D, 0x7F282828);
- ADD_PALETTE(BASIC::B052L6P1, 0xFF0E68AD);
- ADD_PALETTE(BASIC::B052L6P2, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L7, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L8, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L8P, 0xFF4093F7);
- ADD_PALETTE(BASIC::B052L8D, 0x7FFAFAFA);
- ADD_PALETTE(BASIC::B052L9, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L9P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B052L9D, 0x7FFAFAFA);
- ADD_PALETTE(BASIC::B052L10, 0x00000000);
- ADD_PALETTE(BASIC::B0531, 0xFF202327);
- ADD_PALETTE(BASIC::B0532, 0x00000000);
- ADD_PALETTE(BASIC::B0533, 0x00000000);
- ADD_PALETTE(BASIC::B0534, 0x00000000);
- ADD_PALETTE(BASIC::B0535, 0x00000000);
- ADD_PALETTE(BASIC::B0536, 0x00000000);
- ADD_PALETTE(BASIC::B0537, 0x00000000);
- ADD_PALETTE(BASIC::B0541, 0xFFF7F5ED);
- ADD_PALETTE(BASIC::B0541P, 0xFF007AD8);
- ADD_PALETTE(BASIC::B0541D, 0x7FF7F5ED);
- ADD_PALETTE(BASIC::B0542, 0x00000000);
- ADD_PALETTE(BASIC::B0542P, 0x00000000);
- ADD_PALETTE(BASIC::B0543, 0x00000000);
- ADD_PALETTE(BASIC::B0544, 0x00000000);
- ADD_PALETTE(BASIC::B0545, 0x00000000);
- ADD_PALETTE(BASIC::B0551, 0x00000000);
- ADD_PALETTE(BASIC::B0552, 0x00000000);
- ADD_PALETTE(BASIC::B0553, 0xFF0C0F14);
- ADD_PALETTE(BASIC::B0554, 0xFF414447);
- ADD_PALETTE(BASIC::B0555, 0x00000000);
- ADD_PALETTE(BASIC::B0556, 0x00000000);
- ADD_PALETTE(BASIC::B0557, 0x00000000);
- ADD_PALETTE(BASIC::B0558, 0x00000000);
- ADD_PALETTE(BASIC::B061L1, 0xFFF8F6EF);
- ADD_PALETTE(BASIC::B061L2, 0xFFDBD9CE);
- ADD_PALETTE(BASIC::B061L3, 0xFFD6D3C9);
- ADD_PALETTE(BASIC::B061L4, 0xFF444444);
- ADD_PALETTE(BASIC::B061L5, 0xFF000000);
- ADD_PALETTE(BASIC::B061L6, 0xFF17191C);
- ADD_PALETTE(BASIC::B0621L1, 0x00000000);
- ADD_PALETTE(BASIC::B0621L2, 0x00000000);
- ADD_PALETTE(BASIC::B0622L1, 0x00444444);
- ADD_PALETTE(BASIC::B0622L2, 0x3FFFFFFF);
- ADD_PALETTE(BASIC::B0623L1, 0xFF2D2D2D);
- ADD_PALETTE(BASIC::B0623L2, 0xFF5B5B5B);
- ADD_PALETTE(BASIC::B0624L1, 0xFFCDCDCD);
- ADD_PALETTE(BASIC::B0624L2, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B0624L3, 0xFF303337);
- ADD_PALETTE(BASIC::B0624L4, 0xFF000000);
- ADD_PALETTE(BASIC::B0624L5, 0xFF007BDA);
- ADD_PALETTE(BASIC::B0624L6, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B063L1, 0xFF000000);
- ADD_PALETTE(BASIC::B063L1P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B063L1D, 0x7F000000);
- ADD_PALETTE(BASIC::B063L2, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B063L3, 0xFF808080);
- ADD_PALETTE(BASIC::B063L4, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B063L5, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B063L5D, 0x7FFAFAFA);
- ADD_PALETTE(BASIC::B063L6, 0xFF454545);
- ADD_PALETTE(BASIC::B063L6P, 0xFF454545);
- ADD_PALETTE(BASIC::B063L6D, 0x7F454545);
- ADD_PALETTE(BASIC::B063L7, 0xFFBABABA);
- ADD_PALETTE(BASIC::B063L8, 0xFF808080);
- ADD_PALETTE(BASIC::B063L8P, 0x00000000);
- ADD_PALETTE(BASIC::B063L8D, 0x7F808080);
- ADD_PALETTE(BASIC::B063L9, 0xFF252525);
- ADD_PALETTE(BASIC::B064L1, 0xFF3B73B6);
- ADD_PALETTE(BASIC::B064L2, 0xFF808080);
- ADD_PALETTE(BASIC::B064L2P, 0xFF808080);
- ADD_PALETTE(BASIC::B064L2D, 0xFF808080);
- ADD_PALETTE(BASIC::B064L3, 0xFF3A3A3A);
- ADD_PALETTE(BASIC::B064L3P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B064L3D, 0x7F3A3A3A);
- ADD_PALETTE(BASIC::B065L1, 0x00000000);
- ADD_PALETTE(BASIC::B065L2, 0x00000000);
- ADD_PALETTE(BASIC::B065L3, 0x00000000);
- ADD_PALETTE(BASIC::B065L3P, 0x00000000);
- ADD_PALETTE(BASIC::B065L4, 0xFFF7F5ED);
- ADD_PALETTE(BASIC::B065L4D, 0x7FF7F5ED);
- ADD_PALETTE(BASIC::B065L4P, 0xFF007AD8);
- ADD_PALETTE(BASIC::B065L5, 0x00000000);
- ADD_PALETTE(BASIC::B071, 0xFFC6C4BE);
- ADD_PALETTE(BASIC::B0721, 0xFFA09F9A);
- ADD_PALETTE(BASIC::B0722, 0xFF3B73B6);
- ADD_PALETTE(BASIC::B0723, 0xFFF8F6EF);
- ADD_PALETTE(BASIC::B0724, 0xFFD1CFC9);
- ADD_PALETTE(BASIC::B0725, 0xFF3B73B6);
- ADD_PALETTE(BASIC::B0726, 0xFFE2DFD5);
- ADD_PALETTE(BASIC::B0731, 0xFF3B73B6);
- ADD_PALETTE(BASIC::B0732, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::B0741, 0xFFA09F9A);
- ADD_PALETTE(BASIC::B0742, 0xFF3B73B6);
- ADD_PALETTE(BASIC::B0743, 0xFFE6E3D8);
- ADD_PALETTE(BASIC::B0744, 0xFFC5C2B7);
- ADD_PALETTE(BASIC::B0745, 0x00000000);
- ADD_PALETTE(BASIC::B0751, 0xFF3B73B6);
- ADD_PALETTE(BASIC::F011L1, 0xFF000000);
- ADD_PALETTE(BASIC::F011L1P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F011L1D, 0x7F000000);
- ADD_PALETTE(BASIC::F011L2, 0xFF3B73B6);
- ADD_PALETTE(BASIC::F011L2D, 0x7F3B73B6);
- ADD_PALETTE(BASIC::F011L3, 0xFF4F4F4F);
- ADD_PALETTE(BASIC::F011L3D, 0xFF4F4F4F);
- ADD_PALETTE(BASIC::F011L4, 0xFF4F4F4F);
- ADD_PALETTE(BASIC::F011L4D, 0x7F4F4F4F);
- ADD_PALETTE(BASIC::F011L5, 0xFF3B73B6);
- ADD_PALETTE(BASIC::F011L6, 0xFF808080);
- ADD_PALETTE(BASIC::F011L7, 0xFF686866);
- ADD_PALETTE(BASIC::F011L7D, 0xCC686866);
- ADD_PALETTE(BASIC::F011L8, 0xFFC24747);
- ADD_PALETTE(BASIC::F011L9, 0xFFFFFFFF);
- ADD_PALETTE(BASIC::F011L10, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F011L11, 0xFF808080);
- ADD_PALETTE(BASIC::F011L12, 0xFF4093F7);
- ADD_PALETTE(BASIC::F011L13, 0x00000000);
- ADD_PALETTE(BASIC::F011L14, 0x00000000);
- ADD_PALETTE(BASIC::F011L15, 0xFFE94949);
- ADD_PALETTE(BASIC::F011L16, 0xFF8B8B8B);
- ADD_PALETTE(BASIC::F011L17, 0xFF8B8B8B);
- ADD_PALETTE(BASIC::F011L18, 0xFF686868);
- ADD_PALETTE(BASIC::F011L19, 0xFF8B8B8B);
- ADD_PALETTE(BASIC::F011L20, 0x00000000);
- ADD_PALETTE(BASIC::F011L21, 0xFF808080);
- ADD_PALETTE(BASIC::F011L22, 0xFF9A9A9A);
- ADD_PALETTE(BASIC::F011L23, 0xFF1382FF);
- ADD_PALETTE(BASIC::F021L1i, 0xFF808080);
- ADD_PALETTE(BASIC::F021L1iP, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F021L1iD, 0x7F808080);
- ADD_PALETTE(BASIC::F022L1i, 0xFFB8B8B8);
- ADD_PALETTE(BASIC::F022L2i, 0xFF4C85C9);
- ADD_PALETTE(BASIC::F022L2iD, 0x4C4C85C9);
- ADD_PALETTE(BASIC::F031L1, 0xFF282828);
- ADD_PALETTE(BASIC::F031L1P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F031L1D, 0x7F282828);
- ADD_PALETTE(BASIC::F031L2, 0x00000000);
- ADD_PALETTE(BASIC::F031L2P, 0x00000000);
- ADD_PALETTE(BASIC::F031L2D, 0x00000000);
- ADD_PALETTE(BASIC::F031L3, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F031L3P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F031L3D, 0x7FFAFAFA);
- ADD_PALETTE(BASIC::F032L1, 0xFF282828);
- ADD_PALETTE(BASIC::F032L1P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F032L1D, 0x7F282828);
- ADD_PALETTE(BASIC::F032L2, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F032L2P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F032L2D, 0x7FFAFAFA);
- ADD_PALETTE(BASIC::F032L3, 0xFFF9F9F9);
- ADD_PALETTE(BASIC::F032L3P, 0xFFF9F9F9);
- ADD_PALETTE(BASIC::F041i, 0xFF808080);
- ADD_PALETTE(BASIC::F041iD, 0x7F808080);
- ADD_PALETTE(BASIC::F051, 0xFF90A9C7);
- ADD_PALETTE(BASIC::F052, 0xFF007BDB);
- ADD_PALETTE(BASIC::F053, 0xFF808080);
- ADD_PALETTE(BASIC::F053P, 0xFF000000);
- ADD_PALETTE(BASIC::F053D, 0x7F808080);
- ADD_PALETTE(BASIC::F054, 0xFFE3E1D9);
- ADD_PALETTE(BASIC::F055, 0xFF007BDA);
- ADD_PALETTE(BASIC::W011, 0xFFF7F5ED);
- ADD_PALETTE(BASIC::W011D, 0x7FF7F5ED);
- ADD_PALETTE(BASIC::W012, 0xFF0058D0);
- ADD_PALETTE(BASIC::W012D, 0x7F0058D0);
- ADD_PALETTE(BASIC::W012P, 0xFF0051BF);
- ADD_PALETTE(BASIC::W013, 0x00000000);
- ADD_PALETTE(BASIC::W0141, 0xFFC12C21);
- ADD_PALETTE(BASIC::W0141P, 0xFFC12C21);
- ADD_PALETTE(BASIC::W0141D, 0x7FC12C21);
- ADD_PALETTE(BASIC::W015, 0xFF343432);
- ADD_PALETTE(BASIC::W021L1, 0xFFF8F6EF);
- ADD_PALETTE(BASIC::W021L1P, 0xFF5787C2);
- ADD_PALETTE(BASIC::W021L2, 0xFF0E68AD);
- ADD_PALETTE(BASIC::W021L2P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W021L3, 0xFF0E68AD);
- ADD_PALETTE(BASIC::W021L3P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W021L4, 0xFF000000);
- ADD_PALETTE(BASIC::W031L1, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W031L1D, 0x7FFAFAFA);
- ADD_PALETTE(BASIC::W031L2, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W031L2D, 0x7FFAFAFA);
- ADD_PALETTE(BASIC::W032, 0xFF878580);
- ADD_PALETTE(BASIC::W032P, 0xFF000000);
- ADD_PALETTE(BASIC::W032D, 0x7F878580);
- ADD_PALETTE(BASIC::W041, 0xFF17191C);
- ADD_PALETTE(BASIC::W051, 0xFF000000);
- ADD_PALETTE(BASIC::W0611, 0xFF3B73B6);
- ADD_PALETTE(BASIC::W0611P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W0611D, 0x7F3B73B6);
- ADD_PALETTE(BASIC::W062L1, 0xFFC5C5C5);
- ADD_PALETTE(BASIC::W062L1D, 0x4CC5C5C5);
- ADD_PALETTE(BASIC::W062L2, 0xFF007DDE);
- ADD_PALETTE(BASIC::W062L2D, 0x7F007DDE);
- ADD_PALETTE(BASIC::W062L3, 0xFF615F5B);
- ADD_PALETTE(BASIC::W062L3D, 0x4C615F5B);
- ADD_PALETTE(BASIC::W062L4, 0xFF70A9EE);
- ADD_PALETTE(BASIC::W062L4D, 0x4C70A9EE);
- ADD_PALETTE(BASIC::W062L5, 0xFF223148);
- ADD_PALETTE(BASIC::W0631, 0xFF656565);
- ADD_PALETTE(BASIC::W0632, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W0641, 0xFFF7F5ED);
- ADD_PALETTE(BASIC::W0641P, 0xFF0079D4);
- ADD_PALETTE(BASIC::W0641D, 0x7FF7F5ED);
- ADD_PALETTE(BASIC::W0651, 0xFFBFBFBF);
- ADD_PALETTE(BASIC::W0711, 0xFF6C90BC);
- ADD_PALETTE(BASIC::W0711P, 0xFF4093F7);
- ADD_PALETTE(BASIC::W0711D, 0xFF607DA1);
- ADD_PALETTE(BASIC::W0712, 0x00000000);
- ADD_PALETTE(BASIC::W0713, 0xFF4093F7);
- ADD_PALETTE(BASIC::W0714, 0x00000000);
- ADD_PALETTE(BASIC::W0715, 0xFF2889FF);
- ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA);
- ADD_PALETTE(BASIC::W0811, 0xFF5787C2);
- ADD_PALETTE(BASIC::W0812, 0x00000000);
- ADD_PALETTE(BASIC::W0813, 0xFF494949);
- ADD_PALETTE(BASIC::W082, 0x00000000);
- ADD_PALETTE(BASIC::W083, 0x00000000);
- ADD_PALETTE(BASIC::W084, 0xB2FAFAFA);
- ADD_PALETTE(BASIC::W084P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::W085, 0x00000000);
- ADD_PALETTE(BASIC::W091, 0xFF444444);
- ADD_PALETTE(BASIC::W092, 0xFFFFFFFF);
- ADD_PALETTE(BASIC::W101, 0xFF5893E4);
- ADD_PALETTE(BASIC::W111, 0xFFE7E5DE);
- ADD_PALETTE(BASIC::W112L1, 0xFFB4B4B4);
- ADD_PALETTE(BASIC::W112L2, 0xFFFFFFFF);
- ADD_PALETTE(BASIC::W1121, 0xFF000000);
- ADD_PALETTE(BASIC::W1122, 0xFF000000);
- ADD_PALETTE(BASIC::W1123, 0x4C000000);
- ADD_PALETTE(BASIC::W1211, 0x00000000);
- ADD_PALETTE(BASIC::W1212, 0x00000000);
- ADD_PALETTE(BASIC::W1221, 0x00000000);
- ADD_PALETTE(BASIC::W1222, 0x00000000);
- ADD_PALETTE(BASIC::W1223, 0x00000000);
- ADD_PALETTE(BASIC::W131, 0xFF959595);
- ADD_PALETTE(BASIC::W132, 0xFF5787C2);
- ADD_PALETTE(BASIC::W141, 0xFF808080);
- ADD_PALETTE(BASIC::W151, 0xFF95948F);
- ADD_PALETTE(BASIC::W152, 0xFF878787);
- ADD_PALETTE(BASIC::W153, 0xFF5787C2);
- ADD_PALETTE(BASIC::W154, 0xFFEFECE0);
- ADD_PALETTE(BASIC::W161, 0xFF007BDA);
+ String theme = L"white";
+ ADD_PALETTE(BASIC::foreground, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::background, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::B011, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::B012, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::B013, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B014, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::B015, 0xFF202327, theme);
+ ADD_PALETTE(BASIC::B016, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B017, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B018, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B0211, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::B0211D, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::B0212, 0xFFEDEBE4, theme);
+ ADD_PALETTE(BASIC::B0213, 0xFF5B5656, theme);
+ ADD_PALETTE(BASIC::B0214, 0xFFDCDAD3, theme);
+ ADD_PALETTE(BASIC::B0215, 0xFFDEDCD5, theme);
+ ADD_PALETTE(BASIC::B0216, 0xFFBDBBB5, theme);
+ ADD_PALETTE(BASIC::B0217, 0xFFEFEDE5, theme);
+ ADD_PALETTE(BASIC::B0217D, 0x7FEFEDE5, theme);
+ ADD_PALETTE(BASIC::B0221, 0xFF8A8A8A, theme);
+ ADD_PALETTE(BASIC::B0221L1, 0xFF8A8A8A, theme);
+ ADD_PALETTE(BASIC::B0221L2, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::B0221L3, 0xFF8C8C8C, theme);
+ ADD_PALETTE(BASIC::B0221L4, 0xFFCCCBC7, theme);
+ ADD_PALETTE(BASIC::B0222, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::B0223, 0xFFD3D1CB, theme);
+ ADD_PALETTE(BASIC::B0224, 0xFFB9B8B2, theme);
+ ADD_PALETTE(BASIC::B0225, 0xFF2A5181, theme);
+ ADD_PALETTE(BASIC::B0226, 0xFF4B73A3, theme);
+ ADD_PALETTE(BASIC::B0227, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B0228, 0xFF1A5274, theme);
+ ADD_PALETTE(BASIC::B0232, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0233, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B031, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B041, 0xFF5787C2, theme);
+ ADD_PALETTE(BASIC::B041P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B042, 0xFF0079D4, theme);
+ ADD_PALETTE(BASIC::B043, 0xFF5787C2, theme);
+ ADD_PALETTE(BASIC::B044, 0xFF2A89C2, theme);
+ ADD_PALETTE(BASIC::B0511, 0xFFEDEBE4, theme);
+ ADD_PALETTE(BASIC::B0511P, 0xFF0E66AA, theme);
+ ADD_PALETTE(BASIC::B0512, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0513, 0xFF202327, theme);
+ ADD_PALETTE(BASIC::B0514, 0xFFEDEBE4, theme);
+ ADD_PALETTE(BASIC::B0514P1, 0xFF0E66AA, theme);
+ ADD_PALETTE(BASIC::B0514P2, 0xFF007BDA, theme);
+ ADD_PALETTE(BASIC::B0514L3, 0xFF6590FF, theme);
+ ADD_PALETTE(BASIC::B0515L1, 0xFFDEDCD5, theme);
+ ADD_PALETTE(BASIC::B0515L2, 0x7F626262, theme);
+ ADD_PALETTE(BASIC::B0516, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0517, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0517P1, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0517P2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0518, 0x003567A3, theme);
+ ADD_PALETTE(BASIC::B0518P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0519, 0xFFF25D28, theme);
+ ADD_PALETTE(BASIC::B0520, 0xFF3567A3, theme);
+ ADD_PALETTE(BASIC::B0520P, 0xFF2A89C2, theme);
+ ADD_PALETTE(BASIC::B052L1, 0xFF656565, theme);
+ ADD_PALETTE(BASIC::B052L1P, 0xFF007BDA, theme);
+ ADD_PALETTE(BASIC::B052L1D, 0x7F656565, theme);
+ ADD_PALETTE(BASIC::B052L2, 0xFF525252, theme);
+ ADD_PALETTE(BASIC::B052L2P, 0xFF4093F7, theme);
+ ADD_PALETTE(BASIC::B052L3, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B052L3P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B052L4, 0xFF282828, theme);
+ ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L4D, 0x7F282828, theme);
+ ADD_PALETTE(BASIC::B052L5, 0xFF282828, theme);
+ ADD_PALETTE(BASIC::B052L5D, 0x7F282828, theme);
+ ADD_PALETTE(BASIC::B052L5P, 0xFF007BDA, theme);
+ ADD_PALETTE(BASIC::B052L6, 0xFF282828, theme);
+ ADD_PALETTE(BASIC::B052L6D, 0x7F282828, theme);
+ ADD_PALETTE(BASIC::B052L6P1, 0xFF0E68AD, theme);
+ ADD_PALETTE(BASIC::B052L6P2, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L7, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L8, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L8P, 0xFF4093F7, theme);
+ ADD_PALETTE(BASIC::B052L8D, 0x7FFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L9, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L9P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L9D, 0x7FFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L10, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0531, 0xFF202327, theme);
+ ADD_PALETTE(BASIC::B0532, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0533, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0534, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0535, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0536, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0537, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0541, 0xFFF7F5ED, theme);
+ ADD_PALETTE(BASIC::B0541P, 0xFF007AD8, theme);
+ ADD_PALETTE(BASIC::B0541D, 0x7FF7F5ED, theme);
+ ADD_PALETTE(BASIC::B0542, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0542P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0543, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0544, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0545, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0551, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0552, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0553, 0xFF0C0F14, theme);
+ ADD_PALETTE(BASIC::B0554, 0xFF414447, theme);
+ ADD_PALETTE(BASIC::B0555, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0556, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0557, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0558, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B061L1, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::B061L2, 0xFFDBD9CE, theme);
+ ADD_PALETTE(BASIC::B061L3, 0xFFD6D3C9, theme);
+ ADD_PALETTE(BASIC::B061L4, 0xFF444444, theme);
+ ADD_PALETTE(BASIC::B061L5, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B061L6, 0xFF17191C, theme);
+ ADD_PALETTE(BASIC::B0621L1, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0621L2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0622L1, 0x00444444, theme);
+ ADD_PALETTE(BASIC::B0622L2, 0x3FFFFFFF, theme);
+ ADD_PALETTE(BASIC::B0623L1, 0xFF2D2D2D, theme);
+ ADD_PALETTE(BASIC::B0623L2, 0xFF5B5B5B, theme);
+ ADD_PALETTE(BASIC::B0624L1, 0xFFCDCDCD, theme);
+ ADD_PALETTE(BASIC::B0624L2, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B0624L3, 0xFF303337, theme);
+ ADD_PALETTE(BASIC::B0624L4, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B0624L5, 0xFF007BDA, theme);
+ ADD_PALETTE(BASIC::B0624L6, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L1, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B063L1P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L1D, 0x7F000000, theme);
+ ADD_PALETTE(BASIC::B063L2, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L3, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::B063L4, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L5, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L5D, 0x7FFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L6, 0xFF454545, theme);
+ ADD_PALETTE(BASIC::B063L6P, 0xFF454545, theme);
+ ADD_PALETTE(BASIC::B063L6D, 0x7F454545, theme);
+ ADD_PALETTE(BASIC::B063L7, 0xFFBABABA, theme);
+ ADD_PALETTE(BASIC::B063L8, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::B063L8P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B063L8D, 0x7F808080, theme);
+ ADD_PALETTE(BASIC::B063L9, 0xFF252525, theme);
+ ADD_PALETTE(BASIC::B064L1, 0xFF3B73B6, theme);
+ ADD_PALETTE(BASIC::B064L2, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::B064L2P, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::B064L2D, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::B064L3, 0xFF3A3A3A, theme);
+ ADD_PALETTE(BASIC::B064L3P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B064L3D, 0x7F3A3A3A, theme);
+ ADD_PALETTE(BASIC::B065L1, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B065L2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B065L3, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B065L3P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B065L4, 0xFFF7F5ED, theme);
+ ADD_PALETTE(BASIC::B065L4D, 0x7FF7F5ED, theme);
+ ADD_PALETTE(BASIC::B065L4P, 0xFF007AD8, theme);
+ ADD_PALETTE(BASIC::B065L5, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B071, 0xFFC6C4BE, theme);
+ ADD_PALETTE(BASIC::B0721, 0xFFA09F9A, theme);
+ ADD_PALETTE(BASIC::B0722, 0xFF3B73B6, theme);
+ ADD_PALETTE(BASIC::B0723, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::B0724, 0xFFD1CFC9, theme);
+ ADD_PALETTE(BASIC::B0725, 0xFF3B73B6, theme);
+ ADD_PALETTE(BASIC::B0726, 0xFFE2DFD5, theme);
+ ADD_PALETTE(BASIC::B0731, 0xFF3B73B6, theme);
+ ADD_PALETTE(BASIC::B0732, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B0741, 0xFFA09F9A, theme);
+ ADD_PALETTE(BASIC::B0742, 0xFF3B73B6, theme);
+ ADD_PALETTE(BASIC::B0743, 0xFFE6E3D8, theme);
+ ADD_PALETTE(BASIC::B0744, 0xFFC5C2B7, theme);
+ ADD_PALETTE(BASIC::B0745, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0751, 0xFF3B73B6, theme);
+ ADD_PALETTE(BASIC::F011L1, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::F011L1P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F011L1D, 0x7F000000, theme);
+ ADD_PALETTE(BASIC::F011L2, 0xFF3B73B6, theme);
+ ADD_PALETTE(BASIC::F011L2D, 0x7F3B73B6, theme);
+ ADD_PALETTE(BASIC::F011L3, 0xFF4F4F4F, theme);
+ ADD_PALETTE(BASIC::F011L3D, 0xFF4F4F4F, theme);
+ ADD_PALETTE(BASIC::F011L4, 0xFF4F4F4F, theme);
+ ADD_PALETTE(BASIC::F011L4D, 0x7F4F4F4F, theme);
+ ADD_PALETTE(BASIC::F011L5, 0xFF3B73B6, theme);
+ ADD_PALETTE(BASIC::F011L6, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::F011L7, 0xFF686866, theme);
+ ADD_PALETTE(BASIC::F011L7D, 0xCC686866, theme);
+ ADD_PALETTE(BASIC::F011L8, 0xFFC24747, theme);
+ ADD_PALETTE(BASIC::F011L9, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::F011L10, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F011L11, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::F011L12, 0xFF4093F7, theme);
+ ADD_PALETTE(BASIC::F011L13, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F011L14, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F011L15, 0xFFE94949, theme);
+ ADD_PALETTE(BASIC::F011L16, 0xFF8B8B8B, theme);
+ ADD_PALETTE(BASIC::F011L17, 0xFF8B8B8B, theme);
+ ADD_PALETTE(BASIC::F011L18, 0xFF686868, theme);
+ ADD_PALETTE(BASIC::F011L19, 0xFF8B8B8B, theme);
+ ADD_PALETTE(BASIC::F011L20, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F011L21, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::F011L22, 0xFF9A9A9A, theme);
+ ADD_PALETTE(BASIC::F011L23, 0xFF1382FF, theme);
+ ADD_PALETTE(BASIC::F021L1i, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::F021L1iP, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F021L1iD, 0x7F808080, theme);
+ ADD_PALETTE(BASIC::F022L1i, 0xFFB8B8B8, theme);
+ ADD_PALETTE(BASIC::F022L2i, 0xFF4C85C9, theme);
+ ADD_PALETTE(BASIC::F022L2iD, 0x4C4C85C9, theme);
+ ADD_PALETTE(BASIC::F031L1, 0xFF282828, theme);
+ ADD_PALETTE(BASIC::F031L1P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F031L1D, 0x7F282828, theme);
+ ADD_PALETTE(BASIC::F031L2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F031L2P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F031L2D, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F031L3, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F031L3P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F031L3D, 0x7FFAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L1, 0xFF282828, theme);
+ ADD_PALETTE(BASIC::F032L1P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L1D, 0x7F282828, theme);
+ ADD_PALETTE(BASIC::F032L2, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L2P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L2D, 0x7FFAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L3, 0xFFF9F9F9, theme);
+ ADD_PALETTE(BASIC::F032L3P, 0xFFF9F9F9, theme);
+ ADD_PALETTE(BASIC::F041i, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::F041iD, 0x7F808080, theme);
+ ADD_PALETTE(BASIC::F051, 0xFF90A9C7, theme);
+ ADD_PALETTE(BASIC::F052, 0xFF007BDB, theme);
+ ADD_PALETTE(BASIC::F053, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::F053P, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::F053D, 0x7F808080, theme);
+ ADD_PALETTE(BASIC::F054, 0xFFE3E1D9, theme);
+ ADD_PALETTE(BASIC::F055, 0xFF007BDA, theme);
+ ADD_PALETTE(BASIC::W011, 0xFFF7F5ED, theme);
+ ADD_PALETTE(BASIC::W011D, 0x7FF7F5ED, theme);
+ ADD_PALETTE(BASIC::W012, 0xFF0058D0, theme);
+ ADD_PALETTE(BASIC::W012D, 0x7F0058D0, theme);
+ ADD_PALETTE(BASIC::W012P, 0xFF0051BF, theme);
+ ADD_PALETTE(BASIC::W013, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W0141, 0xFFC12C21, theme);
+ ADD_PALETTE(BASIC::W0141P, 0xFFC12C21, theme);
+ ADD_PALETTE(BASIC::W0141D, 0x7FC12C21, theme);
+ ADD_PALETTE(BASIC::W015, 0xFF343432, theme);
+ ADD_PALETTE(BASIC::W021L1, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::W021L1P, 0xFF5787C2, theme);
+ ADD_PALETTE(BASIC::W021L2, 0xFF0E68AD, theme);
+ ADD_PALETTE(BASIC::W021L2P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W021L3, 0xFF0E68AD, theme);
+ ADD_PALETTE(BASIC::W021L3P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W021L4, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W031L1, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W031L1D, 0x7FFAFAFA, theme);
+ ADD_PALETTE(BASIC::W031L2, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W031L2D, 0x7FFAFAFA, theme);
+ ADD_PALETTE(BASIC::W032, 0xFF878580, theme);
+ ADD_PALETTE(BASIC::W032P, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W032D, 0x7F878580, theme);
+ ADD_PALETTE(BASIC::W041, 0xFF17191C, theme);
+ ADD_PALETTE(BASIC::W051, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W0611, 0xFF3B73B6, theme);
+ ADD_PALETTE(BASIC::W0611P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W0611D, 0x7F3B73B6, theme);
+ ADD_PALETTE(BASIC::W062L1, 0xFFC5C5C5, theme);
+ ADD_PALETTE(BASIC::W062L1D, 0x4CC5C5C5, theme);
+ ADD_PALETTE(BASIC::W062L2, 0xFF007DDE, theme);
+ ADD_PALETTE(BASIC::W062L2D, 0x7F007DDE, theme);
+ ADD_PALETTE(BASIC::W062L3, 0xFF615F5B, theme);
+ ADD_PALETTE(BASIC::W062L3D, 0x4C615F5B, theme);
+ ADD_PALETTE(BASIC::W062L4, 0xFF70A9EE, theme);
+ ADD_PALETTE(BASIC::W062L4D, 0x4C70A9EE, theme);
+ ADD_PALETTE(BASIC::W062L5, 0xFF223148, theme);
+ ADD_PALETTE(BASIC::W0631, 0xFF656565, theme);
+ ADD_PALETTE(BASIC::W0632, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W0641, 0xFFF7F5ED, theme);
+ ADD_PALETTE(BASIC::W0641P, 0xFF0079D4, theme);
+ ADD_PALETTE(BASIC::W0641D, 0x7FF7F5ED, theme);
+ ADD_PALETTE(BASIC::W0651, 0xFFBFBFBF, theme);
+ ADD_PALETTE(BASIC::W0711, 0xFF6C90BC, theme);
+ ADD_PALETTE(BASIC::W0711P, 0xFF4093F7, theme);
+ ADD_PALETTE(BASIC::W0711D, 0xFF607DA1, theme);
+ ADD_PALETTE(BASIC::W0712, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W0713, 0xFF4093F7, theme);
+ ADD_PALETTE(BASIC::W0714, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W0715, 0xFF2889FF, theme);
+ ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::W0811, 0xFF5787C2, theme);
+ ADD_PALETTE(BASIC::W0812, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W0813, 0xFF494949, theme);
+ ADD_PALETTE(BASIC::W082, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W083, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W084, 0xB2FAFAFA, theme);
+ ADD_PALETTE(BASIC::W084P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W085, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W091, 0xFF444444, theme);
+ ADD_PALETTE(BASIC::W092, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::W101, 0xFF5893E4, theme);
+ ADD_PALETTE(BASIC::W111, 0xFFE7E5DE, theme);
+ ADD_PALETTE(BASIC::W112L1, 0xFFB4B4B4, theme);
+ ADD_PALETTE(BASIC::W112L2, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::W1121, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W1122, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W1123, 0x4C000000, theme);
+ ADD_PALETTE(BASIC::W1211, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W1212, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W1221, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W1222, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W1223, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W131, 0xFF959595, theme);
+ ADD_PALETTE(BASIC::W132, 0xFF5787C2, theme);
+ ADD_PALETTE(BASIC::W141, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::W151, 0xFF95948F, theme);
+ ADD_PALETTE(BASIC::W152, 0xFF878787, theme);
+ ADD_PALETTE(BASIC::W153, 0xFF5787C2, theme);
+ ADD_PALETTE(BASIC::W154, 0xFFEFECE0, theme);
+ ADD_PALETTE(BASIC::W161, 0xFF007BDA, theme);
}
-#undef ADD_PALETTE
-
void
_ResourceManager::LoadDefaultPalette(void)
{
+ String theme = L"default";
+ ADD_PALETTE(BASIC::foreground, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::background, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B011, 0xFF080808, theme);
+ ADD_PALETTE(BASIC::B012, 0xFF080808, theme);
+ ADD_PALETTE(BASIC::B013, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B014, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::B015, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::B016, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B017, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B018, 0xFF6590FF, theme);
+ ADD_PALETTE(BASIC::B0211, 0xFF080808, theme);
+ ADD_PALETTE(BASIC::B0211D, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B0212, 0xFF1C1E28, theme);
+ ADD_PALETTE(BASIC::B0213, 0xFF404040, theme);
+ ADD_PALETTE(BASIC::B0214, 0xFF222C47, theme);
+ ADD_PALETTE(BASIC::B0215, 0xFF1D263C, theme);
+ ADD_PALETTE(BASIC::B0216, 0xFF222C47, theme);
+ ADD_PALETTE(BASIC::B0217, 0xFF11131B, theme);
+ ADD_PALETTE(BASIC::B0217D, 0x7F11131B, theme);
+ ADD_PALETTE(BASIC::B0221, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::B0221L1, 0xFF838CA3, theme);
+ ADD_PALETTE(BASIC::B0221L2, 0xFF697082, theme);
+ ADD_PALETTE(BASIC::B0221L3, 0xFF6B707E, theme);
+ ADD_PALETTE(BASIC::B0221L4, 0xFF525252, theme);
+ ADD_PALETTE(BASIC::B0222, 0xFF080808, theme);
+ ADD_PALETTE(BASIC::B0223, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0224, 0xFF27282B, theme);
+ ADD_PALETTE(BASIC::B0225, 0xFF2A5181, theme);
+ ADD_PALETTE(BASIC::B0226, 0xFF4B73A3, theme);
+ ADD_PALETTE(BASIC::B0227, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B0228, 0xFF1A5274, theme);
+ ADD_PALETTE(BASIC::B0232, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0233, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B031, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B041, 0xFF213163, theme);
+ ADD_PALETTE(BASIC::B041P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B042, 0xFF2A39AC, theme);
+ ADD_PALETTE(BASIC::B043, 0x00001BEA, theme);
+ ADD_PALETTE(BASIC::B044, 0xFF162758, theme);
+ ADD_PALETTE(BASIC::B0511, 0xFF313F66, theme);
+ ADD_PALETTE(BASIC::B0511P, 0xFF2A39AC, theme);
+ ADD_PALETTE(BASIC::B0512, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0513, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::B0514, 0xFF313F66, theme);
+ ADD_PALETTE(BASIC::B0514P1, 0xFF162758, theme);
+ ADD_PALETTE(BASIC::B0514P2, 0xFF5163E9, theme);
+ ADD_PALETTE(BASIC::B0514L3, 0xFF6590FF, theme);
+ ADD_PALETTE(BASIC::B0515L1, 0xFF464C5E, theme);
+ ADD_PALETTE(BASIC::B0515L2, 0x7F454442, theme);
+ ADD_PALETTE(BASIC::B0516, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0517, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0517P1, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0517P2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0518, 0xFF2E4468, theme);
+ ADD_PALETTE(BASIC::B0518P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0519, 0xFFF25D28, theme);
+ ADD_PALETTE(BASIC::B0520, 0xFF2E4468, theme);
+ ADD_PALETTE(BASIC::B0520P, 0xFF3C649B, theme);
+ ADD_PALETTE(BASIC::B052L1, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L1P, 0xFF5D83FF, theme);
+ ADD_PALETTE(BASIC::B052L1D, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B052L2P, 0x005787B8, theme);
+ ADD_PALETTE(BASIC::B052L3, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B052L3P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B052L4, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L4D, 0x66FAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L5, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L5D, 0x66FAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L5P, 0xFF5D83FF, theme);
+ ADD_PALETTE(BASIC::B052L6, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L6D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L6P1, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L6P2, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L7, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L8, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L8P, 0xFF5D83FF, theme);
+ ADD_PALETTE(BASIC::B052L8D, 0x66FAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L9, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L9P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L9D, 0x66FAFAFA, theme);
+ ADD_PALETTE(BASIC::B052L10, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0531, 0xFFF8F6EF, theme);
+ ADD_PALETTE(BASIC::B0532, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0533, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0534, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0535, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0536, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0537, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0541, 0xFF6B728A, theme);
+ ADD_PALETTE(BASIC::B0541P, 0xFF0D1D96, theme);
+ ADD_PALETTE(BASIC::B0541D, 0x996B728A, theme);
+ ADD_PALETTE(BASIC::B0542, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0542P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0543, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0544, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0545, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0551, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0552, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0553, 0xFFA5A5A5, theme);
+ ADD_PALETTE(BASIC::B0554, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::B0555, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0556, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0557, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0558, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B061L1, 0xFF1D263C, theme);
+ ADD_PALETTE(BASIC::B061L2, 0xFF49577B, theme);
+ ADD_PALETTE(BASIC::B061L3, 0xFF969A9C, theme);
+ ADD_PALETTE(BASIC::B061L4, 0xFF1D263C, theme);
+ ADD_PALETTE(BASIC::B061L5, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B061L6, 0xFF333537, theme);
+ ADD_PALETTE(BASIC::B0621L1, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0621L2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0622L1, 0x001D263C, theme);
+ ADD_PALETTE(BASIC::B0622L2, 0x3FFFFFFF, theme);
+ ADD_PALETTE(BASIC::B0623L1, 0xFF1D263C, theme);
+ ADD_PALETTE(BASIC::B0623L2, 0xFF626675, theme);
+ ADD_PALETTE(BASIC::B0624L1, 0xFF1D263C, theme);
+ ADD_PALETTE(BASIC::B0624L2, 0xFF626675, theme);
+ ADD_PALETTE(BASIC::B0624L3, 0xFF313F66, theme);
+ ADD_PALETTE(BASIC::B0624L4, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B0624L5, 0xFF5783FF, theme);
+ ADD_PALETTE(BASIC::B0624L6, 0xFF5783FF, theme);
+ ADD_PALETTE(BASIC::B063L1, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L1P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L1D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L2, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L3, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::B063L4, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L5, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L5D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L6, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L6P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L6D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::B063L7, 0xFF656565, theme);
+ ADD_PALETTE(BASIC::B063L8, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::B063L8P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B063L8D, 0x996E6F76, theme);
+ ADD_PALETTE(BASIC::B063L9, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B064L1, 0xFF6890FF, theme);
+ ADD_PALETTE(BASIC::B064L2, 0xFFD7D7D7, theme);
+ ADD_PALETTE(BASIC::B064L2P, 0xFFD7D7D7, theme);
+ ADD_PALETTE(BASIC::B064L2D, 0xFFD7D7D7, theme);
+ ADD_PALETTE(BASIC::B064L3, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::B064L3P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B064L3D, 0x7F000000, theme);
+ ADD_PALETTE(BASIC::B065L1, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B065L2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B065L3, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B065L3P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B065L4, 0xFFEEEEEE, theme);
+ ADD_PALETTE(BASIC::B065L4D, 0x99EEEEEE, theme);
+ ADD_PALETTE(BASIC::B065L4P, 0xFF2A39AC, theme);
+ ADD_PALETTE(BASIC::B065L5, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B071, 0xFF393B41, theme);
+ ADD_PALETTE(BASIC::B0721, 0xFFA09F9A, theme);
+ ADD_PALETTE(BASIC::B0722, 0xFF5D83FF, theme);
+ ADD_PALETTE(BASIC::B0723, 0xFF212428, theme);
+ ADD_PALETTE(BASIC::B0724, 0xFF404040, theme);
+ ADD_PALETTE(BASIC::B0725, 0xFF4F66A7, theme);
+ ADD_PALETTE(BASIC::B0726, 0xFF404040, theme);
+ ADD_PALETTE(BASIC::B0731, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::B0732, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::B0741, 0xFFA09F9A, theme);
+ ADD_PALETTE(BASIC::B0742, 0xFF5D83FF, theme);
+ ADD_PALETTE(BASIC::B0743, 0xFF212428, theme);
+ ADD_PALETTE(BASIC::B0744, 0xFF404040, theme);
+ ADD_PALETTE(BASIC::B0745, 0x00000000, theme);
+ ADD_PALETTE(BASIC::B0751, 0xFF3B73B6, theme);
+ ADD_PALETTE(BASIC::F011L1, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F011L1P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F011L1D, 0x7FFAFAFA, theme);
+ ADD_PALETTE(BASIC::F011L2, 0xFF6890FF, theme);
+ ADD_PALETTE(BASIC::F011L2D, 0x996890FF, theme);
+ ADD_PALETTE(BASIC::F011L3, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L3D, 0x996E6F76, theme);
+ ADD_PALETTE(BASIC::F011L4, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L4D, 0x996E6F76, theme);
+ ADD_PALETTE(BASIC::F011L5, 0xFF5D83FF, theme);
+ ADD_PALETTE(BASIC::F011L6, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F011L7, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L7D, 0x996E6F76, theme);
+ ADD_PALETTE(BASIC::F011L8, 0xFFD10000, theme);
+ ADD_PALETTE(BASIC::F011L9, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::F011L10, 0xFFF9F9F9, theme);
+ ADD_PALETTE(BASIC::F011L11, 0xFF808080, theme);
+ ADD_PALETTE(BASIC::F011L12, 0xFF4093F7, theme);
+ ADD_PALETTE(BASIC::F011L13, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F011L14, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F011L15, 0xFFD10000, theme);
+ ADD_PALETTE(BASIC::F011L16, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L17, 0xFF8B8B8B, theme);
+ ADD_PALETTE(BASIC::F011L18, 0xFF686868, theme);
+ ADD_PALETTE(BASIC::F011L19, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L20, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F011L21, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L22, 0xFF6E6F76, theme);
+ ADD_PALETTE(BASIC::F011L23, 0xFF1382FF, theme);
+ ADD_PALETTE(BASIC::F021L1i, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F021L1iP, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F021L1iD, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::F022L1i, 0xFF6C6E77, theme);
+ ADD_PALETTE(BASIC::F022L2i, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::F022L2iD, 0x992B3AAF, theme);
+ ADD_PALETTE(BASIC::F031L1, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F031L1P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F031L1D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::F031L2, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F031L2P, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F031L2D, 0x00000000, theme);
+ ADD_PALETTE(BASIC::F031L3, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F031L3P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F031L3D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L1, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L1P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L1D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L2, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L2P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L2D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::F032L3, 0xFFF9F9F9, theme);
+ ADD_PALETTE(BASIC::F032L3P, 0xFFF9F9F9, theme);
+ ADD_PALETTE(BASIC::F041i, 0xFF5D6176, theme);
+ ADD_PALETTE(BASIC::F041iD, 0x995D6176, theme);
+ ADD_PALETTE(BASIC::F051, 0xFF485D93, theme);
+ ADD_PALETTE(BASIC::F052, 0xFF3A72FF, theme);
+ ADD_PALETTE(BASIC::F053, 0xFF485D93, theme);
+ ADD_PALETTE(BASIC::F053P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::F053D, 0x99485D93, theme);
+ ADD_PALETTE(BASIC::F054, 0xFF202432, theme);
+ ADD_PALETTE(BASIC::F055, 0xFF3A72FF, theme);
+ ADD_PALETTE(BASIC::W011, 0xFF4B4D56, theme);
+ ADD_PALETTE(BASIC::W011D, 0x994B4D56, theme);
+ ADD_PALETTE(BASIC::W012, 0xFF095FD4, theme);
+ ADD_PALETTE(BASIC::W012D, 0x99095FD4, theme);
+ ADD_PALETTE(BASIC::W012P, 0xFF232F91, theme);
+ ADD_PALETTE(BASIC::W013, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W0141, 0xFFDB0000, theme);
+ ADD_PALETTE(BASIC::W0141P, 0xFFA10808, theme);
+ ADD_PALETTE(BASIC::W0141D, 0x99DB0000, theme);
+ ADD_PALETTE(BASIC::W015, 0xFF343432, theme);
+ ADD_PALETTE(BASIC::W021L1, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W021L1P, 0xFF213163, theme);
+ ADD_PALETTE(BASIC::W021L2, 0xFF425790, theme);
+ ADD_PALETTE(BASIC::W021L2P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W021L3, 0xFF425790, theme);
+ ADD_PALETTE(BASIC::W021L3P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W021L4, 0xFFF0F0F0, theme);
+ ADD_PALETTE(BASIC::W031L1, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W031L1D, 0x99000000, theme);
+ ADD_PALETTE(BASIC::W031L2, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W031L2D, 0x99000000, theme);
+ ADD_PALETTE(BASIC::W032, 0xFF5D6176, theme);
+ ADD_PALETTE(BASIC::W032P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W032D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::W041, 0xFFE1DDD1, theme);
+ ADD_PALETTE(BASIC::W051, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W0611, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W0611P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W0611D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::W062L1, 0xFF555861, theme);
+ ADD_PALETTE(BASIC::W062L1D, 0x99555861, theme);
+ ADD_PALETTE(BASIC::W062L2, 0xFF415BFE, theme);
+ ADD_PALETTE(BASIC::W062L2D, 0x7F415BFE, theme);
+ ADD_PALETTE(BASIC::W062L3, 0xFFD8D7D2, theme);
+ ADD_PALETTE(BASIC::W062L3D, 0x4CD8D7D2, theme);
+ ADD_PALETTE(BASIC::W062L4, 0xFF3677C3, theme);
+ ADD_PALETTE(BASIC::W062L4D, 0x4C3677C3, theme);
+ ADD_PALETTE(BASIC::W062L5, 0xFFC7D3E3, theme);
+ ADD_PALETTE(BASIC::W0631, 0xFFEEEEEE, theme);
+ ADD_PALETTE(BASIC::W0632, 0xFF4C5158, theme);
+ ADD_PALETTE(BASIC::W0641, 0xFF6B6D79, theme);
+ ADD_PALETTE(BASIC::W0641P, 0xFF2A39AC, theme);
+ ADD_PALETTE(BASIC::W0641D, 0x996B6D79, theme);
+ ADD_PALETTE(BASIC::W0651, 0xFF3A3A3A, theme);
+ ADD_PALETTE(BASIC::W0711, 0xFF525767, theme);
+ ADD_PALETTE(BASIC::W0711P, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::W0711D, 0xFF3E414E, theme);
+ ADD_PALETTE(BASIC::W0712, 0xFF4267A9, theme);
+ ADD_PALETTE(BASIC::W0713, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::W0714, 0xFF263E5F, theme);
+ ADD_PALETTE(BASIC::W0715, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA, theme);
+ ADD_PALETTE(BASIC::W0811, 0xFF253296, theme);
+ ADD_PALETTE(BASIC::W0812, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W0813, 0xFF595959, theme);
+ ADD_PALETTE(BASIC::W082, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W083, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W084, 0xB2FAFAFA, theme);
+ ADD_PALETTE(BASIC::W084P, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W085, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W091, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::W092, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W101, 0xFF4884D6, theme);
+ ADD_PALETTE(BASIC::W111, 0xFFC8CEDB, theme);
+ ADD_PALETTE(BASIC::W112L1, 0xFF8995AE, theme);
+ ADD_PALETTE(BASIC::W112L2, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W1121, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W1122, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W1123, 0x4C000000, theme);
+ ADD_PALETTE(BASIC::W1211, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W1212, 0x00000000, theme);
+ ADD_PALETTE(BASIC::W1221, 0xFF000000, theme);
+ ADD_PALETTE(BASIC::W1222, 0xFF878580, theme);
+ ADD_PALETTE(BASIC::W1223, 0xFFFFFFFF, theme);
+ ADD_PALETTE(BASIC::W131, 0xFF343739, theme);
+ ADD_PALETTE(BASIC::W132, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::W141, 0xFFFAFAFA, theme);
+ ADD_PALETTE(BASIC::W151, 0x66000000, theme);
+ ADD_PALETTE(BASIC::W152, 0xFF42434B, theme);
+ ADD_PALETTE(BASIC::W153, 0xFF2B3AAF, theme);
+ ADD_PALETTE(BASIC::W154, 0xFF1C1E28, theme);
+ ADD_PALETTE(BASIC::W161, 0xFF001BEA, theme);
}
+#undef ADD_PALETTE
+
void
_ResourceManager::LoadPaletteInformation(const Tizen::Base::String& systemTheme)
{
}
else if (systemTheme == L"default")
{
- LoadBlackPalette();
+ LoadDefaultPalette();
}
else
{
result r = E_SUCCESS;
Display* pDisplay = (Display*)ecore_x_display_get();
- SysTryReturnResult(NID_UI, pDisplay != null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] pDisplay is invalid. something wrong!");
+ SysTryReturnResult(NID_UI, pDisplay != null, E_OPERATION_FAILED, "pDisplay is invalid. something wrong!");
std::unique_ptr<Display, _DisplayDeleter> pDpy(XOpenDisplay(NULL));
- SysTryReturnResult(NID_UI, pDpy.get() != null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] pDpy is invalid. something wrong!");
+ SysTryReturnResult(NID_UI, pDpy.get() != null, E_OPERATION_FAILED, "pDpy is invalid. something wrong!");
int key = -1;
result r = E_SUCCESS;
Display* pDisplay = (Display*)ecore_x_display_get();
- SysTryReturnResult(NID_UI, pDisplay != null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] pDisplay is invalid. something wrong!");
+ SysTryReturnResult(NID_UI, pDisplay != null, E_OPERATION_FAILED, "pDisplay is invalid. something wrong!");
std::unique_ptr<Display, _DisplayDeleter> pDpy(XOpenDisplay(NULL));
- SysTryReturnResult(NID_UI, pDpy.get() != null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] pDpy is invalid. something wrong!");
+ SysTryReturnResult(NID_UI, pDpy.get() != null, E_OPERATION_FAILED, "pDpy is invalid. something wrong!");
int width = DisplayWidth(pDpy.get(), DefaultScreen(pDpy.get()));
int height = DisplayHeight(pDpy.get(), DefaultScreen(pDpy.get()));
ClearLastResult();
_TouchEventInfoImpl* pImpl = new (std::nothrow) _TouchEventInfoImpl(pPublic);
- SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pImpl;
}
SysTryReturn(NID_UI, pTouchManager, null, E_SYSTEM, "[E_SYSTEM] System error occurred.");
LinkedListT<TouchEventInfo*>* pTouchEventInfoList = new (std::nothrow) LinkedListT<TouchEventInfo*>;
- SysTryReturn(NID_UI, pTouchEventInfoList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pTouchEventInfoList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
Tizen::Base::Collection::IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN();
- SysTryCatch(NID_UI, pFingerInfoList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, pFingerInfoList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
for (int i = 0; i < pFingerInfoList->GetCount(); i++)
{
if (pFingerInfo->GetStatus() == _TOUCH_PRESSED || pFingerInfo->GetStatus() == _TOUCH_MOVED || pFingerInfo->GetStatus() == _TOUCH_CANCELED)
{
TouchEventInfo* pTouchEventInfo = new (std::nothrow) TouchEventInfo;
- SysTryCatch(NID_UI, pTouchEventInfo, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, pTouchEventInfo, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
_Control* pControl = pTouchManager->GetTouchControlSource();
if (pControl)
{
_ControlImpl* pImpl = static_cast<_ControlImpl*>(pControl->GetUserData());
+ SysTryCatch(NID_UI, pImpl != null, , E_SYSTEM, "[E_SYSTEM] System error occurred. ");
_TouchStatus touchStatus = pFingerInfo->GetStatus();
if (pFingerInfo->GetStatus() != _TOUCH_CANCELED)
, __pFlickInfoList(null)
{
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
SetDetectorType(_TOUCH_GESTURE_DETECTOR_TYPE_FLICK);
__pFlickInfoList = new (std::nothrow) ArrayListT<_FlickInfo*>;
- SysTryReturnVoidResult(NID_UI, __pFlickInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pFlickInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return;
}
_TouchFlickGestureDetector::OnTouchDown(ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo)
{
result r = pList->Add(const_cast<_FlickInfo*>(pFlickInfo));
- SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "%s", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating.");
CheckMoveMinMax(pFlickInfo->x, pFlickInfo->y);
_TouchFlickGestureDetector::OnTouchMove(ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo)
{
result r = pList->Add(const_cast<_FlickInfo*>(pFlickInfo));
- SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "%s", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating.");
CheckMoveMinMax(pFlickInfo->x, pFlickInfo->y);
_TouchFlickGestureDetector::OnTouchUp(ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo, _FlickInfo* pReturnFlick, bool& isFlicked)
{
result r = pList->Add(const_cast<_FlickInfo*>(pFlickInfo));
- SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "%s", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating.");
CheckMoveMinMax(pFlickInfo->x, pFlickInfo->y);
bool
_TouchFlickGestureDetector::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
+ ClearVariables();
+
if (touchinfo.GetPointId() != FIRST_POINT_ID)
{
return false;
}
_FlickInfo* pFlickInfo = new (std::nothrow) _FlickInfo;
- SysTryReturn(NID_UI, pFlickInfo, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pFlickInfo, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pFlickInfo->time = touchinfo.GetTimeStamp();
pFlickInfo->x = touchinfo.GetCurrentPosition().x;
}
_FlickInfo* pFlickInfo = new (std::nothrow) _FlickInfo;
- SysTryReturn(NID_UI, pFlickInfo, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pFlickInfo, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pFlickInfo->time = touchinfo.GetTimeStamp();
pFlickInfo->x = touchinfo.GetCurrentPosition().x;
_FlickInfo returnedFlickInfo = {0, };
_FlickInfo* pFlickInfo = new (std::nothrow) _FlickInfo;
- SysTryReturn(NID_UI, pFlickInfo, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pFlickInfo, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pFlickInfo->time = touchinfo.GetTimeStamp();
pFlickInfo->x = touchinfo.GetCurrentPosition().x;
_TouchFlickGestureDetector* pCore = null;
pCore = new (std::nothrow) _TouchFlickGestureDetector;
- SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage.");
+ SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
_TouchFlickGestureDetectorImpl* pImpl = new (std::nothrow) _TouchFlickGestureDetectorImpl(pPublic, pCore);
- SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage.");
+ SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pImpl;
ClearLastResult();
__pEventListenerList = new (std::nothrow) LinkedListT<_ITouchGestureEventListener*>;
- SysTryReturnVoidResult(NID_UI, __pEventListenerList,
- E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pEventListenerList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pWantToFailList = new (std::nothrow) LinkedListT<_TouchGestureDetector*>;
- SysTryCatch(NID_UI, __pWantToFailList, ,
- E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, __pWantToFailList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pCurrentWantToFailList = new (std::nothrow) LinkedListT<_TouchGestureDetector*>;
- SysTryCatch(NID_UI, __pCurrentWantToFailList, ,
- E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, __pCurrentWantToFailList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pDelegator = this;
{
SysTryReturnResult(NID_UI,
__pEventListenerList->Add(const_cast <_ITouchGestureEventListener*>(&listener)) == E_SUCCESS, E_SYSTEM,
- "[E_SYSTEM] System error occurred.");
+ "System error occurred.");
}
return E_SUCCESS;
SysTryReturnResult(NID_UI,
__pEventListenerList->Remove(const_cast <_ITouchGestureEventListener*>(&listener)) == E_SUCCESS, E_SYSTEM,
- "[E_SYSTEM] System error occurred.");
+ "System error occurred.");
return E_SUCCESS;
}
result
_TouchGestureDetector::StartOnFailureOf(const _TouchGestureDetector& gesture)
{
- SysTryReturnResult(NID_UI, IsPossibleToAddFailList(gesture), E_SYSTEM, "[E_SYSTEM] param gesture also waits you to fail.");
+ SysTryReturnResult(NID_UI, IsPossibleToAddFailList(gesture), E_SYSTEM, "param gesture also waits you to fail.");
_TouchGestureDetector* pGesture = const_cast < _TouchGestureDetector* >(&gesture);
bool exist = __pWantToFailList->Contains(pGesture);
if (!exist)
{
SysTryReturnResult(NID_UI, __pWantToFailList->Add(pGesture) == E_SUCCESS,
- E_SYSTEM, "[E_SYSTEM] System error occurred.");
+ E_SYSTEM, "System error occurred.");
}
return E_SUCCESS;
}
IEnumeratorT<ITouchGestureEventListener*>* pEnumerator = pPublicList->GetEnumeratorN();
- SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
while(pEnumerator->MoveNext() == E_SUCCESS)
{
}
IEnumeratorT<_ITouchGestureEventListener*>* pEnumerator = pList->GetEnumeratorN();
- SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
while(pEnumerator->MoveNext() == E_SUCCESS)
{
__pCoreGestureDetector = pCore;
__pPublicGestureEventListenerList = new (std::nothrow) LinkedListT<ITouchGestureEventListener*>;
- SysTryReturnVoidResult(NID_UI, __pPublicGestureEventListenerList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pPublicGestureEventListenerList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pCore->SetUserData(this);
pCore->SetDelegate(*this);
_TouchGestureDetector* pCore = null;
pCore = new (std::nothrow) _TouchGestureDetector;
- SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
_TouchGestureDetectorImpl* pImpl = new (std::nothrow) _TouchGestureDetectorImpl(pPublic, pCore);
- SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
ClearLastResult();
}
result r = __pPublicGestureEventListenerList->Add(&listener);
- SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "%s Propagating", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating.");
return E_SUCCESS;
}
_TouchGestureDetectorImpl::RemoveGestureEventListener(ITouchGestureEventListener& listener)
{
result r = __pPublicGestureEventListenerList->Remove(&listener);
- SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "%s Propagating", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating.");
return E_SUCCESS;
}
_TouchGestureDetectorImpl::StartOnFailureOf(const TouchGestureDetector& gesture)
{
const _TouchGestureDetectorImpl* pImpl = GetInstance(gesture);
- SysTryReturnResult(NID_UI, pImpl, E_INVALID_ARG, "[E_INVALID_ARG] This instance is invalid.");
+ SysTryReturnResult(NID_UI, pImpl, E_INVALID_ARG, "This instance is invalid.");
result r = GetCore().StartOnFailureOf(pImpl->GetCore());
SysTryLog(NID_UI, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r));
TouchEventInfo publicTouchInfo;
pEventArg = GetTouchEventArgN(*pControl, touchinfo);
- SysTryReturn(NID_UI, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
publicTouchInfo.Construct(*pEventArg);
TouchEventInfo publicTouchInfo;
pEventArg = GetTouchEventArgN(*pControl, touchinfo);
- SysTryReturn(NID_UI, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
publicTouchInfo.Construct(*pEventArg);
TouchEventInfo publicTouchInfo;
pEventArg = GetTouchEventArgN(*pControl, touchinfo);
- SysTryReturn(NID_UI, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
publicTouchInfo.Construct(*pEventArg);
TouchEventInfo publicTouchInfo;
pEventArg = GetTouchEventArgN(*pControl, touchinfo);
- SysTryReturn(NID_UI, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
publicTouchInfo.Construct(*pEventArg);
SysTryReturn(NID_UI, pTouchManager, null, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist.");
_TouchEventArg* pEventArg = new (std::nothrow) _TouchEventArg(source, touchInfo.GetTouchStatus());
- SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pEventArg->SetTouchPosition(touchInfo.GetPointId(), pTouchManager->GetStartPoint(touchInfo.GetPointId()).x,
pTouchManager->GetStartPoint(touchInfo.GetPointId()).y,
}
__pManager->SetTimerState(false);
_TouchLongPressGestureDetector* pLongPressGesture = null;
+ _TouchTapGestureDetector* pTapGesture = null;
_TouchGestureDetector* pGestureDetector = __pManager->GetGestureDetector();
if (pGestureDetector)
{
case _TOUCH_GESTURE_DETECTOR_TYPE_TAP:
{
- _TouchTapGestureDetector* pTapGesture = dynamic_cast<_TouchTapGestureDetector*>(pGestureDetector);
+ pTapGesture = dynamic_cast<_TouchTapGestureDetector*>(pGestureDetector);
if (pTapGesture && pTapGesture->IsGestureStarted())
{
{
pLongPressGesture->ResetGestureTimerManager();
}
+
+ if (pTapGesture)
+ {
+ pTapGesture->ResetGestureTimerManager();
+ }
}
void SetTouchGestureTimerManager(_TouchGestureTimerManager* pManager)
__pGestureDetector = const_cast<_TouchGestureDetector*>(&gestureDetector);
__pTimerListener = new (std::nothrow) _TouchGestureTimerListener(*this);
- SysTryReturnVoidResult(NID_UI, __pTimerListener, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed. ");
+ SysTryReturnVoidResult(NID_UI, __pTimerListener, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTimer = new (std::nothrow) Timer;
- SysTryCatch(NID_UI, __pTimer, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, __pTimer, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pTimer->Construct(*__pTimerListener);
SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
result
_TouchGestureTimerManager::StartTimer(int time)
{
- SysTryReturnResult(NID_UI, __pTimer != null, E_SYSTEM, "[E_SYSTEM] System error occurred. ");
+ SysTryReturnResult(NID_UI, __pTimer != null, E_SYSTEM, "System error occurred. ");
result r = __pTimer->Start(time);
- SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating.");
__isTimerStarted = true;
__isTimerExpired = false;
_TouchGestureTimerManager::CancelTimer(void)
{
result r = __pTimer->Cancel();
- SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating.");
__isTimerStarted = false;
__isTimerExpired = true;
, __pLongPressInfoList(null)
{
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
__pLongPressInfoList = new (std::nothrow) ArrayListT<_LongPressInfo*>;
- SysTryReturnVoidResult(NID_UI, __pLongPressInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pLongPressInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
int __duration = static_cast<int>(elm_config_longpress_timeout_get() * 1000);
if (__duration == 0)
for(int i=0; i < MAX_TOUCH_COUNT; i++)
{
_LongPressInfo* pLongPressInfo = new (std::nothrow) _LongPressInfo;
- SysTryCatch(NID_UI, pLongPressInfo, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, pLongPressInfo, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pLongPressInfo->__isPressed = false;
pLongPressInfo->__isInBounds = false;
result
_TouchLongPressGestureDetector::SetDuration(int duration)
{
- SysTryReturnResult(NID_UI, duration > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0");
+ SysTryReturnResult(NID_UI, duration > 0, E_INVALID_ARG, "Argument is less than 0");
__duration = duration;
return E_SUCCESS;
result
_TouchLongPressGestureDetector::SetMoveAllowance(int allowance)
{
- SysTryReturnResult(NID_UI, allowance > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0");
+ SysTryReturnResult(NID_UI, allowance > 0, E_INVALID_ARG, "Argument is less than 0");
__moveAllowance = allowance;
return E_SUCCESS;
result
_TouchLongPressGestureDetector::SetMoveAllowance(float allowance)
{
- SysTryReturnResult(NID_UI, allowance > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0");
+ SysTryReturnResult(NID_UI, allowance > 0, E_INVALID_ARG, "Argument is less than 0");
__moveAllowance = allowance;
return E_SUCCESS;
result
_TouchLongPressGestureDetector::SetTouchCount(int count)
{
- SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0");
+ SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "Argument is less than 0");
__touchCount = count;
__maxPointId = __touchCount-1;
_TouchLongPressGestureDetector* pCore = null;
pCore = new (std::nothrow) _TouchLongPressGestureDetector;
- SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
_TouchLongPressGestureDetectorImpl* pImpl = new (std::nothrow) _TouchLongPressGestureDetectorImpl(pPublic, pCore);
- SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pImpl;
, __pFingerInfoMap(null)
{
__pFingerInfoMap = new (std::nothrow) HashMapT<int, _FingerInfo*>;
- SysTryReturnVoidResult(NID_UI, __pFingerInfoMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pFingerInfoMap, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
SysTryCatch(NID_UI, __pFingerInfoMap->Construct() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error occurred.");
return;
if (pFingerInfo == null)
{
pFingerInfo = new (std::nothrow) _FingerInfo;
- SysTryReturn(NID_UI, pFingerInfo, INVALID_POINT_ID, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] GeneratePointId - Memory allocation failed.");
+ SysTryReturn(NID_UI, pFingerInfo, INVALID_POINT_ID, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pFingerInfo->SetDeviceId(deviceId);
pFingerInfo->SetPointId(pointId);
_MultiFingerInfo::GetMultiFingerListN(void) const
{
IListT<_FingerInfo*>* pFingerInfoMapList = __pFingerInfoMap->GetValuesN();
- SysTryReturn(NID_UI, pFingerInfoMapList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pFingerInfoMapList, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pFingerInfoMapList;
}
_UiEventManager* pEventManager = null;
__pMultiFingerInfo = new (std::nothrow) _MultiFingerInfo;
- SysTryReturnVoidResult(NID_UI, __pMultiFingerInfo, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pMultiFingerInfo, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTouchEventListener = new (std::nothrow) _TouchEventListener;
- SysTryCatch(NID_UI, __pTouchEventListener, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, __pTouchEventListener, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pEventManager = _UiEventManager::GetInstance();
SysTryCatch(NID_UI, pEventManager, , E_SYSTEM, "[E_SYSTEM] _UiEventManager does not exist.");
r = pEventManager->AddTouchEventListener(*__pTouchEventListener);
- SysTryCatch(NID_UI, r == E_SUCCESS, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, r == E_SUCCESS, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ for (int i = 0; i<DEVICE_COUNT; i++)
+ {
+ __listenerOnly[i] = false;
+ }
return;
if (__pInstance == null)
{
__pInstance = new (std::nothrow) _TouchManager;
- SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
}
}
_Control* pControl = GetTouchControlSource();
if (pControl)
{
- controlPos.x = pControl->GetAbsoluteBounds().x;
- controlPos.y = pControl->GetAbsoluteBounds().y;
+ controlPos.x = pControl->GetAbsoluteBoundsF().x;
+ controlPos.y = pControl->GetAbsoluteBoundsF().y;
screenPos.x += controlPos.x;
screenPos.y += controlPos.y;
result
_TouchManager::SendEvent(_Control* pControl, const _TouchInfo& touchInfo)
{
- SysTryReturnResult(NID_UI, pControl, E_INVALID_ARG, "[E_INVALID_ARG] pControl is null.");
+ SysTryReturnResult(NID_UI, pControl, E_INVALID_ARG, "pControl is null.");
_UiTouchEvent event(pControl->GetHandle(), touchInfo, _UI_EVENT_ROUTE_DIRECT);
}
_UiEventManager* pEventManager = _UiEventManager::GetInstance();
- SysTryReturnResult(NID_UI, pEventManager, E_SYSTEM, "[E_SYSTEM] _UiEventManager does not exist.");
+ SysTryReturnResult(NID_UI, pEventManager, E_SYSTEM, "_UiEventManager does not exist.");
__isSendingDelayedEvent = false;
result r = pEventManager->SendEvent(event);
pEventManager->SendEvent(event);
IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN();
- SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
int count = pFingerInfoList->GetCount();
SysTryReturnVoidResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist.");
IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN();
- SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
int count = pFingerInfoList->GetCount();
return __touchAllowed;
}
+void
+_TouchManager::SetListenerOnly(int pointId, bool listenerOnly)
+{
+ __listenerOnly[pointId] = listenerOnly;
+}
+
+bool
+_TouchManager::IsListenerOnly(int pointId) const
+{
+ return __listenerOnly[pointId];
+}
+
bool
_TouchManager::IsInTouchMoveAllowanceBounds(const _Control& source, const _TouchInfo& touchInfo)
{
IListT<_FingerInfo*>* pFingerInfoList = GetMultiFingerInfoListN();
- SysTryReturn(NID_UI, pFingerInfoList, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pFingerInfoList, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
const int count = pFingerInfoList->GetCount();
}
FloatPoint tmpPoint = GetStartPoint(touchInfo.GetPointId());
- Rectangle absBounds = source.GetAbsoluteBounds();
+ FloatRectangle absBounds = source.GetAbsoluteBoundsF();
FloatPoint startPoint(tmpPoint.x - absBounds.x, tmpPoint.y - absBounds.y);
FloatPoint currentPoint = touchInfo.GetCurrentPosition();
, __pTimer(null)
{
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
__pTimer = new (std::nothrow)Timer;
- SysTryReturnVoidResult(NID_UI, __pTimer, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pTimer, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pTimer->Construct(*this);
SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
result
_TouchPanningGestureDetector::SetTouchCount(int count)
{
- SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0");
+ SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "Argument is less than 0");
__touchCount = count;
__maxPointId = __touchCount-1;
SysTryReturn(NID_UI, pTouchManager != null, null, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist.");
IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN();
- SysTryReturn(NID_UI, pFingerInfoList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pFingerInfoList, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
LinkedListT<_TouchInfo*>* pReturnList = new (std::nothrow) LinkedListT<_TouchInfo*>;
- SysTryCatch(NID_UI, pReturnList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, pReturnList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
for (int i = 0; i < pFingerInfoList->GetCount(); i++)
{
if (pFingerInfo->GetStatus() != _TOUCH_FOCUS_OUT)
{
_TouchInfo* pTouchInfo = new (std::nothrow) _TouchInfo;
- SysTryCatch(NID_UI, pTouchInfo, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.\n");
+ SysTryCatch(NID_UI, pTouchInfo, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
Point point(pFingerInfo->GetScreenPoint().x - controlPos.x, pFingerInfo->GetScreenPoint().y - controlPos.y);
pTouchInfo->SetTouchInfo(pFingerInfo->GetPointId(), pFingerInfo->GetStatus(), point, false, 0);
_TouchPanningGestureDetector* pCore = null;
pCore = new (std::nothrow) _TouchPanningGestureDetector;
- SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage.");
+ SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
_TouchPanningGestureDetectorImpl* pImpl = new (std::nothrow) _TouchPanningGestureDetectorImpl(pPublic, pCore);
- SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage.");
+ SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pImpl;
_TouchPanningGestureDetectorImpl::GetTouchInfoListN(void) const
{
IListT<_TouchInfo*>* pTouchInfoList = GetCore().GetTouchInfoListN(GetCore().GetControl());
- SysTryReturn(NID_UI, pTouchInfoList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pTouchInfoList, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
IEnumeratorT<_TouchInfo*>* pEnumerator = null;
LinkedList* pReturnList = new (std::nothrow) LinkedList;
- SysTryCatch(NID_UI, pReturnList,, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, pReturnList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
for (int i = 0; i < pTouchInfoList->GetCount(); i++)
{
}
TouchInfo* pTouchInfo = new (std::nothrow) TouchInfo;
- SysTryCatch(NID_UI, pTouchInfo, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, pTouchInfo, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
if (pFingerInfo->GetTouchStatus() == _TOUCH_PRESSED ||pFingerInfo->GetTouchStatus() == _TOUCH_MOVED )
{
namespace
{
-const int DEFAULT_TOUCH_COUNT = 2;
const int POLLING_PINCH = 16;
const int PINCH_THRESHOLD = 10;
}
, __scale(0)
{
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
__pTimer = new (std::nothrow)Timer;
- SysTryReturnVoidResult(NID_UI, __pTimer, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pTimer, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pTimer->Construct(*this);
SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryReturn(NID_UI, pTouchManager != null, null, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist.");
IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN();
- SysTryReturn(NID_UI, pFingerInfoList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pFingerInfoList, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
//SysLog(NID_UI, "GetCount = %d, minX = %d, minY = %d, maxX = %d, maxY = %d", pFingerInfoList->GetCount(), __MinimumPoint.x, __MinimumPoint.y, __MaximumPoint.x, __MaximumPoint.y);
continue;
}
+ _Control* pTouchedControl = GetControl();
+ if (pTouchedControl)
+ {
+ FloatPoint startPoint = pFingerInfo->GetStartPoint();
+ FloatRectangle absBounds = pTouchedControl->GetAbsoluteBoundsF();
+
+ if (startPoint.x < absBounds.x || startPoint.x > absBounds.x+absBounds.width)
+ {
+ continue;
+ }
+ if (startPoint.y < absBounds.y || startPoint.y > absBounds.y+absBounds.height)
+ {
+ continue;
+ }
+ }
+
//SysLog(NID_UI, "pointId = %d, x = %d, y = %d", pFingerInfo->GetPointId(), pFingerInfo->GetPoint().x, pFingerInfo->GetPoint().y);
Tizen::Graphics::FloatPoint point = pFingerInfo->GetPoint();
_TouchPinchGestureDetector* pCore = null;
pCore = new (std::nothrow) _TouchPinchGestureDetector;
- SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
_TouchPinchGestureDetectorImpl* pImpl = new (std::nothrow) _TouchPinchGestureDetectorImpl(pPublic, pCore);
- SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pImpl;
namespace
{
const float PI = 3.14159265;
-const float RAD_90DEGREE = PI / 2;
-const float RAD_180DEGREE = PI;
-const float RAD_270DEGREE = RAD_90DEGREE * 3;
-const float RAD_360DEGREE = RAD_180DEGREE * 2;
-const int DEFAULT_TOUCH_COUNT = 2;
const int MIN_ANGLE = 15;
const float DEGREE_360 = 360.0;
const int DEGREE_180 = 180;
const int DEGREE_90 = 90;
const float MIN_MOVEALLOWANCE = 20;
const int POLLING_ROTATION = 16;
-const unsigned int SECOND_POINT_ID = 1;
}
namespace Tizen { namespace Ui
, __secondPointId(INVALID_POINT_ID)
{
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
__pTimer = new (std::nothrow) Timer;
- SysTryReturnVoidResult(NID_UI, __pTimer, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pTimer, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pTimer->Construct(*this);
SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
_TouchRotationGestureDetector* pCore = null;
pCore = new (std::nothrow) _TouchRotationGestureDetector;
- SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage.");
+ SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
_TouchRotationGestureDetectorImpl* pImpl = new (std::nothrow) _TouchRotationGestureDetectorImpl(pPublic, pCore);
- SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is shortage.");
+ SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pImpl;
const int DEFAULT_MOVE_ALLOWANCE = 10;
const int DEFAULT_TOUCH_COUNT = 1;
const int MAX_TOUCH_COUNT = 10;
-const int INIT_TAP_COUNT = 1;
-const int INVALID_POINT_ID = 9999;
}
namespace Tizen { namespace Ui
public:
bool __isPressed;
int __tappedCount;
+ float __tapMoveAllowance;
+ bool __tapIsInBounds;
+ FloatPoint __tapStartPoint;
};
_TouchTapGestureDetector::_TouchTapGestureDetector(void)
: __tapCount(DEFAULT_TAP_COUNT)
, __interval(DEFAULT_INTERNAL)
, __touchCount(DEFAULT_TOUCH_COUNT)
- , __oneTapMoveAllowance(DEFAULT_MOVE_ALLOWANCE)
- , __oneTapIsInBounds(true)
, __maxPointId(DEFAULT_TOUCH_COUNT-1)
- , __oneTapStartPoint(0, 0)
, __pGestureTimerManager(null)
, __pTapInfoList(null)
+ , __touchCanceled(false)
+ , __deleteTimer(true)
{
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r));
-
- __pGestureTimerManager = new (std::nothrow) _TouchGestureTimerManager(*this);
- SysTryReturnVoidResult(NID_UI, __pGestureTimerManager, E_SYSTEM, "[E_SYSTEM] System error occurred..");
+ SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
__pTapInfoList = new (std::nothrow) ArrayListT<_TapInfo*>;
- SysTryReturnVoidResult(NID_UI, __pTapInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI, __pTapInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
for(int i=0; i < MAX_TOUCH_COUNT; i++)
{
_TapInfo* pTapInfo = new (std::nothrow) _TapInfo;
- SysTryCatch(NID_UI, pTapInfo, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, pTapInfo, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pTapInfo->__isPressed = false;
pTapInfo->__tappedCount = 0;
+ pTapInfo->__tapMoveAllowance = DEFAULT_MOVE_ALLOWANCE;
+ pTapInfo->__tapIsInBounds = false;
+ pTapInfo->__tapStartPoint.x = 0;
+ pTapInfo->__tapStartPoint.y = 0;
__pTapInfoList->Add(pTapInfo);
}
return;
CATCH:
- if (__pGestureTimerManager)
- {
- delete __pGestureTimerManager;
- __pGestureTimerManager = null;
- }
-
if (__pTapInfoList)
{
RemoveTapInfoList();
delete __pTapInfoList;
__pTapInfoList = null;
- delete __pGestureTimerManager;
- __pGestureTimerManager = null;
+ if (__pGestureTimerManager)
+ {
+ if (IsTouchCanceled() == false)
+ {
+ __pGestureTimerManager->CancelTimer();
+ }
+
+ delete __pGestureTimerManager;
+ __pGestureTimerManager = null;
+
+ __touchCanceled = false;
+ }
}
void
result
_TouchTapGestureDetector::SetTapCount(int count)
{
- SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0");
+ SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "Argument is less than 0");
__tapCount = count;
return E_SUCCESS;
result
_TouchTapGestureDetector::SetTapInterval(long intarval)
{
- SysTryReturnResult(NID_UI, intarval > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0");
+ SysTryReturnResult(NID_UI, intarval > 0, E_INVALID_ARG, "Argument is less than 0");
__interval = intarval;
return E_SUCCESS;
result
_TouchTapGestureDetector::SetTouchCount(int count)
{
- SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0");
+ SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "Argument is less than 0");
__touchCount = count;
__maxPointId = __touchCount - 1;
result
_TouchTapGestureDetector::SetMoveAllowance(int allowance)
{
- SysTryReturnResult(NID_UI, allowance >= 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0");
+ SysTryReturnResult(NID_UI, allowance >= 0, E_INVALID_ARG, "Argument is less than 0");
SysTryReturnResult(NID_UI, __touchCount == DEFAULT_TOUCH_COUNT, E_INVALID_CONDITION, "[E_INVALID_CONDITION] move allowance applies only for default(1) touch count.");
- __oneTapMoveAllowance = allowance;
+ for(int i=0; i<__touchCount; i++)
+ {
+ _TapInfo* pTapInfo = null;
+ __pTapInfoList->GetAt(i, pTapInfo);
+ if (!pTapInfo)
+ {
+ continue;
+ }
+
+ pTapInfo->__tapMoveAllowance = allowance;
+ }
return E_SUCCESS;
}
int
_TouchTapGestureDetector::GetMoveAllowance(void) const
{
- return __oneTapMoveAllowance;
+ return GetMoveAllowanceF();
}
result
_TouchTapGestureDetector::SetMoveAllowance(float allowance)
{
- SysTryReturnResult(NID_UI, allowance >= 0, E_INVALID_ARG, "[E_INVALID_ARG] Argument is less than 0");
- SysTryReturnResult(NID_UI, __touchCount == DEFAULT_TOUCH_COUNT, E_INVALID_CONDITION, "[E_INVALID_CONDITION] move allowance applies only for default(1) touch count.");
+ SysTryReturnResult(NID_UI, allowance >= 0, E_INVALID_ARG, "Argument is less than 0");
+ SysTryReturnResult(NID_UI, __touchCount == DEFAULT_TOUCH_COUNT, E_INVALID_CONDITION, "move allowance applies only for default(1) touch count.");
- __oneTapMoveAllowance = allowance;
+ for(int i=0; i<__touchCount; i++)
+ {
+ _TapInfo* pTapInfo = null;
+ __pTapInfoList->GetAt(i, pTapInfo);
+ if (!pTapInfo)
+ {
+ continue;
+ }
+
+ pTapInfo->__tapMoveAllowance = allowance;
+ }
return E_SUCCESS;
}
float
_TouchTapGestureDetector::GetMoveAllowanceF(void) const
{
- return __oneTapMoveAllowance;
+ _TapInfo* pTapInfo = null;
+ __pTapInfoList->GetAt(0, pTapInfo);
+
+ return pTapInfo->__tapMoveAllowance;
}
bool
_TouchTapGestureDetector::IsInBounds(void)
{
- return __oneTapIsInBounds;
+ bool isInBounds = true;
+
+ for(int i=0; i<__touchCount; i++)
+ {
+ _TapInfo* pTapInfo = null;
+ __pTapInfoList->GetAt(i, pTapInfo);
+ SysTryReturn(NID_UI, pTapInfo, false, E_SYSTEM, "[E_SYSTEM] System error occurred. ");
+
+ if (pTapInfo->__isPressed)
+ {
+ if (pTapInfo->__tapIsInBounds == false)
+ {
+ isInBounds = false;
+ break;
+ }
+ }
+ }
+ return isInBounds;
}
bool
__pTapInfoList->GetAt(touchinfo.GetPointId(), pTapInfo);
SysTryReturn(NID_UI, pTapInfo, false, E_SYSTEM, "[E_SYSTEM] System error occurred. ");
- if (__touchCount == DEFAULT_TOUCH_COUNT)
- {
- if (pTapInfo->__tappedCount == 0)
- {
- __oneTapStartPoint.x = touchinfo.GetCurrentPosition().x;
- __oneTapStartPoint.y = touchinfo.GetCurrentPosition().y;
- }
-
- if (Math::Abs(touchinfo.GetCurrentPosition().x - __oneTapStartPoint.x) > __oneTapMoveAllowance
- || Math::Abs(touchinfo.GetCurrentPosition().y - __oneTapStartPoint.y) > __oneTapMoveAllowance)
- {
- __oneTapIsInBounds = false;
- }
- else
- {
- __oneTapIsInBounds = true;
- }
- }
- else
- {
- __oneTapIsInBounds = true;
- }
-
+ pTapInfo->__tapStartPoint.x = touchinfo.GetCurrentPosition().x;
+ pTapInfo->__tapStartPoint.y = touchinfo.GetCurrentPosition().y;
+ pTapInfo->__tapIsInBounds = true;
pTapInfo->__isPressed = true;
SysTryReturn(NID_UI, __pTapInfoList->SetAt(pTapInfo, touchinfo.GetPointId()) == E_SUCCESS,
SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_READY);
SetGestureStart(true);
- if (__pGestureTimerManager->IsTimerStarted() == false)
+ __pGestureTimerManager = new (std::nothrow) _TouchGestureTimerManager(*this);
+ SysTryReturn(NID_UI, __pGestureTimerManager, null, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+
+ if (__pGestureTimerManager != null && __pGestureTimerManager->IsTimerStarted() == false)
{
_Control* pControl = GetControl();
if (!pControl)
return false;
}
- if (__touchCount == DEFAULT_TOUCH_COUNT)
+ _TapInfo* pTapInfo = null;
+ __pTapInfoList->GetAt(touchinfo.GetPointId(), pTapInfo);
+ SysTryReturn(NID_UI, pTapInfo, false, E_SYSTEM, "[E_SYSTEM] System error occurred. ");
+
+ if (Math::Abs(touchinfo.GetCurrentPosition().x - pTapInfo->__tapStartPoint.x) > pTapInfo->__tapMoveAllowance
+ || Math::Abs(touchinfo.GetCurrentPosition().y - pTapInfo->__tapStartPoint.y) > pTapInfo->__tapMoveAllowance)
{
- if (Math::Abs(touchinfo.GetCurrentPosition().x - __oneTapStartPoint.x) > __oneTapMoveAllowance
- || Math::Abs(touchinfo.GetCurrentPosition().y - __oneTapStartPoint.y) > __oneTapMoveAllowance)
+ pTapInfo->__tapIsInBounds = false;
+
+ if (__pGestureTimerManager != null && __pGestureTimerManager->IsTimerStarted() == false)
{
- __oneTapIsInBounds = false;
- __pGestureTimerManager->CancelTimer();
- SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED);
- ClearTapInfoList();
+ if (IsTouchCanceled() == false)
+ {
+ __pGestureTimerManager->CancelTimer();
+ __touchCanceled = true;
+ }
}
+ SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED);
+ ClearTapInfoList();
}
return false;
SysTryReturn(NID_UI, __pTapInfoList->SetAt(pTapInfo, touchinfo.GetPointId()) == E_SUCCESS,
false, E_SYSTEM, "[E_SYSTEM] System error occurred.");
- if (__touchCount == DEFAULT_TOUCH_COUNT)
+ if (Math::Abs(touchinfo.GetCurrentPosition().x - pTapInfo->__tapStartPoint.x) > pTapInfo->__tapMoveAllowance
+ || Math::Abs(touchinfo.GetCurrentPosition().y - pTapInfo->__tapStartPoint.y) > pTapInfo->__tapMoveAllowance)
{
- if (Math::Abs(touchinfo.GetCurrentPosition().x - __oneTapStartPoint.x) > __oneTapMoveAllowance
- || Math::Abs(touchinfo.GetCurrentPosition().y - __oneTapStartPoint.y) > __oneTapMoveAllowance)
+ if (__pGestureTimerManager != null && !__pGestureTimerManager->IsTimerExpired())
{
- __oneTapIsInBounds = false;
+ if (IsTouchCanceled() == false)
+ {
+ __pGestureTimerManager->CancelTimer();
+ }
+
+ delete __pGestureTimerManager;
+ __pGestureTimerManager = null;
+
+ __touchCanceled = false;
}
+ SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED);
+ ClearTapInfoList();
+ return false;
}
}
{
if (IsAllTapped() && IsInBounds())
{
- __pGestureTimerManager->CancelTimer();
+ if (__pGestureTimerManager != null && !__pGestureTimerManager->IsTimerExpired())
+ {
+ if (IsTouchCanceled() == false)
+ {
+ __pGestureTimerManager->CancelTimer();
+ }
+
+ delete __pGestureTimerManager;
+ __pGestureTimerManager = null;
+
+ __touchCanceled = false;
+ }
SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_SUCCESS);
ClearTapInfoList();
}
{
if (!IsAllTapped() && !IsGestureStarted())
{
- if (!__pGestureTimerManager->IsTimerExpired())
+ if (__pGestureTimerManager != null && !__pGestureTimerManager->IsTimerExpired())
{
- __pGestureTimerManager->CancelTimer();
+ if (IsTouchCanceled() == false)
+ {
+ __pGestureTimerManager->CancelTimer();
+ }
+
+ delete __pGestureTimerManager;
+ __pGestureTimerManager = null;
+
+ __touchCanceled = false;
}
SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED);
ClearTapInfoList();
{
ClearTapInfoList();
- if (__pGestureTimerManager->IsTimerExpired() == false)
+ if (__pGestureTimerManager != null && __pGestureTimerManager->IsTimerExpired() == false)
{
__pGestureTimerManager->CancelTimer();
+
+ if (__deleteTimer)
+ {
+ delete __pGestureTimerManager;
+ __pGestureTimerManager = null;
+
+ __touchCanceled = false;
+ }
+ else
+ {
+ __touchCanceled = true;
+ }
}
return false;
}
void
+_TouchTapGestureDetector::ResetGestureTimerManager(void)
+{
+ if (__pGestureTimerManager)
+ {
+ delete __pGestureTimerManager;
+ __pGestureTimerManager = null;
+ }
+ __touchCanceled = false;
+ __deleteTimer = true;
+}
+
+bool
+_TouchTapGestureDetector::IsTouchCanceled(void) const
+{
+ return __touchCanceled;
+}
+
+
+void
+_TouchTapGestureDetector::EnableToDeleteTimer(bool deleteTimer)
+{
+ __deleteTimer = deleteTimer;
+}
+
+void
_TouchTapGestureDetector::ClearTapInfoList(void)
{
for(int i=0; i < MAX_TOUCH_COUNT; i++)
_TouchTapGestureDetector* pCore = null;
pCore = new (std::nothrow) _TouchTapGestureDetector;
- SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
_TouchTapGestureDetectorImpl* pImpl = new (std::nothrow) _TouchTapGestureDetectorImpl(pPublic, pCore);
- SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pImpl;
for (int i = 0; i < controlCount; i++)
{
__pUiBuilderControlList->GetAt(i, pUiBuilderControl);
- delete pUiBuilderControl;
+ if (pUiBuilderControl)
+ {
+ delete pUiBuilderControl;
+ }
}
__pUiBuilderControlList->RemoveAll();
delete __pUiBuilderControlList;
{
r = MakeUI(pUiBuilderControl);
SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[UiBuilder] Failed to create control %ls", pUiBuilderControl->GetType().GetPointer());
- delete pUiBuilderControl;
}
}
- if (__pUiBuilderControlList)
- {
- __pUiBuilderControlList->RemoveAll();
- delete __pUiBuilderControlList;
- __pUiBuilderControlList = null;
- }
-
if (__pTransform)
{
delete __pTransform;
*/
#include <app.h>
+#include <sensor.h>
#include <runtime_info.h>
#include <FAppApplication.h>
#include <FAppApp.h>
#include "FUi_UiBuilderControlMaker.h"
#include "FUi_UiBuilder.h"
#include "FUi_LayoutLayoutMaker.h"
+#include "FUi_Window.h"
+#include "FUi_ControlManager.h"
+#include "FUi_EcoreEvas.h"
+#include "FUi_EcoreEvasMgr.h"
using namespace Tizen::Base;
using namespace Tizen::Ui;
: __pLayoutMaker(new(std::nothrow)_LayoutMaker(pUibuilder))
, __pUiBuilder(pUibuilder)
{
- SysTryReturnVoidResult(NID_UI, __pLayoutMaker != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, __pLayoutMaker != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
}
_UiBuilderControlMaker::_UiBuilderControlMaker(void)
: __pUiBuilder(null)
app_device_orientation_e deviceOrientation = app_get_device_orientation();
bool isHorizontal = (deviceOrientation == APP_DEVICE_ORIENTATION_90) || (deviceOrientation == APP_DEVICE_ORIENTATION_270);
+ if (deviceOrientation == APP_DEVICE_ORIENTATION_0)
+ {
+ unsigned long rotationState = 0;
+ int ret = sf_check_rotation(&rotationState);
+ int device_rotation = 0;
+ if (rotationState == ROTATION_UNKNOWN)
+ {
+ _Window* pCurrentFrame = _ControlManager::GetInstance()->GetCurrentFrame();
+ if (pCurrentFrame)
+ {
+ _EcoreEvas* pEcoreEvas = ::GetEcoreEvasMgr()->GetEcoreEvas();
+ if (pEcoreEvas)
+ {
+ device_rotation = pEcoreEvas->GetWindowRotation(*pCurrentFrame);
+ }
+ }
+ }
+ isHorizontal = (device_rotation == 90 ) || (device_rotation == 270);
+ }
+
if (isHorizontal && autoRotateLock == true)
{
__pUiBuilder->SetUiBuilderRotateState(UIBUIDER_SCREEN_HORIZONTAL);
{
result r = E_SUCCESS;
- SysTryReturn(NID_UI, !IsListenerRegistered(eventType, listenerType, listener), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+ if (IsListenerRegistered(eventType, listenerType, listener))
+ {
+ SysLog(NID_UI, "[E_SYSTEM] System error occurred.");
+ SetLastResult(E_SYSTEM);
+ return E_SYSTEM;
+ }
LinkedListT <_IUiEventListener*>* pEventListeners = GetEventListeners(eventType, listenerType);
if (pEventListeners)
_UiEventManager::ProcessEvent(const _UiEvent& event, bool& isFiltered)
{
result r = E_SUCCESS;
- _ResourceManager::GetInstance()->AcquireFeedback();
+ if (event.GetEventType() == _UI_EVENT_TOUCH || event.GetEventType() == _UI_EVENT_KEY)
+ {
+ _ResourceManager::GetInstance()->AcquireFeedback();
+ }
switch (event.GetRouteType())
{
case _UI_EVENT_ROUTE_TUNNEL_BUBBLE:
default:
break;
}
- _ResourceManager::GetInstance()->ReleaseFeedback();
+ if (event.GetEventType() == _UI_EVENT_TOUCH || event.GetEventType() == _UI_EVENT_KEY)
+ {
+ _ResourceManager::GetInstance()->ReleaseFeedback();
+ }
return r;
}
}
void
+_UiEventManager::ClearEventQueue(void)
+{
+ SysLog(NID_UI, "ClearTouchEventQueue");
+
+ __pEventManager->ClearEventQueue();
+}
+
+void
_UiEventManager::RemoveAllEventListenerList(Tizen::Base::Collection::HashMapT<_UiEventType, Tizen::Base::Collection::LinkedListT<_IUiEventListener*>*>* pMap)
{
Tizen::Base::Collection::IMapEnumeratorT<_UiEventType, Tizen::Base::Collection::LinkedListT<_IUiEventListener*>*>* pMapEnumerator = pMap->GetMapEnumeratorN();
- SysTryReturnVoidResult(NID_UI, pMapEnumerator, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pMapEnumerator, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
while (pMapEnumerator->MoveNext() == E_SUCCESS)
{
: __pEventManager(new (std::nothrow) _EflUiEventManager)
{
unique_ptr<HashMapT<_UiEventType, LinkedListT<_IUiEventListener*>*> > pEventListenerMap(new (std::nothrow) HashMapT<_UiEventType, LinkedListT<_IUiEventListener*>*>);
- SysTryReturnVoidResult(NID_UI, pEventListenerMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pEventListenerMap, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pEventListenerMap->Construct();
SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
// Touch
LinkedListT<_IUiEventListener*>* pTouchEventListeners = new (std::nothrow) LinkedListT<_IUiEventListener*>;
- SysTryReturnVoidResult(NID_UI, pTouchEventListeners, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pTouchEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pEventListenerMap->Add(_UI_EVENT_TOUCH, pTouchEventListeners);
SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
// Key
LinkedListT<_IUiEventListener*>* pKeyEventListeners = new (std::nothrow) LinkedListT<_IUiEventListener*>;
- SysTryReturnVoidResult(NID_UI, pKeyEventListeners, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pKeyEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pEventListenerMap->Add(_UI_EVENT_KEY, pKeyEventListeners);
SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
// Focus
LinkedListT<_IUiEventListener*>* pFocusEventListeners = new (std::nothrow) LinkedListT<_IUiEventListener*>;
- SysTryReturnVoidResult(NID_UI, pFocusEventListeners, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pFocusEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pEventListenerMap->Add(_UI_EVENT_FOCUS, pFocusEventListeners);
SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
// Notification
LinkedListT <_IUiEventListener*>* pNotificationEventListeners = new (std::nothrow) LinkedListT<_IUiEventListener*>;
- SysTryReturnVoidResult(NID_UI, pNotificationEventListeners, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pNotificationEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pEventListenerMap->Add(_UI_EVENT_NOTIFICAITON, pNotificationEventListeners);
SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
// post
unique_ptr<HashMapT<_UiEventType, LinkedListT<_IUiEventListener*>*> > pPostEventListenerMap(new (std::nothrow) HashMapT<_UiEventType, LinkedListT<_IUiEventListener*>*>);
- SysTryReturnVoidResult(NID_UI, pPostEventListenerMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pPostEventListenerMap, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pPostEventListenerMap->Construct();
SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
// Key
LinkedListT<_IUiEventListener*>* pPostKeyEventListeners = new (std::nothrow) LinkedListT<_IUiEventListener*>;
- SysTryReturnVoidResult(NID_UI, pPostKeyEventListeners, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pPostKeyEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pPostEventListenerMap->Add(_UI_EVENT_KEY, pPostKeyEventListeners);
SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
// target post
unique_ptr<HashMapT<_UiEventType, LinkedListT<_IUiEventListener*>*> > pTargetPostEventListenerMap(new (std::nothrow) HashMapT<_UiEventType, LinkedListT<_IUiEventListener*>*>);
- SysTryReturnVoidResult(NID_UI, pTargetPostEventListenerMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pTargetPostEventListenerMap, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pTargetPostEventListenerMap->Construct();
SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
// target Key
LinkedListT<_IUiEventListener*>* pTargetPostKeyEventListeners = new (std::nothrow) LinkedListT<_IUiEventListener*>;
- SysTryReturnVoidResult(NID_UI, pTargetPostKeyEventListeners, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pTargetPostKeyEventListeners, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pTargetPostEventListenerMap->Add(_UI_EVENT_KEY, pTargetPostKeyEventListeners);
SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
{
return _UiEvent::IsEventEnabled(control);
}
-
+
return true;
}
case KEY_PRESSED:
{
isFiltered = pKeyEventPreviewer->OnPreviewKeyPressed(*pTarget, __keyInfo);
+ if (isFiltered == true)
+ {
+ SysLog(NID_UI, "[PreviewEvent] KEY_PRESSED Consumed : target = 0x%x", pTarget);
+ }
}
break;
case KEY_RELEASED:
{
isFiltered = pKeyEventPreviewer->OnPreviewKeyReleased(*pTarget, __keyInfo);
+ if (isFiltered == true)
+ {
+ SysLog(NID_UI, "[PreviewEvent] KEY_RELEASED Consumed : target = 0x%x", pTarget);
+ }
}
break;
{
case KEY_PRESSED:
isFiltered = pKeyEventListener->OnKeyPressed(*pTarget, __keyInfo);
+ if (isFiltered == true)
+ {
+ SysLog(NID_UI, "[Event] KEY_PRESSED Consumed : target = 0x%x", pTarget);
+ }
break;
case KEY_RELEASED:
isFiltered = pKeyEventListener->OnKeyReleased(*pTarget, __keyInfo);
+ if (isFiltered == true)
+ {
+ SysLog(NID_UI, "[Event] KEY_RELEASED Consumed : target = 0x%x", pTarget);
+ }
break;
// 2.0 compatibility for key simulate
#include "FUi_TouchEventArg.h"
#include "FUi_ControlManager.h"
#include "FUi_CoordinateSystemUtils.h"
+#include "FUi_TouchFlickGestureDetector.h"
+#include "FUi_TouchFlickGestureDetectorImpl.h"
extern "C" {
extern void _UiPrintControl(const Tizen::Ui::_Control& control, bool printChildren);
, __currentPosition(0, 0)
, __isFlicked(false)
, __timeStamp(0)
+ , __zAxis(0)
+ , __buttons(_TOUCH_BUTTON_NONE)
{
}
-_TouchInfo::_TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::Point& current, const bool isFlick, long long timeStamp)
+_TouchInfo::_TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::Point& current, const bool isFlick, long long timeStamp, int zAxis, unsigned int buttons)
: __pointId(pointId)
, __touchStatus(status)
, __isFlicked(isFlick)
, __timeStamp(timeStamp)
+ , __zAxis(zAxis)
+ , __buttons(buttons)
{
__currentPosition = _CoordinateSystemUtils::ConvertToFloat(current);
}
-_TouchInfo::_TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::FloatPoint& current, const bool isFlick, long long timeStamp)
+_TouchInfo::_TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::FloatPoint& current, const bool isFlick, long long timeStamp, int zAxis, unsigned int buttons)
: __pointId(pointId)
, __touchStatus(status)
, __currentPosition(current)
, __isFlicked(isFlick)
, __timeStamp(timeStamp)
+ , __zAxis(zAxis)
+ , __buttons(buttons)
{
}
, __currentPosition(rhs.__currentPosition)
, __isFlicked(rhs.__isFlicked)
, __timeStamp(rhs.__timeStamp)
+ , __zAxis(rhs.__zAxis)
+ , __buttons(rhs.__buttons)
{
}
__currentPosition = rhs.__currentPosition;
__isFlicked = rhs.__isFlicked;
__timeStamp = rhs.__timeStamp;
+ __zAxis = rhs.__zAxis;
+ __buttons = rhs.__buttons;
}
return *this;
return __timeStamp;
}
-void
-_TouchInfo::SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::Point& current, bool isFlick, long long timeStamp)
-{
- __pointId = pointId;
- __touchStatus = status;
- __currentPosition = _CoordinateSystemUtils::ConvertToFloat(current);
- __isFlicked = isFlick;
- __timeStamp = timeStamp;
-}
-
-void
-_TouchInfo::SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::FloatPoint& current, bool isFlick, long long timeStamp)
-{
- __pointId = pointId;
- __touchStatus = status;
- __currentPosition = current;
- __isFlicked = isFlick;
- __timeStamp = timeStamp;
-}
-
-_MouseInfo::_MouseInfo(void)
- : __pointId(0)
- , __touchStatus(_TOUCH_PRESSED)
- , __currentPosition(0, 0)
- , __zAxis(0)
- , __buttons(0)
- , __isFlicked(false)
- , __timeStamp(0)
-{
-}
-
-_MouseInfo::_MouseInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::FloatPoint& current, int zAxis, int buttons, const bool isFlick, long long timeStamp)
- : __pointId(pointId)
- , __touchStatus(status)
- , __currentPosition(current)
- , __zAxis(zAxis)
- , __buttons(buttons)
- , __isFlicked(isFlick)
- , __timeStamp(timeStamp)
-{
-}
-
-_MouseInfo::_MouseInfo(const _MouseInfo& rhs)
- : __pointId(rhs.__pointId)
- , __touchStatus(rhs.__touchStatus)
- , __currentPosition(rhs.__currentPosition)
- , __zAxis(rhs.__zAxis)
- , __buttons(rhs.__buttons)
- , __isFlicked(rhs.__isFlicked)
- , __timeStamp(rhs.__timeStamp)
-{
-}
-
-_MouseInfo&
-_MouseInfo::operator =(const _MouseInfo& rhs)
-{
- if (this != &rhs)
- {
- __pointId = rhs.__pointId;
- __touchStatus = rhs.__touchStatus;
- __currentPosition = rhs.__currentPosition;
- __zAxis = rhs.__zAxis;
- __buttons = rhs.__buttons;
- __isFlicked = rhs.__isFlicked;
- __timeStamp = rhs.__timeStamp;
- }
-
- return *this;
-}
-
-_MouseInfo::~_MouseInfo(void)
-{
-}
-
-_TouchStatus
-_MouseInfo::GetTouchStatus(void) const
-{
- return __touchStatus;
-}
-
-Tizen::Graphics::FloatPoint
-_MouseInfo::GetCurrentPosition(void) const
-{
- return __currentPosition;
-}
-
-unsigned long
-_MouseInfo::GetPointId(void) const
-{
- return __pointId;
-}
-
int
-_MouseInfo::GetZAxis(void) const
+_TouchInfo::GetZAxis(void) const
{
return __zAxis;
}
-int
-_MouseInfo::GetButtons(void) const
+unsigned int
+_TouchInfo::GetButtons(void) const
{
return __buttons;
}
-bool
-_MouseInfo::IsFlicked(void) const
-{
- return __isFlicked;
-}
-
-long long
-_MouseInfo::GetTimeStamp(void) const
-{
- return __timeStamp;
-}
-
void
-_MouseInfo::SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::Point& current, int zAxis, int buttons, bool isFlick, long long timeStamp)
+_TouchInfo::SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::Point& current, bool isFlick, long long timeStamp, int zAxis, unsigned int buttons)
{
__pointId = pointId;
__touchStatus = status;
__currentPosition = _CoordinateSystemUtils::ConvertToFloat(current);
- __zAxis = zAxis;
- __buttons = buttons;
__isFlicked = isFlick;
__timeStamp = timeStamp;
+ __zAxis = zAxis;
+ __buttons = buttons;
}
void
-_MouseInfo::SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::FloatPoint& current, int zAxis, int buttons, bool isFlick, long long timeStamp)
+_TouchInfo::SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::FloatPoint& current, bool isFlick, long long timeStamp, int zAxis, unsigned int buttons)
{
__pointId = pointId;
__touchStatus = status;
__currentPosition = current;
- __zAxis = zAxis;
- __buttons = buttons;
__isFlicked = isFlick;
__timeStamp = timeStamp;
+ __zAxis = zAxis;
+ __buttons = buttons;
}
_UiTouchEvent::_UiTouchEvent(const _UiObjectHandle& destination, const _TouchInfo& touchInfo, _UiEventRouteType routeType, const _UiObjectHandle& source)
bool
_UiTouchEvent::IsEventEnabled(const _Control& control) const
{
+ if (GetTouchInfo()->GetTouchStatus() == _TOUCH_CANCELED)
+ {
+ return true;
+ }
+
if (!_UiEvent::IsEventEnabled(control))
{
return false;
}
- if (GetTouchInfo()->GetTouchStatus() != _TOUCH_CANCELED)
+ if (!control.IsInputEventEnabled())
{
- if (!control.IsInputEventEnabled())
- {
- return false;
- }
+ return false;
}
return true;
result
_UiTouchEvent::FireListener(const _ITouchEventListener* pListener, const _Control* pControl, bool isTouchEvent, bool& isFiltered)
{
+ bool isInputFiltered = isFiltered;
_ITouchEventListener* pTouchEventListener = const_cast <_ITouchEventListener*>(pListener);
SysTryReturn(NID_UI, pTouchEventListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
{
SysLog(NID_UI, "pTarget == null, Call ResetTouchInfo.");
_TouchManager* pTouchManager = _TouchManager::GetInstance();
+ SysTryReturnResult(NID_UI, pTouchManager, E_SYSTEM, "System error occurred. ");
+
pTouchManager->ResetTouchInfo();
return E_SUCCESS;
if (pControl)
{
_TouchManager* pTouchManager = _TouchManager::GetInstance();
- SysAssert(pTouchManager != null)
+ SysTryReturnResult(NID_UI, pTouchManager, E_SYSTEM, "System error occurred. ");
point = GetRelativePoint(*pControl, pTouchInfo->GetCurrentPosition());
point = GetRelativePoint(*pTarget, pTouchInfo->GetCurrentPosition());
}
- _TouchInfo touchInfo(pTouchInfo->GetPointId(), pTouchInfo->GetTouchStatus(), point, false, pTouchInfo->GetTimeStamp());
+ _TouchInfo touchInfo;
+
+ _TouchFlickGestureDetector* pTouchFlickGestureDetector = dynamic_cast<_TouchFlickGestureDetector*>(pTouchEventListener);
+ _TouchFlickGestureDetectorImpl* pTouchFlickGestureDetectorImpl = dynamic_cast<_TouchFlickGestureDetectorImpl*>(pTouchEventListener);
+ if (pTouchFlickGestureDetector || pTouchFlickGestureDetectorImpl)
+ {
+ _TouchInfo tempTouchInfo(pTouchInfo->GetPointId(), pTouchInfo->GetTouchStatus(), pTouchInfo->GetCurrentPosition(), false, pTouchInfo->GetTimeStamp());
+ touchInfo = tempTouchInfo;
+ }
+ else
+ {
+ _TouchInfo tempTouchInfo(pTouchInfo->GetPointId(), pTouchInfo->GetTouchStatus(), point, false, pTouchInfo->GetTimeStamp());
+ touchInfo = tempTouchInfo;
+ }
switch (touchInfo.GetTouchStatus())
{
case _TOUCH_PRESSED:
isFiltered = pTouchEventListener->OnTouchPressed(*pTarget, touchInfo);
+ if (!isInputFiltered && isFiltered == true)
+ {
+ if (pControl)
+ {
+ SysLog(NID_UI, "[Event] TOUCH_PRESSED Consumed : control = 0x%x", pControl);
+ }
+ else
+ {
+ SysLog(NID_UI, "[Listener] TOUCH_PRESSED Consumed : listener = 0x%x", pTouchEventListener);
+ }
+ }
break;
case _TOUCH_RELEASED:
isFiltered = pTouchEventListener->OnTouchReleased(*pTarget, touchInfo);
+ if (!isInputFiltered && isFiltered == true)
+ {
+ if (pControl)
+ {
+ SysLog(NID_UI, "[Event] TOUCH_RELEASED Consumed : control = 0x%x", pControl);
+ }
+ else
+ {
+ SysLog(NID_UI, "[Listener] TOUCH_RELEASED Consumed : listener = 0x%x", pTouchEventListener);
+ }
+ }
break;
case _TOUCH_MOVED:
case _TOUCH_CANCELED:
isFiltered = pTouchEventListener->OnTouchCanceled(*pTarget, touchInfo);
+ if (!isInputFiltered && isFiltered == true)
+ {
+ if (pControl)
+ {
+ SysLog(NID_UI, "[Event] TOUCH_CANCELED Consumed : control = 0x%x", pControl);
+ }
+ else
+ {
+ SysLog(NID_UI, "[Listener] TOUCH_CANCELED Consumed : listener = 0x%x", pTouchEventListener);
+ }
+ }
break;
default:
r = E_SYSTEM;
}
- if (isFiltered)
- {
- if (pControl)
- {
- SysLog(NID_UI, "Event Consumed : isFiltered is True : pControl %x", pControl);
- //_UiPrintControl(*pControl, false);
- }
- //SysLog(NID_UI, "Event Consumed : isFiltered is True : pTarget %x", pTarget);
- }
-
return r;
}
else
{
isFiltered = true;
+ switch (touchInfo.GetTouchStatus())
+ {
+ case _TOUCH_PRESSED:
+ SysLog(NID_UI, "[PreviewEvent] TOUCH_PRESSED Consumed : target = 0x%x", pTarget);
+ break;
+ case _TOUCH_RELEASED:
+ SysLog(NID_UI, "[PreviewEvent] TOUCH_RELEASED Consumed : target = 0x%x", pTarget);
+ break;
+ case _TOUCH_CANCELED:
+ SysLog(NID_UI, "[PreviewEvent] TOUCH_CANCELED Consumed : target = 0x%x", pTarget);
+ break;
+ default:
+ break;
+ }
}
return r;
_UiTouchEvent::ResetTouchInfo(const _Control* pControl, const _TouchInfo& touchInfo)
{
_TouchManager* pTouchManager = _TouchManager::GetInstance();
- SysTryReturnResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] System error occurred. ");
+ SysTryReturnResult(NID_UI, pTouchManager, E_SYSTEM, "System error occurred. ");
if (pControl == null)
{
return exist;
}
-
-_UiMouseEvent::_UiMouseEvent(const _UiObjectHandle& destination, const _MouseInfo& mouseInfo, _UiEventRouteType routeType, const _UiObjectHandle& source)
- : _UiEvent(destination, source, routeType)
- , __mouseInfo(mouseInfo)
- , __pForcedControlList(new (std::nothrow) LinkedListT<_Control*>)
-{
-}
-
-_UiMouseEvent::~_UiMouseEvent(void)
-{
-}
-
-_UiMouseEvent::_UiMouseEvent(const _UiMouseEvent& rhs)
- : _UiEvent(rhs)
- , __mouseInfo(rhs.__mouseInfo)
- , __pForcedControlList(rhs.__pForcedControlList)
-{
-}
-
-_UiMouseEvent&
-_UiMouseEvent::operator =(const _UiMouseEvent& rhs)
-{
- _UiEvent::operator =(rhs);
-
- if (this != &rhs)
- {
- __mouseInfo = rhs.__mouseInfo;
- __pForcedControlList = rhs.__pForcedControlList;
- }
-
- return *this;
-}
-
-const _MouseInfo*
-_UiMouseEvent::GetTouchInfo(void) const
-{
- return &__mouseInfo;
-}
-
-_UiMouseEvent*
-_UiMouseEvent::CloneN(void) const
-{
- return new (std::nothrow) _UiMouseEvent(*this);
-}
-
-_UiEventType
-_UiMouseEvent::GetEventType(void) const
-{
- return _UI_EVENT_TOUCH;
-}
-
-bool
-_UiMouseEvent::IsEventEnabled(const _Control& control) const
-{
- if (!_UiEvent::IsEventEnabled(control))
- {
- return false;
- }
-
- if (GetTouchInfo()->GetTouchStatus() != _TOUCH_CANCELED)
- {
- if (!control.IsInputEventEnabled())
- {
- return false;
- }
- }
-
- return true;
-}
-
-result
-_UiMouseEvent::OnPreviewEventProcessing(const _Control& control, bool& isFiltered)
-{
- result r = E_SUCCESS;
-
- const _MouseInfo* pMouseInfo = GetTouchInfo();
- SysTryReturn(NID_UI, pMouseInfo, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- if ((!ExistGlobalGesture() || GetAccessibilityEvent()) && !isFiltered)
- {
- _ITouchEventPreviewer* pTouchEventPreviewer = control.GetPropagatedTouchEventListener();
- SysTryReturn(NID_UI, pTouchEventPreviewer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- r = FirePreviewListener(pTouchEventPreviewer, &control, isFiltered);
- }
-
- return r;
-}
-
-result
-_UiMouseEvent::OnEventProcessing(const _Control& control, bool& isFiltered)
-{
- result r = E_SUCCESS;
-
- bool doesControlExist = false;
-
- const _MouseInfo* pMouseInfo = GetTouchInfo();
- SysTryReturn(NID_UI, pMouseInfo, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- if ((!ExistGlobalGesture() || GetAccessibilityEvent()) && !isFiltered)
- {
- ProcessGesture(control, isFiltered);
- }
- else if (isFiltered)
- {
- doesControlExist = __pForcedControlList->Contains(const_cast<_Control*>(&control));
-
- if (doesControlExist)
- {
- bool isForcedFiltered = false;
- ProcessGesture(control, isForcedFiltered);
-
- if (isForcedFiltered)
- {
- isFiltered = true;
- }
- }
- }
-
- if (!ExistGlobalGesture() || GetAccessibilityEvent())
- {
- if(!isFiltered || doesControlExist)
- {
- _ITouchEventListener* pTouchEventListener = control.GetPropagatedTouchEventListener();
- SysTryReturn(NID_UI, pTouchEventListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- r = FireListener(pTouchEventListener, &control, true, isFiltered);
- }
- }
-
- return r;
-}
-
-result
-_UiMouseEvent::OnListenerProcessing(const _IUiEventListener& listener, bool& isFiltered)
-{
- _ITouchEventListener* pTouchEventListener = dynamic_cast <_ITouchEventListener*>(const_cast <_IUiEventListener*>(&listener));
- SysTryReturn(NID_UI, pTouchEventListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- return FireListener(pTouchEventListener, null, true, isFiltered);
-}
-
-result
-_UiMouseEvent::OnEventHandled(const _Control& control)
-{
- _Control* pTarget = const_cast<_Control*>(GetControl(GetDestination()));
- SysTryReturn(NID_UI, pTarget, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- const _MouseInfo* pMouseInfo = GetTouchInfo();
- SysTryReturn(NID_UI, pMouseInfo, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- result r = E_SUCCESS;
-
- switch (pMouseInfo->GetTouchStatus())
- {
- case _TOUCH_PRESSED:
- pTarget->GetPropagatedTouchEventListener()->OnTouchPressHandled(control);
- break;
-
- case _TOUCH_MOVED:
- pTarget->GetPropagatedTouchEventListener()->OnTouchMoveHandled(control);
- break;
-
- case _TOUCH_RELEASED:
- pTarget->GetPropagatedTouchEventListener()->OnTouchReleaseHandled(control);
- break;
-
- case _TOUCH_CANCELED:
- pTarget->GetPropagatedTouchEventListener()->OnTouchCancelHandled(control);
- break;
-
- default:
- r = E_SYSTEM;
- break;
- }
-
- return r;
-}
-
-result
-_UiMouseEvent::FireListener(const _ITouchEventListener* pListener, const _Control* pControl, bool isTouchEvent, bool& isFiltered)
-{
- _ITouchEventListener* pTouchEventListener = const_cast <_ITouchEventListener*>(pListener);
- SysTryReturn(NID_UI, pTouchEventListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- result r = E_SUCCESS;
-
- const _MouseInfo* pMouseInfo = GetTouchInfo();
- SysTryReturn(NID_UI, pMouseInfo, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- const _Control* pTarget = GetControl(GetOriginalDestination());
- if (pTarget == null)
- {
- SysLog(NID_UI, "pTarget == null, Call ResetTouchInfo.");
- _TouchManager* pTouchManager = _TouchManager::GetInstance();
- pTouchManager->ResetTouchInfo();
-
- return E_SUCCESS;
-}
-
- if (ResetTouchInfo(pTarget, *pMouseInfo) == E_SUCCESS)
- {
- isFiltered = true;
- return E_SYSTEM;
- }
-
- FloatPoint point(0, 0);
-
- if (pControl)
- {
- _TouchManager* pTouchManager = _TouchManager::GetInstance();
- SysAssert(pTouchManager != null)
-
- point = GetRelativePoint(*pControl, pMouseInfo->GetCurrentPosition());
- }
- else
- {
- point = GetRelativePoint(*pTarget, pMouseInfo->GetCurrentPosition());
- }
-
- _MouseInfo mouseInfo(pMouseInfo->GetPointId(), pMouseInfo->GetTouchStatus(), point, pMouseInfo->GetZAxis(), pMouseInfo->GetButtons(), false, pMouseInfo->GetTimeStamp());
-
- switch (mouseInfo.GetTouchStatus())
- {
- case _TOUCH_PRESSED:
- isFiltered = pTouchEventListener->OnMousePressed(*pTarget, mouseInfo);
- break;
-
- case _TOUCH_RELEASED:
- isFiltered = pTouchEventListener->OnMouseReleased(*pTarget, mouseInfo);
- break;
-
- case _TOUCH_MOVED:
- isFiltered = pTouchEventListener->OnMouseMoved(*pTarget, mouseInfo);
- break;
-
- case _WHEEL_MOVED:
- isFiltered = pTouchEventListener->OnMouseWheeled(*pTarget, mouseInfo);
- break;
-
- default:
- r = E_SYSTEM;
- }
-
- if (isFiltered)
- {
- if (pControl)
- {
- SysLog(NID_UI, "Event Consumed : isFiltered is True : pControl %x", pControl);
- //_UiPrintControl(*pControl, false);
- }
- SysLog(NID_UI, "Event Consumed : isFiltered is True : pTarget %x", pTarget);
- }
-
- return r;
-}
-
-result
-_UiMouseEvent::FirePreviewListener(const _ITouchEventPreviewer* pListener, const _Control* pControl, bool& isFiltered)
-{
- _ITouchEventPreviewer* pTouchEventPreviewer = const_cast <_ITouchEventPreviewer*>(pListener);
- SysTryReturn(NID_UI, pTouchEventPreviewer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- result r = E_SUCCESS;
-
- const _MouseInfo* pMouseInfo = GetTouchInfo();
- SysTryReturn(NID_UI, pMouseInfo, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- const _Control* pTarget = GetControl(GetDestination());
-
- FloatPoint point = GetRelativePoint(*pControl, pMouseInfo->GetCurrentPosition());
-
- if (!pControl->IsMultiTouchEnabled() && pMouseInfo->GetPointId() > 0)
- {
- isFiltered = false;
- return E_SUCCESS;
- }
-
- _MouseInfo mouseInfo(pMouseInfo->GetPointId(), pMouseInfo->GetTouchStatus(), point, pMouseInfo->GetZAxis(), pMouseInfo->GetButtons(), false, pMouseInfo->GetTimeStamp());
-
- _UiTouchEventDelivery eventDelivery = _UI_TOUCH_EVENT_DELIVERY_NO;
-
- //condition 1) if target is not enabled multi touch, point id should be 0
- //2) target is enabled multi touch
- switch (mouseInfo.GetTouchStatus())
- {
- case _TOUCH_PRESSED:
- eventDelivery = pTouchEventPreviewer->OnPreviewMousePressed(*pTarget, mouseInfo);
- break;
-
- case _TOUCH_RELEASED:
- eventDelivery = pTouchEventPreviewer->OnPreviewMouseReleased(*pTarget, mouseInfo);
- break;
-
- case _TOUCH_MOVED:
- eventDelivery = pTouchEventPreviewer->OnPreviewMouseMoved(*pTarget, mouseInfo);
- break;
-
- case _WHEEL_MOVED:
- eventDelivery = pTouchEventPreviewer->OnPreviewMouseWheeled(*pTarget, mouseInfo);
- break;
-
- default:
- r = E_SYSTEM;
- break;
- }
-
- if (eventDelivery != _UI_TOUCH_EVENT_DELIVERY_NO)
- {
- // isFiltered = (eventDelivery == _UI_TOUCH_EVENT_DELIVERY_FORCED_YES);
-
- // if (isFiltered)
- if (eventDelivery == _UI_TOUCH_EVENT_DELIVERY_FORCED_YES)
- {
- __pForcedControlList->Add(const_cast<_Control*>(pControl));
- }
- }
- else
- {
- isFiltered = true;
- }
-
- return r;
-}
-
-result
-_UiMouseEvent::ProcessGesture(const _Control& control, bool& isFiltered)
-{
- if (control.IsSendingDelayedEvent())
- {
- return E_SUCCESS;
- }
-
- IListT<_TouchGestureDetector*>* pGestureList = control.GetGestureDetectorList();
- if (!pGestureList || (pGestureList && (pGestureList->GetCount() <= 0)))
- {
- return E_SUCCESS;
- }
-
- IEnumeratorT<_TouchGestureDetector*>* pEnumerator = pGestureList->GetEnumeratorN();
- SysTryReturn(NID_UI, pEnumerator, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- while (pEnumerator->MoveNext() == E_SUCCESS)
- {
- _TouchGestureDetector* pGestureDetector = null;
- pEnumerator->GetCurrent(pGestureDetector);
-
- if (!pGestureDetector)
- {
- continue;
- }
-
- _ITouchGestureDelegate* pDelegator = pGestureDetector->GetDelegate();
- if (pDelegator)
- {
- FireListener(pDelegator, &control, false, isFiltered);
- }
- }
-
- delete pEnumerator;
- return E_SUCCESS;
-}
-
-FloatPoint
-_UiMouseEvent::GetRelativePoint(const _Control& control, const FloatPoint& point) const
-{
- FloatPoint relativePoint(point);
- FloatRectangle absRect = control.GetAbsoluteBoundsF(true);
-
- relativePoint.x -= absRect.x;
- relativePoint.y -= absRect.y;
-
- return relativePoint;
-}
-
-result
-_UiMouseEvent::ResetTouchInfo(const _Control* pControl, const _MouseInfo& mouseInfo)
-{
- _TouchManager* pTouchManager = _TouchManager::GetInstance();
- SysTryReturnResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] System error occurred. ");
-
- if (pControl == null)
- {
- if (mouseInfo.GetTouchStatus() == _TOUCH_RELEASED)
- {
- pTouchManager->ResetTouchInfo();
- }
-
- return E_SUCCESS;
- }
-
- return E_INVALID_CONDITION;
-}
-
-bool
-_UiMouseEvent::ExistGlobalGesture(void)
-{
- _ControlManager* pControlManager = _ControlManager::GetInstance();
- SysTryReturn(NID_UI, pControlManager, false, E_SYSTEM, "[E_SYSTEM] System error occurred.");
-
- bool exist = false;
-
- IListT<_TouchGestureDetector*>* pGestureList = pControlManager->GetGestureDetectorList();
- if (pGestureList && (pGestureList->GetCount() > 0))
- {
- exist = true;
- }
-
- return exist;
-}
-
}} // Tizen::Ui
_Window::~_Window(void)
{
- __destroying = true;
+ SetDestroying(true);
Close();
SetOwner(null);
_IWindowDelegate&
_Window::GetWindowDelegate(void) const
{
- if (__destroying)
+ if (IsDestroying())
{
return const_cast<_Window&>(*this);
}
String descriptionTemp(L"");
descriptionTemp.Format(LOG_LEN_MAX, L"_Window: xid(0x%x) owner(0x%x) delegate(0x%x) activated(%d) destroying(%d) displayContext(0x%x)",
- GetNativeHandle(), __pOwner, __pWindowDelegate, __activated, __destroying, __pDisplayContext);
+ GetNativeHandle(), __pOwner, __pWindowDelegate, __activated, IsDestroying(), __pDisplayContext);
description.Append(descriptionTemp);
int rootWindowH = 0;
ecore_x_window_size_get(ecore_x_window_root_get((Ecore_X_Window)ecore_evas_window_get(pLayer->GetEcoreEvas())), &rootWindowW, &rootWindowH);
- pLayer->SetBounds(FloatRectangle(0.0f, 0.0f, (float)rootWindowW, (float)rootWindowH));
+ if (IsOrientationRoot())
+ {
+ pLayer->SetSize(FloatDimension((float)rootWindowW, (float)rootWindowH));
+ }
+ else
+ {
+ pLayer->SetBounds(FloatRectangle(0.0f, 0.0f, (float)rootWindowW, (float)rootWindowH));
+ }
+
pLayer->SetOpacity(0);
__pRootVisualElement->SetName(L"Root");
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
if (pEcoreEvas)
{
- String osp(L"OSP_");
String appName = _AppInfo::GetAppExecutableName();
- osp.Append(appName);
- pEcoreEvas->SetWindowName(*this, osp);
+ pEcoreEvas->SetWindowName(*this, appName);
}
return E_SUCCESS;
}
__rotation = rotation;
+ if(__pLayer)
+ {
+ _EflLayer* pLayer = dynamic_cast<_EflLayer*>(__pLayer);
+ if (pLayer)
+ {
+ pLayer->SetOrientationChanged(__rotation);
+ }
+ }
+
// <1>
int childCount = GetChildCount();
pFormImpl->UpdateOrientation();
}
+#if defined(PARTIAL_SCREEN)
+ Rectangle frameBounds = GetBounds();
+ Rectangle frameClientBounds = GetClientBounds();
+ Rectangle frameAbsoluteBounds = GetAbsoluteBounds();
+
+ SysLog(NID_UI, "[WM ROTATION]<P>[WIN 0x%x] FRAME bounds(%d %d %d %d) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
+ GetNativeHandle(),
+ frameBounds.x, frameBounds.y, frameBounds.width, frameBounds.height,
+ frameClientBounds.x, frameClientBounds.y, frameClientBounds.width, frameClientBounds.height,
+ frameAbsoluteBounds.x, frameAbsoluteBounds.y, frameAbsoluteBounds.width, frameAbsoluteBounds.height);
+
+ int formCount = GetChildCount();
+ for (int i = 0 ; i < formCount ; i++)
+ {
+ _Control* pForm = GetChild(i);
+
+ Rectangle formBounds = pForm->GetBounds();
+ Rectangle formClientBounds = pForm->GetClientBounds();
+ Rectangle formAbsoluteBounds = pForm->GetAbsoluteBounds();
+
+ SysLog(NID_UI, "[WM ROTATION]<P> FORM bounds(%d %d %d %d) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
+ formBounds.x, formBounds.y, formBounds.width, formBounds.height,
+ formClientBounds.x, formClientBounds.y, formClientBounds.width, formClientBounds.height,
+ formAbsoluteBounds.x, formAbsoluteBounds.y, formAbsoluteBounds.width, formAbsoluteBounds.height);
+ }
+#endif
+
return;
}
}
, __pOwner(null)
, __pWindowDelegate(null)
, __activated(false)
- , __destroying(false)
, __pRootVisualElement(null)
, __pLayer(null)
, __pDimmingLayer(null)
{
__activated = false;
- if (__destroying == false)
+ if (IsDestroying() == false)
{
GetWindowDelegate().OnDeactivated();
}
{
result r = E_SUCCESS;
+ SetDestroyingFlag(true);
+
Control* pOwner = GetOwner();
if (pOwner)
{
FloatAnimation::GetKeyFrameAt(int index, long& time, float& value) const
{
SysTryReturnResult(NID_UI_ANIM, (index >= 0 && index < _pAnimationBaseImpl->keyFrameList.GetCount()),
- E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index (%d) is out of range.", index);
+ E_OUT_OF_RANGE, "Index (%d) is out of range.", index);
result r = E_SUCCESS;
Object* pObjValue = null;
VisualElementSurface::~VisualElementSurface(void)
{
- CHECK_CONSTRUCTED;
-
- if (__pVisualElementSurfaceImpl->Release())
+ if (__pVisualElementSurfaceImpl && __pVisualElementSurfaceImpl->Release())
{
__pVisualElementSurfaceImpl = null;
}
__pControl = const_cast< Control* >(&source);
__pActiveAnimationList = new (std::nothrow) ArrayListT< ActiveAnimation >();
- SysTryReturnResult(NID_UI_ANIM, __pActiveAnimationList != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_ANIM, __pActiveAnimationList != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pActiveAnimationList->Construct();
if (r != E_SUCCESS)
}
__pControlImpl = _ControlImpl::GetInstance(*__pControl);
+ if (__pControlImpl == null)
+ {
+ SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] Failed to get _ControlImpl instance.");
+ Dispose();
+ return E_SYSTEM;
+ }
__pVisualElement = __pControlImpl->GetCore().GetVisualElement();
return E_SUCCESS;
FloatRectangle presentationBounds = const_cast<VisualElement*>((__pVisualElement)->AcquirePresentationInstance())->GetBounds();
FloatRectangle modelBounds = __pVisualElement->GetBounds();
- __presentationBounds = presentationBounds;
+ __presentationBounds = modelBounds;
float currentAnchorX = presentationBounds.width * anchorX;
float currentAnchorY = presentationBounds.height * anchorY;
float endAnchorX = endWidth * anchorX;
float endAnchorY = endHeight * anchorY;
- float startX = presentationBounds.x + (currentAnchorX - startAnchorX);
- float startY = presentationBounds.y + (currentAnchorY - startAnchorY);
+ float startX = modelBounds.x + (currentAnchorX - startAnchorX);
+ float startY = modelBounds.y + (currentAnchorY - startAnchorY);
float endX = modelBounds.x + (currentAnchorX - endAnchorX);
float endY = modelBounds.y + (currentAnchorY - endAnchorY);
ANIMATION_TARGET_POSITION,
ANIMATION_TARGET_ALPHA
};
- bool setLogicalBnds = false;
+ bool setLogicalPos = false;
+ bool setLogicalSize = false;
bool setShowStateInternal = false;
long delay = 0;
long duration = 0;
else
{
if (pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_POSITION) ||
- pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_SIZE))
+ pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_SIZE))
{
- __logicalBoundsHolder = __pControl->GetBounds();
- setLogicalBnds = true;
+ Rectangle controlRect = __pControl->GetBounds();
+ if(animTarget == ANIMATION_TARGET_POSITION)
+ {
+ setLogicalPos = true;
+ __logicalBoundsHolder.x = controlRect.x;
+ __logicalBoundsHolder.y = controlRect.y;
+ }
+ else if(animTarget == ANIMATION_TARGET_SIZE)
+ {
+ setLogicalSize = true;
+ __logicalBoundsHolder.width = controlRect.width;
+ __logicalBoundsHolder.height = controlRect.height;
+ }
}
else if (pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_ALPHA))
{
(pSequentialAnimGrp->GetAnimationTargetTypeAt(index) == ANIMATION_TARGET_SIZE))
{
__logicalBoundsHolder = __pControl->GetBounds();
- setLogicalBnds = true;
+ setLogicalPos = true;
+ setLogicalSize = true;
}
if (pSequentialAnimGrp->GetAnimationTargetTypeAt(index) == ANIMATION_TARGET_ALPHA)
}
}
- if (setLogicalBnds)
+ if (setLogicalPos || setLogicalSize)
{
bool disable = false;
bool propagation = false;
r = DisableVisualElementPropagation(propagation);
SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable visual element propagation.");
}
- r = __pControl->SetBounds(__logicalBoundsHolder);
+ if (setLogicalPos && setLogicalSize)
+ {
+ r = __pControl->SetBounds(__logicalBoundsHolder);
+ }
+ else
+ {
+ if (setLogicalPos)
+ {
+ r = __pControl->SetPosition(__logicalBoundsHolder.x, __logicalBoundsHolder.y);
+ }
+ else if(setLogicalSize)
+ {
+ r = __pControl->SetSize(__logicalBoundsHolder.width, __logicalBoundsHolder.height);
+ }
+ }
if (propagation)
{
SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set show state.");
}
- // for layout
- __pControlImpl->SetBoundsAndUpdateLayout(__pControlImpl->GetBounds());
-
pAnimationGroup->SetDuration(groupDuration);
r = __pVisualElement->AddAnimation(animIdentifier, *pAnimationGroup);
SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to start group animation.");
SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set show state.");
}
- // for layout
- __pControlImpl->SetBoundsAndUpdateLayout(__pControlImpl->GetBounds());
-
pAnimationGroup->SetDuration(groupDuration);
__pVisualElement->AddAnimation(animIdentifier, *pAnimationGroup);
if ((propName.IndexOf(VeSubPropBoundsPosition, startIndex, indexOf)) == E_SUCCESS)
{
- r = pPresentationImpl->SetProperty(VePropBounds, __pVisualElement->GetBounds());
+ r = pPresentationImpl->SetProperty(VeSubPropBoundsPosition, FloatPoint(__pVisualElement->GetBounds().x, __pVisualElement->GetBounds().y));
}
else if ((propName.IndexOf(VePropBounds, startIndex, indexOf)) == E_SUCCESS)
{
__isAnimationTargetAnimating[activeAnim.animTarget] = false;
+ if (GetActiveAnimationListCount() == 1)
+ {
+ __pControlImpl->GetCore().AdjustAbsoluteBounds();
+ }
+
if ((animName.IndexOf(TRANSACTION, startIndex, indexOf)) != E_SUCCESS)
{
if (__pAnimStatusEventListener)
float diffX = 0.0f;
float diffY = 0.0f;
- if (!pAnimation->IsEndValueApplied() && (__isAnimationTargetAnimating[ANIMATION_TARGET_POSITION]))
+ if (__isAnimationTargetAnimating[ANIMATION_TARGET_POSITION])
{
diffX = pPresentation->GetBounds().x + currentValue.ToFloatRectangle().x - __presentationBounds.x;
diffY = pPresentation->GetBounds().y + currentValue.ToFloatRectangle().y - __presentationBounds.y;
}
else
{
- diffX = pPresentation->GetBounds().x;
- diffY = pPresentation->GetBounds().y;
+ diffX = currentValue.ToFloatRectangle().x;
+ diffY = currentValue.ToFloatRectangle().y;
}
Variant newBounds(FloatRectangle(diffX, diffY, currentValue.ToFloatRectangle().width, currentValue.ToFloatRectangle().height));
DisableImplicitAnimation(disable);
}
- SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set bounds.");
+ SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to set bounds.");
r = SetAnimationF(ANIMATION_TARGET_SIZE, ANIMATION_TRIGGER_SIZE_CHANGE, duration, animInterpolator, currentSize, newSize);
SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
DisableImplicitAnimation(disable);
}
- SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set bounds.");
+ SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to set bounds.");
r = SetAnimationF(ANIMATION_TARGET_POSITION, ANIMATION_TRIGGER_POSITION_CHANGE, duration, animInterpolator, currentPosition, newPosition);
SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
DisableImplicitAnimation(disable);
}
- SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set bounds.");
+ SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to set bounds.");
r = SetAnimationF(ANIMATION_TARGET_POSITION, ANIMATION_TRIGGER_POSITION_CHANGE, duration, animInterpolator, currentPosition, newPosition);
SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
FloatRectangle presentationBounds = const_cast<VisualElement*>((__pVisualElement)->AcquirePresentationInstance())->GetBounds();
FloatRectangle modelBounds = __pVisualElement->GetBounds();
- __presentationBounds = presentationBounds;
+ __presentationBounds = modelBounds;
float startX = presentationBounds.x;
float startY = presentationBounds.y;
evas_object_geometry_get(pEvasObject, &absolute.x, &absolute.y, &absolute.width, &absolute.height);
FloatRectangle realBounds = pElement->__bounds;
- _Window* pWindow = dynamic_cast< Tizen::Ui::_Window* >(static_cast< Tizen::Ui::_Window* >(pElement->GetUserData()));
+// _Window* pWindow = dynamic_cast< Tizen::Ui::_Window* >(static_cast< Tizen::Ui::_Window* >(pElement->GetUserData()));
// if (pWindow)
// {
// Rectangle windowRect = pWindow->GetBounds();
if (name.GetLength() > 0)
{
- sprintf(filename, "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation());
+ snprintf(filename, sizeof(filename), "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation());
}
else
{
- sprintf(filename, "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation());
+ snprintf(filename, sizeof(filename), "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation());
}
// save the image file
if (name.GetLength() > 0)
{
- sprintf(filename, "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation());
+ snprintf(filename, sizeof(filename), "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation());
}
else
{
- sprintf(filename, "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation());
+ snprintf(filename, sizeof(filename), "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation());
}
// save the image file
if (pEvasObject)
{
- sprintf(filename, "%sEVAS_%d_%08x.png", pathPrefix, count++, (unsigned int)pEvasObject);
+ snprintf(filename, sizeof(filename), "%sEVAS_%d_%08x.png", pathPrefix, count++, (unsigned int)pEvasObject);
VeLog(NID_UI_ANIM, "--------------------------[VE DUMP IMAGE START %#08x]---------------------------", (unsigned int)pEvasObject);
if (evas_object_image_save(pEvasObject, filename, NULL, "quality=100 compress=9"))
Tizen::Base::String name = pElement->GetName();
if (name.GetLength() > 0)
{
- sprintf(filename, "%sVE_%d_%ls_%08x.png", pathPrefix, count++, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation());
+ snprintf(filename, sizeof(filename), "%sVE_%d_%ls_%08x.png", pathPrefix, count++, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation());
}
else
{
- sprintf(filename, "%sVE_%d_%08x.png", pathPrefix, count++, (unsigned int)pElement->GetPresentation());
+ snprintf(filename, sizeof(filename), "%sVE_%d_%08x.png", pathPrefix, count++, (unsigned int)pElement->GetPresentation());
}
VisualElementSurface* pSurface = pElement->__pSharedData->pNativeNode->GetSurface();
Ecore_Idle_Enterer* __pOnIdleLoopIterator = null;
-#ifdef USE_WORKAROUND
+#if defined(USE_WORKAROUND) || defined(XWINDOW_DEBUG)
void
OnRenderFlushPost(void* pData, Evas* pEvas, void* ev)
{
_EflLayer* pLayer = (_EflLayer*)pData;
int w, h;
evas_output_size_get(pLayer->GetEvas(), &w, &h);
- int rotate = ecore_evas_rotation_get(pLayer->GetEcoreEvas());
- PRINT("[%#x] OnRenderFlushPost size(%d,%d) rotate=%d\n", (unsigned int)pData, w, h, rotate);
+ int orientation = ecore_evas_rotation_get(pLayer->GetEcoreEvas());
+ PRINT("[%#x] OnRenderFlushPost size(%d,%d) orientation(%d)\n", (unsigned int)pData, w, h, orientation);
}
Eina_Bool
if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas()))
{
- PRINT("[%#x] OnXWindowDamaged[%d,%d,%d,%d]------------\n", (unsigned int)pLayer, pEvent->x, pEvent->y, pEvent->w, pEvent->h);
+ PRINT("[%#x | %#x] OnXWindowDamaged[%d,%d,%d,%d]\n", (unsigned int)pLayer, pEvent->win, pEvent->x, pEvent->y, pEvent->w, pEvent->h);
}
}
return EINA_TRUE;
}
+#endif // USE_WORKAROUND || XWINDOW_DEBUG
+
Eina_Bool
OnXWindowConfigured(void* pData, int type, void* pEventInfo)
{
if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas()))
{
- int w, h;
+ int w, h, rw, rh;
+ FloatRectangle bounds = pLayer->GetBounds();
+ int orientation = ecore_evas_rotation_get(pLayer->GetEcoreEvas());
+ Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas());
+ Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, orientation, null, null, &rw, &rh);
+
evas_output_size_get(pLayer->GetEvas(), &w, &h);
- PRINT("[%#x] OnXWindowConfigured[%d,%d,%d,%d] evas(%d,%d)------------\n", (unsigned int)pLayer, pEvent->x, pEvent->y, pEvent->w, pEvent->h, w, h);
+ if ( ((orientation % 180) == 0 && pEvent->w == (int)bounds.width && pEvent->h == (int)bounds.height)
+ || ((orientation % 180) == 90 && pEvent->h == (int)bounds.width && pEvent->w == (int)bounds.height)
+ || (ret && rw == pEvent->w && rh == pEvent->h)
+ )
+ {
+ pLayer->SetConfigured(true);
+ evas_damage_rectangle_add(pLayer->GetEvas(), 0, 0, w, h);
+ _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
+ if (pDisplayManager)
+ {
+ pDisplayManager->AddWakeUpEvent();
+ }
+ }
+
+ PRINT("[%#x | %#x] OnXWindowConfigured[%d,%d,%d,%d] evas(%d,%d) layer(%.2f,%.2f,%.2f,%.2f)\n", (unsigned int)pLayer, pEvent->win, pEvent->x, pEvent->y, pEvent->w, pEvent->h, w, h, bounds.x, bounds.y, bounds.width, bounds.height);
}
}
return EINA_TRUE;
}
-#endif // USE_WORKAROUND
-
Eina_Bool
OnXWindowHidden(void* pData, int type, void* pEventInfo)
{
if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas()))
{
pLayer->SetMapped(false);
- PRINT("[%#x | %#x] ############ Hidden -> EventDone() \n" , (unsigned int)pData , pEvent->win);
+ pLayer->SetConfigured(false);
+ PRINT("[%#x | %#x] ############ Hidden -> EventDone()\n", (unsigned int)pData, pEvent->win);
}
return EINA_TRUE;
{
pLayer->SetMapped(true);
- FloatRectangle bounds = pLayer->GetBounds();
- evas_damage_rectangle_add(pLayer->GetEvas(),0,0,(int)bounds.width, (int)bounds.height);
- //ecore_evas_rotation_set(pLayer->GetEcoreEvas(), 270);
- PRINT("[%#x | %#x] ############ Shown -> EventDone() \n" , (unsigned int)pData, pEvent->win);
- _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
- if (pDisplayManager)
- {
- pDisplayManager->AddWakeUpEvent();
- }
+// FloatRectangle bounds = pLayer->GetBounds();
+// evas_damage_rectangle_add(pLayer->GetEvas(),0,0,(int)bounds.width, (int)bounds.height);
+// //ecore_evas_rotation_set(pLayer->GetEcoreEvas(), 270);
+ PRINT("[%#x | %#x] ############ Shown -> EventDone()\n", (unsigned int)pData, pEvent->win);
+// _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
+// if (pDisplayManager)
+// {
+// pDisplayManager->AddWakeUpEvent();
+// }
}
return EINA_TRUE;
, _isMainType(true)
, _needRender(true)
, _isMapped(false)
+ , _isConfigured(false)
, _needForceManualRender(false)
, _pOnWindowDamagedHandler(null)
, _pOnWindowConfiguredHandler(null)
, __isWinObject(true)
, __bounds()
, _pConfiguration(null)
+ , __orientation(0)
{
_countOfLayer++;
_pConfiguration = _EflLayerConfiguration::GetInstance();
, _isMainType(isMainType)
, _needRender(true)
, _isMapped(false)
+ , _isConfigured(false)
, _needForceManualRender(false)
, _pOnWindowDamagedHandler(null)
, _pOnWindowConfiguredHandler(null)
, __isWinObject(true)
, __bounds()
, _pConfiguration(null)
+ , __orientation(0)
{
_countOfLayer++;
_pConfiguration = _EflLayerConfiguration::GetInstance();
}
-#ifdef USE_WORKAROUND
+#if defined(USE_WORKAROUND) || defined(XWINDOW_DEBUG)
if (_pOnWindowDamagedHandler)
{
ecore_event_handler_del(_pOnWindowDamagedHandler);
_pOnWindowDamagedHandler = null;
}
- if (_pOnWindowConfiguredHandler)
- {
- ecore_event_handler_del(_pOnWindowConfiguredHandler);
- _pOnWindowConfiguredHandler = null;
- }
-
if (_pEvas)
{
evas_event_callback_del(_pEvas, EVAS_CALLBACK_RENDER_FLUSH_POST, OnRenderFlushPost);
}
-#endif // USE_WORKAROUND
+#endif // USE_WORKAROUND || XWINDOW_DEBUG
+
+ if (_pOnWindowConfiguredHandler)
+ {
+ ecore_event_handler_del(_pOnWindowConfiguredHandler);
+ _pOnWindowConfiguredHandler = null;
+ }
if (_pOnWindowHideHandler)
{
// CHECK ME: Is this needed for GL mode?
-#ifdef USE_WORKAROUND
+#if defined(USE_WORKAROUND) || defined(XWINDOW_DEBUG)
if(_pOnWindowDamagedHandler == null)
{
_pOnWindowDamagedHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DAMAGE, OnXWindowDamaged, this);
}
+ evas_event_callback_add(_pEvas, EVAS_CALLBACK_RENDER_FLUSH_POST, OnRenderFlushPost, (void*)this);
+#endif // USE_WORKAROUND || XWINDOW_DEBUG
+
if (_pOnWindowConfiguredHandler == null)
{
_pOnWindowConfiguredHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE, OnXWindowConfigured, this);
}
- evas_event_callback_add(_pEvas, EVAS_CALLBACK_RENDER_FLUSH_POST, OnRenderFlushPost, (void*)this);
-#endif // USE_WORKAROUND
-
if (_pOnWindowHideHandler == null)
{
_pOnWindowHideHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_HIDE, OnXWindowHidden, this);
}
result
-_EflLayer::SetOrientationChanged(void)
+_EflLayer::SetOrientationChanged(int orientation)
{
- _needForceManualRender = true;
- PRINT("[%#x | %#x] Called SetOrientationChanged(%d) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), _needForceManualRender);
+ PRINT("[%#x | %#x] Bounds : (%lf, %lf) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas) , __bounds.width, __bounds.height);
+ if (__orientation == orientation)
+ return E_SUCCESS;
+
+ if (!_isMapped)
+ {
+ _needForceManualRender = true;
+ _isConfigured = true;
+ }
+ PRINT("[%#x | %#x] Called SetOrientationChanged(%d->%d) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), __orientation, orientation);
+
+ bool isMiniApp = false;
+ isMiniApp = elm_win_floating_mode_get(_pWindow);
+
+ if (__orientation % 180 != orientation % 180)
+ {
+ if(!isMiniApp)
+ {
+ PRINT("[%#x | %#x] Swap __bounds. (Not MiniApp) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas));
+ float temp = __bounds.width;
+ __bounds.width = __bounds.height;
+ __bounds.height = temp;
+ }
+ else
+ {
+ PRINT("[%#x | %#x] Not Swap __bounds. (MiniApp)!!!!!!!!!!!!!!! \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas));
+ }
+ }
+ PRINT("[%#x | %#x] Updated Bounds : (%lf, %lf) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas) , __bounds.width, __bounds.height);
+
+ __orientation = orientation;
return E_SUCCESS;
}
if (pNode)
{
_pRootVisualElement = &rootElement;
-
return pNode->ReConstruct(*this);
}
result
_EflLayer::SetBounds(const FloatRectangle& bounds)
{
- // WARNING: this code makes a touch coordination error, when device orientation is swapped 0' to 180'. (For test application : UiFrameMode)
- // if (__bounds == bounds)
- // return E_SUCCESS;
+ SetSize(FloatDimension(bounds.width, bounds.height));
+ SetPosition(FloatPoint(bounds.x, bounds.y));
+
+ return E_SUCCESS;
+}
+
+result
+_EflLayer::SetPosition(const FloatPoint& point)
+{
+ evas_object_move(_pWindow, point.x, point.y);
+ PRINT("[%#x | %#x] evas_object_move(%f, %f) old (%f, %f)\n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), point.x, point.y, __bounds.x, __bounds.y);
- __bounds = bounds;
- evas_object_move(_pWindow, __bounds.x, __bounds.y);
- evas_object_resize(_pWindow, __bounds.width, __bounds.height);
- PRINT("[%#x | %#x] Initialzing evas_object_move(%f, %f) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), __bounds.x, __bounds.y);
- PRINT("[%#x | %#x] Initialzing evas_object_resize(%f, %f) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), __bounds.width, __bounds.height);
+ __bounds.SetPosition(point);
return E_SUCCESS;
}
+result
+_EflLayer::SetSize(const FloatDimension& size)
+{
+ if((__bounds.width != size.width) || (__bounds.height != size.height))
+ {
+ _isConfigured = false;
+ evas_object_resize(_pWindow, size.width, size.height);
+ PRINT("[%#x | %#x] evas_object_resize(%0.2f, %0.2f) old(%0.2f, %0.2f) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), size.width, size.height, __bounds.width, __bounds.height);
+ }
+ else
+ {
+ PRINT("[%#x | %#x] !!!!!!!!!!!!! SKIP evas_object_resize(%0.2f, %0.2f) old(%0.2f, %0.2f) \n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), size.width, size.height, __bounds.width, __bounds.height);
+ }
+
+ __bounds.SetSize(size);
+
+ return E_SUCCESS;
+}
+
+void
+_EflLayer::HasUpdatedWindowSize(const Tizen::Graphics::FloatDimension& size)
+{
+ _isConfigured = false;
+ __bounds.SetSize(size);
+}
+
FloatRectangle
_EflLayer::GetBounds(void) const
{
_needShowStateChangeRequest = false;
}
- FloatRectangle rect = GetBounds();
if(!_needRender)
{
PRINT("[%#x | %#x] _needRender = false bounds(%f %f %f %f)\n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas), __bounds.x, __bounds.y, __bounds.width, __bounds.height);
if(__isWinObject)
{
- if (_isMapped)
+ if (_isMapped && _isConfigured)
{
- PRINT("[%#x | %#x] ecore_evas_manual_render -- mapped (child:%d)\n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas), __GetChildrenCount(_pRootVisualElement));
+ //PRINT("[%#x | %#x] ecore_evas_manual_render -- mapped (child:%d)\n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas), __GetChildrenCount(_pRootVisualElement));
__needPreRender = false;
- // evas_damage_rectangle_add(_pEvas,0,0,(int)__bounds.width, (int)__bounds.height);
ecore_evas_manual_render(_pEcoreEvas);
-
__needPreRender = true;
+
+ // For restoring GL context
_DisplayManager::RestoreContext();
}
else
{
if(_isShow && _needForceManualRender)
{
- PRINT("[%#x | %#x] ecore_evas_manual_render -- _needForceManualRender (child:%d)\n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas), __GetChildrenCount(_pRootVisualElement));
+ PRINT("[%#x | %#x] ecore_evas_manual_render -- _needForceManualRender (child:%d)\n", (unsigned int)this , ecore_evas_window_get(_pEcoreEvas), __GetChildrenCount(_pRootVisualElement));
__needPreRender = false;
ecore_evas_manual_render(_pEcoreEvas);
__needPreRender = true;
+
+ // For restoring GL context
_DisplayManager::RestoreContext();
_needForceManualRender = false;
return;
}
- PRINT("[%#x | %#x] ecore_evas_manual_render -- unmapped - not called(child:%d)\n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas), __GetChildrenCount(_pRootVisualElement));
+ PRINT("[%#x | %#x] ecore_evas_manual_render -- unmapped(map:%d configure:%d) - not called(child:%d)\n", (unsigned int)this , ecore_evas_window_get(_pEcoreEvas), _isMapped, _isConfigured, __GetChildrenCount(_pRootVisualElement));
}
}
else // not window type
{
- PRINT("[%#x | %#x] ecore_evas_manual_render -- unknown type(child:%d)\n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas), __GetChildrenCount(_pRootVisualElement));
+ PRINT("[%#x | %#x] ecore_evas_manual_render -- unknown type(child:%d)\n", (unsigned int)this , ecore_evas_window_get(_pEcoreEvas), __GetChildrenCount(_pRootVisualElement));
__needPreRender = false;
- // evas_damage_rectangle_add(_pEvas,0,0,(int)__bounds.width, (int)__bounds.height);
ecore_evas_manual_render(_pEcoreEvas);
-
__needPreRender = true;
+
+ // For restoring GL context
_DisplayManager::RestoreContext();
}
}
using namespace Tizen::Base;
using namespace Tizen::Graphics;
+#define EVAS_IMAGE_SIZE_LIMIT 32768 // !!warning 32768 is declared in the EAPI void evas_object_image_size_set(Evas_Object *obj, int w, int h)
+
+
+
namespace Tizen { namespace Ui { namespace Animations
{
int maxH = 0;
evas_image_max_size_get(pLayer->GetEvas(), &maxW, &maxH);
+ if(maxW > EVAS_IMAGE_SIZE_LIMIT)
+ {
+ maxW = EVAS_IMAGE_SIZE_LIMIT;
+ }
+ if(maxH > EVAS_IMAGE_SIZE_LIMIT)
+ {
+ maxH = EVAS_IMAGE_SIZE_LIMIT;
+ }
+
SysTryCatch(NID_UI_ANIM, outputSize.width >= 0 && outputSize.height >= 0, , E_INVALID_ARG,
"[E_INVALID_ARG] Invalid argument(s) is used. size(%d,%d)", outputSize.width, outputSize.height);
__pNextFormVisualElement = pControlImpl->GetCore().GetVisualElement();
// for Layout
- pControlImpl->SetBoundsAndUpdateLayout(pControlImpl->GetBounds());
+ pControlImpl->SetBoundsAndUpdateLayout(pControlImpl->GetBoundsF());
__veDefaultMatrix = __pCurrentFormVisualElement->GetTransformMatrix();
__veDefaultBounds = _VisualElementImpl::GetInstance(*__pCurrentFormVisualElement)->GetBoundingBox();
}
r = AnimationTransaction::Commit();
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to commit transaction.");
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to commit transaction.");
__frameAnimatorStatus = ANIMATOR_STATUS_PLAYING;
return E_SUCCESS;
}
+float
+_FrameAnimatorImpl::CalculateChangedAngle()
+{
+ float angle = 0.0f;
+ int diff = __pNextForm->GetOrientationStatus() - __pCurrentForm->GetOrientationStatus() ;
+
+ switch(diff)
+ {
+ case 1:
+ case -1:
+ {
+ angle = 90.0f;
+ break;
+ }
+ case 2:
+ case -2:
+ {
+ angle = 180.0f;
+ break;
+ }
+ case 3:
+ case -3:
+ {
+ angle = 270.0f;
+ break;
+ }
+ }
+
+ if(diff > 0)
+ {
+ angle *= -1;
+ }
+ return angle;
+}
result
_FrameAnimatorImpl::SetAnimations(void)
String transId = "";
transId.Append(__transactionId);
+ float angle = 0.0f;
+
switch (__animationEffectType)
{
case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_LEFT:
{
+ angle = CalculateChangedAngle();
+
Dimension currentSize = __pCurrentForm->GetSize();
Dimension nextSize = __pNextForm->GetSize();
Point currFormStartPoint = Point(0, 0);
- Point currFormEndPoint = Point((-1 * (currentSize.width)), 0);
+ Point currFormEndPoint = Point((-1 * (nextSize.width)), 0);
- Point nextFormStartPoint = Point((currentSize.width), 0);
+ Point nextFormStartPoint = Point((nextSize.width), 0);
Point nextFormEndPoint = Point(0, 0);
- if (currentSize.width > nextSize.width)
+ if (unlikely(angle != 0.0f))
{
- currFormStartPoint = Point((-1 * (currentSize.width - nextSize.width)), 0);
- nextFormStartPoint = Point((nextSize.width), 0);
+ if(unlikely(currentSize.width < nextSize.width)) // to goward.
+ {
+ currFormStartPoint = Point((currentSize.height - currentSize.width)/2,-(currentSize.height - currentSize.width)/2);
+ currFormEndPoint = Point((currentSize.height - currentSize.width)/2 -nextSize.width, -(currentSize.height - currentSize.width)/2);
+ }
+ else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+ {
+ currFormStartPoint = Point(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2);
+ currFormEndPoint = Point(-(currentSize.width - currentSize.height)/2 -nextSize.width, (currentSize.width - currentSize.height)/2);
+ }
}
- r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_POSITION, Variant(currFormStartPoint), Variant(currFormEndPoint), transId + (L"CurrentFormLeftTranslatePosition"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_POSITION, Variant(currFormStartPoint), Variant(currFormEndPoint), transId + (L"CurrentFormLeftTranslatePosition"), angle);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
- r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_POSITION, Variant(nextFormStartPoint), Variant(nextFormEndPoint), transId + (L"NextFormLeftTranslatePosition"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_POSITION, Variant(nextFormStartPoint), Variant(nextFormEndPoint), transId + (L"NextFormLeftTranslatePosition"), 0.0f);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
}
break;
case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_RIGHT:
{
+ angle = CalculateChangedAngle();
+
Dimension currentSize = __pCurrentForm->GetSize();
Dimension nextSize = __pNextForm->GetSize();
Point currFormStartPoint = Point(0, 0);
- Point currFormEndPoint = Point((nextSize.width), 0);
+ Point currFormEndPoint = Point(nextSize.width, 0);
- Point nextFormStartPoint = Point((-1 * (nextSize.width)), 0);
+ Point nextFormStartPoint = Point(-1 * (nextSize.width), 0);
Point nextFormEndPoint = Point(0, 0);
- if (currentSize.width < nextSize.width)
+ if (unlikely(angle != 0.0f))
{
- currFormStartPoint = Point((nextSize.width - currentSize.width), 0);
- nextFormStartPoint = Point((-1 * (currentSize.width)), 0);
+ if(unlikely(currentSize.width < nextSize.width)) // to goward.
+ {
+ currFormStartPoint = Point((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2);
+ currFormEndPoint = Point((currentSize.height - currentSize.width)/2 + nextSize.width, -(currentSize.height - currentSize.width)/2);
+ }
+ else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+ {
+ currFormStartPoint = Point(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2);//
+ currFormEndPoint = Point(-(currentSize.width - currentSize.height)/2 + nextSize.width, (currentSize.width - currentSize.height)/2);
+ }
}
- r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_POSITION, Variant(currFormStartPoint), Variant(currFormEndPoint), transId + (L"CurrentFormRightTranslatePosition"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list");
+ r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_POSITION, Variant(currFormStartPoint), Variant(currFormEndPoint), transId + (L"CurrentFormRightTranslatePosition"), angle);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list");
- r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_POSITION, Variant(nextFormStartPoint), Variant(nextFormEndPoint), transId + (L"NextFormRightTranslatePosition"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list");
+ r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_POSITION, Variant(nextFormStartPoint), Variant(nextFormEndPoint), transId + (L"NextFormRightTranslatePosition"), 0.0f);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list");
}
break;
case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_FADE_IN_OUT:
{
+ angle = CalculateChangedAngle();
+
r = PrepareCapture();
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to capture.");
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture.");
+
+ Dimension currentSize = __pCurrentForm->GetSize();
+ Dimension nextSize = __pNextForm->GetSize();
+
+ FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds();
+
+ if (unlikely(angle != 0.0f))
+ {
+ if(unlikely(currentSize.width < nextSize.width)) // to goward.
+ {
+ tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height);
+ }
+ else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+ {
+ tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);//
+ }
+ __pCurrentCaptureVisualElement->SetBounds(tempBounds);
+
+ VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation();
+ pAnimation->SetPropertyName(L"transform.rotation.z");
+ pAnimation->SetStartValue(Variant(angle));
+ pAnimation->SetEndValue(Variant(angle));
+ pAnimation->SetDuration(__duration);
+ pAnimation->SetEndValueApplied(false);
+ __pCurrentCaptureVisualElement->AddAnimation(L"transform", *pAnimation);
+ delete pAnimation;
+ }
-// r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormFadeOutAlpha"));
-// SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+// r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormFadeOutAlpha"), angle);
+// SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
- r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormFadeInAlpha"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormFadeInAlpha"), 0.0f);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
}
break;
case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_ZOOM_IN:
{
+ angle = CalculateChangedAngle();
+
+ r = PrepareCapture();
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture.");
+
Dimension currentSize = __pCurrentForm->GetSize();
+ Dimension nextSize = __pNextForm->GetSize();
+
+ FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds();
Dimension startSize = Dimension((currentSize.width * 80) / 100, (currentSize.height * 80) / 100);
Dimension endSize = currentSize;
- r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormZoomInAlpha"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ if (unlikely(angle != 0.0f))
+ {
+ if(unlikely(currentSize.width < nextSize.width)) // to goward.
+ {
+ tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height);
+ }
+ else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+ {
+ tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);//
+ }
+ __pCurrentCaptureVisualElement->SetBounds(tempBounds);
+ }
+
+ r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormZoomInAlpha"), angle);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
- r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormZoomInAlpha"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormZoomInAlpha"), 0.0f);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
- r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_SIZE, Variant(startSize), Variant(endSize), transId + (L"NextFormZoomInSize"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(startSize), Variant(endSize), transId + (L"NextFormZoomInSize"), 0.0f);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
}
break;
case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_ZOOM_OUT:
{
+ angle = CalculateChangedAngle();
+
r = PrepareCapture();
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to capture.");
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture.");
Dimension currentSize = __pCurrentForm->GetSize();
+ Dimension nextSize = __pNextForm->GetSize();
+
+ FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds();
Dimension startSize = currentSize;
Dimension endSize = Dimension((currentSize.width * 80) / 100, (currentSize.height * 80) / 100);
- r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(startSize), Variant(endSize), transId + (L"CurrentFormZoomOutSize"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ if (unlikely(angle != 0.0f))
+ {
+ if(unlikely(currentSize.width < nextSize.width)) // to goward.
+ {
+ tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height);
+ }
+ else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+ {
+ tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);//
+ }
+ __pCurrentCaptureVisualElement->SetBounds(tempBounds);
+ }
+
+ r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(startSize), Variant(endSize), transId + (L"CurrentFormZoomOutSize"), angle);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
- r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormZoomOutAlpha"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormZoomOutAlpha"), 0.0f);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
- r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormZoomOutAlpha"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormZoomOutAlpha"), 0.0f);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
}
break;
case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_DEPTH_IN:
{
+ angle = CalculateChangedAngle();
+
r = PrepareCapture();
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to capture.");
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture.");
Dimension currentSize = __pCurrentForm->GetSize();
+ Dimension nextSize = __pNextForm->GetSize();
+
+ FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds();
Dimension currFormStartSize = currentSize;
Dimension currFormEndSize = Dimension((currentSize.width * 80) / 100, (currentSize.height * 80) / 100);
Dimension nextFormStartSize = Dimension((currentSize.width * 120) / 100, (currentSize.height * 120) / 100);
Dimension nextFormEndSize = currentSize;
- r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormDepthInAplha"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ if (unlikely(angle != 0.0f))
+ {
+ if(unlikely(currentSize.width < nextSize.width)) // to goward.
+ {
+ tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height);
+ }
+ else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+ {
+ tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);//
+ }
+ __pCurrentCaptureVisualElement->SetBounds(tempBounds);
+ }
+
+ r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormDepthInAplha"), 0.0f);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
- r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(currFormStartSize), Variant(currFormEndSize), transId + (L"CurrentFormDepthInSize"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(currFormStartSize), Variant(currFormEndSize), transId + (L"CurrentFormDepthInSize"), angle);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
- r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormDepthInAplha"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormDepthInAplha"), 0.0f);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
- r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(nextFormStartSize), Variant(nextFormEndSize), transId + (L"NextFormDepthInSize"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(nextFormStartSize), Variant(nextFormEndSize), transId + (L"NextFormDepthInSize"), 0.0f);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
}
break;
case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_DEPTH_OUT:
{
+ angle = CalculateChangedAngle();
+
+ r = PrepareCapture();
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture.");
+
Dimension currentSize = __pCurrentForm->GetSize();
+ Dimension nextSize = __pNextForm->GetSize();
+
+ FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds();
Dimension currFormStartSize = currentSize;
Dimension currFormEndSize = Dimension((currentSize.width * 120) / 100, (currentSize.height * 120) / 100);
Dimension nextFormStartSize = Dimension((currentSize.width * 80) / 100, (currentSize.height * 80) / 100);
Dimension nextFormEndSize = currentSize;
- r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormDepthOutAlpha"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ if (unlikely(angle != 0.0f))
+ {
+ if(unlikely(currentSize.width < nextSize.width)) // to goward.
+ {
+ tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height);
+ }
+ else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+ {
+ tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);//
+ }
+ __pCurrentCaptureVisualElement->SetBounds(tempBounds);
+ }
+
+ r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormDepthOutAlpha"), 0.0f);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
- r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormDepthOutAlpha"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormDepthOutAlpha"), 0.0f);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
- r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_SIZE, Variant(currFormStartSize), Variant(currFormEndSize), transId + (L"CurrentFormDepthOutSize"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(currFormStartSize), Variant(currFormEndSize), transId + (L"CurrentFormDepthOutSize"), angle);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
- r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_SIZE, Variant(nextFormStartSize), Variant(nextFormEndSize), transId + (L"NextFormDepthOutSize"));
- SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+ r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(nextFormStartSize), Variant(nextFormEndSize), transId + (L"NextFormDepthOutSize"), 0.0f);
+ SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
}
break;
result
_FrameAnimatorImpl::PrepareCapture(void)
{
+ float bgsize = 0.0f;
VisualElement* pParentVisualElement = __pNextFormVisualElement->GetParent();
SysTryReturnResult(NID_UI_ANIM, (pParentVisualElement), E_SYSTEM, "A system error has been occurred. Failed to get visual element's parent.");
pParentVisualElement->InsertChild(*__pBgElement, __pNextFormVisualElement, true);
+ if(__pCurrentFormVisualElement->GetBounds().width > __pCurrentFormVisualElement->GetBounds().height)
+ {
+ bgsize = __pCurrentFormVisualElement->GetBounds().width;
+ }
+ else
+ {
+ bgsize = __pCurrentFormVisualElement->GetBounds().height;
+ }
+ __pBgElement->SetBounds(FloatRectangle(0.0f, 0.0f, bgsize, bgsize));
// remove dummy surface
__pCurrentCaptureVisualElement->SetSurface(null);
return E_SUCCESS;
}
-
result
-_FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetType animTarget, Variant startValue, Variant endValue, String animName)
+_FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetType animTarget, Variant startValue, Variant endValue, String animName, float angle)
{
result r = E_SUCCESS;
Dimension startSize, endSize;
Point startPoint, endPoint;
+ FloatRectangle tempBounds;
+ _VisualElementImpl* pImpl = null;
VisualElementPropertyAnimation* propAnimation = null;
propAnimation = new (std::nothrow) VisualElementPropertyAnimation();
case ANIMATION_INTERPOLATOR_BEZIER:
{
pTimingFunction = new (std::nothrow) BezierTimingFunction();
- SysTryCatch(NID_UI_ANIM, (pTimingFunction), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to get TimingFunction.");
+ SysTryCatch(NID_UI_ANIM, (pTimingFunction), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
((BezierTimingFunction*) pTimingFunction)->SetControlPoints(__firstBezierControlPointsTime, __firstBezierControlPointsValue, __secondBezierControlPointsTime, __secondBezierControlPointsValue);
}
scaleY = (float) startSize.height / (float) rect.height;
Tizen::Graphics::FloatMatrix4 startMatrix = Tizen::Graphics::FloatMatrix4();
- //startMatrix.SetAsIdentity(); // default value is identity matrix
+ Tizen::Graphics::FloatMatrix4 endMatrix = Tizen::Graphics::FloatMatrix4();
+
+ if(unlikely(angle != 0.0f)) // There is a defferece between currentform and nextform.
+ {
+ _MatrixUtilRotate(startMatrix, angle, 0.0f, 0.0f, 1.0f);
+ _MatrixUtilRotate(endMatrix, angle, 0.0f, 0.0f, 1.0f);
+ }
+
_MatrixUtilScale(startMatrix, scaleX, scaleY, scaleZ);
_MatrixUtilAtAnchor(startMatrix, anchorX, anchorY, anchorZ);
scaleX = (float) endSize.width / (float) rect.width;
scaleY = (float) endSize.height / (float) rect.height;
- Tizen::Graphics::FloatMatrix4 endMatrix = Tizen::Graphics::FloatMatrix4();
- //endMatrix.SetAsIdentity(); // default value is identity matrix
_MatrixUtilScale(endMatrix, scaleX, scaleY, scaleZ);
_MatrixUtilAtAnchor(endMatrix, anchorX, anchorY, anchorZ);
case ANIMATION_TARGET_POSITION:
{
+ if(angle != 0.0f)
+ {
+ VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation();
+ pAnimation->SetPropertyName(L"transform.rotation.z");
+ pAnimation->SetStartValue(Variant(angle));
+ pAnimation->SetEndValue(Variant(angle));
+ pAnimation->SetDuration(__duration);
+ pAnimation->SetEndValueApplied(false);
+ pLayer->AddAnimation(L"transform", *pAnimation);
+ delete pAnimation;
+ }
+
pVePropType = VePropBounds;
FloatRectangle rect;
case ANIMATION_TARGET_ALPHA:
{
+ if(angle != 0.0f)
+ {
+ VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation();
+ pAnimation->SetPropertyName(L"transform.rotation.z");
+ pAnimation->SetStartValue(Variant(angle));
+ pAnimation->SetEndValue(Variant(angle));
+ pAnimation->SetDuration(__duration);
+ pAnimation->SetEndValueApplied(false);
+ pLayer->AddAnimation(L"transform", *pAnimation);
+ delete pAnimation;
+ }
pVePropType = VePropOpacity;
propAnimation->SetStartValue(startValue);
propAnimation->SetEndValue(endValue);
SysTryCatch(NID_UI_ANIM, (pVePropType), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Animation property type is invalid.");
propAnimation->SetPropertyName(pVePropType);
+ pImpl = _VisualElementImpl::GetInstance(*pLayer)->GetPresentation();
+ r = pImpl->SetPropertyI(propAnimation->GetPropertyName(), propAnimation->GetStartValue());
+ SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, r, "[E_SYSTEM] A system error has been occurred. Failed to set property to visual element.");
r = pLayer->AddAnimation(animName, *propAnimation);
SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, r, "[E_SYSTEM] A system error has been occurred. Failed to add animation to visual element.");
void
_FrameAnimatorImpl::OnAnimationTransactionStopped(int transactionId)
{
+ __pNextFormVisualElement->SetTransformMatrix(__pNextFormVisualElement->GetTransformMatrix());
+ __pNextFormVisualElement->SetBounds(__pNextFormVisualElement->GetBounds());
+ __pNextFormVisualElement->SetOpacity(__pNextFormVisualElement->GetOpacity());
+
OnFrameAnimationStopped(false);
}
result Dispose(void);
- result StartLayerAnimation(VisualElement* pLayer, AnimationTargetType animTarget, Variant startValue, Variant endValue, Tizen::Base::String animName);
+ result StartLayerAnimation(VisualElement* pLayer, AnimationTargetType animTarget, Variant startValue, Variant endValue, Tizen::Base::String animName, float angle);
result AddFrameActiveAnimation(VisualElement* _pVisualElement, FrameAnimatorFormTransitionAnimation _formAnimation,
VisualElementPropertyAnimation* _pPropertyAnimation, IVisualElementAnimationTimingFunction* _pTimingFunction, Tizen::Base::String _animName);
result ChangeCurrentForm(Tizen::Ui::Controls::Form* pCurrentForm, Tizen::Ui::Controls::Form& nextForm);
+ float CalculateChangedAngle(void);
result SetAnimations(void);
result PrepareCapture(void);
bool
_MatrixUtilIsTranslation(const Tizen::Graphics::FloatMatrix4& m)
{
- //isTranslate && isDiagonal
- if( (m.matrix[3][0] != 0.0f || m.matrix[3][1] != 0.0f || m.matrix[3][2] != 0.0f) &&
- (m.matrix[0][0] == 1.0f && m.matrix[1][1] == 1.0f && m.matrix[2][2] == 1.0f))
+ if(_GetMatrix4Type(m) == MATRIX4_Translation)
{
return true;
}
- return false;
+ else
+ {
+ return false;
+ }
}
void
bool
_MatrixUtilInvert(Tizen::Graphics::FloatMatrix4& m)
{
- float a0;
- float a1;
- float a2;
- float a3;
- float a4;
- float a5;
- float b0;
- float b1;
- float b2;
- float b3;
- float b4;
- float b5;
- float det;
-
- if (m.IsIdentity())
- {
- return true;
- }
-
- if(_MatrixUtilIsTranslation(m))
+ Matrix4Type matrixType = _GetMatrix4Type(m) ;
+ if(matrixType == MATRIX4_Translation)
{
m.matrix[3][0] = -m.matrix[3][0];
m.matrix[3][1] = -m.matrix[3][1];
m.matrix[3][2] = -m.matrix[3][2];
return true;
}
-
- a0 = m.matrix[0][0] * m.matrix[1][1] - m.matrix[0][1] * m.matrix[1][0];
- a1 = m.matrix[0][0] * m.matrix[1][2] - m.matrix[0][2] * m.matrix[1][0];
- a2 = m.matrix[0][0] * m.matrix[1][3] - m.matrix[0][3] * m.matrix[1][0];
- a3 = m.matrix[0][1] * m.matrix[1][2] - m.matrix[0][2] * m.matrix[1][1];
- a4 = m.matrix[0][1] * m.matrix[1][3] - m.matrix[0][3] * m.matrix[1][1];
- a5 = m.matrix[0][2] * m.matrix[1][3] - m.matrix[0][3] * m.matrix[1][2];
-
- b0 = m.matrix[2][0] * m.matrix[3][1] - m.matrix[2][1] * m.matrix[3][0];
- b1 = m.matrix[2][0] * m.matrix[3][2] - m.matrix[2][2] * m.matrix[3][0];
- b2 = m.matrix[2][0] * m.matrix[3][3] - m.matrix[2][3] * m.matrix[3][0];
- b3 = m.matrix[2][1] * m.matrix[3][2] - m.matrix[2][2] * m.matrix[3][1];
- b4 = m.matrix[2][1] * m.matrix[3][3] - m.matrix[2][3] * m.matrix[3][1];
- b5 = m.matrix[2][2] * m.matrix[3][3] - m.matrix[2][3] * m.matrix[3][2];
-
- det = a0 * b5 - a1 * b4 + a2 * b3 + a3 * b2 - a4 * b1 + a5 * b0;
- if (det == 0.0f)
+ else if(matrixType == MATRIX4_Identity)
{
- return false;
+ return true;
}
-
- float inverse_m[4][4];
-
- inverse_m[0][0] = +m.matrix[1][1] * b5 - m.matrix[1][2] * b4 + m.matrix[1][3] * b3;
- inverse_m[1][0] = -m.matrix[1][0] * b5 + m.matrix[1][2] * b2 + m.matrix[1][3] * b1;
- inverse_m[2][0] = +m.matrix[1][0] * b4 - m.matrix[1][1] * b2 + m.matrix[1][3] * b0;
- inverse_m[3][0] = -m.matrix[1][0] * b3 + m.matrix[1][1] * b1 - m.matrix[1][2] * b0;
- inverse_m[0][1] = -m.matrix[0][1] * b5 + m.matrix[0][2] * b4 - m.matrix[0][3] * b3;
- inverse_m[1][1] = +m.matrix[0][0] * b5 - m.matrix[0][2] * b2 + m.matrix[0][3] * b1;
- inverse_m[2][1] = -m.matrix[0][0] * b4 + m.matrix[0][1] * b2 - m.matrix[0][3] * b0;
- inverse_m[3][1] = +m.matrix[0][0] * b3 - m.matrix[0][1] * b1 + m.matrix[0][2] * b0;
- inverse_m[0][2] = +m.matrix[3][1] * a5 - m.matrix[3][2] * a4 + m.matrix[3][3] * a3;
- inverse_m[1][2] = -m.matrix[3][0] * a5 + m.matrix[3][2] * a2 - m.matrix[3][3] * a1;
- inverse_m[2][2] = +m.matrix[3][0] * a4 - m.matrix[3][1] * a2 + m.matrix[3][3] * a0;
- inverse_m[3][2] = -m.matrix[3][0] * a3 + m.matrix[3][1] * a1 - m.matrix[3][2] * a0;
- inverse_m[0][3] = -m.matrix[2][1] * a5 + m.matrix[2][2] * a4 - m.matrix[2][3] * a3;
- inverse_m[1][3] = +m.matrix[2][0] * a5 - m.matrix[2][2] * a2 + m.matrix[2][3] * a1;
- inverse_m[2][3] = -m.matrix[2][0] * a4 + m.matrix[2][1] * a2 - m.matrix[2][3] * a0;
- inverse_m[3][3] = +m.matrix[2][0] * a3 - m.matrix[2][1] * a1 + m.matrix[2][2] * a0;
-
- for (int i = 0; i < 4; i++)
+ if(m.Invert() == E_SUCCESS)
{
- for (int j = 0; j < 4; j++)
- {
- inverse_m[j][i] /= det;
- }
+ return true;
+ }
+ else
+ {
+ return false;
}
-
- memcpy(m.matrix, inverse_m, sizeof(m.matrix));
-
- return true;
}
void
// Send start, repeat notification
pAnimationData->NotifyAnimationStarted();
+ if(pAnimationData->IsRemoved())
+ {
+ continue;
+ }
+
pAnimationData->OnTickOccurred(*pTarget, currentValue);
if (__status == _STATUS_REPEAT || __status == _STATUS_FINISH || pAnimationData->GetStatus() == _AnimationData::_STATUS_FINISH)
return false;
}
+
+result
+_VisualElement::SetPosition(const Tizen::Graphics::FloatPoint& point)
+{
+ return _pVisualElementImpl->SetBoundsPositionSubProperty(Variant(point));
+}
+
+result
+_VisualElement::SetSize(const Tizen::Graphics::FloatDimension& size)
+{
+ return _pVisualElementImpl->SetBoundsSizeSubProperty(Variant(size));
+}
+
result
_VisualElement::SetClipToParent(bool clipToParent)
{
_VisualElementAnimationGroupImpl::_VisualElementAnimationGroupImpl(void)
+ : __animationList(Tizen::Base::Collection::SingleObjectDeleter)
{
result r = __animationList.Construct();
}
_VisualElementAnimationGroupImpl::_VisualElementAnimationGroupImpl(const _VisualElementAnimationGroupImpl& animationGroupImpl)
+ : __animationList(Tizen::Base::Collection::SingleObjectDeleter)
{
__animationList.Construct();
{ // remove sub property
for(int i = 0 ; pSubProperties[i] != NULL ; i++)
{
- pAnimationManager->RemoveAnimationByProperty(*__pPublicInstance, *pSubProperties[i]);
+ pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, *pSubProperties[i]);
}
}
if (unlikely(pAnimation))
{
/// WARNING:
- // Adding property animation causes previous animation for same property to be removed in Animation Manager.
+ // Adding animation causes previous animation for same property to be removed in Animation Manager.
if (unlikely(IsFailed(AddAnimation(null, *pAnimation))))
{
pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, property);
}
else
{
+
+ if(pSubProperties)
+ { // remove sub property
+ for(int i = 0 ; pSubProperties[i] != NULL ; i++)
+ {
+ pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, *pSubProperties[i]);
+ }
+ }
+
pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, property);
r = false;
}
}
result
-_VisualElementImpl::SetBoundsI(const FloatRectangle& bounds)
+_VisualElementImpl::SetBoundsI(const FloatRectangle& bounds, bool& sizeChanged)
{
_Rectanglef boundsAdjusted(bounds);
- FloatRectangle oldValue(__bounds);
result r = E_SUCCESS;
- bool sizeChanged = false;
+ sizeChanged = false;
if (unlikely(GetSharedData().pEventListener != null))
{
}
}
- // observer
- if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
- {
- FloatRectangle currentValue = __pPresentation->__bounds;
-
- static const String* subProperties[] = { pVeSubPropBoundsSize, pVeSubPropBoundsPosition, NULL };
- if(CreateImplicitAnimationIfNeeded(*pVePropBounds, __bounds, currentValue, subProperties ) == false)
- {
- __pPresentation->SetBoundsProperty(__bounds);
- }
-
- VE_DELEGATE(this, InvokeOnBoundsChanged, oldValue);
-
- if(__pBoundsChangedCallback && sizeChanged == true)
- {
- (*__pBoundsChangedCallback)(__pBoundsChangedCallbackData);
- }
-
- }
-
return r;
}
-
result
_VisualElementImpl::SetBounds(const FloatRectangle& bounds)
{
SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object.");
result r = E_SUCCESS;
+ bool sizeChanged = false;
+ FloatRectangle oldValue(__bounds);
+
+ static const String* subProperties[] = {pVeSubPropBoundsSize, pVeSubPropBoundsPosition, NULL };
if (IS_INTERNAL_CLASS(__pPublicInstance))
{
- r = SetBoundsI(bounds);
+ r = SetBoundsI(bounds, sizeChanged);
+
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ FloatRectangle currentValue = __pPresentation->__bounds;
+
+ if(CreateImplicitAnimationIfNeeded(*pVePropBounds, __bounds, currentValue, subProperties) == false)
+ {
+ __pPresentation->SetBoundsProperty(__bounds);
+ }
+
+ VE_DELEGATE(this, InvokeOnBoundsChanged, oldValue);
+
+ if(__pBoundsChangedCallback && sizeChanged == true)
+ {
+ (*__pBoundsChangedCallback)(__pBoundsChangedCallbackData);
+ }
+ }
}
else
{
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_RECTANGLE, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
- return SetBoundsI(v.ToFloatRectangle());
+ bool sizeChanged = false;
+ FloatRectangle oldValue(__bounds);
+ static const String* subProperties[] = {pVeSubPropBoundsSize, pVeSubPropBoundsPosition, NULL };
+
+ result r = SetBoundsI(v.ToFloatRectangle(), sizeChanged);
+
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ FloatRectangle currentValue = __pPresentation->__bounds;
+
+ if(CreateImplicitAnimationIfNeeded(*pVePropBounds, __bounds, currentValue, subProperties) == false)
+ {
+ __pPresentation->SetBoundsProperty(__bounds);
+ }
+
+ VE_DELEGATE(this, InvokeOnBoundsChanged, oldValue);
+
+ if(__pBoundsChangedCallback && sizeChanged == true)
+ {
+ (*__pBoundsChangedCallback)(__pBoundsChangedCallbackData);
+ }
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ bool sizeChanged = false;
+ FloatRectangle oldValue(__bounds);
const FloatPoint& position = v.ToFloatPoint();
- return SetBoundsProperty(Variant(FloatRectangle(position.x, position.y, __bounds.width, __bounds.height)));
+ result r = SetBoundsI(FloatRectangle(position.x, position.y, __bounds.width, __bounds.height), sizeChanged);
+ static const String* Properties[] = {pVePropBounds, NULL };
+
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ FloatPoint currentValue(__pPresentation->__bounds.x, __pPresentation->__bounds.y);
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropBoundsPosition, Variant(FloatPoint(__bounds.x, __bounds.y)) , currentValue, Properties) == false)
+ {
+ __pPresentation->SetBoundsPositionSubProperty(Variant(FloatPoint(__bounds.x, __bounds.y)));
+ }
+
+ VE_DELEGATE(this, InvokeOnBoundsChanged, oldValue);
+
+ if(__pBoundsChangedCallback && sizeChanged == true)
+ {
+ (*__pBoundsChangedCallback)(__pBoundsChangedCallbackData);
+ }
+ }
+
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_DIMENSION, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatRectangle oldValue(__bounds);
+ bool sizeChanged = false;
const FloatDimension& size = v.ToFloatDimension();
- return SetBoundsProperty(Variant(FloatRectangle(__bounds.x, __bounds.y, size.width, size.height)));
+ result r = SetBoundsI(FloatRectangle(__bounds.x, __bounds.y, size.width, size.height), sizeChanged);
+ static const String* Properties[] = {pVePropBounds, NULL };
+
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ FloatDimension currentValue(__pPresentation->__bounds.width, __pPresentation->__bounds.height);
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropBoundsSize, Variant(FloatDimension(__bounds.width, __bounds.height)), currentValue, Properties) == false)
+ {
+ __pPresentation->SetBoundsSizeSubProperty(Variant(FloatDimension(__bounds .width, __bounds.height)));
+ }
+
+ VE_DELEGATE(this, InvokeOnBoundsChanged, oldValue);
+
+ if(__pBoundsChangedCallback && sizeChanged == true)
+ {
+ (*__pBoundsChangedCallback)(__pBoundsChangedCallbackData);
+ }
+ }
+ return r;
}
float
result r = E_SUCCESS;
- FloatMatrix4 oldValue(__transform);
-
FloatMatrix4 matrixAdjusted(xform);
if (unlikely(GetSharedData().pEventListener != null))
}
}
- if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
- {
- FloatMatrix4 currentValue = __pPresentation->__transform;
-
- static const String* subProperties[] = { pVeSubPropTransformRotationX,
- pVeSubPropTransformRotationY,
- pVeSubPropTransformRotationZ,
- pVeSubPropTransformScaleX,
- pVeSubPropTransformScaleY,
- pVeSubPropTransformScaleZ,
- pVeSubPropTransformTranslationX,
- pVeSubPropTransformTranslationY,
- pVeSubPropTransformTranslationZ,
- pVeSubPropTransformRotationAnchorX,
- pVeSubPropTransformRotationAnchorY,
- pVeSubPropTransformRotationAnchorZ,
- pVeSubPropTransformScaleAnchorX,
- pVeSubPropTransformScaleAnchorY,
- pVeSubPropTransformScaleAnchorZ,
- NULL};
-
- if(CreateImplicitAnimationIfNeeded(*pVePropTransform, __transform, currentValue, subProperties ) == false)
- {
- __pPresentation->SetTransformMatrixProperty(__transform);
- }
-
- VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
- }
return E_SUCCESS;
}
{
SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object.");
result r = E_SUCCESS;
+ FloatMatrix4 oldValue(__transform);
// PROPERTY_PROCESS(SetTransformMatrixI, GetTransformMatrixProperty, SetTransformMatrixProperty, pVePropTransform, __transform, xform);
if (IS_INTERNAL_CLASS(__pPublicInstance))
{
r = SetTransformMatrixI(xform);
+
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ FloatMatrix4 currentValue = __pPresentation->__transform;
+
+ static const String* subProperties[] = {
+ pVeSubPropTransformRotationX,
+ pVeSubPropTransformRotationY,
+ pVeSubPropTransformRotationZ,
+ pVeSubPropTransformScaleX,
+ pVeSubPropTransformScaleY,
+ pVeSubPropTransformScaleZ,
+ pVeSubPropTransformTranslationX,
+ pVeSubPropTransformTranslationY,
+ pVeSubPropTransformTranslationZ,
+ pVeSubPropTransformRotationAnchorX,
+ pVeSubPropTransformRotationAnchorY,
+ pVeSubPropTransformRotationAnchorZ,
+ pVeSubPropTransformScaleAnchorX,
+ pVeSubPropTransformScaleAnchorY,
+ pVeSubPropTransformScaleAnchorZ,
+
+ pVeSubPropTransformRotationXY,
+ pVeSubPropTransformScaleXY,
+ pVeSubPropTransformTranslationXY,
+ pVeSubPropTransformRotationAnchorXY,
+ pVeSubPropTransformScaleAnchorXY,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVePropTransform, __transform, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformMatrixProperty(__transform);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
}
else
{
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_MATRIX4, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
- return SetTransformMatrixI(v.ToFloatMatrix4(), true);
+ FloatMatrix4 oldValue(__transform);
+ result r = SetTransformMatrixI(v.ToFloatMatrix4(), true);
+
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ FloatMatrix4 currentValue = __pPresentation->__transform;
+
+ static const String* subProperties[] = {
+ pVeSubPropTransformRotationX,
+ pVeSubPropTransformRotationY,
+ pVeSubPropTransformRotationZ,
+ pVeSubPropTransformScaleX,
+ pVeSubPropTransformScaleY,
+ pVeSubPropTransformScaleZ,
+ pVeSubPropTransformTranslationX,
+ pVeSubPropTransformTranslationY,
+ pVeSubPropTransformTranslationZ,
+ pVeSubPropTransformRotationAnchorX,
+ pVeSubPropTransformRotationAnchorY,
+ pVeSubPropTransformRotationAnchorZ,
+ pVeSubPropTransformScaleAnchorX,
+ pVeSubPropTransformScaleAnchorY,
+ pVeSubPropTransformScaleAnchorZ,
+
+ pVeSubPropTransformRotationXY,
+ pVeSubPropTransformScaleXY,
+ pVeSubPropTransformTranslationXY,
+ pVeSubPropTransformRotationAnchorXY,
+ pVeSubPropTransformScaleAnchorXY,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVePropTransform, __transform, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformMatrixProperty(__transform);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
float angleX = 0.0f;
float angleY = 0.0f;
float angleZ = 0.0f;
__decomposedTransform.GetEulerAngles(angleX, angleY, angleZ);
__decomposedTransform.UpdateRotationFromEulerAngles(v.ToFloat(), angleY, angleZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationX);
+ static const String* subProperties[] = {
+ pVeSubPropTransformRotationXY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationX, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformRotationXSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
+
float angleX = 0.0f;
float angleY = 0.0f;
float angleZ = 0.0f;
__decomposedTransform.GetEulerAngles(angleX, angleY, angleZ);
__decomposedTransform.UpdateRotationFromEulerAngles(angleX, v.ToFloat(), angleZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationY);
+ static const String* subProperties[] = {
+ pVeSubPropTransformRotationXY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformRotationYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
+
float angleX = 0.0f;
float angleY = 0.0f;
float angleZ = 0.0f;
__decomposedTransform.GetEulerAngles(angleX, angleY, angleZ);
__decomposedTransform.UpdateRotationFromEulerAngles(angleX, angleY, v.ToFloat());
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationZ);
+ static const String* subProperties[] = {
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationZ, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformRotationZSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
+
const FloatPoint& point = v.ToFloatPoint();
float angleX = 0.0f;
__decomposedTransform.GetEulerAngles(angleX, angleY, angleZ);
__decomposedTransform.UpdateRotationFromEulerAngles(point.x, point.y, angleZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationXY);
+ static const String* subProperties[] = {
+ pVeSubPropTransformRotationX,
+ pVeSubPropTransformRotationY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationXY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformRotationXYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
+
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedTransform.GetRotationAnchor(anchorX, anchorY, anchorZ);
__decomposedTransform.SetRotationAnchor(v.ToFloat(), anchorY, anchorZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationAnchorX);
+ static const String* subProperties[] = {
+ pVeSubPropTransformRotationAnchorXY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationAnchorX, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformRotationAnchorXSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
+
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedTransform.GetRotationAnchor(anchorX, anchorY, anchorZ);
__decomposedTransform.SetRotationAnchor(anchorX, v.ToFloat(), anchorZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationAnchorY);
+ static const String* subProperties[] = {
+ pVeSubPropTransformRotationAnchorXY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationAnchorY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformRotationAnchorYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
+
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedTransform.GetRotationAnchor(anchorX, anchorY, anchorZ);
__decomposedTransform.SetRotationAnchor(anchorX, anchorY, v.ToFloat());
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationAnchorZ);
+ static const String* subProperties[] = {
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationAnchorZ, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformRotationAnchorZSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
+
const FloatPoint& point = v.ToFloatPoint();
float anchorX = 0.0f;
__decomposedTransform.GetRotationAnchor(anchorX, anchorY, anchorZ);
__decomposedTransform.SetRotationAnchor(point.x, point.y, anchorZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformRotationAnchorXY);
+ static const String* subProperties[] = {
+ pVeSubPropTransformRotationAnchorX,
+ pVeSubPropTransformRotationAnchorY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformRotationAnchorXY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformRotationAnchorXYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
+
float scaleX = 1.0f;
float scaleY = 1.0f;
float scaleZ = 1.0f;
__decomposedTransform.GetScaleFactors(scaleX, scaleY, scaleZ);
__decomposedTransform.SetScaleFactors(v.ToFloat(), scaleY, scaleZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleX);
+ static const String* subProperties[] = {
+ pVeSubPropTransformScaleXY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleX, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformScaleXSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
+
float scaleX = 1.0f;
float scaleY = 1.0f;
float scaleZ = 1.0f;
__decomposedTransform.GetScaleFactors(scaleX, scaleY, scaleZ);
__decomposedTransform.SetScaleFactors(scaleX, v.ToFloat(), scaleZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleY);
+ static const String* subProperties[] = {
+ pVeSubPropTransformScaleXY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformScaleYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
+
float scaleX = 1.0f;
float scaleY = 1.0f;
float scaleZ = 1.0f;
__decomposedTransform.GetScaleFactors(scaleX, scaleY, scaleZ);
__decomposedTransform.SetScaleFactors(scaleX, scaleY, v.ToFloat());
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleZ);
+ static const String* subProperties[] = {
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleZ, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformScaleZSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
- const FloatPoint& point = v.ToFloatPoint();
+ FloatMatrix4 oldValue(__transform);
+ const FloatPoint& point = v.ToFloatPoint();
float scaleX = 1.0f;
float scaleY = 1.0f;
float scaleZ = 1.0f;
__decomposedTransform.SetScaleFactors(point.x, point.y, scaleZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleXY);
+ static const String* subProperties[] = {
+ pVeSubPropTransformScaleX,
+ pVeSubPropTransformScaleY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleXY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformScaleXYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedTransform.GetScaleAnchor(anchorX, anchorY, anchorZ);
__decomposedTransform.SetScaleAnchor(v.ToFloat(), anchorY, anchorZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleAnchorX);
+ static const String* subProperties[] = {
+ pVeSubPropTransformScaleAnchorXY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleAnchorX, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformScaleAnchorXSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedTransform.GetScaleAnchor(anchorX, anchorY, anchorZ);
__decomposedTransform.SetScaleAnchor(anchorX, v.ToFloat(), anchorZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleAnchorY);
+ static const String* subProperties[] = {
+ pVeSubPropTransformScaleAnchorXY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleAnchorY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformScaleAnchorYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedTransform.GetScaleAnchor(anchorX, anchorY, anchorZ);
__decomposedTransform.SetScaleAnchor(anchorX, anchorY, v.ToFloat());
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleAnchorZ);
+ static const String* subProperties[] = {
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleAnchorZ, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformScaleAnchorZSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
const FloatPoint& point = v.ToFloatPoint();
-
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedTransform.GetScaleAnchor(anchorX, anchorY, anchorZ);
__decomposedTransform.SetScaleAnchor(point.x, point.y, anchorZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformScaleAnchorXY);
+ static const String* subProperties[] = {
+ pVeSubPropTransformScaleAnchorX,
+ pVeSubPropTransformScaleAnchorY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformScaleAnchorXY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformScaleAnchorXYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
float translateX = 0.0f;
float translateY = 0.0f;
float translateZ = 0.0f;
__decomposedTransform.GetTranslationFactors(translateX, translateY, translateZ);
__decomposedTransform.SetTranslationFactors(v.ToFloat(), translateY, translateZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformTranslationX);
+ static const String* subProperties[] = {
+ pVeSubPropTransformTranslationXY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformTranslationX, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformTranslationXSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
float translateX = 0.0f;
float translateY = 0.0f;
float translateZ = 0.0f;
__decomposedTransform.GetTranslationFactors(translateX, translateY, translateZ);
__decomposedTransform.SetTranslationFactors(translateX, v.ToFloat(), translateZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformTranslationY);
+ static const String* subProperties[] = {
+ pVeSubPropTransformTranslationXY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformTranslationY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformTranslationYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
float translateX = 0.0f;
float translateY = 0.0f;
float translateZ = 0.0f;
__decomposedTransform.GetTranslationFactors(translateX, translateY, translateZ);
__decomposedTransform.SetTranslationFactors(translateX, translateY, v.ToFloat());
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformTranslationZ);
+ static const String* subProperties[] = {
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformTranslationZ, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformTranslationZSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__transform);
const FloatPoint& point = v.ToFloatPoint();
-
float translateX = 0.0f;
float translateY = 0.0f;
float translateZ = 0.0f;
__decomposedTransform.GetTranslationFactors(translateX, translateY, translateZ);
__decomposedTransform.SetTranslationFactors(point.x, point.y, translateZ);
- return SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ result r = SetTransformMatrixI(__decomposedTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropTransformTranslationXY);
+ static const String* subProperties[] = {
+ pVeSubPropTransformTranslationX,
+ pVeSubPropTransformTranslationY,
+ pVePropTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropTransformTranslationXY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetTransformTranslationXYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnTransformMatrixChanged, oldValue);
+ }
+ return r;
}
FloatMatrix4
_VisualElementImpl::SetChildrenTransformMatrixI(const FloatMatrix4& xform, bool updateDecomposed)
{
FloatMatrix4 matrixAdjusted(xform);
- FloatMatrix4 oldValue(__childrenTransform);
result r = E_SUCCESS;
if (unlikely(GetSharedData().pEventListener != null))
InvalidateHierarchyProps(HIERARCHY_PROPERTY_COORDINATES, true, false);
}
- if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
- {
- FloatMatrix4 currentValue = __pPresentation->__childrenTransform;
- static const String* subProperties[] = {
- pVeSubPropChildrenTransformRotationX,
- pVeSubPropChildrenTransformRotationY,
- pVeSubPropChildrenTransformRotationZ,
- pVeSubPropChildrenTransformScaleX,
- pVeSubPropChildrenTransformScaleY,
- pVeSubPropChildrenTransformScaleZ,
- pVeSubPropChildrenTransformTranslationX,
- pVeSubPropChildrenTransformTranslationY,
- pVeSubPropChildrenTransformTranslationZ,
- pVeSubPropChildrenTransformRotationAnchorX,
- pVeSubPropChildrenTransformRotationAnchorY,
- pVeSubPropChildrenTransformRotationAnchorZ,
- pVeSubPropChildrenTransformScaleAnchorX,
- pVeSubPropChildrenTransformScaleAnchorY,
- pVeSubPropChildrenTransformScaleAnchorZ,
- NULL};
-
- if(CreateImplicitAnimationIfNeeded(*pVePropChildrenTransform, __childrenTransform, currentValue, subProperties ) == false)
- {
- __pPresentation->SetChildrenTransformMatrixProperty(__childrenTransform);
- }
-
- VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
- }
return E_SUCCESS;
}
_VisualElementImpl::SetChildrenTransformMatrix(const FloatMatrix4& xform)
{
SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object.");
+ FloatMatrix4 oldValue(__childrenTransform);
result r = E_SUCCESS;
//PROPERTY_PROCESS(SetChildrenTransformMatrixI, GetChildrenTransformMatrixProperty, SetChildrenTransformMatrixProperty, pVePropChildrenTransform, __childrenTransform, xform);
if (IS_INTERNAL_CLASS(__pPublicInstance))
{
r = SetChildrenTransformMatrixI(xform);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ FloatMatrix4 currentValue = __pPresentation->__childrenTransform;
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformRotationX,
+ pVeSubPropChildrenTransformRotationY,
+ pVeSubPropChildrenTransformRotationZ,
+ pVeSubPropChildrenTransformScaleX,
+ pVeSubPropChildrenTransformScaleY,
+ pVeSubPropChildrenTransformScaleZ,
+ pVeSubPropChildrenTransformTranslationX,
+ pVeSubPropChildrenTransformTranslationY,
+ pVeSubPropChildrenTransformTranslationZ,
+ pVeSubPropChildrenTransformRotationAnchorX,
+ pVeSubPropChildrenTransformRotationAnchorY,
+ pVeSubPropChildrenTransformRotationAnchorZ,
+ pVeSubPropChildrenTransformScaleAnchorX,
+ pVeSubPropChildrenTransformScaleAnchorY,
+ pVeSubPropChildrenTransformScaleAnchorZ,
+
+ pVeSubPropChildrenTransformRotationXY,
+ pVeSubPropChildrenTransformScaleXY,
+ pVeSubPropChildrenTransformTranslationXY,
+ pVeSubPropChildrenTransformRotationAnchorXY,
+ pVeSubPropChildrenTransformScaleAnchorXY,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVePropChildrenTransform, __childrenTransform, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformMatrixProperty(__childrenTransform);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
}
else
{
}
SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r));
-
return r;
}
_VisualElementImpl::SetChildrenTransformMatrixProperty(const Variant& v)
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_MATRIX4, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
+
+ result r = SetChildrenTransformMatrixI(v.ToFloatMatrix4(), true);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ FloatMatrix4 currentValue = __pPresentation->__childrenTransform;
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformRotationX,
+ pVeSubPropChildrenTransformRotationY,
+ pVeSubPropChildrenTransformRotationZ,
+ pVeSubPropChildrenTransformScaleX,
+ pVeSubPropChildrenTransformScaleY,
+ pVeSubPropChildrenTransformScaleZ,
+ pVeSubPropChildrenTransformTranslationX,
+ pVeSubPropChildrenTransformTranslationY,
+ pVeSubPropChildrenTransformTranslationZ,
+ pVeSubPropChildrenTransformRotationAnchorX,
+ pVeSubPropChildrenTransformRotationAnchorY,
+ pVeSubPropChildrenTransformRotationAnchorZ,
+ pVeSubPropChildrenTransformScaleAnchorX,
+ pVeSubPropChildrenTransformScaleAnchorY,
+ pVeSubPropChildrenTransformScaleAnchorZ,
+
+ pVeSubPropChildrenTransformRotationXY,
+ pVeSubPropChildrenTransformScaleXY,
+ pVeSubPropChildrenTransformTranslationXY,
+ pVeSubPropChildrenTransformRotationAnchorXY,
+ pVeSubPropChildrenTransformScaleAnchorXY,
+ NULL};
- return SetChildrenTransformMatrixI(v.ToFloatMatrix4(), true);
+ if(CreateImplicitAnimationIfNeeded(*pVePropChildrenTransform, __childrenTransform, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformMatrixProperty(__childrenTransform);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float angleX = 0.0f;
float angleY = 0.0f;
float angleZ = 0.0f;
__decomposedChildrenTransform.GetEulerAngles(angleX, angleY, angleZ);
__decomposedChildrenTransform.UpdateRotationFromEulerAngles(v.ToFloat(), angleY, angleZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationX);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformRotationXY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationX, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformRotationXSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float angleX = 0.0f;
float angleY = 0.0f;
float angleZ = 0.0f;
__decomposedChildrenTransform.GetEulerAngles(angleX, angleY, angleZ);
__decomposedChildrenTransform.UpdateRotationFromEulerAngles(angleX, v.ToFloat(), angleZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationY);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformRotationXY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformRotationYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float angleX = 0.0f;
float angleY = 0.0f;
float angleZ = 0.0f;
__decomposedChildrenTransform.GetEulerAngles(angleX, angleY, angleZ);
__decomposedChildrenTransform.UpdateRotationFromEulerAngles(angleX, angleY, v.ToFloat());
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationZ);
+ static const String* subProperties[] = {
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationZ, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformRotationZSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
const FloatPoint& point = v.ToFloatPoint();
float angleX = 0.0f;
__decomposedChildrenTransform.GetEulerAngles(angleX, angleY, angleZ);
__decomposedChildrenTransform.UpdateRotationFromEulerAngles(point.x, point.y, angleZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationXY);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformRotationX,
+ pVeSubPropChildrenTransformRotationY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationXY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformRotationXYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedChildrenTransform.GetRotationAnchor(anchorX, anchorY, anchorZ);
__decomposedChildrenTransform.SetRotationAnchor(v.ToFloat(), anchorY, anchorZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationAnchorX);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformRotationAnchorXY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationAnchorX, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformRotationAnchorXSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedChildrenTransform.GetRotationAnchor(anchorX, anchorY, anchorZ);
__decomposedChildrenTransform.SetRotationAnchor(anchorX, v.ToFloat(), anchorZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationAnchorY);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformRotationXY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationAnchorY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformRotationAnchorYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedChildrenTransform.GetRotationAnchor(anchorX, anchorY, anchorZ);
__decomposedChildrenTransform.SetRotationAnchor(anchorX, anchorY, v.ToFloat());
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationAnchorZ);
+ static const String* subProperties[] = {
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationAnchorZ, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformRotationAnchorZSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
const FloatPoint& point = v.ToFloatPoint();
float anchorX = 0.0f;
__decomposedChildrenTransform.GetRotationAnchor(anchorX, anchorY, anchorZ);
__decomposedChildrenTransform.SetRotationAnchor(point.x, point.y, anchorZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformRotationAnchorXY);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformRotationAnchorX,
+ pVeSubPropChildrenTransformRotationAnchorY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformRotationAnchorXY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformRotationAnchorXYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float scaleX = 1.0f;
float scaleY = 1.0f;
float scaleZ = 1.0f;
__decomposedChildrenTransform.GetScaleFactors(scaleX, scaleY, scaleZ);
__decomposedChildrenTransform.SetScaleFactors(v.ToFloat(), scaleY, scaleZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleX);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformScaleXY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleX, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformScaleXSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float scaleX = 1.0f;
float scaleY = 1.0f;
float scaleZ = 1.0f;
__decomposedChildrenTransform.GetScaleFactors(scaleX, scaleY, scaleZ);
__decomposedChildrenTransform.SetScaleFactors(scaleX, v.ToFloat(), scaleZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleY);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformScaleXY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformScaleYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float scaleX = 1.0f;
float scaleY = 1.0f;
float scaleZ = 1.0f;
__decomposedChildrenTransform.GetScaleFactors(scaleX, scaleY, scaleZ);
__decomposedChildrenTransform.SetScaleFactors(scaleX, scaleY, v.ToFloat());
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleZ);
+ static const String* subProperties[] = {
+ pVePropChildrenTransform,
+ NULL};
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleZ, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformScaleZSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
const FloatPoint& point = v.ToFloatPoint();
float scaleX = 1.0f;
__decomposedChildrenTransform.GetScaleFactors(scaleX, scaleY, scaleZ);
__decomposedChildrenTransform.SetScaleFactors(point.x, point.y, scaleZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleXY);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformScaleX,
+ pVeSubPropChildrenTransformScaleY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleXY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformScaleXYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedChildrenTransform.GetScaleAnchor(anchorX, anchorY, anchorZ);
__decomposedChildrenTransform.SetScaleAnchor(v.ToFloat(), anchorY, anchorZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleAnchorX);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformScaleAnchorXY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleAnchorX, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformScaleAnchorXSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedChildrenTransform.GetScaleAnchor(anchorX, anchorY, anchorZ);
__decomposedChildrenTransform.SetScaleAnchor(anchorX, v.ToFloat(), anchorZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleAnchorY);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformScaleAnchorXY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleAnchorY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformScaleAnchorYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedChildrenTransform.GetScaleAnchor(anchorX, anchorY, anchorZ);
__decomposedChildrenTransform.SetScaleAnchor(anchorX, anchorY, v.ToFloat());
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleAnchorZ);
+ static const String* subProperties[] = {
+ pVePropChildrenTransform,
+ NULL};
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleAnchorZ, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformScaleAnchorZSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
const FloatPoint& point = v.ToFloatPoint();
+ FloatMatrix4 oldValue(__childrenTransform);
float anchorX = 0.0f;
float anchorY = 0.0f;
float anchorZ = 0.0f;
__decomposedChildrenTransform.GetScaleAnchor(anchorX, anchorY, anchorZ);
__decomposedChildrenTransform.SetScaleAnchor(point.x, point.y, anchorZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformScaleAnchorXY);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformScaleAnchorX,
+ pVeSubPropChildrenTransformScaleAnchorY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformScaleAnchorXY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformScaleAnchorXYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float translateX = 0.0f;
float translateY = 0.0f;
float translateZ = 0.0f;
__decomposedChildrenTransform.GetTranslationFactors(translateX, translateY, translateZ);
__decomposedChildrenTransform.SetTranslationFactors(v.ToFloat(), translateY, translateZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformTranslationX);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformTranslationXY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformTranslationX, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformTranslationXSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float translateX = 0.0f;
float translateY = 0.0f;
float translateZ = 0.0f;
__decomposedChildrenTransform.GetTranslationFactors(translateX, translateY, translateZ);
__decomposedChildrenTransform.SetTranslationFactors(translateX, v.ToFloat(), translateZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformTranslationY);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformTranslationXY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformTranslationY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformTranslationYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
float translateX = 0.0f;
float translateY = 0.0f;
float translateZ = 0.0f;
__decomposedChildrenTransform.GetTranslationFactors(translateX, translateY, translateZ);
__decomposedChildrenTransform.SetTranslationFactors(translateX, translateY, v.ToFloat());
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformTranslationZ);
+ static const String* subProperties[] = {
+ pVePropChildrenTransform,
+ NULL};
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformTranslationZ, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformTranslationZSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
Variant
{
SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT_POINT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE);
+ FloatMatrix4 oldValue(__childrenTransform);
const FloatPoint& point = v.ToFloatPoint();
float translateX = 0.0f;
__decomposedChildrenTransform.GetTranslationFactors(translateX, translateY, translateZ);
__decomposedChildrenTransform.SetTranslationFactors(point.x, point.y, translateZ);
- return SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ result r = SetChildrenTransformMatrixI(__decomposedChildrenTransform.GetTransformMatrix(), false);
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this))
+ {
+ Variant currentValue = __pPresentation->GetProperty(*pVeSubPropChildrenTransformTranslationXY);
+ static const String* subProperties[] = {
+ pVeSubPropChildrenTransformTranslationX,
+ pVeSubPropChildrenTransformTranslationY,
+ pVePropChildrenTransform,
+ NULL};
+
+ if(CreateImplicitAnimationIfNeeded(*pVeSubPropChildrenTransformTranslationXY, v, currentValue, subProperties ) == false)
+ {
+ __pPresentation->SetChildrenTransformTranslationXYSubProperty(v);
+ }
+
+ VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue);
+ }
+ return r;
}
bool
SysTryReturn(NID_UI_ANIM, pRenderTarget, null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Target VisualElement is not available.");
SysTryReturn(NID_UI_ANIM, pRenderTarget->__pSharedData, null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Target VisualElement is not constructed.");
- // WARNING:
- // Forcefully create surface if GetCanvasN is called.
- // Without followings, surface may not be created if size of bounds == 0 (the initial size)
- if (!HAVE_SURFACE(this))
- {
- __needRecreateSurface = true;
- }
-
- pRenderTarget->RebuildHierarchyProps(0, true, true);
-
-#if 1
- SysTryReturn(NID_UI_ANIM, pRenderTarget->GetSharedData().pNativeNode->GetSurface(), null, E_SYSTEM, "[E_INVALID_STATE] Target VisualElement's surface is not constructed.");
-#else
- SysTryReturn(NID_UI_ANIM, pRenderTarget->GetSharedData().pSurface, null, E_SYSTEM, "[E_INVALID_STATE] Target VisualElement's surface is not constructed.");
-#endif
-
FloatRectangle canvasBounds;
FloatRectangle clipBounds;
}
// WARNING:
+ // Forcefully create surface if GetCanvasN is called.
+ // Without followings, surface may not be created if size of bounds == 0 (the initial size)
+ if (!HAVE_SURFACE(this))
+ {
+ __needRecreateSurface = true;
+ }
+
+ pRenderTarget->RebuildHierarchyProps(0, true, true);
+
+#if 1
+ SysTryReturn(NID_UI_ANIM, pRenderTarget->GetSharedData().pNativeNode->GetSurface(), null, E_SYSTEM, "[E_INVALID_STATE] Target VisualElement's surface is not constructed.");
+#else
+ SysTryReturn(NID_UI_ANIM, pRenderTarget->GetSharedData().pSurface, null, E_SYSTEM, "[E_INVALID_STATE] Target VisualElement's surface is not constructed.");
+#endif
+
+ // WARNING:
// From now, canvasBounds contains the clipping area, not subcanvas area.
// (0, 0) of the canvas should be placed on the left-top of the VE !
bounds = tempRect;
- if (!tempRect.IsEmpty() && drawRect.x>=0.0f && drawRect.y>=0.0f)
+ if (!tempRect.IsEmpty() && drawRect.x>=0.0f && drawRect.y>=0.0f)
{
if (pRenderTarget && HAVE_SURFACE(pRenderTarget)) // If element have surface , justly draw to the canvas
{
for (int i = 0; i < count; i++)
{
pChild = __children.GetChildAt(i);
- if (unlikely(!pChild) || unlikely(!VE_VISIBLE(pChild)) || clipBounds.IsEmpty() ||
- (!__childrenTransform.IsIdentity() && !_MatrixUtilIsTranslation(__childrenTransform)) ||
- (!pChild->__transform.IsIdentity() && !_MatrixUtilIsTranslation(pChild->__transform)) )
+ if (unlikely(!pChild) || unlikely(!VE_VISIBLE(pChild)) || clipBounds.IsEmpty() ||
+ (!__childrenTransform.IsIdentity() && !_MatrixUtilIsTranslation(__childrenTransform)) ||
+ (!pChild->__transform.IsIdentity() && !_MatrixUtilIsTranslation(pChild->__transform)) )
{
continue;
- }
+ }
pChild->CaptureI(outputCanvas, rectDest, reference, rectRef, clipBounds, true, depth + 1);
}
}
{
result r = E_SUCCESS;
- SysTryReturnResult(NID_UI_CTRL, (actionId >= BUTTON_ITEM_ACTION_ID_MIN && actionId <= BUTTON_ITEM_ACTION_ID_MAX), E_INVALID_ARG,
+ SysTryReturnResult(NID_UI_CTRL, actionId >= BUTTON_ITEM_ACTION_ID_MIN, E_INVALID_ARG,
"[E_INVALID_ARG] The actionId is invalid.");
_ButtonItemImpl* pImpl = _ButtonItemImpl::GetInstance(*this);
#include "FUiCtrl_ColorPickerImpl.h"
using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
namespace Tizen { namespace Ui { namespace Controls
{
_ColorPickerImpl* pImpl = _ColorPickerImpl::CreateColorPickerImplN(*this);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (pImpl != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pImpl != null, r, "Propagating.");
_pControlImpl = pImpl;
r = SetPosition(point);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- return r;
+ return E_SUCCESS;
CATCH:
delete pImpl;
_ColorPickerImpl* pImpl = _ColorPickerImpl::CreateColorPickerImplN(*this);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (pImpl != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pImpl != null, r, "Propagating.");
_pControlImpl = pImpl;
r = SetPosition(point);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- return r;
+ return E_SUCCESS;
CATCH:
delete pImpl;
Color color = pImpl->GetColor();
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), color, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, color, r, "[%s] Propagating.", GetErrorMessage(r));
return color;
}
int hue = pImpl->GetHue();
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), hue, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, hue, r, "[%s] Propagating.", GetErrorMessage(r));
return hue;
}
int sat = pImpl->GetSaturation();
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), sat, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, sat, r, "[%s] Propagating.", GetErrorMessage(r));
return sat;
}
int lum = pImpl->GetLuminance();
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), lum, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, lum, r, "[%s] Propagating.", GetErrorMessage(r));
return lum;
}
void
-ColorPicker::SetColor(const Tizen::Graphics::Color& color)
+ColorPicker::SetColor(const Color& color)
{
_ColorPickerImpl* pImpl = _ColorPickerImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pImpl->SetColor(color);
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
void
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pImpl->SetHue(hue);
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
void
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pImpl->SetSaturation(saturation);
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
void
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pImpl->SetLuminance(luminance);
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
void
-ColorPicker::AddColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener)
+ColorPicker::AddColorChangeEventListener(IColorChangeEventListener& listener)
{
_ColorPickerImpl* pImpl = _ColorPickerImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pImpl->AddColorChangeEventListener(listener);
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
void
-ColorPicker::RemoveColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener)
+ColorPicker::RemoveColorChangeEventListener(IColorChangeEventListener& listener)
{
_ColorPickerImpl* pImpl = _ColorPickerImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pImpl->RemoveColorChangeEventListener(listener);
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
}}} // Tizen::Ui::Controls
using namespace Tizen::Base;
using namespace Tizen::Base::Runtime;
using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
namespace Tizen { namespace Ui { namespace Controls
{
}
result
-ContextMenu::Construct(const Tizen::Graphics::Point& point, ContextMenuStyle style)
+ContextMenu::Construct(const Point& point, ContextMenuStyle style)
{
result r = E_SUCCESS;
}
result
-ContextMenu::Construct(const Tizen::Graphics::FloatPoint& point, ContextMenuStyle style)
+ContextMenu::Construct(const FloatPoint& point, ContextMenuStyle style)
{
result r = E_SUCCESS;
}
result
-ContextMenu::Construct(const Tizen::Graphics::Point& point, ContextMenuStyle style, ContextMenuAnchorDirection direction)
+ContextMenu::Construct(const Point& point, ContextMenuStyle style, ContextMenuAnchorDirection direction)
{
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
SysAssertf(pImpl == null,
FloatPoint floatPoint = _CoordinateSystemUtils::ConvertToFloat(point);
pImpl = _ContextMenuImpl::CreateContextMenuImplN(this, floatPoint, style, direction);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
_pControlImpl = pImpl;
}
result
-ContextMenu::Construct(const Tizen::Graphics::FloatPoint& point, ContextMenuStyle style, ContextMenuAnchorDirection direction)
+ContextMenu::Construct(const FloatPoint& point, ContextMenuStyle style, ContextMenuAnchorDirection direction)
{
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
SysAssertf(pImpl == null,
// Create a ContextMenu Impl
pImpl = _ContextMenuImpl::CreateContextMenuImplN(this, point, style, direction);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
_pControlImpl = pImpl;
}
void
-ContextMenu::AddActionEventListener(Tizen::Ui::IActionEventListener& listener)
+ContextMenu::AddActionEventListener(IActionEventListener& listener)
{
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
}
void
-ContextMenu::RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener)
+ContextMenu::RemoveActionEventListener(IActionEventListener& listener)
{
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
}
result
-ContextMenu::AddItem(const Tizen::Base::String& text, int actionId)
+ContextMenu::AddItem(const String& text, int actionId)
{
// check whether the ContextMenu was created.
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
result r = E_SUCCESS;
r = pImpl->AddItem(text, actionId, null, null, null);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result
-ContextMenu::AddItem(const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap,
- const Tizen::Graphics::Bitmap* pPressedBitmap,
- const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+ContextMenu::AddItem(const String& text, int actionId, const Bitmap& normalBitmap,
+ const Bitmap* pPressedBitmap,
+ const Bitmap* pHighlightedBitmap)
{
// check whether the ContextMenu was created.
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
result r = E_SUCCESS;
ContextMenuStyle style = pImpl->GetPublicStyle();
- if (style != CONTEXT_MENU_STYLE_LIST)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument at style.");
- return E_INVALID_ARG;
- }
+ SysTryReturnResult(NID_UI_CTRL, style == CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style is not of type CONTEXT_MENU_STYLE_LIST.");
r = pImpl->AddItem(text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result
-ContextMenu::AddItem(const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, int actionId)
+ContextMenu::AddItem(const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, int actionId)
{
// check whether the ContextMenu was created.
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
result r = E_SUCCESS;
ContextMenuStyle style = pImpl->GetPublicStyle();
- if (style == CONTEXT_MENU_STYLE_LIST)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style.");
- return E_INVALID_STATE;
- }
+ SysTryReturnResult(NID_UI_CTRL, style != CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style cannot be of type CONTEXT_MENU_STYLE_LIST.");
- r = pImpl->AddItem(Tizen::Base::String(""), actionId, &normalBitmap, pPressedBitmap, null);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = pImpl->AddItem(String(""), actionId, &normalBitmap, pPressedBitmap, null);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result
-ContextMenu::AddItem(const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap,
- const Tizen::Graphics::Bitmap* pHighlightedBitmap,
+ContextMenu::AddItem(const Bitmap& normalBitmap, const Bitmap* pPressedBitmap,
+ const Bitmap* pHighlightedBitmap,
int actionId)
{
// check whether the ContextMenu was created.
result r = E_SUCCESS;
ContextMenuStyle style = pImpl->GetPublicStyle();
- if (style == CONTEXT_MENU_STYLE_LIST)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style.");
- return E_INVALID_STATE;
- }
+ SysTryReturnResult(NID_UI_CTRL, style != CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style cannot be of type CONTEXT_MENU_STYLE_LIST.");
- r = pImpl->AddItem(Tizen::Base::String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = pImpl->AddItem(String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result
-ContextMenu::InsertItemAt(int index, const Tizen::Base::String& text, int actionId)
+ContextMenu::InsertItemAt(int index, const String& text, int actionId)
{
// check whether the ContextMenu was created.
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
result r = E_SUCCESS;
- if (index > GetItemCount() || index < 0)
- {
- SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index);
- return E_OUT_OF_RANGE;
- }
+ SysTryReturnResult(NID_UI_CTRL, index >= 0 && index <= GetItemCount(), E_OUT_OF_RANGE, "The specified index is not valid(index = %d).", index);
r = pImpl->InsertItem(index, text, actionId, null, null, null);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result
-ContextMenu::InsertItemAt(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap,
- const Tizen::Graphics::Bitmap* pPressedBitmap,
- const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+ContextMenu::InsertItemAt(int index, const String& text, int actionId, const Bitmap& normalBitmap,
+ const Bitmap* pPressedBitmap,
+ const Bitmap* pHighlightedBitmap)
{
// check whether the ContextMenu was created.
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
result r = E_SUCCESS;
ContextMenuStyle style = pImpl->GetPublicStyle();
- if (style != CONTEXT_MENU_STYLE_LIST)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style.");
- return E_INVALID_STATE;
- }
+ SysTryReturnResult(NID_UI_CTRL, style == CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style is not of type CONTEXT_MENU_STYLE_LIST.");
- if (index > GetItemCount() || index < 0)
- {
- SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index);
- return E_OUT_OF_RANGE;
- }
+ SysTryReturnResult(NID_UI_CTRL, index >= 0 && index <= GetItemCount(), E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index);
r = pImpl->InsertItem(index, text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result
-ContextMenu::InsertItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap,
+ContextMenu::InsertItemAt(int index, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap,
int actionId)
{
// check whether the ContextMenu was created.
result r = E_SUCCESS;
ContextMenuStyle style = pImpl->GetPublicStyle();
- if (style == CONTEXT_MENU_STYLE_LIST)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style.");
- return E_INVALID_STATE;
- }
+ SysTryReturnResult(NID_UI_CTRL, style != CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style cannot be of type CONTEXT_MENU_STYLE_LIST.");
- if (index > GetItemCount() || index < 0)
- {
- SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index);
- return E_OUT_OF_RANGE;
- }
+ SysTryReturnResult(NID_UI_CTRL, index >= 0 && index <= GetItemCount(), E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index);
- r = pImpl->InsertItem(index, Tizen::Base::String(""), actionId, &normalBitmap, pPressedBitmap, null);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = pImpl->InsertItem(index, String(""), actionId, &normalBitmap, pPressedBitmap, null);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result
-ContextMenu::InsertItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap,
- const Tizen::Graphics::Bitmap* pHighlightedBitmap,
+ContextMenu::InsertItemAt(int index, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap,
+ const Bitmap* pHighlightedBitmap,
int actionId)
{
// check whether the ContextMenu was created.
result r = E_SUCCESS;
ContextMenuStyle style = pImpl->GetPublicStyle();
- if (style == CONTEXT_MENU_STYLE_LIST)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style.");
- return E_INVALID_STATE;
- }
+ SysTryReturnResult(NID_UI_CTRL, style != CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style cannot be of type CONTEXT_MENU_STYLE_LIST.");
- if (index > GetItemCount() || index < 0)
- {
- SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index);
- return E_OUT_OF_RANGE;
- }
+ SysTryReturnResult(NID_UI_CTRL, index >= 0 && index <= GetItemCount(), E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index);
- r = pImpl->InsertItem(index, Tizen::Base::String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = pImpl->InsertItem(index, String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result
-ContextMenu::SetItemAt(int index, const Tizen::Base::String& text, int actionId)
+ContextMenu::SetItemAt(int index, const String& text, int actionId)
{
// check whether the ContextMenu was created.
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
result r = E_SUCCESS;
- if (index >= GetItemCount() || index < 0)
- {
- SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index);
- return E_OUT_OF_RANGE;
- }
+ SysTryReturnResult(NID_UI_CTRL, index < GetItemCount() && index >= 0, E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index);
r = pImpl->SetItem(index, text, actionId, null, null, null);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result
-ContextMenu::SetItemAt(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap,
- const Tizen::Graphics::Bitmap* pPressedBitmap,
- const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+ContextMenu::SetItemAt(int index, const String& text, int actionId, const Bitmap& normalBitmap,
+ const Bitmap* pPressedBitmap,
+ const Bitmap* pHighlightedBitmap)
{
// check whether the ContextMenu was created.
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
result r = E_SUCCESS;
ContextMenuStyle style = pImpl->GetPublicStyle();
- if (style != CONTEXT_MENU_STYLE_LIST)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style.");
- return E_INVALID_STATE;
- }
+ SysTryReturnResult(NID_UI_CTRL, style == CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style is not of type CONTEXT_MENU_STYLE_LIST.");
- if (index >= GetItemCount() || index < 0)
- {
- SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index);
- return E_OUT_OF_RANGE;
- }
+ SysTryReturnResult(NID_UI_CTRL, index < GetItemCount() && index >= 0, E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index);
r = pImpl->SetItem(index, text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result
-ContextMenu::SetItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap,
+ContextMenu::SetItemAt(int index, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap,
int actionId)
{
// check whether the ContextMenu was created.
result r = E_SUCCESS;
ContextMenuStyle style = pImpl->GetPublicStyle();
- if (style == CONTEXT_MENU_STYLE_LIST)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style.");
- return E_INVALID_STATE;
- }
+ SysTryReturnResult(NID_UI_CTRL, style != CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style cannot be of type CONTEXT_MENU_STYLE_LIST.");
- if (index >= GetItemCount() || index < 0)
- {
- SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index);
- return E_OUT_OF_RANGE;
- }
+ SysTryReturnResult(NID_UI_CTRL, index < GetItemCount() && index >= 0, E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index);
- r = pImpl->SetItem(index, Tizen::Base::String(""), actionId, &normalBitmap, pPressedBitmap, null);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = pImpl->SetItem(index, String(""), actionId, &normalBitmap, pPressedBitmap, null);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result
-ContextMenu::SetItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap,
- const Tizen::Graphics::Bitmap* pHighlightedBitmap,
+ContextMenu::SetItemAt(int index, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap,
+ const Bitmap* pHighlightedBitmap,
int actionId)
{
// check whether the ContextMenu was created.
result r = E_SUCCESS;
ContextMenuStyle style = pImpl->GetPublicStyle();
- if (style == CONTEXT_MENU_STYLE_LIST)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] Invalid argument at style.");
- return E_INVALID_STATE;
- }
+ SysTryReturnResult(NID_UI_CTRL, style != CONTEXT_MENU_STYLE_LIST, E_INVALID_ARG, "Invalid argument is used. The style cannot be of type CONTEXT_MENU_STYLE_LIST.");
-// if (index >= MAX_ITEM_COUNT || index < 0)
- if (index >= GetItemCount() || index < 0)
- {
- SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index);
- return E_OUT_OF_RANGE;
- }
+ SysTryReturnResult(NID_UI_CTRL, index < GetItemCount() && index >= 0, E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index);
- r = pImpl->SetItem(index, Tizen::Base::String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = pImpl->SetItem(index, String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result r = E_SUCCESS;
r = pImpl->RemoveItemAt(index);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result r = E_SUCCESS;
r = pImpl->RemoveAllItems();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
const _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
-// if (index > MAX_ITEM_COUNT || index < 0)
- if (index >= GetItemCount() || index < 0)
- {
- SysTryReturn(NID_UI_CTRL, false, -1, E_OUT_OF_RANGE,
- "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index);
- }
+ SysTryReturn(NID_UI_CTRL, index < GetItemCount() && index >= 0, -1, E_OUT_OF_RANGE, "The specified index (%d) is out of range.", index);
return pImpl->GetItemActionIdAt(index);
}
-Tizen::Graphics::Color
+Color
ContextMenu::GetItemTextColor(ContextMenuItemStatus status) const
{
// check whether the ContextMenu was created.
const _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
- Tizen::Graphics::Color color = pImpl->GetItemTextColor(status);
+ Color color = pImpl->GetItemTextColor(status);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Tizen::Graphics::Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
return color;
}
result
-ContextMenu::SetItemTextColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color)
+ContextMenu::SetItemTextColor(ContextMenuItemStatus status, const Color& color)
{
// check whether the ContextMenu was created.
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
result r = E_SUCCESS;
r = pImpl->SetItemTextColor(status, color);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result
-ContextMenu::SetAnchorPosition(const Tizen::Graphics::Point& position)
+ContextMenu::SetAnchorPosition(const Point& position)
{
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
FloatPoint floatPosition = _CoordinateSystemUtils::ConvertToFloat(position);
r = pImpl->SetAnchorPosition(floatPosition.x, floatPosition.y);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result
-ContextMenu::SetAnchorPosition(const Tizen::Graphics::FloatPoint& position)
+ContextMenu::SetAnchorPosition(const FloatPoint& position)
{
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
r = pImpl->SetAnchorPosition(position.x, position.y);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
-Tizen::Graphics::Point
+Point
ContextMenu::GetAnchorPosition(void) const
{
const _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
- Tizen::Graphics::FloatPoint position = pImpl->GetAnchorPosition();
+ FloatPoint position = pImpl->GetAnchorPosition();
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Tizen::Graphics::Point(0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Point(0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
return _CoordinateSystemUtils::ConvertToInteger(position);
}
-Tizen::Graphics::FloatPoint
+FloatPoint
ContextMenu::GetAnchorPositionF(void) const
{
const _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
- Tizen::Graphics::FloatPoint position = pImpl->GetAnchorPosition();
+ FloatPoint position = pImpl->GetAnchorPosition();
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Tizen::Graphics::FloatPoint(0.0f, 0.0f), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatPoint(0.0f, 0.0f), r, "[%s] Propagating.", GetErrorMessage(r));
return position;
}
-Tizen::Graphics::Color
+Color
ContextMenu::GetColor(void) const
{
// check whether the ContextMenu was created.
const _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
- Tizen::Graphics::Color color = pImpl->GetColor();
+ Color color = pImpl->GetColor();
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Tizen::Graphics::Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
return color;
}
result
-ContextMenu::SetColor(const Tizen::Graphics::Color& color)
+ContextMenu::SetColor(const Color& color)
{
// check whether the ContextMenu was created.
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
result r = E_SUCCESS;
r = pImpl->SetColor(color);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
-Tizen::Graphics::Color
+Color
ContextMenu::GetItemColor(ContextMenuItemStatus status) const
{
// check whether the ContextMenu was created.
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
SysTryReturn(NID_UI_CTRL, (status != CONTEXT_MENU_ITEM_STATUS_NORMAL), Color(0, 0, 0, 0), E_INVALID_STATE,
- "[E_INVALID_ARG] CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported.");
+ "[%s] Invalid argument is used. CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported.", GetErrorMessage(E_INVALID_ARG));
- Tizen::Graphics::Color color = pImpl->GetItemColor(status);
+ Color color = pImpl->GetItemColor(status);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Tizen::Graphics::Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
return color;
}
result
-ContextMenu::SetItemColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color)
+ContextMenu::SetItemColor(ContextMenuItemStatus status, const Color& color)
{
// check whether the ContextMenu was created.
_ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
- SysTryReturn(NID_UI_CTRL, (status != CONTEXT_MENU_ITEM_STATUS_NORMAL), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported.");
+ SysTryReturnResult(NID_UI_CTRL, (status != CONTEXT_MENU_ITEM_STATUS_NORMAL), E_INVALID_ARG,
+ "Invalid argument is used. CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported.");
result r = E_SUCCESS;
r = pImpl->SetItemColor(status, color);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
result r = E_SUCCESS;
r = pImpl->SetMaxVisibleItemsCount(maxItemsCount);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
E_UNSUPPORTED_OPTION, "The input option EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP is unsupported. The token style EXPANDABLE_EDIT_AREA_STYLE_TOKEN does not support the title style EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP");
SysTryReturnResult(NID_UI_CTRL,
(rect.width >= MINIMUM_SIZE_VALUE && rect.width <= MAXIMUM_SIZE_VALUE && rect.height >= MINIMUM_SIZE_VALUE && rect.height <= MAXIMUM_SIZE_VALUE), E_INVALID_ARG,
- "Invalid argument is used. The specified size(%d, %d) is outside range of min size(%d, %d) and max size(%d, %d) of ExpandableEditArea."
+ "Invalid argument(s) is used. The specified size(%d, %d) is outside the range of min size(%d, %d) and max size(%d, %d) of ExpandableEditArea."
, rect.width, rect.height, MINIMUM_SIZE_VALUE, MINIMUM_SIZE_VALUE, MAXIMUM_SIZE_VALUE, MAXIMUM_SIZE_VALUE);
pImpl = _ExpandableEditAreaImpl::CreateExpandableEditAreaImplFN(this, rect, style, titleStyle);
{
result r = E_SUCCESS;
- SysTryReturnResult(NID_UI_CTRL, (actionId >= FOOTER_ITEM_ACTION_ID_MIN && actionId <= FOOTER_ITEM_ACTION_ID_MAX), E_INVALID_ARG,
+ SysTryReturnResult(NID_UI_CTRL, actionId >= FOOTER_ITEM_ACTION_ID_MIN, E_INVALID_ARG,
"[E_INVALID_ARG] The actionId is invalid.");
_FooterItemImpl* pImpl = _FooterItemImpl::GetInstance(*this);
#include <FUiCtrlGroupContainer.h>
#include "FUiCtrl_GroupContainerImpl.h"
-
using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
namespace Tizen { namespace Ui { namespace Controls
{
pGroupContainerImpl = _GroupContainerImpl::CreateGroupContainerImplN(this, rect, rowCount, columnCount, lineWidth);
r = GetLastResult();
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pGroupContainerImpl != null, r, "Propagating.");
pGroupContainerImpl->Initialize();
- r = GetLastResult();
_pControlImpl = pGroupContainerImpl;
- return r;
+ return E_SUCCESS;
}
result
pGroupContainerImpl = _GroupContainerImpl::CreateGroupContainerImplFN(this, rect, rowCount, columnCount, lineWidth);
r = GetLastResult();
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pGroupContainerImpl != null, r, "Propagating.");
pGroupContainerImpl->Initialize();
- r = GetLastResult();
_pControlImpl = pGroupContainerImpl;
- return r;
+ return E_SUCCESS;
}
result
return pGroupContainerImpl->IsRowStretchable(rowIndex);
}
-
Color
GroupContainer::GetBackgroundColor(void) const
{
pGroupContainerImpl->SetBackgroundColor(color);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has occurred.");
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to set the background color.");
}
Color
{
pImpl = _GroupedListViewImpl::CreateGroupedListViewImplN(this, style, itemDivider, SCROLL_STYLE_FADE_OUT);
}
- SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_pControlImpl = pImpl;
{
result r = E_SUCCESS;
- SysTryReturnResult(NID_UI_CTRL, (actionId >= HEADER_ITEM_ACTION_ID_MIN && actionId <= HEADER_ITEM_ACTION_ID_MAX), E_INVALID_ARG,
+ SysTryReturnResult(NID_UI_CTRL, actionId >= HEADER_ITEM_ACTION_ID_MIN, E_INVALID_ARG,
"[E_INVALID_ARG] The actionId is invalid.");
_HeaderItemImpl* pImpl = _HeaderItemImpl::GetInstance(*this);
{
pImpl = _ListViewImpl::CreateListViewImplN(this, itemDivider, SCROLL_STYLE_FADE_OUT);
}
- SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_pControlImpl = pImpl;
r = Control::SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect));
"Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
pImpl = _ListViewImpl::CreateListViewImplN(this, itemDivider, scrollStyle);
- SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_pControlImpl = pImpl;
r = Control::SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect));
"Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
pImpl = _ListViewImpl::CreateListViewImplN(this, itemDivider, scrollStyle);
- SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_pControlImpl = pImpl;
r = Control::SetBounds(rect);
// Create _OptionMenuImpl
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::CreateOptionMenuImplN(*this);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pOptionMenuImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pOptionMenuImpl != null, r, "Propagating.");
// Set _OptionMenuImpl
_pControlImpl = pOptionMenuImpl;
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->AddActionEventListener(listener);
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
void
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->RemoveActionEventListener(listener);
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
result
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->AddItem(text, actionId, null, null, null);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->AddItem(String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->AddItem(text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->InsertItemAt(mainIndex, text, actionId, null, null, null);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->InsertItemAt(mainIndex, String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->InsertItemAt(mainIndex, text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->SetItemAt(mainIndex, text, actionId, null, null, null);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->SetItemAt(mainIndex, String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->SetItemAt(mainIndex, text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->RemoveItemAt(mainIndex);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.");
return r;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
pOptionMenuImpl->RemoveAllItems();
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
return;
}
ClearLastResult();
const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
int count = pOptionMenuImpl->GetItemCount();
result r = GetLastResult();
ClearLastResult();
const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
int index = pOptionMenuImpl->GetItemIndexFromActionId(actionId);
result r = GetLastResult();
ClearLastResult();
const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
int actionId = pOptionMenuImpl->GetItemActionIdAt(mainIndex);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r));
return actionId;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->AddSubItem(mainIndex, text, actionId);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->InsertSubItemAt(mainIndex, subIndex, text, actionId);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->SetSubItemAt(mainIndex, subIndex, text, actionId);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->RemoveSubItemAt(mainIndex, subIndex);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
int count = pOptionMenuImpl->GetSubItemCount(mainIndex);
- result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (count >= 0), -1, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ SysTryReturn(NID_UI_CTRL, (count >= 0), -1, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
return count;
}
ClearLastResult();
const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
int index = pOptionMenuImpl->GetSubItemIndexFromActionId(actionId);
result r = GetLastResult();
ClearLastResult();
const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
int actionId = pOptionMenuImpl->GetSubItemActionIdAt(mainIndex, subIndex);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r));
return actionId;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->SetItemTextColor(status, color);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
Color color = pOptionMenuImpl->GetItemTextColor(status);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
return color;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->SetItemColor(status, color);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
SysTryReturn(NID_UI_CTRL, (status != OPTION_MENU_ITEM_STATUS_NORMAL), Color(0, 0, 0, 0), E_INVALID_ARG,
- "[E_INVALID_ARG] OPTION_MENU_ITEM_STATUS_NORMAL is not supported.");
+ "[%s] Invalid argument is used. OPTION_MENU_ITEM_STATUS_NORMAL is not supported.", GetErrorMessage(E_INVALID_ARG));
Color color = pOptionMenuImpl->GetItemColor(status);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
return color;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->SetColor(color);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
Color color = pOptionMenuImpl->GetColor();
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r));
return color;
}
ClearLastResult();
_OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pOptionMenuImpl->SetMaxVisibleItemsCount(maxItemsCount);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
ClearLastResult();
const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this);
- SysAssertf((pOptionMenuImpl != null), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use.");
int count = pOptionMenuImpl->GetMaxVisibleItemsCount();
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r));
return count;
}
using namespace std;
using namespace Tizen::Graphics;
+using namespace Tizen::Base;
namespace Tizen { namespace Ui { namespace Controls
{
FloatRectangle floatRect = _CoordinateSystemUtils::ConvertToFloat(rect);
pImpl = _PanelImpl::CreatePanelImplN(this, floatRect, groupStyle);
result r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] A specified input parameter is invalid.", GetErrorMessage(r));
- SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
_pControlImpl = pImpl;
- return r;
+ return E_SUCCESS;
CATCH:
delete pImpl;
- SetLastResult(r);
return r;
}
pImpl = _PanelImpl::CreatePanelImplN(this, rect, groupStyle);
result r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] A specified input parameter is invalid.", GetErrorMessage(r));
- SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
_pControlImpl = pImpl;
- return r;
+ return E_SUCCESS;
CATCH:
delete pImpl;
- SetLastResult(r);
return r;
}
result
-Panel::Construct(const Tizen::Base::String& resourceId)
+Panel::Construct(const String& resourceId)
{
ClearLastResult();
// Parse UiBuilder XML file
- unique_ptr<_UiBuilder> pBuilder(new _UiBuilder());
- SysTryReturn(NID_UI_CTRL, pBuilder, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ unique_ptr<_UiBuilder> pBuilder(new (std::nothrow) _UiBuilder());
+ SysTryReturnResult(NID_UI_CTRL, pBuilder, E_OUT_OF_MEMORY, "Memory allocation failed.");
result r = pBuilder->Construct(resourceId, this);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = pBuilder->Parse();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
- return r;
+ return E_SUCCESS;
}
result
FloatRectangle floatRect = _CoordinateSystemUtils::ConvertToFloat(rect);
pImpl = _PanelImpl::CreatePanelImplN(this, floatRect, groupStyle, &(const_cast <Layout&>(portraitLayout)), &(const_cast <Layout&>(landscapeLayout)));
result r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] A specified input parameter is invalid.", GetErrorMessage(r));
- SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
_pControlImpl = pImpl;
- return r;
+ return E_SUCCESS;
CATCH:
delete pImpl;
- SetLastResult(r);
return r;
}
pImpl = _PanelImpl::CreatePanelImplN(this, rect, groupStyle, &(const_cast <Layout&>(portraitLayout)), &(const_cast <Layout&>(landscapeLayout)));
result r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] A specified input parameter is invalid.", GetErrorMessage(r));
- SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
_pControlImpl = pImpl;
- return r;
+ return E_SUCCESS;
CATCH:
delete pImpl;
- SetLastResult(r);
return r;
}
SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use.");
result r = pImpl->SetCompositeEnabled(composite);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred.");
- return r;
+ return E_SUCCESS;
}
bool
ClearLastResult();
// Parse UiBuilder XML file
- unique_ptr<_UiBuilder> pBuilder(new _UiBuilder());
+ unique_ptr<_UiBuilder> pBuilder(new (std::nothrow) _UiBuilder());
SysTryReturn(NID_UI_CTRL, pBuilder, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
result r = pBuilder->Construct(resourceId, this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pProgressImpl = _ProgressImpl::CreateProgressImplN(this, rect);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pProgressImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pProgressImpl != null, r, "Propagating.");
_pControlImpl = pProgressImpl;
pProgressImpl = _ProgressImpl::CreateProgressImplFN(this, rect);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pProgressImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pProgressImpl != null, r, "Propagating.");
_pControlImpl = pProgressImpl;
using namespace std;
using namespace Tizen::Graphics;
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
namespace Tizen { namespace Ui { namespace Controls
{
}
result
-ScrollPanel::Construct(const Tizen::Graphics::FloatRectangle& rect)
+ScrollPanel::Construct(const FloatRectangle& rect)
{
result r = Construct(rect, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true);
}
result
-ScrollPanel::Construct(const Tizen::Base::String& resourceId)
+ScrollPanel::Construct(const String& resourceId)
{
ClearLastResult();
// Parse UiBuilder XML file
- unique_ptr<_UiBuilder> pBuilder(new _UiBuilder());
- SysTryReturn(NID_UI_CTRL, pBuilder, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ unique_ptr<_UiBuilder> pBuilder(new (std::nothrow) _UiBuilder());
+ SysTryReturnResult(NID_UI_CTRL, pBuilder != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
+
result r = pBuilder->Construct(resourceId, this);
- SysTryReturn(NID_UI_CTRL, r != E_OUT_OF_MEMORY, r, r, "[%s] The memory is insufficient.", GetErrorMessage(r));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+
r = pBuilder->Parse();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
- return r;
+ return E_SUCCESS;
}
result
FloatRectangle floatRect = _CoordinateSystemUtils::ConvertToFloat(rect);
pImpl = _ScrollPanelImpl::CreateScrollPanelImplN(this, floatRect, scrollDirection, autoResizingEnable);
result r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] The given width or height is less than 0.", GetErrorMessage(r));
- SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[E_INVALID_ARG] Invalid argument is used. The given width or height is less than 0.");
+ SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Memory allocation failed.", GetErrorMessage(r));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
_pControlImpl = pImpl;
- return r;
+ return E_SUCCESS;
CATCH:
delete pImpl;
- SetLastResult(r);
return r;
}
result
-ScrollPanel::Construct(const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable)
+ScrollPanel::Construct(const FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable)
{
_ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this);
SysAssertf(pImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class.");
pImpl = _ScrollPanelImpl::CreateScrollPanelImplN(this, rect, scrollDirection, autoResizingEnable);
result r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] The given width or height is less than 0.", GetErrorMessage(r));
- SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
_pControlImpl = pImpl;
- return r;
+ return E_SUCCESS;
CATCH:
delete pImpl;
- SetLastResult(r);
return r;
}
}
result
-ScrollPanel::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect)
+ScrollPanel::Construct(const Layout& layout, const FloatRectangle& rect)
{
result r = Construct(layout, layout, rect, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true);
}
result
-ScrollPanel::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable)
+ScrollPanel::Construct(const Layout& layout, const FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable)
{
result r = Construct(layout, layout, rect, scrollDirection, autoResizingEnable);
}
result
-ScrollPanel::Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect)
+ScrollPanel::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, const FloatRectangle& rect)
{
result r = Construct(portraitLayout, landscapeLayout, rect, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true);
FloatRectangle floatRect = _CoordinateSystemUtils::ConvertToFloat(rect);
pImpl = _ScrollPanelImpl::CreateScrollPanelImplN(this, floatRect, scrollDirection, autoResizingEnable, &(const_cast <Layout&>(portraitLayout)), &(const_cast <Layout&>(landscapeLayout)));
result r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] portraitLayout or landscapeLayout is already bound to another container, or the given width or height is less than 0.", GetErrorMessage(r));
- SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
_pControlImpl = pImpl;
- return r;
+ return E_SUCCESS;
CATCH:
delete pImpl;
- SetLastResult(r);
return r;
}
result
-ScrollPanel::Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable)
+ScrollPanel::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, const FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable)
{
_ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this);
SysAssertf(pImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class.");
pImpl = _ScrollPanelImpl::CreateScrollPanelImplN(this, rect, scrollDirection, autoResizingEnable, &(const_cast <Layout&>(portraitLayout)), &(const_cast <Layout&>(landscapeLayout)));
result r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] portraitLayout or landscapeLayout is already bound to another container, or the given width or height is less than 0.", GetErrorMessage(r));
- SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] The memory is insufficient.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , r, "[%s] Propagating", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
_pControlImpl = pImpl;
- return r;
+ return E_SUCCESS;
CATCH:
delete pImpl;
- SetLastResult(r);
return r;
}
result r = pImpl->CloseOverlayWindow();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
- return r;
+ return E_SUCCESS;
}
Rectangle
float floatWidth = _CoordinateSystemUtils::ConvertToFloat(width);
result r = pImpl->SetClientAreaWidth(floatWidth);
- SysTryReturn(NID_UI_CTRL, r != E_INVALID_ARG, r, r, "[%s] width is less than the width of ScrollPanel.", GetErrorMessage(r));
- SysTryReturn(NID_UI_CTRL, r != E_INVALID_OPERATION, r, r, "[%s] The width of the client area cannot be set when auto resizing of the client area is on, or the scroll direction is vertical.", GetErrorMessage(r));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
+ SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_ARG, r, "Propagating.");
+ SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_OPERATION, r, "Propagating.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred.");
- return r;
+ return E_SUCCESS;
}
result
SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use.");
result r = pImpl->SetClientAreaWidth(width);
- SysTryReturn(NID_UI_CTRL, r != E_INVALID_ARG, r, r, "[%s] width is less than the width of ScrollPanel.", GetErrorMessage(r));
- SysTryReturn(NID_UI_CTRL, r != E_INVALID_OPERATION, r, r, "[%s] The width of the client area cannot be set when auto resizing of the client area is on, or the scroll direction is vertical.", GetErrorMessage(r));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
+ SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_ARG, r, "Propagating.");
+ SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_OPERATION, r, "Propagating.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred.");
- return r;
+ return E_SUCCESS;
}
result
float floatHeight = _CoordinateSystemUtils::ConvertToFloat(height);
result r = pImpl->SetClientAreaHeight(floatHeight);
- SysTryReturn(NID_UI_CTRL, r != E_INVALID_ARG, r, r, "[%s] height is less than the height of ScrollPanel.", GetErrorMessage(r));
- SysTryReturn(NID_UI_CTRL, r != E_INVALID_OPERATION, r, r, "[%s] The height of the client area cannot be set when auto resizing of the client area is on, or the scroll direction is horizontal.", GetErrorMessage(r));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
+ SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_ARG, r, "Propagating.");
+ SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_OPERATION, r, "Propagating.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred.");
- return r;
+ return E_SUCCESS;
}
result
SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use.");
result r = pImpl->SetClientAreaHeight(height);
- SysTryReturn(NID_UI_CTRL, r != E_INVALID_ARG, r, r, "[%s] height is less than the height of ScrollPanel.", GetErrorMessage(r));
- SysTryReturn(NID_UI_CTRL, r != E_INVALID_OPERATION, r, r, "[%s] The height of the client area cannot be set when auto resizing of the client area is on, or the scroll direction is horizontal.", GetErrorMessage(r));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
+ SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_ARG, r, "Propagating.");
+ SysTryReturnResult(NID_UI_CTRL, r != E_INVALID_OPERATION, r, "Propagating.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred.");
- return r;
+ return E_SUCCESS;
}
ScrollPanelScrollDirection
pSliderImpl = _SliderImpl::CreateSliderImplN(this, rect, sliderStyle);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pSliderImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pSliderImpl != null, r, "Propagating.");
r = pSliderImpl->Initialize(minValue, maxValue, backgroundStyle, sliderStyle, groupStyle);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pSliderImpl = _SliderImpl::CreateSliderImplFN(this, rect, sliderStyle);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pSliderImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pSliderImpl != null, r, "Propagating.");
r = pSliderImpl->Initialize(minValue, maxValue, backgroundStyle, sliderStyle, groupStyle);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pSliderImpl = _SliderImpl::CreateSliderImplN(this, rect, sliderStyle);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pSliderImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pSliderImpl != null, r, "Propagating.");
r = pSliderImpl->Initialize(minValue, maxValue, BACKGROUND_STYLE_DEFAULT, sliderStyle, GROUP_STYLE_NONE);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pSliderImpl = _SliderImpl::CreateSliderImplFN(this, rect, sliderStyle);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pSliderImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pSliderImpl != null, r, "Propagating.");
r = pSliderImpl->Initialize(minValue, maxValue, BACKGROUND_STYLE_DEFAULT, sliderStyle, GROUP_STYLE_NONE);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pSliderImpl->SetRange(minValue, maxValue);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pSliderImpl->SetTitleText(title);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pSliderImpl->SetBarColor(color);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pSliderImpl->SetColor(color);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = pSliderImpl->SetThumbBitmap(status, bitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
using namespace Tizen::Graphics;
using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui;
namespace Tizen { namespace Ui { namespace Controls
{
float floatWidth = _CoordinateSystemUtils::ConvertToFloat(width);
pImpl = _TabBarImpl::CreateTabBarImplN(this, FloatRectangle(floatX, floatY, floatWidth, 0.0f));
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pImpl, r, "Propagating.");
_pControlImpl = pImpl;
pImpl = _TabBarImpl::CreateTabBarImplN(this, FloatRectangle(x, y, width, 0.0f));
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pImpl, r, "Propagating.");
_pControlImpl = pImpl;
{
_TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
- SysTryReturn(NID_UI_CTRL, item.__pTabBarItemImpl != null, E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Input TabBarItem is not constructed.\n");
+ SysTryReturnResult(NID_UI_CTRL, item.__pTabBarItemImpl != null, E_INVALID_ARG,
+ "Invalid argument is used. Input TabBarItem is not constructed.\n");
return pImpl->AddItem(item.GetText(), item.GetActionId());
}
{
_TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
- SysTryReturn(NID_UI_CTRL, item.__pTabBarItemImpl != null, E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Input TabBarItem is not constructed.\n");
+ SysTryReturnResult(NID_UI_CTRL, item.__pTabBarItemImpl != null, E_INVALID_ARG,
+ "Invalid argument is used. Input TabBarItem is not constructed.\n");
return pImpl->InsertItemAt(index, item.GetText(), item.GetActionId());
}
-Tizen::Graphics::Color
+Color
TabBar::GetColor(void) const
{
const _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this);
return pImpl->GetItemCount();
}
-Tizen::Graphics::Color
+Color
TabBar::GetSelectedItemColor(void) const
{
const _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this);
return pImpl->GetSelectedItemColor();
}
-Tizen::Graphics::Color
+Color
TabBar::GetItemTextColor(TabBarItemStatus status) const
{
const _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this);
}
result
-TabBar::SetColor(const Tizen::Graphics::Color& color)
+TabBar::SetColor(const Color& color)
{
_TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
{
_TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
- SysTryReturn(NID_UI_CTRL, item.__pTabBarItemImpl != null, E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Input TabBarItem is not constructed.\n");
+ SysTryReturnResult(NID_UI_CTRL, item.__pTabBarItemImpl != null, E_INVALID_ARG,
+ "Invalid argument is used. Input TabBarItem is not constructed.\n");
return pImpl->SetItemAt(index, item.GetText(), item.GetActionId());
}
}
result
-TabBar::SetItemTextColor(TabBarItemStatus status, const Tizen::Graphics::Color& color)
+TabBar::SetItemTextColor(TabBarItemStatus status, const Color& color)
{
_TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
}
result
-TabBar::SetSelectedItemColor(const Tizen::Graphics::Color& color)
+TabBar::SetSelectedItemColor(const Color& color)
{
_TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
}
void
-TabBar::AddActionEventListener(Tizen::Ui::IActionEventListener& listener)
+TabBar::AddActionEventListener(IActionEventListener& listener)
{
_TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
void
-TabBar::RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener)
+TabBar::RemoveActionEventListener(IActionEventListener& listener)
{
_TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
#include "FUiCtrl_TabBarItemImpl.h"
using namespace Tizen::Ui::Controls;
+using namespace Tizen::Base;
namespace Tizen { namespace Ui { namespace Controls
{
{
}
-
TabBarItem::~TabBarItem(void)
{
delete __pTabBarItemImpl;
__pTabBarItemImpl = null;
}
-
result
-TabBarItem::Construct(const Tizen::Base::String& text, int actionId)
+TabBarItem::Construct(const String& text, int actionId)
{
- if (__pTabBarItemImpl != null)
- {
- SysLog(NID_UI_CTRL, "[E_INVALID_STATE] This instance is already allocated.");
- return E_INVALID_STATE;
- }
-
- if (actionId < 0)
- {
- SysLog(NID_UI_CTRL, "[E_INVALID_ARG] The action ID of the item must be a positive integer.");
- return E_INVALID_ARG;
- }
+ SysAssertf(__pTabBarItemImpl == null,
+ "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
+
+ SysTryReturnResult(NID_UI_CTRL, actionId >= 0, E_INVALID_ARG, "The action ID of the item must be a positive integer.");
__pTabBarItemImpl = new (std::nothrow) _TabBarItemImpl();
- if (__pTabBarItemImpl == null)
- {
- SysLog(NID_UI_CTRL, "[E_OUT_OF_MEMORY] SeedItem of TabBarItem can not be allocated due to the memory shortage.");
- delete __pTabBarItemImpl;
- __pTabBarItemImpl = null;
- return E_OUT_OF_MEMORY;
- }
+ SysTryReturnResult(NID_UI_CTRL, __pTabBarItemImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
__pTabBarItemImpl->SetText(text);
__pTabBarItemImpl->SetActionId(actionId);
result
TabBarItem::SetActionId(int actionId)
{
- if (__pTabBarItemImpl == null)
- {
- SysLog(NID_UI_CTRL, "[E_INVALID_STATE] This instance isn't constructed.");
- return E_INVALID_STATE;
- }
-
- if (actionId < 0)
- {
- SysLog(NID_UI_CTRL, "[E_INVALID_ARG] The action ID of the item must be a positive integer.");
- return E_INVALID_ARG;
- }
+ SysTryReturnResult(NID_UI_CTRL, __pTabBarItemImpl != null, E_INVALID_STATE, "__pTabBarItemImpl must not be null");
+
+ SysTryReturnResult(NID_UI_CTRL, actionId >= 0, E_INVALID_ARG, "The action ID of the item must be a positive integer.");
__pTabBarItemImpl->SetActionId(actionId);
return E_SUCCESS;
int
TabBarItem::GetActionId(void) const
{
- ClearLastResult();
-
- if (__pTabBarItemImpl == null)
- {
- SysLog(NID_UI_CTRL, "[E_INVALID_STATE] This instance isn't constructed.");
- SetLastResult(E_INVALID_STATE);
- return -1;
- }
+ SysTryReturn(NID_UI_CTRL, __pTabBarItemImpl != null, -1, E_INVALID_STATE, "[%s] __pTabBarItemImpl must not be null", GetErrorMessage(E_INVALID_STATE));
SetLastResult(E_SUCCESS);
return __pTabBarItemImpl->GetActionId();
}
-Tizen::Base::String
+String
TabBarItem::GetText(void) const
{
ClearLastResult();
- if (__pTabBarItemImpl == null)
- {
- SysLog(NID_UI_CTRL, "[E_INVALID_STATE] This instance isn't constructed.");
- SetLastResult(E_INVALID_STATE);
- return Tizen::Base::String();
- }
+ SysTryReturn(NID_UI_CTRL, __pTabBarItemImpl != null, String(), E_INVALID_STATE, "[%s] __pTabBarItemImpl must not be null", GetErrorMessage(E_INVALID_STATE));
SetLastResult(E_SUCCESS);
return __pTabBarItemImpl->GetText();
}
result
-TabBarItem::SetText(const Tizen::Base::String& text)
+TabBarItem::SetText(const String& text)
{
- if (__pTabBarItemImpl == null)
- {
- SysLog(NID_UI_CTRL, "[E_INVALID_STATE] This instance isn't constructed.");
- return E_INVALID_STATE;
- }
+ SysTryReturnResult(NID_UI_CTRL, __pTabBarItemImpl != null, E_INVALID_STATE, "__pTabBarItemImpl must not be null");
__pTabBarItemImpl->SetText(text);
int
TableView::GetTopDrawnItemIndex(void) const
{
+ result r = E_SUCCESS;
const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
int itemIndex = -1;
int groupIndex = -1;
- pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex);
+ r = pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex);
+ SetLastResult(r);
return itemIndex;
}
int
TableView::GetBottomDrawnItemIndex(void) const
{
+ result r = E_SUCCESS;
const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
int itemIndex = -1;
int groupIndex = -1;
- pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex);
+ r = pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex);
+ SetLastResult(r);
return itemIndex;
}
IMPLEMENT_PROPERTY(_Animation);
+bool _Animation::__isInternalAnimation = false;
+
_Animation::_Animation(void)
: __pAnimationPresenter(null)
, __pControlAnimation(null)
, __pAnimationEvent(null)
, __pAnimationFrames(null)
, __pAccessibilityElement(null)
+ , __isAttachedToMainTree(false)
{
_VisualElement* pBase = GetVisualElement();
}
_Animation*
-_Animation::CreateAnimationN(void)
+_Animation::CreateAnimationN(bool isFramework)
{
result r = E_SUCCESS;
pAnimation->AcquireHandle();
pAnimation->SetFocusable(false);
+ _Animation::__isInternalAnimation = isFramework;
+
SetLastResult(E_SUCCESS);
return pAnimation;
return;
}
+bool
+_Animation::IsAttachedToMainTree(void)
+{
+ return __isAttachedToMainTree;
+}
+
result
_Animation::OnAttachedToMainTree(void)
{
}
}
+ __isAttachedToMainTree = true;
return E_SUCCESS;
}
return __pAnimationPresenter->GetStatus();
}
+bool
+_Animation::IsInternalAnimation()
+{
+ return _Animation::__isInternalAnimation;
+}
+
void
_Animation::OnDraw(void)
{
, __isTimerRunning(false)
, __pVisualElement(null)
, __lazyDecode(false)
+ , __isPlayCalledBeforeAttach(false)
{
}
{
result r = E_SUCCESS;
+ if(!__pAnimation->IsAttachedToMainTree())
+ {
+ __isPlayCalledBeforeAttach = true;
+ }
+
+ SysTryReturnResult(NID_UI_CTRL, __pAnimation->IsAttachedToMainTree(), E_SYSTEM, "A system error has occurred. The control is not attached to main tree.");
+
if (__isTimerRunning)
{
return E_SUCCESS;
{
result r = E_SUCCESS;
+ if (__isPlayCalledBeforeAttach)
+ {
+ Play();
+ __isPlayCalledBeforeAttach = false;
+ }
+
FloatRectangle bounds = __pAnimation->GetBoundsF();
Color bgColor = __pAnimation->GetBackgroundColor();
Canvas* pCanvas = null;
}
else
{
- r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pBitmap);
+ if (__pAnimation->IsInternalAnimation())
+ {
+ FloatDimension bitmapDimension;
+ bitmapDimension.width = pBitmap->GetHeightF();
+ bitmapDimension.height = pBitmap->GetHeightF();
+
+ r = pCanvas->DrawBitmap(FloatPoint((bounds.width - bitmapDimension.width)/2.0f, (bounds.height - bitmapDimension.height)/2.0f), *pBitmap);
+ }
+ else
+ {
+ r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pBitmap);
+ }
}
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw the bitmap", GetErrorMessage(r));
bool
_Button::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (!IsVisible())
+ {
+ return false;
+ }
return __pButtonPresenter->OnKeyPressed(source, keyInfo);
}
bool
_Button::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (!IsVisible())
+ {
+ return false;
+ }
return __pButtonPresenter->OnKeyReleased(source, keyInfo);
}
FloatRectangle previousRect = pTextObject->GetBoundsF();
TextObjectActionType previousActionType = pTextObject->GetAction();
- dimension.width = GetBoundsF().width - __leftMargin * 2;
- dimension.height = GetBoundsF().height - __topMargin * 2;
+ dimension.width = GetBoundsF().width - (__leftMargin + __rightMargin);
+ dimension.height = GetBoundsF().height - (__topMargin + __bottomMargin);
_ControlOrientation orientation = GetOrientation();
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
if (horizontalMode == true)
{
- FloatRectangle bounds(0.0f, 0.0f, contentRect.width - GetBoundsF().x - __leftMargin, dimension.height);
+ FloatRectangle bounds(0.0f, 0.0f, contentRect.width - GetBoundsF().x - (__leftMargin + __rightMargin), dimension.height);
pTextObject->SetBounds(bounds);
pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE);
pTextObject->SetFont(pFont, 0, pTextObject->GetTextLength());
pTextObject->Compose();
- textSize = pTextObject->GetTextExtentF();
+ int displayLineCount = pTextObject->GetDisplayLineCount();
+ int offSet = pTextObject->GetFirstTextIndexAt(displayLineCount - 1);
+
+ if (displayLineCount == 1)
+ {
+ textSize = pTextObject->GetTextExtentF(offSet, pTextObject->GetTextLength() - offSet);
+ }
+ else
+ {
+ textSize = pTextObject->GetTextExtentF();
+ }
dimension.width = (textSize.width < bounds.width) ? textSize.width : bounds.width;
}
pTextObject->SetBounds(previousRect);
pTextObject->SetAction(previousActionType);
- dimension.width += __leftMargin * 4;
- dimension.height += __topMargin * 4;
+ dimension.width += (__leftMargin + __rightMargin);
+ dimension.height += (__topMargin + __bottomMargin);
for (int i = 0; i < NUMBER_OF_BUTTON_STATUS; i++)
{
{
return __isSettingMultilineFontSize;
}
+
+bool
+_Button::IsButtonStatusSelected(void) const
+{
+
+ return (_BUTTON_STATUS_SELECTED == __buttonStatus) ? true : false;
+}
}}} // Tizen::Ui::Controls
result
_ButtonItemImpl::Construct(ButtonItemStyle style, int actionId)
{
- SysTryReturnResult(NID_UI_CTRL, (actionId >= BUTTON_ITEM_ACTION_ID_MIN && actionId <= BUTTON_ITEM_ACTION_ID_MAX),
+ SysTryReturnResult(NID_UI_CTRL, actionId >= BUTTON_ITEM_ACTION_ID_MIN,
E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
__actionId = actionId;
result
_ButtonItemImpl::SetActionId(int actionId)
{
- SysTryReturnResult(NID_UI_CTRL, (actionId > BUTTON_ITEM_ACTION_ID_MIN && actionId < BUTTON_ITEM_ACTION_ID_MAX),
+ SysTryReturnResult(NID_UI_CTRL, actionId > BUTTON_ITEM_ACTION_ID_MIN,
E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
__actionId = actionId;
, __touchMoveHandled(false)
, __lazyDecode(false)
, __showUnderlineBitmap(false)
+ , __isKeyPressed(false)
, __pFont(null)
, __pTextObject(null)
, __pBase(null)
pSimpleText = new (std::nothrow) TextSimple(const_cast<wchar_t*>(__pButton->GetText().GetPointer()), __pButton->GetText().GetLength());
SysTryReturn(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ pSimpleText->SetTextShadowEnabled(true);
+ pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, 2.0f));
+
__pTextObject->AppendElement(*pSimpleText);
__pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD);
__pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
__pTextObject->Compose();
}
+ _Text::TextElement* pTextElement = __pTextObject->GetElementAtElementIndex(0);
+ TextSimple* pSimpleText = dynamic_cast <TextSimple*>(pTextElement);
+ if (pSimpleText)
+ {
+ if (__pButton->GetButtonStatus() == _BUTTON_STATUS_PRESSED)
+ {
+ pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -2.0f));
+ }
+ else
+ {
+ pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, 2.0f));
+ }
+ }
+
__pTextObject->SetForegroundColor(__pButton->GetTextColor(__pButton->GetButtonStatus()), 0, __pTextObject->GetTextLength());
if (__pTextObject->IsActionOn() == true)
{
__pButton->SetButtonStatus(_BUTTON_STATUS_PRESSED);
}
+ if (!__isKeyPressed)
+ {
+ __isKeyPressed = true;
+ __pButton->Draw();
+ __pButton->Show();
+ }
}
- __pButton->Draw();
- __pButton->Show();
return false;
}
_ButtonPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
_KeyCode keyCode = keyInfo.GetKeyCode();
-
+ __isKeyPressed = false;
if (__pButton->IsFocused() && __pButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER)
{
if (__pButton->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
void
_ButtonPresenter::OnAncestorEnableStateChanged(const _Control& control)
{
- if (__pButton->GetButtonStatus() == _BUTTON_STATUS_SELECTED)
+ if (__pButton->IsButtonStatusSelected())
{
return;
}
if (__pButton->GetEnableState())
{
- __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (__pButton->GetButtonStatus() != _BUTTON_STATUS_HIGHLIGHTED)
+ {
+ __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
+ else
+ {
+ __pButton->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ }
}
else
{
__pButton->SetButtonStatus(_BUTTON_STATUS_DISABLED);
}
+ __pButton->Invalidate(true);
return;
}
for (int i = 0; i < NUMBER_OF_CHECK_BUTTON_STATUS; i++)
{
- __pMarkBgNormalBitmap[i] = null;
+ __pMarkBgBitmap[i] = null;
__pMarkBitmap[i] = null;
- __pOnOffBgNormalBitmap[i] = null;
+ __pOnOffBgBitmap[i] = null;
__pOnOffBitmap[i] = null;
__pOnOffSlidingBgBitmap[i] = null;
__pOnOffSlidingOnHandlerBitmap[i] = null;
pCheckButton->AcquireHandle();
- pCheckButton->LoadDefaultBackgroundBitmap();
-
pCheckButton->SetTouchPressThreshold(SENSITIVE);
return pCheckButton;
for (int i = 0; i < NUMBER_OF_CHECK_BUTTON_STATUS; i++)
{
- if (__pMarkBgNormalBitmap[i])
+ if (__pMarkBgBitmap[i])
{
- delete __pMarkBgNormalBitmap[i];
- __pMarkBgNormalBitmap[i] = null;
+ delete __pMarkBgBitmap[i];
+ __pMarkBgBitmap[i] = null;
}
if (__pMarkBitmap[i])
__pMarkBitmap[i] = null;
}
- if (__pOnOffBgNormalBitmap[i])
+ if (__pOnOffBgBitmap[i])
{
- delete __pOnOffBgNormalBitmap[i];
- __pOnOffBgNormalBitmap[i] = null;
+ delete __pOnOffBgBitmap[i];
+ __pOnOffBgBitmap[i] = null;
}
if (__pOnOffBitmap[i])
bool
_CheckButton::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (!IsVisible())
+ {
+ return false;
+ }
return __pCheckButtonPresenter->OnKeyPressed(source, keyInfo);
}
bool
_CheckButton::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (!IsVisible())
+ {
+ return false;
+ }
return __pCheckButtonPresenter->OnKeyReleased(source, keyInfo);
}
}
result
-_CheckButton::LoadDefaultBackgroundBitmap(void)
+_CheckButton::LoadDefaultBitmap(void)
{
result r = E_SUCCESS;
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundNormalEffectBitmap);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundPressedEffectBitmap);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopNormalEffectBitmap);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopPressedEffectBitmap);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleNormalEffectBitmap);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddlePressedEffectBitmap);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomNormalEffectBitmap);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomPressedEffectBitmap);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgNormalBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgNormalBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgNormalBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgNormalBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgNormalBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgNormalBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgNormalBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgNormalBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgNormalBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgNormalBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleNormalEffectBitmap);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCirclePressedEffectBitmap);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightNormalEffectBitmap);
- r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightPressedEffectBitmap);
+ if (__groupStyle == GROUP_STYLE_NONE || __groupStyle == GROUP_STYLE_SINGLE)
+ {
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
+
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundNormalEffectBitmap);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_SINGLE_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundPressedEffectBitmap);
+ }
+ else if (__groupStyle == GROUP_STYLE_TOP)
+ {
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
+
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopNormalEffectBitmap);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_TOP_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopPressedEffectBitmap);
+ }
+ else if (__groupStyle == GROUP_STYLE_MIDDLE)
+ {
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
+
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleNormalEffectBitmap);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_MIDDLE_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddlePressedEffectBitmap);
+ }
+ else if (__groupStyle == GROUP_STYLE_BOTTOM)
+ {
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
+
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomNormalEffectBitmap);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::GROUPED_BOTTOM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomPressedEffectBitmap);
+ }
+
+ if (__checkButtonStyle == CHECK_BUTTON_STYLE_MARK || __checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER
+ || __checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
+ {
+ Color markIconBgHighlighted;
+ GET_COLOR_CONFIG(CHECKBUTTON::BG_HIGHLIGHTED, markIconBgHighlighted);
+
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, markIconBgHighlighted, __pMarkBgBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBgBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
+ }
+
+ if (__checkButtonStyle == CHECK_BUTTON_STYLE_MARK || __checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || __checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON
+ || __checkButtonStyle == CHECK_BUTTON_STYLE_RADIO || __checkButtonStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER || __checkButtonStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
+ {
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::MARK_ICON_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMarkBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
+ }
+
+ if (__checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF || __checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER)
+ {
+ Color onOffIconBgHighlighted;
+ GET_COLOR_CONFIG(CHECKBUTTON::BG_HIGHLIGHTED, onOffIconBgHighlighted);
+
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, onOffIconBgHighlighted, __pOnOffBgBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBgBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
+
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_ICON_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
+ }
+
+ if (__checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || __checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
+ {
+ Color onOffSlidingHandlerHighlighted;
+ GET_COLOR_CONFIG(CHECKBUTTON::BG_HIGHLIGHTED, onOffSlidingHandlerHighlighted);
+
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingBgBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
+
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, onOffSlidingHandlerHighlighted, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOnHandlerBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
+
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, onOffSlidingHandlerHighlighted, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pOnOffSlidingOffHandlerBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
+ }
+
+ if (__checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || __checkButtonStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
+ {
+ Color detailedNormalBgColor;
+ Color detailedDisabledBgColor;
+ Color detailedPressedBgColor;
+ Color detailedHighlightedBgColor;
+ Color detailedSelectedBgColor;
+
+ Color detailedRightNormalColor;
+ Color detailedRightDisabledColor;
+ Color detailedRightPressedColor;
+ Color detailedRightHighlightedColor;
+ Color detailedRightSelectedColor;
+
+ GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_BG_NORMAL, detailedNormalBgColor);
+ GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_BG_DISABLED, detailedDisabledBgColor);
+ GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_BG_PRESSED, detailedPressedBgColor);
+ GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_BG_HIGHLIGHTED, detailedHighlightedBgColor);
+ GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_BG_SELECTED, detailedSelectedBgColor);
+
+ GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_NORMAL, detailedRightNormalColor);
+ GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_DISABLED, detailedRightDisabledColor);
+ GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_PRESSED, detailedRightPressedColor);
+ GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_HIGHLIGHTED, detailedRightHighlightedColor);
+ GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_SELECTED, detailedRightSelectedColor);
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, detailedNormalBgColor, __pCircleBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedDisabledBgColor, __pCircleBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedPressedBgColor, __pCircleBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedHighlightedBgColor, __pCircleBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedSelectedBgColor, __pCircleBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
+
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pCircleNormalEffectBitmap);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCirclePressedEffectBitmap);
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, detailedRightNormalColor, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedRightDisabledColor, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedRightPressedColor, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedRightHighlightedColor, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
+ r = GET_REPLACED_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, detailedRightSelectedColor, __pDetailedRightBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
+
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightNormalEffectBitmap);
+ r = GET_BITMAP_CONFIG_N(CHECKBUTTON::DETAILED_ICON_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDetailedRightPressedEffectBitmap);
+ }
return r;
}
Color
_CheckButton::GetHighlightedTextColor(void) const
{
-
Variant color = GetProperty(L"highlightedTextColor");
return color.ToColor();
Color
_CheckButton::GetSelectedTextColor(void) const
{
-
Variant color = GetProperty(L"selectedTextColor");
return color.ToColor();
Bitmap*
_CheckButton::GetMarkBgBitmap(_CheckButtonStatus checkButtonStatus) const
{
- return __pMarkBgNormalBitmap[checkButtonStatus];
+ return __pMarkBgBitmap[checkButtonStatus];
}
Bitmap*
Bitmap*
_CheckButton::GetOnOffBgBitmap(_CheckButtonStatus checkButtonStatus) const
{
- return __pOnOffBgNormalBitmap[checkButtonStatus];
+ return __pOnOffBgBitmap[checkButtonStatus];
}
Bitmap*
r = GetCore().SetGroupStyle(groupStyle);
SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r));
+ r = GetCore().LoadDefaultBitmap();
+ SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r));
+
return r;
}
if (r != E_SUCCESS)
{
- // SysLogExceptionxception( "[E_SYSTEM] UiBuilder::__MakeCheck: Failed to create Group(%s)",buffer);
delete pCheck;
delete pGroup;
return null;
if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_ONOFF
|| checkStyle == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER)
{
- if (bounds.width < minDimension.width )
+ if (bounds.width < minDimension.width)
{
bounds.width = minDimension.width;
}
- if (bounds.height < minDimension.height )
+ if (bounds.height < minDimension.height)
{
bounds.height = minDimension.height;
}
}
else
{
- if (bounds.width < minDimensionWithAnnex.width )
+ if (bounds.width < minDimensionWithAnnex.width)
{
bounds.width = minDimensionWithAnnex.width;
}
- if (bounds.height < minDimensionWithAnnex.height )
+ if (bounds.height < minDimensionWithAnnex.height)
{
bounds.height = minDimensionWithAnnex.height;
}
GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_HIGHLIGHTED, detailedRightHighlightedColor);
GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_TEXT_SELECTED, detailedRightSelectedColor);
- Bitmap* pReColorCircleBitmap = null;
- Bitmap* pReColorRightBitmap = null;
-
_CheckButtonStatus checkStatus = __pCheckButton->GetCheckButtonStatus();
CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
CalculateButtonBounds();
+ Canvas* pCircleCanvas = __pCheckButton->GetCanvasN(__detailedButtonBounds);
+ SysTryReturnVoidResult(NID_UI_CTRL, pCircleCanvas, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
{
if (checkStatus == _CHECK_BUTTON_STATUS_NORMAL)
if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
{
- Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL);
- Bitmap* pDetailedRightNormalBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL);
+ Bitmap* pCircleBitmap = null;
+ Bitmap* pDetailedRightBitmap = null;
Bitmap* pCircleEffectBitmap = null;
Bitmap* pDetailedRightEffectBitmap = null;
if (__detailedPressed == true)
{
- if (pCircleNormalBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
- }
-
- if (pDetailedRightNormalBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED);
pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap();
}
else
{
- if (pCircleNormalBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
- }
-
- if (pDetailedRightNormalBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus);
pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap();
}
- if (pReColorCircleBitmap)
+ if (pCircleBitmap)
{
- pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap);
+ pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap);
}
bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_NORMAL);
}
}
- if (pReColorRightBitmap)
+ if (pDetailedRightBitmap)
{
- float arrowWidth = pReColorRightBitmap->GetWidthF();
- float arrowHeight = pReColorRightBitmap->GetHeightF();
+ float arrowWidth = pDetailedRightBitmap->GetWidthF();
+ float arrowHeight = pDetailedRightBitmap->GetHeightF();
pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f
- , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap);
+ , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap);
}
themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_NORMAL);
if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
{
- Bitmap* pCircleDisabledBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_DISABLED);
- Bitmap* pDetailedRightDisabledBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_DISABLED);
+ Bitmap* pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus);
+ Bitmap* pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus);
Bitmap* pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap();
Bitmap* pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap();
- if (pCircleDisabledBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedDisabledBgColor);
- }
-
- if (pDetailedRightDisabledBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightDisabledColor);
- }
-
- if (pReColorCircleBitmap)
+ if (pCircleBitmap)
{
- pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap);
+ pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap);
}
bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_DISABLED);
}
}
- if (pReColorRightBitmap)
+ if (pDetailedRightBitmap)
{
- float arrowWidth = pReColorRightBitmap->GetWidthF();
- float arrowHeight = pReColorRightBitmap->GetHeightF();
+ float arrowWidth = pDetailedRightBitmap->GetWidthF();
+ float arrowHeight = pDetailedRightBitmap->GetHeightF();
pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f
- , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap);
+ , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap);
}
themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_DISABLED);
if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
{
- Bitmap* pCirclePressedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED);
- Bitmap* pDetailedRightPressedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED);
+ Bitmap* pCircleBitmap = null;
+ Bitmap* pDetailedRightBitmap = null;
Bitmap* pCircleEffectBitmap = null;
Bitmap* pDetailedRightEffectBitmap = null;
if (__detailedPressed == true)
{
- if (pCirclePressedBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
- }
-
- if (pDetailedRightPressedBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus);
pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap();
}
else
{
- if (pCirclePressedBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
- }
-
- if (pDetailedRightPressedBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL);
pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap();
}
- if (pReColorCircleBitmap)
+ if (pCircleBitmap)
{
- pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap);
+ pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap);
}
bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_PRESSED);
}
}
- if (pReColorRightBitmap)
+ if (pDetailedRightBitmap)
{
- float arrowWidth = pReColorRightBitmap->GetWidthF();
- float arrowHeight = pReColorRightBitmap->GetHeightF();
+ float arrowWidth = pDetailedRightBitmap->GetWidthF();
+ float arrowHeight = pDetailedRightBitmap->GetHeightF();
pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f
- , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap);
+ , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap);
}
themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_PRESSED);
pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pMarkBgNormalBitmap);
}
- Bitmap* pReColorMarkBgHighlightedBitmap = null;
-
- if (pMarkBgHighlightedBitmap)
- {
- pReColorMarkBgHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pMarkBgHighlightedBitmap,
- Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor);
- }
-
- if (pReColorMarkBgHighlightedBitmap && __highlightedIndex == 1)
+ if (pMarkBgHighlightedBitmap && __highlightedIndex == 1)
{
- pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pReColorMarkBgHighlightedBitmap);
+ pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pMarkBgHighlightedBitmap);
}
- delete pReColorMarkBgHighlightedBitmap;
-
if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
{
- Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL);
- Bitmap* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
- Bitmap* pDetailedRightHighlightedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
+ Bitmap* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(checkStatus);
+
+ Bitmap* pCircleBitmap = null;
+ Bitmap* pDetailedRightBitmap = null;
Bitmap* pCircleEffectBitmap = null;
Bitmap* pDetailedRightEffectBitmap = null;
if (__detailedPressed == true)
{
- if (pCircleNormalBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
- }
-
- if (pDetailedRightHighlightedBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED);
pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap();
}
else
{
- if (pCircleNormalBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
- }
-
- if (pDetailedRightHighlightedBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL);
pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap();
}
- if (pReColorCircleBitmap)
+ if (pCircleBitmap)
{
- pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap);
+ pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap);
}
bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_HIGHLIGHTED);
}
}
- if (pReColorRightBitmap)
+ if (pDetailedRightBitmap)
{
- float arrowWidth = pReColorRightBitmap->GetWidthF();
- float arrowHeight = pReColorRightBitmap->GetHeightF();
+ float arrowWidth = pDetailedRightBitmap->GetWidthF();
+ float arrowHeight = pDetailedRightBitmap->GetHeightF();
pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f
- , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap);
+ , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap);
}
themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED);
}
}
- Bitmap* pReColorCircleHighlightedBitmap = null;
-
- if (pCircleHighlightedBitmap)
- {
- pReColorCircleHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor);
- }
-
- if (pReColorCircleHighlightedBitmap && __highlightedIndex == 2)
+ if (pCircleHighlightedBitmap && __highlightedIndex == 2)
{
- pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleHighlightedBitmap);
+ pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleHighlightedBitmap);
}
-
- delete pReColorCircleHighlightedBitmap;
}
}
else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED)
if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
{
- Bitmap* pCircleSelectedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_SELECTED);
- Bitmap* pDetailedRightSelectedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_SELECTED);
+ Bitmap* pCircleBitmap = null;
+ Bitmap* pDetailedRightBitmap = null;
Bitmap* pCircleEffectBitmap = null;
Bitmap* pDetailedRightEffectBitmap = null;
if (__detailedPressed == true)
{
- if (pCircleSelectedBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
- }
-
- if (pDetailedRightSelectedBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED);
pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap();
}
else
{
- if (pCircleSelectedBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedSelectedBgColor);
- }
-
- if (pDetailedRightSelectedBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus);
pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap();
}
- if (pReColorCircleBitmap)
+ if (pCircleBitmap)
{
- pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap);
+ pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap);
}
bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_SELECTED);
}
}
- if (pReColorRightBitmap)
+ if (pDetailedRightBitmap)
{
- float arrowWidth = pReColorRightBitmap->GetWidthF();
- float arrowHeight = pReColorRightBitmap->GetHeightF();
+ float arrowWidth = pDetailedRightBitmap->GetWidthF();
+ float arrowHeight = pDetailedRightBitmap->GetHeightF();
pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f
- , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap);
+ , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap);
}
themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_SELECTED);
{
if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
{
- Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL);
- Bitmap* pDetailedRightNormalBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL);
+ Bitmap* pCircleBitmap = null;
+ Bitmap* pDetailedRightBitmap = null;
Bitmap* pCircleEffectBitmap = null;
Bitmap* pDetailedRightEffectBitmap = null;
if (__detailedPressed == true)
{
- if (pCircleNormalBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
- }
-
- if (pDetailedRightNormalBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED);
pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap();
}
else
{
- if (pCircleNormalBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
- }
-
- if (pDetailedRightNormalBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus);
pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap();
}
- if (pReColorCircleBitmap)
+ if (pCircleBitmap)
{
- pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap);
+ pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap);
}
bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_NORMAL);
}
}
- if (pReColorRightBitmap)
+ if (pDetailedRightBitmap)
{
- float arrowWidth = pReColorRightBitmap->GetWidthF();
- float arrowHeight = pReColorRightBitmap->GetHeightF();
+ float arrowWidth = pDetailedRightBitmap->GetWidthF();
+ float arrowHeight = pDetailedRightBitmap->GetHeightF();
pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f
- , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap);
+ , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap);
}
themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_NORMAL);
{
if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
{
- Bitmap* pCircleDisabledBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_DISABLED);
- Bitmap* pDetailedRightDisabledBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_DISABLED);
+ Bitmap* pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus);
+ Bitmap* pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus);
Bitmap* pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap();
Bitmap* pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap();
- if (pCircleDisabledBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedDisabledBgColor);
- }
-
- if (pDetailedRightDisabledBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightDisabledColor);
- }
-
- if (pReColorCircleBitmap)
+ if (pCircleBitmap)
{
- pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap);
+ pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap);
}
bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_DISABLED);
}
}
- if (pReColorRightBitmap)
+ if (pDetailedRightBitmap)
{
- float arrowWidth = pReColorRightBitmap->GetWidthF();
- float arrowHeight = pReColorRightBitmap->GetHeightF();
+ float arrowWidth = pDetailedRightBitmap->GetWidthF();
+ float arrowHeight = pDetailedRightBitmap->GetHeightF();
pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f
- , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap);
+ , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap);
}
themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_DISABLED);
{
if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
{
- Bitmap* pCirclePressedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED);
- Bitmap* pDetailedRightPressedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED);
+ Bitmap* pCircleBitmap = null;
+ Bitmap* pDetailedRightBitmap = null;
Bitmap* pCircleEffectBitmap = null;
Bitmap* pDetailedRightEffectBitmap = null;
if (__detailedPressed == true)
{
- if (pCirclePressedBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
- }
-
- if (pDetailedRightPressedBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus);
pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap();
}
else
{
- if (pCirclePressedBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
- }
-
- if (pDetailedRightPressedBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL);
pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap();
}
- if (pReColorCircleBitmap)
+ if (pCircleBitmap)
{
- pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap);
+ pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap);
}
bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_PRESSED);
}
}
- if (pReColorRightBitmap)
+ if (pDetailedRightBitmap)
{
- float arrowWidth = pReColorRightBitmap->GetWidthF();
- float arrowHeight = pReColorRightBitmap->GetHeightF();
+ float arrowWidth = pDetailedRightBitmap->GetWidthF();
+ float arrowHeight = pDetailedRightBitmap->GetHeightF();
pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f
- , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap);
+ , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap);
}
themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_PRESSED);
{
if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
{
- Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL);
- Bitmap* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
- Bitmap* pDetailedRightHighlightedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
+ Bitmap* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(checkStatus);
+
+ Bitmap* pCircleBitmap = null;
+ Bitmap* pDetailedRightBitmap = null;
Bitmap* pCircleEffectBitmap = null;
Bitmap* pDetailedRightEffectBitmap = null;
if (__detailedPressed == true)
{
- if (pCircleNormalBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
- }
-
- if (pDetailedRightHighlightedBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED);
pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap();
}
else
{
- if (pCircleNormalBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
- }
-
- if (pDetailedRightHighlightedBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL);
pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap();
}
- if (pReColorCircleBitmap)
+ if (pCircleBitmap)
{
- pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap);
+ pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap);
}
bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_HIGHLIGHTED);
}
}
- if (pReColorRightBitmap)
+ if (pDetailedRightBitmap)
{
- float arrowWidth = pReColorRightBitmap->GetWidthF();
- float arrowHeight = pReColorRightBitmap->GetHeightF();
+ float arrowWidth = pDetailedRightBitmap->GetWidthF();
+ float arrowHeight = pDetailedRightBitmap->GetHeightF();
pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f
- , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap);
+ , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap);
}
themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED);
}
}
- Bitmap* pReColorCircleHighlightedBitmap = null;
-
- if (pCircleHighlightedBitmap)
- {
- pReColorCircleHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor);
- }
-
- if (pReColorCircleHighlightedBitmap && __highlightedIndex == 1)
+ if (pCircleHighlightedBitmap && __highlightedIndex == 1)
{
- pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleHighlightedBitmap);
+ pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleHighlightedBitmap);
}
-
- delete pReColorCircleHighlightedBitmap;
}
}
else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED)
{
if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
{
- Bitmap* pCircleSelectedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_SELECTED);
- Bitmap* pDetailedRightSelectedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_SELECTED);
+ Bitmap* pCircleBitmap = null;
+ Bitmap* pDetailedRightBitmap = null;
Bitmap* pCircleEffectBitmap = null;
Bitmap* pDetailedRightEffectBitmap = null;
if (__detailedPressed == true)
{
- if (pCircleSelectedBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
- }
-
- if (pDetailedRightSelectedBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED);
pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap();
}
else
{
- if (pCircleSelectedBitmap)
- {
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedSelectedBgColor);
- }
-
- if (pDetailedRightSelectedBitmap)
- {
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor);
- }
+ pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus);
+ pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus);
pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap();
pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap();
}
- if (pReColorCircleBitmap)
+ if (pCircleBitmap)
{
- pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleBitmap);
+ pCircleCanvas->DrawBitmap(FloatPoint((__detailedButtonBounds.width - pCircleBitmap->GetWidthF())/2.0f, (__detailedButtonBounds.height - pCircleBitmap->GetHeightF())/2.0f), *pCircleBitmap);
}
bool themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_BG_SELECTED);
}
}
- if (pReColorRightBitmap)
+ if (pDetailedRightBitmap)
{
- float arrowWidth = pReColorRightBitmap->GetWidthF();
- float arrowHeight = pReColorRightBitmap->GetHeightF();
+ float arrowWidth = pDetailedRightBitmap->GetWidthF();
+ float arrowHeight = pDetailedRightBitmap->GetHeightF();
pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f
- , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pReColorRightBitmap);
+ , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightBitmap);
}
themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_SELECTED);
pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffHighlightedBitmap);
}
- Bitmap* pReColorOnOffBgHighlightedBitmap = null;
-
- if (pOnOffBgHighlightedBitmap)
- {
- pReColorOnOffBgHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pOnOffBgHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor);
- }
-
- if (pReColorOnOffBgHighlightedBitmap && __highlightedIndex == 1)
+ if (pOnOffBgHighlightedBitmap && __highlightedIndex == 1)
{
- pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pReColorOnOffBgHighlightedBitmap);
+ pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffBgHighlightedBitmap);
}
-
- delete pReColorOnOffBgHighlightedBitmap;
}
else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED)
{
FloatRectangle bounds(0.0f, 0.0f, __pCheckButton->GetBoundsF().width, __pCheckButton->GetBoundsF().height);
- if (bounds.height < minDimension.height )
+ if (bounds.height < minDimension.height)
{
bounds.height = minDimension.height;
}
pCanvas->SetLineWidth(dividerWidth);
pCanvas->DrawLine(FloatPoint(__onOffSlidingButtonBounds.x - dividerRightMargin + dividerWidth, dividerTopMargin),
FloatPoint(__onOffSlidingButtonBounds.x - dividerRightMargin + dividerWidth, dividerTopMargin + bounds.height - dividerTopMargin * 2));
-
- //pCanvas->SetForegroundColor(dividerRightColor);
- //pCanvas->SetLineWidth(dividerWidth/2);
- //pCanvas->DrawLine(FloatPoint(__onOffSlidingButtonBounds.x - dividerRightMargin + dividerWidth, dividerTopMargin),
- // FloatPoint(__onOffSlidingButtonBounds.x - dividerRightMargin + dividerWidth, dividerTopMargin + bounds.height - dividerTopMargin * 2));
}
}
delete pCanvas;
- delete pReColorCircleBitmap;
- delete pReColorRightBitmap;
+ delete pCircleCanvas;
return;
}
}
else
{
- if (isInCheckButtonArea == true && __touchMoveHandled == false && isInOnOffHandlerArea == false )
+ if (isInCheckButtonArea == true && __touchMoveHandled == false && isInOnOffHandlerArea == false)
{
__pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
}
{
__detailedPressed = false;
- if (isInCheckButtonArea == true && __touchMoveHandled == false && isDetailedArea == false )
+ if (isInCheckButtonArea == true && __touchMoveHandled == false && isDetailedArea == false)
{
__pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
}
return;
}
- Bitmap* pReColorBgBitmap = null;
-
Color detailedHighlightedBgColor;
GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_BG_HIGHLIGHTED, detailedHighlightedBgColor);
Bitmap* pOnOffSlidingOffHandlerHighlightedBitmap = __pCheckButton->GetOnOffSlidingOffHandlerBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
- if (pOnOffSlidingOffHandlerHighlightedBitmap)
+ if (pOnOffSlidingOffHandlerHighlightedBitmap && __highlightedIndex == 1)
{
- pReColorBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pOnOffSlidingOffHandlerHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA),
- detailedHighlightedBgColor);
- }
-
- if (pReColorBgBitmap && __highlightedIndex == 1)
- {
- pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pReColorBgBitmap);
+ pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOffHandlerHighlightedBitmap);
}
}
else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED)
Bitmap* pOnOffSlidingOnHandlerHighlightedBitmap = __pCheckButton->GetOnOffSlidingOnHandlerBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
- if (pOnOffSlidingOnHandlerHighlightedBitmap)
+ if (pOnOffSlidingOnHandlerHighlightedBitmap && __highlightedIndex == 1)
{
- pReColorBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pOnOffSlidingOnHandlerHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA),
- detailedHighlightedBgColor);
- }
-
- if (pReColorBgBitmap && __highlightedIndex == 1)
- {
- pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pReColorBgBitmap);
+ pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOnHandlerHighlightedBitmap);
}
}
else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED)
}
delete pCanvas;
- delete pReColorBgBitmap;
return;
}
if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_ONOFF
|| checkStyle == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER)
{
- if (bounds.width < minDimension.width )
+ if (bounds.width < minDimension.width)
{
bounds.width = minDimension.width;
}
- if (bounds.height < minDimension.height )
+ if (bounds.height < minDimension.height)
{
bounds.height = minDimension.height;
}
}
else
{
- if (bounds.width < minDimensionWithAnnex.width )
+ if (bounds.width < minDimensionWithAnnex.width)
{
bounds.width = minDimensionWithAnnex.width;
}
- if (bounds.height < minDimensionWithAnnex.height )
+ if (bounds.height < minDimensionWithAnnex.height)
{
bounds.height = minDimensionWithAnnex.height;
}
if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_ONOFF
|| checkStyle == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER)
{
- if (bounds.width < minDimension.width )
+ if (bounds.width < minDimension.width)
{
bounds.width = minDimension.width;
}
- if (bounds.height < minDimension.height )
+ if (bounds.height < minDimension.height)
{
bounds.height = minDimension.height;
}
}
else
{
- if (bounds.width < minDimensionWithAnnex.width )
+ if (bounds.width < minDimensionWithAnnex.width)
{
bounds.width = minDimensionWithAnnex.width;
}
- if (bounds.height < minDimensionWithAnnex.height )
+ if (bounds.height < minDimensionWithAnnex.height)
{
bounds.height = minDimensionWithAnnex.height;
}
if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_ONOFF
|| checkStyle == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER)
{
- if (bounds.width < minDimension.width )
+ if (bounds.width < minDimension.width)
{
bounds.width = minDimension.width;
}
- if (bounds.height < minDimension.height )
+ if (bounds.height < minDimension.height)
{
bounds.height = minDimension.height;
}
}
else
{
- if (bounds.width < minDimensionWithAnnex.width )
+ if (bounds.width < minDimensionWithAnnex.width)
{
bounds.width = minDimensionWithAnnex.width;
}
- if (bounds.height < minDimensionWithAnnex.height )
+ if (bounds.height < minDimensionWithAnnex.height)
{
bounds.height = minDimensionWithAnnex.height;
}
result r = E_SUCCESS;
if (__pCheckAnimationTimer == null)
{
- __pCheckAnimationTimer = new (std::nothrow) Timer;
+ __pCheckAnimationTimer = new (std::nothrow) Timer();
SysTryReturn(NID_UI_CTRL, (__pCheckAnimationTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memroy allocation failed.");
r = __pCheckAnimationTimer->Construct(*this);
_ColorChangeEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
{
_IColorChangeEventListener* pColorChangeListener = dynamic_cast <_IColorChangeEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, (pColorChangeListener != null), E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. The _IColorChangeEventListener instance is null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pColorChangeListener != null, E_INVALID_ARG,
+ "[E_INVALID_ARG] Invalid argument is used. The _IColorChangeEventListener instance is null.");
const _ColorChangeEventArg* pArg = dynamic_cast <const _ColorChangeEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI_CTRL, (pArg != null), E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. The _ColorChangeEventArg instance is null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG,
+ "[E_INVALID_ARG] Invalid argument is used. The _ColorChangeEventArg instance is null.");
pColorChangeListener->OnColorChanged(*__pSource, Color(pArg->GetColor()));
_ColorChangeEvent::CreateInstanceN(const _Control& source)
{
_ColorChangeEvent* pColorChangeEvent = new (std::nothrow) _ColorChangeEvent(source);
- SysTryReturn(NID_UI_CTRL, (pColorChangeEvent != null), null, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pColorChangeEvent != null, null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
if (IsFailed(GetLastResult()))
{
_ColorChangeEvent::CreateColorChangeEventArgN(const Color& color)
{
_ColorChangeEventArg* pEventArg = new (std::nothrow) _ColorChangeEventArg(color);
- SysTryReturn(NID_UI_CTRL, (pEventArg != null), null, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY,
+ "[$s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pEventArg;
}
result r = E_SUCCESS;
Dimension colorPickerSize;
_VisualElement* pBase = null;
+ int leftRightMargin = 0;
- r = GET_DIMENSION_CONFIG(COLORPICKER::DEFAULT_SIZE, _ControlManager::GetInstance()->GetOrientation(), colorPickerSize);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the default ColorPicker size from config file.");
+ _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
+
+ r = GET_SHAPE_CONFIG(COLORPICKER::HEIGHT, orientation, colorPickerSize.height);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the default ColorPicker height from config file.");
+
+ r = GET_SHAPE_CONFIG(COLORPICKER::LEFT_RIGHT_MARGIN, orientation, leftRightMargin);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the ColorPicker margin from config file.");
+
+ if (_ControlManager::GetInstance()->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ colorPickerSize.width = _ControlManager::GetInstance()->GetScreenSize().width - 2 * leftRightMargin;
+ }
+ else
+ {
+ colorPickerSize.width = _ControlManager::GetInstance()->GetScreenSize().height - 2 * leftRightMargin;
+ }
- _ColorPicker* pColorPicker = new (std::nothrow) _ColorPicker;
- SysTryReturn(NID_UI_CTRL, (pColorPicker != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ _ColorPicker* pColorPicker = new (std::nothrow) _ColorPicker();
+ SysTryReturn(NID_UI_CTRL, pColorPicker != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pColorPicker->AcquireHandle();
pColorPicker->__pColorPickerPresenter = _ColorPickerPresenter::CreateInstanceN(*pColorPicker);
r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pColorPicker->__pColorPickerPresenter != null), , r,
+ SysTryCatch(NID_UI_CTRL, pColorPicker->__pColorPickerPresenter != null, , r,
"[%s] Propagating.", GetErrorMessage(r));
pColorPicker->__pColorChangeEvent = _ColorChangeEvent::CreateInstanceN(*pColorPicker);
r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pColorPicker->__pColorChangeEvent != null), , r,
+ SysTryCatch(NID_UI_CTRL, pColorPicker->__pColorChangeEvent != null, , r,
"[%s] Propagating.", GetErrorMessage(r));
pBase = pColorPicker->GetVisualElement();
- SysTryCatch(NID_UI_CTRL, (pBase != null), r = E_SYSTEM, E_SYSTEM,
+ SysTryCatch(NID_UI_CTRL, pBase != null, r = E_SYSTEM, E_SYSTEM,
"[E_SYSTEM] A system error has occurred. Failed to get the ColorPicker visual element.");
// Set alpha merge to VisualElement
pColorPicker->SetBackgroundColor(Color());
r = pColorPicker->SetSize(colorPickerSize);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pColorPicker->SetResizable(false);
__pHueHandler = __pColorPickerPresenter->CreateHandlerN(*pBase, handlerType);
}
- SysTryReturnResult(NID_UI_CTRL, (__pHueHandler != null), E_SYSTEM,
+ SysTryReturnResult(NID_UI_CTRL, __pHueHandler != null, E_SYSTEM,
"A system error has occurred. Failed to create hue handler.");
handlerType = SAT_HANDLER;
__pSaturationHandler = __pColorPickerPresenter->CreateHandlerN(*pBase, handlerType);
}
- SysTryReturnResult(NID_UI_CTRL, (__pSaturationHandler != null), E_SYSTEM,
+ SysTryReturnResult(NID_UI_CTRL, __pSaturationHandler != null, E_SYSTEM,
"A system error has occurred. Failed to create saturation handler.");
handlerType = LUM_HANDLER;
__pLuminanceHandler = __pColorPickerPresenter->CreateHandlerN(*pBase, handlerType);
}
- SysTryReturnResult(NID_UI_CTRL, (__pLuminanceHandler != null), E_SYSTEM,
+ SysTryReturnResult(NID_UI_CTRL, __pLuminanceHandler != null, E_SYSTEM,
"A system error has occurred. Failed to create luminance handler.");
return E_SUCCESS;
if (pContainer != null)
{
__pHueBarElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnVoidResult(NID_UI_CTRL, __pHueBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pHueBarElement != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pHueBarElement->SetName(L"ColorPickerColorSlider");
__pHueBarElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_COLOUR_CONTROL_SLIDER_T_TALKBACK");
__pHueBarElement->SetValue(hueValue);
__pSaturationBarElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnVoidResult(NID_UI_CTRL, __pSaturationBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pSaturationBarElement != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pSaturationBarElement->SetName(L"ColorPickerSaturationSlider");
- __pSaturationBarElement->SetTrait(L"Saturation Slider");
+ __pSaturationBarElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_SATURATION_CONTROL_SLIDER_T_TALKBACK");
__pSaturationBarElement->SetHintWithStringId("IDS_TPLATFORM_BODY_FLICK_UP_AND_DOWN_TO_ADJUST_THE_POSITION_T_TTS");
__pSaturationBarElement->SetSupportOperatingGesture(false);
__pSaturationBarElement->SetBounds(FloatRectangle(floatBounds.x, floatBounds.y + blockHeight, floatBounds.width, blockHeight));
__pSaturationBarElement->SetValue(saturationValue);
__pLuminanceBarElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnVoidResult(NID_UI_CTRL, __pLuminanceBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pLuminanceBarElement != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pLuminanceBarElement->SetName(L"ColorPickerBrightnessSlider");
- __pLuminanceBarElement->SetTrait(L"Luminance Slider");
+ __pLuminanceBarElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BRIGHTNESS_CONTROL_SLIDER_T_TALKBACK");
__pLuminanceBarElement->SetHintWithStringId("IDS_TPLATFORM_BODY_FLICK_UP_AND_DOWN_TO_ADJUST_THE_POSITION_T_TTS");
__pLuminanceBarElement->SetSupportOperatingGesture(false);
__pLuminanceBarElement->SetBounds(FloatRectangle(floatBounds.x, floatBounds.y + 2 * blockHeight, floatBounds.width, blockHeight));
{
result r = __pColorChangeEvent->AddListener(listener);
- SysTryReturnResult(NID_UI_CTRL, (r != E_OBJ_ALREADY_EXIST), E_SYSTEM,
+ SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM,
"A system error has occurred. The _IColorChangeEventListener instance already exists in the event listener list.");
return r;
{
result r = __pColorChangeEvent->RemoveListener(listener);
- SysTryReturnResult(NID_UI_CTRL, (r != E_OBJ_NOT_FOUND), E_SYSTEM,
+ SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM,
"A system error has occurred. The _IColorChangeEventListener instance does not exist in the event listener list.");
return r;
{
IEventArg* pEventArg = _ColorChangeEvent::CreateColorChangeEventArgN(color);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (pEventArg != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pColorChangeEvent->Fire(*pEventArg);
#include "FUiCtrl_PublicColorChangeEvent.h"
using namespace Tizen::Graphics;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Ui;
namespace Tizen { namespace Ui { namespace Controls
{
{
result r = E_SUCCESS;
Dimension colorPickerMaxSize;
+ int leftRightMargin = 0;
- r = GET_DIMENSION_CONFIG(COLORPICKER::DEFAULT_SIZE, orientation, colorPickerMaxSize);
+ r = GET_SHAPE_CONFIG(COLORPICKER::HEIGHT, orientation, colorPickerMaxSize.height);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, colorPickerMaxSize, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_SHAPE_CONFIG(COLORPICKER::LEFT_RIGHT_MARGIN, orientation, leftRightMargin);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, colorPickerMaxSize, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ colorPickerMaxSize.width = _ControlManager::GetInstance()->GetScreenSize().width - 2 * leftRightMargin;
+ }
+ else
+ {
+ colorPickerMaxSize.width = _ControlManager::GetInstance()->GetScreenSize().height - 2 * leftRightMargin;
+ }
+
return colorPickerMaxSize;
}
{
result r = E_SUCCESS;
Dimension colorPickerMinSize;
+ int leftRightMargin = 0;
+
+ r = GET_SHAPE_CONFIG(COLORPICKER::HEIGHT, orientation, colorPickerMinSize.height);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, colorPickerMinSize, r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_DIMENSION_CONFIG(COLORPICKER::DEFAULT_SIZE, orientation, colorPickerMinSize);
+ r = GET_SHAPE_CONFIG(COLORPICKER::LEFT_RIGHT_MARGIN, orientation, leftRightMargin);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, colorPickerMinSize, r, "[%s] Propagating.", GetErrorMessage(r));
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ colorPickerMinSize.width = _ControlManager::GetInstance()->GetScreenSize().width - 2 * leftRightMargin;
+ }
+ else
+ {
+ colorPickerMinSize.width = _ControlManager::GetInstance()->GetScreenSize().height - 2 * leftRightMargin;
+ }
+
return colorPickerMinSize;
}
_ColorPickerImpl::CreateColorPickerImplN(ColorPicker& control)
{
ClearLastResult();
+ int leftRightMargin = 0;
+ _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
+
_ColorPicker* pCore = _ColorPicker::CreateColorPickerN();
- if (pCore == null)
- {
- return null;
- }
+ SysTryReturn(NID_UI_CTRL, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
_ColorPickerImpl* pImpl = new (std::nothrow) _ColorPickerImpl(control, *pCore);
result r = CheckConstruction(pCore, pImpl);
- if (r != E_SUCCESS)
- {
- return null;
- }
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
Dimension defaultSize;
- r = GET_DIMENSION_CONFIG(COLORPICKER::DEFAULT_SIZE, pCore->GetOrientation(), defaultSize);
- if (r != E_SUCCESS)
+ r = GET_SHAPE_CONFIG(COLORPICKER::HEIGHT, orientation, defaultSize.height);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = GET_SHAPE_CONFIG(COLORPICKER::LEFT_RIGHT_MARGIN, orientation, leftRightMargin);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
- goto CATCH;
+ defaultSize.width = _ControlManager::GetInstance()->GetScreenSize().width - 2 * leftRightMargin;
}
-
- r = pImpl->InitializeBoundsProperties(GET_SIZE_INFO(ColorPicker), defaultSize, pCore->GetOrientation());
- if (r != E_SUCCESS)
+ else
{
- goto CATCH;
+ defaultSize.width = _ControlManager::GetInstance()->GetScreenSize().height - 2 * leftRightMargin;
}
+ r = pImpl->InitializeBoundsProperties(GET_SIZE_INFO(ColorPicker), defaultSize, orientation);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
return pImpl;
CATCH:
delete pImpl;
return null;
}
-const Tizen::Graphics::Color
+const Color
_ColorPickerImpl::GetColor(void) const
{
ClearLastResult();
}
result
-_ColorPickerImpl::SetColor(const Tizen::Graphics::Color& color)
+_ColorPickerImpl::SetColor(const Color& color)
{
ClearLastResult();
Variant varColor(color);
}
result
-_ColorPickerImpl::AddColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener)
+_ColorPickerImpl::AddColorChangeEventListener(IColorChangeEventListener& listener)
{
ClearLastResult();
result r = E_SUCCESS;
- SysTryReturnResult(NID_UI_CTRL, (__pPublicColorChangeEvent != null), E_SYSTEM, "A system error has occurred. The _PublicColorChangeEvent instance is null.");
+ SysTryReturnResult(NID_UI_CTRL, __pPublicColorChangeEvent != null, E_SYSTEM, "A system error has occurred. The _PublicColorChangeEvent instance is null.");
r = __pPublicColorChangeEvent->AddListener(listener);
- SysTryReturnResult(NID_UI_CTRL, (r != E_OBJ_ALREADY_EXIST), E_SYSTEM,
+ SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM,
"A system error has occurred. The IColorChangeEventListener instance already exists in the event listener list.");
return r;
}
result
-_ColorPickerImpl::RemoveColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener)
+_ColorPickerImpl::RemoveColorChangeEventListener(IColorChangeEventListener& listener)
{
ClearLastResult();
result r = E_SUCCESS;
r = __pPublicColorChangeEvent->RemoveListener(listener);
- SysTryReturnResult(NID_UI_CTRL, (r != E_OBJ_NOT_FOUND), E_SYSTEM,
+ SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM,
"A system error has occurred. The IColorChangeEventListener instance does not exist in the event listener list.");
return r;
}
void
-_ColorPickerImpl::OnColorChanged(const Tizen::Ui::_Control& source, const Tizen::Graphics::Color& color)
+_ColorPickerImpl::OnColorChanged(const _Control& source, const Color& color)
{
- Tizen::Base::Runtime::IEventArg * pColorChangeEventArg = _PublicColorChangeEvent::CreateColorChangeEventArgN(color);
+ IEventArg* pColorChangeEventArg = _PublicColorChangeEvent::CreateColorChangeEventArgN(color);
if (pColorChangeEventArg == null)
{
return;
FloatRectangle rect;
GetProperty(pControl, &pControlProperty);
- SysTryReturn(NID_UI_CTRL, (pControlProperty != null), null, E_SYSTEM,
+ SysTryReturn(NID_UI_CTRL, pControlProperty != null, null, E_SYSTEM,
"[E_SYSTEM] A system error has occurred. Failed to read the attributes.");
- pColorPicker = new (std::nothrow) ColorPicker;
- SysTryReturn(NID_UI_CTRL, (pColorPicker != null), null, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ pColorPicker = new (std::nothrow) ColorPicker();
+ SysTryReturn(NID_UI_CTRL, pColorPicker != null, null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
rect = pControlProperty->GetRectF();
_ColorPickerModel*
_ColorPickerModel::CreateInstanceN(void)
{
- _ColorPickerModel* pColorPickerModel = new (std::nothrow) _ColorPickerModel;
- SysTryReturn(NID_UI_CTRL, (pColorPickerModel != null), null, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ _ColorPickerModel* pColorPickerModel = new (std::nothrow) _ColorPickerModel();
+ SysTryReturn(NID_UI_CTRL, pColorPickerModel != null, null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
if (IsFailed(GetLastResult()))
{
_ColorPickerPresenter::CreateInstanceN(_ColorPicker& colorPicker)
{
_ColorPickerPresenter* pColorPickerPresenter = new (std::nothrow) _ColorPickerPresenter(colorPicker);
- SysTryReturn(NID_UI_CTRL, (pColorPickerPresenter != null), null, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pColorPickerPresenter != null, null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pColorPickerPresenter->__pColorPickerModel = _ColorPickerModel::CreateInstanceN();
r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pColorPickerPresenter->__pColorPickerModel != null), , r,
+ SysTryCatch(NID_UI_CTRL, pColorPickerPresenter->__pColorPickerModel != null, , r,
"[%s] Propagating.", GetErrorMessage(r));
// Set initial value.
Canvas* pCanvas = null;
float handlerWidth = 0.0f;
float handlerHeight = 0.0f;
+ bool isCustomBitmap = false;
result r = E_SUCCESS;
FloatRectangle handlerBounds = __componentBounds[handlerType];
FloatRectangle bounds = __pColorPicker->GetClientBoundsF();
- _VisualElement* pHandler = new (std::nothrow) _VisualElement;
- SysTryReturn(NID_UI_CTRL, (pHandler != null), null, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ _VisualElement* pHandler = new (std::nothrow) _VisualElement();
+ SysTryReturn(NID_UI_CTRL, pHandler != null, null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pHandler->Construct();
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
GET_SHAPE_CONFIG(COLORPICKER::HANDLER_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, handlerWidth);
GET_SHAPE_CONFIG(COLORPICKER::HANDLER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, handlerHeight);
pHandler->SetSurfaceOpaque(false);
r = rootElement.AttachChild(*pHandler);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pCanvas = pHandler->GetCanvasN();
r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , r, "[%s] Propagating.", GetErrorMessage(r));
pCanvas->SetBackgroundColor(Color());
pCanvas->Clear();
- DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, handlerWidth, handlerHeight), __pHandlerBitmap);
+ isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::HANDLER_NORMAL);
+ DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, handlerWidth, handlerHeight), __pHandlerBitmap, isCustomBitmap, true);
delete pCanvas;
result
_ColorPickerPresenter::SetHue(int hue)
{
- SysTryReturn(NID_UI_CTRL, (hue <= MAX_VALUE_DEGREE && hue >= 0), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. Hue value is invalid.");
+ SysTryReturnResult(NID_UI_CTRL, (hue <= MAX_VALUE_DEGREE && hue >= 0), E_INVALID_ARG,
+ "Invalid argument is used. Hue value (%d) is invalid.", hue);
__pColorPickerModel->SetHue((double)hue / MAX_VALUE_DEGREE);
SetHandlerPositionByRatio(HUE_HANDLER, __pColorPickerModel->GetHue());
result
_ColorPickerPresenter::SetSaturation(int saturation)
{
- SysTryReturn(NID_UI_CTRL, (saturation <= MAX_VALUE_DEGREE && saturation >= 0), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. Saturation value is invalid.");
+ SysTryReturnResult(NID_UI_CTRL, (saturation <= MAX_VALUE_DEGREE && saturation >= 0), E_INVALID_ARG,
+ "Invalid argument is used. Saturation value (%d) is invalid.", saturation);
__pColorPickerModel->SetSaturation((double)saturation / MAX_VALUE_DEGREE);
SetHandlerPositionByRatio(SAT_HANDLER, __pColorPickerModel->GetSaturation());
result
_ColorPickerPresenter::SetLuminance(int luminance)
{
- SysTryReturn(NID_UI_CTRL, (luminance <= MAX_VALUE_DEGREE && luminance >= 0), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. Luminance value is invalid.");
+ SysTryReturnResult(NID_UI_CTRL, (luminance <= MAX_VALUE_DEGREE && luminance >= 0), E_INVALID_ARG,
+ "Invalid argument is used. Luminance value (%d) is invalid.", luminance);
__pColorPickerModel->SetLuminance((double)luminance / MAX_VALUE_DEGREE);
SetHandlerPositionByRatio(LUM_HANDLER, __pColorPickerModel->GetLuminance());
_ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds)
{
const int _BLOCK_COUNT = 3;
- float arrowButtonLeftMargin = 0.0f;
float arrowButtonTopMargin = 0.0f;
float barTopMargin = 0.0f;
float barLeftRightMargin = 0.0f;
_ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
- GET_SHAPE_CONFIG(COLORPICKER::ARROW_BUTTON_LEFT_MARGIN, orientation, arrowButtonLeftMargin);
GET_SHAPE_CONFIG(COLORPICKER::ARROW_BUTON_TOP_MARGIN, orientation, arrowButtonTopMargin);
GET_SHAPE_CONFIG(COLORPICKER::BAR_TOP_MARGIN, orientation, barTopMargin);
GET_SHAPE_CONFIG(COLORPICKER::BAR_LEFT_RIGHT_MARGIN, orientation, barLeftRightMargin);
GET_FIXED_VALUE_CONFIG(COLORPICKER::BLOCK_MARGIN, orientation, __blockMargin);
GET_SHAPE_CONFIG(COLORPICKER::BLOCK_HEIGHT, orientation, __blockHeight);
GET_SHAPE_CONFIG(COLORPICKER::DIVIDER_MARGIN, orientation, __dividerMargin);
- GET_SHAPE_CONFIG(COLORPICKER::DIVIDER_WIDTH, orientation, __dividerWidth);
-
- __blockMargin = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(__blockMargin);
- __dividerMargin = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(__dividerMargin);
+ __blockMargin = CoordinateSystem::ConvertToLogicalY(__blockMargin);
__topMargin = (controlBounds.height - __blockHeight * _BLOCK_COUNT) / 2.0f;
if (__topMargin < 0)
GET_SHAPE_CONFIG(COLORPICKER::BAR_WIDTH, orientation, sliderWidth);
+ float colorpickerWidth = __pColorPicker->GetBoundsF().width;
+ __dividerWidth = colorpickerWidth - 2 * __dividerMargin;
+
//Set contents position
- __componentBounds[HUE_ARROWLEFT].SetBounds(arrowButtonLeftMargin, btnStartY, arrowButtonWidth, arrowButtonHeight);
+ __componentBounds[HUE_BAR].SetBounds((colorpickerWidth - sliderWidth) / 2, barStartY, sliderWidth, sliderHeight);
- __componentBounds[HUE_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftRightMargin, barStartY, sliderWidth, sliderHeight);
+ __componentBounds[HUE_ARROWLEFT].SetBounds(__componentBounds[HUE_BAR].x - barLeftRightMargin - arrowButtonWidth, btnStartY, arrowButtonWidth, arrowButtonHeight);
__componentBounds[HUE_ARROWRIGHT].SetBounds(__componentBounds[HUE_BAR].x + sliderWidth + barLeftRightMargin, btnStartY,
arrowButtonWidth, arrowButtonHeight);
btnStartY += __blockHeight;
- __componentBounds[SAT_ARROWLEFT].SetBounds(arrowButtonLeftMargin, btnStartY, arrowButtonWidth, arrowButtonHeight);
- __componentBounds[SAT_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftRightMargin, barStartY + __blockHeight,
- sliderWidth, sliderHeight);
+ __componentBounds[SAT_BAR].SetBounds((colorpickerWidth - sliderWidth) / 2, barStartY + __blockHeight, sliderWidth, sliderHeight);
+
+ __componentBounds[SAT_ARROWLEFT].SetBounds(__componentBounds[SAT_BAR].x - barLeftRightMargin - arrowButtonWidth, btnStartY, arrowButtonWidth, arrowButtonHeight);
__componentBounds[SAT_ARROWRIGHT].SetBounds(__componentBounds[SAT_BAR].x + sliderWidth + barLeftRightMargin, btnStartY,
arrowButtonWidth, arrowButtonHeight);
btnStartY += __blockHeight;
- __componentBounds[LUM_ARROWLEFT].SetBounds(arrowButtonLeftMargin, btnStartY, arrowButtonWidth, arrowButtonHeight);
- __componentBounds[LUM_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftRightMargin, barStartY + __blockHeight * 2,
+ __componentBounds[LUM_BAR].SetBounds((colorpickerWidth - sliderWidth) / 2, barStartY + __blockHeight * 2,
sliderWidth, sliderHeight);
+ __componentBounds[LUM_ARROWLEFT].SetBounds(__componentBounds[LUM_BAR].x - barLeftRightMargin - arrowButtonWidth, btnStartY, arrowButtonWidth, arrowButtonHeight);
+
__componentBounds[LUM_ARROWRIGHT].SetBounds(__componentBounds[LUM_BAR].x + sliderWidth + barLeftRightMargin, btnStartY,
arrowButtonWidth, arrowButtonHeight);
_ColorPickerPresenter::OnChangeLayout(_ControlOrientation orientation)
{
FloatDimension colorPickerSize;
- result r = GET_DIMENSION_CONFIG(COLORPICKER::DEFAULT_SIZE, orientation, colorPickerSize);
+ int margin = 0;
+ result r = E_SUCCESS;
+
+ r = GET_SHAPE_CONFIG(COLORPICKER::LEFT_RIGHT_MARGIN, orientation, margin);
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "%s Propagating", GetErrorMessage(r));
+
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ colorPickerSize.width = _ControlManager::GetInstance()->GetScreenSize().width - 2 * margin;
+ }
+ else
+ {
+ colorPickerSize.width = _ControlManager::GetInstance()->GetScreenSize().height - 2 * margin;
+ }
+
+ r = GET_SHAPE_CONFIG(COLORPICKER::HEIGHT, orientation, colorPickerSize.height);
if (r == E_SUCCESS && colorPickerSize != __pColorPicker->GetSizeF())
{
if (__eventType >= HUE_ARROWLEFT && __eventType <= LUM_ARROWRIGHT)
{
FloatRectangle buttonBounds = __componentBounds[__eventType];
- Canvas* pCanvas = __pColorPicker->GetCanvasN(buttonBounds);
+ Canvas* pCanvas = __pColorPicker->GetCanvasN();
if (pCanvas != null)
{
- buttonBounds.x = 0;
- buttonBounds.y = 0;
DrawArrowButton(*pCanvas, buttonBounds, true, IsLeftButton(__eventType));
delete pCanvas;
__pColorPicker->UpdateView();
if (__pSlideTimer == null)
{
- __pSlideTimer = new (std::nothrow) Timer;
+ __pSlideTimer = new (std::nothrow) Timer();
if (__pSlideTimer == null)
{
return false;
Color buttonBgPressedColor;
Color buttonBgDisabledColor;
Color handlerHighlightedColor;
- Bitmap* pBgNormalBitmap = null;
- Bitmap* pBgPressedBitmap = null;
- Bitmap* pBgDisabledBitmap = null;
- Bitmap* pLeftArrowNormalBitmap = null;
- Bitmap* pLeftArrowPressedBitmap = null;
- Bitmap* pLeftArrowDisabledBitmap = null;
- Bitmap* pRightArrowNormalBitmap = null;
- Bitmap* pRightArrowPressedBitmap = null;
- Bitmap* pRightArrowDisabledBitmap = null;
- Bitmap* pHandlerHighlightedBitmap = null;
r = GET_COLOR_CONFIG(COLORPICKER::ARROW_BUTTON_BG_NORMAL, buttonBgNormalColor);
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(COLORPICKER::HUE_BAR_PORTRAIT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHueSliderBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(COLORPICKER::BAR_BG_PORTRAIT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pCustomBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(COLORPICKER::LUMINANCE_BAR_PORTRAIT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pLuminanceSliderBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(COLORPICKER::SATURATION_BAR_PORTRAIT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSaturationSliderBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(COLORPICKER::HUE_BAR_LANDSCAPE_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pLandscapeHueSliderBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(COLORPICKER::BAR_BG_LANDSCAPE_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pLandscapeCustomBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(COLORPICKER::LUMINANCE_BAR_LANDSCAPE_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pLandscapeLuminanceSliderBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(COLORPICKER::SATURATION_BAR__LANDSCAPE_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pLandscapeSaturationSliderBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBgNormalBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pBgPressedBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pBgDisabledBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pNormalEffectBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pPressedEffectBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisabledEffectBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(COLORPICKER::LEFT_ARROW_BUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pLeftArrowNormalBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgNormalColor, __pColorNormalReplacementBgBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(COLORPICKER::LEFT_ARROW_BUTTON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pLeftArrowPressedBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgPressedColor, __pColorPressedReplacementBgBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(COLORPICKER::LEFT_ARROW_BUTTON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pLeftArrowDisabledBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::ARROW_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgDisabledColor, __pColorDisabledReplacementBgBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(COLORPICKER::RIGHT_ARROW_BUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pRightArrowNormalBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::LEFT_ARROW_BUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonNormalColor, __pLeftArrowNormalBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(COLORPICKER::RIGHT_ARROW_BUTTON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pRightArrowPressedBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::LEFT_ARROW_BUTTON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonPressedColor, __pLeftArrowPressedBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(COLORPICKER::RIGHT_ARROW_BUTTON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pRightArrowDisabledBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::LEFT_ARROW_BUTTON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonDisabledColor, __pLeftArrowDisabledBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(COLORPICKER::HANDLER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHandlerHighlightedBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::RIGHT_ARROW_BUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonNormalColor, __pRightArrowNormalBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- __pColorNormalReplacementBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBgNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonBgNormalColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pColorNormalReplacementBgBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::RIGHT_ARROW_BUTTON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonPressedColor, __pRightArrowPressedBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- __pColorPressedReplacementBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBgPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonBgPressedColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pColorPressedReplacementBgBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pColorDisabledReplacementBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBgDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonBgDisabledColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pColorDisabledReplacementBgBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pLeftArrowNormalBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pLeftArrowNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonNormalColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pLeftArrowNormalBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::RIGHT_ARROW_BUTTON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonDisabledColor, __pRightArrowDisabledBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- __pLeftArrowPressedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pLeftArrowPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonPressedColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pLeftArrowPressedBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pLeftArrowDisabledBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pLeftArrowDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonDisabledColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pLeftArrowDisabledBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pRightArrowNormalBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pRightArrowNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonNormalColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pRightArrowNormalBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pRightArrowPressedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pRightArrowPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonPressedColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pRightArrowPressedBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pRightArrowDisabledBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pRightArrowDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonDisabledColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pRightArrowDisabledBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pFocusBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHandlerHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), handlerHighlightedColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pFocusBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(COLORPICKER::HANDLER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, handlerHighlightedColor, __pFocusBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(COLORPICKER::HANDLER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- delete pBgNormalBitmap;
- pBgNormalBitmap = null;
-
- delete pBgPressedBitmap;
- pBgPressedBitmap = null;
-
- delete pBgDisabledBitmap;
- pBgDisabledBitmap = null;
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- delete pLeftArrowNormalBitmap;
- pLeftArrowNormalBitmap = null;
-
- delete pLeftArrowPressedBitmap;
- pLeftArrowPressedBitmap = null;
-
- delete pLeftArrowDisabledBitmap;
- pLeftArrowDisabledBitmap = null;
-
- delete pRightArrowNormalBitmap;
- pRightArrowNormalBitmap = null;
-
- delete pRightArrowPressedBitmap;
- pRightArrowPressedBitmap = null;
-
- delete pRightArrowDisabledBitmap;
- pRightArrowDisabledBitmap = null;
-
- delete pHandlerHighlightedBitmap;
- pHandlerHighlightedBitmap = null;
return r;
delete __pSaturationSliderBgBitmap;
__pSaturationSliderBgBitmap = null;
- delete pBgNormalBitmap;
- pBgNormalBitmap = null;
-
- delete pBgPressedBitmap;
- pBgPressedBitmap = null;
-
- delete pBgDisabledBitmap;
- pBgDisabledBitmap = null;
-
- delete pLeftArrowNormalBitmap;
- pLeftArrowNormalBitmap = null;
-
- delete pLeftArrowPressedBitmap;
- pLeftArrowPressedBitmap = null;
-
- delete pLeftArrowDisabledBitmap;
- pLeftArrowDisabledBitmap = null;
-
- delete pRightArrowNormalBitmap;
- pRightArrowNormalBitmap = null;
-
- delete pRightArrowPressedBitmap;
- pRightArrowPressedBitmap = null;
-
- delete pRightArrowDisabledBitmap;
- pRightArrowDisabledBitmap = null;
-
delete __pColorNormalReplacementBgBitmap;
__pColorNormalReplacementBgBitmap = null;
delete __pFocusBitmap;
__pFocusBitmap = null;
- delete pHandlerHighlightedBitmap;
- pHandlerHighlightedBitmap = null;
-
return r;
}
_ColorPickerPresenter::DrawFocus(_ColorPickerComponentType currentFocusedIndex, _ColorPickerComponentType prevFocusIndex)
{
result r = E_SUCCESS;
+ bool isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::HANDLER_HIGHLIGHTED);
if (prevFocusIndex != HSL_NOT)
{
{
case HUE_HANDLER:
{
- Canvas *pCanvas = __pColorPicker->GetHueHandler()->GetCanvasN();
+ Canvas* pCanvas = __pColorPicker->GetHueHandler()->GetCanvasN();
r = GetLastResult();
SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r));
- r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[HUE_HANDLER].width, __componentBounds[HUE_HANDLER].height), __pFocusBitmap);
+ r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[HUE_HANDLER].width, __componentBounds[HUE_HANDLER].height), __pFocusBitmap, isCustomBitmap, true);
delete pCanvas;
}
break;
case SAT_HANDLER:
{
- Canvas *pCanvas = __pColorPicker->GetSaturationHandler()->GetCanvasN();
+ Canvas* pCanvas = __pColorPicker->GetSaturationHandler()->GetCanvasN();
r = GetLastResult();
SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r));
- r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[SAT_HANDLER].width, __componentBounds[SAT_HANDLER].height), __pFocusBitmap);
+ r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[SAT_HANDLER].width, __componentBounds[SAT_HANDLER].height), __pFocusBitmap, isCustomBitmap, true);
delete pCanvas;
}
break;
case LUM_HANDLER:
{
- Canvas *pCanvas = __pColorPicker->GetLuminanceHandler()->GetCanvasN();
+ Canvas* pCanvas = __pColorPicker->GetLuminanceHandler()->GetCanvasN();
r = GetLastResult();
SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r));
- r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[LUM_HANDLER].width, __componentBounds[LUM_HANDLER].height), __pFocusBitmap);
+ r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[LUM_HANDLER].width, __componentBounds[LUM_HANDLER].height), __pFocusBitmap, isCustomBitmap, true);
delete pCanvas;
}
break;
_ColorPickerPresenter::ClearFocus(_ColorPickerComponentType index)
{
result r = E_SUCCESS;
+ bool isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::HANDLER_NORMAL);
switch (index)
{
case HUE_HANDLER:
{
- Canvas *pCanvas = __pColorPicker->GetHueHandler()->GetCanvasN();
+ Canvas* pCanvas = __pColorPicker->GetHueHandler()->GetCanvasN();
r = GetLastResult();
- SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "Propagating.");
pCanvas->SetBackgroundColor(Color());
pCanvas->Clear();
- r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[HUE_HANDLER].width, __componentBounds[HUE_HANDLER].height), __pHandlerBitmap);
+ r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[HUE_HANDLER].width, __componentBounds[HUE_HANDLER].height), __pHandlerBitmap, isCustomBitmap, true);
delete pCanvas;
}
break;
case SAT_HANDLER:
{
- Canvas *pCanvas = __pColorPicker->GetSaturationHandler()->GetCanvasN();
+ Canvas* pCanvas = __pColorPicker->GetSaturationHandler()->GetCanvasN();
r = GetLastResult();
- SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "Propagating.");
pCanvas->SetBackgroundColor(Color());
pCanvas->Clear();
- r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[SAT_HANDLER].width, __componentBounds[SAT_HANDLER].height), __pHandlerBitmap);
+ r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[SAT_HANDLER].width, __componentBounds[SAT_HANDLER].height), __pHandlerBitmap, isCustomBitmap, true);
delete pCanvas;
}
break;
case LUM_HANDLER:
{
- Canvas *pCanvas = __pColorPicker->GetLuminanceHandler()->GetCanvasN();
+ Canvas* pCanvas = __pColorPicker->GetLuminanceHandler()->GetCanvasN();
r = GetLastResult();
- SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "Propagating.");
pCanvas->SetBackgroundColor(Color());
pCanvas->Clear();
- r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[LUM_HANDLER].width, __componentBounds[LUM_HANDLER].height), __pHandlerBitmap);
+ r = DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, __componentBounds[LUM_HANDLER].width, __componentBounds[LUM_HANDLER].height), __pHandlerBitmap, isCustomBitmap, true);
delete pCanvas;
}
break;
if (__pHueSliderBgBitmap != null && orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
r = DrawResourceBitmap(canvas, __componentBounds[HUE_BAR], __pHueSliderBgBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
else if (__pLandscapeHueSliderBgBitmap != null && orientation == _CONTROL_ORIENTATION_LANDSCAPE)
{
r = DrawResourceBitmap(canvas, __componentBounds[HUE_BAR], __pLandscapeHueSliderBgBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
return r;
{
pColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pCustomBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pColorPickerModel->GetSaturationColor());
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pColorReplacementBitmap, E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pColorReplacementBitmap != null, r, "Propagating.");
r = DrawResourceBitmap(canvas, __componentBounds[LUM_BAR], pColorReplacementBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = DrawResourceBitmap(canvas, __componentBounds[LUM_BAR], __pLuminanceSliderBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
else if (__pLandscapeCustomBitmap != null && __pLandscapeLuminanceSliderBgBitmap != null && orientation == _CONTROL_ORIENTATION_LANDSCAPE)
{
pColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pLandscapeCustomBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pColorPickerModel->GetSaturationColor());
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pColorReplacementBitmap, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pColorReplacementBitmap != null, r, "Propagating.");
r = DrawResourceBitmap(canvas, __componentBounds[LUM_BAR], pColorReplacementBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = DrawResourceBitmap(canvas, __componentBounds[LUM_BAR], __pLandscapeLuminanceSliderBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
__saturationColor = __pColorPickerModel->GetSaturationColor();
{
pColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pCustomBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pColorPickerModel->GetHueColor());
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pColorReplacementBitmap, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pColorReplacementBitmap != null, r, "Propagating.");
r = DrawResourceBitmap(canvas, __componentBounds[SAT_BAR], pColorReplacementBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = DrawResourceBitmap(canvas, __componentBounds[SAT_BAR], __pSaturationSliderBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
else if (__pLandscapeCustomBitmap != null && __pLandscapeSaturationSliderBgBitmap != null && orientation == _CONTROL_ORIENTATION_LANDSCAPE)
{
pColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pLandscapeCustomBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pColorPickerModel->GetHueColor());
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pColorReplacementBitmap, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pColorReplacementBitmap != null, r, "Propagating.");
r = DrawResourceBitmap(canvas, __componentBounds[SAT_BAR], pColorReplacementBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = DrawResourceBitmap(canvas, __componentBounds[SAT_BAR], __pLandscapeSaturationSliderBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
__hueColor = __pColorPickerModel->GetHueColor();
Color dividerBottomHalfColor;
r = GET_COLOR_CONFIG(COLORPICKER::DIVIDER_TOP_HALF, dividerTopHalfColor);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(COLORPICKER::DIVIDER_BOTTOM_HALF, dividerBottomHalfColor);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
canvas.SetForegroundColor(dividerTopHalfColor);
canvas.SetLineStyle(LINE_STYLE_SOLID);
- FloatPoint startPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + __blockHeight - __blockMargin));
- FloatPoint endPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + __blockHeight - __blockMargin));
+ FloatPoint startPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + __blockHeight - __blockMargin));
+ FloatPoint endPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + __blockHeight - __blockMargin));
r = canvas.DrawLine(startPoint, endPoint);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
- startPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + (__blockHeight * 2.0f) - __blockMargin));
- endPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + (__blockHeight * 2.0f) - __blockMargin));
+ startPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + (__blockHeight * 2.0f) - __blockMargin));
+ endPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + (__blockHeight * 2.0f) - __blockMargin));
r = canvas.DrawLine(startPoint, endPoint);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
canvas.SetForegroundColor(dividerBottomHalfColor);
- startPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + __blockHeight));
- endPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + __blockHeight));
+ startPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + __blockHeight));
+ endPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + __blockHeight));
r = canvas.DrawLine(startPoint, endPoint);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
- startPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + (__blockHeight * 2.0f)));
- endPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + (__blockHeight * 2.0f)));
+ startPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + (__blockHeight * 2.0f)));
+ endPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + (__blockHeight * 2.0f)));
r = canvas.DrawLine(startPoint, endPoint);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
canvas.SetForegroundColor(foregroundColor);
{
isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::ARROW_BUTTON_BG_DISABLED);
- r = DrawResourceBitmap(canvas, rcButton, __pColorDisabledReplacementBgBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = DrawResourceBitmap(canvas, rcButton, __pColorDisabledReplacementBgBitmap, isCustomBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
if (!isCustomBitmap)
{
r = DrawResourceBitmap(canvas, rcButton, __pDisabledEffectBgBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
if (drawLeftButton)
{
- r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowDisabledBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::LEFT_ARROW_BUTTON_DISABLED);
+ r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowDisabledBitmap, isCustomBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
else
{
- r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowDisabledBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::RIGHT_ARROW_BUTTON_DISABLED);
+ r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowDisabledBitmap, isCustomBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
}
else if (isSelected)
{
isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::ARROW_BUTTON_BG_PRESSED);
- r = DrawResourceBitmap(canvas, rcButton, __pColorPressedReplacementBgBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = DrawResourceBitmap(canvas, rcButton, __pColorPressedReplacementBgBitmap, isCustomBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
if (!isCustomBitmap)
{
r = DrawResourceBitmap(canvas, rcButton, __pPressedEffectBgBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
if (drawLeftButton)
{
- r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowPressedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::LEFT_ARROW_BUTTON_PRESSED);
+ r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowPressedBitmap, isCustomBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
else
{
- r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowPressedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::RIGHT_ARROW_BUTTON_PRESSED);
+ r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowPressedBitmap, isCustomBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
}
else
{
isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::ARROW_BUTTON_BG_NORMAL);
- r = DrawResourceBitmap(canvas, rcButton, __pColorNormalReplacementBgBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = DrawResourceBitmap(canvas, rcButton, __pColorNormalReplacementBgBitmap, isCustomBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
if (!isCustomBitmap)
{
r = DrawResourceBitmap(canvas, rcButton, __pNormalEffectBgBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
if (drawLeftButton)
{
- r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowNormalBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::LEFT_ARROW_BUTTON_NORMAL);
+ r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pLeftArrowNormalBitmap, isCustomBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
else
{
- r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowNormalBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::RIGHT_ARROW_BUTTON_NORMAL);
+ r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowNormalBitmap, isCustomBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
}
FloatRectangle bounds = __pColorPicker->GetClientBoundsF();
FloatRectangle& handlerBounds = __componentBounds[handlerType];
- pHandler->SetBounds(FloatRectangle(bounds.x + handlerBounds.x, bounds.y + handlerBounds.y, handlerBounds.width, handlerBounds.height));
+ pHandler->SetBounds(CoordinateSystem::AlignToDevice(FloatRectangle(bounds.x + handlerBounds.x, bounds.y + handlerBounds.y, handlerBounds.width, handlerBounds.height)));
return r;
}
}
result
-_ColorPickerPresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap)
+_ColorPickerPresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap, bool isCustomBitmap, bool isHandlerBitmap)
{
result r = E_SUCCESS;
+ Canvas *pCanvas = null;
- SysTryReturn(NID_UI_CTRL, pBitmap != null, E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument is used. Provided bitmap is null.");
+ SysTryReturnResult(NID_UI_CTRL, pBitmap != null, E_INVALID_ARG, "Invalid argument is used. Provided bitmap is null.");
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap))
{
r = canvas.DrawNinePatchedBitmap(CoordinateSystem::AlignToDevice(bounds), *pBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
else
{
- r = canvas.DrawBitmap(CoordinateSystem::AlignToDevice(bounds), *pBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ FloatPoint position;
+ position.x = bounds.x;
+ position.y = bounds.y;
+
+ if (isCustomBitmap)
+ {
+ position.x = (bounds.width - pBitmap->GetWidthF()) / 2;
+ position.y = (bounds.height - pBitmap->GetHeightF()) / 2;
+ }
+
+ if (!isHandlerBitmap && isCustomBitmap)
+ {
+ pCanvas = __pColorPicker->GetCanvasN(bounds);
+ r = GetLastResult();
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = pCanvas->DrawBitmap(CoordinateSystem::AlignToDevice(position), *pBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ delete pCanvas;
+ pCanvas = null;
+ }
+ else
+ {
+ r = canvas.DrawBitmap(CoordinateSystem::AlignToDevice(position), *pBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+ }
}
return r;
+CATCH:
+ delete pCanvas;
+ pCanvas = null;
+
+ return r;
}
}}} // Tizen::Ui::Controls
using namespace Tizen::Graphics;
using namespace Tizen::Media;
using namespace Tizen::Ui::Animations;
+using namespace Tizen::Ui;
namespace {
static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f;
, __pActionEvent(null)
, __pBackgroundNormalBitmap(null)
, __pBackgroundEffectBitmap(null)
+ , __pPressedBitmap(null)
, __dropPosition(CONTEXT_MENU_CORE_DROP_POSITION_INVALID)
, __pCurrentFrame(null)
, __layout(_CONTROL_ORIENTATION_PORTRAIT)
__pBackgroundEffectBitmap = null;
}
+ if (__pPressedBitmap != null)
+ {
+ delete __pPressedBitmap;
+ __pPressedBitmap = null;
+ }
+
if (__pActionEvent)
{
delete __pActionEvent;
_ContextMenu::CreateContextMenuN(const FloatPoint& point, enum ContextMenuCoreStyle style, enum ContextMenuCoreAlign contextMenuAlign)
{
_ContextMenu* pContextMenu = new (std::nothrow) _ContextMenu(point, style, contextMenuAlign);
- SysTryReturn(NID_UI_CTRL, pContextMenu != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pContextMenu != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = E_SUCCESS;
pContextMenu->__pScrollPanel->SetFocusable(false);
_Scroll* pScroll = pContextMenu->__pScrollPanel->GetScrollBar();
- SysTryCatch(NID_UI_CTRL, pScroll, , E_INVALID_STATE, "[E_INVALID_STATE] _Scroll isn't constructed");
+ SysTryCatch(NID_UI_CTRL, pScroll, , E_INVALID_STATE,
+ "[%s] pScroll is in invalid state. _Scroll is not constructed.", GetErrorMessage(E_INVALID_STATE));
pScroll->SetContextMenuScrollType(true);
pContextMenu->AttachChild(*(pContextMenu->__pScrollPanel));
// load bitmap of a background and arrow
r = LoadBitmap();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to load bitmap.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load bitmap.");
r = __actionId.Construct();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to construct arraylist.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to construct arraylist.");
if (__style == CONTEXT_MENU_CORE_STYLE_LIST)
{
_IContextMenuPresenter* pPresenter = new (std::nothrow) _ContextMenuListPresenter(this);
- SysTryReturnResult(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
SetPresenter(*pPresenter);
else
{
_IContextMenuPresenter* pPresenter = new (std::nothrow) _ContextMenuGridPresenter(this);
- SysTryReturnResult(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
SetPresenter(*pPresenter);
Color itemTextSelectedColor;
r = SetBounds(FloatRectangle(0.0f, 0.0f, screen.width, screen.height));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "SetBounds failed.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds.");
SetMovable(false);
SetResizable(false);
if (pOwner == null)
{
__pCurrentFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
- SysTryReturn(NID_UI_CTRL, __pCurrentFrame != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Current frame instance is not available.");
+ SysTryReturnResult(NID_UI_CTRL, __pCurrentFrame != null, E_SYSTEM, "Failed to get current frame instance.");
_Form* pForm = __pCurrentFrame->GetCurrentForm();
pForm != null ? SetOwner(pForm) : SetOwner(__pCurrentFrame);
__pContextMenuPresenter->CalculateShowItemCount();
}
+ __pContextMenuPresenter->CalculateItemMaximumWidth();
r = __pContextMenuPresenter->CalculateWindowRect();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating.");
if (__pScrollPanel != null)
{
GetEcoreEvasMgr()->GetEcoreEvas()->SetWindowBounds(*this, GetBoundsF());
- SetAllAccessibilityElement();
-
_VisualElement* pVisualElement = GetVisualElement();
FloatRectangle pBounds = pVisualElement->GetBounds();
float oldBoundsX = pBounds.x;
result r = E_SUCCESS;
r = __pContextMenuPresenter->AddItem(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to add a item.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add a item.");
__actionId.Add(actionId);
- __pContextMenuPresenter->CalculateShowItemCount();
- __pContextMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pContextMenuPresenter->CalculateShowItemCount();
+ __pContextMenuPresenter->CalculateWindowRect();
+ }
return r;
}
result r = E_SUCCESS;
r = __pContextMenuPresenter->InsertItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to insert a item.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to insert a item.");
__actionId.InsertAt(actionId, index);
- __pContextMenuPresenter->CalculateShowItemCount();
- __pContextMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pContextMenuPresenter->CalculateShowItemCount();
+ __pContextMenuPresenter->CalculateWindowRect();
+ }
return r;
}
result r = E_SUCCESS;
r = __pContextMenuPresenter->SetItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to set a item.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set a item.");
__actionId.SetAt(actionId, index);
- __pContextMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pContextMenuPresenter->CalculateWindowRect();
+ }
return r;
}
result r = E_SUCCESS;
r = __pContextMenuPresenter->DeleteItem(index);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove a item.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove a item.");
__actionId.RemoveAt(index);
- __pContextMenuPresenter->CalculateShowItemCount();
- __pContextMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pContextMenuPresenter->CalculateShowItemCount();
+ __pContextMenuPresenter->CalculateWindowRect();
+ }
return r;
}
result r = E_SUCCESS;
r = __pContextMenuPresenter->DeleteItemAll();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove all items.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove all items.");
__actionId.RemoveAll();
- __pContextMenuPresenter->CalculateShowItemCount();
- __pContextMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pContextMenuPresenter->CalculateShowItemCount();
+ __pContextMenuPresenter->CalculateWindowRect();
+ }
return r;
}
{
int count = __actionId.GetCount();
int actionId = -1;
+
result r = E_SUCCESS;
if (count <= 0 || index >= count)
AdjustDropPosition();
}
- __pContextMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pContextMenuPresenter->CalculateWindowRect();
+ }
return E_SUCCESS;
}
{
int showCount = count.ToInt();
- if (showCount < 1)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Count is invalid.");
- return E_INVALID_ARG;
- }
-
+ SysTryReturnResult(NID_UI_CTRL, showCount > 0, E_INVALID_ARG, "Invalid argument is used. Count is invalid.");
__showItemCount = showCount;
Variant
_ContextMenu::GetPropertyMaxVisibleItemsCount(void) const
{
- return Tizen::Ui::Variant(__showItemCount);
+ return Variant(__showItemCount);
}
int
result r;
r = SetProperty("maxVisibleItemsCount", Variant(count));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to set property.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set show item count.");
- if (__style == CONTEXT_MENU_CORE_STYLE_LIST)
+ if (__style == CONTEXT_MENU_CORE_STYLE_LIST && __isAttachedToMainTree)
{
r = __pContextMenuPresenter->CalculateWindowRect();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to calculate window.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to calculate window.");
}
return E_SUCCESS;
Variant
_ContextMenu::GetPropertyColor(void) const
{
- return Tizen::Ui::Variant(__backgroundColor);
+ return Variant(__backgroundColor);
}
result
Variant
_ContextMenu::GetPropertyNormalItemColor(void) const
{
- return Tizen::Ui::Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL]);
+ return Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL]);
}
result
Variant
_ContextMenu::GetPropertyPressedItemColor(void) const
{
- return Tizen::Ui::Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED]);
+ return Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED]);
}
result
Variant
_ContextMenu::GetPropertyHighlightedItemColor(void) const
{
- return Tizen::Ui::Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]);
+ return Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]);
}
result
Variant
_ContextMenu::GetPropertyNormalItemTextColor(void) const
{
- return Tizen::Ui::Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL]);
+ return Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL]);
}
result
Variant
_ContextMenu::GetPropertyPressedItemTextColor(void) const
{
- return Tizen::Ui::Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED]);
+ return Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED]);
}
result
Variant
_ContextMenu::GetPropertyHighlightedItemTextColor(void) const
{
- return Tizen::Ui::Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]);
+ return Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]);
}
result
}
result
-_ContextMenu::AddActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener)
+_ContextMenu::AddActionEventListener(const _IActionEventListener& listener)
{
result r = E_SUCCESS;
if (__pActionEvent == null)
{
__pActionEvent = _ActionEvent::CreateInstanceN(*this);
- SysTryReturn(NID_UI_CTRL, __pActionEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] The memory is insufficient.")
+ SysTryReturnResult(NID_UI_CTRL, __pActionEvent != null, GetLastResult(), "Propagating.")
r = __pActionEvent->AddListener(listener);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to remove an action event listener.")
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to remove action event listener.")
}
return r;
}
result
-_ContextMenu::RemoveActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener)
+_ContextMenu::RemoveActionEventListener(const _IActionEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE, E_INVALID_STATE,
- "[E_INVALID_STATE] The action event instance isn't constructed.")
+ SysTryReturnResult(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE,
+ "__pActionEvent must not be null.")
result r = E_SUCCESS;
r = __pActionEvent->RemoveListener(listener);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove an action event listener")
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove action event listener.")
return r;
}
-Tizen::Ui::Controls::_ActionEvent*
+_ActionEvent*
_ContextMenu::GetActionEvent(void) const
{
return __pActionEvent;
}
result
-_ContextMenu::LoadColorReplacedBitmap(const Tizen::Graphics::Color& color)
+_ContextMenu::LoadColorReplacedBitmap(const Color& color)
{
- Bitmap* ptempNormalBitmap = null;
-
// Delete old bitmap
if (__pBackgroundNormalBitmap != null)
{
}
result r;
- r = GET_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_UP, BITMAP_PIXEL_FORMAT_ARGB8888, ptempNormalBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap.");
- __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_UP] = _BitmapImpl::GetColorReplacedBitmapN(*ptempNormalBitmap,
- Color::GetColor(COLOR_ID_MAGENTA), color);
- SysTryCatch(NID_UI_CTRL, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_UP] != null, , GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- delete ptempNormalBitmap;
- ptempNormalBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_DOWN, BITMAP_PIXEL_FORMAT_ARGB8888, ptempNormalBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap.");
- __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_DOWN] = _BitmapImpl::GetColorReplacedBitmapN(*ptempNormalBitmap,
- Color::GetColor(COLOR_ID_MAGENTA), color);
- SysTryCatch(NID_UI_CTRL, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_DOWN] != null, , GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- delete ptempNormalBitmap;
- ptempNormalBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_LEFT, BITMAP_PIXEL_FORMAT_ARGB8888, ptempNormalBitmap);
+
+ GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_UP, BITMAP_PIXEL_FORMAT_ARGB8888,color, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_UP]);
+ r = GetLastResult();
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load bitmap.");
+
+ GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_DOWN, BITMAP_PIXEL_FORMAT_ARGB8888, color, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_DOWN]);
+ r = GetLastResult();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap.");
- __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_LEFT] = _BitmapImpl::GetColorReplacedBitmapN(*ptempNormalBitmap,
- Color::GetColor(COLOR_ID_MAGENTA), color);
- SysTryCatch(NID_UI_CTRL, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_LEFT] != null, , GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- delete ptempNormalBitmap;
- ptempNormalBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_RIGHT, BITMAP_PIXEL_FORMAT_ARGB8888, ptempNormalBitmap);
+
+ GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_LEFT, BITMAP_PIXEL_FORMAT_ARGB8888, color, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_LEFT]);
+ r = GetLastResult();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap.");
- __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_RIGHT] = _BitmapImpl::GetColorReplacedBitmapN(*ptempNormalBitmap,
- Color::GetColor(COLOR_ID_MAGENTA), color);
- SysTryCatch(NID_UI_CTRL, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_RIGHT] != null, , GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- delete ptempNormalBitmap;
- ptempNormalBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(CONTEXTMENU::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, ptempNormalBitmap);
+
+ GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_NORMAL_RIGHT, BITMAP_PIXEL_FORMAT_ARGB8888, color, __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_RIGHT]);
+ r = GetLastResult();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap.");
- __pBackgroundNormalBitmap = _BitmapImpl::GetColorReplacedBitmapN(*ptempNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), color);
- SysTryCatch(NID_UI_CTRL, __pBackgroundNormalBitmap != null, , GetLastResult(), "[%s] Propagating.",
- GetErrorMessage(GetLastResult()));
- delete ptempNormalBitmap;
+
+ GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, color, __pBackgroundNormalBitmap);
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to load bitmap.", GetErrorMessage(r));
return r;
CATCH:
- delete ptempNormalBitmap;
-
delete __pBackgroundNormalBitmap;
__pBackgroundNormalBitmap = null;
return __pArrowEffectBitmap[dropPosition];
}
+Bitmap*
+_ContextMenu::GetPressedBitmap(void)
+{
+ result r;
+ GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED], __pPressedBitmap);
+ r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Failed to load bitmap.", GetErrorMessage(r));
+ return __pPressedBitmap;
+}
+
const Bitmap*
_ContextMenu::GetBackgroundNormalBitmap(void) const
{
}
void
-_ContextMenu::OnFontChanged(Tizen::Graphics::Font* pFont)
+_ContextMenu::OnFontChanged(Font* pFont)
{
return __pContextMenuPresenter->OnFontChanged(pFont);
}
__pContextMenuPresenter->OnFocusModeStateChanged();
}
+bool
+_ContextMenu::OnFocusGained(const _Control& source)
+{
+ __pContextMenuPresenter->OnFocusGained(source);
+
+ return true;
+}
+
+bool
+_ContextMenu::OnFocusLost(const _Control& source)
+{
+ __pContextMenuPresenter->OnFocusLost(source);
+
+ return true;
+}
_AccessibilityElement*
_ContextMenu::GetAccessibilityElement(const int mainIndex) const
{
#include "FUi_ResourceManager.h"
#include "FUiCtrl_ActionEvent.h"
#include "FUiCtrl_IActionEventListener.h"
-
#include "FUiCtrl_ContextMenuGridPresenter.h"
using namespace Tizen::Graphics;
, __enterKeyPressed(false)
, __backKeyPressed(false)
, __focusedIndex(-1)
+ , __focusLost(false)
{
}
LoadShape();
- __pModel = new (std::nothrow) _ContextMenuModel;
- SysTryCatch(NID_UI_CTRL, __pModel != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ __pModel = new (std::nothrow) _ContextMenuModel();
+ SysTryReturnResult(NID_UI_CTRL, __pModel != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pModel->Construct();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create data instance.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pFont = __pContextMenu->GetFallbackFont();
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, (__pFont != null), , r, "[%s] Propagating.", GetErrorMessage(r));
__pTextObject = new (std::nothrow) TextObject();
- SysTryCatch(NID_UI_CTRL, __pTextObject, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create data instance.");
+ SysTryCatch(NID_UI_CTRL, __pTextObject, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTextObject->Construct();
__pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE);
__pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
+ __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
__pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength());
return r;
}
_ContextMenuItem*
-_ContextMenuGridPresenter::CreateItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+_ContextMenuGridPresenter::CreateItemN(const Base::String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap)
{
_ContextMenuItem* pItem = _ContextMenuItem::CreateContextMenuItemN();
- SysTryReturn(NID_UI_CTRL, pItem != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pItem != null, null, GetLastResult(), "[%s] pItem must not be null.", GetErrorMessage(GetLastResult()));
ContextMenuItemDrawingType itemType = CONTEXT_MENU_ITEM_DRAWING_TYPE_NONE;
result r = E_SUCCESS;
}
result
-_ContextMenuGridPresenter::AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap,
- const Tizen::Graphics::Bitmap* pPressedBitmap,
- const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+_ContextMenuGridPresenter::AddItem(const Base::String& text, int actionId, const Bitmap* pNormalBitmap,
+ const Bitmap* pPressedBitmap,
+ const Bitmap* pHighlightedBitmap)
{
- _ContextMenuItem* pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ _ContextMenuItem* pItem = CreateItemN(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item.");
result r = __pModel->AddItem(pItem);
if (r != E_SUCCESS)
{
result rt = __pModel->RemoveItem(__pModel->GetItemCount() - 1);
- SysTryReturn(NID_UI_CTRL, rt == E_SUCCESS, rt, rt, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnResult(NID_UI_CTRL, rt == E_SUCCESS, rt, "Propagating.");
- SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item.");
+ SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to adjust item layout.");
}
return r;
}
result
-_ContextMenuGridPresenter::InsertItem(int index, const Tizen::Base::String& text, int actionId,
- const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap,
- const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+_ContextMenuGridPresenter::InsertItem(int index, const String& text, int actionId,
+ const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap,
+ const Bitmap* pHighlightedBitmap)
{
- if (text.GetLength() == 0 && normalBitmap == null && pPressedBitmap == null)
- {
- return E_INVALID_ARG;
- }
+ SysTryReturnResult(NID_UI_CTRL, (text.GetLength() != 0 || pNormalBitmap != null || pPressedBitmap != null), E_INVALID_ARG,
+ "Invalid argument(s) is used. If text is empty then pNormalBitmap or pPressedBitmap must not be null.");
_ContextMenuItem* pItem = null;
- pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ pItem = CreateItemN(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
result r = __pModel->InsertItem(pItem, index);
if (r != E_SUCCESS)
{
delete pItem;
- SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to insert item.");
+ SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to insert item.");
}
r = AdjustItemLayout();
if (r != E_SUCCESS)
{
result rt = __pModel->RemoveItem(index);
- SysTryReturn(NID_UI_CTRL, rt == E_SUCCESS, rt, rt, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnResult(NID_UI_CTRL, rt == E_SUCCESS, rt, "Propagating.");
- SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to insert item.");
+ SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to adjust item layout.");
}
return E_SUCCESS;
}
result
-_ContextMenuGridPresenter::SetItem(int index, const Tizen::Base::String& text, int actionId,
- const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap,
- const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+_ContextMenuGridPresenter::SetItem(int index, const String& text, int actionId,
+ const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap,
+ const Bitmap* pHighlightedBitmap)
{
- if (text.GetLength() == 0 && normalBitmap == null && pPressedBitmap == null)
- {
- return E_INVALID_ARG;
- }
+ SysTryReturnResult(NID_UI_CTRL, (text.GetLength() != 0 || pNormalBitmap != null || pPressedBitmap != null), E_INVALID_ARG,
+ "Invalid argument(s) is used. If text is empty then pNormalBitmap or pPressedBitmap must not be null.");
_ContextMenuItem* pItem = null;
- pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient.");
+
+ pItem = CreateItemN(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item.");
+
result r = __pModel->SetItem(pItem, index);
if (r != E_SUCCESS)
{
delete pItem;
- SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to set item.");
+ SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to set item.");
}
r = AdjustItemLayout();
if (r != E_SUCCESS)
{
result rt = __pModel->RemoveItem(index);
- SysTryReturn(NID_UI_CTRL, rt == E_SUCCESS, rt, rt, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnResult(NID_UI_CTRL, rt == E_SUCCESS, rt, "Propagating.");
- SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to set item.");
+ SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to adjust item layout.");
}
return E_SUCCESS;
{
int itemCount = __pContextMenu->GetItemCount();
- if (itemCount <= 0 || index >= itemCount || index < 0)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_STATE, "Invalid argument.");
- return E_INVALID_STATE;
- }
+ SysTryReturnResult(NID_UI_CTRL, itemCount > 0, E_INVALID_STATE, "__pContextMenu is in invalid state. Itemcount must be > 0.");
+ SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < itemCount , E_INVALID_ARG, "Invalid argument is used. Index (%d) is not valid", index);
result r = __pModel->RemoveItem(index);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item.");
return r;
}
{
int itemCount = __pContextMenu->GetItemCount();
- if (itemCount <= 0)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_STATE, "Invalid argument.");
- return E_INVALID_STATE;
- }
+ SysTryReturnResult(NID_UI_CTRL, itemCount > 0, E_INVALID_STATE, "__pContextMenu is in invalid state. Itemcount must be > 0.");
result r = __pModel->RemoveAllItem();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item all.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete all items.");
return r;
}
result r = E_SUCCESS;
r = AdjustItemLayout();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = CalculateRect();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
AdjustItemPosition();
+ SetAllAccessibilityElement();
return r;
}
result
_ContextMenuGridPresenter::CalculateRect(void)
{
- Tizen::Graphics::FloatRectangle windowRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // ContextMenu window itself
- Tizen::Graphics::FloatRectangle bodyRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // bg surronding showing items, relative to window
- Tizen::Graphics::FloatRectangle arrowRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window
- Tizen::Graphics::FloatRectangle itemRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window
+ FloatRectangle windowRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // ContextMenu window itself
+ FloatRectangle bodyRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // bg surronding showing items, relative to window
+ FloatRectangle arrowRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window
+ FloatRectangle itemRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window
float bodyTopMargin = __topMargin;
float bodyBottomMargin = __bottomMargin;
FloatPoint anchorPosition = __pContextMenu->GetAnchorPosition();
FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF();
+
if (__pContextMenu->GetLayout() == _CONTROL_ORIENTATION_LANDSCAPE)
{
screen.SetSize(screen.height, screen.width);
return GetLastResult();
}
-Tizen::Graphics::FloatDimension
+FloatDimension
_ContextMenuGridPresenter::AdjustItemLayoutIconStyle(void)
{
ClearLastResult();
float itemHeight = __itemHeight + __itemGap;
FloatDimension layoutSize(0.0f, 0.0f);
- if (itemCount > MAX_ITEM_COUNT)
- {
- SetLastResult(E_MAX_EXCEEDED);
- return layoutSize;
- }
+ SysTryReturn(NID_UI_CTRL, itemCount <= MAX_ITEM_COUNT, layoutSize, E_MAX_EXCEEDED,
+ "[%s] ItemCount exceeds the maximum limit.", GetErrorMessage(E_MAX_EXCEEDED));
countPerLine = GetCountPerLine(itemCount);
}
-Tizen::Graphics::FloatDimension
+FloatDimension
_ContextMenuGridPresenter::AdjustItemLayoutTabStyle(void)
{
ClearLastResult();
}
int
-_ContextMenuGridPresenter::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const
+_ContextMenuGridPresenter::GetItemIndexFromPosition(const FloatPoint& point) const
{
int index = -1;
int itemCount = __pModel->GetItemCount();
result r = E_SUCCESS;
Canvas* pCanvas = __pContextMenu->GetCanvasN();
- SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient.");
+
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "Propagating.");
// Clear canvas for drawing area of the ContextMenu.
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
- Tizen::Graphics::FloatRectangle bounds(__pContextMenu->GetWindowRect());
- pCanvas->Clear(Tizen::Graphics::FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height));
+ FloatRectangle bounds(__pContextMenu->GetWindowRect());
+ pCanvas->Clear(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height));
r = DrawBackground(pCanvas);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to draw background.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw background.", GetErrorMessage(r));
r = DrawArrow(pCanvas);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to draw arrow.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw arrow.", GetErrorMessage(r));
r = DrawItem(pCanvas);
+CATCH:
delete pCanvas;
-
return r;
}
result
_ContextMenuGridPresenter::DrawBackground(Canvas* pCanvas)
{
- SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error occurred. pCanvas is null.");
result r = E_SUCCESS;
- Tizen::Graphics::FloatRectangle bodyRect = __pContextMenu->GetBodyRect();
+ FloatRectangle bodyRect = __pContextMenu->GetBodyRect();
const Bitmap* pBackgroundNormalBitmap = __pContextMenu->GetBackgroundNormalBitmap();
const Bitmap* pBackgroundEffectBitmap = __pContextMenu->GetBackgroundEffectBitmap();
result
_ContextMenuGridPresenter::DrawArrow(Canvas* pCanvas)
{
- SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error occurred. pCanvas is null.");
result r = E_SUCCESS;
- Tizen::Graphics::FloatRectangle arrowRect = __pContextMenu->GetArrowRect();
+ FloatRectangle arrowRect = __pContextMenu->GetArrowRect();
ContextMenuCoreDropPosition dropPosition = __pContextMenu->GetDropPosition();
const Bitmap* pArrowNormalBitmap = __pContextMenu->GetArrowNormalBitmap(dropPosition);
}
result
-_ContextMenuGridPresenter::DrawItem(Tizen::Graphics::Canvas* pCanvas)
+_ContextMenuGridPresenter::DrawItem(Canvas* pCanvas)
{
- SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error occurred. pCanvas is null.");
result r = E_SUCCESS;
TextSimple* pSimpleText = null;
{
FloatRectangle pressedDrawRect = pItem->GetPressedDrawRect();
itemStatus = CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED;
- Bitmap* bgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pItem->GetMagentaBgBitmap()), Color::GetColor(COLOR_ID_MAGENTA), pressedColor);
- SysTryReturn(NID_UI_CTRL, bgBitmap, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- DrawBitmap(*pCanvas, pressedDrawRect, *bgBitmap);
- delete bgBitmap;
+ Bitmap* bgBitmap = __pContextMenu->GetPressedBitmap();
+
+ if (bgBitmap != null)
+ {
+ DrawBitmap(*pCanvas, pressedDrawRect, *bgBitmap);
+ }
+
bgBitmap = null;
}
__pTextObject->RemoveAll();
pSimpleText = new (std::nothrow)TextSimple(const_cast <mchar*>(text.GetPointer()), text.GetLength());
- SysTryReturn(NID_UI_CTRL, pSimpleText != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, pSimpleText != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
__pTextObject->AppendElement(*pSimpleText);
__pTextObject->SetForegroundColor(__pContextMenu->GetTextColor(itemStatus), 0, __pTextObject->GetTextLength());
{
FloatRectangle pressedDrawRect = pItem->GetPressedDrawRect();
itemStatus = CONTEXT_MENU_ITEM_DRAWING_STATUS_PRESSED;
- Bitmap* bgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pItem->GetMagentaBgBitmap()), Color::GetColor(COLOR_ID_MAGENTA), pressedColor);
- SysTryReturn(NID_UI_CTRL, bgBitmap, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- DrawBitmap(*pCanvas, pressedDrawRect, *bgBitmap);
- delete bgBitmap;
+ Bitmap* bgBitmap = __pContextMenu->GetPressedBitmap();
+
+ if (bgBitmap != null)
+ {
+ DrawBitmap(*pCanvas, pressedDrawRect, *bgBitmap);
+ }
+
bgBitmap = null;
}
const Bitmap* pBitmap = pItem->GetBitmap(itemStatus);
if (pBitmap != null)
{
- DrawBitmap(*pCanvas, drawRect, *pBitmap);
+ DrawBitmap(*pCanvas, drawRect, *pBitmap, true);
}
}
Color contentHighlightedColor;
GET_COLOR_CONFIG(FOCUSUI::CONTENT_BG_HIGHLIGHTED, contentHighlightedColor);
+
Bitmap* pBitmap = null;
- Bitmap* pTempBitmap = null;
- result r = GET_BITMAP_CONFIG_N(FOCUSUI::FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
- SysTryReturn(NID_UI_CTRL, pTempBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- if (r == E_SUCCESS)
+ result r = GET_REPLACED_BITMAP_CONFIG_N(FOCUSUI::FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, contentHighlightedColor, pBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load bitmap.");
+ if (pBitmap != null)
{
- pBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentHighlightedColor);
- if (pBitmap != null)
- {
- DrawBitmap(*pCanvas, pressedDrawRect, *pBitmap);
- }
+ DrawBitmap(*pCanvas, pressedDrawRect, *pBitmap);
}
- delete pTempBitmap;
- pTempBitmap = null;
-
delete pBitmap;
pBitmap = null;
}
}
result
-_ContextMenuGridPresenter::DrawLine(Tizen::Graphics::Canvas* pCanvas, Tizen::Graphics::FloatPoint point1, Tizen::Graphics::FloatPoint point2, bool drawVLine)
+_ContextMenuGridPresenter::DrawLine(Canvas* pCanvas, FloatPoint point1, FloatPoint point2, bool drawVLine)
{
- SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error occurred. pCanvas is null.");
result r = E_SUCCESS;
if (__touchOutRect == true)
{
- __pContextMenu->SetFocused(false);
- __pContextMenu->SetVisibleState(false);
+ FloatRectangle itemRect = __pContextMenu->GetItemRect();
+ if (!itemRect.Contains(touchPosition) || __focusLost)
+ {
+ __selectedIndex = -1;
+ __focusedIndex = -1;
+ __pContextMenu->SetFocused(false);
+ __pContextMenu->SetVisibleState(false);
+
+ return true;
+ }
+ else
+ {
+ __pContextMenu->SetFocused(true);
+ }
}
int currentSelectedIndex = GetItemIndexFromPosition(touchPosition);
__pContextMenu->SetVisibleState(false);
pActionEvent->Fire(*pEventArg);
}
+ else
+ {
+ __selectedIndex = -1;
+ Draw();
+ }
return true;
}
Draw();
}
+bool
+_ContextMenuGridPresenter::OnFocusGained(const _Control& source)
+{
+ __focusLost = false;
+ return true;
+}
+
+bool
+_ContextMenuGridPresenter::OnFocusLost(const _Control& source)
+{
+ __focusLost = true;
+ return true;
+}
+
void
_ContextMenuGridPresenter::OnFontChanged(Font* pFont)
{
if (pContainer != null)
{
_AccessibilityElement* pElementContextMenu = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnVoidResult(NID_UI_CTRL, pElementContextMenu, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pElementContextMenu, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pElementContextMenu->SetSupportOperatingGesture(false);
+
pElementContextMenu->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS");
- pElementContextMenu->SetHint(L"double tap to close");
- pElementContextMenu->SetBounds(FloatRectangle(0.0f, 0.0f, __pContextMenu->GetBoundsF().width, __pContextMenu->GetBoundsF().height));
+ pElementContextMenu->SetHintWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_IS_OPEN_DOUBLE_TAP_TO_CLOSE_THE_POP_UP_T_TTS");
+
+ pElementContextMenu->SetBounds(FloatRectangle(__pContextMenu->GetItemRect().x, __pContextMenu->GetItemRect().y, __pContextMenu->GetItemRect().width, __pContextMenu->GetItemRect().height));
pContainer->AddElement(*pElementContextMenu);
__pContextMenu->AddAccessibilityElement(*pElementContextMenu);
pElement->SetName(L"ContextMenuItem" + Integer::ToString(i));
if (pItem->GetType() == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP)
{
- pElement->SetLabelWithStringId("IDS_TPLATFORM_BODY_ICON");
+ pElement->SetLabelWithStringId("IDS_TPLATFORM_BODY_ICON.");
}
else
{
pElement->SetLabel(pItem->GetText());
}
- pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS");
+ pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS.");
pElement->SetBounds(pItem->GetDrawRect());
pContainer->AddElement(*pElement);
__pContextMenu->AddAccessibilityElement(*pElement);
}
result
-_ContextMenuGridPresenter::DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap)
+_ContextMenuGridPresenter::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, const Bitmap& bitmap, bool isAppBitmap)
{
result r = E_SUCCESS;
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap))
{
r = canvas.DrawNinePatchedBitmap(bounds, bitmap);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw ninepatched bitmap.")
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw ninepatched bitmap.");
}
- else
+ else if (isAppBitmap)
{
r = canvas.DrawBitmap(bounds, bitmap);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw bitmap.")
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw bitmap.");
+ }
+ else
+ {
+ r = canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), bitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw bitmap.");
}
return r;
using namespace Tizen::App;
using namespace Tizen::Base;
using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
namespace Tizen { namespace Ui { namespace Controls
{
}
_ContextMenu* pCore = _ContextMenu::CreateContextMenuN(point, coreStyle, contextMenuAlign);
- SysTryReturn(NID_UI_CTRL, pCore != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pCore != null, null, GetLastResult(), "[%s] Propogating.", GetErrorMessage(GetLastResult()));
_ContextMenuImpl* pImpl = new (std::nothrow) _ContextMenuImpl(pPublic, pCore, style);
r = CheckConstruction(pCore, pImpl);
}
result
-_ContextMenuImpl::AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap,
- const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+_ContextMenuImpl::AddItem(const Base::String& text, int actionId, const Bitmap* pNormalBitmap,
+ const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap)
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
return __pContextMenu->AddItem(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
}
result
-_ContextMenuImpl::InsertItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap,
- const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+_ContextMenuImpl::InsertItem(int index, const String& text, int actionId, const Bitmap* pNormalBitmap,
+ const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap)
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
return __pContextMenu->InsertItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
}
result
-_ContextMenuImpl::SetItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap,
- const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+_ContextMenuImpl::SetItem(int index, const String& text, int actionId, const Bitmap* pNormalBitmap,
+ const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap)
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
return __pContextMenu->SetItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
}
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
if (index >= GetItemCount() || index < 0)
{
- SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is not valid(index = %d).", index);
+ SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[%s] The specified index is not valid(index = %d).", GetErrorMessage(E_OUT_OF_RANGE), index);
// E_OUT_OF_RANGE is for API version 2.0 over
return (_AppInfo::GetApiVersion() <= _API_VERSION_2_0 && _AppInfo::IsOspCompat())?E_SYSTEM:E_OUT_OF_RANGE;
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
return __pContextMenu->RemoveAllItems();
}
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
return __pContextMenu->SetAnchorPosition(x, y);
}
-Tizen::Graphics::FloatPoint
+FloatPoint
_ContextMenuImpl::GetAnchorPosition(void) const
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
- Tizen::Graphics::FloatPoint point;
+ FloatPoint point;
point = __pContextMenu->GetAnchorPosition();
return point;
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
return __pContextMenu->GetItemCount();
}
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
return __pContextMenu->SetShowItemCount(maxItemsCount);
}
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
return __pContextMenu->GetShowItemCount();
}
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
return __pContextMenu->GetItemIndexAt(actionId);
}
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
return __pContextMenu->GetItemActionIdAt(index);
}
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
result r = E_SUCCESS;
r = __pContextMenu->SetColor(color);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to set color.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set color.");
return r;
}
-Tizen::Graphics::Color
+Color
_ContextMenuImpl::GetColor(void) const
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
return __pContextMenu->GetColor();
}
result
-_ContextMenuImpl::SetItemTextColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color)
+_ContextMenuImpl::SetItemTextColor(ContextMenuItemStatus status, const Color& color)
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
result r = E_SUCCESS;
switch (status)
break;
default:
- SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument at ContextMenuItemStatus.");
+ SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument is used. ContextMenuItemStatus parameter is invalid.");
r = E_INVALID_ARG;
break;
}
}
-Tizen::Graphics::Color
+Color
_ContextMenuImpl::GetItemTextColor(ContextMenuItemStatus status) const
{
ClearLastResult();
SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
- Tizen::Graphics::Color color(0, 0, 0, 0);
+ Color color(0, 0, 0, 0);
switch (status)
{
break;
default:
- SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument at ContextMenuItemStatus.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument is used. ContextMenuItemStatus parameter is invalid.");
break;
}
return color;
}
result
-_ContextMenuImpl::SetItemColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color)
+_ContextMenuImpl::SetItemColor(ContextMenuItemStatus status, const Color& color)
{
ClearLastResult();
break;
default:
- SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument at ContextMenuItemStatus.");
+ SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument is used. ContextMenuItemStatus parameter is invalid.");
r = E_INVALID_ARG;
break;
}
}
-Tizen::Graphics::Color
+Color
_ContextMenuImpl::GetItemColor(ContextMenuItemStatus status) const
{
ClearLastResult();
SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
- Tizen::Graphics::Color color(0, 0, 0, 0);
+ Color color(0, 0, 0, 0);
switch (status)
{
break;
default:
- SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument at ContextMenuItemStatus.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument is used. ContextMenuItemStatus parameter is invalid.");
break;
}
}
result
-_ContextMenuImpl::AddActionEventListener(Tizen::Ui::IActionEventListener& listener)
+_ContextMenuImpl::AddActionEventListener(IActionEventListener& listener)
{
ClearLastResult();
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
-
result r = E_SUCCESS;
if (__pPublicActionEvent == null)
{
__pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI_CTRL, __pPublicActionEvent != null, GetLastResult(),"Propagating.");
}
r = __pPublicActionEvent->AddListener(listener);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to add an action event listener.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add action event listener.");
r = __pContextMenu->AddActionEventListener(*this);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to add an action event listener.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add action event listener.");
return r;
}
result
-_ContextMenuImpl::RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener)
+_ContextMenuImpl::RemoveActionEventListener(IActionEventListener& listener)
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, E_INVALID_STATE, E_INVALID_STATE,
- "[E_INVALID_STATE] This instance isn't constructed.")
- SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use.");
+ SysTryReturnResult(NID_UI_CTRL, __pPublicActionEvent != null, E_INVALID_STATE,
+ "__pPublicActionEvent must not be null.")
result r = E_SUCCESS;
r = __pPublicActionEvent->RemoveListener(listener);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove an action event listener.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove action event listener.");
r = __pContextMenu->RemoveActionEventListener(*this);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove an action event listener.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove action event listener.");
return r;
}
void
-_ContextMenuImpl::OnActionPerformed(const Tizen::Ui::_Control& source, int actionId)
+_ContextMenuImpl::OnActionPerformed(const _Control& source, int actionId)
{
ClearLastResult();
, __bgPressedMargin(0.0f)
, __textSize(0.0f)
, __text(L"")
- , __pMagentaBgBitmap(null)
+ , __pNormalBgBitmap(null)
+ , __pSelectedBgBitmap(null)
, __size(FloatDimension(0.0f, 0.0f))
, __drawRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
, __pBitmapLabel(null)
GET_COLOR_CONFIG(CONTEXTMENU::ITEM_BG_PRESSED, __selectedBgColor);
GET_COLOR_CONFIG(CONTEXTMENU::LIST_ITEM_DIVIDER_01_NORMAL, __lowerDividerLineColor); // lower divider of item n and
GET_COLOR_CONFIG(CONTEXTMENU::LIST_ITEM_DIVIDER_02_NORMAL, __upperDividerLineColor); // upper divider of item n+1 are bonded together.
- GET_BITMAP_CONFIG_N(CONTEXTMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMagentaBgBitmap);
+ GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, Color(0, 0, 0, 0), __pNormalBgBitmap);
InitializeAccessibilityElement();
}
__pBackgroundLabel = null;
}
- delete __pMagentaBgBitmap;
- __pMagentaBgBitmap = null;
+ delete __pNormalBgBitmap;
+ __pNormalBgBitmap = null;
+
+ delete __pSelectedBgBitmap;
+ __pSelectedBgBitmap = null;
if (__pLowerDividerLineLabel != null)
{
_ContextMenuItem* pItem = null;
pItem = new (std::nothrow) _ContextMenuItem();
- if (pItem == null)
- {
- SetLastResult(E_OUT_OF_MEMORY);
- return null;
- }
+ SysTryReturn(NID_UI_CTRL, pItem != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pItem->AcquireHandle();
{
pContainer->Activate(true);
_AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnVoidResult(NID_UI_CTRL, pElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pElement, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS");
pElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
}
result
-_ContextMenuItem::SetText(const Tizen::Base::String& text)
+_ContextMenuItem::SetText(const String& text)
{
- if (text.GetLength() <= 0)
- {
- return E_INVALID_ARG;
- }
+ SysTryReturnResult(NID_UI_CTRL, text.GetLength() > 0, E_INVALID_ARG, "Invalid argument is used. Length of text must be greater than 0");
__text = text;
return E_SUCCESS;
}
-const Tizen::Base::String&
+const String&
_ContextMenuItem::GetText(void) const
{
return __text;
}
result
-_ContextMenuItem::SetBitmap(ContextMenuItemDrawingStatus status, const Tizen::Graphics::Bitmap* pBitmap)
+_ContextMenuItem::SetBitmap(ContextMenuItemDrawingStatus status, const Bitmap* pBitmap)
{
- if (status < CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL || status > CONTEXT_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED)
- {
- return E_INVALID_ARG;
- }
+ SysTryReturnResult(NID_UI_CTRL, (status >= CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL && status <= CONTEXT_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED),
+ E_INVALID_ARG, "Invalid argument is used. The status is not valid.");
- SysTryReturn(NID_UI_CTRL, (status != CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL || pBitmap != null), E_INVALID_ARG,
- E_INVALID_ARG,
- "[E_INVALID_ARG] The normal bitmap must not be null.");
+ SysTryReturnResult(NID_UI_CTRL, (status != CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL || pBitmap != null),
+ E_INVALID_ARG, "Invalid argument is used. The normal bitmap must not be null.");
Bitmap* pClonedBitmap = _BitmapImpl::CloneN(*pBitmap);
return E_SUCCESS;
}
-const Tizen::Graphics::Bitmap*
+const Bitmap*
_ContextMenuItem::GetBitmap(ContextMenuItemDrawingStatus status) const
{
if (status < CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL || status > CONTEXT_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED)
}
void
-_ContextMenuItem::SetSize(Tizen::Graphics::FloatDimension size)
+_ContextMenuItem::SetSize(FloatDimension size)
{
__size = size;
}
-Tizen::Graphics::FloatDimension
+FloatDimension
_ContextMenuItem::GetSize(void) const
{
return __size;
}
void
-_ContextMenuItem::SetDrawRect(Tizen::Graphics::FloatRectangle rect)
+_ContextMenuItem::SetDrawRect(FloatRectangle rect)
{
__drawRect = rect;
}
-Tizen::Graphics::FloatRectangle
+FloatRectangle
_ContextMenuItem::GetDrawRect(void) const
{
return __drawRect;
}
void
-_ContextMenuItem::SetPressedDrawRect(Tizen::Graphics::FloatRectangle rect)
+_ContextMenuItem::SetPressedDrawRect(FloatRectangle rect)
{
__pressedDrawRect = rect;
}
-Tizen::Graphics::FloatRectangle
+FloatRectangle
_ContextMenuItem::GetPressedDrawRect(void) const
{
return __pressedDrawRect;
}
+void
+_ContextMenuItem::SetPressedItemColor(Color color)
+{
+ __selectedBgColor = color;
+}
+
int
_ContextMenuItem::Release(void)
{
if (__pUpperDividerLineLabel == null)
{
__pUpperDividerLineLabel = _Label::CreateLabelN();
- SysTryReturnVoidResult(NID_UI_CTRL, __pUpperDividerLineLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnVoidResult(NID_UI_CTRL, __pUpperDividerLineLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
AttachChild(*__pUpperDividerLineLabel);
if (__pBackgroundLabel == null)
{
__pBackgroundLabel = _Label::CreateLabelN();
- SysTryReturnVoidResult(NID_UI_CTRL, __pBackgroundLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnVoidResult(NID_UI_CTRL, __pBackgroundLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
__pBackgroundLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE);
AttachChild(*__pBackgroundLabel);
}
}
- Color color= Color(0, 0, 0, 0);
- if (__selected == true)
- {
- color = __selectedBgColor;
- }
-
FloatRectangle bounds = GetBoundsF();
_ScrollPanel* pScrollPanel = static_cast<_ScrollPanel*>(GetParent());
FloatRectangle boundsScrollPanel = pScrollPanel->GetBoundsF();
__pBackgroundLabel->SetBounds(FloatRectangle(__bgPressedMargin, topMargin, bounds.width - __bgPressedMargin * 2.0f, bounds.height - topMargin - bottomMargin));
- Bitmap* BgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pMagentaBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), color);
- SysTryReturnVoidResult(NID_UI_CTRL, BgBitmap, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- __pBackgroundLabel->SetBackgroundBitmap(*BgBitmap);
- delete BgBitmap;
- BgBitmap = null;
+ if (__selected)
+ {
+ GET_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __selectedBgColor, __pSelectedBgBitmap);
+ __pBackgroundLabel->SetBackgroundBitmap(*__pSelectedBgBitmap);
+ }
+ else
+ {
+ __pBackgroundLabel->SetBackgroundBitmap(*__pNormalBgBitmap);
+ }
__pBackgroundLabel->Invalidate();
}
if (__pLowerDividerLineLabel == null)
{
__pLowerDividerLineLabel = _Label::CreateLabelN();
- SysTryReturnVoidResult(NID_UI_CTRL, __pLowerDividerLineLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnVoidResult(NID_UI_CTRL, __pLowerDividerLineLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
AttachChild(*__pLowerDividerLineLabel);
}
void
-_ContextMenuItem::OnFontChanged(Tizen::Graphics::Font* pFont)
+_ContextMenuItem::OnFontChanged(Font* pFont)
{
String fontName = _Control::GetFont();
Invalidate();
}
-const Tizen::Graphics::Bitmap*
-_ContextMenuItem::GetMagentaBgBitmap() const
-{
- return __pMagentaBgBitmap;
-}
-
}}} // Tizen::Ui::Controls
namespace {
static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f;
-static const int CONTEXT_MENU_LIST_ELEMENT_TEXT = 0;
-static const int CONTEXT_MENU_LIST_ELEMENT_BITMAP = 1;
}
namespace Tizen { namespace Ui { namespace Controls
, __enterKeyPressed(false)
, __backKeyPressed(false)
, __focusedIndex(-1)
+ , __focusLost(false)
{
}
LoadShape();
- __pModel = new (std::nothrow) _ContextMenuModel;
- SysTryCatch(NID_UI_CTRL, __pModel != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ __pModel = new (std::nothrow) _ContextMenuModel();
+ SysTryReturnResult(NID_UI_CTRL, __pModel != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pModel->Construct();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create data instance.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = GetLastResult(), GetLastResult(), "[%s] Memory allocation failed.", GetErrorMessage(GetLastResult()));
__pFont = __pContextMenu->GetFallbackFont();
r = GetLastResult();
}
_ContextMenuItem*
-_ContextMenuListPresenter::CreateItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+_ContextMenuListPresenter::CreateItemN(const Base::String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap)
{
_ContextMenuItem* pItem = _ContextMenuItem::CreateContextMenuItemN();
- SysTryReturn(NID_UI_CTRL, pItem != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pItem != null, null, GetLastResult(), "[%s] pItem must not be null.", GetErrorMessage(GetLastResult()));
ContextMenuItemDrawingType itemType = CONTEXT_MENU_ITEM_DRAWING_TYPE_TEXT;
_Label* pLabel = null;
pLabel->SetBackgroundBitmap(*pNormalBitmap);
pLabel->SetBackgroundColor(Color(0, 0, 0, 0));
- int bitmapY = (__itemHeight - __itemBitmapHeight ) / 2;
+ int bitmapY = (__itemHeight - __itemBitmapHeight) / 2;
pLabel->SetBounds(FloatRectangle(__leftMargin, bitmapY, __itemBitmapWidth, __itemBitmapHeight));
pLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE);
pItem->AttachChild(*pLabel);
}
result
-_ContextMenuListPresenter::AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap,
- const Tizen::Graphics::Bitmap* pPressedBitmap,
- const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+_ContextMenuListPresenter::AddItem(const Base::String& text, int actionId, const Bitmap* pNormalBitmap,
+ const Bitmap* pPressedBitmap,
+ const Bitmap* pHighlightedBitmap)
{
- _ContextMenuItem* pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ _ContextMenuItem* pItem = CreateItemN(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item.");
result r = __pModel->AddItem(pItem);
if (r != E_SUCCESS)
{
delete pItem;
- SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item.");
+ SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item.");
}
return r;
}
result
-_ContextMenuListPresenter::InsertItem(int index, const Tizen::Base::String& text, int actionId,
- const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap,
- const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+_ContextMenuListPresenter::InsertItem(int index, const String& text, int actionId,
+ const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap,
+ const Bitmap* pHighlightedBitmap)
{
- if (text.GetLength() == 0 && normalBitmap == null && pPressedBitmap == null)
- {
- return E_INVALID_ARG;
- }
+
+ SysTryReturnResult(NID_UI_CTRL, (text.GetLength() != 0 || pNormalBitmap != null || pPressedBitmap != null), E_INVALID_ARG,
+ "Invalid argument(s) is used. If text is empty then pNormalBitmap or pPressedBitmap must not be null.");
_ContextMenuItem* pItem = null;
- pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ pItem = CreateItemN(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item.");
result r = __pModel->InsertItem(pItem, index);
if (r != E_SUCCESS)
{
delete pItem;
- SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item.");
+ SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item.");
}
return E_SUCCESS;
}
result
-_ContextMenuListPresenter::SetItem(int index, const Tizen::Base::String& text, int actionId,
- const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap,
- const Tizen::Graphics::Bitmap* pHighlightedBitmap)
+_ContextMenuListPresenter::SetItem(int index, const String& text, int actionId,
+ const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap,
+ const Bitmap* pHighlightedBitmap)
{
_ContextMenuItem* pItem = null;
result r = E_SUCCESS;
- if (text.GetLength() == 0 && normalBitmap == null && pPressedBitmap == null)
- {
- return E_INVALID_ARG;
- }
+ SysTryReturnResult(NID_UI_CTRL, (text.GetLength() != 0 || pNormalBitmap != null || pPressedBitmap != null), E_INVALID_ARG,
+ "Invalid argument(s) is used. If text is empty then pNormalBitmap or pPressedBitmap must not be null.");
pItem = __pModel->GetItem(index);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pItem != null, r, r, "Failed to get the item.");
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Failed to get the item.");
- r = __pContextMenu->GetScrollPanel()->DetachChild(*pItem);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to detach item.");
+ if (pItem->HasParent())
+ {
+ r = __pContextMenu->GetScrollPanel()->DetachChild(*pItem);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to detach item.");
+ }
- pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ pItem = CreateItemN(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item.");
r = __pModel->SetItem(pItem, index);
if (r != E_SUCCESS)
{
delete pItem;
- SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item.");
+ SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item.");
}
CalculateItemMaximumWidth();
_ContextMenuItem* pItem = null;
result r = E_SUCCESS;
- if (__pContextMenu->GetItemCount() <= 0)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_STATE, "Invalid argument.");
- return E_INVALID_STATE;
- }
+ SysTryReturnResult(NID_UI_CTRL, __pContextMenu->GetItemCount() > 0, E_INVALID_STATE, "__pContextMenu is in invalid state. Item count is less than or equal to zero.");
pItem = __pModel->GetItem(index);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pItem != null, r, r, "Failed to get the item.");
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Failed to get the item.");
- r = __pContextMenu->GetScrollPanel()->DetachChild(*pItem);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to detach item.");
+ if (pItem->HasParent())
+ {
+ r = __pContextMenu->GetScrollPanel()->DetachChild(*pItem);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to detach item.");
+ }
r = __pModel->RemoveItem(index);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item.");
CalculateItemMaximumWidth();
result
_ContextMenuListPresenter::DeleteItemAll(void)
{
- if (__pContextMenu->GetItemCount() <= 0)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_STATE, "Invalid argument.");
- return E_INVALID_STATE;
- }
+ SysTryReturnResult(NID_UI_CTRL, __pContextMenu->GetItemCount() > 0, E_INVALID_STATE, "__pContextMenu is in invalid state. Item count is less than or equal to zero.");
__pContextMenu->GetScrollPanel()->DetachAllChildren();
result r = __pModel->RemoveAllItem();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item all.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item all.");
return r;
}
{
result r = CalculateRect();
AdjustItemPosition();
+ SetAllAccessibilityElement();
return r;
}
result
_ContextMenuListPresenter::ApplyColorProperty(void)
{
+ int count;
+ count = __pContextMenu->GetItemCount();
+
+ for (int i = 0; i < count; i++)
+ {
+ _ContextMenuItem* pItem = null;
+ Color color = __pContextMenu->GetItemColor(CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED);
+
+ pItem = __pModel->GetItem(i);
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, E_SYSTEM, "A system error has occured. pItem must not be null.");
+
+ pItem->SetPressedItemColor(color);
+ }
return E_SUCCESS;
}
result
_ContextMenuListPresenter::CalculateRect(void)
{
- Tizen::Graphics::FloatRectangle windowRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // ContextMenu window itself
- Tizen::Graphics::FloatRectangle bodyRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // bg surronding showing items, relative to window
- Tizen::Graphics::FloatRectangle arrowRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window
- Tizen::Graphics::FloatRectangle itemRect = Tizen::Graphics::FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window
+ FloatRectangle windowRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // ContextMenu window itself
+ FloatRectangle bodyRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // bg surronding showing items, relative to window
+ FloatRectangle arrowRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window
+ FloatRectangle itemRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window
float bodyTopMargin = __topMargin;
float bodyBottomMargin = __bottomMargin;
}
-Tizen::Graphics::FloatDimension
+FloatDimension
_ContextMenuListPresenter::AdjustItemLayoutStyle(void)
{
int itemMaxCount = CalculateShowItemCount();
{
FloatDimension itemSize(0.0f, 0.0f);
FloatDimension textArea(0.0f, 0.0f);
- float maxItemWidth = 0.0f;
+ float maxItemWidth = __itemMinWidth;
- for (int i = 0; i < __pModel->GetItemCount() - 1; i++)
+ for (int i = 0; i < __pModel->GetItemCount(); i++)
{
_ContextMenuItem* pItem = null;
pItem = __pModel->GetItem(i);
- SysTryReturn(NID_UI_CTRL, pItem != null, , E_SYSTEM, "[E_SYSTEM] A system error occurred. Unable to get the item.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_SYSTEM, "[%s] A system error occurred. Unable to get the item.", GetErrorMessage(E_SYSTEM));
CalculateItemSize(pItem->GetText(), pItem->GetType(), textArea, itemSize);
{
maxItemWidth = itemSize.width;
}
- __itemWidth = maxItemWidth;
}
+ __itemWidth = maxItemWidth;
}
int
-_ContextMenuListPresenter::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const
+_ContextMenuListPresenter::GetItemIndexFromPosition(const FloatPoint& point) const
{
int index = -1;
int itemCount = __pModel->GetItemCount();
result r = E_SUCCESS;
Canvas* pCanvas = __pContextMenu->GetCanvasN();
- SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "Propagating.");
// Clear canvas for drawing area of the ContextMenu.
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
- Tizen::Graphics::FloatRectangle bounds(__pContextMenu->GetWindowRect());
- pCanvas->Clear(Tizen::Graphics::FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height));
+ FloatRectangle bounds(__pContextMenu->GetWindowRect());
+ pCanvas->Clear(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height));
r = DrawBackground(pCanvas);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to draw background.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw background.", GetErrorMessage(r));
r = DrawArrow(pCanvas);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to draw arrow.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw arrow.", GetErrorMessage(r));
+CATCH:
delete pCanvas;
-
return r;
}
result
_ContextMenuListPresenter::DrawBackground(Canvas* pCanvas)
{
- SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error has occurred. pCanvas is null.");
result r = E_SUCCESS;
- Tizen::Graphics::FloatRectangle bodyRect = __pContextMenu->GetBodyRect();
+ FloatRectangle bodyRect = __pContextMenu->GetBodyRect();
const Bitmap* pBackgroundNormalBitmap = __pContextMenu->GetBackgroundNormalBitmap();
const Bitmap* pBackgroundEffectBitmap = __pContextMenu->GetBackgroundEffectBitmap();
result
_ContextMenuListPresenter::DrawArrow(Canvas* pCanvas)
{
- SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error has occurred. pCanvas is null.");
result r = E_SUCCESS;
- Tizen::Graphics::FloatRectangle arrowRect = __pContextMenu->GetArrowRect();
+ FloatRectangle arrowRect = __pContextMenu->GetArrowRect();
ContextMenuCoreDropPosition dropPosition = __pContextMenu->GetDropPosition();
const Bitmap* pArrowNormalBitmap = __pContextMenu->GetArrowNormalBitmap(dropPosition);
bool
_ContextMenuListPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
+ if (__focusedIndex != -1)
+ {
+ ResetFocus();
+ }
FloatPoint touchPosition = touchinfo.GetCurrentPosition();
FloatRectangle itemRect = __pContextMenu->GetItemRect();
if (__touchOutRect)
{
FloatRectangle itemRect = __pContextMenu->GetItemRect();
- if (!itemRect.Contains(touchPosition))
+ if (!itemRect.Contains(touchPosition) || __focusLost)
{
__selectedIndex = -1;
__focusedIndex = -1;
return true;
}
+ else
+ {
+ __pContextMenu->SetFocused(true);
+ }
}
int currentSelectedIndex = GetItemIndexFromPosition(touchPosition);
}
void
-_ContextMenuListPresenter::OnFocusModeStateChanged(void)
+_ContextMenuListPresenter::ResetFocus(void)
{
_Control* pFocusedControl = null;
_Window* pTop = __pContextMenu->GetRootWindow();
}
}
+bool
+_ContextMenuListPresenter::OnFocusGained(const _Control& source)
+{
+ __focusLost = false;
+ return true;
+}
+
+bool
+_ContextMenuListPresenter::OnFocusLost(const _Control& source)
+{
+ __focusLost = true;
+ return true;
+}
+
void
-_ContextMenuListPresenter::OnFontChanged(Tizen::Graphics::Font* pFont)
+_ContextMenuListPresenter::OnFontChanged(Font* pFont)
{
__pFont = pFont;
String fontName = __pContextMenu->GetFont();
void
_ContextMenuListPresenter::SetAllAccessibilityElement(void)
{
+ int scrollPanelMargin;
+ GET_SHAPE_CONFIG(CONTEXTMENU::SCROLL_PANEL_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, scrollPanelMargin);
+
_AccessibilityContainer* pContainerContextMenu = __pContextMenu->GetAccessibilityContainer();
if (pContainerContextMenu != null)
{
_AccessibilityElement* pElementContextMenu = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnVoidResult(NID_UI_CTRL, pElementContextMenu, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pElementContextMenu, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pElementContextMenu->SetSupportOperatingGesture(false);
pElementContextMenu->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS");
- pElementContextMenu->SetHint(L"double tap to close");
- pElementContextMenu->SetBounds(FloatRectangle(0.0f, 0.0f, __pContextMenu->GetBoundsF().width, __pContextMenu->GetBoundsF().height));
+ pElementContextMenu->SetHintWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_IS_OPEN_DOUBLE_TAP_TO_CLOSE_THE_POP_UP_T_TTS");
+ pElementContextMenu->SetBounds(FloatRectangle(__pContextMenu->GetItemRect().x, __pContextMenu->GetItemRect().y - scrollPanelMargin, __pContextMenu->GetItemRect().width, __pContextMenu->GetItemRect().height + 2 * scrollPanelMargin));
pContainerContextMenu->AddElement(*pElementContextMenu);
__pContextMenu->AddAccessibilityElement(*pElementContextMenu);
pElement->SetName(L"ContextMenuItem" + Integer::ToString(i));
if (pItem->GetType() == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP)
{
- pElement->SetLabel(L"icon " + pItem->GetText());
+ String string;
+ GET_STRING_CONFIG(IDS_TPLATFORM_BODY_ICON, string);
+ pElement->SetLabel(string + pItem->GetText());
}
else
{
}
result
-_ContextMenuListPresenter::DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap)
+_ContextMenuListPresenter::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, const Bitmap& bitmap, bool isAppBitmap)
{
result r = E_SUCCESS;
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap))
{
r = canvas.DrawNinePatchedBitmap(bounds, bitmap);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw ninepatched bitmap.")
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw ninepatched bitmap.");
}
- else
+ else if (isAppBitmap)
{
r = canvas.DrawBitmap(bounds, bitmap);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw bitmap.")
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw bitmap.");
+ }
+ else
+ {
+ r = canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), bitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw bitmap.");
}
return r;
{
result r = __items.Construct(DEFAULT_ITEM_COUNT);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to construct ArrayList.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to construct ArrayList.");
return r;
}
result
_ContextMenuModel::AddItem(_ContextMenuItem* pItem)
{
- if (IsValidItem(pItem) == false)
- {
- return E_SYSTEM;
- }
+ SysTryReturnResult(NID_UI_CTRL, IsValidItem(pItem), E_SYSTEM, "A system error has occurred. pItem is not valid.");
return __items.Add(*pItem);
}
result
-_ContextMenuModel::InsertItem( _ContextMenuItem* pItem, int index)
+_ContextMenuModel::InsertItem(_ContextMenuItem* pItem, int index)
{
- if (IsValidItem(pItem) == false)
- {
- return E_SYSTEM;
- }
+ SysTryReturnResult(NID_UI_CTRL, IsValidItem(pItem), E_SYSTEM, "A system error has occurred. pItem is not valid.");
return __items.InsertAt(*pItem, index);
}
if (IsValidItem(pItem) == false)
{
_ContextMenuItem* pTargetItem = GetItem(index);
- if (pItem == null || pTargetItem == null || pItem->GetActionId() != pTargetItem->GetActionId())
- {
- return E_SYSTEM;
- }
+
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, E_SYSTEM, "A system error has occurred. pItem must not be null.");
+ SysTryReturnResult(NID_UI_CTRL, pTargetItem != null, E_SYSTEM, "A system error has occurred. pTargetItem must not be null.");
+ SysTryReturnResult(NID_UI_CTRL, pItem->GetActionId() == pTargetItem->GetActionId(), E_SYSTEM, "A system error has occurred. ActionId of pItem and pTargetItem does not match.");
}
return __items.SetAt(*pItem, index, true);
result r = E_SUCCESS;
_CustomItemImpl* pImpl = new (std::nothrow) _CustomItemImpl(pPublic);
- SysTryReturn(NID_UI_CTRL, (pImpl != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, (pImpl != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pImpl->Construct(itemSize, style);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[E_SYSTEM] Unable to construct _CustomItemImpl.");
SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f) && (rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] The width and height should be greater than 0.0f."));
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
- ("E_INVALID_ARG] The element ID should not be less than 0."));
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
+ ("[E_INVALID_ARG] The element ID should not be less than 0."));
FloatRectangle bounds = rect;
ListAnnexStyle style = GetListItemAnnexStyle();
SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f) && (rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] The width and height should be greater than 0."));
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
- ("E_INVALID_ARG] The element ID should not be less than 0."));
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
+ ("[E_INVALID_ARG] The element ID should not be less than 0."));
FloatRectangle bounds = rect;
ListAnnexStyle style = GetListItemAnnexStyle();
SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f) && (rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] The width and height should be greater than 0.0f."));
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
- ("E_INVALID_ARG] The element ID should not be less than 0."));
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
+ ("[E_INVALID_ARG] The element ID should not be less than 0."));
FloatRectangle bounds = rect;
ListAnnexStyle style = GetListItemAnnexStyle();
SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f) && (rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] The width and height should be greater than 0.0f."));
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
- ("E_INVALID_ARG] The element ID should not be less than 0."));
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
+ ("[E_INVALID_ARG] The element ID should not be less than 0."));
FloatRectangle bounds = rect;
ListAnnexStyle style = GetListItemAnnexStyle();
SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f) && (rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] The width and height should be greater than 0.0f"));
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
- ("E_INVALID_ARG] The element ID should not be less than 0."));
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
+ ("[E_INVALID_ARG] The element ID should not be less than 0."));
_CustomElement* pCustomElement = null;
FloatRectangle bounds = rect;
}
pCustomElement = new (std::nothrow) _CustomElement(elementId);
- SysTryReturn(NID_UI_CTRL, (pCustomElement != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, (pCustomElement != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pCustomElement->SetElement(element);
result r = pItem->AddElement(bounds, elementId, pCustomElement);
SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f) && (rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] The width and height should be greater than 0.0f"));
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
- ("E_INVALID_ARG] The element ID should not be less than 0."));
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
+ ("[E_INVALID_ARG] The element ID should not be less than 0."));
_CustomElement* pCustomElement = null;
FloatRectangle bounds = rect;
}
pCustomElement = new (std::nothrow) _CustomElement(elementId);
- SysTryReturn(NID_UI_CTRL, (pCustomElement != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, (pCustomElement != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pCustomElement->SetElement(element);
result r = pItem->AddElement(bounds, elementId, pCustomElement);
result
_CustomItemImpl::RemoveElement(int elementId)
{
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
- ("E_INVALID_ARG] The element ID should not be less than 0."));
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
+ ("[E_INVALID_ARG] The element ID should not be less than 0."));
SysTryReturn(NID_UI_CTRL, (GetListViewItem()->DeleteElement(elementId) == true), E_SYSTEM, E_SYSTEM,
("[E_SYSTEM] Unable to remove element."));
{
_ListViewItem* pItem = GetListViewItem();
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
- ("E_INVALID_ARG] The element ID should not be less than 0."));
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
+ ("[E_INVALID_ARG] The element ID should not be less than 0."));
SysTryReturn(NID_UI_CTRL, (pItem->HasElement(elementId) == true), E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] This elementId does not exist."));
{
_ListViewItem* pItem = GetListViewItem();
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
- ("E_INVALID_ARG] The element ID should not be less than 0."));
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
+ ("[E_INVALID_ARG] The element ID should not be less than 0."));
SysTryReturn(NID_UI_CTRL, (pItem->GetElementType(elementId) == LISTVIEW_ITEM_ELEMENT_TEXT), E_INVALID_OPERATION, E_INVALID_OPERATION,
("[E_INVALID_OPERATION] This element is not text."));
{
_ListViewItem* pItem = GetListViewItem();
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
- ("E_INVALID_ARG] The element ID should not be less than 0."));
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
+ ("[E_INVALID_ARG] The element ID should not be less than 0."));
SysTryReturn(NID_UI_CTRL, (pItem->GetElementType(elementId) == LISTVIEW_ITEM_ELEMENT_TEXT), E_INVALID_OPERATION, E_INVALID_OPERATION,
("[E_INVALID_OPERATION] This element is not text."));
{
_ListViewItem* pItem = GetListViewItem();
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
- ("E_INVALID_ARG] The element ID should not be less than 0."));
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
+ ("[E_INVALID_ARG] The element ID should not be less than 0."));
SysTryReturn(NID_UI_CTRL, (pItem->GetElementType(elementId) == LISTVIEW_ITEM_ELEMENT_TEXT), E_INVALID_OPERATION, E_INVALID_OPERATION,
("[E_INVALID_OPERATION] This element is not text."));
_CustomListItemFormatImpl::CreateElementN(int elementId)
{
_ElementFormatData* pElementFormatData = new (std::nothrow) _ElementFormatData();
- SysTryReturn(NID_UI_CTRL, pElementFormatData, null, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pElementFormatData, null, E_OUT_OF_MEMORY, "Memory allocation failed.");
pElementFormatData->elementId = elementId;
result r = E_SUCCESS;
ClearLastResult();
- _DateTimeBar* pDateTimeBar = new (std::nothrow) _DateTimeBar;
+ _DateTimeBar* pDateTimeBar = new (std::nothrow) _DateTimeBar();
SysTryReturn(NID_UI_CTRL, pDateTimeBar != null, null, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Memory allocation failed.");
- r = pDateTimeBar->CreateRootVisualElement();
+ r = pDateTimeBar->CreateRootVisualElement(_WINDOW_TYPE_VE);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pDateTimeBar->__pOwner = &owner;
result
_DateTimeBar::OnAttachedToMainTree(void)
{
- SetOwner(__pOwner);
-
return _Window::OnAttachedToMainTree();
}
_DateTimeBar::OnActivated(void)
{
VisualElement* pVisualElement = null;
- VisualElementAnimation *pAnimation = null;
+ VisualElementAnimation* pAnimation = null;
+ if (GetOwner() == null)
+ {
+ SetOwner(__pOwner);
+ }
pVisualElement = GetVisualElement();
SysTryReturnVoidResult(NID_UI_CTRL, pVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element.");
pAnimation = CreateAnimationN(*pVisualElement, true);
pVisualElement->AddAnimation(L"BarOpenAnimation", *pAnimation);
delete pAnimation;
+ _Window::OnActivated();
+
SetTouchCapture(true, true);
- return _Window::OnActivated();
+ return;
}
void
void
_DateTimeBar::RemoveAllAnimations(void)
{
- VisualElement *pDateTimeBarElement = GetVisualElement();
+ VisualElement* pDateTimeBarElement = GetVisualElement();
if (pDateTimeBarElement != null)
{
{
FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_CANCELED);
}
+ __isAnimating = false;
+ SetVisibleState(false);
+ __pDateTimeBarPresenter->ClearPreviousText();
Close();
return true;
}
SysTryCatch(NID_UI_CTRL, (pBoundsAnimation != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pBoundsAnimation->SetPropertyName(L"bounds.position");
- startValue.y = startValue.y - POSITION_ANIMATION_VALUE;
+
+ if (GetAlignment() == DATETIME_BAR_ALIGN_DOWN)
+ {
+ startValue.y = startValue.y - POSITION_ANIMATION_VALUE;
+ }
+ else
+ {
+ startValue.y = startValue.y + POSITION_ANIMATION_VALUE;
+ }
if (open)
{
_DateTimeBar::CloseDateTimeBar()
{
VisualElement* pVisualElement = null;
- VisualElementAnimation *pAnimation = null;
+ VisualElementAnimation* pAnimation = null;
pVisualElement = GetVisualElement();
SysTryReturnVoidResult(NID_UI_CTRL, pVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element.");
else if ((pUserData != null) && (*pUserData == String(L"BarCloseAnimation")))
{
FloatRectangle bounds = target.GetBounds();
- bounds.y = bounds.y + POSITION_ANIMATION_VALUE;
+
+ if (GetAlignment() == DATETIME_BAR_ALIGN_DOWN)
+ {
+ bounds.y = bounds.y + POSITION_ANIMATION_VALUE;
+ }
+ else
+ {
+ bounds.y = bounds.y - POSITION_ANIMATION_VALUE;
+ }
SetVisibleState(false);
+ __pDateTimeBarPresenter->ClearPreviousText();
Close();
target.SetBounds(bounds);
}
delete pUserData;
}
+void
+_DateTimeBar::ChangeLayout(void)
+{
+ __pDateTimeBarPresenter->ChangeLayout();
+}
+
+void
+_DateTimeBar::ClearPreviousText(void)
+{
+ __pDateTimeBarPresenter->ClearPreviousText();
+}
+
}}} // Tizen::Ui::Controls
, __flickAnimation()
, __selectedText(L"")
, __focusedText(L"")
+ , __prevFocusedText(L"")
+ , __prevSelectedText(L"")
, __bodyAreaBounds(FloatRectangle())
, __arrowAreaBounds(FloatRectangle())
, __windowAreaBounds(FloatRectangle())
, __focusedIndex(-1)
, __focusBounds(FloatRectangle())
, __isFlickCanceled(false)
+ , __isChangeLayout(false)
{
}
{
result r = E_SUCCESS;
Color bgBitmapColor;
- Bitmap* pBackgroundNormalBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(DATETIMEBAR::TIMEPICKERBAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBackgroundNormalBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
GET_COLOR_CONFIG(DATETIMEBAR::BG_NORMAL, bgBitmapColor);
- __pBgColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBackgroundNormalBitmap,
- Color::GetColor(COLOR_ID_MAGENTA), bgBitmapColor);
- SysTryCatch(NID_UI_CTRL, __pBgColorReplacementBitmap != null, r = GetLastResult(), GetLastResult(), "[%s] Propagating.",
- GetErrorMessage(GetLastResult()));
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEBAR::TIMEPICKERBAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgBitmapColor, __pBgColorReplacementBitmap);
+ SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(FOCUSUI::FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, __pFocusBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = LoadArrowBitmap();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to load resources.", GetErrorMessage(r));
- delete pBackgroundNormalBitmap;
- pBackgroundNormalBitmap = null;
-
AddFlickAnimationInfo();
return r;
CATCH:
- delete pBackgroundNormalBitmap;
- pBackgroundNormalBitmap = null;
-
delete __pBgColorReplacementBitmap;
__pBgColorReplacementBitmap = null;
{
result r = E_SUCCESS;
Color arrowColor;
- Bitmap* pArrowNormalBitmap = null;
GET_COLOR_CONFIG(DATETIMEBAR::BG_NORMAL, arrowColor);
+ if (__pArrowColorReplacementBitmap != null)
+ {
+ delete __pArrowColorReplacementBitmap;
+ __pArrowColorReplacementBitmap = null;
+ }
+
if (__pDateTimeBar->GetAlignment() == DATETIME_BAR_ALIGN_DOWN)
{
- r = GET_BITMAP_CONFIG_N(DATETIMEBAR::TAIL_DOWN, BITMAP_PIXEL_FORMAT_ARGB8888, pArrowNormalBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEBAR::TAIL_DOWN, BITMAP_PIXEL_FORMAT_ARGB8888, arrowColor, __pArrowColorReplacementBitmap);
SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- r = GET_BITMAP_CONFIG_N(DATETIMEBAR::TAIL_UP, BITMAP_PIXEL_FORMAT_ARGB8888, pArrowNormalBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEBAR::TAIL_UP, BITMAP_PIXEL_FORMAT_ARGB8888, arrowColor, __pArrowColorReplacementBitmap);
SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
}
- if (__pArrowColorReplacementBitmap != null)
- {
- delete __pArrowColorReplacementBitmap;
- __pArrowColorReplacementBitmap = null;
- }
-
- __pArrowColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pArrowNormalBitmap,
- Color::GetColor(COLOR_ID_MAGENTA), arrowColor);
- SysTryCatch(NID_UI_CTRL, __pArrowColorReplacementBitmap != null, r = GetLastResult(), GetLastResult(), "[%s] Propagating.",
- GetErrorMessage(GetLastResult()));
-
- delete pArrowNormalBitmap;
- pArrowNormalBitmap = null;
-
- return r;
-
-CATCH:
-
- delete pArrowNormalBitmap;
- pArrowNormalBitmap = null;
-
- delete __pArrowColorReplacementBitmap;
- __pArrowColorReplacementBitmap = null;
-
return r;
}
r = DrawBackground(*pCanvas);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- if (__isFocused)
+ if (__isFocused && !__isChangeLayout)
{
ChangeFocusStatus();
}
if (__focusedIndex > 0)
{
pItem = GetItemAt(__focusedIndex);
- SysTryReturnVoidResult(NID_UI, pItem != NULL, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnVoidResult(NID_UI, pItem != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
__focusBounds = pItem->GetBounds();
}
}
int itemCount = GetItemCount();
- for (int i = __pDateTimeBarModel->GetFirstDrawnItemIndex(); i < itemCount; i++)
+ for (int i = 0; i < itemCount; i++)
{
pDrawItem = __pDateTimeBarModel->GetItemAt(i);
if (pDrawItem == null)
if (drawText.CompareTo(__focusedText) == 0)
{
pDrawItem->SetStatus(DATETIMEBAR_ITEM_STATUS_HIGHLIGHTED);
+ __prevFocusedText = __focusedText;
}
else
{
float fontSize = GetFontSize();
TextSimple* pSimpleText = null;
- TextObject* pTextObject = new (std::nothrow) TextObject;
+ TextObject* pTextObject = new (std::nothrow) TextObject();
SysTryReturn(NID_UI_CTRL, (pTextObject != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pTextObject->Construct();
{
__selectedText.Clear();
__selectedText.Append(pItem->GetText().GetPointer());
+ if (__prevSelectedText.IsEmpty())
+ {
+ __prevSelectedText.Append(__selectedText);
+ }
__focusedIndex = (firstDrawItemIndex - 1);
__focusedValue = pItem->GetActionId();
}
arrowAreaBounds = GetArrowBounds();
- Point arrowPosition;
-
GET_SHAPE_CONFIG(DATETIMEBAR::ARROW_HEIGHT, orientation, arrowAreaBounds.height);
GET_SHAPE_CONFIG(DATETIMEBAR::ARROW_WIDTH, orientation, arrowAreaBounds.width);
GET_SHAPE_CONFIG(DATETIMEBAR::ITEM_HEIGHT, orientation, bodyAreaBounds.height);
return true;
}
- if (!__isFocused)
+ if (!__isFocused && (keyCode == _KEY_LEFT || keyCode == _KEY_RIGHT))
{
ResetFlickAnimationTimer();
RemoveAllItems();
__isFocused = true;
}
+ if (__isChangeLayout)
+ {
+ __isChangeLayout = false;
+ }
+
switch (keyCode)
{
case KEY_UP:
if (__isFocused)
{
FocusModeChanged();
+
+ if (!__prevSelectedText.IsEmpty())
+ {
+ __selectedText = __prevSelectedText;
+ __prevFocusedText.Clear();
+ }
+
+ int itemCount = GetItemCount();
+ _DateTimeBarItem *pItem = null;
+
+ for (int i = 0;i < itemCount;i++)
+ {
+ pItem = GetItemAt(i);
+ if (pItem->GetText().CompareTo(__selectedText) == 0)
+ {
+ __focusedIndex = i;
+ __focusedValue = pItem->GetActionId();
+ break;
+ }
+ }
+ }
+
+ if (__isChangeLayout)
+ {
+ __isChangeLayout = false;
}
if (&source != __pDateTimeBar)
{
ResetFlickAnimationTimer();
__isFlickCanceled = true;
+ __isInitialAnimation = false;
}
__touchMoveHandled = false;
return false;
}
+ if (__isTouchMoved)
+ {
+ __pDateTimeBar->SetFocused(true);
+ }
+
if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false && !__isFlickInProgress && !__isTouchMoved)
{
- __isTouchMoved = false;
PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pDateTimeBar);
__pDateTimeBar->CloseDateTimeBar();
ResetFlickAnimationTimer();
return true;
}
-
while (updateItemCount > 0)
{
pItem = __pDateTimeBarModel->GetItemAt(GetFirstDrawnItemIndex());
if (__pFlickAnimationTimer == null)
{
- __pFlickAnimationTimer = new (std::nothrow) Timer;
+ __pFlickAnimationTimer = new (std::nothrow) Timer();
SysTryReturn(NID_UI_CTRL, (__pFlickAnimationTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create timer.");
r = __pFlickAnimationTimer->Construct(*this);
return;
}
+void
+_DateTimeBarPresenter::ChangeLayout(void)
+{
+ int itemCount = GetItemCount();
+ _DateTimeBarItem *pItem = null;
+
+ for (int i = 0;i < itemCount;i++)
+ {
+ pItem = GetItemAt(i);
+ if (pItem->GetText().CompareTo(__prevFocusedText) == 0)
+ {
+ __focusedIndex = i;
+ __focusedValue = pItem->GetActionId();
+ break;
+ }
+ }
+
+ __isChangeLayout = true;
+ RemoveAllItems();
+ __pDateTimeBar->SetInitialValue(GetMinimumValue(), GetMaximumValue(), __focusedValue, __pDateTimeBar->GetSelectedBoxId());
+ __distance = (GetItemWidth() * (-1.0f));
+ LoadItems();
+ AdjustItemPosition(__distance);
+ ValidateAndAdjustStartPosition();
+ SetFocusedItemBounds();
+}
+
+void
+_DateTimeBarPresenter::ClearPreviousText(void)
+{
+ __prevSelectedText.Clear();
+ __prevFocusedText.Clear();
+ __isChangeLayout = false;
+}
+
+
}}} // Tizen::Ui::Controls
result r = E_SUCCESS;
TextSimple* pSimpleText = null;
- TextObject * pTextObject = new (std::nothrow) TextObject;
+ TextObject* pTextObject = new (std::nothrow) TextObject();
SysTryReturn(NID_UI_CTRL, (pTextObject != null), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__text.Clear();
r = pTextObject->Construct();
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- pSimpleText = new (std::nothrow)TextSimple(pString, __text.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
+ pSimpleText = new (std::nothrow) TextSimple(pString, __text.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
SysTryCatch(NID_UI_CTRL, (pSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ pSimpleText->SetTextShadowEnabled(true);
+ pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f));
+
r = pTextObject->AppendElement(*pSimpleText);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
isCustomBitmap[i] = false;
}
- if (__pBackgroundNormalBitmap[status] != null)
+ if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBackgroundNormalBitmap[status]))
{
- if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBackgroundNormalBitmap[status]))
- {
- r = canvas.DrawNinePatchedBitmap(__windowBounds, *__pBackgroundNormalBitmap[status]);
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
- }
- else
- {
- r = canvas.DrawBitmap(__windowBounds, *__pBackgroundNormalBitmap[status]);
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
- }
+ r = canvas.DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, __windowBounds.width, __windowBounds.height), *__pBackgroundNormalBitmap[status]);
+ SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ else
+ {
+ FloatPoint position(0.0f, 0.0f);
+ position.x = (__windowBounds.width - __pBackgroundNormalBitmap[status]->GetWidthF()) / 2;
+ position.y = (__windowBounds.height - __pBackgroundNormalBitmap[status]->GetHeightF()) / 2;
+ r = canvas.DrawBitmap(position, *__pBackgroundNormalBitmap[status]);
+ SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
}
if (__boxId == DATETIME_ID_AMPM)
{
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBackgroundEffectBitmap[status]))
{
- r = canvas.DrawNinePatchedBitmap(__windowBounds, *__pBackgroundEffectBitmap[status]);
+ r = canvas.DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, __windowBounds.width, __windowBounds.height), *__pBackgroundEffectBitmap[status]);
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- r = canvas.DrawBitmap(__windowBounds, *__pBackgroundEffectBitmap[status]);
+ r = canvas.DrawBitmap(FloatPoint(0.0f, 0.0f), *__pBackgroundEffectBitmap[status]);
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
}
}
r = __pTextObject->SetForegroundColor(__textColor[status], 0, __pTextObject->GetTextLength());
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
- r = __pTextObject->SetBounds(__windowBounds);
+ r = __pTextObject->SetBounds(FloatRectangle(0.0f, 0.0f, __windowBounds.width, __windowBounds.height));
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
r = __pTextObject->Draw(*_CanvasImpl::GetInstance(canvas));
"Invalid argument(s) is used. The maxYear (%d) must be greater than or equal to minYear (%d).", maxYear, minYear);
r = SetProperty("minYearRange", Variant(minYear));
- if (r != E_SUCCESS )
+ if (r != E_SUCCESS)
{
return r;
}
FloatRectangle displayBoxBounds = pBox->GetDisplayBoxBounds();
int displayBoxId = pBox->GetDisplayBoxId();
- String hintText(L"Double tap to edit");
-
switch (displayBoxId)
{
case DATETIME_ID_DAY:
pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_DAY_LC");
- pElement->SetHint(hintText);
+ pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS");
break;
case DATETIME_ID_MONTH:
pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MONTH_LC");
- pElement->SetHint(hintText);
+ pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS");
break;
case DATETIME_ID_YEAR:
pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_YEAR_LC");
- pElement->SetHint(hintText);
+ pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS");
break;
case DATETIME_ID_HOUR:
pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_HOUR_LC");
- pElement->SetHint(hintText);
+ pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS");
break;
case DATETIME_ID_MINUTE:
pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MINUTE_LC");
- pElement->SetHint(hintText);
+ pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS");
break;
}
if (__inputPadEnabled)
{
- __pInputPad = new (std::nothrow) _InputPad;
+ __pInputPad = new (std::nothrow) _InputPad();
SysTryCatch(NID_UI_CTRL, (__pInputPad != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pInputPad->Construct(inputPadBounds);
for (int i = 0; i < __outputBoxMaxCount; i++)
{
- DrawDateTimeDisplayBox(*pCanvas, i);
+ Canvas *pBoxCanvas = pVisualElement->GetCanvasN(__pDisplayBox[i]->GetDisplayBoxBounds());
+ SysTryReturnResult(NID_UI_CTRL, (pBoxCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+ DrawDateTimeDisplayBox(*pBoxCanvas, i);
+ delete pBoxCanvas;
+ }
+
+ Canvas *pAmPmCanvas = null;
+ if (__pPmBox != null)
+ {
+ pAmPmCanvas = pVisualElement->GetCanvasN(__pPmBox->GetDisplayBoxBounds());
+ SysTryReturnResult(NID_UI_CTRL, (pAmPmCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
}
if ((__pickerStyle & DATETIME_OUTPUT_STYLE_DATE) && (__pickerStyle & DATETIME_OUTPUT_STYLE_TIME))
{
DrawDividers(*pCanvas);
DrawColon(*pCanvas);
- DrawPm(*pCanvas);
+ DrawPm(*pAmPmCanvas);
}
else if (__pickerStyle & DATETIME_OUTPUT_STYLE_TIME)
{
DrawColon(*pCanvas);
- DrawPm(*pCanvas);
+ DrawPm(*pAmPmCanvas);
}
+ delete pAmPmCanvas;
+
if (unlikely(_AccessibilityManager::IsActivated()))
{
SetAccessibilityElementText();
_DateTimePresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
{
result r = E_SUCCESS;
+ String text;
+ _DateTimeUtils dateTimeUtils;
+
if (__pView != &source)
{
{
__isPm = (!__isPm);
PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pView);
+ if (!__isPm)
+ {
+ dateTimeUtils.GetAmPm(text, AM_TYPE);
+ }
+ else
+ {
+ dateTimeUtils.GetAmPm(text, PM_TYPE);
+ }
+ if (__pPmBox)
+ {
+ __pView->SetAccessibilityElementText(__outputBoxMaxCount, text, true);
+ }
+
}
__inputComposing = DATETIME_INPUT_END;
}
__focusedBoxIndex = 0;
+ if (__isPmButtonPressed)
+ {
+ __isPmButtonPressed = false;
+ }
+ __inputComposing = DATETIME_INPUT_END;
+ __changeFocusCounter = DATE_TIME_CHANGE_FOCUS_COUNTER_MIN;
+ AdjustDisplayValue(__selectedBoxIndex);
__pView->Invalidate(true);
+
return r;
}
newNumber = 1;
}
+ SetNumberInBox(boxId, newNumber);
+
ChangeFocusBox();
}
else
newNumber = inputPadReturnValue;
__inputComposing = DATETIME_INPUT_BEGIN;
+ SetNumberInBox(boxId, newNumber);
+
if (!__keypadEnabled || newNumber > 1)
{
ChangeFocusBox();
}
}
-
- SetNumberInBox(boxId, newNumber);
}
else
{
return;
}
- if (actionId != DATETIME_EVENT_ID_SAVE && actionId != DATETIME_EVENT_ID_CANCEL )
+ if (actionId != DATETIME_EVENT_ID_SAVE && actionId != DATETIME_EVENT_ID_CANCEL)
{
return;
}
bool isDisplayBoxCustomBitmap[DATETIME_STATUS_MAX];
bool isAmPmCustomBitmap[DATETIME_STATUS_MAX];
- Bitmap* pDisplayBoxNormalBitmap[DATETIME_STATUS_MAX];
- Bitmap* pAmPmNormalBitmap[DATETIME_STATUS_MAX];
- Bitmap* pBgBitmap = null;
Bitmap* pColonBitmap = null;
for (int i = 0; i < DATETIME_STATUS_MAX; i++)
{
- pDisplayBoxNormalBitmap[i] = null;
- pAmPmNormalBitmap[i] = null;
backgroundColor[i] = Color();
isDisplayBoxCustomBitmap[i] = false;
isAmPmCustomBitmap[i] = false;
GET_COLOR_CONFIG(DATETIMEPICKER::AMPM_BG_DISABLED, backgroundColor[DATETIME_STATUS_DISABLED]);
//display area bg
- r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
GET_COLOR_CONFIG(DATETIMEPICKER::DISPLAY_BG_NORMAL, color);
- __pBgNormalBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBgBitmap, replacementColor, color);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pBgNormalBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, color, __pBgNormalBitmap);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::COLON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pColonBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
- //display box
- r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisplayBoxNormalBitmap[DATETIME_STATUS_NORMAL]);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisplayBoxNormalBitmap[DATETIME_STATUS_SELECTED]);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisplayBoxNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisplayBoxNormalBitmap[DATETIME_STATUS_DISABLED]);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- //ampm
- r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pAmPmNormalBitmap[DATETIME_STATUS_NORMAL]);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pAmPmNormalBitmap[DATETIME_STATUS_SELECTED]);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pAmPmNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pAmPmNormalBitmap[DATETIME_STATUS_DISABLED]);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
isDisplayBoxCustomBitmap[DATETIME_STATUS_NORMAL] = IS_CUSTOM_BITMAP(DATETIMEPICKER::CONTENT_BG_NORMAL);
isDisplayBoxCustomBitmap[DATETIME_STATUS_SELECTED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::CONTENT_BG_PRESSED);
isDisplayBoxCustomBitmap[DATETIME_STATUS_HIGHLIGHTED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED);
isAmPmCustomBitmap[DATETIME_STATUS_HIGHLIGHTED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::AMPM_BG_HIGHLIGHTED);
isAmPmCustomBitmap[DATETIME_STATUS_DISABLED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::AMPM_BG_DISABLED);
- //displaybox
- for (int i = 0; i < DATETIME_STATUS_MAX; i++)
- {
- if (isDisplayBoxCustomBitmap[i])
- {
- __pDisplayBoxNormalBitmap[i] = pDisplayBoxNormalBitmap[i];
- }
- else
- {
- __pDisplayBoxNormalBitmap[i] = _BitmapImpl::GetColorReplacedBitmapN(*pDisplayBoxNormalBitmap[i], replacementColor, backgroundColor[i]);
- SysTryCatch(NID_UI_CTRL, (__pDisplayBoxNormalBitmap[i] != null), , r, "[%s] Propagating.", GetErrorMessage(r));
- }
- }
+ //display box
- if (!isDisplayBoxCustomBitmap[DATETIME_STATUS_NORMAL])
+ if (isDisplayBoxCustomBitmap[DATETIME_STATUS_NORMAL])
+ {
+ r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxNormalBitmap[DATETIME_STATUS_NORMAL]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+}
+ else
{
+ r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_NORMAL], __pDisplayBoxNormalBitmap[DATETIME_STATUS_NORMAL]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxEffectBitmap[DATETIME_STATUS_NORMAL]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
- if (!isDisplayBoxCustomBitmap[DATETIME_STATUS_SELECTED])
+ if (isDisplayBoxCustomBitmap[DATETIME_STATUS_SELECTED])
+ {
+ r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxNormalBitmap[DATETIME_STATUS_SELECTED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ else
{
+ r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_SELECTED], __pDisplayBoxNormalBitmap[DATETIME_STATUS_SELECTED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxEffectBitmap[DATETIME_STATUS_SELECTED]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
- if (!isDisplayBoxCustomBitmap[DATETIME_STATUS_HIGHLIGHTED])
+ if (isDisplayBoxCustomBitmap[DATETIME_STATUS_HIGHLIGHTED])
{
- Bitmap* pTempBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_EFFECT_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ else
+ {
+ r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_HIGHLIGHTED], __pDisplayBoxNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_EFFECT_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_HIGHLIGHTED], __pDisplayBoxEffectBitmap[DATETIME_STATUS_HIGHLIGHTED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ if (isDisplayBoxCustomBitmap[DATETIME_STATUS_DISABLED])
+ {
+ r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxNormalBitmap[DATETIME_STATUS_DISABLED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pDisplayBoxEffectBitmap[DATETIME_STATUS_HIGHLIGHTED] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), backgroundColor[DATETIME_STATUS_HIGHLIGHTED]);
- SysTryCatch(NID_UI_CTRL, (__pDisplayBoxEffectBitmap[DATETIME_STATUS_HIGHLIGHTED] != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- delete pTempBitmap;
}
-
- if (!isDisplayBoxCustomBitmap[DATETIME_STATUS_DISABLED])
+ else
{
+ r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_DISABLED], __pDisplayBoxNormalBitmap[DATETIME_STATUS_DISABLED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::CONTENT_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDisplayBoxEffectBitmap[DATETIME_STATUS_DISABLED]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
-
//ampm
- for (int i = 0; i < DATETIME_STATUS_MAX; i++)
+
+ if (isAmPmCustomBitmap[DATETIME_STATUS_NORMAL])
{
- if (isAmPmCustomBitmap[i])
- {
- __pAmPmNormalBitmap[i] = pAmPmNormalBitmap[i];
- }
- else
- {
- __pAmPmNormalBitmap[i] = _BitmapImpl::GetColorReplacedBitmapN(*pAmPmNormalBitmap[i], replacementColor, backgroundColor[i]);
- SysTryCatch(NID_UI_CTRL, (__pAmPmNormalBitmap[i] != null), , r, "[%s] Propagating.", GetErrorMessage(r));
- }
+ r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmNormalBitmap[DATETIME_STATUS_NORMAL]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
-
- if (!isAmPmCustomBitmap[DATETIME_STATUS_NORMAL])
+ else
{
+ r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_NORMAL], __pAmPmNormalBitmap[DATETIME_STATUS_NORMAL]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmEffectBitmap[DATETIME_STATUS_NORMAL]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
- if (!isAmPmCustomBitmap[DATETIME_STATUS_SELECTED])
+ if (isAmPmCustomBitmap[DATETIME_STATUS_SELECTED])
+ {
+ r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmNormalBitmap[DATETIME_STATUS_SELECTED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ else
{
+ r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_SELECTED], __pAmPmNormalBitmap[DATETIME_STATUS_SELECTED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmEffectBitmap[DATETIME_STATUS_SELECTED]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
- if (!isAmPmCustomBitmap[DATETIME_STATUS_HIGHLIGHTED])
+ if (isAmPmCustomBitmap[DATETIME_STATUS_HIGHLIGHTED])
{
+ r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ }
+ else
+ {
+ r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_HIGHLIGHTED], __pAmPmNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_EFFECT_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmEffectBitmap[DATETIME_STATUS_HIGHLIGHTED]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
- if (!isAmPmCustomBitmap[DATETIME_STATUS_DISABLED])
+ if (isAmPmCustomBitmap[DATETIME_STATUS_DISABLED])
+ {
+ r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmNormalBitmap[DATETIME_STATUS_DISABLED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ else
{
+ r = GET_REPLACED_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, backgroundColor[DATETIME_STATUS_DISABLED], __pAmPmNormalBitmap[DATETIME_STATUS_DISABLED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmEffectBitmap[DATETIME_STATUS_DISABLED]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
delete pColonBitmap;
- delete pBgBitmap;
- for (int i = 0; i < DATETIME_STATUS_MAX; i++)
- {
- delete pDisplayBoxNormalBitmap[i];
- delete pAmPmNormalBitmap[i];
- }
return;
delete __pColonDisabledBitmap;
__pColonDisabledBitmap = null;
- delete pBgBitmap;
-
delete __pBgNormalBitmap;
__pBgNormalBitmap = null;
for (int i = 0; i < DATETIME_STATUS_MAX; i++)
{
- delete pDisplayBoxNormalBitmap[i];
delete __pDisplayBoxNormalBitmap[i];
__pDisplayBoxNormalBitmap[i] = null;
delete __pDisplayBoxEffectBitmap[i];
__pDisplayBoxEffectBitmap[i] = null;
- delete pAmPmNormalBitmap[i];
delete __pAmPmNormalBitmap[i];
__pAmPmNormalBitmap[i] = null;
{
status = DATETIME_STATUS_HIGHLIGHTED;
}
+
+ if ((__focusedBoxIndex == __outputBoxMaxCount) && ((index + 1) == __focusedBoxIndex))
+ {
+ status = DATETIME_STATUS_SELECTED;
+ }
}
else
{
{
String length = L"%0d";
- r = length.Insert(__changeFocusCounter,2);
+ r = length.Insert(__changeFocusCounter, 2);
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
r = text.Format(DATETIME_DISPLAY_STRING_MAX_LENGTH, length.GetPointer(), number);
}
else
{
- canvas.DrawBitmap(bounds, *__pBgNormalBitmap);
+ canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), *__pBgNormalBitmap);
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
}
}
}
else
{
- canvas.DrawBitmap(bounds, *__pBgEffectBitmap);
+ canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), *__pBgEffectBitmap);
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
}
}
{
//am pm area
FloatRectangle boxBounds = __pPmBox->GetDisplayBoxBounds();
+ boxBounds.x = boxBounds.x + outputArea.x;
if ((posX >= boxBounds.x) && (posX < boxBounds.x + boxBounds.width))
{
{
FloatRectangle boxBounds = __pDisplayBox[i]->GetDisplayBoxBounds();
+ boxBounds.x = outputArea.x + boxBounds.x;
+
if (__title.IsEmpty())
{
boxBounds.y = outputArea.y + ((outputArea.height - boxBounds.height) / 2.0f);
}
__minute = GetMinute();
+
}
void
void
_DateTimePresenter::SetAccessibilityElementText(void)
{
+
for (int index = 0; index < __outputBoxMaxCount; ++index)
{
if (__pDisplayBox[index]->GetDisplayBoxId() == DATETIME_ID_MONTH)
String* pObj = null;
pObj = static_cast<String*>(const_cast<Object*>(pListOfShortMonths->GetAt(month - 1)));
+ // To remove the special keyword from month string for the regions having single 'm' in its DateFormat pattern.
+ LocaleManager localeManager;
+ r = localeManager.Construct();
+
+ if (r == E_SUCCESS && pObj != null)
+ {
+ Locale systemLocale = localeManager.GetSystemLocale();
+
+ DateTimeFormatter* pDateFormatter = null;
+ pDateFormatter = DateTimeFormatter::CreateDateFormatterN(systemLocale, DATE_TIME_STYLE_LONG);
+
+ if (pDateFormatter != null)
+ {
+ String formatString = pDateFormatter->GetPattern();
+ formatString.ToLowerCase();
+ int stringLength = formatString.GetLength();
+ int count = 0;
+
+ for (int i = 0; i < stringLength; i++)
+ {
+ wchar_t ch = '\0';
+ r = formatString.GetCharAt(i, ch);
+
+ if (r == E_SUCCESS && (ch == 'm'))
+ {
+ count++;
+ }
+
+ if (count > 1)
+ {
+ break;
+ }
+ }
+
+ if (count == 1)
+ {
+ pObj->Remove(pObj->GetLength() - 1, 1);
+ }
+ }
+
+ delete pDateFormatter;
+ }
+
if (pObj)
{
text.Append(*pObj);
{
text.Append(*pObj);
}
-
return text;
}
#include "FUi_IAccessibilityListener.h"
#include "FUi_UiEventManager.h"
#include "FUiAnim_VisualElement.h"
+#include "FUi_DragAndDropItem.h"
#include "FUiCtrl_Edit.h"
#include "FUiCtrl_EditPresenter.h"
#include "FUiCtrl_ScrollPanel.h"
{
return true;
}
- else
- {
- return false;
- }
}
return false;
}
{
return true;
}
- else if (__pEdit == &source)
- {
- return false;
- }
- else
- {
- pEditPresenter->InitializeCopyPasteManager();
- return false;
- }
}
}
return false;
{
if (pEditPresenter->IsCopyPasteHandleExist())
{
- pEditPresenter->ReleaseCopyPastePopup();
+ if (pEditPresenter->IsViewModeEnabled(true) && !pEditPresenter->IsBlocked())
+ {
+ pEditPresenter->InitializeCopyPasteManager();
+ }
+ else
+ {
+ pEditPresenter->ReleaseCopyPastePopup();
+ }
return true;
}
else
return false;
}
}
- else if (__pEdit == &source)
- {
- return false;
- }
- else if (pEditPresenter->IsCopyPasteHandleExist())
- {
- pEditPresenter->InitializeCopyPasteManager();
- return false;
- }
}
}
, __pressedGuideTextColor(Color())
, __isSettingGuideTextColor(false)
, __pDefaultBackgroundEffectBitmap(null)
- , __pDefaultFocusBitmap(null)
, __pGestureFlick(null)
, __pGestureLongPress(null)
, __pGestureTap(null)
, __isAccessibilityCreated(false)
, __isFullScreenKeypadEdit(false)
, __internalFocus(false)
+ , __pCurrentFrame(null)
, __isDestroyed(false)
, __pTextFilter(null)
, __previousBounds()
, __isTouchMoving(false)
- , __isSearchFieldFocused(false)
, __isTextEventEnabled(true)
{
for (int status = 0; status < EDIT_COLOR_MAX; status++)
__pDefaultBackgroundEffectBitmap = null;
}
- if (__pDefaultFocusBitmap)
- {
- delete __pDefaultFocusBitmap;
- __pDefaultFocusBitmap = null;
- }
-
if (__pTextBlockEvent)
{
delete __pTextBlockEvent;
if (__pScrollPanelEvent)
{
+ DetachScrollPanelEvent();
+
delete __pScrollPanelEvent;
__pScrollPanelEvent = null;
}
result r = E_SUCCESS;
_VisualElement* pBaseVisualElement = null;
- _Edit* pEdit = new (std::nothrow) _Edit;
- SysTryCatch(NID_UI_CTRL, pEdit, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ _Edit* pEdit = new (std::nothrow) _Edit();
+ SysTryCatch(NID_UI_CTRL, pEdit, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pBaseVisualElement = pEdit->GetVisualElement();
if (pBaseVisualElement)
__textSize = _pEditPresenter->GetTextSize();
- __pGestureFlick = new (std::nothrow) _TouchFlickGestureDetector;
- SysTryReturn(NID_UI_CTRL, __pGestureFlick, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create touch flick gesture.");
+ __pGestureFlick = new (std::nothrow) _TouchFlickGestureDetector();
+ SysTryReturn(NID_UI_CTRL, __pGestureFlick, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = AddGestureDetector(*__pGestureFlick);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture listener", GetErrorMessage(r));
r = __pGestureFlick->AddGestureListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture listener", GetErrorMessage(r));
- __pGestureLongPress = new (std::nothrow) _TouchLongPressGestureDetector;
- SysTryReturn(NID_UI_CTRL, __pGestureLongPress, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create touch long press gesture.");
+ __pGestureLongPress = new (std::nothrow) _TouchLongPressGestureDetector();
+ SysTryReturn(NID_UI_CTRL, __pGestureLongPress, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = AddGestureDetector(*__pGestureLongPress);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture detector", GetErrorMessage(r));
r = __pGestureLongPress->AddGestureListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture listener", GetErrorMessage(r));
- __pGestureTap = new (std::nothrow) _TouchTapGestureDetector;
- SysTryReturn(NID_UI_CTRL, __pGestureTap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create touch tap gesture.");
+ __pGestureTap = new (std::nothrow) _TouchTapGestureDetector();
+ SysTryReturn(NID_UI_CTRL, __pGestureTap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pGestureTap->SetTapInterval(EDIT_GESTURE_TAP_INTERVAL);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set TapInterval", GetErrorMessage(r));
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture listener", GetErrorMessage(r));
__pEditInternalTouchEventListener = new (std::nothrow) _EditInternalTouchEventListener(*this);
- SysTryReturn(NID_UI_CTRL, __pEditInternalTouchEventListener, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create internal touch listener.");
+ SysTryReturn(NID_UI_CTRL, __pEditInternalTouchEventListener, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = _UiEventManager::GetInstance()->AddTouchEventListener(*__pEditInternalTouchEventListener);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Unable to add internal event listener", GetErrorMessage(r));
__pTextAccessibilityElement->SetLabel(GetGuideText() + GetText());
}
- __pTextAccessibilityElement->SetTrait(L"Edit Field");
+ __pTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_EDIT_FIELD_M_NOUN_T_TTS");
__pTextAccessibilityElement->SetName(L"EditText");
pEditAccessibilityContainer->AddElement(*__pTextAccessibilityElement);
{
__pClearButtonTextAccessibilityElement = new _AccessibilityElement(true);
__pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF());
-// __pClearButtonTextAccessibilityElement->SetLabel(L"all clear");
+ __pClearButtonTextAccessibilityElement->SetLabel(L"clear all");
__pClearButtonTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
__pClearButtonTextAccessibilityElement->SetName(L"EditFieldClearButton");
pEditAccessibilityContainer->AddElement(*__pClearButtonTextAccessibilityElement);
bool fitToHorizontal = horizontalMode;
bool fitToVertical = verticalMode;
-
+ bool checkExtent = false;
if (fitToHorizontal)
{
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
if (dimension.width > newRect.width)
{
dimension.width = newRect.width;
+ checkExtent = true;
}
float height = pTextObject->GetTotalHeightF();
if (height <= newRect.height)
if (dimension.width > newRect.width)
{
dimension.width = newRect.width;
+ checkExtent = true;
}
dimension.height = GetBoundsF().height;
}
pTextObject->SetWrap(previousWrapType);
pTextObject->Compose();
+ if (checkExtent)
+ {
+ int maxWidth = -1;
+ int tempWidth = -1;
+ int totalLine = pTextObject->GetTotalLineCount();
+ if (totalLine >= 2)
+ {
+ for (int i = 0; i < totalLine; i++)
+ {
+ tempWidth = pTextObject->GetLineWidthAtF(i);
+ if (maxWidth < tempWidth)
+ {
+ maxWidth = tempWidth;
+ }
+ }
+ dimension.width = maxWidth;
+ }
+ }
+
if (fitToHorizontal)
{
dimension.width += textLeftMargin + textRightMargin;
{
__pClearButtonTextAccessibilityElement = new _AccessibilityElement(true);
__pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF());
-// __pClearButtonTextAccessibilityElement->SetLabel(L"all clear");
+ __pClearButtonTextAccessibilityElement->SetLabel(L"clear all");
__pClearButtonTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
__pClearButtonTextAccessibilityElement->SetName(L"EditFieldClearButton");
pEditAccessibilityContainer->AddElement(*__pClearButtonTextAccessibilityElement);
result r = E_SUCCESS;
Bitmap* pNewBitmap = _BitmapImpl::CloneN(bitmap);
- SysTryReturn(NID_UI_CTRL, pNewBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pNewBitmap, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
delete __pBackgroundBitmap[status];
__pBackgroundBitmap[status] = pNewBitmap;
}
result
+_Edit::AddClipboardShowTriggerEventListener(void)
+{
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ _Window* pWindow = null;
+
+ pWindow = pControlManager->GetCurrentFrame();
+
+ if (pWindow)
+ {
+ if (__pCurrentFrame == null)
+ {
+ __pCurrentFrame = dynamic_cast<_Frame*>(pWindow);
+
+ if (__pCurrentFrame)
+ {
+ SysLog(NID_UI_CTRL, "[ClipboardShow] FormActivation event is added.");
+ return __pCurrentFrame->AddFormActivationChangeEventListener(*this);
+ }
+ }
+
+ SysLog(NID_UI_CTRL, "[ClipboardShow] Already FormActivation event is added!!!!!!!");
+ return E_SUCCESS;
+ }
+ else
+ {
+ SysLog(NID_UI_CTRL, "[ClipboardShow] Current Frame is not exist!!!!!!");
+ return E_SYSTEM;
+ }
+}
+
+result
+_Edit::RemoveClipboardShowTriggerEventListener(void)
+{
+ result r = E_SUCCESS;
+
+ if (__pCurrentFrame)
+ {
+ r = __pCurrentFrame->RemoveFormActivationChangeEventListener(*this);
+ SysLog(NID_UI_CTRL, "[ClipboardShow] FormActivation event is deleted.");
+ __pCurrentFrame = null;
+ }
+
+ return r;
+}
+
+result
_Edit::AddExpandableEditAreaEventListener(const _IExpandableEditAreaEventListener& listener)
{
if (__pExpandableEditAreaEvent == null)
return E_SUCCESS;
}
+void
+_Edit::OnScrollStopped(Tizen::Ui::_Control& source)
+{
+ _pEditPresenter->OnScrollStopped(source);
+
+ return;
+}
+
+void
+_Edit::OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition)
+{
+ _pEditPresenter->OnScrollPositionChanged(source, scrollPosition);
+
+ return;
+}
+
+void
+_Edit::OnFormActivated(const Tizen::Ui::Controls::_Form& source)
+{
+}
+
+void
+_Edit::OnFormDeactivated(const Tizen::Ui::Controls::_Form& source)
+{
+}
+
+void
+_Edit::OnFormActivating(const Tizen::Ui::Controls::_Form& source)
+{
+}
+
+void
+_Edit::OnFormDeactivating(const Tizen::Ui::Controls::_Form& source)
+{
+ SysLog(NID_UI_CTRL, "[ClipboardShow] OnFormDeactivating is called!!!!!!!");
+
+ if (_pEditPresenter)
+ {
+ if (_pEditPresenter->GetParentForm() == &source)
+ {
+ SysLog(NID_UI_CTRL, "[ClipboardShow] OnFormDeactivating- ChangeToUnbindState is called!!!!!!!");
+ _pEditPresenter->ChangeToUnbindState(false);
+ }
+ }
+}
+
result
_Edit::AddActionEventListener(const _IActionEventListener& listener)
{
SysTryReturn(NID_UI_CTRL, (HasParent() && GetParent()), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The keypad couldn't be shown.");
SysTryReturn(NID_UI_CTRL, (IsKeypadEnabled() && (__inputStyle == INPUT_STYLE_OVERLAY)), E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] The keypad couldn't be shown.");
- if (IsInternalFocused())
+ if (_pEditPresenter->IsCurrentFocused())
{
return _pEditPresenter->ShowKeypad(false);
}
void
_Edit::OnDraw(void)
{
- Canvas* pCanvas = GetCanvasN();
- SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance.");
-
- _pEditPresenter->Draw(*pCanvas);
-
- delete pCanvas;
+ _pEditPresenter->Draw();
return;
}
bool
_Edit::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo)
{
+ __isTouchMoving = false;
+
return _pEditPresenter->OnTouchCanceled(source, touchinfo);
}
{
PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, this);
}
+
+ bool result = _pEditPresenter->OnTouchReleased(source, touchinfo);
+
__isTouchMoving = false;
- return _pEditPresenter->OnTouchReleased(source, touchinfo);
+ return result;
}
bool
{
float xDistance = 0.0f;
float yDistance = 0.0f;
- gesture.GetDistance(xDistance, yDistance);
- FloatPoint flickPoint(xDistance, yDistance);
+ if (gesture.GetDirection() == _FLICK_DIRECTION_UP || gesture.GetDirection() == _FLICK_DIRECTION_DOWN)
+ {
+ gesture.GetDistance(xDistance, yDistance);
+ FloatPoint flickPoint(xDistance, yDistance);
- _pEditPresenter->InitializeCopyPasteManager();
+ _pEditPresenter->InitializeCopyPasteManager();
- _pEditPresenter->StartFlickAnimation(flickPoint, gesture.GetDuration());
+ _pEditPresenter->StartFlickAnimation(flickPoint, gesture.GetDuration());
+ }
+ else
+ {
+ return false;
+ }
return true;
}
bool
_Edit::OnFocusLost(const _Control& source)
{
+ __isTouchMoving = false;
__internalFocus = false;
_pEditPresenter->OnFocusLost();
_Control::OnFocusLost(source);
}
}
- if (this == dynamic_cast< const _Edit* >(&control))
+ _pEditPresenter->SetKeypadEventSkipped(!enableState);
+
+ if (__inputStyle != INPUT_STYLE_FULLSCREEN && !IsViewModeEnabled())
{
- _pEditPresenter->SetKeypadEventSkipped(!enableState);
- if (__inputStyle != INPUT_STYLE_FULLSCREEN)
- {
- _pEditPresenter->SetCursorDisabled(!enableState);
- }
+ _pEditPresenter->SetCursorDisabled(!enableState);
}
Invalidate();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
r = GET_BITMAP_CONFIG_N(SEARCHBAR::EDIT_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(SEARCHBAR::EDIT_BG_FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultFocusBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
_pEditPresenter->SetSearchBarFlag(true);
return r;
}
-void
-_Edit::SetSearchFieldFocus(bool state)
-{
- __isSearchFieldFocused = state;
- return;
-}
-
-bool
-_Edit::IsSearchFieldFocused(void) const
-{
- return __isSearchFieldFocused;
-}
-
Bitmap*
_Edit::GetDefaultBackgroundBitmap(EditStatus status) const
{
return __pDefaultBackgroundEffectBitmap;
}
-Bitmap*
-_Edit::GetDefaultFocusBitmap(void) const
-{
- return __pDefaultFocusBitmap;
-}
-
bool
_Edit::IsSettingGuideTextColor(void) const
{
if (__pExpandableEditAreaEvent)
{
IEventArg* pEventArg = _ExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(status, newLineCount);
- SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pExpandableEditAreaEvent->Fire(*pEventArg);
}
if (__pScrollPanelEvent)
{
IEventArg* pEventArg = _ScrollPanelEvent::CreateScrollPanelEventArgN(eventstatus);
- SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _CoreScrollPanelEventArg.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pScrollPanelEvent->Fire(*pEventArg);
}
if (__pKeypadEvent)
{
IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(keypadAction, eventstatus);
- SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_pEditPresenter->SetSentKeypadEvent(eventstatus);
if (__pTextEvent && IsTextEventEnabled())
{
IEventArg* pEventArg = _TextEvent::CreateTextEventArgN(textEventStatus);
- SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pTextEvent->Fire(*pEventArg);
}
if (__pTextBlockEvent)
{
IEventArg* pTextBlockEventArg = _TextBlockEvent::CreateTextBlockEventArgN(start, end);
- SysTryReturn(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _TextBlockEventArg.");
+ SysTryReturn(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pTextBlockEvent->Fire(*pTextBlockEventArg);
}
if (__pLinkEvent)
{
IEventArg* pLinkEventArg = _LinkEvent::CreateLinkEventArgN(text, linkType, link);
- SysTryReturn(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturn(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pLinkEvent->Fire(*pLinkEventArg);
}
if (__pLanguageEvent)
{
IEventArg* pLanguageEventArg = _LanguageEvent::CreateLanguageEventArgN(prevLanguageCode, currentLanguageCode);
- SysTryReturn(NID_UI_CTRL, pLanguageEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pLanguageEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pLanguageEvent->Fire(*pLanguageEventArg);
}
void
_Edit::OnDrawFocus(void)
{
- Canvas* pCanvas = GetCanvasN();
- SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance.");
+ Invalidate();
- _pEditPresenter->DrawFocusRing(*pCanvas);
+ return;
+}
- delete pCanvas;
+_Window*
+_Edit::OnDragAndDropBeginning(void)
+{
+ return _pEditPresenter->OnDragAndDropBeginning();
+}
+void
+_Edit::OnDragAndDropDropping(void)
+{
+ return _pEditPresenter->OnDragAndDropDropping();
+}
- return;
+void
+_Edit::OnDragAndDropEntered(void)
+{
+ return _pEditPresenter->OnDragAndDropEntered();
+}
+
+void
+_Edit::OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position)
+{
+ return _pEditPresenter->OnDragAndDropMoved(position);
+}
+
+void
+_Edit::OnDragAndDropLeft(void)
+{
+ return _pEditPresenter->OnDragAndDropLeft();
+}
+
+void
+_Edit::OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem)
+{
+ return _pEditPresenter->OnDragAndDropDropped(dragAndDropItem);
}
_AccessibilityElement*
return __isTextEventEnabled;
}
+bool
+_Edit::IsTouchMoving(void) const
+{
+ return __isTouchMoving;
+}
+
}}} // Tizen::Ui::Controls
result
_EditAreaImpl::Initialize(InputStyle inputStyle, int limitLength)
{
- SysTryReturnResult(NID_UI_CTRL, (limitLength > 0), E_INVALID_ARG, "[E_INVALID_ARG] The limit length must be more than 0.");
+ SysTryReturnResult(NID_UI_CTRL, (limitLength > 0), E_INVALID_ARG, "The limit length must be more than 0.");
result r = __pEdit->Initialize(EDIT_STYLE_NORMAL, inputStyle, limitLength);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
}
__pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pEdit->AddActionEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicLanguageEvent = _PublicLanguageEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pEdit->AddLanguageEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicKeypadEvent = _PublicKeypadEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pEdit->AddKeypadEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicTextBlockEvent = _PublicTextBlockEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pEdit->AddTextBlockEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicTextEvent = _PublicTextEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pEdit->AddTextEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicScrollPanelEvent = _PublicScrollPanelEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicScrollPanelEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicScrollPanelEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
if (inputStyle == INPUT_STYLE_OVERLAY)
{
}
__pPublicLinkEvent = _PublicLinkEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicLinkEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicLinkEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pEdit->AddUiLinkEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
EditInputModeCategory tempInputMode = EDIT_INPUTMODE_ALPHA;
for (int i = 0; i < INPUT_MODE_CATEGORY_MAX; i++)
{
- if ( (categories & tempInputMode) && (tempInputMode != EDIT_INPUTMODE_PREDICTIVE))
+ if ((categories & tempInputMode) && (tempInputMode != EDIT_INPUTMODE_PREDICTIVE))
{
newInputMode = tempInputMode;
break;
if (__pPublicTextEvent != null)
{
IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CHANGED);
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicTextEvent->Fire(*pEventArg);
}
if (__pPublicTextEvent != null)
{
IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CANCELED);
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicTextEvent->Fire(*pEventArg);
}
if (__pPublicActionEvent != null)
{
IEventArg* pActionEventArg = _PublicActionEvent::CreateActionEventArgN(actionId);
- SysTryReturnVoidResult(NID_UI_CTRL, pActionEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pActionEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicActionEvent->Fire(*pActionEventArg);
}
if (__pPublicLinkEvent != null)
{
IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(text, linkType, link);
- SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicLinkEvent->Fire(*pLinkEventArg);
}
if (__pPublicTextBlockEvent != null)
{
IEventArg* pTextBlockEventArg = _PublicTextBlockEvent::CreateTextBlockEventArgN(start, end);
- SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _TextBlockEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicTextBlockEvent->Fire(*pTextBlockEventArg);
}
{
IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CREATED);
- SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicKeypadEvent->Fire(*pKeypadEventArg);
}
{
IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_OPEN);
- SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicKeypadEvent->Fire(*pKeypadEventArg);
}
{
IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CLOSE);
- SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicKeypadEvent->Fire(*pKeypadEventArg);
}
{
IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
- SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicKeypadEvent->Fire(*pKeypadEventArg);
}
IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), onKeypadAction, KEYPAD_EVENT_STATUS_ENTERACTION);
- SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicKeypadEvent->Fire(*pKeypadEventArg);
}
if (__pPublicLanguageEvent)
{
IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage);
- SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicLanguageEvent->Fire(*pKLanguageEventArg);
}
if (__pPublicScrollPanelEvent != null)
{
IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OVERLAY_CONTROL_CREATED);
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicScrollPanelEvent->Fire(*pEventArg);
}
if (__pPublicScrollPanelEvent != null)
{
IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OVERLAY_CONTROL_OPENED);
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicScrollPanelEvent->Fire(*pEventArg);
}
if (__pPublicScrollPanelEvent != null)
{
IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OVERLAY_CONTROL_CLOSED);
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicScrollPanelEvent->Fire(*pEventArg);
}
if (__pPublicScrollPanelEvent != null)
{
IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OTHER_CONTROL_SELECTED);
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicScrollPanelEvent->Fire(*pEventArg);
}
_EditCopyPasteEvent::CreateInstanceN(const _EditCopyPasteManager& source)
{
_EditCopyPasteEvent* pCoreCopyPasteEvent = new (std::nothrow) _EditCopyPasteEvent(source);
- SysTryReturn(NID_UI_CTRL, pCoreCopyPasteEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pCoreCopyPasteEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
if (IsFailed(GetLastResult()))
{
_EditCopyPasteEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
{
_IEditCopyPasteEventListener* pCopyPasteEventListener = dynamic_cast <_IEditCopyPasteEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pCopyPasteEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pCopyPasteEventListener != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid listener is given.");
_EditCopyPasteEventArg* pCopyPasteEventArg = dynamic_cast <_EditCopyPasteEventArg*>(const_cast<IEventArg*>(&arg));
- SysTryReturnVoidResult(NID_UI_CTRL, pCopyPasteEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pCopyPasteEventArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid Event Argument is given.");
CoreCopyPasteStatus status = pCopyPasteEventArg->GetStatus();
CoreCopyPasteAction action = pCopyPasteEventArg->GetAction();
_EditCopyPasteEvent::CreateCopyPasteEventArgN(CoreCopyPasteStatus status, CoreCopyPasteAction action)
{
_EditCopyPasteEventArg* pEventArg = new (std::nothrow) _EditCopyPasteEventArg(status, action);
- SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pEventArg;
}
* @file FUiCtrl_EditCopyPasteManager.cpp
* @brief This is the implementation file for the _EditCopyPasteManager class.
*/
+
#include "FUiAnim_ControlVisualElement.h"
#include "FUiAnim_VisualElementImpl.h"
#include <appsvc/appsvc.h>
const int COPY_PASTE_SEARCH_ID = 237;
class _EditCopyPasteMagnifier
- : public _Control
+ : public _Window
{
public:
- _EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, int handlerCursorPos);
+ _EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, int handlerCursorPos);
virtual ~_EditCopyPasteMagnifier(void);
- static _EditCopyPasteMagnifier* CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow);
+ static _EditCopyPasteMagnifier* CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager);
virtual void OnDraw(void);
void CaptureTextArea(Canvas& canvas);
void MoveMagnifier(const FloatPoint& point, int handlerCursorPos);
Bitmap* GetMagnifierBitmap(void) const;
+ virtual result OnAttachedToMainTree(void);
void SetRowColumnIndex(int rowIndex, int columnIndex);
private:
Bitmap* __pMagnifierMaskBitmap;
_VisualElement* __pRoot;
int __handlerCursorPos;
- FloatRectangle __windowBounds;
int __rowIndex;
int __columnIndex;
- _Window* __pParentWindow;
};
-_EditCopyPasteMagnifier::_EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, int handlerCursorPos)
+_EditCopyPasteMagnifier::_EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, int handlerCursorPos)
: __pCopyPasteManager(pCopyPasteManager)
, __pMagnifierBitmap(null)
, __pMagnifierMaskBitmap(null)
, __pRoot(null)
, __handlerCursorPos(handlerCursorPos)
- , __windowBounds(0.0f, 0.0f, 0.0f, 0.0f)
, __rowIndex(-1)
, __columnIndex(-1)
- , __pParentWindow(pParentWindow)
{
AcquireHandle();
+ __pRoot = GetVisualElement();
+ __pRoot->SetSurfaceOpaque(false);
GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_MAGNIFIER, BITMAP_PIXEL_FORMAT_ARGB8888, __pMagnifierBitmap);
GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_MAGNIFIER_MASK, BITMAP_PIXEL_FORMAT_ARGB8888, __pMagnifierMaskBitmap);
-
- if (__pParentWindow)
- {
- __pParentWindow->AttachChild(*this);
- }
-
- _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*GetVisualElement());
- pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 5);
}
_EditCopyPasteMagnifier::~_EditCopyPasteMagnifier(void)
{
- if (__pParentWindow)
- {
- __pParentWindow->DetachChild(*this);
- }
if (__pMagnifierBitmap)
{
delete __pMagnifierBitmap;
}
_EditCopyPasteMagnifier*
-_EditCopyPasteMagnifier::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow)
+_EditCopyPasteMagnifier::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager)
{
- _EditCopyPasteMagnifier* pCopyPasteMagnifier = new (std::nothrow) _EditCopyPasteMagnifier(pCopyPasteManager, pParentWindow, handlerCursorPos);
- SysTryReturn(NID_UI_CTRL, pCopyPasteMagnifier != null, null, E_OUT_OF_MEMORY, "pCopyPasteMagnifier is null");
+ _EditCopyPasteMagnifier* pCopyPasteMagnifier = new (std::nothrow) _EditCopyPasteMagnifier(pCopyPasteManager, handlerCursorPos);
+ SysTryReturn(NID_UI_CTRL, pCopyPasteMagnifier != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
FloatPoint cursorPoint(point);
FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f);
_ControlOrientation orientation = pEdit->GetOrientation();
Bitmap* pMagnifierBitmap = pCopyPasteMagnifier->GetMagnifierBitmap();
- SysTryReturn(NID_UI_CTRL, pMagnifierBitmap != null, null, E_OUT_OF_MEMORY, "pMagnifierBitmap is null");
+ SysTryReturn(NID_UI_CTRL, pMagnifierBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ result r = pCopyPasteMagnifier->CreateRootVisualElement(_WINDOW_TYPE_VE);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ pCopyPasteMagnifier->SetActivationEnabled(false);
GET_SHAPE_CONFIG(EDIT::COPYPASTE_MAGNIFIER_WIDTH, orientation, width);
GET_SHAPE_CONFIG(EDIT::COPYPASTE_MAGNIFIER_HEIGHT, orientation, height);
{
bounds.y = 0.0f;
}
- bounds.x -= (pParentWindow->GetAbsoluteBoundsF(true).x + pParentWindow->GetClientBoundsF().x);
- bounds.y -= (pParentWindow->GetAbsoluteBoundsF(true).y + pParentWindow->GetClientBoundsF().y);
+ pCopyPasteMagnifier->Open();
pCopyPasteMagnifier->SetBounds(bounds);
return pCopyPasteMagnifier;
+
+CATCH:
+ pCopyPasteMagnifier->Close();
+ delete pCopyPasteMagnifier;
+
+ return null;
+}
+
+result
+_EditCopyPasteMagnifier::OnAttachedToMainTree(void)
+{
+ result r = E_SUCCESS;
+
+ if (GetOwner() == null)
+ {
+ _Edit* pEdit = __pCopyPasteManager->GetEdit();
+ SysTryReturnResult(NID_UI_CTRL, pEdit, GetLastResult(), "Unable to get pEdit.");
+
+ _Window* pWindow = null;
+ _Control* pControlCore = null;
+
+ for (pControlCore = pEdit->GetParent(); pWindow == null; pControlCore = pControlCore->GetParent())
+ {
+ if (pControlCore == null)
+ {
+ break;
+ }
+
+ pWindow = dynamic_cast<_Window*>(pControlCore);
+ if (pWindow)
+ {
+ SetOwner(pWindow);
+ return r;
+ }
+ }
+
+ _EditPresenter* pEditPresenter = pEdit->GetPresenter();
+ SysTryReturnResult(NID_UI_CTRL, pEdit, GetLastResult(), "Unable to get pEditPresenter.");
+
+ _Form* pParentForm = pEditPresenter->GetParentForm();
+ if (pParentForm)
+ {
+ SetOwner(pParentForm);
+ }
+ else
+ {
+ _Form* pForm = null;
+ _Frame* pCurrentFrame = dynamic_cast <_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
+ if (pCurrentFrame)
+ {
+ pForm = pCurrentFrame->GetCurrentForm();
+ if (pForm)
+ {
+ SetOwner(pForm);
+ }
+ else
+ {
+ SetOwner(pCurrentFrame);
+ }
+ }
+ }
+ }
+
+ return r;
}
void
_VisualElementImpl* pEditVisualElementImpl = null;
_Edit* pEdit = __pCopyPasteManager->GetEdit();
- SysTryReturnVoidResult(NID_UI_CTRL, pEdit, E_INVALID_STATE, "pEdit is null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEdit, E_INVALID_STATE, "[E_INVALID_STATE] pEdit is null.");
_VisualElement* pEditVisualElement = pEdit->GetVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement, E_INVALID_STATE, "pEditVisualElement is null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement, E_INVALID_STATE, "[E_INVALID_STATE] pEditVisualElement is null.");
_EditPresenter* pEditPresenter = pEdit->GetPresenter();
- SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "pEditPresenter is null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "[E_INVALID_STATE] pEditPresenter is null.");
- pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorBounds,__handlerCursorPos);
+ if (__rowIndex >= 0 && __columnIndex >= 0)
+ {
+ pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorBounds, __rowIndex, __columnIndex);
+ }
+ else
+ {
+ pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorBounds,__handlerCursorPos);
+ }
GET_SHAPE_CONFIG(EDIT::COPYPASTE_MAGNIFIER_CAPTURE_WIDTH, pEdit->GetOrientation(), captureWidth);
GET_SHAPE_CONFIG(EDIT::COPYPASTE_MAGNIFIER_CAPTURE_HEIGHT, pEdit->GetOrientation(), captureHeight);
GET_SHAPE_CONFIG(EDIT::COPYPASTE_MAGNIFIER_CAPTURE_POSITION_Y, pEdit->GetOrientation(), capturePosY);
FloatRectangle textObjectBounds = pEditPresenter->GetTextBoundsF();
- captureBounds.x = cursorBounds.x - captureWidth/2.0f;
+
+ // textobject minimum width/height
+ if (pEdit->GetBoundsF().width < textObjectBounds.width)
+ {
+ textObjectBounds.width = pEdit->GetBoundsF().width - pEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN) - pEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN);
+ }
+
+ captureBounds.x = cursorBounds.x + cursorBounds.width/2.0f - captureWidth/2.0f;
captureBounds.y = cursorBounds.y + cursorBounds.height/2.0f - captureHeight/2.0f;
captureBounds.width = captureWidth;
captureBounds.height = captureHeight;
- captureBounds = textObjectBounds.GetIntersection(captureBounds);
if ((cursorBounds.x + cursorBounds.width/2.0f) - captureBounds.x < captureWidth/2.0f)
{
}
Bitmap* pOriginalBitmp = null;
- Canvas* pCanvas = new (std::nothrow) Canvas;
- SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "pCanvas is null.");
+ Canvas* pCanvas = new (std::nothrow) Canvas();
+ SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pCanvas->Construct(FloatRectangle(0, 0, captureBounds.width, captureBounds.height));
SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r));
pEditVisualElementImpl = _VisualElementImpl::GetInstance(*pEditVisualElement);
- pEditVisualElementImpl->Capture(*pCanvas, CoordinateSystem::AlignToDevice(FloatRectangle(0, 0, captureBounds.width, captureBounds.height)), CoordinateSystem::AlignToDevice(captureBounds), true);
+ if (!(pEdit->GetEditStyle() & EDIT_STYLE_TOKEN))
+ {
+ pEditVisualElementImpl->Capture(*pCanvas, CoordinateSystem::AlignToDevice(FloatRectangle(0, 0, captureBounds.width, captureBounds.height)), CoordinateSystem::AlignToDevice(captureBounds), true);
+ }
+ else
+ {
+ //cursor not getting copied due to AlignToDevice of captureBounds in case of token.
+ pEditVisualElementImpl->Capture(*pCanvas, FloatRectangle(0, 0, captureBounds.width, captureBounds.height), captureBounds, true);
+ }
- pOriginalBitmp = new (std::nothrow) Bitmap;
- SysTryCatch(NID_UI, pOriginalBitmp != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ pOriginalBitmp = new (std::nothrow) Bitmap();
+ SysTryCatch(NID_UI, pOriginalBitmp != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pOriginalBitmp->Construct(*pCanvas, CoordinateSystem::AlignToDevice(FloatRectangle(0, 0, captureBounds.width, captureBounds.height)));
{
bounds.y = 0.0f;
}
- bounds.x -= (__pParentWindow->GetAbsoluteBoundsF(true).x + __pParentWindow->GetClientBoundsF().x);
- bounds.y -= (__pParentWindow->GetAbsoluteBoundsF(true).y + __pParentWindow->GetClientBoundsF().y);
SetBounds(bounds);
Invalidate();
}
*
*/
class _EditCopyPasteHandler
- : public _Control
+ : public _Window
, virtual public IEventListener
, virtual public _IUiEventListener
, virtual public _IUiEventPreviewer
* This is the default class constructor.
*
*/
- _EditCopyPasteHandler(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler);
- _EditCopyPasteHandler(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler);
+ _EditCopyPasteHandler(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler);
+ _EditCopyPasteHandler(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler);
/**
* This is the default class destructor.
HANDLER_DIRECTION_REVERSE_3,//horizontal vertical reverse
};
- static _EditCopyPasteHandler* CreateInstanceN(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler = true);
- static _EditCopyPasteHandler* CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler = true);
+ static _EditCopyPasteHandler* CreateInstanceN(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler = true);
+ static _EditCopyPasteHandler* CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler = true);
int GetHandlerCursorPosition(void) const;
+ void SetHandlerRowColumnIndex(int rowIndex, int columnIndex);
void GetHandlerRowColumnIndex(int& rowIndex, int& columnIndex) const;
void SetHandlerCursorPosition(int handlerCursorPos);
void AdjustBounds(void);
virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
virtual bool IsActivatedOnOpen(void) const;
virtual void OnChangeLayout(_ControlOrientation orientation);
+ virtual result OnAttachedToMainTree(void);
+
private:
_EditCopyPasteHandler(const _EditCopyPasteHandler& value);
bool __reverseCheck;
int __handlerCursorPos;
bool __isTouchPressed;
- FloatRectangle __windowBounds;
HandlerDirection __handlerDirection;
bool __singleHandler;
_EditCopyPasteMagnifier* __pCopyPasteMagnifier;
bool __isTouchMoving;
int __rowIndex;
int __columnIndex;
- _Window* __pParentWindow;
}; // _EditCopyPasteHandler
Bitmap*
SysTryReturn(NID_UI_CTRL, pEditPresenter, false, E_INVALID_STATE, "[E_INVALID_STATE] pEditPresenter is null.\n");
FloatRectangle cursorBounds(0.0f, 0.0f, 0.0f, 0.0f);
- if (__rowIndex == -1 && __columnIndex == -1)
+ if (__rowIndex >= 0 && __columnIndex >= 0)
{
- pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorBounds);
+ pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorBounds);
}
else
{
- pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorBounds);
+ pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorBounds);
}
- __pCopyPasteMagnifier = _EditCopyPasteMagnifier::CreateInstanceN(FloatPoint(cursorBounds.x, cursorBounds.y), __handlerCursorPos, __pCopyPasteManager, __pParentWindow);
+ __pCopyPasteMagnifier = _EditCopyPasteMagnifier::CreateInstanceN(FloatPoint(cursorBounds.x, cursorBounds.y), __handlerCursorPos, __pCopyPasteManager);
SysTryReturn(NID_UI_CTRL, __pCopyPasteMagnifier, false, E_INVALID_STATE, "[E_INVALID_STATE] __pCopyPasteMagnifier is null.\n");
__pCopyPasteMagnifier->SetRowColumnIndex(__rowIndex, __columnIndex);
{
if (__pCopyPasteMagnifier)
{
+ __pCopyPasteMagnifier->Close();
delete __pCopyPasteMagnifier;
__pCopyPasteMagnifier = null;
}
if (__pCopyPasteMagnifier)
{
_Edit* pEdit = __pCopyPasteManager->GetEdit();
- SysTryReturnVoidResult(NID_UI_CTRL, pEdit, E_INVALID_STATE, "pEdit is null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEdit, E_INVALID_STATE, "[E_INVALID_STATE] pEdit is null.");
_EditPresenter* pEditPresenter = pEdit->GetPresenter();
- SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "pEditPresenter is null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "[E_INVALID_STATE] pEditPresenter is null.");
FloatRectangle cursorBounds(0.0f, 0.0f, 0.0f, 0.0f);
- if (__rowIndex == -1 && __columnIndex == -1)
+ if (__rowIndex >= 0 && __columnIndex >= 0)
{
- pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorBounds);
+ pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorBounds);
}
else
{
- pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorBounds);
- __pCopyPasteMagnifier->SetRowColumnIndex(__rowIndex, __columnIndex);
+ pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorBounds);
}
+ __pCopyPasteMagnifier->SetRowColumnIndex(__rowIndex, __columnIndex);
__pCopyPasteMagnifier->MoveMagnifier(FloatPoint(cursorBounds.x, cursorBounds.y), __handlerCursorPos);
}
}
}
}
-_EditCopyPasteHandler::_EditCopyPasteHandler(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler)
+_EditCopyPasteHandler::_EditCopyPasteHandler(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler)
: __pRoot(null)
, __pHandlerBitmap(null)
, __touchPressedPoint(0.0f, 0.0f)
, __reverseCheck(false)
, __handlerCursorPos(handlerCursorPos)
, __isTouchPressed(false)
- , __windowBounds(0.0f, 0.0f, 0.0f, 0.0f)
, __handlerDirection(HANDLER_DIRECTION_NONE)
, __singleHandler(false)
, __pCopyPasteMagnifier(null)
, __isTouchMoving(false)
, __rowIndex(-1)
, __columnIndex(-1)
- , __pParentWindow(pParentWindow)
{
+ AcquireHandle();
+
+ __pRoot = GetVisualElement();
+ __pRoot->SetSurfaceOpaque(false);
+
Point handlerPoint(point);
if (singleHandler)
FloatRectangle bounds(handlerPoint.x, handlerPoint.y, __pHandlerBitmap->GetWidth(), __pHandlerBitmap->GetHeight());
}
-_EditCopyPasteHandler::_EditCopyPasteHandler(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler)
+_EditCopyPasteHandler::_EditCopyPasteHandler(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler)
: __pRoot(null)
, __pHandlerBitmap(null)
, __touchPressedPoint(0.0f, 0.0f)
, __reverseCheck(false)
, __handlerCursorPos(handlerCursorPos)
, __isTouchPressed(false)
- , __windowBounds(0.0f, 0.0f, 0.0f, 0.0f)
, __handlerDirection(HANDLER_DIRECTION_NONE)
, __singleHandler(false)
, __pCopyPasteMagnifier(null)
, __isTouchMoving(false)
, __rowIndex(-1)
, __columnIndex(-1)
- , __pParentWindow(pParentWindow)
{
+ AcquireHandle();
+
//To do .....
//Point handlerPoint(_CoordinateSystemUtils::ConvertToInteger(point));
}
_EditCopyPasteHandler*
-_EditCopyPasteHandler::CreateInstanceN(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler)
+_EditCopyPasteHandler::CreateInstanceN(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler)
{
- _EditCopyPasteHandler* pCopyPasteHandler = new (std::nothrow) _EditCopyPasteHandler(point, handlerCursorPos, pCopyPasteManager, pParentWindow, singleHandler, leftHandler);
- SysTryReturn(NID_UI_CTRL, pCopyPasteHandler != null, null, E_OUT_OF_MEMORY, "pContextMenu is null");
+ _EditCopyPasteHandler* pCopyPasteHandler = new (std::nothrow) _EditCopyPasteHandler(point, handlerCursorPos, pCopyPasteManager, singleHandler, leftHandler);
+ SysTryReturn(NID_UI_CTRL, pCopyPasteHandler != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
Point handlerPoint(point);
Rectangle bounds(0, 0, 0, 0);
Bitmap* pHandlerBitmap = pCopyPasteHandler->GetHandlerBitmap();
+ result r = pCopyPasteHandler->CreateRootVisualElement(_WINDOW_TYPE_VE);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ pCopyPasteHandler->SetActivationEnabled(false);
+
if (singleHandler)
{
handlerPoint.x = handlerPoint.x - (pHandlerBitmap->GetWidth() / 2);
bounds.width = pHandlerBitmap->GetWidth();
bounds.height = pHandlerBitmap->GetHeight();
- bounds.x -= pParentWindow->GetAbsoluteBounds(true).x;
- bounds.y -= pParentWindow->GetAbsoluteBounds(true).y;
-
+ pCopyPasteHandler->Open(false);
pCopyPasteHandler->SetBounds(bounds);
pCopyPasteHandler->CheckReverseStatus();
- pCopyPasteHandler->AcquireHandle();
+ pCopyPasteHandler->AdjustBounds();
return pCopyPasteHandler;
+
+CATCH:
+ pCopyPasteHandler->Close();
+ delete pCopyPasteHandler;
+
+ return null;
}
_EditCopyPasteHandler*
-_EditCopyPasteHandler::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, _Window* pParentWindow, bool singleHandler, bool leftHandler)
+_EditCopyPasteHandler::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler)
{
- _EditCopyPasteHandler* pCopyPasteHandler = new (std::nothrow) _EditCopyPasteHandler(point, handlerCursorPos, pCopyPasteManager, pParentWindow, singleHandler, leftHandler);
- SysTryReturn(NID_UI_CTRL, pCopyPasteHandler != null, null, E_OUT_OF_MEMORY, "pContextMenu is null");
+ _EditCopyPasteHandler* pCopyPasteHandler = new (std::nothrow) _EditCopyPasteHandler(point, handlerCursorPos, pCopyPasteManager, singleHandler, leftHandler);
+ SysTryReturn(NID_UI_CTRL, pCopyPasteHandler != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
FloatPoint handlerPoint(point);
FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f);
Bitmap* pHandlerBitmap = pCopyPasteHandler->GetHandlerBitmap();
+ result r = pCopyPasteHandler->CreateRootVisualElement(_WINDOW_TYPE_VE);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ pCopyPasteHandler->SetActivationEnabled(false);
+
if (singleHandler)
{
handlerPoint.x = handlerPoint.x - (pHandlerBitmap->GetWidthF() / 2.0f);
bounds.width = pHandlerBitmap->GetWidthF();
bounds.height = pHandlerBitmap->GetHeightF();
- bounds.x -= (pParentWindow->GetAbsoluteBoundsF(true).x + pParentWindow->GetClientBoundsF().x);
- bounds.y -= (pParentWindow->GetAbsoluteBoundsF(true).y + pParentWindow->GetClientBoundsF().y);
+ pCopyPasteHandler->Open(false);
pCopyPasteHandler->SetBounds(bounds);
pCopyPasteHandler->CheckReverseStatus();
- pCopyPasteHandler->AcquireHandle();
+ pCopyPasteHandler->AdjustBounds();
return pCopyPasteHandler;
+
+CATCH:
+ pCopyPasteHandler->Close();
+ delete pCopyPasteHandler;
+
+ return null;
}
int
}
void
+_EditCopyPasteHandler::SetHandlerRowColumnIndex(int rowIndex, int columnIndex)
+{
+ __rowIndex = rowIndex;
+ __columnIndex = columnIndex;
+}
+
+void
_EditCopyPasteHandler::GetHandlerRowColumnIndex(int& rowIndex, int& columnIndex) const
{
rowIndex = __rowIndex;
_EditCopyPasteHandler::SetHandlerCursorPosition(int handlerCursorPos)
{
__handlerCursorPos = handlerCursorPos;
+ __rowIndex = -1;
+ __columnIndex = -1;
}
void
_EditCopyPasteHandler::AdjustBounds(void)
{
FloatRectangle cursorRect;
- FloatRectangle rect = GetAbsoluteBoundsF(true);
+ FloatRectangle rect = GetBoundsF();
FloatPoint checkPoint(0.0f, 0.0f);
_Edit* pEdit = __pCopyPasteManager->GetEdit();
_EditPresenter* pEditPresenter = pEdit->GetPresenter();
if (__singleHandler)
{
- if (__rowIndex == -1 && __columnIndex == -1)
+ if (__rowIndex >= 0 && __columnIndex >= 0)
{
- pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorRect);
+ pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorRect, false);
}
else
{
- pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorRect);
+ pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorRect, false);
}
rect.x = cursorRect.x - __pHandlerBitmap->GetWidthF()/2.0f;
rect.y = cursorRect.y + cursorRect.height;
- checkPoint = FloatPoint(cursorRect.x , cursorRect.y + cursorRect.height);
+
+ checkPoint = FloatPoint(cursorRect.x, cursorRect.y + cursorRect.height);
+
if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2)
{
rect.y -= (cursorRect.height + __pHandlerBitmap->GetHeightF());
}
else
{
- if (__rowIndex == -1 && __columnIndex == -1)
+ if (__rowIndex >= 0 && __columnIndex >= 0)
{
- pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorRect);
+ pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorRect, false);
}
else
{
- pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorRect);
+ pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorRect, false);
}
rect.x = cursorRect.x;
if (visibleState && !GetVisibleState())
{
SetVisibleState(true);
+ Open();
}
else if (!visibleState && GetVisibleState())
{
SetVisibleState(false);
+ Close();
}
}
- rect.x -= (__pParentWindow->GetAbsoluteBoundsF(true).x + __pParentWindow->GetClientBoundsF().x);
- rect.y -= (__pParentWindow->GetAbsoluteBoundsF(true).y + __pParentWindow->GetClientBoundsF().y);
+
+ if (__singleHandler && pEditPresenter->IsViewModeEnabled())
+ {
+ SetVisibleState(false);
+ }
+
SetBounds(rect);
- Invalidate();
return;
}
else
{
__pCopyPasteMagnifier->SetVisibleState(true);
- __pCopyPasteMagnifier->Invalidate();
+ __pCopyPasteMagnifier->Open();
}
#endif
__touchPressedPoint = touchinfo.GetCurrentPosition();
_ControlManager* pControlManager = _ControlManager::GetInstance();
_Edit* pEdit = __pCopyPasteManager->GetEdit();
_ControlOrientation orientation = pEdit->GetOrientation();
- FloatRectangle rect = GetAbsoluteBoundsF(true);
+ FloatRectangle rect = GetBoundsF();
FloatRectangle cursorAbsBounds = __pCopyPasteManager->GetCursorBoundsF(true);
float clipboardHeight = 0.0f;
FloatRectangle keypadBounds(0.0f, 0.0f, 0.0f, 0.0f);
float adjustHeight = 0.0f;
_EditPresenter* pEditPresenter = pEdit->GetPresenter();
- SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "pEditPresenter is null.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "[E_INVALID_STATE] pEditPresenter is null.\n");
clipboardHeight = pEditPresenter->GetClipboardHeight();
pEditPresenter->GetKeypadBoundsEx(keypadBounds);
rect.y -= (cursorAbsBounds.height + rect.height);
__reverseCheck = true;
ChangeHandlerBitmap();
- rect.x -= (__pParentWindow->GetAbsoluteBoundsF(true).x + __pParentWindow->GetClientBoundsF().x);
- rect.y -= (__pParentWindow->GetAbsoluteBoundsF(true).y + __pParentWindow->GetClientBoundsF().y);
SetBounds(rect);
}
else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && ((cursorAbsBounds.y + cursorAbsBounds.height + rect.height) <= screenSize.height))
rect.y += (cursorAbsBounds.height + rect.height);
__reverseCheck = true;
ChangeHandlerBitmap();
- rect.x -= (__pParentWindow->GetAbsoluteBoundsF(true).x + __pParentWindow->GetClientBoundsF().x);
- rect.y -= (__pParentWindow->GetAbsoluteBoundsF(true).y + __pParentWindow->GetClientBoundsF().y);
SetBounds(rect);
}
return;
__reverseCheck = true;
}
}
- rect.x -= (__pParentWindow->GetAbsoluteBoundsF(true).x + __pParentWindow->GetClientBoundsF().x);
- rect.y -= (__pParentWindow->GetAbsoluteBoundsF(true).y + __pParentWindow->GetClientBoundsF().y);
SetBounds(rect);
}
if (__pCopyPasteMagnifier)
{
__pCopyPasteMagnifier->SetVisibleState(false);
+ __pCopyPasteMagnifier->Close();
}
_ContextMenu* pCopyPastePopup = __pCopyPasteManager->GetCopyPastePopup();
if (pCopyPastePopup && !__isTouchMoving)
__pCopyPasteManager->SendTextBlockEvent();
Invalidate();
__isTouchMoving = false;
+
+ if (!__singleHandler)
+ {
+ int leftRowIndex = -1;
+ int leftColumnIndex = -1;
+ int rightRowIndex = -1;
+ int rightColumnIndex = -1;
+ int leftHandlerCursorPos = -1;
+ int rightHandlerCursorPos = -1;
+
+ __pCopyPasteManager->GetHandlerRowColumnIndex(false, true, leftRowIndex, leftColumnIndex);
+ __pCopyPasteManager->GetHandlerRowColumnIndex(false, false, rightRowIndex, rightColumnIndex);
+ leftHandlerCursorPos = __pCopyPasteManager->GetHandlerCursorPosition(_EditCopyPasteManager::HANDLER_TYPE_LEFT);
+ rightHandlerCursorPos = __pCopyPasteManager->GetHandlerCursorPosition(_EditCopyPasteManager::HANDLER_TYPE_RIGHT);
+
+ _ContextMenu* pCopyPastePopup = __pCopyPasteManager->GetCopyPastePopup();
+
+ if(__leftHandler && __handlerCursorPos > rightHandlerCursorPos)
+ {
+ __pCopyPasteManager->CreateHandle(rightHandlerCursorPos, leftHandlerCursorPos, rightRowIndex, rightColumnIndex, leftRowIndex, leftColumnIndex);
+
+ if (pCopyPastePopup)
+ {
+ pCopyPastePopup->ReleaseTouchCapture();
+ }
+ }
+ else if (!__leftHandler && __handlerCursorPos < leftHandlerCursorPos)
+ {
+ __pCopyPasteManager->CreateHandle(rightHandlerCursorPos, leftHandlerCursorPos, rightRowIndex, rightColumnIndex, leftRowIndex, leftColumnIndex);
+ if (pCopyPastePopup)
+ {
+ pCopyPastePopup->ReleaseTouchCapture();
+ }
+ }
+ }
return true;
}
return true;
}
- if (__rowIndex == -1 && __columnIndex == -1)
+ if (__rowIndex >= 0 && __columnIndex >= 0)
{
- pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorRect,__handlerCursorPos);
- pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, absCursorRect);
+ pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorRect, __rowIndex, __columnIndex);
+ pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, absCursorRect);
}
else
{
- pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorRect, __rowIndex, __columnIndex);
- pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, absCursorRect);
+ pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorRect,__handlerCursorPos);
+ pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, absCursorRect);
}
FloatPoint absoluteTouchMovedPoint = FloatPoint(GetBoundsF().x + point.x, GetBoundsF().y + point.y);
else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2)
{
touchPoint.x = absoluteTouchMovedPoint.x + GetBoundsF().width/2.0f;
- touchPoint.y = absoluteTouchMovedPoint.y + GetBoundsF().height/2.0f;
+ touchPoint.y = absoluteTouchMovedPoint.y + GetBoundsF().height/2.0f;
}
else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_3)
{
}
}
- if (!__singleHandler)
- {
- int nextHandlerLine = -1;
- if (__leftHandler)
- {
- nextHandlerLine = pTextObject->GetLineIndexAtTextIndex(__pCopyPasteManager->GetHandlerCursorPosition(Tizen::Ui::Controls::_EditCopyPasteManager::HANDLER_TYPE_RIGHT));
- }
- else
- {
- nextHandlerLine = pTextObject->GetLineIndexAtTextIndex(__pCopyPasteManager->GetHandlerCursorPosition(Tizen::Ui::Controls::_EditCopyPasteManager::HANDLER_TYPE_LEFT));
- }
-
- if (curCursorLine == nextHandlerLine)
- {
- if (__leftHandler && absoluteTouchMovedPoint.y >= absCursorRect.y + absCursorRect.height)
- {
- touchPoint.y = absCursorRect.y + absCursorRect.height/2.0f;
- }
- else if (!__leftHandler && absoluteTouchMovedPoint.y <= absCursorRect.y + absCursorRect.height)
- {
- touchPoint.y = absCursorRect.y + absCursorRect.height/2.0f;
- }
- }
- }
-
touchPoint.x = touchPoint.x - absEditBounds.x - textObjectBounds.x;
touchPoint.y = touchPoint.y - absEditBounds.y - textObjectBounds.y;
{
return true;
}
+
if (!__singleHandler)
{
- if (!__pCopyPasteManager->CheckHandlePosition(__leftHandler, cursorPos))
+ _EditCopyPasteManager::HandlerType nextHandlerType = _EditCopyPasteManager::HANDLER_TYPE_MAX;
+ if (__leftHandler)
+ {
+ nextHandlerType = _EditCopyPasteManager::HANDLER_TYPE_RIGHT;
+ }
+ else
+ {
+ nextHandlerType = _EditCopyPasteManager::HANDLER_TYPE_LEFT;
+ }
+ int nextHandler = __pCopyPasteManager->GetHandlerCursorPosition(nextHandlerType);
+ if (totalLine == 1 && (nextHandler == 0 || nextHandler == pEditPresenter->GetTextLength()))
{
- if (totalLine == 1)
+ if (Math::Abs(nextHandler - cursorPos) == 1)
{
- _EditCopyPasteManager::HandlerType nextHandlerType = _EditCopyPasteManager::HANDLER_TYPE_MAX;
- if (__leftHandler)
- {
- nextHandlerType = _EditCopyPasteManager::HANDLER_TYPE_RIGHT;
- }
- else
- {
- nextHandlerType = _EditCopyPasteManager::HANDLER_TYPE_LEFT;
- }
- int nextHandler = __pCopyPasteManager->GetHandlerCursorPosition(nextHandlerType);
- if (Math::Abs(nextHandler - __handlerCursorPos) <= 1)
- {
- pTextObject->SetFirstDisplayLineIndexFromTextIndex(nextHandler);
- }
+ pTextObject->SetFirstDisplayLineIndexFromTextIndex(nextHandler);
}
+ }
+ if (nextHandler == cursorPos)
+ {
return true;
}
}
pTextObject->SetFirstDisplayLineIndexFromTextIndex(cursorPos);
__handlerCursorPos = cursorPos;
- __pCopyPasteManager->SetCursorPosition(__handlerCursorPos);
+
+ if (__rowIndex >= 0 && __columnIndex >= 0)
+ {
+ pEditPresenter->SetCursorPosition(cursorPos, __rowIndex, __columnIndex);
+ }
+ else
+ {
+ __pCopyPasteManager->SetCursorPosition(cursorPos);
+ }
+
pEditPresenter->ScrollPanelToCursorPosition(true);
if (!__singleHandler)
{
__pCopyPasteManager->RefreshBlock(__leftHandler);
- CheckReverseStatus();
}
else
{
- if (__rowIndex == -1 && __columnIndex == -1)
- {
- __pCopyPasteManager->SetCursorPosition(cursorPos);
- }
- else
- {
- pEditPresenter->SetCursorPosition(cursorPos, __rowIndex, __columnIndex);
- }
pEditPresenter->DrawText();
AdjustBounds();
- CheckReverseStatus();
}
+ CheckReverseStatus();
+ Invalidate();
MoveCopyPasteMagnifier();
return true;
return;
}
+result
+_EditCopyPasteHandler::OnAttachedToMainTree(void)
+{
+ result r = E_SUCCESS;
+
+ if (GetOwner() == null)
+ {
+ _Edit* pEdit = __pCopyPasteManager->GetEdit();
+ SysTryReturnResult(NID_UI_CTRL, pEdit, GetLastResult(), "Unable to get pEdit.");
+
+ _Window* pWindow = null;
+ _Control* pControlCore = null;
+
+ for (pControlCore = pEdit->GetParent(); pWindow == null; pControlCore = pControlCore->GetParent())
+ {
+ if (pControlCore == null)
+ {
+ break;
+ }
+
+ pWindow = dynamic_cast<_Window*>(pControlCore);
+ if (pWindow)
+ {
+ SetOwner(pWindow);
+ return r;
+ }
+ }
+
+ _EditPresenter* pEditPresenter = pEdit->GetPresenter();
+ SysTryReturnResult(NID_UI_CTRL, pEdit, GetLastResult(), "Unable to get pEditPresenter.");
+
+ _Form* pParentForm = pEditPresenter->GetParentForm();
+ if (pParentForm)
+ {
+ SetOwner(pParentForm);
+ }
+ else
+ {
+ _Form* pForm = null;
+ _Frame* pCurrentFrame = dynamic_cast <_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
+ if (pCurrentFrame)
+ {
+ pForm = pCurrentFrame->GetCurrentForm();
+ if (pForm)
+ {
+ SetOwner(pForm);
+ }
+ else
+ {
+ SetOwner(pCurrentFrame);
+ }
+ }
+ }
+ }
+
+ return r;
+}
+
_EditCopyPasteManager::_EditCopyPasteManager(_Edit& parenEdit)
: __pCopyPastePopup(null)
, __contextMenuAlign(CONTEXT_MENU_CORE_ALIGN_UP)
, __needToReleaseBlock(true)
, __isHandlerMoving(false)
, __editVisibleArea(0.0f, 0.0f, 0.0f, 0.0f)
- , __pParentWindow(null)
- , __parentWindowClipFlagChanged(false)
{
__pEditPresenter = __pEdit->GetPresenter();
__pHandle[HANDLER_TYPE_CENTER] = null;
__pHandle[HANDLER_TYPE_LEFT] = null;
__pHandle[HANDLER_TYPE_RIGHT] = null;
- _Control* pControlCore = null;
-
- for (pControlCore = __pEdit->GetParent(); __pParentWindow == null; pControlCore = pControlCore->GetParent())
- {
- if (pControlCore == null)
- {
- break;
- }
-
- __pParentWindow = dynamic_cast<_Window*>(pControlCore);
- if (__pParentWindow)
- {
- break;
- }
- }
- if (!__pParentWindow)
- {
- __pParentWindow = _ControlManager::GetInstance()->GetCurrentFrame();
- }
- if (__pParentWindow)
- {
- _VisualElement* pVisualElement = __pParentWindow->GetVisualElement();
- if (pVisualElement && pVisualElement->IsClipChildrenEnabled())
- {
- __parentWindowClipFlagChanged = true;
- pVisualElement->SetClipChildrenEnabled(false);
- }
- }
- CreateHandle();
+ CreateHandle();
}
_EditCopyPasteManager::~_EditCopyPasteManager(void)
{
- if (__parentWindowClipFlagChanged && __pParentWindow)
- {
- _VisualElement* pVisualElement = __pParentWindow->GetVisualElement();
- if (pVisualElement)
- {
- pVisualElement->SetClipChildrenEnabled(true);
- }
- }
-
- Release();
+ ReleaseCopyPastePopup();
+ ReleaseHandle();
if (__pCoreCopyPasteEvent)
{
}
void
-_EditCopyPasteManager::Release(void)
+_EditCopyPasteManager::ReleaseHandle(void)
{
- if (__pCopyPastePopup)
- {
- __pCopyPastePopup->Close();
- delete __pCopyPastePopup;
- __pCopyPastePopup = null;
- }
-
if (__pHandle[HANDLER_TYPE_CENTER])
{
- if (__pParentWindow)
- {
- __pParentWindow->DetachChild(*__pHandle[HANDLER_TYPE_CENTER]);
- }
+ __pHandle[HANDLER_TYPE_CENTER]->Close();
delete __pHandle[HANDLER_TYPE_CENTER];
__pHandle[HANDLER_TYPE_CENTER] = null;
}
if (__pHandle[HANDLER_TYPE_LEFT])
{
- if (__pParentWindow)
- {
- __pParentWindow->DetachChild(*__pHandle[HANDLER_TYPE_LEFT]);
- }
+ __pHandle[HANDLER_TYPE_LEFT]->Close();
delete __pHandle[HANDLER_TYPE_LEFT];
__pHandle[HANDLER_TYPE_LEFT] = null;
}
if (__pHandle[HANDLER_TYPE_RIGHT])
{
- if (__pParentWindow)
- {
- __pParentWindow->DetachChild(*__pHandle[HANDLER_TYPE_RIGHT]);
- }
+ __pHandle[HANDLER_TYPE_RIGHT]->Close();
delete __pHandle[HANDLER_TYPE_RIGHT];
__pHandle[HANDLER_TYPE_RIGHT] = null;
}
if (__pCoreCopyPasteEvent)
{
IEventArg* pCopyPasteEventArg = _EditCopyPasteEvent::CreateCopyPasteEventArgN(status, action);
- SysTryReturn(NID_UI_CTRL, pCopyPasteEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturn(NID_UI_CTRL, pCopyPasteEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pCoreCopyPasteEvent->Fire(*pCopyPasteEventArg);
}
FloatRectangle formClientBounds(0.0f, 0.0f, 0.0f, 0.0f);
FloatRectangle panelAbsoulteBounds(0.0f, 0.0f, 0.0f, 0.0f);
bool commandButtonExist = false;
+ bool formExist = false;
+ bool panelExist = false;
FloatRectangle cursorRect = GetCursorBoundsF(true);
float contextMenuHeight = 0.0f;
}
GET_SHAPE_CONFIG(EDIT::COPYPASTE_HANDLER_HEIGHT, orientation, handlerHeight);
-
GET_SHAPE_CONFIG(CONTEXTMENU::GRID_ITEM_HEIGHT, orientation, contextMenuHeight);
GET_SHAPE_CONFIG(CONTEXTMENU::GRID_TOP_MARGIN, orientation, contextMenuTopMargin);
GET_SHAPE_CONFIG(CONTEXTMENU::GRID_BOTTOM_MARGIN, orientation, contextMenuBottomMargin);
if (pForm)
{
formClientBounds = pForm->GetClientBoundsF();
+ formExist = true;
}
_ScrollPanel* pPanel = __pEditPresenter->GetParentPanel();
if (pPanel)
{
panelAbsoulteBounds = pPanel->GetAbsoluteBoundsF(true);
+ panelExist = true;
}
__pEdit->GetKeypadBounds(keypadBounds);
editShowAreaAbsRect.height = textObjectBounds.height;
}
}
+ if (editShowAreaAbsRect.y < 0.0f)
+ {
+ editShowAreaAbsRect.height += editShowAreaAbsRect.y;
+ editShowAreaAbsRect.y = 0.0f;
+ }
if (commandButtonExist)
{
editShowAreaAbsRect.height -= (editShowAreaAbsRect.y + editShowAreaAbsRect.height - keypadBounds.y);
}
}
- if (editShowAreaAbsRect.y < formClientBounds.y)
+ if (formExist)
{
- editShowAreaAbsRect.y = formClientBounds.y;
- editShowAreaAbsRect.height -= formClientBounds.y;
+ if (editShowAreaAbsRect.y < formClientBounds.y)
+ {
+ editShowAreaAbsRect.y = formClientBounds.y;
+ editShowAreaAbsRect.height -= formClientBounds.y;
+ }
}
- if (editShowAreaAbsRect.y < panelAbsoulteBounds.y)
+ if (panelExist)
{
- editShowAreaAbsRect.y = panelAbsoulteBounds.y;
- editShowAreaAbsRect.height -= (panelAbsoulteBounds.y - editShowAreaAbsRect.y);
+ if (editShowAreaAbsRect.y < panelAbsoulteBounds.y)
+ {
+ editShowAreaAbsRect.height -= (panelAbsoulteBounds.y - editShowAreaAbsRect.y);
+ editShowAreaAbsRect.y = panelAbsoulteBounds.y;
+ }
}
__editVisibleArea = CoordinateSystem::AlignToDevice(editShowAreaAbsRect);
}
}
//Both of handlers are located on the top of the Editor.
- if ( ((startRect.y + startRect.height) < editShowAreaAbsRect.y) && ((endRect.y + endRect.height) < editShowAreaAbsRect.y))
+ if (((startRect.y + startRect.height) < editShowAreaAbsRect.y) && ((endRect.y + endRect.height) < editShowAreaAbsRect.y))
{
SysLog(NID_UI_CTRL, "Both of handlers are located on the top of the Editor.\n");
return;
}
//Both of handlers are located on the bottom of the Editor.
- else if( ((startRect.y + startRect.height) > editShowAreaAbsRect.y + editShowAreaAbsRect.height ) && ((endRect.y + endRect.height) > editShowAreaAbsRect.y + editShowAreaAbsRect.height))
+ else if(((startRect.y + startRect.height) > editShowAreaAbsRect.y + editShowAreaAbsRect.height) && ((endRect.y + endRect.height) > editShowAreaAbsRect.y + editShowAreaAbsRect.height))
{
SysLog(NID_UI_CTRL, "Both of handlers are located on the bottom of the Editor.\n");
return;
}
// Left handler is located on the top of the Editor and Right handler is located on the bottom of the Editor.
- else if ( ((startRect.y + startRect.height) < editShowAreaAbsRect.y) && ((endRect.y + endRect.height) > (editShowAreaAbsRect.y + editShowAreaAbsRect.height)))
+ else if (((startRect.y + startRect.height) < editShowAreaAbsRect.y) && ((endRect.y + endRect.height) > (editShowAreaAbsRect.y + editShowAreaAbsRect.height)))
{
copyPastePoint.y = editShowAreaAbsRect.y + editShowAreaAbsRect.height/2;
}
// Left handler is located on the top of the Editor and Right handler is located on the Editor
- else if ( ((startRect.y + startRect.height) < editShowAreaAbsRect.y) && ((endRect.y + endRect.height) <= (editShowAreaAbsRect.y + editShowAreaAbsRect.height)) )
+ else if (((startRect.y + startRect.height) < editShowAreaAbsRect.y) && ((endRect.y + endRect.height) <= (editShowAreaAbsRect.y + editShowAreaAbsRect.height)))
{
- if ( (endRect.y + endRect.height + handlerHeight + __contextMenuHeight) < keypadBounds.y)
+ if ((endRect.y + endRect.height + handlerHeight + __contextMenuHeight) < keypadBounds.y)
{
__contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_DOWN;
copyPastePoint.y = endRect.y + endRect.height + handlerHeight;
}
}
// Left handler is located on the Editor and Right handler is located on the bottom of the Editor
- else if ( ((startRect.y + startRect.height) >= editShowAreaAbsRect.y) && ((endRect.y + endRect.height) > (editShowAreaAbsRect.y + editShowAreaAbsRect.height)) )
+ else if (((startRect.y + startRect.height) >= editShowAreaAbsRect.y) && ((endRect.y + endRect.height) > (editShowAreaAbsRect.y + editShowAreaAbsRect.height)))
{
if (__contextMenuHeight < startRect.y)
{
copyPastePoint.y = startRect.y;
}
// There is a space on the bottom of the Editor.
- else if ( screenSize.height > (endRect.y + endRect.height + handlerHeight + __contextMenuHeight))
+ else if (screenSize.height > (endRect.y + endRect.height + handlerHeight + __contextMenuHeight))
{
__contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_DOWN;
return;
}
FloatRectangle cursorRect;
+ bool reverseHandler = false;
int cursorPosition = GetCursorPosition();
__pEdit->CalculateAbsoluteCursorBounds(cursorPosition, cursorRect);
copyPastePoint.x = cursorRect.x;
copyPastePoint.y = cursorRect.y;
- if (__editVisibleArea.y > copyPastePoint.y || __editVisibleArea.y + __editVisibleArea.height < copyPastePoint.y)
+ if (!_FloatCompare(__editVisibleArea.y + __editVisibleArea.height, copyPastePoint.y) && __editVisibleArea.y + __editVisibleArea.height < copyPastePoint.y)
{
return;
}
- if (copyPastePoint.y < __contextMenuHeight)
+ if (!_FloatCompare(__editVisibleArea.y, copyPastePoint.y) && __editVisibleArea.y > copyPastePoint.y)
+ {
+ if (!_FloatCompare(__editVisibleArea.y + __editVisibleArea.height, copyPastePoint.y + cursorRect.height) && (__editVisibleArea.y + __editVisibleArea.height > copyPastePoint.y + cursorRect.height))
+ {
+ reverseHandler = true;
+ }
+ else
+ {
+ return;
+ }
+ }
+
+ if (copyPastePoint.y < __contextMenuHeight || reverseHandler)
{
FloatRectangle cursorRect = GetCursorBoundsF(true);
__pCopyPastePopup = _ContextMenu::CreateContextMenuN(copyPastePoint, CONTEXT_MENU_CORE_STYLE_GRID, __contextMenuAlign);
SysTryReturnVoidResult(NID_UI_CTRL, __pCopyPastePopup, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- if ( __pEdit->GetTextLength() != 0 && !isPasswordStyle)
+ if (__pEdit->GetTextLength() != 0 && !isPasswordStyle)
{
if (__pEdit->IsBlocked())
{
__pCopyPastePopup->AddActionEventListener(*this);
return;
/*
- Bitmap* pSearchBitmap = null;
- Bitmap* pReplacedSearchBitmap = null;
- Bitmap* pReplacedSearchPressedBitmap = null;
+ Bitmap* pSearchNormalBitmap = null;
+ Bitmap* pSearchPressedBitmap = null;
+
Color searchColor;
Color searchPressedColor;
result r = E_SUCCESS;
if (__pEdit->IsBlocked() && !isPasswordStyle)
{
- r = GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_SEARCH_ICON, BITMAP_PIXEL_FORMAT_ARGB8888, pSearchBitmap);
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
GET_COLOR_CONFIG(CONTEXTMENU::ITEM_TEXT_NORMAL, searchColor);
GET_COLOR_CONFIG(CONTEXTMENU::ITEM_TEXT_PRESSED, searchPressedColor);
- pReplacedSearchBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSearchBitmap, Color::GetColor(COLOR_ID_MAGENTA), searchColor);
- SysTryCatch(NID_UI_CTRL, pReplacedSearchBitmap, r = GetLastResult(), GetLastResult(),"[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDIT::COPY_PASTE_SEARCH_ICON, BITMAP_PIXEL_FORMAT_ARGB8888, searchColor, pSearchNormalBitmap);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), r, r,"[%s] Propagating.", GetErrorMessage(r));
- pReplacedSearchPressedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSearchBitmap, Color::GetColor(COLOR_ID_MAGENTA), searchPressedColor);
- SysTryCatch(NID_UI_CTRL, pReplacedSearchPressedBitmap, r = GetLastResult(), GetLastResult(),"[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDIT::COPY_PASTE_SEARCH_ICON, BITMAP_PIXEL_FORMAT_ARGB8888, searchPressedColor, pSearchPressedBitmap);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), r, r,"[%s] Propagating.", GetErrorMessage(r));
- __pCopyPastePopup->AddItem(null, COPY_PASTE_SEARCH_ID, pReplacedSearchBitmap, pReplacedSearchPressedBitmap, null);
+ __pCopyPastePopup->AddItem(null, COPY_PASTE_SEARCH_ID, pSearchNormalBitmap, pSearchPressedBitmap, null);
}
- if (pSearchBitmap)
+ if (pSearchNormalBitmap)
{
- delete pSearchBitmap;
- pSearchBitmap = null;
+ delete pSearchNormalBitmap;
+ pSearchNormalBitmap = null;
}
- if (pReplacedSearchBitmap)
+ if (pSearchPressedBitmap)
{
- delete pReplacedSearchBitmap;
- pReplacedSearchBitmap = null;
- }
-
- if (pReplacedSearchPressedBitmap)
- {
- delete pReplacedSearchPressedBitmap;
- pReplacedSearchPressedBitmap = null;
+ delete pSearchPressedBitmap;
+ pSearchPressedBitmap = null;
}
__pCopyPastePopup->AddActionEventListener(*this);
return;
CATCH:
- delete pSearchBitmap;
- pSearchBitmap = null;
+ delete pSearchNormalBitmap;
+ pSearchNormalBitmap = null;
- delete pReplacedSearchBitmap;
- pReplacedSearchBitmap = null;
+ delete pSearchPressedBitmap;
+ pSearchPressedBitmap = null;
return;
*/
void
_EditCopyPasteManager::CreateHandle(void)
{
- Release();
+ ReleaseHandle();
if (__pEdit->IsBlocked())
{
FloatPoint leftHandler(startRect.x, startRect.y + startRect.height);
FloatPoint rightHandler(endRect.x, endRect.y + endRect.height);
- if (__pParentWindow)
- {
- __pHandle[HANDLER_TYPE_LEFT] = _EditCopyPasteHandler::CreateInstanceN(leftHandler, start, this, __pParentWindow, false, true);
- __pParentWindow->AttachChild(*__pHandle[HANDLER_TYPE_LEFT]);
- }
- if (__pParentWindow)
- {
- __pHandle[HANDLER_TYPE_RIGHT] = _EditCopyPasteHandler::CreateInstanceN(rightHandler, end, this, __pParentWindow, false, false);
- __pParentWindow->AttachChild(*__pHandle[HANDLER_TYPE_RIGHT]);
- }
+
+ __pHandle[HANDLER_TYPE_LEFT] = _EditCopyPasteHandler::CreateInstanceN(leftHandler, start, this, false, true);
+ __pHandle[HANDLER_TYPE_RIGHT] = _EditCopyPasteHandler::CreateInstanceN(rightHandler, end, this, false, false);
}
else
{
__pEdit->CalculateAbsoluteCursorBounds(__pEdit->GetCursorPosition(), centerRect);
FloatPoint centerHandler(centerRect.x, centerRect.y + centerRect.height);
- if (__pParentWindow)
- {
- __pHandle[HANDLER_TYPE_CENTER] = _EditCopyPasteHandler::CreateInstanceN(centerHandler, __pEdit->GetCursorPosition(), this, __pParentWindow, true, true);
- __pParentWindow->AttachChild(*__pHandle[HANDLER_TYPE_CENTER]);
- }
+ __pHandle[HANDLER_TYPE_CENTER] = _EditCopyPasteHandler::CreateInstanceN(centerHandler, __pEdit->GetCursorPosition(), this, true, true);
#if EDIT_COPY_PASTE_MAGNIFIER
-// __pHandle[HANDLER_TYPE_CENTER]->CreateCopyPasteMagnifier();
+ __pHandle[HANDLER_TYPE_CENTER]->CreateCopyPasteMagnifier();
#endif
}
}
void
+_EditCopyPasteManager::CreateHandle(int start, int end, int startRowIndex, int startColumnIndex, int endRowIndex, int endColumnIndex)
+{
+ ReleaseHandle();
+
+ if (__pEdit->IsBlocked())
+ {
+ FloatRectangle startRect;
+ FloatRectangle endRect;
+
+ if (startRowIndex > -1 && startColumnIndex > -1)
+ {
+ __pEditPresenter->CalculateAbsoluteCursorBounds(startRowIndex, startColumnIndex, startRect);
+ }
+ else
+ {
+ __pEditPresenter->CalculateAbsoluteCursorBounds(start, startRect);
+ }
+ if (endRowIndex > -1 && endColumnIndex > -1)
+ {
+ __pEditPresenter->CalculateAbsoluteCursorBounds(endRowIndex, endColumnIndex, endRect);
+ }
+ else
+ {
+ __pEditPresenter->CalculateAbsoluteCursorBounds(end, endRect);
+ }
+
+ FloatPoint leftHandler(startRect.x, startRect.y + startRect.height);
+ FloatPoint rightHandler(endRect.x, endRect.y + endRect.height);
+
+ __pHandle[HANDLER_TYPE_LEFT] = _EditCopyPasteHandler::CreateInstanceN(leftHandler, start, this, false, true);
+ __pHandle[HANDLER_TYPE_RIGHT] = _EditCopyPasteHandler::CreateInstanceN(rightHandler, end, this, false, false);
+
+ if (startRowIndex > -1 && startColumnIndex > -1)
+ {
+ __pHandle[HANDLER_TYPE_LEFT]->SetHandlerRowColumnIndex(startRowIndex, startColumnIndex);
+ }
+ if (endRowIndex > -1 && endColumnIndex > -1)
+ {
+ __pHandle[HANDLER_TYPE_RIGHT]->SetHandlerRowColumnIndex(endRowIndex, endColumnIndex);
+ }
+ AdjustBounds();
+ }
+}
+
+void
_EditCopyPasteManager::Show(void)
{
if (__pHandle[HANDLER_TYPE_CENTER])
__pHandle[HANDLER_TYPE_CENTER]->AdjustBounds();
__pHandle[HANDLER_TYPE_CENTER]->CheckReverseStatus();
__pHandle[HANDLER_TYPE_CENTER]->Invalidate();
+ __pEditPresenter->DrawText();
+ __pHandle[HANDLER_TYPE_CENTER]->MoveCopyPasteMagnifier();
}
if (__pHandle[HANDLER_TYPE_LEFT] && __pHandle[HANDLER_TYPE_RIGHT])
__pHandle[HANDLER_TYPE_RIGHT]->CheckReverseStatus();
__pHandle[HANDLER_TYPE_LEFT]->Invalidate();
__pHandle[HANDLER_TYPE_RIGHT]->Invalidate();
+ __pHandle[HANDLER_TYPE_LEFT]->MoveCopyPasteMagnifier();
+ __pHandle[HANDLER_TYPE_RIGHT]->MoveCopyPasteMagnifier();
__pEditPresenter->DrawText();
}
if (__pCopyPastePopup)
{
__pCopyPastePopup->Open();
- {
- _Window* pWindow = null;
- _Control* pControlCore = null;
-
- for (pControlCore = __pEdit->GetParent(); pWindow == null; pControlCore = pControlCore->GetParent())
- {
- if (pControlCore == null)
- {
- break;
- }
-
- pWindow = dynamic_cast<_Window*>(pControlCore);
- if (pWindow)
- {
- __pCopyPastePopup->SetOwner(pWindow);
- break;
- }
- }
- }
__pCopyPastePopup->ReleaseTouchCapture();
_Control* pControl = __pCopyPastePopup->GetOwner();
return showCheck;
}
-bool
-_EditCopyPasteManager::CheckHandlePosition(bool leftHandle, int cursorPosition)
+void
+_EditCopyPasteManager::RefreshBlock(bool isLeftHandle)
{
- int leftHandlerPosition = __pHandle[HANDLER_TYPE_LEFT]->GetHandlerCursorPosition();
- int rightHandlerPosition = __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerCursorPosition();
+ int leftRowIndex = -1;
+ int leftColumnIndex = -1;
+ int rightRowIndex = -1;
+ int rightColumnIndex = -1;
- if (leftHandle)
+ int leftHandlerPos = __pHandle[HANDLER_TYPE_LEFT]->GetHandlerCursorPosition();
+ int rightHandlerPos = __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerCursorPosition();
+ __pHandle[HANDLER_TYPE_LEFT]->GetHandlerRowColumnIndex(leftRowIndex, leftColumnIndex);
+ __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerRowColumnIndex(rightRowIndex, rightColumnIndex);
+
+ if (leftHandlerPos <= rightHandlerPos)
{
- if (cursorPosition + 1 <= rightHandlerPosition)
+ if (leftRowIndex != -1 && leftColumnIndex != -1 && rightRowIndex != -1 && rightColumnIndex != -1)
{
- return true;
+ __pEditPresenter->SetBlockRange(leftHandlerPos, rightHandlerPos, leftRowIndex, leftColumnIndex, rightRowIndex, rightColumnIndex);
}
else
{
- return false;
+ __pEditPresenter->SetBlockRange(leftHandlerPos, rightHandlerPos);
}
+ __pEditPresenter->SetCursorChangedFlag(!isLeftHandle);
}
else
{
- if (cursorPosition >= leftHandlerPosition + 1)
+ if (leftRowIndex != -1 && leftColumnIndex != -1 && rightRowIndex != -1 && rightColumnIndex != -1)
{
- return true;
+ __pEditPresenter->SetBlockRange(rightHandlerPos, leftHandlerPos, rightRowIndex, rightColumnIndex, leftRowIndex, leftColumnIndex);
}
else
{
- return false;
+ __pEditPresenter->SetBlockRange(rightHandlerPos, leftHandlerPos);
}
+ __pEditPresenter->SetCursorChangedFlag(isLeftHandle);
}
-}
-
-void
-_EditCopyPasteManager::RefreshBlock(bool isLeftHandle)
-{
- int leftRowIndex = -1;
- int leftColumnIndex = -1;
- int rightRowIndex = -1;
- int rightColumnIndex = -1;
-
- int leftHandlerPos = __pHandle[HANDLER_TYPE_LEFT]->GetHandlerCursorPosition();
- int rightHandlerPos = __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerCursorPosition();
- __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerRowColumnIndex(leftRowIndex, leftColumnIndex);
- __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerRowColumnIndex(rightRowIndex, rightColumnIndex);
-
- __pEditPresenter->SetBlockRange(leftHandlerPos, rightHandlerPos, leftColumnIndex, leftColumnIndex, rightRowIndex, rightColumnIndex);
-
- __pEditPresenter->SetCursorChangedFlag(!isLeftHandle);
__pEditPresenter->DrawText();
AdjustBounds();
}
int
_EditCopyPasteManager::GetHandlerCursorPosition(HandlerType handlerType) const
{
- return __pHandle[handlerType]->GetHandlerCursorPosition();
+ if (__pHandle[handlerType])
+ {
+ return __pHandle[handlerType]->GetHandlerCursorPosition();
+ }
+ else
+ {
+ return -1;
+ }
}
void
__pEdit->GetWordPosition(cursorPos, start, end);
__pEdit->SetBlockRange(start, end);
SendTextBlockEvent();
-
- Release();
+ __pEditPresenter->UpdateComponentInformation();
CreateHandle();
CreateCopyPastePopup();
Show();
__pEdit->SetBlockRange(0, textLength);
SendTextBlockEvent();
__pEditPresenter->UpdateComponentInformation();
-
- Release();
CreateHandle();
CreateCopyPastePopup();
Show();
break;
case COPY_PASTE_CLIPBOARD_ID:
- pClipBoard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit, true);
- ReleaseCopyPastePopup();
- SendCopyPasteEvent(CORE_COPY_PASTE_STATUS_HIDE, CORE_COPY_PASTE_ACTION_CLIPBOARD);
+ if (!pClipBoard->IsPopupVisible())
+ {
+ pClipBoard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit, true);
+ ReleaseCopyPastePopup();
+ SendCopyPasteEvent(CORE_COPY_PASTE_STATUS_HIDE, CORE_COPY_PASTE_ACTION_CLIPBOARD);
+ }
+ else
+ {
+ ReleaseCopyPastePopup();
+ }
break;
case COPY_PASTE_SEARCH_ID:
LaunchSearch();
void
_EditCopyPasteManager::MoveHandler(HandlerMoveType moveType)
{
- if (!__pHandle[HANDLER_TYPE_RIGHT] || ! __pHandle[HANDLER_TYPE_LEFT])
+ if (!__pHandle[HANDLER_TYPE_RIGHT] || !__pHandle[HANDLER_TYPE_LEFT])
{
return;
}
int leftHandlerPosition = __pHandle[HANDLER_TYPE_LEFT]->GetHandlerCursorPosition();
int rightHandlerPosition = __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerCursorPosition();
int textLength = __pEdit->GetTextLength();
- FloatRectangle cursorBounds;
+ FloatRectangle rightHandlerCursorBounds;
int newCursorPosition;
- __pEdit->GetCursorBounds(false, cursorBounds);
- FloatPoint cursorPoint(cursorBounds.x, cursorBounds.y);
+ __pEditPresenter->CalculateCursorBounds(__pEditPresenter->GetTextBoundsF(), rightHandlerCursorBounds, rightHandlerPosition);
+ FloatPoint cursorPoint(rightHandlerCursorBounds.x, rightHandlerCursorBounds.y);
TextObject* pTextObject = __pEditPresenter->GetTextObject();
switch(moveType)
{
case HANDLER_MOVE_TYPE_LEFT:
- if (leftHandlerPosition < rightHandlerPosition-1)
+ if (leftHandlerPosition == rightHandlerPosition-1)
{
- __pHandle[HANDLER_TYPE_RIGHT]->SetHandlerCursorPosition(--rightHandlerPosition);
- RefreshBlock();
- __pHandle[HANDLER_TYPE_RIGHT]->CheckReverseStatus();
- __pHandle[HANDLER_TYPE_RIGHT]->Invalidate();
+ if (leftHandlerPosition == 0)
+ {
+ return;
+ }
+ --rightHandlerPosition;
}
- else
+ if (rightHandlerPosition - 1 < 0)
{
return;
}
+ newCursorPosition = --rightHandlerPosition;
+ __pHandle[HANDLER_TYPE_RIGHT]->SetHandlerCursorPosition(newCursorPosition);
+ pTextObject->SetFirstDisplayLineIndexFromTextIndex(newCursorPosition);
+ __pEditPresenter->ScrollPanelToCursorPosition(true);
+ RefreshBlock();
+ __pHandle[HANDLER_TYPE_RIGHT]->CheckReverseStatus();
+ __pHandle[HANDLER_TYPE_RIGHT]->Invalidate();
break;
case HANDLER_MOVE_TYPE_UP:
- cursorPoint.y -= cursorBounds.height/2.0f;
+ cursorPoint.y -= rightHandlerCursorBounds.height/2.0f;
newCursorPosition = GetCursorPositionAt(cursorPoint);
if (newCursorPosition <= 0)
{
int curCursorLine = pTextObject->GetLineIndexAtTextIndex(pTextObject->GetCursorIndex());
- if (curCursorLine !=0 )
+ if (curCursorLine !=0)
{
int offset = rightHandlerPosition - pTextObject->GetFirstTextIndexAt(curCursorLine);
int firstTextIndex = pTextObject->GetFirstTextIndexAt(curCursorLine-1);
{
newCursorPosition = firstTextIndex+textLength;
}
-
- if (leftHandlerPosition >= newCursorPosition)
- {
- newCursorPosition = leftHandlerPosition + 1;
- }
}
}
- if (newCursorPosition >= 0 && leftHandlerPosition < newCursorPosition)
+ if (newCursorPosition >= 0)
{
+ if (leftHandlerPosition == newCursorPosition)
+ {
+ ++newCursorPosition;
+ }
__pHandle[HANDLER_TYPE_RIGHT]->SetHandlerCursorPosition(newCursorPosition);
+ pTextObject->SetFirstDisplayLineIndexFromTextIndex(newCursorPosition);
+ __pEditPresenter->ScrollPanelToCursorPosition(true);
RefreshBlock();
__pHandle[HANDLER_TYPE_RIGHT]->CheckReverseStatus();
__pHandle[HANDLER_TYPE_RIGHT]->Invalidate();
}
break;
case HANDLER_MOVE_TYPE_DOWN:
- cursorPoint.y += cursorBounds.height + cursorBounds.height/2.0f;
+ cursorPoint.y += rightHandlerCursorBounds.height + rightHandlerCursorBounds.height/2.0f;
newCursorPosition = GetCursorPositionAt(cursorPoint);
if (newCursorPosition < 0)
if (newCursorPosition >= 0)
{
+ if (leftHandlerPosition == newCursorPosition)
+ {
+ ++newCursorPosition;
+ }
__pHandle[HANDLER_TYPE_RIGHT]->SetHandlerCursorPosition(newCursorPosition);
+ pTextObject->SetFirstDisplayLineIndexFromTextIndex(newCursorPosition);
+ __pEditPresenter->ScrollPanelToCursorPosition(true);
RefreshBlock();
__pHandle[HANDLER_TYPE_RIGHT]->CheckReverseStatus();
__pHandle[HANDLER_TYPE_RIGHT]->Invalidate();
case HANDLER_MOVE_TYPE_RIGHT:
if (textLength >= rightHandlerPosition+1)
{
- __pHandle[HANDLER_TYPE_RIGHT]->SetHandlerCursorPosition(++rightHandlerPosition);
+ if (leftHandlerPosition == rightHandlerPosition+1)
+ {
+ ++rightHandlerPosition;
+ }
+ newCursorPosition = ++rightHandlerPosition;
+ __pHandle[HANDLER_TYPE_RIGHT]->SetHandlerCursorPosition(newCursorPosition);
+ pTextObject->SetFirstDisplayLineIndexFromTextIndex(newCursorPosition);
+ __pEditPresenter->ScrollPanelToCursorPosition(true);
RefreshBlock();
__pHandle[HANDLER_TYPE_RIGHT]->CheckReverseStatus();
__pHandle[HANDLER_TYPE_RIGHT]->Invalidate();
return;
}
+void
+_EditCopyPasteManager::DestroyCopyPasteMagnifier(void)
+{
+ //only single case.
+ if (__pHandle[HANDLER_TYPE_CENTER])
+ {
+ __pHandle[HANDLER_TYPE_CENTER]->DestroyCopyPasteMagnifier();
+ }
+}
+
+void
+_EditCopyPasteManager::CreateCopyPasteMagnifier(void)
+{
+ //only single case.
+ if (__pHandle[HANDLER_TYPE_CENTER])
+ {
+ __pHandle[HANDLER_TYPE_CENTER]->CreateCopyPasteMagnifier();
+ }
+}
+
}}} // Tizen::Ui::Controls
, __pAccessibilityDayElement(null)
, __isCalledBoundsChanged(false)
, __isXmlBoundsExist(false)
+ , __pParentPanel(null)
+ , __isEnterKeyPressed(false)
{
}
__pAccessibilityDayElement->Activate(false);
__pAccessibilityDayElement = null;
}
+ if (__pParentPanel != null)
+ {
+ __pParentPanel->RemoveScrollEventListener(*this);
+ }
}
_EditDate*
_AccessibilityContainer* pContainer = null;
- _EditDate* pEditDate = new (std::nothrow) _EditDate;
+ _EditDate* pEditDate = new (std::nothrow) _EditDate();
SysTryReturn(NID_UI_CTRL, pEditDate, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pEditDate->GetVisualElement()->SetSurfaceOpaque(false);
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, (__pDateTimeBar != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ __pDateTimeBar->SetTouchPressThreshold(_TOUCH_PRESS_THRESHOLD_INSENSITIVE);
+
r = __pDateTimeBar->AddActionEventListener(*this);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
int day;
int maxValue = -1;
-
_DateTimeUtils dateTimeUtils;
maxValue = dateTimeUtils.CalculateMaxDay(year.ToInt(), GetMonth());
SysTryReturn(NID_UI_CTRL, pFrame != null, E_SYSTEM, E_SYSTEM,
"[E_SYSTEM] A system error has occurred. Failed to get frame instance.");
- absoluteBounds = GetAbsoluteBoundsF();
- frameBounds = pFrame->GetAbsoluteBoundsF();
+ absoluteBounds = GetAbsoluteBoundsF(true);
+ frameBounds = pFrame->GetAbsoluteBoundsF(true);
parentWindowBounds = GetParentWindowBounds();
titleBounds = __pEditDatePresenter->GetTitleBounds();
{
if (GetDateTimeBar() != null)
{
- FloatRectangle absoluteBounds = GetAbsoluteBoundsF();
+ FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true);
if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height)
{
FloatRectangle monthBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_MONTH);
FloatRectangle yearBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_YEAR);
+ _DateTimeUtils dateTimeUtils;
+ int localeDateFormat = dateTimeUtils.GetLocaleDateFormat();
+
if (__pAccessibilityEditDateElement == null)
{
- __pAccessibilityEditDateElement = new _AccessibilityElement(true);
+ __pAccessibilityEditDateElement = new (std::nothrow) _AccessibilityElement(true);
+ SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityEditDateElement != null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
__pAccessibilityEditDateElement->SetBounds(GetClientBoundsF());
__pAccessibilityEditDateElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
__pAccessibilityEditDateElement->SetName("EditDateText");
if (__pAccessibilityYearElement == null && __pAccessibilityMonthElement == null && __pAccessibilityDayElement == null)
{
- String hintText(L"Double tap to edit");
+ __pAccessibilityYearElement = new (std::nothrow) _AccessibilityElement(true);
+ SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityYearElement != null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- __pAccessibilityYearElement = new _AccessibilityElement(true);
__pAccessibilityYearElement->SetBounds(yearBounds);
__pAccessibilityYearElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_YEAR_LC");
- __pAccessibilityYearElement->SetHint(hintText);
+ __pAccessibilityYearElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS");
+
+ __pAccessibilityMonthElement = new (std::nothrow) _AccessibilityElement(true);
+ SysTryCatch(NID_UI_CTRL, __pAccessibilityMonthElement != null, , E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- __pAccessibilityMonthElement = new _AccessibilityElement(true);
__pAccessibilityMonthElement->SetBounds(monthBounds);
__pAccessibilityMonthElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MONTH_LC");
- __pAccessibilityMonthElement->SetHint(hintText);
+ __pAccessibilityMonthElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS");
+
+ __pAccessibilityDayElement = new (std::nothrow) _AccessibilityElement(true);
+ SysTryCatch(NID_UI_CTRL, __pAccessibilityDayElement != null, , E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- __pAccessibilityDayElement = new _AccessibilityElement(true);
__pAccessibilityDayElement->SetBounds(dayBounds);
__pAccessibilityDayElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_DAY_LC");
- __pAccessibilityDayElement->SetHint(hintText);
-
- _DateTimeUtils dateTimeUtils;
- int localeDateFormat = dateTimeUtils.GetLocaleDateFormat();
+ __pAccessibilityDayElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS");
switch (localeDateFormat)
{
}
UpdateAccessibilityElement();
}
+
+ return;
+
+CATCH:
+ delete __pAccessibilityYearElement;
+ __pAccessibilityYearElement = null;
+
+ delete __pAccessibilityMonthElement;
+ __pAccessibilityMonthElement = null;
+
+ return;
}
void
__pAccessibilityDayElement->SetBounds(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_DAY));
}
+ if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated())
+ {
+ CalculateDateTimeBarPosition();
+
+ FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f);
+
+ bounds = __pEditDatePresenter->GetDateAreaBounds(__pEditDatePresenter->GetLastSelectedId());
+ FloatRectangle absoluteBounds(0.0f, 0.0f, 0.0f, 0.0f);
+ absoluteBounds = GetAbsoluteBoundsF();
+ bounds.x += absoluteBounds.x;
+ GetDateTimeBar()->CalculateArrowBounds(bounds);
+ GetDateTimeBar()->ChangeLayout();
+ }
+
return;
}
}
__pEditDatePresenter->Initialize();
- __pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE);
- if (GetDateTimeBar() != null)
+ if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated())
{
- GetDateTimeBar()->SetVisibleState(false);
- GetDateTimeBar()->Close();
+ CalculateDateTimeBarPosition();
+
+ FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f);
+
+ bounds = __pEditDatePresenter->GetDateAreaBounds(__pEditDatePresenter->GetLastSelectedId());
+ FloatRectangle absoluteBounds(0.0f, 0.0f, 0.0f, 0.0f);
+ absoluteBounds = GetAbsoluteBoundsF();
+ bounds.x += absoluteBounds.x;
+ GetDateTimeBar()->CalculateArrowBounds(bounds);
+ GetDateTimeBar()->ChangeLayout();
}
return;
bool
_EditDate::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
- FloatRectangle absoluteBounds = GetAbsoluteBoundsF();
+ FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true);
if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height)
{
if (GetDateTimeBar() != null)
{
GetDateTimeBar()->SetVisibleState(false);
+ GetDateTimeBar()->ClearPreviousText();
GetDateTimeBar()->Close();
}
{
case _KEY_ENTER:
{
- FloatRectangle absoluteBounds = GetAbsoluteBoundsF();
+ FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true);
+
+ if (__pParentPanel != null && __pParentPanel->IsScrollAnimationRunning())
+ {
+ __isEnterKeyPressed = true;
+ return true;
+ }
if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height)
{
}
}
- return __pEditDatePresenter->OnKeyReleased(source, keyInfo);
+ return __pEditDatePresenter->OnKeyReleased(source, keyCode);
}
bool
{
if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated())
{
+ GetDateTimeBar()->ClearPreviousText();
GetDateTimeBar()->Close();
__pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE);
Invalidate();
{
if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated())
{
+ GetDateTimeBar()->ClearPreviousText();
GetDateTimeBar()->Close();
__pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE);
Invalidate();
}
}
+// Tizen::Ui::Animations::IAnimationTransactionEventListener
+void
+_EditDate::OnAnimationTransactionStarted(int transactionId)
+{
+ return;
+}
+
+void
+_EditDate::OnAnimationTransactionStopped(int transactionId)
+{
+ __pEditDatePresenter->EndTransaction();
+ return;
+}
+
+void
+_EditDate::OnAnimationTransactionFinished(int transactionId)
+{
+ __pEditDatePresenter->EndTransaction();
+ return;
+}
+
+void
+_EditDate::InitializeParentPanel(void)
+{
+ if (__pParentPanel == null)
+ {
+ _ScrollPanel* pScrollPanel = null;
+ _Control* pControlCore = null;
+
+ for (pControlCore = GetParent(); pScrollPanel == null; pControlCore = pControlCore->GetParent())
+ {
+ if (pControlCore == null)
+ {
+ return;
+ }
+
+ pScrollPanel = dynamic_cast<_ScrollPanel*>(pControlCore);
+ if (pScrollPanel)
+ {
+ __pParentPanel = pScrollPanel;
+ __pParentPanel->AddScrollEventListener(*this);
+ break;
+ }
+ }
+ }
+
+ return;
+}
+
+void
+_EditDate::OnScrollStopped(Tizen::Ui::_Control& source)
+{
+ if (__isEnterKeyPressed)
+ {
+ CalculateDateTimeBarPosition();
+ __pEditDatePresenter->OnKeyReleased(source, _KEY_ENTER);
+ __isEnterKeyPressed = false;
+ }
+}
+
+void
+_EditDate::OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition)
+{
+ if (GetDateTimeBar()->IsActivated() && __pParentPanel != null && __pParentPanel->IsScrollAnimationRunning())
+ {
+ __pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE);
+ GetDateTimeBar()->SetVisibleState(false);
+ GetDateTimeBar()->ClearPreviousText();
+ GetDateTimeBar()->Close();
+ }
+}
+
}}} // Tizen::Ui::Controls
result
_EditDateImpl::OnAttachedToMainTree(void)
{
+ GetCore().InitializeParentPanel();
return _ControlImpl::OnAttachedToMainTree();
}
{
titleEnable = true;
}
- pEditDate = new (std::nothrow) EditDate;
- if (pEditDate == null)
- {
- return null;
- }
+
+ pEditDate = new (std::nothrow) EditDate();
+ SysTryReturn(NID_UI_CTRL, pEditDate, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
if (titleEnable)
{
return null;
}
+ pEditDate->SetBounds(rect);
+
if (pControl->GetElement(L"minYearRange", elementStringOne) && pControl->GetElement(L"maxYearRange", elementStringTwo))
{
Base::Integer::Parse(elementStringOne, tempMin);
*/
#include <vconf.h>
+#include <FGrpColor.h>
+#include <FUiControl.h>
+#include <FUiAnimAnimationTransaction.h>
+#include <FUiAnimVisualElementPropertyAnimation.h>
#include <FGrp_TextTextObject.h>
#include <FGrp_TextTextSimple.h>
#include <FGrp_CanvasImpl.h>
#include <FGrp_BitmapImpl.h>
#include <FGrp_FontImpl.h>
#include "FUi_ResourceManager.h"
+#include "FUi_CoordinateSystemUtils.h"
+#include "FUiAnim_VisualElement.h"
#include "FUiCtrl_EditDatePresenter.h"
#include "FUiCtrl_EditDate.h"
#include "FUiCtrl_DateTimeModel.h"
#include "FUiCtrl_DateTimeUtils.h"
-#include "FUiControl.h"
-#include "FUiAnim_VisualElement.h"
-#include "FUiAnimVisualElementPropertyAnimation.h"
-#include "FGrpColor.h"
-#include "FUi_CoordinateSystemUtils.h"
using namespace Tizen::Graphics;
using namespace Tizen::Base;
, __elementWidth(0.0f)
, __isEnterKeyPressed(false)
, __isFocused(false)
+ , __transactionId(0)
{
}
delete __pContentBgEffectDisabledBitmap;
__pContentBgEffectDisabledBitmap = null;
+ if (__transactionId != 0)
+ {
+ AnimationTransaction::Stop(__transactionId);
+ }
+
if (__pContentProvider != null)
{
+ __pEditDate->GetVisualElement()->DetachChild(__pContentProvider);
__pContentProvider->Destroy();
__pContentProvider = null;
}
_EditDatePresenter*
_EditDatePresenter::CreateInstanceN(const _EditDate& editDate, const String& title)
{
- _EditDatePresenter* pEditDatePresenter = new (std::nothrow) _EditDatePresenter;
+ _EditDatePresenter* pEditDatePresenter = new (std::nothrow) _EditDatePresenter();
SysTryReturn(NID_UI_CTRL, pEditDatePresenter, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pEditDatePresenter->__pEditDate = const_cast <_EditDate*>(&editDate);
- pEditDatePresenter->__pEditDateTimeModel = new (std::nothrow) _DateTimeModel;
+ pEditDatePresenter->__pEditDateTimeModel = new (std::nothrow) _DateTimeModel();
SysTryCatch(NID_UI_CTRL, pEditDatePresenter->__pEditDateTimeModel, , E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Memory allocation failed.");
pEditDatePresenter->SetTitle(title);
__isEditDateInitialized = true;
CalculateAreaBounds();
-
return r;
}
pSimpleText = new (std::nothrow)TextSimple(null, 0, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
SysTryReturn(NID_UI_CTRL, (pSimpleText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ pSimpleText->SetTextShadowEnabled(true);
+ pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f));
+
__textObject.AppendElement(*pSimpleText);
__textObject.SetFont(__pFont, 0, __textObject.GetTextLength());
Color contentPressedColor;
Color contentHighlightedColor;
- Bitmap* pTempBitmap = null;
-
GET_COLOR_CONFIG(EDITDATE::CONTENT_BG_NORMAL, contentNormalBgColor);
GET_COLOR_CONFIG(EDITDATE::CONTENT_BG_DISABLED, contentDisabledBgColor);
GET_COLOR_CONFIG(EDITDATE::CONTENT_BG_PRESSED, contentPressedColor);
GET_COLOR_CONFIG(EDITDATE::CONTENT_BG_HIGHLIGHTED, contentHighlightedColor);
- r = GET_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, contentNormalBgColor, __pContentBgNormalColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pContentBgNormalColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentNormalBgColor);
- SysTryCatch(NID_UI_CTRL, (__pContentBgNormalColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- delete pTempBitmap;
- pTempBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, contentPressedColor, __pContentBgPressedColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pContentBgPressedColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentPressedColor);
- SysTryCatch(NID_UI_CTRL, (__pContentBgPressedColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- delete pTempBitmap;
- pTempBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, contentDisabledBgColor, __pContentBgDisabledColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pContentBgDisabledColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentDisabledBgColor);
- SysTryCatch(NID_UI_CTRL, (__pContentBgDisabledColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- delete pTempBitmap;
- pTempBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, contentHighlightedColor, __pContentBgHighlightedColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pContentBgHighlightedColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentHighlightedColor);
- SysTryCatch(NID_UI_CTRL, (__pContentBgHighlightedColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
r = GET_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pContentBgEffectNormalBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pContentBgEffectDisabledBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- delete pTempBitmap;
- pTempBitmap = null;
-
return r;
CATCH:
- delete pTempBitmap;
- pTempBitmap = null;
delete __pContentBgNormalColorReplacementBitmap;
__pContentBgNormalColorReplacementBitmap = null;
{
FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f);
+ Canvas* pContentCanvas = null;
Canvas* pCanvas = __pEditDate->GetCanvasN();
- SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create canvas.");
+ SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
if (__focusId == DATETIME_ID_DAY)
{
}
else
{
- r = pCanvas->DrawBitmap(bounds, *__pContentBgHighlightedColorReplacementBitmap);
+ pContentCanvas = __pEditDate->GetCanvasN(bounds);
+ SysTryCatch(NID_UI_CTRL, (pContentCanvas != null), , GetLastResult(), "[%s]Propagating.", GetErrorMessage(GetLastResult()));
+
+ bounds.x = (bounds.width - __pContentBgHighlightedColorReplacementBitmap->GetWidthF()) / 2;
+ bounds.y = (bounds.height - __pContentBgHighlightedColorReplacementBitmap->GetHeightF()) / 2;
+
+ r = pContentCanvas->DrawBitmap(FloatPoint(bounds.x, bounds.y), *__pContentBgHighlightedColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ delete pContentCanvas;
}
delete pCanvas;
CATCH:
delete pCanvas;
+ delete pContentCanvas;
return r;
}
pSimpleText = new (std::nothrow)TextSimple((const_cast <wchar_t*>(text.GetPointer())), text.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
SysTryReturn(NID_UI_CTRL, (pSimpleText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ pSimpleText->SetTextShadowEnabled(true);
+ pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f));
+
__textObject.RemoveAll();
if (__isFocused && __focusId == boxId)
{
if (!__pEditDate->IsEnabled())
{
- isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_DISABLED);
+ isCustomBitmap = IS_CUSTOM_BITMAP(EDITDATE::CONTENT_BG_DISABLED);
pReplacementBitmap = __pContentBgDisabledColorReplacementBitmap;
pEffectBitmap = __pContentBgEffectDisabledBitmap;
}
else if (GetLastSelectedId() != boxId)
{
- isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_NORMAL);
+ isCustomBitmap = IS_CUSTOM_BITMAP(EDITDATE::CONTENT_BG_NORMAL);
pReplacementBitmap = __pContentBgNormalColorReplacementBitmap;
pEffectBitmap = __pContentBgEffectNormalBitmap;
}
else
{
- isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED);
+ isCustomBitmap = IS_CUSTOM_BITMAP(EDITDATE::CONTENT_BG_PRESSED);
pReplacementBitmap = __pContentBgPressedColorReplacementBitmap;
pEffectBitmap = __pContentBgEffectPressedBitmap;
}
- r = DrawResourceBitmap(canvas, bounds, pReplacementBitmap);
+ r = DrawResourceBitmap(canvas, bounds, pReplacementBitmap, isCustomBitmap);
SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
if (!isCustomBitmap)
}
result
-_EditDatePresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap)
+_EditDatePresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap, bool isCustomBitmap)
{
result r = E_SUCCESS;
}
else
{
- r = canvas.DrawBitmap(bounds, *pBitmap);
+ if (isCustomBitmap)
+ {
+ Canvas *pContentCanvas = __pEditDate->GetCanvasN(bounds);
+ SysTryReturnResult(NID_UI_CTRL, (pContentCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+ FloatPoint position;
+
+ position.x = (bounds.width - pBitmap->GetWidthF()) / 2;
+ position.y = (bounds.height - pBitmap->GetHeightF()) / 2;
+ r = pContentCanvas->DrawBitmap(position, *pBitmap);
+ delete pContentCanvas;
+ }
+ else
+ {
+ r = canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), *pBitmap);
+ }
+
SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
}
if (__isEnterKeyPressed)
{
__isEnterKeyPressed = false;
- __isFocused = true;
+
+ if (__pEditDate->IsFocusModeStateEnabled())
+ {
+ __isFocused = true;
+ }
}
+
int localeDateFormat = dateTimeUtils.GetLocaleDateFormat();
if (__focusId == DATETIME_ID_NONE)
{
_EditDatePresenter::OnFocusModeStateChanged(void)
{
__isFocused = false;
+ __isEnterKeyPressed = false;
__focusId = DATETIME_ID_NONE;
__pEditDate->Invalidate();
return;
}
bool
-_EditDatePresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
+_EditDatePresenter::OnKeyReleased(const _Control& source, const _KeyCode& keyCode)
{
if (!__isFocused)
{
int displayValue = -1;
_DateTimeId boxId = DATETIME_ID_NONE;
- _KeyCode keyCode = keyInfo.GetKeyCode();
switch (keyCode)
{
if (__pEditDate->GetDateTimeBar()->IsActivated())
{
+ __pEditDate->GetDateTimeBar()->ClearPreviousText();
__pEditDate->GetDateTimeBar()->RemoveAllAnimations();
__pEditDate->GetDateTimeBar()->Close();
__pEditDate->GetDateTimeBar()->SetVisibleState(true);
}
__selectedId = DATETIME_ID_NONE;
+ __pEditDate->Invalidate();
return true;
}
pCanvas->Clear();
rect.x = 0.0f;
rect.y = 0.0f;
- r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap);
- isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED);
+ isCustomBitmap = IS_CUSTOM_BITMAP(EDITDATE::CONTENT_BG_PRESSED);
+ r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap, isCustomBitmap);
if (!isCustomBitmap)
{
pNewBoundsAnimation->SetPropertyName("bounds.position");
pNewBoundsAnimation->SetStartValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, oldTextDim.height)));
pNewBoundsAnimation->SetEndValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, 0.0f)));
- pNewBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
pOldBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation();
SysTryCatch(NID_UI_CTRL, (pOldBoundsAnimation != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pOldBoundsAnimation->SetPropertyName("bounds.position");
pOldBoundsAnimation->SetStartValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, 0.0f)));
pOldBoundsAnimation->SetEndValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, oldTextDim.height * -1.0f)));
- pOldBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
pOldSimpleText = new (std::nothrow)TextSimple((const_cast <wchar_t*>(__lastSelectedValue.GetPointer())), __lastSelectedValue.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
SysTryCatch(NID_UI_CTRL, (pOldSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ pOldSimpleText->SetTextShadowEnabled(true);
+ pOldSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f));
+
pCanvas = pOldVisualElement->GetCanvasN();
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
pNewSimpleText = new (std::nothrow)TextSimple((const_cast <wchar_t*>(newValue.GetPointer())), newValue.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
SysTryCatch(NID_UI_CTRL, (pNewSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ pNewSimpleText->SetTextShadowEnabled(true);
+ pNewSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f));
+
pCanvas = pNewVisualElement->GetCanvasN();
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
pCanvas = null;
pOldVisualElement->SetImplicitAnimationEnabled(false);
- pOldVisualElement->AddAnimation(*pOldBoundsAnimation);
-
pNewVisualElement->SetImplicitAnimationEnabled(false);
+
+ AnimationTransaction::Begin(__transactionId);
+ pOldVisualElement->AddAnimation(*pOldBoundsAnimation);
pNewVisualElement->AddAnimation(*pNewBoundsAnimation);
+ AnimationTransaction::SetCurrentTransactionEventListener(__pEditDate);
+ AnimationTransaction::Commit();
delete pOldBoundsAnimation;
delete pNewBoundsAnimation;
}
void
-_EditDatePresenter::OnVisualElementAnimationFinished (const VisualElementAnimation &animation, const String &keyName, VisualElement &target, bool completedNormally)
+_EditDatePresenter::EndTransaction(void)
{
result r = E_SUCCESS;
- __isAnimating = false;
+ __isAnimating = false;
VisualElement* pEditDateElement = __pEditDate->GetVisualElement();
r = GetLastResult();
SysTryReturnVoidResult(NID_UI_CTRL, (pEditDateElement != null), r, "[%s] Propagating.", GetErrorMessage(r));
pEditDateElement->DetachChild(*__pContentProvider);
__pContentProvider->Destroy();
__pContentProvider = null;
- Draw();
}
+ Draw();
+ __transactionId = 0;
return;
}
-
}}} // Tizen::Ui::Controls
__pEdit->SetPropertyKeypadStyle(variantKeypadStyle);
__pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize.");
+ SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pEdit->AddActionEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicLinkEvent = _PublicLinkEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicLinkEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize.");
+ SysTryReturn(NID_UI_CTRL, __pPublicLinkEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pEdit->AddUiLinkEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicTextBlockEvent = _PublicTextBlockEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize.");
+ SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pEdit->AddTextBlockEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicKeypadEvent = _PublicKeypadEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize.");
+ SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pEdit->AddKeypadEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicTextEvent = _PublicTextEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize.");
+ SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pEdit->AddTextEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicScrollPanelEvent = _PublicScrollPanelEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicScrollPanelEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize.");
+ SysTryReturn(NID_UI_CTRL, __pPublicScrollPanelEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
if (inputStyle == INPUT_STYLE_OVERLAY)
{
}
__pPublicLanguageEvent = _PublicLanguageEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to initialize.");
+ SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pEdit->AddLanguageEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
EditInputModeCategory tempInputMode = EDIT_INPUTMODE_ALPHA;
for (int i = 0; i < INPUT_MODE_CATEGORY_MAX; i++)
{
- if ( (categories & tempInputMode) && (tempInputMode != EDIT_INPUTMODE_PREDICTIVE))
+ if ((categories & tempInputMode) && (tempInputMode != EDIT_INPUTMODE_PREDICTIVE))
{
newInputMode = tempInputMode;
break;
{
SysTryReturnResult(NID_UI_CTRL, (__pEdit->GetEditStyle() & EDIT_STYLE_TITLE_TOP) ||
(__pEdit->GetEditStyle() & EDIT_STYLE_TITLE_LEFT), E_SYSTEM,
- "The EditField has no title style.\n");
+ "The EditField has no title style.");
Variant variantTitle(title);
_EditFieldImpl::SetPasswordVisible(bool visible)
{
SysTryReturnResult(NID_UI_CTRL, (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD), E_INVALID_OPERATION,
- "Edit Style is not EDIT_STYLE_PASSWORD.\n");
+ "Edit Style is not EDIT_STYLE_PASSWORD.");
return __pEdit->SetPasswordVisible(visible);
}
if (__pPublicTextEvent != null)
{
IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CHANGED);
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicTextEvent->Fire(*pEventArg);
}
if (__pPublicTextEvent != null)
{
IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CANCELED);
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicTextEvent->Fire(*pEventArg);
}
if (__pPublicActionEvent != null)
{
IEventArg* pActionEventArg = _PublicActionEvent::CreateActionEventArgN(actionId);
- SysTryReturnVoidResult(NID_UI_CTRL, pActionEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pActionEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicActionEvent->Fire(*pActionEventArg);
}
if (__pPublicLinkEvent != null)
{
IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(text, linkType, link);
- SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicLinkEvent->Fire(*pLinkEventArg);
}
if (__pPublicTextBlockEvent != null)
{
IEventArg* pTextBlockEventArg = _PublicTextBlockEvent::CreateTextBlockEventArgN(start, end);
- SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _TextBlockEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicTextBlockEvent->Fire(*pTextBlockEventArg);
}
{
IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CREATED);
- SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicKeypadEvent->Fire(*pKeypadEventArg);
}
{
IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_OPEN);
- SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicKeypadEvent->Fire(*pKeypadEventArg);
}
{
IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CLOSE);
- SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicKeypadEvent->Fire(*pKeypadEventArg);
}
{
IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
- SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicKeypadEvent->Fire(*pKeypadEventArg);
}
IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), onKeypadAction, KEYPAD_EVENT_STATUS_ENTERACTION);
- SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicKeypadEvent->Fire(*pKeypadEventArg);
}
if (__pPublicLanguageEvent)
{
IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage);
- SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _KeypadEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicLanguageEvent->Fire(*pKLanguageEventArg);
}
if (__pPublicScrollPanelEvent != null)
{
IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OVERLAY_CONTROL_CREATED);
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicScrollPanelEvent->Fire(*pEventArg);
}
if (__pPublicScrollPanelEvent != null)
{
IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OVERLAY_CONTROL_OPENED);
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicScrollPanelEvent->Fire(*pEventArg);
}
if (__pPublicScrollPanelEvent != null)
{
IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OVERLAY_CONTROL_CLOSED);
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicScrollPanelEvent->Fire(*pEventArg);
}
if (__pPublicScrollPanelEvent != null)
{
IEventArg* pEventArg = _PublicScrollPanelEvent::CreateScrollPanelEventArgN(OTHER_CONTROL_SELECTED);
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicScrollPanelEvent->Fire(*pEventArg);
}
#include "FUiAnim_EflNode.h"
#include "FUiCtrl_Button.h"
#include "FUiCtrl_ContextMenu.h"
+#include "FUi_DragAndDropItem.h"
#include "FUiCtrl_Edit.h"
#include "FUiCtrl_EditCopyPasteManager.h"
#include "FUiCtrl_EditPresenter.h"
#include "FUiCtrl_TableView.h"
#include "FUi_Window.h"
+#define EDIT_DRAG_AND_DROP_ENABLED 0
using namespace Tizen::Base::Runtime;
using namespace Tizen::Base::Utility;
const int EDIT_PASSWORD_TIMER_PERIOD = 1000;
const int EDIT_CURSOR_TIMER_PERIOD = 600;
const int MAX_LINE_NUMBER = 100;
-const int MAX_FLEXIBLE_HEIGHT_VERTICAL_MODE = 4000;
-const int MAX_FLEXIBLE_HEIGHT_HORIZONTAL_MODE = 2500;
+const float EDIT_MAXIMUM_WIDTH = 30000.0f;
+const float EDIT_MAXIMUM_HEIGHT = 30000.0f;
const int EDIT_FLICK_SCROLL_TIMER_INTERVAL = 10;
const int EDIT_FLICK_SCROLL_MOVE_AMOUNT_MULTIPLIER = 2;
const float DIRECTION_DECISION_RATIO = 1.3f;
-const float HORIZONTAL_DECISION_RATIO = 1.5f;
const float MOVE_SKIP_DECISION_RANGE = 5.0f;
const int TITLE_SLIDING_TIME = 800;
-const int LANGUAGE_CODE_START = 0;
-const int LANGUAGE_CODE_MAX = 2;
-
bool _EditPresenter::__isKeypadExist = false;
bool _EditPresenter::__isClipboardExist = false;
float _EditPresenter::__initialParentHeight = 0.0f;
const float _EditPresenter::TOUCH_PRESS_THRESHOLD_IN_CLEAR_AREA = 0.04f;
_ScrollPanel* _EditPresenter::__pResizedPanel = null;
-_EditAnimationProvider::_EditAnimationProvider(void)
+
+class _EditDragAndDropWindow
+ : public Tizen::Ui::_Window
{
-}
+public:
+ _EditDragAndDropWindow(void);
+ virtual ~_EditDragAndDropWindow(void);
+
+ virtual result OnAttachedToMainTree(void);
+ void SetLabel(_Label* pLabel);
+private:
+ _Label* __pLabel;
+}; // _EditDragAndDropWindow
-_EditAnimationProvider::~_EditAnimationProvider(void)
+_EditDragAndDropWindow::_EditDragAndDropWindow(void)
+: __pLabel(null)
{
}
-VisualElementAnimation*
-_EditAnimationProvider::CreateAnimationForProperty(VisualElement& source, const String& property)
+_EditDragAndDropWindow::~_EditDragAndDropWindow(void)
{
- VisualElementAnimation* pAnimation = VisualElementAnimationProvider::CreateAnimationForProperty(source, property);
- if (pAnimation != null)
+ if (__pLabel)
{
- pAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut"));
- pAnimation->SetDuration(ANIMATION_DURATION);
+ DetachChild(*__pLabel);
+ delete __pLabel;
+ __pLabel = null;
}
+}
+
+result
+_EditDragAndDropWindow::OnAttachedToMainTree(void)
+{
+ AcquireHandle();
- return pAnimation;
+ return E_SUCCESS;
+}
+
+void
+_EditDragAndDropWindow::SetLabel(_Label* pLabel)
+{
+ __pLabel = pLabel;
}
_EditPresenter::_EditPresenter(void)
, __pPasswordTimer(null)
, __pFont(null)
, __pCursorVisualElement(null)
+ , __pDragAndDropCueVisualElement(null)
, __pTextVisualElement(null)
, __pTitleTextVisualElement(null)
, __pCopyPasteManager(null)
, __isTouchMoving(false)
, __isTouchPressed(false)
, __isClearIconPressed(false)
+ , __isClearIconVisible(false)
, __isCursorOpaque(false)
, __isTouchReleaseSkipped(false)
, __isViewerModeEnabled(false)
, __isCutLinkParserEnabled(false)
, __echoChar('*')
, __ContentTextStatus(EDIT_TEXT_STATUS_COMPOSE_NON)
- , __pEditVEDelegator(null)
, __isAutoShrinkEnabled(false)
, __groupStyle(GROUP_STYLE_NONE)
, __isFontInitialized(false)
, __isPasswordVisible(false)
, __needToCreateCopyPastePopup(false)
, __calculatedCursorBounds(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
+ , __dragAndDropStarted(false)
+ , __dragAndDropString("")
+ , __isTouchLongPressed(false)
{
}
_EditPresenter::OnTextCommitted(const String& commitText)
{
bool isTextComposingFinished = false;
+ bool isDeletedBlockTextByEnter = false;
char enterText1[2] = {'\n', };
char enterText2[2] = {'\r', };
int end = 0;
GetBlockRange(start, end);
__isFlexibleHeightFrozen = true;
- DeleteText(start, end);
+ if (DeleteText(start, end) == E_SUCCESS)
+ {
+ isDeletedBlockTextByEnter = true;
+ }
__isFlexibleHeightFrozen = false;
ReleaseTextBlock();
}
if(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
{
+ DrawText();
+ if (isDeletedBlockTextByEnter)
+ {
+ __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED);
+ }
return;
}
}
ReleaseTextBlock();
}
- DrawText();
+ DrawText();
__pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED);
void
_EditPresenter::GetPreviousText(InputConnection& source, String& text, int& cursorPosition)
{
- const int SURRONDING_TEXT_SIZE = 5;
- int stringLength = 0;
- String tempString;
+ const int SURROUNDING_PREVIOUS_TEXT_SIZE = 128;
+ const int SURROUNDING_NEXT_TEXT_SIZE = 32;
+ int inputTextLength = GetTextLength();
- if (__cursorPos == 0)
+ if (inputTextLength < 1)
{
text = null;
cursorPosition = 0;
}
else
{
- if (__cursorPos < SURRONDING_TEXT_SIZE)
+ int start = __cursorPos - SURROUNDING_PREVIOUS_TEXT_SIZE;
+ int end = __cursorPos + SURROUNDING_NEXT_TEXT_SIZE -1;
+
+ if (start < 0)
{
- text = GetText(0, __cursorPos - 1);
+ start = 0;
}
- else
- {
- int previousTextSize = 0;
-
- for( int index = 0; index < __cursorPos; index++)
- {
- previousTextSize++;
- if ( __pTextBuffer[__cursorPos-index-1] != 0x20)
- {
- break;
- }
- }
- if (previousTextSize < SURRONDING_TEXT_SIZE)
- {
- previousTextSize = SURRONDING_TEXT_SIZE;
- }
-
- text = GetText(__cursorPos - previousTextSize, __cursorPos - 1);
+ if (end > inputTextLength -1)
+ {
+ end = inputTextLength -1;
}
- stringLength = text.GetLength();
- cursorPosition = stringLength;
+ text = GetText(start, end);
+ cursorPosition = __cursorPos - start;
}
return;
SysLog(NID_UI_CTRL, "clipboard height = %f, [KeypadExist:%d]keypad height = %f", floatClipboardPopupSize.height, __isKeypadExist, absKeypadBounds.height);
+ __pEdit->AddClipboardShowTriggerEventListener();
+
if (__isKeypadExist) //resize as difference between clipboard height vs keypad height
{
if (floatClipboardPopupSize.height > absKeypadBounds.height)
}
if (__isCopyPasteManagerExist)
{
- __pCopyPasteManager->AdjustBounds();
+ UpdateComponentInformation();
+ __pCopyPasteManager->Show();
}
}
__isTextBlocked = false;
}
- if (__pClipboard)
- {
- __pClipboard->HidePopup();
- }
-
__isClipboardExist = false;
FloatRectangle absKeypadBounds;
GetKeypadBounds(absKeypadBounds);
SysLog(NID_UI_CTRL, "clipboard closed! [KeypadExist:%d]keypad height = %f", __isKeypadExist, absKeypadBounds.height);
- if (__isInputConnectionBound)
- {
- ChangeLayoutInternal(__pEdit->GetOrientation());
- }
+ ChangeLayoutInternal(__pEdit->GetOrientation());
+
+ __pEdit->RemoveClipboardShowTriggerEventListener();
if (__isKeypadExist)
{
AdjustParentPanelHeight(false);
+ __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
+
if (__pParentForm)
{
__pParentForm->Draw();
+
+ if (__pParentForm->GetVisibleState())
+ {
+ SysLog(NID_UI_CTRL, "[ClipboardShow] Show is called!!!!!!");
+ __pParentForm->Show();
+ }
}
- __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
}
else
{
{
SysLog(NID_UI_CTRL, "Form deflate RESET!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
- __pParentForm->Draw();
}
if (!__isKeypadCommandButtonVisible)
{
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
}
+
+ if (__pParentForm)
+ {
+ __pParentForm->Draw();
+
+ if (__pParentForm->GetVisibleState())
+ {
+ SysLog(NID_UI_CTRL, "[ClipboardShow] Show is called!!!!!!");
+ __pParentForm->Show();
+ }
+ }
}
__clipboardConnected = false;
{
if (__clipboardConnected) //Edit control removed after FocusLost or without FocusLost callback.
{
+ __pEdit->RemoveClipboardShowTriggerEventListener();
__pClipboard->HidePopup();
__isClipboardExist = false;
}
__isKeypadExist = false;
__latestBoundedContext = null;
+
+ __pEdit->DetachScrollPanelEvent();
}
__initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_NONE;
__footerVisibleChanged = false;
+ if (__pParentPanel)
+ {
+ __pParentPanel->RemoveScrollEventListener(*__pEdit);
+ }
if (__pClipboard)
{
__pCursorVisualElement = null;
}
- if (__pTitleTextVisualElement)
+ if (__pDragAndDropCueVisualElement)
{
- __pTitleTextVisualElement->Destroy();
- __pTitleTextVisualElement = null;
+ __pDragAndDropCueVisualElement->Destroy();
+ __pDragAndDropCueVisualElement = null;
}
- if (__pEditVEDelegator)
+ if (__pTitleTextVisualElement)
{
- delete __pEditVEDelegator;
- __pEditVEDelegator = null;
+ __pTitleTextVisualElement->Destroy();
+ __pTitleTextVisualElement = null;
}
return E_SUCCESS;
{
result r = E_SUCCESS;
__pTextVisualElement = new (std::nothrow) _VisualElement;
- SysTryReturn(NID_UI_CTRL, __pTextVisualElement != null, false, E_OUT_OF_MEMORY, "Unable to create __pTextVisualElement instance.");
+ SysTryReturn(NID_UI_CTRL, __pTextVisualElement != null, false, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pTextVisualElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct", GetErrorMessage(r));
__pEdit = dynamic_cast<_Edit*>(const_cast<_Control*>(&control));
SysAssertf(__pEdit != null, "__pEdit is null");
- __pTextObject = new (std::nothrow) TextObject;
- if (__pTextObject == null)
- {
- r = E_OUT_OF_MEMORY;
- goto CATCH;
- }
+ __pTextObject = new (std::nothrow) TextObject();
+ SysTryCatch(NID_UI_CTRL, __pTextObject, , r = E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTextObject->Construct();
- pSimpleText = new (std::nothrow)TextSimple(null, 0, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
+ pSimpleText = new (std::nothrow) TextSimple(null, 0, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
+ SysTryCatch(NID_UI_CTRL, pSimpleText, , r = E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTextObject->AppendElement(*pSimpleText);
if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
{
- __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
+ if (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY)
+ {
+ __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
+ }
if (__pEdit->IsFullScreenKeypadEdit())
{
__pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP);
__pTextObject->SetWrap(__textObjectWrap);
}
- __pTextString = new (std::nothrow) String;
- SysTryCatch(NID_UI_CTRL, __pTextString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer.");
+ __pTextString = new (std::nothrow) String();
+ SysTryCatch(NID_UI_CTRL, __pTextString, , r = E_OUT_OF_MEMORY, "Memory allocation failed.");
__limitLength = 0;
if (__pFont == null)
__ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON;
}
- __pScrollEffect = new (std::nothrow) _EditScrollEffectInfo;
- SysTryCatch(NID_UI_CTRL, __pScrollEffect, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create EditScrollEffectInfo");
+ __pScrollEffect = new (std::nothrow) _EditScrollEffectInfo();
+ SysTryCatch(NID_UI_CTRL, __pScrollEffect, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
for (int i = 0; i < EDIT_SCROLLFRAME_MAX; i++)
{
__pScrollEffect->currentAbsY = -1.0f;
__pScrollEffect->cursorPosition = -1;
- pEditModel = new (std::nothrow) _EditModel;
- SysTryCatch(NID_UI_CTRL, pEditModel, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance");
+ pEditModel = new (std::nothrow) _EditModel();
+ SysTryCatch(NID_UI_CTRL, pEditModel, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
SetModel(*pEditModel);
__pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold);
- __pCursorVisualElement = new (std::nothrow) _VisualElement;
- SysTryCatch(NID_UI_CTRL, __pCursorVisualElement, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance");
+ __pCursorVisualElement = new (std::nothrow) _VisualElement();
+ SysTryCatch(NID_UI_CTRL, __pCursorVisualElement, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pCursorVisualElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct", GetErrorMessage(r));
__pCursorVisualElement->SetSurfaceOpaque(false);
__pCursorVisualElement->SetImplicitAnimationEnabled(false);
+ __pDragAndDropCueVisualElement = new (std::nothrow) _VisualElement();
+ SysTryCatch(NID_UI_CTRL, __pDragAndDropCueVisualElement, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ r = __pDragAndDropCueVisualElement->Construct();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct", GetErrorMessage(r));
+
+ __pDragAndDropCueVisualElement->SetSurfaceOpaque(false);
+ __pDragAndDropCueVisualElement->SetImplicitAnimationEnabled(false);
+
pEditVisualElement = __pEdit->GetVisualElement();
SysTryCatch(NID_UI_CTRL, pEditVisualElement, , r = E_SYSTEM, "[E_SYSTEM] Unable to get root visual element.");
__pCursorVisualElement->SetShowState(true);
+ __pDragAndDropCueVisualElement->SetShowState(false);
r = pEditVisualElement->AttachChild(*__pCursorVisualElement);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to add child", GetErrorMessage(r));
+ r = pEditVisualElement->AttachChild(*__pDragAndDropCueVisualElement);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to add child", GetErrorMessage(r));
+
__pInputConnection = _InputConnectionImpl::CreateInputConnectionImplN(null);
SysTryCatch(NID_UI_CTRL, __pInputConnection, , r = E_SYSTEM, "[E_SYSTEM] Unable to create an instance .");
__pTextObject->SetBounds(__textObjectBounds);
__pTextObject->HideRearSpace(TEXT_OBJECT_SPACE_HIDE_TYPE_NONE);
- __pEditVEDelegator = new (std::nothrow) _EditAnimationProvider();
- SysTryCatch(NID_UI_CTRL, __pEditVEDelegator, , E_OUT_OF_MEMORY, "Memory allocation failed.");
-
pWindow = pControlManager->GetCurrentFrame();
if (pWindow)
{
__pClipboard->AddClipboardPopupEventListener(*this);
}
+ __pEdit->SetMaximumSize(FloatDimension(EDIT_MAXIMUM_WIDTH, EDIT_MAXIMUM_HEIGHT));
+
return r;
CATCH:
if (__isTouchMoving && !__pTextVisualElement)
{
result r = E_SUCCESS;
- __pTextVisualElement = new (std::nothrow) _VisualElement;
- SysTryReturnVoidResult(NID_UI_CTRL, __pTextVisualElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create __pTextVisualElement instance.");
+ __pTextVisualElement = new (std::nothrow) _VisualElement();
+ SysTryReturnVoidResult(NID_UI_CTRL, __pTextVisualElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pTextVisualElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct", GetErrorMessage(r));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to add child", GetErrorMessage(r));
pCanvas = __pEdit->GetCanvasN();
- SysTryCatch(NID_UI_CTRL, pCanvas, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance.");
+ SysTryCatch(NID_UI_CTRL, pCanvas, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pCanvas->SetBackgroundColor(Color(0));
r = pCanvas->Clear();
pCanvas->SetBackgroundColor(Color(0));
pCanvas->Clear();
- DrawText(*pCanvas);
-
if (__pEdit->GetEditStyle() & EDIT_STYLE_CLEAR)
{
- DrawClearIcon(*pCanvas);
+ if (GetSearchBarFlag()) //SearchBar
+ {
+ if (__pTextString->GetLength() == 0)
+ {
+ if (__isClearIconVisible)
+ {
+ __isClearIconVisible = false;
+ AdjustTextBounds(__isClearIconVisible);
+ }
+ }
+ else
+ {
+ if (!__isClearIconVisible)
+ {
+ __isClearIconVisible = true;
+ AdjustTextBounds(__isClearIconVisible);
+ }
+
+ DrawClearIcon(*pCanvas);
+ }
+ }
+ else //EditField
+ {
+ if (IsCurrentFocused() == true)
+ {
+ if (__pTextString->GetLength() == 0)
+ {
+ if (__isClearIconVisible)
+ {
+ __isClearIconVisible = false;
+ AdjustTextBounds(__isClearIconVisible);
+ }
+ }
+ else
+ {
+ if (!__isClearIconVisible)
+ {
+ __isClearIconVisible = true;
+ AdjustTextBounds(__isClearIconVisible);
+ }
+
+ if (!(!__pEdit->IsFocusModeStateEnabled() && __pEdit->GetInputStyle() == INPUT_STYLE_FULLSCREEN))
+ {
+ DrawClearIcon(*pCanvas);
+ }
+ }
+ }
+ else
+ {
+ if (__isClearIconVisible)
+ {
+ __isClearIconVisible = false;
+ AdjustTextBounds(__isClearIconVisible);
+ }
+ }
+ }
}
+ DrawText(*pCanvas);
InitializeCursor();
delete pCanvas;
}
{
return;
}
- int startRange = 0;
- int lengthRange = 0;
- int rowIndex = -1;
- int columnIndex = -1;
+ int leftHandlerCursorPos = 0;
+ int rightHandlerCursorPos = 0;
+ int leftRowIndex = -1;
+ int leftColumnIndex = -1;
+ int rightRowIndex = -1;
+ int rightColumnIndex = -1;
Color textBlockLineColor;
GET_COLOR_CONFIG(EDIT::CURSOR_NORMAL, textBlockLineColor);
- GetBlockRange(startRange, lengthRange);
-
FloatRectangle cursorBounds;
FloatRectangle textObjectBounds = __textObjectBounds;
textObjectBounds.x -= 1;
if (__pCopyPasteManager)
{
- __pCopyPasteManager->GetHandlerRowColumnIndex(false, true, rowIndex, columnIndex);
- }
-
- if (rowIndex != -1 && columnIndex != -1)
- {
- CalculateCursorBounds(__textObjectBounds, cursorBounds, rowIndex, columnIndex);
- }
- else
- {
- CalculateCursorBounds(__textObjectBounds, cursorBounds, startRange);
- }
-
- if (cursorBounds.x != -1)
- {
- cursorBounds.x -= 1;
- cursorBounds = cursorBounds.GetIntersection(textObjectBounds);
- canvas.FillRectangle(textBlockLineColor, cursorBounds);
- }
-
- rowIndex = -1;
- columnIndex = -1;
-
- if (__pCopyPasteManager)
- {
- __pCopyPasteManager->GetHandlerRowColumnIndex(false, false, rowIndex, columnIndex);
- }
- if (rowIndex != -1 && columnIndex != -1)
- {
- CalculateCursorBounds(__textObjectBounds, cursorBounds, rowIndex, columnIndex);
- }
- else
- {
- CalculateCursorBounds(__textObjectBounds, cursorBounds, lengthRange);
- }
+ __pCopyPasteManager->GetHandlerRowColumnIndex(false, true, leftRowIndex, leftColumnIndex);
+ __pCopyPasteManager->GetHandlerRowColumnIndex(false, false, rightRowIndex, rightColumnIndex);
+ leftHandlerCursorPos = __pCopyPasteManager->GetHandlerCursorPosition(_EditCopyPasteManager::HANDLER_TYPE_LEFT);
+ rightHandlerCursorPos = __pCopyPasteManager->GetHandlerCursorPosition(_EditCopyPasteManager::HANDLER_TYPE_RIGHT);
- if (cursorBounds.x != -1 && cursorBounds.x <= __textObjectBounds.x + __textObjectBounds.width)
- {
- cursorBounds.x -= 1;
- cursorBounds = cursorBounds.GetIntersection(textObjectBounds);
- canvas.FillRectangle(textBlockLineColor, cursorBounds);
+ if (leftRowIndex != -1 && leftColumnIndex != -1)
+ {
+ CalculateCursorBounds(__textObjectBounds, cursorBounds, leftRowIndex, leftColumnIndex);
+ }
+ else
+ {
+ CalculateCursorBounds(__textObjectBounds, cursorBounds, leftHandlerCursorPos);
+ }
+ if (cursorBounds.x != -1)
+ {
+ cursorBounds.x -= 1;
+ cursorBounds = cursorBounds.GetIntersection(textObjectBounds);
+ canvas.FillRectangle(textBlockLineColor, cursorBounds);
+ }
+ if (rightRowIndex != -1 && rightColumnIndex != -1)
+ {
+ CalculateCursorBounds(__textObjectBounds, cursorBounds, rightRowIndex, rightColumnIndex);
+ }
+ else
+ {
+ CalculateCursorBounds(__textObjectBounds, cursorBounds, rightHandlerCursorPos);
+ }
+ if (cursorBounds.x != -1 && cursorBounds.x <= __textObjectBounds.x + __textObjectBounds.width)
+ {
+ cursorBounds.x -= 1;
+ cursorBounds = cursorBounds.GetIntersection(textObjectBounds);
+ canvas.FillRectangle(textBlockLineColor, cursorBounds);
+ }
}
}
{
result r = E_SUCCESS;
- if (!(__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) && IsCurrentFocused() == false)
+ if (!(__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) && IsCurrentFocused() == false && __pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY)
{
__pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
}
__pTextObject->Compose();
}
}
- if (!(__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD))
+ if (!(__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) && __pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY)
{
__pTextObject->SetFirstDisplayLineIndexFromTextIndex(0);
+ __pTextObject->SetFirstDisplayPositionX(0.0f);
}
__pTextObject->SetForegroundColor(__pEdit->GetTextColor(editStatus), 0, __pTextObject->GetTextLength());
__pTextObject->SetBlock(false);
+ if (__pTextObject->GetAction() != TEXT_OBJECT_ACTION_TYPE_ABBREV)
+ {
+ UpdateComponentInformation();
+ }
}
else
{
__pTextObject->SetBlock(false);
__isTextBlocked = false;
}
-
UpdateComponentInformation();
}
{
result r = E_SUCCESS;
- float clearIconWidth = 0;
- float clearIconHeight = 0;
+ float clearIconWidth = 0.0f;
+ float clearIconHeight = 0.0f;
+ float cursorWidth = 0.0f;
_ControlOrientation orientation = __pEdit->GetOrientation();
GET_SHAPE_CONFIG(EDIT::CLEAR_ICON_WIDTH, orientation, clearIconWidth);
GET_SHAPE_CONFIG(EDIT::CLEAR_ICON_HEIGHT, orientation, clearIconHeight);
+ GET_SHAPE_CONFIG(EDIT::CURSOR_WIDTH, __pEdit->GetOrientation(), cursorWidth);
if (__pTextString->GetLength() == 0)
{
}
Bitmap* pEditBitmapClear = null;
- Bitmap* pEditReplacedBitmapClear = null;
Color editClearIconColor;
if (!__pEdit->IsEnabled())
{
- r = GET_BITMAP_CONFIG_N(EDIT::CLEAR_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pEditBitmapClear);
+ GET_COLOR_CONFIG(EDIT::CLEAR_ICON_DISABLED, editClearIconColor);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDIT::CLEAR_ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, editClearIconColor, pEditBitmapClear);
if (pEditBitmapClear == null)
{
return E_SYSTEM;
}
-
- GET_COLOR_CONFIG(EDIT::CLEAR_ICON_DISABLED, editClearIconColor);
}
else if (__isClearIconPressed)
{
- r = GET_BITMAP_CONFIG_N(EDIT::CLEAR_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pEditBitmapClear);
+ GET_COLOR_CONFIG(EDIT::CLEAR_ICON_PRESSED, editClearIconColor);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDIT::CLEAR_ICON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, editClearIconColor, pEditBitmapClear);
if (pEditBitmapClear == null)
{
return E_SYSTEM;
}
-
- GET_COLOR_CONFIG(EDIT::CLEAR_ICON_PRESSED, editClearIconColor);
}
else
{
- r = GET_BITMAP_CONFIG_N(EDIT::CLEAR_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pEditBitmapClear);
+ GET_COLOR_CONFIG(EDIT::CLEAR_ICON_NORMAL, editClearIconColor);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDIT::CLEAR_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, editClearIconColor, pEditBitmapClear);
if (pEditBitmapClear == null)
{
return E_SYSTEM;
}
-
- GET_COLOR_CONFIG(EDIT::CLEAR_ICON_NORMAL, editClearIconColor);
}
FloatRectangle textRect = __textObjectBounds;
- FloatRectangle afterClearIconRect(textRect.x + textRect.width, textRect.y + (textRect.height - clearIconHeight) / 2.0f, clearIconWidth, clearIconHeight);
+ FloatRectangle afterClearIconRect(textRect.x + textRect.width + cursorWidth, textRect.y + (textRect.height - clearIconHeight) / 2.0f, clearIconWidth, clearIconHeight);
FloatRectangle editBounds = __pEdit->GetBoundsF();
- pEditReplacedBitmapClear = _BitmapImpl::GetColorReplacedBitmapN(*pEditBitmapClear, Color::GetColor(COLOR_ID_MAGENTA),
- editClearIconColor);
- SysTryCatch(NID_UI_CTRL, pEditReplacedBitmapClear, , r = E_SYSTEM, "[E_SYSTEM] Unable to create an instance .");
-
if (__clearIconBounds != afterClearIconRect)
{
__clearIconBounds = afterClearIconRect;
__clearIconBounds.y = textRect.y;
}
- if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pEditReplacedBitmapClear))
+ if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pEditBitmapClear))
{
- r = canvas.DrawNinePatchedBitmap(__clearIconBounds, *pEditReplacedBitmapClear);
+ r = canvas.DrawNinePatchedBitmap(__clearIconBounds, *pEditBitmapClear);
}
else
{
- r = canvas.DrawBitmap(__clearIconBounds, *pEditReplacedBitmapClear);
+ r = canvas.DrawBitmap(__clearIconBounds, *pEditBitmapClear);
}
if (pEditBitmapClear)
pEditBitmapClear = null;
}
- if (pEditReplacedBitmapClear)
- {
- delete pEditReplacedBitmapClear;
- pEditReplacedBitmapClear = null;
- }
-
- return r;
-
-CATCH:
- delete pEditBitmapClear;
-
return r;
}
result
-_EditPresenter::Draw(Canvas& canvas)
+_EditPresenter::Draw(void)
{
result r = E_SUCCESS;
}
}
+ //Do not change the bounds of the edit control after acquiring a canvas.
+ Canvas* pCanvas = __pEdit->GetCanvasN();
+ SysTryReturnResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "Memory allocation failed.");
+
__isCursorOpaque = true;
- canvas.SetBackgroundColor(Color(0));
- r = canvas.Clear();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ pCanvas->SetBackgroundColor(Color(0));
+ r = pCanvas->Clear();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- DrawBackground(canvas);
+ DrawBackground(*pCanvas);
if (__pTextVisualElement)
{
}
else
{
- DrawText(canvas);
if (__pEdit->GetEditStyle() & EDIT_STYLE_CLEAR)
{
- DrawClearIcon(canvas);
+ if (GetSearchBarFlag()) //SearchBar
+ {
+ if (__pTextString->GetLength() == 0)
+ {
+ if (__isClearIconVisible)
+ {
+ __isClearIconVisible = false;
+ AdjustTextBounds(__isClearIconVisible);
+ }
+ }
+ else
+ {
+ if (!__isClearIconVisible)
+ {
+ __isClearIconVisible = true;
+ AdjustTextBounds(__isClearIconVisible);
+ }
+
+ DrawClearIcon(*pCanvas);
+ }
+ }
+ else //EditField
+ {
+ if (IsCurrentFocused() == true)
+ {
+ if (__pTextString->GetLength() == 0)
+ {
+ if (__isClearIconVisible)
+ {
+ __isClearIconVisible = false;
+ AdjustTextBounds(__isClearIconVisible);
+ }
+ }
+ else
+ {
+ if (!__isClearIconVisible)
+ {
+ __isClearIconVisible = true;
+ AdjustTextBounds(__isClearIconVisible);
+ }
+
+ if (!(!__pEdit->IsFocusModeStateEnabled() && __pEdit->GetInputStyle() == INPUT_STYLE_FULLSCREEN))
+ {
+ DrawClearIcon(*pCanvas);
+ }
+ }
+ }
+ else
+ {
+ if(__isClearIconVisible)
+ {
+ __isClearIconVisible = false;
+ AdjustTextBounds(__isClearIconVisible);
+ }
+ }
+ }
}
+
+ DrawText(*pCanvas);
}
- if (__rotated && !__clipboardConnected) // Command button should be relocated after rotation in case of no keypad.
+ RestoreCopyPasteManager();
+
+ if (__isCopyPasteManagerExist)
{
- if (__isCopyPasteManagerExist)
- {
- PostInternalEvent(String(L"ShowCopyPaste"));
- }
- __rotated = false;
+ __pCopyPasteManager->Show();
}
InitializeCursor();
if (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE)
{
AdjustFlexibleHeight();
-
- if (__pEdit->HasFocusRing())
- {
- __pEdit->RemoveFocusRing();
- __pEdit->OnDrawFocus();
- }
}
}
+ //fall through
+
+CATCH:
+ delete pCanvas;
+
return r;
}
+void
+_EditPresenter::RestoreCopyPasteManager(void)
+{
+ if (__rotated && !__clipboardConnected) // Command button should be relocated after rotation in case of no keypad.
+ {
+ if (__isCopyPasteManagerExist)
+ {
+ PostInternalEvent(String(L"ShowCopyPaste"));
+ }
+ __rotated = false;
+ }
+}
+
result
_EditPresenter::ConvertLinkType(void)
{
SysTryReturnResult(NID_UI_CTRL, pFont, GetLastResult(), "Unable to get font.");
_FontImpl* fontImpl = _FontImpl::GetInstance(*pFont);
- SysTryReturnResult(NID_UI_CTRL, fontImpl, GetLastResult(), "[E_SYSTEM] fontImpl is null.");
+ SysTryReturnResult(NID_UI_CTRL, fontImpl, GetLastResult(), "fontImpl is null.");
fontImpl->SetUnderline(true);
__pEdit->GetCutlinkColorInfo(editLinkType, &cutlinkColor);
if ((cursorBounds.y + cursorBounds.height > textBounds.y + textBounds.height) &&
(cursorBounds.y < textBounds.y + textBounds.height))
{
- float cursorHeightDiff = cursorBounds.y + cursorBounds.height - textBounds.y - textBounds.height - 1.0f;
+ float cursorHeightDiff = cursorBounds.y + cursorBounds.height - textBounds.y - textBounds.height;
if (cursorHeightDiff > 0.0f)
{
cursorBounds.height -= cursorHeightDiff;
if ((cursorBounds.y + cursorBounds.height > textBounds.y + textBounds.height) &&
(cursorBounds.y < textBounds.y + textBounds.height))
{
- float cursorHeightDiff = cursorBounds.y + cursorBounds.height - textBounds.y - textBounds.height - 1.0f;
+ float cursorHeightDiff = cursorBounds.y + cursorBounds.height - textBounds.y - textBounds.height;
if (cursorHeightDiff > 0.0f)
{
cursorBounds.height -= cursorHeightDiff;
return E_SUCCESS;
}
-bool
-_EditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
+result
+_EditPresenter::ScrollContentsOnKey(const Tizen::Ui::_KeyCode keyCode)
{
- if ((&source != __pEdit) || (__pEdit->GetEnableState() == false))
+ int firstDisplayLine = 0;
+ float firstDisplayY = __pTextObject->GetFirstDisplayPositionYF();
+ float totalHeight = __pTextObject->GetTotalHeightF();
+
+ if (__pTextObject->GetTextLength() < 1)
+ {
+ return E_SYSTEM;
+ }
+
+ if (totalHeight <= __textObjectBounds.height)
+ {
+ return E_SYSTEM;
+ }
+
+ switch(keyCode)
+ {
+ case _KEY_UP:
+ if (firstDisplayY <= 0.0f)
+ {
+ return E_SYSTEM;
+ }
+
+ firstDisplayLine = __pTextObject->GetFirstDisplayLineIndex();
+ if (firstDisplayLine < 1)
+ {
+ __pTextObject->SetFirstDisplayPositionY(0.0f);
+ }
+ else
+ {
+ FloatRectangle firstDisplayLineRect = __pTextObject->GetBoundsAtLineF(firstDisplayLine);
+ if ( (firstDisplayLineRect.y + firstDisplayLineRect.height - firstDisplayY) < firstDisplayLineRect.height/5.0f)
+ {
+ __pTextObject->SetFirstDisplayPositionY(firstDisplayLineRect.y);
+ }
+ else
+ {
+ __pTextObject->SetFirstDisplayLineIndex(firstDisplayLine - 1);
+ }
+ }
+ break;
+ case _KEY_DOWN:
+ if (firstDisplayY >= (totalHeight - __textObjectBounds.height))
+ {
+ return E_SYSTEM;
+ }
+
+ firstDisplayLine = __pTextObject->GetFirstDisplayLineIndex();
+ if (firstDisplayLine >= __pTextObject->GetTotalLineCount() - __pTextObject->GetDisplayLineCount())
+ {
+ __pTextObject->SetFirstDisplayPositionY(totalHeight - __textObjectBounds.height);
+ }
+ else
+ {
+ FloatRectangle firstDisplayLineRect = __pTextObject->GetBoundsAtLineF(firstDisplayLine);
+ int newFirstDisplayLine = firstDisplayLine + 1;
+
+ if ( (firstDisplayLineRect.y + firstDisplayLineRect.height - firstDisplayY) < firstDisplayLineRect.height/5.0f)
+ {
+ if (firstDisplayLine + 2 < __pTextObject->GetTotalLineCount() - __pTextObject->GetDisplayLineCount())
+ {
+ newFirstDisplayLine = firstDisplayLine + 2;
+ }
+ }
+ __pTextObject->SetFirstDisplayLineIndex(newFirstDisplayLine);
+ }
+ break;
+ default:
+ return E_SYSTEM;
+ }
+
+ if (__isCopyPasteManagerExist)
+ {
+ __pCopyPasteManager->AdjustBounds();
+ }
+
+ return E_SUCCESS;
+}
+
+bool
+_EditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
+{
+ if ((&source != __pEdit) || (__pEdit->GetEnableState() == false))
{
return false;
}
}
}
- if (__pEdit->GetEditStyle() & EDIT_STYLE_CLEAR && __pTextString->GetLength() > 0)
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_CLEAR && __pTextString->GetLength() > 0 && __isClearIconVisible)
{
if ((__pressedPoint.x >= __clearIconBounds.x) && (__pressedPoint.x <= __clearIconBounds.x + __clearIconBounds.width)
&& (__pressedPoint.y >= __clearIconBounds.y) && (__pressedPoint.y <= __clearIconBounds.y + __clearIconBounds.height)) // Clear Icon Pressed
bool
_EditPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo)
{
+ InitializeCopyPasteManager();
+
if ((&source != __pEdit) || (__pEdit->GetEnableState() == false))
{
return false;
bool
_EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo)
{
+ if (__dragAndDropStarted)
+ {
+ ResetDragAndDrop();
+ return true;
+ }
+
+ __isTouchLongPressed = false;
+
if (__isCopyPasteManagerExist)
{
if (__isTouchPressed && !__isCopyPastePopupMoving)
if ((touchPoint.x >= __clearIconBounds.x) && (touchPoint.x <= __clearIconBounds.x + __clearIconBounds.width)
&& (touchPoint.y >= __clearIconBounds.y) && (touchPoint.y <= __clearIconBounds.y + __clearIconBounds.height))
{
+ if (__pEdit->IsTouchMoving())
+ {
+ PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pEdit);
+ }
ClearText();
__pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED);
__isMovingCursorByTouchMove = false;
__pEdit->Invalidate();
}
}
+
+ __isTouchPressed = false;
+ __isCopyPastePopupMoving = false;
+
+ if (IsCurrentFocused())
+ {
+ return true;
+ }
}
else
{
{
__pEdit->SetFocused();
}
- __pCopyPasteManager->CreateCopyPastePopup();
+
+ FadeOutScrollBar(); // Fade out scrollbar when copypaste popup is moving.
+ if (__needToCreateCopyPastePopup)
+ {
+ __pCopyPasteManager->CreateCopyPastePopup();
+ }
+ __needToCreateCopyPastePopup = false;
__pCopyPasteManager->Show();
- }
- __isTouchPressed = false;
- __isCopyPastePopupMoving = false;
- return true;
+ __isTouchPressed = false;
+ __isCopyPastePopupMoving = false;
+
+ return true;
+ }
}
if ((&source != __pEdit) || (__pEdit->GetEnableState() == false))
if ((touchPoint.x >= __clearIconBounds.x) && (touchPoint.x <= __clearIconBounds.x + __clearIconBounds.width)
&& (touchPoint.y >= __clearIconBounds.y) && (touchPoint.y <= __clearIconBounds.y + __clearIconBounds.height))
{
+ if (__pEdit->IsTouchMoving())
+ {
+ PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pEdit);
+ }
ClearText();
__pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED);
__isTouchPressed = false;
__isMovingCursorByTouchMove = false;
__pEdit->Invalidate();
- return true;
+ __isTouchMoving = false;
+ if (IsCurrentFocused() || GetSearchBarFlag())
+ {
+ return true;
+ }
}
}
LinkType baseLinkType = pCutLinkObject->GetCutLinkType();
// Send Ui Link Event
+ PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pEdit);
__pEdit->SendLinkEvent(cutLinkString, baseLinkType, cutLinkString);
}
}
{
if ((__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) == false)
{
+ if (__isInputConnectionBound == true && __isTextComposing == true)
+ {
+ __pInputConnection->FinishTextComposition();
+ }
SetCursorPosition(GetTextLength());
}
}
}
}
- if (!__isUSBKeyboardConnected && !__isKeypadExist && !IsViewModeEnabled())
+ if (!__isUSBKeyboardConnected && !__isKeypadExist && !IsViewModeEnabled() && IsKeypadEnabled())
{
needToCreatePopup = false;
}
- if (IsViewModeEnabled() && GetTextLength() == 0)
+ if (GetTextLength() == 0 && !IsClipped())
+ {
+ needToCreatePopup = false;
+ }
+
+ if (IsViewModeEnabled())
{
needToCreatePopup = false;
}
__pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "Unable to create _EditCopyPasteManager instance.");
__pCopyPasteManager->AddCopyPasteEventListener(*this);
+ UpdateComponentInformation();
+ __pCopyPasteManager->DestroyCopyPasteMagnifier();
__pCopyPasteManager->Show();
__isCopyPasteManagerExist = true;
}
}
+ if (!__isKeypadExist)
+ {
+ __isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation());//double check
+ }
+
if (cutLinkIndex < 0)
{
CheckUSBKeyboardStatus();
}
}
}
+ else
+ {
+ SysLog(NID_UI_CTRL, "ShowKeypad is skipped[Target:%x][KeypadExist:%d][Bound:%d][Usb mode:%d]", this, __isKeypadExist, __isInputConnectionBound, __isUSBKeyboardConnected);
+ }
}
}
}
bool
_EditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
{
+ if (__dragAndDropStarted)
+ {
+ _Window* pDragWindow = __pEdit->GetDragWindow();
+ if (pDragWindow)
+ {
+ FloatPoint dragPoint = touchInfo.GetCurrentPosition();
+ dragPoint.x += __pEdit->GetAbsoluteBoundsF(true).x;
+ dragPoint.y += __pEdit->GetAbsoluteBoundsF(true).y;
+ pDragWindow->SetPosition(FloatPoint(dragPoint.x - pDragWindow->GetBoundsF().width/2.0f, dragPoint.y - pDragWindow->GetBoundsF().height/2.0f));
+ }
+ return true;
+ }
+
if ((&source != __pEdit) || (__pEdit->GetEnableState() == false))
{
return false;
if (__isCopyPasteManagerExist)
{
- __pCopyPasteManager->Show();
- if (!__isClearIconPressed)
+ if (!IsBlocked() && GetTextLength() > 0 && __isTouchLongPressed)
+ {
+ int cursorPos = -1;
+ int rowIndex = -1;
+ int columnIndex = -1;
+ FloatPoint touchPoint = touchInfo.GetCurrentPosition();
+ int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__cursorPos);
+ int totalLine = __pTextObject->GetTotalLineCount();
+ float firstDisplayY = __pTextObject->GetFirstDisplayPositionYF();
+ float totalHeight = __pTextObject->GetTotalHeightF();
+
+ if (touchPoint.x < __textObjectBounds.x)
+ {
+ touchPoint.x = __textObjectBounds.x;
+ }
+ if (touchPoint.x > __textObjectBounds.x + __textObjectBounds.width)
+ {
+ touchPoint.x = __textObjectBounds.x + __textObjectBounds.width;
+ }
+ if (__textObjectBounds.y > touchPoint.y)
+ {
+ if (totalLine == 1 || firstDisplayY == 0.0f) // whether need to scroll the text or not
+ {
+ touchPoint.y = __textObjectBounds.y; //not need to scroll the text.
+ }
+ }
+ if (__textObjectBounds.y + __textObjectBounds.height < touchPoint.y)
+ {
+ if (totalLine == 1 || (totalHeight - firstDisplayY < __textObjectBounds.height) || curCursorLine == (totalLine - 1)) // || pTextObject->IsDisplayedLastLine()) // whether need to scroll the text or not
+ {
+ touchPoint.y = __textObjectBounds.y + __textObjectBounds.height; // check TextObject
+ }
+ }
+
+ if(!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE))
+ {
+ if (totalHeight < __textObjectBounds.height)
+ {
+ if (totalHeight < touchPoint.y)
+ {
+ touchPoint.y = totalHeight;
+ }
+ }
+ }
+ cursorPos = GetCursorPositionAt(touchPoint, rowIndex, columnIndex);
+ if (cursorPos == -1)
+ {
+ FloatRectangle cursorRect(0.0f, 0.0f, 0.0f, 0.0f);
+ CalculateCursorBounds(__textObjectBounds, cursorRect, __rowCursorIndex, __columnCursorIndex);
+ if (totalLine != 1)
+ {
+ if (touchPoint.y > (cursorRect.y + cursorRect.height))
+ {
+ if (curCursorLine < totalLine - 1)
+ {
+ int offset = __cursorPos - __pTextObject->GetFirstTextIndexAt(curCursorLine);
+ int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine+1);
+ cursorPos = offset + firstTextIndex;
+ int textLength = __pTextObject->GetTextLengthAt(curCursorLine+1);
+ if (offset > textLength)
+ {
+ cursorPos = firstTextIndex+textLength;
+ }
+ }
+ }
+ else
+ {
+ if (curCursorLine !=0)
+ {
+ if (__rowCursorIndex == 0)
+ {
+ cursorPos = -1;
+ }
+ else
+ {
+ int offset = __cursorPos - __pTextObject->GetFirstTextIndexAt(curCursorLine);
+ int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine-1);
+ cursorPos = offset + firstTextIndex;
+ int textLength = __pTextObject->GetTextLengthAt(curCursorLine-1);
+ if (offset > textLength)
+ {
+ cursorPos = firstTextIndex+textLength;
+ }
+ }
+ }
+ }
+ }
+ if (cursorPos == -1)
+ {
+ return true;
+ }
+ SetCursorPosition(cursorPos);
+ }
+ else
+ {
+ SetCursorPosition(cursorPos, rowIndex, columnIndex);
+ }
+ ScrollPanelToCursorPosition(true);
+ __pTextObject->SetFirstDisplayLineIndexFromTextIndex(cursorPos);
+ __pCopyPasteManager->Show();
+ if (!__isClearIconPressed)
+ {
+ __isCopyPastePopupMoving = true;
+ }
+ return true;
+ }
+ else
{
- __isCopyPastePopupMoving = true;
+ __pCopyPasteManager->Show();
+ if (!__isClearIconPressed)
+ {
+ __isCopyPastePopupMoving = true;
+ }
}
}
return true;
}
- if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE || __pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)
{
float horizontalGap = touchInfo.GetCurrentPosition().x - __pScrollEffect->currentX;
FloatRectangle lineBounds = __pTextObject->GetBoundsAtLineF(0);
if (horizontalGap < 0.0f && lineBounds.width - textDisplayPositionX > __textObjectBounds.width)
{
+ if (__pTextObject->GetAction() == TEXT_OBJECT_ACTION_TYPE_ABBREV)
+ {
+ return true;
+ }
+
newTextDisplayPositionX = textDisplayPositionX - horizontalGap;
- if (newTextDisplayPositionX > lineBounds.width - __textObjectBounds.width)
+ if (newTextDisplayPositionX > lineBounds.width - __textObjectBounds.width)
{
newTextDisplayPositionX = lineBounds.width - __textObjectBounds.width;
}
}
if (horizontalGap > 0.0f && textDisplayPositionX > 0)
{
+ if (__pTextObject->GetAction() == TEXT_OBJECT_ACTION_TYPE_ABBREV)
+ {
+ return true;
+ }
+
newTextDisplayPositionX = textDisplayPositionX - horizontalGap;
if (newTextDisplayPositionX < 0)
{
return true;
}
-
- if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)
- {
- float horizontalGap = touchInfo.GetCurrentPosition().x - fromBounds.x;
- FloatDimension currentCharacterDimension;
- if (horizontalGap > 0.0f && __cursorPos < GetTextLength())
- {
- currentCharacterDimension = __pTextObject->GetTextExtentF(__cursorPos, 1);
- if (horizontalGap >= currentCharacterDimension.width)
- {
- SetCursorPosition(__cursorPos+1);
- __pEdit->Invalidate();
- return true;
- }
- }
- if (horizontalGap < 0.0f && __cursorPos > 0)
- {
- currentCharacterDimension = __pTextObject->GetTextExtentF(__cursorPos-1, 1);
- if (Math::Abs(horizontalGap) >= currentCharacterDimension.width)
- {
- SetCursorPosition(__cursorPos-1);
- __pEdit->Invalidate();
- return true;
- }
- }
- }
}
if (__isMovingCursorByTouchMove)
{
float totalHeight = __pTextObject->GetTotalHeightF();
- if (__pParentPanel)
+ if (__textObjectBounds.height >= totalHeight)
{
- if (__textObjectBounds.height >= totalHeight)
- {
- __isTouchMoving = true;
- __isTouchReleaseSkipped = true;
- return false;
- }
+ __isTouchMoving = true;
+ __isTouchReleaseSkipped = true;
+ return false;
}
if ((touchInfo.GetCurrentPosition().y == __pScrollEffect->currentY) ||
__pScrollEffect->previousAbsY = __pScrollEffect->currentAbsY;
__pScrollEffect->currentAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).y + touchInfo.GetCurrentPosition().y);
-// float moveGap = __pScrollEffect->previousY - __pScrollEffect->currentY;
float moveGap = __pScrollEffect->previousAbsY - __pScrollEffect->currentAbsY;
if (__isMovingCursorByTouchMove)
FloatRectangle panelAbsBounds(0.0f, 0.0f, 0.0f, 0.0f);
FloatRectangle absCursorBounds(0.0f, 0.0f, 0.0f, 0.0f);
+ if (__dragAndDropStarted)
+ {
+ if (keyCode == _KEY_ESC)
+ {
+ ResetDragAndDrop();
+ }
+ return true;
+ }
+
_AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance();
SysTryReturn(NID_UI_CTRL, pAccessibilityManager, false, E_SYSTEM, "pAccessibilityManager is null");
}
else
{
- return false;
+ // ViewMode
+ CheckUSBKeyboardStatus();
+ if (__isUSBKeyboardConnected && __pEdit->GetInputStyle() != INPUT_STYLE_FULLSCREEN)
+ {
+ if ((keyInfo.GetKeyModifier() & _KEY_MODIFIER_CTRL) && ((keyCode == _KEY_A) || (keyCode == _KEY_C)))
+ {
+ //fall through
+ }
+ else if ((keyCode == _KEY_LEFT) || (keyCode == _KEY_RIGHT) || (keyCode == _KEY_UP) || (keyCode == _KEY_DOWN))
+ {
+ //fall through
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
}
if (__isUSBKeyboardConnected && (keyInfo.GetKeyModifier() & _KEY_MODIFIER_CTRL) && (keyInfo.GetKeyModifier() & _KEY_MODIFIER_SHIFT))
if (!pAccessibilityManager->IsActivated())
{
__pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
- SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Unable to create _EditCopyPasteManager instance.");
+ SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Memory allocation failed.");
__pCopyPasteManager->AddCopyPasteEventListener(*this);
__pCopyPasteManager->CreateCopyPastePopup();
__pCopyPasteManager->Show();
{
if (!__isCopyPasteManagerExist)
{
- if ( (keyCode == _KEY_LEFT) || (keyCode == _KEY_UP) || (keyCode == _KEY_DOWN) || (keyCode == _KEY_RIGHT) )
+ if ((keyCode == _KEY_LEFT) || (keyCode == _KEY_UP) || (keyCode == _KEY_DOWN) || (keyCode == _KEY_RIGHT))
{
if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)
{
return false;
}
+ if (!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) && __pEditModel->IsViewModeEnabled())
+ {
+ if (ScrollContentsOnKey(_KEY_UP) == E_SUCCESS)
+ {
+ DrawText();
+ return true;
+ }
+ return false;
+ }
+
int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex());
- if (curCursorLine !=0 )
+ if (curCursorLine != 0)
{
int offset = __cursorPos - __pTextObject->GetFirstTextIndexAt(curCursorLine);
int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine-1);
FinishTextComposition();
+ if (!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) && __pEditModel->IsViewModeEnabled())
+ {
+ if (ScrollContentsOnKey(_KEY_DOWN) == E_SUCCESS)
+ {
+ DrawText();
+ return true;
+ }
+ return false;
+ }
+
int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex());
int totalLine = __pTextObject->GetTotalLineCount();
if (curCursorLine < totalLine - 1)
int startPosition = -1;
int endPosition = -1;
GetTextImageRangeAt(__cursorPos, startPosition, endPosition);
+
if (endPosition > __cursorPos+1 && startPosition > -1)
{
SetCursorPosition(endPosition);
OnSurroundingTextDeleted(0, 1);
}
}
+
if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false)
{
DrawText();
+ __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED);
}
else
{
__pEdit->Invalidate();
}
+
ScrollPanelToCursorPosition();
return true;
}
- else if (_KEY_OEM_1 == keyCode)
+ else if (_KEY_CLIPBOARD== keyCode)
{
__pClipboard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit, true);
__clipboardConnected = true;
- return true;
- }
- else if (__composingTextLength > 0 && GetTextLength() >= __limitLength)
- {
+ __pEdit->AddClipboardShowTriggerEventListener();
return true;
}
else if (_KEY_TAB == keyCode)
}
return false;
}
+ else if (__composingTextLength > 0 && GetTextLength() >= __limitLength)
+ {
+ return true;
+ }
return false;
}
bool
_EditPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
- _KeyCode keyCode = keyInfo.GetKeyCode();
+ _KeyCode keyCode = keyInfo.GetKeyCode();
if (__isUSBKeyboardConnected && (keyCode == _KEY_SHIFT_L || keyCode == _KEY_SHIFT_R))
{
if (__pCopyPasteManager && __pCopyPasteManager->IsHandlerMovingEnabled())
{
+ int leftHandler = __pCopyPasteManager->GetHandlerCursorPosition(_EditCopyPasteManager::HANDLER_TYPE_LEFT);
+ int rightHandler = __pCopyPasteManager->GetHandlerCursorPosition(_EditCopyPasteManager::HANDLER_TYPE_RIGHT);
+ if (leftHandler > rightHandler)
+ {
+ __pCopyPasteManager->CreateHandle();
+ }
__pCopyPasteManager->SetHandlerMovingEnabled(false);
__pCopyPasteManager->CreateCopyPastePopup();
__pCopyPasteManager->Show();
if (!pAccessibilityManager->IsActivated())
{
__pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
- SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Unable to create _EditCopyPasteManager instance.");
+ SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Memory allocation failed.");
__pCopyPasteManager->AddCopyPasteEventListener(*this);
__pCopyPasteManager->CreateCopyPastePopup();
__pCopyPasteManager->Show();
InitializeCopyPasteManager();
}
- SysTryReturnVoidResult(NID_UI_CTRL, pClipboardItem != null, E_SYSTEM, "[E_SYSTEM] _EditPresenter::OnClipboardPopupClosed: Unable to get the clipboarditem instance.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pClipboardItem != null, E_SYSTEM, "[E_SYSTEM] Unable to get the clipboarditem instance.");
String* pClipString = dynamic_cast<String*>(pClipboardItem->GetData());
- SysTryReturnVoidResult(NID_UI_CTRL, pClipString != null, E_SYSTEM, "[E_SYSTEM] _EditPresenter::OnClipboardPopupClosed: Unable to get the clipboarditem instance.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pClipString != null, E_SYSTEM, "[E_SYSTEM] Unable to get the clipboarditem instance.");
String str;
if (pClipboardItem->GetDataType() == CLIPBOARD_DATA_TYPE_HTML)
str = pEcoreEvas->ConvertMarkupToUtf8(*pClipString);
pClipString = &str;
}
+ if (str.IsEmpty())
+ {
+ if (IsBlocked())
+ {
+ ReleaseTextBlock();
+ }
+ delete pClipboardItem;
+ return;
+ }
}
int currentLength = GetTextLength();
DeleteText(start, end);
ReleaseTextBlock();
pSubString = new String(__limitLength - currentLength + (end - start));
- SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer.");
+ SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Memory allocation failed.");
filteredString.SubString(0, __limitLength - currentLength + (end - start), *pSubString);
r = InsertTextAt(__cursorPos, pSubString->GetPointer());
delete pClipboardItem;
return;
}
-
+
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)
+ {
+ int length = filteredString.GetLength();
+ for (int i = length-1; i >= 0; i--)
+ {
+ wchar_t ch;
+ filteredString.GetCharAt(i, ch);
+ if (ch == '\n')
+ {
+ filteredString.Remove(i, 1);
+ }
+ }
+ }
+
pSubString = new String(__limitLength - currentLength);
- SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer.");
+ SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Memory allocation failed.");
filteredString.SubString(0, __limitLength - currentLength, *pSubString);
r = InsertTextAt(__cursorPos, pSubString->GetPointer());
return false;
}
+ int rowIndex = -1;
+ int columnIndex = -1;
+ int cursorPos = -1;
+
if (__isCopyPasteManagerExist)
{
+
+#if EDIT_DRAG_AND_DROP_ENABLED
+ if (IsBlocked())
+ {
+ int start = -1;
+ int end = -1;
+ GetBlockRange(start, end);
+ __dragAndDropString = GetText(start, end-1);
+ _DragAndDropItem* pDragAndDropItem = _DragAndDropItem::CreateInstanceN(_DRAG_AND_DROP_TYPE_TEXT, __dragAndDropString);
+ SysTryReturn(NID_UI_CTRL, pDragAndDropItem, false, E_OUT_OF_MEMORY, "Memory allocation failed.");
+
+ cursorPos = GetCursorPositionAt(__pressedPoint, rowIndex, columnIndex);
+ if (cursorPos != -1)
+ {
+ SetCursorPosition(cursorPos);
+ }
+ else
+ {
+ cursorPos = GetTextLength();
+ SetCursorPosition(cursorPos);
+ }
+
+ __pEdit->DragAndDropBegin(*pDragAndDropItem);
+ delete pDragAndDropItem;
+
+ __dragAndDropStarted = true;
+ InitializeCopyPasteManager();
+ }
+ else
+#endif
+ if (!IsBlocked())
+ {
+ cursorPos = GetCursorPositionAt(__pressedPoint, rowIndex, columnIndex);
+ if (cursorPos != -1)
+ {
+ SetCursorPosition(cursorPos);
+ }
+ else
+ {
+ return true;
+ }
+ __pCopyPasteManager->CreateCopyPasteMagnifier();
+ __pCopyPasteManager->Show();
+ __isTouchLongPressed = true;
+ __needToCreateCopyPastePopup = true;
+ }
return true;
}
else if (IsCurrentFocused() == false)
FloatRectangle cursorBounds;
InitializeCopyPasteManager();
- if (IsClipped() || GetTextLength())
+ bool isClipped = IsClipped();
+ if (isClipped || GetTextLength())
{
- if (IsClipped() && !GetTextLength() && (__pEdit->IsViewModeEnabled()))
+ if (!GetTextLength() && IsViewModeEnabled())
{
return true;
}
- if (!IsClipped() && (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD))
+ if (!isClipped && (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD))
{
return true;
}
StopPasswordTimer();
}
- int cursorPos = GetCursorPositionAt(__pressedPoint);
+ cursorPos = GetCursorPositionAt(__pressedPoint, rowIndex, columnIndex);
if (cursorPos != -1)
{
SetCursorPosition(cursorPos);
__pCopyPasteManager->AddCopyPasteEventListener(*this);
__pCopyPasteManager->Show();
__isCopyPasteManagerExist = true;
+ __isTouchLongPressed = true;
+ __needToCreateCopyPastePopup = true;
}
__pCopyPasteManager->AddCopyPasteEventListener(*this);
__pCopyPasteManager->Show();
__isCopyPasteManagerExist = true;
+ __needToCreateCopyPastePopup = true;
__pEdit->Draw();
}
}
TextImage* pImageText = null;
pImageText = dynamic_cast < TextImage* >(pTextElement);
- if ( pImageText == null)
+ if (pImageText == null)
{
continue;
}
int total = 0;
String userString;
String filteredString;
+ String str;
_Clipboard* pClipBoard = _Clipboard::GetInstance();
SysTryReturnResult(NID_UI_CTRL, pClipBoard != null, E_SYSTEM, "Unable to get the clipboard instance.");
- const _ClipboardItem* pClipboardItem = pClipBoard->RetrieveLatestItemN(CLIPBOARD_DATA_TYPE_TEXT|CLIPBOARD_DATA_TYPE_AUDIO | CLIPBOARD_DATA_TYPE_VIDEO);
+ const _ClipboardItem* pClipboardItem = pClipBoard->RetrieveLatestItemN(CLIPBOARD_DATA_TYPE_TEXT|CLIPBOARD_DATA_TYPE_AUDIO | CLIPBOARD_DATA_TYPE_VIDEO|CLIPBOARD_DATA_TYPE_HTML);
SysTryReturnResult(NID_UI_CTRL, pClipboardItem != null, E_SYSTEM, "Unable to get the clipboarditem instance.");
const String* pClipString = dynamic_cast<const String*>(pClipboardItem->GetData());
SysTryCatch(NID_UI_CTRL, pClipString, r = E_SYSTEM, E_SYSTEM, "Unable to get the clipboarditem instance.");
+ if (pClipboardItem->GetDataType() == CLIPBOARD_DATA_TYPE_HTML)
+ {
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ if (pEcoreEvas)
+ {
+ str = pEcoreEvas->ConvertMarkupToUtf8(*pClipString);
+ pClipString = &str;
+ }
+ if (str.IsEmpty())
+ {
+ delete pClipboardItem;
+ return r;
+ }
+ }
+
filteredString = *pClipString;
if (__pTextFilter)
DeleteText(start, end);
ReleaseTextBlock();
pSubString = new String(__limitLength - currentLength + (end - start));
- SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer.");
+ SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Memory allocation failed.");
filteredString.SubString(0, __limitLength - currentLength + (end - start), *pSubString);
r = InsertTextAt(__cursorPos, pSubString->GetPointer());
delete pClipboardItem;
return E_SUCCESS;
}
-
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)
+ {
+ int length = filteredString.GetLength();
+ for (int i = length-1; i >= 0; i--)
+ {
+ wchar_t ch;
+ filteredString.GetCharAt(i, ch);
+ if (ch == '\n')
+ {
+ filteredString.Remove(i, 1);
+ }
+ }
+ }
pSubString = new String(__limitLength - currentLength);
- SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer.");
+ SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Memory allocation failed.");
filteredString.SubString(0, __limitLength - currentLength, *pSubString);
r = InsertTextAt(__cursorPos, pSubString->GetPointer());
bool
_EditPresenter::IsClipped(void) const
{
+ String str;
_Clipboard* pClipBoard = _Clipboard::GetInstance();
SysTryReturn(NID_UI_CTRL, pClipBoard != null, false, E_SYSTEM, "Unable to get the clipboard instance.");
- const _ClipboardItem* pClipboardItem = pClipBoard->RetrieveLatestItemN(CLIPBOARD_DATA_TYPE_TEXT|CLIPBOARD_DATA_TYPE_AUDIO | CLIPBOARD_DATA_TYPE_VIDEO);
+ const _ClipboardItem* pClipboardItem = pClipBoard->RetrieveLatestItemN(CLIPBOARD_DATA_TYPE_TEXT|CLIPBOARD_DATA_TYPE_AUDIO | CLIPBOARD_DATA_TYPE_VIDEO|CLIPBOARD_DATA_TYPE_HTML);
if (pClipboardItem == null)
{
SetLastResult(E_SUCCESS);
return false;
}
- delete pClipboardItem;
+ const String* pClipString = dynamic_cast<const String*>(pClipboardItem->GetData());
+ SysTryCatch(NID_UI_CTRL, pClipString, , GetLastResult(), "Unable to get the clipboarditem data.");
+
+ if (pClipboardItem->GetDataType() == CLIPBOARD_DATA_TYPE_HTML)
+ {
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ if (pEcoreEvas)
+ {
+ str = pEcoreEvas->ConvertMarkupToUtf8(*pClipString);
+ pClipString = &str;
+ }
+ if (str.IsEmpty())
+ {
+ delete pClipboardItem;
+ return false;
+ }
+ }
+
+ delete pClipboardItem;
return true;
+
+CATCH:
+ delete pClipboardItem;
+ return false;
}
result
String resultString;
String elementString;
const int textElementCount = __pTextObject->GetElementCount();
+
+ if (textElementCount == 0)
+ {
+ return resultString;
+ }
+
_Text::TextElement* pTextElement = __pTextObject->GetElementAtTextIndex(start);
if (pTextElement == null)
{
return resultString;
}
+
const int startIndex = __pTextObject->GetElementIndexOf(*pTextElement);
for (int index = startIndex; index < textElementCount; index++)
if (objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK)
{
pSimpleText = dynamic_cast < TextSimple* >(pTextElement);
- if ( pSimpleText == null)
+ if (pSimpleText == null)
{
continue;
}
}
__pTextBuffer[length] = 0;
+ __pTextObject->RemoveAll();
+ TextSimple* pSimpleText = new (std::nothrow)TextSimple(__pTextBuffer, length,TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, __pFont);
+ __pTextObject->AppendElement(*pSimpleText);
+
if (__isInitialized == true)
{
AdjustRTLTextAlignment(EDIT_TEXT_TYPE_INPUT);
}
-
- __pTextObject->RemoveAll();
- TextSimple* pSimpleText = new (std::nothrow)TextSimple(__pTextBuffer, length,TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, __pFont);
- __pTextObject->AppendElement(*pSimpleText);
__pTextObject->Compose();
ReplaceTextIntoPasswordHyphenString();
SysTryReturnResult(NID_UI_CTRL, totalLength <= __limitLength, E_MAX_EXCEEDED, "The Invalid argument is given.");
}
- if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE || __pEdit->GetEditStyle() & EDIT_STYLE_TOKEN )
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)
{
while (insertText.Contains(String(L"\n")))
{
if (!__isTextBlocked)
{
- SetCursorPosition(totalLength);
+ SetCursorPosition(totalLength);
}
if (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE)
const TextSimple* pLastSimpleText = dynamic_cast <const TextSimple*>(pLastTextElement);
if (pLastSimpleText != null && pLastSimpleText->GetBitmap() != null)
{
- if( (pLastSimpleText->GetTextOffset() + pLastSimpleText->GetTextLength()) > endCursorPosition)
+ if ((pLastSimpleText->GetTextOffset() + pLastSimpleText->GetTextLength()) > endCursorPosition)
{
endCursorPosition = pLastSimpleText->GetTextOffset() + pLastSimpleText->GetTextLength();
}
}
wchar_t* pTempBuffer = new (std::nothrow) wchar_t[limitLength + 1];
- SysTryReturnResult(NID_UI_CTRL, pTempBuffer, E_OUT_OF_MEMORY, "Unable to allocate buffer.");
+ SysTryReturnResult(NID_UI_CTRL, pTempBuffer, E_OUT_OF_MEMORY, "Memory allocation failed.");
for (int i = 0; i < textLength; i++)
{
__pTextObject->RemoveAll();
pSimpleText = new (std::nothrow)TextSimple(__pTextBuffer, textLength, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, __pFont);
- SysTryReturnResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "Insufficient memory.");
+ SysTryReturnResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pTextObject->AppendElement(*pSimpleText);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
TextSimple* pSimpleText = null;
pSimpleText = new (std::nothrow) TextSimple(__pTextBuffer, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, GetFont());
- SysTryReturnResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "Unable to allocate text simple element.");
+ SysTryReturnResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "Memory allocation failed.");
pSimpleText->ChangeTextOffset(__pTextBuffer, position);
pSimpleText->SetBitmap((Bitmap&)textImage);
if (!__pTextVisualElement)
{
result r = E_SUCCESS;
- __pTextVisualElement = new (std::nothrow) _VisualElement;
- SysTryReturn(NID_UI_CTRL, __pTextVisualElement != null, false, E_OUT_OF_MEMORY, "Unable to create __pTextVisualElement instance.");
+ __pTextVisualElement = new (std::nothrow) _VisualElement();
+ SysTryReturn(NID_UI_CTRL, __pTextVisualElement != null, false, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pTextVisualElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct", GetErrorMessage(r));
if (__pCopyPasteManager)
{
__pCopyPasteManager->CreateHandle();
+ __pCopyPasteManager->DestroyCopyPasteMagnifier();
if (__needToCreateCopyPastePopup)
{
- __pCopyPasteManager->CreateCopyPastePopup();
- __needToCreateCopyPastePopup = false;
+ if (__pParentPanel)
+ {
+ if (!__pParentPanel->IsScrollAnimationRunning())
+ {
+ __pCopyPasteManager->CreateCopyPastePopup();
+ if (__pCopyPasteManager->GetCopyPastePopup())
+ {
+ __needToCreateCopyPastePopup = false;
+ }
+ }
+ }
+ else
+ {
+ __pCopyPasteManager->CreateCopyPastePopup();
+ if (__pCopyPasteManager->GetCopyPastePopup())
+ {
+ __needToCreateCopyPastePopup = false;
+ }
+ }
}
__pCopyPasteManager->Show();
}
if (__isInputConnectionBound)
{
+ SysLog(NID_UI_CTRL, "keypad & clipboard is closed by external request!!");
HideKeypad(removeFocus);
if (__isClipboardExist)
{
if (__pClipboard)
{
- __pClipboard->HidePopup();
OnClipboardPopupClosed();
+ __pClipboard->HidePopup();
}
}
}
bool
_EditPresenter::OnFocusLost(void)
{
+
+ if (__dragAndDropStarted)
+ {
+ ResetDragAndDrop();
+ }
+
if (!__pEdit->IsDestroyed())
{
InitializeCopyPasteManager();
{
if (__pClipboard)
{
- __pClipboard->HidePopup();
OnClipboardPopupClosed();
+ __pClipboard->HidePopup();
}
}
ReplaceTextIntoPasswordHyphenString();
+ if (__pCursorTimer)
+ {
+ __pCursorTimer->Cancel();
+ delete __pCursorTimer;
+ __pCursorTimer = null;
+ }
+
__pEdit->Invalidate();
return true;
}
result
-_EditPresenter::CalculateAbsoluteCursorBounds(int index, FloatRectangle& absCursorBounds)
+_EditPresenter::CalculateAbsoluteCursorBounds(int index, FloatRectangle& absCursorBounds, bool clipCursorHeight)
{
float cursorAbsX = 0.0f;
float cursorAbsY = 0.0f;
float cursorHeight = 0.0f;
float cursorRelativeX = 0.0f;
float cursorRelativeY = 0.0f;
+ float cursorHeightDiff = 0.0f;
FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true);
absCursorBounds.width = cursorWidth;
+ cursorHeightDiff = cursorHeight - __calculatedCursorBounds.height;
+
if (cursorHeight > 0.0f)
{
- if (cursorHeight <= __calculatedCursorBounds.height)
+ if (cursorHeight <= __calculatedCursorBounds.height || (!clipCursorHeight))
{
- absCursorBounds.height = cursorHeight;
+ absCursorBounds.height = cursorHeight;
+
+ //TODO: EEA AlignToDevice problem - Need to find a concrete solution
+ if (!clipCursorHeight && __pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE && (cursorHeightDiff <= 2.0f))
+ {
+ absCursorBounds.height = __calculatedCursorBounds.height;
+ }
}
else
{
- absCursorBounds.height = __calculatedCursorBounds.height;
+ if (__calculatedCursorBounds.height > 0)
+ {
+ absCursorBounds.height = __calculatedCursorBounds.height;
+ }
+ else
+ {
+ absCursorBounds.height = cursorHeight;
+ }
}
}
else
}
result
-_EditPresenter::CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, FloatRectangle& absCursorBounds)
+_EditPresenter::CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, FloatRectangle& absCursorBounds, bool clipCursorHeight)
{
float cursorAbsX = 0.0f;
float cursorAbsY = 0.0f;
float cursorHeight = 0.0f;
float cursorRelativeX = 0.0f;
float cursorRelativeY = 0.0f;
+ float cursorHeightDiff = 0.0f;
FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true);
absCursorBounds.width = cursorWidth;
+ cursorHeightDiff = cursorHeight - __calculatedCursorBounds.height;
+
if (cursorHeight > 0.0f)
{
- if (cursorHeight <= __calculatedCursorBounds.height)
+ if (cursorHeight <= __calculatedCursorBounds.height || !clipCursorHeight)
{
absCursorBounds.height = cursorHeight;
+
+ //TODO: EEA AlignToDevice problem - Need to find a concrete solution
+ if (!clipCursorHeight && __pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE && (cursorHeightDiff <= 2.0f))
+ {
+ absCursorBounds.height = __calculatedCursorBounds.height;
+ }
}
else
{
- absCursorBounds.height = __calculatedCursorBounds.height;
+ if (__calculatedCursorBounds.height > 0)
+ {
+ absCursorBounds.height = __calculatedCursorBounds.height;
+ }
+ else
+ {
+ absCursorBounds.height = cursorHeight;
+ }
}
}
else
{
result r = E_SUCCESS;
_Button* pButton = _Button::CreateButtonN();
- SysTryReturn(NID_UI_CTRL, pButton, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance.");
+ SysTryReturn(NID_UI_CTRL, pButton, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
float textSize = 0.0f;
}
__pCommandButton = _Toolbar::CreateToolbarN(false);
- SysTryReturn(NID_UI_CTRL, __pCommandButton, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance.");
+ SysTryReturn(NID_UI_CTRL, __pCommandButton, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pCommandButton->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
{
AdjustParentPanelHeight(true);
+ //Do not use the Draw() API. If we use the Draw() API, it's possible to occur the memory crash.
if (__pParentForm)
{
SysLog(NID_UI_CTRL, "Form deflate RESET!!!");
__pParentForm->DeflateClientRectHeight(0);
- __pParentForm->Draw();
+ __pParentForm->Invalidate(true);
}
}
}
__pFullscreenKeypad = _Keypad::CreateKeypadN();
- SysTryReturn(NID_UI_CTRL, __pFullscreenKeypad, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance.");
+ SysTryReturn(NID_UI_CTRL, __pFullscreenKeypad, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pFullscreenKeypad->Initialize(editStyle, keypadStyleInfo, GetTextLimitLength(), __pEdit);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
bounds = __pInputConnection->GetInputPanelBoundsF();
- _CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
- SysTryReturnResult(NID_UI_CTRL, pCoordSystem, E_SYSTEM, "Coordinate system load failed.");
-
- _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer();
- SysTryReturnResult(NID_UI_CTRL, pXformer, E_SYSTEM, "Coordinate system load failed.");
-
- bounds = pXformer->Transform(bounds);
__keypadBounds = bounds;
return E_SUCCESS;
{
SetCurrentLanguage(initialKeypadLanguage);
}
+
+ __pEdit->AttachScrollPanelEvent();
+
//layout rearrange
if (__isUSBKeyboardConnected)
{
if (__isKeypadCommandButtonVisible)
{
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED);
- __pEdit->AttachScrollPanelEvent();
__pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED);
if (__initialFooterVisibleStatus == EDIT_FOOTER_VISIBLE_STATUS_NONE)
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN);
__pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED);
+ //Do not use the Draw() API. If we use the Draw() API, it's possible to occur the memory crash.
if (__pParentForm)
{
- __pParentForm->Draw();
+ __pParentForm->Invalidate(true);
}
}
else
if (sendKeypadEventForcely)
{
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED);
- __pEdit->AttachScrollPanelEvent();
__pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED);
}
AdjustParentPanelHeight(false);
ScrollPanelToCursorPosition();
+ //Do not use the Draw() API. If we use the Draw() API, it's possible to occur the memory crash.
if (__pParentForm)
{
- __pParentForm->Draw();
+ __pParentForm->Invalidate(true);
}
if (sendKeypadEventForcely)
{
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN);
__pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED);
- }
+ }
+ }
+ else
+ {
+ ScrollPanelToCursorPosition();
}
}
}
if (!__pCommandButton || (__pCommandButton && !__pCommandButton->GetVisibleState()))
{
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED);
- __pEdit->AttachScrollPanelEvent();
__pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED);
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN);
__pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED);
{
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED);
}
- __pEdit->AttachScrollPanelEvent();
__pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED);
}
if (sendKeypadEventForcely)
{
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED);
- __pEdit->AttachScrollPanelEvent();
__pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED);
}
AdjustParentPanelHeight(false);
ScrollPanelToCursorPosition();
+ //Do not use the Draw() API. If we use the Draw() API, it's possible to occur the memory crash.
if (__pParentForm)
{
- __pParentForm->Draw();
+ __pParentForm->Invalidate(true);
}
__isKeypadShowing = false;
{
result r = E_SUCCESS;
+ //for Target DND
+ __pDragAndDropCueVisualElement->SetShowState(false);
+
+ if (__dragAndDropStarted)
+ {
+ ResetDragAndDrop();
+ }
+
if (__pCopyPasteManager)
{
if (__pCopyPasteManager->GetCopyPastePopup())
{
__needToCreateCopyPastePopup = true;
}
- __pCopyPasteManager->Release();
+ else if (!IsBlocked() && __pEditModel->IsViewModeEnabled())
+ {
+ SetCursorPosition(0);
+ }
+ __pCopyPasteManager->ReleaseCopyPastePopup();
+ __pCopyPasteManager->ReleaseHandle();
+ }
+ else
+ {
+ if (__pEditModel->IsViewModeEnabled())
+ {
+ SetCursorPosition(0);
+ }
}
bool isScrollPanelBoundsReloaded = false;
__initialParentHeight = 0.0f;
ChangeLayoutInternal(orientation);
AdjustParentPanelHeight(false);
- ScrollPanelToCursorPosition();
}
+ ScrollPanelToCursorPosition();
}
}
}
_ControlManager* pControlManager = _ControlManager::GetInstance();
SysTryReturnResult(NID_UI_CTRL, pControlManager, E_SYSTEM, "Failed to get root.");
+
+ _Frame* pCurrentFrame = dynamic_cast<_Frame*>(pControlManager->GetCurrentFrame());
+ if (!pCurrentFrame || (pCurrentFrame && pCurrentFrame->GetShowMode() != FRAME_SHOW_MODE_FULL_SCREEN))
+ {
+ if (pCurrentFrame)
+ {
+ SysLog(NID_UI_CTRL, "FrameShowMode[%d]", pCurrentFrame->GetShowMode());
+ }
+ else
+ {
+ SysLog(NID_UI_CTRL, "Frame is null");
+ }
+ return r;
+ }
+
FloatDimension screenSize;
FloatRectangle commandButtonBounds(0.0f, 0.0f, 0.0f, 0.0f);
return;
}
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ SysTryReturnVoidResult(NID_UI_CTRL, pControlManager, E_SYSTEM, "[E_SYSTEM] Failed to get root.");
+
+ _Frame* pCurrentFrame = dynamic_cast<_Frame*>(pControlManager->GetCurrentFrame());
+ if (!pCurrentFrame || (pCurrentFrame && pCurrentFrame->GetShowMode() != FRAME_SHOW_MODE_FULL_SCREEN))
+ {
+ if (pCurrentFrame)
+ {
+ SysLog(NID_UI_CTRL, "FrameShowMode[%d]", pCurrentFrame->GetShowMode());
+ }
+ else
+ {
+ SysLog(NID_UI_CTRL, "Frame is null");
+ }
+ return;
+ }
+
float initialParentHeight = __initialParentHeight;
if (__pResizedPanel != __pParentPanel)
{
FloatRectangle scrollPanelBounds = __pParentPanel->GetBoundsF();
float gapY = 0.0f;
- _ControlManager* pControlManager = _ControlManager::GetInstance();
float displayedPanelHeight = 0.0f;
FloatDimension screenSize;
{
case CORE_COPY_PASTE_ACTION_COPY:
__pEdit->CopyText();
+ InitializeCopyPasteManager();
break;
case CORE_COPY_PASTE_ACTION_CUT:
__pEdit->CutText();
if (__pCursorTimer == null)
{
- __pCursorTimer = new (std::nothrow) Timer;
- if (__pCursorTimer == null)
- {
- return E_OUT_OF_MEMORY;
- }
+ __pCursorTimer = new (std::nothrow) Timer();
+ SysTryReturnResult(NID_UI_CTRL, __pCursorTimer, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pCursorTimer->Construct(*this);
- if (IsFailed(r))
- {
- goto CATCH;
- }
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct the cursor timer.", GetErrorMessage(r));
}
r = __pCursorTimer->Start(EDIT_CURSOR_TIMER_PERIOD);
- if (IsFailed(r))
- {
- goto CATCH;
- }
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to start timer.", GetErrorMessage(r));
return r;
void
_EditPresenter::OnCursorTimerExpired(void)
{
- if (!IsCurrentFocused() && __isCursorDisabled)
+ if (!IsCurrentFocused() || __isCursorDisabled)
{
- StopCursorTimer();
+ if (__pCursorTimer)
+ {
+ __pCursorTimer->Cancel();
+ delete __pCursorTimer;
+ __pCursorTimer = null;
+ }
+
return;
}
result r = E_SUCCESS;
r = AdjustFont(*pFont, EDIT_FONT_CHANGE_ALL);
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Unable to set font.");
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
__titleFontFaceName = pFont->GetFaceName();
r = __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength());
__ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON;
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
+
+ if (__pTextObject->GetTextLength() > 0)
+ {
+ __pTextObject->SetFirstDisplayLineIndex(0);
+ __pTextObject->SetFirstDisplayPositionY(0.0f);
+ }
}
- if (IsGuideTextActivated())
+ if (__pGuideTextObject)
{
r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength());
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
r = __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength());
__ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON;
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
+
+ if (__pTextObject->GetTextLength() > 0)
+ {
+ __pTextObject->SetFirstDisplayLineIndex(0);
+ __pTextObject->SetFirstDisplayPositionY(0.0f);
+ }
}
- if (IsGuideTextActivated())
+ if (__pGuideTextObject)
{
r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength());
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Unable to set font.");
}
- if (IsGuideTextActivated())
+ if (__pGuideTextObject)
{
r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength());
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Unable to set font.");
{
tempFontFaceName = *static_cast<String*>(systemFontList->GetAt(i));
- pFont = new (std::nothrow) Font;
- SysTryCatch(NID_UI_CTRL, pFont, , r = E_OUT_OF_MEMORY, "Unable to get text information.\n");
+ pFont = new (std::nothrow) Font();
+ SysTryCatch(NID_UI_CTRL, pFont, , r = E_OUT_OF_MEMORY, "Memory allocation failed.");
r = pFont->Construct(tempFontFaceName, fontStyle, textSize);
SysTryCatch(NID_UI_CTRL, !IsFailed(r), , r, "Unable to construct Font.\n");
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
}
- if (IsGuideTextActivated())
+ if (__pGuideTextObject)
{
r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength());
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
__pGuideTextObject = null;
}
- __pGuideTextObject = new (std::nothrow) TextObject;
- if (__pGuideTextObject == null)
- {
- return E_OUT_OF_MEMORY;
- }
+ __pGuideTextObject = new (std::nothrow) TextObject();
+ SysTryReturnResult(NID_UI_CTRL, __pGuideTextObject, E_OUT_OF_MEMORY, "Memory allocation failed.");
+
__pGuideTextObject->Construct();
TextSimple* pSimpleText = new (std::nothrow)TextSimple(tempString, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
__pGuideTextObject->AppendElement(*pSimpleText);
if (!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE))
{
- __pGuideTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_CHARACTER);
+ __pGuideTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD);
}
else
{
__pTitleTextObject = null;
}
- __pTitleTextObject = new (std::nothrow) TextObject;
- if (__pTitleTextObject == null)
- {
- return E_OUT_OF_MEMORY;
- }
+ __pTitleTextObject = new (std::nothrow) TextObject();
+ SysTryReturnResult(NID_UI_CTRL, __pTitleTextObject, E_OUT_OF_MEMORY, "Memory allocation failed.");
+
__pTitleTextObject->Construct();
TextSimple* pSimpleText = new (std::nothrow)TextSimple(tempString, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
__pTitleTextObject->AppendElement(*pSimpleText);
__titleFontSize = titleFontSize;
_FontImpl* fontImpl = _FontImpl::GetInstance(*__pFont);
+ SysTryReturn(NID_UI_CTRL, fontImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
- if(fontImpl)
- {
- r = fontImpl->SetSize(__titleFontSize);
- SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed.");
- }
- else
- {
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, fontImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
- }
+ r = fontImpl->SetSize(__titleFontSize);
+ SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed.");
__pTitleTextObject->SetFont(__pFont, 0, __pTitleTextObject->GetTextLength());
}
}
+ if (__isInputConnectionBound)
+ {
+ SysLog(NID_UI_CTRL, "Edit's bounds chagned, scroll position should be recalculated.");
+ ScrollPanelToCursorPosition();
+ }
+
return E_SUCCESS;
}
GET_SHAPE_CONFIG(EDIT::DEFAULT_TITLE_FONT_SIZE, __pEdit->GetOrientation(), titleFontSize);
r = fontImpl->SetSize(titleFontSize);
- SysTryReturnVoidResult(NID_UI_CTRL, !(IsFailed(r)), r, "SetSize is failed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, !(IsFailed(r)), r, "[%s] Propagating.", GetErrorMessage(r));
if (titletHeight < fontImpl->GetMaxHeightF())
{
}
r = fontImpl->SetSize(originalSize);
- SysTryReturnVoidResult(NID_UI_CTRL, !(IsFailed(r)), r, "SetSize is failed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, !(IsFailed(r)), r, "[%s] Propagating.", GetErrorMessage(r));
leftBorder = leftMargin;
rightBorder = rightMargin;
}
result
+_EditPresenter::AdjustTextBounds(bool clearIconVisible)
+{
+ int editStyle = __pEdit->GetEditStyle();
+
+ if (!(editStyle & EDIT_STYLE_CLEAR))
+ {
+ return E_SYSTEM;
+ }
+
+ float clearIconWidth = 0.0f;
+ _ControlOrientation orientation = __pEdit->GetOrientation();
+
+ GET_SHAPE_CONFIG(EDIT::CLEAR_ICON_WIDTH, orientation, clearIconWidth);
+
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_CLEAR)
+ {
+ if (clearIconVisible)
+ {
+ __textObjectBounds.width -= clearIconWidth;
+ }
+ else
+ {
+ __textObjectBounds.width += clearIconWidth;
+ }
+ }
+
+ float textObectMinimumWidth = 0.0f;
+ float textObjectMinimumHeight = 0.0f;
+ GET_SHAPE_CONFIG(EDIT::TEXT_OBJECT_MININMUM_WIDTH, orientation, textObectMinimumWidth);
+ GET_SHAPE_CONFIG(EDIT::TEXT_OBJECT_MININMUM_HEIGHT, orientation, textObjectMinimumHeight);
+
+ if (__textObjectBounds.width < textObectMinimumWidth)
+ {
+ __textObjectBounds.width = textObectMinimumWidth;
+ }
+
+ __pTextObject->SetBounds(__textObjectBounds);
+ __pTextObject->Compose();
+ __isCursorChanged = true;
+
+ return E_SUCCESS;
+}
+
+result
_EditPresenter::SetInitialEditFieldBounds(void)
{
result r = E_SUCCESS;
float titleTextRightMargin =0.0f;
float titleTextTopMargin = 0.0f;
float titleTextBottomMargin = 0.0f;
- float clearIconWidth = 0.0f;
float titletHeight = 0.0f;
_ControlOrientation orientation = __pEdit->GetOrientation();
GET_SHAPE_CONFIG(EDIT::FIELD_TITLE_TEXT_RIGHT_MARGIN, orientation, titleTextRightMargin);
GET_SHAPE_CONFIG(EDIT::FIELD_TITLE_TEXT_TOP_MARGIN, orientation, titleTextTopMargin);
GET_SHAPE_CONFIG(EDIT::FIELD_TITLE_TEXT_BOTTOM_MARGIN, orientation, titleTextBottomMargin);
- GET_SHAPE_CONFIG(EDIT::CLEAR_ICON_WIDTH, orientation, clearIconWidth);
GET_SHAPE_CONFIG(EDIT::FIELD_TITLE_RECT_HEIGHT, orientation, titletHeight);
if (!(editStyle & EDIT_STYLE_SINGLE_LINE))
return E_SYSTEM;
}
+ if (editStyle & EDIT_STYLE_CLEAR)
+ {
+ __isClearIconVisible = false;
+ }
+
FloatRectangle bounds = __pEdit->GetBoundsF();
if (editStyle & EDIT_STYLE_TITLE_LEFT)
{
__titleBounds.x = titleTextLeftMargin;
__titleBounds.y = titleTextTopMargin;
__titleBounds.width = bounds.width - __clientBounds.width - __titleBounds.x;
- __titleBounds.height = __clientBounds.height - titleTextTopMargin
- - titleTextBottomMargin;
-
- if (editStyle & EDIT_STYLE_CLEAR)
- {
- __textObjectBounds.width -= clearIconWidth;
- }
+ __titleBounds.height = __clientBounds.height - titleTextTopMargin - titleTextBottomMargin;
}
else if (editStyle & EDIT_STYLE_TITLE_TOP)
{
__titleBounds.y = titleTextTopMargin;
__titleBounds.width = bounds.width - __titleBounds.x - titleTextRightMargin;
- __titleBounds.height = bounds.height - __titleBounds.y - __clientBounds.height
- - bottomMargin;
-
- if (editStyle & EDIT_STYLE_CLEAR)
- {
- __textObjectBounds.width -= clearIconWidth;
- }
+ __titleBounds.height = bounds.height - __titleBounds.y - __clientBounds.height - bottomMargin;
}
else if ((editStyle & EDIT_STYLE_NORMAL) || (editStyle & EDIT_STYLE_CLEAR))
{
__textObjectBounds.width -= textRightMargin;
}
- if (editStyle & EDIT_STYLE_CLEAR)
- {
- __textObjectBounds.width -= clearIconWidth;
- }
__textObjectBounds.y = __clientBounds.y + textTopMargin;
- __textObjectBounds.height = __clientBounds.height - textTopMargin
- - textBottomMargin;
+ __textObjectBounds.height = __clientBounds.height - textTopMargin - textBottomMargin;
}
else
{
__textObjectBounds.width -= textRightMargin;
}
__textObjectBounds.y = __clientBounds.y + textTopMargin;
- __textObjectBounds.height = __clientBounds.height - textTopMargin
- - textBottomMargin;
+ __textObjectBounds.height = __clientBounds.height - textTopMargin - textBottomMargin;
}
float textObectMinimumWidth = 0.0f;
if (__pTitleSlidingTimer == null)
{
- __pTitleSlidingTimer = new (std::nothrow) Timer;
- if (__pTitleSlidingTimer == null)
- {
- return E_OUT_OF_MEMORY;
- }
+ __pTitleSlidingTimer = new (std::nothrow) Timer();
+ SysTryReturnResult(NID_UI_CTRL, __pTitleSlidingTimer, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pTitleSlidingTimer->Construct(*this);
if (IsFailed(r))
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to draw title text");
}
- Canvas *pTitleTextCanvas = __pTitleTextVisualElement->GetCanvasN();
+ Canvas* pTitleTextCanvas = __pTitleTextVisualElement->GetCanvasN();
SysTryReturnResult(NID_UI_CTRL, pTitleTextCanvas, E_SYSTEM, "A system error has occurred. Failed to get canvas of VisualElement");
if (__isTouchPressed)
if (__pPasswordTimer == null)
{
- __pPasswordTimer = new (std::nothrow) Timer;
- if (__pPasswordTimer == null)
- {
- return E_OUT_OF_MEMORY;
- }
+ __pPasswordTimer = new (std::nothrow) Timer();
+ SysTryReturnResult(NID_UI_CTRL, __pPasswordTimer, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pPasswordTimer->Construct(*this);
if (IsFailed(r))
if (__composingTextLength > 0)
{
_FontImpl* fontImpl = _FontImpl::GetInstance(*__pFont);
- SysTryReturnResult(NID_UI_CTRL, fontImpl != null, E_SYSTEM, "[E_SYSTEM] fontImpl is null.");
+ SysTryReturnResult(NID_UI_CTRL, fontImpl != null, E_SYSTEM, "fontImpl is null.");
fontImpl->SetUnderline(false);
int composingStartPosition = GetCursorPosition()-__composingTextLength;
__pTextObject->SetFont(__pFont, composingStartPosition, composingStartPosition+__composingTextLength);
height = __initialBounds.height;
}
- return height;
+ FloatDimension flexHeightDim = CoordinateSystem::AlignToDevice(FloatDimension(0, height));
+ return flexHeightDim.height;
}
result
FloatRectangle bounds = __pEdit->GetBoundsF();
float calculateHeight = CalculateFlexibleHeightF();
- FloatDimension flexHeightDim = CoordinateSystem::AlignToDevice(FloatDimension(0, calculateHeight));
- if (bounds.height != flexHeightDim.height)
+ //calculateHeight is being calculated based on AlignToDevice only
+ if (bounds.height != calculateHeight)
{
- bounds.height = flexHeightDim.height;
+ bounds.height = calculateHeight;
__prevTotalTextHeight = __pTextObject->GetTotalHeightF();
- FloatRectangle editBounds = CoordinateSystem::AlignToDevice(bounds);
- return SetFlexBounds(editBounds);
+ return SetFlexBounds(bounds);
}
__prevTotalTextHeight = __pTextObject->GetTotalHeight();
return r;
_VisualElement* pVisualElement = __pEdit->GetVisualElement();
SysTryReturnResult(NID_UI_CTRL, pVisualElement, E_SYSTEM, "A system error has occurred. Unable to get root visual element.");
- pVisualElement->SetAnimationProvider(__pEditVEDelegator);
- pVisualElement->SetImplicitAnimationEnabled(true);
-
//Modify InitialBounds only on User calls and on Orientation change
if (!((__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) == false))
{
__pEdit->Invalidate();
- pVisualElement->SetImplicitAnimationEnabled(false);
-
__prevTotalTextHeight = __pTextObject->GetTotalHeightF();
__pEdit->SendExpandableEditAreaEvent(expandableEditAreaStatus, __pTextObject->GetTotalLineCount());
}
return pForm;
}
+ else
+ {
+ return __pParentForm;
+ }
CATCH:
return null;
result
_EditPresenter::SetTextBounds(Rectangle& bounds)
{
- __textObjectBounds = _CoordinateSystemUtils::ConvertToFloat(bounds);
- if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)
+ FloatRectangle floatBounds = _CoordinateSystemUtils::ConvertToFloat(bounds);
+ if (__textObjectBounds != floatBounds)
{
- __pTextObject->SetBounds(__textObjectBounds);
- __pTextObject->Compose();
+ __textObjectBounds = floatBounds;
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)
+ {
+ __pTextObject->SetBounds(__textObjectBounds);
+ __pTextObject->Compose();
+ __isCursorChanged = true;
+ }
}
return E_SUCCESS;
}
result
_EditPresenter::SetTextBounds(FloatRectangle& bounds)
{
- __textObjectBounds = bounds;
- if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)
+ if (__textObjectBounds != bounds)
{
- __pTextObject->SetBounds(__textObjectBounds);
- __pTextObject->Compose();
+ __textObjectBounds = bounds;
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)
+ {
+ __pTextObject->SetBounds(__textObjectBounds);
+ __pTextObject->Compose();
+ __isCursorChanged = true;
+ }
}
return E_SUCCESS;
}
if (__pFlickAnimation == null)
{
- __pFlickAnimation = new (std::nothrow) _FlickAnimation;
+ __pFlickAnimation = new (std::nothrow) _FlickAnimation();
+ SysTryReturnResult(NID_UI_CTRL, __pFlickAnimation, E_OUT_OF_MEMORY, "Memory allocation failed.");
}
// Init Flick Animation Config
- if (__pFlickAnimation)
- {
- float width = 0.0f;
- float height = 0.0f;
- Tizen::Graphics::FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
- Tizen::Graphics::FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width);
- if (__pEdit->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
- {
- width = portraitSize.width;
- height = portraitSize.height;
- }
- else
- {
- width = landscapeSize.width;
- height = landscapeSize.height;
- }
- __pFlickAnimation->SetSizeInformation(width, height, DEVICE_SIZE_HORIZONTAL, DEVICE_SIZE_VERTICAL);
- __pFlickAnimation->SetSensitivity(FLICK_ANIMATION_FPS_PANEL, FLICK_ANIMATION_SENSITIVITY_PANEL);
+ float width = 0.0f;
+ float height = 0.0f;
+ Tizen::Graphics::FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
+ Tizen::Graphics::FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width);
+ if (__pEdit->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ width = portraitSize.width;
+ height = portraitSize.height;
+ }
+ else
+ {
+ width = landscapeSize.width;
+ height = landscapeSize.height;
}
+ __pFlickAnimation->SetSizeInformation(width, height, DEVICE_SIZE_HORIZONTAL, DEVICE_SIZE_VERTICAL);
+ __pFlickAnimation->SetSensitivity(FLICK_ANIMATION_FPS_PANEL, FLICK_ANIMATION_SENSITIVITY_PANEL);
+
+
// Stop Timer
StopFlickTimer();
// Create Timer
if (__pFlickAnimationTimer == null)
{
- __pFlickAnimationTimer = new (std::nothrow) Timer;
- if (__pFlickAnimationTimer == null)
- {
- r = E_OUT_OF_MEMORY;
- goto CATCH;
- }
+ __pFlickAnimationTimer = new (std::nothrow) Timer();
+ SysTryReturnResult(NID_UI_CTRL, __pFlickAnimationTimer, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pFlickAnimationTimer->Construct(*this);
- if (IsFailed(r))
- {
- delete __pFlickAnimationTimer;
- goto CATCH;
- }
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct FlickAnimationTimer.", GetErrorMessage(r));
+
}
return r;
CATCH:
+ delete __pFlickAnimationTimer;
+ __pFlickAnimationTimer = null;
+
return r;
}
if (pScrollPanel)
{
__pParentPanel = pScrollPanel;
+ __pParentPanel->AddScrollEventListener(*__pEdit);
break;
}
}
_EditPresenter::ScrollPanelToCursorPosition(bool show)
{
if (!__pParentPanel)
+ {
return;
-
- result r = E_SUCCESS;
+ }
UpdateComponentInformation();
FloatRectangle absCursorBounds(0.0f, 0.0f, 0.0f, 0.0f);
- r = CalculateAbsoluteCursorBounds(__cursorPos, absCursorBounds);
+ result r = CalculateAbsoluteCursorBounds(__cursorPos, absCursorBounds);
if (r != E_SUCCESS)
{
return;
}
+ //SysLog(NID_UI_CTRL, "------------------------ScrollPosition recalculation starts~!!!!--------------------------.");
+
FloatRectangle absPanelRect = __pParentPanel->GetAbsoluteBoundsF(true);
- float panelHeight = __pParentPanel->GetBoundsF().height;
+ FloatRectangle absEditRect = __pEdit->GetAbsoluteBoundsF(true);
float scrollPosition = __pParentPanel->GetScrollPosition();
- float cursorBoundsY = absCursorBounds.y - absPanelRect.y;
- float topYCompared = 0.0f;
- float bottomYCompared = panelHeight;
+ float upSideGap = 0.0f;
+ float newScrollPosition = 0.0f;
if (__textObjectBounds.height < absCursorBounds.height)
{
absCursorBounds.height = __textObjectBounds.height;
}
- float upSideGap = topYCompared - cursorBoundsY;
- float downSideGap = (upSideGap > 0.0f) ? 0.0f : cursorBoundsY + absCursorBounds.height - bottomYCompared;
-
- if (upSideGap > 0.0f || downSideGap > 0.0f)
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN && (!IsInternalFocused()))
{
- float gap = 0.0f;
- float topTextMargin = 0.0f;
- float bottomTextMargin = 0.0f;
+ upSideGap = absPanelRect.y - absEditRect.y; // cursor is not at the top position for token case
+ }
+ else
+ {
+ upSideGap = absPanelRect.y - absCursorBounds.y; // absPanelRect.y value is always positive
+ }
+ if (upSideGap > 0.0f)
+ {
if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
{
- topTextMargin = __pEdit->GetBoundsF().y;
- bottomTextMargin = __pEdit->GetBoundsF().height;
+ newScrollPosition = scrollPosition -(absPanelRect.y -absEditRect.y);
+ //SysLog(NID_UI_CTRL, "[single line edit] Move up till top boundary of edit.");
}
else
{
- topTextMargin = __textObjectBounds.y;
- bottomTextMargin = __pEdit->GetBoundsF().height - __textObjectBounds.y - __textObjectBounds.height;
+ newScrollPosition = scrollPosition - upSideGap;
+ //SysLog(NID_UI_CTRL, "[multi-line edit] Move up till up position of cursor.");
}
- if (upSideGap > 0.0f)
+ //SysLog(NID_UI_CTRL, "move up scroll position from %f to %f", scrollPosition, newScrollPosition);
+ }
+ else
+ {
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE || __pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)
{
- gap = scrollPosition - (upSideGap + topTextMargin);
+ if ((absPanelRect.y + absPanelRect.height) > (absEditRect.y + absEditRect.height))
+ {
+ //SysLog(NID_UI_CTRL, "[single line edit] already exists in exposed region.");
+
+ return;
+ }
+
+ newScrollPosition = scrollPosition + ((absEditRect.y + absEditRect.height) -(absPanelRect.y + absPanelRect.height));
+ SysLog(NID_UI_CTRL, "Move down till down boundary of edit.");
}
else
{
- gap = scrollPosition + (downSideGap + bottomTextMargin);
- }
+ if ((absCursorBounds.y + absCursorBounds.height) < (absPanelRect.y + absPanelRect.height))
+ {
+ //SysLog(NID_UI_CTRL, "[multi-line edit]Cursor already exist in exposed region.");
- __pParentPanel->SetScrollPosition(gap);
+ return;
+ }
- __pParentPanel->Invalidate();
+ newScrollPosition = scrollPosition + ((absCursorBounds.y + absCursorBounds.height) -(absPanelRect.y + absPanelRect.height));
+ //SysLog(NID_UI_CTRL, "Move down till down position of cursor.");
+ }
+
+ //SysLog(NID_UI_CTRL, "move down scroll position from %f to %f", scrollPosition, newScrollPosition);
}
+ __pParentPanel->SetScrollPosition(newScrollPosition);
+ __pParentPanel->Invalidate();
+
+ //SysLog(NID_UI_CTRL, "------------------------ScrollPosition recalculation Ends!!!!--------------------------.");
return;
}
ClearLastResult();
ArrayList* pArgs = new (std::nothrow) ArrayList();
- SysTryReturnVoidResult(NID_UI_CTRL, pArgs != null, E_SYSTEM, "[E_SYSTEM] pArgs is null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArgs != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
result r = E_SYSTEM;
r = pArgs->Construct();
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Unable to construct pArgs");
String* pType = new (std::nothrow) String(type);
- SysTryReturnVoidResult(NID_UI, pType, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturnVoidResult(NID_UI, pType, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pArgs->Add(*pType);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Unable to add type to pArgs");
_EditPresenter::IsUnsupportedChracterExist(const KeypadStyle keypadStyle, const Tizen::Base::String& text)
{
const int numberOfCharOnNumOnlyStyle = 10;
- const int numberOfCharOnPhoneNumStyle = 13;
+ const int numberOfCharOnPhoneNumStyle = 14;
const int numberOfCharOnIpStyle = 18;
const wchar_t* TempKey = null;
const wchar_t characterOnNumOnlyStyle[numberOfCharOnNumOnlyStyle+1] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/, 0};
const wchar_t characterOnPhoneNumStyle[numberOfCharOnPhoneNumStyle+1] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/,
- 0x2a/***/, 0x2b/*+*/, 0x23/*#*/, 0};
+ 0x2a/***/, 0x2b/*+*/, 0x23/*#*/, 0x70/*p*/, 0};
const wchar_t characterOnIPStyle[numberOfCharOnIpStyle+1] = { 0x30/*0*/, 0x31/*1*/, 0x32/*2*/, 0x33/*3*/, 0x34/*4*/, 0x35/*5*/, 0x36/*6*/, 0x37/*7*/, 0x38/*8*/, 0x39/*9*/,
0x3a/*:*/, 0x2e/*.*/, 0x61/*a*/, 0x62/*b*/, 0x63/*c*/, 0x64/*d*/, 0x65/*e*/, 0x66/*f*/, 0};
bool isSupportedCharacterExist = false;
{
isSupportedCharacterExist = false;
wchar_t checkChar =0;
- if ( text.GetCharAt(i, checkChar) != E_SUCCESS)
+ if (text.GetCharAt(i, checkChar) != E_SUCCESS)
{
break;
}
result r = E_SUCCESS;
SysTryReturnResult(NID_UI_CTRL, (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD), E_INVALID_OPERATION,
- "Edit Style is not EDIT_STYLE_PASSWORD.\n")
+ "Edit Style is not EDIT_STYLE_PASSWORD.")
if (__isPasswordVisible == visible)
result
_EditPresenter::DrawFocusRing(Tizen::Graphics::Canvas& canvas)
{
- if (__pEditModel->IsViewModeEnabled() || !__pEdit->IsEnabled())
+ if ((!__pEdit->IsFocusModeStateEnabled() && IsViewModeEnabled()) || !__pEdit->IsEnabled())
{
return E_SUCCESS;
}
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
FloatRectangle editRect(0.0f, 0.0f, __pEdit->GetBoundsF().width, __pEdit->GetBoundsF().height);
-
+
Bitmap* pReplacementFocusRing = _BitmapImpl::GetColorReplacedBitmapN(*pFocusRing, Color::GetColor(COLOR_ID_MAGENTA), focusColor);
SysTryCatch(NID_UI_CTRL, pReplacementFocusRing, , r = GetLastResult(), "Unable to allocate text buffer.");
return r;
}
+void
+_EditPresenter::OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition)
+{
+ if (__isCopyPasteManagerExist)
+ {
+ __pCopyPasteManager->Show();
+ }
+}
+
+void
+_EditPresenter::OnScrollStopped(Tizen::Ui::_Control& source)
+{
+ if (__pCopyPasteManager)
+ {
+ if (__needToCreateCopyPastePopup && !__pCopyPasteManager->GetCopyPastePopup())
+ {
+ __pCopyPasteManager->CreateCopyPastePopup();
+ if (__pCopyPasteManager->GetCopyPastePopup())
+ {
+ __needToCreateCopyPastePopup = false;
+ }
+ }
+ __pCopyPasteManager->Show();
+ }
+}
+
+_Window*
+_EditPresenter::OnDragAndDropBeginning(void)
+{
+ SysLog(NID_UI_CTRL, "Drag & Drop Callback is called");
+
+ result r = E_SUCCESS;
+ _Label* pLabel = null;
+ FloatDimension dragWindowDimension;
+ _ControlOrientation orientation = __pEdit->GetOrientation();
+
+ GET_SHAPE_CONFIG(EDIT::DRAG_AND_DROP_WINDOW_WIDTH, orientation, dragWindowDimension.width);
+ GET_SHAPE_CONFIG(EDIT::DRAG_AND_DROP_WINDOW_HEIGHT, orientation, dragWindowDimension.height);
+
+ FloatRectangle bounds(__pressedAbsolutePoint.x-dragWindowDimension.width/2.0f, __pressedAbsolutePoint.y-dragWindowDimension.height/2.0f, dragWindowDimension.width, dragWindowDimension.height);
+
+ _EditDragAndDropWindow* pDragWindow = new (std::nothrow) _EditDragAndDropWindow();
+ SysTryReturn(NID_UI_CTRL, pDragWindow, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ r = pDragWindow->CreateRootVisualElement(_WINDOW_TYPE_SUB);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ pDragWindow->SetBackgroundColor(Color(0, 0, 0, 0));
+ pDragWindow->SetActivationEnabled(false);
+ pDragWindow->SetBounds(bounds);
+
+ pLabel = _Label::CreateLabelN();
+ SysTryCatch(NID_UI_CTRL, pLabel, , E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(r));
+
+ pLabel->SetBackgroundColor(Color(0, 0, 0, 0));
+ pLabel->SetBounds(FloatRectangle(0, 0, bounds.width, bounds.height));
+ pLabel->SetText(__dragAndDropString);
+ pLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+
+ pDragWindow->AttachChild(*pLabel);
+ pDragWindow->SetLabel(pLabel);
+
+ pDragWindow->Open();
+
+ __isCursorDisabled = true;
+
+ DrawDragAndDropVisualCue();
+
+ return pDragWindow;
+
+CATCH:
+ delete pDragWindow;
+
+ return null;
+}
+
+void
+_EditPresenter::OnDragAndDropDropping(void)
+{
+ SysLog(NID_UI_CTRL, "Drag & Drop Callback is called");
+
+ _Window* pDragWindow = __pEdit->GetDragWindow();
+ if (pDragWindow)
+ {
+ pDragWindow->Close();
+ delete pDragWindow;
+ }
+ return;
+}
+
+void
+_EditPresenter::OnDragAndDropEntered(void)
+{
+ SysLog(NID_UI_CTRL, "Drag & Drop Callback is called");
+
+ DrawDragAndDropVisualCue();
+
+ return;
+}
+
+void
+_EditPresenter::OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position)
+{
+ SysLog(NID_UI_CTRL, "Drag & Drop Callback is called");
+
+ if (IsViewModeEnabled())
+ {
+ return;
+ }
+
+ FloatRectangle clientBounds = __pEdit->GetBoundsF();
+ clientBounds.x = 0.0f;
+ clientBounds.y = 0.0f;
+ if (clientBounds.Contains(position))
+ {
+ int rowIndex;
+ int columnIndex;
+ FloatPoint touchPoint = position;
+
+ if(!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE))
+ {
+ float totalHeight = __pTextObject->GetTotalHeightF();
+ if (totalHeight < __textObjectBounds.height)
+ {
+ if (totalHeight < touchPoint.y)
+ {
+ touchPoint.y = totalHeight;
+ }
+ }
+ }
+
+ int cursorPos = GetCursorPositionAt(touchPoint, rowIndex,columnIndex);
+ if (cursorPos != -1)
+ {
+ SetCursorPosition(cursorPos, rowIndex, columnIndex);
+ }
+ else
+ {
+ if ((__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) == false)
+ {
+ SetCursorPosition(GetTextLength());
+ }
+ }
+ InitializeCursor();
+ DrawDragAndDropVisualCue();
+ }
+ return;
+}
+
+void
+_EditPresenter::OnDragAndDropLeft(void)
+{
+ SysLog(NID_UI_CTRL, "Drag & Drop Callback is called");
+
+ __pDragAndDropCueVisualElement->SetShowState(false);
+
+ return;
+}
+
+void
+_EditPresenter::OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem)
+{
+ SysLog(NID_UI_CTRL, "Drag & Drop Callback is called");
+
+ __pDragAndDropCueVisualElement->SetShowState(false);
+
+ if (IsViewModeEnabled())
+ {
+ return;
+ }
+
+ if (IsUnsupportedChracterExist(GetKeypadStyle(), dragAndDropItem.GetData()))
+ {
+ return;
+ }
+
+ if (!IsCurrentFocused())
+ {
+ _Window* pWindow = null;
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+
+ pWindow = pControlManager->GetCurrentFrame();
+ if (pWindow)
+ {
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+
+ bool visible = pEcoreEvas->IsWindowVisible(*pWindow);
+ bool activationEnabled = pEcoreEvas->IsWindowActivationEnabled(*pWindow);
+
+ if ((visible == true) && (activationEnabled == true))
+ {
+ pEcoreEvas->ActivateWindow(*pWindow);
+ }
+ }
+ __pEdit->SetFocused();
+ }
+
+ InsertTextAt(__cursorPos, dragAndDropItem.GetData());
+ DrawText();
+ return;
+}
+
+void
+_EditPresenter::DrawDragAndDropVisualCue(void)
+{
+ if (IsViewModeEnabled())
+ {
+ return;
+ }
+
+ FloatRectangle cursorBounds;
+ if (CalculateCursorBounds(__textObjectBounds, cursorBounds) != E_SUCCESS)
+ {
+ return;
+ }
+ __pDragAndDropCueVisualElement->SetShowState(true);
+ __pDragAndDropCueVisualElement->SetBounds(cursorBounds);
+
+ Canvas* pCanvas = __pDragAndDropCueVisualElement->GetCanvasN();
+ if (pCanvas == null)
+ {
+ return;
+ }
+ pCanvas->SetBackgroundColor(Color(0));
+ pCanvas->Clear();
+
+// Color cursorColor;
+// GET_COLOR_CONFIG(EDIT::CURSOR_NORMAL, cursorColor);
+
+ cursorBounds.SetPosition(0.0f, 0.0f);
+ pCanvas->FillRectangle(Color::GetColor(COLOR_ID_RED), cursorBounds);
+
+ delete pCanvas;
+
+ return;
+}
+
+void
+_EditPresenter::ResetDragAndDrop(void)
+{
+ __dragAndDropStarted = false;
+ __pEdit->DragAndDropDrop();
+ if (!IsViewModeEnabled())
+ {
+ __isCursorDisabled = false;
+ InitializeCursor();
+ }
+ __pDragAndDropCueVisualElement->SetShowState(false);
+}
+
+bool
+_EditPresenter::IsDragAndDropStarted(void) const
+{
+ return __dragAndDropStarted;
+}
+
}}} // Tizen::Ui::Controls
, __pAccessibilityAmPmElement(null)
, __isCalledBoundsChanged(false)
, __isXmlBoundsExist(false)
+ , __pParentPanel(null)
+ , __isEnterKeyPressed(false)
{
}
__pAccessibilityAmPmElement->Activate(false);
__pAccessibilityAmPmElement = null;
}
+
+ if (__pParentPanel != null)
+ {
+ __pParentPanel->RemoveScrollEventListener(*this);
+ }
}
_EditTime*
_AccessibilityContainer* pContainer = null;
- _EditTime* pEditTime = new (std::nothrow) _EditTime;
+ _EditTime* pEditTime = new (std::nothrow) _EditTime();
SysTryReturn(NID_UI_CTRL, pEditTime, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pEditTime->GetVisualElement()->SetSurfaceOpaque(false);
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, (__pDateTimeBar != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ __pDateTimeBar->SetTouchPressThreshold(_TOUCH_PRESS_THRESHOLD_INSENSITIVE);
+
r = __pDateTimeBar->AddActionEventListener(*this);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryReturn(NID_UI_CTRL, (pFrame != null), E_SYSTEM, E_SYSTEM,
"[E_SYSTEM] A system error has occurred. Failed to get frame instance.");
- frameBounds = pFrame->GetAbsoluteBoundsF();
- absoluteBounds = GetAbsoluteBoundsF();
+ frameBounds = pFrame->GetAbsoluteBoundsF(true);
+ absoluteBounds = GetAbsoluteBoundsF(true);
parentWindowBounds = GetParentWindowBounds();
titleBounds = __pEditTimePresenter->GetTitleBounds();
{
if (GetDateTimeBar() != null)
{
- FloatRectangle absoluteBounds = GetAbsoluteBoundsF();
+ FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true);
if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height)
{
pContainer->AddListener(*this);
if (__pAccessibilityEditTimeElement == null)
{
- __pAccessibilityEditTimeElement = new _AccessibilityElement(true);
+ __pAccessibilityEditTimeElement = new (std::nothrow) _AccessibilityElement(true);
+ SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityEditTimeElement != null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
__pAccessibilityEditTimeElement->SetBounds(GetClientBoundsF());
__pAccessibilityEditTimeElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
__pAccessibilityEditTimeElement->SetName(L"EditTimeText");
if (__pAccessibilityHourElement == null && __pAccessibilityMinuteElement == null)
{
- String hintText(L"Double tap to edit");
+ __pAccessibilityHourElement = new (std::nothrow) _AccessibilityElement(true);
+ SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityHourElement != null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- __pAccessibilityHourElement = new _AccessibilityElement(true);
__pAccessibilityHourElement->SetBounds(hourBounds);
__pAccessibilityHourElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_HOUR_LC");
- __pAccessibilityHourElement->SetHint(hintText);
+ __pAccessibilityHourElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS");
pContainer->AddElement(*__pAccessibilityHourElement);
- __pAccessibilityMinuteElement = new _AccessibilityElement(true);
+ __pAccessibilityMinuteElement = new (std::nothrow) _AccessibilityElement(true);
+ SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityMinuteElement != null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
__pAccessibilityMinuteElement->SetBounds(minuteBounds);
__pAccessibilityMinuteElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MINUTE_LC");
- __pAccessibilityMinuteElement->SetHint(hintText);
+ __pAccessibilityMinuteElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS");
pContainer->AddElement(*__pAccessibilityMinuteElement);
if (!Is24HourNotationEnabled())
{
- __pAccessibilityAmPmElement = new _AccessibilityElement(true);
+ __pAccessibilityAmPmElement = new (std::nothrow) _AccessibilityElement(true);
+ SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityAmPmElement != null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
__pAccessibilityAmPmElement->SetBounds(ampmBounds);
__pAccessibilityAmPmElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS");
pContainer->AddElement(*__pAccessibilityAmPmElement);
__pAccessibilityAmPmElement->SetBounds(ampmBounds);
}
+ if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated())
+ {
+ CalculateDateTimeBarPosition();
+
+ FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f);
+
+ bounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(__pEditTimePresenter->GetLastSelectedId());
+ FloatRectangle absoluteBounds(0.0f, 0.0f, 0.0f, 0.0f);
+ absoluteBounds = GetAbsoluteBoundsF();
+ bounds.x += absoluteBounds.x;
+ GetDateTimeBar()->CalculateArrowBounds(bounds);
+ GetDateTimeBar()->ChangeLayout();
+ }
+
return;
}
}
__pEditTimePresenter->Initialize();
- __pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE);
- if (GetDateTimeBar() != null)
+ if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated())
{
- GetDateTimeBar()->SetVisibleState(false);
- GetDateTimeBar()->Close();
+ CalculateDateTimeBarPosition();
+
+ FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f);
+
+ bounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(__pEditTimePresenter->GetLastSelectedId());
+ FloatRectangle absoluteBounds(0.0f, 0.0f, 0.0f, 0.0f);
+ absoluteBounds = GetAbsoluteBoundsF();
+ bounds.x += absoluteBounds.x;
+ GetDateTimeBar()->CalculateArrowBounds(bounds);
+ GetDateTimeBar()->ChangeLayout();
}
return;
bool
_EditTime::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
- FloatRectangle absoluteBounds = GetAbsoluteBoundsF();
+ FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true);
if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height)
{
CalculateDateTimeBarPosition();
if (GetDateTimeBar() != null)
{
GetDateTimeBar()->SetVisibleState(false);
+ GetDateTimeBar()->ClearPreviousText();
GetDateTimeBar()->Close();
}
{
case _KEY_ENTER:
{
- FloatRectangle absoluteBounds = GetAbsoluteBoundsF();
+ FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true);
+
+ if (__pParentPanel != null && __pParentPanel->IsScrollAnimationRunning())
+ {
+ __isEnterKeyPressed = true;
+ return true;
+ }
if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height)
{
}
}
- return __pEditTimePresenter->OnKeyReleased(source, keyInfo);
+ return __pEditTimePresenter->OnKeyReleased(source, keyCode);
}
bool
{
if(GetDateTimeBar() != null && GetDateTimeBar()->IsActivated())
{
+ GetDateTimeBar()->ClearPreviousText();
GetDateTimeBar()->Close();
__pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE);
Invalidate();
{
if(GetDateTimeBar() != null && GetDateTimeBar()->IsActivated())
{
+ GetDateTimeBar()->ClearPreviousText();
GetDateTimeBar()->Close();
__pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE);
Invalidate();
return false;
}
+// Tizen::Ui::Animations::IAnimationTransactionEventListener
+void
+_EditTime::OnAnimationTransactionStarted(int transactionId)
+{
+ return;
+}
+
+void
+_EditTime::OnAnimationTransactionStopped(int transactionId)
+{
+ __pEditTimePresenter->EndTransaction();
+ return;
+}
+
+void
+_EditTime::OnAnimationTransactionFinished(int transactionId)
+{
+ __pEditTimePresenter->EndTransaction();
+ return;
+}
+
+void
+_EditTime::InitializeParentPanel(void)
+{
+ if (__pParentPanel == null)
+ {
+ _ScrollPanel* pScrollPanel = null;
+ _Control* pControlCore = null;
+
+ for (pControlCore = GetParent(); pScrollPanel == null; pControlCore = pControlCore->GetParent())
+ {
+ if (pControlCore == null)
+ {
+ return;
+ }
+
+ pScrollPanel = dynamic_cast<_ScrollPanel*>(pControlCore);
+ if (pScrollPanel)
+ {
+ __pParentPanel = pScrollPanel;
+ __pParentPanel->AddScrollEventListener(*this);
+ break;
+ }
+ }
+ }
+
+ return;
+}
+
+void
+_EditTime::OnScrollStopped(Tizen::Ui::_Control& source)
+{
+ if (__isEnterKeyPressed)
+ {
+ CalculateDateTimeBarPosition();
+ __pEditTimePresenter->OnKeyReleased(source, _KEY_ENTER);
+ __isEnterKeyPressed = false;
+ }
+}
+
+void
+_EditTime::OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition)
+{
+ if (GetDateTimeBar()->IsActivated() && __pParentPanel != null && __pParentPanel->IsScrollAnimationRunning())
+ {
+ __pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE);
+ GetDateTimeBar()->SetVisibleState(false);
+ GetDateTimeBar()->ClearPreviousText();
+ GetDateTimeBar()->Close();
+ }
+}
+
+
}}} // Controls
result
_EditTimeImpl::OnAttachedToMainTree(void)
{
+ GetCore().InitializeParentPanel();
return _ControlImpl::OnAttachedToMainTree();
}
titleEnable = true;
}
- pEditTime = new (std::nothrow) EditTime;
- if (pEditTime == null)
- {
- return null;
- }
+ pEditTime = new (std::nothrow) EditTime();
+ SysTryReturn(NID_UI_CTRL, pEditTime, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
if (titleEnable)
{
return null;
}
+ pEditTime->SetBounds(rect);
+
if (pControl->GetElement(L"b24HourNotationEnabled", elementString))
{
if (elementString.Equals(L"true", false))
*/
#include <FSysSettingInfo.h>
+#include <FGrpColor.h>
+#include <FUiAnimAnimationTransaction.h>
+#include <FUiAnimVisualElementPropertyAnimation.h>
#include <FGrp_BitmapImpl.h>
#include <FGrp_TextTextObject.h>
#include <FGrp_TextTextSimple.h>
#include <FGrp_FontImpl.h>
#include "FUi_CoordinateSystemUtils.h"
#include "FUi_ResourceManager.h"
+#include "FUiAnim_VisualElement.h"
#include "FUiCtrl_EditTimePresenter.h"
#include "FUiCtrl_EditTime.h"
#include "FUiCtrl_DateTimeModel.h"
#include "FUiCtrl_DateTimeUtils.h"
-#include "FUiAnim_VisualElement.h"
-#include "FUiAnimVisualElementPropertyAnimation.h"
-#include "FGrpColor.h"
+
using namespace Tizen::Graphics;
using namespace Tizen::Base;
, __isEditTimeInitialized(false)
, __isEnterKeyPressed(false)
, __isFocused(false)
+ , __transactionId(0)
{
}
delete __pContentBgEffectDisabledBitmap;
__pContentBgEffectDisabledBitmap = null;
+
+ if (__transactionId != 0)
+ {
+ AnimationTransaction::Stop(__transactionId);
+ }
+
+ if (__pContentProvider != null)
+ {
+ __pEditTime->GetVisualElement()->DetachChild(__pContentProvider);
+ __pContentProvider->Destroy();
+ __pContentProvider = null;
+ }
}
_EditTimePresenter*
pEditTimePresenter->__pEditTime = const_cast <_EditTime*>(&editTime);
- pEditTimePresenter->__pEditDateTimeModel = new (std::nothrow) _DateTimeModel;
+ pEditTimePresenter->__pEditDateTimeModel = new (std::nothrow) _DateTimeModel();
SysTryCatch(NID_UI_CTRL, pEditTimePresenter->__pEditDateTimeModel, , E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Memory allocation failed.");
(_FontImpl::GetInstance(*__pFont))->SetSize(__timeFontSize);
+ pSimpleText->SetTextShadowEnabled(true);
+ pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f));
+
dateObject.AppendElement(*pSimpleText);
dateObject.SetFont(__pFont, 0, dateObject.GetTextLength());
dim = dateObject.GetTextExtentF(0, dateObject.GetTextLength());
Color contentHighlightedColor;
Color colonTextColor;
Color colonTextDisabledColor;
- Bitmap* pTempBitmap = null;
+
GET_COLOR_CONFIG(EDITTIME::BUTTON_BG_NORMAL, buttonNormalBgColor);
GET_COLOR_CONFIG(EDITTIME::BUTTON_BG_PRESSED, buttonPressedColor);
GET_SHAPE_CONFIG(EDITTIME::AMPM_FONT_SIZE, __pEditTime->GetOrientation(), __amPmTextSize);
- r = GET_BITMAP_CONFIG_N(EDITTIME::COLON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::COLON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, colonTextColor, __pColonColorReplacementBitmap);
SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
- __pColonColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA),
- colonTextColor);
- SysTryCatch(NID_UI_CTRL, (__pColonColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- __pColonDisabledColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA),
- colonTextDisabledColor);
- SysTryCatch(NID_UI_CTRL, (__pColonDisabledColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- delete pTempBitmap;
- pTempBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::COLON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, colonTextDisabledColor, __pColonDisabledColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pAmPmBgNormalColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonNormalBgColor);
- SysTryCatch(NID_UI_CTRL, (__pAmPmBgNormalColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- delete pTempBitmap;
- pTempBitmap = null;
- r = GET_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonNormalBgColor, __pAmPmBgNormalColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pAmPmBgDisabledColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonDisabledBgColor);
- SysTryCatch(NID_UI_CTRL, (__pAmPmBgDisabledColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- delete pTempBitmap;
- pTempBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonDisabledBgColor, __pAmPmBgDisabledColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pAmPmBgPressedColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonPressedColor);
- SysTryCatch(NID_UI_CTRL, (__pAmPmBgPressedColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- delete pTempBitmap;
- pTempBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonPressedColor, __pAmPmBgPressedColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pAmPmBgHighlightedColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonHighlightedColor);
- SysTryCatch(NID_UI_CTRL, (__pAmPmBgHighlightedColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- delete pTempBitmap;
- pTempBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonHighlightedColor, __pAmPmBgHighlightedColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pContentBgNormalColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentNormalBgColor);
- SysTryCatch(NID_UI_CTRL, (__pContentBgNormalColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- delete pTempBitmap;
- pTempBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, contentNormalBgColor, __pContentBgNormalColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pContentBgPressedColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentPressedColor);
- SysTryCatch(NID_UI_CTRL, (__pContentBgPressedColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- delete pTempBitmap;
- pTempBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, contentPressedColor, __pContentBgPressedColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pContentBgDisabledColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentDisabledBgColor);
- SysTryCatch(NID_UI_CTRL, (__pContentBgDisabledColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- delete pTempBitmap;
- pTempBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, contentDisabledBgColor, __pContentBgDisabledColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pContentBgHighlightedColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentHighlightedColor);
- SysTryCatch(NID_UI_CTRL, (__pContentBgHighlightedColorReplacementBitmap != null), r = GetLastResult(), GetLastResult(),
- "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ r = GET_REPLACED_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, contentHighlightedColor, __pContentBgHighlightedColorReplacementBitmap);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmBgEffectNomralBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pContentBgEffectDisabledBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- delete pTempBitmap;
- pTempBitmap = null;
-
return r;
CATCH:
- delete pTempBitmap;
- pTempBitmap = null;
+
+ delete __pColonColorReplacementBitmap;
+ __pColonColorReplacementBitmap = null;
+
+ delete __pColonDisabledColorReplacementBitmap;
+ __pColonDisabledColorReplacementBitmap = null;
delete __pAmPmBgNormalColorReplacementBitmap;
__pAmPmBgNormalColorReplacementBitmap = null;
}
result
-_EditTimePresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap)
+_EditTimePresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap, bool isCustomBitmap)
{
result r = E_SUCCESS;
}
else
{
- r = canvas.DrawBitmap(bounds, *pBitmap);
+ if (isCustomBitmap)
+ {
+ Canvas *pContentCanvas = __pEditTime->GetCanvasN(bounds);
+ SysTryReturnResult(NID_UI_CTRL, (pContentCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+ FloatPoint position;
+
+ position.x = (bounds.width - pBitmap->GetWidthF()) / 2;
+ position.y = (bounds.height - pBitmap->GetHeightF()) / 2;
+ r = pContentCanvas->DrawBitmap(position, *pBitmap);
+ delete pContentCanvas;
+ }
+ else
+ {
+ r = canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), *pBitmap);
+ }
+
SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
}
SysTryReturn(NID_UI_CTRL, (pSimpleText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Memory allocation failed.");
+ pSimpleText->SetTextShadowEnabled(true);
+ pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f));
+
__textObject.AppendElement(*pSimpleText);
__textObject.SetFont(__pFont, 0, __textObject.GetTextLength());
}
Canvas* pCanvas = __pEditTime->GetCanvasN();
- SysAssertf((pCanvas != null), "Failed to get canvas.");
+ r = GetLastResult();
+ SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), r, "Failed to get canvas.");
FloatRectangle colonBounds(0.0f, 0.0f, 0.0f, 0.0f);
if (!__24hours)
{
- r = DrawResourceBitmap(*pCanvas, ampmBounds, pReplacementBitmap);
+ r = DrawResourceBitmap(*pCanvas, ampmBounds, pReplacementBitmap, isCustomBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
if (!isCustomBitmap)
{
FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f);
+ Canvas* pContentCanvas = null;
Canvas* pCanvas = __pEditTime->GetCanvasN();
- SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create canvas.");
+ SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
if (__focusId == DATETIME_ID_HOUR)
{
}
else
{
- r = pCanvas->DrawBitmap(bounds, *__pContentBgHighlightedColorReplacementBitmap);
+ pContentCanvas = __pEditTime->GetCanvasN(bounds);
+ SysTryCatch(NID_UI_CTRL, (pContentCanvas != null), , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+ bounds.x = (bounds.width - __pContentBgHighlightedColorReplacementBitmap->GetWidthF()) / 2;
+ bounds.y = (bounds.height - __pContentBgHighlightedColorReplacementBitmap->GetHeightF()) / 2;
+
+ r = pContentCanvas->DrawBitmap(FloatPoint(bounds.x, bounds.y), *__pContentBgHighlightedColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ delete pContentCanvas;
}
delete pCanvas;
CATCH:
delete pCanvas;
+ delete pContentCanvas;
return r;
}
if (!__pEditTime->IsEnabled())
{
- r = DrawResourceBitmap(canvas, bounds, __pColonDisabledColorReplacementBitmap);
+ r = canvas.DrawBitmap(bounds, *__pColonDisabledColorReplacementBitmap);
+ SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- r = DrawResourceBitmap(canvas, bounds, __pColonColorReplacementBitmap);
+ r = canvas.DrawBitmap(bounds, *__pColonColorReplacementBitmap);
+ SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
}
return r;
pReplacementBitmap = __pContentBgDisabledColorReplacementBitmap;
pEffectBitmap = __pContentBgEffectDisabledBitmap;
}
- else if (__selectedId != boxId)
+ else if (GetLastSelectedId() != boxId)
{
- if (__pEditTime->GetDateTimeBar() != null && __pEditTime->GetDateTimeBar()->IsActivated() &&
- (GetLastSelectedId() == boxId))
- {
- isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED);
- pReplacementBitmap = __pContentBgPressedColorReplacementBitmap;
- pEffectBitmap = __pContentBgEffectPressedBitmap;
- }
- else
- {
- isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_NORMAL);
- pReplacementBitmap = __pContentBgNormalColorReplacementBitmap;
- pEffectBitmap = __pContentBgEffectNormalBitmap;
- }
+ isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_NORMAL);
+ pReplacementBitmap = __pContentBgNormalColorReplacementBitmap;
+ pEffectBitmap = __pContentBgEffectNormalBitmap;
}
else
{
pEffectBitmap = __pContentBgEffectPressedBitmap;
}
- r = DrawResourceBitmap(canvas, bounds, pReplacementBitmap);
+ r = DrawResourceBitmap(canvas, bounds, pReplacementBitmap, isCustomBitmap);
SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
if (!isCustomBitmap)
{
GET_COLOR_CONFIG(EDITTIME::TEXT_NORMAL, textColor);
- if (__pEditTime->GetDateTimeBar() != null && __pEditTime->GetDateTimeBar()->IsActivated() &&
- (GetLastSelectedId() == boxId))
- {
- GET_COLOR_CONFIG(EDITTIME::TEXT_PRESSED, textColor);
- (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD);
- }
-
if (boxId == DATETIME_ID_AMPM)
{
- GET_COLOR_CONFIG(EDITTIME::BUTTON_TEXT_NORMAL, textColor);
- }
-
- if (boxId > -1 && boxId == __selectedId)
- {
- if (boxId == DATETIME_ID_AMPM)
+ if (boxId == __selectedId)
{
GET_COLOR_CONFIG(EDITTIME::BUTTON_TEXT_PRESSED, textColor);
}
else
{
- GET_COLOR_CONFIG(EDITTIME::TEXT_PRESSED, textColor);
- (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD);
+ GET_COLOR_CONFIG(EDITTIME::BUTTON_TEXT_NORMAL, textColor);
}
}
+
+ else if (boxId > -1 && boxId == GetLastSelectedId())
+ {
+ GET_COLOR_CONFIG(EDITTIME::TEXT_PRESSED, textColor);
+ (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD);
+ }
}
if (boxId != DATETIME_ID_AMPM)
__textObject.RemoveAll();
(_FontImpl::GetInstance(*__pFont))->SetSize(__timeFontSize);
+
+ pSimpleText->SetTextShadowEnabled(true);
+ pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f));
+
__textObject.AppendElement(*pSimpleText);
if (boxId == DATETIME_ID_AMPM)
}
if (__isFocused && __focusId == boxId)
{
- if (boxId == DATETIME_ID_AMPM)
+ if (boxId != __selectedId)
{
- GET_COLOR_CONFIG(EDITTIME::BUTTON_TEXT_HIGHLIGHTED, textColor);
- }
- else
- {
- GET_COLOR_CONFIG(EDITTIME::TEXT_HIGHLIGHTED, textColor);
+ if (boxId == DATETIME_ID_AMPM)
+ {
+ GET_COLOR_CONFIG(EDITTIME::BUTTON_TEXT_HIGHLIGHTED, textColor);
+ }
+ else
+ {
+ GET_COLOR_CONFIG(EDITTIME::TEXT_HIGHLIGHTED, textColor);
+ }
}
DrawFocus();
if (__isEnterKeyPressed)
{
__isEnterKeyPressed = false;
- __isFocused = true;
+
+ if (__pEditTime->IsFocusModeStateEnabled())
+ {
+ __isFocused = true;
+ }
}
+
if (__focusId == DATETIME_ID_NONE || __focusId == DATETIME_ID_AMPM)
{
__focusId = DATETIME_ID_HOUR;
if (!__isEnterKeyPressed || __focusId == DATETIME_ID_AMPM)
{
__focusId = DATETIME_ID_NONE;
+ __selectedId = DATETIME_ID_NONE;
}
__isFocused = false;
__pEditTime->Invalidate();
{
__isFocused = false;
__focusId = DATETIME_ID_NONE;
+ __isEnterKeyPressed = false;
+ __selectedId = DATETIME_ID_NONE;
__pEditTime->Invalidate();
return;
}
__pEditTime->Invalidate();
break;
}
+ case _KEY_ENTER:
+ {
+ if (__focusId == DATETIME_ID_AMPM)
+ {
+ __selectedId = DATETIME_ID_AMPM;
+ __pEditTime->Invalidate();
+ }
+ else
+ {
+ return false;
+ }
+ break;
+ }
default:
{
}
bool
-_EditTimePresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
+_EditTimePresenter::OnKeyReleased(const _Control& source, const _KeyCode& keyCode)
{
if (!__isFocused)
{
return false;
}
- _KeyCode keyCode = keyInfo.GetKeyCode();
if (__isAnimating)
{
- VisualElement *pEditTimeElement = __pEditTime->GetVisualElement();
+ VisualElement* pEditTimeElement = __pEditTime->GetVisualElement();
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, (pEditTimeElement != null), false, r, "[%s] Propagating.", GetErrorMessage(r));
pEditTimeElement->RemoveAllAnimations();
SetAmEnabled(!GetAmEnabled());
__pEditTime->FireTimeChangeEvent(TIME_INTERNAL_CHANGE_SAVED);
boxId = DATETIME_ID_AMPM;
+ __selectedId = DATETIME_ID_NONE;
__pEditTime->Invalidate();
}
{
if (__pEditTime->GetDateTimeBar() != null && __pEditTime->GetDateTimeBar()->IsActivated())
{
+ __pEditTime->GetDateTimeBar()->ClearPreviousText();
__pEditTime->GetDateTimeBar()->CloseDateTimeBar();
}
if (__pEditTime->GetDateTimeBar()->IsActivated())
{
__pEditTime->GetDateTimeBar()->RemoveAllAnimations();
+ __pEditTime->GetDateTimeBar()->ClearPreviousText();
__pEditTime->GetDateTimeBar()->Close();
__pEditTime->GetDateTimeBar()->SetVisibleState(true);
__pEditTime->GetDateTimeBar()->Open();
if (__pEditTime->GetDateTimeBar() != null && __pEditTime->GetDateTimeBar()->IsActivated())
{
__pEditTime->GetDateTimeBar()->SetVisibleState(false);
+ __pEditTime->GetDateTimeBar()->ClearPreviousText();
__pEditTime->GetDateTimeBar()->Close();
}
}
}
__selectedId = DATETIME_ID_NONE;
+ __pEditTime->Invalidate();
return true;
}
VisualElement* pEditTimeElement = null;
VisualElementPropertyAnimation* pNewBoundsAnimation = null;
VisualElementPropertyAnimation* pOldBoundsAnimation = null;
- Canvas *pCanvas = null;
- Canvas *pContentCanvas = null;
+ Canvas* pCanvas = null;
+ Canvas* pContentCanvas = null;
Color contentBgColor;
Color textNormalColor;
Color textPressedColor;
pCanvas->Clear();
rect.x = 0.0f;
rect.y = 0.0f;
- r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap);
isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED);
+ r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap, isCustomBitmap);
if (!isCustomBitmap)
{
pNewBoundsAnimation->SetPropertyName("bounds.position");
pNewBoundsAnimation->SetStartValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, oldTextDim.height)));
pNewBoundsAnimation->SetEndValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, 0.0f)));
- pNewBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
pOldBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation();
SysTryCatch(NID_UI_CTRL, (pOldBoundsAnimation != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pOldBoundsAnimation->SetPropertyName("bounds.position");
pOldBoundsAnimation->SetStartValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, 0.0f)));
pOldBoundsAnimation->SetEndValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, oldTextDim.height * -1.0f)));
- pOldBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
pOldSimpleText = new (std::nothrow)TextSimple((const_cast <wchar_t*>(__lastSelectedValue.GetPointer())), __lastSelectedValue.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
SysTryCatch(NID_UI_CTRL, (pOldSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ pOldSimpleText->SetTextShadowEnabled(true);
+ pOldSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f));
+
pCanvas = pOldVisualElement->GetCanvasN();
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
pNewSimpleText = new (std::nothrow)TextSimple((const_cast <wchar_t*>(newValue.GetPointer())), newValue.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
SysTryCatch(NID_UI_CTRL, (pNewSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ pNewSimpleText->SetTextShadowEnabled(true);
+ pNewSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f));
+
pCanvas = pNewVisualElement->GetCanvasN();
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
pCanvas = null;
pOldVisualElement->SetImplicitAnimationEnabled(false);
- pOldVisualElement->AddAnimation(*pOldBoundsAnimation);
-
pNewVisualElement->SetImplicitAnimationEnabled(false);
+
+ AnimationTransaction::Begin(__transactionId);
+ pOldVisualElement->AddAnimation(*pOldBoundsAnimation);
pNewVisualElement->AddAnimation(*pNewBoundsAnimation);
+ AnimationTransaction::SetCurrentTransactionEventListener(__pEditTime);
+ AnimationTransaction::Commit();
delete pOldBoundsAnimation;
delete pNewBoundsAnimation;
}
void
-_EditTimePresenter::OnVisualElementAnimationFinished (const VisualElementAnimation &animation, const String &keyName, VisualElement &target, bool completedNormally)
+_EditTimePresenter::EndTransaction(void)
{
result r = E_SUCCESS;
- __isAnimating = false;
+ __isAnimating = false;
VisualElement* pEditTimeElement = __pEditTime->GetVisualElement();
r = GetLastResult();
SysTryReturnVoidResult(NID_UI_CTRL, (pEditTimeElement != null), r, "[%s] Propagating.", GetErrorMessage(r));
- pEditTimeElement->DetachChild(*__pContentProvider);
- __pContentProvider->Destroy();
- __pContentProvider = null;
+ if (__pContentProvider != null)
+ {
+ pEditTimeElement->DetachChild(*__pContentProvider);
+ __pContentProvider->Destroy();
+ __pContentProvider = null;
+
+ }
Draw();
+ __transactionId = 0;
return;
}
-
}}} // Tizen::Ui::Controls
_ExpandableEditAreaEvent::CreateInstanceN(const _Control& source)
{
_ExpandableEditAreaEvent* pCoreTextEvent = new (std::nothrow) _ExpandableEditAreaEvent(source);
- SysTryReturn(NID_UI_CTRL, pCoreTextEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pCoreTextEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
if (IsFailed(GetLastResult()))
{
// cast to _CoreExpandableEditAreaEventArg
const _CoreExpandableEditAreaEventArg* pArg = dynamic_cast <const _CoreExpandableEditAreaEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. pArg is null.");
_ExpandableEditAreaEventStatus status = pArg->GetStatus();
if (status == _EXPANDABLE_EDITAREA_EVENT_ADDED)
_ExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(_ExpandableEditAreaEventStatus status, int newLineCount)
{
_CoreExpandableEditAreaEventArg* pEventArg = new (std::nothrow) _CoreExpandableEditAreaEventArg(status, newLineCount);
- SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pEventArg;
}
result r = E_SUCCESS;
r = FUNC_SIZE_INFO(ExpandableEditArea)().CheckInitialSizeValidF(FloatDimension(fRect.width, fRect.height), _CONTROL_ORIENTATION_PORTRAIT);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. The given rect size is not valid.");
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, "[%s] Invalid argument is used. The given rect size is not valid.", GetErrorMessage(E_INVALID_ARG));
_Edit* pCore = null;
if (style == EXPANDABLE_EDIT_AREA_STYLE_NORMAL)
_ExpandableEditAreaImpl::GetTextColor(EditTextColor type) const
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, type != EDIT_TEXT_COLOR_LINK, Color(), E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. The EditTextColor type is EDIT_TEXT_COLOR_LINK.");
+ SysTryReturn(NID_UI_CTRL, type != EDIT_TEXT_COLOR_LINK, Color(), E_INVALID_ARG, "[%s] Invalid argument is used. The EditTextColor type is EDIT_TEXT_COLOR_LINK.", GetErrorMessage(E_INVALID_ARG));
return __pExpandableEditArea->GetTextColor(type);
}
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturnResult(NID_UI_CTRL, pTokenEdit == null, E_UNSUPPORTED_OPERATION,
- "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_STYLE_TOKEN does not support this operation.");
+ "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_STYLE_TOKEN is not supported.");
return __pExpandableEditArea->InsertTextAt(position, text, textImage);
}
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturnResult(NID_UI_CTRL, pTokenEdit == null, E_UNSUPPORTED_OPERATION,
- "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_STYLE_TOKEN does not support this operation.");
+ "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_STYLE_TOKEN is not supported.");
return __pExpandableEditArea->AppendText(text, textImage);
}
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, multiplier >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. multiplier = %d ", multiplier);
- SysTryReturn(NID_UI_CTRL, extra >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. extra = %d ", extra);
+ SysTryReturn(NID_UI_CTRL, multiplier >= 0, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. multiplier is negative. ", GetErrorMessage(E_INVALID_ARG));
+ SysTryReturn(NID_UI_CTRL, extra >= 0, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. extra is negative ", GetErrorMessage(E_INVALID_ARG));
return __pExpandableEditArea->SetLineSpacing(DEFAULT_LINE_SPACE * multiplier + extra);
}
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, multiplier >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. multiplier = %d ", multiplier);
- SysTryReturn(NID_UI_CTRL, extra >= 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. extra = %d ", extra);
+ SysTryReturn(NID_UI_CTRL, multiplier >= 0, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. multiplier is negative. ", GetErrorMessage(E_INVALID_ARG));
+ SysTryReturn(NID_UI_CTRL, extra >= 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. extra is negative ", GetErrorMessage(E_INVALID_ARG));
return __pExpandableEditArea->SetLineSpacing(DEFAULT_LINE_SPACE * multiplier + extra);
}
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturn(NID_UI_CTRL, pTokenEdit != null, Color(), E_UNSUPPORTED_OPERATION,
- "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
Variant var;
switch (status)
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION,
- "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.");
Variant var(color);
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturn(NID_UI_CTRL, pTokenEdit != null, Color(), E_UNSUPPORTED_OPERATION,
- "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
Variant var = pTokenEdit->GetPropertyTokenTextColor();
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturn(NID_UI_CTRL, pTokenEdit != null, Color(), E_UNSUPPORTED_OPERATION,
- "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
return pTokenEdit->GetSelectedTokenTextColor();
}
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION,
- "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.");
Variant var(color);
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION,
- "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.");
return pTokenEdit->SetSelectedTokenTextColor(color);
}
ClearLastResult();
SysTryReturnResult(NID_UI_CTRL, (__pExpandableEditArea->GetEditStyle() & (EDIT_STYLE_TITLE_LEFT | EDIT_STYLE_TITLE_TOP)),
- E_UNSUPPORTED_OPERATION, "The current title style cannot support this function.\n");
+ E_UNSUPPORTED_OPERATION, "The current title style is not supported.");
return __pExpandableEditArea->SetTitleText(title);
}
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturn(NID_UI_CTRL, pTokenEdit != null, null, E_UNSUPPORTED_OPERATION,
- "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
return __pTokenFilter;
}
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION,
- "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.");
__pTokenFilter = const_cast <ITokenFilter*>(pFilter);
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION,
- "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.");
return pTokenEdit->AppendToken(token);
}
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION,
- "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.");
return pTokenEdit->InsertTokenAt(index, token);
}
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturn(NID_UI_CTRL, pTokenEdit != null, String(), E_UNSUPPORTED_OPERATION,
- "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
return pTokenEdit->GetTokenAt(index);
}
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturn(NID_UI_CTRL, pTokenEdit != null, -1, E_UNSUPPORTED_OPERATION,
- "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
return pTokenEdit->GetTokenCount();
}
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturn(NID_UI_CTRL, pTokenEdit != null, -1, E_UNSUPPORTED_OPERATION,
- "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
return pTokenEdit->GetSelectedTokenIndex();
}
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturn(NID_UI_CTRL, pTokenEdit != null, false, E_UNSUPPORTED_OPERATION,
- "[E_UNSUPPORTED_OPERATION] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
Variant var = pTokenEdit->GetPropertyTokenEditModeEnabled();
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION,
- "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.");
return pTokenEdit->RemoveTokenAt(index);
}
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION,
- "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.");
return pTokenEdit->SetTokenSelected(index, selected);
}
_TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea);
SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION,
- "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL does not support this operation.");
+ "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.");
Variant var(enable);
return pTokenEdit->SetPropertyTokenEditModeEnabled(var);
, __pClosedImage(null)
, __pEffectClosedImage(null)
, __pEffectOpenedImage(null)
+ , __pOpenedDisabledImage(null)
+ , __pClosedDisabledImage(null)
+ , __pOpenedPressedImage(null)
+ , __pClosedPressedImage(null)
, __pItemProvider(null)
, __directDelete(false)
, __groupExpandStateList(DeleteExpandStateFlag)
_ExpandableListImpl::LoadArrowBitmap(void)
{
result r = E_SUCCESS;
- Bitmap* pTempBitmap = null;
Color normalColor;
Color disabledColor;
Color pressedColor;
GET_COLOR_CONFIG(LIST::EXPANDABLE_ARROW_DISABLED, disabledColor);
GET_COLOR_CONFIG(LIST::EXPANDABLE_ARROW_PRESSED, pressedColor);
- r = GET_BITMAP_CONFIG_N(LIST::BUTTON_COLLAPSE_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
- SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Failed to fetch Arrow Bitmap");
- __pOpenedImage = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), normalColor);
- __pOpenedDisabledImage = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), disabledColor);
- __pOpenedPressedImage = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), pressedColor);
+ r = GET_REPLACED_BITMAP_CONFIG_N(LIST::BUTTON_COLLAPSE_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, normalColor, __pOpenedImage);
+ SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating. Failed to fetch Arrow Bitmap.", GetErrorMessage(r));
- delete pTempBitmap;
- pTempBitmap = null;
+ r = GET_REPLACED_BITMAP_CONFIG_N(LIST::BUTTON_COLLAPSE_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, disabledColor, __pOpenedDisabledImage);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Disabled Arrow Bitmap.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(LIST::BUTTON_EXPAND_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
- SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Failed to fetch Arrow Bitmap");
- __pClosedImage = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), normalColor);
- __pClosedDisabledImage = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), disabledColor);
- __pClosedPressedImage = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), pressedColor);
+ r = GET_REPLACED_BITMAP_CONFIG_N(LIST::BUTTON_COLLAPSE_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, pressedColor, __pOpenedPressedImage);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Pressed Arrow Bitmap.", GetErrorMessage(r));
- delete pTempBitmap;
- pTempBitmap = null;
+ r = GET_REPLACED_BITMAP_CONFIG_N(LIST::BUTTON_EXPAND_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, normalColor, __pClosedImage);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Arrow Bitmap.", GetErrorMessage(r));
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(LIST::BUTTON_EXPAND_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, disabledColor, __pClosedDisabledImage);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Disabled Arrow Bitmap.", GetErrorMessage(r));
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(LIST::BUTTON_EXPAND_GROUP, BITMAP_PIXEL_FORMAT_ARGB8888, pressedColor, __pClosedPressedImage);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Pressed Arrow Bitmap.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(LIST::BUTTON_EXPAND_CLOSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pEffectOpenedImage);
- SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Failed to fetch Arrow effect Bitmap");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Arrow effect Bitmap.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(LIST::BUTTON_EXPAND_OPENED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pEffectClosedImage);
- SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Failed to fetch Arrow effect Bitmap");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to fetch Arrow effect Bitmap.", GetErrorMessage(r));
return r;
+
+CATCH:
+ delete __pOpenedImage;
+ __pOpenedImage = null;
+
+ delete __pOpenedDisabledImage;
+ __pOpenedDisabledImage = null;
+
+ delete __pOpenedPressedImage;
+ __pOpenedPressedImage = null;
+
+ delete __pClosedImage;
+ __pClosedImage = null;
+
+ delete __pClosedDisabledImage;
+ __pClosedDisabledImage = null;
+
+ delete __pClosedPressedImage;
+ __pClosedPressedImage = null;
+
+ delete __pEffectOpenedImage;
+ __pEffectOpenedImage = null;
+
+ delete __pEffectClosedImage;
+ __pEffectClosedImage = null;
+
+ return r;
}
result
item.__pCustomListItemImpl->itemId = itemId;
- Boolean* pIsExpanded = new Boolean(false);
+ Boolean* pIsExpanded = new (std::nothrow) Boolean(false);
SysTryReturn(NID_UI_CTRL, pIsExpanded, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__groupExpandStateList.InsertAt(*pIsExpanded, mainIndex);
{
SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d", mainIndex);
- Boolean* pIsExpanded = new Boolean(expand);
+ Boolean* pIsExpanded = new (std::nothrow) Boolean(expand);
SysTryReturn(NID_UI_CTRL, pIsExpanded, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__groupExpandStateList.SetAt(*pIsExpanded, mainIndex, true);
_ExpandableListImpl::ProcessItemStateChange(int mainIndex, int subIndex, ItemStatus itemStatus)
{
int itemId = -1;
- if (subIndex == -1 )
+ if (subIndex == -1)
{
itemId = GetItemIdAt(mainIndex);
}
ClearLastResult();
_FastScroll* pFastScroll = new (std::nothrow) _FastScroll();
- SysTryReturn(NID_UI_CTRL, pFastScroll, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pFastScroll, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pFastScroll->Construct(parentCtrl, enableFadeEffect);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
_FastScroll::Construct(Tizen::Ui::_Control& parentCtrl, bool enableFadeEffect)
{
_FastScrollPresenter* pPresenter = _FastScrollPresenter::CreateFastScrollPresenterN(parentCtrl, *this, enableFadeEffect);
- SysTryReturnResult(NID_UI_CTRL, pPresenter, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnResult(NID_UI_CTRL, pPresenter, GetLastResult(), "Propagating.");
SetPresenter(*pPresenter);
{
// cast to IFastScrollListener
IFastScrollListener* pFastScrollListener = dynamic_cast <IFastScrollListener*>(&listener);
- SysTryReturnVoidResult(NID_UI, pFastScrollListener, E_INVALID_ARG, "[E_INVALID_ARG] Listener type is invalid.");
+ SysTryReturnVoidResult(NID_UI, pFastScrollListener, E_INVALID_ARG, "[%s] Invalid argument is used. Listener type is invalid.", GetErrorMessage(E_INVALID_ARG));
// cast to __FastScrollEventArg
_FastScrollEventArg* pArg = (_FastScrollEventArg*) const_cast <IEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[E_INVALID_ARG] Event argument type is invalid.");
+ SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[%s] Invalid argument is used. Event argument type is invalid.", GetErrorMessage(E_INVALID_ARG));
Tizen::Base::String index = pArg->GetIndex();
pFastScrollListener->OnFastScrollIndexSelected(*pArg->GetSource(), index);
#include <FGrp_BitmapImpl.h>
#include "FUiCtrl_FastScrollIndex.h"
+using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
namespace
{
_FastScrollIndex::CreateFastScrollIndexN(void)
{
_FastScrollIndex* pIndex = new (std::nothrow) _FastScrollIndex();
- SysTryReturn(NID_UI_CTRL, pIndex, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pIndex, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pIndex->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
result
-_FastScrollIndex::SetIndexText(Tizen::Base::String* pText)
+_FastScrollIndex::SetIndexText(String* pText)
{
delete __pText;
__pText = null;
if (pText)
{
- __pText = new (std::nothrow) Tizen::Base::String(*pText);
+ __pText = new (std::nothrow) String(*pText);
SysTryReturnResult(NID_UI_CTRL, __pText, E_OUT_OF_MEMORY, "Memory allocation failed.");
}
return E_SUCCESS;
}
-Tizen::Base::String*
+String*
_FastScrollIndex::GetIndexText(void) const
{
return __pText;
}
result
-_FastScrollIndex::SetIndexImage(Tizen::Graphics::Bitmap* pImage)
+_FastScrollIndex::SetIndexImage(Bitmap* pImage)
{
delete __pImage;
__pImage = null;
if (pImage)
{
- __pImage = Tizen::Graphics::_BitmapImpl::CloneN(*pImage);
+ __pImage = _BitmapImpl::CloneN(*pImage);
}
// send the action to _IFastScrollIndexObserver
return E_SUCCESS;
}
-Tizen::Graphics::Bitmap*
+Bitmap*
_FastScrollIndex::GetIndexImage(void) const
{
return __pImage;
int i = 0;
int j = 0;
result r = E_SUCCESS;
- Tizen::Base::String omissionText(L".");
+ String omissionText(L".");
if ((indexCountMax > indexCountMin) && (indexCountMax % 2) == 0)
{
}
_FastScrollIndex*
-_FastScrollIndex::AddChildIndex(Tizen::Base::String* pText, Tizen::Graphics::Bitmap* pImage, ArrayList* pIndexList)
+_FastScrollIndex::AddChildIndex(String* pText, Bitmap* pImage, ArrayList* pIndexList)
{
_FastScrollIndex* pNewIndex = _FastScrollIndex::CreateFastScrollIndexN();
SysTryReturn(NID_UI_CTRL, pNewIndex, null, GetLastResult(),
}
_FastScrollIndex*
-_FastScrollIndex::AddChildIndex(int childOrder, Tizen::Base::String* pText, Tizen::Graphics::Bitmap* pImage, ArrayList* pIndexList)
+_FastScrollIndex::AddChildIndex(int childOrder, String* pText, Bitmap* pImage, ArrayList* pIndexList)
{
_FastScrollIndex* pNewIndex = _FastScrollIndex::CreateFastScrollIndexN();
SysTryReturn(NID_UI_CTRL, pNewIndex, null, GetLastResult(),
_FastScrollIndex*
_FastScrollIndex::AddChildIndex(int childOrder, _FastScrollIndex* pChildIndex, ArrayList* pIndexList)
{
- SysTryReturn(NID_UI_CTRL, pChildIndex, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. pChildIndex is null.");
+ SysTryReturn(NID_UI_CTRL, pChildIndex, null, E_INVALID_ARG, "[%s] Invalid argument is used. pChildIndex is null.", GetErrorMessage(E_INVALID_ARG));
ArrayList* pList = null;
if (pIndexList)
if (__pChildIndexList == null)
{
__pChildIndexList = new (std::nothrow) ArrayList();
- SysTryReturn(NID_UI_CTRL, __pChildIndexList, null, E_OUT_OF_MEMORY, "Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, __pChildIndexList, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
}
pList = __pChildIndexList;
}
SysTryReturnVoidResult(NID_UI_CTRL, pChildIndex, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument is used. pChildIndex is null.");
+ "[%s] Invalid argument is used. pChildIndex is null.", GetErrorMessage(E_INVALID_ARG));
SysTryReturnVoidResult(NID_UI_CTRL, __pChildIndexList, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument is used. pChildIndexList is null.");
+ "[%s] Invalid argument is used. pChildIndexList is null.", GetErrorMessage(E_INVALID_ARG));
__pChildIndexList->InsertAt(*pChildIndex, GetChildCount());
}
{
result r = E_SUCCESS;
- Tizen::Base::String* indexText = null;
+ String* pIndexText = null;
- wchar_t* pTempChar = new (std::nothrow) wchar_t[textLenth+1];
+ wchar_t* pTempChar = new (std::nothrow) wchar_t[textLenth + 1];
SysTryReturnResult(NID_UI_CTRL, pTempChar, E_OUT_OF_MEMORY, "Memory allocation failed.");
int i = 0;
if (pFirstIndexList == null)
{
pFirstIndexList = new (std::nothrow) ArrayList();
- SysTryCatch(NID_UI_CTRL, pFirstIndexList, , E_OUT_OF_MEMORY, "Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, pFirstIndexList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
SetCurrentIndexList(pFirstIndexList);
}
pChildIndexList = pFirstIndexList;
{
for (j = 0; j < textLenth; j++)
{
- pTempChar[j] = pTextIndexArray[(i*textLenth)+j];
+ pTempChar[j] = pTextIndexArray[(i * textLenth) + j];
}
pTempChar[j] = 0;
- indexText = new (std::nothrow) Tizen::Base::String(pTempChar);
- SysTryCatch(NID_UI_CTRL, indexText, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- if (indexText->Equals(Tizen::Base::String(_DELIMITER)))
+ pIndexText = new (std::nothrow) String(pTempChar);
+ SysTryCatch(NID_UI_CTRL, pIndexText, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ if (pIndexText->Equals(String(_DELIMITER)))
{
- delete indexText;
- indexText = null;
+ delete pIndexText;
+ pIndexText = null;
pFormerList = pChildIndexList;
_FastScrollIndex* pFormerIndex = null;
pChildIndexList = new (std::nothrow) ArrayList();
- SysTryCatchLabel(NID_UI_CTRL, pChildIndexList, , CATCH1, E_OUT_OF_MEMORY, "Memory allocation failed.");
+ SysTryCatchLabel(NID_UI_CTRL, pChildIndexList, , CATCH1, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
k = 0;
pFormerIndex = GetChildIndex(GetChildCount(pFormerList) - 1, pFormerList);
continue;
}
- pIndex = AddChildIndex(k, indexText, null, pChildIndexList);
+ pIndex = AddChildIndex(k, pIndexText, null, pChildIndexList);
SysTryCatch(NID_UI_CTRL, pIndex, , GetLastResult(), "[%s] Failed to add child index.", GetErrorMessage(GetLastResult()));
if (k == 0 && pFormerList)
}
k++;
- delete indexText;
- indexText = null;
+ delete pIndexText;
+ pIndexText = null;
}
if (pChildIndexList)
pChildIndexList = null;
CATCH:
- delete indexText;
- indexText = null;
+ delete pIndexText;
+ pIndexText = null;
delete[] pTempChar;
return r;
_FastScrollModel::CreateFastScrollModelN(void)
{
_FastScrollModel* pModel = new (std::nothrow) _FastScrollModel();
- SysTryReturn(NID_UI_CTRL, pModel, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pModel, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pModel->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
_FastScrollViewConfig::CreateFastScrollViewConfigN(_ControlOrientation orientation)
{
_FastScrollViewConfig* pConfig = new (std::nothrow) _FastScrollViewConfig();
- SysTryReturn(NID_UI_CTRL, pConfig, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pConfig, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pConfig->Construct(orientation);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
// release allocated resources.
ReleaseResources();
+ // load color configuration
+ r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_BG_NORMAL, __indexBgColor);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
+
+ r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_LINE_NORMAL, __indexLineColor);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
+
+ r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_LINE_PRESSED, __indexSelectedLineColor);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
+
+ r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_TEXT_NORMAL, __indexTextColor);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
+
+ r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_DIVIDER_NORMAL, __indexDividerColor);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
+
+ r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_BG_PRESSED, __selectedIndexBgColor);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
+
+ r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_TEXT_PRESSED, __selectedIndexTextColor);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
+
+ r = GET_COLOR_CONFIG(FASTSCROLL::POPUP_BG_NORMAL, __popupBgColor);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
+
+ r = GET_COLOR_CONFIG(FASTSCROLL::POPUP_TEXT_NORMAL, __popupTextColor);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
+
// load bitmap resources
- r = GET_BITMAP_CONFIG_N(FASTSCROLL::INDEX_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pIndexBgBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to load image.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(FASTSCROLL::INDEX_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __indexBgColor,__pIndexBgBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
- r = GET_BITMAP_CONFIG_N(FASTSCROLL::INDEX_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pSelectedIndexBgBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to load image.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(FASTSCROLL::INDEX_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __selectedIndexBgColor,__pSelectedIndexBgBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
- r = GET_BITMAP_CONFIG_N(FASTSCROLL::INDEX_LINE_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pSelectedIndexlineBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to load image.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(FASTSCROLL::INDEX_LINE_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __indexSelectedLineColor,__pSelectedIndexlineBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
- r = GET_BITMAP_CONFIG_N(FASTSCROLL::POPUP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pPopupBgBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to load image.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(FASTSCROLL::POPUP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __popupBgColor,__pPopupBgBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(FASTSCROLL::POPUP_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pPopupBgEffectBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
// load shape configuration
r = GET_SHAPE_CONFIG(FASTSCROLL::INDEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __indexSizeMin.width);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(FASTSCROLL::INDEX_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __indexSizeMin.height);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
+
+ __indexSizeMin = CoordinateSystem::AlignToDevice(__indexSizeMin);
r = GET_SHAPE_CONFIG(FASTSCROLL::INDEX_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __indexMarginTop);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(FASTSCROLL::INDEX_LEFT_LINE_THICKNESS, _CONTROL_ORIENTATION_PORTRAIT, __indexLeftLineThickness);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(FASTSCROLL::INDEX_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __indexTextSize);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_FIXED_VALUE_CONFIG(FASTSCROLL::INDEX_SEPARATOR_THICKNESS, _CONTROL_ORIENTATION_PORTRAIT, __indexSeparatorThickness);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(FASTSCROLL::INDEX_SEPARATOR_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __indexSeparatorWidth);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(FASTSCROLL::SELECTED_INDEX_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __selectedIndexMarginRight);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(FASTSCROLL::SELECTED_INDEX_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __selectedIndexHeight);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(FASTSCROLL::POPUP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __popupSize.width);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(FASTSCROLL::POPUP_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __popupSize.height);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(FASTSCROLL::POPUP_WIDTH_INCREMENT, _CONTROL_ORIENTATION_PORTRAIT, __popupWidthIncrement);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(FASTSCROLL::POPUP_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __popupTextSize);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(FASTSCROLL::POPUP_RIGHT_SHADOW, _CONTROL_ORIENTATION_PORTRAIT, __popupShadowRight);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(FASTSCROLL::POPUP_BOTTOM_SHADOW, _CONTROL_ORIENTATION_PORTRAIT, __popupShadowBottom);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
-
-
- // load color configuration
- r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_BG_NORMAL, __indexBgColor);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
-
- r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_LINE_NORMAL, __indexLineColor);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
-
- r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_LINE_PRESSED, __indexSelectedLineColor);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
-
- r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_TEXT_NORMAL, __indexTextColor);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
-
- r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_DIVIDER_NORMAL, __indexDividerColor);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
-
- r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_BG_PRESSED, __selectedIndexBgColor);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
-
- r = GET_COLOR_CONFIG(FASTSCROLL::INDEX_TEXT_PRESSED, __selectedIndexTextColor);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
-
- r = GET_COLOR_CONFIG(FASTSCROLL::POPUP_BG_NORMAL, __popupBgColor);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
-
- r = GET_COLOR_CONFIG(FASTSCROLL::POPUP_TEXT_NORMAL, __popupTextColor);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
return E_SUCCESS;
_FastScrollIndexView::CreateFastScrollIndexViewN(_VisualElement& parentVe, _FastScrollViewConfig& viewConfig)
{
_FastScrollIndexView* pIndexView = new (std::nothrow) _FastScrollIndexView(parentVe, viewConfig);
- SysTryReturn(NID_UI_CTRL, pIndexView, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pIndexView, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pIndexView->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
_FastScrollIndex*
_FastScrollIndexView::GetIndexAtPoint(const FloatPoint& point) const
{
- SysTryReturn(NID_UI_CTRL, __pBaseIndex, null, E_INVALID_STATE, "[E_INVALID_STATE] __pBaseIndex must not be null.");
+ SysTryReturn(NID_UI_CTRL, __pBaseIndex, null, E_INVALID_STATE, "[%s] __pBaseIndex must not be null.", GetErrorMessage(E_INVALID_STATE));
int childCount = __pBaseIndex->GetChildCount(__pBaseIndex->GetIndexType());
- SysTryReturn(NID_UI_CTRL, childCount > 0, null, E_INVALID_STATE, "[E_INVALID_STATE] The index has no children.");
+ SysTryReturn(NID_UI_CTRL, childCount > 0, null, E_INVALID_STATE, "[%s] The index has no children.", GetErrorMessage(E_INVALID_STATE));
_FastScrollIndex* pChildIndex = null;
FloatRectangle bounds = __pBaseIndexVe->GetBounds();
float touchY = point.y - bounds.y - __viewConfig.__indexMarginTop - (pIndex->GetIndexOrder(true) * GetIndexHeight());
int hiddenChildCount = pIndex->GetChildCount();
- SysTryReturn(NID_UI_CTRL, hiddenChildCount > 0, null, E_INVALID_STATE, "[E_INVALID_STATE] Failed to get the hidden index");
+ SysTryReturn(NID_UI_CTRL, hiddenChildCount > 0, null, E_INVALID_STATE, "[%s] Failed to get the hidden index", GetErrorMessage(E_INVALID_STATE));
float indexHeight = GetIndexHeight() /hiddenChildCount;
int omissionIndexOrder = 0;
int
_FastScrollIndexView::GetSelectedIndexOrder(void) const
{
- SysTryReturn(NID_UI_CTRL, __pBaseIndex, -1, E_INVALID_STATE, "[E_INVALID_STATE] __pBaseIndex must not be null.");
- SysTryReturn(NID_UI_CTRL, __pSelectedIndex, -1, E_INVALID_STATE, "[E_INVALID_STATE] __pSelectedIndex must not be null.");
+ SysTryReturn(NID_UI_CTRL, __pBaseIndex, -1, E_INVALID_STATE, "[%s] __pBaseIndex must not be null.", GetErrorMessage(E_INVALID_STATE));
+ SysTryReturn(NID_UI_CTRL, __pSelectedIndex, -1, E_INVALID_STATE, "[%s] __pSelectedIndex must not be null.", GetErrorMessage(E_INVALID_STATE));
return __pBaseIndex->GetChildOrder(__pSelectedIndex, true);
}
bool
_FastScrollIndexView::GetSelectedIndexVisibility(void) const
{
- SysTryReturn(NID_UI_CTRL, __pSelectedIndexVe, false, E_INVALID_STATE, "[E_INVALID_STATE] __pSelectedIndexVe must not be null.");
+ SysTryReturn(NID_UI_CTRL, __pSelectedIndexVe, false, E_INVALID_STATE, "[%s] __pSelectedIndexVe must not be null.", GetErrorMessage(E_INVALID_STATE));
float opacity = __pSelectedIndexVe->GetOpacity();
if (opacity > FASTSCROLL_OPACITY_OFF)
result
_FastScrollIndexView::AddAccessibilityElement(const _AccessibilityContainer& control)
{
- SysTryReturnResult(NID_UI_CTRL, __pBaseIndex, E_INVALID_STATE, "[E_INVALID_STATE] __pBaseIndex must not be null.");
+ SysTryReturnResult(NID_UI_CTRL, __pBaseIndex, E_INVALID_STATE, "_pBaseIndex must not be null.");
int omittedChildCount = __pBaseIndex->GetChildCount(__pBaseIndex->GetIndexType());
SysTryReturnResult(NID_UI_CTRL, omittedChildCount > 0, E_INVALID_STATE, "The index has no children.");
_AccessibilityElement* pAccessibilityElement = null;
result r = E_SUCCESS;
- for (int i = 0; i < omittedChildCount; )
+ for (int i = 0; i < omittedChildCount;)
{
_FastScrollIndex* pChildIndex = __pBaseIndex->GetChildIndex(i, true);
SysTryReturnResult(NID_UI_CTRL, pChildIndex, GetLastResult(), "Failed to get the child index.");
pAccessibilityElement->SetBounds(indexRect);
pAccessibilityElement->SetLabel(*pChildIndexText);
pAccessibilityElement->SetName(L"FastScrollIndex");
- pAccessibilityElement->SetHint(L"double tap to move ," + *pChildIndexText + L", list");
+ pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS");
r = pAccessibilityContainer->AddElement(*pAccessibilityElement);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to add accessibility element.", GetErrorMessage(r));
}
_FastScrollIndexView::CalculateSelectedBg(void)
{
SysTryReturn(NID_UI_CTRL, __pBaseIndex, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), E_INVALID_STATE,
- "[E_INVALID_STATE] __pBaseIndex must not be null.");
+ "[%s] __pBaseIndex must not be null.", GetErrorMessage(E_INVALID_STATE));
SysTryReturn(NID_UI_CTRL, __pSelectedIndexVe, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), E_INVALID_STATE,
- "[E_INVALID_STATE] __pSelectedIndexVe must not be null.");
+ "[%s] __pSelectedIndexVe must not be null.", GetErrorMessage(E_INVALID_STATE));
SysTryReturn(NID_UI_CTRL, __pSelectedIndex, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), E_INVALID_STATE,
- "[E_INVALID_STATE] __pSelectedIndex must not be null.");
+ "[%s] __pSelectedIndex must not be null.", GetErrorMessage(E_INVALID_STATE));
int childCount = __pBaseIndex->GetChildCount(__pBaseIndex->GetIndexType());
- SysTryReturn(NID_UI_CTRL, childCount > 0, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), E_INVALID_STATE, "[E_INVALID_STATE] The index has no children.");
+ SysTryReturn(NID_UI_CTRL, childCount > 0, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), E_INVALID_STATE, "[%s] The index has no children.", GetErrorMessage(E_INVALID_STATE));
FloatRectangle bounds = __pBaseIndexVe->GetBounds();
float indexHeight = GetIndexHeight();
{
return;
}
- SysTryReturnVoidResult(NID_UI_CTRL, __pBaseIndex, E_INVALID_STATE, "[E_INVALID_STATE] __pBaseIndex must not be null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pBaseIndex, E_INVALID_STATE, "[%s] __pBaseIndex must not be null.", GetErrorMessage(E_INVALID_STATE));
result r = E_SUCCESS;
int childCount = __pBaseIndex->GetChildCount(__pBaseIndex->GetIndexType());
- SysTryReturnVoidResult(NID_UI_CTRL, childCount > 0, E_INVALID_STATE, "[E_INVALID_STATE] The index has no children.");
+ SysTryReturnVoidResult(NID_UI_CTRL, childCount > 0, E_INVALID_STATE, "[%s] The index has no children.", GetErrorMessage(E_INVALID_STATE));
Canvas* pCanvas = __pBaseIndexVe->GetCanvasN();
SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of the index ve.",
FloatRectangle bgBounds(0.0f, 0.0f, bounds.width, bounds.height);
if (__viewConfig.__pIndexBgBitmap)
{
- Bitmap* pReplacementColorBackgroundBitmap =
- _BitmapImpl::GetColorReplacedBitmapN(*__viewConfig.__pIndexBgBitmap,
- Color::GetColor(COLOR_ID_MAGENTA), __viewConfig.__indexBgColor);
- DrawBitmap(*pCanvas, bgBounds, *pReplacementColorBackgroundBitmap);
-
- delete pReplacementColorBackgroundBitmap;
+ DrawBitmap(*pCanvas, bgBounds, *__viewConfig.__pIndexBgBitmap);
}
pCanvas->DrawLine(FloatPoint(1.0f, 0.0f), FloatPoint(1.0f, bounds.height));
float separatorX = indexRect.x + ((indexRect.width - __viewConfig.__indexSeparatorWidth)/2.0f);
TextObject* pTextObject = new (std::nothrow) TextObject();
- SysTryCatch(NID_UI_CTRL, pTextObject, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, pTextObject, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pTextObject->Construct();
else
{
String* pChildIndexText = pChildIndex->GetIndexText();
- SysTryCatch(NID_UI_CTRL, pChildIndexText, , E_INVALID_STATE, "pChildIndexText must not be null.");
+ SysTryCatch(NID_UI_CTRL, pChildIndexText, , E_INVALID_STATE, "[%s] pChildIndexText must not be null.", GetErrorMessage(E_INVALID_STATE));
pTextObject->RemoveAll();
pSimpleText = new (std::nothrow)TextSimple(const_cast<wchar_t*>(pChildIndexText->GetPointer()), pChildIndexText->GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
- SysTryCatch(NID_UI_CTRL, pSimpleText, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed");
+ SysTryCatch(NID_UI_CTRL, pSimpleText, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pTextObject->AppendElement(*pSimpleText);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to append simple text.", GetErrorMessage(r));
}
SysTryReturnVoidResult(NID_UI_CTRL, __pSelectedIndex, E_INVALID_STATE,
- "[E_INVALID_STATE] __pSelectedIndex must not be null.");
+ "[%s] __pSelectedIndex must not be null.", GetErrorMessage(E_INVALID_STATE));
Canvas* pCanvas = __pSelectedBgVe->GetCanvasN();
SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of the Selected Bg ve.",
if (__viewConfig.__pSelectedIndexBgBitmap)
{
- Bitmap* pReplacementColorBackgroundBitmap = null;
- pReplacementColorBackgroundBitmap =
- _BitmapImpl::GetColorReplacedBitmapN(*__viewConfig.__pSelectedIndexBgBitmap,
- Color::GetColor(COLOR_ID_MAGENTA), __viewConfig.__selectedIndexBgColor);
- DrawBitmap(*pCanvas, bounds, *pReplacementColorBackgroundBitmap);
-
- delete pReplacementColorBackgroundBitmap;
+ DrawBitmap(*pCanvas, bounds, *__viewConfig.__pSelectedIndexBgBitmap);
}
delete pCanvas;
return;
}
- SysTryReturnVoidResult(NID_UI_CTRL, __pSelectedIndex, E_INVALID_STATE, "[E_INVALID_STATE] __pSelectedIndex must not be null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pSelectedIndex, E_INVALID_STATE, "[%s] __pSelectedIndex must not be null.", GetErrorMessage(E_INVALID_STATE));
Canvas* pCanvas = __pSelectedIndexVe->GetCanvasN();
SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of the selected index ve.",
if (__viewConfig.__pSelectedIndexlineBitmap)
{
- Bitmap* pReplacementColorBackgroundBitmap = null;
- pReplacementColorBackgroundBitmap =
- _BitmapImpl::GetColorReplacedBitmapN(*__viewConfig.__pSelectedIndexlineBitmap,
- Color::GetColor(COLOR_ID_MAGENTA), __viewConfig.__indexSelectedLineColor);
- DrawBitmap(*pCanvas, outlineBounds, *pReplacementColorBackgroundBitmap);
-
- delete pReplacementColorBackgroundBitmap;
+ DrawBitmap(*pCanvas, outlineBounds, *__viewConfig.__pSelectedIndexlineBitmap);
pCanvas->DrawLine(FloatPoint(1.0f, 0.0f), FloatPoint(1.0f, outlineBounds.y));
pCanvas->DrawLine(FloatPoint(1.0f, (outlineBounds.y + outlineBounds.height)), FloatPoint(1.0f, bounds.height));
else
{
String* pChildIndexText = __pSelectedIndex->GetIndexText();
- SysTryCatch(NID_UI_CTRL, pChildIndexText, , E_INVALID_STATE, "[E_INVALID_STATE] pChildIndexText must not be null.");
+ SysTryCatch(NID_UI_CTRL, pChildIndexText, , E_INVALID_STATE, "[%s] pChildIndexText must not be null.", GetErrorMessage(E_INVALID_STATE));
pTextObject = new (std::nothrow) TextObject();
- SysTryCatch(NID_UI_CTRL, pTextObject, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, pTextObject, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pTextObject->Construct();
pSimpleText = new (std::nothrow)TextSimple(const_cast<wchar_t*>(pChildIndexText->GetPointer()), pChildIndexText->GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
- SysTryCatch(NID_UI_CTRL, pSimpleText, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, pSimpleText, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pTextObject->AppendElement(*pSimpleText);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to append simpletext.", GetErrorMessage(r));
// FormattedText for Title text
__pBaseIndexVe = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, __pBaseIndexVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pBaseIndexVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pBaseIndexVe->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct the index Ve.", GetErrorMessage(r));
//__pSelectedBgVe
__pSelectedBgVe = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, __pSelectedBgVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pSelectedBgVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pSelectedBgVe->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct the selected Bg ve.", GetErrorMessage(r));
//__pSelectedIndexVe
__pSelectedIndexVe = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, __pSelectedIndexVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pSelectedIndexVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pSelectedIndexVe->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct the selected index ve.", GetErrorMessage(r));
_FastScrollPopupView::CreateFastScrollPopupViewN(_VisualElement& parentVe, _FastScrollViewConfig& viewConfig)
{
_FastScrollPopupView* pPopupView = new (std::nothrow) _FastScrollPopupView(parentVe, viewConfig);
- SysTryReturn(NID_UI_CTRL, pPopupView, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pPopupView, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pPopupView->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
{
result r = E_SUCCESS;
_VisualElement* pPopupIndexVe = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, pPopupIndexVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, pPopupIndexVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pPopupIndexVe->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct the popup index ve.", GetErrorMessage(r));
void
_FastScrollPopupView::RemoveAllAnimations(void)
{
- SysTryReturnVoidResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "[E_INVALID_STATE] __pPopupVe must not be null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "[%s] __pPopupVe must not be null.", GetErrorMessage(E_INVALID_STATE));
__pPopupVe->RemoveAllAnimations();
}
bool
_FastScrollPopupView::GetPopupVisibility(void) const
{
- SysTryReturn(NID_UI_CTRL, __pPopupVe, false, E_INVALID_STATE, "[E_INVALID_STATE] __pPopupVe must not be null.");
+ SysTryReturn(NID_UI_CTRL, __pPopupVe, false, E_INVALID_STATE, "[%s] __pPopupVe must not be null.", GetErrorMessage(E_INVALID_STATE));
float opacity = __pPopupVe->GetOpacity();
if (opacity > FASTSCROLL_OPACITY_OFF)
void
_FastScrollPopupView::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool completedNormally)
{
- SysTryReturnVoidResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "[E_INVALID_STATE] The popup Ve must not be null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "[%s] The popup Ve must not be null.", GetErrorMessage(E_INVALID_STATE));
if (__pPopupVe == (static_cast <_VisualElement*>(&target)))
{
if (__needDestroySelf && completedNormally)
return;
}
- SysTryReturnVoidResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "[E_INVALID_STATE] __pPopupVe must not be null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "[%s] __pPopupVe must not be null.", GetErrorMessage(E_INVALID_STATE));
Canvas* pCanvas = __pPopupVe->GetCanvasN();
SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of the popup ve.",
if (__viewConfig.__pPopupBgBitmap)
{
- Bitmap* pReplacementColorBackgroundBitmap = null;
- pReplacementColorBackgroundBitmap =
- _BitmapImpl::GetColorReplacedBitmapN(*__viewConfig.__pPopupBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), __viewConfig.__popupBgColor);
- DrawBitmap(*pCanvas, bounds, *pReplacementColorBackgroundBitmap);
-
- delete pReplacementColorBackgroundBitmap;
+ DrawBitmap(*pCanvas, bounds, *__viewConfig.__pPopupBgBitmap);
}
delete pCanvas;
return;
}
- SysTryReturnVoidResult(NID_UI_CTRL, pBaseIndex, E_INVALID_STATE, "[E_INVALID_STATE] pBaseIndex must not be null.");
- SysTryReturnVoidResult(NID_UI_CTRL, pSelectedIndex, E_INVALID_STATE, "[E_INVALID_STATE] pBaseIndex must not be null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pBaseIndex, E_INVALID_STATE, "[%s] pBaseIndex must not be null.", GetErrorMessage(E_INVALID_STATE));
+ SysTryReturnVoidResult(NID_UI_CTRL, pSelectedIndex, E_INVALID_STATE, "[%s] pBaseIndex must not be null.", GetErrorMessage(E_INVALID_STATE));
result r = E_SUCCESS;
int childCount = pBaseIndex->GetChildCount();
- SysTryReturnVoidResult(NID_UI_CTRL, childCount > 0, E_INVALID_STATE, "[E_INVALID_STATE] The index has no children.");
+ SysTryReturnVoidResult(NID_UI_CTRL, childCount > 0, E_INVALID_STATE, "[%s] The index has no children.", GetErrorMessage(E_INVALID_STATE));
_VisualElement* pIndexVe = GetIndexVe(indexLevel);
SysTryReturnVoidResult(NID_UI_CTRL, pIndexVe, GetLastResult(), "[%s] Failed to get the popup index ve.",
Bitmap* pReplacementColorBitmap = null;
TextObject* pTextObject = new (std::nothrow) TextObject();
- SysTryCatch(NID_UI_CTRL, pTextObject, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, pTextObject, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pTextObject->Construct();
else
{
String* pChildIndexText = pChildIndex->GetIndexText();
- SysTryCatch(NID_UI_CTRL, pChildIndexText, , E_INVALID_STATE, "[E_INVALID_STATE] pChildIndexText must not be null.");
+ SysTryCatch(NID_UI_CTRL, pChildIndexText, , E_INVALID_STATE, "[%s] pChildIndexText must not be null.", GetErrorMessage(E_INVALID_STATE));
pTextObject->RemoveAll();
pSimpleText = new (std::nothrow)TextSimple(const_cast<wchar_t*>(pChildIndexText->GetPointer()), pChildIndexText->GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
- SysTryCatch(NID_UI_CTRL, pSimpleText, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, pSimpleText, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pTextObject->AppendElement(*pSimpleText);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to append simple text.", GetErrorMessage(r));
result r = E_SUCCESS;
__pPopupVe = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, __pPopupVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pPopupVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pPopupVe->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct the popup ve.", GetErrorMessage(r));
_FastScrollPresenter::CreateFastScrollPresenterN(_Control& parentCtrl, _FastScroll& fastScroll, bool enableFadeEffect, bool visibility)
{
_FastScrollPresenter* pPresenter = new (std::nothrow) _FastScrollPresenter(parentCtrl, fastScroll, enableFadeEffect, visibility);
- SysTryReturn(NID_UI_CTRL, pPresenter, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pPresenter, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pPresenter->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
{
__pFastScrollEvent = new (std::nothrow) _UiFastScrollEvent();
SysTryReturnVoidResult(NID_UI_CTRL, __pFastScrollEvent, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pFastScrollEvent->Construct(__fastScroll);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
{
result r = E_SUCCESS;
- SysTryReturnVoidResult(NID_UI_CTRL, __pFastScrollEvent, E_INVALID_STATE, "[E_INVALID_STATE] __pFastScrollEvent must not be null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pFastScrollEvent, E_INVALID_STATE, "[%s] __pFastScrollEvent must not be null.", GetErrorMessage(E_INVALID_STATE));
r = __pFastScrollEvent->RemoveListener(listener);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement, E_OUT_OF_MEMORY, "Memory allocation failed.");
pAccessibilityElement->SetBounds(pIndexView->GetIndexBounds());
- pAccessibilityElement->SetTrait(L"Fast scroll bar");
+ pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_FAST_SCROLL_BAR_T_TTS");
pAccessibilityElement->SetName(L"FastScroll");
pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_ENABLE_FAST_SCROLLING_T_TTS");
r = pAccessibilityContainer->AddElement(*pAccessibilityElement);
_FastScrollIndex* pSelectedIndex = pIndexView->GetSelectedIndex();
if (pSelectedIndex && pSelectedIndex->GetOmitted())
{
- pIndexView->SetSelectedIndex(null);
+ DeselectIndexViews();
}
r = pIndex->RemoveOmissionChildren(false);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to remove omission index view", GetErrorMessage(r));
_FastScrollIndex* pSelectedIndex = null;
int selectedIndexLevel = 0;
int indexViewCount = GetIndexViewCount();
- SysTryReturn(NID_UI_CTRL, indexViewCount > 0, null, E_INVALID_STATE, "[E_INVALID_STATE] The root index view is invalid state.");
+ SysTryReturn(NID_UI_CTRL, indexViewCount > 0, null, E_INVALID_STATE, "[%s] The root index view is in invalid state.", GetErrorMessage(E_INVALID_STATE));
// search the hit index on index views, then fade out other index views
for (int i = 0; i < indexViewCount; i++)
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds of the popup index ve.");
_FastScrollIndex* pFormerIndex = null;
- if ( i == __focusedIndexLevel )
+ if (i == __focusedIndexLevel)
{
pFormerIndex = pIndexView->GetFormerIndex();
r = __pPopupView->SelectIndex(i, &popupIndex, pFormerIndex);
{
result r = E_SUCCESS;
- _FastScrollIndexView* pNewIndexView = _FastScrollIndexView::CreateFastScrollIndexViewN( *__pCtrlVe, *__pViewConfig);
+ _FastScrollIndexView* pNewIndexView = _FastScrollIndexView::CreateFastScrollIndexViewN(*__pCtrlVe, *__pViewConfig);
SysTryReturnResult(NID_UI_CTRL, pNewIndexView, GetLastResult(), "Propagating.");
r = __fastScroll.SetBounds(CalculateFastScrollBounds(GetIndexViewCount() + 1));
result
_FooterImpl::AddItem(const FooterItem& item)
{
- SysTryReturnResult(NID_UI_CTRL, (__style >= FOOTER_STYLE_BUTTON_TEXT && __style <= FOOTER_MAX_STATE_COUNT),
- E_INVALID_OPERATION, "[E_INVALID_OPERATION] Current Footer style doesn't support this operation.");
-
- SysTryReturnResult(NID_UI_CTRL, (item.GetActionId() <= FOOTER_ITEM_ACTION_ID_MAX && item.GetActionId() >= FOOTER_ACTION_ID_MIN),
- E_INVALID_ARG, "[E_INVALID_ARG] The item isn't constructed.");
-
result r = CheckItemValidate(item);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- if (IsFailed(r))
- {
- return r;
- }
+ r = CheckItemExceed(item);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ SysTryReturnResult(NID_UI_CTRL, (__style >= FOOTER_STYLE_BUTTON_TEXT && __style <= FOOTER_MAX_STATE_COUNT),
+ E_INVALID_OPERATION, "[E_INVALID_OPERATION] Current Footer style doesn't support this operation.");
_Button* pButton = ConvertFooterItem(item);
_FooterImpl::InsertItemAt(int itemIndex, const FooterItem& item)
{
result r = CheckItemValidate(item);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- if (IsFailed(r))
- {
- return r;
- }
+ r = CheckItemExceed(item);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
int count = GetItemCount();
result
_FooterImpl::SetButton(ButtonPosition position, const ButtonItem& button)
{
- SysTryReturnResult(NID_UI_CTRL, !(__style == FOOTER_STYLE_TAB || __style == FOOTER_STYLE_TAB_LARGE),
- E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Unable to set the button item because the current style does not support it.");
+ SysTryReturnResult(NID_UI_CTRL, _ButtonItemImpl::GetInstance(button) != null,
+ E_INVALID_ARG, "[E_INVALID_ARG] The ButtonItem isn't constructed.");
- SysTryReturnResult(NID_UI_CTRL, (button.GetActionId() >= FOOTER_ACTION_ID_MIN && button.GetActionId() <= FOOTER_ACTION_ID_MAX),
+ SysTryReturnResult(NID_UI_CTRL, button.GetActionId() >= FOOTER_ACTION_ID_MIN,
E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
+ SysTryReturnResult(NID_UI_CTRL, !(__style == FOOTER_STYLE_TAB || __style == FOOTER_STYLE_TAB_LARGE),
+ E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Unable to set the button item because the current style does not support it.");
+
int count = GetItemCount();
if (__style == FOOTER_STYLE_SEGMENTED_TEXT || __style == FOOTER_STYLE_SEGMENTED_ICON || __style == FOOTER_STYLE_SEGMENTED_ICON_TEXT
result
_FooterImpl::SetItemAt(int itemIndex, const FooterItem& item)
{
- SysTryReturnResult(NID_UI_CTRL, (item.GetActionId() != -1), E_INVALID_ARG, "[E_INVALID_ARG] The FooterItem isn't constructed.");
-
- if (item.GetActionId() < FOOTER_ACTION_ID_MIN || item.GetActionId() > FOOTER_ACTION_ID_MAX)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
- return E_INVALID_ARG;
- }
+ result r = CheckItemValidate(item);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
int count = GetItemCount();
{
result r = E_SUCCESS;
- SysTryReturnResult(NID_UI_CTRL, (item.GetActionId() != -1), E_INVALID_ARG,
- "[E_INVALID_ARG] The FooterItem isn't constructed.");
+ SysTryReturnResult(NID_UI_CTRL, _FooterItemImpl::GetInstance(item) != null,
+ E_INVALID_ARG, "[E_INVALID_ARG] The FooterItem isn't constructed.");
+
+ SysTryReturnResult(NID_UI_CTRL, item.GetActionId() >= FOOTER_ACTION_ID_MIN,
+ E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
+
+ return r;
+}
+
+result
+_FooterImpl::CheckItemExceed(const FooterItem& item)
+{
+ result r = E_SUCCESS;
int count = GetItemCount();
"[E_MAX_EXCEEDED] The number of items have exceeded the maximum limit.");
}
- if (item.GetActionId() < FOOTER_ACTION_ID_MIN || item.GetActionId() > FOOTER_ACTION_ID_MAX)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
- return E_INVALID_ARG;
- }
-
return r;
}
result
_FooterItemImpl::Construct(int actionId)
{
- SysTryReturnResult(NID_UI_CTRL, (actionId >= FOOTER_ITEM_ACTION_ID_MIN && actionId <= FOOTER_ITEM_ACTION_ID_MAX),
+ SysTryReturnResult(NID_UI_CTRL, actionId >= FOOTER_ITEM_ACTION_ID_MIN,
E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
__actionId = actionId;
result
_FooterItemImpl::SetActionId(int actionId)
{
- SysTryReturnResult(NID_UI_CTRL, (actionId >= FOOTER_ITEM_ACTION_ID_MIN && actionId <= FOOTER_ITEM_ACTION_ID_MAX),
+ SysTryReturnResult(NID_UI_CTRL, actionId >= FOOTER_ITEM_ACTION_ID_MIN,
E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
__actionId = actionId;
, __pFormBackEventListener(null)
, __pFormMenuEventListener(null)
, __formStyle(0)
+ , __oldFormStyle(0)
, __pActionEvent(null)
, __pHeader(null)
, __pFooter(null)
{
_Form* pForm = null;
- pForm = new (std::nothrow) _Form;
+ pForm = new (std::nothrow) _Form();
SysTryReturn(NID_UI_CTRL, pForm, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred.");
void
_Form::CreateSoftkey(unsigned long formStyle)
{
- Bitmap* pTempBitmap = null;
FloatDimension softkeyDimension(0.0f, 0.0f);
FloatDimension softkeyDisplayDimension(0.0f, 0.0f);
FloatDimension optionkeyDimension(0.0f, 0.0f);
if (formStyle & FORM_STYLE_SOFTKEY_0)
{
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyNormalBitmap[_SOFTKEY_0])
{
delete __pSoftkeyNormalBitmap[_SOFTKEY_0];
__pSoftkeyNormalBitmap[_SOFTKEY_0] = null;
}
- __pSoftkeyNormalBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pSoftkeyNormalBitmap[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyDisabledBitmap[_SOFTKEY_0])
{
delete __pSoftkeyDisabledBitmap[_SOFTKEY_0];
__pSoftkeyDisabledBitmap[_SOFTKEY_0] = null;
}
- __pSoftkeyDisabledBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledBackgroundColor, __pSoftkeyDisabledBitmap[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyPressedBitmap[_SOFTKEY_0])
{
delete __pSoftkeyPressedBitmap[_SOFTKEY_0];
__pSoftkeyPressedBitmap[_SOFTKEY_0] = null;
}
- __pSoftkeyPressedBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pSoftkeyPressedBitmap[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyHighlightedBitmap[_SOFTKEY_0])
{
delete __pSoftkeyHighlightedBitmap[_SOFTKEY_0];
__pSoftkeyHighlightedBitmap[_SOFTKEY_0] = null;
}
- __pSoftkeyHighlightedBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedBackgroundColor);
- delete pTempBitmap;
-
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedBackgroundColor, __pSoftkeyHighlightedBitmap[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pTextSoftkeyNormalBitmap[_SOFTKEY_0])
{
delete __pTextSoftkeyNormalBitmap[_SOFTKEY_0];
__pTextSoftkeyNormalBitmap[_SOFTKEY_0] = null;
}
- __pTextSoftkeyNormalBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pTextSoftkeyNormalBitmap[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pTextSoftkeyDisabledBitmap[_SOFTKEY_0])
{
delete __pTextSoftkeyDisabledBitmap[_SOFTKEY_0];
__pTextSoftkeyDisabledBitmap[_SOFTKEY_0] = null;
}
- __pTextSoftkeyDisabledBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledBackgroundColor, __pTextSoftkeyDisabledBitmap[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pTextSoftkeyPressedBitmap[_SOFTKEY_0])
{
delete __pTextSoftkeyPressedBitmap[_SOFTKEY_0];
__pTextSoftkeyPressedBitmap[_SOFTKEY_0] = null;
}
- __pTextSoftkeyPressedBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pTextSoftkeyPressedBitmap[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pTextSoftkeyHighlightedBitmap[_SOFTKEY_0])
{
delete __pTextSoftkeyHighlightedBitmap[_SOFTKEY_0];
__pTextSoftkeyHighlightedBitmap[_SOFTKEY_0] = null;
}
- __pTextSoftkeyHighlightedBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedBackgroundColor, __pTextSoftkeyHighlightedBitmap[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyNormalEffectBitmap[_SOFTKEY_0])
{
delete __pSoftkeyNormalEffectBitmap[_SOFTKEY_0];
__pSoftkeyNormalEffectBitmap[_SOFTKEY_0] = null;
}
- __pSoftkeyNormalEffectBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pSoftkeyNormalEffectBitmap[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pTextSoftkeyNormalEffectBitmap[_SOFTKEY_0])
{
delete __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_0];
__pTextSoftkeyNormalEffectBitmap[_SOFTKEY_0] = null;
}
- __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
- delete pTempBitmap;
-
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyPressedEffectBitmap[_SOFTKEY_0])
{
delete __pSoftkeyPressedEffectBitmap[_SOFTKEY_0];
__pSoftkeyPressedEffectBitmap[_SOFTKEY_0] = null;
}
- __pSoftkeyPressedEffectBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pSoftkeyPressedEffectBitmap[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pTextSoftkeyPressedEffectBitmap[_SOFTKEY_0])
{
delete __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_0];
__pTextSoftkeyPressedEffectBitmap[_SOFTKEY_0] = null;
}
- __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_LEFT_TEXT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyNormalIcon[_SOFTKEY_0])
delete __pSoftkeyNormalIcon[_SOFTKEY_0];
__pSoftkeyNormalIcon[_SOFTKEY_0] = null;
}
- __pSoftkeyNormalIcon[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalIconColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalIconColor, __pSoftkeyNormalIcon[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyDisabledIcon[_SOFTKEY_0])
delete __pSoftkeyDisabledIcon[_SOFTKEY_0];
__pSoftkeyDisabledIcon[_SOFTKEY_0] = null;
}
- __pSoftkeyDisabledIcon[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledIconColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledIconColor, __pSoftkeyDisabledIcon[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyPressedIcon[_SOFTKEY_0])
delete __pSoftkeyPressedIcon[_SOFTKEY_0];
__pSoftkeyPressedIcon[_SOFTKEY_0] = null;
}
- __pSoftkeyPressedIcon[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedIconColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedIconColor, __pSoftkeyPressedIcon[_SOFTKEY_0]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyHighlightedIcon[_SOFTKEY_0])
delete __pSoftkeyHighlightedIcon[_SOFTKEY_0];
__pSoftkeyHighlightedIcon[_SOFTKEY_0] = null;
}
- __pSoftkeyHighlightedIcon[_SOFTKEY_0] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedIconColor);
- delete pTempBitmap;
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ADD_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedIconColor, __pSoftkeyHighlightedIcon[_SOFTKEY_0]);
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
_Button* pButton = _Button::CreateButtonN();
if (formStyle & FORM_STYLE_SOFTKEY_1)
{
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyNormalBitmap[_SOFTKEY_1])
{
delete __pSoftkeyNormalBitmap[_SOFTKEY_1];
__pSoftkeyNormalBitmap[_SOFTKEY_1] = null;
}
- __pSoftkeyNormalBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pSoftkeyNormalBitmap[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyDisabledBitmap[_SOFTKEY_1])
{
delete __pSoftkeyDisabledBitmap[_SOFTKEY_1];
__pSoftkeyDisabledBitmap[_SOFTKEY_1] = null;
}
- __pSoftkeyDisabledBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledBackgroundColor, __pSoftkeyDisabledBitmap[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyPressedBitmap[_SOFTKEY_1])
{
delete __pSoftkeyPressedBitmap[_SOFTKEY_1];
__pSoftkeyPressedBitmap[_SOFTKEY_1] = null;
}
- __pSoftkeyPressedBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pSoftkeyPressedBitmap[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyHighlightedBitmap[_SOFTKEY_1])
{
delete __pSoftkeyHighlightedBitmap[_SOFTKEY_1];
__pSoftkeyHighlightedBitmap[_SOFTKEY_1] = null;
}
- __pSoftkeyHighlightedBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedBackgroundColor, __pSoftkeyHighlightedBitmap[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pTextSoftkeyNormalBitmap[_SOFTKEY_1])
{
delete __pTextSoftkeyNormalBitmap[_SOFTKEY_1];
__pTextSoftkeyNormalBitmap[_SOFTKEY_1] = null;
}
- __pTextSoftkeyNormalBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pTextSoftkeyNormalBitmap[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pTextSoftkeyDisabledBitmap[_SOFTKEY_1])
{
delete __pTextSoftkeyDisabledBitmap[_SOFTKEY_1];
__pTextSoftkeyDisabledBitmap[_SOFTKEY_1] = null;
}
- __pTextSoftkeyDisabledBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledBackgroundColor, __pTextSoftkeyDisabledBitmap[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pTextSoftkeyPressedBitmap[_SOFTKEY_1])
{
delete __pTextSoftkeyPressedBitmap[_SOFTKEY_1];
__pTextSoftkeyPressedBitmap[_SOFTKEY_1] = null;
}
- __pTextSoftkeyPressedBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pTextSoftkeyPressedBitmap[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pTextSoftkeyHighlightedBitmap[_SOFTKEY_1])
{
delete __pTextSoftkeyHighlightedBitmap[_SOFTKEY_1];
__pTextSoftkeyHighlightedBitmap[_SOFTKEY_1] = null;
}
- __pTextSoftkeyHighlightedBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedBackgroundColor, __pTextSoftkeyHighlightedBitmap[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyNormalEffectBitmap[_SOFTKEY_1])
{
delete __pSoftkeyNormalEffectBitmap[_SOFTKEY_1];
__pSoftkeyNormalEffectBitmap[_SOFTKEY_1] = null;
}
- __pSoftkeyNormalEffectBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pSoftkeyNormalEffectBitmap[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pTextSoftkeyNormalEffectBitmap[_SOFTKEY_1])
{
delete __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_1];
__pTextSoftkeyNormalEffectBitmap[_SOFTKEY_1] = null;
}
- __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyPressedEffectBitmap[_SOFTKEY_1])
{
delete __pSoftkeyPressedEffectBitmap[_SOFTKEY_1];
__pSoftkeyPressedEffectBitmap[_SOFTKEY_1] = null;
}
- __pSoftkeyPressedEffectBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pSoftkeyPressedEffectBitmap[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pTextSoftkeyPressedEffectBitmap[_SOFTKEY_1])
{
delete __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_1];
__pTextSoftkeyPressedEffectBitmap[_SOFTKEY_1] = null;
}
- __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor);
- delete pTempBitmap;
-
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_RIGHT_TEXT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyNormalIcon[_SOFTKEY_1])
delete __pSoftkeyNormalIcon[_SOFTKEY_1];
__pSoftkeyNormalIcon[_SOFTKEY_1] = null;
}
- __pSoftkeyNormalIcon[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalIconColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalIconColor, __pSoftkeyNormalIcon[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyDisabledIcon[_SOFTKEY_1])
delete __pSoftkeyDisabledIcon[_SOFTKEY_1];
__pSoftkeyDisabledIcon[_SOFTKEY_1] = null;
}
- __pSoftkeyDisabledIcon[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledIconColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledIconColor, __pSoftkeyDisabledIcon[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyPressedIcon[_SOFTKEY_1])
delete __pSoftkeyPressedIcon[_SOFTKEY_1];
__pSoftkeyPressedIcon[_SOFTKEY_1] = null;
}
- __pSoftkeyPressedIcon[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedIconColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedIconColor, __pSoftkeyPressedIcon[_SOFTKEY_1]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyHighlightedIcon[_SOFTKEY_1])
delete __pSoftkeyHighlightedIcon[_SOFTKEY_1];
__pSoftkeyHighlightedIcon[_SOFTKEY_1] = null;
}
- __pSoftkeyHighlightedIcon[_SOFTKEY_1] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedIconColor);
- delete pTempBitmap;
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::SOFTKEY_ICON_ZOOM_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedIconColor, __pSoftkeyHighlightedIcon[_SOFTKEY_1]);
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
_Button* pButton = _Button::CreateButtonN();
if (pButton)
if (formStyle & FORM_STYLE_OPTIONKEY)
{
- r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyNormalBitmap[SOFTKEY_COUNT])
{
delete __pSoftkeyNormalBitmap[SOFTKEY_COUNT];
__pSoftkeyNormalBitmap[SOFTKEY_COUNT] = null;
}
- __pSoftkeyNormalBitmap[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pSoftkeyNormalBitmap[SOFTKEY_COUNT]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyDisabledBitmap[SOFTKEY_COUNT])
{
delete __pSoftkeyDisabledBitmap[SOFTKEY_COUNT];
__pSoftkeyDisabledBitmap[SOFTKEY_COUNT] = null;
}
- __pSoftkeyDisabledBitmap[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledBackgroundColor, __pSoftkeyDisabledBitmap[SOFTKEY_COUNT]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyPressedBitmap[SOFTKEY_COUNT])
{
delete __pSoftkeyPressedBitmap[SOFTKEY_COUNT];
__pSoftkeyPressedBitmap[SOFTKEY_COUNT] = null;
}
- __pSoftkeyPressedBitmap[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pSoftkeyPressedBitmap[SOFTKEY_COUNT]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyHighlightedBitmap[SOFTKEY_COUNT])
{
delete __pSoftkeyHighlightedBitmap[SOFTKEY_COUNT];
__pSoftkeyHighlightedBitmap[SOFTKEY_COUNT] = null;
}
- __pSoftkeyHighlightedBitmap[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedBackgroundColor, __pSoftkeyHighlightedBitmap[SOFTKEY_COUNT]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyNormalEffectBitmap[SOFTKEY_COUNT])
{
delete __pSoftkeyNormalEffectBitmap[SOFTKEY_COUNT];
__pSoftkeyNormalEffectBitmap[SOFTKEY_COUNT] = null;
}
- __pSoftkeyNormalEffectBitmap[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalBackgroundColor, __pSoftkeyNormalEffectBitmap[SOFTKEY_COUNT]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (__pSoftkeyPressedEffectBitmap[SOFTKEY_COUNT])
{
delete __pSoftkeyPressedEffectBitmap[SOFTKEY_COUNT];
__pSoftkeyPressedEffectBitmap[SOFTKEY_COUNT] = null;
}
- __pSoftkeyPressedEffectBitmap[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedBackgroundColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedBackgroundColor, __pSoftkeyPressedEffectBitmap[SOFTKEY_COUNT]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyNormalIcon[SOFTKEY_COUNT])
delete __pSoftkeyNormalIcon[SOFTKEY_COUNT];
__pSoftkeyNormalIcon[SOFTKEY_COUNT] = null;
}
- __pSoftkeyNormalIcon[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyNormalIconColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyNormalIconColor, __pSoftkeyNormalIcon[SOFTKEY_COUNT]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyDisabledIcon[SOFTKEY_COUNT])
delete __pSoftkeyDisabledIcon[SOFTKEY_COUNT];
__pSoftkeyDisabledIcon[SOFTKEY_COUNT] = null;
}
- __pSoftkeyDisabledIcon[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyDisabledIconColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyDisabledIconColor, __pSoftkeyDisabledIcon[SOFTKEY_COUNT]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyPressedIcon[SOFTKEY_COUNT])
delete __pSoftkeyPressedIcon[SOFTKEY_COUNT];
__pSoftkeyPressedIcon[SOFTKEY_COUNT] = null;
}
- __pSoftkeyPressedIcon[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyPressedIconColor);
- delete pTempBitmap;
-
- r = GET_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyPressedIconColor, __pSoftkeyPressedIcon[SOFTKEY_COUNT]);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pSoftkeyHighlightedIcon[SOFTKEY_COUNT])
delete __pSoftkeyHighlightedIcon[SOFTKEY_COUNT];
__pSoftkeyHighlightedIcon[SOFTKEY_COUNT] = null;
}
- __pSoftkeyHighlightedIcon[SOFTKEY_COUNT] = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), softkeyHighlightedIconColor);
- delete pTempBitmap;
+ r = GET_REPLACED_BITMAP_CONFIG_N(FOOTER::OPTIONKEY_HANDLE_MORE_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, softkeyHighlightedIconColor, __pSoftkeyHighlightedIcon[SOFTKEY_COUNT]);
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
_Button* pButton = _Button::CreateButtonN();
if (pButton)
}
bool
-_Form::OnMousePressed(const _Control& source, const _MouseInfo& mouseinfo)
-{
- return false;
-}
-
-bool
-_Form::OnMouseReleased(const _Control& source, const _MouseInfo& mouseinfo)
-{
- _Toolbar* pToolbar = GetFooter();
- if (pToolbar == null)
- {
- return null;
- }
-
- return true;
-}
-
-bool
_Form::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
return false;
{
if (keyInfo.GetKeyCode() == _KEY_ESC || keyInfo.GetKeyCode() == _KEY_BACK)
{
-// _Toolbar* pToolbar = GetFooter();
-// if (pToolbar == null)
-// {
-// return null;
-// }
-
-// if (pToolbar->IsButtonSet(BACK_BUTTON))
-// {
- {
- void* pData = GetUserData();
- if (pData)
- {
- _FormImpl* pDataImpl = static_cast<_FormImpl*>(pData);
- pDataImpl->OnFormBackRequested(*this);
- }
- }
-// }
-// {
-// void* pData = GetUserData();
-// if (pData)
-// {
-// _FormImpl* pDataImpl = static_cast<_FormImpl*>(pData);
-// pDataImpl->OnFormBackButtonRequested(*this);
-// }
-// }
-
-
+ void* pData = GetUserData();
+ if (pData)
+ {
+ _FormImpl* pDataImpl = static_cast<_FormImpl*>(pData);
+ pDataImpl->OnFormBackRequested(*this);
+ }
return false;
}
if (keyInfo.GetKeyCode() == _KEY_CONTEXT_MENU || keyInfo.GetKeyCode() == _KEY_MENU)
{
-// _Toolbar* pToolbar = GetFooter();
-// if (pToolbar == null)
-// {
-// return null;
-// }
-
+ void* pData = GetUserData();
+ if (pData)
{
- void* pData = GetUserData();
- if (pData)
- {
- _FormImpl* pDataImpl = static_cast<_FormImpl*>(pData);
- pDataImpl->OnFormMenuRequested(*this);
- }
+ _FormImpl* pDataImpl = static_cast<_FormImpl*>(pData);
+ pDataImpl->OnFormMenuRequested(*this);
}
return false;
{
if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle())
{
- GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetOrientation(), indicatorheight);
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
}
}
{
if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle())
{
- GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetOrientation(), indicatorheight);
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
}
}
FrameShowMode mode = pFrame->GetShowMode();
if (mode != FRAME_SHOW_MODE_FULL_SCREEN)
{
- SetBounds(FloatRectangle(0.0f, 0.0f, pFrame->GetBoundsF().width, pFrame->GetBoundsF().height));
+ if (mode == FRAME_SHOW_MODE_MINIMIZED)
+ {
+ if (pFrame->GetShowMode(false) != FRAME_SHOW_MODE_FULL_SCREEN)
+ {
+ SetBounds(FloatRectangle(0.0f, 0.0f, pFrame->GetBoundsF().width, pFrame->GetBoundsF().height));
+ }
+ }
+ else
+ {
+ SetBounds(FloatRectangle(0.0f, 0.0f, pFrame->GetBoundsF().width, pFrame->GetBoundsF().height));
+ }
}
}
float indicatorheight = 0.0f;
- if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
- {
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
- }
- else
- {
- if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle())
- {
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
- }
- }
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
- if (__pIndicator)
+ if (__pIndicator && (indicatorheight > 0))
{
- __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight));
+ __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight));
}
AdjustClientBounds();
}
FloatDimension
-_Form::TranslateSize(FloatDimension size ) const
+_Form::TranslateSize(FloatDimension size) const
{
FloatDimension returnSize(0.0f, 0.0f);
returnSize = CoordinateSystem::AlignToDevice(size);
}
}
}
+ ActivateIndicator();
+ }
+ else
+ {
+ DeactivateIndicator();
}
AdjustClientBounds();
}
_Form::OnFormActivated(void)
{
AddIndicatorObject();
+
+ if (__pOverlayerRegionImplArray == null)
+ {
+ return;
+ }
+
+ for (int i = 0; i < OverlayRegion::GetMaxCount(); i++)
+ {
+ if (__pOverlayerRegionImplArray[i] != null)
+ {
+ __pOverlayerRegionImplArray[i]->SetShowState(true);
+ }
+ }
+
+}
+
+void
+_Form::OnFormDeactivated(void)
+{
+}
+
+void
+_Form::ActivateIndicator(void)
+{
+ if (__pIndicator)
+ {
+ __pIndicator->Activate();
+ }
+
+ return;
+}
+
+void
+_Form::DeactivateIndicator(void)
+{
+ if (__pIndicator)
+ {
+ __pIndicator->Deactivate();
+ }
+
+ return;
+}
+
+void
+_Form::SetPartialScreenEnabled(bool enable)
+{
+ int formstyle = GetFormStyle();
+
+ SysLog(NID_UI_CTRL, "[WM ROTATION]<P>[0x%x] FORM prev 0x%x, enable %d", this, formstyle, enable);
+
+ _FormImpl* pDataImpl = static_cast<_FormImpl*>(GetUserData());
+ if (pDataImpl)
+ {
+ if (enable)
+ {
+ if (formstyle & _FORM_STYLE_INDICATOR)
+ {
+ formstyle = formstyle & (~_FORM_STYLE_INDICATOR);
+ __oldFormStyle |= _FORM_STYLE_INDICATOR;
+ }
+ if (formstyle & _FORM_STYLE_INDICATOR_AUTO_HIDE)
+ {
+ formstyle = formstyle & (~_FORM_STYLE_INDICATOR_AUTO_HIDE);
+ __oldFormStyle |= _FORM_STYLE_INDICATOR_AUTO_HIDE;
+ }
+ if (formstyle & _FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
+ {
+ formstyle = formstyle & (~_FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE);
+ __oldFormStyle |= _FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE;
+ }
+
+ SysLog(NID_UI_CTRL, "[WM ROTATION]<P>[0x%x] FORM backup 0x%x, cur 0x%x", this, __oldFormStyle, formstyle);
+
+ pDataImpl->SetFormStyle(formstyle);
+ }
+ else
+ {
+ unsigned long style = GetFormStyle();
+ style |= __oldFormStyle;
+
+ SysLog(NID_UI_CTRL, "[WM ROTATION]<P>[0x%x] FORM backup 0x%x, cur 0x%x", this, __oldFormStyle, style);
+
+ pDataImpl->SetFormStyle(style);
+ __oldFormStyle = 0;
+ }
+ }
}
#include <FBaseSysLog.h>
#include <FApp_AppInfo.h>
#include <FGrpFloatRectangle.h>
+#include "FUi_UiEventManager.h"
#include "FUi_LayoutImpl.h"
#include "FUi_LayoutLayoutMaker.h"
#include "FUi_EcoreEvasMgr.h"
GetCore().SetFormBackEventListener(this);
}
+ else
+ {
+ if (GetCore().IsIndicatorTranslucent())
+ {
+ if (!GetCore().IsHeaderTranslucent())
+ {
+ indicatorBounds.height = 0.0f;
+ }
+ else
+ {
+ if (GetCore().GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE)
+ {
+ indicatorBounds.height = 0.0f;
+ }
+ }
+ }
+
+ FloatRectangle bounds(0.0f, indicatorBounds.height, GetClientBoundsF().width, GetCore().GetToolbarHeightF(true));
+ GetCore().SetHeaderBounds(bounds);
+ }
}
else if (formStyle & FORM_STYLE_TITLE)
{
r = GetCore().AttachSystemChild(pHeader->GetCore());
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
+ else
+ {
+ FloatRectangle bounds(0.0f, indicatorBounds.height, GetClientBoundsF().width, GetCore().GetToolbarHeightF(true));
+ GetCore().SetHeaderBounds(bounds);
+ }
}
else
{
}
}
+ if (GetCore().GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE)
+ {
+ indicatorBounds.height = 0.0f;
+ }
+
if (!pTabImpl)
{
pTabImpl = CreateTabImplN();
r = GetCore().AttachSystemChild(pTabImpl->GetCore());
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
+ else
+ {
+ float posY = indicatorBounds.height + titleHeight;
+
+ FloatRectangle bounds(0.0f, posY, GetClientBoundsF().width, GetCore().GetTabHeightF());
+ GetCore().SetTabBounds(bounds);
+ }
GetCore().SetTabStyle(_TAB_STYLE_TEXT);
}
else if (formStyle & FORM_STYLE_ICON_TAB)
r = GetCore().AttachSystemChild(pTabImpl->GetCore());
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
+ else
+ {
+ float posY = indicatorBounds.height + titleHeight;
+
+ FloatRectangle bounds(0.0f, posY, GetClientBoundsF().width, GetCore().GetTabHeightF());
+ GetCore().SetTabBounds(bounds);
+ }
GetCore().SetTabStyle(_TAB_STYLE_ICON);
}
else
GetCore().SetFormBackEventListener(this);
GetCore().SetFormMenuEventListener(this);
}
+ else
+ {
+ FloatRectangle clientbounds = GetClientBoundsF();
+ FloatRectangle bounds(0.0f, clientbounds.y + clientbounds.height, clientbounds.width, GetCore().GetToolbarHeightF(false));
+
+ GetCore().SetFooterBounds(bounds);
+ }
}
else if (formStyle & FORM_STYLE_SOFTKEY_0 || formStyle & FORM_STYLE_SOFTKEY_1 || formStyle & FORM_STYLE_OPTIONKEY)
{
pFooter->GetCore().AddActionEventListener(*this);
}
+ else
+ {
+ FloatRectangle clientbounds = GetClientBoundsF();
+ FloatRectangle bounds(0.0f, clientbounds.y + clientbounds.height - GetCore().GetToolbarHeightF(false), clientbounds.width, GetCore().GetToolbarHeightF(false));
+
+ GetCore().SetFooterBounds(bounds);
+ }
}
else
{
}
}
- pFrameImpl->SetPosition(curPoint);
+ // depend on WM.
+ // Skip
+ //pFrameImpl->SetPosition(curPoint);
portraitSize = pFrameImpl->GetSizeF();
landscapeSize = portraitSize;
pFrameImpl->GetCore().SetMovable(movable);
SetSize(landscapeSize);
}
+ DeflateClientRectHeight(0.0f);
+
float indicatorheight = 0.0f;
GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetCore().GetOrientation(), indicatorheight);
_Indicator* pIndicator = GetCore().GetIndicator();
+
+ if (pIndicator)
+ {
+ pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight));
+ }
+
if (GetCore().HasIndicator())
{
if (pIndicator)
pIndicator->SetIndicatorOrientation(orientation);
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
- pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight));
if ((FORM_STYLE_INDICATOR & GetFormStyle()) || (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle()))
{
GetCore().SetIndicatorShowState(true);
{
indicatorBounds.height = 0.0f;
}
+ else
+ {
+ if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle())
+ {
+ indicatorBounds.height = 0.0f;
+ }
+ }
}
}
}
{
result r = E_SUCCESS;
- Header* pHeader = new (std::nothrow) Header;
+ Header* pHeader = new (std::nothrow) Header();
SysTryReturn(NID_UI_CTRL, pHeader, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
r = pHeader->Construct();
{
result r = E_SUCCESS;
- Footer* pFooter = new (std::nothrow) Footer;
+ Footer* pFooter = new (std::nothrow) Footer();
SysTryReturn(NID_UI_CTRL, pFooter, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
r = pFooter->Construct();
SetFocused();
r = GetCore().AttachedToMainTree();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
r = _ContainerImpl::OnAttachedToMainTree();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
FloatRectangle indicatorBounds(0.0f, 0.0f, 0.0f, 0.0f);
if (pTabImpl)
{
+ if (GetCore().GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE)
+ {
+ indicatorBounds.height = 0.0f;
+ }
+
float posY = indicatorBounds.height + titleHeight;
- FloatRectangle bounds(0.0f, posY, GetClientBoundsF().width, GetCore().GetTabHeightF());
- GetCore().SetTabBounds(bounds);
+ FloatRectangle bounds(0.0f, posY, GetClientBoundsF().width, GetCore().GetTabHeightF());
+ GetCore().SetTabBounds(bounds);
}
if (pFooter)
if (__pOriAgent)
{
- OrientationStatus status = __pOriAgent->GetStatus();
- _ControlOrientation coreOrientation =
- (status == ORIENTATION_STATUS_PORTRAIT || status == ORIENTATION_STATUS_PORTRAIT_REVERSE) ?
- _CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE;
-
- OnChangeLayout(coreOrientation);
__pOriAgent->RequestOrientationEvent();
}
if (pForm)
{
__pFormBackEventListener->OnFormBackRequested(*pForm);
+
+ SysLog(NID_UI, "OnFormBackRequested, Call SetTouchCanceled");
+ _UiEventManager* pUiEventManager = _UiEventManager::GetInstance();
+ if (pUiEventManager)
+ {
+ pUiEventManager->ClearEventQueue();
+ }
}
else
{
return null;
}
- if ( layoutType == UIBUILDER_LAYOUT_GRID)
+ if (layoutType == UIBUILDER_LAYOUT_GRID)
{
for (int i = 0; i < UIBUILDER_ATTRIBUTE_NUM; i++)
{
GridLayout* pGridLayout = null;
pControlProperty = pControl->GetAttribute(i);
- if ( i == UIBUILDER_ATTRIBUTE_PORTRAIT)
+ if (i == UIBUILDER_ATTRIBUTE_PORTRAIT)
{
pGridLayout = dynamic_cast<GridLayout*>(pPortraitLayout);
}
{
__pForm = const_cast <_Form*>(&form);
- _FormModel* pModel = new (std::nothrow) _FormModel;
+ _FormModel* pModel = new (std::nothrow) _FormModel();
SysTryReturnVoidResult(NID_UI_CTRL, pModel, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient..");
SetModel(*pModel);
*/
#include <new>
+#include <FAppUiApp.h>
#include <FBaseErrorDefine.h>
#include <FBaseInteger.h>
#include <FBaseSysLog.h>
, __constructed(false)
, __rotation(false)
, __changingBoundsEnabled(true)
- , __pFormActivationChangeEventListener(null)
+ , __skipSetBounds(false)
+ , __pFormActivationChangeEventListeners(null)
{
_FramePresenter* pPresenter = new (std::nothrow) _FramePresenter(*this);
SysTryReturnVoidResult(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
__floatingBounds.width = screen.width;
__floatingBounds.height = screen.height;
- __pFrameEvent = _FrameEvent::CreateInstanceN(*this);
- SysTryCatch(NID_UI_CTRL, __pFrameEvent, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ LinkedListT <_IFormActivationChangeEventListener*>* pFormActivationChangeEventListeners = null;
+
+ _FrameEvent* pFrameEvent = _FrameEvent::CreateInstanceN(*this);
+ SysTryCatch(NID_UI_CTRL, pFrameEvent, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+ pFormActivationChangeEventListeners = new (std::nothrow) LinkedListT <_IFormActivationChangeEventListener*>;
+ SysTryCatch(NID_UI_CTRL, pFormActivationChangeEventListeners, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
SetPresenter(*pPresenter);
SetClipChildrenEnabled(false);
+ __pFrameEvent = pFrameEvent;
+ __pFormActivationChangeEventListeners = pFormActivationChangeEventListeners;
ClearLastResult();
return;
CATCH:
delete pPresenter;
pPresenter = null;
+
+ delete pFrameEvent;
+ pFrameEvent = null;
}
_Frame::~_Frame(void)
delete __pFramePresenter;
__pFramePresenter = null;
+ delete __pFormActivationChangeEventListeners;
+ __pFormActivationChangeEventListeners = null;
+
ClearLastResult();
}
_RootVisualElement* pRootVE = null;
_EflLayer* pLayer = null;
int appType = _AppInfo::GetAppType();
+#if defined(PARTIAL_SCREEN)
+ bool isMultiWindow = false;
+#endif
- _Frame* pFrame = new (std::nothrow) _Frame;
+ _Frame* pFrame = new (std::nothrow) _Frame();
SysTryCatch(NID_UI_CTRL, pFrame, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred.");
pFrame->AcquireHandle();
+ GetEcoreEvasMgr()->GetEcoreEvas()->SetDragAndDropEnabled(*pFrame);
+#if defined(PARTIAL_SCREEN)
+ isMultiWindow = _AppInfo::IsMultiWindow();
+ SysLog(NID_UI_CTRL, "[WM ROTATION]<P> IsMultiWindow = %d", isMultiWindow);
+ if (isMultiWindow)
+ {
+ GetEcoreEvasMgr()->GetEcoreEvas()->SetPartialScreenEnabled(*pFrame);
+ }
+#endif
+
SetLastResult(E_SUCCESS);
return pFrame;
}
pCurrentForm->AddIndicatorObject();
+ pCurrentForm->ActivateIndicator();
SetFocusWindowActivationChecked(true);
_Control* pFocusControl = pCurrentForm->GetFocusControl();
_AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM);
}
+
+void
+_Frame::OnDeactivated(void)
+{
+ SysLog(NID_UI, "deactivated(%d)", __activated);
+
+ _Window::OnDeactivated();
+
+ _Form* pCurrentForm = GetCurrentForm();
+ if (pCurrentForm == null)
+ {
+ return;
+ }
+
+ pCurrentForm->DeactivateIndicator();
+
+}
+
+
bool
_Frame::OnNotifiedN(const _Control& source, IList* pArgs)
{
{
if (pCurrentForm != pForm)
{
+ FireFormActivationChangeEvent(pCurrentForm, _FORM_STATUS_DEACTIVATING);
+
// Change order
r = MoveChildToTop(*pForm);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
pCurrentForm->SetVisibleState(false);
pCurrentForm->MoveOverlayRegion(false);
- if (__pFormActivationChangeEventListener)
- __pFormActivationChangeEventListener->OnFormDeactivated(*pCurrentForm);
+ pCurrentForm->OnFormDeactivated();
+
+ FireFormActivationChangeEvent(pCurrentForm, _FORM_STATUS_DEACTIVATED);
}
}
+ FireFormActivationChangeEvent(pCurrentForm, _FORM_STATUS_ACTIVATING);
pNewForm->SetVisibleState(true);
pNewForm->OnFormActivated();
_Control* pFocus = pNewForm->GetFocusControl();
{
pNewForm->SetFocused();
}
-
+ _Control* pFocusTraversalControl = pNewForm->GetFocusTraversalControl();
+ if (pFocusTraversalControl)
+ {
+ pFocusTraversalControl->OnTraversalControlFocusGained();
+ }
pNewForm->SetUpdateLayoutState(true);
- if (__pFormActivationChangeEventListener)
- __pFormActivationChangeEventListener->OnFormActivated(*pNewForm);
+ FireFormActivationChangeEvent(pNewForm, _FORM_STATUS_ACTIVATED);
SetLastResult(E_SUCCESS);
void
_Frame::RemoveFrameEventListener(const _IFrameEventListener& listener)
{
- result r = __pFrameEvent->RemoveListener(listener);
+ result r = E_SUCCESS;
+
+ if (__pFrameEvent)
+ {
+ r = __pFrameEvent->RemoveListener(listener);
+ }
+
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
-void
-_Frame::SetFormActivationChangeEventListener(const _IFormActivationChangeEventListener* plistener)
+result
+_Frame::AddFormActivationChangeEventListener(_IFormActivationChangeEventListener& listener)
+{
+ ClearLastResult();
+ SysTryReturn(NID_UI,
+ __pFormActivationChangeEventListeners->Add(&listener) == E_SUCCESS, E_SYSTEM,
+ E_SYSTEM, "[E_SYSTEM] System error occurred.");
+
+ return E_SUCCESS;
+}
+
+result
+_Frame::RemoveFormActivationChangeEventListener(_IFormActivationChangeEventListener& listener)
{
- __pFormActivationChangeEventListener = const_cast<_IFormActivationChangeEventListener*>(plistener);
+ ClearLastResult();
+ SysTryReturn(NID_UI, __pFormActivationChangeEventListeners->Remove(&listener) == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+
+ return E_SUCCESS;
}
+result
+_Frame::FireFormActivationChangeEvent(_Form* pForm, _FormStatus status)
+{
+ if (__pFormActivationChangeEventListeners)
+ {
+ if (__pFormActivationChangeEventListeners->GetCount() > 0 )
+ {
+ IEnumeratorT<_IFormActivationChangeEventListener*>* pEnumerator = __pFormActivationChangeEventListeners->GetEnumeratorN();
+ if (pEnumerator)
+ {
+ while (pEnumerator->MoveNext() == E_SUCCESS)
+ {
+ _IFormActivationChangeEventListener* pFormActivationChangeEventListener = null;
+ pEnumerator->GetCurrent(pFormActivationChangeEventListener);
+ if (pFormActivationChangeEventListener)
+ {
+ switch (status)
+ {
+ case _FORM_STATUS_ACTIVATING :
+ pFormActivationChangeEventListener->OnFormActivating(*pForm);
+ break;
+ case _FORM_STATUS_DEACTIVATING :
+ pFormActivationChangeEventListener->OnFormDeactivating(*pForm);
+ break;
+ case _FORM_STATUS_ACTIVATED :
+ pFormActivationChangeEventListener->OnFormActivated(*pForm);
+ break;
+ case _FORM_STATUS_DEACTIVATED :
+ pFormActivationChangeEventListener->OnFormDeactivated(*pForm);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ delete pEnumerator;
+ }
+ }
+ }
+ return E_SUCCESS;
+}
void
_Frame::SetFloatingBounds(const FloatRectangle& rect)
{
if (__minimized == true)
{
- return E_SYSTEM;
+ bool isForeground = false;
+
+ UiApp* pUiApp = UiApp::GetInstance();
+ if (pUiApp)
+ {
+ AppUiState appUiState = pUiApp->GetAppUiState();
+ if (appUiState == APP_UI_STATE_FOREGROUND)
+ {
+ SysLog(NID_UI_CTRL, "[WM ROTATION]<M>");
+ isForeground = true;
+ }
+ }
+
+ if (isForeground == false)
+ {
+ return E_SYSTEM;
+ }
}
}
int oldShowMode = __showMode;
__showMode = showMode;
+ // depend on WM.
+ // App decides floating bounds directly.
+/*
if ((__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING))
{
_ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT;
{
curPoint.x = prevPoint.x * ratio;
}
-
+
if (prevPoint.y > 0.0f)
{
curPoint.y = prevPoint.y / ratio;
{
curPoint.x = prevPoint.x / ratio;
}
-
+
if (prevPoint.y > 0.0f)
{
curPoint.y = prevPoint.y * ratio;
}
-
+
__floatingBounds.x = curPoint.x;
__floatingBounds.y = curPoint.y;
}
}
}
+*/
result r = E_SUCCESS;
-
+ Rectangle floatingBounds = _CoordinateSystemUtils::ConvertToInteger(__floatingBounds);
switch (__showMode)
{
case FRAME_SHOW_MODE_FULL_SCREEN:
__restore = true;
- if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+ if (__skipSetBounds == false)
{
- SetBounds(FloatRectangle(0.0f, 0.0f, screen.width, screen.height));
- }
- else
- {
- SetBounds(FloatRectangle(0.0f, 0.0f, screen.height, screen.width));
+ if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ SetBounds(FloatRectangle(0.0f, 0.0f, screen.width, screen.height));
+ }
+ else
+ {
+ SetBounds(FloatRectangle(0.0f, 0.0f, screen.height, screen.width));
+ }
}
__restore = false;
}
+ SetChangedPositionByUser(false);
+
break;
case FRAME_SHOW_MODE_PARTIAL_SCREEN:
+ SysLog(NID_UI, "[WM ROTATION]<M>[WIN 0x%x] Set floating bounds(%d, %d, %d, %d).",
+ GetNativeHandle(), floatingBounds.x, floatingBounds.y, floatingBounds.width, floatingBounds.height);
if (oldShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING)
{
r = pEcoreEvas->SetFloatingMode(*GetRootWindow(), false);
break;
case FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING:
+ SysLog(NID_UI, "[WM ROTATION]<M>[WIN 0x%x] Set floating bounds(%d, %d, %d, %d).",
+ GetNativeHandle(), floatingBounds.x, floatingBounds.y, floatingBounds.width, floatingBounds.height);
if (oldShowMode != FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING)
{
r = pEcoreEvas->SetFloatingMode(*GetRootWindow(), true);
if (oldShowMode == FRAME_SHOW_MODE_FULL_SCREEN)
{
- SetBounds(__floatingBounds);
+ if (IsChangedPositionByUser() == true)
+ {
+ SetBounds(__floatingBounds);
+ }
+ else
+ {
+ SetSize(FloatDimension(__floatingBounds.width, __floatingBounds.height));
+ }
}
break;
void
_Frame::OnChildAttached(const _Control& child)
{
+#if defined(PARTIAL_SCREEN)
+ _Form* pForm = dynamic_cast<_Form*>(const_cast<_Control*>(&child));
+ if (pForm)
+ {
+ bool isMultiWindow = _AppInfo::IsMultiWindow();
+ if ((isMultiWindow == true) && (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN))
+ {
+ pForm->SetPartialScreenEnabled(true);
+ }
+ }
+#endif
+
_Form* pCurrentForm = GetCurrentForm();
if (pCurrentForm == &child)
if (controlCount > 1)
{
- _Control* pOldCurrentForm = GetChild(controlCount - 2);
+ _Form* pOldCurrentForm = dynamic_cast<_Form*>(GetChild(controlCount - 2));
SysTryReturnVoidResult(NID_UI_CTRL, pOldCurrentForm != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
pOldCurrentForm->SetVisibleState(false);
+ FireFormActivationChangeEvent(pOldCurrentForm, _FORM_STATUS_DEACTIVATED);
}
}
}
void
+_Frame::OnChildAttaching(const _Control& child)
+{
+ _Form* pCurrentForm = GetCurrentForm();
+
+ if (pCurrentForm != null && pCurrentForm != &child)
+ {
+ FireFormActivationChangeEvent(pCurrentForm, _FORM_STATUS_DEACTIVATING);
+ }
+ _Form* pChild = dynamic_cast<_Form*>(&const_cast<_Control&>(child));
+ FireFormActivationChangeEvent(pChild, _FORM_STATUS_ACTIVATING);
+}
+
+void
_Frame::OnChildDetached(const _Control& child)
{
int controlCount = GetChildCount();
if (controlCount > 0)
{
- _Control* pCurrentForm = GetChild(controlCount - 1);
+ _Form* pCurrentForm = dynamic_cast<_Form*>(GetChild(controlCount - 1));
SysTryReturnVoidResult(NID_UI_CTRL, pCurrentForm, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
pCurrentForm->SetVisibleState(true);
+ FireFormActivationChangeEvent(pCurrentForm, _FORM_STATUS_ACTIVATED);
}
else
{
return E_SUCCESS;
}
+ if (__restore == true)
+ {
+ _RootVisualElement* pRootVE = GetRootVisualElement();
+ if (pRootVE)
+ {
+ _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer());
+ if (pLayer)
+ {
+ FloatDimension screen = _CoordinateSystemUtils::Transform(_ControlManager::GetInstance()->GetScreenSizeF());
+ int rotation = GetEcoreEvasMgr()->GetEcoreEvas()->GetWindowRotation(*this);
+
+ FloatDimension size(screen);
+ if ((rotation == 270) || (rotation == 90))
+ {
+ size.width = screen.height;
+ size.height = screen.width;
+ }
+ pLayer->HasUpdatedWindowSize(size);
+ }
+ return E_SUCCESS;
+ }
+ }
+
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
- pEcoreEvas->SetWindowBounds(*GetRootWindow(), _CoordinateSystemUtils::ConvertToInteger(bounds));
+ bool changePosition = IsChangedPositionByUser();
+ SysLog(NID_UI_CTRL, "[WM ROTATION]<M>[WIN 0x%x] IsChangedPositionByUser = %d", GetNativeHandle(), changePosition);
+ pEcoreEvas->SetWindowBounds(*GetRootWindow(), _CoordinateSystemUtils::ConvertToInteger(bounds), (changePosition ? false : true));
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
// Restore
FrameShowMode showMode = GetShowMode(false);
+ __skipSetBounds = true;
SetShowMode(FRAME_SHOW_MODE_FULL_SCREEN);
+ __skipSetBounds = false;
SetShowMode(showMode);
default:
break;
}
+
+ if(pCurrentForm)
+ {
+ if (FORM_STYLE_INDICATOR & pCurrentForm->GetFormStyle())
+ {
+ pCurrentForm->SetIndicatorShowState(pCurrentForm->IsIndicatorVisible());
+ if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & pCurrentForm->GetFormStyle())
+ {
+ pCurrentForm->SetIndicatorAutoHide(false, true);
+ }
+ else
+ {
+ pCurrentForm->SetIndicatorAutoHide(false, false);
+ }
+ }
+ else
+ {
+ if ((FORM_STYLE_INDICATOR_AUTO_HIDE & pCurrentForm->GetFormStyle()) && (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & pCurrentForm->GetFormStyle()))
+ {
+ pCurrentForm->SetIndicatorShowState(pCurrentForm->IsIndicatorVisible());
+ pCurrentForm->SetIndicatorAutoHide(true, true);
+ }
+ else
+ {
+ if (FORM_STYLE_INDICATOR_AUTO_HIDE & pCurrentForm->GetFormStyle())
+ {
+ if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ pCurrentForm->SetIndicatorShowState(pCurrentForm->IsIndicatorVisible());
+ }
+ else
+ {
+ pCurrentForm->SetIndicatorShowState(false);
+ }
+ pCurrentForm->SetIndicatorAutoHide(true, false);
+ }
+ else if(FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & pCurrentForm->GetFormStyle())
+ {
+ if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ pCurrentForm->SetIndicatorShowState(false);
+ }
+ else
+ {
+ pCurrentForm->SetIndicatorShowState(pCurrentForm->IsIndicatorVisible());
+ }
+ pCurrentForm->SetIndicatorAutoHide(false, true);
+ }
+ else
+ {
+ pCurrentForm->SetIndicatorShowState(false);
+ pCurrentForm->SetIndicatorAutoHide(false, false);
+ }
+ }
+ }
+ }
}
void
_Frame::ResetFocusList(void)
{
- Tizen::Ui::Controls::_Form* pCurrentForm = GetCurrentForm();
+ _Form* pCurrentForm = GetCurrentForm();
if (pCurrentForm)
{
pCurrentForm->ResetFocusList();
__changingBoundsEnabled = enable;
}
+void
+_Frame::SetPartialScreenEnabled(bool enable)
+{
+#if defined(PARTIAL_SCREEN)
+ _RootVisualElement* pRootVE = GetRootVisualElement();
+ if (pRootVE)
+ {
+ _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer());
+ if (pLayer)
+ {
+ pLayer->SetConfigured(true);
+ SysLog(NID_UI_CTRL, "[WM ROTATION]<P>[WIN 0x%x] enable = %d", GetNativeHandle(), enable);
+ }
+ }
+#endif
+
+ if (enable == true)
+ {
+ __showMode = FRAME_SHOW_MODE_PARTIAL_SCREEN;
+ }
+ else
+ {
+ SetShowMode(FRAME_SHOW_MODE_FULL_SCREEN);
+ }
+
+ _Form* pForm = null;
+ int controlCount = GetChildCount();
+
+ if (controlCount > 0)
+ {
+ for (int i = controlCount; i > 0; i--)
+ {
+ pForm = dynamic_cast<_Form*>(GetChild(i - 1));
+ SysTryReturnVoidResult(NID_UI_CTRL, pForm != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ pForm->SetPartialScreenEnabled(enable);
+ }
+ }
+}
+
Tizen::Base::Collection::IListT<_Control*>*
_Frame::GetFocusList(void) const
{
pTempControl = pTempControl->GetParent();
}
}
-
+
if (pForm)
{
return pForm->GetFocusTraversalControl();
}
}
}
+
+bool
+_Frame::IsChildAttachable(_Control& child) const
+{
+ return (dynamic_cast<_Form*>(&child) != null);
+}
+
}}} // Tizen::Ui::Controls
}
}
- SetPosition(curPoint);
+ // depend on WM.
+ // Skip
+ //SetPosition(curPoint);
SetMovable(movable);
GetCore().SetFloatingOrientation(orientation);
}
int childCount = GetCore().GetChildCount();
if (childCount == 0)
{
- UpdateOrientationStatus();
+ if (IsDestroying() == false)
+ {
+ UpdateOrientationStatus();
+ }
}
else if (childCount > 0)
{
{
__pFrame = const_cast <_Frame*>(&frame);
- _FrameModel* pModel = new (std::nothrow) _FrameModel;
+ _FrameModel* pModel = new (std::nothrow) _FrameModel();
SysTryReturnVoidResult(NID_UI_CTRL, pModel, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
_SetModel(*pModel);
bool
_Gallery::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (!IsFocusModeStateEnabled())
+ {
+ return false;
+ }
+
bool returnValue = false;
bool keyPressed = false;
bool
_Gallery::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (!IsFocusModeStateEnabled())
+ {
+ return false;
+ }
+
if ((keyInfo.GetKeyCode() == _KEY_BACK || keyInfo.GetKeyCode() == _KEY_ESC) && IsSlideShowStarted())
{
StopSlideShow();
return false;
}
+bool
+_Gallery::OnFocusGained(const _Control& source)
+{
+ return _Control::OnFocusGained(source);
+}
+
+void
+_Gallery::OnFocusModeStateChanged(void)
+{
+
+}
+
+bool
+_Gallery::OnFocusLost(const _Control& source)
+{
+ return _Control::OnFocusLost(source);
+}
+
}}} // Tizen::Ui::Controls
__pTmpFileBitmap = new (std::nothrow) Bitmap();
SysTryCatch(NID_UI_CTRL, __pTmpFileBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- // TODO : need Bitmap::ConstructF(ByteBuffer, )
+ // TODO : need Bitmap::ConstructF(ByteBuffer,)
//FloatDimension bitmapSizeF(bitmapSize.width, bitmapSize.height);
r = __pTmpFileBitmap->Construct(*pBuffer, bitmapSize, pItem->GetGalleryItemImage()->GetInternalBitmap()->GetPixelColorFormat());
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
const int MAX_ANIMATION_DURATION = 20000;
const int DEFAULT_VIEW_DURATION = 10;
const int MIN_VIEW_DURATION = 10;
-const int FIRST_SLIDE_SHOW_DURATION = 1;
const int PARTIAL_CANVAS = 0;
} // unnamed namespace
pFont->GetTextExtent(__emptyString, __emptyString.GetLength(), textDimension);
- pTextObject = new (std::nothrow) TextObject;
+ pTextObject = new (std::nothrow) TextObject();
SysTryCatch(NID_UI_CTRL, pTextObject != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pTextObject->Construct();//(const_cast<wchar_t*>(__emptyString.GetPointer())), __emptyString.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
area = -area;
}
- if (__startPinchCenterPosition.x == 0 && __startPinchCenterPosition.y == 0)
- {
- float factor = canvasRect.width / viewRect.width;
- __startPinchCenterPosition = center;
- __startPinchCenterPosition.x = CalculateRound((__startPinchCenterPosition.x - canvasRect.x) / factor);
- __startPinchCenterPosition.y = CalculateRound((__startPinchCenterPosition.y - canvasRect.y) / factor);
- }
+ float factor = canvasRect.width / viewRect.width;
+
+ __startPinchCenterPosition = center;
+ __startPinchCenterPosition.x = CalculateRound((__startPinchCenterPosition.x - canvasRect.x) / factor);
+ __startPinchCenterPosition.y = CalculateRound((__startPinchCenterPosition.y - canvasRect.y) / factor);
- //_GalleryAnimationTiming animation = {PINCH_ZOOM_ANIMATION_DURATION, GALLERY_ANIMATION_TIMING_FUNC_EASEOUT};
- //result r = ZoomCanvas(area, center, zoomIn, &animation);
result r = PinchZoomCanvas(area, center, zoomIn);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r));
_GalleryViewEventHandler::OnTouchCanceled(void)
{
ResetTouch();
+ AlignCanvas();
return true;
}
{
ClearLastResult();
_GroupContainer* pGroupContainer = new (std::nothrow) _GroupContainer();
- SysTryReturn(NID_UI_CTRL, pGroupContainer != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pGroupContainer != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ pGroupContainer->AcquireHandle();
result r = pGroupContainer->Initialize(rect, rowCount, columnCount, lineWidth);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- pGroupContainer->AcquireHandle();
return pGroupContainer;
CATCH:
{
result r = E_SUCCESS;
- SysTryReturn(NID_UI_CTRL, (lineWidth >= 1), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The line width should not be less than 1.");
+ SysTryReturnResult(NID_UI_CTRL, lineWidth >= 1, E_INVALID_ARG, "Invalid argument is used. The line width (%f) should not be less than 1.", lineWidth);
__lineWidth = lineWidth;
- SysTryReturn(NID_UI_CTRL, (rect.width >= 0.0f && rect.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The bounds of the container should be non negative.");
- SysTryReturn(NID_UI_CTRL, (rowCount > 0 && columnCount > 0), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The rowCount or columnCount should be greater than 0.");
+ SysTryReturnResult(NID_UI_CTRL, (rect.width >= 0.0f && rect.height >= 0.0f), E_INVALID_ARG,
+ "Invalid arguments is used. The width (%f) and height (%f) of the container should be non negative.", rect.width, rect.height);
+ SysTryReturnResult(NID_UI_CTRL, (rowCount > 0 && columnCount > 0), E_INVALID_ARG,
+ "Invalid arguments is used. The rowCount (%d) and columnCount (%d) should be greater than 0.");
Color backgroundColor;
GET_COLOR_CONFIG(GROUPCONTAINER::NORMAL_BG, backgroundColor);
SetBackgroundColor(backgroundColor);
r = GET_COLOR_CONFIG(GROUPCONTAINER::LINE_COLOR_FG, __lineColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
float totalColLineWidth = (columnCount + 1.0f) * __lineWidth;
float totalRowLineHeight = (rowCount + 1.0f) * __lineWidth;
_ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
r = GET_FIXED_VALUE_CONFIG(GROUPCONTAINER::DEFAULT_MARGIN, orientation, margin);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__pCellsArray = new (std::nothrow) _CellInfo *[rowCount];
- SysTryReturn(NID_UI_CTRL, __pCellsArray != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, __pCellsArray != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
__pStretchableRowIndex = new (std::nothrow) bool[rowCount];
- SysTryCatch(NID_UI_CTRL, __pStretchableRowIndex != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pStretchableRowIndex != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
for (int i = 0; i < rowCount; i++)
{
}
__pStretchableColumnIndex = new (std::nothrow) bool[columnCount];
- SysTryCatch(NID_UI_CTRL, __pStretchableColumnIndex != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pStretchableColumnIndex != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
for (int i = 0; i < columnCount; i++)
{
for (int i = 0; i < rowCount; i++)
{
__pCellsArray[i] = new (std::nothrow) _CellInfo[columnCount];
- SysTryCatch(NID_UI_CTRL, __pCellsArray[i] != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pCellsArray[i] != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
}
for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
r = AttachSystemChild(*__pSystemControl);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.", GetErrorMessage(r));
+ __pSystemControl->SetFocusable(false);
+
__pContentProvider = new (std::nothrow) GroupContainerContentProvider();
- SysTryCatch(NID_UI_CTRL, __pContentProvider != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pContentProvider != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pSystemControl->GetVisualElement()->SetContentProvider(__pContentProvider);
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.", GetErrorMessage(r));
__pGroupContainerPresenter = new (std::nothrow) _GroupContainerPresenter(*this);
- SysTryCatch(NID_UI_CTRL, __pGroupContainerPresenter != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pGroupContainerPresenter != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = GetVisualElement()->SetSurfaceOpaque(false);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = SetBounds(rect);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- return r;
+ return E_SUCCESS;
CATCH:
{
r = E_INVALID_OPERATION;
}
- return r;
+ return E_SUCCESS;
CATCH:
__childAttachedRowIndex = -1;
r = __pGroupContainerImpl->GetPublic().RemoveControl(const_cast<Control&>(pChildImpl->GetPublic()));
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- return r;
+ return E_SUCCESS;
}
result
_GroupContainer::SetColumnWidth(int columnIndex, float width, bool isUser)
{
- result r = E_SUCCESS;
-
SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_OUT_OF_RANGE, "columnIndex(%d) is out of range.", columnIndex);
- SysTryReturnResult(NID_UI_CTRL, width >= 0, E_INVALID_ARG, "Invalid argument(s) is used. Column width should be non negative.");
+ SysTryReturnResult(NID_UI_CTRL, width >= 0, E_INVALID_ARG, "Invalid argument is used. Column width (%f) should be non negative.", width);
int row = -1;
int column = -1;
UpdateStretchableCellBounds(GetGridBounds(), GetBoundsF(), columnIndex, -1);
}
- return r;
+ return E_SUCCESS;
}
float
result
_GroupContainer::SetRowHeight(int rowIndex, float height, bool isUser)
{
- result r = E_SUCCESS;
-
SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_OUT_OF_RANGE, "rowIndex(%d) is out of range.", rowIndex);
- SysTryReturnResult(NID_UI_CTRL, height >= 0, E_INVALID_ARG, "Invalid argument(s) is used. Row height should be non negative.");
+ SysTryReturnResult(NID_UI_CTRL, height >= 0, E_INVALID_ARG, "Invalid argument is used. Row height (%f) should be non negative.", height);
int row = -1;
int column = -1;
UpdateStretchableCellBounds(GetGridBounds(), GetBoundsF(), -1, rowIndex);
}
- return r;
+ return E_SUCCESS;
}
float
{
__pCellsArray[rowIndex][columnIndex].isResizeEnabled = true;
r = ResizeControl(rowIndex, columnIndex);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
else
{
r = E_INVALID_ARG;
}
- return r;
+ return E_SUCCESS;
}
result
SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex);
- SysTryReturnResult(NID_UI_CTRL, (leftMargin >= 0.0f && rightMargin >= 0.0f && topMargin >= 0.0f && bottomMargin >= 0.0f), E_INVALID_ARG, "Invalid argument(s) is used. Invalid margin value.");
+ SysTryReturnResult(NID_UI_CTRL, (leftMargin >= 0.0f && rightMargin >= 0.0f && topMargin >= 0.0f && bottomMargin >= 0.0f), E_INVALID_ARG,
+ "Invalid arguments is used. The leftMargin (%f) rightMargin (%f) topMargin (%f) and bottomMargin (%f) should be non negative.");
_CellMargin prevCellMargin = __pCellsArray[rowIndex][columnIndex].cellMargin;
__pCellsArray[rowIndex][columnIndex].cellMargin.left = leftMargin;
}
r = SetChildBounds(*pControl, rowIndex, columnIndex, FloatRectangle(rect.x, rect.y, controlRect.width, controlRect.height));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
}
- return r;
+ return E_SUCCESS;
}
FloatRectangle
result
_GroupContainer::Split(int rowIndex, int columnIndex)
{
- result r = E_SUCCESS;
int rowEndIndex = -1;
int columnEndIndex = -1;
}
}
- return r;
+ return E_SUCCESS;
}
void
}
r = SetChildBounds(*pControl, rowIndex, columnIndex, FloatRectangle(controlRect.x, controlRect.y, rect.width, rect.height));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
}
}
- return r;
+ return E_SUCCESS;
}
void
stretchableHeight = (controlRect.height - gridRect.height) / stretchableRowCount;
balanceHeightPixels = fmod((controlRect.height - gridRect.height), stretchableRowCount);
- if ( balanceHeightPixels > 0)
+ if (balanceHeightPixels > 0)
{
height = Math::Round((balanceHeightPixels + ROUNDOFF_VALUE) * 10.0);
}
GetInstance(_UiBuilder* pUiBuilder)
{
_GroupContainerMaker* pGroupContainerMaker = new (std::nothrow) _GroupContainerMaker(pUiBuilder);
- SysTryReturn(NID_UI_CTRL, pGroupContainerMaker, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pGroupContainerMaker, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pGroupContainerMaker;
};
rect = pControlProperty->GetRectF();
pGroupContainer = new (std::nothrow) GroupContainer();
- SysTryReturn(NID_UI_CTRL, pGroupContainer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pGroupContainer, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
// Construct
r = pGroupContainer->Construct(rect, rowCount, columnCount, lineWidth);
_GroupContainerPresenter::LoadResourceBitmaps(void)
{
result r = E_SUCCESS;
- Bitmap* pSystemChildBgBitmap = null;
- Bitmap* pGroupContainerBgBitmap = null;
__parentBgColor = GetParentColor();
- r = GET_BITMAP_CONFIG_N(GROUPCONTAINER::SYSTEM_CONTROL_BG, BITMAP_PIXEL_FORMAT_ARGB8888, pSystemChildBgBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
-
if (__pSystemChildColorReplacedBgBitmap != null)
{
delete __pSystemChildColorReplacedBgBitmap;
__pSystemChildColorReplacedBgBitmap = null;
}
- __pSystemChildColorReplacedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSystemChildBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), __parentBgColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Failed to get replacement color Bitmap.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(GROUPCONTAINER::SYSTEM_CONTROL_BG, BITMAP_PIXEL_FORMAT_ARGB8888, __parentBgColor, __pSystemChildColorReplacedBgBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
if (__pSystemChildBgEffectBitmap == null)
{
r = GET_BITMAP_CONFIG_N(GROUPCONTAINER::BORDER_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pSystemChildBgEffectBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
- r = GET_BITMAP_CONFIG_N(GROUPCONTAINER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pGroupContainerBgBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
-
if (__pGroupContainerColorReplacedBgBitmap != null)
{
delete __pGroupContainerColorReplacedBgBitmap;
__bgColor = __pGroupContainer->GetBackgroundColor();
- __pGroupContainerColorReplacedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pGroupContainerBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), __bgColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Failed to get replacement color Bitmap.", GetErrorMessage(r));
-
- delete pSystemChildBgBitmap;
- delete pGroupContainerBgBitmap;
+ r = GET_REPLACED_BITMAP_CONFIG_N(GROUPCONTAINER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __bgColor, __pGroupContainerColorReplacedBgBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- return r;
+ return E_SUCCESS;
CATCH:
- delete pSystemChildBgBitmap;
-
- delete pGroupContainerBgBitmap;
-
delete __pSystemChildColorReplacedBgBitmap;
__pSystemChildColorReplacedBgBitmap = null;
result r = E_SUCCESS;
_GroupItemImpl* pImpl = new (std::nothrow) _GroupItemImpl(pPublic);
- SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pImpl->Construct(itemSize);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
#include "FUi_TouchLongPressGestureDetector.h"
#include "FUi_TouchManager.h"
#include "FUi_UiBuilder.h"
+#include "FUi_Window.h"
#include "FUiCtrl_FastScrollEvent.h"
#include "FUiCtrl_FastScrollEventArg.h"
#include "FUiCtrl_GroupedListViewImpl.h"
// Add _TouchLongPressGestureDetector
__pLongPressedGesture = new (std::nothrow) _TouchLongPressGestureDetector();
- SysTryReturnVoidResult(NID_UI_CTRL, (__pLongPressedGesture != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pLongPressedGesture != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__core.AddGestureDetector(*__pLongPressedGesture);
result r = __pLongPressedGesture->AddGestureListener(*this);
TouchEventInfo publicTouchInfo;
_TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
- SysTryReturnVoidResult(NID_UI, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
publicTouchInfo.Construct(*pEventArg);
FloatPoint startPoint;
_TouchEventArg* pEventArg = new (std::nothrow) _TouchEventArg(__public, touchInfo.GetTouchStatus());
- SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- startPoint.SetPosition(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBoundsF().x,
- __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBoundsF().y);
+ startPoint.SetPosition(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBoundsF(true).x,
+ __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBoundsF(true).y);
pEventArg->SetTouchPosition(touchInfo.GetPointId(), startPoint.x, startPoint.y,
touchInfo.GetCurrentPosition().x, touchInfo.GetCurrentPosition().y);
, __pAccessibilityElement(null)
, __redrawListView(true)
, __isOrientationChanged(false)
+ , __isUpdateListCalled(false)
, __needReloadItems(false)
, __pPropagatedTouchEventListener(null)
{
TableViewStyle tableViewStyle = ((style == GROUPED_LIST_VIEW_STYLE_SECTION) ? TABLE_VIEW_STYLE_SECTION : TABLE_VIEW_STYLE_GROUPED);
_TableView* pCore = _TableView::CreateTableViewN(tableViewStyle, itemDivider, scrollBarStyle);
- SysTryReturn(NID_UI_CTRL, (pCore != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, (pCore != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_GroupedListViewImpl* pImpl = new (std::nothrow) _GroupedListViewImpl(pControl, pCore);
{
pProviderAdaptor = new (std::nothrow) _GroupedListViewItemProviderAdaptor(provider);
SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ "[E_OUT_OF_MEMORY] Memory allocation failed.");
pProviderAdaptor->SetListViewItemEventListener(*this);
{
pProviderAdaptor = new (std::nothrow) _GroupedListViewItemProviderAdaptor(provider);
SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ "[E_OUT_OF_MEMORY] Memory allocation failed.");
pProviderAdaptor->SetListViewItemEventListener(*this);
if (__pListItemEvent == null)
{
__pListItemEvent = new (std::nothrow) _ListItemEvent();
- SysTryReturnVoidResult(NID_UI_CTRL, (__pListItemEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pListItemEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pListItemEvent->Construct(GetPublic(), CLASSNAME_GROUPEDLISTVIEW);
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Item Event.");
if (__pFastScrollEvent == null)
{
__pFastScrollEvent = new (std::nothrow) _FastScrollEvent();
- SysTryReturnVoidResult(NID_UI_CTRL, (__pFastScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pFastScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pFastScrollEvent->Construct(GetPublic());
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct FastScroll Event.");
if (__pScrollEvent == null)
{
__pScrollEvent = new (std::nothrow) _ScrollEvent();
- SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pScrollEvent->Construct(GetPublic());
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Scroll Event.");
if (__pScrollEvent == null)
{
__pScrollEvent = new (std::nothrow) _ScrollEvent();
- SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pScrollEvent->Construct(GetPublic());
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Scroll Event.");
if (__pLinkEvent == null)
{
__pLinkEvent = _PublicLinkEvent::CreateInstanceN(GetPublic());
- SysTryReturnVoidResult(NID_UI, (__pLinkEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, (__pLinkEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
}
r = __pLinkEvent->AddListener(listener);
result
_GroupedListViewImpl::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const
{
- return GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex);
+ result r = E_SUCCESS;
+ r = GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to get top drawn item index.");
+
+ return r;
}
result
_GroupedListViewImpl::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const
{
- return GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex);
+ result r = E_SUCCESS;
+ r = GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to get bottom drawn item index.");
+
+ return r;
}
result
_ListViewItemStatus itemStatus;
memset(&itemStatus, 0, sizeof(_ListViewItemStatus));
bool needChangeEventTarget = false;
+ bool itemFocused = false;
+ bool annexFocused = false;
+ int focusedGroupedIndex = -1;
+ int focusedItemIndex = -1;
if (pListViewItem != null && pListViewItem->IsItemSelected())
{
needChangeEventTarget = true;
}
+ GetCore().GetFocusedItemIndex(focusedGroupedIndex, focusedItemIndex);
+ if (focusedGroupedIndex == groupIndex && focusedItemIndex == itemIndex)
+ {
+ if (GetCore().IsAnnexFocused())
+ {
+ annexFocused = true;
+ }
+ else
+ {
+ itemFocused = true;
+ }
+ }
+
if (needChangeEventTarget && (pListViewItem != null))
{
pListViewItem->GetCurrentStatus(itemStatus);
pTarget->SetChangingEventTarget(true);
_TouchManager::GetInstance()->SetChangedTouchableTarget(pTarget);
}
+
+ if (pListViewItem && pListViewItem->IsFocusable()
+ && pListViewItem->GetEnableState() && pListViewItem->GetVisibleState()
+ && pListViewItem->GetRootWindow() && pListViewItem->GetRootWindow()->IsActivated())
+ {
+ if (itemFocused)
+ {
+ GetCore().SetFocused(true);
+ pListViewItem->SetFocused(true);
+ pListViewItem->DrawFocus();
+ itemFocused = false;
+ }
+ else if (annexFocused)
+ {
+ GetCore().SetFocused(true);
+ pListViewItem->DrawAnnexFocus();
+ annexFocused = false;
+ }
+ }
}
}
else
}
result
-_GroupedListViewImpl::UpdateList(void)
+_GroupedListViewImpl::UpdateList(bool isRestoreAnnexFocusValue)
{
__needReloadItems = true;
- result r = GetCore().UpdateTableView();
+ result r = GetCore().UpdateTableView(isRestoreAnnexFocusValue);
CheckEmptyListShowState();
GetCore().AttachChild(*__pEmptyText);
}
- TextObject* pText = new (std::nothrow) TextObject;
+ TextObject* pText = new (std::nothrow) TextObject();
SysTryReturn(NID_UI_CTRL, (pText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
pText->Construct();
{
__pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pAccessibilityElement->SetName(L"ListView");
if (__pEmptyText != null)
{
textPos.x = ((_FloatCompare(listDimension.width, emptyText.width)) ? 0.0f : (listDimension.width - emptyText.width) / 2.0f);
- textPos.y = ((listDimension.height <= totalHeight ) ? (bitmapPos.y + emptyBitmap.height + horizontalSpacing) : (listDimension.height - totalHeight) / 2.0f);
+ textPos.y = ((listDimension.height <= totalHeight) ? (bitmapPos.y + emptyBitmap.height + horizontalSpacing) : (listDimension.height - totalHeight) / 2.0f);
}
}
void
_GroupedListViewImpl::OnChangeLayout(_ControlOrientation orientation)
{
- __isOrientationChanged = true;
+ if (__isUpdateListCalled)
+ {
+ __isUpdateListCalled = false;
+ }
+ else
+ {
+ __isOrientationChanged = true;
+ }
+
+ if (GetCore().IsFocusModeStateEnabled() && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated())
+ {
+ GetCore().SetFocusDuringOrientationChange();
+ }
_ControlImpl::OnChangeLayout(orientation);
}
void
_GroupedListViewImpl::OnBoundsChanged(void)
{
+ _Control* pParent = GetCore().GetParentFormOrWindow();
+
+ if (pParent != null && (pParent->GetOrientation() != GetCore().GetOrientation()))
+ {
+ __isOrientationChanged = true;
+ __isUpdateListCalled = true;
+ }
+
_ControlImpl::OnBoundsChanged();
if (__pEmptyBitmap != null)
if (__isOrientationChanged)
{
- if (GetCore().IsTableViewFocused())
+ __isOrientationChanged = false;
+
+ if (GetCore().IsTableViewFocused() && GetCore().IsFocusModeStateEnabled()
+ && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated())
{
- GetCore().RestoreFocus(true);
+ UpdateList(true);
+ }
+ else
+ {
+ UpdateList();
}
- __isOrientationChanged = false;
- UpdateList();
}
}
if (pListViewItem != null)
{
pListViewItem->SetFont(fontName);
+ pListViewItem->SetItemChanged(true);
}
}
}
_GroupedListViewImpl::GetCurrentTouchPosition(void)
{
FloatPoint currentTouchPos = _TouchManager::GetInstance()->GetScreenPoint(0);
- FloatRectangle bounds = GetCore().GetAbsoluteBoundsF();
+ FloatRectangle bounds = GetCore().GetAbsoluteBoundsF(true);
currentTouchPos.x -= bounds.x;
currentTouchPos.y -= bounds.y;
, __pItemNeedsLazyDeletion(null)
, __pLazyDeletionItem(null)
, __usingFloatingPoint(false)
+ , __pDefaultItem(null)
{
}
, __pItemNeedsLazyDeletion(null)
, __pLazyDeletionItem(null)
, __usingFloatingPoint(true)
+ , __pDefaultItem(null)
{
}
_GroupedListViewItemProviderAdaptor::~_GroupedListViewItemProviderAdaptor()
{
+ delete __pDefaultItem;
+ __pDefaultItem = null;
+
__descriptionTextShowItem.clear();
SetItemLazyDeletion(null);
{
ListItemBase* pItemBase = null;
GroupItem* pGroupItem = null;
- _TableViewItem* pTableViewItem = null;
+ _IListItemCommon* pDefaultItem = null;
if (itemIndex == -1)
{
if (pGroupItem == null)
{
- pTableViewItem = GetDefaultItem();
- pTableViewItem->SetAppInfo(null);
+ pDefaultItem = GetDefaultItem();
+ pDefaultItem->SetAppInfo(null);
- return pTableViewItem;
+ return pDefaultItem;
}
}
else
if (pItemBase == null)
{
- pTableViewItem = GetDefaultItem();
- pTableViewItem->SetAppInfo(null);
+ pDefaultItem = GetDefaultItem();
+ pDefaultItem->SetAppInfo(null);
- return pTableViewItem;
+ return pDefaultItem;
}
}
}
}
+_IListItemCommon*
+_GroupedListViewItemProviderAdaptor::GetDefaultItem(void)
+{
+ if (__pDefaultItem == null)
+ {
+ _ListViewItem* pListViewItem = _ListViewItem::CreateListViewItemN(0.0f);
+ pListViewItem->SetFocusable(false);
+
+ __pDefaultItem = pListViewItem;
+ }
+
+ return __pDefaultItem;
+}
+
}}} // Tizen::Ui::Controls
result
_HeaderImpl::AddItem(const HeaderItem& item)
{
- SysTryReturnResult(NID_UI_CTRL, (__style != HEADER_STYLE_TITLE), E_SYSTEM, "[E_SYSTEM] Unable to add the item because the current style does not support it.");
-
result r = CheckItemValidate(item);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- if (IsFailed(r))
- {
- return r;
- }
+ r = CheckItemExceed(item);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ SysTryReturnResult(NID_UI_CTRL, (__style != HEADER_STYLE_TITLE),
+ E_SYSTEM, "[E_SYSTEM] Unable to add the item because the current style does not support it.");
if (__style == HEADER_STYLE_TITLE_BUTTON && GetItemCount() >= 1)
{
_HeaderImpl::InsertItemAt(int itemIndex, const HeaderItem& item)
{
result r = CheckItemValidate(item);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- if (IsFailed(r))
- {
- return r;
- }
+ r = CheckItemExceed(item);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
SysTryReturnResult(NID_UI_CTRL, (__style == HEADER_STYLE_SEGMENTED || __style == HEADER_STYLE_SEGMENTED_WITH_TITLE
|| __style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_WITH_TITLE || __style == HEADER_STYLE_TAB_LARGE
result
_HeaderImpl::SetButton(ButtonPosition position, const ButtonItem& button)
{
- SysTryReturnResult(NID_UI_CTRL, (!(__style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_LARGE)), E_INVALID_OPERATION,
- "[E_INVALID_OPERATION] This operation is not supported.");
+ SysTryReturnResult(NID_UI_CTRL, _ButtonItemImpl::GetInstance(button) != null,
+ E_INVALID_ARG, "[E_INVALID_ARG] The ButtonItem isn't constructed.");
- SysTryReturnResult(NID_UI_CTRL, (button.GetActionId() >= HEADER_ACTION_ID_MIN && button.GetActionId() <= HEADER_ACTION_ID_MAX),
+ SysTryReturnResult(NID_UI_CTRL, button.GetActionId() >= HEADER_ACTION_ID_MIN,
E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
+ SysTryReturnResult(NID_UI_CTRL, (!(__style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_LARGE)),
+ E_INVALID_OPERATION, "[E_INVALID_OPERATION] This operation is not supported.");
+
int count = GetItemCount();
if (HEADER_STYLE_TAB_WITH_TITLE != __style)
result
_HeaderImpl::SetItemAt(int itemIndex, const HeaderItem& item)
{
- SysTryReturnResult(NID_UI_CTRL, (item.GetActionId() != -1), E_INVALID_ARG, "[E_INVALID_ARG] The HeaderItem isn't constructed.");
-
- if (item.GetActionId() < HEADER_ACTION_ID_MIN || item.GetActionId() > HEADER_ACTION_ID_MAX)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
- return E_INVALID_ARG;
- }
+ result r = CheckItemValidate(item);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
int count = GetItemCount();
{
result r = E_SUCCESS;
- SysTryReturnResult(NID_UI_CTRL, (item.GetActionId() != -1), E_INVALID_ARG, "[E_INVALID_ARG] The HeaderItem isn't constructed.");
+ SysTryReturnResult(NID_UI_CTRL, _HeaderItemImpl::GetInstance(item) != null,
+ E_INVALID_ARG, "[E_INVALID_ARG] The HeaderItem isn't constructed.");
+
+ SysTryReturnResult(NID_UI_CTRL, item.GetActionId() >= HEADER_ACTION_ID_MIN,
+ E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
+
+ return r;
+}
+
+result
+_HeaderImpl::CheckItemExceed(const HeaderItem& item)
+{
+ result r = E_SUCCESS;
int count = GetItemCount();
goto CATCH;
}
- if (item.GetActionId() < HEADER_ACTION_ID_MIN || item.GetActionId() > HEADER_ACTION_ID_MAX)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
- r = E_INVALID_ARG;
- goto CATCH;
- }
-
- return (r);
+ return r;
CATCH:
- return (r);
+ return r;
}
ToolbarStyle
extentSize = extentSizeMin;
}
- pButton->SetMargin(textMargin, 0.0f, textMargin, 0.0f);
+ pButton->SetMargin(textMargin, 0.0f, textMargin - 1, 0.0f);
pButton->SetBounds(FloatRectangle(0.0f, 0.0f, extentSize, buttonItemHeight));
}
else
result
_HeaderItemImpl::Construct(int actionId)
{
- SysTryReturnResult(NID_UI_CTRL, (actionId >= HEADER_ITEM_ACTION_ID_MIN && actionId <= HEADER_ITEM_ACTION_ID_MAX),
+ SysTryReturnResult(NID_UI_CTRL, actionId >= HEADER_ITEM_ACTION_ID_MIN,
E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
__actionId = actionId;
result
_HeaderItemImpl::SetActionId(int actionId)
{
- SysTryReturnResult(NID_UI_CTRL, (actionId >= HEADER_ITEM_ACTION_ID_MIN && actionId <= HEADER_ITEM_ACTION_ID_MAX),
+ SysTryReturnResult(NID_UI_CTRL, actionId >= HEADER_ITEM_ACTION_ID_MIN,
E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid.");
__actionId = actionId;
if (pNormalBitmap != null)
{
__pNormalBitmap = new (std::nothrow) Bitmap();
- SysTryReturnVoidResult(NID_UI_CTRL, (__pNormalBitmap != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pNormalBitmap != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
result r = __pNormalBitmap->Construct(*pNormalBitmap, Rectangle(0, 0, pNormalBitmap->GetWidth(), pNormalBitmap->GetHeight()));
if (IsFailed(r))
if (pFocusedBitmap != null)
{
__pFocusedBitmap = new (std::nothrow) Bitmap();
- SysTryReturnVoidResult(NID_UI_CTRL, (__pFocusedBitmap != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pFocusedBitmap != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
result r = __pFocusedBitmap->Construct(*pFocusedBitmap, Rectangle(0, 0, pFocusedBitmap->GetWidth(), pFocusedBitmap->GetHeight()));
if (IsFailed(r))
SysTryReturn(NID_UI_CTRL, (pCore != null), null, GetLastResult(), "[%s] Creating iconListView instance failed", GetErrorMessage(GetLastResult()));
_IconListImpl* pImpl = new (std::nothrow) _IconListImpl(pControl, pCore);
- SysTryCatch(NID_UI_CTRL, (pImpl != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, (pImpl != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pImpl;
break;
}
- SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Invalid Icon List style" );
+ SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Invalid Icon List style");
r = GetCore().SetStyle(__annexStyle);
SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Failed to set style", GetErrorMessage(r));
_IconListImpl::SetItemProvider(void)
{
__pIconListItemProvider = new (std::nothrow) _IconListItemProvider(this);
- SysTryReturnResult(NID_UI_CTRL, __pIconListItemProvider, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnResult(NID_UI_CTRL, __pIconListItemProvider, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return GetCore().SetItemProvider(*__pIconListItemProvider);
}
_IconListImpl::AddItemEventListener(IItemEventListener& listener)
{
_ListListener* pIconListListener = new (std::nothrow) _ListListener();
- SysTryReturnVoidResult(NID_UI_CTRL, pIconListListener, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pIconListListener, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pIconListListener->pListener = &listener;
if (__pAccessibilityElement != null)
{
- if (__pAccessibilityElement->GetParent() != null )
+ if (__pAccessibilityElement->GetParent() != null)
{
__pAccessibilityElement->GetParent()->RemoveElement(*__pAccessibilityElement);
}
{
result r = E_SUCCESS;
_IconListItem* pItem = null;
- _VisualElement* pBase = new (std::nothrow) _VisualElement;
+ _VisualElement* pBase = new (std::nothrow) _VisualElement();
SysTryReturn(NID_UI_CTRL, (pBase != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pBase->Construct();
}
bool
-_IconListItem::DrawItem(FloatRectangle& rect, ListItemState isFocused, int itemIndex)
+_IconListItem::DrawItem(FloatRectangle& rect, ListItemState isFocused, int itemIndex, bool overwriteItemBG)
{
SysAssertf(__pProperty != null, "Not yet initialized. SetDrawingProperty() should be called before use.");
// Support Accessibility
if (__pProperty->IsAccessibilityEnabled())
{
- SetItemAccessibilityElement(rect, itemIndex);
+ if (itemIndex != -1)
+ {
+ SetItemAccessibilityElement(rect, itemIndex);
+ }
}
if (!__pProperty->IsChanged() && __isDrawn && __foreDrawnState == isFocused)
pCanvas->Clear();
float margin = __pProperty->GetSelectBackgroundMargin();
- pCanvas->FillRectangle(__pProperty->GetBackgroundColor(status), FloatRectangle(margin, margin, rect.width - margin, rect.height - margin));
+ if (status == ICON_LIST_VIEW_ITEM_DRAWING_STATUS_PRESSED && overwriteItemBG)
+ {
+ pCanvas->FillRectangle(__pProperty->GetBackgroundColor(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL), FloatRectangle(margin, margin, rect.width - margin, rect.height - margin));
+ }
+ else
+ {
+ pCanvas->FillRectangle(__pProperty->GetBackgroundColor(status), FloatRectangle(margin, margin, rect.width - margin, rect.height - margin));
+ }
// Draw Bitmap
Bitmap* pBitmap = (__pBitmap[isFocused] != null) ? __pBitmap[isFocused] : __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL];
if (__pTextObject == null)
{
- __pTextObject = new (std::nothrow) TextObject;
+ __pTextObject = new (std::nothrow) TextObject();
+ SysTryReturnResult(NID_UI_CTRL, __pTextObject, E_OUT_OF_MEMORY, "Memory allocation failed.");
+
wchar_t* pStr = const_cast <wchar_t*>(__text.GetPointer());
__pTextObject->Construct();
- TextSimple* pSimpleText = new (std::nothrow)TextSimple(pStr, __text.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
+ TextSimple* pSimpleText = new (std::nothrow) TextSimple(pStr, __text.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
+ SysTryReturnResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "Memory allocation failed.");
+
__pTextObject->AppendElement(*pSimpleText);
__pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
- if (__pProperty->GetFocusBitmap() != null)
- {
- const Bitmap* pShadowBitmap = __pProperty->GetFocusBitmap();
- Color focusUiColor = __pProperty->GetBorderColor(isFocused);
-
- pShadowBitmap = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pShadowBitmap, Color::GetColor(COLOR_ID_MAGENTA), focusUiColor);
- SysTryReturn(NID_UI_CTRL, pShadowBitmap != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ const Bitmap* pShadowBitmap = __pProperty->GetFocusBitmap();
+ if (pShadowBitmap != null)
+ {
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pShadowBitmap))
{
pCanvas->DrawNinePatchedBitmap(__pProperty->GetDropShadowBitmapBounds(), *pShadowBitmap);
pCanvas->DrawBitmap(__pProperty->GetDropShadowBitmapBounds(), *pShadowBitmap);
}
__pFocusVE->SetShowState(true);
- delete pShadowBitmap;
}
delete pCanvas;
}
delete __pBitmap[status];
__pBitmap[status] = pCopiedBitmap;
}
+ else
+ {
+ delete pCopiedBitmap;
+ }
__isDrawn = false;
, __highlightedTextColor(0)
, __size(0.0f, 0.0f)
, __bitmapBounds(0.0f, 0.0f, 0.0f, 0.0f)
- , __pDropShadowBitmap(null)
, __pFocusBitmap(null)
, __pDropShadowBitmapWithReplacementColor(null)
, __dropShadowBorderWidth(0.0f)
_IconListItemDrawingProperty::~_IconListItemDrawingProperty(void)
{
- delete __pDropShadowBitmap;
- __pDropShadowBitmap = null;
-
delete __pFocusBitmap;
__pFocusBitmap = null;
_IconListItemDrawingProperty*
_IconListItemDrawingProperty::CreateInstanceN(void)
{
- _IconListItemDrawingProperty* pProperty = new (std::nothrow) _IconListItemDrawingProperty;
+ _IconListItemDrawingProperty* pProperty = new (std::nothrow) _IconListItemDrawingProperty();
SysTryReturn(NID_UI_CTRL, (pProperty != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
result r = pProperty->Initialize();
GET_FIXED_VALUE_CONFIG(ICONLIST::DROP_SHADOW_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, width);
GET_FIXED_VALUE_CONFIG(ICONLIST::DROP_SHADOW_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, height);
+ // Load border color
+ GET_COLOR_CONFIG(ICONLIST::ITEM_BORDER_NORMAL, __normalBorderColor);
+ GET_COLOR_CONFIG(ICONLIST::ITEM_BORDER_HIGHLIGHTED, __focusBorderColor);
+
if (!_FloatCompareLE(width, 0.0f) && !_FloatCompareLE(height, 0.0f))
{
- r = GET_BITMAP_CONFIG_N(ICONLIST::ITEM_BORDER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDropShadowBitmap);
- if (r != E_SUCCESS)
- {
- delete __pDropShadowBitmap;
- __pDropShadowBitmap = null;
-
- SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r));
- return r;
- }
-
- r = GET_BITMAP_CONFIG_N(ICONLIST::ITEM_BORDER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pFocusBitmap);
- if (r != E_SUCCESS)
- {
- delete __pFocusBitmap;
- __pFocusBitmap = null;
+ r = GET_REPLACED_BITMAP_CONFIG_N(ICONLIST::ITEM_BORDER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __normalBorderColor, __pDropShadowBitmapWithReplacementColor);
+ SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
- SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r));
- return r;
- }
+ r = GET_REPLACED_BITMAP_CONFIG_N(ICONLIST::ITEM_BORDER_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __focusBorderColor, __pFocusBitmap);
+ SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
}
// Load Check Bitmap
GET_COLOR_CONFIG(ICONLIST::ITEM_BG_PRESSED, __pressedBackgroundColor);
__pressedBackgroundColor.SetAlpha(0x80);
- // Load border color
- GET_COLOR_CONFIG(ICONLIST::ITEM_BORDER_NORMAL, __normalBorderColor);
- GET_COLOR_CONFIG(ICONLIST::ITEM_BORDER_HIGHLIGHTED, __focusBorderColor);
-
- // Load Drop Shadow Bitmap with Replacement Color
- if (__pDropShadowBitmap != null)
- {
- __pDropShadowBitmapWithReplacementColor = _BitmapImpl::GetColorReplacedBitmapN(*__pDropShadowBitmap,
- Color::GetColor(COLOR_ID_MAGENTA), __normalBorderColor);
- SysTryReturn(NID_UI_CTRL, (__pDropShadowBitmapWithReplacementColor != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
- }
-
// Load Item Text Size & color
GET_SHAPE_CONFIG(ICONLIST::FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __textSize);
GET_COLOR_CONFIG(ICONLIST::INNER_TEXT_BG_NORMAL, __inTextBackgroundColor);
_IconListItemDrawingProperty* pItemDrawingProperty = null;
// Create _ListModel
- _ListViewModel* pListModel = new (std::nothrow) _ListViewModel;
+ _ListViewModel* pListModel = new (std::nothrow) _ListViewModel();
SysTryCatch(NID_UI_CTRL, (pListModel != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
// Create _IconListPresenter
result
_IconListPresenter::Dispose(void)
{
+ StopAllAnimations();
+
delete __pListModel;
__pListModel = null;
if (pItemProviderAdaptor == null)
{
// Create Default _IconListItemProviderAdaptor
- pAdaptor = new (std::nothrow) _IconListItemProviderAdaptor;
+ pAdaptor = new (std::nothrow) _IconListItemProviderAdaptor();
SysTryReturn(NID_UI_CTRL, (pAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Memory allocation failed.");
SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
__needSetAccessibility = true;
- RedrawItem(index);
+ RedrawItem(index, __highlightedIndex == index);
+
return r;
}
}
SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
__selectedIndex = INVALID_INDEX;
- __highlightedIndex = INVALID_INDEX;
+
+ if (!__pIconListView->IsFocusModeStateEnabled())
+ {
+ __highlightedIndex = INVALID_INDEX;
+ }
+
__isLayoutChanged = true;
__alreadyDrawn = false;
__listStatusChanged = true;
if (pScroll != null)
{
__scrollLength = 0.0f;
+
+ if (__pIconListView->GetScrollStyle() == ICON_LIST_SCROLL_STYLE_FIXED || __pIconListView->GetScrollStyle() == ICON_LIST_SCROLL_STYLE_THUMB)
+ {
+ ChangeScrollBarVisibility(viewBounds.height, viewBounds.height);
+ }
+
pScroll->SetScrollRange(viewBounds.height, viewBounds.height);
pScroll->EnableScrollingEffect(false);
}
pFont = __pIconListView->GetFallbackFont();
SysTryCatch(NID_UI, pFont != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- pTextObject = new (std::nothrow) TextObject;
+ pTextObject = new (std::nothrow) TextObject();
SysTryCatch(NID_UI, pTextObject != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pTextObject->Construct();
_Scroll* pScroll = __pIconListView->GetScroll();
if (pScroll != null)
{
+ if (__pIconListView->GetScrollStyle() == ICON_LIST_SCROLL_STYLE_FIXED || __pIconListView->GetScrollStyle() == ICON_LIST_SCROLL_STYLE_THUMB)
+ {
+ ChangeScrollBarVisibility(bounds.height, __scrollLength + bounds.height);
+ }
+
pScroll->SetScrollRange(bounds.height, __scrollLength + bounds.height);
if (_FloatCompareLE(__scrollLength, 0.0f))
_Scroll* pScroll = __pIconListView->GetScroll();
if (pScroll != null)
{
+
+ if (__pIconListView->GetScrollStyle() == ICON_LIST_SCROLL_STYLE_FIXED || __pIconListView->GetScrollStyle() == ICON_LIST_SCROLL_STYLE_THUMB)
+ {
+ ChangeScrollBarVisibility(bounds.width, __scrollLength + bounds.width);
+ }
+
pScroll->SetScrollRange(bounds.width, __scrollLength + bounds.width);
if (_FloatCompareLE(__scrollLength, 0.0f))
{
pItem->DrawItem(itemRect, LIST_ITEM_STATE_PRESSED);
}
+ else if (__isTouchPressed && __selectedIndex == index && !drawFocusUi)
+ {
+ if (__pIconListView->IsInReorderingMode() == false)
+ {
+ pItem->DrawItem(itemRect, LIST_ITEM_STATE_PRESSED, index, true);
+ }
+ }
else if (__highlightedIndex == index && drawFocusUi)
{
pItem->DrawItem(itemRect, LIST_ITEM_STATE_HIGHLIGHTED);
if (_AccessibilityManager::IsActivated())
{
_AccessibilityElement* pAccessibilityElement = pItem->GetItemAccessibilityElement();
- if (pAccessibilityElement->GetParent() == null && __needSetAccessibility)
+ if ((pAccessibilityElement == null || pAccessibilityElement->GetParent() == null) && __needSetAccessibility)
{
pItem->SetItemAccessibilityElement(itemRect, index);
SetAccessibilityElement(index, pItem);
}
result r = E_SUCCESS;
- _Scroll *pScroll =__pIconListView->GetScroll();
+ _Scroll* pScroll =__pIconListView->GetScroll();
if (pScroll != null)
{
pScroll->SetScrollingEffectVisibility(true);
if (__pTouchActionTimer == null)
{
- __pTouchActionTimer = new (std::nothrow) Timer;
+ __pTouchActionTimer = new (std::nothrow) Timer();
SysTryReturn(NID_UI_CTRL, (__pTouchActionTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pTouchActionTimer->Construct(*this);
if (__pMagneticScrollTimer == null)
{
- __pMagneticScrollTimer = new (std::nothrow) Timer;
+ __pMagneticScrollTimer = new (std::nothrow) Timer();
SysTryReturn(NID_UI_CTRL, (__pMagneticScrollTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pMagneticScrollTimer->Construct(*this);
if (__pReorderScrollTimer == null)
{
- __pReorderScrollTimer = new (std::nothrow) Timer;
+ __pReorderScrollTimer = new (std::nothrow) Timer();
SysTryReturn(NID_UI_CTRL, (__pReorderScrollTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pReorderScrollTimer->Construct(*this);
if (__pAnimationTimer == null)
{
- __pAnimationTimer = new (std::nothrow) Timer;
+ __pAnimationTimer = new (std::nothrow) Timer();
SysTryReturn(NID_UI_CTRL, (__pAnimationTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pAnimationTimer->Construct(*this);
if (__pRunningAnimationCheckTimer == null)
{
- __pRunningAnimationCheckTimer = new (std::nothrow) Timer;
+ __pRunningAnimationCheckTimer = new (std::nothrow) Timer();
SysTryReturn(NID_UI_CTRL, (__pRunningAnimationCheckTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pRunningAnimationCheckTimer->Construct(*this);
if (__pFirstShowScrollTimer == null)
{
- __pFirstShowScrollTimer = new (std::nothrow) Timer;
+ __pFirstShowScrollTimer = new (std::nothrow) Timer();
SysTryReturn(NID_UI_CTRL, (__pFirstShowScrollTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pFirstShowScrollTimer->Construct(*this);
void
_IconListPresenter::OnDrawFocus(void)
{
- __highlightedIndex = 0;
+ if (__highlightedIndex == INVALID_INDEX)
+ {
+ __highlightedIndex = 0;
+ }
+
DrawFocusUi(__highlightedIndex);
}
+void
+_IconListPresenter::OnFocusLost(void)
+{
+ if (__highlightedIndex != INVALID_INDEX)
+ {
+ RedrawItem(__highlightedIndex, false);
+ }
+}
Canvas*
_IconListPresenter::OnCanvasRequestedN(const FloatRectangle& bounds)
bool
_IconListPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (!__pIconListView->IsFocusModeStateEnabled() || !__pIconListView->IsVisible() || !__pIconListView->IsEnabled() || !__pIconListView->IsFocusable())
+ {
+ return false;
+ }
+
if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL)
{
return SetFocusUiIndexVerticalScrollList(keyInfo);
bool
_IconListPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (!__pIconListView->IsFocusModeStateEnabled() || !__pIconListView->IsVisible() || !__pIconListView->IsEnabled() || !__pIconListView->IsFocusable())
+ {
+ return false;
+ }
+
switch (keyInfo.GetKeyCode())
{
case _KEY_TAB:
if (__highlightedIndex != INVALID_INDEX)
{
PreDrawCheckAnimation(__highlightedIndex);
- FireEventAfterTouchRelease(__highlightedIndex);
if (__isTouchAnimationEnabled)
{
{
DrawCheckAnimation(__highlightedIndex);
}
+
+ FireEventAfterTouchRelease(__highlightedIndex);
}
}
break;
__isSelectionDelayed = false;
PreDrawCheckAnimation(fireIndex);
- FireEventAfterTouchRelease(fireIndex);
if (__isTouchAnimationEnabled)
{
{
DrawCheckAnimation(fireIndex);
}
+
+ FireEventAfterTouchRelease(fireIndex);
}
else if (__pTouchActionTimer != null)
{
__isSelectionDelayed = true;
PreDrawCheckAnimation(fireIndex);
- FireEventAfterTouchRelease(fireIndex);
if (__isTouchAnimationEnabled)
{
{
DrawCheckAnimation(fireIndex);
}
+
+ FireEventAfterTouchRelease(fireIndex);
}
}
}
if (direction == _ACCESSIBILITY_FOCUS_DIRECTION_PREVIOUS)
{
int lastItemIndex = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) - 1;
- currentItemIndex = (__firstDrawnIndex == 0) ? __lastDrawnIndex + 1 : __lastDrawnIndex;
+ currentItemIndex = (__lastDrawnIndex == lastItemIndex) ? __lastDrawnIndex : __lastDrawnIndex + 1;
pItem = static_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, currentItemIndex));
__RequestToDrawAccessibilityFocusUi = true;
RequestToDrawAccessibilityFocusUi();
- return true;
+ if (currentItemIndex == lastItemIndex)
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
}
return false;
}
pItemVE = pItem->GetItemVisualElement();
if (pItemVE != null)
{
- MoveAnimation(*pItem, startBounds, endBounds, ITEM_ANIMATION_DELAY);
+ if (pItem->IsDrawn())
+ {
+ pItem->ClearVisualElement();
+ pItem->SetDrawingProperty(*__pItemDrawingProperty);
+ pItem->DrawItem(endBounds, LIST_ITEM_STATE_NORMAL);
+ }
+ else
+ {
+ MoveAnimation(*pItem, startBounds, endBounds, ITEM_ANIMATION_DELAY);
+ }
}
}
}
void
_IconListPresenter::DrawFocusUi(int focusUiIndex)
{
+ StopAllAnimations();
+
+ // Reset Timer
+ ResetAnimationTimer();
+ ResetTouchActionTimer();
+ ResetMagneticScrollTimer();
+
int lastItemIndex = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) - 1;
- if (focusUiIndex < 0 )
+ if (focusUiIndex < 0)
{
__highlightedIndex = 0;
}
__highlightedIndex = lastItemIndex;
}
- if (!__firstDrawnItemFullyDrawn && (focusUiIndex >= __firstDrawnIndex && focusUiIndex <= __firstDrawnIndex + GetItemCountPerAxis() - 1))
+ if (!__firstDrawnItemFullyDrawn && (__highlightedIndex >= __firstDrawnIndex && __highlightedIndex <= __firstDrawnIndex + GetItemCountPerAxis() - 1))
{
- ScrollToItem(focusUiIndex);
+ ScrollToItem(__highlightedIndex);
__pIconListView->Draw();
}
- else if (!__lastDrawnItemFullyDrawn && (__lastDrawnIndex - focusUiIndex <= GetItemCountPerAxis() - 1))
+ else if (!__lastDrawnItemFullyDrawn && (__lastDrawnIndex - __highlightedIndex <= GetItemCountPerAxis() - 1))
{
- ScrollToItem(focusUiIndex);
+ ScrollToItem(__highlightedIndex);
__pIconListView->Draw();
}
- if (focusUiIndex < __firstDrawnIndex || focusUiIndex > __lastDrawnIndex)
+ if (__highlightedIndex < __firstDrawnIndex || __highlightedIndex > __lastDrawnIndex)
{
- ScrollToItem(focusUiIndex);
+ ScrollToItem(__highlightedIndex);
__pIconListView->Draw();
}
DrawFocusUi(__highlightedIndex);
return true;
}
+
+void
+_IconListPresenter::ChangeScrollBarVisibility(float viewRange, float scrollRange)
+{
+ _Scroll* pScroll = __pIconListView->GetScroll();
+ SysTryReturnVoidResult(NID_UI_CTRL, (pScroll != NULL), E_SYSTEM,
+ "[%s] A system error has occurred. _Scroll instance must not be null.", GetErrorMessage(E_SYSTEM));
+
+ if (viewRange >= scrollRange)
+ {
+ pScroll->SetScrollVisibility(false);
+ }
+ else
+ {
+ pScroll->SetScrollVisibility(true);
+ }
+}
+
}}} // Tizen::Ui::Controls
ClearLastResult();
// Create _IconListView
- pCore = new (std::nothrow) _IconListView;
+ pCore = new (std::nothrow) _IconListView();
SysTryReturn(NID_UI_CTRL, (pCore != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pCore->AcquireHandle();
SysTryCatch(NID_UI_CTRL, (GetVisualElement() != null), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Unable to initialize IconList.");
// Create _UiIconListItemEvent
- __pIconListItemEvent = new (std::nothrow) _UiIconListItemEvent;
+ __pIconListItemEvent = new (std::nothrow) _UiIconListItemEvent();
SysTryCatch(NID_UI_CTRL, (__pIconListItemEvent != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Memory allocation failed.");
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Unable to construct Event.");
// Create _UiScrollEvent
- __pScrollEvent = new (std::nothrow) _UiScrollEvent;
+ __pScrollEvent = new (std::nothrow) _UiScrollEvent();
SysTryCatch(NID_UI_CTRL, (__pScrollEvent != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Memory allocation failed.");
AnimationTransaction::SetTransactionEventListener(this);
- __pScrollingAnimation = new (std::nothrow) VisualElementValueAnimation;
- SysTryCatch(NID_UI_CTRL, (__pScrollEvent != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
+ __pScrollingAnimation = new (std::nothrow) VisualElementValueAnimation();
+ SysTryCatch(NID_UI_CTRL, (__pScrollingAnimation != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] Memory allocation failed.");
__pScrollingAnimation->SetRepeatCount(SCROLL_ANIMATION_DEFAULT_REPEAT_COUNT);
return E_SUCCESS;
}
+IconListViewScrollStyle
+_IconListView::GetScrollStyle(void) const
+{
+ return __scrollStyle;
+}
+
result
_IconListView::SetBackgroundBitmap(const Bitmap* pBitmap)
{
(((__scrollStyle == ICON_LIST_SCROLL_STYLE_FIXED) || (__scrollStyle == ICON_LIST_SCROLL_STYLE_THUMB)) ? false : true),
((__scrollStyle == ICON_LIST_SCROLL_STYLE_JUMP_TO_TOP) ? true : false),
((__scrollStyle == ICON_LIST_SCROLL_STYLE_THUMB) ? true : false),
- (((__scrollStyle == ICON_LIST_SCROLL_STYLE_FIXED) || (__scrollStyle == ICON_LIST_SCROLL_STYLE_THUMB)) ? true : false), 1, 1, 0);
+ false, 1, 1, 0);
SysTryReturn(NID_UI_CTRL, __pScroll != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pIconListPresenter->OnDrawFocus();
}
+bool
+_IconListView::OnFocusLost(const _Control& source)
+{
+ if (&source != this)
+ {
+ return false;
+ }
+
+ __pIconListPresenter->OnFocusLost();
+ return true;
+}
+
Canvas*
_IconListView::OnCanvasRequestedN(const FloatRectangle& bounds)
{
GetProperty(pControl, &pControlProperty);
SysTryReturn(NID_UI, (pControlProperty != null), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Unable to read attributes.");
- IconListView* pIconListView = new (std::nothrow) IconListView;
+ IconListView* pIconListView = new (std::nothrow) IconListView();
SysTryReturn(NID_UI, (pIconListView != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
ClearLastResult();
*/
#include <FGrpRectangle.h>
+#include <FUiAnimAnimationTransaction.h>
+#include <FUiAnimVisualElementPropertyAnimation.h>
#include <FGrp_CoordinateSystem.h>
#include <FUiAnim_VisualElementSurfaceImpl.h>
#include "FUiAnim_VisualElement.h"
#include "FUi_EcoreEvas.h"
#include "FUi_ResourceManager.h"
#include "FUi_CoordinateSystemUtils.h"
+#include "FUi_UiEventManager.h"
#include "FUi_Window.h"
+#include "FUi_TouchManager.h"
#include "FUiCtrl_Form.h"
+#include "FUiCtrl_Frame.h"
#include "FUiCtrl_Indicator.h"
#include "FUiCtrl_IndicatorManager.h"
#include "FUiAnim_EflVisualElementSurfaceImpl.h"
using namespace Tizen::Ui;
using namespace Tizen::Ui::Animations;
-namespace Tizen { namespace Ui { namespace Controls
+namespace
{
+const char* pPortraitSvcName = "elm_indicator_portrait";
+const char* pLandScapeSvcName = "elm_indicator_landscape";
+const char* pPortPublicKey = "__Plug_Ecore_Evas_Port";
+const char* pLandPublicKey = "__Plug_Ecore_Evas_Land";
+const char* pIndicatorKey = "Inidcator_Manager_Object";
+const int CONNECTION_INTERVAL = 1000;
+const int ANIMATION_INTERVAL = 3000;
+const int ANIMATION_DURATION = 200;
+
+const int MSG_DOMAIN_CONTROL_INDICATOR = 0x10001;
+const int MSG_ID_INDICATOR_REPEAT_EVENT = 0x10002;
+const int MSG_ID_INDICATOR_START_ANIMATION = 0X10006;
+}
-static const char* pPortraitSvcName = "elm_indicator_portrait";
-static const char* pLandScapeSvcName = "elm_indicator_landscape";
-static const char* pPortPublicKey = "__Plug_Ecore_Evas_Port";
-static const char* pLandPublicKey = "__Plug_Ecore_Evas_Land";
-static const char* pIndicatorKey = "Inidcator_Manager_Object";
-static const int CONNECTION_INTERVAL = 1000;
-
-#define MSG_DOMAIN_CONTROL_INDICATOR 0x10001
-#define MSG_ID_INDICATOR_REPEAT_EVENT 0x10002
-#define MSG_ID_INDICATOR_ROTATION 0x10003
-#define MSG_ID_INDICATOR_OPACITY 0X1004
-#define MSG_ID_INDICATOR_TYPE 0X1005
+namespace Tizen { namespace Ui { namespace Controls
+{
-typedef enum
+struct _IndicatorDataAnimation
{
- _INDICATOR_TYPE_UNKNOWN, /**< Unknown indicator type mode */
- _INDICATOR_TYPE_1, /**< Type 0 the the indicator */
- _INDICATOR_TYPE_2, /**< Type 1 the indicator */
-} _IndicatorTypeMode;
+ Ecore_X_Window xwin;
+ double duration;
+};
_Indicator*
_Indicator::CreateIndicator(void)
result r = E_SUCCESS;
Color bgColor(0xff343432);
- _Indicator* pIndicator = new (std::nothrow) _Indicator;
+ _Indicator* pIndicator = new (std::nothrow) _Indicator();
SysTryReturn(NID_UI_CTRL, pIndicator, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred.");
r = pIndicator->ConstructControlVisualElement();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ pIndicator->__pClientMessageReceived = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _Indicator::OnClientMessageReceived, (void*) pIndicator);
+ SysTryCatch(NID_UI_CTRL, pIndicator->__pClientMessageReceived, ,E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
pIndicator->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
return pIndicator;
: __pPortraitIndicatorEvasObject(null)
, __pLandscapeIndicatorEvasObject(null)
, __pConnectionTimer(null)
+ , __pAnimationTimer(null)
, __pPortraitVisualElement(null)
, __pLandscapeVisualElement(null)
, __pCurrentVisualElement(null)
, __landscapeautohide(false)
, __opacity(_INDICATOR_OPACITY_OPAQUE)
, __orientation(_CONTROL_ORIENTATION_PORTRAIT)
+ , __startTouchPoint(0.0f, 0.0f)
+ , __animating(false)
+ , __touchPressed(false)
+ , __quickpanelOpened(false)
+ , __pClientMessageReceived(null)
{
}
_Indicator::~_Indicator(void)
{
+
+ if (__pClientMessageReceived)
+ {
+ ecore_event_handler_del(__pClientMessageReceived);
+ __pClientMessageReceived = null;
+ }
if (__pConnectionTimer != null)
{
__pConnectionTimer->Cancel();
delete __pConnectionTimer;
__pConnectionTimer = null;
}
+
+ if (__pAnimationTimer != null)
+ {
+ __pAnimationTimer->Cancel();
+ delete __pAnimationTimer;
+ __pAnimationTimer = null;
+ }
+
+ _UiEventManager::GetInstance()->RemoveTouchEventListener(*this);
}
result
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
SysTryReturnResult(NID_UI_CTRL, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] Unable to get evas");
+ Ecore_X_Window win = 0;
+
if (__pWindow)
{
r = pEcoreEvas->SetIndicatorShowState(*__pWindow, state);
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ win = (Ecore_X_Window)__pWindow->GetNativeHandle();
}
__showstate = state;
{
Color bgColor(0x00000000);
SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
+ if (__pPortraitVisualElement)
+ {
+ __pPortraitVisualElement->SetShowState(false);
+ }
ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_TRANSPARENT);
+ ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_2);
}
else
{
SetIndicatorOpacity(__opacity);
+ if (__pPortraitVisualElement)
+ {
+ __pPortraitVisualElement->SetShowState(true);
+ }
ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_OPAQUE);
+ ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_1);
}
}
else
{
Color bgColor(0x00000000);
SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
+ if (__pLandscapeVisualElement)
+ {
+ __pLandscapeVisualElement->SetShowState(false);
+ }
ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_TRANSPARENT);
+ ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_2);
}
else
{
SetIndicatorOpacity(__opacity);
+ if (__pLandscapeVisualElement)
+ {
+ __pLandscapeVisualElement->SetShowState(true);
+ }
ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_OPAQUE);
+ ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_1);
}
}
__portraitautohide = portrait;
const Dimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSize();
const Dimension landscapeSize = Dimension(portraitSize.height, portraitSize.width);
- _ControlOrientation orientation = __pWindow->GetOrientation();
-
Rectangle indicatorbounds(0, 0, 0, 0);
- if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ if (__orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
indicatorbounds.width = portraitSize.width;
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height);
}
else
{
indicatorbounds.width = landscapeSize.width;
- GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height);
}
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height);
_CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
SysTryReturn(NID_UI_CTRL, pCoordSystem, Rectangle(-1, -1, -1, -1), E_SYSTEM, "[E_SYSTEM] Coordinate system load failed.");
const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width);
- _ControlOrientation orientation = __pWindow->GetOrientation();
-
FloatRectangle indicatorbounds(0.0f, 0.0f, 0.0f, 0.0f);
- if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ if (__orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
indicatorbounds.width = portraitSize.width;
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height);
}
else
{
indicatorbounds.width = landscapeSize.width;
- GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height);
}
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height);
+
_CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
SysTryReturn(NID_UI_CTRL, pCoordSystem, FloatRectangle(-1.0, -1.0, -1.0, -1.0), E_SYSTEM, "[E_SYSTEM] Coordinate system load failed.");
r = ChangeCurrentVisualElement(__pLandscapeVisualElement);
}
- Ecore_Evas *pPortraitEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject);
+ Ecore_Evas* pPortraitEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject);
SysTryReturn(NID_UI_CTRL, pPortraitEe, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to get evas.");
- Ecore_Evas *pLandscapeEe = ecore_evas_object_ecore_evas_get(__pLandscapeIndicatorEvasObject);
+ Ecore_Evas* pLandscapeEe = ecore_evas_object_ecore_evas_get(__pLandscapeIndicatorEvasObject);
SysTryReturn(NID_UI_CTRL, pLandscapeEe, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to get evas.");
ecore_evas_data_set(pPortraitEe, pPortPublicKey, __pPortraitIndicatorEvasObject);
ecore_evas_callback_msg_handle_set(pPortraitEe, _Indicator::OnMessageHandle);
ecore_evas_callback_msg_handle_set(pLandscapeEe, _Indicator::OnMessageHandle);
+ Activate();
+
return r;
}
}
}
+ Ecore_Evas* pPortraitEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject);
+ Ecore_Evas* pLandscapeEe = ecore_evas_object_ecore_evas_get(__pLandscapeIndicatorEvasObject);
+
+ if (pPortraitEe)
+ {
+ ecore_evas_callback_delete_request_set(pPortraitEe, null);
+ ecore_evas_callback_msg_handle_set(pPortraitEe, null);
+ }
+
+ if (pLandscapeEe)
+ {
+ ecore_evas_callback_delete_request_set(pLandscapeEe, null);
+ ecore_evas_callback_msg_handle_set(pLandscapeEe, null);
+ }
+
__pPortraitIndicatorEvasObject = null;
__pLandscapeIndicatorEvasObject = null;
__pPortraitVisualElement = null;
void
_Indicator::OnChangeLayout(_ControlOrientation orientation)
{
+ RemoveIndicatorAnimations();
+ if (__pAnimationTimer != null)
+ {
+ __pAnimationTimer->Cancel();
+ __animating = false;
+ }
+
Ecore_X_Window win = 0;
if (__pWindow)
{
{
Color bgColor(0x00000000);
SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
+ if (__pPortraitVisualElement)
+ {
+ __pPortraitVisualElement->SetShowState(false);
+ }
ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_TRANSPARENT);
+ ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_2);
}
else
{
SetIndicatorOpacity(__opacity);
+ if (__pPortraitVisualElement)
+ {
+ __pPortraitVisualElement->SetShowState(true);
+ }
ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_OPAQUE);
+ ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_1);
}
}
{
Color bgColor(0x00000000);
SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
+ if (__pLandscapeVisualElement)
+ {
+ __pLandscapeVisualElement->SetShowState(false);
+ }
ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_TRANSPARENT);
+ ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_2);
}
else
{
SetIndicatorOpacity(__opacity);
+ if (__pLandscapeVisualElement)
+ {
+ __pLandscapeVisualElement->SetShowState(true);
+ }
ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_OPAQUE);
+ ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_1);
}
}
}
void
_Indicator::OnTimerExpired(Timer& timer)
{
- Eina_Bool result = EINA_TRUE;
-
- _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
- if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ if (__pConnectionTimer == &timer)
{
- result = ecore_evas_extn_plug_connect(__pPortraitIndicatorEvasObject, pPortraitSvcName, 0, EINA_FALSE);
+ Eina_Bool result = EINA_TRUE;
+
+ _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ result = ecore_evas_extn_plug_connect(__pPortraitIndicatorEvasObject, pPortraitSvcName, 0, EINA_FALSE);
+ }
+ else
+ {
+ result = ecore_evas_extn_plug_connect(__pLandscapeIndicatorEvasObject, pLandScapeSvcName, 0, EINA_FALSE);
+ }
+
+ if (result == EINA_TRUE)
+ {
+ timer.Cancel();
+ }
+ else
+ {
+ timer.Start(CONNECTION_INTERVAL);
+ }
}
- else
+ else if(__pAnimationTimer == &timer)
{
- result = ecore_evas_extn_plug_connect(__pLandscapeIndicatorEvasObject, pLandScapeSvcName, 0, EINA_FALSE);
- }
+ ShowIndicatorEffect(false, ANIMATION_DURATION);
- if (result == EINA_TRUE)
- {
timer.Cancel();
- }
- else
- {
- timer.Start(CONNECTION_INTERVAL);
+ __animating = false;
}
}
void
-_Indicator::OnDisconnected(Ecore_Evas *pEe)
+_Indicator::OnDisconnected(Ecore_Evas* pEe)
{
_Indicator* pIndicator = (_Indicator*)ecore_evas_data_get(pEe, pIndicatorKey);
SysTryReturnVoidResult(NID_UI_CTRL, pIndicator, E_SYSTEM, "[E_SYSTEM] Unable to get Indicator Object");
if (pIndicator->__pConnectionTimer == null)
{
- pIndicator->__pConnectionTimer = new (std::nothrow) Timer;
- if (pIndicator->__pConnectionTimer == null)
- {
- return;
- }
+ pIndicator->__pConnectionTimer = new (std::nothrow) Timer();
+ SysTryReturnVoidResult(NID_UI_CTRL, pIndicator->__pConnectionTimer, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pIndicator->__pConnectionTimer->Construct(*pIndicator);
if (r != E_SUCCESS)
}
void
-_Indicator::OnMessageHandle(Ecore_Evas *pEe, int msgDomain, int msgId, void *data, int size)
+_Indicator::OnMessageHandle(Ecore_Evas* pEe, int msgDomain, int msgId, void *data, int size)
{
if (!data)
{
return;
}
+ _Indicator* pIndicator = (_Indicator*)ecore_evas_data_get(pEe, pIndicatorKey);
+ SysTryReturnVoidResult(NID_UI_CTRL, pIndicator, E_SYSTEM, "[E_SYSTEM] Unable to get Indicator Object");
+
Evas_Object* pPortraitIndicatorEvasObject = (Evas_Object*)ecore_evas_data_get(pEe, pPortPublicKey);
Evas_Object* pLandscapeIndicatorEvasObject = (Evas_Object*)ecore_evas_data_get(pEe, pLandPublicKey);
{
if (msgId == MSG_ID_INDICATOR_REPEAT_EVENT)
{
- int *repeat = (int*)data;
+ int* repeat = (int*)data;
if (1 == *repeat)
{
if (pPortraitIndicatorEvasObject)
}
}
}
+ else if (msgId == MSG_ID_INDICATOR_START_ANIMATION)
+ {
+ _IndicatorDataAnimation* pData = (_IndicatorDataAnimation*)data;
+ Ecore_X_Window win = 0;
+ _Window* pWindow = pIndicator->__pWindow;
+ if (pWindow)
+ {
+ win = (Ecore_X_Window)pWindow->GetNativeHandle();
+ }
+
+ _Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
+
+ if (pData->xwin == win)
+ {
+ if (pIndicator->__orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (pIndicator->__portraitautohide)
+ {
+ pIndicator->ShowIndicatorEffect(true, pData->duration);
+ }
+ }
+ else
+ {
+ if (pIndicator->__landscapeautohide)
+ {
+ pIndicator->ShowIndicatorEffect(true, pData->duration);
+ }
+ }
+ }
+ else
+ {
+ if (pFrame)
+ {
+ if (pFrame->IsFrameActivated())
+ {
+ if (pIndicator->__orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (pIndicator->__portraitautohide)
+ {
+ pIndicator->ShowIndicatorEffect(true, pData->duration);
+ }
+ }
+ else
+ {
+ if (pIndicator->__landscapeautohide)
+ {
+ pIndicator->ShowIndicatorEffect(true, pData->duration);
+ }
+ }
+ }
+ }
+
+ }
+ }
+
+ }
+}
+
+Eina_Bool
+_Indicator::OnClientMessageReceived(void* pData, int type, void* pEvent)
+{
+ SysTryReturn(NID_UI, pData, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid.");
+ SysTryReturn(NID_UI, pEvent, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid.");
+
+ _Indicator* pIndicator = static_cast<_Indicator*>(pData);
+ SysTryReturn(NID_UI_CTRL, pIndicator, EINA_FALSE, E_SYSTEM, "[E_SYSTEM] Unable to get Indicator Object.");
+
+ Ecore_X_Event_Client_Message *pClientEvent = (Ecore_X_Event_Client_Message*)(pEvent);
+
+ if (pClientEvent->message_type == ECORE_X_ATOM_E_INDICATOR_FLICK_DONE)
+ {
+ if (pIndicator->__orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (pIndicator->__portraitautohide)
+ {
+ pIndicator->ShowIndicatorEffect(true, ANIMATION_DURATION);
+ }
+ }
+ else
+ {
+ if (pIndicator->__landscapeautohide)
+ {
+ pIndicator->ShowIndicatorEffect(true, ANIMATION_DURATION);
+ }
+ }
}
+ return EINA_TRUE;
}
HitTestResult
return HIT_TEST_NOWHERE;
}
- Evas_Object* pImageObject = null;
- if (this->__pCurrentVisualElement)
+ if (__orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (__portraitautohide)
+ {
+ return HIT_TEST_NOWHERE;
+ }
+ else
+ {
+ return HIT_TEST_MATCH;
+ }
+ }
+ else
+ {
+ if (__landscapeautohide)
+ {
+ return HIT_TEST_NOWHERE;
+ }
+ else
+ {
+ return HIT_TEST_MATCH;
+ }
+ }
+
+}
+
+void
+_Indicator::SetIndicatorOrientation(Tizen::Ui::_ControlOrientation orientation)
+{
+ __orientation = orientation;
+}
+
+void
+_Indicator::SetWindow(_Window* pWindow)
+{
+ __pWindow = pWindow;
+}
+
+result
+_Indicator::ShowIndicatorEffect(bool down, int duration)
+{
+ Ecore_X_Window win = 0;
+ if (__pWindow)
+ {
+ win = (Ecore_X_Window)__pWindow->GetNativeHandle();
+ }
+
+ VisualElementPropertyAnimation* pSlideAnimation = new (std::nothrow) VisualElementPropertyAnimation();
+ SysTryReturnResult(NID_UI_CTRL, pSlideAnimation, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ pSlideAnimation->SetDuration(duration);
+ pSlideAnimation->SetPropertyName(L"bounds.position");
+ pSlideAnimation->SetVisualElementAnimationStatusEventListener(this);
+
+ float indicatorHeight = 0.0f;
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __orientation, indicatorHeight);
+
+ String* pUserData = null;
+ if (down)
+ {
+ Color bgColor(0xff1e1e1e);
+ SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
+
+ if (__orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (__pPortraitVisualElement)
+ {
+ __pPortraitVisualElement->SetShowState(true);
+ }
+ }
+ else
+ {
+ if (__pLandscapeVisualElement)
+ {
+ __pLandscapeVisualElement->SetShowState(true);
+ }
+ }
+
+ pSlideAnimation->SetStartValue(Variant(FloatPoint(0.0f, -indicatorHeight)));
+ pSlideAnimation->SetEndValue(Variant(FloatPoint(0.0f, 0.0f)));
+ ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_1);
+ pUserData = new (std::nothrow) String(L"DownAnimation");
+ SysTryReturnResult(NID_UI_CTRL, pUserData, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ }
+ else
+ {
+ pSlideAnimation->SetStartValue(Variant(FloatPoint(0.0f, 0.0f)));
+ pSlideAnimation->SetEndValue(Variant(FloatPoint(0.0f, -indicatorHeight)));
+ ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_2);
+ pUserData = new (std::nothrow) String(L"UpAnimation");
+ SysTryReturnResult(NID_UI_CTRL, pUserData, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ }
+ pSlideAnimation->SetUserData((void*)(pUserData));
+ AddAnimation(L"bounds.position", *pSlideAnimation);
+
+ delete pSlideAnimation;
+
+ return E_SUCCESS;
+}
+
+void
+_Indicator::RemoveIndicatorAnimations(void)
+{
+ if (__pAnimationTimer)
+ {
+ __pAnimationTimer->Cancel();
+ }
+ RemoveAllAnimations();
+}
+
+bool
+_Indicator::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
+{
+ if (IsVisible() ==false)
+ {
+ return false;
+ }
+
+ int pointId = touchinfo.GetPointId();
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
+
+ FloatPoint touchPosition = source.ConvertToScreenPosition(touchinfo.GetCurrentPosition());
+ int indicatorHeight = 0;
+ if (__pWindow)
+ {
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorHeight);
+ }
+ else
{
- _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*this->__pCurrentVisualElement);
- if (pImpl)
+ return false;
+ }
+ if (touchPosition.y < indicatorHeight)
+ {
+ __startTouchPoint = touchPosition;
+
+ if (__animating)
+ {
+ return true;
+ }
+ else
+ {
+ __touchPressed = true;
+ __pointId = pointId;
+ }
+
+ if (__orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
- _EflNode* pNativeNode = dynamic_cast< _EflNode* >(pImpl->GetNativeNode());
- if (pNativeNode)
+ if (__portraitautohide)
{
- VisualElementSurface* pPortraitSurface = pNativeNode->GetSurface();
- if (pPortraitSurface)
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+ else
+ {
+ if (__landscapeautohide)
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+ }
+
+ if (pTouchManager->IsListenerOnly(pointId) == true)
+ {
+ return true;
+ }
+ else
+ {
+ if (__animating)
+ {
+ RemoveIndicatorAnimations();
+ __animating = false;
+ ShowIndicatorEffect(false, ANIMATION_DURATION);
+ }
+ return false;
+ }
+}
+
+bool
+_Indicator::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
+{
+ if (IsVisible() == false)
+ {
+ return false;
+ }
+
+ __startTouchPoint = FloatPoint(0.0f, 0.0f);
+
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
+
+ if (__touchPressed)
+ {
+ if (touchinfo.GetPointId() == __pointId)
+ {
+ __touchPressed = false;
+ }
+
+ FloatPoint touchPosition = source.ConvertToScreenPosition(touchinfo.GetCurrentPosition());
+ float indicatorHeight = 0.0f;
+ if (__pWindow)
+ {
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorHeight);
+ }
+ else
+ {
+ return false;
+ }
+ if (touchPosition.y < indicatorHeight)
+ {
+ if (__animating)
+ {
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
+ if (pTouchManager)
{
- _EflVisualElementSurfaceImpl* pSurface = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pPortraitSurface));
- if (pSurface)
+ if(pTouchManager->GetTouchControlSource() == &source)
{
- pImageObject = (Evas_Object*)pSurface->GetNativeHandle();
+ SysLog(NID_UI, "VisibleState changed false, Call SetTouchCanceled");
+ pTouchManager->SetTouchCanceled(null);
}
}
+ return true;
+ }
+ }
+
+ if (pTouchManager->IsListenerOnly(touchinfo.GetPointId()) == true)
+ {
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
+ if (pTouchManager)
+ {
+ if(pTouchManager->GetTouchControlSource() == &source)
+ {
+ SysLog(NID_UI, "VisibleState changed false, Call SetTouchCanceled");
+ pTouchManager->SetTouchCanceled(null);
+ }
}
+ return true;
+ }
+ else
+ {
+ return false;
}
}
+ else if (__quickpanelOpened == true)
+ {
+ OnChangeLayout(__orientation);
+ __quickpanelOpened = false;
+ }
+ return false;
+}
+
+bool
+_Indicator::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo)
+{
+ bool r = false;
+
+ if (IsVisible() == false)
+ {
+ return false;
+ }
+
+ int pointId = touchinfo.GetPointId();
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
- if (pImageObject)
+ if (__touchPressed)
{
- if (!evas_object_repeat_events_get(pImageObject))
+ FloatPoint touchPoint = source.ConvertToScreenPosition(touchinfo.GetCurrentPosition());
+ float gap = touchPoint.y - __startTouchPoint.y;
+
+ int touchGap = 0;
+ if (__pWindow)
{
- return HIT_TEST_MATCH;
+ GET_SHAPE_CONFIG(FORM::INDICATOR_TOUCH_GAP, __pWindow->GetOrientation(), touchGap);
}
else
{
- return HIT_TEST_NOWHERE;
+ return false;
+ }
+
+ if (gap < touchGap || __animating)
+ {
+ }
+ else
+ {
+ if (__orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (__portraitautohide)
+ {
+ ShowIndicatorEffect(true, ANIMATION_DURATION);
+ }
+ }
+ else
+ {
+ if (__landscapeautohide)
+ {
+ ShowIndicatorEffect(true, ANIMATION_DURATION);
+ }
+ }
+ }
+
+ if (pTouchManager->IsListenerOnly(pointId) == true)
+ {
+ r = true;
+ }
+ else
+ {
+ r = false;
}
}
else
{
- return HIT_TEST_NOWHERE;
+ if (__pAnimationTimer)
+ {
+ __pAnimationTimer->Cancel();
+ }
+ __quickpanelOpened = true;
+ __animating = false;
+
+ int indicatorHeight = 0;
+ if (__pWindow)
+ {
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorHeight);
+ }
+
+ if (__startTouchPoint.y == 0.0f)
+ {
+ r = false;
+ }
+ else
+ {
+ r = true;
+ }
}
+ return r;
+}
+
+bool
+_Indicator::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo)
+{
+ return false;
}
void
-_Indicator::SetIndicatorOrientation(Tizen::Ui::_ControlOrientation orientation)
+_Indicator::OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target)
{
- __orientation = orientation;
+ String* pUserData = (String*) animation.GetUserData();
+
+ if ((pUserData != null) && (*pUserData == String(L"DownAnimation")))
+ {
+ if (__pAnimationTimer == null)
+ {
+ __pAnimationTimer = new (std::nothrow) Timer();
+ SysTryReturnVoidResult(NID_UI_CTRL, __pAnimationTimer, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ result r = __pAnimationTimer->Construct(*this);
+ if (r != E_SUCCESS)
+ {
+ delete __pAnimationTimer;
+ __pAnimationTimer = null;
+
+ return;
+ }
+ }
+
+ if (__orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (__portraitautohide)
+ {
+ __pAnimationTimer->Start(ANIMATION_INTERVAL);
+ __animating = true;
+ }
+ }
+ else
+ {
+ if (__landscapeautohide)
+ {
+ __pAnimationTimer->Start(ANIMATION_INTERVAL);
+ __animating = true;
+ }
+ }
+ }
}
void
-_Indicator::SetWindow(_Window* pWindow)
+_Indicator::OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount)
{
- __pWindow = pWindow;
+
+}
+
+void
+_Indicator::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally)
+{
+ const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
+ const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width);
+
+ String* pUserData = (String*) animation.GetUserData();
+
+ if ((pUserData != null) && (*pUserData == String(L"UpAnimation")))
+ {
+ Color bgColor(0x00000000);
+
+ int indicatorHeight = 0;
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorHeight);
+
+ if (__orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (__portraitautohide)
+ {
+ SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
+ if (__pPortraitVisualElement && __portraitautohide)
+ {
+ __pPortraitVisualElement->SetShowState(false);
+ }
+ }
+ SetBounds(FloatRectangle(0.0f, 0.0f, portraitSize.width, indicatorHeight));
+ }
+ else
+ {
+ if (__landscapeautohide)
+ {
+ SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
+ if (__pLandscapeVisualElement && __landscapeautohide)
+ {
+ __pLandscapeVisualElement->SetShowState(false);
+ }
+ }
+ SetBounds(FloatRectangle(0.0f, 0.0f, landscapeSize.width, indicatorHeight));
+ }
+ delete pUserData;
+ }
+}
+
+void
+_Indicator::Activate(void)
+{
+ _UiEventManager::GetInstance()->AddTouchEventListener(*this);
+
+ return;
+}
+
+void
+_Indicator::Deactivate(void)
+{
+ _UiEventManager::GetInstance()->RemoveTouchEventListener(*this);
+
+ return;
}
}}} // Tizen::Ui::Controls
#include "FUiCtrl_IndicatorManager.h"
#include "FUiCtrl_Form.h"
#include "FUiCtrl_Frame.h"
-#include "FUiCtrl_Popup.h"
#include "FUiCtrl_Keypad.h"
using namespace Tizen::Base::Collection;
{
if (!__pInstance)
{
- __pInstance = new (std::nothrow)_IndicatorManager;
+ __pInstance = new (std::nothrow)_IndicatorManager();
SysAssert(__pInstance);
}
}
result r = E_SUCCESS;
_Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
- _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
_Keypad* pKeypad = dynamic_cast<_Keypad*>(pWindow);
- if ((pFrame == null) && (pPopup == null) && (pKeypad ==null))
+ if ((pFrame == null) && (pKeypad == null))
{
return E_SUCCESS;
}
IndicatorComponent* pIndicatorComponentArray = null;
_Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
- _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
_Keypad* pKeypad = dynamic_cast<_Keypad*>(pWindow);
- if ((pFrame == null) && (pPopup == null) && (pKeypad ==null))
+ if ((pFrame == null) && (pKeypad == null))
{
return E_SUCCESS;
}
VisualElementSurface* pPortraitSurface = _VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN(*pWindow->GetDisplayContext(), reinterpret_cast<Handle>(pPortraitEvasObject), GetIndicatorSize(_INDICATOR_ORIENTATION_PORTRAIT));
VisualElementSurface* pLandScapeSurface = _VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN(*pWindow->GetDisplayContext(), reinterpret_cast<Handle>(pLandscapeEvasObject), GetIndicatorSize(_INDICATOR_ORIENTATION_LANDSCAPE));
- pPortraitVisualElement = new (std::nothrow) _VisualElement;
+ pPortraitVisualElement = new (std::nothrow) _VisualElement();
SysTryCatch(NID_UI_CTRL, pPortraitVisualElement, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
r = pPortraitVisualElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error occurred.");
pPortraitVisualElement->SetSurface(pPortraitSurface);
pPortraitVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, portraitsize.width, portraitsize.height));
- pLandscapeVisualElement = new (std::nothrow) _VisualElement;
+ pLandscapeVisualElement = new (std::nothrow) _VisualElement();
SysTryCatch(NID_UI_CTRL, pLandscapeVisualElement, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
r = pLandscapeVisualElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error occurred.");
int returnValue = __pInputPadPresenter->GetReturnValue(index);
if (returnValue >= 0)
{
- _AccessibilityElement* pElement = new _AccessibilityElement(true);
+ _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true);
if (pElement != null)
{
if (__pInputPadPresenter->GetInputPadStyle() == INPUTPAD_STYLE_ALPHA)
Color buttonColor[DATETIME_STATUS_MAX];
Color replacementColor = Color::GetColor(COLOR_ID_MAGENTA);
- Bitmap* pButtonBgNormalBitmap[DATETIME_STATUS_MAX];
bool isCustomBitmap[DATETIME_STATUS_MAX];
for (int i = 0; i < DATETIME_STATUS_MAX; i++)
{
buttonColor[i] = Color();
- pButtonBgNormalBitmap[i] = null;
isCustomBitmap[i] = false;
}
r = GET_BITMAP_CONFIG_N(INPUTPAD::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadBackgroundBitmap);
SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.");
- r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgNormalBitmap[DATETIME_STATUS_NORMAL]);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgNormalBitmap[DATETIME_STATUS_SELECTED]);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgNormalBitmap[DATETIME_STATUS_DISABLED]);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
isCustomBitmap[DATETIME_STATUS_NORMAL] = IS_CUSTOM_BITMAP(INPUTPAD::BUTTON_BG_NORMAL);
isCustomBitmap[DATETIME_STATUS_SELECTED] = IS_CUSTOM_BITMAP(INPUTPAD::BUTTON_BG_PRESSED);
isCustomBitmap[DATETIME_STATUS_HIGHLIGHTED] = IS_CUSTOM_BITMAP(INPUTPAD::BUTTON_BG_HIGHLIGHTED);
isCustomBitmap[DATETIME_STATUS_DISABLED] = IS_CUSTOM_BITMAP(INPUTPAD::BUTTON_BG_DISABLED);
- for (int i = 0; i < DATETIME_STATUS_MAX; i++)
+ if (isCustomBitmap[DATETIME_STATUS_NORMAL])
{
- if (isCustomBitmap[i])
- {
- __pKeypadButtonNormalBitmap[i] = pButtonBgNormalBitmap[i];
- }
- else
- {
- __pKeypadButtonNormalBitmap[i] = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgNormalBitmap[i], replacementColor, buttonColor[i]);
- SysTryCatch(NID_UI_CTRL, (__pKeypadButtonNormalBitmap[i] != null), , r, "[%s] Propagating.", GetErrorMessage(r));
- }
+ r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonNormalBitmap[DATETIME_STATUS_NORMAL]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
-
- if (!isCustomBitmap[DATETIME_STATUS_NORMAL])
+ else
{
+ r = GET_REPLACED_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColor[DATETIME_STATUS_NORMAL], __pKeypadButtonNormalBitmap[DATETIME_STATUS_NORMAL]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonEffectBitmap[DATETIME_STATUS_NORMAL]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
-
- if (!isCustomBitmap[DATETIME_STATUS_SELECTED])
+ if (isCustomBitmap[DATETIME_STATUS_SELECTED])
+ {
+ r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonNormalBitmap[DATETIME_STATUS_SELECTED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ else
{
+ r = GET_REPLACED_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColor[DATETIME_STATUS_SELECTED], __pKeypadButtonNormalBitmap[DATETIME_STATUS_SELECTED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonEffectBitmap[DATETIME_STATUS_SELECTED]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
-
- if (!isCustomBitmap[DATETIME_STATUS_HIGHLIGHTED])
+ if (isCustomBitmap[DATETIME_STATUS_HIGHLIGHTED])
{
+ r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ else
+ {
+ r = GET_REPLACED_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColor[DATETIME_STATUS_HIGHLIGHTED], __pKeypadButtonNormalBitmap[DATETIME_STATUS_HIGHLIGHTED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_EFFECT_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonEffectBitmap[DATETIME_STATUS_HIGHLIGHTED]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
-
- if (!isCustomBitmap[DATETIME_STATUS_DISABLED])
+ if (isCustomBitmap[DATETIME_STATUS_DISABLED])
{
- r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonEffectBitmap[DATETIME_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonNormalBitmap[DATETIME_STATUS_DISABLED]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
-
- for (int i = 0; i < DATETIME_STATUS_MAX; i++)
+ else
{
- delete pButtonBgNormalBitmap[i];
+ r = GET_REPLACED_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColor[DATETIME_STATUS_DISABLED], __pKeypadButtonNormalBitmap[DATETIME_STATUS_DISABLED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_BITMAP_CONFIG_N(INPUTPAD::BUTTON_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadButtonEffectBitmap[DATETIME_STATUS_DISABLED]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
return r;
for (int i = 0; i < DATETIME_STATUS_MAX; i++)
{
- delete pButtonBgNormalBitmap[i];
delete __pKeypadButtonNormalBitmap[i];
__pKeypadButtonNormalBitmap[i] = null;
r = GetLastResult();
SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), r, "Propagating.");
+ pCanvas->Clear();
+
bgBounds = pCanvas->GetBoundsF();
if(__pKeypadBackgroundBitmap != null)
{
- r = pCanvas->DrawNinePatchedBitmap(bgBounds, *__pKeypadBackgroundBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pKeypadBackgroundBitmap))
+ {
+ r = pCanvas->DrawNinePatchedBitmap(bgBounds, *__pKeypadBackgroundBitmap);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ else
+ {
+ bgBounds.x = (bgBounds.width - __pKeypadBackgroundBitmap->GetWidthF()) / 2;
+ bgBounds.y = (bgBounds.height - __pKeypadBackgroundBitmap->GetHeightF()) / 2;
+ r = pCanvas->DrawBitmap(FloatPoint(bgBounds.x, bgBounds.y), *__pKeypadBackgroundBitmap);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
}
r = DrawAllButtons(*pCanvas);
namespace Tizen { namespace Ui { namespace Controls
{
const int COMMAND_DONE_BUTTON_ID = 100;
-const int COMMAND_CANCEL_BUTTON_ID = 101;
-const int FOOTER_BACK_BUTTON_ID = 102;
+const int FOOTER_BACK_BUTTON_ID = 101;
IMPLEMENT_PROPERTY(_Keypad);
FloatRectangle landBounds(0.0f, 0.0f, screenSize.width, screenSize.height);
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
- _Keypad* pKeypad = new (std::nothrow) _Keypad;
+ _Keypad* pKeypad = new (std::nothrow) _Keypad();
result r = GetLastResult();
SysTryCatch(NID_UI_CTRL, pKeypad, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ // For DragAndDrop
+ pEcoreEvas->SetDragAndDropEnabled(*pKeypad);
+
pEcoreEvas->SetWindowRotationBounds(*pKeypad, 0, portBounds);
pEcoreEvas->SetWindowRotationBounds(*pKeypad, 180, portBounds);
pEcoreEvas->SetWindowRotationBounds(*pKeypad, 90, landBounds);
__pCallerEdit = null;
}
- if ( __pChildEdit == null)
+ if (__pChildEdit == null)
{
__pChildEdit = _Edit::CreateEditN();
- SysTryCatch(NID_UI_CTRL, __pChildEdit, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Unable to create Edit");
+ SysTryCatch(NID_UI_CTRL, __pChildEdit, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Memory allocation failed.");
String doneText;
String cancelText;
FloatDimension screenSize = pControlManager->GetScreenSizeF();
pFooter = _Toolbar::CreateToolbarN(false);
- SysTryReturn(NID_UI_CTRL, pFooter, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance.");
+ SysTryReturn(NID_UI_CTRL, pFooter, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pFooter->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
{
result r = E_SUCCESS;
_Button* pButton = _Button::CreateButtonN();
- SysTryReturn(NID_UI_CTRL, pButton, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create instance.");
+ SysTryReturn(NID_UI_CTRL, pButton, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pButton->SetActionId(actionId);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- if ( isKeypadExist || isClipboardExist)
+ if (isKeypadExist || isClipboardExist)
{
if (isKeypadExist)
{
{
__pChildEdit->SetFocused();
__isFirstCall = false;
+ ChangeLayoutInternal(LAYOUT_CHANGE_NONE);
}
return;
return true;
}
+void
+_Keypad::OnActivated(void)
+{
+ _Window::OnActivated();
+
+ if (__pIndicator)
+ {
+ __pIndicator->Activate();
+ }
+}
+
+void
+_Keypad::OnDeactivated(void)
+{
+ _Window::OnDeactivated();
+
+ if (__pIndicator)
+ {
+ __pIndicator->Deactivate();
+ }
+}
+
} } } // Tizen::Ui::Controls
_KeypadEvent::CreateInstanceN(const _Control& source)
{
_KeypadEvent* pCoreKeypadEvent = new (std::nothrow) _KeypadEvent(source);
- SysTryReturn(NID_UI_CTRL, pCoreKeypadEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pCoreKeypadEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
if (IsFailed(GetLastResult()))
{
// param checking
_IKeypadEventListener* pKeypadEventListener = dynamic_cast <_IKeypadEventListener*>(&listener);
SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventListener != null, E_INVALID_ARG,
- "[E_INVALID_ARG] The invalid listener was given.\n");
+ "[E_INVALID_ARG] The invalid listener was given.");
const _KeypadEventArg* pKeypadEventArg = dynamic_cast <const _KeypadEventArg*>(&arg);
SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg != null, E_INVALID_ARG,
- "[E_INVALID_ARG] The invalid Event Argument was given.\n");
+ "[E_INVALID_ARG] The invalid Event Argument was given.");
CoreKeypadAction keypadAction = pKeypadEventArg->GetKeypadActionId();
_KeypadEvent::CreateKeypadEventArgN(CoreKeypadAction actionId, CoreKeypadEventStatus status)
{
_KeypadEventArg* pEventArg = new (std::nothrow) _KeypadEventArg(actionId, status);
- SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pEventArg;
}
SysTryReturn(NID_UI_CTRL, (__pPublicTextEvent == null), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance is already constructed.");
__pPublicTextEvent = _PublicTextEvent::CreateInstanceN(GetPublic());
- SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] System error occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pKeypad->AddTextEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
FloatRectangle previousRect = pTextObject->GetBoundsF();
TextObjectActionType previousActionType = pTextObject->GetAction();
- dimension.width = GetBoundsF().width - __leftMargin * 2;
- dimension.height = GetBoundsF().height - __topMargin * 2;
+ dimension.width = GetBoundsF().width - (__leftMargin + __rightMargin);
+ dimension.height = GetBoundsF().height - (__topMargin + __bottomMargin);
_ControlOrientation orientation = GetOrientation();
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
if (horizontalMode == true)
{
- FloatRectangle bounds(0.0f, 0.0f, contentRect.width - GetBoundsF().x - __leftMargin, dimension.height);
+ FloatRectangle bounds(0.0f, 0.0f, contentRect.width - GetBoundsF().x - (__leftMargin + __rightMargin), dimension.height);
pTextObject->SetBounds(bounds);
pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE);
pTextObject->Compose();
- textSize = pTextObject->GetTextExtentF();
+ int displayLineCount = pTextObject->GetDisplayLineCount();
+ int offSet = pTextObject->GetFirstTextIndexAt(displayLineCount - 1);
+
+ if (displayLineCount == 1)
+ {
+ textSize = pTextObject->GetTextExtentF(offSet, pTextObject->GetTextLength() - offSet);
+ }
+ else
+ {
+ textSize = pTextObject->GetTextExtentF();
+ }
dimension.width = (textSize.width < bounds.width) ? textSize.width : bounds.width;
}
pTextObject->SetBounds(previousRect);
pTextObject->SetAction(previousActionType);
- dimension.width += __leftMargin * 2;
- dimension.height += __topMargin * 2;
+ dimension.width += (__leftMargin + __rightMargin);
+ dimension.height += (__topMargin + __bottomMargin);
if (__pBackgroundBitmap != null)
{
return dimension;
}
+int
+_Label::GetTextExtentSize(void) const
+{
+ return _CoordinateSystemUtils::ConvertToInteger(GetTextExtentSizeF());
+}
+
+float
+_Label::GetTextExtentSizeF(void) const
+{
+ float textExtentSize = 0.0f;
+
+ TextObject* pTextObject = __pLabelPresenter->GetTextObject();
+ Font* pFont = __pLabelPresenter->GetFont();
+
+ TextObjectActionType previousActionType = pTextObject->GetAction();
+ TextObjectWrapType previousWrapType = pTextObject->GetWrap();
+ FloatRectangle previousRect = pTextObject->GetBoundsF();
+
+ pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE);
+ pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD);
+ pTextObject->SetFont(pFont, 0, pTextObject->GetTextLength());
+ pTextObject->Compose();
+
+ textExtentSize = pTextObject->GetTextExtentF(0, pTextObject->GetTextLength()).width;
+
+ pTextObject->SetBounds(previousRect);
+ pTextObject->SetAction(previousActionType);
+ pTextObject->SetWrap(previousWrapType);
+ pTextObject->Compose();
+
+ return textExtentSize;
+}
+
}}} // Tizen::Ui::Controls
result
_LabelImpl::SetTextConfig(int size, LabelTextStyle style)
{
+ SysTryReturn(NID_UI_CTRL, size >= 6, E_INVALID_ARG, E_INVALID_ARG, "The size of the text should be greater than or equal to 6", GetErrorMessage(E_INVALID_ARG));
result r = GetCore().SetTextConfig(size, style);
SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r));
result
_LabelImpl::SetTextConfig(float size, LabelTextStyle style)
{
+ SysTryReturn(NID_UI_CTRL, size >= 6.0f, E_INVALID_ARG, E_INVALID_ARG, "The size of the text should be greater than or equal to 6", GetErrorMessage(E_INVALID_ARG));
result r = GetCore().SetTextConfig(size, style);
SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r));
result
_LabelImpl::SetMargin(int topMargin, int leftMargin)
{
+ topMargin = topMargin < 0 ? 0 : topMargin;
+ leftMargin = leftMargin < 0 ? 0 : leftMargin;
+
result r = GetCore().SetMargin(topMargin, leftMargin);
SetLastResultReturn(r);
}
result
_LabelImpl::SetMargin(float topMargin, float leftMargin)
{
+ topMargin = topMargin < 0.0f ? 0.0f : topMargin;
+ leftMargin = leftMargin < 0.0f ? 0.0f : leftMargin;
+
result r = GetCore().SetMargin(topMargin, leftMargin);
SetLastResultReturn(r);
}
{
_ILanguageEventListener* pLanguageEventListener = dynamic_cast <_ILanguageEventListener*>(&listener);
SysTryReturnVoidResult(NID_UI_CTRL, pLanguageEventListener != null, E_INVALID_ARG,
- "[E_INVALID_ARG] The invalid listener was given.\n");
+ "[E_INVALID_ARG] The invalid listener was given.");
const _LanguageEventArg* pLanguageEventArg = dynamic_cast <const _LanguageEventArg*>(&arg);
SysTryReturnVoidResult(NID_UI_CTRL, pLanguageEventArg != null, E_INVALID_ARG,
- "[E_INVALID_ARG] The invalid Event Argument was given.\n");
+ "[E_INVALID_ARG] The invalid Event Argument was given.");
LanguageCode currentLanguageCode = pLanguageEventArg->GetCurrentLanguageCode();
LanguageCode previousLanguageCode = pLanguageEventArg->GetPreviousLanguageCode();
_LinkEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
{
_IUiLinkEventListener* pLinkEventListener = dynamic_cast <_IUiLinkEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventListener != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid listener is given.");
_LinkEventArg* pLinkEventArg = dynamic_cast <_LinkEventArg*>(const_cast <IEventArg*>(&arg));
- SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid Event Argument is given.");
const String text = pLinkEventArg->GetText();
LinkType linkType = pLinkEventArg->GetLinkType();
GET_SHAPE_CONFIG(LIST::LIST_DEFAULT_ITEM_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, _defaultItemHeight);
GET_COLOR_CONFIG(TABLEVIEW::EMPTY_CONTENTS_TEXT_NORMAL, __emptyTextColor);
- for (int i = 0; i < CHECK_BOX_MAX; i++)
+ for (int i = 0; i < BITMAP_MAX; i++)
{
_pCheckBitmaps[i] = null;
}
_ListBaseImpl::~_ListBaseImpl(void)
{
- for (int i = 0; i < CHECK_BOX_MAX; i++)
+ for (int i = 0; i < BITMAP_MAX; i++)
{
delete _pCheckBitmaps[i];
}
+ if (__pEmptyText != null)
+ {
+ GetCore().DetachChild(*__pEmptyText);
+
+ delete __pEmptyText;
+ __pEmptyText = null;
+ }
+
_TableView* pCore = static_cast<_TableView*>(&GetCore());
SysTryReturnVoidResult(NID_UI_CTRL, (pCore != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get _TableView core object.");
GetCore().AttachChild(*__pEmptyText);
}
- TextObject* pText = new (std::nothrow) TextObject;
+ TextObject* pText = new (std::nothrow) TextObject();
SysTryReturnVoidResult(NID_UI_CTRL, (pText != null), E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
pText->Construct();
result r = E_SUCCESS;
_ListContextItemImpl* pImpl = new (std::nothrow) _ListContextItemImpl(pPublic);
- SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pImpl->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
_ListContextItemImpl::Construct(void)
{
__pContextItem = _ListViewContextItem::CreateListViewContextItemN(0.0f);
- SysTryReturn(NID_UI_CTRL, (__pContextItem != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, (__pContextItem != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
Color bgColor(0, 0, 0, 0);
GET_COLOR_CONFIG(TABLEVIEW::CONTEXTITEM_BG_NORMAL, bgColor);
result
_ListContextItemImpl::AddElement(int elementId, const String& text, bool enable)
{
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] The element ID should not be less than 0."));
SysTryReturn(NID_UI_CTRL, (__pContextItem->AddElement(elementId, text, enable) == true), E_SYSTEM, E_SYSTEM,
_ListContextItemImpl::AddElement(int elementId, const Bitmap& normalBitmap,
const Bitmap& pressedBitmap, const Bitmap* pHighlightedBitmap, bool enable)
{
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] The element ID should not be less than 0."));
SysTryReturn(NID_UI_CTRL, (__pContextItem->AddElement(elementId, &normalBitmap, &pressedBitmap, pHighlightedBitmap, enable) == true),
_ListContextItemImpl::AddElement(int elementId, const String& text, const Bitmap& normalBitmap,
const Bitmap& pressedBitmap, const Bitmap* pHighlightedBitmap, bool enable)
{
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX), E_INVALID_ARG, E_INVALID_ARG,
+ SysTryReturn(NID_UI_CTRL, elementId >= 0, E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] The element ID should not be less than 0."));
SysTryReturn(NID_UI_CTRL, (__pContextItem->AddElement(elementId, text, &normalBitmap, &pressedBitmap, pHighlightedBitmap, enable) == true),
result
_ListContextItemImpl::SetElementBackgroundColor(int elementId, ListContextItemElementStatus status, const Color& backgroundColor)
{
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX) && __pContextItem->HasElement(elementId),
+ SysTryReturn(NID_UI_CTRL, (elementId >= 0) && __pContextItem->HasElement(elementId),
E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] A specified elementId."));
bool ret = __pContextItem->SetElementBackgroundColor(elementId, (ListViewContextItemElementDrawingStatus)status, backgroundColor);
Color
_ListContextItemImpl::GetElementBackgroundColor(int elementId, ListContextItemElementStatus status) const
{
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX) && __pContextItem->HasElement(elementId),
+ SysTryReturn(NID_UI_CTRL, (elementId >= 0) && __pContextItem->HasElement(elementId),
Color(0), E_INVALID_ARG, ("[E_INVALID_ARG] A specified elementId."));
return __pContextItem->GetElementBackgroundColor(elementId, (ListViewContextItemElementDrawingStatus)status);
result
_ListContextItemImpl::SetElementTextColor(int elementId, ListContextItemElementStatus status, const Color& textColor)
{
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX) && __pContextItem->HasElement(elementId),
+ SysTryReturn(NID_UI_CTRL, (elementId >= 0) && __pContextItem->HasElement(elementId),
E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] A specified elementId."));
bool ret = __pContextItem->SetElementTextColor(elementId, (ListViewContextItemElementDrawingStatus)status, textColor);
Color
_ListContextItemImpl::GetElementTextColor(int elementId, ListContextItemElementStatus status) const
{
- SysTryReturn(NID_UI_CTRL, (elementId >= 0) && (elementId <= Integer::VALUE_MAX) && __pContextItem->HasElement(elementId),
+ SysTryReturn(NID_UI_CTRL, (elementId >= 0) && __pContextItem->HasElement(elementId),
Color(0), E_INVALID_ARG, ("[E_INVALID_ARG] A specified elementId."));
return __pContextItem->GetElementTextColor(elementId, (ListViewContextItemElementDrawingStatus)status);
SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index <= GetItemCount()),
E_OUT_OF_RANGE, "The index(%d) is out of range.", index);
- CustomListItem *pItem = GetNewItemN(pText1, pText2, pBitmap1, pBitmap2, itemId, index);
+ CustomListItem* pItem = GetNewItemN(pText1, pText2, pBitmap1, pBitmap2, itemId, index);
SysTryReturnResult(NID_UI_CTRL, pItem, GetLastResult(),
"A system error has occurred. CustomListItem instance is null.");
__pNumberElements->RemoveAt(index, true);
}
- CustomListItem *pItem = GetNewItemN(pText1, pText2, pBitmap1, pBitmap2, itemId, index);
+ CustomListItem* pItem = GetNewItemN(pText1, pText2, pBitmap1, pBitmap2, itemId, index);
SysTryReturnResult(NID_UI_CTRL, pItem, GetLastResult(),
"A system error has occurred. CustomListItem instance is null.");
SysTryReturnVoidResult(NID_UI_CTRL, (pItem), E_SYSTEM,
"[E_SYSTEM] A system error has occurred. Failed to get item at %d.", itemCount);
- _CustomListItemImpl *pItemImpl = pItem->__pCustomListItemImpl;
+ _CustomListItemImpl* pItemImpl = pItem->__pCustomListItemImpl;
SysTryReturnVoidResult(NID_UI_CTRL, (pItemImpl), E_SYSTEM,
"[E_SYSTEM] A system error has occurred. Failed to get item at %d.", itemCount);
SysTryReturnVoidResult(NID_UI_CTRL, (pItem), E_SYSTEM,
"[E_SYSTEM] A system error has occurred. Failed to get item at %d.", itemCount);
- _CustomListItemImpl *pItemImpl = pItem->__pCustomListItemImpl;
+ _CustomListItemImpl* pItemImpl = pItem->__pCustomListItemImpl;
SysTryReturnVoidResult(NID_UI_CTRL, (pItemImpl), E_SYSTEM,
"[E_SYSTEM] A system error has occurred. Failed to get item at %d.", itemCount);
_ListItemBaseImpl::CreateListItemBaseImplN(ListItemBase* pPublic, const FloatDimension& itemSize, ListAnnexStyle style)
{
_ListItemBaseImpl* pImpl = new (std::nothrow) _ListItemBaseImpl(pPublic);
- SysTryReturn(NID_UI_CTRL, (pImpl != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, (pImpl != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
result r = pImpl->Construct(itemSize, style);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
("[E_INVALID_ARG] The item size should be greater than 0.0f"));
__pListViewItem = _ListViewItem::CreateListViewItemN(itemSize.height);
- SysTryReturn(NID_UI_CTRL, (__pListViewItem != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, (__pListViewItem != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pListViewItem->SetSize(itemSize);
__pListViewItem->SetBounds(FloatRectangle(0.0f, 0.0f, itemSize.width, itemSize.height));
if (__pEvent == null)
{
__pEvent = new (std::nothrow) _UiListViewItemEvent();
- SysTryReturnVoidResult(NID_UI_CTRL, __pEvent != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pEvent != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
}
__pEvent->AddListener(listener);
_ListViewContextItem::CreateListViewContextItemN(float itemHeight)
{
_ListViewContextItem* pItem = new (std::nothrow) _ListViewContextItem(itemHeight);
- SysTryReturn(NID_UI_CTRL, (pItem != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, (pItem != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pItem->AcquireHandle();
contextElement.elementId = elementId;
contextElement.pButton = _Button::CreateButtonN();
- SysTryReturn(NID_UI_CTRL, (contextElement.pButton != null), false, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, (contextElement.pButton != null), false, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY] Memory allocation failed.");
__elements.push_back(contextElement);
contextElement.elementId = elementId;
contextElement.pButton = _Button::CreateButtonN();
- SysTryReturn(NID_UI_CTRL, (contextElement.pButton != null), false, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, (contextElement.pButton != null), false, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY] Memory allocation failed.");
__elements.push_back(contextElement);
#include "FUi_TouchLongPressGestureDetector.h"
#include "FUi_TouchManager.h"
#include "FUi_UiBuilder.h"
+#include "FUi_Window.h"
#include "FUiCtrl_FastScrollEvent.h"
#include "FUiCtrl_FastScrollEventArg.h"
#include "FUiCtrl_Label.h"
// Add _TouchLongPressGestureDetector
__pLongPressedGesture = new (std::nothrow) _TouchLongPressGestureDetector();
- SysTryReturnVoidResult(NID_UI_CTRL, (__pLongPressedGesture != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pLongPressedGesture != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__core.AddGestureDetector(*__pLongPressedGesture);
result r = __pLongPressedGesture->AddGestureListener(*this);
TouchEventInfo publicTouchInfo;
_TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
- SysTryReturnVoidResult(NID_UI, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
publicTouchInfo.Construct(*pEventArg);
FloatPoint startPoint;
_TouchEventArg* pEventArg = new (std::nothrow) _TouchEventArg(__public, touchInfo.GetTouchStatus());
- SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- startPoint.SetPosition(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBoundsF().x,
- __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBoundsF().y);
+ startPoint.SetPosition(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBoundsF(true).x,
+ __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBoundsF(true).y);
pEventArg->SetTouchPosition(touchInfo.GetPointId(), startPoint.x, startPoint.y,
touchInfo.GetCurrentPosition().x, touchInfo.GetCurrentPosition().y);
, __pAccessibilityElement(null)
, __redrawListView(true)
, __isOrientationChanged(false)
+ , __isUpdateListCalled(false)
, __needReloadItems(false)
, __pPropagatedTouchEventListener(null)
{
_TableView* pCore = _TableView::CreateTableViewN(TABLE_VIEW_STYLE_SIMPLE, itemDivider, scrollBarStyle);
- SysTryReturn(NID_UI_CTRL, (pCore != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, (pCore != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
_ListViewImpl* pImpl = new (std::nothrow) _ListViewImpl(pControl, pCore);
{
pProviderAdaptor = new (std::nothrow) _ListViewItemProviderAdaptor(provider);
SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ "[E_OUT_OF_MEMORY] Memory allocation failed.");
pProviderAdaptor->SetListViewItemEventListener(*this);
{
pProviderAdaptor = new (std::nothrow) _ListViewItemProviderAdaptor(provider);
SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ "[E_OUT_OF_MEMORY] Memory allocation failed.");
pProviderAdaptor->SetListViewItemEventListener(*this);
if (__pListItemEvent == null)
{
__pListItemEvent = new (std::nothrow) _ListItemEvent();
- SysTryReturnVoidResult(NID_UI_CTRL, (__pListItemEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pListItemEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pListItemEvent->Construct(GetPublic(), CLASSNAME_LISTVIEW);
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Item Event.");
if (__pFastScrollEvent == null)
{
__pFastScrollEvent = new (std::nothrow) _FastScrollEvent();
- SysTryReturnVoidResult(NID_UI_CTRL, (__pFastScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pFastScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pFastScrollEvent->Construct(GetPublic());
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct FastScroll Event.");
if (__pScrollEvent == null)
{
__pScrollEvent = new (std::nothrow) _ScrollEvent();
- SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pScrollEvent->Construct(GetPublic());
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Scroll Event.");
if (__pScrollEvent == null)
{
__pScrollEvent = new (std::nothrow) _ScrollEvent();
- SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pScrollEvent->Construct(GetPublic());
SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Scroll Event.");
if (__pLinkEvent == null)
{
__pLinkEvent = _PublicLinkEvent::CreateInstanceN(GetPublic());
- SysTryReturnVoidResult(NID_UI_CTRL, (__pLinkEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pLinkEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
}
r = __pLinkEvent->AddListener(listener);
int
_ListViewImpl::GetTopDrawnItemIndex(void) const
{
+ result r = E_SUCCESS;
int groupIndex = -1;
int itemIndex = -1;
- GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex);
+ r = GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex);
+ SetLastResult(r);
return itemIndex;
}
int
_ListViewImpl::GetBottomDrawnItemIndex(void) const
{
+ result r = E_SUCCESS;
int groupIndex = -1;
int itemIndex = -1;
- GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex);
+ r = GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex);
+ SetLastResult(r);
return itemIndex;
}
_ListViewItemStatus itemStatus;
memset(&itemStatus, 0, sizeof(_ListViewItemStatus));
bool needChangeEventTarget = false;
+ bool itemFocused = false;
+ bool annexFocused = false;
+ int focusedGroupedIndex = -1;
+ int focusedItemIndex = -1;
if (pListViewItem != null && pListViewItem->IsItemSelected())
{
needChangeEventTarget = true;
}
+ GetCore().GetFocusedItemIndex(focusedGroupedIndex, focusedItemIndex);
+ if (focusedGroupedIndex == 0 && focusedItemIndex == index)
+ {
+ if (GetCore().IsAnnexFocused())
+ {
+ annexFocused = true;
+ }
+ else
+ {
+ itemFocused = true;
+ }
+ }
+
if (needChangeEventTarget && (pListViewItem != null))
{
pListViewItem->GetCurrentStatus(itemStatus);
pTarget->SetChangingEventTarget(true);
_TouchManager::GetInstance()->SetChangedTouchableTarget(pTarget);
}
+
+ if (pListViewItem && pListViewItem->IsFocusable()
+ && pListViewItem->GetEnableState() && pListViewItem->GetVisibleState()
+ && pListViewItem->GetRootWindow() && pListViewItem->GetRootWindow()->IsActivated())
+ {
+ if (itemFocused)
+ {
+ GetCore().SetFocused(true);
+ pListViewItem->SetFocused(true);
+ pListViewItem->DrawFocus();
+ itemFocused = false;
+ }
+ else if (annexFocused)
+ {
+ GetCore().SetFocused(true);
+ pListViewItem->DrawAnnexFocus();
+ annexFocused = false;
+ }
+ }
}
else
{
}
result
-_ListViewImpl::UpdateList(void)
+_ListViewImpl::UpdateList(bool isRestoreAnnexFocusValue)
{
__needReloadItems = true;
- result r = GetCore().UpdateTableView();
+ result r = GetCore().UpdateTableView(isRestoreAnnexFocusValue);
CheckEmptyListShowState();
if (__pEmptyText != null)
{
textPos.x = ((_FloatCompare(listDimension.width, emptyText.width)) ? 0.0f : (listDimension.width - emptyText.width) / 2.0f);
- textPos.y = ((listDimension.height <= totalHeight ) ? (bitmapPos.y + emptyBitmap.height + horizontalSpacing) : (listDimension.height - totalHeight) / 2.0f);
+ textPos.y = ((listDimension.height <= totalHeight) ? (bitmapPos.y + emptyBitmap.height + horizontalSpacing) : (listDimension.height - totalHeight) / 2.0f);
}
}
{
__pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pAccessibilityElement->SetName(L"ListView");
GetCore().AttachChild(*__pEmptyText);
}
- TextObject* pText = new (std::nothrow) TextObject;
+ TextObject* pText = new (std::nothrow) TextObject();
SysTryReturn(NID_UI_CTRL, (pText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
pText->Construct();
void
_ListViewImpl::OnChangeLayout(_ControlOrientation orientation)
{
- __isOrientationChanged = true;
+ if (__isUpdateListCalled)
+ {
+ __isUpdateListCalled = false;
+ }
+ else
+ {
+ __isOrientationChanged = true;
+ }
+
+ if (GetCore().IsFocusModeStateEnabled() && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated())
+ {
+ GetCore().SetFocusDuringOrientationChange();
+ }
_ControlImpl::OnChangeLayout(orientation);
}
void
_ListViewImpl::OnBoundsChanged(void)
{
+ _Control* pParent = GetCore().GetParentFormOrWindow();
+
+ if (pParent != null && (pParent->GetOrientation() != GetCore().GetOrientation()))
+ {
+ __isOrientationChanged = true;
+ __isUpdateListCalled = true;
+ }
+
_ControlImpl::OnBoundsChanged();
if (__pEmptyBitmap != null)
if (__isOrientationChanged)
{
__isOrientationChanged = false;
- if (GetCore().IsTableViewFocused())
+
+ if (GetCore().IsTableViewFocused() && GetCore().IsFocusModeStateEnabled()
+ && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated())
{
- GetCore().RestoreFocus(true);
+ UpdateList(true);
}
- UpdateList();
+ else
+ {
+ UpdateList();
+ }
+
}
}
if (pListViewItem != null)
{
pListViewItem->SetFont(fontName);
+ pListViewItem->SetItemChanged(true);
}
}
}
_ListViewImpl::GetCurrentTouchPosition(void)
{
FloatPoint currentTouchPos = _TouchManager::GetInstance()->GetScreenPoint(0);
- FloatRectangle bounds = GetCore().GetAbsoluteBoundsF();
+ FloatRectangle bounds = GetCore().GetAbsoluteBoundsF(true);
currentTouchPos.x -= bounds.x;
currentTouchPos.y -= bounds.y;
_ListViewItem::CreateListViewItemN(float itemHeight)
{
_ListViewItem* pItem = new (std::nothrow) _ListViewItem(itemHeight);
- SysTryReturn(NID_UI_CTRL, (pItem != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, (pItem != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pItem->AcquireHandle();
// Convert String to TextObject
TextObject* pText = new (std::nothrow) TextObject();
- pText->Construct();
+ SysTryReturn(NID_UI_CTRL, pText != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ TextSimple* pSimpleText = null;
+ _ListViewItemElement element;
+ _VisualElement* pVE = null;
+
+ r = pText->Construct();
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Unable to construct Text Object.", GetErrorMessage(r));
if (text.IsEmpty() == false)
{
- TextSimple* pSimpleText = new (std::nothrow) TextSimple(const_cast <wchar_t*>(text.GetPointer()), text.GetLength());
+ pSimpleText = new (std::nothrow) TextSimple(const_cast <wchar_t*>(text.GetPointer()), text.GetLength());
+ SysTryCatch(NID_UI_CTRL, (pSimpleText != null), r = E_OUT_OF_MEMORY , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pText->AppendElement(*pSimpleText);
pText->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE);
}
// Make element object
- _ListViewItemElement element;
memset(&element, 0, sizeof(_ListViewItemElement));
-
element.elementId = elementId;
element.elementType = LISTVIEW_ITEM_ELEMENT_TEXT;
element.bounds = rect;
element.pTextElement = new (std::nothrow) _ListViewItemElementText();
- SysTryReturn(NID_UI_CTRL, (element.pTextElement != null), (r = GetLastResult()), r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, (element.pTextElement != null), r = E_OUT_OF_MEMORY , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
element.pTextElement->pTextObject = pText;
element.pTextElement->textSlidingEnabled = textSliding;
GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_HIGHLIGHTED, element.pTextElement->textColor[LISTVIEW_ITEM_STATUS_HIGHLIGHTED]);
// Set Visual element for this element
- _VisualElement* pVE = new (std::nothrow) _VisualElement();
+ pVE = new (std::nothrow) _VisualElement();
+ SysTryCatch(NID_UI_CTRL, (element.pTextElement != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
pVE->Construct();
pVE->SetImplicitAnimationEnabled(false);
pVE->SetContentProvider(&__hitTestVEDelegator);
__elements.push_back(element);
return r;
+CATCH:
+ delete pText;
+ delete pSimpleText;
+ delete element.pTextElement;
+
+ if (pVE != null)
+ {
+ pVE->Destroy();
+ }
+
+ return r;
}
result
_ListViewItem::AddElement(FloatRectangle& rect, int elementId, const EnrichedText* pEnrichedText)
{
+ result r = E_SUCCESS;
+
SysTryReturn(NID_UI_CTRL, (HasElement(elementId) == false), E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] This elementId already exists."));
SysTryReturn(NID_GRP, (pCloneText != null), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This _EnrichedText element can not clone.");
TextObject* pText = pCloneText->GetTextObject();
+ _VisualElement* pVE = null;
// Make element object
_ListViewItemElement element;
element.bounds = rect;
element.pTextElement = new (std::nothrow) _ListViewItemElementText();
- SysTryReturn(NID_UI_CTRL, (element.pTextElement != null), GetLastResult(), GetLastResult(), "[%s] Propagating.",
+ SysTryCatch(NID_UI_CTRL, (element.pTextElement != null), , GetLastResult(), "[%s] Propagating.",
GetErrorMessage(GetLastResult()));
element.pTextElement->pTextObject = pText;
GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_HIGHLIGHTED, element.pTextElement->textColor[LISTVIEW_ITEM_STATUS_HIGHLIGHTED]);
// Set Visual element for this element
- _VisualElement* pVE = new (std::nothrow) _VisualElement();
- SysTryReturn(NID_UI_CTRL, (pVE != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ pVE = new (std::nothrow) _VisualElement();
+ SysTryCatch(NID_UI_CTRL, (pVE != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ r = pVE->Construct();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Unable to construct Visual Element.", GetErrorMessage(r));
- pVE->Construct();
pVE->SetImplicitAnimationEnabled(false);
pVE->SetContentProvider(&__hitTestVEDelegator);
element.pTextElement->pVE = pVE;
__elements.push_back(element);
return E_SUCCESS;
+
+CATCH:
+ delete pCloneText;
+ delete element.pTextElement;
+
+ if (pVE != null)
+ {
+ pVE->Destroy();
+ }
+ return r;
}
result
_ListViewItem::AddElement(FloatRectangle& rect, int elementId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap)
{
+ result r = E_SUCCESS;
SysTryReturn(NID_UI_CTRL, (HasElement(elementId) == false), E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] This elementId already exists."));
SysTryReturn(NID_GRP, (pNormalBitmap != null), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This Bitmap element is null.");
_ListViewItemElement element;
+ element.pBitmapElement = null;
_VisualElement* pVE = null;
Bitmap* pClonePressedBitmap = null;
Bitmap* pCloneHighlightedBitmap = null;
- result r = E_SUCCESS;
Bitmap* pCloneNormalBitmap = _BitmapImpl::CloneN(*pNormalBitmap);
SysTryReturn(NID_UI_CTRL, (pCloneNormalBitmap != null), (r = GetLastResult()), r, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ // Make element object
+ memset(&element, 0, sizeof(_ListViewItemElement));
+
if (pPressedBitmap != null)
{
pClonePressedBitmap = _BitmapImpl::CloneN(*pPressedBitmap);
SysTryCatch(NID_UI_CTRL, (pCloneHighlightedBitmap != null), (r = GetLastResult()), r, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
}
- // Make element object
- memset(&element, 0, sizeof(_ListViewItemElement));
-
element.elementId = elementId;
element.elementType = LISTVIEW_ITEM_ELEMENT_BITMAP;
element.bounds = rect;
pVE = new (std::nothrow) _VisualElement();
SysTryCatch(NID_UI_CTRL, pVE, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- pVE->Construct();
+ r = pVE->Construct();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Unable to construct Visual Element.", GetErrorMessage(r));
+
pVE->SetImplicitAnimationEnabled(false);
pVE->SetContentProvider(&__hitTestVEDelegator);
element.pBitmapElement->pVE = pVE;
delete pCloneNormalBitmap;
delete pClonePressedBitmap;
delete pCloneHighlightedBitmap;
+ delete element.pBitmapElement;
+
+ if (pVE)
+ {
+ pVE->Destroy();
+ }
return r;
}
result
_ListViewItem::AddElement(FloatRectangle& rect, int elementId, const _ICustomElement* pCustom)
{
+ result r = E_SUCCESS;
SysTryReturn(NID_UI_CTRL, (HasElement(elementId) == false), E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] This elementId already exists."));
element.pCustomElement->pCustom = const_cast<_ICustomElement*>(pCustom);
_VisualElement* pVE = new (std::nothrow) _VisualElement();
- SysTryReturn(NID_UI_CTRL, (pVE != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- pVE->Construct();
+ SysTryCatch(NID_UI_CTRL, (pVE != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ r = pVE->Construct();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Unable to construct Visual Element.", GetErrorMessage(r));
+
pVE->SetImplicitAnimationEnabled(false);
pVE->SetContentProvider(&__hitTestVEDelegator);
element.pCustomElement->pVE = pVE;
__elements.push_back(element);
return E_SUCCESS;
+
+CATCH:
+ delete element.pCustomElement;
+
+ if(pVE != null)
+ {
+ pVE->Destroy();
+ }
+
+ return r;
}
bool
{
___stateChangedInfo.selectionType = LISTVIEW_ITEM_ELEMENT_SELECTED;
___stateChangedInfo.elementId = elementId;
+ delete pInfo;
}
}
else
textBounds.width = bounds.width - (textBounds.x * 2.0f);
TextObject* pText = new (std::nothrow) TextObject();
- SysTryReturn(NID_UI_CTRL, (pText != null), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, (pText != null), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pText->Construct();
{
float lineHeight = 0.0f;
float lineLeftMargin = 0.0f;
- float lineBottomMargin = 0.0f;
float lineTopMargin = 0.0f;
GET_SHAPE_CONFIG(LISTVIEW::GROUPITEM_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, lineHeight);
GET_SHAPE_CONFIG(LISTVIEW::GROUPITEM_DIVIDER_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineLeftMargin);
- GET_SHAPE_CONFIG(LISTVIEW::GROUPITEM_DIVIDER_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineBottomMargin);
FloatRectangle textBounds;
FloatRectangle bitmapBounds;
lineTopMargin = (textBottomPos > bitmapBottomPos) ? textBottomPos : bitmapBottomPos;
FloatRectangle bounds = GetBoundsF();
- float defaultMargin = bounds.height - lineBottomMargin;
+ float defaultMargin = bounds.height - lineHeight;
lineTopMargin = (lineTopMargin > defaultMargin) ? lineTopMargin : defaultMargin;
if (bounds.height <= lineTopMargin)
pElement->pTextElement->pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
pElement->pTextElement->pTextObject->SetForegroundColor(pElement->pTextElement->textColor[LISTVIEW_ITEM_STATUS_NORMAL],
0, pElement->pTextElement->pTextObject->GetTextLength());
+
+ RefreshElement(__selectedElementId);
}
}
}
int strLength = pTextObject->GetTextLength();
wchar_t* pStr = new (std::nothrow) wchar_t[strLength + 1];
- SysTryReturn(NID_UI, (pStr != null), false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ SysTryReturn(NID_UI, (pStr != null), false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] Memory allocation failed."));
pTextObject->GetText(pStr, strLength);
TextCutLinkParser* pParser = new (std::nothrow) TextCutLinkParser();
- SysTryCatch(NID_UI, (pParser != null), (ret = false), E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ SysTryCatch(NID_UI, (pParser != null), (ret = false), E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] Memory allocation failed."));
pParser->SetCutLinkMask(cutlinkMaskType);
delete pTextLinkInfo;
pTextLinkInfo = pNextLinkInfo;
}
- SysTryCatch(NID_UI, (pTextLinkInfo != null), (ret = false), E_SYSTEM, ("[E_SYSTEM] TextLinkInfo is not valid."));
}
for (int i = 0; i < pTextLinkInfo->length; i++)
{
int elementId = GetElementIdFromPosition(position);
_ListViewItemElementText* pElement = GetElementText(elementId);
+ _ListViewItemElement* pElementItem = GetElement(elementId);
- if ((pElement != null) && (pElement->pTextObject) && (pElement->cutlinkViewModeEnabled))
+ if ((pElement != null) && (pElement->pTextObject != null) && (pElement->cutlinkViewModeEnabled) && (pElementItem != null))
{
TextObject* pTextObject = pElement->pTextObject;
- FloatRectangle displayRect = pTextObject->GetBoundsF();
+ FloatRectangle displayRect = pElementItem->bounds;
+
int selectedIndex = pTextObject->GetCutLinkIndexFromPositionData(position.x - displayRect.x, position.y - displayRect.y);
if (selectedIndex >= 0)
if (__pAccessibilityElement == null)
{
__pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pContainer->AddElement(*__pAccessibilityElement);
}
__pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
}
}
+
+_AccessibilityElement*
+_ListViewItem::GetAccessibilityElement(void)
+{
+ return __pAccessibilityElement;
+}
+
void
_ListViewItem::SetAccessibilityElementTrait(void)
{
}
int groupIndex = -1;
int itemIndex = -1;
-
+
switch (GetItemStyle())
{
case TABLE_VIEW_ANNEX_STYLE_NORMAL:
{
return;
}
-
+
switch (GetItemStyle())
{
case TABLE_VIEW_ANNEX_STYLE_MARK:
if (textLength > 0)
{
wchar_t* pAccessibilityText = new (std::nothrow) wchar_t[textLength + 1];
- SysTryReturnVoidResult(NID_UI_CTRL, (pAccessibilityText != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (pAccessibilityText != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pElement->pTextElement->pTextObject->GetText(pAccessibilityText, textLength);
, __pItemNeedsLazyDeletion(null)
, __pLazyDeletionItem(null)
, __usingFloatingPoint(false)
+ , __pDefaultItem(null)
{
}
, __pItemNeedsLazyDeletion(null)
, __pLazyDeletionItem(null)
, __usingFloatingPoint(true)
+ , __pDefaultItem(null)
{
}
_ListViewItemProviderAdaptor::~_ListViewItemProviderAdaptor(void)
{
+ delete __pDefaultItem;
+ __pDefaultItem = null;
+
__descriptionTextShowItem.clear();
SetItemLazyDeletion(null);
SysTryReturn(NID_UI_CTRL, (groupIndex == 0), null, E_INVALID_ARG,
"[E_INVALID_ARG] parameter not available.");
- _TableViewItem* pTableViewItem = null;
+ _IListItemCommon* pDefaultItem = null;
if (itemIndex == -1)
{
- pTableViewItem = GetDefaultItem();
- pTableViewItem->SetAppInfo(null);
+ pDefaultItem = GetDefaultItem();
+ pDefaultItem->SetAppInfo(null);
- return pTableViewItem;
+ return pDefaultItem;
}
ListItemBase* pItemBase = null;
if (pItemBase == null)
{
- pTableViewItem = GetDefaultItem();
- pTableViewItem->SetAppInfo(null);
+ pDefaultItem = GetDefaultItem();
+ pDefaultItem->SetAppInfo(null);
- return pTableViewItem;
+ return pDefaultItem;
}
_ListItemBaseImpl* pItemBaseImpl = _ListItemBaseImpl::GetInstance(*pItemBase);
}
}
+_IListItemCommon*
+_ListViewItemProviderAdaptor::GetDefaultItem(void)
+{
+ if (__pDefaultItem == null)
+ {
+ _ListViewItem* pListViewItem = _ListViewItem::CreateListViewItemN(0.0f);
+ pListViewItem->SetFocusable(false);
+
+ __pDefaultItem = pListViewItem;
+ }
+
+ return __pDefaultItem;
+}
+
}}} // Tizen::Ui::Controls
//Create new GroupNode
_ListViewGroupNode* pListGroupNode = new (std::nothrow) _ListViewGroupNode();
SysTryReturn(NID_UI_CTRL, pListGroupNode != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ "[E_OUT_OF_MEMORY] Memory allocation failed.");
pListGroupNode->__itemCountInGroup = itemCount;
pListGroupNode->__usingRadioStyle = usingRadioStyle;
//Create new GroupNode
_ListViewGroupNode* pListGroupNode = new (std::nothrow) _ListViewGroupNode();
SysTryReturn(NID_UI_CTRL, pListGroupNode != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ "[E_OUT_OF_MEMORY] Memory allocation failed.");
pListGroupNode->__itemCountInGroup = itemCount;
pListGroupNode->__usingRadioStyle = usingRadioStyle;
theIter++;
}
- if (indexCount < 0)
- {
- indexCount = 0;
- }
-
pItem->SetItemIndex(destinationGroupIndex, destinationItemIndex);
pOriginGroupNode->__items.insert(pOriginGroupNode->__items.begin() + indexCount, pItem);
delete __pMsgboxPresenter;
__pMsgboxPresenter = null;
- delete _pBgBitmap;
- _pBgBitmap = null;
-
delete _pComposedBgBitmap;
_pComposedBgBitmap = null;
result r = E_SUCCESS;
float titleHeight = 0.0f;
- Bitmap* buttonBgBitmap = null;
- Bitmap* titleBgBitmap = null;
Color titleBgColor(0x00000000);
Color buttonBgColor(0x00000000);
_AccessibilityContainer* pContainer = null;
GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_HEIGHT, GetOrientation(), titleHeight);
// MsgBox_Outline
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pOutlineBitmap);
- r = GetLastResult();
+ r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pOutlineBitmap);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] failed to load MessageBox Outline Image.");
// MsgBox BG
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pBgBitmap);
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] failed to load MessageBox BG Image.");
-
- _pComposedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*_pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), _bgColor);
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _bgColor, _pComposedBgBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load MessageBox BG Image.");
if (style != MSGBOX_STYLE_NONE)
{
// MsgBox-BottomBitmap
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgBitmap);
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgColor, __pComposedButtonBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
// MsgBox-BottomEffectBitmap
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonEffectBitmap);
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonEffectBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- __pComposedButtonBitmap = _BitmapImpl::GetColorReplacedBitmapN(*buttonBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonBgColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pComposedButtonBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
}
if (_titleState)
{
// MsgBox-TitleBitmap
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, titleBgBitmap);
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, titleBgColor, __pComposedTitleBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
// MsgBox-TitleEffectBitmap
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTitleEffectBitmap);
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTitleEffectBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- __pComposedTitleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*titleBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), titleBgColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pComposedTitleBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
}
// for clearing canvas
SetTouchPressThreshold(0.08);
- if (buttonBgBitmap != null)
- {
- delete buttonBgBitmap;
- buttonBgBitmap = null;
- }
-
- if (titleBgBitmap != null)
- {
- delete titleBgBitmap;
- titleBgBitmap = null;
- }
-
return r;
CATCH:
- if (buttonBgBitmap != null)
- {
- delete buttonBgBitmap;
- buttonBgBitmap = null;
- }
- if (titleBgBitmap != null)
- {
- delete titleBgBitmap;
- titleBgBitmap = null;
- }
+ delete _pOutlineBitmap;
+ _pOutlineBitmap = null;
delete _pComposedBgBitmap;
_pComposedBgBitmap = null;
- if (__pComposedButtonBitmap != null)
- {
- delete __pComposedButtonBitmap;
- __pComposedButtonBitmap = null;
- }
+ delete __pComposedButtonBitmap;
+ __pComposedButtonBitmap = null;
- if(__pComposedTitleBitmap != null)
- {
- delete __pComposedTitleBitmap;
- __pComposedTitleBitmap = null;
- }
+ delete __pButtonEffectBitmap;
+ __pButtonEffectBitmap = null;
+
+ delete __pComposedTitleBitmap;
+ __pComposedTitleBitmap = null;
+
+ delete __pTitleEffectBitmap;
+ __pTitleEffectBitmap = null;
return r;
}
}
void
-_MessageBox::OnFontChanged(Font * pFont)
+_MessageBox::OnFontChanged(Font* pFont)
{
__pMsgboxPresenter->OnFontChanged(pFont);
}
_MessageBox::GetTotalHeight(void) const
{
float titleHeight = 0.0f;
- float btnHeight = 0.0f;
+ float bottomHeight = 0.0f;
float textTopMargin = 0.0f;
float textTopMarginNoButton = 0.0f;
- float btnGap = 0.0f;
- float btnTopMargin = 0.0f;
- float btnBottomMargin = 0.0f;
-
float transTopMargin = 0.0f;
float transBottomMargin = 0.0f;
_ControlOrientation orientation;
orientation = GetOrientation();
GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_HEIGHT, orientation, titleHeight);
- GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_HEIGHT, orientation, btnHeight);
+ GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, bottomHeight);
GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_TOP_MRAGIN, orientation, textTopMargin);
GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_TOP_MRAGIN_NO_BUTTON, orientation, textTopMarginNoButton);
- GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_INTERNAL_GAP, orientation, btnGap);
- GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_TOP_MARGIN, orientation, btnTopMargin);
- GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_BOTTOM_MARGIN, orientation, btnBottomMargin);
-
GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin);
GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, orientation, transBottomMargin);
// fall through
case MSGBOX_STYLE_CANCELTRYCONTINUE:
totalH += textTopMargin * 2.0f
- + btnHeight
- + btnTopMargin
- + btnBottomMargin;
+ + bottomHeight;
break;
}
#include "FUiCtrl_FrameImpl.h"
#include "FUiCtrl_MessageBoxImpl.h"
#include "FUiCtrl_Form.h"
-#include "FUiCtrl_Indicator.h"
using namespace Tizen::Graphics;
r = CalculateTitleTextSize(titleTextSize, minTitleTextSize);
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- _titleBounds.height = titleHeight - titleTopMargin;
+ _titleBounds.height = _pTitleTextObject->GetTotalHeightF();
}
// Text
_titleBounds = FloatRectangle(titleLeftMargin + transLeftMargin,
__titleBgBounds.y + (__titleBgBounds.height - labelHeight) / 2,
defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin),
- titleHeight - titleTopMargin);
+ labelHeight);
}
else
{
__buttonBgBounds = FloatRectangle(transLeftMargin, __pMessageBox->GetTotalHeight() - bottomHeight - transBottomMargin, _CoordinateSystemUtils::ConvertToFloat(defaultWidth)- (transLeftMargin + transRightMargin), bottomHeight);
- r = CreateButtons();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ GetButtonString();
+
+ if (__buttonNum != 0)
+ {
+ r = CreateButtons();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
return r;
pSimpleTextForBodyText = new (std::nothrow) TextSimple(text, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
SysTryCatch(NID_UI_CTRL, pSimpleTextForBodyText != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ if (isTitle == true)
+ {
+ pSimpleTextForBodyText->SetTextShadowEnabled(true);
+ textObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
+ }
+ else
+ {
+ textObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD);
+ }
textObject->AppendElement(*pSimpleTextForBodyText);
- textObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD);
textObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
textObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT);
textObject->SetBounds(bounds);
modalResult = GetReturnValue();
+ _ModalLoopManager::GetInstance()->SetLastExitCode(-1);
+
return r;
}
_MessageBoxPresenter::CreateButtons(void)
{
result r = E_SUCCESS;
- GetButtonString();
//Button Colors
Color buttonColorNormal(0x00000000);
Color buttonColorPressed(0x00000000);
Color buttonTextHighlighted(0x00000000);
bool isCustomBitmap = false;
-
- Bitmap* pButtonBgNormal = null;
- Bitmap* pButtonBgPressed = null;
- Bitmap* pButtonBgDisabled = null;
- Bitmap* pButtonBgHighlighted = null;
-
Bitmap* pComposedButtonBgNormal = null;
Bitmap* pComposedButtonBgPressed = null;
Bitmap* pComposedButtonBgDisabled = null;
GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_DISABLED, buttonTextDisabled);
GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_HIGHLIGHTED, buttonTextHighlighted);
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgNormal);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorNormal, pComposedButtonBgNormal);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating. Failed to load Bottom button normal Image.", GetErrorMessage(r));
isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL);
if (!isCustomBitmap)
{
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonNormalEffect);
- r = GetLastResult();
+ r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonNormalEffect);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button normal effect Image.", GetErrorMessage(r));
}
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgPressed);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorPressed, pComposedButtonBgPressed);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button pressed Image.", GetErrorMessage(r));
isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED);
if (!isCustomBitmap)
{
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonPressedEffect);
- r = GetLastResult();
+ r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonPressedEffect);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button pressed effect Image.", GetErrorMessage(r));
}
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgDisabled);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorDisabled, pComposedButtonBgDisabled);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button disabled Image.", GetErrorMessage(r));
isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED);
if (!isCustomBitmap)
{
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_DISABLED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonDisabledEffect);
- r = GetLastResult();
+ r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_DISABLED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonDisabledEffect);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button disabled effect Image.", GetErrorMessage(r));
}
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgHighlighted);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorHighlighted, pComposedButtonBgHighlighted);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button highlighted Image.", GetErrorMessage(r));
- pComposedButtonBgNormal = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgNormal, Color::GetColor(COLOR_ID_MAGENTA), buttonColorNormal);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pComposedButtonBgNormal != null), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- pComposedButtonBgPressed = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgPressed, Color::GetColor(COLOR_ID_MAGENTA), buttonColorPressed);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pComposedButtonBgPressed != null), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- pComposedButtonBgDisabled = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgDisabled, Color::GetColor(COLOR_ID_MAGENTA), buttonColorDisabled);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pComposedButtonBgDisabled != null), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- pComposedButtonBgHighlighted = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgHighlighted, Color::GetColor(COLOR_ID_MAGENTA), buttonColorHighlighted);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pComposedButtonBgHighlighted != null), , r, "[%s] Propagating.", GetErrorMessage(r));
-
__pButtonListener = new (std::nothrow) _MessageBoxButtonListener();
SysTryCatch(NID_UI_CTRL, __pButtonListener != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
}
- delete pButtonBgNormal;
- pButtonBgNormal = null;
-
- delete pButtonBgPressed;
- pButtonBgPressed = null;
-
- delete pButtonBgDisabled;
- pButtonBgDisabled = null;
-
- delete pButtonBgHighlighted;
- pButtonBgHighlighted = null;
-
delete pComposedButtonBgNormal;
pComposedButtonBgNormal = null;
CATCH:
- delete pButtonBgNormal;
- pButtonBgNormal = null;
-
- delete pButtonBgPressed;
- pButtonBgPressed = null;
-
- delete pButtonBgDisabled;
- pButtonBgDisabled = null;
-
- delete pButtonBgHighlighted;
- pButtonBgHighlighted = null;
-
delete pComposedButtonBgNormal;
pComposedButtonBgNormal = null;
pElementMessageBox->SetSupportOperatingGesture(false);
pElementMessageBox->SetName(L"MessageBox");
- pElementMessageBox->SetHint(L"double tap to close");
+ pElementMessageBox->SetHintWithStringId("IDS_TPLATFORM_BODY_CENTRE_POP_UP_IS_OPEN_DOUBLE_TAP_TO_CLOSE_THE_POP_UP_T_TTS");
pElementMessageBox->SetBounds(FloatRectangle(0.0f, 0.0f, __pMessageBox->GetBoundsF().width, __pMessageBox->GetBoundsF().height));
pContainer->AddElement(*pElementMessageBox);
}
{
MessageBoxStyle style = __pMessageBox->GetMsgBoxStyle();
- if ((__pButtonListener->GetBeginModal() == true) || (__beginModal == true))
+ if ((__pButtonListener != null) && (__pButtonListener->GetBeginModal() == true))
{
switch (style)
{
// fall through
case MSGBOX_STYLE_RETRYCANCEL:
_ModalLoopManager::GetInstance()->EndMainLoop(MSGBOX_BUTTON_CANCEL, false);
- __beginModal = false;
+ __pButtonListener->SetBeginModal(false);
break;
default:
break;
pImpl = _ControlImpl::GetInstance(source);
pControl = dynamic_cast<const _Button*>(&pImpl->GetCore());
+ if (!pControl->IsFocusModeStateEnabled())
+ {
+ return;
+ }
+
if (pControl != null)
{
if (keyCode == KEY_ENTER)
#include "FUi_ControlImplManager.h"
#include "FUi_EcoreEvasMgr.h"
#include "FUi_ResourceManager.h"
+#include "FUi_TouchManager.h"
#include "FUiAnim_VisualElement.h"
#include "FUiAnim_AnimationManager.h"
#include "FUi_AccessibilityContainer.h"
#include "FUiCtrl_Scroll.h"
#include "FUiCtrl_ContextMenu.h"
#include "FUiCtrl_OptionMenuItem.h"
-#include "FUi_TouchManager.h"
using namespace Tizen::Graphics;
using namespace Tizen::Base;
using namespace Tizen::Media;
+using namespace Tizen::Ui;
using namespace Tizen::Ui::Animations;
using namespace Runtime;
, __isMaxVisibleCountSet(false)
, __isFocused(false)
, __currentFocusedIndex(-1)
+ , __selectedActionID(-1)
+ , __isAnimating(false)
+ , __pBoundsTimingFunction(null)
+ , __pOpacityTimingFunction(null)
, __windowRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
, __bodyRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
, __itemRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
GetOwner()->UnlockInputEvent();
}
+ if (GetVisualElement())
+ {
+ GetVisualElement()->RemoveAllAnimations();
+ }
+
__pCurrentFrame = null;
if (__pScrollPanel != null)
delete __pActionEvent;
__pActionEvent = null;
+ delete __pBoundsTimingFunction;
+ __pBoundsTimingFunction = null;
+
+ delete __pOpacityTimingFunction;
+ __pOpacityTimingFunction= null;
+
__actionId.RemoveAll();
RemoveAllAccessibilityElement();
GET_SHAPE_CONFIG(OPTIONMENU::LIST_ITEM_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, minHeight);
pOptionMenu = new (std::nothrow) _OptionMenu();
- SysTryReturn(NID_UI_CTRL, pOptionMenu != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pOptionMenu != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pOptionMenu->CreateRootVisualElement();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pScrollPanel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE);
pScroll = pScrollPanel->GetScrollBar();
- SysTryCatch(NID_UI_CTRL, pScroll, , E_INVALID_STATE, "[E_INVALID_STATE] _Scroll isn't constructed");
+ SysTryCatch(NID_UI_CTRL, pScroll, , E_INVALID_STATE, "[%s] _Scroll is not constructed", GetErrorMessage(E_INVALID_STATE));
pScroll->SetContextMenuScrollType(true);
pOptionMenu->AttachChild(*(pScrollPanel));
bool
_OptionMenu::OnFocusLost(const _Control &source)
{
+ __pOptionMenuPresenter->ClearFocus();
__isFocused = false;
return true;
}
void
-_OptionMenu::OnFocusModeStateChanged(void)
+_OptionMenu::ResetFocus(void)
{
__isFocused = false;
__pOptionMenuPresenter->ClearFocus();
__isFocused = true;
__currentFocusedIndex = 0;
__pOptionMenuPresenter->DrawFocus(__currentFocusedIndex);
+ __pScrollPanel->ScrollToTop();
}
return true;
}
bool
_OptionMenu::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (__isAnimating && GetVisualElement())
+ {
+ GetVisualElement()->RemoveAllAnimations();
+ }
+
_KeyCode keyCode = keyInfo.GetKeyCode();
if (keyCode == _KEY_ENTER && __isFocused)
{
- __pOptionMenuPresenter->OnEnterKeyReleased(__currentFocusedIndex);
+ if (!__isAnimating)
+ {
+ __pOptionMenuPresenter->OnEnterKeyReleased(__currentFocusedIndex);
+ }
return true;
}
{
__isFocused = false;
__pOptionMenuPresenter->ClearFocus();
-
- SetVisibleState(false);
+ CloseAnimation(-1);
return true;
}
{
if (__isAttachedToMainTree)
{
- SetVisibleState(false);
+ CloseAnimation(-1);
}
else
{
return false;
}
+void
+_OptionMenu::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally)
+{
+ if (!completedNormally)
+ {
+ VisualElementPropertyAnimation* pPropertyAnimation = dynamic_cast< VisualElementPropertyAnimation* >(const_cast< VisualElementAnimation* >(&animation));
+ if (pPropertyAnimation)
+ {
+ target.SetProperty(keyName, pPropertyAnimation->GetEndValue());
+ }
+ }
+
+ __isAnimating = false;
+
+ if (keyName == L"ClosingOpacityAnimation")
+ {
+ SetVisibleState(false);
+
+ if (__selectedActionID != -1)
+ {
+ int selectedActionId = __selectedActionID;
+ __selectedActionID = -1;
+ FireActionEvent(selectedActionId);
+ }
+ }
+}
+
result
_OptionMenu::Install(void)
{
// load bitmap of a background and arrow
r = LoadBitmap();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to load bitmap.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load bitmap.");
r = __actionId.Construct();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to construct arraylist.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to construct arraylist.");
_OptionMenuPresenter* pPresenter = new (std::nothrow) _OptionMenuPresenter(this);
- SysTryReturnResult(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
SetPresenter(*pPresenter);
screen = _ControlManager::GetInstance()->GetScreenSizeF();
r = SetBounds(FloatRectangle(0.0f, 0.0f, screen.width, screen.height));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "SetBounds failed.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set option menu bounds.");
SetMovable(false);
SetResizable(false);
if (pOwner == null)
{
__pCurrentFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
- SysTryReturn(NID_UI_CTRL, __pCurrentFrame != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Current frame instance is not available.");
+ SysTryReturnResult(NID_UI_CTRL, __pCurrentFrame != null, E_SYSTEM, "Current frame instance is not available.");
_Form* pForm = __pCurrentFrame->GetCurrentForm();
pForm != null ? SetOwner(pForm) : SetOwner(__pCurrentFrame);
}
}
- r = __pOptionMenuPresenter->CalculateWindowRect();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- GetEcoreEvasMgr()->GetEcoreEvas()->SetWindowBounds(*this, GetBoundsF());
-
- SetAllAccessibilityElement();
-
- _VisualElement* pVisualElement = GetVisualElement();
- FloatRectangle pBounds = pVisualElement->GetBounds();
- float oldBoundsX = pBounds.x;
- float oldBoundsY = pBounds.y;
+ __layout = GetOwner()->GetOrientation();
- pVisualElement->SetBounds(pBounds);
- pVisualElement->SetOpacity(0.0f);
+ if (!__isMaxVisibleCountSet)
+ {
+ GET_SHAPE_CONFIG(OPTIONMENU::MAX_VISIBLE_ITEM_COUNT, __layout, __showItemCount);
+ }
- bool enable = pVisualElement->IsImplicitAnimationEnabled();
+ __pOptionMenuPresenter->CalculateItemMaximumWidth();
- pVisualElement->SetImplicitAnimationEnabled(true);
+ r = __pOptionMenuPresenter->CalculateWindowRect();
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- pBounds.x = oldBoundsX;
- pBounds.y = oldBoundsY;
- pVisualElement->SetBounds(pBounds);
- pVisualElement->SetOpacity(1.0f);
+ GetEcoreEvasMgr()->GetEcoreEvas()->SetWindowBounds(*this, GetBoundsF());
- pVisualElement->SetImplicitAnimationEnabled(enable);
+ OpenAnimation();
return _Window::OnAttachedToMainTree();
}
{
pTouchManager->SetTouchCanceled(null);
}
- SetTouchCapture(false, false);
- return _Window::OnActivated();
+ _Window::OnActivated();
+
+ SetTouchCapture(false, false);
+
+ return;
}
void
{
result r = E_SUCCESS;
- SysTryReturn(NID_UI_CTRL, (GetItemIndexFromActionId(actionId) == -1), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred."
+ SysTryReturnResult(NID_UI_CTRL, (GetItemIndexFromActionId(actionId) == -1), E_SYSTEM, "A system error has occurred."
" The option menu already has an item with the same action id (%d)", actionId);
r = __pOptionMenuPresenter->AddItem(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to add a item.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add a item.");
__actionId.Add(actionId);
- __pOptionMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pOptionMenuPresenter->CalculateWindowRect();
+ }
return r;
}
{
result r = E_SUCCESS;
- SysTryReturn(NID_UI_CTRL, (GetItemIndexFromActionId(actionId) == -1), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred."
+ SysTryReturnResult(NID_UI_CTRL, (GetItemIndexFromActionId(actionId) == -1), E_SYSTEM, "A system error has occurred."
" The option menu already has an item with the same action id (%d)", actionId);
r = __pOptionMenuPresenter->InsertItem(mainIndex, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to add a item.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add a item.");
__actionId.InsertAt(actionId, mainIndex);
- __pOptionMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pOptionMenuPresenter->CalculateWindowRect();
+ }
return r;
}
result r = E_SUCCESS;
r = __pOptionMenuPresenter->SetItem(mainIndex, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to set a item.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set a item.");
__actionId.SetAt(actionId, mainIndex);
- __pOptionMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pOptionMenuPresenter->CalculateWindowRect();
+ }
return r;
}
_OptionMenu::AddSubItem(int mainIndex, const String& text, int actionId)
{
result r = __pOptionMenuPresenter->AddSubItem(mainIndex, text, actionId);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.");
if (__pSubMenu != null && mainIndex == __subMenuIndex)
{
_OptionMenu::InsertSubItemAt(int mainIndex, int subIndex, const String& text, int actionId)
{
result r = __pOptionMenuPresenter->InsertSubItemAt(mainIndex, subIndex, text, actionId);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.");
if (__pSubMenu != null && mainIndex == __subMenuIndex)
{
_OptionMenu::SetSubItemAt(int mainIndex, int subIndex, const String& text, int actionId)
{
result r = __pOptionMenuPresenter->SetSubItemAt(mainIndex, subIndex, text, actionId);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.");
if (__pSubMenu != null && mainIndex == __subMenuIndex)
{
_OptionMenu::RemoveSubItemAt(int mainIndex, int subIndex)
{
result r = __pOptionMenuPresenter->RemoveSubItemAt(mainIndex, subIndex);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.");
if (__pSubMenu != null && mainIndex == __subMenuIndex)
{
if (__pSubMenu->GetOwner() == null)
{
_Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
- SysTryReturn(NID_UI_CTRL, pFrame != null, E_SYSTEM,
- E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
+ SysTryReturnResult(NID_UI_CTRL, pFrame != null, E_SYSTEM, "This instance is not constructed.");
_Form* pForm = pFrame->GetCurrentForm();
if (pForm != null)
result
_OptionMenu::DestroySubMenu(void)
{
- if (__pSubMenu == null)
- {
- return E_SYSTEM;
- }
+ SysTryReturnResult(NID_UI_CTRL, __pSubMenu != null, E_SYSTEM, "A system error has occured. __pSubMenu is null.");
__pSubMenu->Close();
delete __pSubMenu;
result r = E_SUCCESS;
r = __pOptionMenuPresenter->InsertItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to insert a item.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to insert a item.");
__actionId.InsertAt(actionId, index);
- __pOptionMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pOptionMenuPresenter->CalculateWindowRect();
+ }
return r;
}
result r = E_SUCCESS;
r = __pOptionMenuPresenter->SetItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to set a item.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set a item.");
__actionId.SetAt(actionId, index);
- __pOptionMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pOptionMenuPresenter->CalculateWindowRect();
+ }
return r;
}
result r = E_SUCCESS;
r = __pOptionMenuPresenter->DeleteItem(index);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove a item.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove a item.");
__actionId.RemoveAt(index);
- __pOptionMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pOptionMenuPresenter->CalculateWindowRect();
+ }
return r;
}
__actionId.RemoveAll();
- __pOptionMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pOptionMenuPresenter->CalculateWindowRect();
+ }
SetLastResult(r);
return;
{
int showCount = count.ToInt();
- if (showCount < 1)
- {
- SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Count is invalid.");
- return E_INVALID_ARG;
- }
+ SysTryReturnResult(NID_UI_CTRL, showCount > 0, E_INVALID_ARG, "Invalid argument is used. Count is invalid.");
__showItemCount = showCount;
Variant
_OptionMenu::GetPropertyMaxVisibleItemsCount(void) const
{
- return Tizen::Ui::Variant(__showItemCount);
+ return Variant(__showItemCount);
}
int
result r;
r = SetProperty("maxVisibleItemsCount", Variant(count));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to set property.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set property.");
- r = __pOptionMenuPresenter->CalculateWindowRect();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to calculate window.");
+ if (__isAttachedToMainTree)
+ {
+ __pOptionMenuPresenter->CalculateWindowRect();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to calculate window.");
+ }
return E_SUCCESS;
}
__backgroundColor = color.ToColor();
result r = LoadColorReplacedBitmap(__backgroundColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error occurred. Failed to load the color replacement bitmap.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to load the color replacement bitmap.");
return E_SUCCESS;
}
Variant
_OptionMenu::GetPropertyColor(void) const
{
- return Tizen::Ui::Variant(__backgroundColor);
+ return Variant(__backgroundColor);
}
result
_OptionMenu::SetMaxVisibleItemsCount(int maxItemsCount)
{
result r = SetPropertyMaxVisibleItemsCount(maxItemsCount);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__isMaxVisibleCountSet = true;
- __pOptionMenuPresenter->CalculateWindowRect();
+ if (__isAttachedToMainTree)
+ {
+ __pOptionMenuPresenter->CalculateWindowRect();
+ }
return E_SUCCESS;
}
Variant
_OptionMenu::GetPropertyNormalItemColor(void) const
{
- return Tizen::Ui::Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL]);
+ return Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL]);
}
result
Variant
_OptionMenu::GetPropertyPressedItemColor(void) const
{
- return Tizen::Ui::Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED]);
+ return Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED]);
}
result
Variant
_OptionMenu::GetPropertyHighlightedItemColor(void) const
{
- return Tizen::Ui::Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]);
+ return Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]);
}
result
Variant
_OptionMenu::GetPropertyNormalItemTextColor(void) const
{
- return Tizen::Ui::Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL]);
+ return Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL]);
}
result
Variant
_OptionMenu::GetPropertyPressedItemTextColor(void) const
{
- return Tizen::Ui::Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED]);
+ return Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED]);
}
result
Variant
_OptionMenu::GetPropertyHighlightedItemTextColor(void) const
{
- return Tizen::Ui::Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]);
+ return Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]);
}
result
if (__pActionEvent == null)
{
__pActionEvent = _ActionEvent::CreateInstanceN(*this);
- SysTryReturn(NID_UI_CTRL, __pActionEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, __pActionEvent != null, GetLastResult(), "Propagating.");
r = __pActionEvent->AddListener(listener);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to remove an action event listener.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to remove action event listener.");
}
return r;
result
_OptionMenu::RemoveActionEventListener(const _IActionEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE, E_INVALID_STATE,
- "[E_INVALID_STATE] The action event instance isn't constructed.");
+ SysTryReturnResult(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE,
+ "The action event instance isn't constructed.");
result r = E_SUCCESS;
r = __pActionEvent->RemoveListener(listener);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to remove an action event listener");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove action event listener");
return r;
}
{
IEventArg* pArg = _ActionEvent::CreateActionEventArgN(actionId);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (pArg != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, (pArg != null), r, "Propagating.");
r = __pActionEvent->Fire(*pArg);
_OptionMenu::LoadColorReplacedBitmap(const Color& color)
{
result r = E_SUCCESS;
- Bitmap* ptempNormalBitmap = null;
// Delete old bitmap
if (__pBackgroundNormalBitmap != null)
__pBackgroundNormalBitmap = null;
}
- r = GET_BITMAP_CONFIG_N(OPTIONMENU::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, ptempNormalBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap.");
-
- __pBackgroundNormalBitmap = _BitmapImpl::GetColorReplacedBitmapN(*ptempNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), color);
- SysTryCatch(NID_UI_CTRL, __pBackgroundNormalBitmap != null, , GetLastResult(), "[%s] Propagating.",
- GetErrorMessage(GetLastResult()));
- delete ptempNormalBitmap;
-
- return r;
-
-CATCH:
- delete ptempNormalBitmap;
-
- delete __pBackgroundNormalBitmap;
- __pBackgroundNormalBitmap = null;
+ r = GET_REPLACED_BITMAP_CONFIG_N(OPTIONMENU::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, color, __pBackgroundNormalBitmap);
+ r = GetLastResult();
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load bitmap.");
return r;
}
return __pOptionMenuPresenter->OnPreviewTouchPressed(source, touchinfo);
}
+void
+_OptionMenu::OpenAnimation()
+{
+ VisualElementPropertyAnimation* pBoundsAnimation;
+ VisualElementPropertyAnimation* pOpacityAnimation;
+
+ _VisualElement* pVisualElement = GetVisualElement();
+ SysTryReturnVoidResult(NID_UI_CTRL, pVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element.");
+
+ FloatRectangle pEndBounds = pVisualElement->GetBounds();
+ FloatRectangle pStartBounds(0.0f, 0.0f, 0.0f, 0.0f);
+ pStartBounds = pEndBounds;
+
+ float animationDistance = 0.0f;
+
+ GET_SHAPE_CONFIG(OPTIONMENU::ANIMATION_DISTANCE_Y, _CONTROL_ORIENTATION_PORTRAIT, animationDistance);
+
+ pStartBounds.y += animationDistance;
+
+ pBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation();
+ SysTryReturnVoidResult(NID_UI_CTRL, pBoundsAnimation != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation();
+ SysTryCatch(NID_UI_CTRL, pOpacityAnimation != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ if (__pBoundsTimingFunction != null)
+ {
+ delete __pBoundsTimingFunction;
+ __pBoundsTimingFunction = null;
+ }
+
+ __pBoundsTimingFunction = new (std::nothrow) SineThirtyThreeTimingFunction();
+ SysTryCatch(NID_UI_CTRL, __pBoundsTimingFunction != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ pBoundsAnimation->SetPropertyName(L"bounds");
+ pBoundsAnimation->SetStartValue(Variant(pStartBounds));
+ pBoundsAnimation->SetEndValue(Variant(pEndBounds));
+ pBoundsAnimation->SetTimingFunction(__pBoundsTimingFunction);
+ pBoundsAnimation->SetDuration(ANIMATION_DURATION);
+
+ pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
+
+ if (__pOpacityTimingFunction != null)
+ {
+ delete __pOpacityTimingFunction;
+ __pOpacityTimingFunction = null;
+ }
+
+ __pOpacityTimingFunction = new (std::nothrow) SineSixtyTimingFunction();
+ SysTryCatch(NID_UI_CTRL, __pOpacityTimingFunction != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ pOpacityAnimation->SetPropertyName(L"opacity");
+ pOpacityAnimation->SetStartValue(Variant(0.0f));
+ pOpacityAnimation->SetEndValue(Variant(1.0f));
+ pOpacityAnimation->SetTimingFunction(__pOpacityTimingFunction);
+ pOpacityAnimation->SetDuration(ANIMATION_DURATION);
+
+ pOpacityAnimation->SetVisualElementAnimationStatusEventListener(this);
+
+ pVisualElement->AddAnimation(L"bounds", *pBoundsAnimation);
+ pVisualElement->AddAnimation(L"opacity", *pOpacityAnimation);
+
+ __isAnimating = true;
+
+ delete pBoundsAnimation;
+
+ delete pOpacityAnimation;
+
+ return;
+
+CATCH:
+ delete pBoundsAnimation;
+ delete pOpacityAnimation;
+
+ delete __pBoundsTimingFunction;
+ __pBoundsTimingFunction = null;
+
+ delete __pOpacityTimingFunction;
+ __pOpacityTimingFunction = null;
+
+ return;
+}
+
+void
+_OptionMenu::CloseAnimation(int actionId)
+{
+ __selectedActionID = actionId;
+
+ VisualElementPropertyAnimation* pBoundsAnimation ;
+ VisualElementPropertyAnimation* pOpacityAnimation;
+
+ _VisualElement* pVisualElement = GetVisualElement();
+ SysTryReturnVoidResult(NID_UI_CTRL, pVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element.");
+
+ FloatRectangle pStartBounds = pVisualElement->GetBounds();
+ FloatRectangle pEndBounds(0.0f, 0.0f, 0.0f, 0.0f);
+ pEndBounds = pStartBounds;
+
+ float animationDistance = 0.0f;
+
+ GET_SHAPE_CONFIG(OPTIONMENU::ANIMATION_DISTANCE_Y, _CONTROL_ORIENTATION_PORTRAIT, animationDistance);
+
+ pEndBounds.y += animationDistance;
+
+ pBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation();
+ SysTryReturnVoidResult(NID_UI_CTRL, pBoundsAnimation != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation();
+ SysTryCatch(NID_UI_CTRL, pOpacityAnimation != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ if (__pBoundsTimingFunction != null)
+ {
+ delete __pBoundsTimingFunction;
+ __pBoundsTimingFunction = null;
+ }
+
+ __pBoundsTimingFunction = new (std::nothrow) SineThirtyThreeTimingFunction();
+ SysTryCatch(NID_UI_CTRL, __pBoundsTimingFunction != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ pBoundsAnimation->SetPropertyName(L"bounds");
+ pBoundsAnimation->SetStartValue(Variant(pStartBounds));
+ pBoundsAnimation->SetEndValue(Variant(pEndBounds));
+ pBoundsAnimation->SetTimingFunction(__pBoundsTimingFunction);
+ pBoundsAnimation->SetEndValueApplied(false);
+ pBoundsAnimation->SetDuration(ANIMATION_DURATION);
+
+ pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
+
+ if (__pOpacityTimingFunction != null)
+ {
+ delete __pOpacityTimingFunction;
+ __pOpacityTimingFunction = null;
+ }
+
+ __pOpacityTimingFunction = new (std::nothrow) SineSixtyTimingFunction();
+ SysTryCatch(NID_UI_CTRL, __pOpacityTimingFunction != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ pOpacityAnimation->SetPropertyName(L"opacity");
+ pOpacityAnimation->SetStartValue(Variant(1.0f));
+ pOpacityAnimation->SetEndValue(Variant(0.0f));
+ pOpacityAnimation->SetEndValueApplied(false);
+ pOpacityAnimation->SetTimingFunction(__pOpacityTimingFunction);
+ pOpacityAnimation->SetDuration(ANIMATION_DURATION);
+
+ pOpacityAnimation->SetVisualElementAnimationStatusEventListener(this);
+
+ pVisualElement->AddAnimation(L"ClosingBoundsAnimation", *pBoundsAnimation);
+ pVisualElement->AddAnimation(L"ClosingOpacityAnimation", *pOpacityAnimation);
+
+ __isAnimating = true;
+
+ delete pBoundsAnimation;
+ delete pOpacityAnimation;
+
+ return;
+
+CATCH:
+ delete pBoundsAnimation;
+
+ delete pOpacityAnimation;
+
+ delete __pBoundsTimingFunction;
+ __pBoundsTimingFunction = null;
+
+ delete __pOpacityTimingFunction;
+ __pOpacityTimingFunction = null;
+
+ return;
+}
+
bool
_OptionMenu::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
+ if (__isFocused)
+ {
+ ResetFocus();
+ }
return __pOptionMenuPresenter->OnTouchPressed(source, touchinfo);
}
bool
_OptionMenu::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
{
+ if (__isAnimating && GetVisualElement())
+ {
+ GetVisualElement()->RemoveAllAnimations();
+ return true;
+ }
+
return __pOptionMenuPresenter->OnTouchReleased(source, touchinfo);
}
__rotation = rotation;
__pOptionMenuPresenter->ResetSelectedItem();
- __pOptionMenuPresenter->CalculateWindowRect();
}
void
bool
_OptionMenu::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
- SetVisibleState(false);
+ CloseAnimation(-1);
return true;
}
const Bitmap* pPressedBitmap, const Bitmap *pHighlightedBitmap)
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex <= GetItemCount()), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified main index (%d) is invalid.", mainIndex);
+ SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex <= GetItemCount()), E_INVALID_ARG,
+ "Invalid argument is used. The specified main index (%d) is invalid.", mainIndex);
return GetCore().InsertItemAt(mainIndex, text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap);
}
const Bitmap* pPressedBitmap, const Bitmap *pHighlightedBitmap)
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetItemCount()), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified main index (%d) is invalid.", mainIndex);
+ SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetItemCount()), E_INVALID_ARG,
+ "Invalid argument is used. The specified main index (%d) is invalid.", mainIndex);
return GetCore().SetItemAt(mainIndex, text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap);
}
_OptionMenuImpl::RemoveItemAt(int mainIndex)
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetItemCount()), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified main index (%d) is invalid.", mainIndex);
+ SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetItemCount()), E_INVALID_ARG,
+ "Invalid argument is used. The specified main index (%d) is invalid.", mainIndex);
return GetCore().RemoveItemAt(mainIndex);
}
{
ClearLastResult();
SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetItemCount()), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified main index (%d) is invalid.", mainIndex);
+ "[%s] Invalid argument is used. The specified main index (%d) is invalid.", GetErrorMessage(E_INVALID_ARG), mainIndex);
return GetCore().GetItemActionIdAt(mainIndex);
}
_OptionMenuImpl::AddSubItem(int mainIndex, const String& text, int actionId)
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified main index (%d) is negative.", mainIndex);
+ SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG,
+ "Invalid argument is used. The specified main index (%d) is negative.", mainIndex);
return GetCore().AddSubItem(mainIndex, text, actionId);
}
_OptionMenuImpl::InsertSubItemAt(int mainIndex, int subIndex, const String& text, int actionId)
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified main index (%d) is negative.", mainIndex);
- SysTryReturn(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified sub index (%d) is negative.", subIndex);
+ SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG,
+ "Invalid argument is used. The specified main index (%d) is negative.", mainIndex);
+ SysTryReturnResult(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG,
+ "Invalid argument is used. The specified sub index (%d) is negative.", subIndex);
return GetCore().InsertSubItemAt(mainIndex, subIndex, text, actionId);
}
_OptionMenuImpl::SetSubItemAt(int mainIndex, int subIndex, const String& text, int actionId)
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified main index (%d) is negative.", mainIndex);
- SysTryReturn(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified sub index (%d) is negative.", subIndex);
+ SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG,
+ "Invalid argument is used. The specified main index (%d) is negative.", mainIndex);
+ SysTryReturnResult(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG,
+ "Invalid argument is used. The specified sub index (%d) is negative.", subIndex);
return GetCore().SetSubItemAt(mainIndex, subIndex, text, actionId);
}
_OptionMenuImpl::RemoveSubItemAt(int mainIndex, int subIndex)
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified main index (%d) is negative.", mainIndex);
- SysTryReturn(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified sub index (%d) is negative.", subIndex);
+ SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG,
+ "Invalid argument is used. The specified main index (%d) is negative.", mainIndex);
+ SysTryReturnResult(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG,
+ "Invalid argument is used. The specified sub index (%d) is negative.", subIndex);
return GetCore().RemoveSubItemAt(mainIndex, subIndex);
}
{
ClearLastResult();
SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified main index (%d) is negative.", mainIndex);
+ "[%s] Invalid argument is used. The specified main index (%d) is negative.", GetErrorMessage(E_INVALID_ARG), mainIndex);
return GetCore().GetSubItemCount(mainIndex);
}
{
ClearLastResult();
SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified main index (%d) is negative.", mainIndex);
+ "[%s] Invalid argument is used. The specified main index (%d) is negative.", GetErrorMessage(E_INVALID_ARG), mainIndex);
SysTryReturn(NID_UI_CTRL, (subIndex >= 0), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified sub index (%d) is negative.", subIndex);
+ "[%s] Invalid argument is used. The specified sub index (%d) is negative.", GetErrorMessage(E_INVALID_ARG), subIndex);
return GetCore().GetSubItemActionIdAt(mainIndex, subIndex);
}
break;
default:
- SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument at OptionMenuItemStatus.");
+ SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument is used. OptionMenuItemStatus param is invalid.");
r = E_INVALID_ARG;
break;
}
{
ClearLastResult();
- Tizen::Graphics::Color color(0, 0, 0, 0);
+ Color color(0, 0, 0, 0);
switch (status)
{
break;
default:
- SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument at OptionMenuItemStatus.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument is used. OptionMenuItemStatus param is invalid.");
break;
}
break;
default:
- SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument at OptionMenuItemStatus.");
+ SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument is used. OptionMenuItemStatus param is invalid.");
r = E_INVALID_ARG;
break;
}
{
ClearLastResult();
- Tizen::Graphics::Color color(0, 0, 0, 0);
+ Color color(0, 0, 0, 0);
switch (status)
{
break;
default:
- SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument at OptionMenuItemStatus.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument is used. OptionMenuItemStatus parma is invalid.");
break;
}
result
_OptionMenuImpl::OnAttachedToMainTree(void)
{
- SysTryReturn(NID_UI_CTRL, (GetCore().GetItemCount() > 0), E_INVALID_OPERATION, E_INVALID_OPERATION,
- "[E_INVALID_OPERATION] There is no item to show.");
-
- return _WindowImpl::OnAttachedToMainTree();;
+ return _WindowImpl::OnAttachedToMainTree();
}
const char*
, __bgPressedTopBottomMargin(0.0f)
, __textSize(0.0f)
, __text(L"")
- , __pMagentaBgBitmap(null)
+ , __pNormalBgBitmap(null)
+ , __pSelectedBgBitmap(null)
, __pArrowBitmap(null)
, __pArrowPressedBitmap(null)
, __size(FloatDimension(0.0f, 0.0f))
GET_COLOR_CONFIG(OPTIONMENU::ITEM_BG_PRESSED, __selectedBgColor);
GET_COLOR_CONFIG(OPTIONMENU::LIST_ITEM_DIVIDER_01_NORMAL, __lowerDividerLineColor); // lower divider of item n and
GET_COLOR_CONFIG(OPTIONMENU::LIST_ITEM_DIVIDER_02_NORMAL, __upperDividerLineColor); // upper divider of item n+1 are bonded together.
- GET_BITMAP_CONFIG_N(OPTIONMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pMagentaBgBitmap);
+ GET_REPLACED_BITMAP_CONFIG_N(OPTIONMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, Color(0, 0, 0, 0), __pNormalBgBitmap);
InitializeAccessibilityElement();
}
__pTextLabel = null;
}
- delete __pMagentaBgBitmap;
- __pMagentaBgBitmap = null;
+ delete __pNormalBgBitmap;
+ __pNormalBgBitmap = null;
+
+ delete __pSelectedBgBitmap;
+ __pSelectedBgBitmap = null;
delete __pArrowBitmap;
__pArrowBitmap = null;
_OptionMenuItem* pItem = null;
pItem = new (std::nothrow) _OptionMenuItem();
- if (pItem == null)
- {
- SetLastResult(E_OUT_OF_MEMORY);
- return null;
- }
+ SysTryReturn(NID_UI_CTRL, pItem != null, null , E_OUT_OF_MEMORY, "[%s] Memory allocation falied.", GetErrorMessage(E_OUT_OF_MEMORY));
pItem->AcquireHandle();
{
if (__pSubItems == null)
{
- __pSubItems = new (std::nothrow) ArrayList;
- SysTryReturn(NID_UI_CTRL, (__pSubItems != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ __pSubItems = new (std::nothrow) ArrayList();
+ SysTryReturnResult(NID_UI_CTRL, __pSubItems != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
result r = __pSubItems->Construct();
if (r != E_SUCCESS)
}
}
- SysTryReturn(NID_UI_CTRL, (index >= 0 && index <= __pSubItems->GetCount()), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified index (%d) is greater than the available items count.", index);
+ SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index <= __pSubItems->GetCount()), E_INVALID_ARG,
+ "Invalid argument is used. The specified index (%d) is greater than the available items count.", index);
return __pSubItems->InsertAt(subItem, index);
}
result
_OptionMenuItem::RemoveSubItemAt(int index)
{
- SysTryReturn(NID_UI_CTRL, (__pSubItems != null), E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The sub items list is null.");
- SysTryReturn(NID_UI_CTRL, (index >= 0 && index < __pSubItems->GetCount()), E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The specified index (%d) is greater than the available items count.", index);
+ SysTryReturnResult(NID_UI_CTRL, __pSubItems != null, E_SYSTEM,
+ "A system error has occurred. The sub items list is null.");
+ SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < __pSubItems->GetCount()), E_SYSTEM,
+ "A system error has occurred. The specified index (%d) is greater than the available items count.", index);
return __pSubItems->RemoveAt(index, true);
}
_OptionMenuItem*
_OptionMenuItem::GetSubItem(int index)
{
- SysTryReturn(NID_UI_CTRL, (__pSubItems != null), null, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The sub items list is null.", index);
+ SysTryReturn(NID_UI_CTRL, __pSubItems != null, null, E_SYSTEM,
+ "[%s] A system error has occurred. The sub items list is null.", GetErrorMessage(E_SYSTEM), index);
SysTryReturn(NID_UI_CTRL, (index >= 0 && index < __pSubItems->GetCount()), null, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The specified index (%d) is greater than the available items count.", index);
+ "[%s] A system error has occurred. The specified index (%d) is greater than the available items count.", GetErrorMessage(E_SYSTEM), index);
return static_cast<_OptionMenuItem*>(__pSubItems->GetAt(index));
}
{
pContainer->Activate(true);
_AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnVoidResult(NID_UI_CTRL, pElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pElement, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- pElement->SetTrait(L"Optionual popup");
+ pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS");
pElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
pContainer->AddElement(*pElement);
}
result
_OptionMenuItem::SetBitmap(OptionMenuItemDrawingStatus status, const Bitmap* pBitmap)
{
- if (status < OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL || status > OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED)
- {
- return E_INVALID_ARG;
- }
+ SysTryReturnResult(NID_UI_CTRL, (status >= OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL && status <= OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED),
+ E_INVALID_ARG, "Invalid argument is used. The status is not valid.");
- SysTryReturn(NID_UI_CTRL, (status != OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL || pBitmap != null), E_INVALID_ARG,
- E_INVALID_ARG, "[E_INVALID_ARG] The normal bitmap must not be null.");
+ SysTryReturnResult(NID_UI_CTRL, (status != OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL || pBitmap != null),
+ E_INVALID_ARG, "Invalid argument is used. The normal bitmap must not be null.");
Bitmap* pClonedBitmap = _BitmapImpl::CloneN(*pBitmap);
}
void
-_OptionMenuItem::SetSize(Tizen::Graphics::FloatDimension size)
+_OptionMenuItem::SetPressedItemColor(Color color)
+{
+ __selectedBgColor = color;
+}
+
+void
+_OptionMenuItem::SetSize(FloatDimension size)
{
__size = size;
}
-Tizen::Graphics::FloatDimension
+FloatDimension
_OptionMenuItem::GetSize(void) const
{
return __size;
}
void
-_OptionMenuItem::SetDrawRect(Tizen::Graphics::FloatRectangle rect)
+_OptionMenuItem::SetDrawRect(FloatRectangle rect)
{
__drawRect = rect;
}
}
void
-_OptionMenuItem::SetPressedDrawRect(Tizen::Graphics::FloatRectangle rect)
+_OptionMenuItem::SetPressedDrawRect(FloatRectangle rect)
{
__pressedDrawRect = rect;
}
textRect.width -= __arrowMargin;
Color arrowColor;
- Bitmap *pArrowBitmap = null;
result r = E_SUCCESS;
FloatRectangle arrowbounds(0.0f, 0.0f, 0.0f, 0.0f);
if (__pArrowBitmap == null)
{
// Load Contextual Popup Arrow Bitmap
- r = GET_BITMAP_CONFIG_N(OPTIONMENU::CONTEXTUAL_POPUP_ARROW, BITMAP_PIXEL_FORMAT_ARGB8888, pArrowBitmap);
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
-
GET_COLOR_CONFIG(OPTIONMENU::CONTEXTUAL_POPUP_ARROW_NORMAL, arrowColor);
- __pArrowBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pArrowBitmap, Color::GetColor(COLOR_ID_MAGENTA), arrowColor);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- delete pArrowBitmap;
- pArrowBitmap = null;
+ r = GET_REPLACED_BITMAP_CONFIG_N(OPTIONMENU::CONTEXTUAL_POPUP_ARROW, BITMAP_PIXEL_FORMAT_ARGB8888, arrowColor, __pArrowBitmap);
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap.");
}
if (__pArrowPressedBitmap == null)
{
// Load Contextual Popup Arrow Pressed Bitmap
- r = GET_BITMAP_CONFIG_N(OPTIONMENU::CONTEXTUAL_POPUP_ARROW, BITMAP_PIXEL_FORMAT_ARGB8888, pArrowBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
GET_COLOR_CONFIG(OPTIONMENU::CONTEXTUAL_POPUP_ARROW_PRESSED, arrowColor);
- __pArrowPressedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pArrowBitmap, Color::GetColor(COLOR_ID_MAGENTA), arrowColor);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- delete pArrowBitmap;
- pArrowBitmap = null;
+ r = GET_REPLACED_BITMAP_CONFIG_N(OPTIONMENU::CONTEXTUAL_POPUP_ARROW, BITMAP_PIXEL_FORMAT_ARGB8888, arrowColor, __pArrowPressedBitmap);
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap.");
}
if (__pArrowLabel == null)
{
__pArrowLabel = _Label::CreateLabelN();
- SysTryCatch(NID_UI_CTRL, (__pArrowLabel != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, __pArrowLabel != null, , r, "[%s] Propagating.", GetErrorMessage(r));
AttachChild(*__pArrowLabel);
return;
CATCH:
- delete pArrowBitmap;
delete __pArrowBitmap;
__pArrowBitmap = null;
if (__pUpperDividerLineLabel == null)
{
__pUpperDividerLineLabel = _Label::CreateLabelN();
- SysTryReturnVoidResult(NID_UI_CTRL, __pUpperDividerLineLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnVoidResult(NID_UI_CTRL, __pUpperDividerLineLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
AttachChild(*__pUpperDividerLineLabel);
if (__pBackgroundLabel == null)
{
__pBackgroundLabel = _Label::CreateLabelN();
- SysTryReturnVoidResult(NID_UI_CTRL, __pBackgroundLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnVoidResult(NID_UI_CTRL, __pBackgroundLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
__pBackgroundLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE);
AttachChild(*__pBackgroundLabel);
FloatRectangle bounds = GetBoundsF();
- Color color= Color(0, 0, 0, 0);
- if (__selected)
- {
- color = __selectedBgColor;
- }
-
_ScrollPanel* pScrollPanel = static_cast<_ScrollPanel*>(GetParent());
FloatRectangle boundsScrollPanel = pScrollPanel->GetBoundsF();
__pBackgroundLabel->SetBounds(FloatRectangle(__bgPressedLeftRightMargin, topMargin, bounds.width - __bgPressedLeftRightMargin * 2.0f,
bounds.height - topMargin - bottomMargin));
-
- Bitmap* BgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pMagentaBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), color);
- SysTryReturnVoidResult(NID_UI_CTRL, BgBitmap, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- __pBackgroundLabel->SetBackgroundBitmap(*BgBitmap);
- delete BgBitmap;
- BgBitmap = null;
+ if (__selected)
+ {
+ GET_REPLACED_BITMAP_CONFIG_N(OPTIONMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __selectedBgColor, __pSelectedBgBitmap);
+ __pBackgroundLabel->SetBackgroundBitmap(*__pSelectedBgBitmap);
+ }
+ else
+ {
+ __pBackgroundLabel->SetBackgroundBitmap(*__pNormalBgBitmap);
+ }
__pBackgroundLabel->Invalidate();
}
}
void
-_OptionMenuItem::OnFontChanged(Tizen::Graphics::Font* pFont)
+_OptionMenuItem::OnFontChanged(Font* pFont)
{
String fontName = _Control::GetFont();
Invalidate();
}
-const Tizen::Graphics::Bitmap*
-_OptionMenuItem::GetMagentaBgBitmap(void) const
-{
- return __pMagentaBgBitmap;
-}
-
}}} // Tizen::Ui::Controls
_OptionMenuModel::Construct(void)
{
result r = __items.Construct();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to construct ArrayList.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to construct ArrayList.");
return r;
}
{
_OptionMenuItem* pMainItem = GetItem(mainIndex);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (pItem != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Propagating.");
r = pMainItem->InsertSubItemAt(*pItem, pMainItem->GetSubItemCount());
}
}
result
-_OptionMenuModel::InsertItemAt( _OptionMenuItem* pItem, int mainIndex, int subIndex)
+_OptionMenuModel::InsertItemAt(_OptionMenuItem* pItem, int mainIndex, int subIndex)
{
result r = E_SUCCESS;
{
_OptionMenuItem* pMainItem = GetItem(mainIndex);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (pItem != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Propagating.");
r = pMainItem->InsertSubItemAt(*pItem, subIndex);
{
_OptionMenuItem* pItem = GetItem(mainIndex, subIndex);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (pItem != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Propagating.");
OptionMenuItemDrawingType itemType = OPTION_MENU_ITEM_DRAWING_TYPE_TEXT;
if (subIndex == INVALID_INDEX)
{
int index = GetItemIndexFromActionId(actionId);
- SysTryReturn(NID_UI_CTRL, (index < 0 || mainIndex == index), E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The specified actionId (%d) is not valid", actionId);
+ SysTryReturnResult(NID_UI_CTRL, (index < 0 || mainIndex == index), E_SYSTEM,
+ "A system error has occurred. The specified actionId (%d) is not valid", actionId);
}
else
{
_OptionMenuItem* pMainItem = GetItem(mainIndex);
- SysTryReturn(NID_UI_CTRL, (pMainItem != null), E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The specified main index (%d) does not exists.", mainIndex);
+ SysTryReturnResult(NID_UI_CTRL, pMainItem != null, E_SYSTEM,
+ "A system error has occurred. The specified main index (%d) does not exists.", mainIndex);
int index = pMainItem->GetSubItemIndexFromActionId(actionId);
- SysTryReturn(NID_UI_CTRL, (index < 0 || subIndex == index), E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The specified actionId (%d) is not valid", actionId);
+ SysTryReturnResult(NID_UI_CTRL, (index < 0 || subIndex == index), E_SYSTEM,
+ "A system error has occurred. The specified actionId (%d) is not valid", actionId);
}
_Label* pLabel = null;
_OptionMenuItem* pMainItem = GetItem(mainIndex);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (pMainItem != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pMainItem != null, r, "Propagating.");
- SysTryReturn(NID_UI_CTRL,
- (subIndex > INVALID_INDEX && subIndex < pMainItem->GetSubItemCount()), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified sub index (%d) is out of range.", subIndex);
+ SysTryReturnResult(NID_UI_CTRL,
+ (subIndex > INVALID_INDEX && subIndex < pMainItem->GetSubItemCount()), E_INVALID_ARG,
+ "Invalid argument is used. The specified sub index (%d) is out of range.", subIndex);
return pMainItem->RemoveSubItemAt(subIndex);
}
_OptionMenuItem* pItem = null;
pItem = static_cast <_OptionMenuItem*>(__items.GetAt(selectedIndex));
- SysTryReturnVoidResult(NID_UI_CTRL, (pItem != null), E_SYSTEM, "[E_SYSTEM] A system error occurred. Item is null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_SYSTEM, "[%s] A system error has occurred. pItem must not be null.", GetErrorMessage(E_SYSTEM));
pItem->SetAndInvalidate(false);
}
#include "FUi_CoordinateSystemUtils.h"
#include "FUi_Math.h"
#include "FUi_ResourceManager.h"
+#include "FUiAnim_MatrixUtil.h"
#include "FUiCtrl_ActionEvent.h"
#include "FUiCtrl_IActionEventListener.h"
using namespace Tizen::Base;
using namespace Tizen::Base::Runtime;
using namespace Tizen::Graphics::_Text;
+using namespace Tizen::Ui::Animations;
namespace {
static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f;
-static const int OPTION_MENU_LIST_ELEMENT_TEXT = 0;
-static const int OPTION_MENU_LIST_ELEMENT_BITMAP = 1;
}
namespace Tizen { namespace Ui { namespace Controls
{
+float
+SineThirtyThreeTimingFunction::CalculateProgress(float timeProgress) const
+{
+ const float segments[2][3] = {{0.0f, 0.050f, 0.495f}, {0.495f, 0.940f, 1.0f}};
+
+ float loc_5 = timeProgress;
+ int loc_6 = 2; //Length of the segments array
+ int loc_9 = (int)floor(loc_6 * loc_5);
+
+ if (loc_9 >= loc_6)
+ {
+ loc_9 = loc_6 - 1;
+ }
+
+ float loc_7 = (loc_5 - loc_9 * (1.0f / loc_6)) * loc_6;
+
+ float loc_8[3];
+
+ for (int i = 0; i < 3; i++)
+ {
+ loc_8[i] = segments[loc_9][i];
+ }
+
+ float ret = 0 + 1 * (loc_8[0] + loc_7 * (2 * (1 - loc_7) * (loc_8[1] - loc_8[0]) + loc_7 * (loc_8[2] - loc_8[0])));
+ return ret;
+}
+
+float
+SineSixtyTimingFunction::CalculateProgress(float timeProgress) const
+{
+ const float segments[3][3] = {{0.0f, 0.01f, 0.37f}, {0.37f, 0.72f, 0.888f}, {0.888f, 0.9999f, 1.0f}};
+ float loc_5 = timeProgress;
+ int loc_6 = 3; //Length of the segments array
+ int loc_9 = (int)floor(loc_6 * loc_5);
+
+ if (loc_9 >= loc_6)
+ {
+ loc_9 = loc_6 - 1;
+ }
+ float loc_7 = (loc_5 - loc_9 * (1.0 / loc_6)) * loc_6;
+ float loc_8[3];
+
+ for (int i = 0; i < 3; i++)
+ {
+ loc_8[i] = segments[loc_9][i];
+ }
+
+ float ret = 0 + 1 * (loc_8[0] + loc_7 * (2 * (1 - loc_7) * (loc_8[1] - loc_8[0]) + loc_7 * (loc_8[2] - loc_8[0])));
+
+ return ret;
+}
+
_OptionMenuPresenter::_OptionMenuPresenter(_OptionMenu* pOptionMenu)
: __pOptionMenu(pOptionMenu)
, __pModel(null)
LoadShape();
- __pModel = new (std::nothrow) _OptionMenuModel;
- SysTryCatch(NID_UI_CTRL, __pModel != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ __pModel = new (std::nothrow) _OptionMenuModel();
+ SysTryReturnResult(NID_UI_CTRL, __pModel != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pModel->Construct();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pFont = __pOptionMenu->GetFallbackFont();
r = GetLastResult();
}
_OptionMenuItem*
-_OptionMenuPresenter::CreateItem(const String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap, bool isSubItem)
+_OptionMenuPresenter::CreateItemN(const String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap, bool isSubItem)
{
_OptionMenuItem* pItem = _OptionMenuItem::CreateOptionMenuItemN();
- SysTryReturn(NID_UI_CTRL, pItem != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pItem != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
OptionMenuItemDrawingType itemType = OPTION_MENU_ITEM_DRAWING_TYPE_TEXT;
_Label* pLabel = null;
pLabel->SetBackgroundBitmap(*pNormalBitmap);
pLabel->SetBackgroundColor(Color(0, 0, 0, 0));
- int bitmapY = (__itemHeight - __itemBitmapHeight ) / 2;
+ int bitmapY = (__itemHeight - __itemBitmapHeight) / 2;
pLabel->SetBounds(FloatRectangle(__leftMargin, bitmapY, __itemBitmapWidth, __itemBitmapHeight));
pLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE);
pItem->AttachChild(*pLabel);
result
_OptionMenuPresenter::AddItem(const String& text, int actionId, const Bitmap* normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap)
{
- _OptionMenuItem* pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Memory allocation failed.");
+ _OptionMenuItem* pItem = CreateItemN(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap);
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item.");
result r = __pModel->AddItem(pItem);
if (r != E_SUCCESS)
{
delete pItem;
- SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item.");
+ SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item.");
}
return r;
result
_OptionMenuPresenter::AddSubItem(int mainIndex, const String& text, int actionId)
{
- SysTryReturn(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid mainIndex %d.", mainIndex);
+ SysTryReturnResult(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, "Invalid argument is used. mainIndex (%d) is invalid.", mainIndex);
- _OptionMenuItem* pItem = CreateItem(text, actionId, null, null, null, true);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Memory allocation failed.");
+ _OptionMenuItem* pItem = CreateItemN(text, actionId, null, null, null, true);
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item.");
result r = __pModel->AddItem(pItem, mainIndex);
if (r != E_SUCCESS)
{
delete pItem;
- SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item.");
+ SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item.");
}
return r;
_OptionMenuPresenter::InsertItem(int mainIndex, const String& text, int actionId, const Bitmap* normalBitmap,
const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap)
{
- _OptionMenuItem* pItem = CreateItem(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Memory allocation failed.");
+ _OptionMenuItem* pItem = CreateItemN(text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap);
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item.");
result r = __pModel->InsertItemAt(pItem, mainIndex);
if (r != E_SUCCESS)
{
delete pItem;
- SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item.");
+ SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item.");
}
return E_SUCCESS;
result
_OptionMenuPresenter::InsertSubItemAt(int mainIndex, int subIndex, const String& text, int actionId)
{
- SysTryReturn(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid mainIndex %d.", mainIndex);
- SysTryReturn(NID_UI_CTRL, subIndex >=0 && subIndex <= __pModel->GetSubItemCount(mainIndex), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid subIndex %d.", subIndex);
+ SysTryReturnResult(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, " Invalid argument is used. mainIndex (%d) is invalid.", mainIndex);
+ SysTryReturnResult(NID_UI_CTRL, subIndex >=0 && subIndex <= __pModel->GetSubItemCount(mainIndex), E_INVALID_ARG, " Invalid subIndex %d.", subIndex);
- _OptionMenuItem* pItem = CreateItem(text, actionId, null, null, null, true);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Memory allocation failed.");
+ _OptionMenuItem* pItem = CreateItemN(text, actionId, null, null, null, true);
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, GetLastResult(), "Failed to create item.");
result r = __pModel->InsertItemAt(pItem, mainIndex, subIndex);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.");
return E_SUCCESS;
}
result
_OptionMenuPresenter::SetSubItemAt(int mainIndex, int subIndex, const String& text, int actionId)
{
- SysTryReturn(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid mainIndex %d.", mainIndex);
- SysTryReturn(NID_UI_CTRL, subIndex >=0 && subIndex < __pModel->GetSubItemCount(mainIndex), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid subIndex %d.", subIndex);
+ SysTryReturnResult(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, "Invalid argument is used. mainIndex (%d) is invalid.", mainIndex);
+ SysTryReturnResult(NID_UI_CTRL, subIndex >=0 && subIndex < __pModel->GetSubItemCount(mainIndex), E_INVALID_ARG, "Invalid argument is used. SubIndex (%d) is invalid.", subIndex);
result r = __pModel->SetItemAt(mainIndex, text, actionId, null, null, null, __itemFontSize, subIndex);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.");
return E_SUCCESS;
}
result
_OptionMenuPresenter::RemoveSubItemAt(int mainIndex, int subIndex)
{
- SysTryReturn(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid mainIndex %d.", mainIndex);
- SysTryReturn(NID_UI_CTRL, subIndex >=0 && subIndex < __pModel->GetSubItemCount(mainIndex), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid subIndex %d.", subIndex);
+ SysTryReturnResult(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, "Invalid argument is used. mainIndex (%d) is invalid", mainIndex);
+ SysTryReturnResult(NID_UI_CTRL, subIndex >=0 && subIndex < __pModel->GetSubItemCount(mainIndex), E_INVALID_ARG, "Invalid argument is used. SubIndex (%d) is invalid.", subIndex);
result r = __pModel->RemoveItem(mainIndex, subIndex);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.");
return E_SUCCESS;
}
int
_OptionMenuPresenter::GetSubItemCount(int mainIndex) const
{
- SysTryReturn(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), -1, E_INVALID_ARG, "[E_INVALID_ARG] Invalid mainIndex %d.", mainIndex);
+ SysTryReturn(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), -1, E_INVALID_ARG, "[%s] Invalid argument is used. mainIndex (%d) is invalid.", GetErrorMessage(E_INVALID_ARG), mainIndex);
return __pModel->GetSubItemCount(mainIndex);
}
{
FloatDimension itemSize(0.0f, 0.0f);
FloatDimension textArea(0.0f, 0.0f);
- float maxItemWidth = 0.0f;
+ float maxItemWidth = __itemMinWidth;
- for (int i = 0; i < __pModel->GetItemCount() - 1; i++)
+ for (int i = 0; i < __pModel->GetItemCount(); i++)
{
_OptionMenuItem* pItem = null;
pItem = __pModel->GetItem(i);
- SysTryReturn(NID_UI_CTRL, pItem != null, , E_SYSTEM, "[E_SYSTEM] A system error occurred. Unable to get the item.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_SYSTEM, "[%s] A system has error occurred. Unable to get the item.", GetErrorMessage(E_SYSTEM));
CalculateItemSize(pItem->GetText(), pItem->GetType(), textArea, itemSize);
maxItemWidth = itemSize.width;
}
- __itemWidth = maxItemWidth;
}
-
+ __itemWidth = maxItemWidth;
}
result
_OptionMenuPresenter::SetItem(int index, const String& text, int actionId, const Bitmap* normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap)
{
- SysTryReturn(NID_UI_CTRL, index >=0 && index < __pModel->GetItemCount(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid mainIndex %d.", index);
+ SysTryReturnResult(NID_UI_CTRL, index >=0 && index < __pModel->GetItemCount(), E_INVALID_ARG, "Invalid argument is used. mainIndex (%d) is invalid.", index);
result r = __pModel->SetItemAt(index, text, actionId, normalBitmap, pPressedBitmap, pHighlightedBitmap, __itemFontSize);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
_OptionMenuItem* pItem = __pModel->GetItem(index);
- if (pItem == null)
- {
- SysLog(NID_UI_CTRL, "Item is null.");
- return r;
- }
-
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Propagating.");
CalculateItemMaximumWidth();
return r;
result
_OptionMenuPresenter::DeleteItem(int index)
{
- SysTryReturn(NID_UI_CTRL, (index < __pOptionMenu->GetItemCount()), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The specified main index (%d) is invalid.", index);
+ SysTryReturnResult(NID_UI_CTRL, (index < __pOptionMenu->GetItemCount()), E_INVALID_ARG,
+ "Invalid argument is used. The specified index (%d) is invalid.", index);
+
+ result r = E_SUCCESS;
+ _OptionMenuItem* pItem = null;
- result r = __pOptionMenu->GetScrollPanel()->DetachChild(*__pModel->GetItem(index));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to detach item.");
+ pItem = __pModel->GetItem(index);
+
+ if (pItem != null && pItem->HasParent())
+ {
+ r = __pOptionMenu->GetScrollPanel()->DetachChild(*__pModel->GetItem(index));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to detach item.");
+ }
r = __pModel->RemoveItem(index);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item.");
CalculateItemMaximumWidth();
result
_OptionMenuPresenter::DeleteItemAll(void)
{
- SysTryReturn(NID_UI_CTRL, (__pOptionMenu->GetItemCount() > 0), E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error occurred. No items exists.");
+ SysTryReturnResult(NID_UI_CTRL, (__pOptionMenu->GetItemCount() > 0), E_SYSTEM,
+ "A system error has occurred. No items exists.");
- __pOptionMenu->GetScrollPanel()->DetachAllChildren();
+ result r = E_SUCCESS;
+ _OptionMenuItem* pItem = null;
- result r = __pModel->RemoveAllItem();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item all.");
+ for (int index = 0; index < __pOptionMenu->GetItemCount(); index++)
+ {
+ pItem = __pModel->GetItem(0);
+
+ if (pItem != null && pItem->HasParent())
+ {
+ r = __pOptionMenu->GetScrollPanel()->DetachChild(*pItem);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to detach item.");
+ }
+
+ r = __pModel->RemoveItem(0);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item.");
+ }
return r;
}
{
result r = CalculateRect();
AdjustItemPosition();
+ __pOptionMenu->SetAllAccessibilityElement();
return r;
}
result
_OptionMenuPresenter::ApplyColorProperty(void)
{
+ int count;
+ count = __pOptionMenu->GetItemCount();
+
+ for (int i = 0; i < count; i++)
+ {
+ _OptionMenuItem* pItem = null;
+ Color color = __pOptionMenu->GetItemColor(OPTION_MENU_CORE_ITEM_STATUS_PRESSED);
+
+ pItem = __pModel->GetItem(i);
+ pItem->SetPressedItemColor(color);
+ }
+
return E_SUCCESS;
}
bodyRect.y = screen.height - bodyRect.height;
- windowRect.x = bodyRect.x ;
- windowRect.y = bodyRect.y;
- windowRect.width = bodyRect.width ;
- windowRect.height = bodyRect.height;
+ bodyRect = CoordinateSystem::AlignToDevice(bodyRect);
+
+ windowRect = bodyRect;
bodyRect.x = 0.0f;
bodyRect.y = 0.0f;
result r = E_SUCCESS;
Canvas* pCanvas = __pOptionMenu->GetCanvasN();
- SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "Propagating");
// Clear canvas for drawing area of the OptionMenu.
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
}
else
{
- __pOptionMenu->Close();
- __pOptionMenu->FireActionEvent(pItem->GetActionId());
+ __pOptionMenu->CloseAnimation(pItem->GetActionId());
}
}
return;
result
_OptionMenuPresenter::DrawBackground(Canvas* pCanvas)
{
- SysTryReturn(NID_UI_CTRL, pCanvas != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error has occurred. pCanvas is null");
result r = E_SUCCESS;
if (!itemRect.Contains(touchPosition))
{
__selectedIndex = -1;
- __pOptionMenu->SetVisibleState(false);
-
+ __pOptionMenu->CloseAnimation(-1);
return true;
}
+ else
+ {
+ __pOptionMenu->SetFocused(true);
+ }
}
__pOptionMenu->Invalidate(true);
}
else
{
- // Fire Action Event
- __pOptionMenu->SetVisibleState(false);
PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pOptionMenu);
- __pOptionMenu->FireActionEvent(pItem->GetActionId());
+ // Fire Action Event
+ __pOptionMenu->CloseAnimation(pItem->GetActionId());
}
}
}
-
return true;
}
{
// for SubMenu Events
__pOptionMenu->DestroySubMenu();
- __pOptionMenu->SetVisibleState(false);
- __pOptionMenu->FireActionEvent(actionId);
+ __pOptionMenu->CloseAnimation(actionId);
}
void
void
_OptionMenuPresenter::SetAllAccessibilityElement(void)
{
+ int scrollPanelMargin;
+ GET_SHAPE_CONFIG(CONTEXTMENU::SCROLL_PANEL_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, scrollPanelMargin);
+
_AccessibilityContainer* pContainerOptionMenu = __pOptionMenu->GetAccessibilityContainer();
if (pContainerOptionMenu != null)
{
_AccessibilityElement* pElementOptionMenu = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnVoidResult(NID_UI_CTRL, pElementOptionMenu, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pElementOptionMenu, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pElementOptionMenu->SetSupportOperatingGesture(false);
- pElementOptionMenu->SetTrait(L"Optionual popup");
- pElementOptionMenu->SetHint(L"double tap to close");
- pElementOptionMenu->SetBounds(FloatRectangle(0.0f, 0.0f, __pOptionMenu->GetBoundsF().width, __pOptionMenu->GetBoundsF().height));
+ //pElementOptionMenu->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS");
+ pElementOptionMenu->SetHintWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_IS_OPEN_DOUBLE_TAP_TO_CLOSE_THE_POP_UP_T_TTS");
+ pElementOptionMenu->SetBounds(FloatRectangle(__pOptionMenu->GetItemRect().x, __pOptionMenu->GetItemRect().y - scrollPanelMargin, __pOptionMenu->GetItemRect().width, __pOptionMenu->GetItemRect().height + 2* scrollPanelMargin));
pContainerOptionMenu->AddElement(*pElementOptionMenu);
__pOptionMenu->AddAccessibilityElement(*pElementOptionMenu);
pElement->SetName(L"OptionMenuItem" + Integer::ToString(i));
if (pItem->GetType() == OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP)
{
- pElement->SetLabel(L"icon " + pItem->GetText());
+ String string;
+ GET_STRING_CONFIG(IDS_TPLATFORM_BODY_ICON, string);
+ pElement->SetLabel(string + pItem->GetText());
}
else
{
#include <Ecore_Evas.h>
#include <FBaseResult.h>
+#include <FSysSystemTime.h>
#include <FUiIOrientationEventListener.h>
#include <FUiAnimDisplayContext.h>
#include <FGrp_BufferInfoImpl.h>
#include "FUiAnim_VisualElementSurfaceImpl.h"
#include "FUiAnim_VisualElementImpl.h"
#include "FUiCtrl_OverlayAgent.h"
+#include "FUiAnim_DisplayManager.h"
#define B(c,s) ((((unsigned int)(c)) & 0xff) << (s))
#define FOURCC(a,b,c,d) (B(d,24) | B(c,16) | B(b,8) | B(a,0))
Tizen::Ui::Controls::_OverlayAgent* pOverlayAgent = static_cast<Tizen::Ui::Controls::_OverlayAgent*>(pData);
SysTryReturn(NID_UI_CTRL, pOverlayAgent != null, ECORE_CALLBACK_PASS_ON, E_INVALID_DATA, "[E_INVALID_DATA] Failed to get OverlayAgent from DamagedEvent.");
- if (pDamageEvent->drawable != pOverlayAgent->GetPixmap())
+ for (int i = 0; i < Tizen::Ui::Controls::_OVERLAY_AGENT_PIXMAP_MAX; i++)
{
- return ECORE_CALLBACK_PASS_ON;
- }
+ if (pOverlayAgent->GetPixmap(i) == pDamageEvent->drawable)
+ {
+ pOverlayAgent->SetRendererFlushNeeded(i);
+ pOverlayAgent->SetBufferFree(i);
- pOverlayAgent->SetRendererFlushNeeded();
+ return ECORE_CALLBACK_PASS_ON;
+ }
+ }
- return ECORE_CALLBACK_DONE;
+ return ECORE_CALLBACK_PASS_ON;
}
void
pOverlayAgent->SetDestination(FloatDimension(static_cast<float>(newImageSize.width), static_cast<float>(newImageSize.height)));
}
}
+
} // Anonymous
namespace Tizen { namespace Ui { namespace Controls
{
-
int _OverlayAgent::__baseXvPort = 0;
bool _OverlayAgent::__isPortGrabbed[]={false,};
}
};
+struct xVImageDeleter
+{
+ void operator()(XvImage* pXvImage)
+ {
+ XFree(pXvImage);
+ pXvImage = null;
+ }
+};
+
_OverlayAgent::_OverlayVisualElement::_OverlayVisualElement(void)
- : __pTimer(null)
+ : __pOverlayTimer(null)
, __pImageObject(null)
, __showStateChanged(false)
{
_OverlayAgent::_OverlayVisualElement::_OverlayVisualElement(const _OverlayVisualElement& rhs)
: _VisualElement(rhs)
- , __pTimer(null)
+ , __pOverlayTimer(null)
, __pImageObject(rhs.__pImageObject)
, __showStateChanged(rhs.__showStateChanged)
{
_OverlayAgent::_OverlayVisualElement::~_OverlayVisualElement(void)
{
- if (__pTimer)
+ if (__pOverlayTimer)
{
- __pTimer->Cancel();
- delete __pTimer;
- __pTimer = null;
+ __pOverlayTimer->Cancel();
+ delete __pOverlayTimer;
+ __pOverlayTimer = null;
}
if (__pImageObject)
result
_OverlayAgent::_OverlayVisualElement::Construct(void)
{
- if (!__pTimer)
+ if (!__pOverlayTimer)
{
- __pTimer = new (nothrow) Timer();
- __pTimer->Construct(*this);
+ __pOverlayTimer = new (nothrow) Timer();
+ __pOverlayTimer->Construct(*this);
}
return _VisualElement::Construct();
{
__showStateChanged = true;
- __pTimer->Start(0);
+ if (IsFailed(__pOverlayTimer->Start(0)))
+ {
+ __pOverlayTimer->Cancel();
+ __pOverlayTimer->Start(0);
+ SysSecureLog(NID_UI_CTRL, "The timer is restarted.");
+ ClearLastResult();
+ }
}
void
void
_OverlayAgent::_OverlayVisualElement::OnTimerExpired(Timer& timer)
{
- if (__showStateChanged && __pImageObject)
+ if (&timer == __pOverlayTimer && __showStateChanged && __pImageObject)
{
SetShowState(evas_object_visible_get(__pImageObject));
__showStateChanged = false;
SysSecureLog(NID_UI_CTRL, "Updates show state of Renderer VisualElement");
}
+ else
+ {
+ SysSecureLog(NID_UI_CTRL, "The state of timer is invalid.");
+ }
}
_OverlayAgent*
, __needToRellaocImage(false)
, __pCurrentSourceBuffer(null)
, __pConvertedSourceBuffer(null)
- , __pixmapDamageHandle(0)
, __pPixmapEventHandler(null)
- , __pixmap(0)
+ , __currentReadingPixmap(-1)
+ , __stopReadingPixmap(false)
+ , __pMutex(null)
+ , __prevTime(0)
, __xvPort(-1)
, __pXvImage(null)
, __pShmInfo(null)
{
+
+ for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++)
+ {
+ __pixmap[i].__nativePixmap = 0;
+ __pixmap[i].__timeStamp = 0;
+ __pixmap[i].__pixmapState = _PIXMAP_STATE_FREE;
+ __pixmapDamageHandle[i] = 0;
+ __pImageObjectForPixmap = 0;
+ __pSurfaceForPixmap = null;
+ }
+
result r = CreateRendererVisualElement(parentControl, logicalBounds, physicalBounds);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
SysTryReturnVoidResult(NID_UI_CTRL, __pRendererVE != null, E_SYSTEM, "[E_SYSTEM] The Renderer VisualElement is null.");
SysTryReturnVoidResult(NID_UI_CTRL, __pImageObject!= null, E_SYSTEM, "[E_SYSTEM] The Renderder ImageObject is null.");
+ if(__style == _OVERLAY_AGENT_STYLE_REGION_GL || __style == _OVERLAY_AGENT_STYLE_PANEL_GL)
+ {
+ if (!__pMutex)
+ {
+ __pMutex = new (std::nothrow) Mutex();
+ SysTryReturnVoidResult(NID_UI_CTRL, __pMutex != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ r = __pMutex->Create("GET_FREE_PIXMAP");
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ }
+
__overlayAgentCount++;
SysLog(NID_UI_CTRL, "The current count of OverlayAgent is %d", __overlayAgentCount);
}
_OverlayAgent::~_OverlayAgent(void)
{
+ __stopReadingPixmap = true;
+
SysLog(NID_UI_CTRL, "The %dth OverlayAgent is deleted.", __overlayAgentCount);
__overlayAgentCount--;
UngrabXvPort();
}
- if (__pPixmapEventHandler)
+ for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++)
{
- ecore_event_handler_del(__pPixmapEventHandler);
- __pPixmapEventHandler = null;
- }
+ if (__pixmapDamageHandle[i])
+ {
+ ecore_x_damage_free(__pixmapDamageHandle[i]);
+ __pixmapDamageHandle[i] = 0;
+ }
- if (__pixmapDamageHandle)
- {
- ecore_x_damage_free(__pixmapDamageHandle);
- __pixmapDamageHandle = 0;
+ XFreePixmap((Display*) ecore_x_display_get(), __pixmap[i].__nativePixmap);
+ __pixmap[i].__nativePixmap = 0;
+ __pixmap[i].__pixmapState = _PIXMAP_STATE_FREE;
+ __pSurfaceForPixmap = null;
}
- if (__pixmap != 0)
+ if (__pPixmapEventHandler)
{
- XFreePixmap((Display*)ecore_x_display_get(), __pixmap);
- __pixmap = 0;
+ ecore_event_handler_del(__pPixmapEventHandler);
+ __pPixmapEventHandler = null;
}
if (__pShmInfo)
XShmDetach((Display*)ecore_x_display_get(), __pShmInfo);
shmdt(__pShmInfo->shmaddr);
shmctl(__pShmInfo->shmid, IPC_RMID, NULL);
+ delete __pShmInfo;
__pShmInfo = null;
}
if (__pRendererVE != null)
{
- __pRendererVE->SetSurface(null);
__pRendererVE->Destroy();
__pRendererVE = null;
}
evas_object_del(__pImageObject);
__pImageObject = null;
}
+
+ if (__pMutex)
+ {
+ __pMutex->Release();
+ delete __pMutex;
+ __pMutex = null;
+ }
}
result
}
else
{
- pBufferInfoImpl->SetHandle(_BufferInfoImpl::HANDLE_TYPE_OVERLAY_REGION, __pixmap);
+ if (__pixmap[1].__nativePixmap == 0)
+ {
+ r = const_cast<_OverlayAgent*>(this)->CreateAdditionalPixmap();
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Failed to create pixmap for overlay agent.");
+ }
+
+ const_cast<_OverlayAgent*>(this)->__pixmapCallBackData.__userProperties.__displayMode = 2; //::PLAYER_DISPLAY_MODE_FULL_SCREEN
+ const_cast<_OverlayAgent*>(this)->__pixmapCallBackData.__pInstance = const_cast<_OverlayAgent*>(this);
+ const_cast<_OverlayAgent*>(this)->__pixmapCallBackData.__pPixmapCallback = _OverlayAgent::GetFreeBuffer;
+ const_cast<_OverlayAgent*>(this)->__pixmapCallBackData.__pPixmapErrorCallback = _OverlayAgent::PixmapErrorCallback;
+
+ pBufferInfoImpl->SetHandle(_BufferInfoImpl::HANDLE_TYPE_OVERLAY_REGION, const_cast<_OverlayAgent*>(this)->GetFreeBuffer(), (void*)& __pixmapCallBackData);
SysSecureLog(NID_UI_CTRL,"The returned handle of BufferInfo is a pixmap (HANDLE_TYPE_OVERLAY_REGION)");
}
}
SysTryReturnResult(NID_UI_CTRL, baseXvPort > 0, E_SYSTEM, "The current value of base XvPort is invalid.");
- SysTryReturnResult(NID_UI_CTRL, portCount >= 1 && portCount <= _OVERLAYAGENT_XV_PORT, E_SYSTEM, "The current count of available XvPort[%d] is invalid.", portCount);
+ SysTryReturnResult(NID_UI_CTRL, portCount >= 1 && portCount <= _OVERLAY_AGENT_XV_PORT, E_SYSTEM, "The current count of available XvPort[%d] is invalid.", portCount);
_OverlayAgent::__baseXvPort = baseXvPort;
}
}
- SysTryReturnResult(NID_UI_CTRL, __xvPort > 0, E_SYSTEM, "Failed to grab pixmap[%d]", __pixmap);
- SysSecureLog(NID_UI_CTRL, "The current value of grabbed XvPort is [%d] and pixmap is [%d]", __xvPort, __pixmap);
+ SysTryReturnResult(NID_UI_CTRL, __xvPort > 0, E_SYSTEM, "Failed to grab pixmap[%d]", __pixmap[0].__nativePixmap);
+ SysSecureLog(NID_UI_CTRL, "The current value of grabbed XvPort is [%d] and pixmap is [%d]", __xvPort, __pixmap[0].__nativePixmap);
return E_SUCCESS;
}
XvSetPortAttribute(pDisplay, __xvPort, atom, 1);
XvUngrabPort(pDisplay, __xvPort, 0);
- SysSecureLog(NID_UI_CTRL, "The current value of ungrabbed XvPort is %d, and pixmap is %d", __xvPort, __pixmap);
+ SysSecureLog(NID_UI_CTRL, "The current value of ungrabbed XvPort is %d, and pixmap is %d", __xvPort, __pixmap[0].__nativePixmap);
__isPortGrabbed[__xvPort - __baseXvPort] = false;
__xvPort = -1;
result
_OverlayAgent::PutXvImage(void)
{
- SysTryReturnResult(NID_UI_CTRL, __pixmap != 0, E_SYSTEM, "The current value of pixmap is null");
+ SysTryReturnResult(NID_UI_CTRL, __pixmap[0].__nativePixmap != 0, E_SYSTEM, "The current value of pixmap is null");
Display* pDisplay = (Display*)ecore_x_display_get();
SysTryReturnResult(NID_UI_CTRL, pDisplay != null, E_SYSTEM, "The current value of Display is null");
if (__needToRellaocImage)
{
- XShmSegmentInfo* pShmInfo = new (std::nothrow) XShmSegmentInfo();
+ unique_ptr<XShmSegmentInfo> pShmInfo(new (std::nothrow) XShmSegmentInfo());
SysTryReturnResult(NID_UI_CTRL, pShmInfo != null, E_SYSTEM, "Failed to create XShmSegmentInfo");
- XvImage* pXvImage = XvShmCreateImage(pDisplay, __xvPort, __savedColorFormat, 0, __currentSourceBufferSize.width, __currentSourceBufferSize.height, pShmInfo);
+ unique_ptr<XvImage, xVImageDeleter> pXvImage(XvShmCreateImage(pDisplay, __xvPort, __savedColorFormat, 0, __currentSourceBufferSize.width, __currentSourceBufferSize.height, pShmInfo.get()));
SysTryReturnResult(NID_UI_CTRL, pXvImage != null, E_SYSTEM, "Failed to create XvImage");
pShmInfo->shmid = shmget(IPC_PRIVATE, pXvImage->data_size, IPC_CREAT | 0777);
pShmInfo->shmaddr = pXvImage->data = (char*)shmat(pShmInfo->shmid, 0, 0);
pShmInfo->readOnly = False;
+ SysTryReturnResult(NID_UI_CTRL, XShmAttach(pDisplay, pShmInfo.get()), E_SYSTEM, "[E_SYSTEM] Failed to XShmAttach.");
- if (!XShmAttach(pDisplay, pShmInfo))
- {
- XFree(pXvImage);
- SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Failed to XShmAttach.");
- return E_SYSTEM;
- }
-
- __pXvImage = pXvImage;
- __pShmInfo = pShmInfo;
+ __pShmInfo = pShmInfo.release();
+ __pXvImage = pXvImage.release();
}
if (__pXvImage == null)
evas_object_image_size_get(__pImageObject, &imageWidth, &imageHeight);
GC gc= DefaultGCOfScreen(DefaultScreenOfDisplay(pDisplay));
- XvShmPutImage(pDisplay, __xvPort, __pixmap, gc, __pXvImage, 0, 0, __currentSourceBufferSize.width, __currentSourceBufferSize.height, 0, 0, imageWidth, imageHeight, False);
+ XvShmPutImage(pDisplay, __xvPort, __pixmap[0].__nativePixmap, gc, __pXvImage, 0, 0, __currentSourceBufferSize.width, __currentSourceBufferSize.height, 0, 0, imageWidth, imageHeight, False);
XSync(pDisplay, 0);
if (__needToRellaocImage)
__pConvertedSourceBuffer = null;
}
- __pConvertedSourceBuffer = new (std::nothrow) ByteBuffer;
+ __pConvertedSourceBuffer = new (std::nothrow) ByteBuffer();
SysTryReturnResult(NID_UI_CTRL, __pConvertedSourceBuffer != null, E_OUT_OF_MEMORY, "Failed to create a ByteBuffer for Evas Image Object.");
r = __pConvertedSourceBuffer->Construct(__currentSourceBufferSize.width * __currentSourceBufferSize.height * 4);
evas_object_image_size_set(__pImageObject, __currentSourceBufferSize.width, __currentSourceBufferSize.height);
evas_object_image_data_set(__pImageObject, pImageData);
evas_object_image_data_update_add(__pImageObject, 0, 0, __currentSourceBufferSize.width, __currentSourceBufferSize.height);
- evas_object_show(__pImageObject);
if (__needToRellaocImage)
{
}
result
-_OverlayAgent::SetRendererFlushNeeded(void)
-{
- return __pRendererVE->SetFlushNeeded();
-}
-
-result
_OverlayAgent::SetRotation(_OverlayAgentRotation rotation)
{
SysTryReturnResult(NID_UI_CTRL, __pRendererVE != null, E_SYSTEM, "The Renderer Visual Element is null");
result
_OverlayAgent::CreateRendererVisualElement(const _Control& parentControl, const FloatRectangle& logicalBounds, const Rectangle& physicalBounds)
{
-
//Create new VisualElement and insert it to Parent's VisualElement
unique_ptr<_OverlayVisualElement, visualElementDeleter> pRendererVE(new (std::nothrow) _OverlayVisualElement());
- SysTryReturnResult(NID_UI_CTRL, pRendererVE != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient");
+ SysTryReturnResult(NID_UI_CTRL, pRendererVE != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
result r = pRendererVE->Construct();
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
logicalPoint.x = logicalBounds.x;
logicalPoint.y = logicalBounds.y;
}
- pRendererVE->SetBounds(FloatRectangle(logicalPoint.x, logicalPoint.y, logicalBounds.width, logicalBounds.height));
+ pRendererVE->SetBounds(FloatRectangle(logicalPoint.x, logicalPoint.y, logicalBounds.width, logicalBounds.height));
__pParentVE = parentControl.GetVisualElement();
SysTryReturnResult(NID_UI_CTRL, __pParentVE != null, E_SYSTEM, "[E_SYSTEM] The current value of OverlayPanel's VisualElement is null.");
_EflNode* pEflNode = dynamic_cast<_EflNode*>(pRendererVE->GetNativeNode());
SysTryReturnResult(NID_UI_CTRL, pEflNode != null, E_SYSTEM, "Failed to get EflNode from Renderer VisualElement.");
- Evas_Object* pSmartObject = (Evas_Object*) pEflNode->GetGroupContainer();
- SysTryReturnResult(NID_UI_CTRL, pSmartObject != null, E_SYSTEM, "Failed to get Group Container of Renderer VisualElement.");
-
- Evas* pEvas = evas_object_evas_get(pSmartObject);
+ Evas* pEvas = pEflNode->GetEvas();
SysTryReturnResult(NID_UI_CTRL, pEvas != null, E_SYSTEM, "Failed to get Evas of Renderer VisualElement.");
- Ecore_Evas* pEcoreEvas = ecore_evas_ecore_evas_get(pEvas);
- SysTryReturnResult(NID_UI_CTRL, pEcoreEvas != null, E_SYSTEM, "Failed to get Ecore Evas of Renderer VisualElement.");
-
__pImageObject = evas_object_image_add(pEvas);
SysTryReturnResult(NID_UI_CTRL, __pImageObject != null, E_SYSTEM, "Failed to get Renderer Image Object.");
evas_object_name_set(__pImageObject, "OverlayRenderer");
evas_object_image_size_set(__pImageObject, physicalBounds.width, physicalBounds.height);
evas_object_image_alpha_set(__pImageObject, false);
- evas_object_image_filled_set(__pImageObject, EINA_TRUE);
- evas_object_resize(__pImageObject, physicalBounds.width, physicalBounds.height);
- evas_object_move(__pImageObject, physicalBounds.x, physicalBounds.y);
- evas_object_show(__pImageObject);
+ evas_object_hide(__pImageObject);
pRendererVE->SetImageObject(__pImageObject);
-
DisplayContext* pDisplayContext = parentControl.GetRootWindow()->GetDisplayContext();
SysTryReturnResult(NID_UI_CTRL, pDisplayContext != null, E_SYSTEM, "[E_SYSTEM] The current value of RootWindow's DisplayContext is null.");
unique_ptr<VisualElementSurface> pRendererSurface(_VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN(*pDisplayContext, (Handle)__pImageObject, Dimension(physicalBounds.width, physicalBounds.height)));
SysTryReturnResult(NID_UI_CTRL, pRendererSurface != null, E_SYSTEM, "[E_SYSTEM] The current value of RootWindow's DisplayContext is null.");
- r = pRendererVE->SetSurface(pRendererSurface.release());
+ r = pRendererVE->SetSurface(pRendererSurface.get());
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ if (__style == _OVERLAY_AGENT_STYLE_REGION_SW || __style == _OVERLAY_AGENT_STYLE_PANEL_SW)
+ {
+ evas_object_image_pixels_get_callback_set(__pImageObject, OnEvasImageDamaged,(void*)this);
+ }
+ else if (__style == _OVERLAY_AGENT_STYLE_REGION_GL || __style == _OVERLAY_AGENT_STYLE_PANEL_GL)
+ {
+ __pImageObjectForPixmap = __pImageObject;
+ SysTryReturnResult(NID_UI_CTRL, __pImageObjectForPixmap != null, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
r = pRendererVE->SetFlushNeeded();
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
__pRendererVE = pRendererVE.release();
__standardRendererBounds = __pRendererVE->GetBounds();
- if (__style == _OVERLAY_AGENT_STYLE_REGION_SW || __style == _OVERLAY_AGENT_STYLE_PANEL_SW)
- {
- evas_object_image_pixels_get_callback_set(__pImageObject, OnEvasImageDamaged,(void*)this);
- }
-
return r;
}
result
-_OverlayAgent::CreatePixmap(const Rectangle& physicalBounds)
+_OverlayAgent::CreatePixmap(const Rectangle& physicalBounds, int pixmapIndex)
{
//Set size of pixmap
Dimension pixmapSize(physicalBounds.width, physicalBounds.height);
Display *pDisplay = (Display*)ecore_x_display_get();
SysTryReturnResult(NID_UI_CTRL, pDisplay != null, E_SYSTEM, "The current value of Display is null");
- __pixmap = XCreatePixmap(pDisplay, DefaultRootWindow(pDisplay), pixmapSize.width, pixmapSize.height, DefaultDepth(pDisplay, DefaultScreen(pDisplay)));
- SysTryReturnResult(NID_UI_CTRL, __pixmap != 0, E_SYSTEM, "Failed to create a pixmap of Overlay Agent");
+ __pixmap[pixmapIndex].__timeStamp = 0;
+ __pixmap[pixmapIndex].__pixmapState = _PIXMAP_STATE_FREE;
+ __pixmap[pixmapIndex].__nativePixmap = XCreatePixmap(pDisplay, DefaultRootWindow(pDisplay), physicalBounds.width, physicalBounds.height, DefaultDepth(pDisplay, DefaultScreen(pDisplay)));
+ SysTryReturnResult(NID_UI_CTRL, __pixmap[pixmapIndex].__nativePixmap != 0, E_SYSTEM, "Failed to create a pixmap of Overlay Agent");
- GC gc = XCreateGC(pDisplay, __pixmap, 0,0);
+ GC gc = XCreateGC(pDisplay, __pixmap[pixmapIndex].__nativePixmap, 0, 0);
SysTryReturnResult(NID_UI_CTRL, gc > 0, E_SYSTEM, "Failed to create Graphic Contexts");
//Set initial color
XSetForeground(pDisplay, gc, (long unsigned int)(Color(0xff000000).GetRGB32()));
- XFillRectangle(pDisplay, __pixmap, gc, 0, 0, pixmapSize.width, pixmapSize.height);
+ XFillRectangle(pDisplay, __pixmap[pixmapIndex].__nativePixmap, gc, 0, 0, physicalBounds.width, physicalBounds.height);
XSync(pDisplay, 0);
XFreeGC(pDisplay, gc);
//Set evas native surface
Evas_Native_Surface evasNativeSuface = {0,};
-
evasNativeSuface.version = EVAS_NATIVE_SURFACE_VERSION;
evasNativeSuface.type = EVAS_NATIVE_SURFACE_X11;
evasNativeSuface.data.x11.visual = ecore_x_default_visual_get(ecore_x_display_get(), ecore_x_default_screen_get());
- evasNativeSuface.data.x11.pixmap = __pixmap;
+ evasNativeSuface.data.x11.pixmap = __pixmap[pixmapIndex].__nativePixmap;
- evas_object_lower(__pImageObject);
- evas_object_image_native_surface_set(__pImageObject, &evasNativeSuface);
+// evas_object_lower(__pImageObjectForPixmap);
+ evas_object_image_native_surface_set(__pImageObjectForPixmap, &evasNativeSuface);
+ __pixmapDamageHandle[pixmapIndex] = ecore_x_damage_new(__pixmap[pixmapIndex].__nativePixmap, ECORE_X_DAMAGE_REPORT_RAW_RECTANGLES);
+ SysTryCatch(NID_UI_CTRL, __pixmapDamageHandle[pixmapIndex] != 0, , E_SYSTEM, "[E_SYSTEM] Failed to create a damage object");
- __pixmapDamageHandle = ecore_x_damage_new(__pixmap, ECORE_X_DAMAGE_REPORT_RAW_RECTANGLES);
- SysTryCatch(NID_UI_CTRL, __pixmapDamageHandle != 0, , E_SYSTEM, "[E_SYSTEM] Failed to create a damage object");
+ if (pixmapIndex == 0)
+ {
+ __pPixmapEventHandler = ecore_event_handler_add(ECORE_X_EVENT_DAMAGE_NOTIFY, OnPixmapDamaged, (void*)this);
+ SysTryCatch(NID_UI_CTRL, __pPixmapEventHandler != null, , E_SYSTEM, "[E_SYSTEM] Failed to add a pixmap damage event handle");
+ }
- __pPixmapEventHandler = ecore_event_handler_add(ECORE_X_EVENT_DAMAGE_NOTIFY, OnPixmapDamaged, (void*)this);
- SysTryCatch(NID_UI_CTRL, __pPixmapEventHandler != null, , E_SYSTEM, "[E_SYSTEM] Failed to add a pixmap damage event handle");
+ SysSecureLog(NID_UI_CTRL,"The [%d]th pixmap[%d] is Created", pixmapIndex, (unsigned int) __pixmap[pixmapIndex].__nativePixmap);
return E_SUCCESS;
CATCH:
- if (__pPixmapEventHandler)
+ for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++)
{
- ecore_event_handler_del(__pPixmapEventHandler);
- __pPixmapEventHandler = null;
+ if (__pPixmapEventHandler)
+ {
+ ecore_event_handler_del(__pPixmapEventHandler);
+ __pPixmapEventHandler = null;
+ }
+
+ if (__pixmapDamageHandle[i])
+ {
+ ecore_x_damage_free(__pixmapDamageHandle[i]);
+ __pixmapDamageHandle[i] = 0;
+ }
+
+ if (__pixmap[i].__nativePixmap)
+ {
+ XFreePixmap((Display*)ecore_x_display_get(), __pixmap[i].__nativePixmap);
+ __pixmap[i].__nativePixmap = 0;
+ __pixmap[i].__pixmapState = _PIXMAP_STATE_FREE;
+ }
}
- if (__pixmapDamageHandle)
+ return E_SYSTEM;
+}
+
+result
+_OverlayAgent::CreateAdditionalPixmap(void)
+{
+ int physicalWidth = 0;
+ int physicalHeight = 0;
+
+ evas_object_image_size_get(__pImageObjectForPixmap, &physicalWidth, &physicalHeight);
+ SysTryReturnResult(NID_UI_CTRL, (physicalWidth >= GetDstRectMinWidth()) && (physicalHeight >= GetDstRectMinHeight()),
+ E_SYSTEM, "Failed to create a pixmap. Because input bounds[%d, %d] is under minimum size.", physicalWidth, physicalHeight);
+
+ Rectangle physicalBounds(0, 0, physicalWidth, physicalHeight);
+
+ for (int i = 1; i < _OVERLAY_AGENT_PIXMAP_MAX; i++)
{
- ecore_x_damage_free(__pixmapDamageHandle);
- __pixmapDamageHandle = 0;
+ result r = CreatePixmap(physicalBounds, i);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
- if (__pixmap)
+ return E_SUCCESS;
+}
+
+unsigned int
+_OverlayAgent::GetFreeBuffer(void* userData)
+{
+ _OverlayAgent* pOverlayAgent = dynamic_cast<_OverlayAgent*> ((_OverlayAgent*)userData);
+ if (pOverlayAgent == null)
{
- XFreePixmap((Display*)ecore_x_display_get(), __pixmap);
- __pixmap = 0;
+ return 0;
}
- return E_SYSTEM;
+ return pOverlayAgent->GetFreeBuffer();
+}
+
+void
+_OverlayAgent::PixmapErrorCallback(unsigned int* pPixmap, void* userData)
+{
+ _OverlayAgent* pOverlayAgent = dynamic_cast<_OverlayAgent*> ((_OverlayAgent*)userData);
+ if (pOverlayAgent == null)
+ {
+ return;
+ }
+
+ if (pPixmap != 0)
+ {
+ for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++)
+ {
+ if ((unsigned int) pOverlayAgent->__pixmap[i].__nativePixmap == (unsigned int) *pPixmap)
+ {
+ pOverlayAgent->__pixmap[i].__pixmapState = _PIXMAP_STATE_FREE;
+ SystemTime::GetTicks(pOverlayAgent->__pixmap[i].__timeStamp);
+
+ SysSecureLog(NID_UI_CTRL,"The [%d]th pixmap[%d] is invalid and it will be FREE",
+ i, (unsigned int) pOverlayAgent->__pixmap[i].__nativePixmap);
+
+ return;
+ }
+ }
+ }
+}
+
+void
+_OverlayAgent::SetBufferFree(int index)
+{
+ if (__pixmap[index].__pixmapState == _PIXMAP_STATE_ENQUEUE && __pixmap[index].__nativePixmap != 0)
+ {
+ MutexGuard foo(*__pMutex);
+
+ __pixmap[index].__pixmapState = _PIXMAP_STATE_FREE;
+ SystemTime::GetTicks(__pixmap[index].__timeStamp);
+
+ SysSecureLog(NID_UI_CTRL, "The [%d]th pixmap[%d] is FREEING (free)", index, (unsigned int) __pixmap[index].__nativePixmap);
+
+ if (__pixmap[index].__timeStamp != __prevTime)
+ {
+ long long timeGap = __pixmap[index].__timeStamp - __prevTime;
+
+ SysSecureLog(NID_UI_CTRL, "The gap of display time (current%llu - prev %llu) is %lld and FPS : [%.6f]",
+ __pixmap[index].__timeStamp, __prevTime, timeGap, (float) 1000.0f / (float) timeGap);
+ }
+
+ SystemTime::GetTicks(__prevTime);
+ }
+}
+
+result
+_OverlayAgent::SetRendererFlushNeeded(unsigned int index)
+{
+ MutexGuard foo(*__pMutex);
+
+ Evas_Native_Surface evasNativeSuface = {0,};
+ evasNativeSuface.version = EVAS_NATIVE_SURFACE_VERSION;
+ evasNativeSuface.type = EVAS_NATIVE_SURFACE_X11;
+ evasNativeSuface.data.x11.visual = ecore_x_default_visual_get(ecore_x_display_get(), ecore_x_default_screen_get());
+ evasNativeSuface.data.x11.pixmap = __pixmap[index].__nativePixmap;
+ evas_object_image_native_surface_set(__pImageObjectForPixmap, &evasNativeSuface);
+
+ __pRendererVE->SetFlushNeeded();
+
+ __pixmap[index].__pixmapState = _PIXMAP_STATE_ENQUEUE;
+ SystemTime::GetTicks(__pixmap[index].__timeStamp);
+
+ SysSecureLog(NID_UI_CTRL, "The [%d]th pixmap[%d] is ENQUEUEING (display)", index, (unsigned int) __pixmap[index].__nativePixmap);
+
+ return E_SUCCESS;
+}
+
+int
+_OverlayAgent::FindFreeBuffer(void)
+{
+ int oldestFreedPixmap = -1;
+ long long timeStamp = 0;
+ int count = 0;
+ SystemTime::GetTicks(timeStamp);
+
+ for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++)
+ {
+ if (__pixmap[i].__pixmapState == _PIXMAP_STATE_FREE)
+ {
+ if (__pixmap[i].__timeStamp < timeStamp)
+ {
+ count++;
+ oldestFreedPixmap = i;
+ timeStamp = __pixmap[i].__timeStamp;
+ }
+ }
+ }
+
+#ifdef _FUI_INTERNAL_USE_THRESHOLD_EVENT_TIMER
+ if (count == 0 || oldestFreedPixmap == __currentReadingPixmap)
+ {
+ for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++)
+ {
+ if (__pixmap[i].__pixmapState == _PIXMAP_STATE_DEQUEUE)
+ {
+ SystemTime::GetTicks(timeStamp);
+ if (timeStamp - __pixmap[i].__timeStamp > _DEQUEUE_THRESHOLD_EVENT_TIME)
+ {
+ count++;
+ oldestFreedPixmap = i;
+ timeStamp = __pixmap[i].__timeStamp;
+
+ MutexGuard foo(*__pMutex);
+ __pixmap[i].__pixmapState = _PIXMAP_STATE_FREE;
+
+ SysSecureLog(NID_UI_CTRL, "The dequeued [%d]th pixmap[%d] is over the threshold evnet time(%lu)"
+ ,i, (unsigned int) __pixmap[i].__nativePixmap, (unsigned long) __pixmap[i].__timeStamp);
+
+ break;
+ }
+ }
+ }
+ }
+#endif //_FUI_INTERNAL_USE_THRESHOLD_EVENT_TIMER
+
+ if (count == 0)
+ {
+ return -1;
+ }
+ else
+ {
+ return oldestFreedPixmap;
+ }
}
Pixmap
-_OverlayAgent::GetPixmap(void) const
+_OverlayAgent::GetPixmap(int index) const
+{
+ return __pixmap[index].__nativePixmap;
+}
+
+unsigned int
+_OverlayAgent::GetFreeBuffer(void)
{
- return __pixmap;
+ if (__stopReadingPixmap)
+ {
+ return 0;
+ }
+
+ int oldestFreedPixmap = FindFreeBuffer();
+
+ if (oldestFreedPixmap == -1 || oldestFreedPixmap == __currentReadingPixmap || __pixmap[oldestFreedPixmap].__nativePixmap == 0)
+ {
+ return 0;
+ }
+
+ MutexGuard foo(*__pMutex);
+ __pixmap[oldestFreedPixmap].__pixmapState = _PIXMAP_STATE_DEQUEUE;
+ SystemTime::GetTicks(__pixmap[oldestFreedPixmap].__timeStamp);
+ __currentReadingPixmap = oldestFreedPixmap;
+
+ SysSecureLog(NID_UI_CTRL, "The [%d]th pixmap[%d] is DEQUEUEING (ready to render)",
+ oldestFreedPixmap, (unsigned int) __pixmap[oldestFreedPixmap].__nativePixmap);
+
+ return (unsigned int) __pixmap[oldestFreedPixmap].__nativePixmap;
}
Evas_Object*
FloatRectangle originalInputRect(rect);
rect = _CoordinateSystemUtils::ConvertToFloat(_CoordinateSystemUtils::InverseTransform(physicalRect));
+ rect.x = originalInputRect.x;
+ rect.y = originalInputRect.y;
+
if (rect != originalInputRect)
{
modified = true;
_OverlayPanel::CreateOverlayPanelN()
{
std::unique_ptr<_OverlayPanel> pOverlayPanel(new (std::nothrow) _OverlayPanel());
- SysTryReturn(NID_UI_CTRL, pOverlayPanel != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pOverlayPanel != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
result
_OverlayPanel::SetRendererAspectRatio(bool aspectRatio)
{
- SysTryReturnResult(NID_UI_CTRL, __pOverlayAgent != null, E_INVALID_OPERATION, "[E_INVALID_OPERATION] OverlayAgent must not be null.");
+ SysTryReturnResult(NID_UI_CTRL, __pOverlayAgent != null, E_INVALID_OPERATION, "OverlayAgent must not be null.");
return __pOverlayAgent->SetAspectRatio(aspectRatio);
}
_Control* pParent = GetParent();
SysTryReturnResult(NID_UI_CTRL, pParent != null, E_SYSTEM, "The parent container must not be null.");
- _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(pParent->GetUserData());
- SysTryReturnResult(NID_UI_CTRL, pControlImpl != null, E_SYSTEM, "The impl of parent must not be null.");
-
- _FormImpl* pFormImpl = dynamic_cast<_FormImpl*>(pControlImpl);
- SysTryReturnResult(NID_UI_CTRL, pFormImpl != null, E_SYSTEM, "The impl of form must not be null.");
+ _FormImpl* pFormImpl = null;
+ while (pParent)
+ {
+ _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(pParent->GetUserData());
+ pFormImpl = dynamic_cast<_FormImpl*>(pControlImpl);
+ if (pFormImpl != null)
+ {
+ break;
+ }
+ else
+ {
+ pParent = pParent->GetParent();
+ SysTryReturnResult(NID_UI_CTRL, pParent != null, E_SYSTEM, "The parent container must not be null.");
+ }
+ }
// check for using OverlayRegion simutaneously in the same form
_Form& form = pFormImpl->GetCore();
{
int size = (physicalBounds.width * 2) * (physicalBounds.height * 2);
std::unique_ptr<byte[]> pBuf(new (std::nothrow) byte[size]);
- SysTryReturnResult(NID_UI_CTRL, pBuf != null, E_OUT_OF_MEMORY, "Buffer for OverlayPanel must not be null.");
+ SysTryReturnResult(NID_UI_CTRL, pBuf != null, E_OUT_OF_MEMORY, "Memory allocation failed to create buffer for first frame.");
unsigned long* pPos = (unsigned long*)pBuf.get();
for(int i = 0; i < physicalBounds.height; i++)
}
r = GetVisualElement()->SetRenderOperation(_VisualElement::RENDER_OPERATION_BLEND);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GetVisualElement()->SetBackgroundColor(_Colorf(1.0f, 1.0f, 1.0f, 0.0f));
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
if (orientation == ORIENTATION_STATUS_LANDSCAPE || orientation == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
{
controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE;
- GetBuilderBoundsF(controlOrientation, builderBounds);
+ exist = GetBuilderBoundsF(controlOrientation, builderBounds);
+ SysTryLog(NID_UI_CTRL, exist, "Failed to GetBuilderBoundsF on Landscape mode");
}
r = SetBounds(builderBounds);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
}
- std::unique_ptr< ArrayListT<OverlayPanel::BufferPixelFormat> > pFormatList( new (std::nothrow) ArrayListT<OverlayPanel::BufferPixelFormat>());
+ std::unique_ptr< ArrayListT<OverlayPanel::BufferPixelFormat> > pFormatList(new (std::nothrow) ArrayListT<OverlayPanel::BufferPixelFormat>());
SysTryReturn(NID_UI_CTRL, pFormatList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] failed to create a list instance");
r = pFormatList->Construct();
{
int size = (finalPhyRect.width * 2) * (finalPhyRect.height * 2);
std::unique_ptr<byte[]> pBuffer(new (std::nothrow) byte[size]);
- SysTryReturnResult(NID_UI_CTRL, pBuffer != null, E_OUT_OF_MEMORY, "Failed to create a buffer for OverlayRegion.");
+ SysTryReturnResult(NID_UI_CTRL, pBuffer != null, E_OUT_OF_MEMORY, "Memory allocation failed to create a buffer for OverlayRegion.");
unsigned long* pPos = (unsigned long*)pBuffer.get();
for(int i = 0; i < finalPhyRect.height; i++)
_OverlayRegionImpl::CreateOverlayRegionN(void)
{
OverlayRegion* pOverlayRegion = new (std::nothrow) OverlayRegion();
- SysTryReturn(NID_UI_CTRL, pOverlayRegion != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The current value of OverlayRegion is null.");
+ SysTryReturn(NID_UI_CTRL, pOverlayRegion != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed to create OverlayRegion.");
__pOverlayRegion = pOverlayRegion;
__pOverlayRegion->__pOverlayRegionImpl = this;
SysTryReturnVoidResult(NID_UI_CTRL, __pOverlayAgent != null, E_SYSTEM, "[E_SYSTEM] The current value of OverlayAgent is null.");
__showState = true;
- SysSecureLog(NID_UI_CTRL, "The current pixmap[%d] of OverlayRegion is on foreground.", __pOverlayAgent->GetPixmap());
}
void
__showState = false;
__pOverlayAgent->UngrabXvPort();
- SysSecureLog(NID_UI_CTRL, "The current pixmap[%d] of OverlayRegion is on background.", __pOverlayAgent->GetPixmap());
+}
+
+void
+_OverlayRegionImpl::SetShowState(bool show)
+{
+ Evas_Object* pImageObject = __pOverlayAgent->GetRendererImageObject();
+ if (pImageObject == null)
+ {
+ return;
+ }
+
+ if (show)
+ {
+ evas_object_show(__pOverlayAgent->GetRendererImageObject());
+ }
+ else
+ {
+ evas_object_hide(__pOverlayAgent->GetRendererImageObject());
+ }
}
result
}
std::unique_ptr< IListT<bool> > pFormatList(_OverlayAgent::GetPixelFormatListN());
- SysTryReturn(NID_UI_CTRL, pFormatList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create a list instance");
+ SysTryReturn(NID_UI_CTRL, pFormatList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed to create a list instance");
bool set = false;
for (int formatIndex = 0; formatIndex < pFormatList->GetCount(); formatIndex++)
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
}
- std::unique_ptr< ArrayListT<OverlayRegionBufferPixelFormat> > pFormatList( new (std::nothrow) ArrayListT<OverlayRegionBufferPixelFormat>());
- SysTryReturn(NID_UI_CTRL, pFormatList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] failed to create a list instance");
+ std::unique_ptr< ArrayListT<OverlayRegionBufferPixelFormat> > pFormatList(new (std::nothrow) ArrayListT<OverlayRegionBufferPixelFormat>());
+ SysTryReturn(NID_UI_CTRL, pFormatList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed to create a list instance");
r = pFormatList->Construct();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
_OverlayRegionMediaCapability::ParseCapability(const char* xmlBuffer, int length)
{
std::unique_ptr<xmlDoc, xmlParserDeleter> pDoc(xmlParseMemory(xmlBuffer, length));
- SysTryReturnResult(NID_UI_CTRL, pDoc != null, E_SYSTEM, "xmlParseMemory failed %s %d", xmlBuffer, length);
+ SysTryReturnResult(NID_UI_CTRL, pDoc != null, E_SYSTEM, "Failed to create xmlParseMemory %s %d", xmlBuffer, length);
xmlNode* pRoot = xmlDocGetRootElement(pDoc.get());
- SysTryReturnResult(NID_UI_CTRL, pRoot != null, E_SYSTEM, "[E_SYSTEM] xmlDocGetRootElement failed");
+ SysTryReturnResult(NID_UI_CTRL, pRoot != null, E_SYSTEM, "Failed to get RootElement of xmlDoc.");
String name = (const char*) (pRoot->name);
- SysSecureTryReturnResult(NID_UI_CTRL, name.Equals("MediaCapability", true), E_SYSTEM, "[E_SYSTEM] Invalid Root Name %ls", name.GetPointer());
+ SysSecureTryReturnResult(NID_UI_CTRL, name.Equals("MediaCapability", true), E_SYSTEM, "Invalid Root Name %ls", name.GetPointer());
xmlNode* pNode = null;
for (pNode = pRoot->children; pNode; pNode = pNode->next)
ClearLastResult();
result r = E_SUCCESS;
- _Panel* pPanel = new (std::nothrow) _Panel;
- SysTryReturn(NID_UI_CTRL, pPanel != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ _Panel* pPanel = new (std::nothrow) _Panel();
+ SysTryReturn(NID_UI_CTRL, pPanel != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- _PanelPresenter* pPresenter = new (std::nothrow) _PanelPresenter;
- SysTryCatch(NID_UI_CTRL, pPresenter != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ _PanelPresenter* pPresenter = new (std::nothrow) _PanelPresenter();
+ SysTryCatch(NID_UI_CTRL, pPresenter != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pPresenter->Initialize(*pPanel);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
SetPanelPresenter(&presenter);
result r = GetVisualElement()->SetSurfaceOpaque(false);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
SetBackgroundColor(Color(0, 0, 0, 0));
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
// create data binding context
_DataBindingContext* pContext = new (std::nothrow) _DataBindingContext(*this);
- SysTryCatch(NID_UI_CTRL, pContext != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryCatch(NID_UI_CTRL, pContext != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
#include "FUiCtrl_FormImpl.h"
using namespace Tizen::Graphics;
+using namespace Tizen::Base;
namespace Tizen { namespace Ui { namespace Controls
{
}
void
-_PanelImpl::SetBackgroundColor(const Tizen::Graphics::Color& color)
+_PanelImpl::SetBackgroundColor(const Color& color)
{
if (!IsOpaque())
{
result
_PanelImpl::OnAttachedToMainTree(void)
{
+ result r = E_SUCCESS;
+
SetFocusable(false);
FloatRectangle builderBounds;
if (orientation == ORIENTATION_STATUS_LANDSCAPE
|| orientation == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
{
+ FloatRectangle landscapeBuilderBounds;
controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE;
- GetBuilderBoundsF(controlOrientation, builderBounds);
+ if (GetBuilderBoundsF(controlOrientation, landscapeBuilderBounds))
+ {
+ builderBounds = landscapeBuilderBounds;
+ }
}
result r = SetBounds(builderBounds);
if (r != E_SUCCESS)
}
}
- _ContainerImpl::OnAttachedToMainTree();
+ r = _ContainerImpl::OnAttachedToMainTree();
- return E_SUCCESS;
+ return r;
}
void
GetInstance(_UiBuilder* uibuilder)
{
_PanelMaker* pPanelMaker = new (std::nothrow) _PanelMaker(uibuilder);
- SysTryReturn(NID_UI_CTRL, pPanelMaker != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturn(NID_UI_CTRL, pPanelMaker != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pPanelMaker;
};
_UiBuilderControlLayout* pControlProperty = null;
Panel* pPanel = null;
FloatRectangle rect;
- Tizen::Base::String elementString;
+ String elementString;
int opacity = 0;
Color color;
GroupStyle panelGroupStyle = GROUP_STYLE_NONE;
return null;
}
- if(pControl->GetParentWin().IsEmpty())
+ if (pControl->GetParentWin().IsEmpty())
{
pPanel = static_cast<Panel*> (GetContainer());
}
return null;
}
- if ( layoutType == UIBUILDER_LAYOUT_GRID)
+ if (layoutType == UIBUILDER_LAYOUT_GRID)
{
for (int i = 0; i < UIBUILDER_ATTRIBUTE_NUM; i++)
{
GridLayout* pGridLayout = null;
pControlProperty = pControl->GetAttribute(i);
- if ( i == UIBUILDER_ATTRIBUTE_PORTRAIT)
+ if (i == UIBUILDER_ATTRIBUTE_PORTRAIT)
{
pGridLayout = dynamic_cast<GridLayout*>(pPortraitLayout);
}
}
void
-_PanelPresenter::DrawGroupStyleBackgroundBitmap(Tizen::Graphics::Canvas* pCanvas)
+_PanelPresenter::DrawGroupStyleBackgroundBitmap(Canvas* pCanvas)
{
result r = E_SUCCESS;
pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pGroupStyleBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pPanel->GetBackgroundColor());
r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, pColorReplacedBitmap != null && r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pColorReplacedBitmap != null, r, "[%s] Propagating.", GetErrorMessage(r));
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pGroupStyleBackgroundBitmap))
{
#include "FUiCtrl_PopupPresenter.h"
#include "FUiCtrl_Form.h"
#include "FUiCtrl_Frame.h"
-#include "FUiCtrl_Indicator.h"
using namespace Tizen::Graphics;
, _titleText(L"")
, _bgColor(Color(0xFFFFFFFF))
, _titleTextColor(Color(0xFFFFFFFF))
- , _pBgBitmap(null)
, _pComposedBgBitmap(null)
, _pOutlineBitmap(null)
, _pComposedTitleBitmap(null)
, __pPopupPresenter(null)
, __bounds(0.0f, 0.0f, 0.0f, 0.0f)
, __popupResult(POPUP_RESULT_NONE)
- , __pIndicator(null)
{
- __pIndicator = _Indicator::CreateIndicator();
- SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
}
_Popup::~_Popup(void)
delete __pPopupPresenter;
__pPopupPresenter = null;
- delete _pBgBitmap;
- _pBgBitmap = null;
-
delete _pComposedBgBitmap;
_pComposedBgBitmap = null;
_pTitleTextAccessibilityElement->Activate(false);
_pTitleTextAccessibilityElement = null;
}
-
- if (__pIndicator)
- {
- __pIndicator->Destroy();
- __pIndicator = null;
- }
}
_Popup*
_AccessibilityContainer* pContainer = null;
_DataBindingContext* pContext = null;
- Bitmap* titleBgBitmap = null;
Color titleBgColor(0x00000000);
_titleState = hasTitle;
{
GET_COLOR_CONFIG(POPUP::TITLE_BG_NORMAL, titleBgColor);
- // Popup-TitleBitmap
- GET_BITMAP_CONFIG_N(POPUP::BG_TITLE_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, titleBgBitmap);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(POPUP::BG_TITLE_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, titleBgColor, _pComposedTitleBitmap);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- _pComposedTitleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*titleBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), titleBgColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
// Popup-TitleEffectBitmap
- GET_BITMAP_CONFIG_N(POPUP::BG_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, _pTitleEffectBitmap);
- r = GetLastResult();
+ r = GET_BITMAP_CONFIG_N(POPUP::BG_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, _pTitleEffectBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
// Popup-Outline
- GET_BITMAP_CONFIG_N(POPUP::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pOutlineBitmap);
- r = GetLastResult();
+ r = GET_BITMAP_CONFIG_N(POPUP::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pOutlineBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
// Popup BG
- GET_BITMAP_CONFIG_N(POPUP::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pBgBitmap);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- _pComposedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*_pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), _bgColor);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(POPUP::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _bgColor, _pComposedBgBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
// for clearing canvas
pContainer->Activate(true);
}
- if (titleBgBitmap != null)
- {
- delete titleBgBitmap;
- titleBgBitmap = null;
- }
-
return r;
CATCH:
delete pContext;
- if (titleBgBitmap != null)
- {
- delete titleBgBitmap;
- titleBgBitmap = null;
- }
-
- if (_pComposedTitleBitmap != null)
- {
- delete _pComposedTitleBitmap;
- _pComposedTitleBitmap = null;
- }
+ delete _pComposedTitleBitmap;
+ _pComposedTitleBitmap = null;
- if (_pTitleEffectBitmap != null)
- {
- delete _pTitleEffectBitmap;
- _pTitleEffectBitmap = null;
- }
+ delete _pTitleEffectBitmap;
+ _pTitleEffectBitmap = null;
delete _pOutlineBitmap;
_pOutlineBitmap = null;
- delete _pBgBitmap;
- _pBgBitmap = null;
-
delete _pComposedBgBitmap;
_pComposedBgBitmap = null;
void
_Popup::SetColor(const Color& color)
{
+ result r = E_SUCCESS;
+
if (_pComposedBgBitmap != null)
{
delete _pComposedBgBitmap;
_pComposedBgBitmap = null;
}
- _pComposedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*_pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), color);
+ r = GET_REPLACED_BITMAP_CONFIG_N(POPUP::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, color, _pComposedBgBitmap);
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
_bgColor = color;
}
return _pTitleTextAccessibilityElement;
}
-_Indicator*
-_Popup::GetIndicator(void) const
-{
- return __pIndicator;
-}
-
void
_Popup::OnDraw(void)
{
SetTouchCapture(false, false);
}
- bool showstate = false;
- bool opacity = false;
- unsigned long formstyle = 0x00000000;
-
_Control* pOwner = GetOwner();
if (pOwner == null)
{
if (pForm != null)
{
SetOwner(pForm);
-
- showstate = pForm->IsIndicatorVisible();
- opacity = pForm->IsIndicatorTranslucent();
- formstyle = pForm->GetFormStyle();
}
else
{
}
else
{
- _Form* pForm = dynamic_cast<_Form*>(pOwner);
- if (pForm != null)
- {
- showstate = pForm->IsIndicatorVisible();
- opacity = pForm->IsIndicatorTranslucent();
- formstyle = pForm->GetFormStyle();
- }
-
pOwner->LockInputEvent();
}
- if (__pIndicator)
- {
- __pIndicator->AddIndicatorObject(this, GetRootWindow());
-
-
- float indicatorwidth = 0.0f;
- float indicatorheight = 0.0f;
-
- if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
- {
- indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().width;
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
- }
- else
- {
- indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().height;
- GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetOrientation(), indicatorheight);
- }
- __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, indicatorwidth, indicatorheight));
- __pIndicator->SetIndicatorShowState(showstate);
- if (opacity)
- {
- __pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_TRANSLUCENT);
- }
- else
- {
- __pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE);
- }
-
- if (formstyle & FORM_STYLE_PORTRAIT_INDICATOR)
- {
- if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
- {
- __pIndicator->SetIndicatorAutoHide(false, true);
- }
- else
- {
- __pIndicator->SetIndicatorAutoHide(false, false);
- }
- }
- else if (formstyle & FORM_STYLE_INDICATOR_AUTO_HIDE)
- {
- if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
- {
- __pIndicator->SetIndicatorAutoHide(true, true);
- }
- else
- {
- __pIndicator->SetIndicatorAutoHide(true, false);
- }
- }
- else
- {
- if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
- {
- __pIndicator->SetIndicatorAutoHide(false, true);
- }
- else
- {
- __pIndicator->SetIndicatorAutoHide(false, false);
- }
- }
- }
-
_Window::OnActivated();
}
SysTryReturn(NID_UI_CTRL, GetVisibleState() != false, E_INVALID_OPERATION,
E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control is not 'displayable'");
- _Control* pOwner = GetOwner();
- if (pOwner != null)
- {
- GetEcoreEvasMgr()->GetEcoreEvas()->SetOwner(*this, *pOwner);
- }
-
- if (__pIndicator)
- {
- __pIndicator->OnAttachedToMainTree();
- }
InitializeAccessibilityElement();
result
_Popup::OnDetachingFromMainTree(void)
{
- if (__pIndicator)
- {
- __pIndicator->DeleteIndicatorObject();
- }
return _Window::OnDetachingFromMainTree();
}
_Popup::OnChangeLayout(_ControlOrientation orientation)
{
_Window::OnChangeLayout(orientation);
-
- float indicatorheight = 0.0f;
-
- const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
- const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width);
-
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
-
- _Form* pForm = dynamic_cast<_Form*>(GetOwner());
- if (pForm)
- {
- if (__pIndicator)
- {
- if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
- {
- __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, portraitSize.width, indicatorheight));
- if ((FORM_STYLE_INDICATOR & pForm->GetFormStyle()) || (FORM_STYLE_INDICATOR_AUTO_HIDE & pForm->GetFormStyle()))
- {
- __pIndicator->SetIndicatorShowState(true);
- }
- else
- {
- __pIndicator->SetIndicatorShowState(false);
- }
- }
- else
- {
- if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & pForm->GetFormStyle())
- {
- __pIndicator->SetIndicatorShowState(true);
- }
- else
- {
- __pIndicator->SetIndicatorShowState(false);
- }
- }
- __pIndicator->OnChangeLayout(orientation);
- }
- }
}
}}} // Tizen::Ui::Controls
#include "FUiCtrl_PopupImpl.h"
#include "FUiCtrl_Popup.h"
#include "FUiCtrl_Form.h"
-#include "FUiCtrl_Indicator.h"
using namespace Tizen::Ui::Animations;
return null;
}
- if ( layoutType == UIBUILDER_LAYOUT_GRID)
+ if (layoutType == UIBUILDER_LAYOUT_GRID)
{
for (int i = 0; i < UIBUILDER_ATTRIBUTE_NUM; i++)
{
GridLayout* pGridLayout = null;
pControlProperty = pControl->GetAttribute(i);
- if ( i == UIBUILDER_ATTRIBUTE_PORTRAIT)
+ if (i == UIBUILDER_ATTRIBUTE_PORTRAIT)
{
pGridLayout = dynamic_cast<GridLayout*>(pPortraitLayout);
}
TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
SysTryCatch(NID_UI_CTRL, pSimpleText != null , r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ pSimpleText->SetTextShadowEnabled(true);
+
_pTitleTextObject->AppendElement(*pSimpleText);
_pTitleTextObject->SetForegroundColor(__pPopup->GetTitleTextColor(), 0, _pTitleTextObject->GetTextLength());
_pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
{
result r = E_SUCCESS;
- _Progress* pProgress = new (std::nothrow) _Progress;
- SysTryReturn(NID_UI_CTRL, pProgress, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ _Progress* pProgress = new (std::nothrow) _Progress();
+ SysTryReturn(NID_UI_CTRL, pProgress, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
_AccessibilityContainer* pContainer = pProgress->GetAccessibilityContainer();
SysTryCatch(NID_UI_CTRL, pProgress->__pProgressPresenter != null, , r,
"[%s] Propagating.", GetErrorMessage(r));
- r = GET_COLOR_CONFIG(SLIDER::BAR_NORMAL, pProgress->__barColor);
+ r = GET_COLOR_CONFIG(PROGRESS::BAR_NORMAL, pProgress->__barColor);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to get progress colorconfig", GetErrorMessage(r));
- r = GET_COLOR_CONFIG(SLIDER::BAR_BG_NORMAL, pProgress->__barBgColor);
+ r = GET_COLOR_CONFIG(PROGRESS::BAR_BG_NORMAL, pProgress->__barBgColor);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to get progress colorconfig", GetErrorMessage(r));
pProgress->AcquireHandle();
_AccessibilityContainer* pContainer = GetAccessibilityContainer();
if (pContainer != null)
{
- __pAccessibilityElement = new _AccessibilityElement(true);
- SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
+ SysTryReturnResult(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, "Memory allocation failed.");
__pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height));
__pAccessibilityElement->SetName(L"ProgressingImage");
__pAccessibilityElement->SetLabel(L"Progressing");
String string;
GET_STRING_CONFIG(IDS_TPLATFORM_BODY_PD_PERCENT_T_TTS, string);
- string.Insert(GetPercentComplete(), 0);
+ string.Replace(L"%d", Integer::ToString(GetPercentComplete()));
__pAccessibilityElement->SetValue(string);
r = pContainer->AddElement(*__pAccessibilityElement);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
return r;
int tempValue = value.ToInt();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__pProgressPresenter->SetValue(tempValue);
r = InitializeAccessibilityElement();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
if (__pAccessibilityElement != null)
{
String string;
GET_STRING_CONFIG(IDS_TPLATFORM_BODY_PD_PERCENT_T_TTS, string);
- string.Insert(GetPercentComplete(), 0);
+ string.Replace(L"%d", Integer::ToString(GetPercentComplete()));
__pAccessibilityElement->SetValue(string);
}
result
_Progress::SetRange(int minValue, int maxValue)
{
- SysTryReturn(NID_UI_CTRL, minValue >= 0 && maxValue >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
- "[E_OUT_OF_RANGE] Values can not be negative.");
- SysTryReturn(NID_UI_CTRL, minValue < maxValue, E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. The minimum value is greater than maximum value.");
+ SysTryReturnResult(NID_UI_CTRL, minValue >= 0 && maxValue >= 0, E_OUT_OF_RANGE,
+ "Values can not be negative.");
+ SysTryReturnResult(NID_UI_CTRL, minValue < maxValue, E_INVALID_ARG,
+ "Invalid argument(s) is used. The minimum value is greater than maximum value.");
result r = E_SUCCESS;
Variant value = GetProperty("value");
r = SetProperty("minValue", Variant(minValue));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set minimum value.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set minimum value.");
r = SetProperty("maxValue", Variant(maxValue));
if (r != E_SUCCESS)
{
String string;
GET_STRING_CONFIG(IDS_TPLATFORM_BODY_PD_PERCENT_T_TTS, string);
- string.Insert(GetPercentComplete(), 0);
+ string.Replace(L"%d", Integer::ToString(GetPercentComplete()));
__pAccessibilityElement->SetValue(string);
}
int tempMinValue = minValue.ToInt();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__pProgressPresenter->SetMinValue(tempMinValue);
int tempMaxValue = maxValue.ToInt();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__pProgressPresenter->SetMaxValue(tempMaxValue);
Variant minimum = GetProperty("minValue");
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
Variant maximum = GetProperty("maxValue");
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
minValue = minimum.ToInt();
maxValue = maximum.ToInt();
Color tempColor = barColor.ToColor();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__barColor = tempColor;
__barColor.SetAlpha(0xFF);
Color tempColor = barBgColor.ToColor();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__barBgColor = tempColor;
__barBgColor.SetAlpha(0xFF);
SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r));
_ProgressImpl* pImpl = new (std::nothrow) _ProgressImpl(pControl, pCore);
- r = CheckConstruction(pCore, pImpl);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[%s] Memory Allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pImpl->InitializeBoundsProperties(GET_SIZE_INFO(Progress), bounds, pCore->GetOrientation());
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r));
_ProgressImpl* pImpl = new (std::nothrow) _ProgressImpl(pControl, pCore);
- r = CheckConstruction(pCore, pImpl);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[%s] Memory Allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(Progress), bounds, pCore->GetOrientation());
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
return null;
}
- pProgress = new (std::nothrow) Progress;
- if (pProgress == null)
- {
- return null;
- }
+ pProgress = new (std::nothrow) Progress();
+ SysTryReturn(NID_UI_CTRL, pProgress, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
rect = pControlProperty->GetRectF();
if (pControl->GetElement(L"min", elementString) && pControl->GetElement(L"max", elementString1))
#include "FUiCtrl_Frame.h"
#include "FUiCtrl_ProgressPopup.h"
#include "FUiCtrl_ProgressPopupPresenter.h"
-#include "FUiCtrl_Indicator.h"
using namespace Tizen::Graphics;
__pProgressPopupEvent = null;
}
- delete _pBgBitmap;
- _pBgBitmap = null;
-
delete _pComposedBgBitmap;
_pComposedBgBitmap = null;
_AccessibilityContainer* pContainer = null;
- Bitmap* buttonBgBitmap = null;
- Bitmap* titleBgBitmap = null;
Color titleBgColor(0x00000000);
Color buttonBgColor(0x00000000);
Color buttonTextHighlighted(0x00000000);
bool isCustomBitmap = false;
- Bitmap* pButtonBgNormal = null;
- Bitmap* pButtonBgPressed = null;
- Bitmap* pButtonBgDisabled = null;
- Bitmap* pButtonBgHighlighted = null;
-
Bitmap* pComposedButtonBgNormal = null;
Bitmap* pComposedButtonBgPressed = null;
Bitmap* pComposedButtonBgDisabled = null;
GET_COLOR_CONFIG(MESSAGEBOX::TITLE_BG_NORMAL, titleBgColor);
GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BG_NORMAL, buttonBgColor);
- GET_BITMAP_CONFIG_N(POPUP::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pOutlineBitmap);
- r = GetLastResult();
+ r = GET_BITMAP_CONFIG_N(POPUP::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pOutlineBitmap);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
Color bgColor;
GET_COLOR_CONFIG(POPUP::BG_NORMAL, bgColor);
- GET_BITMAP_CONFIG_N(POPUP::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pBgBitmap);
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- _pComposedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*_pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(POPUP::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, _pComposedBgBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
if (cancelButton)
{
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgBitmap);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgColor, __pComposedButtonBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pComposedButtonBitmap = _BitmapImpl::GetColorReplacedBitmapN(*buttonBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonBgColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (__pComposedButtonBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonEffectBitmap);
- r = GetLastResult();
+ r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonEffectBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
}
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, titleBgBitmap);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, titleBgColor, _pComposedTitleBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- _pComposedTitleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*titleBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), titleBgColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, _pTitleEffectBitmap);
- r = GetLastResult();
+ r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, _pTitleEffectBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
// for clearing canvas
GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_DISABLED, buttonTextDisabled);
GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_HIGHLIGHTED, buttonTextHighlighted);
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgNormal);
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating. Failed to load Bottom button normal Image.", GetErrorMessage(r));
isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL);
if (!isCustomBitmap)
{
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonNormalEffect);
- r = GetLastResult();
+ r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonNormalEffect);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button normal effect Image.", GetErrorMessage(r));
}
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgPressed);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button pressed Image.", GetErrorMessage(r));
-
isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED);
if (!isCustomBitmap)
{
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonPressedEffect);
- r = GetLastResult();
+ r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonPressedEffect);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button pressed effect Image.", GetErrorMessage(r));
}
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgDisabled);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button disabled Image.", GetErrorMessage(r));
-
isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED);
if (!isCustomBitmap)
{
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_DISABLED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonDisabledEffect);
- r = GetLastResult();
+ r = GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_DISABLED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonDisabledEffect);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button disabled effect Image.", GetErrorMessage(r));
}
- GET_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pButtonBgHighlighted);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating. Failed to load Bottom button highlighted Image.", GetErrorMessage(r));
-
- pComposedButtonBgNormal = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgNormal, Color::GetColor(COLOR_ID_MAGENTA), buttonColorNormal);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorNormal, pComposedButtonBgNormal);
SysTryCatch(NID_UI_CTRL, (pComposedButtonBgNormal != null), , r, "[%s] Propagating.", GetErrorMessage(r));
- pComposedButtonBgPressed = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgPressed, Color::GetColor(COLOR_ID_MAGENTA), buttonColorPressed);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pComposedButtonBgPressed != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorPressed, pComposedButtonBgPressed);
+ SysTryCatch(NID_UI_CTRL, (pComposedButtonBgNormal != null), , r, "[%s] Propagating.", GetErrorMessage(r));
- pComposedButtonBgDisabled = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgDisabled, Color::GetColor(COLOR_ID_MAGENTA), buttonColorDisabled);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pComposedButtonBgDisabled != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorDisabled, pComposedButtonBgDisabled);
+ SysTryCatch(NID_UI_CTRL, (pComposedButtonBgNormal != null), , r, "[%s] Propagating.", GetErrorMessage(r));
- pComposedButtonBgHighlighted = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBgHighlighted, Color::GetColor(COLOR_ID_MAGENTA), buttonColorHighlighted);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pComposedButtonBgHighlighted != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorHighlighted, pComposedButtonBgHighlighted);
+ SysTryCatch(NID_UI_CTRL, (pComposedButtonBgNormal != null), , r, "[%s] Propagating.", GetErrorMessage(r));
__pButton = new (std::nothrow) Button();
SysTryCatch(NID_UI_CTRL, __pButton != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = _SettingInfoImpl::AddSettingEventListenerForInternal(*this);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- if (buttonBgBitmap != null)
- {
- delete buttonBgBitmap;
- buttonBgBitmap = null;
- }
-
- delete pButtonBgNormal;
- pButtonBgNormal = null;
-
- delete pButtonBgPressed;
- pButtonBgPressed = null;
-
- delete pButtonBgDisabled;
- pButtonBgDisabled = null;
-
- delete pButtonBgHighlighted;
- pButtonBgHighlighted = null;
-
delete pComposedButtonBgNormal;
pComposedButtonBgNormal = null;
delete pButtonDisabledEffect;
pButtonNormalEffect = null;
- delete titleBgBitmap;
- titleBgBitmap = null;
-
return r;
CATCH:
- delete pButtonBgNormal;
- pButtonBgNormal = null;
-
- delete pButtonBgPressed;
- pButtonBgPressed = null;
-
- delete pButtonBgDisabled;
- pButtonBgDisabled = null;
-
- delete pButtonBgHighlighted;
- pButtonBgHighlighted = null;
-
delete pComposedButtonBgNormal;
pComposedButtonBgNormal = null;
delete pButtonDisabledEffect;
pButtonNormalEffect = null;
- delete titleBgBitmap;
- titleBgBitmap = null;
-
- delete _pBgBitmap;
- _pBgBitmap = null;
-
delete _pOutlineBitmap;
_pOutlineBitmap = null;
delete _pComposedBgBitmap;
_pComposedBgBitmap = null;
- if (buttonBgBitmap != null)
- {
- delete buttonBgBitmap;
- buttonBgBitmap = null;
- }
-
if (__pComposedButtonBitmap != null)
{
delete __pComposedButtonBitmap;
SetTouchCapture(false, false);
}
- bool showstate = false;
- bool opacity = false;
- unsigned long formstyle = 0x00000000;
-
_Control* pOwner = GetOwner();
if (pOwner == null)
{
if (pForm != null)
{
SetOwner(pForm);
-
- showstate = pForm->IsIndicatorVisible();
- opacity = pForm->IsIndicatorTranslucent();
- formstyle = pForm->GetFormStyle();
}
else
{
}
else
{
- _Form* pForm = dynamic_cast<_Form*>(pOwner);
- if (pForm != null)
- {
- showstate = pForm->IsIndicatorVisible();
- opacity = pForm->IsIndicatorTranslucent();
- formstyle = pForm->GetFormStyle();
- }
-
pOwner->LockInputEvent();
}
- _Indicator* pIndicator = GetIndicator();
- if (pIndicator)
- {
- pIndicator->AddIndicatorObject(this, GetRootWindow());
-
- float indicatorwidth = 0.0f;
- float indicatorheight = 0.0f;
-
- if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
- {
- indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().width;
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
- }
- else
- {
- indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().height;
- GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetOrientation(), indicatorheight);
- }
-
- pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, indicatorwidth, indicatorheight));
- pIndicator->SetIndicatorShowState(showstate);
- if (opacity)
- {
- pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_TRANSLUCENT);
- }
- else
- {
- pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE);
- }
-
- if (formstyle & FORM_STYLE_PORTRAIT_INDICATOR)
- {
- if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
- {
- pIndicator->SetIndicatorAutoHide(false, true);
- }
- else
- {
- pIndicator->SetIndicatorAutoHide(false, false);
- }
- }
- else if (formstyle & FORM_STYLE_INDICATOR_AUTO_HIDE)
- {
- if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
- {
- pIndicator->SetIndicatorAutoHide(true, true);
- }
- else
- {
- pIndicator->SetIndicatorAutoHide(true, false);
- }
- }
- else
- {
- if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
- {
- pIndicator->SetIndicatorAutoHide(false, true);
- }
- else
- {
- pIndicator->SetIndicatorAutoHide(false, false);
- }
- }
- }
-
-
if (__isTransparent)
{
_DimmingLayer* pDimmingLayer = GetDimmingLayer();
#include "FUiCtrl_FrameImpl.h"
#include "FUiCtrl_Form.h"
#include "FUiCtrl_ProgressPopupImpl.h"
-#include "FUiCtrl_Indicator.h"
+
using namespace Tizen::Ui::Animations;
if (__pAnimationFrameList != null)
{
+ __pAnimationFrameList->RemoveAll(true);
delete __pAnimationFrameList;
__pAnimationFrameList = null;
}
TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
SysTryCatch(NID_UI_CTRL, pSimpleTextForTitleText != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ pSimpleTextForTitleText->SetTextShadowEnabled(true);
_pTitleTextObject->AppendElement(*pSimpleTextForTitleText);
_pTitleTextObject->SetForegroundColor(__pProgressPopup->GetTitleTextColor(), 0, _pTitleTextObject->GetTextLength());
_pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
delete __pAnimation;
__pAnimation = null;
- __pAnimation = _Animation::CreateAnimationN();
+ __pAnimation = _Animation::CreateAnimationN(true);
if (__pAnimation)
{
_pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas));
}
- if( __cancelButton )
+ if(__cancelButton)
{
const Bitmap* pButtonBitmap = __pProgressPopup->GetButtonBackgroundBitmap();
const Bitmap* pButtonEffectBitmap = __pProgressPopup->GetButtonBackgroundEffectBitmap();
if (pLabelElement != null)
{
pLabelElement->SetName(L"ProgressPopupText");
- pLabelElement->SetTrait(L"Popup body text");
+ pLabelElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TEXT_IN_BODY_OF_POP_UP_T_TALKBACK");
}
// Add Container
_ProgressPresenter::_ProgressPresenter(void)
: __pProgress(null)
, __pProgressModel(null)
- , __pResourceBitmap(null)
- , __pResourceBarBgBitmap(null)
, __pBarResourceEffectBitmap(null)
, __pBarBgResourceEffectBitmap(null)
, __pBarColorReplacementBitmap(null)
delete __pProgressModel;
__pProgressModel = null;
- delete __pResourceBitmap;
- __pResourceBitmap = null;
-
- delete __pResourceBarBgBitmap;
- __pResourceBarBgBitmap = null;
-
delete __pBarResourceEffectBitmap;
__pBarResourceEffectBitmap = null;
_ProgressPresenter::CreateInstanceN(const _Progress& progress)
{
result r = E_SUCCESS;
- _ProgressPresenter* pProgressPresenter = new (std::nothrow) _ProgressPresenter;
+ _ProgressPresenter* pProgressPresenter = new (std::nothrow) _ProgressPresenter();
SysTryReturn(NID_UI_CTRL, pProgressPresenter != null, null, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pProgressPresenter->__pProgress = const_cast <_Progress*>(&progress);
SysTryCatch(NID_UI_CTRL, pProgressPresenter->__pProgress != null, , E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The Progress control core is null");
+ "A system error has occurred. The Progress control core is null.", GetErrorMessage(E_SYSTEM));
- pProgressPresenter->__pProgressModel = new (std::nothrow) _ProgressModel;
+ pProgressPresenter->__pProgressModel = new (std::nothrow) _ProgressModel();
SysTryCatch(NID_UI_CTRL, pProgressPresenter->__pProgressModel != null, , E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ "Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pProgressPresenter->LoadResource();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. The loading of resource failed");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. The loading of resource failed", GetErrorMessage(E_SYSTEM));
return pProgressPresenter;
Color barColor;
r = GET_COLOR_CONFIG(PROGRESS::BAR_BG_NORMAL, bgColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(PROGRESS::BAR_NORMAL, barColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, " Propagating.");
- r = GET_BITMAP_CONFIG_N(PROGRESS::BAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBarBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(PROGRESS::BAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, __pBarBgColorReplacementBitmap);
+ SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.");
- __pBarBgColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBarBgBitmap,Color::GetColor(COLOR_ID_MAGENTA), bgColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(PROGRESS::BAR_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(PROGRESS::BAR_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, barColor, __pBarColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pBarColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBitmap,Color::GetColor(COLOR_ID_MAGENTA), barColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
r = GET_BITMAP_CONFIG_N(PROGRESS::BAR_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pBarBgResourceEffectBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
CATCH:
- delete __pResourceBitmap;
- __pResourceBitmap = null;
-
- delete __pResourceBarBgBitmap;
- __pResourceBarBgBitmap = null;
+ delete __pBarBgColorReplacementBitmap;
+ __pBarBgColorReplacementBitmap = null;
delete __pBarResourceEffectBitmap;
__pBarResourceEffectBitmap = null;
delete __pBarColorReplacementBitmap;
__pBarColorReplacementBitmap = null;
- delete __pBarBgColorReplacementBitmap;
- __pBarBgColorReplacementBitmap = null;
-
return r;
}
FloatRectangle bounds = __pProgress->GetBoundsF();
Canvas* pCanvas = __pProgress->GetCanvasN();
- SysTryReturn(NID_UI_CTRL, pCanvas != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to get a canvas.");
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "Failed to get a canvas.");
int minValue = __pProgressModel->GetMinValue();
int maxValue = __pProgressModel->GetMaxValue();
if (__pProgress->GetBarBackgroundColor() != __currentBarBgColor)
{
- pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBarBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pProgress->GetBarBackgroundColor());
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(PROGRESS::BAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pProgress->GetBarBackgroundColor(), pReplacementBitmap);
SysTryCatch(NID_UI_CTRL, pReplacementBitmap != null, , r, "[%s] Failed to get replacement color.", GetErrorMessage(r));
delete __pBarBgColorReplacementBitmap;
__pBarBgColorReplacementBitmap = null;
{
if (__pProgress->GetBarColor() != __currentBarColor)
{
- pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pProgress->GetBarColor());
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(PROGRESS::BAR_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pProgress->GetBarColor(), pReplacementBitmap);
SysTryCatch(NID_UI_CTRL, pReplacementBitmap != null, , r, "[%s] Failed to get replacement color.", GetErrorMessage(r));
delete __pBarColorReplacementBitmap;
__pBarColorReplacementBitmap = null;
{
}
- const Tizen::Graphics::Color GetColor(void) const
+ const Color GetColor(void) const
{
return __color;
}
_PublicColorChangeEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
{
IColorChangeEventListener* pColorChangeListener = dynamic_cast <IColorChangeEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, (pColorChangeListener != null), E_INVALID_ARG,
- "[E_INVALID_ARG] The event argument is invalid type.\n.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pColorChangeListener != null, E_INVALID_ARG,
+ "[E_INVALID_ARG] Invalid argument is used. The IColorChangeEventListener instance is null.");
const _PublicColorChangeEventArg* pArg = dynamic_cast <const _PublicColorChangeEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI_CTRL, (pArg != null), E_INVALID_ARG,
- "[E_INVALID_ARG] The event argument is invalid type.\n.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG,
+ "[E_INVALID_ARG] Invalid argument is used. The _PublicColorChangeEventArg instance is null.");
pColorChangeListener->OnColorChanged(*__pSource, Color(pArg->GetColor()));
_PublicColorChangeEvent::CreateInstanceN(const Control& source)
{
_PublicColorChangeEvent* pCoreColorChangeEvent = new (std::nothrow) _PublicColorChangeEvent(source);
- SysTryReturn(NID_UI_CTRL, (pCoreColorChangeEvent != null), null, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pCoreColorChangeEvent != null, null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
if (IsFailed(GetLastResult()))
{
_PublicColorChangeEvent::CreateColorChangeEventArgN(const Color& color)
{
_PublicColorChangeEventArg* pEventArg = new (std::nothrow) _PublicColorChangeEventArg(color);
- SysTryReturn(NID_UI_CTRL, (pEventArg != null), null, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pEventArg;
}
_PublicExpandableEditAreaEvent::CreateInstanceN(const Tizen::Ui::Control& source)
{
_PublicExpandableEditAreaEvent* pPublicExpandableEditAreaEvent = new (std::nothrow) _PublicExpandableEditAreaEvent(source);
- SysTryReturn(NID_UI_CTRL, pPublicExpandableEditAreaEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pPublicExpandableEditAreaEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
if (IsFailed(GetLastResult()))
{
// cast to _PublicExpandableEditAreaEventArg
const _PublicExpandableEditAreaEventArg* pArg = dynamic_cast <const _PublicExpandableEditAreaEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. pArg is null.");
// call cursor change event listener method
ExpandableEditAreaEventStatus status = pArg->GetStatus();
_PublicExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(ExpandableEditAreaEventStatus status, int newLineCount)
{
_PublicExpandableEditAreaEventArg* pEventArg = new (std::nothrow) _PublicExpandableEditAreaEventArg(status, newLineCount);
- SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pEventArg;
}
_PublicKeypadEvent::CreateInstanceN(const Control& source)
{
_PublicKeypadEvent* pPublicKeypadEvent = new (std::nothrow) _PublicKeypadEvent(source);
- SysTryReturn(NID_UI_CTRL, pPublicKeypadEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pPublicKeypadEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pPublicKeypadEvent;
}
{
IKeypadEventListener* pKeypadEventListener = dynamic_cast <IKeypadEventListener*>(&listener);
SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventListener != null, E_INVALID_ARG,
- "[E_INVALID_ARG] The invalid listener was given.\n");
+ "[E_INVALID_ARG] The invalid listener was given.");
const _PublicKeypadEventArg* pKeypadEventArg = dynamic_cast <const _PublicKeypadEventArg*>(&arg);
SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg != null, E_INVALID_ARG,
- "[E_INVALID_ARG] The invalid Event Argument was given.\n");
+ "[E_INVALID_ARG] The invalid Event Argument was given.");
Control* tempSource = null;
tempSource = const_cast <Control*>(pKeypadEventArg->GetSource());
KeypadEventStatus status)
{
_PublicKeypadEventArg* pEventArg = new (std::nothrow) _PublicKeypadEventArg(source, actionId, status);
- SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pEventArg;
}
_PublicLanguageEvent::CreateInstanceN(const Control& source)
{
_PublicLanguageEvent* pPublicLanguageEvent = new (std::nothrow) _PublicLanguageEvent(source);
- SysTryReturn(NID_UI_CTRL, pPublicLanguageEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pPublicLanguageEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pPublicLanguageEvent;
}
{
ILanguageEventListener* pLanguageEventListener = dynamic_cast <ILanguageEventListener*>(&listener);
SysTryReturnVoidResult(NID_UI_CTRL, pLanguageEventListener != null, E_INVALID_ARG,
- "[E_INVALID_ARG] The invalid listener was given.\n");
+ "[E_INVALID_ARG] The invalid listener was given.");
const _PublicLanguageEventArg* pLanguageEventArg = dynamic_cast <const _PublicLanguageEventArg*>(&arg);
SysTryReturnVoidResult(NID_UI_CTRL, pLanguageEventArg != null, E_INVALID_ARG,
- "[E_INVALID_ARG] The invalid Event Argument was given.\n");
+ "[E_INVALID_ARG] The invalid Event Argument was given.");
Control* tempSource = null;
tempSource = const_cast <Control*>(pLanguageEventArg->GetSource());
{
_PublicLanguageEventArg* pLanguageEventArg = new (std::nothrow) _PublicLanguageEventArg(source, prevLanguageCode,
currentLanguageCode);
- SysTryReturn(NID_UI_CTRL, pLanguageEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pLanguageEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pLanguageEventArg;
}
_PublicLinkEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg)
{
IUiLinkEventListener* pLinkEventListener = dynamic_cast <IUiLinkEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventListener != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid listener is given.");
_PublicLinkEventArg* pLinkEventArg = dynamic_cast <_PublicLinkEventArg*>(const_cast <IEventArg*>(&arg));
- SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid Event Argument is given.");
const Tizen::Base::String text = pLinkEventArg->GetText();
Tizen::Base::Utility::LinkType linkType = pLinkEventArg->GetLinkType();
// using namespace
using namespace Tizen::Base;
using namespace Tizen::Base::Runtime;
+using namespace Tizen::Ui;
namespace Tizen { namespace Ui { namespace Controls
{
////////////////////////////////////////////////////////////////////////////////
/// _PublicScrollPanelEvent class Lifecycle
-_PublicScrollPanelEvent::_PublicScrollPanelEvent(const Tizen::Ui::Control& source)
+_PublicScrollPanelEvent::_PublicScrollPanelEvent(const Control& source)
: __pSource(null)
{
result r = _Event::Initialize();
}
_PublicScrollPanelEvent*
-_PublicScrollPanelEvent::CreateInstanceN(const Tizen::Ui::Control& source)
+_PublicScrollPanelEvent::CreateInstanceN(const Control& source)
{
_PublicScrollPanelEvent* pPublicScrollPanelEvent = new (std::nothrow) _PublicScrollPanelEvent(source);
- SysTryReturn(NID_UI_CTRL, pPublicScrollPanelEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pPublicScrollPanelEvent, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pPublicScrollPanelEvent;
}
// Accessors
-const Tizen::Ui::Control*
+const Control*
_PublicScrollPanelEvent::GetSource(void) const
{
return __pSource;
// Operations
void
-_PublicScrollPanelEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg)
+_PublicScrollPanelEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
{
IScrollPanelEventListener* pScrollPanelEventListener = dynamic_cast <IScrollPanelEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventListener != null, E_INVALID_ARG,
+ "[E_INVALID_ARG] Invalid argument is used. The IScrollPanelEventListener instance is null.");
const _PublicScrollPanelEventArg* pScrollPanelEventArg = dynamic_cast <const _PublicScrollPanelEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventArg != null, E_INVALID_ARG,
+ "[E_INVALID_ARG] Invalid argument is used. The _PublicScrollPanelEventArg instance is null.");
switch (pScrollPanelEventArg->GetStatus())
{
_PublicScrollPanelEvent::CreateScrollPanelEventArgN(ScrollPanelStatus status)
{
_PublicScrollPanelEventArg* pEventArg = new (std::nothrow) _PublicScrollPanelEventArg(status);
- SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pEventArg;
}
_PublicSearchBarEvent::CreateInstanceN(const SearchBar& source)
{
_PublicSearchBarEvent* pPublicSearchBarEvent = new (std::nothrow) _PublicSearchBarEvent(source);
- SysTryReturn(NID_UI_CTRL, pPublicSearchBarEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pPublicSearchBarEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
if (IsFailed(GetLastResult()))
{
_PublicSearchBarEvent::CreateSearchBarEventArgN(SearchBarEventStatus status)
{
_PublicSearchBarEventArg* pEventArg = new (std::nothrow) _PublicSearchBarEventArg(status);
- SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pEventArg;
}
_PublicTextBlockEvent::CreateInstanceN(const Control& source)
{
_PublicTextBlockEvent* pPublicTextBlockEvent = new (std::nothrow) _PublicTextBlockEvent(source);
- SysTryReturn(NID_UI_CTRL, pPublicTextBlockEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pPublicTextBlockEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pPublicTextBlockEvent;
}
_PublicTextBlockEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
{
ITextBlockEventListener* pTextBlockEventListener = dynamic_cast <ITextBlockEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventListener != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid listener is given.");
const _PublicTextBlockEventArg* pTextBlockEventArg = dynamic_cast <const _PublicTextBlockEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid Event Argument is given.");
pTextBlockEventListener->OnTextBlockSelected(const_cast <Control&>(*__pSource),
pTextBlockEventArg->GetStartPosition(), pTextBlockEventArg->GetEndPosition());
_PublicTextBlockEvent::CreateTextBlockEventArgN(int start, int end)
{
_PublicTextBlockEventArg* pEventArg = new (std::nothrow) _PublicTextBlockEventArg(start, end);
- SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pEventArg;
}
_PublicTextEvent::CreateInstanceN(const Control& source)
{
_PublicTextEvent* pPublicTextEvent = new (std::nothrow) _PublicTextEvent(source);
- SysTryReturn(NID_UI_CTRL, pPublicTextEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pPublicTextEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pPublicTextEvent;
}
// cast to ITextEventListener
ITextEventListener* pTextListener = dynamic_cast <ITextEventListener*>(&listener);
SysTryReturnVoidResult(NID_UI_CTRL, pTextListener != null, E_INVALID_ARG,
- "[E_INVALID_ARG] The invalid listener was given.\n");
+ "[E_INVALID_ARG] The invalid listener was given.");
// cast to _PublicTextEventArg
const _PublicTextEventArg* pArg = dynamic_cast <const _PublicTextEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.");
// call cursor change event listener method
TextEventStatus stauts = pArg->GetStatus();
_PublicTextEvent::CreateTextEventArgN(TextEventStatus status)
{
_PublicTextEventArg* pEventArg = new (std::nothrow) _PublicTextEventArg(status);
- SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pEventArg;
}
ClearLastResult();
_Scroll* pScroll = new (std::nothrow) _Scroll();
- SysTryReturn(NID_UI_CTRL, pScroll, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pScroll, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pScroll->Construct(parentCtrl,
viewRange,
scrollRange,
scrollPosition);
- SysTryReturnResult(NID_UI_CTRL, pPresenter, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnResult(NID_UI_CTRL, pPresenter, GetLastResult(), "Propagating.");
SetPresenter((_ScrollPresenter &)*pPresenter);
SetFocusable(false);
_ScrollEventArg::GetScrollEventArgN(const Control& source)
{
_ScrollEventArg* pEventArg = new (std::nothrow) _ScrollEventArg(SCROLL_EVENT_ON_SCROLL_STOPPED, source);
- SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pEventArg;
}
_ScrollEventArg::GetScrollEventArgN(const Control& source, float scrollPosition)
{
_ScrollEventArg* pEventArg = new (std::nothrow) _ScrollEventArg(SCROLL_EVENT_ON_SCROLL_POSITION_CHANGED, source, scrollPosition);
- SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pEventArg;
}
_ScrollEventArg::GetScrollEventArgN(const Control& source, ScrollEndEvent scrollType)
{
_ScrollEventArg* pEventArg = new (std::nothrow) _ScrollEventArg(SCROLL_EVENT_ON_SCROLL_END_REACHED, source, -1.0f, scrollType);
- SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pEventArg;
}
using namespace Tizen::Base;
using namespace Tizen::Graphics;
using namespace Tizen::Ui::Animations;
+using namespace Tizen::Base::Runtime;
namespace
{
FloatRectangle areaBounds(0.0f, 0.0f, rect.width, rect.height);
- _ScrollPanel* pScrollPanel = new (std::nothrow) _ScrollPanel;
- SysTryReturn(NID_UI_CTRL, pScrollPanel != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ _ScrollPanel* pScrollPanel = new (std::nothrow) _ScrollPanel();
+ SysTryReturn(NID_UI_CTRL, pScrollPanel != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pScrollPanel->SetScrollDirection(scrollDirection);
pScrollPanel->SetScrollAreaAutoResizingEnabled(autoResizingEnable);
pScrollPanel->SetPageScrollEnabled(pageScrollEnabled);
- _ScrollPanelPresenter* pPresenter = new (std::nothrow) _ScrollPanelPresenter;
- SysTryCatch(NID_UI_CTRL, pPresenter != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ _ScrollPanelPresenter* pPresenter = new (std::nothrow) _ScrollPanelPresenter();
+ SysTryCatch(NID_UI_CTRL, pPresenter != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pPresenter->Initialize(*pScrollPanel);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
SetScrollPanelPresenter(&presenter);
- __pScrollingAnimation = new (std::nothrow) VisualElementValueAnimation;
- SysTryReturn(NID_UI_CTRL, __pScrollingAnimation != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ __pScrollingAnimation = new (std::nothrow) VisualElementValueAnimation();
+ SysTryReturn(NID_UI_CTRL, __pScrollingAnimation != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pScrollingAnimation->SetRepeatCount(SCROLL_PANEL_ANIMATION_DEFAULT_REPEAT_COUNT);
__pScrollingAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseOut"));
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- __pGestureFlick = new (std::nothrow) _TouchFlickGestureDetector;
- SysTryCatch(NID_UI_CTRL, __pGestureFlick != null, , E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ __pGestureFlick = new (std::nothrow) _TouchFlickGestureDetector();
+ SysTryCatch(NID_UI_CTRL, __pGestureFlick != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
result
-_ScrollPanel::OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds)
+_ScrollPanel::OnBoundsChanging(const FloatRectangle& bounds)
{
ClearLastResult();
return __pageScrollMoveOnlyOnePageOnFlick;
}
+bool
+_ScrollPanel::IsScrollAnimationRunning(void) const
+{
+ return __pScrollPanelPresenter->IsScrollAnimationRunning();
+}
+
void
_ScrollPanel::SetScrollPosition(float position, bool withAnimation)
{
}
void
-_ScrollPanel::SetScrollPosition(Tizen::Graphics::FloatPoint position, bool withAnimation)
+_ScrollPanel::SetScrollPosition(FloatPoint position, bool withAnimation)
{
ClearLastResult();
ClearLastResult();
__pScrollPanelPresenter->SetVerticalScrollPosition(position);
+ InvalidateHierarchyAbsoluteBounds(*this);
}
float
ClearLastResult();
__pScrollPanelPresenter->SetHorizontalScrollPosition(position);
+ InvalidateHierarchyAbsoluteBounds(*this);
}
float
if (__pScrollEvent == null)
{
// Create scroll event
- __pScrollEvent = new (std::nothrow) _UiScrollEvent;
- SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ __pScrollEvent = new (std::nothrow) _UiScrollEvent();
+ SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pScrollEvent->Construct(*this);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
- r = __pScrollEvent->AddListener((const Tizen::Base::Runtime::IEventListener &)listener);
+ r = __pScrollEvent->AddListener((const IEventListener &)listener);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
ClearLastResult();
SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_SYSTEM, "[%s] __pScrollEvent is invalid pointer.", GetErrorMessage(E_SYSTEM));
- result r = __pScrollEvent->RemoveListener((const Tizen::Base::Runtime::IEventListener &)listener);
+ result r = __pScrollEvent->RemoveListener((const IEventListener &)listener);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
{
if (__pCoreScrollPanelEvent != null)
{
- Tizen::Base::Runtime::IEventArg* pEventArg = _ScrollPanelEvent::CreateScrollPanelEventArgN(scrollPanelStatus);
+ IEventArg* pEventArg = _ScrollPanelEvent::CreateScrollPanelEventArgN(scrollPanelStatus);
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pEventArg != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
// using namespace
using namespace Tizen::Base;
using namespace Tizen::Base::Runtime;
+using namespace Tizen::Ui;
namespace Tizen { namespace Ui { namespace Controls
{
////////////////////////////////////////////////////////////////////////////////
/// _ScrollPanelEvent class Lifecycle
-_ScrollPanelEvent::_ScrollPanelEvent(const Tizen::Ui::_Control& source)
+_ScrollPanelEvent::_ScrollPanelEvent(const _Control& source)
: __pSource(null)
{
result r = _Event::Initialize();
}
_ScrollPanelEvent*
-_ScrollPanelEvent::CreateScrollPanelEventN(const Tizen::Ui::_Control& source)
+_ScrollPanelEvent::CreateScrollPanelEventN(const _Control& source)
{
_ScrollPanelEvent* pCoreScrollPanelEvent = new (std::nothrow) _ScrollPanelEvent(source);
- SysTryReturn(NID_UI_CTRL, pCoreScrollPanelEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pCoreScrollPanelEvent != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
if (IsFailed(GetLastResult()))
{
// Accessors
-const Tizen::Ui::_Control*
+const _Control*
_ScrollPanelEvent::GetSource(void) const
{
return __pSource;
// Operations
void
-_ScrollPanelEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg)
+_ScrollPanelEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
{
_IScrollPanelEventListener* pScrollPanelEventListener = dynamic_cast <_IScrollPanelEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventListener != null, E_INVALID_ARG,
+ "[E_INVALID_ARG] Invalid argument is used. The _IScrollPanelEventListener instance is null.");
const _ScrollPanelEventArg* pScrollPanelEventArg = dynamic_cast <const _ScrollPanelEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pScrollPanelEventArg != null, E_INVALID_ARG,
+ "[E_INVALID_ARG] Invalid argument is used. The _ScrollPanelEventArg instance is null.");
switch (pScrollPanelEventArg->GetStatus())
{
_ScrollPanelEvent::CreateScrollPanelEventArgN(CoreScrollPanelStatus status)
{
_ScrollPanelEventArg* pEventArg = new (std::nothrow) _ScrollPanelEventArg(status);
- SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pEventArg;
}
using namespace Tizen::App;
using namespace Tizen::Graphics;
+using namespace Tizen::Base;
namespace Tizen { namespace Ui { namespace Controls
{
if (__pScrollEvent == null)
{
__pScrollEvent = new (std::nothrow) _ScrollEvent();
- SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pScrollEvent->Construct(GetPublic());
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pScrollEvent == null)
{
__pScrollEvent = new (std::nothrow) _ScrollEvent();
- SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pScrollEvent->Construct(GetPublic());
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
GetInstance(_UiBuilder* pUibuilder)
{
_ScrollPanelMaker* pScrollPanelMaker = new (std::nothrow) _ScrollPanelMaker(pUibuilder);
- SysTryReturn(NID_UI_CTRL, pScrollPanelMaker != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturn(NID_UI_CTRL, pScrollPanelMaker != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pScrollPanelMaker;
};
ScrollPanelScrollDirection scrollDirection = SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL;
bool autoResizingEnabled = true;
- Tizen::Base::String elementString;
+ String elementString;
GetProperty(pControl, &pControlProperty);
- SysTryReturn(NID_UI_CTRL, pControlProperty != null, null, E_SYSTEM, "[%s] pControlProperty is invalid pointer.", GetErrorMessage(E_SYSTEM));
+ SysTryReturn(NID_UI_CTRL, pControlProperty != null, null, E_SYSTEM, "[E_SYSTEM] A system error occurred. pControlProperty is invalid pointer.");
if(pControl->GetParentWin().IsEmpty())
{
}
else
{
- pScrollPanel = new (std::nothrow) ScrollPanel;
+ pScrollPanel = new (std::nothrow) ScrollPanel();
}
- SysTryReturn(NID_UI_CTRL, pScrollPanel != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturn(NID_UI_CTRL, pScrollPanel != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
rect = pControlProperty->GetRectF();
// Construct
if (pControl->GetElement("backgroundColorOpacity", elementString) || pControl->GetElement("BGColorOpacity", elementString) || pControl->GetElement("backgroundOpacity", elementString))
{
- Base::Integer::Parse(elementString, opacity);
+ Integer::Parse(elementString, opacity);
}
if (pControl->GetElement("backgroundColor", elementString) || pControl->GetElement("BGColor", elementString))
#include "FUi_IAccessibilityListener.h"
#include "FUi_AccessibilityContainer.h"
#include "FUi_AccessibilityElement.h"
+#include "FUi_WindowImpl.h"
+#include "FUi_FocusManagerImpl.h"
#include "FUiAnim_VisualElement.h"
#include "FUiCtrl_Scroll.h"
#include "FUiCtrl_ScrollPanelImpl.h"
using namespace Tizen::Base;
using namespace Tizen::Graphics;
using namespace Tizen::Ui::Animations;
+using namespace Tizen::Base::Runtime;
namespace
{
__pScrollPanel = &scrollPanel;
// create model
- _ScrollPanelModel* pModel = new (std::nothrow) _ScrollPanelModel;
- SysTryReturn(NID_UI_CTRL, pModel != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] The memory is insufficient", GetErrorMessage(E_OUT_OF_MEMORY));
+ _ScrollPanelModel* pModel = new (std::nothrow) _ScrollPanelModel();
+ SysTryReturn(NID_UI_CTRL, pModel != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pScrollPanelModel = pModel;
_ScrollPanelPresenter::OnBoundsChanged(void)
{
AdjustModel();
+ ScrollToFocusedControl();
}
void
__previousScrollAreaBounds = GetScrollAreaBounds();
}
AdjustModel();
+ ScrollToFocusedControl();
}
}
}
_ScrollPanelPresenter::SetScrollPosition(float position, bool withAnimation)
{
// change scroll position
+ position = FixScrollPositionIntoScrollAreaBounds(position, __previousBounds, __previousScrollAreaBounds);
+ ScrollTo(position, withAnimation);
+ result r = GetLastResult();
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (withAnimation)
{
FadeInScrollBar();
result r = GetLastResult();
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
-
- position = FixScrollPositionIntoScrollAreaBounds(position);
- ScrollTo(position, withAnimation);
- result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
float
__touchPressed = false;
__firstTouchMove = true;
+ if (__pScrollPanel->IsPageScrollEnabled() && !__flickRunning && !__jumpToTopRunning)
+ {
+ float currentPosition = GetScrollPosition();
+ float targetPosition = CalculatePagingScrollPosition(currentPosition);
+
+ if (targetPosition > currentPosition || targetPosition < currentPosition)
+ {
+ SetScrollPosition(targetPosition, true);
+ result r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ }
+
__pPressedControl = null;
__subControlMoved = false;
bool
_ScrollPanelPresenter::IsControlOutOfView(const _Control& control) const
{
- FloatRectangle controlBounds = control.GetAbsoluteBoundsF();
- FloatRectangle scrollPanelBounds = __pScrollPanel->GetAbsoluteBoundsF();
+ FloatRectangle controlBounds = control.GetAbsoluteBoundsF(true);
+ FloatRectangle scrollPanelBounds = __pScrollPanel->GetAbsoluteBoundsF(true);
// is control out of view area
if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL)
}
}
+void
+_ScrollPanelPresenter::ScrollToFocusedControl(void)
+{
+ if (_FocusManagerImpl::GetInstance()->IsFocusModeStateEnabled())
+ {
+ _WindowImpl* pWindowImpl = _FocusManagerImpl::GetInstance()->GetCurrentFocusedWindow();
+
+ if (pWindowImpl != null)
+ {
+ _Window* pWindow = &pWindowImpl->GetCore();
+
+ if (pWindow != null)
+ {
+ _Control* pControl = pWindow->GetCurrentFocusControl();
+
+ if (pControl != null)
+ {
+ ScrollToControlWhenOutOfView(*pControl);
+ }
+ }
+ }
+ }
+}
+
float
_ScrollPanelPresenter::CalculatePagingScrollPosition(float position) const
{
}
void
-_ScrollPanelPresenter::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
+_ScrollPanelPresenter::OnTimerExpired(Timer& timer)
{
if (&timer == __pScrollBarLoadEffectTimer)
{
_ScrollPanelPresenter::ScrollTo(float targetPosition, bool withAnimation)
{
StopScrollingAnimation();
+ __pScrollPanel->InvalidateHierarchyAbsoluteBounds(*__pScrollPanel);
if (withAnimation)
{
if (targetPosition <= minScrollPos)
{
__pScrollPanel->FireOnScrollEndEvent(SCROLL_END_EVENT_END_LEFT);
+ __pScrollPanel->GetVisualElement()->RemoveAllAnimations();
}
else if (targetPosition >= maxScrollPos)
{
__pScrollPanel->FireOnScrollEndEvent(SCROLL_END_EVENT_END_RIGHT);
+ __pScrollPanel->GetVisualElement()->RemoveAllAnimations();
}
}
}
if (targetPosition <= minScrollPos)
{
__pScrollPanel->FireOnScrollEndEvent(SCROLL_END_EVENT_END_TOP);
+ __pScrollPanel->GetVisualElement()->RemoveAllAnimations();
}
else if (targetPosition >= maxScrollPos)
{
__pScrollPanel->FireOnScrollEndEvent(SCROLL_END_EVENT_END_BOTTOM);
+ __pScrollPanel->GetVisualElement()->RemoveAllAnimations();
}
}
}
if (__pScrollBarLoadEffectTimer == null && __scrollBarLoadEffectStatus == _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_LOADING)
{
- __pScrollBarLoadEffectTimer = new (std::nothrow) Tizen::Base::Runtime::Timer;
- SysTryReturnVoidResult(NID_UI_CTRL, __pScrollBarLoadEffectTimer != null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient", GetErrorMessage(E_OUT_OF_MEMORY));
+ __pScrollBarLoadEffectTimer = new (std::nothrow) Timer();
+ SysTryReturnVoidResult(NID_UI_CTRL, __pScrollBarLoadEffectTimer != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pScrollBarLoadEffectTimer->Construct(*this);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
void
-_ScrollPanelPresenter::UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds)
+_ScrollPanelPresenter::UpdateClientBounds(const FloatDimension& size, FloatRectangle& clientBounds)
{
if (__pScrollPanel->IsFixingClientBoundsEnabled())
{
bool
_ScrollPanelPresenter::IsScrollAnimationRunning(void) const
{
- return __scrollAnimationRunning;
+ if (__scrollOccured && __scrollAnimationRunning)
+ {
+ return true;
+ }
+
+ return false;
}
bool
const float SCROLL_OPACITY_DARK_DIM =0.6f;
const float SCROLL_OPACITY_LIGHT_DIM = 0.3f;
const float SCROLL_OPACITY_OFF = 0.0f;
-const float SCROLLING_EFFECT_MAX_POSITION = 100.0f;
-const float SCROLLING_EFFECT_MIN_SCALE_RATE = 0.95f;
}
namespace Tizen { namespace Ui { namespace Controls
float scrollRange,
float scrollPosition)
{
- SysTryReturn(NID_UI_CTRL, ((scrollRange >= viewRange) && (scrollRange != 0)), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid arguments");
- SysTryReturn(NID_UI_CTRL, scrollPosition >= 0, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid arguments");
+ SysTryReturn(NID_UI_CTRL, ((scrollRange >= viewRange) && (scrollRange != 0)), null, E_INVALID_ARG, "[%s] Invalid argument is used. ScrollPosition (%d) is not in the range of viewRange (%d).", GetErrorMessage(E_INVALID_ARG), scrollRange, viewRange);
+ SysTryReturn(NID_UI_CTRL, scrollPosition >= 0, null, E_INVALID_ARG, "[%s] Invalid argument is used. ScrollPosition is negative.", GetErrorMessage(E_INVALID_ARG));
_ScrollPresenter* pPresenter = new (std::nothrow) _ScrollPresenter();
- SysTryReturn(NID_UI_CTRL, pPresenter, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pPresenter, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pPresenter->Construct(parentCtrl,
scrollCtrl,
result
_ScrollPresenter::SetScrollRange(float viewRange, float scrollRange)
{
- SysTryReturn(NID_UI_CTRL, ((scrollRange >= viewRange) && (scrollRange != 0)), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid arguments");
+ SysTryReturnResult(NID_UI_CTRL, ((scrollRange >= viewRange) && (scrollRange != 0)), E_INVALID_ARG, "[%s] Invalid argument is used. ScrollPosition (%d) is not in the range of viewRange (%d)", GetErrorMessage(E_INVALID_ARG), scrollRange, viewRange);
if (__viewRange == viewRange && __scrollRange == scrollRange)
{
{
SysTryReturnVoidResult(NID_UI_CTRL,
!((pViewRange == null) && (pScrollRange == null)),
- E_INVALID_ARG,"[E_INVALID_ARG] Input parameter is invalid.");
+ E_INVALID_ARG,"[%s] Invalid argument(s) is used. The given pViewRange and pScrollRange must not be null.", GetErrorMessage(E_INVALID_ARG));
*pViewRange = __viewRange;
*pScrollRange = __scrollRange;
if (isContextMenu)
{
r = GET_BITMAP_CONFIG_N(SCROLL::CONTEXTTHUMB_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MIN_WIDTH, orientation, __thumbSizeMin.width);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MIN_HEIGHT, orientation, __thumbSizeMin.height);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MARGIN, orientation, __thumbMargin);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
}
else
{
r = GET_BITMAP_CONFIG_N(SCROLL::THUMB_VERTICAL_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::VERTICAL_THUMB_MIN_WIDTH, orientation, __thumbSizeMin.width);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::VERTICAL_THUMB_MIN_HEIGHT, orientation, __thumbSizeMin.height);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::VERTICAL_THUMB_MARGIN, orientation, __thumbMargin);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
}
__pThumbVe->SetBounds(CalculateThumbBounds(__scrollDirection));
__pFrontScrollingEffectVe->RemoveAllAnimations();
__pReerScrollingEffectVe->RemoveAllAnimations();
-
- if (visibility)
- {
- if (__enableFadeEffect)
- {
- __pFrontScrollingEffectVe->SetImplicitAnimationEnabled(true);
- __pReerScrollingEffectVe->SetImplicitAnimationEnabled(true);
- }
-
- SetScrollingEffectOpacity(SCROLL_OPACITY_DARK_DIM);
-
- if (__enableFadeEffect)
- {
- __pFrontScrollingEffectVe->SetImplicitAnimationEnabled(false);
- __pReerScrollingEffectVe->SetImplicitAnimationEnabled(false);
- }
- }
- else
- {
- if (__enableFadeEffect)
- {
- __pFrontScrollingEffectVe->SetImplicitAnimationEnabled(true);
- __pReerScrollingEffectVe->SetImplicitAnimationEnabled(true);
- }
-
- SetScrollingEffectOpacity(SCROLL_OPACITY_OFF);
-
- if (__enableFadeEffect)
- {
- __pFrontScrollingEffectVe->SetImplicitAnimationEnabled(false);
- __pReerScrollingEffectVe->SetImplicitAnimationEnabled(false);
- }
- }
-
__scrollingEffectVisibility = visibility;
return E_SUCCESS;
{
__pScrollEvent = new (std::nothrow) _UiScrollEvent();
SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pScrollEvent->Construct(GetControl());
}
_ScrollPresenter::RemoveScrollEventListener(const Controls::_IScrollEventListener& listener)
{
ClearLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent, E_SYSTEM, "[E_SYSTEM] __pScrollEvent must not be null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent, E_SYSTEM, "[%s] A system error has occurred. __pScrollEvent must not be null.", GetErrorMessage(E_SYSTEM));
__pScrollEvent->RemoveListener(listener);
DrawThumb();
DrawJumpToTop();
DrawHandler();
- DrawScrollingEffect();
return;
}
// initialize scrolling effect front VE
__pFrontScrollingEffectVe = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, __pFrontScrollingEffectVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pFrontScrollingEffectVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pFrontScrollingEffectVe->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct pFrontScrollingEffectVe.", GetErrorMessage(r));
// initialize scrolling effect reer VE
__pReerScrollingEffectVe = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, __pReerScrollingEffectVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pReerScrollingEffectVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pReerScrollingEffectVe->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct pReerScrollingEffectVe.", GetErrorMessage(r));
// load color configuration
r = GET_COLOR_CONFIG(SCROLL::THUMB_BG_NORMAL, __thumbColor);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_COLOR_CONFIG(SCROLL::JUMP_TO_TOP_NORMAL, __jumpToTopColor);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_COLOR_CONFIG(SCROLL::JUMP_TO_TOP_PRESSED, __jumpToTopColorPressed);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_COLOR_CONFIG(SCROLL::BUTTON_BG_NORMAL, __buttonColor);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_COLOR_CONFIG(SCROLL::BUTTON_BG_PRESSED, __buttonColorPressed);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
return E_SUCCESS;
ReleaseBitmapResources();
// load bitmap resources
- r = GET_BITMAP_CONFIG_N(SCROLL::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __buttonColor,__pButtonBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(SCROLL::BUTTON_BG_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonEfBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
- r = GET_BITMAP_CONFIG_N(SCROLL::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonPressBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __buttonColorPressed,__pButtonPressBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(SCROLL::BUTTON_BG_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonPressEfBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
if (scrollDirection == SCROLL_DIRECTION_HORIZONTAL)
{
- r = GET_BITMAP_CONFIG_N(SCROLL::THUMB_HORIZONTAL_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::THUMB_HORIZONTAL_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __thumbColor,__pThumbBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(SCROLL::THUMB_HORIZONTAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbEffectBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
- r = GET_BITMAP_CONFIG_N(SCROLL::JUMP_TO_LEFT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pJumpToTopBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::JUMP_TO_LEFT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __jumpToTopColor,__pJumpToTopBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
- r = GET_BITMAP_CONFIG_N(SCROLL::JUMP_TO_LEFT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pJumpToTopPressBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::JUMP_TO_LEFT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __jumpToTopColorPressed,__pJumpToTopPressBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
GET_BITMAP_CONFIG_N(SCROLL::JUMP_TO_LEFT_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pJumpToTopEfBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(SCROLL::HANDLER_HORIZONTAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(SCROLL::OVERSCROLLING_LEFT_BG, BITMAP_PIXEL_FORMAT_ARGB8888, __pFrontScrollingEffectBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(SCROLL::OVERSCROLLING_RIGHT_BG, BITMAP_PIXEL_FORMAT_ARGB8888, __pReerScrollingEffectBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM));
}
else // if (__scrollDirection == SCROLL_DIRECTION_VERTICAL)
{
if (__isContextMenuScroll)
{
r = GET_BITMAP_CONFIG_N(SCROLL::CONTEXTTHUMB_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM));
}
else
{
- r = GET_BITMAP_CONFIG_N(SCROLL::THUMB_VERTICAL_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::THUMB_VERTICAL_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __thumbColor,__pThumbBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM));
}
r = GET_BITMAP_CONFIG_N(SCROLL::THUMB_VERTICAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pThumbEffectBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM));
- r = GET_BITMAP_CONFIG_N(SCROLL::JUMP_TO_TOP_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pJumpToTopBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::JUMP_TO_TOP_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __jumpToTopColor,__pJumpToTopBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM));
- r = GET_BITMAP_CONFIG_N(SCROLL::JUMP_TO_TOP_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pJumpToTopPressBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(SCROLL::JUMP_TO_TOP_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __jumpToTopColorPressed,__pJumpToTopPressBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM));
GET_BITMAP_CONFIG_N(SCROLL::JUMP_TO_TOP_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pJumpToTopEfBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(SCROLL::HANDLER_VERTICAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(SCROLL::OVERSCROLLING_TOP_BG, BITMAP_PIXEL_FORMAT_ARGB8888, __pFrontScrollingEffectBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(SCROLL::OVERSCROLLING_BOTTOM_BG, BITMAP_PIXEL_FORMAT_ARGB8888, __pReerScrollingEffectBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] failed to load image.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM));
}
return E_SUCCESS;
if (__isContextMenuScroll)
{
r = GET_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MIN_WIDTH, orientation, __thumbSizeMin.width);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MIN_HEIGHT, orientation, __thumbSizeMin.height);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MARGIN, orientation, __thumbMargin);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
}
else
{
r = GET_SHAPE_CONFIG(SCROLL::VERTICAL_THUMB_MIN_WIDTH, orientation, __thumbSizeMin.width);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::VERTICAL_THUMB_MIN_HEIGHT, orientation, __thumbSizeMin.height);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::VERTICAL_THUMB_MARGIN, orientation, __thumbMargin);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
}
}
else
{
r = GET_SHAPE_CONFIG(SCROLL::HORIZONTAL_THUMB_MIN_WIDTH, orientation, __thumbSizeMin.width);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::HORIZONTAL_THUMB_MIN_HEIGHT, orientation, __thumbSizeMin.height);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::HORIZONTAL_THUMB_MARGIN, orientation, __thumbMargin);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
}
r = GET_SHAPE_CONFIG(SCROLL::JUMP_TO_TOP_RIGHT_MARGIN, orientation, __jumpToTopMarginRight);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::JUMP_TO_TOP_TOP_MARGIN, orientation, __jumpToTopMarginTop);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_FIXED_VALUE_CONFIG(SCROLL::JUMP_TO_TOP_WIDTH, orientation, __jumpToTopSize.width);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_FIXED_VALUE_CONFIG(SCROLL::JUMP_TO_TOP_HEIGHT, orientation, __jumpToTopSize.height);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::HANDLER_MARGIN, orientation, __handlerMarginLeft);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::HANDLER_MIN_WIDTH, orientation, __handlerSizeMin.width);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
r = GET_SHAPE_CONFIG(SCROLL::HANDLER_MIN_HEIGHT, orientation, __handlerSizeMin.height);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
GET_SHAPE_CONFIG(SCROLL::OVERSCROLLING_LEFT_WIDTH, orientation, __scrollingEffectWidthLeft);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
GET_SHAPE_CONFIG(SCROLL::OVERSCROLLING_RIGHT_WIDTH, orientation, __scrollingEffectWidthRight);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
GET_SHAPE_CONFIG(SCROLL::OVERSCROLLING_TOP_HEIGHT, orientation, __scrollingEffectHeightTop);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
GET_SHAPE_CONFIG(SCROLL::OVERSCROLLING_BOTTOM_HEIGHT, orientation, __scrollingEffectHeightBottom);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to get resource.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM));
__handlerMarginRight = __handlerMarginLeft;
__handlerMarginTop = __handlerMarginLeft;
if (pScrollVe == null)
{
pScrollVe = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, pScrollVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, pScrollVe, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pScrollVe->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct pScrollVe.", GetErrorMessage(r));
}
Canvas* pCanvas = null;
- Bitmap* pThumbBitmap = null;
result r = E_SUCCESS;
if (__enableHandler != true)
{
pCanvas = __pThumbVe->GetCanvasN();
- SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "Failed to get the canvas of __pThumbVe");
+ SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of __pThumbVe.", GetErrorMessage(GetLastResult()));
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
if (__isContextMenuScroll == false)
{
- pThumbBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pThumbBitmap,
- Color::GetColor(COLOR_ID_MAGENTA),
- __thumbColor);
- SysTryCatch(NID_UI_CTRL, pThumbBitmap, , GetLastResult(), "[%s] Failed to draw bitmap.",
- GetErrorMessage(GetLastResult()));
-
if (isCustomBitmap == false)
{
r = DrawBitmap(*pCanvas, thumbBounds, *__pThumbEffectBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r));
}
- r = DrawBitmap(*pCanvas, thumbBounds, *pThumbBitmap);
+ r = DrawBitmap(*pCanvas, thumbBounds, *__pThumbBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r));
}
else
//fall through
CATCH:
delete pCanvas;
- delete pThumbBitmap;
+
return;
}
}
Canvas* pCanvas = null;
- Bitmap* pColorReplacedBitmap = null;
result r = E_SUCCESS;
bool isCustomBitmap = false;
if (__enableJumpToTop)
bitmapId = L"SCROLL::JUMP_TO_LEFT_NORMAL";
}
- Color jumpToTopColor = __jumpToTopColor;
- Color buttonColor = __buttonColor;
Bitmap* pJumpToTopBitmap = __pJumpToTopBitmap;
Bitmap* pButtonBitmap = __pButtonBitmap;
Bitmap* pButtonEfBitmap = __pButtonEfBitmap;
if (__jumpToTopPressed)
{
- jumpToTopColor = __jumpToTopColorPressed;
- buttonColor = __buttonColorPressed;
pJumpToTopBitmap = __pJumpToTopPressBitmap;
pButtonBitmap = __pButtonPressBitmap;
pButtonEfBitmap = __pButtonPressEfBitmap;
}
pCanvas = __pJumpToTopVe->GetCanvasN();
- SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "Failed to get the canvas of __pJumpToTopVe");
+ SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of __pJumpToTopVe.", GetErrorMessage(GetLastResult()));
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r));
}
- pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pButtonBitmap,
- Color::GetColor(COLOR_ID_MAGENTA),
- buttonColor);
- SysTryCatch(NID_UI_CTRL, pColorReplacedBitmap, , GetLastResult(), "[%s] Failed to draw bitmap.", GetErrorMessage(GetLastResult()));
-
- r = DrawBitmap(*pCanvas, jumpToTopBounds, *pColorReplacedBitmap);
+ r = DrawBitmap(*pCanvas, jumpToTopBounds, *pButtonBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r));
if (__scrollDirection == SCROLL_DIRECTION_VERTICAL)
{
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r));
}
- pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pJumpToTopBitmap,
- Color::GetColor(COLOR_ID_MAGENTA),
- jumpToTopColor);
- SysTryCatch(NID_UI_CTRL, pColorReplacedBitmap, , GetLastResult(), "[%s] Failed to draw bitmap.", GetErrorMessage(GetLastResult()));
-
- r = DrawBitmap(*pCanvas, jumpToTopBounds, *pColorReplacedBitmap);
+ r = DrawBitmap(*pCanvas, jumpToTopBounds, *pJumpToTopBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r));
}
//fall through
CATCH:
delete pCanvas;
- delete pColorReplacedBitmap;
+
return;
}
{
// handler bounds setting
pCanvas = __pHandlerVe->GetCanvasN();
- SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "Failed to get the canvas of __pHandlerVe");
+ SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of __pHandlerVe.", GetErrorMessage(GetLastResult()));
// clear background
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
}
float touchDistance = touchPosition - __handlerTouchedPosition;
- float scrollDistance = ( __scrollRange * touchDistance) / scrollBoundsRange;
+ float scrollDistance = (__scrollRange * touchDistance) / scrollBoundsRange;
scrollPosition += scrollDistance;
#include <FBaseErrorDefine.h>
#include <FBaseSysLog.h>
#include <FGrp_BitmapImpl.h>
-#include "FUiAnim_VisualElement.h"
+#include <FSys_SettingInfoImpl.h>
#include "FUi_ResourceManager.h"
+#include "FUi_FocusManagerImpl.h"
+#include "FUi_AccessibilityContainer.h"
+#include "FUi_AccessibilityElement.h"
+#include "FUi_AccessibilityManager.h"
+#include "FUi_CoordinateSystemUtils.h"
+#include "FUiAnim_VisualElement.h"
#include "FUiCtrl_SearchBar.h"
#include "FUiCtrl_SearchBarPresenter.h"
#include "FUiCtrl_Form.h"
#include "FUiCtrl_ActionEvent.h"
#include "FUiCtrl_TextBlockEvent.h"
#include "FUiCtrl_TextEvent.h"
-#include "FUi_AccessibilityContainer.h"
-#include "FUi_AccessibilityElement.h"
-#include "FUi_AccessibilityManager.h"
-#include "FUi_CoordinateSystemUtils.h"
#include "FUiCtrl_SearchBarImpl.h"
#include "FUiCtrl_EditFieldImpl.h"
#include "FUiCtrl_ButtonImpl.h"
-#include "FUi_FocusManagerImpl.h"
-#include <FSys_SettingInfoImpl.h>
using namespace Tizen::Graphics;
, __isButtonTextChangedByApp(false)
, __contentVisibilitySetByApp(true)
, __isFocusUiInitialized(false)
+ , __isTouchMoved(false)
, __keypadAction(CORE_KEYPAD_ACTION_SEARCH)
, __pBackgroundBitmap(null)
, __backgroundColor(Color())
_SearchBar*
_SearchBar::CreateSearchBarN(void)
{
- _SearchBar* pSearchBar = new (std::nothrow) _SearchBar;
- SysTryReturn(NID_UI_CTRL, pSearchBar, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ _SearchBar* pSearchBar = new (std::nothrow) _SearchBar();
+ SysTryReturn(NID_UI_CTRL, pSearchBar != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
if (GetLastResult() != E_SUCCESS)
{
delete pSearchBar;
for (int i = 0; i < SEARCHBAR_COLOR_MAX; i++)
{
- switch(i)
+ switch (i)
{
case SEARCH_FIELD_STATUS_DISABLED:
GET_COLOR_CONFIG(SEARCHBAR::EDIT_BG_DISABLED, __color[i]);
r = CreateClippedGroupControl();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The construction of parent control for clipped group control failed.");
+ "[%s] A system error has occurred. The construction of parent control for clipped group control failed.", GetErrorMessage(E_SYSTEM));
r = CreateSearchField();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit construction failed.");
+ "[%s] A system error has occurred. The edit construction failed.", GetErrorMessage(E_SYSTEM));
r = CreateCancelButton();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button construction failed.");
+ "[%s] A system error has occurred. The cancel button construction failed.", GetErrorMessage(E_SYSTEM));
SetContentsArea();
r = CreateContentsArea();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The construction of parent for content failed.");
+ "[%s] A system error has occurred. The construction of parent for content failed.", GetErrorMessage(E_SYSTEM));
- _SearchBarPresenter* pPresenter = new (std::nothrow) _SearchBarPresenter;
- SysTryReturn(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ _SearchBarPresenter* pPresenter = new (std::nothrow) _SearchBarPresenter();
+ SysTryReturn(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pPresenter->Construct(*this);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
editBounds.height = (editBounds.height > searchFieldMinHeight) ? editBounds.height : searchFieldMinHeight;
_SearchBarImpl* pSearchBarImpl = static_cast<_SearchBarImpl*>(GetUserData());
- __pEdit = &(pSearchBarImpl->GetEditFieldImpl()->GetCore());
+ SysTryReturnResult(NID_UI_CTRL, pSearchBarImpl != null, E_SYSTEM,
+ "A system error has occurred. Failed to get _SearchBarImpl instance.");
+ __pEdit = &(pSearchBarImpl->GetEditFieldImpl()->GetCore());
SysTryReturnResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM,
- "[E_SYSTEM] A system error has occured. Failed to get _Edit instance");
+ "A system error has occurred. Failed to get _Edit instance.");
__pEdit->SetKeypadCommandButtonVisible(false);
__pEdit->SetBounds(editBounds);
r = __pClippedGroupControl->AttachChild(*__pEdit);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to attach edit as child.");
+ "[%s] A system error has occurred. Failed to attach edit as child.", GetErrorMessage(E_SYSTEM));
return E_SUCCESS;
_ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
_SearchBarImpl* pSearchBarImpl = static_cast<_SearchBarImpl*>(GetUserData());
- __pCancelButton = &(pSearchBarImpl->GetButtonImpl()->GetCore());
+ SysTryReturnResult(NID_UI_CTRL, pSearchBarImpl != null, E_SYSTEM,
+ "A system error has occurred. Failed to get _SearchBarImpl instance.");
+ __pCancelButton = &(pSearchBarImpl->GetButtonImpl()->GetCore());
SysTryReturnResult(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM,
- "[E_SYSTEM] A system error has occured. Failed to get _Edit instance");
+ "A system error has occurred. Failed to get _Button instance.");
r = GetLastResult();
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = __pClippedGroupControl->AttachChild(*__pCancelButton);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to attach button as child.");
+ "[%s] A system error has occurred. Failed to attach button as child.", GetErrorMessage(E_SYSTEM));
return E_SUCCESS;
r = AttachChild(*__pContainer);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to attach the parent of content.");
+ "[%s] A system error has occurred. Failed to attach the parent of content.", GetErrorMessage(E_SYSTEM));
return E_SUCCESS;
}
result
+_SearchBar::DetachContent(_Control* pContent)
+{
+ result r = E_SUCCESS;
+
+ if (__pContainer != null && pContent != null)
+ {
+ r = __pContainer->DetachChild(*pContent);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating");
+ }
+ __pContentControl = null;
+
+ return r;
+}
+
+result
_SearchBar::SetContent(const _Control* pContent)
{
__pContentControl = const_cast <_Control*>(pContent);
result
_SearchBar::SetContentAreaVisible(bool visible, bool isCalledByApp)
{
- SysTryReturn(NID_UI_CTRL, __pContainer, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The instance of parent to content is null.");
+ SysTryReturn(NID_UI_CTRL, __pContainer != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The instance of parent to content is null.", GetErrorMessage(E_SYSTEM));
SearchBarMode searchBarMode = GetMode();
if (searchBarMode == SEARCH_BAR_MODE_INPUT)
SearchBarButtonStatus
_SearchBar::GetButtonStatus(void) const
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, SEARCH_BAR_BUTTON_STATUS_NORMAL, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, SEARCH_BAR_BUTTON_STATUS_NORMAL, E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
SearchBarButtonStatus buttonStatus = SEARCH_BAR_BUTTON_STATUS_NORMAL;
result
_SearchBar::SetButtonText(const String& text)
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pCancelButton->SetText(text);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set text.");
+ "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM));
__isButtonTextChangedByApp = true;
result
_SearchBar::SetButtonEnabled(bool enabled)
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
__pCancelButton->SetEnableState(enabled);
result
_SearchBar::AppendCharacter(const Character& character)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
SysTryReturn(NID_UI_CTRL, character.CompareTo(null), E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The character is null.");
+ "[%s] A system error has occurred. The character is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pEdit->AppendCharacter(character);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set character.");
+ "[%s] A system error has occurred. Failed to set character.", GetErrorMessage(E_SYSTEM));
return r;
}
result
_SearchBar::AppendText(const String& text)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
SysTryReturn(NID_UI_CTRL, text.IsEmpty() == false, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The text is empty.");
+ "[%s] A system error has occurred. The text is empty.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pEdit->AppendText(text);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set text.");
+ "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM));
return r;
}
result
_SearchBar::SetText(const String& text)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
int limitLength = __pEdit->GetTextLimitLength();
int textLength = text.GetLength();
SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. textLength exceeds the limitLength");
+ "[%s] A system error has occurred. textLength exceeds the limitLength", GetErrorMessage(E_SYSTEM));
r = __pEdit->SetText(text);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set text.");
+ "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM));
return r;
}
result
_SearchBar::InsertCharacterAt(int index, const Character& character)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
SysTryReturn(NID_UI_CTRL, index > -1, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
- "[E_OUT_OF_RANGE] index(%d) is out of range.", index);
+ "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index);
SysTryReturn(NID_UI_CTRL, character.CompareTo(null), E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The character is null.");
+ "[%s] A system error has occurred. The character is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
textLength = __pEdit->GetTextLength() + 1;
SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_MAX_EXCEEDED, E_MAX_EXCEEDED,
- "[E_MAX_EXCEEDED] limitLength(%d) exceeds the maximum limit textLength(%d).", limitLength, textLength);
+ "[%s] limitLength(%d) exceeds the maximum limit textLength(%d).", GetErrorMessage(E_MAX_EXCEEDED), limitLength, textLength);
SysTryReturn(NID_UI_CTRL, index <= __pEdit->GetTextLength(), E_OUT_OF_RANGE, E_OUT_OF_RANGE,
- "[E_OUT_OF_RANGE] index(%d) is out of range of current textLength(%d).", index, __pEdit->GetTextLength());
+ "[%s] index(%d) is out of range of current textLength(%d).", GetErrorMessage(E_OUT_OF_RANGE), index, __pEdit->GetTextLength());
r = __pEdit->InsertCharacterAt(index, character);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set text.");
+ "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM));
return r;
}
result
_SearchBar::InsertTextAt(int index, const String& text)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
SysTryReturn(NID_UI_CTRL, index > -1, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
- "[E_OUT_OF_RANGE] index(%d) is out of range.", index);
+ "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index);
result r = E_SUCCESS;
textLength = __pEdit->GetTextLength() + text.GetLength();
SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_MAX_EXCEEDED, E_MAX_EXCEEDED,
- "[E_MAX_EXCEEDED] limitLength(%d) exceeds the maximum limit textLength(%d).", limitLength, textLength);
+ "[%s] limitLength(%d) exceeds the maximum limit textLength(%d).", GetErrorMessage(E_MAX_EXCEEDED), limitLength, textLength);
SysTryReturn(NID_UI_CTRL, index <= __pEdit->GetTextLength(), E_OUT_OF_RANGE, E_OUT_OF_RANGE,
- "[E_OUT_OF_RANGE] index(%d) is out of range of current textLength(%d).", index, __pEdit->GetTextLength());
+ "[%s] index(%d) is out of range of current textLength(%d).", GetErrorMessage(E_OUT_OF_RANGE), index, __pEdit->GetTextLength());
r = __pEdit->InsertTextAt(index, text);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to insert text.");
+ "[%s] A system error has occurred. Failed to insert text.", GetErrorMessage(E_SYSTEM));
return r;
}
result
_SearchBar::DeleteCharacterAt(int index)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
SysTryReturn(NID_UI_CTRL, index > -1, E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. index = %d", index);
+ "[%s] Invalid argument(s) is used. index = %d", GetErrorMessage(E_INVALID_ARG), index);
result r = E_SUCCESS;
int textLength = 0;
textLength = __pEdit->GetTextLength();
SysTryReturn(NID_UI_CTRL, textLength > index, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
- "[E_OUT_OF_RANGE] index(%d) is out of range. textLength(%d)", index, textLength);
+ "[%s] index(%d) is out of range. textLength(%d)", GetErrorMessage(E_OUT_OF_RANGE), index, textLength);
r = __pEdit->DeleteCharacterAt(index);
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM,
- "[E_SYSTEM] A system error has occured. Failed to delete character.");
+ "A system error has occurred. Failed to delete character.");
return r;
}
result
_SearchBar::Clear(void)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->ClearText();
}
int
_SearchBar::GetTextLength(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, -1, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, -1, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->GetTextLength();
}
String
_SearchBar::GetText(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, String(), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, String(), E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->GetText();
}
String
_SearchBar::GetText(int start, int end) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, String(), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, String(), E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->GetText(start, end);
}
int
_SearchBar::GetLimitLength(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, -1, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, -1, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->GetTextLimitLength();
}
result
_SearchBar::SetLimitLength(int limitLength)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
SysTryReturn(NID_UI_CTRL, limitLength > 0, E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used.limitLength = %d", limitLength);
+ "[%s] Invalid argument(s) is used.limitLength = %d", GetErrorMessage(E_INVALID_ARG), limitLength);
String tempString = GetText();
int textLength = tempString.GetLength();
SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. limitLength = %d, textLength = %d", limitLength, textLength);
+ "[%s] Invalid argument(s) is used. limitLength = %d, textLength = %d", GetErrorMessage(E_INVALID_ARG), limitLength, textLength);
result r = __pEdit->SetLimitLength(limitLength);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
result
_SearchBar::ShowKeypad(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
SearchBarMode mode = __pSearchBarPresenter->GetMode();
SysTryReturn(NID_UI_CTRL, mode == SEARCH_BAR_MODE_INPUT, E_INVALID_STATE, E_INVALID_STATE,
- "[E_INVALID_STATE] The SearchBar is currently in Normal mode.");
+ "[%s] The SearchBar is currently in Normal mode.", GetErrorMessage(E_INVALID_STATE));
return __pEdit->ShowKeypad();
}
result
_SearchBar::HideKeypad(void)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
SearchBarMode mode = __pSearchBarPresenter->GetMode();
SysTryReturn(NID_UI_CTRL, mode == SEARCH_BAR_MODE_INPUT, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The SearchBar is currently in Normal mode.");
+ "[%s] A system error has occurred. The SearchBar is currently in Normal mode.", GetErrorMessage(E_SYSTEM));
result r = __pEdit->HideKeypad();
float
_SearchBar::GetSearchFieldTextSizeF(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, -1, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, -1, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->GetTextSizeF();
}
result
_SearchBar::SetSearchFieldTextSize(float size)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->SetTextSize(size);
}
result
_SearchBar::GetBlockRange(int& start, int& end) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
int startIndex = -1;
int endIndex = -1;
__pEdit->GetBlockRange(startIndex, endIndex);
SysTryReturn(NID_UI_CTRL, (startIndex > -1 && endIndex > 0), E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to get text block range.");
+ "[%s] A system error has occurred. Failed to get text block range.", GetErrorMessage(E_SYSTEM));
start = startIndex;
end = endIndex - 1;
result
_SearchBar::ReleaseBlock(void)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
result
_SearchBar::SetBlockRange(int start, int end)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
textLength = __pEdit->GetTextLength();
SysTryReturn(NID_UI_CTRL, (start < end && start >= 0 && textLength >= end), E_OUT_OF_RANGE, E_OUT_OF_RANGE,
- "[E_OUT_OF_RANGE] start (%d) and end (%d) is out of range.", start, end - 1);
+ "[%s] start (%d) and end (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), start, end - 1);
r = SetCursorPosition(start);
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = __pEdit->BeginTextBlock();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set text block range.");
+ "[%s] A system error has occurred. Failed to set text block range.", GetErrorMessage(E_SYSTEM));
r = SetCursorPosition(end);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set cursor position.");
+ "[%s] A system error has occurred. Failed to set cursor position.", GetErrorMessage(E_SYSTEM));
return E_SUCCESS;
}
result
_SearchBar::RemoveTextBlock(void)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
_SearchBar::SetBackgroundBitmap(const Bitmap& bitmap)
{
Bitmap* pNewBitmap = _BitmapImpl::CloneN(bitmap);
- SysTryReturn(NID_UI_CTRL, pNewBitmap, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The creation of bitmap failed.");
+ SysTryReturn(NID_UI_CTRL, pNewBitmap != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The creation of bitmap failed.", GetErrorMessage(E_SYSTEM));
delete __pBackgroundBitmap;
__pBackgroundBitmap = null;
String
_SearchBar::GetGuideText(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, String(), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, String(), E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->GetGuideText();
}
result
_SearchBar::SetGuideText(const String& guideText)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
__pEdit->SetGuideText(guideText);
Color
_SearchBar::GetGuideTextColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->GetGuideTextColor();
}
result
_SearchBar::SetGuideTextColor(const Color& color)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
__isUserGuideTextColor = true;
return __pEdit->SetGuideTextColor(color);
int
_SearchBar::GetCursorPosition(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, -1, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, -1, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->GetCursorPosition();
}
result
_SearchBar::SetCursorPosition(int index)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
SysTryReturn(NID_UI_CTRL, index > -1, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
- "[E_OUT_OF_RANGE] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index);
+ "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index);
int textLength = -1;
textLength = __pEdit->GetTextLength();
SysTryReturn(NID_UI_CTRL, (index > -1 && index <= textLength), E_OUT_OF_RANGE, E_OUT_OF_RANGE,
- "[E_OUT_OF_RANGE] index(%d) is out of range.", index);
+ "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index);
return __pEdit->SetCursorPosition(index);
}
bool
_SearchBar::IsLowerCaseModeEnabled(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->IsLowerCaseModeEnabled();
}
void
_SearchBar::SetLowerCaseModeEnabled(bool enable)
{
- SysTryReturnVoidResult(NID_UI_CTRL, __pEdit, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
__pEdit->SetLowerCaseModeEnabled(enable);
}
EllipsisPosition
_SearchBar::GetEllipsisPosition(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, ELLIPSIS_POSITION_START, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, ELLIPSIS_POSITION_START, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->GetEllipsisPosition();
}
result
_SearchBar::SetEllipsisPosition(EllipsisPosition position)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
__pEdit->SetEllipsisPosition(position);
return E_SUCCESS;
bool
_SearchBar::IsTextPredictionEnabled(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, false, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, false, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->IsTextPredictionEnabled();
}
result
_SearchBar::SetTextPredictionEnabled(bool enable)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return __pEdit->SetTextPredictionEnabled(enable);
}
result
_SearchBar::RemoveActionEventListener(const _IActionEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pActionEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The action event instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pActionEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The action event instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pActionEvent->RemoveListener(listener);
result
_SearchBar::RemoveKeypadEventListener(const _IKeypadEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pKeypadEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The keypad event instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pKeypadEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The keypad event instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pKeypadEvent->RemoveListener(listener);
result
_SearchBar::RemoveTextBlockEventListener(const _ITextBlockEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pTextBlockEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The text block event instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pTextBlockEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The text block event instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pTextBlockEvent->RemoveListener(listener);
result
_SearchBar::RemoveTextEventListener(const _ITextEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pTextEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The text event instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pTextEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The text event instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pTextEvent->RemoveListener(listener);
result
_SearchBar::RemoveSearchBarEventListener(const _ISearchBarEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pSearchBarEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The searchbar event instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pSearchBarEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The searchbar event instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pSearchBarEvent->RemoveListener(listener);
result
_SearchBar::RemoveLanguageEventListener(const _ILanguageEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pLanguageEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed.");
+ SysTryReturn(NID_UI_CTRL, __pLanguageEvent != null, E_SYSTEM, E_SYSTEM, "[%s] This instance isn't constructed.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
__pLanguageEvent->RemoveListener(listener);
{
__pAccessibilitySearchBarElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
}
+
+ if (IsFocused())
+ {
+ RemoveFocusRing(true);
+ if (IsFocusModeStateEnabled())
+ {
+ DrawFocus();
+ }
+ }
+
return;
}
}
_UiTouchEventDelivery
+_SearchBar::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo)
+{
+ if (&source == __pEdit)
+ {
+ __isTouchMoved = true;
+ }
+
+ return _UI_TOUCH_EVENT_DELIVERY_YES;
+}
+
+_UiTouchEventDelivery
_SearchBar::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
{
_Edit* pEdit = dynamic_cast <_Edit*>(const_cast <_Control*>(&source));
if (pEdit->IsClearIconPressed())
{
+ __isTouchMoved = false;
return _UI_TOUCH_EVENT_DELIVERY_YES;
}
SetContentAreaVisible(__contentVisibilitySetByApp); //When a touch happens on SearchField
SetFocusCallbackParameter(true);
- SetMode(SEARCH_BAR_MODE_INPUT);
+ if (!__isTouchMoved)
+ {
+ SetMode(SEARCH_BAR_MODE_INPUT);
+ }
+
+ __isTouchMoved = false;
+ return _UI_TOUCH_EVENT_DELIVERY_YES;
+}
+
+_UiTouchEventDelivery
+_SearchBar::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo)
+{
+ __isTouchMoved = false;
return _UI_TOUCH_EVENT_DELIVERY_YES;
}
{
IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(__actionId);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pActionEvent->Fire(*pEventArg);
}
{
IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CREATED);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pKeypadEvent->Fire(*pEventArg);
}
{
IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_OPEN);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pKeypadEvent->Fire(*pEventArg);
}
{
IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CLOSE);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pKeypadEvent->Fire(*pEventArg);
}
{
IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pKeypadEvent->Fire(*pEventArg);
}
{
IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(keypadAction, CORE_KEYPAD_EVENT_STATUS_ENTERACTION);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pKeypadEvent->Fire(*pEventArg);
}
{
IEventArg* pEventArg = _TextBlockEvent::CreateTextBlockEventArgN(start, end);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pTextBlockEvent->Fire(*pEventArg);
}
{
IEventArg* pEventArg = _TextEvent::CreateTextEventArgN(CORE_TEXT_EVENT_CHANGED);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pTextEvent->Fire(*pEventArg);
}
{
IEventArg* pEventArg = _TextEvent::CreateTextEventArgN(CORE_TEXT_EVENT_CANCELED);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pTextEvent->Fire(*pEventArg);
}
_SearchBar::OnDrawFocus(void)
{
__isFocusUiInitialized = true;
- __pEdit->SetSearchFieldFocus(true);
_Control::OnDrawFocus();
return;
return true;
}
+void
+_SearchBar::OnAncestorEnableStateChanged(const _Control& control)
+{
+ if (__pCancelButton != null)
+ {
+ __pCancelButton->Invalidate();
+ }
+
+ return;
+}
+
bool
_SearchBar::OnPreviewKeyPressed(const _Control &source, const _KeyInfo &keyInfo)
{
if (keyCode == _KEY_TAB && GetMode() == SEARCH_BAR_MODE_INPUT && __isFocusUiInitialized == false)
{
- __pEdit->SetSearchFieldFocus(true);
__isFocusUiInitialized = true;
return false;
}
{
IEventArg* pEventArg = _SearchBarEvent::CreateSearchBarEventArgN(status);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pEventArg, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
if (!IsContentAreaVisible())
{
result
_SearchBar::SetPropertyButtonActionId(const Variant& actionId)
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
SysTryReturn(NID_UI_CTRL, actionId.ToInt() > -1, E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. actionId.ToInt() = %d", actionId.ToInt());
+ "[%s] Invalid argument(s) is used. actionId.ToInt() = %d", GetErrorMessage(E_INVALID_ARG), actionId.ToInt());
result r = E_SUCCESS;
Variant
_SearchBar::GetPropertyButtonActionId(void) const
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(-1), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(-1), E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__actionId);
}
result
_SearchBar::SetPropertyButtonDisabledColor(const Variant& color)
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pCancelButton->SetPropertyDisabledColor(color);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set button color.");
+ "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM));
__buttonColor[SEARCH_BAR_BUTTON_STATUS_DISABLED] = color.ToColor();
Variant
_SearchBar::GetPropertyButtonDisabledColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__buttonColor[SEARCH_BAR_BUTTON_STATUS_DISABLED]);
}
result
_SearchBar::SetPropertyButtonHighlightedColor(const Variant& color)
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pCancelButton->SetPropertyHighlightedColor(color);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set button color.");
+ "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM));
__buttonColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED] = color.ToColor();
Variant
_SearchBar::GetPropertyButtonHighlightedColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__buttonColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED]);
}
result
_SearchBar::SetPropertyButtonNormalColor(const Variant& color)
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pCancelButton->SetPropertyNormalColor(color);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set button color.");
+ "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM));
__buttonColor[SEARCH_BAR_BUTTON_STATUS_NORMAL] = color.ToColor();
Variant
_SearchBar::GetPropertyButtonNormalColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__buttonColor[SEARCH_BAR_BUTTON_STATUS_NORMAL]);
}
result
_SearchBar::SetPropertyButtonPressedColor(const Variant& color)
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pCancelButton->SetPropertyPressedColor(color);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set button color.");
+ "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM));
__buttonColor[SEARCH_BAR_BUTTON_STATUS_PRESSED] = color.ToColor();
Variant
_SearchBar::GetPropertyButtonPressedColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__buttonColor[SEARCH_BAR_BUTTON_STATUS_PRESSED]);
}
result
_SearchBar::SetPropertyButtonDisabledTextColor(const Variant& textColor)
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pCancelButton->SetPropertyDisabledTextColor(textColor);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set button text color.");
+ "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM));
__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_DISABLED] = textColor.ToColor();
Variant
_SearchBar::GetPropertyButtonDisabledTextColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_DISABLED]);
}
result
_SearchBar::SetPropertyButtonHighlightedTextColor(const Variant& textColor)
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM]] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pCancelButton->SetPropertyHighlightedTextColor(textColor);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set button text color.");
+ "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM));
__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED] = textColor.ToColor();
Variant
_SearchBar::GetPropertyButtonHighlightedTextColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED]);
}
result
_SearchBar::SetPropertyButtonNormalTextColor(const Variant& textColor)
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pCancelButton->SetPropertyNormalTextColor(textColor);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set button text color.");
+ "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM));
__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_NORMAL] = textColor.ToColor();
Variant
_SearchBar::GetPropertyButtonNormalTextColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_NORMAL]);
}
result
_SearchBar::SetPropertyButtonPressedTextColor(const Variant& textColor)
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pCancelButton->SetPropertyPressedTextColor(textColor);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set button text color.");
+ "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM));
__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_PRESSED] = textColor.ToColor();
Variant
_SearchBar::GetPropertyButtonPressedTextColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pCancelButton, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__buttonTextColor[SEARCH_BAR_BUTTON_STATUS_PRESSED]);
}
result
_SearchBar::SetPropertySearchFieldDisabledColor(const Variant& color)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pEdit->SetPropertyDisabledColor(color);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set the edit disabled color.");
+ "[%s] A system error has occurred. Failed to set the edit disabled color.", GetErrorMessage(E_SYSTEM));
__color[SEARCH_FIELD_STATUS_DISABLED] = color.ToColor();
Variant
_SearchBar::GetPropertySearchFieldDisabledColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__color[SEARCH_FIELD_STATUS_DISABLED]);
}
result
_SearchBar::SetPropertySearchFieldHighlightedColor(const Variant& color)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pEdit->SetPropertyHighlightedColor(color);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set the edit highlighted color.");
+ "[%s] A system error has occurred. Failed to set the edit highlighted color.", GetErrorMessage(E_SYSTEM));
__color[SEARCH_FIELD_STATUS_HIGHLIGHTED] = color.ToColor();
Variant
_SearchBar::GetPropertySearchFieldHighlightedColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__color[SEARCH_FIELD_STATUS_HIGHLIGHTED]);
}
result
_SearchBar::SetPropertySearchFieldNormalColor(const Variant& color)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pEdit->SetPropertyNormalColor(color);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set edit normal color.");
+ "[%s] A system error has occurred. Failed to set edit normal color.", GetErrorMessage(E_SYSTEM));
__color[SEARCH_FIELD_STATUS_NORMAL] = color.ToColor();
Variant
_SearchBar::GetPropertySearchFieldNormalColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__color[SEARCH_FIELD_STATUS_NORMAL]);
}
result
_SearchBar::SetPropertySearchFieldDisabledTextColor(const Variant& textColor)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pEdit->SetPropertyDisabledTextColor(textColor);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set edit disabled text color.");
+ "[%s] A system error has occurred. Failed to set edit disabled text color.", GetErrorMessage(E_SYSTEM));
__textColor[SEARCH_FIELD_STATUS_DISABLED] = textColor.ToColor();
Variant
_SearchBar::GetPropertySearchFieldDisabledTextColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__textColor[SEARCH_FIELD_STATUS_DISABLED]);
}
result
_SearchBar::SetPropertySearchFieldHighlightedTextColor(const Variant& textColor)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pEdit->SetPropertyHighlightedTextColor(textColor);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set edit highlighted text color.");
+ "[%s] A system error has occurred. Failed to set edit highlighted text color.", GetErrorMessage(E_SYSTEM));
__textColor[SEARCH_FIELD_STATUS_HIGHLIGHTED] = textColor.ToColor();
Variant
_SearchBar::GetPropertySearchFieldHighlightedTextColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__textColor[SEARCH_FIELD_STATUS_HIGHLIGHTED]);
}
result
_SearchBar::SetPropertySearchFieldNormalTextColor(const Variant& textColor)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
r = __pEdit->SetPropertyNormalTextColor(textColor);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to set edit normal text color.");
+ "[%s] A system error has occurred. Failed to set edit normal text color.", GetErrorMessage(E_SYSTEM));
__textColor[SEARCH_FIELD_STATUS_NORMAL] = textColor.ToColor();
Variant
_SearchBar::GetPropertySearchFieldNormalTextColor(void) const
{
- SysTryReturn(NID_UI_CTRL, __pEdit, Variant(Color()), E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, Variant(Color()), E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
return Variant(__textColor[SEARCH_FIELD_STATUS_NORMAL]);
}
{
FloatDimension contentAreaSize = size.ToFloatDimension();
SysTryReturn(NID_UI_CTRL, contentAreaSize.width >= 0 && contentAreaSize.height >= 0, E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. contentAreaSize.width = %f, contenAreaSize.height = %f",
- contentAreaSize.width, contentAreaSize.height);
+ "[%s] Invalid argument(s) is used. contentAreaSize.width = %f, contenAreaSize.height = %f",
+ GetErrorMessage(E_INVALID_ARG), contentAreaSize.width, contentAreaSize.height);
result r = E_SUCCESS;
void
_SearchBar::SetContentDimming(void)
{
- if (__pContainer != NULL)
+ if (__pContainer != null)
{
if (!GetTextLength())
{
void
_SearchBar::SetEditTextFilter(IEditTextFilter* pFilter)
{
- SysTryReturnVoidResult(NID_UI_CTRL, __pEdit, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
__pEdit->SetEditTextFilter(pFilter);
void
_SearchBar::SendOpaqueCommand(const String& command)
{
- SysTryReturnVoidResult(NID_UI_CTRL, __pEdit, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM,
+ "[E_SYSTEM] A system error has occurred. The _Edit instance is null.");
__pEdit->SendOpaqueCommand(command);
_SearchBarEvent::CreateInstanceN(const _SearchBar& source)
{
_SearchBarEvent* pSearchBarEvent = new (std::nothrow) _SearchBarEvent(source);
- SysTryReturn(NID_UI_CTRL, pSearchBarEvent, null, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pSearchBarEvent != null, null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
if (IsFailed(GetLastResult()))
{
// cast to _IActionEventListener
_ISearchBarEventListener* pSearchBarListener = dynamic_cast <_ISearchBarEventListener*>(&listener);
SysTryReturnVoidResult(NID_UI_CTRL, pSearchBarListener != null, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. The searchbar listener instance is null.");
+ "[%s] Invalid argument(s) is used. The searchbar listener instance is null.", GetErrorMessage(E_INVALID_ARG));
// cast to _SearchBarEventArg
const _SearchBarEventArg* pArg = dynamic_cast <const _SearchBarEventArg*>(&arg);
SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. The argument to searchbar event listener is null.");
+ "[%s] Invalid argument(s) is used. The argument to searchbar event listener is null.", GetErrorMessage(E_INVALID_ARG));
_SearchBar* pSource = null;
pSource = const_cast <_SearchBar*>(__pSource);
SysTryReturnVoidResult(NID_UI_CTRL, pSource != null, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used.The searchbar instance is null.");
+ "[%s] Invalid argument(s) is used.The searchbar instance is null.", GetErrorMessage(E_INVALID_ARG));
// call cursor change event listener method
_SearchBarEventStatus status = pArg->GetStatus();
_SearchBarEvent::CreateSearchBarEventArgN(_SearchBarEventStatus status)
{
_SearchBarEventArg* pEventArg = new (std::nothrow) _SearchBarEventArg(status);
- SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pEventArg;
}
* @brief This is the implementation file for _SearchBarImpl class.
*/
-#include <FApp_AppInfo.h>
#include <FBaseSysLog.h>
-#include <FBase_LocalizedNumParser.h>
#include <FLclLocale.h>
#include <FUiAccessibilityContainer.h>
#include <FUiAccessibilityElement.h>
+#include <FBase_LocalizedNumParser.h>
+#include <FApp_AppInfo.h>
#include "FUi_ResourceSizeInfo.h"
#include "FUi_ResourceManager.h"
#include "FUi_UiBuilder.h"
+#include "FUi_CoordinateSystemUtils.h"
#include "FUiCtrl_PublicActionEvent.h"
#include "FUiCtrl_PublicTextBlockEvent.h"
#include "FUiCtrl_PublicTextEvent.h"
#include "FUiCtrl_SearchBarImpl.h"
-#include "FUi_CoordinateSystemUtils.h"
#include "FUiCtrl_EditFieldImpl.h"
#include "FUiCtrl_ButtonImpl.h"
r = GET_SIZE_INFO(SearchBar).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. The given size is not valid.");
+ "[%s] Invalid argument(s) is used. The given size is not valid.", GetErrorMessage(E_INVALID_ARG));
_SearchBar* pCore = _SearchBar::CreateSearchBarN();
r = GetLastResult();
return pImpl;
CATCH:
delete pImpl;
+ SetLastResult(r);
return null;
}
r = GET_SIZE_INFO(SearchBar).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. The given size is not valid.");
+ "[%s] Invalid argument(s) is used. The given size is not valid.", GetErrorMessage(E_INVALID_ARG));
_SearchBar* pCore = _SearchBar::CreateSearchBarN();
r = GetLastResult();
return pImpl;
CATCH:
delete pImpl;
+ SetLastResult(r);
return null;
}
}
__pEditField = new (std::nothrow) EditField();
- SysTryReturnResult(NID_UI_CTRL, __pEditField, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory.");
+ SysTryReturnResult(NID_UI_CTRL, __pEditField != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pEditField->Construct(GetBoundsF(), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY, EDIT_FIELD_TITLE_STYLE_NONE, true);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__pEditField->AddFocusEventListener(*this);
- SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "Propagating.");
__pEditField->AddKeyEventListener(*this);
- SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "Propagating.");
__pEditFieldImpl = _EditFieldImpl::GetInstance(*__pEditField);
SysTryReturnResult(NID_UI_CTRL, __pEditFieldImpl != null, E_SYSTEM,
- "[E_SYSTEM] A system error has occured. Failed to EditFieldImpl instance");
+ "A system error has occurred. Failed to get _EditFieldImpl instance.");
String cancelButtonText;
GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, cancelButtonText);
__pButton = new (std::nothrow) Button();
- SysTryReturnResult(NID_UI_CTRL, __pButton, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory.");
+ SysTryReturnResult(NID_UI_CTRL, __pButton != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pButton->Construct(GetBoundsF(), cancelButtonText);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__pButton->AddFocusEventListener(*this);
- SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "Propagating.");
__pButtonImpl = _ButtonImpl::GetInstance(*__pButton);
SysTryReturnResult(NID_UI_CTRL, __pButtonImpl != null, E_SYSTEM,
- "[E_SYSTEM] A system error has occured. Failed to ButtonImpl instance");
+ "A system error has occurred. Failed to get _ButtonImpl instance.");
r = __pSearchBar->Initialize(enableSearchBarButton, coreKeypadAction);
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic());
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = __pSearchBar->AddActionEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicKeypadEvent = _PublicKeypadEvent::CreateInstanceN(GetPublic());
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = __pSearchBar->AddKeypadEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicTextBlockEvent = _PublicTextBlockEvent::CreateInstanceN(GetPublic());
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = __pSearchBar->AddTextBlockEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicTextEvent = _PublicTextEvent::CreateInstanceN(GetPublic());
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, __pPublicTextEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = __pSearchBar->AddTextEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicSearchBarEvent = _PublicSearchBarEvent::CreateInstanceN(GetPublic());
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = __pSearchBar->AddSearchBarEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicLanguageEvent = _PublicLanguageEvent::CreateInstanceN(GetPublic());
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = __pSearchBar->AddLanguageEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
ClearLastResult();
result r = E_SUCCESS;
+ if (Tizen::App::_AppInfo::GetApiVersion() == _API_VERSION_2_0 && Tizen::App::_AppInfo::IsOspCompat())
+ {
+ if (__pContentControl)
+ {
+ _Control& control = _ControlImpl::GetInstance(*__pContentControl)->GetCore();
+ __pSearchBar->DetachContent(&control);
+ __pContentControl->Destroy();
+ }
+ }
+ else
+ {
+ __pSearchBar->DetachContent(null);
+ }
+ __pContentControl = null;
+
if (pContent != null)
{
const _Control& content = _ControlImpl::GetInstance(*pContent)->GetCore();
bool isContentAttachable = __pSearchBar->IsContentAttachable(&content);
SysTryReturn(NID_UI_CTRL, isContentAttachable, E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. The content cannot be set.");
- }
+ "[%s] Invalid argument(s) is used. The content cannot be set.", GetErrorMessage(E_INVALID_ARG));
- if (pContent != null && __pContentControl == null)
- {
__pContentControl = const_cast <Control*>(pContent);
_Control& control = _ControlImpl::GetInstance(*__pContentControl)->GetCore();
r = __pSearchBar->Clear();
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM,
- "[E_SYSTEM] A system error has occured. Failed to clear the text.");
+ "A system error has occurred. Failed to clear the text.");
return r;
}
ClearLastResult();
result r = __pSearchBar->RemoveTextBlock();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occured. Unable to remove the text block.");
+ "[%s] A system error has occurred. Unable to remove the text block.", GetErrorMessage(E_SYSTEM));
return r;
}
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
result r = __pPublicActionEvent->AddListener(listener);
SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM,
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_SYSTEM, E_SYSTEM,
+ SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, E_SYSTEM, E_SYSTEM,
"[E_SYSTEM] A system error has occurred.");
result r = __pPublicActionEvent->RemoveListener(listener);
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
result r = __pPublicKeypadEvent->AddListener(listener);
SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM,
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
result r = __pPublicKeypadEvent->RemoveListener(listener);
SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM,
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
result r = __pPublicTextBlockEvent->AddListener(listener);
SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM,
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
result r = __pPublicTextBlockEvent->RemoveListener(listener);
SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM,
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicTextEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
result r = __pPublicTextEvent->AddListener(listener);
SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM,
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicTextEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
result r = __pPublicTextEvent->RemoveListener(listener);
SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM,
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
result r = __pPublicSearchBarEvent->AddListener(listener);
SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM,
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred.");
+ SysTryReturn(NID_UI_CTRL, __pPublicSearchBarEvent != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM));
result r = __pPublicSearchBarEvent->RemoveListener(listener);
SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM,
{
IEventArg* pEventArg = _PublicActionEvent::CreateActionEventArgN(actionId);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicActionEvent->Fire(*pEventArg);
}
IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_CREATED);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicKeypadEvent->Fire(*pEventArg);
}
IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_OPEN);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicKeypadEvent->Fire(*pEventArg);
}
IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_CLOSE);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicKeypadEvent->Fire(*pEventArg);
}
IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicKeypadEvent->Fire(*pEventArg);
}
IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
GetPublic(), publicKeypadAction, KEYPAD_EVENT_STATUS_ENTERACTION);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicKeypadEvent->Fire(*pEventArg);
}
{
IEventArg* pEventArg = _PublicTextBlockEvent::CreateTextBlockEventArgN(start, end);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicTextBlockEvent->Fire(*pEventArg);
}
{
IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CHANGED);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicTextEvent->Fire(*pEventArg);
}
{
IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CANCELED);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicTextEvent->Fire(*pEventArg);
}
{
IEventArg* pEventArg = _PublicSearchBarEvent::CreateSearchBarEventArgN(SEARCH_BAR_EVENT_MODE_CHANGE);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicSearchBarEvent->Fire(*pEventArg);
}
{
IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage);
result r = GetLastResult();
- SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
__pPublicLanguageEvent->Fire(*pKLanguageEventArg);
}
ClearLastResult();
SysTryReturnVoidResult(NID_UI,
__pPublicFocusEventListeners->Add(const_cast <IFocusEventListener*>(&listener)) == E_SUCCESS, E_SYSTEM,
- "[E_SYSTEM] A system error has occured. Failed to add listener.");
+ "[E_SYSTEM] A system error has occurred. Failed to add listener.");
}
void
ClearLastResult();
SysTryReturnVoidResult(NID_UI,
__pPublicFocusEventListeners->Remove(&listener) == E_SUCCESS, E_SYSTEM,
- "[E_SYSTEM] A system error has occured. Failed to remove listener.");
+ "[E_SYSTEM] A system error has occurred. Failed to remove listener.");
}
void
IFocusEventListener* pFocusEventListener = dynamic_cast <IFocusEventListener*>(pListener);
- if (pFocusEventListener != null )
+ if (pFocusEventListener != null)
{
pFocusEventListener->OnFocusGained(GetPublic());
}
IFocusEventListener* pFocusEventListener = dynamic_cast <IFocusEventListener*>(pListener);
- if (pFocusEventListener != null )
+ if (pFocusEventListener != null)
{
pFocusEventListener->OnFocusLost(GetPublic());
}
IKeyEventListener* pKeyEventListener = dynamic_cast <IKeyEventListener*>(pListener);
- if (pKeyEventListener != null )
+ if (pKeyEventListener != null)
{
pKeyEventListener->OnKeyPressed(GetPublic(), keyCode);
}
IKeyEventListener* pKeyEventListener = dynamic_cast <IKeyEventListener*>(pListener);
- if (pKeyEventListener != null )
+ if (pKeyEventListener != null)
{
pKeyEventListener->OnKeyReleased(GetPublic(), keyCode);
}
IKeyEventListener* pKeyEventListener = dynamic_cast <IKeyEventListener*>(pListener);
- if (pKeyEventListener != null )
+ if (pKeyEventListener != null)
{
pKeyEventListener->OnKeyLongPressed(GetPublic(), keyCode);
}
return null;
}
- pSearchBar = new (std::nothrow) SearchBar;
+ pSearchBar = new (std::nothrow) SearchBar();
if (pSearchBar == null)
{
return null;
#include <FBaseErrorDefine.h>
#include <FGrp_BitmapImpl.h>
#include "FUi_ResourceManager.h"
+#include "FUi_CoordinateSystemUtils.h"
#include "FUiAnim_VisualElement.h"
#include "FUiCtrl_Edit.h"
#include "FUiCtrl_Form.h"
#include "FUiCtrl_SearchBarModel.h"
#include "FUiCtrl_SearchBarPresenter.h"
#include "FUiCtrl_Toolbar.h"
-#include "FUi_CoordinateSystemUtils.h"
using namespace Tizen::Graphics;
using namespace Tizen::Ui::Animations;
, __pReplacedSearchFieldNormalBitmap(null)
, __pReplacedSearchFieldDisabledBitmap(null)
, __pReplacedSearchBarBitmap(null)
- , __pSearchBarBitmap(null)
, __pSearchFieldEffectBitmap(null)
, __pSearchBarEffectBitmap(null)
, __currentBgColor(Color())
delete __pReplacedSearchBarBitmap;
__pReplacedSearchBarBitmap = null;
- delete __pSearchBarBitmap;
- __pSearchBarBitmap = null;
-
delete __pSearchFieldEffectBitmap;
__pSearchFieldEffectBitmap = null;
_VisualElement* pSearchBarElement = null;
__pSearchBar = const_cast <_SearchBar*>(&searchBar);
- SysTryReturn(NID_UI_CTRL, __pSearchBar, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The searchbar instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pSearchBar != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Searchbar instance is null.", GetErrorMessage(E_SYSTEM));
__pCancelButton = __pSearchBar->GetSearchBarButton();
- SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Button instance is null.", GetErrorMessage(E_SYSTEM));
__pEdit = __pSearchBar->GetSearchField();
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The edit instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM));
__pContainer = __pSearchBar->GetSearchBarContainer();
- SysTryReturn(NID_UI_CTRL, __pContainer, E_SYSTEM, E_SYSTEM,
- " [E_SYSTEM] A system error has occurred. Failed to get the content.");
+ SysTryReturn(NID_UI_CTRL, __pContainer != null, E_SYSTEM, E_SYSTEM,
+ " [%s] A system error has occurred. Failed to get the content.", GetErrorMessage(E_SYSTEM));
r = LoadSearchBarBitmaps();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
_VisualElement* pEditElement = __pEdit->GetVisualElement();
SysTryReturn(NID_UI_CTRL, pEditElement, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to get edit visual element.");
+ "[%s] A system error has occurred. Failed to get edit visual element.", GetErrorMessage(E_SYSTEM));
__pIconElement = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, __pIconElement, , E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pIconElement != null, , E_OUT_OF_MEMORY,
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pIconElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pSearchBarElement = __pSearchBar->GetVisualElement();
SysTryCatch(NID_UI_CTRL, pSearchBarElement, , E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to get searchbar's visual element.");
+ "[%s] A system error has occurred. Failed to get searchbar's visual element.", GetErrorMessage(E_SYSTEM));
return r;
{
result r = E_SUCCESS;
Color searchFieldIconColor;
- Bitmap* pSearchFieldBitmap;
-
- r = GET_BITMAP_CONFIG_N(SEARCHBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSearchBarBitmap);
- SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(SEARCHBAR::BG_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pSearchBarEffectBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r,"Propagating.");
__currentBgColor = __pSearchBar->GetColor();
- __pReplacedSearchBarBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pSearchBarBitmap, Color::GetColor(COLOR_ID_MAGENTA), __currentBgColor);
- SysTryCatch(NID_UI_CTRL, __pReplacedSearchBarBitmap != null, r = GetLastResult(), GetLastResult(),"[%s] Propagating.",
- GetErrorMessage(GetLastResult()));
-
- r = GET_BITMAP_CONFIG_N(SEARCHBAR::ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSearchFieldBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBgColor, __pReplacedSearchBarBitmap);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(SEARCHBAR::ICON_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSearchFieldEffectBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r));
GET_COLOR_CONFIG(SEARCHBAR::ICON_BG_NORMAL, searchFieldIconColor);
- __pReplacedSearchFieldNormalBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSearchFieldBitmap, Color::GetColor(COLOR_ID_MAGENTA), searchFieldIconColor);
- SysTryCatch(NID_UI_CTRL, __pReplacedSearchFieldNormalBitmap != null, r = GetLastResult(), GetLastResult(),"[%s] Propagating.",
- GetErrorMessage(GetLastResult()));
-
- delete pSearchFieldBitmap;
- pSearchFieldBitmap = null;
-
- r = GET_BITMAP_CONFIG_N(SEARCHBAR::ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pSearchFieldBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, searchFieldIconColor, __pReplacedSearchFieldNormalBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r));
GET_COLOR_CONFIG(SEARCHBAR::ICON_BG_DISABLED, searchFieldIconColor);
- __pReplacedSearchFieldDisabledBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSearchFieldBitmap, Color::GetColor(COLOR_ID_MAGENTA), searchFieldIconColor);
- SysTryCatch(NID_UI_CTRL, __pReplacedSearchFieldDisabledBitmap != null, r = GetLastResult(), GetLastResult(),"[%s] Propagating.",
- GetErrorMessage(GetLastResult()));
-
- delete pSearchFieldBitmap;
- pSearchFieldBitmap = null;
+ r = GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::ICON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, searchFieldIconColor, __pReplacedSearchFieldDisabledBitmap);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r,"[%s] Propagating.", GetErrorMessage(r));
return r;
CATCH:
- delete __pSearchBarBitmap;
- __pSearchBarBitmap = null;
-
delete __pSearchBarEffectBitmap;
__pSearchBarEffectBitmap = null;
delete __pReplacedSearchBarBitmap;
__pReplacedSearchBarBitmap = null;
- delete pSearchFieldBitmap;
- pSearchFieldBitmap = null;
-
delete __pSearchFieldEffectBitmap;
__pSearchFieldEffectBitmap = null;
{
result r = E_SUCCESS;
- _SearchBarModel* pModel = new (std::nothrow) _SearchBarModel;
- SysTryReturn(NID_UI_CTRL, pModel, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ _SearchBarModel* pModel = new (std::nothrow) _SearchBarModel();
+ SysTryReturn(NID_UI_CTRL, pModel != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pModel->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The searchbar model construction failed.");
+ "[%s] A system error has occurred. The searchbar model construction failed.", GetErrorMessage(E_SYSTEM));
__pSearchBarModel = pModel;
{
SearchBarMode mode = __pSearchBarModel->GetMode();
SysTryReturn(NID_UI_CTRL, mode == SEARCH_BAR_MODE_INPUT, E_INVALID_OPERATION, E_INVALID_OPERATION,
- "[E_INVALID_OPERATION] The searchbar mode cannot be updated.");
+ "[%s] The searchbar mode cannot be updated.", GetErrorMessage(E_INVALID_OPERATION));
__pSearchBar->Invalidate(invalidate);
_SearchBarPresenter::SetMode(SearchBarMode mode, bool isCalledByApp)
{
SysTryReturn(NID_UI_CTRL, IsModeLocked() == false, E_INVALID_OPERATION, E_INVALID_OPERATION,
- "[E_INVALID_OPERATION] The searchbar mode is locked.");
+ "[%s] The searchbar mode is locked.", GetErrorMessage(E_INVALID_OPERATION));
if (GetMode() == mode)
{
result r = ChangeMode(mode, isCalledByApp);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to change the mode of searchbar.");
+ "[%s] A system error has occurred. Failed to change the mode of searchbar.", GetErrorMessage(E_SYSTEM));
return r;
}
imagePath = _BitmapImpl::GetInstance(*pBackgroundBitmap)->GetFileName();
}
- if(!imagePath.IsEmpty())
+ if (!imagePath.IsEmpty())
{
__pSearchBar->GetVisualElement()->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255));
__pSearchBar->GetVisualElement()->SetImageSource(imagePath);
__lazyDecode = false;
Canvas* pCanvas = __pSearchBar->GetCanvasN();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (pCanvas != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
pCanvas->SetBackgroundColor(bgColor);
pCanvas->Clear();
delete __pReplacedSearchBarBitmap;
__pReplacedSearchBarBitmap = null;
- __pReplacedSearchBarBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pSearchBarBitmap, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (__pReplacedSearchBarBitmap != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(SEARCHBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, __pReplacedSearchBarBitmap);
+ SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
__currentBgColor = bgColor;
}
result
_SearchBarPresenter::DrawIcon(void)
{
- SysTryReturn(NID_UI_CTRL, __pEdit, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to get edit instance.");
- SysTryReturn(NID_UI_CTRL, __pIconElement, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to get edit visual element.");
+ SysTryReturn(NID_UI_CTRL, __pEdit != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. Failed to get _Edit instance.", GetErrorMessage(E_SYSTEM));
+ SysTryReturn(NID_UI_CTRL, __pIconElement != null, E_SYSTEM, E_SYSTEM,
+ "[%s] A system error has occurred. Failed to get edit visual element.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
}
else
{
- pIconCanvas->DrawBitmap(FloatRectangle(0, 0, iconBounds.width, iconBounds.height), *__pReplacedSearchFieldNormalBitmap);
+ pIconCanvas->DrawBitmap(FloatPoint((iconBounds.width - __pReplacedSearchFieldNormalBitmap->GetWidthF())/2.0f, (iconBounds.height - __pReplacedSearchFieldNormalBitmap->GetHeightF())/2.0f), *__pReplacedSearchFieldNormalBitmap);
}
}
}
}
else
{
- pIconCanvas->DrawBitmap(FloatRectangle(0, 0, iconBounds.width, iconBounds.height), *__pReplacedSearchFieldDisabledBitmap);
+ pIconCanvas->DrawBitmap(FloatPoint((iconBounds.width - __pReplacedSearchFieldDisabledBitmap->GetWidthF())/2.0f, (iconBounds.height - __pReplacedSearchFieldDisabledBitmap->GetHeightF())/2.0f), *__pReplacedSearchFieldDisabledBitmap);
}
}
}
}
else
{
- pIconCanvas->DrawBitmap(FloatRectangle(0, 0, iconBounds.width, iconBounds.height), *__pSearchFieldEffectBitmap);
+ pIconCanvas->DrawBitmap(FloatPoint(0.0f, 0.0f), *__pSearchFieldEffectBitmap);
}
}
{
__pSearchBar->SetFocusCallbackParameter(true);
InitializeViewModeLayout();
- SetCancelButtonVisible(false);
- SetContainerVisible(false);
if (__pEdit != null)
{
}
}
+ SetCancelButtonVisible(false);
+ SetContainerVisible(false);
+
r = __pSearchBar->SendSearchBarEvent(_SEARCH_BAR_EVENT_MODE_CHANGE);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to fire the searchbar event.");
+ "[%s] A system error has occurred. Failed to fire the searchbar event.", GetErrorMessage(E_SYSTEM));
}
else
{
r = __pSearchBar->SendSearchBarEvent(_SEARCH_BAR_EVENT_MODE_CHANGE);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. Failed to fire the searchbar event.");
+ "[%s] A system error has occurred. Failed to fire the searchbar event.", GetErrorMessage(E_SYSTEM));
InitializeInputModeLayout();
SetCancelButtonVisible(true);
{
__pEdit->ShowKeypad();
}
+
+ return;
}
Canvas*
if (__lazyDecode)
{
Bitmap* pBackgroundBitmap = __pSearchBar->GetBackgroundBitmap();
- SysTryReturn(NID_UI_CTRL, pBackgroundBitmap != null, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the background bitmap.");
+ SysTryReturn(NID_UI_CTRL, pBackgroundBitmap != null, null, E_SYSTEM, "[%s] A system error has occurred. Failed to get the background bitmap.", GetErrorMessage(E_SYSTEM));
//Decode the bitmap explicitly
pBackgroundBitmap->IsNinePatchedBitmap();
result r = E_SUCCESS;
_SimpleItemImpl* pImpl = new (std::nothrow) _SimpleItemImpl(pPublic);
- SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pImpl->Construct(itemSize, style);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[E_SYSTEM] Unable to construct _SimpleItemImpl.");
pGroupObject->__pCheckedList->SetAt(*pChecked, indexItem, true);
- _CheckElementModel *pCheckElement = GetCheckElementAt(groupIndex, indexItem);
+ _CheckElementModel* pCheckElement = GetCheckElementAt(groupIndex, indexItem);
if (pCheckElement)
{
{
if (__pItemProvider && __pItemProvider->firstTime == true)
{
- _itemsList.RemoveAll(true);
+ _itemsList.RemoveAll(false);
}
else
{
- _itemsList.RemoveAll(false);
+ _itemsList.RemoveAll(true);
}
__slidableListenersList.RemoveAll(true);
void
_SlidableListImpl::AddSlidableListEventListener(const ISlidableListEventListener& listener)
{
- _ListListener* pListenerData = new (std::nothrow) _ListListener;
+ _ListListener* pListenerData = new (std::nothrow) _ListListener();
SysTryReturnVoidResult(NID_UI_CTRL, pListenerData, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pListenerData->pListener = const_cast<ISlidableListEventListener*>(&listener);
void
_SlidableListImpl::AddCustomItemEventListener(const ICustomItemEventListener& listener)
{
- _ListListener* pListenersList = new (std::nothrow) _ListListener;
+ _ListListener* pListenersList = new (std::nothrow) _ListListener();
SysTryReturnVoidResult(NID_UI_CTRL, pListenersList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pListenersList->pListener = const_cast<Tizen::Ui::ICustomItemEventListener*>(&listener);
if (__pCheckedList)
{
- Boolean *pChecked = new (std::nothrow) Boolean(false);
+ Boolean* pChecked = new (std::nothrow) Boolean(false);
SysTryReturn(NID_UI_CTRL, pChecked, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pCheckedList->InsertAt(*pChecked, index);
r = __pCheckedList->SetCapacity(count);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ for (int itemIndex = prevCount - 1; itemIndex >= count; itemIndex--)
+ {
+ __pCheckedList->RemoveAt(itemIndex, true);
+ }
+
for (int itemIndex = prevCount; itemIndex < count; itemIndex++)
{
pChecked = new (std::nothrow) Boolean(false);
{
result r = E_SUCCESS;
- _Slider* pSlider = new (std::nothrow) _Slider;
- SysTryReturn(NID_UI_CTRL, pSlider, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ _Slider* pSlider = new (std::nothrow) _Slider();
+ SysTryReturn(NID_UI_CTRL, pSlider, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pSlider->__pSliderPresenter = _SliderPresenter::CreateInstanceN(*pSlider);
r = GetLastResult();
CATCH:
delete pSlider;
pSlider = null;
-
+ SetLastResult(r);
return null;
}
_ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
r = GET_COLOR_CONFIG(SLIDER::BG_DEFAULT_NORMAL, __bgColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::BAR_NORMAL, __barColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::BAR_BG_NORMAL, __barBgColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::TITLE_TEXT_NORMAL, __titleTextColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_SHAPE_CONFIG(SLIDER::HANDLE_WIDTH, orientation, handleRect.width);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_SHAPE_CONFIG(SLIDER::HANDLE_HEIGHT, orientation, handleRect.height);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
- __pHandle = new (std::nothrow) Tizen::Ui::Animations::_VisualElement;
- SysTryReturn(NID_UI_CTRL, __pHandle != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ __pHandle = new (std::nothrow) _VisualElement();
+ SysTryReturnResult(NID_UI_CTRL, __pHandle != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pHandle->Construct();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__pHandle->SetBounds(FloatRectangle(handleRect.x, handleRect.y, handleRect.width, handleRect.height));
r = __pHandle->SetSurfaceOpaque(false);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__pHandle->SetImplicitAnimationEnabled(false);
r = __pBase->AttachChild(*__pHandle);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__pAdjustmentEvent = _AdjustmentEvent::CreateInstanceN(*this);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, __pAdjustmentEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, __pAdjustmentEvent, r, "Propagating.");
__pSliderEvent = _SliderEvent::CreateInstanceN(*this);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, __pSliderEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, __pSliderEvent, r, "Propagating.");
InitializeAccessibilityElement();
if (pContainer != null)
{
__pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY,
+ "Memory allocation failed.");
__pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height));
__pAccessibilityElement->SetLabel(__titleText);
__pAccessibilityElement->SetName(L"SliderControl");
__pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_FLICK_UP_AND_DOWN_TO_ADJUST_THE_POSITION_T_TTS");
SetAccessibilityElementValue();
r = pContainer->AddElement(*__pAccessibilityElement);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
pContainer->AddListener(*this);
}
bool
_Slider::OnFocusGained(const _Control& source)
{
- __pSliderPresenter->SetFocusMode(true);
- Invalidate();
+ if (IsFocusModeStateEnabled())
+ {
+ __pSliderPresenter->SetFocusMode(true);
+ Invalidate();
+ }
return true;
}
{
__pSliderPresenter->SetFocusMode(false);
- if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && __isKeyPressed )
+ if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && __isKeyPressed)
{
_SliderOverlay* pSliderOverlay = __pSliderPresenter->GetSliderOverlay();
pSliderOverlay->SetVisibleState(false);
bool
_Slider::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
- if(__pSliderPresenter->GetFocusMode() == false)
+ if (__pSliderPresenter->GetFocusMode() == false)
{
return false;
}
if (keyCode == _KEY_RIGHT)
{
- SetValue(GetValue() + 1);
+ if (__pSliderPresenter->GetMaxValue() == GetValue())
+ {
+ return false;
+ }
+
+ __pSliderPresenter->SetValue(GetValue() + 1);
+ SetAccessibilityElementValue();
+
FireSliderMoveEvent(GetValue());
if (GetStyle() & _SLIDER_STYLE_OVERLAY)
if (keyCode == _KEY_LEFT)
{
- SetValue(GetValue() - 1);
+ if (__pSliderPresenter->GetMinValue() == GetValue())
+ {
+ return false;
+ }
+
+ __pSliderPresenter->SetValue(GetValue() - 1);
+ SetAccessibilityElementValue();
+
FireSliderMoveEvent(GetValue());
if (GetStyle() & _SLIDER_STYLE_OVERLAY)
bool
_Slider::OnKeyReleased(const _Control &source, const _KeyInfo &keyInfo)
{
- if(__pSliderPresenter->GetFocusMode() == false)
+ if (__pSliderPresenter->GetFocusMode() == false)
{
return false;
}
_Slider::OnBoundsChanged(void)
{
__pSliderPresenter->OnBoundsChanged();
-
if (__pAccessibilityElement != null)
{
__pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height));
{
result r = E_SUCCESS;
- SysTryReturn(NID_UI_CTRL, (minValue >= _SLIDER_MINIMUM_VALUE && maxValue >= _SLIDER_MINIMUM_VALUE),
- E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The minimum value %d is out of range [-99 to 999].", minValue);
- SysTryReturn(NID_UI_CTRL, (minValue <= _SLIDER_MAXIMUM_VALUE && maxValue <= _SLIDER_MAXIMUM_VALUE),
- E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The maximum value %d is out of range [-99 to 999].", maxValue);
- SysTryReturn(NID_UI_CTRL, (minValue < maxValue), E_INVALID_ARG, E_INVALID_ARG,
- "[E_INVALID_ARG] The minimum value is greater than maximum value.");
+ SysTryReturnResult(NID_UI_CTRL, (minValue >= _SLIDER_MINIMUM_VALUE && maxValue >= _SLIDER_MINIMUM_VALUE),
+ E_OUT_OF_RANGE, "[The minimum value %d is out of range [-99 to 999].", minValue);
+ SysTryReturnResult(NID_UI_CTRL, (minValue <= _SLIDER_MAXIMUM_VALUE && maxValue <= _SLIDER_MAXIMUM_VALUE),
+ E_OUT_OF_RANGE, "The maximum value %d is out of range [-99 to 999].", maxValue);
+ SysTryReturnResult(NID_UI_CTRL, (minValue < maxValue), E_INVALID_ARG,
+ "The minimum value is greater than maximum value.");
Variant oldMinValue = GetProperty("minValue");
Variant value = GetProperty("value");
r = SetProperty("minValue", Variant(minValue));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set minimum value.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, " Failed to set minimum value.");
r = SetProperty("maxValue", Variant(maxValue));
if (r != E_SUCCESS)
int tempMinValue = minValue.ToInt();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__pSliderPresenter->SetMinValue(tempMinValue);
int tempMaxValue = maxValue.ToInt();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, " Propagating.");
__pSliderPresenter->SetMaxValue(tempMaxValue);
Variant minimum = GetProperty("minValue");
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
Variant maximum = GetProperty("maxValue");
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
minValue = minimum.ToInt();
maxValue = maximum.ToInt();
{
result r = E_SUCCESS;
+ SysTryReturnResult(NID_UI_CTRL, __isKeyPressed == false, E_SYSTEM, "[E_SYSTEM] Failed to set value of slider.");
+
int tempValue = value.ToInt();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
- __pSliderPresenter->SetValue(tempValue);
+ if (__pSliderPresenter->GetValue() != tempValue)
+ {
+ __pSliderPresenter->SetValue(tempValue);
- SetAccessibilityElementValue();
+ SetAccessibilityElementValue();
+ }
return r;
}
String string;
GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string);
char buffer[10] = {0,};
- sprintf(buffer, "%d", GetValue());
+ snprintf(buffer, sizeof(buffer), "%d", GetValue());
string.Replace(L"%1$d", buffer);
memset(buffer, 0, 10);
- sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue());
+ snprintf(buffer, sizeof(buffer), "%d", __pSliderPresenter->GetMaxValue());
string.Replace(L"%2$d", buffer);
__pAccessibilityElement->SetValue(string);
}
Bitmap* pNewBitmap = null;
r = GET_SHAPE_CONFIG(SLIDER::ICON_WIDTH, orientation, iconWidth);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r,"Propagating.");
r = GET_SHAPE_CONFIG(SLIDER::ICON_HEIGHT, orientation, iconHeight);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
if (position == ICON_POSITION_LEFT)
{
pNewBitmap = _BitmapImpl::CloneN(icon);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pNewBitmap != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pNewBitmap != null, r, "Propagating.");
r = pNewBitmap->Scale(Dimension(iconWidth, iconHeight));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pNewBitmap = _BitmapImpl::CloneN(icon);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pNewBitmap != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pNewBitmap != null, r, "Propagating.");
r = pNewBitmap->Scale(Dimension(iconWidth, iconHeight));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
__pSliderPresenter->SetNeedUpdate();
r = InitializeAccessibilityElement();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
if (__pAccessibilityElement != null)
{
Color tempColor = titleTextColor.ToColor();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__titleTextColor = tempColor;
__pSliderPresenter->SetNeedUpdate();
Color tempBarColor = barColor.ToColor();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__barColor = tempBarColor;
__barColor.SetAlpha(0xFF);
- __pSliderPresenter->SetNeedUpdate();
-
return r;
}
Color tempBarBackgroundColor = barBackgroundColor.ToColor();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__barBgColor = tempBarBackgroundColor;
__barBgColor.SetAlpha(0xFF);
- __pSliderPresenter->SetNeedUpdate();
-
return r;
}
result r = E_SUCCESS;
Color tempBgColor = color.ToColor();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__bgColor = tempBgColor;
return;
}
+void
+_Slider::OnVisibleStateChanged(void)
+{
+ __pSliderPresenter->OnVisibleStateChanged();
+
+ return;
+}
+
bool
_Slider::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
String string;
GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string);
char buffer[10] = {0,};
- sprintf(buffer, "%d", GetValue());
+ snprintf(buffer, sizeof(buffer), "%d", GetValue());
string.Replace(L"%1$d", buffer);
memset(buffer, 0, 10);
- sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue());
+ snprintf(buffer, sizeof(buffer), "%d", __pSliderPresenter->GetMaxValue());
string.Replace(L"%2$d", buffer);
_AccessibilityManager::GetInstance()->ReadContent(string);
String string;
GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string);
char buffer[10] = {0,};
- sprintf(buffer, "%d", GetValue());
+ snprintf(buffer, sizeof(buffer), "%d", GetValue());
string.Replace(L"%1$d", buffer);
memset(buffer, 0, 10);
- sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue());
+ snprintf(buffer, sizeof(buffer), "%d", __pSliderPresenter->GetMaxValue());
string.Replace(L"%2$d", buffer);
_AccessibilityManager::GetInstance()->ReadContent(string);
{
IEventArg* pEventArg = _SliderEvent::CreateSliderEventArgN(value);
- if( pEventArg == null)
+ if (pEventArg == null)
{
return;
}
if (__pAdjustmentEvent != null)
{
IEventArg* pEventArg = _AdjustmentEvent::CreateAdjustmentEventArgN(adjustment);
- if( pEventArg == null)
+ if (pEventArg == null)
{
return;
}
_SliderEvent::CreateInstanceN(const _Slider& source)
{
_SliderEvent* pSliderEvent = new (std::nothrow) _SliderEvent(source);
- SysTryReturn(NID_UI_CTRL, pSliderEvent != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pSliderEvent != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
if (IsFailed(GetLastResult()))
{
// cast to ISliderEventListener
_ISliderEventListener* pSliderListener = dynamic_cast <_ISliderEventListener*>(&listener);
SysTryReturnVoidResult(NID_UI_CTRL, pSliderListener != null, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. The _ISliderEventListener is null");
+ "Invalid argument(s) is used. The _ISliderEventListener is null");
// cast to _SliderEventArg
const _SliderEventArg* pSliderEventArg = dynamic_cast <const _SliderEventArg*>(&arg);
SysTryReturnVoidResult(NID_UI_CTRL, pSliderEventArg != null, E_INVALID_ARG,
- "[E_INVALID_ARG] Invalid argument(s) is used. The _SliderEventArg is null");
+ "Invalid argument(s) is used. The _SliderEventArg is null");
// call cursor change event listener method
pSliderListener->OnSliderBarMoved(*__pSource, pSliderEventArg->GetValue());
_SliderEvent::CreateSliderEventArgN(int value)
{
_SliderEventArg* pEventArg = new (std::nothrow) _SliderEventArg(value);
- SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pEventArg;
}
SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r));
_SliderImpl* pImpl = new (std::nothrow) _SliderImpl(pControl, pCore);
- r = CheckConstruction(pCore, pImpl);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[%s] Memory Allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pImpl->InitializeBoundsProperties(FUNC_SIZE_INFO(Slider)(sliderStyle), rect, pCore->GetOrientation());
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pImpl->__pPublicAdjustmentEvent = _PublicAdjustmentEvent::CreateInstanceN(*pControl);
- SysTryCatch(NID_UI_CTRL, pImpl->__pPublicAdjustmentEvent != null, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to construct an AdjustmentEvent instance");
+ SysTryCatch(NID_UI_CTRL, pImpl->__pPublicAdjustmentEvent != null, , E_SYSTEM, "A system error has occurred. Failed to construct an AdjustmentEvent instance");
pImpl->__pPublicSliderEvent = _PublicSliderEvent::CreateInstanceN(*pControl);
- SysTryCatch(NID_UI_CTRL, pImpl->__pPublicSliderEvent != null, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to construct a SliderEvent instance");
+ SysTryCatch(NID_UI_CTRL, pImpl->__pPublicSliderEvent != null, , E_SYSTEM, "A system error has occurred. Failed to construct a SliderEvent instance");
r = pCore->AddAdjustmentEventListener(*pImpl);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r));
_SliderImpl* pImpl = new (std::nothrow) _SliderImpl(pControl, pCore);
- r = CheckConstruction(pCore, pImpl);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[%s] Memory Allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pImpl->InitializeBoundsPropertiesF(FUNC_SIZE_INFO(Slider)(sliderStyle), rect, pCore->GetOrientation());
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pImpl->__pPublicAdjustmentEvent = _PublicAdjustmentEvent::CreateInstanceN(*pControl);
- SysTryCatch(NID_UI_CTRL, pImpl->__pPublicAdjustmentEvent != null, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to construct an AdjustmentEvent instance");
+ SysTryCatch(NID_UI_CTRL, pImpl->__pPublicAdjustmentEvent != null, , E_SYSTEM, "A system error has occurred. Failed to construct an AdjustmentEvent instance");
pImpl->__pPublicSliderEvent = _PublicSliderEvent::CreateInstanceN(*pControl);
- SysTryCatch(NID_UI_CTRL, pImpl->__pPublicSliderEvent != null, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to construct a SliderEvent instance");
+ SysTryCatch(NID_UI_CTRL, pImpl->__pPublicSliderEvent != null, , E_SYSTEM, "A system error has occurred. Failed to construct a SliderEvent instance");
r = pCore->AddAdjustmentEventListener(*pImpl);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
if (bgStyle == BACKGROUND_STYLE_NONE)
{
- SysTryReturn(NID_UI_CTRL, groupStyle == GROUP_STYLE_NONE, E_INVALID_OPERATION, E_INVALID_OPERATION,
- "[E_INVALID_OPERATION] The current Slider style does not support given group style.");
+ SysTryReturnResult(NID_UI_CTRL, groupStyle == GROUP_STYLE_NONE, E_INVALID_OPERATION,
+ "The current Slider style does not support given group style.");
style |= _SLIDER_STYLE_NO_BG;
}
}
r = SetRange(minValue, maxValue);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+
+ r = SetValue(minValue);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
GetCore().SetStyle(style);
GetCore().SetGroupStyle(groupStyle);
return null;
}
- pSlider = new (std::nothrow) Slider;
- if (pSlider == null)
- {
- return null;
- }
+ pSlider = new (std::nothrow) Slider();
+ SysTryReturn(NID_UI_CTRL, pSlider, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
rect = pControlProperty->GetRectF();
if (pControl->GetElement(L"backgroundStyle", elementString) || pControl->GetElement(L"BackgroundStyle", elementString))
{
result r = E_SUCCESS;
- Bitmap* pBitmap = null;
Bitmap* pReplacementBitmap = null;
- r = GET_BITMAP_CONFIG_N(SLIDER::OVERLAY_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap);
- SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::OVERLAY_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __overlayBgColor, pReplacementBitmap);
- pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), __overlayBgColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, pReplacementBitmap != null, , r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
delete __pOverlayBgBitmap;
__pOverlayBgBitmap = pReplacementBitmap;
- delete pBitmap;
- pBitmap = null;
-
- return r;
-
-CATCH:
- delete pBitmap;
- pBitmap = null;
-
return r;
}
__pFont->GetTextExtent(text, text.GetLength(), textDim);
- if (text.GetLength() == SLIDER_OVERLAY_SINGLE_DIGIT)
- {
- r = GET_SHAPE_CONFIG(SLIDER::OVERLAY_WIDTH, orientation, overlayWidth);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- }
- else
- {
- overlayWidth = 2 * overlayLeftMargin + textDim.width;
- }
+ r = GET_SHAPE_CONFIG(SLIDER::OVERLAY_WIDTH, orientation, overlayWidth);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
if (__sliderTouchRect.y > 0)
{
: __pSlider(null)
, __pSliderModel(null)
, __pSliderOverlay(null)
- , __pSlideTimer(null)
- , __pResourceBgTopBitmap(null)
- , __pResourceBgMiddleBitmap(null)
- , __pResourceBgBottomBitmap(null)
- , __pResourceBgSingleBitmap(null)
, __pBgTopBitmap(null)
, __pBgMiddleBitmap(null)
, __pBgBottomBitmap(null)
, __pBgMiddleEffectBitmap(null)
, __pBgBottomEffectBitmap(null)
, __pBgSingleEffectBitmap(null)
- , __pResourceBarBitmap(null)
- , __pResourceBarBgBitmap(null)
, __pBarResourceEffectBitmap(null)
, __pBarBgResourceEffectBitmap(null)
, __pBarColorReplacementBitmap(null)
, __currentBgColor(0)
, __pFont(null)
, __pTitleTextObject(null)
+ , __pHandleTextObject(null)
, __handleX(0)
- , __prevSliderValue(0)
, __handleOffset(0)
, __isSliderPressed(false)
, __isSetValue(true)
, __groupStyle(GROUP_STYLE_NONE)
, __fontSize(0.0f)
, __barOffset(0.0f)
- , __isTimerRunning(false)
- , __currentPosition(0.0f, 0.0f)
{
}
delete __pSliderOverlay;
__pSliderOverlay = null;
- if (__pSlideTimer != null)
- {
- __pSlideTimer->Cancel();
- delete __pSlideTimer;
- __pSlideTimer = null;
- }
-
- delete __pResourceBgTopBitmap;
- __pResourceBgTopBitmap = null;
-
- delete __pResourceBgMiddleBitmap;
- __pResourceBgMiddleBitmap = null;
-
- delete __pResourceBgBottomBitmap;
- __pResourceBgBottomBitmap = null;
-
- delete __pResourceBgSingleBitmap;
- __pResourceBgSingleBitmap = null;
-
delete __pBgTopBitmap;
__pBgTopBitmap = null;
delete __pBgSingleEffectBitmap;
__pBgSingleEffectBitmap = null;
- delete __pResourceBarBitmap;
- __pResourceBarBitmap = null;
-
- delete __pResourceBarBgBitmap;
- __pResourceBarBgBitmap = null;
-
delete __pBarResourceEffectBitmap;
__pBarResourceEffectBitmap = null;
delete __pTitleTextObject;
__pTitleTextObject = null;
+ delete __pHandleTextObject;
+ __pHandleTextObject = null;
+
}
_SliderPresenter*
{
result r = E_SUCCESS;
- _SliderPresenter* pSliderPresenter = new (std::nothrow) _SliderPresenter;
+ _SliderPresenter* pSliderPresenter = new (std::nothrow) _SliderPresenter();
SysTryReturn(NID_UI_CTRL, pSliderPresenter != null, null, E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pSliderPresenter->__pSlider = const_cast <_Slider*>(&slider);
SysTryCatch(NID_UI_CTRL, pSliderPresenter->__pSlider != null, , E_SYSTEM,
- "[E_SYSTEM] A system error has occurred. The Slider control core is null.");
+ "A system error has occurred. The Slider control core is null.");
- pSliderPresenter->__pSliderModel = new (std::nothrow) _SliderModel;
+ pSliderPresenter->__pSliderModel = new (std::nothrow) _SliderModel();
SysTryCatch(NID_UI_CTRL, pSliderPresenter->__pSliderModel != null, , E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ "Memory allocation failed.");
if (pSliderPresenter->__pSlider->GetStyle() & _SLIDER_STYLE_OVERLAY)
{
- pSliderPresenter->__pSliderOverlay = new (std::nothrow) _SliderOverlay;
+ pSliderPresenter->__pSliderOverlay = new (std::nothrow) _SliderOverlay();
SysTryCatch(NID_UI_CTRL, pSliderPresenter->__pSliderOverlay != null, , E_OUT_OF_MEMORY,
- "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ "Memory allocation failed.");
r = pSliderPresenter->__pSliderOverlay->Construct(*pSliderPresenter->__pSlider);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
+ r = pSliderPresenter->LoadBitmap();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
return pSliderPresenter;
CATCH:
delete pSliderPresenter;
pSliderPresenter = null;
-
+ SetLastResult(r);
return null;
}
float titleHeight = 0.0f;
FloatRectangle titleTextBounds;
+ int minValue = 0;
+ int maxValue = 0;
+
_ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
if (!__isResourceLoaded)
{
- r = LoadBitmap();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__isResourceLoaded = true;
r = GET_SHAPE_CONFIG(SLIDER::HANDLE_ONE_DIGIT_TEXT_SIZE, orientation, __fontSize);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__pFont = __pSlider->GetFallbackFont();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::HANDLE_NUMBER_TEXT_NORMAL, __handleTextColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::HANDLE_NUMBER_TEXT_DISABLED, __handleTextDisabledColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::HANDLE_NUMBER_TEXT_PRESSED, __handleTextPressedColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::HANDLE_NUMBER_TEXT_HIGHLIGHTED, __handleTextHighlightedColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
r = GET_SHAPE_CONFIG(SLIDER::BAR_HEIGHT, orientation, barHeight);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_SHAPE_CONFIG(SLIDER::ICON_WIDTH, orientation, iconWidth);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_SHAPE_CONFIG(SLIDER::BAR_OFFSET, orientation, __barOffset);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
if (!__isCustomHandle)
{
r = GET_SHAPE_CONFIG(SLIDER::HANDLE_WIDTH, orientation, __handleRect.width);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_SHAPE_CONFIG(SLIDER::HANDLE_HEIGHT, orientation, __handleRect.height);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__handleOffset = __handleRect.width / 2;
}
__rect = FloatRectangle(0.0f, 0.0f, __pSlider->GetBoundsF().width, __pSlider->GetBoundsF().height);
r = GET_SHAPE_CONFIG(SLIDER::ICON_RIGHT_MARGIN, orientation, iconRightMargin);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
if ((__pSlider->GetIcon(ICON_POSITION_LEFT) != null) || (__pSlider->GetIcon(ICON_POSITION_RIGHT) != null))
{
r = GET_SHAPE_CONFIG(SLIDER::MINIMUM_WIDTH_WITH_ICON, orientation, minimumWidth);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_SHAPE_CONFIG(SLIDER::ICON_LEFT_MARGIN, orientation, barLeftMargin);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
else
{
r = GET_SHAPE_CONFIG(SLIDER::MINIMUM_WIDTH_WITHOUT_ICON, orientation, minimumWidth);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_SHAPE_CONFIG(SLIDER::BAR_LEFT_MARGIN, orientation, barLeftMargin);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
barRightMargin = barLeftMargin;
}
r = GET_SHAPE_CONFIG(SLIDER::MINIMUM_HEIGHT, orientation, minimumHeight);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
if (__pSlider->GetStyle() & _SLIDER_STYLE_TITLE_TEXT)
{
r = GET_SHAPE_CONFIG(SLIDER::TITLE_TEXT_HEIGHT, orientation, titleHeight);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
minimumHeight = minimumHeight + titleHeight;
}
titleTextBounds = GetTitleTextBounds();
sliderY = titleTextBounds.y + titleTextBounds.height;
__touchRect = FloatRectangle(barLeftMargin + __barOffset - __handleOffset, sliderY + (__rect.height - (sliderY + __handleRect.height)) / 2.0f,
- __rect.width - (barLeftMargin + barRightMargin) + (2.0f * __handleOffset) - ( 2.0 * __barOffset), __handleRect.height);
+ __rect.width - (barLeftMargin + barRightMargin) + (2.0f * __handleOffset) - (2.0 * __barOffset), __handleRect.height);
}
else
{
__touchRect = FloatRectangle(barLeftMargin + __barOffset - __handleOffset, (__rect.height - __handleRect.height) / 2.0f,
- (__rect.width - (barLeftMargin + barRightMargin ) - ( 2.0 * __barOffset)) + (2.0f * __handleOffset), __handleRect.height);
+ (__rect.width - (barLeftMargin + barRightMargin ) - (2.0 * __barOffset)) + (2.0f * __handleOffset), __handleRect.height);
}
if (__pSlider->GetIcon(ICON_POSITION_LEFT) != null)
__barBgRect = FloatRectangle(__touchRect.x + __handleOffset - __barOffset, __touchRect.y +
((__handleRect.height - barHeight) / 2.0f), __touchRect.width - (2.0f * __handleOffset) + (2.0 * __barOffset), barHeight);
- FloatRectangle absBounds = __pSlider->GetAbsoluteBoundsF();
+ FloatRectangle absBounds = __pSlider->GetAbsoluteBoundsF(true);
__pSliderOverlay->SetSliderRect(absBounds, __touchRect);
+ minValue = __pSliderModel->GetMinValue();
+ maxValue = __pSliderModel->GetMaxValue();
+ __handleX = ((__touchRect.width - __handleRect.width) * (__pSliderModel->GetValue() - minValue)) / (maxValue - minValue);
+
return r;
}
result r = E_SUCCESS;
int opacity = 0;
- Bitmap* pNormalBitmap = null;
- Bitmap* pPressedBitmap = null;
- Bitmap* pDisabledBitmap = null;
- Bitmap* pHighlightedBitmap = null;
Bitmap* pReplacementBitmap = null;
Color handleNormalColor;
Color handlePressedColor;
Color handleHighlightedColor;
r = GET_COLOR_CONFIG(SLIDER::BG_OTHERS_NORMAL, __currentBgColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::BG_DEFAULT_NORMAL, __currentGrpStyleNoneColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::BAR_NORMAL, __currentBarColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::BAR_BG_NORMAL, __currentBarBgColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::HANDLE_BG_NORMAL, handleNormalColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::HANDLE_BG_PRESSED, handlePressedColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::HANDLE_BG_DISABLED, handleDisabledColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_COLOR_CONFIG(SLIDER::HANDLE_BG_HIGHLIGHTED, handleHighlightedColor);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
// for GROUP_STYLE_TOP
- r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgTopBitmap);
- SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.");
-
- __pBgTopBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgTopBitmap,Color::GetColor(COLOR_ID_MAGENTA), __currentBgColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBgColor, __pBgTopBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgTopEffectBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
// for GROUP_STYLE_MIDDLE
- r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgMiddleBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBgColor, __pBgMiddleBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pBgMiddleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgMiddleBitmap,Color::GetColor(COLOR_ID_MAGENTA), __currentBgColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgMiddleEffectBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
// for GROUP_STYLE_BOTTOM
- r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgBottomBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pBgBottomBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgBottomBitmap,Color::GetColor(COLOR_ID_MAGENTA), __currentBgColor);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBgColor, __pBgBottomBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgBottomEffectBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
// for GROUP_STYLE_SINGLE and GROUP_STYLE_NONE
- r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgSingleBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBgColor, __pBgSingleBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pBgSingleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgSingleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __currentBgColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pBgGrpStyleNoneBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgSingleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __currentGrpStyleNoneColor);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentGrpStyleNoneColor, __pBgGrpStyleNoneBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
// Bar Resources
- r = GET_BITMAP_CONFIG_N(SLIDER::BAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBarBgBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pBarBgColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBarBgBitmap,Color::GetColor(COLOR_ID_MAGENTA), __currentBarBgColor);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::BAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBarBgColor, __pBarBgColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(SLIDER::BAR_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBarBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pBarColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBarBitmap,Color::GetColor(COLOR_ID_MAGENTA), __currentBarColor);
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::BAR_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __currentBarColor, __pBarColorReplacementBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(SLIDER::BAR_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pBarBgResourceEffectBitmap);
__pBarColorReplacementBitmap->SetAlphaConstant(opacity);
// Handle Resources
- r = GET_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
if (__pHandleNormalBitmap == null)
{
- pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), handleNormalColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pReplacementBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, handleNormalColor, pReplacementBitmap);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
__pHandleNormalBitmap = pReplacementBitmap;
}
- r = GET_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
if (__pHandlePressedBitmap == null)
{
- pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), handlePressedColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pReplacementBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, handlePressedColor, pReplacementBitmap);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
__pHandlePressedBitmap = pReplacementBitmap;
}
- r = GET_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
if (__pHandleDisabledBitmap == null)
{
- pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDisabledBitmap, Color::GetColor(COLOR_ID_MAGENTA), handleDisabledColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pReplacementBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, handleDisabledColor, pReplacementBitmap);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
__pHandleDisabledBitmap = pReplacementBitmap;
}
- r = GET_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
if (__pHandleHighlightedBitmap == null)
{
- pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), handleHighlightedColor);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, (pReplacementBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, handleHighlightedColor, pReplacementBitmap);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
__pHandleHighlightedBitmap = pReplacementBitmap;
}
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
- delete pNormalBitmap;
- delete pPressedBitmap;
- delete pDisabledBitmap;
- delete pHighlightedBitmap;
+ __pHandleTextObject = new (std::nothrow) TextObject();
+ SysTryCatch(NID_UI_CTRL, __pHandleTextObject != null, , E_OUT_OF_MEMORY, "Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ __pHandleTextObject->Construct();
+ __pHandleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD);
+ __pHandleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
return r;
CATCH:
- delete pNormalBitmap;
- delete pPressedBitmap;
- delete pDisabledBitmap;
- delete pHighlightedBitmap;
-
- delete __pResourceBgTopBitmap;
- __pResourceBgTopBitmap = null;
-
- delete __pResourceBgMiddleBitmap;
- __pResourceBgMiddleBitmap = null;
-
- delete __pResourceBgBottomBitmap;
- __pResourceBgBottomBitmap = null;
-
- delete __pResourceBgSingleBitmap;
- __pResourceBgSingleBitmap = null;
-
delete __pBgTopBitmap;
__pBgTopBitmap = null;
delete __pBgSingleEffectBitmap;
__pBgSingleEffectBitmap = null;
- delete __pResourceBarBitmap;
- __pResourceBarBitmap = null;
-
- delete __pResourceBarBgBitmap;
- __pResourceBarBgBitmap = null;
-
delete __pBarResourceEffectBitmap;
__pBarResourceEffectBitmap = null;
delete __pHandleHighlightedEffectBitmap;
__pHandleHighlightedEffectBitmap = null;
+ delete __pHandleTextObject;
+ __pHandleTextObject = null;
+
return r;
}
__handleRect.x = __touchRect.x + __handleX;
__handleRect.y = __touchRect.y;
- if (__handleRect.x < __touchRect.x )
+ if (__handleRect.x < __touchRect.x)
{
__handleRect.x = __touchRect.x;
}
- if (__handleRect.x + __handleRect.width > __touchRect.x + __touchRect.width )
+ if (__handleRect.x + __handleRect.width > __touchRect.x + __touchRect.width)
{
__handleRect.x = __touchRect.x + __touchRect.width - __handleRect.width;
}
if (__isNeedToBeUpdated)
{
Resize();
- __isNeedToBeUpdated = false;
}
return DrawSlider();
int style = __pSlider->GetStyle();
Canvas* pCanvas = __pSlider->GetCanvasN();
- SysTryReturn(NID_UI_CTRL, pCanvas != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+ SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "System error occurred.");
- r = DrawBackground(*pCanvas);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ if (__isNeedToBeUpdated)
+ {
+ r = DrawBackground(*pCanvas);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
if (style & _SLIDER_STYLE_TITLE_TEXT)
{
}
}
- if (style & _SLIDER_STYLE_TITLE_TEXT)
+ if (__isNeedToBeUpdated)
{
- r = DrawTitleText(*pCanvas);
+ if (style & _SLIDER_STYLE_TITLE_TEXT)
+ {
+ r = DrawTitleText(*pCanvas);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ r = DrawIcon(*pCanvas);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- }
- r = DrawIcon(*pCanvas);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ __isNeedToBeUpdated = false;
+ }
delete pCanvas;
pCanvas = null;
}
else
{
- pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgTopBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor());
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetColor(), pBgGroupBitmap);
if (pBgGroupBitmap == null)
{
SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgMiddleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor());
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetColor(), pBgGroupBitmap);
if (pBgGroupBitmap == null)
{
SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgBottomBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor());
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetColor(), pBgGroupBitmap);
if (pBgGroupBitmap == null)
{
SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgSingleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor());
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetColor(), pBgGroupBitmap);
if (pBgGroupBitmap == null)
{
SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- pBgGroupBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgSingleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetColor());
- r = GetLastResult();
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetColor(), pBgGroupBitmap);
if (pBgGroupBitmap == null)
{
SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(r));
}
DrawBitmap(canvas, __rect, pBgBitmap);
- if ( __groupStyle != GROUP_STYLE_NONE)
+ if (__groupStyle != GROUP_STYLE_NONE)
{
if (!isCustomBitmap)
{
__handleRect.x = __touchRect.x + __handleX;
__handleRect.y = __touchRect.y;
- if (__handleRect.x < __touchRect.x )
+ if (__handleRect.x < __touchRect.x)
{
__handleRect.x = __touchRect.x;
}
- if (__handleRect.x + __handleRect.width > __touchRect.x + __touchRect.width )
+ if (__handleRect.x + __handleRect.width > __touchRect.x + __touchRect.width)
{
__handleRect.x = __touchRect.x + __touchRect.width - __handleRect.width;
}
if (__pSlider->GetBarBackgroundColor() != __currentBarBgColor)
{
- pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBarBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetBarBackgroundColor());
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (pReplacementBitmap != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::BAR_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetBarBackgroundColor(), pReplacementBitmap);
+ SysTryReturnResult(NID_UI_CTRL, (pReplacementBitmap != null), r, "Propagating.");
delete __pBarBgColorReplacementBitmap;
__pBarBgColorReplacementBitmap = null;
if (__pSlider->GetBarColor() != __currentBarColor)
{
- pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBarBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pSlider->GetBarColor());
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, (pReplacementBitmap != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::BAR_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pSlider->GetBarColor(), pReplacementBitmap);
+ SysTryReturnResult(NID_UI_CTRL, (pReplacementBitmap != null), r, "Propagating.");
delete __pBarColorReplacementBitmap;
__pBarColorReplacementBitmap = null;
Canvas* pHandleCanvas = __pSlider->GetHandleCanvasN();
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pHandleCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, pHandleCanvas != null, r, "Propagating.");
pHandleCanvas->SetBackgroundColor(0x00000000);
pHandleCanvas->Clear();
if (!_BitmapImpl::CheckNinePatchedBitmapStrictly(*pHandleBitmap))
{
// to clip the center portion of the larger bitmap.
- if( bitmapWidth > __handleRect.width )
+ if(bitmapWidth > __handleRect.width)
{
bitmapPositionX = (bitmapWidth / 2.0f) - (__handleRect.width / 2.0f);
bitmapWidth = __handleRect.width;
}
- if( bitmapHeight > __handleRect.height )
+ if(bitmapHeight > __handleRect.height)
{
bitmapPositionY = (bitmapHeight / 2.0f) - (__handleRect.height / 2.0f);
bitmapHeight = __handleRect.height;
int handleNumberSize = 0;
Color textColor;
String text;
+ TextSimple* pSimpleText = null;
int valueLength = 0;
_ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
+ Canvas* pHandleCanvas = __pSlider->GetHandleCanvasN();
+ r = GetLastResult();
+ SysTryReturnResult(NID_UI_CTRL, pHandleCanvas != null, r, "Propagating.");
+
if (!__pSlider->IsEnabled()) // disabled
{
textColor = __handleTextDisabledColor;
textColor = __handleTextColor;
}
- FloatDimension textDim(0.0f, 0.0f);
text.Append(value);
valueLength = text.GetLength();
+ pSimpleText = new (std::nothrow) TextSimple(const_cast<wchar_t*>(text.GetPointer()), valueLength);
+
+ pSimpleText->SetTextShadowEnabled(true);
+ pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, -1.0f));
+
if (valueLength == SLIDER_HANDLE_THREE_DIGIT)
{
r = GET_SHAPE_CONFIG(SLIDER::HANDLE_THREE_DIGIT_TEXT_SIZE, orientation, handleNumberSize);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
else if (valueLength == SLIDER_HANDLE_TWO_DIGIT)
{
r = GET_SHAPE_CONFIG(SLIDER::HANDLE_TWO_DIGIT_TEXT_SIZE, orientation, handleNumberSize);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
r = GET_SHAPE_CONFIG(SLIDER::HANDLE_ONE_DIGIT_TEXT_SIZE, orientation, handleNumberSize);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
(_FontImpl::GetInstance(*__pFont))->SetSize(handleNumberSize);
- Canvas* pHandleCanvas = __pSlider->GetHandleCanvasN();
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pHandleCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ __pHandleTextObject->RemoveAll();
- pHandleCanvas->SetFont(*__pFont);
- __pFont->GetTextExtent(text, valueLength, textDim);
+ r = __pHandleTextObject->AppendElement(*pSimpleText);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to append Simpletext.", GetErrorMessage(r));
- FloatPoint textPoint;
- textPoint.x = (__handleRect.width - textDim.width) / 2.0f;
- textPoint.y = (__handleRect.height - textDim.height) / 2.0f;
-
- pHandleCanvas->SetForegroundColor(textColor);
- pHandleCanvas->DrawText(textPoint, text);
+ __pHandleTextObject->SetForegroundColor(textColor, 0, valueLength);
+ __pHandleTextObject->SetBounds(pHandleCanvas->GetBounds());
+ __pHandleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE);
+ __pHandleTextObject->SetFont(__pFont, 0, valueLength);
+ __pHandleTextObject->Draw(*_CanvasImpl::GetInstance(*pHandleCanvas));
delete pHandleCanvas;
pHandleCanvas = null;
return r;
+
+CATCH:
+ delete pSimpleText;
+ delete pHandleCanvas;
+
+ return r;
}
result
_ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
titleLength = __pSlider->GetTitleText().GetLength();
- SysTryReturn(NID_UI_CTRL, titleLength != 0, E_SUCCESS, E_SUCCESS, "Title text is empty");
+ SysTryReturnResult(NID_UI_CTRL, titleLength != 0, E_SUCCESS, "Title text is empty");
r = GET_SHAPE_CONFIG(SLIDER::TITLE_TEXT_SIZE, orientation, titleTextSize);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
(_FontImpl::GetInstance(*__pFont))->SetSize(titleTextSize);
if (__pTitleTextObject == null)
{
__pTitleTextObject = new (std::nothrow) TextObject();
- SysTryReturn(NID_UI_CTRL, __pTitleTextObject != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, __pTitleTextObject != null, r = E_OUT_OF_MEMORY, "Memory allocation failed.");
__pTitleTextObject->Construct();
}
if (pLeftBitmap != null)
{
r = DrawBitmap(canvas, GetIconBounds(ICON_POSITION_LEFT), pLeftBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
if (pRightBitmap != null)
{
r = DrawBitmap(canvas, GetIconBounds(ICON_POSITION_RIGHT), pRightBitmap);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
return r;
{
result r = E_SUCCESS;
- FloatRectangle absBounds = __pSlider->GetAbsoluteBoundsF();
+ FloatRectangle absBounds = __pSlider->GetAbsoluteBoundsF(true);
r = __pSliderOverlay->SetSliderRect(absBounds, __touchRect);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = __pSliderOverlay->DrawSliderOverlay(__touchRect.x + __handleX, __handleRect.width, value);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return r;
}
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap))
{
r = canvas.DrawNinePatchedBitmap(bounds, *pBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.");
}
else
{
r = canvas.DrawBitmap(bounds, *pBitmap);
- SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.", GetErrorMessage(r));
}
return r;
}
return false;
}
- if (__pSlideTimer == null)
- {
- __pSlideTimer = new (std::nothrow) Timer;
- SysTryReturn(NID_UI_CTRL, __pSlideTimer != null, true, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
-
- result r = __pSlideTimer->Construct(*this);
- if (r != E_SUCCESS)
- {
- delete __pSlideTimer;
- __pSlideTimer = null;
-
- return true;
- }
- }
-
FloatPoint point = touchinfo.GetCurrentPosition();
- if (__handleRect.Contains(point))
+
+ if (__touchRect.Contains(point))
{
- __isSliderPressed = true;
__isSetValue = false;
+ int candidateValue = __pSliderModel->GetValue();
- int candidateValue = CalculateSliderValue(point.x, point.x - __handleRect.x);
- __prevSliderValue = candidateValue;
+ if (!__handleRect.Contains(point))
+ {
+ if (point.x >= (__touchRect.x + __handleRect.width / 2) && point.x <= __touchRect.x + (__touchRect.width - __handleRect.width / 2))
+ {
+ candidateValue = CalculateSliderValue(point.x, __handleRect.width / 2);
+ }
+ else
+ {
+ return __isSliderPressed;
+ }
+ }
__pSliderModel->SetValue(candidateValue);
__pSlider->SetAccessibilityElementValue();
}
__pSlider->Invalidate();
+ __isSliderPressed = true;
}
return __isSliderPressed;
return false;
}
- if (__pSlideTimer != null)
- {
- __isTimerRunning = false;
- __pSlideTimer->Cancel();
- }
-
FloatPoint point = touchinfo.GetCurrentPosition();
- Canvas* pCanvas = __pSlider->GetCanvasN();
- SysTryReturn(NID_UI_CTRL, pCanvas != null, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the canvas.");
-
- if (point.x >= (pCanvas->GetBoundsF().x + pCanvas->GetBoundsF().width))
- {
- point.x = pCanvas->GetBoundsF().x + pCanvas->GetBoundsF().width;
- }
-
- delete pCanvas;
- pCanvas = null;
-
if (__isSliderPressed)
{
PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pSlider);
if (__isTouchCanceled)
{
__isTouchCanceled = false;
- candidateValue = __prevSliderValue;
+ candidateValue = __pSliderModel->GetValue();
}
else
{
__pSliderOverlay->Close();
}
- // Slider Event Fire is required if some handle value changes not fired sldier event because of timer call back.
- if (__prevSliderValue != candidateValue)
- {
- _SliderEvent* pSliderEvent = dynamic_cast <_SliderEvent*>(__pSlider->GetSliderEvent());
- if (pSliderEvent != null)
- {
- IEventArg* pEventArg = _SliderEvent::CreateSliderEventArgN(candidateValue);
-
- result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pEventArg != null, true, r, "[%s] Propagating.", GetErrorMessage(r));
-
- pSliderEvent->Fire(*pEventArg);
- }
- }
-
// Adjustment Event Fire
_AdjustmentEvent* pAdjustmentEvent = dynamic_cast <_AdjustmentEvent*>(__pSlider->GetAdjustmentEvent());
if (pAdjustmentEvent != null)
FloatPoint point = touchinfo.GetCurrentPosition();
- Canvas* pCanvas = __pSlider->GetCanvasN();
- SysTryReturn(NID_UI_CTRL, pCanvas != null, true, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the canvas.");
-
- if (point.x >= (pCanvas->GetBoundsF().x + pCanvas->GetBoundsF().width))
- {
- point.x = pCanvas->GetBoundsF().x + pCanvas->GetBoundsF().width;
- }
-
- __currentPosition.x = point.x;
- __currentPosition.y = point.y;
-
- if (!__isTimerRunning)
- {
- __isTimerRunning = true;
- __pSlideTimer->Start(__timerValue);
- }
-
- delete pCanvas;
- pCanvas = null;
-
- return true;
-}
-
-void
-_SliderPresenter::OnTimerExpired(Timer& timer)
-{
- __isTimerRunning = false;
-
- float handleHalfWidth = __handleRect.width / 2;
- int candidateValue = CalculateSliderValue(__currentPosition.x, handleHalfWidth);
-
- __prevSliderValue = candidateValue;
+ int candidateValue = CalculateSliderValue(point.x, __handleRect.width / 2);
__pSliderModel->SetValue(candidateValue);
__pSlider->SetAccessibilityElementValue();
- __pSlider->Draw();
- __pSlider->Show();
+ __pSlider->Invalidate();
- __pSlider->FireSliderMoveEvent(candidateValue);
+ __pSlider->FireSliderMoveEvent(candidateValue);
- return;
+ return true;
}
bool
return;
}
- if (__pSlideTimer != null)
- {
- __isTimerRunning = false;
- __pSlideTimer->Cancel();
- }
-
__pSlider->Invalidate();
return;
void
_SliderPresenter::OnAncestorVisibleStateChanged(const _Control& control)
{
+ if (control.GetVisibleState())
+ {
+ return;
+ }
+
+ __isSliderPressed = false;
+ __isSetValue = true;
+ __isTouchCanceled = false;
+
+ if (__pSlider->GetStyle() & _SLIDER_STYLE_OVERLAY)
+ {
+ __pSliderOverlay->SetVisibleState(false);
+ __pSliderOverlay->Close();
+ }
+
+ return;
+}
- if (__pSlideTimer != null)
+void
+_SliderPresenter::OnVisibleStateChanged()
+{
+ if (__pSlider->GetVisibleState())
{
- __isTimerRunning = false;
- __pSlideTimer->Cancel();
+ return;
}
__isSliderPressed = false;
_SplitPanel* pSplitPanel = null;
_ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT;
- pSplitPanel = new (std::nothrow) _SplitPanel;
+ pSplitPanel = new (std::nothrow) _SplitPanel();
SysTryReturn(NID_UI_CTRL, pSplitPanel, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pSplitPanel->Construct(splitPanelDividerStyle, splitPanelDividerDirection);
pSplitPanel->__dividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT] = rect.height / 2.0f;
pSplitPanel->__dividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE] = rect.height / 2.0f;
- pSplitPanel->__pTapGesture = new (std::nothrow) _TouchTapGestureDetector;
+ pSplitPanel->__pTapGesture = new (std::nothrow) _TouchTapGestureDetector();
SysTryCatch(NID_UI_CTRL, pSplitPanel->__pTapGesture, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pSplitPanel->AddGestureDetector(*(pSplitPanel->__pTapGesture));
r = GetVisualElement()->AttachChild(*__pDividerVisualElement);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach divider visual element.", GetErrorMessage(r));
- __pSplitPanelPresenter = new (std::nothrow) _SplitPanelPresenter;
+ __pSplitPanelPresenter = new (std::nothrow) _SplitPanelPresenter();
SysTryCatch(NID_UI_CTRL, __pSplitPanelPresenter != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pSplitPanelPresenter->Construct(*this, splitPanelDividerStyle, splitPanelDividerDirection);
_UiTouchEventDelivery
_SplitPanel::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
- if (__pSplitPanelPresenter->OnTouchPressed(source, touchinfo))
+ if (!IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_FIRST) && !IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_SECOND) && __pSplitPanelPresenter->OnTouchPressed(source, touchinfo))
{
return _UI_TOUCH_EVENT_DELIVERY_NO;
}
_UiTouchEventDelivery
_SplitPanel::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
{
- if (__pSplitPanelPresenter->OnTouchReleased(source, touchinfo))
+ if (!IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_FIRST) && !IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_SECOND) && __pSplitPanelPresenter->OnTouchReleased(source, touchinfo))
{
return _UI_TOUCH_EVENT_DELIVERY_NO;
}
result
_SplitPanel::SetMaximumDividerPosition(float position)
{
- if (GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_FIXED)
- {
- SysLog(NID_UI_CTRL, "[E_SYSTEM] System error occurred. This functionality is not supported for divider style fixed.");
- return E_SUCCESS;
- }
-
const float width = GetBoundsF().width;
const float height = GetBoundsF().height;
int configValue = 0;
float
_SplitPanel::GetMaximumDividerPosition(void) const
{
- if (GetDividerStyle() != SPLIT_PANEL_DIVIDER_STYLE_FIXED)
- {
- _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
+ _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
- if (orientation == _CONTROL_ORIENTATION_LANDSCAPE)
+ if (orientation == _CONTROL_ORIENTATION_LANDSCAPE)
+ {
+ if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL)
{
- if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL)
- {
- return __maximumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE];
- }
- else
- {
- return __maximumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE];
- }
+ return __maximumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE];
}
else
{
- if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL)
- {
- return __maximumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT];
- }
- else
- {
- return __maximumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT];
- }
+ return __maximumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE];
+ }
+ }
+ else
+ {
+ if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL)
+ {
+ return __maximumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT];
+ }
+ else
+ {
+ return __maximumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT];
}
-
}
-
- return GetBounds().width;
}
result
_SplitPanel::SetMinimumDividerPosition(float position)
{
- if (GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_FIXED)
- {
- SysLog(NID_UI_CTRL, "[E_SYSTEM] System error occurred. This functionality is not supported for divider style fixed");
- return E_SUCCESS;
- }
-
const float width = GetBoundsF().width;
const float height = GetBoundsF().height;
int configValue = 0;
float
_SplitPanel::GetMinimumDividerPosition(void) const
{
- if (GetDividerStyle() != SPLIT_PANEL_DIVIDER_STYLE_FIXED)
- {
- _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
+ _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
- if (orientation == _CONTROL_ORIENTATION_LANDSCAPE)
+ if (orientation == _CONTROL_ORIENTATION_LANDSCAPE)
+ {
+ if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL)
{
- if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL)
- {
- return __minimumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE];
- }
- else
- {
- return __minimumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE];
- }
+ return __minimumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE];
}
else
{
- if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL)
- {
- return __minimumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT];
- }
- else
- {
- return __minimumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT];
- }
+ return __minimumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE];
+ }
+ }
+ else
+ {
+ if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL)
+ {
+ return __minimumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT];
+ }
+ else
+ {
+ return __minimumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT];
}
-
}
-
- return 0;
}
void
result r = E_SUCCESS;
_SplitPanelModel* pModel = null;
- pModel = new (std::nothrow) _SplitPanelModel;
+ pModel = new (std::nothrow) _SplitPanelModel();
SysTryReturnResult(NID_UI_CTRL, pModel, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = SetModel(*pModel);
_SplitPanelPresenter::LoadBitmap(SplitPanelDividerDirection splitPanelDividerDirection)
{
result r = E_SUCCESS;
- Bitmap *pDividerBackgroundBitmap = null;
+ Bitmap* pDividerBackgroundBitmap = null;
- // Modified - Changeable Color / Resource ( Fixed Style )
+ // Modified - Changeable Color / Resource (Fixed Style)
r = GET_BITMAP_CONFIG_N(SPLITPANEL::DIVIDER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDividerBackgroundBitmap);
SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Failed to load bitmap.");
}
__pDividerPressedBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDividerBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), __dividerPressedBackgroundColor);
- SysTryCatch(NID_UI_CTRL, (__pDividerPressedBackgroundBitmap != null), , r, "[%s] Failed to get replacement color bitmap.", GetErrorMessage(GetLastResult()));
+ SysTryCatch(NID_UI_CTRL, (__pDividerPressedBackgroundBitmap != null), r = GetLastResult(), GetLastResult(), "[%s] Failed to get replacement color bitmap.", GetErrorMessage(GetLastResult()));
__pDividerBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDividerBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), __dividerBackgroundColor);
- SysTryCatch(NID_UI_CTRL, (__pDividerBackgroundBitmap != null), , r, "[%s] Failed to get replacement color bitmap.", GetErrorMessage(GetLastResult()));
+ SysTryCatch(NID_UI_CTRL, (__pDividerBackgroundBitmap != null), r = GetLastResult(), GetLastResult(), "[%s] Failed to get replacement color bitmap.", GetErrorMessage(GetLastResult()));
delete pDividerBackgroundBitmap;
CATCH:
delete pDividerBackgroundBitmap;
delete __pDividerBackgroundEffectBitmap;
+ __pDividerBackgroundEffectBitmap = null;
+
delete __pDividerPressedBackgroundBitmap;
+ __pDividerPressedBackgroundBitmap = null;
+
delete __pDividerThumbBitmap;
+ __pDividerThumbBitmap = null;
return r;
}
pVisualElementDivider->RemoveAllAnimations();
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Propagating.");
- pAnimationDivider = GetVisualElementAnimation(L"bounds");
+ pAnimationDivider = GetVisualElementAnimation(L"bounds", destination);
SysTryReturnResult(NID_UI_CTRL, pAnimationDivider != null, GetLastResult(), "Propagating.");
dividerBounds = pVisualElementDivider->GetBounds();
ControlAnimator* pControlAnimatorFirstPane = null;
ControlAnimator* pControlAnimatorSecondPane = null;
- FloatAnimation hidePane(ANIMATION_ALPHA_SHOW, ANIMATION_ALPHA_HIDE, ANIMATION_DURATION, __controlAnimatorInterpolator);
- FloatAnimation showPane(ANIMATION_ALPHA_HIDE, ANIMATION_ALPHA_SHOW, ANIMATION_DURATION, __controlAnimatorInterpolator);
+ long animationDuration = GetAnimationDuration(destination);
+
+ FloatAnimation hidePane(ANIMATION_ALPHA_SHOW, ANIMATION_ALPHA_HIDE, animationDuration, __controlAnimatorInterpolator);
+ FloatAnimation showPane(ANIMATION_ALPHA_HIDE, ANIMATION_ALPHA_SHOW, animationDuration, __controlAnimatorInterpolator);
pFirstPaneControl = GetPaneControl(SPLIT_PANEL_PANE_ORDER_FIRST);
pSecondPaneControl = GetPaneControl(SPLIT_PANEL_PANE_ORDER_SECOND);
Rectangle secondPaneEndBounds = secondPaneBounds;
secondPaneEndBounds.x = clientBounds.width + dividerRectangle.width;
- RectangleAnimation maximizeFirstPane = RectangleAnimation(firstPaneBounds, clientBounds, ANIMATION_DURATION, __controlAnimatorInterpolator);
+ RectangleAnimation maximizeFirstPane = RectangleAnimation(firstPaneBounds, clientBounds, animationDuration, __controlAnimatorInterpolator);
if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable())
{
Rectangle firstPaneEndBounds = firstPaneBounds;
firstPaneEndBounds.x = -(firstPaneBounds.width + dividerRectangle.width);
- RectangleAnimation animationMaximizeSecondPane = RectangleAnimation(secondPaneBounds, clientBounds, ANIMATION_DURATION, __controlAnimatorInterpolator);
+ RectangleAnimation animationMaximizeSecondPane = RectangleAnimation(secondPaneBounds, clientBounds, animationDuration, __controlAnimatorInterpolator);
if (pControlAnimatorSecondPane != null && pSecondPaneControl->IsResizable())
{
Rectangle firstPaneEndBounds = firstPaneBounds;
firstPaneEndBounds.y = -(firstPaneBounds.height + dividerRectangle.height);
- RectangleAnimation animationMaximizeSecondPane = RectangleAnimation(secondPaneBounds, clientBounds, ANIMATION_DURATION, __controlAnimatorInterpolator);
+ RectangleAnimation animationMaximizeSecondPane = RectangleAnimation(secondPaneBounds, clientBounds, animationDuration, __controlAnimatorInterpolator);
if (pControlAnimatorSecondPane != null && pSecondPaneControl->IsResizable())
{
Rectangle secondPaneEndBounds = secondPaneBounds;
secondPaneEndBounds.y = clientBounds.height + dividerRectangle.height;
- RectangleAnimation maximizeFirstPane = RectangleAnimation(firstPaneBounds, clientBounds, ANIMATION_DURATION, __controlAnimatorInterpolator);
+ RectangleAnimation maximizeFirstPane = RectangleAnimation(firstPaneBounds, clientBounds, animationDuration, __controlAnimatorInterpolator);
if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable())
{
secondPaneEndBounds.x = secondPaneEndBounds.y = 0;
- RectangleAnimation animationRestoreFirstPane = RectangleAnimation(firstPaneBounds, firstPaneEndBounds, ANIMATION_DURATION, __controlAnimatorInterpolator);
- RectangleAnimation animationRestoreSecondPane = RectangleAnimation(secondPaneBounds, secondPaneEndBounds, ANIMATION_DURATION, __controlAnimatorInterpolator);
+ RectangleAnimation animationRestoreFirstPane = RectangleAnimation(firstPaneBounds, firstPaneEndBounds, animationDuration, __controlAnimatorInterpolator);
+ RectangleAnimation animationRestoreSecondPane = RectangleAnimation(secondPaneBounds, secondPaneEndBounds, animationDuration, __controlAnimatorInterpolator);
if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable())
{
secondPaneEndBounds.x = secondPaneEndBounds.y = 0;
- RectangleAnimation animationRestoreFirstPane = RectangleAnimation(firstPaneBounds, firstPaneEndBounds, ANIMATION_DURATION, __controlAnimatorInterpolator);
- RectangleAnimation animationRestoreSecondPane = RectangleAnimation(secondPaneBounds, secondPaneEndBounds, ANIMATION_DURATION, __controlAnimatorInterpolator);
+ RectangleAnimation animationRestoreFirstPane = RectangleAnimation(firstPaneBounds, firstPaneEndBounds, animationDuration, __controlAnimatorInterpolator);
+ RectangleAnimation animationRestoreSecondPane = RectangleAnimation(secondPaneBounds, secondPaneEndBounds, animationDuration, __controlAnimatorInterpolator);
if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable())
{
pVESecondPane->RemoveAllAnimations();
- pAnimationFirstPane = GetVisualElementAnimation(L"bounds");
+ pAnimationFirstPane = GetVisualElementAnimation(L"bounds", destination);
SysTryReturnResult(NID_UI_CTRL, pAnimationFirstPane != null, GetLastResult(), "Propagating.");
- pAnimationSecondPane = GetVisualElementAnimation(L"bounds");
+ pAnimationSecondPane = GetVisualElementAnimation(L"bounds", destination);
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, pAnimationSecondPane != null, , r, "[%s] Propagating.", GetErrorMessage(r));
}
VisualElementPropertyAnimation*
-_SplitPanelPresenter::GetVisualElementAnimation(Tizen::Base::String propertyName)
+_SplitPanelPresenter::GetVisualElementAnimation(String propertyName, int destination)
{
result r = E_SUCCESS;
VisualElementPropertyAnimation* pAnimation = null;
r = pAnimation->SetPropertyName(propertyName);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.");
- r = pAnimation->SetDuration(ANIMATION_DURATION);
+ r = pAnimation->SetDuration(GetAnimationDuration(destination));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.");
pAnimation->SetTimingFunction(pTimingFunction);
return null;
}
+long
+_SplitPanelPresenter::GetAnimationDuration(int destination)
+{
+ FloatRectangle clientBounds(0.0f, 0.0f, 0.0f, 0.0f);
+ FloatDimension screenSize(0.0f, 0.0f);
+ float dividerPosition = 0.0f;
+ float ratio = 0.0f;
+ long animationDuration = 0;
+
+ _ControlOrientation orientation = __pSplitPanel->GetOrientation();
+ SplitPanelPaneOrder maximizedPaneOrder = __pSplitPanelModel->GetMaximizedPaneOrder();
+ bool isPaneMaximized = __pSplitPanelModel->GetPaneMaximumState();
+
+ clientBounds = __pSplitPanel->GetBoundsF();
+ dividerPosition = __pSplitPanel->GetDividerPosition();
+
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ screenSize.width = _ControlManager::GetInstance()->GetScreenSizeF().width;
+ screenSize.height = _ControlManager::GetInstance()->GetScreenSizeF().height;
+ }
+ else
+ {
+ screenSize.width = _ControlManager::GetInstance()->GetScreenSizeF().height;
+ screenSize.height = _ControlManager::GetInstance()->GetScreenSizeF().width;
+ }
+
+ if (__pSplitPanel->GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL)
+ {
+ animationDuration = (clientBounds.width / screenSize.width) * ANIMATION_DURATION_MAX;
+ }
+ else
+ {
+ animationDuration = (clientBounds.height / screenSize.height) * ANIMATION_DURATION_MAX;
+ }
+
+ switch (destination)
+ {
+ case _SPLIT_PANEL_ANIMATION_RIGHT:
+ if (isPaneMaximized && maximizedPaneOrder == SPLIT_PANEL_PANE_ORDER_SECOND)
+ {
+ ratio = 1.0f;
+ }
+ else
+ {
+ ratio = ((clientBounds.width - dividerPosition) / clientBounds.width);
+ }
+ break;
+ case _SPLIT_PANEL_ANIMATION_LEFT:
+ if (isPaneMaximized && maximizedPaneOrder == SPLIT_PANEL_PANE_ORDER_FIRST)
+ {
+ ratio = 1.0f;
+ }
+ else
+ {
+ ratio = (dividerPosition / clientBounds.width);
+ }
+ break;
+ case _SPLIT_PANEL_ANIMATION_TOP:
+ if (isPaneMaximized && maximizedPaneOrder == SPLIT_PANEL_PANE_ORDER_FIRST)
+ {
+ ratio = 1.0f;
+ }
+ else
+ {
+ ratio = (dividerPosition / clientBounds.height);
+ }
+ break;
+ case _SPLIT_PANEL_ANIMATION_BOTTOM:
+ if (isPaneMaximized && maximizedPaneOrder == SPLIT_PANEL_PANE_ORDER_SECOND)
+ {
+ ratio = 1.0f;
+ }
+ else
+ {
+ ratio = ((clientBounds.height - dividerPosition) / clientBounds.height);
+ }
+ break;
+ case _SPLIT_PANEL_ANIMATION_RESTORE_HORIZONTAL:
+ if (isPaneMaximized && maximizedPaneOrder == SPLIT_PANEL_PANE_ORDER_FIRST)
+ {
+ ratio = ((clientBounds.height - dividerPosition) / clientBounds.height);
+ }
+ else
+ {
+ ratio = (dividerPosition / clientBounds.height);
+ }
+ break;
+ case _SPLIT_PANEL_ANIMATION_RESTORE_VERTICAL:
+ if (isPaneMaximized && maximizedPaneOrder == SPLIT_PANEL_PANE_ORDER_FIRST)
+ {
+ ratio = ((clientBounds.width - dividerPosition) / clientBounds.width);
+ }
+ else
+ {
+ ratio = (dividerPosition / clientBounds.width);
+ }
+ break;
+ }
+
+ animationDuration = animationDuration * ratio;
+
+ if (animationDuration < ANIMATION_DURATION_MIN)
+ {
+ animationDuration = ANIMATION_DURATION_MIN;
+ }
+
+ return animationDuration;
+}
+
void
_SplitPanelPresenter::OnAnimationTransactionStarted(int transactionId)
{
_Control::SetResizable(false);
_Control::SetMovable(false);
- _TabPresenter* pPresenter = new (std::nothrow) _TabPresenter;
+ _TabPresenter* pPresenter = new (std::nothrow) _TabPresenter();
SysTryReturnVoidResult(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = SetPresenter(*pPresenter);
{
result r = E_SUCCESS;
- _Tab* pTab = new (std::nothrow) _Tab;
+ _Tab* pTab = new (std::nothrow) _Tab();
SysTryReturn(NID_UI_CTRL, pTab, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
if (IsFailed(GetLastResult()))
pTab->AcquireHandle();
- pTab->__pGestureLongPress = new (std::nothrow) _TouchLongPressGestureDetector;
+ pTab->__pGestureLongPress = new (std::nothrow) _TouchLongPressGestureDetector();
SysTryCatch(NID_UI_CTRL, pTab->__pGestureLongPress, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pTab->__pGestureLongPress->SetDuration(500);
r = pTab->__pGestureLongPress->AddGestureListener(*pTab);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _ITouchGestureEventListener instance could not be set.");
- pTab->__pFlickGesture = new (std::nothrow) _TouchFlickGestureDetector;
+ pTab->__pFlickGesture = new (std::nothrow) _TouchFlickGestureDetector();
SysTryCatch(NID_UI_CTRL, pTab->__pFlickGesture, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pTab->AddGestureDetector(*(pTab->__pFlickGesture));
SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items.");
- _TabItem *pItem = new (std::nothrow) _TabItem;
+ _TabItem* pItem = new (std::nothrow) _TabItem();
SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
pItem->SetIcon(icon);
SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items.");
- _TabItem *pItem = new (std::nothrow) _TabItem;
+ _TabItem* pItem = new (std::nothrow) _TabItem();
SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
pItem->SetIcon(icon);
SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items.");
- _TabItem *pItem = new (std::nothrow) _TabItem;
+ _TabItem* pItem = new (std::nothrow) _TabItem();
SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
pItem->SetText(text);
SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items.");
- _TabItem *pItem = new (std::nothrow) _TabItem;
+ _TabItem* pItem = new (std::nothrow) _TabItem();
SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
pItem->SetIcon(icon);
if (selectedIndex >= index)
{
- _TabItem *pSelectedItem = null;
+ _TabItem* pSelectedItem = null;
pSelectedItem = GetItemAt(selectedIndex);
if (pSelectedItem != null)
{
SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items.");
- _TabItem *pItem = new (std::nothrow) _TabItem;
+ _TabItem *pItem = new (std::nothrow) _TabItem();
SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
pItem->SetIcon(icon);
if (selectedIndex >= index)
{
- _TabItem *pSelectedItem = null;
+ _TabItem* pSelectedItem = null;
pSelectedItem = GetItemAt(selectedIndex);
if (pSelectedItem != null)
{
SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items.");
- _TabItem *pItem = new (std::nothrow) _TabItem;
+ _TabItem* pItem = new (std::nothrow) _TabItem();
SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
pItem->SetText(text);
if (selectedIndex >= index)
{
- _TabItem *pSelectedItem = null;
+ _TabItem* pSelectedItem = null;
pSelectedItem = GetItemAt(selectedIndex);
if (pSelectedItem != null)
{
return E_SYSTEM;
}
- _TabItem *pItem = static_cast<_TabItem*>(__tabItems.GetAt(index));
+ _TabItem* pItem = static_cast<_TabItem*>(__tabItems.GetAt(index));
result r = GetLastResult();
SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SYSTEM;
}
- _TabItem *pItem = static_cast<_TabItem*>(__tabItems.GetAt(index));
+ _TabItem* pItem = static_cast<_TabItem*>(__tabItems.GetAt(index));
result r = GetLastResult();
SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SYSTEM;
}
- _TabItem *pItem = static_cast<_TabItem*>(__tabItems.GetAt(index));
+ _TabItem* pItem = static_cast<_TabItem*>(__tabItems.GetAt(index));
result r = GetLastResult();
SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "[%s] Propagating.", GetErrorMessage(r));
if (selectedIndex >= index)
{
- _TabItem *pSelectedItem = null;
+ _TabItem* pSelectedItem = null;
pSelectedItem = GetItemAt(selectedIndex);
if (pSelectedItem != null)
{
_Tab::LoadBitmap(void)
{
result r = E_SUCCESS;
- Bitmap* pPressedItemBackgroundBitmap = null;
- Bitmap* pItemBackgroundBitmap = null;
- Bitmap* pDisabledBackgroundBitmap = null;
- Bitmap* pSelectedItemBackgroundBitmap = null;
- Bitmap* pPressedItemBackgroundEffectBitmap = null;
- Bitmap* pHighlightedItemBackgroundBitmap = null;
Color pressedEffectColor;
GET_COLOR_CONFIG(TAB::ITEM_BG_EFFECT_PRESSED, pressedEffectColor);
- r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, GetDisabledItemBackgroundColor(), __pDisabledBackgroundBitmap);
SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate disabled item background bitmap.");
- if (pDisabledBackgroundBitmap != null)
- {
- __pDisabledBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDisabledBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), GetDisabledItemBackgroundColor());
- SysTryLog(NID_UI_CTRL, (__pDisabledBackgroundBitmap != null), "Failed to locate disabled item background bitmap.");
-
- delete pDisabledBackgroundBitmap;
- }
- r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pItemBackgroundBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, GetItemBackgroundColor(), __pBackgroundBitmap);
SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate item background bitmap.");
- if (pItemBackgroundBitmap != null)
- {
- __pBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pItemBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), GetItemBackgroundColor());
- SysTryLog(NID_UI_CTRL, (__pBackgroundBitmap != null), "Failed to locate item background bitmap.");
-
- delete pItemBackgroundBitmap;
- }
- r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedItemBackgroundBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, GetPressedItemBackgroundColor(), __pPressedItemBackgroundBitmap);
SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate pressed item background bitmap.");
- if (pPressedItemBackgroundBitmap != null)
- {
- __pPressedItemBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pPressedItemBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), GetPressedItemBackgroundColor());
- SysTryLog(NID_UI_CTRL, (__pPressedItemBackgroundBitmap != null), "Failed to locate pressed item background bitmap.");
-
- delete pPressedItemBackgroundBitmap;
- }
-
- r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedItemBackgroundBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, GetSelectedItemBackgroundColor(), __pSelectedItemBackgroundBitmap);
SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate selected item background bitmap.");
- if (pSelectedItemBackgroundBitmap != null)
- {
- __pSelectedItemBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSelectedItemBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), GetSelectedItemBackgroundColor());
- SysTryLog(NID_UI_CTRL, (__pSelectedItemBackgroundBitmap != null), "Failed to locate selected item background bitmap.");
-
- delete pSelectedItemBackgroundBitmap;
- }
-
- r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedItemBackgroundEffectBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pressedEffectColor, __pPressedItemBackgroundEffectBitmap);
SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate selected item background bitmap.");
- if (pPressedItemBackgroundEffectBitmap != null)
- {
- __pPressedItemBackgroundEffectBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pPressedItemBackgroundEffectBitmap, Color::GetColor(COLOR_ID_MAGENTA), pressedEffectColor);
- SysTryLog(NID_UI_CTRL, (__pPressedItemBackgroundEffectBitmap != null), "Failed to locate selected item background bitmap.");
-
- delete pPressedItemBackgroundEffectBitmap;
- }
-
- r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedItemBackgroundBitmap);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, GetHighlightedItemBackgroundColor(), __pHighlightedItemBackgroundBitmap);
SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate highlighted item background bitmap.");
- if (pHighlightedItemBackgroundBitmap != null)
- {
- __pHighlightedItemBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedItemBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), GetHighlightedItemBackgroundColor());
- SysTryLog(NID_UI_CTRL, (__pHighlightedItemBackgroundBitmap != null), "Failed to locate highlighted item background bitmap.");
-
- delete pHighlightedItemBackgroundBitmap;
- }
return r;
}
int itemIndex = GetItemIndexFromActionId(actionId);
- _TabItem *pItem = null;
+ _TabItem* pItem = null;
if (itemIndex < 0)
{
for (index = 0; index < itemCount; index++)
{
- const _TabItem *pItem = dynamic_cast<const _TabItem*>(__tabItems.GetAt(index));
+ const _TabItem* pItem = dynamic_cast<const _TabItem*>(__tabItems.GetAt(index));
if (pItem != null)
{
int
_Tab::GetItemActionIdAt(int index) const
{
- if (__tabItems.GetAt(index) == null )
+ if (__tabItems.GetAt(index) == null)
{
return -1;
}
- const _TabItem *pItem = dynamic_cast<const _TabItem*>(__tabItems.GetAt(index));
+ const _TabItem* pItem = dynamic_cast<const _TabItem*>(__tabItems.GetAt(index));
SysTryReturn(NID_UI_CTRL, pItem != null, E_SYSTEM, E_SYSTEM,"[E_SYSTEM] A system error has occurred. Failed to get an item at index (%d).", index);
return pItem->GetActionId();
_TabItem*
_Tab::GetItemAt(int index)
{
- if (__tabItems.GetAt(index) == null )
+ if (__tabItems.GetAt(index) == null)
{
return null;
}
- _TabItem *pItem = static_cast<_TabItem*>(__tabItems.GetAt(index));
+ _TabItem* pItem = static_cast<_TabItem*>(__tabItems.GetAt(index));
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pItem != null, null, r, "[%s] Propagating.", GetErrorMessage(r));
using namespace Tizen::Base;
using namespace Tizen::Graphics;
using namespace Tizen::Base::Runtime;
+using namespace Tizen::Ui;
namespace Tizen { namespace Ui { namespace Controls
{
_TabBar::CreateTabBarN(void)
{
_TabBar* pTabBar = new (std::nothrow) _TabBar();
- SysTryReturn(NID_UI_CTRL, pTabBar != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pTabBar != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pTabBar->Initialize();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to Initialize.", GetErrorMessage(r));
CATCH:
delete pTabBar;
-
+ SetLastResult(r);
return null;
}
_TabBar::Initialize(void)
{
_TabBarPresenter* pTabBarPresenter = new (std::nothrow) _TabBarPresenter(*this);
- SysTryReturn(NID_UI_CTRL, pTabBarPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, pTabBarPresenter != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
result r = pTabBarPresenter->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
result
-_TabBar::AddItem(const Tizen::Base::String& text, int actionId)
+_TabBar::AddItem(const String& text, int actionId)
{
return __pTabBarPresenter->AddItem(text, actionId);
}
result
-_TabBar::InsertItemAt(int index, const Tizen::Base::String& text, int actionId)
+_TabBar::InsertItemAt(int index, const String& text, int actionId)
{
return __pTabBarPresenter->InsertItemAt(index, text, actionId);
}
result
-_TabBar::SetItemAt(int index, const Tizen::Base::String& text, int actionId)
+_TabBar::SetItemAt(int index, const String& text, int actionId)
{
return __pTabBarPresenter->SetItemAt(index, text, actionId);
}
Variant
_TabBar::GetPropertyColor(void) const
{
- return Tizen::Ui::Variant(__color);
+ return Variant(__color);
}
result
-_TabBar::SetColor(Tizen::Graphics::Color color)
+_TabBar::SetColor(Color color)
{
return SetProperty("color", Variant(color));
}
-Tizen::Graphics::Color
+Color
_TabBar::GetColor(void) const
{
Variant color = GetProperty("color");
Variant
_TabBar::GetPropertyNormalItemColor(void) const
{
- return Tizen::Ui::Variant(__itemColor[ITEM_STATUS_NORMAL]);
+ return Variant(__itemColor[ITEM_STATUS_NORMAL]);
}
result
Variant
_TabBar::GetPropertySelectedItemColor(void) const
{
- return Tizen::Ui::Variant(__itemColor[ITEM_STATUS_SELECTED]);
+ return Variant(__itemColor[ITEM_STATUS_SELECTED]);
}
result
Variant
_TabBar::GetPropertyPressedItemColor(void) const
{
- return Tizen::Ui::Variant(__itemColor[ITEM_STATUS_PRESSED]);
+ return Variant(__itemColor[ITEM_STATUS_PRESSED]);
}
result
Variant
_TabBar::GetPropertyDisabledItemColor(void) const
{
- return Tizen::Ui::Variant(__itemColor[ITEM_STATUS_DISABLED]);
+ return Variant(__itemColor[ITEM_STATUS_DISABLED]);
}
result
-_TabBar::SetItemColor(_TabBarItemStatus itemStatus, Tizen::Graphics::Color color)
+_TabBar::SetItemColor(_TabBarItemStatus itemStatus, Color color)
{
result r = E_SUCCESS;
return r;
}
-Tizen::Graphics::Color
+Color
_TabBar::GetItemColor(_TabBarItemStatus itemStatus) const
{
Color itemColor;
Variant
_TabBar::GetPropertyNormalItemTextColor(void) const
{
- return Tizen::Ui::Variant(__itemTextColor[ITEM_STATUS_NORMAL]);
+ return Variant(__itemTextColor[ITEM_STATUS_NORMAL]);
}
result
Variant
_TabBar::GetPropertySelectedItemTextColor(void) const
{
- return Tizen::Ui::Variant(__itemTextColor[ITEM_STATUS_SELECTED]);
+ return Variant(__itemTextColor[ITEM_STATUS_SELECTED]);
}
result
Variant
_TabBar::GetPropertyPressedItemTextColor(void) const
{
- return Tizen::Ui::Variant(__itemTextColor[ITEM_STATUS_PRESSED]);
+ return Variant(__itemTextColor[ITEM_STATUS_PRESSED]);
}
result
Variant
_TabBar::GetPropertyDisabledItemTextColor(void) const
{
- return Tizen::Ui::Variant(__itemTextColor[ITEM_STATUS_DISABLED]);
+ return Variant(__itemTextColor[ITEM_STATUS_DISABLED]);
}
void
-_TabBar::SetItemTextColor(_TabBarItemStatus status, Tizen::Graphics::Color color)
+_TabBar::SetItemTextColor(_TabBarItemStatus status, Color color)
{
Color itemTextColor;
result r = E_SUCCESS;
}
-Tizen::Graphics::Color
+Color
_TabBar::GetItemTextColor(_TabBarItemStatus status) const
{
Color itemTextColor;
}
_TabBarItem*
-_TabBar::GetItemFromPosition(const Tizen::Graphics::FloatPoint& position) const
+_TabBar::GetItemFromPosition(const FloatPoint& position) const
{
return __pTabBarPresenter->GetItemFromPosition(position);
}
GET_SHAPE_CONFIG(TABBAR::HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, height);
result r = SetSize(FloatDimension(width, height));
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__pTabBarPresenter->ResetItemPositionX();
return r;
}
void
-_TabBar::AddActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener)
+_TabBar::AddActionEventListener(const _IActionEventListener& listener)
{
ClearLastResult();
if (__pActionEvent == null || IsFailed(GetLastResult()))
{
- SysLog(NID_UI_CTRL, "[E_INVALID_STATE] System error occured.");
+ SysLog(NID_UI_CTRL, "[%s] System error occured.", GetErrorMessage(E_INVALID_STATE));
SetLastResult(E_INVALID_STATE);
delete __pActionEvent;
return;
}
void
-_TabBar::RemoveActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener)
+_TabBar::RemoveActionEventListener(const _IActionEventListener& listener)
{
- SysTryReturnVoidResult(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE, "[E_INVALID_STATE] This instance isn't constructed.")
+ SysTryReturnVoidResult(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE, "[%s] This instance isn't constructed.", GetErrorMessage(E_INVALID_STATE))
// Todo : check fail case of RemoveListener
__pActionEvent->RemoveListener(listener);
}
if (__pActionEvent)
{
IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(pItem->GetActionId());
- SysTryReturn(NID_UI_CTRL, pEventArg != null, E_INVALID_STATE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, E_INVALID_STATE, GetLastResult(), "[%s] Memory allocation failed.", GetErrorMessage(GetLastResult()));
PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, this);
__pActionEvent->Fire(*pEventArg);
}
void
-_TabBar::OnFontChanged(Font * pFont)
+_TabBar::OnFontChanged(Font* pFont)
{
__pTabBarPresenter->OnFontChanged(pFont);
}
if (__pActionEvent)
{
IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(pItem->GetActionId());
- SysTryReturn(NID_UI_CTRL, pEventArg != null, E_INVALID_STATE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, E_INVALID_STATE, GetLastResult(), "[%s] Memory allocation failed.", GetErrorMessage(GetLastResult()));
PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, this);
__pActionEvent->Fire(*pEventArg);
using namespace Tizen::Ui;
using namespace Tizen::Graphics;
-using namespace Tizen::Base::Runtime;
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Runtime;
namespace Tizen { namespace Ui { namespace Controls
{
}
_TabBarImpl*
-_TabBarImpl::CreateTabBarImplN(TabBar* pTabBar, const Tizen::Graphics::FloatRectangle& bounds)
+_TabBarImpl::CreateTabBarImplN(TabBar* pTabBar, const FloatRectangle& bounds)
{
ClearLastResult();
- SysTryReturn(NID_UI_CTRL, bounds.width >= 0.0f && bounds.height >= 0.0f, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified width is smaller than minimum size.");
+ SysTryReturn(NID_UI_CTRL, bounds.width >= 0.0f && bounds.height >= 0.0f, null, E_INVALID_ARG, "[%s] Invalid argument is used. The specified width is smaller than minimum size.", GetErrorMessage(E_INVALID_ARG));
float height = 0.0f;
GET_SHAPE_CONFIG(TABBAR::HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, height);
result r = E_SUCCESS;
_TabBar* pCore = _TabBar::CreateTabBarN();
- SysTryReturn(NID_UI_CTRL, pCore != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] _TabBar is not constructed.");
+ SysTryReturn(NID_UI_CTRL, pCore != null, null, GetLastResult(), "[%s] Memory allocation failed.", GetErrorMessage(GetLastResult()));
_TabBarImpl* pImpl = new (std::nothrow) _TabBarImpl(pTabBar, pCore);
- r = CheckConstruction(pCore, pImpl);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pImpl->SetBounds(FloatRectangle(bounds.x, bounds.y, bounds.width, height));
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] SetBounds is failed.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set bounds.", GetErrorMessage(r));
r = pImpl->SetMinimumSize(FloatDimension(pImpl->GetMinimumSizeF().width, height));
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] SetMinimumSize is failed.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set minimum size.", GetErrorMessage(r));
r = pImpl->SetMaximumSize(FloatDimension(pImpl->GetMaximumSizeLimitF().width, height));
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] SetMaximumSize is failed.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set maximum size.", GetErrorMessage(r));
return pImpl;
}
result
-_TabBarImpl::AddItem(const Tizen::Base::String& text, int actionId)
+_TabBarImpl::AddItem(const String& text, int actionId)
{
int itemMaxCnt = 0;
- GET_SHAPE_CONFIG(TABBAR::ITEM_COUNT_MAX, GetCore().GetOrientation(), itemMaxCnt);
+
+ GET_FIXED_VALUE_CONFIG(TABBAR::ITEM_COUNT_MAX, GetCore().GetOrientation(), itemMaxCnt);
SysTryReturn(NID_UI_CTRL, GetCore().GetItemCount() < itemMaxCnt, E_MAX_EXCEEDED, E_MAX_EXCEEDED, "[E_MAX_EXCEEDED] The item is not added more than %d.", itemMaxCnt);
return GetCore().AddItem(text, actionId);
}
result
-_TabBarImpl::InsertItemAt(int index, const Tizen::Base::String& text, int actionId)
+_TabBarImpl::InsertItemAt(int index, const String& text, int actionId)
{
int itemMaxCnt = 0;
- GET_SHAPE_CONFIG(TABBAR::ITEM_COUNT_MAX, GetCore().GetOrientation(), itemMaxCnt);
+
+ GET_FIXED_VALUE_CONFIG(TABBAR::ITEM_COUNT_MAX, GetCore().GetOrientation(), itemMaxCnt);
SysTryReturn(NID_UI_CTRL, GetCore().GetItemCount() < itemMaxCnt, E_MAX_EXCEEDED, E_MAX_EXCEEDED, "[E_MAX_EXCEEDED] The item is not added more than %d.", itemMaxCnt);
SysTryReturn(NID_UI_CTRL, index >= 0 && index <= GetCore().GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] This index(%d) is invalid.", index);
return GetCore().InsertItemAt(index, text, actionId);
}
-Tizen::Graphics::Color
+Color
_TabBarImpl::GetColor(void) const
{
return GetCore().GetColor();
return GetCore().GetItemCount();
}
-Tizen::Graphics::Color
+Color
_TabBarImpl::GetSelectedItemColor(void) const
{
return GetCore().GetItemColor(ITEM_STATUS_SELECTED);
}
-Tizen::Graphics::Color
+Color
_TabBarImpl::GetItemTextColor(TabBarItemStatus status) const
{
if (status == TAB_BAR_ITEM_STATUS_NORMAL)
return GetCore().GetItemTextColor(ITEM_STATUS_SELECTED);
}
- return Tizen::Graphics::Color(0);
+ return Color(0);
}
int
result
_TabBarImpl::RemoveItemAt(int index)
{
- SysTryReturn(NID_UI_CTRL, index >= 0 && index < GetCore().GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] This index(%d) is invalid.", index);
+ SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < GetCore().GetItemCount(), E_OUT_OF_RANGE, "This index(%d) is out of range.", index);
return GetCore().RemoveItemAt(index);
}
}
result
-_TabBarImpl::SetColor(const Tizen::Graphics::Color& color)
+_TabBarImpl::SetColor(const Color& color)
{
return GetCore().SetColor(color);
}
result
-_TabBarImpl::SetItemAt(int index, const Tizen::Base::String& text, int actionId)
+_TabBarImpl::SetItemAt(int index, const String& text, int actionId)
{
- SysTryReturn(NID_UI_CTRL, index >= 0 && index < GetCore().GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] This index(%d) is invalid.", index);
+ SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < GetCore().GetItemCount(), E_OUT_OF_RANGE, "This index(%d) is out of range.", index);
return GetCore().SetItemAt(index, text, actionId);
}
result
_TabBarImpl::SetItemSelected(int index)
{
- SysTryReturn(NID_UI_CTRL, index >= 0 && index < GetCore().GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] This index(%d) is invalid.", index);
+ SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < GetCore().GetItemCount(), E_OUT_OF_RANGE, "This index(%d) is out of range.", index);
return GetCore().SetItemSelected(index);
}
result
-_TabBarImpl::SetItemTextColor(TabBarItemStatus status, const Tizen::Graphics::Color& color)
+_TabBarImpl::SetItemTextColor(TabBarItemStatus status, const Color& color)
{
if (status == TAB_BAR_ITEM_STATUS_NORMAL)
{
}
result
-_TabBarImpl::SetSelectedItemColor(const Tizen::Graphics::Color& color)
+_TabBarImpl::SetSelectedItemColor(const Color& color)
{
return GetCore().SetItemColor(ITEM_STATUS_SELECTED, color);
}
}
void
-_TabBarImpl::AddActionEventListener(Tizen::Ui::IActionEventListener& listener)
+_TabBarImpl::AddActionEventListener(IActionEventListener& listener)
{
ClearLastResult();
if (__pPublicActionEvent == null || IsFailed(GetLastResult()))
{
- SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[E_INVALID_STATE] System error occurred.");
+ SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[%s] __pPublicActionEvent must not be null.", GetErrorMessage(E_INVALID_STATE));
SetLastResult(E_INVALID_STATE);
delete __pPublicActionEvent;
return;
}
void
-_TabBarImpl::RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener)
+_TabBarImpl::RemoveActionEventListener(IActionEventListener& listener)
{
- SysTryReturnVoidResult(NID_UI_CTRL, __pPublicActionEvent, E_INVALID_STATE, "[E_INVALID_STATE] This instance isn't constructed.")
+ SysTryReturnVoidResult(NID_UI_CTRL, __pPublicActionEvent, E_INVALID_STATE, "[%s] This instance is not constructed yet.", GetErrorMessage(E_INVALID_STATE))
// Todo : check fail case of RemoveListener
__pPublicActionEvent->RemoveListener(listener);
}
void
-_TabBarImpl::OnActionPerformed(const Tizen::Ui::_Control& source, int actionId)
+_TabBarImpl::OnActionPerformed(const _Control& source, int actionId)
{
if (__pPublicActionEvent != null)
{
GetInstance(_UiBuilder* uibuilder)
{
_TabBarMaker* pTabBarMaker = new (std::nothrow) _TabBarMaker(uibuilder);
- SysTryReturn(NID_UI_CTRL, pTabBarMaker != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pTabBarMaker != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pTabBarMaker;
};
protected:
- virtual Tizen::Ui::Control*
+ virtual Control*
Make(_UiBuilderControl* pControl)
{
result r = E_SUCCESS;
_UiBuilderControlLayout* pControlProperty = null;
TabBar* pTabBar = null;
- Tizen::Graphics::FloatRectangle rect;
- Tizen::Base::String elementString;
+ FloatRectangle rect;
+ String elementString;
int opacity = 0;
Color color;
//Construct
pTabBar = new (std::nothrow) TabBar();
- SysTryReturn(NID_UI_CTRL, pTabBar != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pTabBar != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pTabBar->Construct(rect.x, rect.y, rect.width);
if (r != E_SUCCESS)
}
void
-_TabBarItem::SetText(const Tizen::Base::String& text, _ControlOrientation orientation)
+_TabBarItem::SetText(const String& text, _ControlOrientation orientation)
{
float fontSize = 0.0f;
GET_SHAPE_CONFIG(TABBAR::FONT_SIZE, orientation, fontSize);
__text = text;
}
-Tizen::Base::String
+String
_TabBarItem::GetText(void) const
{
return __text;
}
void
-_TabBarItem::SetBounds(const Tizen::Graphics::FloatRectangle& bounds)
+_TabBarItem::SetBounds(const FloatRectangle& bounds)
{
__bounds = bounds;
}
-Tizen::Graphics::FloatRectangle
+FloatRectangle
_TabBarItem::GetBounds(void) const
{
return __bounds;
using namespace Tizen::Graphics;
+using namespace Tizen::Base;
namespace Tizen { namespace Ui { namespace Controls
{
}
result
-_TabBarModel::AddItem(const Tizen::Base::String& text, int actionId, _ControlOrientation orientation)
+_TabBarModel::AddItem(const String& text, int actionId, _ControlOrientation orientation)
{
_TabBarItem* pItem = new (std::nothrow) _TabBarItem(orientation);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
pItem->SetText(text, orientation);
pItem->SetActionId(actionId);
}
result
-_TabBarModel::InsertItemAt(int index, const Tizen::Base::String& text, int actionId, _ControlOrientation orientation)
+_TabBarModel::InsertItemAt(int index, const String& text, int actionId, _ControlOrientation orientation)
{
- SysTryReturn(NID_UI_CTRL, index >= 0 && index <= GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument(%d) is out of range.", index);
+ SysTryReturnResult(NID_UI_CTRL, index >= 0 && index <= GetItemCount(), E_OUT_OF_RANGE, "The index (%d) is out of range.", index);
if (GetItemCount() == 0)
{
return AddItem(text, actionId, orientation);
}
_TabBarItem* pItem = new (std::nothrow) _TabBarItem(orientation);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
pItem->SetText(text, orientation);
pItem->SetActionId(actionId);
}
result r = __tabBarItems.InsertAt(*pItem, index);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = ReCalculateItemPosition(index + 1, orientation);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return E_SUCCESS;
}
result
-_TabBarModel::SetItemAt(int index, const Tizen::Base::String& text, int actionId, _ControlOrientation orientation)
+_TabBarModel::SetItemAt(int index, const String& text, int actionId, _ControlOrientation orientation)
{
_TabBarItem* pItem = static_cast <_TabBarItem*>(__tabBarItems.GetAt(index));
- SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The %d index item is not exist.", index);
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "Invalid argument is used. The item at index (%d) does not exist.", index);
pItem->SetText(text, orientation);
pItem->SetActionId(actionId);
result r = ReCalculateItemPosition(index + 1, orientation);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return E_SUCCESS;
}
_TabBarModel::RemoveItemAt(int index, _ControlOrientation orientation)
{
_TabBarItem* pItem = static_cast <_TabBarItem*>(__tabBarItems.GetAt(index));
- SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The %d index item is not exist.", index);
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "Invalid argument is used. The item at index(%d) does not exist.", index);
float itemMargin = 0.0f;
GET_SHAPE_CONFIG(TABBAR::ITEM_MARGIN, orientation, itemMargin);
result r = __tabBarItems.RemoveAt(index, true);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = ReCalculateItemPosition(index, orientation);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return E_SUCCESS;
}
result
_TabBarModel::ReCalculateItemPosition(int itemIndex, _ControlOrientation orientation)
{
- SysTryReturn(NID_UI_CTRL, itemIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The itemIndex(%d) is negative.");
+ SysTryReturnResult(NID_UI_CTRL, itemIndex >= 0, E_INVALID_ARG, "Invalid argument is used. The itemIndex(%d) is negative.");
int itemCount = __tabBarItems.GetCount();
float itemMargin = 0.0f;
GET_SHAPE_CONFIG(TABBAR::ITEM_MARGIN, orientation, itemMargin);
result
_TabBarPresenter::Construct(void)
{
- __pTabBarModel = new (std::nothrow) _TabBarModel;
- SysTryReturn(NID_UI_CTRL, __pTabBarModel != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ __pTabBarModel = new (std::nothrow) _TabBarModel();
+ SysTryReturnResult(NID_UI_CTRL, __pTabBarModel != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
result r = E_SUCCESS;
r = LoadBitmap();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
return r;
{
result r = E_SUCCESS;
__pFont = __tabBar.GetFallbackFont();
- SysTryCatch(NID_UI_CTRL, __pFont != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pFont != null, r = GetLastResult(), GetLastResult(), "[%s] Propgating.", GetErrorMessage(GetLastResult()));
__pTextObject = new (std::nothrow) TextObject();
- SysTryCatch(NID_UI_CTRL, __pTextObject != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pTextObject != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTextObject->Construct();
__pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE);
result
_TabBarPresenter::LoadBitmap(void)
{
- Bitmap* pBitmap = null;
Color arrowColor;
+ bool isCustomColor;
GET_COLOR_CONFIG(TABBAR::ARROW_BG_NORMAL, arrowColor);
if (__pBgBitmapCached != null)
}
result r;
- r = GET_BITMAP_CONFIG_N(TABBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- __pBgBitmapCached = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), __tabBar.GetColor());
- delete pBitmap;
- pBitmap = null;
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __tabBar.GetColor(), __pBgBitmapCached);
+ SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
r = GET_BITMAP_CONFIG_N(TABBAR::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgEffectBitmapCached);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(TABBAR::LEFT_ARROW_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap);
- __pLeftArrowBitmapCached = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), arrowColor);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::LEFT_ARROW_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, arrowColor, __pLeftArrowBitmapCached);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- delete pBitmap;
- pBitmap = null;
- r = GET_BITMAP_CONFIG_N(TABBAR::RIGHT_ARROW_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap);
- __pRightArrowBitmapCached = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), arrowColor);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::RIGHT_ARROW_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, arrowColor, __pRightArrowBitmapCached);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- delete pBitmap;
- pBitmap = null;
- r = GET_BITMAP_CONFIG_N(TABBAR::ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap);
- __pItemBgBitmapCached[ITEM_STATUS_SELECTED] = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), __tabBar.GetItemColor(ITEM_STATUS_SELECTED));
+ isCustomColor = IS_CUSTOM_COLOR(TABBAR::ITEM_BG_NORMAL);
+ if (isCustomColor)
+ {
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __tabBar.GetItemColor(ITEM_STATUS_NORMAL), __pItemBgBitmapCached[ITEM_STATUS_NORMAL]);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __tabBar.GetItemColor(ITEM_STATUS_SELECTED), __pItemBgBitmapCached[ITEM_STATUS_SELECTED]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- delete pBitmap;
- pBitmap = null;
- r = GET_BITMAP_CONFIG_N(TABBAR::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap);
- __pItemBgBitmapCached[ITEM_STATUS_PRESSED] = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), __tabBar.GetItemColor(ITEM_STATUS_PRESSED));
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __tabBar.GetItemColor(ITEM_STATUS_PRESSED), __pItemBgBitmapCached[ITEM_STATUS_PRESSED]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- delete pBitmap;
- pBitmap = null;
- r = GET_BITMAP_CONFIG_N(TABBAR::ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap);
- __pItemBgBitmapCached[ITEM_STATUS_DISABLED] = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), __tabBar.GetItemColor(ITEM_STATUS_DISABLED));
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __tabBar.GetItemColor(ITEM_STATUS_DISABLED), __pItemBgBitmapCached[ITEM_STATUS_DISABLED]);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
- delete pBitmap;
- pBitmap = null;
+
return E_SUCCESS;
CATCH:
- delete pBitmap;
delete __pBgBitmapCached;
__pBgBitmapCached = null;
}
result
-_TabBarPresenter::AddItem(const Tizen::Base::String& text, int actionId)
+_TabBarPresenter::AddItem(const String& text, int actionId)
{
return __pTabBarModel->AddItem(text, actionId, _CONTROL_ORIENTATION_PORTRAIT);
}
result
-_TabBarPresenter::InsertItemAt(int index, const Tizen::Base::String& text, int actionId)
+_TabBarPresenter::InsertItemAt(int index, const String& text, int actionId)
{
if (index <= __pTabBarModel->GetSelectedItemIndex())
{
}
result r = __pTabBarModel->InsertItemAt(index, text, actionId, _CONTROL_ORIENTATION_PORTRAIT);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
return E_SUCCESS;
}
result
-_TabBarPresenter::SetItemAt(int index, const Tizen::Base::String& text, int actionId)
+_TabBarPresenter::SetItemAt(int index, const String& text, int actionId)
{
return __pTabBarModel->SetItemAt(index, text, actionId, _CONTROL_ORIENTATION_PORTRAIT);
}
}
result r = __pTabBarModel->RemoveItemAt(index, _CONTROL_ORIENTATION_PORTRAIT);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
if (GetItemCount() != 0)
{
r = SetItemSelected(0);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
else
{
_TabBarPresenter::SetItemSelected(int index)
{
- SysTryReturn(NID_UI_CTRL, index >= 0 && index < GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
+ SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < GetItemCount(), E_OUT_OF_RANGE, "The index (%d) is out of range.", index);
int oldSelectedItemIndex = GetSelectedItemIndex();
if (index == oldSelectedItemIndex)
}
_TabBarItem* pItem = GetItemAt(oldSelectedItemIndex);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
pItem->SetStatus(ITEM_STATUS_NORMAL);
_AccessibilityElement* pElement = pItem->GetAccessibilityElement();
if(pElement != null)
pItem = GetItemAt(index);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
pItem->SetStatus(ITEM_STATUS_SELECTED);
pElement = pItem->GetAccessibilityElement();
if(pElement != null)
pElement->SetHintDisabled(true);
}
+ FloatRectangle itemBounds = pItem->GetBounds();
+ FloatRectangle clientBounds = __tabBar.GetBoundsF();
+
+ if (itemBounds.x < 0.0f)
+ {
+ SetTopDrawnItemIndex(index);
+ }
+ else if ((clientBounds.width - __sideMargin * 2.0f - __arrowMargin * 2.0f) < (itemBounds.x + itemBounds.width))
+ {
+ float movableDistance = (itemBounds.x + itemBounds.width) - (clientBounds.width - __sideMargin * 2.0f - __arrowMargin);
+ AdjustItemPositionX(-movableDistance);
+ }
+
__pTabBarModel->SetSelectedItemIndex(index);
return E_SUCCESS;
}
int
-_TabBarPresenter::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const
+_TabBarPresenter::GetItemIndexFromPosition(const FloatPoint& point) const
{
FloatRectangle clientBounds = __tabBar.GetBoundsF();
}
int
-_TabBarPresenter::GetItemIndexFromAbsPosition(const Tizen::Graphics::FloatPoint& point) const
+_TabBarPresenter::GetItemIndexFromAbsPosition(const FloatPoint& point) const
{
FloatRectangle clientBounds = __tabBar.GetBoundsF();
}
_TabBarItem*
-_TabBarPresenter::GetItemFromPosition(const Tizen::Graphics::FloatPoint& position) const
+_TabBarPresenter::GetItemFromPosition(const FloatPoint& position) const
{
SetLastResult(E_SUCCESS);
int index = GetItemIndexFromPosition(position);
- SysTryReturn(NID_UI_CTRL, index != -1, null, E_SYSTEM, "[E_SYSTEM] Item not found.");
+ SysTryReturn(NID_UI_CTRL, index != -1, null, E_SYSTEM, "[%s] A system error has occurred. Item not found.", GetErrorMessage(E_SYSTEM));
return __pTabBarModel->GetItemAt(index);
}
result
_TabBarPresenter::SetTopDrawnItemIndex(int index)
{
- SysTryReturn(NID_UI_CTRL, index >= 0 && index < GetItemCount(),
- E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument(%d) is out of range.", index);
+ SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < GetItemCount(),
+ E_OUT_OF_RANGE, "The index (%d) is out of range.", index);
_TabBarItem* pTopItem = GetItemAt(index);
result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
float distance = pTopItem->GetBounds().x;
_TabBarItem* pLastItem = GetItemAt(GetItemCount() - 1);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
FloatRectangle clientBounds = __tabBar.GetBoundsF();
float movableDistance = (pLastItem->GetBounds().x + pLastItem->GetBounds().width) - (clientBounds.width - __sideMargin * 2.0f - __arrowMargin * 2.0f);
distance = movableDistance;
}
- r = AdjustItemPositionX(-distance);
+ r = AdjustItemPositionX(-distance + __arrowMargin);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
_TabBarPresenter::SetItemStatus(int index, _TabBarItemStatus status)
{
_TabBarItem* pItem = __pTabBarModel->GetItemAt(index);
- SysTryReturn(NID_UI_CTRL, pItem, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Item(%d) not exists.", index);
+ SysTryReturnResult(NID_UI_CTRL, pItem, E_SYSTEM, "A system error has occurred. Item at index (%d) does not exists.", index);
pItem->SetStatus(status);
_TabBarPresenter::GetItemStatus(int index) const
{
_TabBarItem* pItem = __pTabBarModel->GetItemAt(index);
- SysTryReturn(NID_UI_CTRL, pItem, ITEM_STATUS_NORMAL, E_SYSTEM, "[E_SYSTEM] Item(%d) not exists.", index);
+ SysTryReturn(NID_UI_CTRL, pItem, ITEM_STATUS_NORMAL, E_SYSTEM, "[%s] A system error has occured. Item at index (%d) does not exists.", GetErrorMessage(E_SYSTEM), index);
_TabBarItemStatus status = pItem->GetStatus();
while (index < GetItemCount())
{
_TabBarItem* pItem = __pTabBarModel->GetItemAt(index);
- SysTryReturn(NID_UI_CTRL, pItem, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Item(%d) not exists.", index);
+ SysTryReturnResult(NID_UI_CTRL, pItem, E_INVALID_STATE, "Item at index (%d) does not exists.", index);
FloatRectangle bounds = pItem->GetBounds();
bounds.x += distance;
pItem->SetBounds(bounds);
}
result
-_TabBarPresenter::SetReplacementColor(const Tizen::Graphics::Color& color)
+_TabBarPresenter::SetReplacementColor(const Color& color)
{
- Bitmap* pBitmap = null;
Bitmap* pColorReplcedBitmap = null;
result r;
- r = GET_BITMAP_CONFIG_N(TABBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap);
- SysTryReturn(NID_UI_CTRL, pBitmap != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Image loading fail.");
- pColorReplcedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), color);
- delete pBitmap;
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, color, pColorReplcedBitmap);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Image loading fail.", GetErrorMessage(E_SYSTEM));
if (__pBgBitmapCached != null)
{
}
result
-_TabBarPresenter::SetItemReplacementColor(_TabBarItemStatus itemStatus, const Tizen::Graphics::Color& color)
+_TabBarPresenter::SetItemReplacementColor(_TabBarItemStatus itemStatus, const Color& color)
{
- Bitmap* pBitmap = null;
Bitmap* pColorReplcedBitmap = null;
result r;
if (itemStatus == ITEM_STATUS_SELECTED)
{
- r = GET_BITMAP_CONFIG_N(TABBAR::ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap);
- SysTryReturn(NID_UI_CTRL, pBitmap != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Image loading fail.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, color, pColorReplcedBitmap);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Image loading fail.", GetErrorMessage(E_SYSTEM));
}
else if (itemStatus == ITEM_STATUS_PRESSED)
{
- r = GET_BITMAP_CONFIG_N(TABBAR::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap);
- SysTryReturn(NID_UI_CTRL, pBitmap != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Image loading fail.");
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABBAR::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, color, pColorReplcedBitmap);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Image loading fail.", GetErrorMessage(E_SYSTEM));
}
else
{
return E_SUCCESS;
}
- pColorReplcedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), color);
- delete pBitmap;
if (__pItemBgBitmapCached[itemStatus] != null)
{
_TabBarPresenter::Draw(void)
{
Canvas* pCanvas = __tabBar.GetCanvasN();
- SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "[E_SYSTEM] It can not get canvas.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "[%s] A system error has occured. Canvas instance must be null.", GetErrorMessage(E_SYSTEM));
FloatRectangle clientBounds = __tabBar.GetBoundsF();
}
_TabBarItem* pItem = GetItemAt(itemIndex);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Item loading fail.");
+ SysTryReturnResult(NID_UI_CTRL, pItem != null, E_SYSTEM, "Failed to load an item.");
FloatRectangle itemBounds = pItem->GetBounds();
FloatRectangle clientBounds = __tabBar.GetBoundsF();
else
{
r = SetTopDrawnItemIndex(firstDrawnItemIndex + 1);
-
- pItem = GetItemAt(itemIndex);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Item loading fail.");
-
- itemBounds = pItem->GetBounds();
- AdjustItemPositionX((clientBounds.width - (__sideMargin * 2.0f)) - (itemBounds.x + itemBounds.width));
}
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
__tabBar.Invalidate();
_TabBarItem* pFirstItem = __pTabBarModel->GetItemAt(0);
_TabBarItem* pLastItem = __pTabBarModel->GetItemAt(itemCount - 1);
- SysTryReturnVoidResult(NID_UI_CTRL, pFirstItem != null && pLastItem != null, E_SYSTEM, "[E_SYSTEM] Item not found.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pFirstItem != null && pLastItem != null, E_SYSTEM, "[%s] A system error has occurred. Item not found.", GetErrorMessage(E_SYSTEM));
FloatRectangle clientBounds = __tabBar.GetBoundsF();
FloatRectangle firstItemBounds = pFirstItem->GetBounds();
if (!_FloatCompare(firstItemBounds.x, 0.0f) && lastItemBounds.x + lastItemBounds.width - firstItemBounds.x < clientBounds.width - __sideMargin * 2.0f)
{
- AdjustItemPositionX(-firstItemBounds.x);
+ AdjustItemPositionX(-firstItemBounds.x + __arrowMargin);
}
else if (!_FloatCompare(firstItemBounds.x, 0.0f) && lastItemBounds.x + lastItemBounds.width < clientBounds.width - __sideMargin * 2.0f)
{
}
void
-_TabBarPresenter::DrawItem(Tizen::Graphics::Canvas* pCanvas)
+_TabBarPresenter::DrawItem(Canvas* pCanvas)
{
- SysTryReturnVoidResult(NID_UI_CTRL, __pTextObject != null, E_INVALID_STATE, "[E_INVALID_STATE] TextObject is not constructed.");
+ result r = E_SUCCESS;
+ SysTryReturnVoidResult(NID_UI_CTRL, __pTextObject != null, E_INVALID_STATE, "[%s] TextObject is not constructed.", GetErrorMessage(E_INVALID_STATE));
FloatRectangle clientBounds = pCanvas->GetBoundsF();
textColor = __tabBar.GetItemTextColor(ITEM_STATUS_DISABLED);
if (__pItemBgBitmapCached[ITEM_STATUS_DISABLED] != null)
{
- pCanvas->DrawNinePatchedBitmap(itemBounds, *__pItemBgBitmapCached[ITEM_STATUS_DISABLED]);
+ r = DrawBitmap(*pCanvas, itemBounds, *__pItemBgBitmapCached[ITEM_STATUS_DISABLED]);
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
else
textColor = __tabBar.GetItemTextColor(itemStatus);
if (__pItemBgBitmapCached[itemStatus] != null)
{
- pCanvas->DrawNinePatchedBitmap(itemBounds, *__pItemBgBitmapCached[itemStatus]);
+ r = DrawBitmap(*pCanvas, itemBounds, *__pItemBgBitmapCached[itemStatus]);
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
drawText = pDrawItem->GetText();
__pTextObject->RemoveAll();
pSimpleText = new (std::nothrow)TextSimple(const_cast <wchar_t*>(drawText.GetPointer()), drawText.GetLength());
- SysTryReturnVoidResult(NID_UI_CTRL, pSimpleText != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] TextSimple is not constructed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pSimpleText != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pFont = __tabBar.GetFallbackFont();
SysTryReturnVoidResult(NID_UI_CTRL, __pFont != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
}
void
-_TabBarPresenter::DrawBackground(Tizen::Graphics::Canvas* pCanvas)
+_TabBarPresenter::DrawBackground(Canvas* pCanvas)
{
result r = E_SUCCESS;
FloatRectangle clientBounds = __tabBar.GetBoundsF();
}
void
-_TabBarPresenter::DrawArrow(Tizen::Graphics::Canvas* pCanvas)
+_TabBarPresenter::DrawArrow(Canvas* pCanvas)
{
FloatRectangle clientBounds = __tabBar.GetBoundsF();
}
result
-_TabBarPresenter::DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap)
+_TabBarPresenter::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, const Bitmap& bitmap)
{
result r = E_SUCCESS;
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap))
{
result r = E_SUCCESS;
- Tab* pTab = new (std::nothrow) Tab;
+ Tab* pTab = new (std::nothrow) Tab();
SysTryReturn(NID_UI_CTRL, (pTab != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = pTab->Construct();
, __isRecalculateNeeded(false)
, __isEditMode(false)
, __editItemIndex(-1)
- //, __pVerticalLineBitmap(null)
, __pHorizontalLineBitmap(null)
-// , __pFrontScrollingEffectBitmap(null)
-// , __pRearScrollingEffectBitmap(null)
-// , __pScrollingEffectBitmap(null)
, __pFocusBitmap(null)
-// , __pScrollingEffectVe(null)
, __pFlickAnimationTimer(null)
, __pScrollAnimationTimer(null)
, __flickAnimation()
, __reorderDist(0.0f)
, __firstItemIndex(0)
, __lastItemIndex(0)
-// , __isScrollEffectEnded(false)
-// , __isScrollEffectStarted(false)
, __timerCount(0)
, __isTouchMove(false)
-// , __scrollFlag(0)
, __tabMinimumSize(0.0f)
, __fontChangeItemCount(0)
__pTextObject = null;
}
- //if (__pVerticalLineBitmap)
- //{
- // delete __pVerticalLineBitmap;
- // __pVerticalLineBitmap = null;
- //}
-
if (__pHorizontalLineBitmap)
{
delete __pHorizontalLineBitmap;
__pScrollAnimationTimer = null;
}
-// if (__pFrontScrollingEffectBitmap)
-// {
-// delete __pFrontScrollingEffectBitmap;
-// __pFrontScrollingEffectBitmap = null;
-// }
-
-// if (__pRearScrollingEffectBitmap)
-// {
-// delete __pRearScrollingEffectBitmap;
-// __pRearScrollingEffectBitmap = null;
-// }
-//
-// if (__pScrollingEffectBitmap)
-// {
-// __pScrollingEffectBitmap = null;
-// }
-
- if(__pFocusBitmap)
+ if (__pFocusBitmap)
{
delete __pFocusBitmap;
__pFocusBitmap = null;
}
-// if (__pScrollingEffectVe)
-// {
-// __pScrollingEffectVe->RemoveAllAnimations();
-// __pScrollingEffectVe->Destroy();
-// __pScrollingEffectVe = null;
-// }
}
result
__pFont = __pTab->GetFallbackFont();
SysTryReturn(NID_UI_CTRL, __pFont, E_SYSTEM , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to retrive Font.");
- _TabModel* pModel = new (std::nothrow) _TabModel;
+ _TabModel* pModel = new (std::nothrow) _TabModel();
SysTryReturn(NID_UI_CTRL, pModel, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = SetModel(*pModel);
r = pModel->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to construct _TabModel instance.");
- __pTextObject = new (std::nothrow) TextObject;
+ __pTextObject = new (std::nothrow) TextObject();
SysTryCatch(NID_UI_CTRL, __pTextObject, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pTextObject->Construct();
_TabPresenter::LoadBitmap(void)
{
result r = E_SUCCESS;
- Tizen::Graphics::Bitmap* pBitmap = null;
- Tizen::Graphics::Bitmap* pFocusBitmap = null;
Color focusBgColor(0x00000000);
Color itemSelectedColor(0x00000000);
- r = GET_BITMAP_CONFIG_N(TAB::ITEM_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap);
- SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate horizontal line bitmap.");
-
GET_COLOR_CONFIG(TAB::ITEM_SELECTED, itemSelectedColor);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, itemSelectedColor, __pHorizontalLineBitmap);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to locate horizontal line bitmap.");
- if (pBitmap)
- {
- __pHorizontalLineBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pBitmap), Color::GetColor(COLOR_ID_MAGENTA), itemSelectedColor);
- SysTryLog(NID_UI_CTRL, (__pHorizontalLineBitmap != null), "Failed to locate focus item line bitmap.");
- }
+ GET_COLOR_CONFIG(TAB::ITEM_BG_HIGHLIGHTED, focusBgColor);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TAB::ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, focusBgColor, __pFocusBitmap);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Failed to locate focus bitmap.");
-// r = GET_BITMAP_CONFIG_N(TAB::TAB_BOUNCE_EFFECT_LEFT, BITMAP_PIXEL_FORMAT_ARGB8888, __pFrontScrollingEffectBitmap);
-// SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate overscrolling left bitmap.");
+ return r;
-// r = GET_BITMAP_CONFIG_N(TAB::TAB_BOUNCE_EFFECT_RIGHT, BITMAP_PIXEL_FORMAT_ARGB8888, __pRearScrollingEffectBitmap);
-// SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate overscrolling right bitmap.");
+CATCH:
- r = GET_BITMAP_CONFIG_N(TAB::ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pFocusBitmap);
- SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate focus bitmap.");
+ delete __pHorizontalLineBitmap;
+ __pHorizontalLineBitmap = null;
- GET_COLOR_CONFIG(TAB::ITEM_BG_HIGHLIGHTED, focusBgColor);
+ delete __pFocusBitmap;
+ __pFocusBitmap = null;
- if (pFocusBitmap)
- {
- __pFocusBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pFocusBitmap), Color::GetColor(COLOR_ID_MAGENTA), focusBgColor);
- SysTryLog(NID_UI_CTRL, (__pFocusBitmap != null), "Failed to locate focus item line bitmap.");
- }
-
- delete pBitmap;
- delete pFocusBitmap;
return r;
}
result
_TabPresenter::SetItemStatus(int index, _TabItemStatus status)
{
- _TabItem *pItem = GetItemAt(index);
+ _TabItem* pItem = GetItemAt(index);
SysTryReturn(NID_UI_CTRL, pItem, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
pItem->SetUpdateState(true);
_TabPresenter::GetItemStatus(int index) const
{
- _TabItem *pItem = __pTab->GetItemAt(index);
+ _TabItem* pItem = __pTab->GetItemAt(index);
if (pItem == null)
{
__isRecalculateNeeded = false;
CalculateItemBounds();
}
- else if (__isFlickEnabled )
+ else if (__isFlickEnabled)
{
DrawHorizontal();
}
void
_TabPresenter::SetEditItemBounds(const FloatPoint& point)
{
- _TabItem *pTabItem = null;
+ _TabItem* pTabItem = null;
FloatRectangle editRect(0.0f, 0.0f, 0.0f, 0.0f);
pTabItem = GetItemAt(__editItemIndex);
SysTryReturnVoidResult(NID_UI_CTRL, pTabItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
return true;
}
-// __scrollFlag = 0;
Rectangle itemBounds(0, 0, 0, 0);
_TabItem* pItem = null;
ResetScrollAnimationTimer();
int index = GetItemIndexFromPosition(touchinfo.GetCurrentPosition());
-// if (__pScrollingEffectVe)
-// {
-// __pScrollingEffectVe->RemoveAllAnimations();
-// __pTab->GetVisualElement()->DetachChild(*__pScrollingEffectVe);
-// __pScrollingEffectVe->Destroy();
-// __pScrollingEffectVe = null;
-// __isScrollEffectEnded = false;
-// __isScrollEffectStarted = false;
-// }
-
int pressedIndex = GetPressedItemIndex();
__isRightScrollable = false;
return true;
}
- _TabItem *pTabItem = null;
- _TabItem *pNextItem = null;
- _TabItem *pPrevItem = null;
+ _TabItem* pTabItem = null;
+ _TabItem* pNextItem = null;
+ _TabItem* pPrevItem = null;
FloatPoint movedPosition = touchinfo.GetCurrentPosition();
int index = GetNextItemIndexFromPosition(movedPosition, __editItemIndex);
distance = movedPosition.x - __currentTouchPosition.x;
__currentTouchPosition.x = movedPosition.x;
-// if (!__isEditMode && distance > 0.0f) //Move right i.e Bounce at leftEnd
-// {
-// __isTouchMove = true;
-// if (!__isDirectionRight)
-// {
-// if (__pScrollingEffectVe)
-// {
-// __pScrollingEffectVe->RemoveAllAnimations();
-// __pTab->GetVisualElement()->DetachChild(*__pScrollingEffectVe);
-// __pScrollingEffectVe->Destroy();
-// __pScrollingEffectVe = null;
-// }
-//
-// __isScrollEffectEnded = false;
-// __isScrollEffectStarted = false;
-// }
-//
-// __isDirectionRight = true;
-// SetFirstLoadedItemIndex();
-// if ( GetItemAt(0)->GetItemBounds().x >= 0.0f)
-// {
-// if (!__isScrollEffectStarted)
-// {
-// __pScrollingEffectBitmap = __pFrontScrollingEffectBitmap;
-// SetOpacityVisualElement(0.0f);
-// StartScrollingEffect();
-// }
-//
-// __isScrollEffectStarted = true;
-// }
-//
-// __moveDistance = distance;
-// DrawHorizontal();
-// Draw();
-// __moveDistance = 0.0f;
-//
-// return true;
-// }
-//
-// if (!__isEditMode && distance < 0.0f)//Move left i.e Bounce at RightEnd
-// {
-// __isTouchMove = true;
-// if (__isDirectionRight)
-// {
-// if (__pScrollingEffectVe)
-// {
-// __pScrollingEffectVe->RemoveAllAnimations();
-// __pTab->GetVisualElement()->DetachChild(*__pScrollingEffectVe);
-// __pScrollingEffectVe->Destroy();
-// __pScrollingEffectVe = null;
-// }
-//
-// __isScrollEffectEnded = false;
-// __isScrollEffectStarted = false;
-// }
-//
-// __isDirectionRight = false;
-// SetLastLoadedItemIndex();
-//
-// if ( __lastLoadedItemIndex == (GetItemCount() - 1) && ((GetItemAt(__lastLoadedItemIndex)->GetItemBounds().x + __itemWidth) <= (__width)))
-// {
-// if (!__isScrollEffectStarted)
-// {
-// int index = (GetItemCount() - 1);
-// float xPosition = (GetItemAt(index)->GetItemBounds().x + (__itemWidth / 2.0f));
-// __pScrollingEffectBitmap = __pRearScrollingEffectBitmap;
-// SetOpacityVisualElement(xPosition);
-// StartScrollingEffect();
-// }
-//
-// __isScrollEffectStarted = true;
-// }
-//
-// __moveDistance = distance;
-// DrawHorizontal();
-// Draw();
-// __moveDistance = 0.0f;
-//
-// return true;
-// }
-
if (!__isEditMode)
{
return false;
{
if (__isDirectionRight)
{
- _TabItem *pLastItem = GetItemAt(__lastItemIndex);
+ _TabItem* pLastItem = GetItemAt(__lastItemIndex);
SysTryReturn(NID_UI_CTRL, pLastItem, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
if ((pLastItem->GetItemBounds().x + pLastItem->GetItemBounds().width) > __width)
bounds = pTabItem->GetItemBounds();
bounds.x = bounds.x + fitDistance;
- if ( i == __firstItemIndex && ( bounds.x ) >= (2.0f * __itemWidth))
+ if (i == __firstItemIndex && ( bounds.x ) >= (2.0f * __itemWidth))
{
return;
}
if (__pFlickAnimationTimer == null)
{
- __pFlickAnimationTimer = new (std::nothrow) Timer;
+ __pFlickAnimationTimer = new (std::nothrow) Timer();
SysTryReturn(NID_UI_CTRL, (__pFlickAnimationTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pFlickAnimationTimer->Construct(*this);
ResetReorderTimer();
if (__pScrollAnimationTimer == null)
{
- __pScrollAnimationTimer = new (std::nothrow) Timer;
+ __pScrollAnimationTimer = new (std::nothrow) Timer();
SysTryReturn(NID_UI_CTRL, (__pScrollAnimationTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pScrollAnimationTimer->Construct(*this);
result r = E_SUCCESS;
if (__pTimerInfo[index]->pReorderTimer == null)
{
- __pTimerInfo[index]->pReorderTimer = new (std::nothrow) Timer;
+ __pTimerInfo[index]->pReorderTimer = new (std::nothrow) Timer();
SysTryReturn(NID_UI_CTRL, (__pTimerInfo[index]->pReorderTimer != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pTimerInfo[index]->pReorderTimer->Construct(*this);
void
_TabPresenter::SwapItems(int indexDest, float distance)
{
- _TabItem *pItem;
+ _TabItem* pItem;
FloatRectangle itemBounds(0.0f, 0.0f, 0.0f, 0.0f);
pItem = GetItemAt(indexDest);
SysTryReturnVoidResult(NID_UI_CTRL, pItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
return;
}
-//void
-//_TabPresenter::SetOpacityVisualElement(float xPosition)
-//{
-// Canvas * pCanvas = null;
-// float bounceWidth = (__itemWidth / 2.0f);
-//
-// if (__pScrollingEffectVe == null)
-// {
-// __pScrollingEffectVe = new (std::nothrow) _VisualElement();
-// SysTryReturnVoidResult(NID_UI_CTRL, __pScrollingEffectVe, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
-//
-// __pScrollingEffectVe->Construct();
-// __pScrollingEffectVe->SetName(L"Opacity");
-// }
-//
-// __pScrollingEffectVe->SetBounds(FloatRectangle(xPosition, 0.0f, bounceWidth, __itemHeight));
-// __pScrollingEffectVe->SetShowState(true);
-// __pScrollingEffectVe->SetImplicitAnimationEnabled(true);
-// __pTab->GetVisualElement()->AttachChild(*__pScrollingEffectVe);
-// pCanvas = __pScrollingEffectVe->GetCanvasN();
-//
-// if (!pCanvas)
-// {
-// __pScrollingEffectVe->Destroy();
-// __pScrollingEffectVe = null;
-//
-// SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-// return;
-// }
-//
-// Color backgroundColor(0, 0, 0, 0);
-// pCanvas->SetBackgroundColor(backgroundColor);
-// pCanvas->Clear();
-// FloatRectangle rect(0.0f, 0.0f, bounceWidth, __itemHeight);
-//
-// DrawResourceBitmap(*pCanvas, rect, __pScrollingEffectBitmap);
-//
-// delete pCanvas;
-// return;
-//}
-
-//void
-//_TabPresenter::StartScrollingEffect(void)
-//{
-// float __startOpacity = 0.0f;
-// float __endOpacity = 1.0f;
-//
-// VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation();
-// SysTryReturnVoidResult(NID_UI_CTRL, pAnimation, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
-//
-// pAnimation->SetPropertyName(L"opacity");
-// pAnimation->SetStartValue(Variant(__startOpacity));
-// pAnimation->SetEndValue(Variant(__endOpacity));
-// pAnimation->SetDuration(OVERSCROLL_ANIMATION_DURATION);
-// pAnimation->SetVisualElementAnimationStatusEventListener(this);
-//
-// String animationName3(L"opacity");
-// __pScrollingEffectVe->AddAnimation(animationName3, *pAnimation);
-//
-// delete pAnimation;
-// __isScrollEffectStarted = true;
-// return;
-//
-//}
-
void
_TabPresenter::OnChangeLayout(_ControlOrientation orientation)
{
__isRightScrollable = false;
__isLeftScrollable = false;
-// if (__pScrollingEffectVe)
-// {
-// __pScrollingEffectVe->RemoveAllAnimations();
-// __pTab->GetVisualElement()->DetachChild(*__pScrollingEffectVe);
-// __pScrollingEffectVe->Destroy();
-// __pScrollingEffectVe = null;
-// __isScrollEffectEnded = false;
-// __isScrollEffectStarted = false;
-// }
-
ResetScrollAnimationTimer();
ResetReorderTimer();
ResetFlickAnimationTimer();
#include <FGrp_BitmapImpl.h>
#include "FUi_ControlManager.h"
#include "FUi_ResourceManager.h"
+#include "FUi_Window.h"
+#include "FUi_CoordinateSystemUtils.h"
#include "FUiAnim_VisualElement.h"
#include "FUiCtrl_ListViewModel.h"
#include "FUiCtrl_FastScroll.h"
+#include "FUiCtrl_Form.h"
#include "FUiCtrl_Scroll.h"
#include "FUiCtrl_TableView.h"
#include "FUiCtrl_TableViewPresenter.h"
#include "FUiCtrl_TableViewItemProvider.h"
#include "FUiCtrl_TableViewItemProviderAdaptor.h"
#include "FUiCtrl_UiTableViewItemEvent.h"
-#include "FUi_CoordinateSystemUtils.h"
using namespace Tizen::Base;
, __pSweptAnimation(null)
, __pRemoveItemtAnimation(null)
{
- Color bgColor;
-
- GET_COLOR_CONFIG(TABLEVIEW::BG_NORMAL, bgColor);
GET_COLOR_CONFIG(TABLEVIEW::SECTIONITEM_BG_NORMAL, __sectionStyleColor);
GET_COLOR_CONFIG(TABLEVIEW::ITEM_DIVIDER_BOTTOM_BG_NORMAL, __itemDividerColor);
-
- SetBackgroundColor(bgColor);
}
_TableView::~_TableView(void)
_TableView* pTableView = null;
_ControlManager* pControlManager = _ControlManager::GetInstance();
- SysTryReturn(NID_UI_CTRL, pControlManager, null, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+ SysTryReturn(NID_UI_CTRL, pControlManager, null, E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM));
- pTableView = new (std::nothrow) _TableView;
- SysTryCatch(NID_UI_CTRL, pTableView != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ pTableView = new (std::nothrow) _TableView();
+ SysTryCatch(NID_UI_CTRL, pTableView != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] Propagating", GetErrorMessage(r));
result r = E_SUCCESS;
_TableViewPresenter* pPresenter = new (std::nothrow) _TableViewPresenter();
- SysTryReturn(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pPresenter->Construct(this);
SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
SetScrollStyle(scrollStyle);
SetItemDividerEnabled(itemDivider);
- __pExpandGroupAnimation = new (std::nothrow) VisualElementValueAnimation;
- SysTryReturn(NID_UI_CTRL, __pExpandGroupAnimation != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ Color bgColor;
+ GET_COLOR_CONFIG(TABLEVIEW::BG_NORMAL, bgColor);
+ SetBackgroundColor(bgColor);
+
+ __pExpandGroupAnimation = new (std::nothrow) VisualElementValueAnimation();
+ SysTryReturn(NID_UI_CTRL, __pExpandGroupAnimation != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pExpandGroupAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut"));
r = GetLastResult();
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- __pCollapseGroupAnimation = new (std::nothrow) VisualElementValueAnimation;
- SysTryReturn(NID_UI_CTRL, __pCollapseGroupAnimation != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ __pCollapseGroupAnimation = new (std::nothrow) VisualElementValueAnimation();
+ SysTryReturn(NID_UI_CTRL, __pCollapseGroupAnimation != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pCollapseGroupAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut"));
r = GetLastResult();
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- __pSweptAnimation = new (std::nothrow) VisualElementValueAnimation;
- SysTryReturn(NID_UI_CTRL, __pSweptAnimation != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ __pSweptAnimation = new (std::nothrow) VisualElementValueAnimation();
+ SysTryReturn(NID_UI_CTRL, __pSweptAnimation != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pSweptAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut"));
r = GetLastResult();
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- __pRemoveItemtAnimation = new (std::nothrow) VisualElementValueAnimation;
- SysTryReturn(NID_UI_CTRL, __pRemoveItemtAnimation != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ __pRemoveItemtAnimation = new (std::nothrow) VisualElementValueAnimation();
+ SysTryReturn(NID_UI_CTRL, __pRemoveItemtAnimation != null, false, E_OUT_OF_MEMORY,"[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pRemoveItemtAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseIn"));
r = GetLastResult();
}
void
-_TableView::RestoreFocus(bool isRestoreFocus)
+_TableView::SetAnnexFocused(bool isAnnexFocused)
{
- return __pTableViewPresenter->RestoreFocus(isRestoreFocus);
+ return __pTableViewPresenter->SetAnnexFocused(isAnnexFocused);
}
-void
-_TableView::SetAnnexFocused(bool isAnnexFocused)
+bool
+_TableView::IsAnnexFocused(void)
{
- return __pTableViewPresenter->SetAnnexFocused(isAnnexFocused);
+ return __pTableViewPresenter->IsAnnexFocused();
}
void
}
result
+_TableView::GetFocusedItemIndex(int& groupIndex, int& itemIndex) const
+{
+ return __pTableViewPresenter->GetFocusedItemIndex(groupIndex, itemIndex);
+}
+
+result
_TableView::SetItemChecked(int groupIndex, int itemIndex, bool check)
{
if (IsOnProcessing())
if (__pTableViewItemEvent == null)
{
__pTableViewItemEvent = new (std::nothrow) _UiTableViewItemEvent();
- SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pTableViewItemEvent->Construct(this, TABLE_VIEW_STYLE_SIMPLE);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to construct Item Event.");
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has been occurred. Unable to construct Item Event.", GetErrorMessage(E_SYSTEM));
}
r = __pTableViewItemEvent->AddListener(listener);
result
_TableView::RemoveTableViewItemEventListener(const _ITableViewItemEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] This instance isn't constructed.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] This instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND));
return __pTableViewItemEvent->RemoveListener(listener);
}
if (__pTableViewItemEvent == null)
{
__pTableViewItemEvent = new (std::nothrow) _UiTableViewItemEvent();
- SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pTableViewItemEvent->Construct(this, TABLE_VIEW_STYLE_GROUPED);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to construct Item Event.");
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has been occurred. Unable to construct Item Event.", GetErrorMessage(E_SYSTEM));
}
r = __pTableViewItemEvent->AddListener(listener);
result
_TableView::RemoveGroupedTableViewItemEventListener(const _ITableViewItemEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] This instance isn't constructed.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] This instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND));
return __pTableViewItemEvent->RemoveListener(listener);
}
if (__pTableViewItemEvent == null)
{
__pTableViewItemEvent = new (std::nothrow) _UiTableViewItemEvent();
- SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pTableViewItemEvent->Construct(this, TABLE_VIEW_STYLE_SECTION);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to construct Item Event.");
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has been occurred. Unable to construct Item Event.", GetErrorMessage(E_SYSTEM));
}
r = __pTableViewItemEvent->AddListener(listener);
result
_TableView::RemoveSectionTableViewItemEventListener(const _ITableViewItemEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] This instance isn't constructed.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewItemEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] This instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND));
return __pTableViewItemEvent->RemoveListener(listener);
}
result
_TableView::AddFastScrollListener(const _IUiFastScrollListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pFastScroll != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] This instance isn't constructed.");
+ SysTryReturn(NID_UI_CTRL, __pFastScroll != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] This instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND));
__pFastScroll->AddFastScrollEventListener(listener);
return E_SUCCESS;
result
_TableView::RemoveFastScrollListener(const _IUiFastScrollListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pFastScroll != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] This instance isn't constructed.");
+ SysTryReturn(NID_UI_CTRL, __pFastScroll != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] This instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND));
__pFastScroll->RemoveFastScrollEventListener(listener);
return E_SUCCESS;
{
SysTryReturn(NID_UI_CTRL,
(__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL || __scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED),
- E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView scroll is not TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL");
- SysTryReturn(NID_UI_CTRL, __pFastScroll != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] This instance isn't constructed.");
- SysTryReturn(NID_UI_CTRL, (useSearchIcon || (!useSearchIcon && text.GetLength() > 0)), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid input argument.");
+ E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s]The style of TableView scroll is not TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, __pFastScroll != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] This instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND));
+ SysTryReturn(NID_UI_CTRL, (useSearchIcon || (!useSearchIcon && text.GetLength() > 0)), E_INVALID_ARG, E_INVALID_ARG,"[%s] Invalid input argument.",GetErrorMessage(E_INVALID_ARG));
result r = E_SUCCESS;
String fastScrollSearchIconIndex(L"[SEARCH_ICON_INDEX]");
r = GET_BITMAP_CONFIG_N(TABLEVIEW::SEARCH_ICON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSearchIcon);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] SearchIcon image load failed");
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has been occurred. SearchIcon image load failed.", GetErrorMessage(E_SYSTEM));
_FastScrollIndex* pIndex = pRootIndex->AddChildIndex(&fastScrollSearchIconIndex, pSearchIcon);
- SysTryReturn(NID_UI_CTRL, pIndex, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Failed to add text array to the primary index.");
+ SysTryReturn(NID_UI_CTRL, pIndex, E_INVALID_STATE, E_INVALID_STATE, "[%s] Primary Index is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
childOrder++;
}
int
_TableView::GetItemCountAt(int groupIndex) const
{
- SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), -1, E_INVALID_ARG, "[E_INVALID_ARG] Invalid group index.");
+ SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), -1, E_INVALID_ARG, "[%s] Invalid argument is used. Group Index={%d} ", GetErrorMessage(E_INVALID_ARG), groupIndex);
int itemCount = __pTableViewPresenter->GetItemCountAt(groupIndex);
return __pTableViewPresenter->RefreshAllItems();
}
+void
+_TableView::RestoreEditCopyPasteManager(void)
+{
+ __pTableViewPresenter->RestoreEditCopyPasteManager();
+}
result
-_TableView::UpdateTableView(void)
+_TableView::UpdateTableView(bool isRestoreAnnexFocusValue)
{
if (IsOnProcessing())
{
return E_INVALID_OPERATION;
}
- return __pTableViewPresenter->UpdateTableView();
+ return __pTableViewPresenter->UpdateTableView(isRestoreAnnexFocusValue);
}
result
{
if (GetTableViewStyle() != TABLE_VIEW_STYLE_SECTION)
{
- SysLog(NID_UI_CTRL, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SECTION.");
+ SysLog(NID_UI_CTRL, "[%s] The style of TableView is not TABLE_VIEW_STYLE_SECTION.", GetErrorMessage(E_INVALID_OPERATION));
return E_INVALID_OPERATION;
}
if (__pTableViewItemEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndex, itemIndex, 0, 0, pItem, type);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewItemEvent->Fire(*pArg);
}
}
if (__pTableViewItemEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndex, itemIndex, directioin, 0, null, TABLEVIEW_NOTIFY_TYPE_ITEM_SWEPT);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY,"[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewItemEvent->Fire(*pArg);
}
}
if (__pTableViewItemEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(fromItemIndex, toItemIndex, 0, 0, null, TABLEVIEW_NOTIFY_TYPE_REORDERED_ITEM);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewItemEvent->Fire(*pArg);
}
}
if (__pTableViewItemEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(fromGroupIndex, fromItemIndex, toGroupIndex, toItemIndex, null, TABLEVIEW_NOTIFY_TYPE_REORDERED_ITEM);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewItemEvent->Fire(*pArg);
}
}
if (__pTableViewItemEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndex, itemIndex, 0, 0, pItem, TABLEVIEW_NOTIFY_TYPE_CONTEXT_ITEM_ACTIVATION, activated);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewItemEvent->Fire(*pArg);
}
}
__pTableViewPresenter->FireItemTouchReleasedEventDuringPressing(groupIndex, itemIndex);
}
+_Control*
+_TableView::GetParentFormOrWindow(void) const
+{
+ _Form* pForm = null;
+ _Window* pWindow = null;
+ _Control* pControlCore = GetParent();
+
+ while (true)
+ {
+ if (pControlCore == null)
+ {
+ SysLog(NID_UI_CTRL,"[E_SYSTEM] The parent form is null.");
+
+ return null;
+ }
+
+ pForm = dynamic_cast <_Form*>(pControlCore);
+
+ if (pForm != null)
+ {
+ break;
+ }
+
+ pWindow = dynamic_cast <_Window*>(pControlCore);
+
+ if (pWindow != null)
+ {
+ break;
+ }
+
+ pControlCore = pControlCore->GetParent();
+ }
+
+ return pControlCore;
+}
+
void
_TableView::OnDraw(void)
{
pScroll = _Scroll::CreateScrollN(*this,
SCROLL_DIRECTION_VERTICAL,
- ((__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FIXED) ? false : true),
+ (((__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FIXED) || (__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_THUMB)) ? false : true),
((__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_JUMP_TO_TOP) ? true : false),
((__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_THUMB) ? true : false),
- ((__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FIXED) ? true : false),
+ false,
bounds.height,
bounds.height,
0);
_ScrollPanel::OnBoundsChanged();
}
+void
+_TableView::OnChangeLayout(_ControlOrientation orientation)
+{
+ __pTableViewPresenter->OnChangeLayout(orientation);
+}
+
_UiTouchEventDelivery
_TableView::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
return true;
}
+void
+_TableView::SetFocusItemOnPressedState(int groupIndex, int itemIndex)
+{
+ __pTableViewPresenter->SetFocusItemOnPressedState(groupIndex, itemIndex);
+}
+
+void
+_TableView::SetCurrentAccessibilityIndex(int groupIndex, int itemIndex)
+{
+ __pTableViewPresenter->SetCurrentAccessibilityIndex(groupIndex, itemIndex);
+}
+
+bool
+_TableView::OnTraversalControlFocusGained(void)
+{
+ return __pTableViewPresenter->OnTraversalControlFocusGained();
+}
+
+bool
+_TableView::OnTraversalControlFocusLost(void)
+{
+ return __pTableViewPresenter->OnTraversalControlFocusLost();
+}
+
bool
_TableView::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture)
{
return pAnimation;
}
+void
+_TableView::SetFocusDuringOrientationChange(void)
+{
+ __pTableViewPresenter->SetFocusDuringOrientationChange();
+}
+
bool
_TableView::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
result r = E_SUCCESS;
Tizen::Graphics::Dimension dimension(0, 0);
r = GET_DIMENSION_CONFIG(TABLEVIEW::MIN_SIZE, orientation, dimension);
- SysTryReturn(NID_UI, r == E_SUCCESS, dimension, r, "[%s] System Error", GetErrorMessage(r));
+ SysTryReturn(NID_UI, r == E_SUCCESS, dimension, r, "[%s] A system error has been occurred.", GetErrorMessage(r));
return dimension;
}
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
_TableView* pCore = _TableView::CreateTableViewN(style, itemDivider, scrollStyle);
- SysTryReturn(NID_UI_CTRL, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pCore, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
_TableViewImpl* pImpl = new (std::nothrow) _TableViewImpl(pPublic, pCore);
- SysTryCatch(NID_UI_CTRL, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pImpl, , E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
pImpl->SetPublic(style, pPublic);
_TableViewImpl::SetSimpleStyleItemProvider(ITableViewItemProvider* pProvider)
{
TableViewStyle style = GetCore().GetTableViewStyle();
- SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SIMPLE, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SIMPLE");
+ SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SIMPLE, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is not TABLE_VIEW_STYLE_SIMPLE", GetErrorMessage(E_INVALID_OPERATION));
_TableViewItemProvider* pItemProvider = null;
if (pProvider != null)
{
pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style);
- SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pItemProvider->SetSimpleStyleItemProvider(pProvider);
if (r != E_SUCCESS)
_TableViewImpl::SetGroupedStyleItemProvider(IGroupedTableViewItemProvider* pProvider)
{
TableViewStyle style = GetCore().GetTableViewStyle();
- SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_GROUPED, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_GROUPED");
+ SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_GROUPED, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is not TABLE_VIEW_STYLE_GROUPED", GetErrorMessage(E_INVALID_OPERATION));
_TableViewItemProvider* pItemProvider = null;
if (pProvider != null)
{
pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style);
- SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
result r = pItemProvider->SetGroupedStyleItemProvider(pProvider);
if (r != E_SUCCESS)
_TableViewImpl::SetSectionStyleItemProvider(ISectionTableViewItemProvider* pProvider)
{
TableViewStyle style = GetCore().GetTableViewStyle();
- SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SECTION");
+ SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is not TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION));
_TableViewItemProvider* pItemProvider = null;
if (pProvider != null)
{
pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style);
- SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
result r = pItemProvider->SetSectionStyleItemProvider(pProvider);
if (r != E_SUCCESS)
_TableViewImpl::SetSimpleStyleItemProviderF(ITableViewItemProviderF* pProvider)
{
TableViewStyle style = GetCore().GetTableViewStyle();
- SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SIMPLE, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SIMPLE");
+ SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SIMPLE, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is not TABLE_VIEW_STYLE_SIMPLE", GetErrorMessage(E_INVALID_OPERATION));
_TableViewItemProvider* pItemProvider = null;
if (pProvider != null)
{
pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style, true);
- SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pItemProvider->SetSimpleStyleItemProviderF(pProvider);
if (r != E_SUCCESS)
_TableViewImpl::SetGroupedStyleItemProviderF(IGroupedTableViewItemProviderF* pProvider)
{
TableViewStyle style = GetCore().GetTableViewStyle();
- SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_GROUPED, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_GROUPED");
+ SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_GROUPED, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is not TABLE_VIEW_STYLE_GROUPED",GetErrorMessage(E_INVALID_OPERATION));
_TableViewItemProvider* pItemProvider = null;
if (pProvider != null)
{
pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style, true);
- SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pItemProvider->SetGroupedStyleItemProviderF(pProvider);
if (r != E_SUCCESS)
_TableViewImpl::SetSectionStyleItemProviderF(ISectionTableViewItemProviderF* pProvider)
{
TableViewStyle style = GetCore().GetTableViewStyle();
- SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SECTION");
+ SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is not TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION));
_TableViewItemProvider* pItemProvider = null;
if (pProvider != null)
{
pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style, true);
- SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pItemProvider->SetSectionStyleItemProviderF(pProvider);
if (r != E_SUCCESS)
if (__pTableViewEvent == null)
{
__pTableViewEvent = new (std::nothrow) _TableViewItemEvent();
- SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pTableViewEvent->Construct(&GetPublic(), TABLE_VIEW_STYLE_SIMPLE);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
result
_TableViewImpl::RemoveTableViewItemEventListener(ITableViewItemEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The listener is not found");
-
+ SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] Listener instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND));
return __pTableViewEvent->RemoveListener(listener);
}
if (__pTableViewEvent == null)
{
__pTableViewEvent = new (std::nothrow) _TableViewItemEvent();
- SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pTableViewEvent->Construct(&GetPublic(), TABLE_VIEW_STYLE_GROUPED);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
result
_TableViewImpl::RemoveGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The listener is not found");
+ SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] Listener instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND));
return __pTableViewEvent->RemoveListener(listener);
}
if (__pTableViewEvent == null)
{
__pTableViewEvent = new (std::nothrow) _TableViewItemEvent();
- SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pTableViewEvent->Construct(&GetPublic(), TABLE_VIEW_STYLE_SECTION);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
result
_TableViewImpl::RemoveSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The listener is not found");
+ SysTryReturn(NID_UI_CTRL, __pTableViewEvent != null, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] Listener instance is not available.", GetErrorMessage(E_OBJ_NOT_FOUND));
return __pTableViewEvent->RemoveListener(listener);
}
TableViewScrollBarStyle style = GetCore().GetScrollStyle();
SysTryReturn(NID_UI_CTRL,
(style == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL || style == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED),
- E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView scroll is not TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL");
+ E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView scroll is not TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL", GetErrorMessage(E_INVALID_OPERATION));
if (__pFastScrollEvent == null)
{
__pFastScrollEvent = new (std::nothrow) _FastScrollEvent();
- SysTryReturn(NID_UI_CTRL, __pFastScrollEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, __pFastScrollEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = __pFastScrollEvent->Construct(GetPublic());
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pScrollEvent == null)
{
__pScrollEvent = new (std::nothrow) _ScrollEvent();
- SysTryReturn(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pScrollEvent->Construct(GetPublic());
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pScrollEvent == null)
{
__pScrollEvent = new (std::nothrow) _ScrollEvent();
- SysTryReturn(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, __pScrollEvent != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pScrollEvent->Construct(GetPublic());
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
_TableViewImpl::SetGroupedLookEnabled(bool enable)
{
TableViewStyle style = GetCore().GetTableViewStyle();
- SysTryReturn(NID_UI_CTRL, style != TABLE_VIEW_STYLE_SIMPLE, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SIMPLE");
+ SysTryReturn(NID_UI_CTRL, style != TABLE_VIEW_STYLE_SIMPLE, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SIMPLE", GetErrorMessage(E_INVALID_OPERATION));
GetCore().SetGroupedLookEnabled(enable);
_TableViewImpl::BeginReorderingMode(void)
{
TableViewStyle style = GetCore().GetTableViewStyle();
- SysTryReturn(NID_UI_CTRL, style != TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SECTION");
+ SysTryReturn(NID_UI_CTRL, style != TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION));
+
return GetCore().SetReorderModeEnabled(true);
}
_TableViewImpl::EndReorderingMode(void)
{
TableViewStyle style = GetCore().GetTableViewStyle();
- SysTryReturn(NID_UI_CTRL, style != TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SECTION");
+ SysTryReturn(NID_UI_CTRL, style != TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION));
+
return GetCore().SetReorderModeEnabled(false);
}
if (__pTableViewEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(itemIndex, 0, 0, 0, pItem, static_cast<TableViewNotifyType>(status));
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewEvent->Fire(*pArg);
}
}
if (__pTableViewEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(itemIndex, 0, 0, 0, pContextItem, TABLEVIEW_NOTIFY_TYPE_CONTEXT_ITEM_ACTIVATION, activated);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewEvent->Fire(*pArg);
}
}
if (__pTableViewEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(itemIndexFrom, itemIndexTo, 0, 0, null, TABLEVIEW_NOTIFY_TYPE_REORDERED_ITEM);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewEvent->Fire(*pArg);
}
}
if (__pTableViewEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndex, -1, 0, 0, pItem, static_cast<TableViewNotifyType>(status));
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewEvent->Fire(*pArg);
}
}
if (__pTableViewEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndex, itemIndex, 0, 0, pItem, static_cast<TableViewNotifyType>(status));
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewEvent->Fire(*pArg);
}
}
if (__pTableViewEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndex, itemIndex, 0, 0, pContextItem, TABLEVIEW_NOTIFY_TYPE_CONTEXT_ITEM_ACTIVATION, activated);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewEvent->Fire(*pArg);
}
}
if (__pTableViewEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndexFrom, itemIndexFrom, groupIndexTo, itemIndexTo, null, TABLEVIEW_NOTIFY_TYPE_REORDERED_ITEM);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewEvent->Fire(*pArg);
}
}
if (__pTableViewEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(sectionIndex, itemIndex, 0, 0, pItem, static_cast<TableViewNotifyType>(status));
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewEvent->Fire(*pArg);
}
}
if (__pTableViewEvent != null)
{
_TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(sectionIndex, itemIndex, 0, 0, pContextItem, TABLEVIEW_NOTIFY_TYPE_CONTEXT_ITEM_ACTIVATION, activated);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pTableViewEvent->Fire(*pArg);
}
}
if (pIndexText != null)
{
_FastScrollEventArg* pEventArg = new (std::nothrow) _FastScrollEventArg(GetPublic(), *pIndexText);
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create _FastScrollEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pFastScrollEvent->Fire(*pEventArg);
}
}
static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder)
{
_TableViewMaker* pTableViewMaker = new (std::nothrow) _TableViewMaker(uibuilder);
- SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pTableViewMaker;
};
protected:
}
pTableView = new (std::nothrow) TableView();
- SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
rect = pControlProperty->GetRectF();
static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder)
{
_GroupedTableViewMaker* pTableViewMaker = new (std::nothrow) _GroupedTableViewMaker(uibuilder);
- SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pTableViewMaker;
};
protected:
}
pTableView = new (std::nothrow) GroupedTableView();
- SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
rect = pControlProperty->GetRectF();
static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder)
{
_SectionTableViewMaker* pTableViewMaker = new (std::nothrow) _SectionTableViewMaker(uibuilder);
- SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pTableViewMaker;
};
protected:
}
pTableView = new (std::nothrow) SectionTableView();
- SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
rect = pControlProperty->GetRectF();
_TableViewItemControl::CreateTableViewItemControlN(void)
{
_TableViewItemControl* pItemControl = new (std::nothrow) _TableViewItemControl();
- SysTryReturn(NID_UI_CTRL, pItemControl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ SysTryReturn(NID_UI_CTRL, pItemControl, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM));
+
pItemControl->AcquireHandle();
, __isTabSoundPlayed(false)
, __isSelectedDetailButton(false)
, __isSimpleLastItem(false)
+ , __isSectionItem(false)
, __isTouchPressOnScroll(false)
, __isTouchCancelOnPressRelease(false)
, __pHighlightVisualElement(null)
{
__isAnimationCallbackBlocked = true;
- StopTouchPressedTimer();
+ StopTouchPressedTimer(true);
delete __pPressedTimer;
__pPressedTimer = null;
- StopTouchReleasedTimer();
+ StopTouchReleasedTimer(true);
delete __pReleasedTimer;
__pReleasedTimer = null;
_TableViewItem* pItem = null;
pItem = new (std::nothrow) _TableViewItem(itemHeight);
- SysTryReturn(NID_UI_CTRL, pItem, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pItem, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pItem->AcquireHandle();
r = pItem->Initialize();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r = E_SYSTEM, "[E_SYSTEM] Unable to create TableView Item");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r = E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM));
+
return pItem;
result r = E_SUCCESS;
__pHighlightVisualElement = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, __pHighlightVisualElement != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pHighlightVisualElement != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pHighlightVisualElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct Visual Element.", GetErrorMessage(r));
}
_Label*
-_TableViewItem::GetLabelCore(Label* label)
+_TableViewItem::GetLabelCore(Label* pLabel)
{
- if (label == null)
+ if (pLabel == null)
{
return null;
}
- _LabelImpl* pImpl = _LabelImpl::GetInstance(*label);
+ _LabelImpl* pImpl = _LabelImpl::GetInstance(*pLabel);
return &pImpl->GetCore();
}
Bitmap* pCopyBitmap = null;
pCopyBitmap = _BitmapImpl::CloneN(*pBitmap);
- SysTryReturn(NID_UI_CTRL, pCopyBitmap != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ SysTryReturn(NID_UI_CTRL, pCopyBitmap != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
delete __pItemBgBitmap[itemState];
__pItemBgBitmap[itemState] = pCopyBitmap;
result r = E_SUCCESS;
__pBitmapVisualElement = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, __pBitmapVisualElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, __pBitmapVisualElement != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pBitmapVisualElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
if (pDrawBitmap != null)
{
pCanvas = __pBitmapVisualElement->GetCanvasN();
- SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
{
__drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED;
SetItemChanged(true);
- Invalidate();
+ Invalidate(true);
}
else if (__pressedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX)
{
{
__drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED;
SetItemChanged(true);
- Invalidate();
+ Invalidate(true);
}
}
else
{
__drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED;
SetItemChanged(true);
- Invalidate();
+ Invalidate(true);
}
}
}
void
-_TableViewItem::FireItemTouchReleased()
+_TableViewItem::FireItemTouchReleased(bool isTouchRelease)
{
if (__isTouchCancelOnPressRelease == true)
{
}
SetItemChanged(true);
- Invalidate();
+ Invalidate(true);
}
else
{
if (fireItemEvent)
{
+ if (isTouchRelease)
+ {
+ int groupIndex = -1;
+ int itemIndex = -1;
+ GetItemIndex(groupIndex, itemIndex);
+ if (GetParent())
+ {
+ _TableView* pTableView = dynamic_cast<_TableView*>(GetParent());
+ if (pTableView)
+ {
+ pTableView->SetFocusItemOnPressedState(groupIndex, itemIndex);
+ }
+ }
+ }
FireItemEvent(selectedItem);
}
}
__drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL;
SetItemChanged(true);
- Invalidate();
+ Invalidate(true);
}
else if (&source == GetLabelCore(__pItemAnnex))
{
__drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL;
SetItemChanged(true);
- Invalidate();
+ Invalidate(true);
}
}
else
__drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL;
SetItemChanged(true);
- Invalidate();
+ Invalidate(true);
}
}
__annexOnOffHandlerMoved = false;
__itemTouchMoved = false;
- __itemSelected = false;
- __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL;
-
- if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED)
- {
- __isSelectedDetailButton = false;
- }
-
- SetItemChanged(true);
- Invalidate();
+ ResetItemState();
if (&source != this)
{
}
}
+ DeactivateChildAccessibilityContainer(child);
+
pControl->SetTouchPressThreshold(SENSITIVE);
FloatRectangle bounds = child.GetBoundsF();
if (&child == pSimpleItemTextCore)
{
+ delete __pSimpleItemText;
__pSimpleItemText = null;
}
if (&child == pSimpleItemBitmapCore)
{
+ delete __pSimpleItemBitmap;
__pSimpleItemBitmap = null;
}
}
if (__pPressedTimer == null)
{
__pPressedTimer = new (std::nothrow) Timer();
- SysTryCatch(NID_UI_CTRL, __pPressedTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pPressedTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pPressedTimer->Construct(*this);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage);
if (__isPressedTimerEnabled == false)
{
r = __pPressedTimer->Start(TOUCH_PRESSED_DURATION);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__isPressedTimerEnabled = true;
}
}
void
-_TableViewItem::StopTouchPressedTimer(void)
+_TableViewItem::StopTouchPressedTimer(bool forceStop)
{
result r = E_SUCCESS;
return;
}
- if (__isPressedTimerEnabled)
+ if (__isPressedTimerEnabled || forceStop)
{
r = __pPressedTimer->Cancel();
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pReleasedTimer == null)
{
__pReleasedTimer = new (std::nothrow) Timer();
- SysTryCatch(NID_UI_CTRL, __pReleasedTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pReleasedTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
r = __pReleasedTimer->Construct(*this);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage);
if (!__isReleasedTimerEnabled)
{
r = __pReleasedTimer->Start(TOUCH_RELEASED_DURATION);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
}
__isReleasedTimerEnabled = true;
}
void
-_TableViewItem::StopTouchReleasedTimer(void)
+_TableViewItem::StopTouchReleasedTimer(bool forceStop)
{
result r = E_SUCCESS;
return;
}
- if (__isReleasedTimerEnabled)
+ if (__isReleasedTimerEnabled || forceStop)
{
r = __pReleasedTimer->Cancel();
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pCheckedTimer == null)
{
__pCheckedTimer = new (std::nothrow) Timer();
- SysTryCatch(NID_UI_CTRL, __pCheckedTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pCheckedTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+;
r = __pCheckedTimer->Construct(*this);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage);
if (__isCheckedTimerEnabled == false)
{
r = __pCheckedTimer->Start(CHECKED_ANIMATION_DURATION);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__isCheckedTimerEnabled = true;
}
{
result r = E_SUCCESS;
- SysTryReturnVoidResult(NID_UI_CTRL, __pCheckedTimer != null, E_SYSTEM, "[E_SYSTEM] Timer is invalid.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pCheckedTimer != null, E_SYSTEM, "[%s] A system error has been occurred. Timer is invalid.", GetErrorMessage(E_SYSTEM));
+
if (__isCheckedTimerEnabled)
{
bounds.SetBounds(0, 0, annexWidth, annexHeight);
pCanvas = new (std::nothrow) Canvas();
- SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pCanvas->Construct(bounds);
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
}
pMergeBitmap = new (std::nothrow) Bitmap();
- SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pMergeBitmap->Construct(*pCanvas, bounds);
_BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true);
{
__pAccessibilityElement->SetBounds(FloatRectangle(0.0f,0.0f, GetBoundsF().width, GetBoundsF().height));
}
+
+ RemoveFocusRing(true);
+ if (IsFocusModeStateEnabled())
+ {
+ if (GetRootWindow() && GetRootWindow()->IsActivated()
+ && IsFocused())
+ {
+ DrawFocus();
+ }
+ }
}
void
_TableViewItem::SetDrawingProperty(_ItemDrawingProperty* pDrawingProperty)
{
- SysTryReturnVoidResult(NID_UI_CTRL, pDrawingProperty != null, E_INVALID_ARG, "[E_INAVLID_ARG] pDrawingProperty is null");
+ SysTryReturnVoidResult(NID_UI_CTRL, pDrawingProperty != null, E_INVALID_ARG, "[%s] Invalid argument(s) is used. The pDrawingProperty is null.", GetErrorMessage(E_INVALID_ARG));
__pDrawingProperty = pDrawingProperty;
else
{
pCanvas = __pBitmapVisualElement->GetCanvasN();
- SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
_TableViewItem::DrawSectionStyleBackground(void)
{
Canvas* pCanvas = null;
- Bitmap* pSectionBg = null;
- Bitmap* pSectionPressBg = null;
- Bitmap* pSectionDisabledBg = null;
Bitmap* pReplacementSectionPressBg = null;
Bitmap* pReplacementSectionBg = null;
+ Bitmap* pReplacementSectionDisabledBg = null;
Color bgColor = __colorItemBg[__drawingStatus];
FloatRectangle bounds = GetBoundsF();
float dividerHeight = 0.0f;
result r = E_SUCCESS;
pCanvas = GetVisualElement()->GetCanvasN();
- SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(r));
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
- if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE)
- {
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBg);
- }
- else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP)
+ if (bgColor != null)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBg);
- }
- else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE)
- {
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBg);
- }
- else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM)
- {
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBg);
+ if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE)
+ {
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg);
+ }
+ else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP)
+ {
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg);
+ }
+ else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE)
+ {
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg);
+ }
+ else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM)
+ {
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg);
+ }
+ else
+ {
+ r = E_SYSTEM;
+ }
}
else
{
- r = E_SYSTEM;
+ if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE)
+ {
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDrawingProperty->sectionStyleBgColor, pReplacementSectionBg);
+ }
+ else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP)
+ {
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDrawingProperty->sectionStyleBgColor, pReplacementSectionBg);
+ }
+ else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE)
+ {
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDrawingProperty->sectionStyleBgColor, pReplacementSectionBg);
+ }
+ else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM)
+ {
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDrawingProperty->sectionStyleBgColor, pReplacementSectionBg);
+ }
+ else
+ {
+ r = E_SYSTEM;
+ }
}
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM));
if (__enabledState)
{
{
if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_SINGLE_BG_PRESSED))
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressBg);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionPressBg);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM));
}
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP)
{
if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_TOP_BG_PRESSED))
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressBg);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionPressBg);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM));
}
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE)
{
if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_CENTER_BG_PRESSED))
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressBg);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionPressBg);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM));
}
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM)
{
if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_BOTTOM_BG_PRESSED))
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressBg);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionPressBg);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM));
}
}
GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, dividerHeight);
- if (pSectionPressBg)
+ if (pReplacementSectionPressBg)
{
- pReplacementSectionPressBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionPressBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
+ DrawBitmap(*pCanvas, FloatRectangle(0.0f, dividerHeight, bounds.width, bounds.height - (dividerHeight * 2)), *pReplacementSectionPressBg);
}
else
{
- pReplacementSectionPressBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
+ DrawBitmap(*pCanvas, FloatRectangle(0.0f, dividerHeight, bounds.width, bounds.height - (dividerHeight * 2)), *pReplacementSectionBg);
}
-
- DrawBitmap(*pCanvas, FloatRectangle(0.0f, dividerHeight, bounds.width, bounds.height - (dividerHeight * 2)), *pReplacementSectionPressBg);
}
else
{
- if (bgColor != null)
- {
- pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
- }
- else
- {
- pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBg, Color::GetColor(COLOR_ID_MAGENTA), __pDrawingProperty->sectionStyleBgColor);
- }
-
DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBg);
}
}
else
{
+ GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor);
+
if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE)
{
if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_SINGLE_BG_DISABLED))
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionDisabledBg);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionDisabledBg);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM));
}
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP)
{
if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_TOP_BG_DISABLED))
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionDisabledBg);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionDisabledBg);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM));
}
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE)
{
if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_CENTER_BG_DISABLED))
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionDisabledBg);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionDisabledBg);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM));
}
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM)
{
if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_BOTTOM_BG_DISABLED))
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionDisabledBg);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionDisabledBg);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM));
}
}
- GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor);
- if (pSectionDisabledBg)
+ if (pReplacementSectionDisabledBg)
{
- pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionDisabledBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
+ DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionDisabledBg);
}
else
{
- pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
+ DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBg);
}
- DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBg);
}
if (__pDrawingProperty->groupedLookEnabled == true)
}
CATCH:
- delete pSectionBg;
- delete pSectionPressBg;
- delete pSectionDisabledBg;
delete pReplacementSectionPressBg;
delete pReplacementSectionBg;
+ delete pReplacementSectionDisabledBg;
delete pCanvas;
}
return;
}
- Bitmap* pSectionBgCoverEf = null;
Bitmap* pReplacementSectionBgEf = null;
Bitmap* pReplacementSectionBg = null;
- Bitmap* pSectionBgCoverBg = null;
Bitmap* pMergeBitmap = null;
Canvas* pCanvas = null;
Color bgColor;
result r = E_SUCCESS;
FloatRectangle bounds = GetBoundsF();
+
+ if (__enabledState)
+ {
+ _TableView* pParent = dynamic_cast<_TableView*>(GetParent());
+ SysTryCatch(NID_UI_CTRL, pParent != null, , E_SYSTEM, "[%s] A system error has been occurred. SectionTableView load failed", GetErrorMessage(E_SYSTEM));
+
+ bgColor = pParent->GetBackgroundColor();
+ }
+ else
+ {
+ GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor);
+ }
+
if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverEf);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBgEf);
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverEf);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBgEf);
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverEf);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBgEf);
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverEf);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_COVER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBgEf);
}
else
{
r = E_SYSTEM;
}
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM));
if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverBg);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg);
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverBg);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_TOP_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg);
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_MIDDLE)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverBg);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_CENTER_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg);
}
else if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionBgCoverBg);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_COVER_ROUND_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementSectionBg);
}
else
{
r = E_SYSTEM;
}
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM));
__pItemCover->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height));
- if (__enabledState)
- {
- _TableView* pParent = dynamic_cast<_TableView*>(GetParent());
- SysTryCatch(NID_UI_CTRL, pParent != null, , E_SYSTEM, "[E_SYSTEM] SectionTableView load failed");
-
- bgColor = pParent->GetBackgroundColor();
- }
- else
- {
- GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor);
- }
-
- pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBgCoverBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
- pReplacementSectionBgEf = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBgCoverEf, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
-
pCanvas = new (std::nothrow) Canvas();
- SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
-
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pCanvas->Construct(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height));
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBgEf);
pMergeBitmap = new (std::nothrow) Bitmap();
- SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pMergeBitmap->Construct(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height));
__pItemCover->SetBackgroundBitmap(*pMergeBitmap);
CATCH:
- delete pSectionBgCoverEf;
delete pReplacementSectionBgEf;
delete pReplacementSectionBg;
- delete pSectionBgCoverBg;
delete pCanvas;
delete pMergeBitmap;
}
_TableViewItem::DrawContextItemBackground(void)
{
Canvas* pCanvas = null;
- Bitmap* pContextBg = null;
Bitmap* pContextBgEf = null;
Bitmap* pReplacementContextBg = null;
Color bgColor = __colorItemBg[__drawingStatus];
FloatRectangle bounds = GetBoundsF();
result r = E_SUCCESS;
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::QUICK_MENU_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pContextBg);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] ContextItem image load failed");
-
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::QUICK_MENU_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pContextBgEf);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] ContextItem image load failed");
-
- pCanvas = GetVisualElement()->GetCanvasN();
- SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
-
- pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
- pCanvas->Clear();
-
if (__enabledState)
{
if (bgColor == null)
{
GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor);
}
- pReplacementContextBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pContextBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
- SysTryCatch(NID_UI_CTRL, pReplacementContextBg != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::QUICK_MENU_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, bgColor, pReplacementContextBg);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. ContextItem image load failed", GetErrorMessage(E_SYSTEM));
+
+ r = GET_BITMAP_CONFIG_N(TABLEVIEW::QUICK_MENU_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pContextBgEf);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] A system error has been occurred. ContextItem image load failed", GetErrorMessage(E_SYSTEM));
+
+ pCanvas = GetVisualElement()->GetCanvasN();
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+ pCanvas->Clear();
DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementContextBg);
DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pContextBgEf);
CATCH:
delete pCanvas;
- delete pContextBg;
delete pContextBgEf;
delete pReplacementContextBg;
}
bounds.SetBounds(0.0f, 0.0f, annexWidth, annexHeight);
pCanvas = new (std::nothrow) Canvas();
- SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pCanvas->Construct(bounds);
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
}
pMergeBitmap = new (std::nothrow) Bitmap();
- SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pMergeBitmap->Construct(*pCanvas, bounds);
_BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true);
if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL)
{
r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pRadioButtonBg);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButtonBg != null), , E_SYSTEM, "[E_SYSTEM] RadioButtonBg image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButtonBg != null), , E_SYSTEM, "[%s] A system error has been occurred. RadioButtonBg image load failed", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_BUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pRadioButton);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButton != null), , E_SYSTEM, "[E_SYSTEM] CheckBox image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButton != null), , E_SYSTEM, "[%s] A system error has been occurred.CheckBox image load failed", GetErrorMessage(E_SYSTEM));
}
else if ((__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED) || (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED))
{
r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pRadioButtonBg);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButtonBg != null), , E_SYSTEM, "[E_SYSTEM] RadioButtonBg image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButtonBg != null), , E_SYSTEM, "[%s] A system error has been occurred. RadioButtonBg image load failed", GetErrorMessage(E_SYSTEM));
+
r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_BUTTON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pRadioButton);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButton != null), , E_SYSTEM, "[E_SYSTEM] CheckBox image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButton != null), , E_SYSTEM, "[%s] A system error has been occurred.CheckBox image load failed", GetErrorMessage(E_SYSTEM));
}
}
else
{
r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_NORMAL_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pRadioButtonBg);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButtonBg != null), , E_SYSTEM, "[E_SYSTEM] RadioButtonBg image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButtonBg != null), , E_SYSTEM, "[%s] A system error has been occurred. RadioButtonBg image load failed", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_BUTTON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pRadioButton);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButton != null), , E_SYSTEM, "[E_SYSTEM] CheckBox image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pRadioButton != null), , E_SYSTEM, "[%s] A system error has been occurred.CheckBox image load failed", GetErrorMessage(E_SYSTEM));
}
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth);
bounds.SetBounds(0.0f, 0.0f, annexWidth, annexHeight);
pCanvas = new (std::nothrow) Canvas();
- SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pCanvas->Construct(bounds);
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
}
pMergeBitmap = new (std::nothrow) Bitmap();
- SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pMergeBitmap->Construct(*pCanvas, bounds);
_BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true);
r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_OFF_HANDLER_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler);
}
}
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButtonHandler != null), , E_SYSTEM, "[E_SYSTEM] OnOffButtonHandler image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButtonHandler != null), , E_SYSTEM, "[%s] A system error has been occurred. OnOffButtonHandler image load failed", GetErrorMessage(E_SYSTEM));
if (__enabledState)
{
{
r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButton);
}
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButton != null), , E_SYSTEM, "[E_SYSTEM] OnOffButton image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButton != null), , E_SYSTEM, "[%s] A system error has been occurred. OnOffButton image load failed", GetErrorMessage(E_SYSTEM));
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth);
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight);
bounds.SetBounds(0, 0, annexWidth, annexHeight);
pCanvas = new (std::nothrow) Canvas();
- SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pCanvas->Construct(bounds);
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
DrawBitmap(*pCanvas, handlerBounds, *pOnOffButtonHandler);
pMergeBitmap = new (std::nothrow) Bitmap();
- SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pMergeBitmap->Construct(*pCanvas, bounds);
_BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true);
{
r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_OFF_HANDLER, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler);
}
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButtonHandler != null), E_SYSTEM, "[E_SYSTEM] OnOffHandlerButton button image load failed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButtonHandler != null), E_SYSTEM, "[%s] A system error has been occurred. OnOffHandlerButton button image load failed.", GetErrorMessage(E_SYSTEM));
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth);
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight);
if (annexStartPositionX <= __annexOnOffHandlerPositionX
&& annexEndPositionX >= __annexOnOffHandlerPositionX)
{
- if (((annexEndPositionX - annexStartPositionX) / 2) < (__annexOnOffHandlerPositionX + (handlerBounds.width / 2)) - annexStartPositionX )
+ if (((annexEndPositionX - annexStartPositionX) / 2) < (__annexOnOffHandlerPositionX + (handlerBounds.width / 2)) - annexStartPositionX)
{
handlerPositionX = annexEndPositionX;
SetChecked(true);
float nextHandlerX = 0.0f;
r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_BG, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButton);
- SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButton != null), E_SYSTEM, "[E_SYSTEM] OnOffButton image load failed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButton != null), E_SYSTEM, "[%s] A system error has been occurred. OnOffButton image load failed", GetErrorMessage(E_SYSTEM));
if (IsChecked() == true)
{
{
r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_OFF_HANDLER, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler);
}
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButtonHandler != null), , E_SYSTEM, "[E_SYSTEM] OnOffHandlerButton image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pOnOffButtonHandler != null), , E_SYSTEM, "[%s] A system error has been occurred. OnOffHandlerButton button image load failed.", GetErrorMessage(E_SYSTEM));
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth);
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight);
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, annexMargin);
pCanvas = new (std::nothrow) Canvas();
- SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pCanvas->Construct(FloatRectangle(0, 0, annexWidth, annexHeight));
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
DrawBitmap(*pCanvas, handlerBounds, *pOnOffButtonHandler);
pMergeBitmap = new (std::nothrow) Bitmap();
- SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pMergeBitmap->Construct(*pCanvas, FloatRectangle(0, 0, annexWidth, annexHeight));
_BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true);
void
_TableViewItem::DrawDetailButton(void)
{
- Bitmap* pDetail = null;
- Bitmap* pDetailBg = null;
Bitmap* pDetailBgEffect = null;
Bitmap* pDetailEffect = null;
Bitmap* pReplacementDetail = null;
if (__enabledState)
{
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailBg);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBg != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed");
-
if (__isSelectedDetailButton)
{
if (!themeBackgroundBitmap)
{
r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailBgEffect);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBgEffect != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBgEffect != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailEffect);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailEffect != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailEffect != null), , E_SYSTEM,"[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM));
}
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pDetail);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetail != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed");
-
GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DETAIL_PRESSED, replacementNewColor);
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, replacementNewColor, pReplacementDetail);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pReplacementDetail != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM));
+
GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DETAIL_BG_PRESSED, replacementNewBgColor);
}
else
if (!themeBackgroundBitmap)
{
r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailBgEffect);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBgEffect != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBgEffect != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailEffect);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailEffect != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailEffect != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM));
}
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDetail);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetail != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed");
-
GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DETAIL_NORMAL, replacementNewColor);
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, replacementNewColor, pReplacementDetail);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pReplacementDetail != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM));
+
GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DETAIL_BG_NORMAL, replacementNewBgColor);
}
}
else
{
-
if (!themeBackgroundBitmap)
{
r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailBgEffect);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBgEffect != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBgEffect != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM));
r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailEffect);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailEffect != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed");
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailEffect != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM));
}
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDetail);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetail != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed");
+ GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DETAIL_NORMAL, replacementNewColor);
- r = GET_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDetailBg);
- SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pDetailBg != null), , E_SYSTEM, "[E_SYSTEM] Detail button image load failed");
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_REVEAL_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, replacementNewColor, pReplacementDetail);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pReplacementDetail != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM));
- GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DETAIL_NORMAL, replacementNewColor);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, replacementNewBgColor, pReplacementDetailBg);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pReplacementDetailBg != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM));
}
- pReplacementDetailBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pDetailBg, Color::GetColor(COLOR_ID_MAGENTA), replacementNewBgColor);
- SysTryCatch(NID_UI_CTRL, pReplacementDetailBg != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Detail button image load failed");
- pReplacementDetail = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pDetail, Color::GetColor(COLOR_ID_MAGENTA), replacementNewColor);
- SysTryCatch(NID_UI_CTRL, pReplacementDetail != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Detail button image load failed");
+ if (pReplacementDetailBg == null)
+ {
+ r = GET_REPLACED_BITMAP_CONFIG_N(TABLEVIEW::CIRCLE_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, replacementNewBgColor, pReplacementDetailBg);
+ SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pReplacementDetailBg != null), , E_SYSTEM, "[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM));
+ }
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MORE_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth);
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MORE_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight);
bounds.SetBounds(0, 0, annexWidth, annexHeight);
pCanvas = new (std::nothrow) Canvas();
- SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pCanvas->Construct(bounds);
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
}
pMergeBitmap = new (std::nothrow) Bitmap();
- SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
-
+ SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pMergeBitmap->Construct(*pCanvas, bounds);
_BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true);
__pItemAnnex->Invalidate(false);
CATCH:
- delete pDetail;
- delete pDetailBg;
delete pDetailBgEffect;
delete pDetailEffect;
delete pReplacementDetail;
if (__pDrawingProperty->itemDividerEnabled == false ||
__itemType == TABLE_VIEW_ITEM_TYPE_HEADER ||
__itemType == TABLE_VIEW_ITEM_TYPE_FOOTER ||
- __itemDividerEnabled == false)
+ __itemDividerEnabled == false ||
+ __isSectionItem)
{
__pItemDivider->SetVisibleState(false);
__pItemTopDivider->SetVisibleState(false);
{
float lineHeight = 0.0f;
float lineLeftMargin = 0.0f;
- float lineBottomMargin = 0.0f;
bounds = GetBoundsF();
if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL)
GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, lineHeight);
GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineLeftMargin);
- GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineBottomMargin);
lineHeight = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(lineHeight);
- lineBottomMargin = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(lineBottomMargin);
bottomPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(lineLeftMargin, bounds.height));
- dividerBottomBounds = FloatRectangle(bottomPoint.x, bottomPoint.y - lineBottomMargin, bounds.width - lineLeftMargin * 2.0f, lineHeight);
+ dividerBottomBounds = FloatRectangle(bottomPoint.x, bottomPoint.y - lineHeight, bounds.width - lineLeftMargin * 2.0f, lineHeight);
}
}
else
float lineLeftMargin = 0.0f;
float lineHeight = 0.0f;
bounds = GetBoundsF();
- int groupIndex = -1;
- int itemIndex = -1;
-
- GetItemIndex(groupIndex, itemIndex);
-
- if (itemIndex < 1)
- {
- __pItemTopDivider->SetVisibleState(false);
- }
if (!IsContextItem())
{
if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM || __itemType == TABLE_VIEW_ITEM_TYPE_ONE)
{
__pItemDivider->SetVisibleState(false);
+ __pItemTopDivider->SetVisibleState(false);
}
}
}
lineHeight = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(lineHeight);
bottomPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(lineLeftMargin, (bounds.height)));
- dividerTopBounds.SetBounds(lineLeftMargin, 0.0f, bounds.width - lineLeftMargin * 2.0f, lineHeight);
+ dividerTopBounds.SetBounds(lineLeftMargin, bottomPoint.y - (lineHeight * 2.0f), bounds.width - lineLeftMargin * 2.0f, lineHeight);
dividerBottomBounds.SetBounds(lineLeftMargin, bottomPoint.y - lineHeight, bounds.width - lineLeftMargin * 2.0f, lineHeight);
}
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap))
{
r = canvas.DrawNinePatchedBitmap(bounds, bitmap);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Fail to draw ninepatched bitmap.", GetErrorMessage(r))
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw ninepatched bitmap.");
}
else
{
r = canvas.DrawBitmap(bounds, bitmap);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Fail to draw bitmap.", GetErrorMessage(r))
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw bitmap.");
}
return r;
float leftMargin = 0.0f;
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin);
- leftMargin += __pDrawingProperty->scrollMargin;
+
+ if (__pDrawingProperty != null)
+ {
+ leftMargin += __pDrawingProperty->scrollMargin;
+ }
annexPositionX = GetBoundsF().width - annexBounds.width - leftMargin;
+ if (__pDrawingProperty != null && __pDrawingProperty->groupedLookEnabled)
+ {
+ float groupedBarMargin = 0.0f;
+ GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_BAR_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, groupedBarMargin);
+
+ annexPositionX += groupedBarMargin;
+ }
if (!_FloatCompare(annexPositionX, annexBounds.x))
{
if (__pMoveItemAnimation == null)
{
- __pMoveItemAnimation = new (std::nothrow) VisualElementValueAnimation;
- SysTryCatch(NID_UI_CTRL, __pMoveItemAnimation != null, , E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ __pMoveItemAnimation = new (std::nothrow) VisualElementValueAnimation();
+ SysTryCatch(NID_UI_CTRL, __pMoveItemAnimation != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pMoveItemAnimation->SetVisualElementAnimationTickEventListener(this);
r = GetLastResult();
if (__pZoomInOutItemAnimation == null)
{
- __pZoomInOutItemAnimation = new (std::nothrow) VisualElementValueAnimation;
- SysTryCatch(NID_UI_CTRL, __pZoomInOutItemAnimation != null, , E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ __pZoomInOutItemAnimation = new (std::nothrow) VisualElementValueAnimation();
+ SysTryCatch(NID_UI_CTRL, __pZoomInOutItemAnimation != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pZoomInOutItemAnimation->SetVisualElementAnimationTickEventListener(this);
r = GetLastResult();
if (__pFadeInOutItemtAnimation == null)
{
- __pFadeInOutItemtAnimation = new (std::nothrow) VisualElementValueAnimation;
- SysTryCatch(NID_UI_CTRL, __pFadeInOutItemtAnimation != null, , E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ __pFadeInOutItemtAnimation = new (std::nothrow) VisualElementValueAnimation();
+ SysTryCatch(NID_UI_CTRL, __pFadeInOutItemtAnimation != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pFadeInOutItemtAnimation->SetVisualElementAnimationTickEventListener(this);
r = GetLastResult();
controlCount++;
}
- if (controlCount == 0 || __individualSelectionControls.GetCount() == controlCount)
- {
- GetAccessibilityContainer()->Activate(false);
- }
- else
- {
- GetAccessibilityContainer()->Activate(true);
- }
+ GetAccessibilityContainer()->Activate(true);
}
else
{
{
FloatPoint position = currentValue.ToFloatPoint();
SetPosition(position);
+ if (GetParent())
+ {
+ _TableView* pTableView = dynamic_cast<_TableView*>(GetParent());
+ if (pTableView)
+ {
+ //Move handler position while animation in progress
+ pTableView->RestoreEditCopyPasteManager();
+ }
+ }
}
else if (keyName == L"FADE_IN_OUT_ITEM")
{
if (tableViewItemAnimation)
{
__animationCount--;
+ if (__animationCount == 0)
+ {
+ if (GetParent())
+ {
+ _TableView* pTableView = dynamic_cast<_TableView*>(GetParent());
+ if (pTableView)
+ {
+ //Move handler position at end of Move animation
+ pTableView->RestoreEditCopyPasteManager();
+ }
+ }
+ }
}
return;
if (__pAccessibilityElement == null)
{
__pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pAccessibilityElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
__pAccessibilityElement->SetName(L"TableViewItem");
if (__pAccessibilityOnOffElement == null && __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
{
- String hintText(L"Double tap to select");
__pAccessibilityOnOffElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityOnOffElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pAccessibilityOnOffElement, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pAccessibilityOnOffElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_ON_OFF_BUTTON_T_TTS");
__pAccessibilityOnOffElement->SetName(L"OnOffButton");
- __pAccessibilityOnOffElement->SetHint(hintText);
+ __pAccessibilityOnOffElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS");
pContainer->AddElement(*__pAccessibilityOnOffElement);
__pAccessibilityOnOffElement->SetBounds(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f));
{
return __pAccessibilityElement;
}
+
void
_TableViewItem::SetAccessibilityElementTrait(void)
{
}
int groupIndex = -1;
int itemIndex = -1;
-
+
switch (__annexStyle)
{
case TABLE_VIEW_ANNEX_STYLE_NORMAL:
{
return;
}
-
+
switch (__annexStyle)
{
case TABLE_VIEW_ANNEX_STYLE_MARK:
continue;
}
- if (!IsIndividualSelectionEnabled(*pChildControl))
- {
- _AccessibilityContainer* pContainer = pChildControl->GetAccessibilityContainer();
- LinkedListT<_AccessibilityElement*> accessibilityElements;
- _AccessibilityElement* pElement = null;
-
- pContainer->GetElements(accessibilityElements);
- pContainer->Activate(false);
- int elementCount = accessibilityElements.GetCount();
-
- for (int i = 0; i < elementCount; i++)
- {
- if (accessibilityElements.GetAt(i, pElement) == E_SUCCESS)
- {
- accessibilityLabel += pElement->GetLabel();
- accessibilityLabel += space;
- }
- }
- }
+ accessibilityLabel += GetChildAccessibilityLabelContent(*pChildControl);
+ accessibilityLabel += space;
}
__pAccessibilityElement->SetLabel(accessibilityLabel);
bool
_TableViewItem::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
+ _TableView* pParent = dynamic_cast<_TableView*>(GetParent());
+
+ if (pParent == null)
+ {
+ return false;
+ }
+
+ pParent->SetCurrentAccessibilityIndex(__itemGroupIndex, __itemIndex);
return false;
}
return false;
}
+void
+_TableViewItem::DrawFocusOnInternalItem(_Control* pChildControl)
+{
+ pChildControl->SetFocused(true);
+ pChildControl->DrawFocus();
+ _Control* pParent = pChildControl->GetParent();
+ while (pParent != null && pParent->GetHashCode() != this->GetHashCode())
+ {
+ _ScrollPanel* pScrollPanel = dynamic_cast<_ScrollPanel*>(pParent);
+ if (pScrollPanel)
+ {
+ pScrollPanel->OnChildControlFocusMoved(*pChildControl);
+ return;
+ }
+ pParent = pParent->GetParent();
+ }
+}
+
bool
_TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
- if (!IsFocusModeStateEnabled())
+ __isTouchCancelOnPressRelease = false;
+
+ if (!IsFocusModeStateEnabled() || !IsVisible() || !IsEnabled())
+ {
+ return false;
+ }
+
+ if (IsReorderMode() || IsAnimationPlaying())
{
return false;
}
+
_TableView* pParent = dynamic_cast<_TableView*>(GetParent());
_KeyCode keyCode = keyInfo.GetKeyCode();
IListT<_Control*>* pFocusList = GetFocusListN();
if (pTop)
{
pFocusedControl = pTop->GetCurrentFocusControl();
+ if (pFocusedControl)
+ {
+ _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(pFocusedControl);
+ if (pFocusTraversalControl != GetParent())
+ {
+ return false;
+ }
+ }
}
int count = pFocusList->GetCount();
{
pParent->SetAnnexFocused(true);
}
- pChildControl->SetFocused(true);
- pChildControl->DrawFocus();
+ DrawFocusOnInternalItem(pChildControl);
}
else
{
if (pChildControl && pChildControl->GetEnableState() && pChildControl->GetVisibleState()
&& pChildControl->IsFocusable())
{
+ if (IsFocused() && __drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED)
+ {
+ ResetItemState();
+ }
+
if (pParent != null)
{
pParent->SetAnnexFocused(true);
}
- pChildControl->SetFocused(true);
- pChildControl->DrawFocus();
+ DrawFocusOnInternalItem(pChildControl);
}
break;
bool
_TableViewItem::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
- if (!IsFocusModeStateEnabled())
+ if (!IsFocusModeStateEnabled() || !IsVisible() || !IsEnabled())
+ {
+ return false;
+ }
+
+ if (IsReorderMode() || IsAnimationPlaying())
{
return false;
}
{
__releasedControl = TABLE_VIEW_ITEM_PRESSED_NONE;
}
- FireItemTouchReleased();
+ FireItemTouchReleased(false);
return true;
}
else if (keyCode == _KEY_LEFT || keyCode == _KEY_RIGHT)
return false;
}
+void
+_TableViewItem::OnFocusModeStateChanged(void)
+{
+ ResetItemState();
+}
+
+void
+_TableViewItem::ResetItemState(void)
+{
+ __itemSelected = false;
+ __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL;
+ __releasedControl = TABLE_VIEW_ITEM_PRESSED_NONE;
+
+ if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED)
+ {
+ __isSelectedDetailButton = false;
+ }
+
+ SetItemChanged(true);
+ Invalidate(true);
+}
+
_Control*
_TableViewItem::GetPreviousFocusChildControl(const _Control& source)
{
}
void
+_TableViewItem::SetSectionItem(bool isSectionItem)
+{
+ __isSectionItem = isSectionItem;
+}
+
+void
_TableViewItem::SetTouchPressOnScroll(bool isTouch)
{
__isTouchPressOnScroll = isTouch;
void
_TableViewItem::OnVisibleStateChanged(void)
{
- if (IsFocused())
+ if (IsFocused() && !GetVisibleState())
{
RemoveFocusRing();
}
void
_TableViewItem::OnAncestorEnableStateChanged(const _Control& control)
{
- if (IsFocused())
+ if (IsFocused() && !IsEnabled())
{
RemoveFocusRing();
}
void
_TableViewItem::OnAncestorVisibleStateChanged(const _Control& control)
{
- if (IsFocused())
+ if (IsFocused() && !IsVisible())
{
RemoveFocusRing();
}
}
}
+void
+_TableViewItem::ResetTextSlide(void)
+{
+ return;
+}
+
+String
+_TableViewItem::GetChildAccessibilityLabelContent(const _Control& source)
+{
+ String accessibilityLabel = L"";
+ String space = L" ";
+
+ if (IsIndividualSelectionEnabled(source))
+ {
+ return accessibilityLabel;
+ }
+
+ if (!source.IsVisible() || !source.GetEnableState())
+ {
+ return accessibilityLabel;
+ }
+
+ _Control* pSource = const_cast<_Control*>(&source);
+
+ if (pSource)
+ {
+ _AccessibilityContainer* pContainer = pSource->GetAccessibilityContainer();
+ LinkedListT<_AccessibilityElement*> accessibilityElements;
+ _AccessibilityElement* pElement = null;
+
+ if (pContainer)
+ {
+ pContainer->GetElements(accessibilityElements);
+ int elementCount = accessibilityElements.GetCount();
+
+ for (int i = 0; i < elementCount; i++)
+ {
+ if (accessibilityElements.GetAt(i, pElement) == E_SUCCESS)
+ {
+ accessibilityLabel += pElement->GetLabel();
+ accessibilityLabel += space;
+ }
+ }
+ }
+ }
+
+ //check for children
+ int childControlCount = source.GetChildCount();
+
+ for (int i = 0; i < childControlCount; i++)
+ {
+ _Control* pChildControl = source.GetChild(i);
+
+ if (pChildControl == null)
+ {
+ continue;
+ }
+
+ accessibilityLabel += GetChildAccessibilityLabelContent(*pChildControl);
+ }
+
+ return accessibilityLabel;
+}
+
+void
+_TableViewItem::DeactivateChildAccessibilityContainer(const _Control& source)
+{
+ _Control* pControl = const_cast<_Control*>(&source);
+
+ if (pControl)
+ {
+ _AccessibilityContainer* pContainer = pControl->GetAccessibilityContainer();
+
+ if (pContainer)
+ {
+ if (__individualSelectionControls.Contains(source))
+ {
+ pContainer->Activate(true);
+ }
+ else
+ {
+ pContainer->Activate(false);
+ }
+ }
+ }
+
+ //check for children
+ int childControlCount = source.GetChildCount();
+
+ for (int i = 0; i < childControlCount; i++)
+ {
+ _Control* pChildControl = source.GetChild(i);
+
+ if (pChildControl == null)
+ {
+ continue;
+ }
+
+ DeactivateChildAccessibilityContainer(*pChildControl);
+ }
+}
+
}}} // Tizen::Ui::Controls
_TableViewItemEvent::Construct(Tizen::Ui::Control* pSource, TableViewStyle style)
{
result r = _Event::Initialize();
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Could not construct TableViewItemEvent!");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Could not construct TableViewItemEvent!");
__pSource = pSource;
{
// cast to _ItemEventArg
_TableViewItemEventArg* pEventArg = dynamic_cast<_TableViewItemEventArg*>(const_cast<IEventArg*>(&arg));
- SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_INVALID_ARG, "[%s] Invalid Event argument is used. ", GetErrorMessage(E_INVALID_ARG));
+
int index1 = pEventArg->GetArg1();
int index2 = pEventArg->GetArg2();
if (tempInvokeTableViewItemCallback == true)
{
_TableViewItem* pItem = pEventArg->GetItem();
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "[%s] Invalid Event argument is used. ", GetErrorMessage(E_INVALID_ARG));
TableViewItemBase* pItemBase = static_cast<TableViewItemBase*>(pItem->GetAppInfo());
if (__style == TABLE_VIEW_STYLE_SIMPLE)
{
ITableViewItemEventListener* pItemListener = dynamic_cast<ITableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
TableView* pTableView = dynamic_cast<TableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnTableViewItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_SELECTED);
}
else if (__style == TABLE_VIEW_STYLE_GROUPED)
{
IGroupedTableViewItemEventListener* pItemListener = dynamic_cast<IGroupedTableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
GroupedTableView* pTableView = dynamic_cast<GroupedTableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
if (index2 == -1)
{
TableViewGroupItem* pGroupItem = dynamic_cast<TableViewGroupItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pGroupItem, TABLE_VIEW_ITEM_STATUS_SELECTED);
}
else
{
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_SELECTED);
}
else
{
ISectionTableViewItemEventListener* pItemListener = dynamic_cast<ISectionTableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
SectionTableView* pTableView = dynamic_cast<SectionTableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_SELECTED);
}
if (tempInvokeTableViewItemCallback == true)
{
_TableViewItem* pItem = pEventArg->GetItem();
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "[%s] Invalid Event argument is used. ", GetErrorMessage(E_INVALID_ARG));
TableViewItemBase* pItemBase = static_cast<TableViewItemBase*>(pItem->GetAppInfo());
if (__style == TABLE_VIEW_STYLE_SIMPLE)
{
ITableViewItemEventListener* pItemListener = dynamic_cast<ITableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
TableView* pTableView = dynamic_cast<TableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE,"[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnTableViewItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED);
}
else if (__style == TABLE_VIEW_STYLE_GROUPED)
{
IGroupedTableViewItemEventListener* pItemListener = dynamic_cast<IGroupedTableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
GroupedTableView* pTableView = dynamic_cast<GroupedTableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
if (index2 == -1)
{
TableViewGroupItem* pGroupItem = dynamic_cast<TableViewGroupItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pGroupItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED);
}
else
{
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED);
}
else
{
ISectionTableViewItemEventListener* pItemListener = dynamic_cast<ISectionTableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
SectionTableView* pTableView = dynamic_cast<SectionTableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED);
}
if (tempInvokeTableViewItemCallback == true)
{
_TableViewItem* pItem = pEventArg->GetItem();
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "[%s] Invalid Event argument is used. ", GetErrorMessage(E_INVALID_ARG));
TableViewItemBase* pItemBase = static_cast<TableViewItemBase*>(pItem->GetAppInfo());
if (__style == TABLE_VIEW_STYLE_SIMPLE)
{
ITableViewItemEventListener* pItemListener = dynamic_cast<ITableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
TableView* pTableView = dynamic_cast<TableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnTableViewItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_CHECKED);
}
else if (__style == TABLE_VIEW_STYLE_GROUPED)
{
IGroupedTableViewItemEventListener* pItemListener = dynamic_cast<IGroupedTableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
GroupedTableView* pTableView = dynamic_cast<GroupedTableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE,"[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
if (index2 == -1)
{
TableViewGroupItem* pGroupItem = dynamic_cast<TableViewGroupItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE,"[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pGroupItem, TABLE_VIEW_ITEM_STATUS_CHECKED);
}
else
{
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_CHECKED);
}
else
{
ISectionTableViewItemEventListener* pItemListener = dynamic_cast<ISectionTableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
SectionTableView* pTableView = dynamic_cast<SectionTableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_CHECKED);
}
if (tempInvokeTableViewItemCallback == true)
{
_TableViewItem* pItem = pEventArg->GetItem();
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "[%s] Invalid Event argument is used.", GetErrorMessage(E_INVALID_ARG));
TableViewItemBase* pItemBase = static_cast<TableViewItemBase*>(pItem->GetAppInfo());
if (__style == TABLE_VIEW_STYLE_SIMPLE)
{
ITableViewItemEventListener* pItemListener = dynamic_cast<ITableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
TableView* pTableView = dynamic_cast<TableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnTableViewItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED);
}
else if (__style == TABLE_VIEW_STYLE_GROUPED)
{
IGroupedTableViewItemEventListener* pItemListener = dynamic_cast<IGroupedTableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
GroupedTableView* pTableView = dynamic_cast<GroupedTableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
if (index2 == -1)
{
TableViewGroupItem* pGroupItem = dynamic_cast<TableViewGroupItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pGroupItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED);
}
else
{
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE,"[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED);
}
else
{
ISectionTableViewItemEventListener* pItemListener = dynamic_cast<ISectionTableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
SectionTableView* pTableView = dynamic_cast<SectionTableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED);
}
if (tempInvokeTableViewItemCallback == true)
{
_TableViewItem* pItem = pEventArg->GetItem();
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "[%s] Invalid Event argument is used. ", GetErrorMessage(E_INVALID_ARG));
TableViewItemBase* pItemBase = static_cast<TableViewItemBase*>(pItem->GetAppInfo());
if (__style == TABLE_VIEW_STYLE_SIMPLE)
{
ITableViewItemEventListener* pItemListener = dynamic_cast<ITableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
TableView* pTableView = dynamic_cast<TableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnTableViewItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_MORE);
}
else if (__style == TABLE_VIEW_STYLE_GROUPED)
{
IGroupedTableViewItemEventListener* pItemListener = dynamic_cast<IGroupedTableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
GroupedTableView* pTableView = dynamic_cast<GroupedTableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
if (index2 == -1)
{
TableViewGroupItem* pGroupItem = dynamic_cast<TableViewGroupItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pGroupItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pGroupItem, TABLE_VIEW_ITEM_STATUS_MORE);
}
else
{
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_MORE);
}
else
{
ISectionTableViewItemEventListener* pItemListener = dynamic_cast<ISectionTableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
SectionTableView* pTableView = dynamic_cast<SectionTableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
TableViewItem* pItem = dynamic_cast<TableViewItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_MORE);
}
if (__style == TABLE_VIEW_STYLE_SIMPLE)
{
ITableViewItemEventListener* pItemListener = dynamic_cast<ITableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
TableView* pTableView = dynamic_cast<TableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnTableViewItemReordered(*pTableView, index1, index2);
}
else if (__style == TABLE_VIEW_STYLE_GROUPED)
{
IGroupedTableViewItemEventListener* pItemListener = dynamic_cast<IGroupedTableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
GroupedTableView* pTableView = dynamic_cast<GroupedTableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnGroupedTableViewItemReordered(*pTableView, index1, index2, index3, index4);
}
if (tempInvokeTableViewItemCallback == true)
{
_TableViewItem* pItem = pEventArg->GetItem();
- SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_ARG, "[%s] Invalid Event argument is used. ", GetErrorMessage(E_INVALID_ARG));
TableViewItemBase* pItemBase = static_cast<TableViewItemBase*>(pItem->GetAppInfo());
TableViewContextItem* pContextItem = dynamic_cast<TableViewContextItem*>(pItemBase);
- SysTryReturnVoidResult(NID_UI_CTRL, pContextItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pContextItem != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
if (__style == TABLE_VIEW_STYLE_SIMPLE)
{
ITableViewItemEventListener* pItemListener = dynamic_cast<ITableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
TableView* pTableView = dynamic_cast<TableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnTableViewContextItemActivationStateChanged(*pTableView, index1, pContextItem, activated);
}
else if (__style == TABLE_VIEW_STYLE_GROUPED)
{
IGroupedTableViewItemEventListener* pItemListener = dynamic_cast<IGroupedTableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
GroupedTableView* pTableView = dynamic_cast<GroupedTableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnGroupedTableViewContextItemActivationStateChanged(*pTableView, index1, index2, pContextItem, activated);
}
else
{
ISectionTableViewItemEventListener* pItemListener = dynamic_cast<ISectionTableViewItemEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG));
SectionTableView* pTableView = dynamic_cast<SectionTableView*>(GetSource());
- SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed."));
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
pItemListener->OnSectionTableViewContextItemActivationStateChanged(*pTableView, index1, index2, pContextItem, activated);
}
if (pPublicPortraitLayout != null)
{
_LayoutImpl* pPortraitLayoutImpl = _LayoutImpl::GetInstance(*pPublicPortraitLayout);
- SysTryReturn(NID_UI_CTRL, pPortraitLayoutImpl != null, null, E_INVALID_ARG, "[E_INVALID_ARG] Portrait layout is invalid object");
+ SysTryReturn(NID_UI_CTRL, pPortraitLayoutImpl != null, null, E_INVALID_ARG, "[%s] Invalid Portrait layout argument(s) is used. ",GetErrorMessage(E_INVALID_ARG));
}
if (pPublicLandscapeLayout != null)
{
_LayoutImpl* pLandscapeLayoutImpl = _LayoutImpl::GetInstance(*pPublicLandscapeLayout);
- SysTryReturn(NID_UI_CTRL, pLandscapeLayoutImpl != null, null, E_INVALID_ARG, "[E_INVALID_ARG] Landscape layout is invalid object");
+ SysTryReturn(NID_UI_CTRL, pLandscapeLayoutImpl != null, null, E_INVALID_ARG, "[%s] Invalid Landscape layout argument(s) is used. ",GetErrorMessage(E_INVALID_ARG));
}
_TableViewItem* pCore = _TableViewItem::CreateTableViewItemN(itemSize.height);
- SysTryReturn(NID_UI_CTRL, pCore != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pCore != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
_TableViewItemImpl* pImpl = new (std::nothrow) _TableViewItemImpl(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout);
- SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryReturn(NID_UI_CTRL, pImpl != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pImpl->Construct(itemSize, style);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
{
result r = E_SUCCESS;
- SysTryReturn(NID_UI_CTRL, (itemSize.width >= 0 && itemSize.height >= 0), E_INVALID_ARG, E_INVALID_ARG, ("[E_INVALID_ARG] The item size should be greater than 0")); //CONVERTFLOAT_1
+ SysTryReturn(NID_UI_CTRL, (itemSize.width >= 0 && itemSize.height >= 0), E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. The item size should be greater than 0." , GetErrorMessage(E_INVALID_ARG)); //CONVERTFLOAT_1
GetCore().SetItemStyle(style);
GetCore().SetItemWidth(itemSize.width);
result
_TableViewItemImpl::SetBackgroundBitmap(TableViewItemDrawingStatus status, const Bitmap* pBitmap)
{
- SysTryReturn(NID_UI_CTRL, pBitmap, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] It is invalid argument");
-
+ SysTryReturn(NID_UI_CTRL, pBitmap, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. ", GetErrorMessage(E_INVALID_ARG));
ListItemState itemState;
switch (status)
int
_TableViewItemProviderAdaptor::GetItemCount(int groupIndex) const
{
- SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION));
if (__style == TABLE_VIEW_STYLE_SECTION)
{
int
_TableViewItemProviderAdaptor::GetGroupCount(void) const
{
- SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION));
if (__style == TABLE_VIEW_STYLE_SIMPLE)
{
_IListItemCommon*
_TableViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, null, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, null, E_SYSTEM, "[%s] A system error has been occurred. This instance isn't constructed.", GetErrorMessage(E_SYSTEM));
TableViewItem* pItem = null;
TableViewGroupItem* pGroupItem = null;
result
_TableViewItemProviderAdaptor::UnloadItem(_IListItemCommon* pItemCore, int groupIndex, int itemIndex)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider.");
- SysTryReturn(NID_UI_CTRL, pItemCore != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] pItemCore is invalid argument.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, pItemCore != null, E_INVALID_ARG, E_INVALID_ARG, "[%s] pItemCore is invalid argument. ", GetErrorMessage(E_INVALID_ARG));
+
TableViewItem* pItem = static_cast <TableViewItem*>(pItemCore->GetAppInfo());
TableViewItemTag index = {groupIndex, itemIndex};
result
_TableViewItemProviderAdaptor::DeleteItem(_IListItemCommon* pItemCore, int groupIndex, int itemIndex)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider.");
- SysTryReturn(NID_UI_CTRL, pItemCore != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] pItemCore is invalid argument.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, pItemCore != null, E_INVALID_ARG, E_INVALID_ARG, "[%s] pItemCore is invalid argument. ", GetErrorMessage(E_INVALID_ARG));
TableViewItem* pItem = static_cast <TableViewItem*>(pItemCore->GetAppInfo());
bool
_TableViewItemProviderAdaptor::UpdateItem(_IListItemCommon* pItemCore, int groupIndex, int itemIndex)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION));
TableViewItemTag itemTag = {groupIndex, itemIndex};
bool ret = false;
bool
_TableViewItemProviderAdaptor::HasSectionHeader(int groupIndex) const
{
- SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION));
return __pTableViewProvider->HasSectionHeader(groupIndex);
}
bool
_TableViewItemProviderAdaptor::HasSectionFooter(int groupIndex) const
{
- SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION));
return __pTableViewProvider->HasSectionFooter(groupIndex);
}
float
_TableViewItemProviderAdaptor::GetItemHeight(int groupIndex, int itemIndex)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION));
float itemHeight = 0.0f;
float
_TableViewItemProviderAdaptor::GetDefaultItemHeight(void)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION));
return __pTableViewProvider->GetDefaultItemHeight();
}
float
_TableViewItemProviderAdaptor::GetDefaultGroupItemHeight(void)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION));
return __pTableViewProvider->GetDefaultGroupItemHeight();
}
bool
_TableViewItemProviderAdaptor::IsReorderable(int groupIndexFrom, int groupIndexTo)
{
- SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[E_INVALID_OPERATION] This instance has not provider.");
+ SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION));
return __pTableViewProvider->IsReorderable(groupIndexFrom, groupIndexTo);
}
if (__pDefaultItem == null)
{
__pDefaultItem = _TableViewItem::CreateTableViewItemN(0.0f);
+ __pDefaultItem->SetFocusable(false);
}
return __pDefaultItem;
#include "FUi_FocusManagerImpl.h"
#include "FUi_Math.h"
#include "FUi_Window.h"
+#include "FUiCtrl_Edit.h"
using namespace Tizen::Ui::Animations;
using namespace Tizen::Graphics;
, __isTableViewFocused(false)
, __itemTouchReleasedEventState(TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_NORMAL)
, __scrollToItemTag()
+ , __isOrientationChanged(false)
+ , __isFocusedDuringOrientationChange(false)
+ , __isUpdatingTableView(false)
+ , __isUpdateTableViewCalledDuringTts(false)
{
__sweptItemTag.itemIndex = -1;
__sweptItemTag.groupIndex = -1;
__focusItemTag.groupIndex = -1;
__focusItemTag.itemIndex = -1;
+
+ __focusItemTagOnTraversal.groupIndex = -1;
+ __focusItemTagOnTraversal.itemIndex = -1;
+
+ __accessibilityTag.groupIndex = -1;
+ __accessibilityTag.itemIndex = -1;
}
_TableViewPresenter::~_TableViewPresenter()
__pBaseVisualElement->SetSurfaceOpaque(false);
result r = __itemHeightList.Construct();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __sectionAlignmentList.Construct();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, E_OUT_OF_MEMORY,"[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
// Create Model
__pListModel = new (std::nothrow) _ListViewModel();
- SysTryReturn(NID_UI_CTRL, __pListModel != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ SysTryReturn(NID_UI_CTRL, __pListModel != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pListModel->SetListViewModelDelegate(this);
__pItemDrawingProperty = new (std::nothrow) _ItemDrawingProperty();
- SysTryReturn(NID_UI_CTRL, __pItemDrawingProperty != null, false, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ SysTryReturn(NID_UI_CTRL, __pItemDrawingProperty != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
// Timer
__pFastScrollTimer = new (std::nothrow) Timer();
- SysTryCatch(NID_UI_CTRL, __pFastScrollTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pFastScrollTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pFastScrollTimer->Construct(*this);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
if (pProviderAdaptor == null)
{
pProviderAdaptor = new (std::nothrow) _TableViewItemProviderAdaptor();
- SysTryReturn(NID_UI_CTRL, pProviderAdaptor != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+ SysTryReturn(NID_UI_CTRL, pProviderAdaptor != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY));
SetTableViewItemProviderAdaptor(pProviderAdaptor);
}
do
{
pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex));
- SysTryCatch(NID_UI_CTRL, pItem != null, , E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range.");
+ SysTryCatch(NID_UI_CTRL, pItem != null, , E_OUT_OF_RANGE, "[%s] Group Index (%d) Item Index (%d) The index is out of range.", GetErrorMessage(E_OUT_OF_RANGE),itemPos.groupIndex,itemPos.itemIndex);
FloatRectangle itemBounds = pItem->GetBoundsF();
if (itemBounds.Contains(position))
_TableViewItemProviderAdaptor* pProviderAdaptor = __pProviderAdaptor;
SysTryReturn(NID_UI_CTRL, pProviderAdaptor != null, E_INVALID_STATE, E_INVALID_STATE,
- ("[E_INVALID_STATE] This instance isn't constructed."));
+ "[%s] The instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
if ((groupIndex < 0) || (groupIndex > GetGroupCount()) || (itemIndex < -1) || (itemIndex > GetItemCountAt(groupIndex)))
{
- SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range.");
+ SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[%s] Group Index (%d) Item Index (%d) The index is out of range.", GetErrorMessage(E_OUT_OF_RANGE),groupIndex,itemIndex);
return E_OUT_OF_RANGE;
}
if (groupIndex == GetGroupCount() && itemIndex != -1 && type != TABLE_VIEW_REFRESH_TYPE_ITEM_ADD)
{
- SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range.");
+ SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[%s] Group Index (%d) Item Index (%d) The index is out of range.", GetErrorMessage(E_OUT_OF_RANGE),groupIndex,itemIndex);
return E_OUT_OF_RANGE;
}
int itemCount = pProviderAdaptor->GetItemCount(groupIndex);
if (__pListModel->InsertGroup(groupIndex, itemCount, false) != E_SUCCESS)
{
- SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to add Group item.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to add Group item.", GetErrorMessage(E_SYSTEM));
return E_SYSTEM;
}
if (__pListModel->InsertItemToGroup(null, groupIndex, itemIndex) != E_SUCCESS)
{
- SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to add item.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to add item.", GetErrorMessage(E_SYSTEM));
return E_SYSTEM;
}
SetStatusChanged(true);
}
+ if (!__pTableView->IsFocusNavigateEnabled() && (!IsEmpty()))
+ {
+ __pTableView->SetFocusNavigateEnabled(true);
+ }
+
break;
case TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE:
{
if (groupIndex == GetGroupCount())
{
- SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range.");
+ SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[%s] Group Index (%d) Item Index (%d) The index is out of range.", GetErrorMessage(E_OUT_OF_RANGE),groupIndex,itemIndex);
return E_OUT_OF_RANGE;
}
if (__pListModel->RemoveGroup(groupIndex) != E_SUCCESS)
{
- SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to remove group.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to remove group.", GetErrorMessage(E_SYSTEM));
return E_SYSTEM;
}
{
if (itemIndex == GetItemCountAt(groupIndex))
{
- SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range.");
+ SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[%s] Group Index (%d) Item Index (%d) The index is out of range.", GetErrorMessage(E_OUT_OF_RANGE),groupIndex,itemIndex);
return E_OUT_OF_RANGE;
}
if (__pListModel->RemoveItemAt(groupIndex, itemIndex) != E_SUCCESS)
{
- SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to remove item.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to remove group.", GetErrorMessage(E_SYSTEM));
return E_SYSTEM;
}
SetStatusChanged(true);
}
+ if (__pTableView->IsFocusNavigateEnabled() && IsEmpty())
+ {
+ __pTableView->SetFocusNavigateEnabled(false);
+ }
+
break;
case TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY:
break;
default:
- SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to refresh list.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to refresh list.", GetErrorMessage(E_SYSTEM));
return E_SYSTEM;
break;
}
RefreshItemLayout(topDrawnItemPos, refreshItemPos, type, animation);
}
+ RestoreEditCopyPasteManager();
+
return E_SUCCESS;
}
}
result
-_TableViewPresenter::UpdateTableView(void)
+_TableViewPresenter::UpdateTableView(bool isRestoreAnnexFocusValue)
{
+ if (likely(_AccessibilityManager::IsActivated()) && __accessibilityTag.groupIndex != -1
+ && __pTableView->GetRootWindow() && __pTableView->GetRootWindow()->IsActivated())
+ {
+ __isUpdateTableViewCalledDuringTts = true;
+ }
+ else
+ {
+ __isUpdateTableViewCalledDuringTts = false;
+ __accessibilityTag.groupIndex = -1;
+ __accessibilityTag.itemIndex = -1;
+ }
+
+ if (__focusItemTag.groupIndex != -1 && __pTableView->IsTableViewFocused() && __pTableView->IsFocusModeStateEnabled()
+ && __pTableView->GetRootWindow() && __pTableView->GetRootWindow()->IsActivated())
+ {
+ __isRestoreFocus = true;
+ }
+
+ if (!__isRestoreFocus)
+ {
+ __focusItemTag.groupIndex = -1;
+ __focusItemTag.itemIndex = -1;
+ __isTableViewFocused = false;
+ __isAnnexFocused = false;
+ }
+
+ if (!isRestoreAnnexFocusValue)
+ {
+ __isAnnexFocused = false;
+ }
+
+ if (__isUpdatingTableView)
+ {
+ return E_SUCCESS;
+ }
+
+ __isUpdatingTableView = true;
+
_VisualElement* pVisualElement = __pTableView->GetVisualElement();
if (pVisualElement != null)
{
- __pTableView->GetVisualElement()->RemoveAllAnimations();
+ pVisualElement->RemoveAllAnimations();
}
{
SetItemDrawingProperty();
- if(PreloadItem() == false)
- {
- return E_SUCCESS;
- }
+ PreloadItem();
}
else
{
}
}
+ _Control* pFocusedControl = null;
+ _Window* pTop = __pTableView->GetRootWindow();
+ if (pTop)
+ {
+ pFocusedControl = pTop->GetCurrentFocusControl();
+ }
+
+ _TableView* pTableView = null;
+
+ while (true)
+ {
+ if (pFocusedControl == null)
+ {
+ __isRestoreFocus = false;
+ break;
+ }
+
+ pTableView = dynamic_cast <_TableView*>(pFocusedControl);
+
+ if (pTableView != null && (pTableView == __pTableView))
+ {
+ break;
+ }
+
+ pFocusedControl = pFocusedControl->GetParent();
+ }
+
__pListModel->RemoveAllItem(false, true);
PreloadItem(topDrawnTag.groupIndex, topDrawnTag.itemIndex, shiftingDistance);
}
}
+ if (IsEmpty() == true)
+ {
+ __pTableView->SetFocusNavigateEnabled(false);
+ }
+ else
+ {
+ __pTableView->SetFocusNavigateEnabled(true);
+ }
+
+ __isUpdatingTableView = false;
+
return E_SUCCESS;
}
__pListModel->RestoreItemStatus();
- DeleteItemHeightList();
- CreateItemHeightList(defaultGroupHeight, defaultItemHeight);
+ RestoreItemHeightList(defaultGroupHeight, defaultItemHeight);
DeleteSectionAlignmentList();
CreateSectionAlignmentList();
}
bool enabled = __pListModel->IsItemEnabled(groupIndex, itemIndex);
- SysTryReturn(NID_UI_CTRL, (enabled == true), E_INVALID_OPERATION, E_INVALID_OPERATION,
- "[E_INVALID_OPERATION] The item is disabled.");
+ SysTryReturn(NID_UI_CTRL, (enabled == true), E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The item is disabled.", GetErrorMessage(E_INVALID_OPERATION));
if (__pListModel->IsItemChecked(groupIndex, itemIndex) == checked)
{
}
TableViewItemTag itemTag = {groupIndex, itemIndex};
- _TableViewItem *pItem = FindItem(itemTag);
+ _TableViewItem* pItem = FindItem(itemTag);
TableViewItemTag topDrawnItemTag = {-1, -1};
GetTopDrawnItem(topDrawnItemTag);
}
void
-_TableViewPresenter::RestoreFocus(bool isRestoreFocus)
+_TableViewPresenter::SetAnnexFocused(bool isAnnexFocused)
{
- __isRestoreFocus = isRestoreFocus;
+ __isAnnexFocused = isAnnexFocused;
}
-void
-_TableViewPresenter::SetAnnexFocused(bool isAnnexFocused)
+bool
+_TableViewPresenter::IsAnnexFocused(void)
{
- __isAnnexFocused = isAnnexFocused;
+ return __isAnnexFocused;
}
void
return __isTableViewFocused;
}
+result
+_TableViewPresenter::GetFocusedItemIndex(int& groupIndex, int& itemIndex) const
+{
+ result r = E_SUCCESS;
+
+ groupIndex = __focusItemTag.groupIndex;
+ itemIndex = __focusItemTag.itemIndex;
+
+ return r;
+}
+
void
_TableViewPresenter::SetItemType(_TableViewItem* pItem, TableViewItemTag itemPosition)
{
pItem->SetSimpleLastItemEnabled(false);
}
}
+ if (style == TABLE_VIEW_STYLE_SECTION)
+ {
+ pItem->SetSectionItem(true);
+ }
if (itemPosition.itemIndex == 0)
{
void
_TableViewPresenter::DetachItem(TableViewItemTag& itemTag)
{
- _TableViewItem *pItem = FindItem(itemTag);
+ _TableViewItem* pItem = FindItem(itemTag);
if (pItem != null && pItem->HasParent())
{
void
_TableViewPresenter::DetachContextItem(TableViewItemTag& itemTag)
{
- _TableViewItem *pItem = FindItem(itemTag);
+ _TableViewItem* pItem = FindItem(itemTag);
if (pItem == null)
{
return;
{
StopExpandCollapseAnimation();
+ StopAllItemAnimation();
+
if (__pTableView->IsReorderModeEnabled() && __reorderInfo.itemIndex != -1)
{
ResetReorderItem(__reorderInfo.groupIndex, __reorderInfo.itemIndex);
SetClientAreaHeight(__pTableView->GetBoundsF().height);
_ScrollPanelPresenter::OnBoundsChanged();
}
+
+ //FastScroll Visibility
+ if (__isOrientationChanged)
+ {
+ TableViewScrollBarStyle scrollStyle = __pTableView->GetScrollStyle();
+
+ if (scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL
+ || scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED)
+ {
+ _FastScroll* pFastScroll = __pTableView->GetFastScrollBar();
+ if (pFastScroll != null)
+ {
+ pFastScroll->UpdateIndex();
+ pFastScroll->SetScrollVisibility(IsScrollable());
+ }
+ }
+
+ __isOrientationChanged = false;
+ }
}
result
{
SetItemDrawingProperty();
- if(PreloadItem() == false)
+ if (PreloadItem() == false)
{
__pTableView->SetFocusNavigateEnabled(false);
return E_SUCCESS;
__pTableView->SetFocusNavigateEnabled(true);
}
+ if (!__isRestoreFocus && __isFocusedDuringOrientationChange)
+ {
+ TableViewItemTag bottomDrawnItemIndex = {-1, -1};
+ GetBottomDrawnItem(bottomDrawnItemIndex);
+
+ if ((bottomDrawnItemIndex.groupIndex < __focusItemTag.groupIndex) ||
+ (bottomDrawnItemIndex.groupIndex == __focusItemTag.groupIndex && bottomDrawnItemIndex.itemIndex <= __focusItemTag.itemIndex))
+ {
+ ScrollToItem(__focusItemTag.groupIndex, __focusItemTag.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
+ }
+ }
+ __isFocusedDuringOrientationChange = false;
+
+ if (__isUpdateTableViewCalledDuringTts && __accessibilityTag.groupIndex != -1 && (likely(_AccessibilityManager::IsActivated())))
+ {
+ TableViewItemTag bottomDrawnItemIndex = {-1, -1};
+ GetBottomDrawnItem(bottomDrawnItemIndex);
+
+ if ((bottomDrawnItemIndex.groupIndex < __accessibilityTag.groupIndex) ||
+ (bottomDrawnItemIndex.groupIndex == __accessibilityTag.groupIndex && bottomDrawnItemIndex.itemIndex <= __accessibilityTag.itemIndex))
+ {
+ ScrollToItem(__accessibilityTag.groupIndex, __accessibilityTag.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
+ }
+
+ _TableViewItem* pItem = null;
+ pItem = FindItem(__accessibilityTag);
+
+ if (pItem != null)
+ {
+ _AccessibilityElement* pElement = pItem->GetAccessibilityElement();
+ _AccessibilityContainer* pContainer = pItem->GetAccessibilityContainer();
+ if (pContainer != null && pElement != null)
+ {
+ pContainer->Activate(true);
+ pContainer->SetCurrentFocusedElement(pElement);
+ if (_AccessibilityManager::GetInstance() != null)
+ {
+ _AccessibilityManager::GetInstance()->SetGlobalFocusedElement(*pElement);
+ }
+ }
+ }
+
+ if (_AccessibilityManager::GetInstance() != null)
+ {
+ _AccessibilityManager::GetInstance()->RequestToDrawFocusUi();
+ }
+
+ __isUpdateTableViewCalledDuringTts = false;
+ }
+
return E_SUCCESS;
}
+void
+_TableViewPresenter::OnChangeLayout(_ControlOrientation orientation)
+{
+ __isOrientationChanged = true;
+ if (__focusItemTag.groupIndex != -1)
+ {
+ __isFocusedDuringOrientationChange = true;
+ }
+}
+
_UiTouchEventDelivery
_TableViewPresenter::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
{
_UiTouchEventDelivery response = _ScrollPanelPresenter::OnPreviewTouchPressed(source, touchInfo);
+ if (__focusItemTag.groupIndex != -1)
+ {
+ _TableViewItem* pItem = FindItem(__focusItemTag);
+ if (pItem)
+ {
+ pItem->ResetItemState();
+ }
+ }
+
+ __focusItemTag.groupIndex = -1;
+ __focusItemTag.itemIndex = -1;
+
_TableViewItem* pItem = GetTableViewItemFromControl(source);
if (pItem == null)
{
if (SelectReorderItem(itemPos.groupIndex, itemPos.itemIndex, false))
{
__reorderInfo.touchPressedPositionY = touchInfo.GetCurrentPosition().y;
+ __reorderInfo.blockedTouchReleaseState = true;
}
}
{
__reorderInfo.blockedTouchReleaseState = false;
+ _TableViewItem* pItem = GetTableViewItemFromControl(source);
+ if (pItem != null)
+ {
+ pItem->ResetTextSlide();
+ }
+
return _UI_TOUCH_EVENT_DELIVERY_NO;
}
}
SysTryReturn(NID_UI_CTRL,
__pTableView->GetScrollStyle() == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL,
- E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView scroll is not TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL");
- SysTryReturn(NID_UI_CTRL, __pFastScrollTimer != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Timer is not created.");
+ E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView scroll is not TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, __pFastScrollTimer != null, E_INVALID_STATE, E_INVALID_STATE,"[%s] Timer is not created.", GetErrorMessage(E_INVALID_OPERATION));
r = __pFastScrollTimer->Start(FAST_SCROLL_FADE_OUT_DURATION);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
__isFastScrollTimerEnabled = true;
{
result r = E_SUCCESS;
- SysTryReturnVoidResult(NID_UI_CTRL, __pFastScrollTimer != null, E_INVALID_STATE, "[E_INVALID_STATE] Timer is invalid.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pFastScrollTimer != null, E_INVALID_STATE, "[%s] Timer is invalid.", GetErrorMessage(E_INVALID_OPERATION));
r = __pFastScrollTimer->Cancel();
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- if (GetGroupCount() <= 0 )
+ if (GetGroupCount() <= 0)
{
return true;
}
itemPos.itemIndex = -1;
itemPos.groupIndex = -1;
- return E_OUT_OF_RANGE;
+ return E_OBJ_NOT_FOUND;
}
result
itemPos.itemIndex = -1;
itemPos.groupIndex = -1;
- return E_INVALID_STATE;
+ return E_OBJ_NOT_FOUND;
}
float scrollPosition = GetScrollPosition() + __pTableView->GetBoundsF().height;
return true;
}
+ else
+ {
+ prevItem.groupIndex = currentItemPos.groupIndex - 1;
+ prevItem.itemIndex = __pListModel->GetItemCountInGroup(prevItem.groupIndex) - 1;
+
+ return true;
+ }
}
if (__pListModel->IsGroupExpanded(currentItemPos.groupIndex) == false)
{
- if (currentItemPos.groupIndex == 0 && currentItemPos.itemIndex == -1)
+ if (currentItemPos.itemIndex >= 0)
{
- return false;
+ prevItem.groupIndex = currentItemPos.groupIndex;
+ prevItem.itemIndex = -1;
}
- prevItem.groupIndex = currentItemPos.groupIndex - 1;
- prevItem.itemIndex = __pListModel->GetItemCountInGroup(prevItem.groupIndex) - 1;
-
return true;
}
if (withAnimation)
{
- _TableViewItem *pItem = FindItem(itemTag);
+ _TableViewItem* pItem = FindItem(itemTag);
if (pItem == null)
{
return E_SUCCESS;
if (withAnimation)
{
- _TableViewItem *pItem = FindItem(itemTag);
+ _TableViewItem* pItem = FindItem(itemTag);
if (pItem == null)
{
return E_SUCCESS;
if (pItem == null)
{
- SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to load item.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to load item.", GetErrorMessage(E_SYSTEM));
}
}
}
if (pItem == null)
{
- SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to load item.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to load item.", GetErrorMessage(E_SYSTEM));
}
}
}
TableViewItemTag current;
TableViewItemTag next;
- _TableViewItem *pItem = LoadItem(from.groupIndex, from.itemIndex);
+ _TableViewItem* pItem = LoadItem(from.groupIndex, from.itemIndex);
if (pItem == null)
{
TableViewItemTag current;
TableViewItemTag next;
- _TableViewItem *pItem = FindItem(itemTag);
+ _TableViewItem* pItem = FindItem(itemTag);
if (pItem == null)
{
return;
_Scroll* pScroll = __pTableView->GetScrollBar();
if (pScroll != null)
{
+ if (__pTableView->GetScrollStyle() == TABLE_VIEW_SCROLL_BAR_STYLE_FIXED || __pTableView->GetScrollStyle() == TABLE_VIEW_SCROLL_BAR_STYLE_THUMB)
+ {
+ ChangeScrollBarVisibility(__pTableView->GetBoundsF().height, clientBounds.height);
+ }
+
pScroll->SetScrollRange(__pTableView->GetBoundsF().height, clientBounds.height);
}
}
pContextItem->ExposeContextItem(FloatRectangle(__leftMargin, __sweptItemPosition.y, contextItemWidth, pContextItem->GetSizeF().height), pItem->GetSize().width);
+ if (__sweptItemTag.groupIndex == -1)
+ {
+ needToFireEvent = false;
+ }
+
if (needToFireEvent)
{
PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_SLIDER_SWEEP, pItem);
result
_TableViewPresenter::OpenContextItem(int groupIndex, int itemIndex)
{
- SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid group index.");
+ SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[%s] Group Index (%d) is out of range.",GetErrorMessage(E_OUT_OF_RANGE),groupIndex);
+
TableViewItemTag itemTag = {groupIndex, itemIndex};
_TableViewItem* pItem = FindItem(itemTag);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Item was not loaded.");
- SysTryReturn(NID_UI_CTRL, pItem->GetContextItem() != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] ContextItem is not set to the item.");
- SysTryReturn(NID_UI_CTRL,__sweptItemTag.groupIndex != groupIndex || __sweptItemTag.itemIndex != itemIndex, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] ContextItem already opened.");
+ SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] Item was not loaded.", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, pItem->GetContextItem() != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] ContextItem is not set to the item.", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL,__sweptItemTag.groupIndex != groupIndex || __sweptItemTag.itemIndex != itemIndex, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] ContextItem already opened.", GetErrorMessage(E_INVALID_OPERATION));
ResetSweepItem();
result
_TableViewPresenter::CloseContextItem(int groupIndex, int itemIndex)
{
- SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid group index.");
+ SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[%s] Group Index (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE),groupIndex);
TableViewItemTag itemTag = {groupIndex, itemIndex};
_TableViewItem* pItem = FindItem(itemTag);
- SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Item was not loaded.");
- SysTryReturn(NID_UI_CTRL, pItem->GetContextItem() != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] ContextItem is not set to the item.");
- SysTryReturn(NID_UI_CTRL, __sweptItemTag.groupIndex == groupIndex && __sweptItemTag.itemIndex == itemIndex, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] ContextItem was not opened.");
+ SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] Item was not loaded.", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, pItem->GetContextItem() != null, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] ContextItem is not set to the item.", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, __sweptItemTag.groupIndex == groupIndex && __sweptItemTag.itemIndex == itemIndex, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] ContextItem was not opened.", GetErrorMessage(E_INVALID_OPERATION));
ResetSweepItem();
bool
_TableViewPresenter::IsContextItemOpened(int groupIndex, int itemIndex) const
{
- SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), false, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid group index.");
+ SysTryReturn(NID_UI_CTRL, groupIndex >= 0 && groupIndex < GetGroupCount(), false, E_OUT_OF_RANGE, "[%s] Group Index (%d) is out of range. ", GetErrorMessage(E_OUT_OF_RANGE), groupIndex);
+
- if ( __sweptItemTag.groupIndex == -1 && __sweptItemTag.itemIndex == -1)
+ if (__sweptItemTag.groupIndex == -1 && __sweptItemTag.itemIndex == -1)
{
return false;
}
result
_TableViewPresenter::SetSectionHeaderTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment)
{
- SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SECTION");
- SysTryReturn(NID_UI_CTRL, HasSectionHeader(sectionIndex), E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Header is not set to the section.");
- SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid section index.");
+ SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, HasSectionHeader(sectionIndex), E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] Header is not set to the section.", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[%s] Section index (%d)is out of range.", GetErrorMessage(E_OUT_OF_RANGE),sectionIndex);
_TableViewSectionStringAlignment newAlignment;
HorizontalAlignment
_TableViewPresenter::GetSectionHeaderTextHorizontalAlignment(int sectionIndex) const
{
- SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, ALIGNMENT_LEFT, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SECTION");
- SysTryReturn(NID_UI_CTRL, HasSectionHeader(sectionIndex), ALIGNMENT_LEFT, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Header is not set to the section.");
- SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), ALIGNMENT_LEFT, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid section index.");
+ SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, ALIGNMENT_LEFT, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, HasSectionHeader(sectionIndex), ALIGNMENT_LEFT, E_INVALID_OPERATION, "[%s] Header is not set to the section.", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), ALIGNMENT_LEFT, E_OUT_OF_RANGE, "[%s] Section index (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE),sectionIndex);
_TableViewSectionStringAlignment alignment;
__sectionAlignmentList.GetAt(sectionIndex, alignment);
result
_TableViewPresenter::SetSectionFooterTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment)
{
- SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SECTION");
- SysTryReturn(NID_UI_CTRL, HasSectionFooter(sectionIndex), E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Footer is not set to the section.");
- SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid section index.");
+ SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, HasSectionFooter(sectionIndex), E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] Footer is not set to the section.", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[%s] Section index (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE),sectionIndex);
_TableViewSectionStringAlignment newAlignment;
HorizontalAlignment
_TableViewPresenter::GetSectionFooterTextHorizontalAlignment(int sectionIndex) const
{
- SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, ALIGNMENT_RIGHT, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is TABLE_VIEW_STYLE_SECTION");
- SysTryReturn(NID_UI_CTRL, HasSectionFooter(sectionIndex), ALIGNMENT_RIGHT, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Footer is not set to the section.");
- SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), ALIGNMENT_RIGHT, E_OUT_OF_RANGE, "[E_INVALID_ARG] Invalid section index.");
+ SysTryReturn(NID_UI_CTRL, __pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION, ALIGNMENT_RIGHT, E_INVALID_OPERATION, "[%s] The style of TableView is TABLE_VIEW_STYLE_SECTION", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, HasSectionFooter(sectionIndex), ALIGNMENT_RIGHT, E_INVALID_OPERATION, "[%s] Footer is not set to the section.", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryReturn(NID_UI_CTRL, sectionIndex >= 0 && sectionIndex < GetGroupCount(), ALIGNMENT_RIGHT, E_OUT_OF_RANGE, "[%s] Section index (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE),sectionIndex);
_TableViewSectionStringAlignment alignment;
__sectionAlignmentList.GetAt(sectionIndex, alignment);
do
{
- _TableViewItem *pItem = FindItem(currentItemTag);
+ _TableViewItem* pItem = FindItem(currentItemTag);
if (pItem != null)
{
pItem->StopAllAnimation();
itemTag.itemIndex++;
itemTag.itemIndex = startIndex + itemTag.itemIndex;
- __itemHeightList.GetAt(itemTag.itemIndex, itemHeight);
+ _TableViewItemHeight itemHeightListEntry;
+ __itemHeightList.GetAt(itemTag.itemIndex, itemHeightListEntry);
- return itemHeight;
+ return itemHeightListEntry.itemHeight;
}
float
_TableViewPresenter::SetItemHeight(TableViewItemTag itemTag, float height)
{
int startIndex = 0;
+ _TableViewItemHeight oldHeightEntry;
+ _TableViewItemHeight itemHeightListEntry;
+
+ itemHeightListEntry.itemHeight = height;
+ itemHeightListEntry.groupIndex = itemTag.groupIndex;
+ itemHeightListEntry.itemIndex = itemTag.itemIndex;
for (int i = 0; i < itemTag.groupIndex; i++)
{
itemTag.itemIndex++;
itemTag.itemIndex = startIndex + itemTag.itemIndex;
- float oldHeight = 0.0f;
- __itemHeightList.GetAt(itemTag.itemIndex, oldHeight);
- __itemHeightList.SetAt(height, itemTag.itemIndex);
+ __itemHeightList.GetAt(itemTag.itemIndex, oldHeightEntry);
- return oldHeight;
-}
+ itemHeightListEntry.isFooterItem = oldHeightEntry.isFooterItem;
+ __itemHeightList.SetAt(itemHeightListEntry, itemTag.itemIndex);
+
+ return oldHeightEntry.itemHeight;
+}
result
_TableViewPresenter::SetReorderMode(bool enabled)
if (itemPosition.y < 0)
{
+ __reorderInfo.itemBasisPositionY += (0 - itemPosition.y);
itemPosition.y = 0;
}
if (itemPosition.y > limitBottomPositionY)
{
+ __reorderInfo.itemBasisPositionY -= (itemPosition.y - limitBottomPositionY);
itemPosition.y = limitBottomPositionY;
}
FloatPoint destinationItemPosition = FloatPoint(destinationItemBounds.x, 0.0f);
- if ( __reorderInfo.itemIndex > destinationItemIndex && __reorderInfo.groupIndex == destinationGroupIndex)
+ if (__reorderInfo.itemIndex > destinationItemIndex && __reorderInfo.groupIndex == destinationGroupIndex)
{
destinationItemPosition.y = __reorderInfo.itemBounds.y + __reorderInfo.itemBounds.height - destinationItemBounds.height;
__reorderInfo.itemBounds.y = destinationItemBounds.y;
{
StopReorderScrollTimer();
- __pReorderScrollTimer = new (std::nothrow) Tizen::Base::Runtime::Timer;
- SysTryReturnVoidResult(NID_UI_CTRL, __pReorderScrollTimer != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ __pReorderScrollTimer = new (std::nothrow) Timer();
+ SysTryReturnVoidResult(NID_UI_CTRL, __pReorderScrollTimer != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = __pReorderScrollTimer->Construct(*this);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
{
int groupCount = GetGroupCount();
+ _TableViewItemHeight itemHeightEntry;
+
result r = __itemHeightList.SetCapacity(GetItemCount());
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
for (int i = 0; i < groupCount; i++)
{
int itemCount = GetItemCountAt(i);
-
+ itemHeightEntry.groupIndex = i;
if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SIMPLE)
{
- __itemHeightList.Add(0.0f);
+ itemHeightEntry.itemIndex = -1;
+ itemHeightEntry.itemHeight = 0.0f;
+ itemHeightEntry.isFooterItem = false;
+ __itemHeightList.Add(itemHeightEntry);
}
else
{
- __itemHeightList.Add(defaultGroupItemHeight);
+ itemHeightEntry.itemIndex = -1;
+ itemHeightEntry.itemHeight = defaultGroupItemHeight;
+ itemHeightEntry.isFooterItem = false;
+ __itemHeightList.Add(itemHeightEntry);
}
for (int j = 0; j < itemCount; j++)
{
- __itemHeightList.Add(defaultItemHeight);
+ itemHeightEntry.itemIndex = j;
+ itemHeightEntry.itemHeight = defaultItemHeight;
+ itemHeightEntry.isFooterItem = false;
+ if (HasSectionFooter(i) && j == (itemCount - 1))
+ {
+ itemHeightEntry.isFooterItem = true;
+ }
+ __itemHeightList.Add(itemHeightEntry);
}
}
return false;
}
+bool
+_TableViewPresenter::RestoreItemHeightList(float defaultGroupHeight, float defaultItemHeight)
+{
+ _TableViewItemHeight backupItem;
+ _TableViewItemHeight currentItem;
+ _TableViewItemHeight itemHeightEntry;
+ int groupCount = GetGroupCount();
+ bool isGroupItem = true;
+ int itemCount = 0;
+ int groupIndex = 0;
+ int itemIndex = 0;
+
+ ArrayListT<_TableViewItemHeight> backupItemHeightList;
+ backupItemHeightList.Construct();
+
+ result r = backupItemHeightList.SetCapacity(__itemHeightList.GetCapacity());
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ for (int index = 0; index < __itemHeightList.GetCount(); index++)
+ {
+ __itemHeightList.GetAt(index, backupItem);
+ backupItemHeightList.Add(backupItem);
+ }
+
+ DeleteItemHeightList();
+
+ r = __itemHeightList.SetCapacity(GetItemCount());
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ for (int backUpListIndex = 0, actualListIndex = 0; actualListIndex < GetItemCount() && groupIndex < groupCount;)
+ {
+ backupItemHeightList.GetAt(backUpListIndex, backupItem);
+ if (groupIndex < groupCount)
+ {
+ itemCount = GetItemCountAt(groupIndex);
+ if (isGroupItem)
+ {
+ isGroupItem = false;
+ itemHeightEntry.groupIndex = groupIndex;
+ itemIndex = 0;
+ if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SIMPLE)
+ {
+ itemHeightEntry.itemHeight = 0.0f;
+ }
+ else
+ {
+ itemHeightEntry.itemHeight = defaultGroupHeight;
+ }
+
+ itemHeightEntry.itemIndex = -1;
+ itemHeightEntry.isFooterItem = false;
+ __itemHeightList.Add(itemHeightEntry);
+ if (itemCount == 0)
+ {
+ isGroupItem = true;
+ groupIndex++;
+ }
+ }
+ else
+ {
+ itemHeightEntry.itemIndex = itemIndex;
+ itemHeightEntry.itemHeight = defaultItemHeight;
+ itemHeightEntry.isFooterItem = false;
+
+ if (HasSectionFooter(groupIndex) && itemIndex == (itemCount - 1))
+ {
+ itemHeightEntry.isFooterItem = true;
+ }
+ __itemHeightList.Add(itemHeightEntry);
+ itemIndex++;
+
+ if (itemIndex == itemCount)
+ {
+ isGroupItem = true;
+ groupIndex++;
+ }
+ }
+ }
+ if (actualListIndex < GetItemCount() && backUpListIndex < backupItemHeightList.GetCount())
+ {
+ __itemHeightList.GetAt(actualListIndex, currentItem);
+ if (backupItem.isFooterItem)
+ {
+ backUpListIndex++;
+ continue;
+ }
+
+ if(backupItem.groupIndex == currentItem.groupIndex && backupItem.itemIndex == currentItem.itemIndex)
+ {
+ currentItem.itemHeight = backupItem.itemHeight;
+ __itemHeightList.SetAt(currentItem, actualListIndex);
+ actualListIndex++;
+ backUpListIndex++;
+ }
+ else if (backupItem.groupIndex > currentItem.groupIndex)
+ {
+ actualListIndex++;
+ }
+ else if (backupItem.groupIndex < currentItem.groupIndex)
+ {
+ backUpListIndex++;
+ }
+ else
+ {
+ SysLog(NID_UI_CTRL, "System error has occurred. Failed to restore the height values.");
+ }
+ }
+ }
+ backupItemHeightList.RemoveAll();
+
+ return true;
+
+CATCH:
+ backupItemHeightList.RemoveAll();
+ DeleteItemHeightList();
+
+ return false;
+}
+
void
_TableViewPresenter::DeleteItemHeightList(void)
{
float defaultItemHeight = __pProviderAdaptor->GetDefaultItemHeight();
float defaultGroupItemHeight = __pProviderAdaptor->GetDefaultGroupItemHeight();
+ _TableViewItemHeight itemHeightEntry;
int startIndex = 0;
+
for (int i = 0; i < groupIndex; i++)
{
int itemCount = GetItemCountAt(i);
int itemCount = GetItemCountAt(groupIndex);
for (int i = 0; i < itemCount; i++)
{
- __itemHeightList.InsertAt(defaultItemHeight, targetIndex);
+ itemHeightEntry.groupIndex = groupIndex;
+ itemHeightEntry.itemIndex = (itemCount - 1) - i;
+ itemHeightEntry.itemHeight = defaultItemHeight;
+ itemHeightEntry.isFooterItem = false;
+ if (HasSectionFooter(groupIndex) && i == (itemCount - 1))
+ {
+ itemHeightEntry.isFooterItem = true;
+ }
+
+ __itemHeightList.InsertAt(itemHeightEntry, targetIndex);
}
- __itemHeightList.InsertAt(defaultGroupItemHeight, targetIndex);
+ itemHeightEntry.groupIndex = groupIndex;
+ itemHeightEntry.itemIndex = itemIndex;
+ itemHeightEntry.itemHeight = defaultGroupItemHeight;
+ itemHeightEntry.isFooterItem = false;
+ __itemHeightList.InsertAt(itemHeightEntry, targetIndex);
+
+ int updateIndex = targetIndex + itemCount + 1;// Increment the group Index below the added item by 1
+ int lastIndex = 0;
+ int groupCount = GetGroupCount();
+ for (int i = 0; i < groupCount; i++)
+ {
+ int itemCount = GetItemCountAt(i);
+ lastIndex = lastIndex + itemCount + 1;
+ }
+
+ for (int index = updateIndex; index < lastIndex; index++)
+ {
+ __itemHeightList.GetAt(index, itemHeightEntry);
+ itemHeightEntry.groupIndex = itemHeightEntry.groupIndex + 1;
+ __itemHeightList.SetAt(itemHeightEntry, index);
+ }
}
else
{
- __itemHeightList.InsertAt(defaultItemHeight, targetIndex);
+ itemHeightEntry.groupIndex = groupIndex;
+ itemHeightEntry.itemIndex = itemIndex;
+ itemHeightEntry.itemHeight = defaultItemHeight;
+ itemHeightEntry.isFooterItem = false;
+ __itemHeightList.InsertAt(itemHeightEntry, targetIndex);
+
+ int itemCount = GetItemCountAt(groupIndex);
+ int remainingItemCount = (itemCount - itemIndex);
+
+ for (int i = (targetIndex + 1); i < (targetIndex + remainingItemCount); i++)
+ {
+ __itemHeightList.GetAt(i, itemHeightEntry);
+ itemHeightEntry.groupIndex = groupIndex;
+ itemHeightEntry.itemIndex = itemHeightEntry.itemIndex + 1;
+ __itemHeightList.SetAt(itemHeightEntry, i);
+ }
}
}
else if (refreshType == TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE)
{
__itemHeightList.RemoveAt(targetIndex);
}
+
+ int updateIndex = targetIndex;// Decrement the group Index below the added item by 1
+ int lastIndex = 0;
+
+ for (int i = 0; i < (GetGroupCount() + 1); i++)
+ {
+ int itemCount = GetItemCountAt(i);
+ lastIndex = lastIndex + itemCount + 1;
+ }
+
+ for (int index = updateIndex; index < lastIndex; index++)
+ {
+ __itemHeightList.GetAt(index, itemHeightEntry);
+ itemHeightEntry.groupIndex = itemHeightEntry.groupIndex - 1;
+ __itemHeightList.SetAt(itemHeightEntry, index);
+ }
}
else
{
__itemHeightList.RemoveAt(targetIndex);
+ int itemCount = GetItemCountAt(groupIndex);
+ int remainingItemCount = itemCount - itemIndex;
+
+ for (int i = targetIndex; i < (targetIndex + remainingItemCount); i++)
+ {
+ __itemHeightList.GetAt(i, itemHeightEntry);
+ itemHeightEntry.groupIndex = groupIndex;
+ itemHeightEntry.itemIndex = (itemHeightEntry.itemIndex - 1);
+ __itemHeightList.SetAt(itemHeightEntry, i);
+ }
}
}
for (int i = 0; i < groupCount; i++)
{
-
__sectionAlignmentList.Add(alignment);
}
pCanvas = null;
pVisualElement = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, pVisualElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pVisualElement != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pVisualElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
pVisualElement->SetShowState(true);
pCanvas = pVisualElement->GetCanvasN();
- SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pCanvas->Clear();
pCanvas->DrawBitmap(FloatRectangle(0, 0, itemBounds.width, itemBounds.height), *pBitmap);
if (__pCapturedItemVisualElement == null)
{
__pCapturedItemVisualElement = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, __pCapturedItemVisualElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, __pCapturedItemVisualElement != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pCapturedItemVisualElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
__pCapturedItemVisualElement->SetBounds(FloatRectangle(itemBounds.x, itemBounds.y, itemBounds.width, height));
pCanvas = __pCapturedItemVisualElement->GetCanvasN();
- SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
}
void
+_TableViewPresenter::RestoreEditCopyPasteManager(void)
+{
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ SysTryReturnVoidResult(NID_UI_CTRL, pControlManager != null, E_SYSTEM, "Failed to get Control Manager.");
+
+ _Control* pFocusControl = pControlManager->GetFocusControl();
+ SysTryReturnVoidResult(NID_UI_CTRL, pFocusControl != null, E_SYSTEM, "Failed to get Focussed Control.");
+
+ _Edit* pEdit = dynamic_cast<_Edit*>(pFocusControl);
+ if (pEdit == null)
+ {
+ return;
+ }
+
+ _Control* pControl = pEdit;
+ while (pControl)
+ {
+ pControl = pControl->GetParent();
+ _TableViewItem* pItem = dynamic_cast<_TableViewItem*>(pControl);
+ if (pItem)
+ {
+ pEdit->Invalidate();
+ break;
+ }
+ }
+}
+
+void
_TableViewPresenter::OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target)
{
if (keyName == L"REMOVE_ITEM_ANIMATION")
__scrollToItemTag.startedAnimation = false;
ScrollToItem(__scrollToItemTag.groupIndex, __scrollToItemTag.itemIndex, __scrollToItemTag.itemAlignment, __scrollToItemTag.shiftingDistance);
}
+ RestoreEditCopyPasteManager();
return;
}
else if (keyName == L"COLLAPSE_GROUP_ANIMATION")
__scrollToItemTag.startedAnimation = false;
ScrollToItem(__scrollToItemTag.groupIndex, __scrollToItemTag.itemIndex, __scrollToItemTag.itemAlignment, __scrollToItemTag.shiftingDistance);
}
+ RestoreEditCopyPasteManager();
return;
}
SetLoadedItemsVisibleFromPosition(currentPosition, true);
MoveLoadedItemsFromPosition(currentPosition);
+ RestoreEditCopyPasteManager();
return;
}
else if (keyName == L"COLLAPSE_GROUP_ANIMATION")
SetLoadedItemsVisibleFromPosition(currentPosition, false);
MoveLoadedItemsFromPosition(currentPosition);
+ RestoreEditCopyPasteManager();
return;
}
else if (keyName == L"SWEEP_ITEM_ANIMATION")
bool
_TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
- if (!__pTableView->IsFocusModeStateEnabled())
+ if (!__pTableView->IsFocusModeStateEnabled() || !__pTableView->IsVisible() || !__pTableView->IsEnabled() || !__pTableView->IsFocusable())
{
return false;
}
if (pTop)
{
pFocusedControl = pTop->GetCurrentFocusControl();
+ if (pFocusedControl)
+ {
+ _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(pFocusedControl);
+ if (pFocusTraversalControl != __pTableView)
+ {
+ return false;
+ }
+ }
}
_TableViewItem* pItem = null;
switch (keyCode)
{
case _KEY_UP:
+ StopExpandCollapseAnimation();
if (pFocusedControl != null)
{
pItem = dynamic_cast<_TableViewItem*>(pFocusedControl);
if (pItem == null)
{
_Control* pParentControl = pFocusedControl->GetParent();
+ while (pParentControl != null && pParentControl->GetParent() != __pTableView)
+ {
+ pParentControl = pParentControl->GetParent();
+ }
pItem = dynamic_cast<_TableViewItem*>(pParentControl);
}
+ if (pItem && pItem->GetParent() != __pTableView)
+ {
+ _Control* pParentControl = pItem->GetParent();
+ while (pParentControl != __pTableView)
+ {
+ pItem = dynamic_cast<_TableViewItem*>(pParentControl);
+ pParentControl = pParentControl->GetParent();
+ }
+ }
+
if (pItem != null)
{
pItem->GetItemIndex(itemPos.groupIndex, itemPos.itemIndex);
if (pItem->GetBoundsF().y < GetScrollPosition())
{
+ ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
+ }
+ else if (pItem->GetBoundsF().y + pItem->GetBoundsF().height > GetScrollPosition() + __pTableView->GetBoundsF().height)
+ {
ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
}
if (pItem->GetEnableState() && pItem->GetVisibleState()
&& pItem->IsFocusable())
{
- pItem->SetFocused(true);
- __focusItemTag.groupIndex = itemPos.groupIndex;
- __focusItemTag.itemIndex = itemPos.itemIndex;
- __isAnnexFocused = false;
- pItem->DrawFocus();
+ SetItemFocus(pItem, itemPos);
break;
}
}
break;
case _KEY_DOWN:
+ StopExpandCollapseAnimation();
if (pFocusedControl != null)
{
pItem = dynamic_cast<_TableViewItem*>(pFocusedControl);
if (pItem == null)
{
_Control* pParentControl = pFocusedControl->GetParent();
+ while (pParentControl != null && pParentControl->GetParent() != __pTableView)
+ {
+ pParentControl = pParentControl->GetParent();
+ }
pItem = dynamic_cast<_TableViewItem*>(pParentControl);
}
+ if (pItem && pItem->GetParent() != __pTableView)
+ {
+ _Control* pParentControl = pItem->GetParent();
+ while (pParentControl != __pTableView)
+ {
+ pItem = dynamic_cast<_TableViewItem*>(pParentControl);
+ pParentControl = pParentControl->GetParent();
+ }
+ }
+
if (pItem != null)
{
pItem->GetItemIndex(itemPos.groupIndex, itemPos.itemIndex);
TableViewItemTag lastItemPos = {-1, -1};
GetLastItem(lastItemPos);
- if (itemPos.groupIndex == lastItemPos.groupIndex && itemPos.itemIndex == lastItemPos.itemIndex)
+ if (itemPos.groupIndex == lastItemPos.groupIndex && (itemPos.itemIndex == lastItemPos.itemIndex || __pListModel->IsGroupExpanded(itemPos.groupIndex) == false))
{
SetTableViewFocused(false);
return false;
TableViewItemTag lastItemPos = {-1, -1};
GetLastItem(lastItemPos);
- if (itemPos.groupIndex == lastItemPos.groupIndex && itemPos.itemIndex == lastItemPos.itemIndex)
+ if (itemPos.groupIndex == lastItemPos.groupIndex && (itemPos.itemIndex == lastItemPos.itemIndex
+ || __pListModel->IsGroupExpanded(itemPos.groupIndex) == false))
{
SetTableViewFocused(false);
return false;
}
if (pItem->GetBoundsF().y + pItem->GetBoundsF().height > GetScrollPosition() + __pTableView->GetBoundsF().height)
{
- ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
+ ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
}
if (pItem->GetEnableState() && pItem->GetVisibleState()
&& pItem->IsFocusable())
{
- pItem->SetFocused(true);
- pItem->DrawFocus();
- __focusItemTag.groupIndex = itemPos.groupIndex;
- __focusItemTag.itemIndex = itemPos.itemIndex;
- __isAnnexFocused = false;
+ SetItemFocus(pItem, itemPos);
break;
}
}
bool
_TableViewPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
- if (!__pTableView->IsFocusModeStateEnabled())
+ if (!__pTableView->IsFocusModeStateEnabled() || !__pTableView->IsVisible() || !__pTableView->IsEnabled() || !__pTableView->IsFocusable())
{
return false;
}
}
void
+_TableViewPresenter::SetFocusItemOnPressedState(int groupIndex, int itemIndex)
+{
+ __focusItemTagOnTraversal.groupIndex = groupIndex;
+ __focusItemTagOnTraversal.itemIndex = itemIndex;
+}
+
+void
+_TableViewPresenter::SetCurrentAccessibilityIndex(int groupIndex, int itemIndex)
+{
+ __accessibilityTag.groupIndex = groupIndex;
+ __accessibilityTag.itemIndex = itemIndex;
+ return;
+}
+
+void
+_TableViewPresenter::SetItemFocus(_TableViewItem* pItem, TableViewItemTag itemPos)
+{
+ pItem->SetFocused(true);
+ __focusItemTag.groupIndex = itemPos.groupIndex;
+ __focusItemTag.itemIndex = itemPos.itemIndex;
+ __isAnnexFocused = false;
+ pItem->DrawFocus();
+}
+
+void
_TableViewPresenter::OnDrawFocus(void)
{
if (!__pTableView->IsFocusModeStateEnabled())
return;
}
+ if (__pTableView->GetRootWindow())
+ {
+ if(!__pTableView->GetRootWindow()->IsActivated())
+ {
+ return;
+ }
+ }
+
_Control* pFocusedControl = null;
_Window* pTop = __pTableView->GetRootWindow();
if (pTop)
_TableViewItem* pItem = null;
TableViewItemTag itemPos = {-1, -1};
+ if (__focusItemTagOnTraversal.groupIndex != -1)
+ {
+ __focusItemTag.groupIndex = __focusItemTagOnTraversal.groupIndex;
+ __focusItemTag.itemIndex = __focusItemTagOnTraversal.itemIndex;
+ __isRestoreFocus = true;
+ __isAnnexFocused = false;
+ }
+
+ //Check for focus on orientation change
+ if (__isFocusedDuringOrientationChange || __focusItemTagOnTraversal.groupIndex != -1)
+ {
+ TableViewItemTag bottomDrawnItemIndex = {-1, -1};
+ TableViewItemTag topDrawnItemIndex = {-1, -1};
+ GetBottomDrawnItem(bottomDrawnItemIndex);
+ GetTopDrawnItem(topDrawnItemIndex);
+
+ if ((bottomDrawnItemIndex.groupIndex < __focusItemTag.groupIndex) ||
+ (bottomDrawnItemIndex.groupIndex == __focusItemTag.groupIndex && bottomDrawnItemIndex.itemIndex <= __focusItemTag.itemIndex))
+ {
+ ScrollToItem(__focusItemTag.groupIndex, __focusItemTag.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
+ }
+ else
+ {
+ if ((topDrawnItemIndex.groupIndex > __focusItemTag.groupIndex) ||
+ (topDrawnItemIndex.groupIndex == __focusItemTag.groupIndex && topDrawnItemIndex.itemIndex >= __focusItemTag.itemIndex))
+ {
+ ScrollToItem(__focusItemTag.groupIndex, __focusItemTag.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
+ }
+
+ }
+ __isFocusedDuringOrientationChange = false;
+ }
+
+ __focusItemTagOnTraversal.groupIndex = -1;
+ __focusItemTagOnTraversal.itemIndex = -1;
+
pItem = FindItem(__focusItemTag);
if (__isRestoreFocus && pItem != null)
return;
}
- if (pFocusedControl != null)
+ SysTryReturnVoidResult(NID_UI_CTRL, pFocusedControl != null, E_SYSTEM, "Failed to get Focussed control.");
+
+ pTableView = dynamic_cast<_TableView*>(pFocusedControl);
+ SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_SYSTEM, "Failed to get Focussed control.");
+
+ if (_FocusManagerImpl::GetInstance()->IsForwardDirection() == true)
{
- pTableView = dynamic_cast<_TableView*>(pFocusedControl);
- if (pTableView != null)
+ GetFirstItem(itemPos);
+ if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SIMPLE)
+ {
+ itemPos.itemIndex = 0;
+ }
+
+ ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
+ pItem = FindItem(itemPos);
+
+ if (pItem != null && pItem->GetEnableState() && pItem->GetVisibleState() && pItem->IsFocusable())
+ {
+ SetItemFocus(pItem, itemPos);
+ return;
+ }
+
+ while (GetNextItemPosition(itemPos, itemPos))
{
- if (_FocusManagerImpl::GetInstance()->IsForwardDirection() == true)
+ TableViewItemTag topDrawnItemIndex = {-1, -1};
+ GetTopDrawnItem(topDrawnItemIndex);
+ if ((topDrawnItemIndex.groupIndex < itemPos.groupIndex) ||
+ (topDrawnItemIndex.groupIndex == itemPos.groupIndex && topDrawnItemIndex.itemIndex <= itemPos.itemIndex))
{
- GetFirstItem(itemPos);
- if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SIMPLE)
+ TableViewItemTag bottomDrawnItemIndex = {-1, -1};
+ GetBottomDrawnItem(bottomDrawnItemIndex);
+ if ((bottomDrawnItemIndex.groupIndex > itemPos.groupIndex) ||
+ (bottomDrawnItemIndex.groupIndex == itemPos.groupIndex && bottomDrawnItemIndex.itemIndex > itemPos.itemIndex))
{
- itemPos.itemIndex = 0;
+ pItem = FindItem(itemPos);
}
-
+ else
+ {
+ ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
+ pItem = FindItem(itemPos);
+ }
+ }
+ else
+ {
ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
pItem = FindItem(itemPos);
- if (pItem != null)
+ }
+
+ if (pItem != null)
+ {
+ if (!pItem->GetVisibleState() || !pItem->GetEnableState()
+ || !pItem->IsFocusable())
{
- if (pItem->GetEnableState() && pItem->GetVisibleState()
- && pItem->IsFocusable())
- {
- __focusItemTag.groupIndex = itemPos.groupIndex;
- __focusItemTag.itemIndex = itemPos.itemIndex;
- __isAnnexFocused = false;
- pItem->SetFocused(true);
- pItem->DrawFocus();
- }
- else
+ TableViewItemTag lastItemPos = {-1, -1};
+ GetLastItem(lastItemPos);
+
+ if (itemPos.groupIndex == lastItemPos.groupIndex && itemPos.itemIndex == lastItemPos.itemIndex)
{
- while (GetNextItemPosition(itemPos, itemPos))
- {
- TableViewItemTag topDrawnItemIndex = {-1, -1};
- GetTopDrawnItem(topDrawnItemIndex);
- if (topDrawnItemIndex.groupIndex <= itemPos.groupIndex && topDrawnItemIndex.itemIndex <= itemPos.itemIndex)
- {
- TableViewItemTag bottomDrawnItemIndex = {-1, -1};
- GetBottomDrawnItem(bottomDrawnItemIndex);
- if (bottomDrawnItemIndex.groupIndex >= itemPos.groupIndex && bottomDrawnItemIndex.itemIndex >= itemPos.itemIndex)
- {
- pItem = FindItem(itemPos);
- }
- else
- {
- ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
- pItem = FindItem(itemPos);
- }
- }
- else
- {
- ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
- pItem = FindItem(itemPos);
- }
-
- if (pItem != null)
- {
- if (!pItem->GetVisibleState() || !pItem->GetEnableState()
- || !pItem->IsFocusable())
- {
- TableViewItemTag lastItemPos = {-1, -1};
- GetLastItem(lastItemPos);
-
- if (itemPos.groupIndex == lastItemPos.groupIndex && itemPos.itemIndex == lastItemPos.itemIndex)
- {
- return;
- }
-
- continue;
- }
- else
- {
- __focusItemTag.groupIndex = itemPos.groupIndex;
- __focusItemTag.itemIndex = itemPos.itemIndex;
- __isAnnexFocused = false;
- pItem->SetFocused(true);
- pItem->DrawFocus();
- break;
- }
- }
- }
+ return;
}
+
+ continue;
+ }
+ else
+ {
+ SetItemFocus(pItem, itemPos);
+ break;
+ }
+ }
+ }
+ }
+ else
+ {
+ GetLastItem(itemPos);
+ ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
+ pItem = FindItem(itemPos);
+
+ if (pItem != null && pItem->GetEnableState() && pItem->GetVisibleState() && pItem->IsFocusable())
+ {
+ SetItemFocus(pItem, itemPos);
+ return;
+ }
+
+ while (GetPreviousItemPosition(itemPos, itemPos))
+ {
+ TableViewItemTag bottomDrawnItemIndex = {-1, -1};
+ GetBottomDrawnItem(bottomDrawnItemIndex);
+
+ if ((bottomDrawnItemIndex.groupIndex > itemPos.groupIndex) ||
+ (bottomDrawnItemIndex.groupIndex == itemPos.groupIndex && bottomDrawnItemIndex.itemIndex >= itemPos.itemIndex))
+ {
+ TableViewItemTag topDrawnItemIndex = {-1, -1};
+ GetTopDrawnItem(topDrawnItemIndex);
+ if ((topDrawnItemIndex.groupIndex < itemPos.groupIndex) ||
+ (topDrawnItemIndex.groupIndex == itemPos.groupIndex && topDrawnItemIndex.itemIndex < itemPos.itemIndex))
+ {
+ pItem = FindItem(itemPos);
+ }
+ else
+ {
+ ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
+ pItem = FindItem(itemPos);
}
}
else
{
- GetLastItem(itemPos);
ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
pItem = FindItem(itemPos);
+ }
- if (pItem != null)
+ if (pItem != null)
+ {
+ if (!pItem->GetVisibleState() || !pItem->GetEnableState()
+ || !pItem->IsFocusable())
{
- if (pItem->GetEnableState() && pItem->GetVisibleState()
- && pItem->IsFocusable())
- {
- __focusItemTag.groupIndex = itemPos.groupIndex;
- __focusItemTag.itemIndex = itemPos.itemIndex;
- __isAnnexFocused = false;
- pItem->SetFocused(true);
- pItem->DrawFocus();
- }
- else
+ TableViewItemTag firstItemPos = {-1, -1};
+ GetFirstItem(firstItemPos);
+ if (itemPos.groupIndex == firstItemPos.groupIndex && itemPos.itemIndex == firstItemPos.itemIndex)
{
- while (GetPreviousItemPosition(itemPos, itemPos))
- {
- TableViewItemTag bottomDrawnItemIndex = {-1, -1};
- GetBottomDrawnItem(bottomDrawnItemIndex);
-
- if (bottomDrawnItemIndex.groupIndex >= itemPos.groupIndex && bottomDrawnItemIndex.itemIndex >= itemPos.itemIndex)
- {
- TableViewItemTag topDrawnItemIndex = {-1, -1};
- GetTopDrawnItem(topDrawnItemIndex);
- if (topDrawnItemIndex.groupIndex <= itemPos.groupIndex && topDrawnItemIndex.itemIndex <= itemPos.itemIndex)
- {
- pItem = FindItem(itemPos);
- }
- else
- {
- ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
- pItem = FindItem(itemPos);
- }
- }
- else
- {
- ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
- pItem = FindItem(itemPos);
- }
-
- if (pItem != null)
- {
- if (!pItem->GetVisibleState() || !pItem->GetEnableState()
- || !pItem->IsFocusable())
- {
- TableViewItemTag firstItemPos = {-1, -1};
- GetFirstItem(firstItemPos);
- if (itemPos.groupIndex == firstItemPos.groupIndex && itemPos.itemIndex == firstItemPos.itemIndex)
- {
- return;
- }
-
- continue;
- }
- else
- {
- __focusItemTag.groupIndex = itemPos.groupIndex;
- __focusItemTag.itemIndex = itemPos.itemIndex;
- __isAnnexFocused = false;
- pItem->SetFocused(true);
- pItem->DrawFocus();
- break;
- }
- }
- }
+ return;
}
+
+ continue;
+ }
+ else
+ {
+ SetItemFocus(pItem, itemPos);
+ break;
}
}
}
}
}
+bool
+_TableViewPresenter::OnTraversalControlFocusGained(void)
+{
+ if (__focusItemTagOnTraversal.groupIndex != -1)
+ {
+ OnDrawFocus();
+ }
+ else if (__focusItemTag.groupIndex != -1) //Fix for 55059
+ {
+ __focusItemTagOnTraversal.groupIndex = __focusItemTag.groupIndex;
+ __focusItemTagOnTraversal.itemIndex = __focusItemTag.itemIndex;
+ OnDrawFocus();
+ }
+
+ return false;
+}
+
+bool
+_TableViewPresenter::OnTraversalControlFocusLost(void)
+{
+ return false;
+}
+
void
_TableViewPresenter::OnFocusModeStateChanged(void)
{
+ __isFocusedDuringOrientationChange = false;
__focusItemTag.groupIndex = -1;
__focusItemTag.itemIndex = -1;
__isRestoreFocus = false;
do
{
pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex));
- SysTryReturn(NID_UI_CTRL, pItem != null, false, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range.");
+ SysTryReturn(NID_UI_CTRL, pItem != null, false, E_OUT_OF_RANGE, "[%s] Group Index (%d) Item Index (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE),itemPos.groupIndex,itemPos.itemIndex);
_AccessibilityContainer* pContainer = pItem->GetAccessibilityContainer();
_AccessibilityElement* pElement = null;
}
}
+void
+_TableViewPresenter::SetFocusDuringOrientationChange(void)
+{
+ if (__focusItemTag.groupIndex != -1)
+ {
+ __isFocusedDuringOrientationChange = true;
+ }
+}
+
+void
+_TableViewPresenter::ChangeScrollBarVisibility(float viewRange, float scrollRange)
+{
+ _Scroll* pScroll = __pTableView->GetScrollBar();
+ SysTryReturnVoidResult(NID_UI_CTRL, (pScroll != NULL), E_SYSTEM,
+ "[%s] A system error has occurred. _Scroll instance must not be null.", GetErrorMessage(E_SYSTEM));
+
+ if (viewRange >= scrollRange)
+ {
+ pScroll->SetScrollVisibility(false);
+ }
+ else
+ {
+ pScroll->SetScrollVisibility(true);
+ }
+}
+
bool
_TableViewSectionStringAlignment::operator== (const _TableViewSectionStringAlignment& rhs) const
{
return true;
}
+bool
+_TableViewItemHeight::operator!= (const _TableViewItemHeight& rhs) const
+{
+ if (groupIndex == rhs.groupIndex && itemIndex == rhs.itemIndex && itemHeight == rhs.itemHeight && isFooterItem == rhs.isFooterItem)
+ {
+ return false;
+ }
+
+ return true;
+}
+
+bool
+_TableViewItemHeight::operator== (const _TableViewItemHeight& rhs) const
+{
+ if (groupIndex == rhs.groupIndex && itemIndex == rhs.itemIndex && itemHeight == rhs.itemHeight && isFooterItem == rhs.isFooterItem)
+ {
+ return true;
+ }
+
+ return false;
+}
}}} // Tizen::Ui::Controls
_TextBlockEvent::CreateInstanceN(const _Control& source)
{
_TextBlockEvent* pCoreTextBlockEvent = new (std::nothrow) _TextBlockEvent(source);
- SysTryReturn(NID_UI_CTRL, pCoreTextBlockEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pCoreTextBlockEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
if (IsFailed(GetLastResult()))
{
_TextBlockEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
{
_ITextBlockEventListener* pTextBlockEventListener = dynamic_cast <_ITextBlockEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventListener != null, E_INVALID_ARG, "The Invalid listener is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventListener != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid listener is given.");
const _TextBlockEventArg* pTextBlockEventArg = dynamic_cast <const _TextBlockEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg != null, E_INVALID_ARG, "The Invalid Event Argument is given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The Invalid Event Argument is given.");
pTextBlockEventListener->OnTextBlockSelected(const_cast <_Control&>(*__pSource),
pTextBlockEventArg->GetStartPosition(), pTextBlockEventArg->GetEndPosition());
_TextBlockEvent::CreateTextBlockEventArgN(int start, int end)
{
_TextBlockEventArg* pEventArg = new (std::nothrow) _TextBlockEventArg(start, end);
- SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pEventArg;
}
result
_TextBoxImpl::SetBlockRange(int start, int end)
{
- SysTryReturnResult(NID_UI_CTRL, (start > -1 && end > -1), E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given.\n");
- SysTryReturnResult(NID_UI_CTRL, (end > start), E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given.\n");
+ SysTryReturnResult(NID_UI_CTRL, (start > -1 && end > -1), E_INVALID_ARG, "The invalid argument is given.");
+ SysTryReturnResult(NID_UI_CTRL, (end > start), E_INVALID_ARG, "The invalid argument is given.");
int tempTextLength = 0;
tempTextLength = __pEdit->GetTextLength();
SysTryReturnResult(NID_UI_CTRL, (tempTextLength > start && tempTextLength > end), E_INVALID_ARG,
- "[E_INVALID_ARG] The invalid argument is given.\n");
+ "The invalid argument is given.");
return __pEdit->SetBlockRange(start, end);
}
if (__pPublicLinkEvent != null)
{
IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(text, linkType, link);
- SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.Memory allocation failed.");
__pPublicLinkEvent->Fire(*pLinkEventArg);
}
if (__pPublicTextBlockEvent != null)
{
IEventArg* pTextBlockEventArg = _PublicTextBlockEvent::CreateTextBlockEventArgN(start, end);
- SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _TextBlockEventArg.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pPublicTextBlockEvent->Fire(*pTextBlockEventArg);
}
_TextEvent::CreateInstanceN(const _Control& source)
{
_TextEvent* pCoreTextEvent = new (std::nothrow) _TextEvent(source);
- SysTryReturn(NID_UI_CTRL, pCoreTextEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pCoreTextEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
if (IsFailed(GetLastResult()))
{
// cast to _ITextEventListener
_ITextEventListener* pTextListener = dynamic_cast <_ITextEventListener*>(&listener);
SysTryReturnVoidResult(NID_UI_CTRL, pTextListener != null, E_INVALID_ARG,
- "[E_INVALID_ARG] The invalid listener was given.\n");
+ "[E_INVALID_ARG] The invalid listener was given.");
// cast to _TextEventArg
const _TextEventArg* pArg = dynamic_cast <const _TextEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n");
+ SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.");
CoreTextEventStatus stauts = pArg->GetStatus();
if (stauts == CORE_TEXT_EVENT_CHANGED)
_TextEvent::CreateTextEventArgN(CoreTextEventStatus status)
{
_TextEventArg* pEventArg = new (std::nothrow) _TextEventArg(status);
- SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
return pEventArg;
}
_TokenEdit::~_TokenEdit(void)
{
-
}
_TokenEdit*
SysTryReturn(NID_UI_CTRL, pPresenter != null, null, r, "[%s] Propagating.", GetErrorMessage(r));
_TokenEdit* pTokenEdit = new (std::nothrow) _TokenEdit();
- SysTryCatch(NID_UI_CTRL, pTokenEdit != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, pTokenEdit != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
pTokenEdit->AcquireHandle();
return;
}
- Canvas* pCanvas = GetCanvasN();
- SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- r = __pTokenEditPresenter->Draw(*pCanvas);
+ r = __pTokenEditPresenter->Draw();
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- delete pCanvas;
+ return;
}
result
{
result r = E_SUCCESS;
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
r = __pTokenEditPresenter->AppendToken(token);
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
{
result r = E_SUCCESS;
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
r = __pTokenEditPresenter->InsertTokenAt(index, token, true);
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
String
_TokenEdit::GetTokenAt(int index) const
{
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
return __pTokenEditPresenter->GetTokenAt(index);
}
int
_TokenEdit::GetTokenCount(void) const
{
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
return __pTokenEditPresenter->GetTokenCount(true);
}
int
_TokenEdit::GetSelectedTokenIndex(void) const
{
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
return __pTokenEditPresenter->GetSelectedTokenIndex();
}
bool
_TokenEdit::IsTokenEditModeEnabled(void) const
{
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
Variant var = GetProperty("tokenEditModeEnabled");
result
_TokenEdit::RemoveTokenAt(int index)
{
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
return __pTokenEditPresenter->RemoveTokenAt(index, true);
}
result
_TokenEdit::SetTokenSelected(int index, bool selected)
{
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
return __pTokenEditPresenter->SetTokenSelected(index, selected);
}
result
_TokenEdit::SetTokenEditModeEnabled(bool enable)
{
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
Variant var(enable);
{
result r = E_SUCCESS;
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
- __pTokenEditPresenter->SetDescriptionText(title);
+ __pTokenEditPresenter->SetTitleText(title);
- r = __pTokenEditPresenter->CalculateDescriptionTextRect(title);
+ r = __pTokenEditPresenter->CalculateTitleTextRect(title);
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
r = __pTokenEditPresenter->CalculateTokenPositionFromIndex(0);
String
_TokenEdit::GetTitleText(void) const
{
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
- return __pTokenEditPresenter->GetDescriptionText();
+ return __pTokenEditPresenter->GetTitleText();
}
void
_TokenEdit::SetAutoShrinkModeEnabled(bool enable)
{
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
__pTokenEditPresenter->SetAutoShrinkModeEnabled(enable);
+
+ return;
}
bool
_TokenEdit::IsAutoShrinkModeEnabled(void) const
{
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
return __pTokenEditPresenter->IsAutoShrinkModeEnabled();
}
{
ClearLastResult();
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+
__tokenColor[TOKEN_EDIT_STATUS_NORMAL] = color.ToColor();
- return E_SUCCESS;
+ return __pTokenEditPresenter->LoadTokenBgBitmap(TOKEN_EDIT_STATUS_NORMAL);
}
Variant
{
ClearLastResult();
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+
__tokenColor[TOKEN_EDIT_STATUS_SELECTED] = color.ToColor();
- return E_SUCCESS;
+ return __pTokenEditPresenter->LoadTokenBgBitmap(TOKEN_EDIT_STATUS_SELECTED);
}
Variant
{
ClearLastResult();
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+
__tokenColor[TOKEN_EDIT_STATUS_HIGHLIGHTED] = color.ToColor();
- return E_SUCCESS;
+ return __pTokenEditPresenter->LoadTokenBgBitmap(TOKEN_EDIT_STATUS_HIGHLIGHTED);
}
Variant
{
ClearLastResult();
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+
__tokenColor[TOKEN_EDIT_STATUS_DISABLED] = color.ToColor();
- return E_SUCCESS;
+ return __pTokenEditPresenter->LoadTokenBgBitmap(TOKEN_EDIT_STATUS_DISABLED);
}
Variant
result
_TokenEdit::SetPropertyTokenEditModeEnabled(const Variant& enable)
{
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
ClearLastResult();
Variant
_TokenEdit::GetPropertyTokenEditModeEnabled(void) const
{
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
ClearLastResult();
void
_TokenEdit::OnBoundsChanged(void)
{
- SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+ SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null.");
__pTokenEditPresenter->OnBoundsChanged();
pTextAccessibilityElement->SetLabel(GetTitleText() + spaceString + GetGuideText() + GetText());
}
pTextAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS");
+
+ pTextAccessibilityElement->SetSupportOperatingGesture(false);
}
break;
if (pContainer)
{
_AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
String labelText = GetTitleText();
- pAccessibilityElement->SetBounds(__pTokenEditPresenter->GetDescriptionTextRect());
+ pAccessibilityElement->SetBounds(__pTokenEditPresenter->GetTitleTextRect());
pAccessibilityElement->SetLabel(labelText);
pContainer->AddElement(*pAccessibilityElement);
__pTitleTextAccessibilityElement = pAccessibilityElement;
if (pContainer)
{
_AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
if (GetTextLength())
{
}
else
{
- pAccessibilityElement->SetTrait(L"Edit field");
+ pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_EDIT_FIELD_M_NOUN_T_TTS");
}
pContainer->AddElement(*pAccessibilityElement);
__pTitleTextAccessibilityElement = null;
}
}
+
+ return;
}
void
__pCursorAccessibilityElement = null;
}
}
+
+ return;
}
void
_TokenEditModel::_TokenEditModel(void)
{
-
}
_TokenEditModel::~_TokenEditModel(void)
{
-
}
-};
-};
-};
+}}} //Tizen::Ui::Controls
#include <FGrp_TextTextSimple.h>
#include <FGrp_FontImpl.h>
#include "FUiAnim_VisualElement.h"
+#include "FUiAnim_ControlVisualElement.h"
+#include "FUiAnim_VisualElementImpl.h"
#include "FUi_UiTouchEvent.h"
#include "FUiCtrl_TokenEditPresenter.h"
#include "FUiCtrl_Scroll.h"
#include "FUi_AccessibilityElement.h"
#include "FUiAnim_VisualElementImpl.h"
+using namespace Tizen::Ui::Animations;
using namespace Tizen::Base;
using namespace Tizen::Base::Runtime;
using namespace Tizen::Media;
currTokenLength = text.GetLength();
float tokenFontSize = 0.0f;
- pTextObject = new (std::nothrow) TextObject;
- SysTryReturnResult(NID_UI_CTRL, pTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ pTextObject = new (std::nothrow) TextObject();
+ SysTryReturnResult(NID_UI_CTRL, pTextObject != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
// for default initialize.
r = pTextObject->Construct();
r = ResetToken(text);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- __pVisualElement = new (std::nothrow) _VisualElement;
- SysTryCatch(NID_UI_CTRL, __pVisualElement != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ __pVisualElement = new (std::nothrow) _VisualElement();
+ SysTryCatch(NID_UI_CTRL, __pVisualElement != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = __pVisualElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct _VisualElement.", GetErrorMessage(r));
pTextObject->RemoveAll(true);
TextSimple* pSimpleText = new (std::nothrow) TextSimple(__pTextBuffer, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, pFont);
- SysTryCatch(NID_UI_CTRL, pSimpleText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, pSimpleText != null, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
r = pTextObject->AppendElement(*pSimpleText);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
_TokenEditPresenter::_TokenEditPresenter(void)
: __pTokenEdit(null)
, __pTokenList(null)
- , __pTokenBgBitmap(null)
+ , __pReplacedTokenBgNormalBitmap(null)
+ , __pReplacedTokenBgSelectedBitmap(null)
+ , __pReplacedTokenBgHighlightedBitmap(null)
+ , __pReplacedTokenBgDisabledBitmap(null)
, __pTokenBgNormalEffectBitmap(null)
- , __pTokenBgPressedEffectBitmap(null)
- , __pTokenBgReplacementFocusBitmap(null)
- , __pTokenBgFocusEffectBitmap(null)
+ , __pTokenBgSelectedEffectBitmap(null)
+ , __pTokenBgHighlightedEffectBitmap(null)
, __pressedTokenIndex(-1)
, __isEditingToken(false)
, __editingTokenIndex(-1)
, __clientRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
, __initTextRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
, __isEditModeEnabled(true)
- , __pDescriptionTextVisualElement(null)
- , __pDescriptionTextTextObject(null)
+ , __pTitleTextVisualElement(null)
+ , __pFocusRingVisualElement(null)
+ , __pTitleTextObject(null)
, __isTokenEditingFinished(false)
, __prevScrollValue(0.0f)
, __scrollValue(0.0f)
, __isNeedToScroll(false)
, __maxScrollValue(0.0f)
, __autoShrink(false)
- , __descriptionText(String())
+ , __titleText(String())
, __isPopupVisible(false)
, __isLongPressed(false)
, __lineSpacing(0.0f)
, __animatingIndex(-1)
, __lastTokenIndex(-1)
, __pTimingFunction(null)
- , __descriptionTextRectForScroll(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
+ , __titleTextRectForScroll(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
, __previousTitleWidth(-1.0f)
, __isTokenEditPresenterInitialized(false)
, __isFocus(false)
, __focusedTokenIndex(-1)
, __drawFocusState(false)
, __accessibilityFocusIn(false)
+ , __transactionId(0)
+ , __isDestroyed(false)
{
}
result
-_TokenEditPresenter::InitializeDescriptionText(void)
+_TokenEditPresenter::InitializeTitleText(void)
{
result r = E_SUCCESS;
- float descriptionTextSize = 0.0f;
- Font* pFont = null;
- float editFontSize = 0.0f;
- __pDescriptionTextTextObject = new (std::nothrow) TextObject();
- SysTryReturnResult(NID_UI_CTRL, __pDescriptionTextTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ __pTitleTextObject = new (std::nothrow) TextObject();
+ SysTryReturnResult(NID_UI_CTRL, __pTitleTextObject != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
// for default initialize.
- r = __pDescriptionTextTextObject->Construct();
+ r = __pTitleTextObject->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = __pDescriptionTextTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE);
+ r = __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = __pDescriptionTextTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
+ r = __pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, descriptionTextSize);
-
- pFont = GetFont();
- SysTryCatch(NID_UI_CTRL, pFont != null, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- editFontSize = GetTextSize();
- (_FontImpl::GetInstance(*pFont))->SetSize(descriptionTextSize);
-
- r = __pDescriptionTextTextObject->SetFont(pFont, 0, __pDescriptionTextTextObject->GetTextLength());
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- (_FontImpl::GetInstance(*pFont))->SetSize(editFontSize);
-
return r;
CATCH:
- delete __pDescriptionTextTextObject;
- __pDescriptionTextTextObject = null;
+ delete __pTitleTextObject;
+ __pTitleTextObject = null;
return r;
}
}
}
+ __isDestroyed = true;
+ AnimationTransaction::Stop(__transactionId); //Stop the animation transaction
+
if (__pTokenList != null)
{
__pTokenList->RemoveAll(true);
__pTokenList = null;
}
- delete __pTokenBgBitmap;
- __pTokenBgBitmap = null;
+ delete __pReplacedTokenBgNormalBitmap;
+ __pReplacedTokenBgNormalBitmap = null;
+
+ delete __pReplacedTokenBgSelectedBitmap;
+ __pReplacedTokenBgSelectedBitmap = null;
+
+ delete __pReplacedTokenBgHighlightedBitmap;
+ __pReplacedTokenBgHighlightedBitmap = null;
+
+ delete __pReplacedTokenBgDisabledBitmap;
+ __pReplacedTokenBgDisabledBitmap = null;
delete __pTokenBgNormalEffectBitmap;
__pTokenBgNormalEffectBitmap = null;
- delete __pTokenBgPressedEffectBitmap;
- __pTokenBgPressedEffectBitmap = null;
+ delete __pTokenBgSelectedEffectBitmap;
+ __pTokenBgSelectedEffectBitmap = null;
- delete __pTokenBgReplacementFocusBitmap;
- __pTokenBgReplacementFocusBitmap = null;
+ delete __pTokenBgHighlightedEffectBitmap;
+ __pTokenBgHighlightedEffectBitmap = null;
- delete __pTokenBgFocusEffectBitmap;
- __pTokenBgFocusEffectBitmap = null;
+ if (__pTitleTextVisualElement != null)
+ {
+ __pTitleTextVisualElement->Destroy();
+ __pTitleTextVisualElement = null;
+ }
- if (__pDescriptionTextVisualElement != null)
+ if (__pFocusRingVisualElement != null)
{
- __pDescriptionTextVisualElement->Destroy();
- __pDescriptionTextVisualElement = null;
+ __pFocusRingVisualElement->Destroy();
+ __pFocusRingVisualElement = null;
}
- delete __pDescriptionTextTextObject;
- __pDescriptionTextTextObject = null;
+ delete __pTitleTextObject;
+ __pTitleTextObject = null;
delete __pTimingFunction;
__pTimingFunction = null;
_TokenEditPresenter::CreateTokenEditPresenterN(void)
{
_TokenEditPresenter* pPresenter = new (std::nothrow) _TokenEditPresenter();
- SysTryReturn(NID_UI_CTRL, pPresenter != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pPresenter != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pPresenter;
}
r = _EditPresenter::Initialize(control);
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
- r = InitializeDescriptionText();
+ r = InitializeTitleText();
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
TextObject* pTextObject = GetTextObject();
if (pTextObject != null)
{
pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
- pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
+ pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE);
pTextObject->SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL);
pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE);
}
__pTokenEdit = dynamic_cast< _TokenEdit* >(GetEditView());
- SysTryReturnResult(NID_UI_CTRL, __pTokenEdit != null, E_SYSTEM, "A system error has occurred. The _Token instance is null.");
+ SysTryReturnResult(NID_UI_CTRL, __pTokenEdit != null, E_SYSTEM, "A system error has occurred. The _TokenEdit instance is null.");
_TokenEditModel* pTokenEditModel = new (std::nothrow) _TokenEditModel();
SysTryReturnResult(NID_UI_CTRL, pTokenEditModel != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
float tokenBottomMargin = 0.0f;
float tokenHeight = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
- Color focusTokenColor;
- Bitmap* pTokenBgFocusBitmap = null;
+ Color tokenColor;
GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, leftMargin);
GET_SHAPE_CONFIG(TOKENEDIT::RIGHT_MARGIN, orientation, rightMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight);
- GET_COLOR_CONFIG(TOKENEDIT::BG_HIGHLIGHTED, focusTokenColor);
// For drawing token in specific area
__clientRect.x = leftMargin;
_EditPresenter::SetTextSize(__editContentFontSize);
__pTokenList = new (std::nothrow) Collection::LinkedList();
- SysTryCatch(NID_UI_CTRL, __pTokenList != null, , r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pTokenList != null, , r = E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__delimiter = L"\n";
- r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgBitmap);
+ tokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_NORMAL);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, __pReplacedTokenBgNormalBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgNormalEffectBitmap);
+ tokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_SELECTED);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, __pReplacedTokenBgSelectedBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgPressedEffectBitmap);
+ tokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_HIGHLIGHTED);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, __pReplacedTokenBgHighlightedBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, pTokenBgFocusBitmap);
+ tokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_DISABLED);
+ r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, __pReplacedTokenBgDisabledBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- __pTokenBgReplacementFocusBitmap = _BitmapImpl::GetColorReplacedBitmapN(
- *pTokenBgFocusBitmap,Color::GetColor(COLOR_ID_MAGENTA), focusTokenColor);
- SysTryCatch(NID_UI_CTRL, __pTokenBgReplacementFocusBitmap != null, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgFocusEffectBitmap);
+ r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgNormalEffectBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- delete pTokenBgFocusBitmap;
- pTokenBgFocusBitmap = null;
+ r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgSelectedEffectBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgHighlightedEffectBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
__isTokenEditPresenterInitialized = true;
delete pTokenEditModel;
pTokenEditModel = null;
- delete __pTokenBgBitmap;
- __pTokenBgBitmap = null;
+ delete __pReplacedTokenBgNormalBitmap;
+ __pReplacedTokenBgNormalBitmap = null;
- delete __pTokenBgNormalEffectBitmap;
- __pTokenBgNormalEffectBitmap = null;
+ delete __pReplacedTokenBgSelectedBitmap;
+ __pReplacedTokenBgSelectedBitmap = null;
+
+ delete __pReplacedTokenBgHighlightedBitmap;
+ __pReplacedTokenBgHighlightedBitmap = null;
- delete __pTokenBgPressedEffectBitmap;
- __pTokenBgPressedEffectBitmap = null;
+ delete __pReplacedTokenBgDisabledBitmap;
+ __pReplacedTokenBgDisabledBitmap = null;
- delete pTokenBgFocusBitmap;
- pTokenBgFocusBitmap = null;
+ delete __pTokenBgNormalEffectBitmap;
+ __pTokenBgNormalEffectBitmap = null;
- delete __pTokenBgReplacementFocusBitmap;
- __pTokenBgReplacementFocusBitmap = null;
+ delete __pTokenBgSelectedEffectBitmap;
+ __pTokenBgSelectedEffectBitmap = null;
return r;
}
if (pToken != null)
{
_VisualElement* pTokenVisualElement = pToken->GetVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element of token.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "[%s] A system error has occurred. Failed to get visual element of token.", GetErrorMessage(E_SYSTEM));
Canvas* pTokenCanvas = pTokenVisualElement->GetCanvasN();
- SysTryReturnVoidResult(NID_UI_CTRL, pTokenCanvas != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get canvas of the token.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTokenCanvas != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get canvas of the token.", GetErrorMessage(E_SYSTEM));
FloatRectangle tokenRect(0.0f, 0.0f, pToken->displayRect.width, pToken->displayRect.height);
pTokenCanvas->SetBackgroundColor(Color(0));
pTokenCanvas->Clear();
Color selectedTokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_SELECTED);
- Bitmap* pReplacementColorBackgroundBitmap = null;
- if (__pTokenBgBitmap != null)
+ if (__pReplacedTokenBgSelectedBitmap != null)
{
- pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), selectedTokenColor);
-
- if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementColorBackgroundBitmap))
+ if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pReplacedTokenBgSelectedBitmap))
{
- pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *pReplacementColorBackgroundBitmap);
+ pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pReplacedTokenBgSelectedBitmap);
}
else
{
- pTokenCanvas->DrawBitmap(tokenRect, *pReplacementColorBackgroundBitmap);
+ pTokenCanvas->DrawBitmap(tokenRect, *__pReplacedTokenBgSelectedBitmap);
}
}
else
pTokenCanvas->FillRectangle(selectedTokenColor, tokenRect);
}
- if (__pTokenBgPressedEffectBitmap != null && (!isCustomBitmap))
+ if (__pTokenBgSelectedEffectBitmap != null && (!isCustomBitmap))
{
- if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgPressedEffectBitmap))
+ if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgSelectedEffectBitmap))
{
- pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgPressedEffectBitmap);
+ pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgSelectedEffectBitmap);
}
else
{
- pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgPressedEffectBitmap);
+ pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgSelectedEffectBitmap);
}
}
delete pTokenCanvas;
pTokenCanvas = null;
-
- delete pReplacementColorBackgroundBitmap;
}
}
else
else
{
Canvas* pCanvas = __pTokenEdit->GetCanvasN();
- SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element of Control.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_SYSTEM, "[%s] A system error has occurred. Failed to get visual element of Control.", GetErrorMessage(E_SYSTEM));
_EditPresenter::DrawText(*pCanvas);
pCanvas = null;
}
}
+
+ return;
}
result
-_TokenEditPresenter::Draw(Canvas& canvas)
+_TokenEditPresenter::Draw(void)
{
+ result r = E_SUCCESS;
+ _VisualElement* pEditVisualElement = null;
+ _VisualElement* pCursorVisualElement = null;
+ _Token* pToken = null;
+ _VisualElement* pTokenVisualElement = null;
+
if (!IsInitialized())
{
InitializeAtFirstDrawing();
- if (IsFocused())
+ if (IsCurrentFocused())
{
ShowKeypad(false);
}
}
- canvas.SetBackgroundColor(Color(0, 0, 0, 0));
- canvas.Clear();
+ //Do not change the bounds of the edit control after acquiring a canvas.
+ Canvas* pCanvas = __pTokenEdit->GetCanvasN();
+ SysTryReturnResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "Memory allocation failed.");
- DrawBackground(canvas);
+ pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+ pCanvas->Clear();
+
+ DrawBackground(*pCanvas);
DrawScrollBar();
- if (__pDescriptionTextTextObject->GetTextLength() != 0)
+ if (__pTitleTextObject->GetTextLength() != 0)
{
- DrawDescriptionText();
+ DrawTitleText();
}
if (GetTokenCount() != 0)
DrawToken();
}
- _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
- SysTryReturnResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get root visual element.");
+ pEditVisualElement = __pTokenEdit->GetVisualElement();
+ SysTryCatch(NID_UI_CTRL, pEditVisualElement, , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get _TokenEdit visual element.");
- _VisualElement* pCursorVisualElement = GetCursorVisualElement();
- SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element.");
+ pCursorVisualElement = GetCursorVisualElement();
+ SysTryCatch(NID_UI_CTRL, pCursorVisualElement, , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element.");
- _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
+ pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
if (pToken != null)
{
- _VisualElement* pTokenVisualElement = pToken->GetVisualElement();
- SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get visual element of token.");
+ pTokenVisualElement = pToken->GetVisualElement();
+ SysTryCatch(NID_UI_CTRL, pTokenVisualElement, , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element of token.");
if (__isEditingToken)
{
Canvas* pTokenCanvas = pTokenVisualElement->GetCanvasN();
- SysTryReturnResult(NID_UI_CTRL, pTokenCanvas != null, E_SYSTEM, "A system error has occurred. Failed to get canvas of the token.");
+ SysTryCatch(NID_UI_CTRL, pTokenCanvas, , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get canvas of the token.");
_EditPresenter::DrawText(*pTokenCanvas);
}
else
{
- SysTryReturnResult(NID_UI_CTRL, !__isEditingToken, E_SYSTEM, "An invalid argument is given.");
+ SysTryCatch(NID_UI_CTRL, !__isEditingToken, , r = E_SYSTEM, "[E_SYSTEM] An invalid argument is given.");
DrawText();
InitializeCursor();
__isTokenEditingFinished = false;
}
- return E_SUCCESS;
+ RestoreCopyPasteManager();
+
+ //fall through
+CATCH:
+ delete pCanvas;
+
+ return r;
}
bool
bool isCustomBitmap = false;
bool isCustomFocusBitmap = false;
- SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+ SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, false, E_SYSTEM, "[%s] A system error has occurred. The _TokenEdit instance is null.", GetErrorMessage(E_SYSTEM));
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
Bitmap* pReplacementColorBackgroundBitmap = null;
_Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
- if (pToken == null || pToken->pTextObject == null)
- {
- SysLog(NID_UI_CTRL, "[E_SYSTEM] The _Token instance is null");
- break;
- }
+ SysTryReturn(NID_UI_CTRL, (pToken != null && pToken->pTextObject != null), true, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
normalTokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_NORMAL);
selectedTokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_SELECTED);
disabledTokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_DISABLED);
_VisualElement* pTokenElement = pToken->GetVisualElement();
- if (pTokenElement == null)
- {
- SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. The _VisualElement instance is null");
- break;
- }
+ SysTryReturn(NID_UI_CTRL, pTokenElement != null, true, E_SYSTEM, "[%s] A system error has occurred. The _VisualElement instance must not be null.", GetErrorMessage(E_SYSTEM));
bool isSelected = false;
Canvas* pTokenCanvas = pTokenElement->GetCanvasN();
- if (pTokenCanvas == null)
- {
- SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. The Canvas instance is null");
- break;
- }
+ SysTryReturn(NID_UI_CTRL, pTokenCanvas != null, true, E_SYSTEM, "[%s] A system error has occurred. The Canvas instance must not be null.", GetErrorMessage(E_SYSTEM));
+
FloatRectangle tokenRect(0.0f, 0.0f, pToken->displayRect.width, pToken->displayRect.height);
pTokenCanvas->SetBackgroundColor(Color(0));
pTokenCanvas->Clear();
if (__pressedTokenIndex == i && IsFocused())
{
- if (__pTokenBgBitmap != null)
+ if (__pReplacedTokenBgSelectedBitmap != null)
{
- pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), selectedTokenColor);
-
- if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementColorBackgroundBitmap))
+ if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pReplacedTokenBgSelectedBitmap))
{
- pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *pReplacementColorBackgroundBitmap);
+ pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pReplacedTokenBgSelectedBitmap);
}
else
{
- pTokenCanvas->DrawBitmap(tokenRect, *pReplacementColorBackgroundBitmap);
+ pTokenCanvas->DrawBitmap(tokenRect, *__pReplacedTokenBgSelectedBitmap);
}
}
else
pTokenCanvas->FillRectangle(selectedTokenColor, tokenRect);
}
- if (__pTokenBgPressedEffectBitmap != null && (!isCustomBitmap))
+ if (__pTokenBgSelectedEffectBitmap != null && (!isCustomBitmap))
{
- if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgPressedEffectBitmap))
+ if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgSelectedEffectBitmap))
{
- pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgPressedEffectBitmap);
+ pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgSelectedEffectBitmap);
}
else
{
- pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgPressedEffectBitmap);
+ pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgSelectedEffectBitmap);
}
}
else
{
Color tokenBgColor = normalTokenColor;
+ pReplacementColorBackgroundBitmap = __pReplacedTokenBgNormalBitmap;
+
if (GetCurrentStatus() == EDIT_STATUS_DISABLED)
{
tokenBgColor = disabledTokenColor;
+ pReplacementColorBackgroundBitmap = __pReplacedTokenBgDisabledBitmap;
}
- if (__pTokenBgBitmap != null)
+ if (pReplacementColorBackgroundBitmap != null)
{
- pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), tokenBgColor);
-
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementColorBackgroundBitmap))
{
pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *pReplacementColorBackgroundBitmap);
if (__focusedTokenIndex == i && __drawFocusState && (!__isEditingToken))
{
- if (__pTokenBgReplacementFocusBitmap != null)
+ if (__pReplacedTokenBgHighlightedBitmap != null)
{
- if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgReplacementFocusBitmap))
+ if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pReplacedTokenBgHighlightedBitmap))
{
- pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgReplacementFocusBitmap);
+ pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pReplacedTokenBgHighlightedBitmap);
}
else
{
- pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgReplacementFocusBitmap);
+ pTokenCanvas->DrawBitmap(tokenRect, *__pReplacedTokenBgHighlightedBitmap);
}
}
- if (__pTokenBgFocusEffectBitmap != null && (!isCustomFocusBitmap))
+ if (__pTokenBgHighlightedEffectBitmap != null && (!isCustomFocusBitmap))
{
- if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgFocusEffectBitmap))
+ if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgHighlightedEffectBitmap))
{
- pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgFocusEffectBitmap);
+ pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgHighlightedEffectBitmap);
}
else
{
- pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgFocusEffectBitmap);
+ pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgHighlightedEffectBitmap);
}
}
pTokenElement->SetFlushNeeded();
delete pTokenCanvas;
-
- delete pReplacementColorBackgroundBitmap;
- pReplacementColorBackgroundBitmap = null;
}
return true;
}
Color
_TokenEditPresenter::GetTokenEditColor(const TokenEditStatus status) const
{
- SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, Color(0, 0, 0, 0), E_INVALID_STATE, "[E_INVALID_STATE] _TokenEdit is in an invalid state.");
+ SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, Color(0, 0, 0, 0), E_INVALID_STATE, "[%s] __pTokenEdit must not be null.", GetErrorMessage(E_INVALID_STATE));
return __pTokenEdit->GetTokenColor(status);
}
Color
_TokenEditPresenter::GetTokenEditTextColor(const TokenEditStatus status) const
{
- SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, Color(0, 0, 0, 0), E_INVALID_STATE, "[E_INVALID_STATE] _TokenEdit is in an invalid state.");
+ SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, Color(0, 0, 0, 0), E_INVALID_STATE, "[%s] __pTokenEdit must not be null.", GetErrorMessage(E_INVALID_STATE));
Color color;
result
_TokenEditPresenter::MakeToken(const String& tokenString)
{
- SysTryReturnResult(NID_UI_CTRL, __pTokenEdit != null, E_INVALID_STATE, "_TokenEdit is in an invalid state.");
+ SysTryReturnResult(NID_UI_CTRL, __pTokenEdit != null, E_INVALID_STATE, "__pTokenEdit must not be null.");
result r = E_SUCCESS;
int tokenCount = 0;
if (inputTokenString.GetLength() <= 0)
{
r = ClearText();
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to clear text object.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to clear text object.");
- SysLog(NID_UI_CTRL, "[E_INVALID_ARG] Invalid argument is used. Token length is (%d)", inputTokenString.GetLength());
- return E_INVALID_ARG;
+ SysTryReturnResult(NID_UI_CTRL, false, E_INVALID_ARG, "Invalid argument is used. Input tokenString length is 0.");
}
_Token* pToken = new (std::nothrow) _Token();
result r = E_SUCCESS;
r = MakeToken(token);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
if (__editingTokenIndex >= 0)
{
for (int i = 0; i < GetTokenCount(); i++)
{
pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
- SysTryCatch(NID_UI_CTRL, pToken != null, , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null");
+ SysTryCatch(NID_UI_CTRL, pToken != null, , r = E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
r = pToken->SetBounds(pToken->displayRect);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set bounds", GetErrorMessage(r));
_TokenEditPresenter::GetTokenAt(int index) const
{
String tempString;
- SysTryReturn(NID_UI_CTRL, index >= 0 && index < __pTokenList->GetCount(), tempString, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] index (%d) is out of range.", index);
+ SysTryReturn(NID_UI_CTRL, index >= 0 && index < __pTokenList->GetCount(), tempString, E_OUT_OF_RANGE, "[%s] index (%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index);
_Token* pToken = null;
pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
if (index == __editingTokenIndex && isClearText)
{
_VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
- SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get root visual element.");
+ SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get edit visual element.");
_VisualElement* pCursorVisualElement = GetCursorVisualElement();
SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element.");
r = CalculateTokenPositionFromIndex(index);
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to calculate token position.");
+
r = SetInitialBounds();
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds.");
float tokenHorizontalSpacing = 0.0f;
float tokenTextLeftMargin = 0.0f;
float tokenTextRightMargin = 0.0f;
- float descriptionTextRightMargin = 0.0f;
+ float titleTextRightMargin = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, leftMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HORIZONTAL_SPACING, orientation, tokenHorizontalSpacing);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_RIGHT_MARGIN, orientation, tokenTextRightMargin);
- GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_RIGHT_MARGIN, orientation, descriptionTextRightMargin);
+ GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_RIGHT_MARGIN, orientation, titleTextRightMargin);
- SysTryReturn(NID_UI_CTRL, startIndex >= 0 && startIndex <= tokenCount, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. startIndex = (%d)", startIndex);
+ SysTryReturn(NID_UI_CTRL, startIndex >= 0 && startIndex <= tokenCount, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. startIndex (%d) is not valid.", GetErrorMessage(E_INVALID_ARG), startIndex);
_Token* pToken = null;
_Token* pPreviousToken = null;
FloatRectangle tokenEditBounds = __pTokenEdit->GetBoundsF();
String titleText = __pTokenEdit->GetTitleText();
- if (!_FloatCompare(GetDescriptionTextRect().width, __previousTitleWidth))
+ if (!_FloatCompare(GetTitleTextRect().width, __previousTitleWidth))
{
- __descriptionTextRectForScroll = GetDescriptionTextRect();
- __previousTitleWidth = GetDescriptionTextRect().width;
+ __titleTextRectForScroll = GetTitleTextRect();
+ __previousTitleWidth = GetTitleTextRect().width;
}
bool findPrevTokenLoopFlag = true;
for (; index < tokenCount; index++)
{
pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
- SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+ SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
if (index == 0)
{
// TODO : description text (title style inner)
if (titleText.GetLength())
{
- pToken->displayRect.x = __descriptionTextRectForScroll.x + __descriptionTextRectForScroll.width + descriptionTextRightMargin;
- pToken->displayRect.y = __descriptionTextRectForScroll.y + __scrollValue;
+ pToken->displayRect.x = __titleTextRectForScroll.x + __titleTextRectForScroll.width + titleTextRightMargin;
+ pToken->displayRect.y = __titleTextRectForScroll.y + __scrollValue;
}
else // Set description text.
{
_Token* pToken = null;
pToken = static_cast< _Token* >(__pTokenList->GetAt(ndex));
- SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+ SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
r = pToken->SetBounds(pToken->displayRect);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set bounds", GetErrorMessage(r));
_VisualElement* pRootElement = __pTokenEdit->GetVisualElement();
- SysTryReturn(NID_UI_CTRL, pRootElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element.");
+ SysTryReturn(NID_UI_CTRL, pRootElement, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. Failed to get _TokenEdit visual element.", GetErrorMessage(E_SYSTEM));
_VisualElement* pVisualElement = pToken->GetVisualElement();
- SysTryReturn(NID_UI_CTRL, pVisualElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element.");
+ SysTryReturn(NID_UI_CTRL, pVisualElement, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. Failed to get token _VisualElement.", GetErrorMessage(E_SYSTEM));
pVisualElement->SetShowState(true);
float maxHeight = __editContentFontSize;
pFont = GetFont();
- SysTryReturn(NID_UI_CTRL, pFont != null, maxHeight, E_SYSTEM, "[E_SYSTEM] Failed to get Font instance.");
+ SysTryReturn(NID_UI_CTRL, pFont != null, maxHeight, E_SYSTEM, "[%s] A system error has occured. Failed to get Font instance.", GetErrorMessage(E_SYSTEM));
maxHeight = pFont->GetMaxHeightF();
if (!__isEditingToken)
{
result r = SetInitialBounds();
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has occured. Failed to set margin.");
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] A system error has occured. Failed to set margin.", GetErrorMessage(E_SYSTEM));
}
return;
}
float tokenTextLeftMargin = 0.0f;
float tokenTextRightMargin = 0.0f;
float textBoundsAlignValue = 0.0f;
- float descriptionTextRightMargin = 0.0f;
+ float titleTextRightMargin = 0.0f;
_ControlOrientation orientation = GetEditView()->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, leftMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HORIZONTAL_SPACING, orientation, tokenHorizontalSpacing);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_RIGHT_MARGIN, orientation, tokenTextRightMargin);
- GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_RIGHT_MARGIN, orientation, descriptionTextRightMargin);
+ GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_RIGHT_MARGIN, orientation, titleTextRightMargin);
float textObjectMaxHeight = GetMaxTextHeight();
textBoundsAlignValue = (tokenHeight - textObjectMaxHeight) / 2.0f;
{
if (__pTokenEdit->GetTitleText().GetLength())
{
- FloatRectangle descriptionTextRect = GetDescriptionTextRect();
- tokenTextRect.x = descriptionTextRect.x + descriptionTextRect.width + descriptionTextRightMargin;
+ FloatRectangle titleTextRect = GetTitleTextRect();
+ tokenTextRect.x = titleTextRect.x + titleTextRect.width + titleTextRightMargin;
}
else
{
tokenTextRect.height = textObjectMaxHeight;
SetTextBounds(tokenTextRect);
+
//set cursor bounds with tokenTextRect
__pTokenEdit->SetCursorAccessibilityBounds(tokenTextRect);
return r;
_Token* pToken = null;
// SetTextBounds from last token
pToken = static_cast< _Token* >(__pTokenList->GetAt(tokenCount - 1));
- SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null");
+ SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
float tempTextRectWidth = 0.0f;
tempTextRectWidth = tokenEditBounds.width - pToken->displayRect.x - pToken->displayRect.width - tokenHorizontalSpacing - rightMargin - __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN);
- if (tokenMinWidth > tempTextRectWidth) // Line change
+ if (tokenMinWidth > tempTextRectWidth && __pTokenEdit->IsFocusable() && __pTokenEdit->IsEnabled()) // Line change
{
tokenTextRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN);
tokenTextRect.y = pToken->displayRect.y + tokenHeight + tokenVerticalSpacing + __lineSpacing + textBoundsAlignValue;
tokenTextRect.height = textObjectMaxHeight;
SetTextBounds(tokenTextRect);
+
if (__pressedTokenIndex < 0) // Set cursor as global focused element if no token is selected
{
__pTokenEdit->SetCursorAccessibilityBounds(tokenTextRect);
}
result
-_TokenEditPresenter::SetDescriptionTextRect(const FloatRectangle& rect)
+_TokenEditPresenter::SetTitleTextRect(const FloatRectangle& rect)
{
result r = E_SUCCESS;
- __descriptionTextRect = rect;
+ __titleTextRect = rect;
return r;
}
FloatRectangle
-_TokenEditPresenter::GetDescriptionTextRect() const
+_TokenEditPresenter::GetTitleTextRect() const
{
- return __descriptionTextRect;
+ return __titleTextRect;
}
Rectangle
if ((__isPopupVisible || __isLongPressed) && __pressedTokenIndex >= 0)
{
_Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__pressedTokenIndex));
- SysTryReturn(NID_UI_CTRL, pToken, Rectangle(), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Unable to get valid token.");
+ SysTryReturn(NID_UI_CTRL, pToken, Rectangle(), E_SYSTEM, "[%s] A system error has occurred. Unable to get valid token.", GetErrorMessage(E_SYSTEM));
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
float tokenTextLeftMargin = 0.0f;
if ((__isPopupVisible || __isLongPressed) && __pressedTokenIndex >= 0)
{
_Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__pressedTokenIndex));
- SysTryReturn(NID_UI_CTRL, pToken, FloatRectangle(), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Unable to get valid token.");
+ SysTryReturn(NID_UI_CTRL, pToken, FloatRectangle(), E_SYSTEM, "[%s] A system error has occurred. Unable to get valid token.", GetErrorMessage(E_SYSTEM));
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
int tokenTextLeftMargin = 0;
{
VisualElementAnimation* pAnimation = null;
VisualElementAnimationGroup* pAnimationGroup = new (std::nothrow) VisualElementAnimationGroup();
- SysTryReturn(NID_UI_CTRL, pAnimationGroup, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pAnimationGroup, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pAnimationGroup->SetDuration(ANIMATION_DURATION_BOUNDS);
if (__pTimingFunction == null)
{
__pTimingFunction = new (std::nothrow) SineTimingFunction();
- SysTryReturn(NID_UI_CTRL, __pTimingFunction, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, __pTimingFunction, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
}
if (pAnimationGroup != null)
{
VisualElementPropertyAnimation* pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation();
- SysTryReturn(NID_UI_CTRL, pOpacityAnimation, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pOpacityAnimation, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pOpacityAnimation->SetPropertyName("opacity");
delete pOpacityAnimation;
VisualElementPropertyAnimation* pBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation();
- SysTryReturn(NID_UI_CTRL, pBoundsAnimation, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, pBoundsAnimation, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pBoundsAnimation->SetPropertyName("bounds");
FloatRectangle startValue = source.GetBounds();
}
result
-_TokenEditPresenter::CalculateDescriptionTextRect(const String& descriptionText)
+_TokenEditPresenter::CalculateTitleTextRect(const String& titleText)
{
result r = E_SUCCESS;
float tokenTextLeftMargin = 0.0f;
float tokenTextRightMargin = 0.0f;
float tokenTitleWidth = 0.0f;
+ float titleTextSize = 0.0f;
+ Font* pFont = null;
+ float editFontSize = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_RIGHT_MARGIN, orientation, tokenTextRightMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TITLE_RECT_WIDTH, orientation, tokenTitleWidth);
- int length = descriptionText.GetLength();
+ int length = titleText.GetLength();
FloatDimension textSize;
- wchar_t* pTempString = const_cast< wchar_t* >(descriptionText.GetPointer());
+ wchar_t* pTempString = const_cast< wchar_t* >(titleText.GetPointer());
- SysAssertf(__pDescriptionTextTextObject != null, "The TextObject instance is null.");
+ SysAssertf(__pTitleTextObject != null, "The TextObject instance is null.");
- __pDescriptionTextTextObject->RemoveAll(true);
+ __pTitleTextObject->RemoveAll(true);
pSimpleText = new (std::nothrow) TextSimple(pTempString, length, TEXT_ELEMENT_SOURCE_TYPE_INTERNAL);
- __pDescriptionTextTextObject->AppendElement(*pSimpleText);
+ __pTitleTextObject->AppendElement(*pSimpleText);
- textSize = __pDescriptionTextTextObject->GetTextExtentF(0, length);
- r = __pDescriptionTextTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE);
- r = __pDescriptionTextTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
+ GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, titleTextSize);
+
+ pFont = GetFont();
+ SysTryReturnResult(NID_UI_CTRL, pFont != null, r, "Propagating.");
+
+ editFontSize = GetTextSize();
+ (_FontImpl::GetInstance(*pFont))->SetSize(titleTextSize);
+
+ r = __pTitleTextObject->SetFont(pFont, 0, __pTitleTextObject->GetTextLength());
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+
+ (_FontImpl::GetInstance(*pFont))->SetSize(editFontSize);
- __descriptionTextRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN);
- __descriptionTextRect.y = tokenTopMargin + __pTokenEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN);
+ textSize = __pTitleTextObject->GetTextExtentF(0, length);
+ r = __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE);
+ r = __pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
+
+ __titleTextRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN);
+ __titleTextRect.y = tokenTopMargin + __pTokenEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN);
if (textSize.width > tokenTitleWidth)
{
textSize.width = tokenTitleWidth;
- __pDescriptionTextTextObject->SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL);
+ __pTitleTextObject->SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL);
}
- __descriptionTextRect.width = tokenTextLeftMargin + textSize.width + tokenTextRightMargin;
- __descriptionTextRect.height = tokenHeight;
- __pDescriptionTextTextObject->SetBounds(__descriptionTextRect);
+ __titleTextRect.width = tokenTextLeftMargin + textSize.width + tokenTextRightMargin;
+ __titleTextRect.height = tokenHeight;
+ __pTitleTextObject->SetBounds(__titleTextRect);
- if (__pDescriptionTextTextObject->IsChanged())
+ if (__pTitleTextObject->IsChanged())
{
_EditPresenter::StopTitleSlidingTimer();
__isTitleSliding = false;
}
- r = __pDescriptionTextTextObject->Compose();
+ r = __pTitleTextObject->Compose();
return r;
}
}
bool
-_TokenEditPresenter::DrawDescriptionText(void)
+_TokenEditPresenter::DrawTitleText(void)
{
result r = E_SUCCESS;
- FloatRectangle tempDescriptionTextRect;
- FloatRectangle descriptionTextRect(__descriptionTextRect);
- Canvas* pDescriptionTextCanvas = null;
+ FloatRectangle tempTitleTextRect;
+ FloatRectangle titleTextRect(__titleTextRect);
+ Canvas* pTitleTextCanvas = null;
Font* pDescriptionFont = null;
TextObjectActionType titleAction;
_VisualElement* pRootElement = null;
- if (__pDescriptionTextTextObject->GetFont(0)->GetFaceName() != GetTitleFontFaceName())
+ if (__pTitleTextObject->GetFont(0)->GetFaceName() != GetTitleFontFaceName())
{
- float descriptionTextSize = 0.0f;
- GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, descriptionTextSize);
+ float titleTextSize = 0.0f;
+ GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, titleTextSize);
pDescriptionFont = GetFont();
if (pDescriptionFont != null)
{
float editFontSize = GetTextSize();
- (_FontImpl::GetInstance(*pDescriptionFont))->SetSize(descriptionTextSize);
+ (_FontImpl::GetInstance(*pDescriptionFont))->SetSize(titleTextSize);
- r = __pDescriptionTextTextObject->SetFont(pDescriptionFont, 0, __pDescriptionTextTextObject->GetTextLength());
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. SetFont failed");
+ r = __pTitleTextObject->SetFont(pDescriptionFont, 0, __pTitleTextObject->GetTextLength());
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. Failed to set the description text font.", GetErrorMessage(E_SYSTEM));
(_FontImpl::GetInstance(*pDescriptionFont))->SetSize(editFontSize);
}
}
pRootElement = __pTokenEdit->GetVisualElement();
- SysTryCatch(NID_UI_CTRL, pRootElement, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element.");
+ SysTryCatch(NID_UI_CTRL, pRootElement, , E_SYSTEM, "[%s] A system error has occurred. Failed to get _TokenEdit visual element.", GetErrorMessage(E_SYSTEM));
- if (__pDescriptionTextVisualElement == null)
+ if (__pTitleTextVisualElement == null)
{
- __pDescriptionTextVisualElement = new (std::nothrow) _VisualElement();
- SysTryCatch(NID_UI_CTRL, __pDescriptionTextVisualElement, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- r = __pDescriptionTextVisualElement->Construct();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[E_SYSTEM] A system error has occurred. Failed to construct _VisualElement");
- __pDescriptionTextVisualElement->SetImplicitAnimationEnabled(false);
- __pDescriptionTextVisualElement->SetShowState(true);
+ __pTitleTextVisualElement = new (std::nothrow) _VisualElement();
+ SysTryCatch(NID_UI_CTRL, __pTitleTextVisualElement, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ r = __pTitleTextVisualElement->Construct();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] A system error has occurred. Failed to construct _VisualElement", GetErrorMessage(E_SYSTEM));
+ __pTitleTextVisualElement->SetImplicitAnimationEnabled(false);
+ __pTitleTextVisualElement->SetShowState(true);
- r = pRootElement->AttachChild(*__pDescriptionTextVisualElement);
+ r = pRootElement->AttachChild(*__pTitleTextVisualElement);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
- descriptionTextRect.y = __descriptionTextRectForScroll.y + __scrollValue;
- __pDescriptionTextVisualElement->SetBounds(descriptionTextRect);
- UpdateTitleAccessibilityBounds(descriptionTextRect); // Update title accessibility bounds to same as DescriptionTextVisualElement bounds
+ titleTextRect.y = __titleTextRectForScroll.y + __scrollValue;
+ __pTitleTextVisualElement->SetBounds(titleTextRect);
+ UpdateTitleAccessibilityBounds(titleTextRect); // Update title accessibility bounds to same as TitleTextVisualElement bounds
- pDescriptionTextCanvas = __pDescriptionTextVisualElement->GetCanvasN();
- if (pDescriptionTextCanvas == null)
- {
- SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Failed to get canvas of an instance of _VisualElement.");
- return true;
- }
+ pTitleTextCanvas = __pTitleTextVisualElement->GetCanvasN();
+ SysTryCatch(NID_UI_CTRL, pTitleTextCanvas != null, , E_SYSTEM, "[%s] A system error has occurred. Failed to get canvas of description text _VisualElement instance.", GetErrorMessage(E_SYSTEM));
- tempDescriptionTextRect = __descriptionTextRect;
- tempDescriptionTextRect.x = 0.0f;
- tempDescriptionTextRect.y = 0.0f;
+ tempTitleTextRect = __titleTextRect;
+ tempTitleTextRect.x = 0.0f;
+ tempTitleTextRect.y = 0.0f;
- titleAction = __pDescriptionTextTextObject->GetAction();
+ titleAction = __pTitleTextObject->GetAction();
- pDescriptionTextCanvas->SetBackgroundColor(Color(0));
- pDescriptionTextCanvas->Clear();
- __pDescriptionTextTextObject->SetForegroundColor(__pTokenEdit->GetTitleTextColor(GetCurrentStatus()), 0, __pDescriptionTextTextObject->GetTextLength());
+ pTitleTextCanvas->SetBackgroundColor(Color(0));
+ pTitleTextCanvas->Clear();
+ __pTitleTextObject->SetForegroundColor(__pTokenEdit->GetTitleTextColor(GetCurrentStatus()), 0, __pTitleTextObject->GetTextLength());
if (IsFocused())
{
- if (__pDescriptionTextTextObject->GetTextLengthAt(0) < __pDescriptionTextTextObject->GetTextLength())
- {
- if (titleAction != TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT)
- {
- __pDescriptionTextTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT);
- __pDescriptionTextTextObject->Compose();
- }
- }
- else
+
+ if (titleAction != TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT)
{
- if (titleAction != TEXT_OBJECT_ACTION_TYPE_NONE)
- {
- __pDescriptionTextTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE);
- __pDescriptionTextTextObject->Compose();
- }
+ __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT);
+ __pTitleTextObject->Compose();
}
+ // Draw title text
+ __pTitleTextObject->SetBounds(tempTitleTextRect);
+ __pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pTitleTextCanvas));
+
if (!__isTitleSliding)
{
_EditPresenter::StopTitleSlidingTimer();
- if (__pDescriptionTextTextObject->IsActionOn())
+ if (__pTitleTextObject->IsActionOn())
{
_EditPresenter::StartTitleSlidingTimer();
__isTitleSliding = true;
{
if (titleAction != TEXT_OBJECT_ACTION_TYPE_ABBREV)
{
- __pDescriptionTextTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
- __pDescriptionTextTextObject->Compose();
+ __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
+ __pTitleTextObject->Compose();
}
- }
- // Draw title text
- __pDescriptionTextTextObject->SetBounds(tempDescriptionTextRect);
- __pDescriptionTextTextObject->Draw(*_CanvasImpl::GetInstance(*pDescriptionTextCanvas));
+ // Draw title text
+ __pTitleTextObject->SetBounds(tempTitleTextRect);
+ __pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pTitleTextCanvas));
+ }
- delete pDescriptionTextCanvas;
+ delete pTitleTextCanvas;
return true;
CATCH:
- if (__pDescriptionTextVisualElement != null)
+ if (__pTitleTextVisualElement != null)
{
- __pDescriptionTextVisualElement->Destroy();
- __pDescriptionTextVisualElement = null;
+ __pTitleTextVisualElement->Destroy();
+ __pTitleTextVisualElement = null;
}
return false;
_Token* pToken = null;
pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
- SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null");
+ SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
FloatRectangle tokenEditBounds = __pTokenEdit->GetBoundsF();
FloatRectangle tokenRect = pToken->displayRect;
InitializeTokenVisibilityAt(i);
}
- if (__pDescriptionTextTextObject->GetTextLength() != 0)
+ if (__pTitleTextObject->GetTextLength() != 0)
{
- __descriptionTextRect.y = __descriptionTextRectForScroll.y + __scrollValue;
+ __titleTextRect.y = __titleTextRectForScroll.y + __scrollValue;
}
__pTokenEdit->Invalidate();
_TokenEditPresenter::SetTokenBoundsByTouchInfo(const _TouchInfo& touchinfo)
{
result r = E_SUCCESS;
- int currentYPosition = _CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()).y;
+ float currentYPosition = touchinfo.GetCurrentPosition().y;
- if (_FloatCompare(__prevScrollValue, 0.0f))
+ if (!IsHorizontalDirection(touchinfo))
{
- __prevScrollValue = currentYPosition;
- }
- else // Adjust moved y position to all tokens.
- {
- if (__isNeedToScroll) // Need to scroll
+ if (_FloatCompare(__prevScrollValue, 0.0f))
{
- float tempDefference = __prevScrollValue - currentYPosition;
-
__prevScrollValue = currentYPosition;
- __scrollValue -= tempDefference;
-
- if (__scrollValue < -__maxScrollValue)
+ }
+ else // Adjust moved y position to all tokens.
+ {
+ if (__isNeedToScroll) // Need to scroll
{
- __scrollValue = -__maxScrollValue;
+ float tempDefference = __prevScrollValue - currentYPosition;
- return E_SUCCESS;
- }
+ __prevScrollValue = currentYPosition;
+ __scrollValue -= tempDefference;
- if (__scrollValue > 0.0f)
- {
- __scrollValue = 0.0f;
+ if (__scrollValue < -__maxScrollValue)
+ {
+ __scrollValue = -__maxScrollValue;
- return E_SUCCESS;
- }
+ return E_SUCCESS;
+ }
- int tokenCount = GetTokenCount();
- CalculateTokenPositionFromIndex(0);
- for (int i = 0; i < tokenCount; i++)
- {
- _Token* pToken = null;
- pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
+ if (__scrollValue > 0.0f)
+ {
+ __scrollValue = 0.0f;
- if (pToken != null)
+ return E_SUCCESS;
+ }
+
+ int tokenCount = GetTokenCount();
+ CalculateTokenPositionFromIndex(0);
+ for (int i = 0; i < tokenCount; i++)
+ {
+ _Token* pToken = null;
+ pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
+
+ if (pToken != null)
+ {
+ pToken->SetBounds(pToken->displayRect);
+ }
+ TrimTokenAndAdjustEllipsisAt(i);
+ InitializeTokenVisibilityAt(i);
+ }
+
+ if (__pTitleTextObject->GetTextLength() != 0)
{
- pToken->SetBounds(pToken->displayRect);
+ __titleTextRect.y = __titleTextRectForScroll.y + __scrollValue;
}
- TrimTokenAndAdjustEllipsisAt(i);
- InitializeTokenVisibilityAt(i);
- }
- if (__pDescriptionTextTextObject->GetTextLength() != 0)
+ __pTokenEdit->Invalidate();
+ }
+ else
{
- __descriptionTextRect.y = __descriptionTextRectForScroll.y + __scrollValue;
+ __prevScrollValue = 0.0f;
+ __scrollValue = 0.0f;
}
-
- __pTokenEdit->Invalidate();
- }
- else
- {
- __prevScrollValue = 0.0f;
- __scrollValue = 0.0f;
}
- }
- r = SetInitialBounds();
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds.");
+ r = SetInitialBounds();
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds.");
+ }
return r;
}
if (__trackTokenIndex != tokenIndex)
{
__isLongPressed = false;
+ return E_SUCCESS; //If already pressed on a token and released elsewhere.
}
int prevPressedTokenIndex = __pressedTokenIndex;
}
_Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(tokenCount - 1));
- SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+ SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
float newScrollValue = 0.0f;
_TokenEditPresenter::SetAutoShrinkModeEnabled(bool enable)
{
__autoShrink = enable;
+
+ return;
}
bool
}
void
-_TokenEditPresenter::SetDescriptionText(String descriptionText)
+_TokenEditPresenter::SetTitleText(String titleText)
{
- __descriptionText = descriptionText;
+ __titleText = titleText;
+
+ return;
}
String
-_TokenEditPresenter::GetDescriptionText(void) const
+_TokenEditPresenter::GetTitleText(void) const
{
- return __descriptionText;
+ return __titleText;
}
int
{
tempInitialBounds = intialBounds;
_Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
- SysTryReturn(NID_UI_CTRL, pToken != null, -1, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+ SysTryReturn(NID_UI_CTRL, pToken != null, -1, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
FloatRectangle displayBounds = pToken->displayRect;
if ((tempInitialBounds.y + displayBounds.y) > (tempInitialBounds.y + tempInitialBounds.height))
if (!__isFocus)
{
- __descriptionTextRect.y = __descriptionTextRectForScroll.y + __scrollValue;
+ __titleTextRect.y = __titleTextRectForScroll.y + __scrollValue;
__isFocus = true;
}
CheckTokenScrolling();
}
- TextObject* pTextObject = GetTextObject();
- if (pTextObject != null)
- {
- pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE);
- pTextObject->Compose();
- }
-
if (__pressedTokenIndex < 0)
{
StopCursorTimer();
SetEditingTokenTextBounds(__editingTokenIndex, false);
- __descriptionTextRect.y = __descriptionTextRectForScroll.y + __scrollValue;
+ __titleTextRect.y = __titleTextRectForScroll.y + __scrollValue;
}
-
- TextObject* pTextObject = GetTextObject();
- if (pTextObject != null)
+ else
{
- pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
- pTextObject->Compose();
+ ScrollPanelToCursorPosition();
}
RemoveChildAccessibilityElements();
_TouchInfo TouchInfo(touchinfo);
_Token* pToken = null;
- if (__editingTokenIndex >= 0)
+ if (__editingTokenIndex >= 0 && !_EditPresenter::IsDragAndDropStarted())
{
pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
if (pToken != null)
__isTouchMoveInProgress = false;
__trackTokenIndex = -1;
+ __pTokenEdit->Invalidate();
return false;
}
_TokenEditPresenter::OnInputConnectionTextCommitted(InputConnection& source, const String& committedText)
{
OnTextCommitted(committedText);
+
+ return;
}
void
pAccessibilityManager->RequestToDrawFocusUi();
}
+ //Adjust the scroll panel if already added so that the cursor is in the visible area.
+ ScrollPanelToCursorPosition();
+
return;
}
if (__editingTokenIndex >= 0)
{
pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
- SysTryReturnVoidResult(NID_UI_CTRL, pToken, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null");
+ SysTryReturnVoidResult(NID_UI_CTRL, pToken, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
pToken->ResetToken(GetText());
TrimTokenAndAdjustEllipsisAt(__editingTokenIndex);
_TokenEditPresenter::DeleteSurroundingText(InputConnection& source, int offset, int charCount)
{
OnSurroundingTextDeleted(offset, charCount);
+
+ return;
}
void
if (__isEditingToken)
{
_VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get _TokenEdit visual element.", GetErrorMessage(E_SYSTEM));
_VisualElement* pCursorVisualElement = GetCursorVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM));
_Token* pToken = null;
_VisualElement* pTokenVisualElement = null;
if (pToken != null)
{
pTokenVisualElement = pToken->GetVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get token visual element.", GetErrorMessage(E_SYSTEM));
if (pCursorVisualElement->GetParent() != pEditVisualElement)
{
}
}
+ _EditPresenter::SetTextSize(__editContentFontSize);
RemoveTokenAt(__editingTokenIndex);
CalculateTokenPositionFromIndex(__editingTokenIndex);
__pressedTokenIndex = -1;
__editingTokenIndex = -1;
__isEditingToken = false;
- _EditPresenter::SetTextSize(__editContentFontSize);
__isTokenEditingFinished = false;
AdjustFlexibleHeight();
else if (__pressedTokenIndex != -1)
{
_VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get root visual element.", GetErrorMessage(E_SYSTEM));
_VisualElement* pCursorVisualElement = GetCursorVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM));
_Token* pToken = null;
_VisualElement* pTokenVisualElement = null;
if (pToken != null)
{
pTokenVisualElement = pToken->GetVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get token visual element.", GetErrorMessage(E_SYSTEM));
if (pCursorVisualElement->GetParent() != pEditVisualElement)
{
else
{
_VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get _TokenEdit visual element.", GetErrorMessage(E_SYSTEM));
_VisualElement* pCursorVisualElement = GetCursorVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM));
_Token* pToken = null;
_VisualElement* pTokenVisualElement = null;
if (pToken != null)
{
pTokenVisualElement = pToken->GetVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get token visual element.", GetErrorMessage(E_SYSTEM));
pTokenVisualElement->RemoveAllAnimations();
}
}
if (pToken != null)
{
pTokenVisualElement = pToken->GetVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get token visual element.", GetErrorMessage(E_SYSTEM));
if (pCursorVisualElement->GetParent() != pEditVisualElement)
{
}
__pTokenEdit->Draw();
+
+ return;
}
bool
FloatRectangle cursorRect;
_Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
- SysTryReturnVoidResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null");
+ SysTryReturnVoidResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
//Set Editing token bounds for text scroll and cursor position calculation (SetTextBounds should have been done prior to this)
FloatRectangle cursorDspRect = _EditPresenter::GetTextBoundsF();
}
_VisualElement* pCursorVisualElement = GetCursorVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM));
Canvas* pCursorCanvas = pCursorVisualElement->GetCanvasN();
- SysTryReturnVoidResult(NID_UI_CTRL, pCursorCanvas != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get canvas of cursor visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pCursorCanvas != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get canvas of cursor visual element.", GetErrorMessage(E_SYSTEM));
bool cursorEnable = IsCursorEnabled();
{
_EditPresenter::OnCursorTimerExpired();
}
+
+ return;
}
bool
_TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo)
{
__isTouchMoveInProgress = true;
+ float tempPrevScrollValue = __prevScrollValue;
- if (GetTokenCount())
+ if (GetTokenCount() && !_EditPresenter::IsDragAndDropStarted())
{
//Scrolling is blocked when a popup is visible or when a text is blocked
if (IsBlocked() || __isLongPressed)
float totalHeight = GetTextBoundsF().y + GetTextBoundsF().height - __scrollValue + tokenBottomMargin;
float controlHeight = __pTokenEdit->GetBoundsF().height;
- if (totalHeight > controlHeight)
+ if (totalHeight > controlHeight && (!IsHorizontalDirection(touchinfo)))
{
pScroll->SetScrollVisibility(true);
}
}
}
+ if ((__scrollValue < 0.0f && __scrollValue > -__maxScrollValue) || !tempPrevScrollValue)
+ {
+ _EditPresenter::OnTouchMoved(source, touchinfo);
+ return true;
+ }
+
return _EditPresenter::OnTouchMoved(source, touchinfo);
}
else
_TokenEditPresenter::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally)
{
__isAnimationInProgress = false;
+
+ if (__isDestroyed)
+ {
+ return;
+ }
+
RemoveTokenAt(GetTokenCount() - 1);
CalculateTokenPositionFromIndex(GetTokenCount() - 1);
DrawToken();
__pTokenEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT);
+ __transactionId = 0;
return;
}
}
else
{
- SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get presentation instance of visual element.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Failed to get presentation instance of visual element.", GetErrorMessage(E_SYSTEM));
}
target.ReleasePresentationInstance();
+
+ return;
}
void
_TokenEditPresenter::OnTimerExpired(Timer& timer)
{
Timer* onTimer = &timer;
- Canvas* pDescriptionTextCanvas = null;
+ Canvas* pTitleTextCanvas = null;
- if (onTimer == _EditPresenter::__pTitleSlidingTimer)
+ if (onTimer == __pTitleSlidingTimer)
{
if (!IsFocused())
{
return;
}
- FloatRectangle tempDescriptionTextRect = __descriptionTextRect;
- tempDescriptionTextRect.x = 0.0f;
- tempDescriptionTextRect.y = 0.0f;
+ FloatRectangle tempTitleTextRect = __titleTextRect;
+ tempTitleTextRect.x = 0.0f;
+ tempTitleTextRect.y = 0.0f;
- pDescriptionTextCanvas = __pDescriptionTextVisualElement->GetCanvasN();
- SysTryReturnVoidResult(NID_UI_CTRL, pDescriptionTextCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] pDescriptionTextCanvas is invalid!");
+ pTitleTextCanvas = __pTitleTextVisualElement->GetCanvasN();
+ SysTryReturnVoidResult(NID_UI_CTRL, pTitleTextCanvas, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- pDescriptionTextCanvas->SetBackgroundColor(Color(0));
- pDescriptionTextCanvas->Clear();
- __pDescriptionTextTextObject->SetBounds(tempDescriptionTextRect);
- __pDescriptionTextTextObject->DrawWithOffset(*_CanvasImpl::GetInstance(*pDescriptionTextCanvas));
- Rectangle descriptionTextRect = _CoordinateSystemUtils::ConvertToInteger(tempDescriptionTextRect);
- pDescriptionTextCanvas->Show(descriptionTextRect);
+ pTitleTextCanvas->SetBackgroundColor(Color(0));
+ pTitleTextCanvas->Clear();
+ __pTitleTextObject->SetBounds(tempTitleTextRect);
+ __pTitleTextObject->DrawWithOffset(*_CanvasImpl::GetInstance(*pTitleTextCanvas));
+ Rectangle titleTextRect = _CoordinateSystemUtils::ConvertToInteger(tempTitleTextRect);
+ pTitleTextCanvas->Show(titleTextRect);
- delete pDescriptionTextCanvas;
+ delete pTitleTextCanvas;
_EditPresenter::StartTitleSlidingTimer();
__isTitleSliding = true;
{
_EditPresenter::OnTimerExpired(timer);
}
+
+ return;
}
result
if (__pressedTokenIndex != -1)
{
_VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
- SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get root visual element.");
+ SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get edit visual element.");
_VisualElement* pCursorVisualElement = GetCursorVisualElement();
SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element.");
if (__pressedTokenIndex != -1)
{
_VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
- SysTryReturnResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element.");
+ SysTryReturnResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get root visual element.");
_VisualElement* pCursorVisualElement = GetCursorVisualElement();
- SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element.");
+ SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element.");
_Token* pToken = null;
_VisualElement* pTokenVisualElement = null;
if (pToken != null)
{
pTokenVisualElement = pToken->GetVisualElement();
- SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
+ SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get token visual element.");
if (pCursorVisualElement->GetParent() != pEditVisualElement)
{
r = pCursorVisualElement->GetParent()->DetachChild(*pCursorVisualElement);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating.");
r = pEditVisualElement->AttachChild(*pCursorVisualElement);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating.");
}
}
}
result r = E_SUCCESS;
_VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get _TokenEdit visual element.", GetErrorMessage(E_SYSTEM));
_VisualElement* pCursorVisualElement = GetCursorVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM));
_Token* pToken = null;
_VisualElement* pTokenVisualElement = null;
if (pToken != null)
{
pTokenVisualElement = pToken->GetVisualElement();
- SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[%s] A system error has occurred. Failed to get token visual element.", GetErrorMessage(E_SYSTEM));
if (pCursorVisualElement->GetParent() != pEditVisualElement)
{
inputTokenString = replacementString;
}
- r = RemoveTokenAt(__editingTokenIndex);
-
_EditPresenter::SetTextSize(__editContentFontSize);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ r = RemoveTokenAt(__editingTokenIndex);
+
if (inputTokenString.GetLength() > 0)
{
r = InsertTokenAt(__editingTokenIndex, inputTokenString);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
pToken = static_cast <_Token*>(__pTokenList->GetAt(__editingTokenIndex));
- SysTryReturnVoidResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
pToken->currTokenLength = inputTokenString.GetLength();
}
if (inputTokenString.GetLength() <= 0)
{
- SysLog(NID_UI_CTRL, "[E_INVALID_ARG] Invalid argument is used. Token length is (%d)", inputTokenString.GetLength());
+ SysLog(NID_UI_CTRL, "[%s] Invalid argument is used. Token length is (%d)", GetErrorMessage(E_INVALID_ARG), inputTokenString.GetLength());
}
return;
{
SetCursorDisabled(false);
CheckTokenScrolling();
- __pTokenEdit->Invalidate();
}
+ __pTokenEdit->Invalidate();
+
StartCursorTimer();
}
for (int index = 0; index < readTokenCount; index++)
{
pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
- SysTryReturn(NID_UI_CTRL, pToken, tokenText, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+ SysTryReturn(NID_UI_CTRL, pToken, tokenText, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
if (index < (readTokenCount - 1))
{
for (int index = 0; index < tokenCount; index++)
{
_Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
- SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+ SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
if (pContainer != null)
{
_AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
String labelText = pToken->GetText();
pAccessibilityElement->SetBounds(pToken->displayRect);
_AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer();
_Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(tokenCount - 1));
- SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+ SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
if (pContainer != null)
{
_AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
String labelText = pToken->GetText();
pAccessibilityElement->SetBounds(pToken->displayRect);
_AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer();
_Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
- SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+ SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
if (pContainer != null)
{
_AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
- SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
String labelText = pToken->GetText();
pAccessibilityElement->SetBounds(pToken->displayRect);
for (int index = 0; index < tokenCount; index++)
{
_Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
- SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+ SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM));
if ((__accessibilityElements.GetAt(index, pAccessibilityElement)) == E_SUCCESS)
{
{
if (pTextAccessibilityElement == &element)
{
+ __pTokenEdit->SetFocused(true);
if (__pTokenEdit->IsInternalFocused()) // Set cursor as global focus accessibility element only in focused mode.
{
_AccessibilityElement* pCursorAccessibilityElement = __pTokenEdit->GetCursorAccessibilityElement();
if (__pTimingFunction == null)
{
__pTimingFunction = new (std::nothrow) SineTimingFunction();
- SysTryReturnVoidResult(NID_UI_CTRL, __pTimingFunction, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pTimingFunction, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
}
VisualElementPropertyAnimation* pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation();
- SysTryReturnVoidResult(NID_UI_CTRL, pOpacityAnimation, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pOpacityAnimation, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pOpacityAnimation->SetPropertyName("opacity");
pOpacityAnimation->SetStartValue(Variant(1.0f));
pOpacityAnimation->SetTimingFunction(__pTimingFunction);
VisualElementValueAnimation* pBoundsAnimation = new (std::nothrow) VisualElementValueAnimation(); //deletion will happen in catch/ in Destroy animation
- SysTryCatch(NID_UI_CTRL, pBoundsAnimation, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, pBoundsAnimation, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pBoundsAnimation->SetTimingFunction(__pTimingFunction);
startValue = source.GetBounds();
pBoundsAnimation->SetVisualElementAnimationTickEventListener(this);
pBoundsAnimation->SetDuration(ANIMATION_DURATION_BOUNDS);
- AnimationTransaction::Begin();
+ AnimationTransaction::Begin(__transactionId);
source.AddAnimation(L"BoundsAnimation", *pBoundsAnimation);
source.AddAnimation("OpacityAnimation", *pOpacityAnimation);
AnimationTransaction::Commit();
return;
}
+result
+_TokenEditPresenter::LoadTokenBgBitmap(TokenEditStatus status)
+{
+ result r = E_SUCCESS;
+ Color tokenColor = GetTokenEditColor(status);
+ Bitmap* pTokenBgBitmap = null;
+
+ switch(status)
+ {
+ case TOKEN_EDIT_STATUS_NORMAL:
+ r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, pTokenBgBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+
+ if (__pReplacedTokenBgNormalBitmap != null)
+ {
+ delete __pReplacedTokenBgNormalBitmap;
+ }
+
+ __pReplacedTokenBgNormalBitmap = pTokenBgBitmap;
+ break;
+ case TOKEN_EDIT_STATUS_SELECTED:
+ r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, pTokenBgBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+
+ if (__pReplacedTokenBgSelectedBitmap != null)
+ {
+ delete __pReplacedTokenBgSelectedBitmap;
+ }
+
+ __pReplacedTokenBgSelectedBitmap = pTokenBgBitmap;
+ break;
+ case TOKEN_EDIT_STATUS_HIGHLIGHTED:
+ r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, pTokenBgBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+
+ if (__pReplacedTokenBgHighlightedBitmap != null)
+ {
+ delete __pReplacedTokenBgHighlightedBitmap;
+ }
+
+ __pReplacedTokenBgHighlightedBitmap = pTokenBgBitmap;
+ break;
+ case TOKEN_EDIT_STATUS_DISABLED:
+ r = GET_REPLACED_BITMAP_CONFIG_N(TOKENEDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, tokenColor, pTokenBgBitmap);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+
+ if (__pReplacedTokenBgDisabledBitmap != null)
+ {
+ delete __pReplacedTokenBgDisabledBitmap;
+ }
+
+ __pReplacedTokenBgDisabledBitmap = pTokenBgBitmap;
+ break;
+ }
+
+ return E_SUCCESS;
+}
+
+result
+_TokenEditPresenter::DrawFocusRing(Tizen::Graphics::Canvas& /*canvas*/)
+{
+ if (IsViewModeEnabled(false) || !__pTokenEdit->IsEnabled() || !IsCurrentFocused())
+ {
+ if (__pFocusRingVisualElement != null)
+ {
+ __pFocusRingVisualElement->Destroy();
+ __pFocusRingVisualElement = null;
+ }
+ return E_SUCCESS;
+ }
+
+ result r = E_SUCCESS;
+ Bitmap* pFocusRing = null;
+ Bitmap* pReplacementFocusRing = null;
+ Canvas* pCanvas = null;
+ Color color = __pTokenEdit->GetColor(EDIT_STATUS_HIGHLIGHTED);
+ _VisualElement* pControlVisualElement = __pTokenEdit->GetVisualElement();
+
+ if (IsCurrentFocused() && color.GetAlpha())
+ {
+ Color focusColor;
+ GET_COLOR_CONFIG(FOCUSUI::CONTENT_BG_HIGHLIGHTED, focusColor);
+ focusColor.SetAlpha(color.GetAlpha());
+
+ if (__pFocusRingVisualElement == null)
+ {
+ __pFocusRingVisualElement = new (std::nothrow) _VisualElement();
+ SysTryReturnResult(NID_UI_CTRL, __pFocusRingVisualElement != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
+
+ r = __pFocusRingVisualElement->Construct();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*__pFocusRingVisualElement);
+ SysTryCatch(NID_UI_CTRL, pImpl, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 3);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pFocusRingVisualElement->SetImplicitAnimationEnabled(false);
+
+ pControlVisualElement->AttachChild(*__pFocusRingVisualElement);
+ }
+
+ r = GET_BITMAP_CONFIG_N(EDIT::BG_RING_FOCUSED, BITMAP_PIXEL_FORMAT_ARGB8888, pFocusRing);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ FloatRectangle editRect(0.0f, 0.0f, __pTokenEdit->GetBoundsF().width, __pTokenEdit->GetBoundsF().height);
+
+ pReplacementFocusRing= _BitmapImpl::GetColorReplacedBitmapN(*pFocusRing, Color::GetColor(COLOR_ID_MAGENTA), focusColor);
+ SysTryCatch(NID_UI_CTRL, pReplacementFocusRing, , r = GetLastResult(), "Unable to allocate text buffer.");
+
+ __pFocusRingVisualElement->SetBounds(editRect);
+
+ pCanvas = __pFocusRingVisualElement->GetCanvasN();
+ SysTryCatch(NID_UI_CTRL, pCanvas, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ pCanvas->SetBackgroundColor(Color(0));
+ pCanvas->Clear();
+
+ if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementFocusRing))
+ {
+ pCanvas->DrawNinePatchedBitmap(editRect, *pReplacementFocusRing);
+ }
+
+ __pFocusRingVisualElement->SetShowState(true);
+
+ delete pFocusRing;
+ delete pReplacementFocusRing;
+ delete pCanvas;
+ }
+
+ return r;
+
+CATCH:
+
+ __pFocusRingVisualElement->Destroy();
+ __pFocusRingVisualElement = null;
+
+ delete pFocusRing;
+ delete pReplacementFocusRing;
+
+ return r;
+}
+
}}} //Tizen::Ui::Controls
using namespace Tizen::Base::Collection;
using namespace Tizen::Graphics;
using namespace Tizen::Ui;
+using namespace Tizen::Base::Utility;
namespace
{
FloatRectangle rect = element.GetAbsoluteBounds();
Dimension screen = _ResourceManager::GetInstance()->GetLogicalScreenSizen();
int screenW = _ControlManager::GetInstance()->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT ? screen.width : screen.height;
- if(rect.x < 0.0f)
+ if (rect.x < 0.0f)
{
__pToolbar->GetPresenter()->AdjustItemPositionX(-(rect.x));
__pToolbar->Invalidate(true);
}
- else if(rect.x + rect.width > screenW)
+ else if (rect.x + rect.width > screenW)
{
float adjustX = 0.0f;
- if(rect.x + rect.width > screenW)
+ if (rect.x + rect.width > screenW)
{
adjustX = -(rect.x + rect.width - screenW);
}
, __style(TOOLBAR_TITLE)
, __transparent(false)
, __isUserBackgroundBitmap(false)
- , __highlightedItemIndex(0)
- , __lastHighlightedItemIndex(0)
+ , __highlightedItemIndex(-1)
+ , __lastHighlightedItemIndex(-1)
, __highlighted(false)
+ , __isEnterKeyPressed(false)
+ , __isAttachedToMainTree(false)
, __titleTextArea(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
, __itemArea(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
, __pTitleTextElement(null)
pContainer = GetAccessibilityContainer();
- if(pContainer)
+ if (pContainer)
{
pContainer->Activate(true);
}
_Toolbar::~_Toolbar(void)
{
+ __isEnterKeyPressed = false;
RemoveAllItems(); //__pMoreButton would be deleted in this function
RemoveAllButtons();
__pTitleTextElement = null;
}
- if(__pAccessibilityListener)
+ if (__pAccessibilityListener)
{
delete __pAccessibilityListener;
__pAccessibilityListener = null;
if (!pToolbar->__pToolbarBackgroundBitmap)
{
- if(__header == true)
+ if (__header == true)
{
r = GET_BITMAP_CONFIG_N(HEADER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pToolbar->__pToolbarBackgroundBitmap);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
if (!pToolbar->__pToolbarBackgroundEffectBitmap)
{
- if(__header == true)
+ if (__header == true)
{
bool customTheme = IS_CUSTOM_BITMAP(HEADER::BG_NORMAL);
if (customTheme == false)
for (int i = 0; i < __itemCount; i++)
{
- if(__pItems.at(i)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pItems.at(i)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
firstEnabledItemIndex = i;
break;
AddAccessibilityElement(pButton);
+ if (__highlightedItemIndex != -1 && itemIndex <= __highlightedItemIndex)
+ {
+ __highlightedItemIndex++;
+ }
+
return E_SUCCESS;
}
{
for (int i = 0; i < BUTTON_MAX; i++)
{
- _Button* pButtonItem = __pButtonItems[i];
-
- if (pButtonItem != null)
+ if (i == LEFT_BUTTON)
{
- if (i == LEFT_BUTTON)
- {
- if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT] != null)
- {
- StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT);
- }
- }
- else if (i == RIGHT_BUTTON)
- {
- if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT] != null)
- {
- StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT);
- }
- }
-
- if (pButtonItem->GetChildCount() != 0)
- {
- _Label* pTempBadgeIcon = dynamic_cast<_Label*>(pButtonItem->GetChild(0));
- SysTryReturnResult(NID_UI_CTRL, pTempBadgeIcon, E_INVALID_STATE, "[E_INVALID_STATE] Couldn't get a badge icon.");
-
- pButtonItem->DetachChild(*pTempBadgeIcon);
-
- delete pTempBadgeIcon;
- pTempBadgeIcon = null;
- }
-
- DetachChild(*pButtonItem);
- delete pButtonItem;
- pButtonItem = null;
-
- __pButtonItems[i] = null;
+ RemoveButtonAt(LEFT_BUTTON);
+ }
+ else if (i == RIGHT_BUTTON)
+ {
+ RemoveButtonAt(RIGHT_BUTTON);
}
}
result
_Toolbar::RemoveAllItems(void)
{
- __itemCount = 0;
-
int itemCount = __pItems.size();
- _Button* pItem = null;
-
// frees item nodes from the memory
if (itemCount > 0)
{
for (int i = itemCount - 1; i >= 0; i--)
{
- pItem = __pItems.at(i);
-
- if (pItem != null)
- {
- if (pItem->GetChildCount() != 0)
- {
- _Label* pTempBadgeIcon = dynamic_cast<_Label*>(pItem->GetChild(0));
- SysTryReturnResult(NID_UI_CTRL, pTempBadgeIcon, E_INVALID_STATE, "[E_INVALID_STATE] Couldn't get a badge icon.");
-
- pItem->DetachChild(*pTempBadgeIcon);
-
- delete pTempBadgeIcon;
- pTempBadgeIcon = null;
- }
-
- DetachChild(*pItem);
- delete pItem;
-
- pItem = null;
- }
+ RemoveItemAt(i);
}
}
DetachChild(*__pButtonItems[position]);
delete __pButtonItems[position];
__pButtonItems[position] = null;
+
+ if (!__header || __style == TOOLBAR_TEXT)
+ {
+ if (position == LEFT_BUTTON)
+ {
+ if (__highlightedItemIndex == 0)
+ {
+ __highlightedItemIndex = -1;
+ __isEnterKeyPressed = false;
+ }
+ else if (__highlightedItemIndex > 0)
+ {
+ __highlightedItemIndex--;
+ }
+ }
+ else // right button
+ {
+ if (__pButtonItems[LEFT_BUTTON])
+ {
+ if (__highlightedItemIndex == __itemCount + 1)
+ {
+ __highlightedItemIndex = -1;
+ __isEnterKeyPressed = false;
+ }
+ }
+ else if (__highlightedItemIndex == __itemCount)
+ {
+ __highlightedItemIndex = -1;
+ __isEnterKeyPressed = false;
+ }
+ }
+ }
+ else
+ {
+ if (position == LEFT_BUTTON)
+ {
+ if (__highlightedItemIndex == __itemCount)
+ {
+ __highlightedItemIndex = -1;
+ __isEnterKeyPressed = false;
+ }
+ }
+ else
+ {
+ if (__pButtonItems[LEFT_BUTTON])
+ {
+ if (__highlightedItemIndex == __itemCount + 1)
+ {
+ __highlightedItemIndex = -1;
+ __isEnterKeyPressed = false;
+ }
+ }
+ else if (__highlightedItemIndex == __itemCount)
+ {
+ __highlightedItemIndex = -1;
+ __isEnterKeyPressed = false;
+ }
+ }
+ }
}
if (__itemCount == 0 && __pButtonItems[LEFT_BUTTON] == null && __pButtonItems[RIGHT_BUTTON] == null)
delete pItem;
pItem = null;
+ if (itemIndex == __highlightedItemIndex)
+ {
+ __highlightedItemIndex = -1;
+ __isEnterKeyPressed = false;
+ }
+ else if (itemIndex < __highlightedItemIndex)
+ {
+ __highlightedItemIndex--;
+ }
__itemCount--;
if (__itemCount == 0 && __pButtonItems[LEFT_BUTTON] == null && __pButtonItems[RIGHT_BUTTON] == null)
}
}
+void
+_Toolbar::SetHighlightedState(ToolbarButton position)
+{
+ if (__highlightedItemIndex == __itemCount)
+ {
+ if (__pButtonItems[LEFT_BUTTON])
+ {
+ if (position == LEFT_BUTTON)
+ {
+ __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ }
+ else
+ {
+ __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
+ }
+ else // Right button case
+ {
+ __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ }
+ }
+ else if (__highlightedItemIndex == __itemCount + 1 )
+ {
+ if (position == RIGHT_BUTTON)
+ {
+ __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ }
+ else
+ {
+ __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
+ }
+ else
+ {
+ __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
+
+}
+
result
_Toolbar::SetButtonEnabled(ToolbarButton position, bool enabled)
{
if (enabled)
{
- __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (_ControlManager::GetInstance() != null && _ControlManager::GetInstance()->GetFocusControl() != this)
+ {
+ __highlightedItemIndex = -1;
+ __isEnterKeyPressed = false;
+ }
+
+ if (__itemCount != 0)
+ {
+ if (__highlightedItemIndex >= __itemCount)
+ {
+ SetHighlightedState(position);
+ }
+ else
+ {
+ __pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
+ }
+ else
+ {
+ SetHighlightedState(position);
+ }
+
+ SetFocusNavigateEnabled(true);
+
_AccessibilityElement* pElement = __pButtonItems[position]->GetAccessibilityContainer()->GetChildElement(0);
if (pElement)
{
else
{
__pButtonItems[position]->SetButtonStatus(_BUTTON_STATUS_DISABLED);
+
+ bool AllItemDisabled = true;
+
+ for (int i = 0; i < __itemCount ; i++)
+ {
+ if (__pItems.at(i)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ AllItemDisabled = false;
+ break;
+ }
+ }
+
+ bool AllButtonDisabled = false;
+
+ if (__pButtonItems[LEFT_BUTTON])
+ {
+ if (__pButtonItems[RIGHT_BUTTON])
+ {
+ if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED
+ && __pButtonItems[RIGHT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED)
+ {
+ AllButtonDisabled = true;
+ }
+ }
+ else
+ {
+ if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED)
+ {
+ AllButtonDisabled = true;
+ }
+ }
+ }
+ else
+ {
+ if (__pButtonItems[RIGHT_BUTTON])
+ {
+ if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED)
+ {
+ AllButtonDisabled = true;
+ }
+ }
+ else
+ {
+ AllButtonDisabled = true;
+ }
+ }
+
+ if (AllItemDisabled == true && AllButtonDisabled == true)
+ {
+ SetFocusNavigateEnabled(false);
+ }
+
_AccessibilityElement* pElement = __pButtonItems[position]->GetAccessibilityContainer()->GetChildElement(0);
if (pElement)
{
float height = 0.0f;
- GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT_WITH_BUTTON, GetOrientation(), height);
+ GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT, GetOrientation(), height);
_Label* pBadgeIconLabel = _Label::CreateLabelN();
else
{
bool needToCreateNewIcon = true;
+ float sideMargin = 0.0f;
+
+ GET_SHAPE_CONFIG(HEADER::BADGE_SIDE_MARGIN, GetOrientation(), sideMargin);
if (childCount != 0)
{
pLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
pLabel->SetTextColor(badgeIconTextNormalColor);
- pLabel->SetMargin(10, 0, 5, 0);
+ pLabel->SetMargin(sideMargin, 0.0f, sideMargin, 0.0f);
__pButtonItems[position]->AttachChild(*pLabel);
__pButtonItems[position]->SetChildAlwaysOnTop(*pLabel);
float fontSize = 0.0f;
float height = 0.0f;
float width = 0.0f;
+ float minWidth = 0.0f;
- GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT_WITH_BUTTON, GetOrientation(), height);
+ GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE, GetOrientation(), fontSize);
+ GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT, GetOrientation(), height);
+ GET_SHAPE_CONFIG(HEADER::BADGE_MIN_WIDTH, GetOrientation(), minWidth);
- if (number < 10)
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE_WITH_BUTTON, GetOrientation(), fontSize);
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_1DIGIT, GetOrientation(), width);
- }
- else if (number < 100)
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE_WITH_BUTTON, GetOrientation(), fontSize);
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_1DIGIT, GetOrientation(), width);
- }
- else if (number < 1000)
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE_WITH_BUTTON, GetOrientation(), fontSize);
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width);
- }
- else if (number < 10000)
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE_WITH_BUTTON, GetOrientation(), fontSize);
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width);
- }
- else
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE_WITH_BUTTON_2, GetOrientation(), fontSize);
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width);
- }
- existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, 0, width, height));
existingBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
Integer tempNumber(number);
existingBadgeIcon->SetText(tempNumber.ToString());
+
+ width = existingBadgeIcon->GetTextExtentSizeF();
+
+ if (width < minWidth)
+ {
+ width = minWidth;
+ }
+
+ width += sideMargin * 2;
+
+ existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, 0.0f, width, height));
}
}
SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < __itemCount), E_OUT_OF_RANGE,
"[E_OUT_OF_RANGE] The itemIndex is out of range.");
- if (pButton->GetActionId() < TOOLBAR_ACTION_ID_MIN || pButton->GetActionId() > TOOLBAR_ACTION_ID_MAX)
+ if (pButton->GetActionId() < TOOLBAR_ACTION_ID_MIN)
{
SysLog(NID_UI_CTRL, "[E_INVALID_ARG] The actionId is invalid.");
return E_OUT_OF_RANGE;
SysTryReturnResult(NID_UI_CTRL, (null != __pItems.at(itemIndex)), E_INVALID_OPERATION,
"[E_INVALID_OPERATION] No button item is at the position.");
+ result r = E_SUCCESS;
+
if (enabled)
{
_AccessibilityElement* pElement = __pItems.at(itemIndex)->GetAccessibilityContainer()->GetChildElement(0);
pElement->SetStatus(L"");
pElement->SetHintDisabled(false);
}
- return __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+
+ if (_ControlManager::GetInstance() != null && _ControlManager::GetInstance()->GetFocusControl() != this)
+ {
+ __highlightedItemIndex = -1;
+ __isEnterKeyPressed = false;
+ }
+
+ if (itemIndex == __highlightedItemIndex)
+ {
+ r = __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ }
+ else
+ {
+ r = __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
+
+ SetFocusNavigateEnabled(true);
+
+ return r;
}
else
{
pElement->SetStatus(L"");
pElement->SetHintDisabled(true);
}
- return __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_DISABLED);
+
+ r = __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_DISABLED);
+
+ bool AllItemDisabled = true;
+
+ for (int i = 0; i < __itemCount ; i++)
+ {
+ if (__pItems.at(i)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ AllItemDisabled = false;
+ break;
+ }
+ }
+
+ bool AllButtonDisabled = false;
+
+ if (__pButtonItems[LEFT_BUTTON])
+ {
+ if (__pButtonItems[RIGHT_BUTTON])
+ {
+ if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED
+ && __pButtonItems[RIGHT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED)
+ {
+ AllButtonDisabled = true;
+ }
+ }
+ else
+ {
+ if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED)
+ {
+ AllButtonDisabled = true;
+ }
+ }
+ }
+ else
+ {
+ if (__pButtonItems[RIGHT_BUTTON])
+ {
+ if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() == _BUTTON_STATUS_DISABLED)
+ {
+ AllButtonDisabled = true;
+ }
+ }
+ else
+ {
+ AllButtonDisabled = true;
+ }
+ }
+
+ if (AllItemDisabled == true && AllButtonDisabled == true)
+ {
+ SetFocusNavigateEnabled(false);
+ }
+
+ return r;
}
return E_SUCCESS;
}
else
{
+ float sideMargin = 0.0f;
+
+ GET_SHAPE_CONFIG(HEADER::BADGE_SIDE_MARGIN, GetOrientation(), sideMargin);
+
if (__pItems.at(itemIndex)->GetChildCount() == 0)
{
_Label* pLabel = _Label::CreateLabelN();
delete pNumberedBadgeIconEffectBitmap;
}
- pLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
+ pLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
pLabel->SetTextColor(badgeIconTextNormalColor);
- pLabel->SetMargin(0, 10);
+ pLabel->SetMargin(sideMargin, 0.0f, sideMargin, 0.0f);
__pItems.at(itemIndex)->AttachChild(*pLabel);
__pItems.at(itemIndex)->SetChildAlwaysOnTop(*pLabel);
float fontSize = 0.0f;
float height = 0.0f;
float width = 0.0f;
+ float minWidth = 0.0f;
GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE, GetOrientation(), fontSize);
GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT, GetOrientation(), height);
+ GET_SHAPE_CONFIG(HEADER::BADGE_MIN_WIDTH, GetOrientation(), minWidth);
- if (number < 10)
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_1DIGIT, GetOrientation(), width);
- }
- else if (number < 100)
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width);
- }
- else if (number < 1000)
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_3DIGIT, GetOrientation(), width);
- }
- else if (number < 10000)
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_4DIGIT, GetOrientation(), width);
- }
- else
+ existingBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
+
+ Integer tempNumber(number);
+ existingBadgeIcon->SetText(tempNumber.ToString());
+
+ width = existingBadgeIcon->GetTextExtentSizeF();
+
+ if (width < minWidth)
{
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_5DIGIT, GetOrientation(), width);
+ width = minWidth;
}
+ width += sideMargin * 2;
+
existingBadgeIcon->SetBounds(FloatRectangle(bounds.width - width, 0.0f, width, height));
- existingBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
- Integer tempNumber(number);
- existingBadgeIcon->SetText(tempNumber.ToString());
}
}
PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pItems.at(itemIndex));
}
- __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, fire);
+ if (currentSelectedItemIndex != __highlightedItemIndex || !__isEnterKeyPressed)
+ {
+ __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, fire);
+ }
for (int i = 0; i < __itemCount; i++)
{
if (currentSelectedItemIndex != -1 && __pItems.at(currentSelectedItemIndex) != null)
{
- __pItems.at(currentSelectedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (currentSelectedItemIndex != __highlightedItemIndex)
+ {
+ __pItems.at(currentSelectedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
+
__pItems.at(currentSelectedItemIndex)->ShowUnderlineBitmap(false);
+ __pItems.at(currentSelectedItemIndex)->Invalidate();
_AccessibilityElement* pElement = __pItems.at(currentSelectedItemIndex)->GetAccessibilityContainer()->GetChildElement(0);
if (pElement)
__descriptionText = L"";
- __highlightedItemIndex = 0;
- __lastHighlightedItemIndex = 0;
+ __highlightedItemIndex = -1;
+ __lastHighlightedItemIndex = -1;
__highlighted = false;
- if (__style == TOOLBAR_TITLE || __style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE)
- {
- if(__pTitleTextElement)
- {
- __pTitleTextElement->SetLabel(L"");
- }
- }
- else
+ if (__pTitleTextElement)
{
- if(__pTitleTextElement)
- {
- GetAccessibilityContainer()->RemoveElement(*__pTitleTextElement);
- __pTitleTextElement = null;
- }
+ GetAccessibilityContainer()->RemoveElement(*__pTitleTextElement);
+ __pTitleTextElement = null;
}
if (__itemCount == 0 && __pButtonItems[LEFT_BUTTON] == null && __pButtonItems[RIGHT_BUTTON] == null)
GetAccessibilityContainer()->AddElement(*__pTitleTextElement);
}
- if( __descriptionText.IsEmpty())
- {
- __pTitleTextElement->SetLabel(__titleText);
- __pTitleTextElement->SetBounds(FloatRectangle(__pToolbarPresenter->GetTitleTextBoundsF()));
- }
- else
- {
- __pTitleTextElement->SetLabel(__titleText + L"," + __descriptionText);
-
- FloatRectangle descriptionBounds = __pToolbarPresenter->GetDescriptionBoundsF();
- FloatRectangle titleBounds = __pToolbarPresenter->GetTitleTextBoundsF();
+ __pTitleTextElement->SetBounds(__titleTextArea);
- __pTitleTextElement->SetBounds(FloatRectangle(titleBounds.x, titleBounds.y, titleBounds.width, titleBounds.height + descriptionBounds.height));
- }
__pTitleTextElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TITLE");
__pTitleTextElement->SetName(L"HeaderTitleText");
result
_Toolbar::OnAttachedToMainTree(void)
{
+ __isAttachedToMainTree = true;
+
return E_SUCCESS;
}
pButtonElement = pButtonContainer->GetChildElement(L"ButtonText");
}
- if(pButtonElement)
+ if (pButtonElement)
{
pButtonElement->SetName(name);
_Toolbar::AddAccessibilityElement(_Button* pButton)
{
_AccessibilityContainer* pContainer = GetAccessibilityContainer();
- if(pContainer == null)
+ if (pContainer == null)
{
return;
}
int priorty = 0;
- if(__header == true)
+ if (__header == true)
{
priorty = ACCESSIBILITY_PRIORITY_TOP;
}
pElement = pButtonContainer->GetChildElement(L"ButtonText");
}
- if(pElement)
+ if (pElement)
{
pElement->SetName(name);
pElement->SetTrait(trait);
- if(style == TOOLBAR_HEADER_SEGMENTED || style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE
+ if (style == TOOLBAR_HEADER_SEGMENTED || style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE
|| style == TOOLBAR_SEGMENTED || style == TOOLBAR_TAB_WITH_TITLE
|| style == TOOLBAR_TAB || __style == TOOLBAR_TAB_LARGE)
{
_Toolbar::OnBoundsChanged(void)
{
RearrangeItems();
-
- if(__pTitleTextElement)
- {
- if( __descriptionText.IsEmpty())
- {
- __pTitleTextElement->SetBounds(FloatRectangle(__pToolbarPresenter->GetTitleTextBoundsF()));
- }
- else
- {
- FloatRectangle descriptionBounds = __pToolbarPresenter->GetDescriptionBoundsF();
- FloatRectangle titleBounds = __pToolbarPresenter->GetTitleTextBoundsF();
-
- __pTitleTextElement->SetBounds(FloatRectangle(titleBounds.x, titleBounds.y, titleBounds.width, titleBounds.height + descriptionBounds.height));
- }
- }
return;
}
void
_Toolbar::OnDrawFocus(void)
{
- if (IsFocusModeStateEnabled() == false)
+ if (IsFocusModeStateEnabled() == true)
{
if (__itemCount == 0)
{
if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
}
else if (__highlightedItemIndex == __itemCount + 1)
if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
}
if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
}
}
if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
}
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pItems.at(__highlightedItemIndex)->Invalidate();
}
}
}
if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
}
else if (__highlightedItemIndex == __itemCount + 1)
if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
}
if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
}
}
if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
}
int selectedItemIndex = GetSelectedItemIndex();
- if(selectedItemIndex != -1 && __pItems.at(selectedItemIndex))
+ if (selectedItemIndex != -1 && __pItems.at(selectedItemIndex))
{
__pItems.at(selectedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ __pItems.at(selectedItemIndex)->Invalidate();
}
+
}
- Invalidate(true);
+ if (!IsFocusModeStateEnabled())
+ {
+ __highlightedItemIndex = -1;
+ }
+ else
+ {
+ if (__style == TOOLBAR_HEADER_SEGMENTED || __style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED
+ || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
+ {
+ __highlightedItemIndex = GetSelectedItemIndex();
+ }
+ else // not segmented
+ {
+ __highlightedItemIndex = 0;
+ }
+ }
+
+ //Invalidate(true);//fix title slide restart
return;
} // OnFocusModeStateChanged
}
else // not segmented
{
+ if (__isEnterKeyPressed)
+ {
+ __isEnterKeyPressed = false;
+ }
+ else
+ {
+ __highlightedItemIndex = 0;
+ }
+ }
+ }
+ else
+ {
+ if (__isEnterKeyPressed)
+ {
+ __isEnterKeyPressed = false;
+ }
+ else if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])
+ {
__highlightedItemIndex = 0;
}
}
}
else // not segmented
{
+ if (__isEnterKeyPressed)
+ {
+ __isEnterKeyPressed = false;
+ }
+ else
+ {
+ __highlightedItemIndex = 0;
+ }
+ }
+ }
+ else
+ {
+ if (__isEnterKeyPressed)
+ {
+ __isEnterKeyPressed = false;
+ }
+ else if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])
+ {
__highlightedItemIndex = 0;
}
}
{
if (__highlightedItemIndex == __itemCount)
{
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
__lastHighlightedItemIndex = __highlightedItemIndex;
}
else
{
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
__highlightedItemIndex++;
{
if (__pButtonItems[RIGHT_BUTTON])
{
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
__lastHighlightedItemIndex = __highlightedItemIndex;
{
if (__highlightedItemIndex == __itemCount)
{
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
__lastHighlightedItemIndex = __highlightedItemIndex;
{
if (__highlightedItemIndex == __itemCount)
{
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
__lastHighlightedItemIndex = __highlightedItemIndex;
}
else // itemCount != 0
{
- if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
+ if (__highlightedItemIndex != -1 && (__highlightedItemIndex < __itemCount) && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
{
if (__pButtonItems[LEFT_BUTTON])
{
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
{
if (__pButtonItems[RIGHT_BUTTON])
{
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
}
else if (__pButtonItems[RIGHT_BUTTON])
{
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
{
if (__pButtonItems[LEFT_BUTTON])
{
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
{
if (__pButtonItems[RIGHT_BUTTON])
{
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
}
else if (__pButtonItems[RIGHT_BUTTON])
{
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
{
if (__pButtonItems[LEFT_BUTTON])
{
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
{
if (__pButtonItems[RIGHT_BUTTON])
{
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
{
if (__pButtonItems[RIGHT_BUTTON])
{
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
int selectedItemIndex = GetSelectedItemIndex();
- if(selectedItemIndex != -1 && __pItems.at(selectedItemIndex))
+ if (selectedItemIndex != -1 && __pItems.at(selectedItemIndex))
{
if (__pItems.at(selectedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
}
}
+ if (!__isEnterKeyPressed)
+ {
+ __highlightedItemIndex = -1;
+ __isEnterKeyPressed = false;
+ }
+
Invalidate(true);
return true;
if (IsFocusModeStateEnabled() == true && keyCode == _KEY_RIGHT)
{
__highlighted = false;
+ __isEnterKeyPressed = false;
if (__header == true && __style != TOOLBAR_TEXT) // right align
{
else if (IsFocusModeStateEnabled() == true && keyCode == _KEY_LEFT)
{
__highlighted = false;
+ __isEnterKeyPressed = false;
if (__header == true && __style != TOOLBAR_TEXT) // right align
{
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pItems.at(__highlightedItemIndex)->Invalidate();
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
-
__lastHighlightedItemIndex = __highlightedItemIndex;
__highlighted = true;
+
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pButtonItems[LEFT_BUTTON]->Invalidate();
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
-
__lastHighlightedItemIndex = __highlightedItemIndex = __itemCount;
__highlighted = true;
+
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pButtonItems[RIGHT_BUTTON]->Invalidate();
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
-
__lastHighlightedItemIndex = __highlightedItemIndex = __itemCount + 1;
__highlighted = true;
+
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pItems.at(__highlightedItemIndex)->Invalidate();
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
-
__lastHighlightedItemIndex = __highlightedItemIndex;
__highlighted = true;
+
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pButtonItems[LEFT_BUTTON]->Invalidate();
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
-
__lastHighlightedItemIndex = __highlightedItemIndex = __itemCount;
__highlighted = true;
+
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pItems.at(__highlightedItemIndex)->Invalidate();
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
-
__lastHighlightedItemIndex = __highlightedItemIndex;
__highlighted = true;
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pButtonItems[RIGHT_BUTTON]->Invalidate();
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
-
__lastHighlightedItemIndex = __highlightedItemIndex = __itemCount;
__highlighted = true;
+
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pItems.at(__highlightedItemIndex)->Invalidate();
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
-
__lastHighlightedItemIndex = __highlightedItemIndex;
__highlighted = true;
+
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pButtonItems[LEFT_BUTTON]->Invalidate();
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
-
__lastHighlightedItemIndex = __highlightedItemIndex = __itemCount;
__highlighted = true;
+
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pButtonItems[RIGHT_BUTTON]->Invalidate();
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
-
__lastHighlightedItemIndex = __highlightedItemIndex = __itemCount + 1;
__highlighted = true;
+
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pButtonItems[LEFT_BUTTON]->Invalidate();
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
-
__lastHighlightedItemIndex = __highlightedItemIndex = __itemCount;
__highlighted = true;
+
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
__pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pButtonItems[RIGHT_BUTTON]->Invalidate();
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
-
__lastHighlightedItemIndex = __highlightedItemIndex = __itemCount;
__highlighted = true;
+
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
{
ClearLastResult();
- __pToolbarPresenter->Draw();
-
- if(__pTitleTextElement)
+ if (__isAttachedToMainTree)
{
- if( __descriptionText.IsEmpty())
- {
- __pTitleTextElement->SetBounds(FloatRectangle(__pToolbarPresenter->GetTitleTextBoundsF()));
- }
- else
- {
- FloatRectangle descriptionBounds = __pToolbarPresenter->GetDescriptionBoundsF();
- FloatRectangle titleBounds = __pToolbarPresenter->GetTitleTextBoundsF();
-
- __pTitleTextElement->SetBounds(FloatRectangle(titleBounds.x, titleBounds.y, titleBounds.width, titleBounds.height + descriptionBounds.height));
- }
+ __isAttachedToMainTree = false;
+ AdjustToolbarBounds();
}
+
+ __pToolbarPresenter->Draw();
+
return;
}
_Toolbar::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
ClearLastResult();
+ if (__isEnterKeyPressed)
+ {
+ __highlightedItemIndex = -1;
+ __isEnterKeyPressed = false;
+ }
return __pToolbarPresenter->OnTouchPressed(source, touchinfo);
}
if (IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER)
{
+ __isEnterKeyPressed = true;
if (__itemCount != 0)
{
if (__pButtonItems[LEFT_BUTTON])
{
GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, GetOrientation(), vmargin);
GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), headerButtonItemHeight);
+ __titleTextArea.height = vmargin;
}
else if (__style == TOOLBAR_TAB_WITH_TITLE)
{
GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_TOP_MARGIN, GetOrientation(), vmargin);
GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, GetOrientation(), headerButtonItemHeight);
+ __titleTextArea.height = headerButtonItemHeight;
}
else
{
__pToolbarPresenter->SetUsableAreaBounds(__titleTextArea);
+ if (__pTitleTextElement)
+ {
+ __pTitleTextElement->SetBounds(__titleTextArea);
+ }
+
if (0 == __itemCount)
{
return E_SUCCESS;
if (!(__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])) // no button
{
blockWidth[0] = blockWidth[1] = blockWidth[2] = GetSizeF().width / 3;
- blockWidth[1] += 1;
__pItems.at(0)->SetBounds(FloatRectangle(0, vmargin, blockWidth[0], segmentedItemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], vmargin, blockWidth[1], segmentedItemHeight));
- __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2], vmargin, blockWidth[2] + 1, segmentedItemHeight));
+ __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2], vmargin, blockWidth[2], segmentedItemHeight));
}
else
{
blockWidth[0] = blockWidth[1] = blockWidth[2] = (__itemArea.width + leftMargin) / 3;
- blockWidth[1] += 1;
__pItems.at(0)->SetBounds(FloatRectangle(0, vmargin, blockWidth[0], segmentedItemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], vmargin, blockWidth[1], segmentedItemHeight));
- __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] - 1,
- vmargin, blockWidth[2] + 1, segmentedItemHeight));
+ __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1],
+ vmargin, blockWidth[2], segmentedItemHeight));
+ }
+
+ for (int i = 0; i < 3; i++)
+ {
+ __pItems.at(i)->SetBounds(CoordinateSystem::AlignToDevice(__pItems.at(i)->GetBoundsF()));
+
}
for (int i = 0; i < __itemCount; i++)
GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE, GetOrientation(), fontSize);
GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_MULTILINE_FONT_SIZE, GetOrientation(), multilineFontSize);
}
- else if ( __itemCount == 2)
+ else if (__itemCount == 2)
{
if (__pButtonItems[LEFT_BUTTON])
{
__itemArea.width -= (itemButtonRightGap + iconSize + rightMargin);
}
-
iconSize = 0;
leftMargin = 0;
itemButtonLeftGap = 0;
}
- blockWidth[0] = blockWidth[1] = blockWidth[2] = __itemArea.width / 3;
- blockWidth[1] += 1;
+ int width = 0;
+ if (fmod(__itemArea.width, __itemCount) == 0)
+ {
+
+ blockWidth[0] = blockWidth[1] = blockWidth[2] = __itemArea.width / __itemCount;
+ }
+ else
+ {
+ width = __itemArea.width / __itemCount;
+ blockWidth[0] = blockWidth[1] = blockWidth[2] = width;
+ int balanceWidth = Math::Round((fmod(__itemArea.width, 3) + 0.00001f) * 10.0f);
+ while (balanceWidth > 0)
+ {
+ for (int i = 0; i < __itemCount; i++)
+ {
+ if (balanceWidth > 0)
+ {
+ blockWidth[i] += 0.1f;
+ balanceWidth = balanceWidth - 1;
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+ }
if (__pButtonItems[LEFT_BUTTON])
{
{
__pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
- __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] - 1,
- (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] - dividerWidth + 1, segmentedItemHeight));
+ __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1],
+ (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] - dividerWidth, segmentedItemHeight));
}
else
{
__pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],
- (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] + 2, segmentedItemHeight));
+ (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2], segmentedItemHeight));
}
}
else
__pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - blockWidth[2],
- (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] - dividerWidth + 1, segmentedItemHeight));
+ (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] - dividerWidth, segmentedItemHeight));
}
else
{
__pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],
- (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] + 1, segmentedItemHeight));
+ (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2], segmentedItemHeight));
}
}
+ for (int i = 0; i < 3; i++)
+ {
+ __pItems.at(i)->SetBounds(CoordinateSystem::AlignToDevice(__pItems.at(i)->GetBoundsF()));
+
+ }
+
for (int i = 0; i < __itemCount ; i++)
{
if (__pItems.at(i)->GetChildCount() != 0)
}
else if (__itemCount == 3)
{
- itemWidth[0] = itemWidth[1] = itemWidth[2] = __itemArea.width / 3;
- itemWidth[1] += 1;
+
+ int width = 0;
+ if (fmod(__itemArea.width, __itemCount) == 0)
+ {
+
+ itemWidth[0] = itemWidth[1] = itemWidth[2] = __itemArea.width / 3;
+ }
+ else
+ {
+ width = __itemArea.width / __itemCount;
+ itemWidth[0] = itemWidth[1] = itemWidth[2] = width;
+ int balanceWidth = Math::Round((fmod(__itemArea.width, 3) + 0.00001f) * 10.0f);
+ while (balanceWidth > 0)
+ {
+ for (int i = 0; i < __itemCount; i++)
+ {
+ if (balanceWidth > 0)
+ {
+ itemWidth[i] += 0.1f;
+ balanceWidth = balanceWidth - 1;
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+ }
__pItems.at(0)->SetBounds(FloatRectangle(0.0f, vmargin, itemWidth[0], segmentedItemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight));
- __pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - itemWidth[2], vmargin, itemWidth[2] + 1, segmentedItemHeight));
+ __pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - itemWidth[2], vmargin, itemWidth[2], segmentedItemHeight));
+
+ for (int i = 0; i < 3; i++)
+ {
+ __pItems.at(i)->SetBounds(CoordinateSystem::AlignToDevice(__pItems.at(i)->GetBoundsF()));
+
+ }
GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize); // 26
RealignItem(__pItems.at(0), textExtentSize_0);
}
- else if(__itemCount == 2)
+ else if (__itemCount == 2)
{
float textExtentSize_0 = __pItems.at(0)->GetTextExtentSizeF();
float textExtentSize_1 = __pItems.at(1)->GetTextExtentSizeF();
}
}
- blockWidth[0] = blockWidth[1] = blockWidth[2] = __itemArea.width / 3;
- blockWidth[1] += 1;
+ int width = 0;
+ if (fmod(__itemArea.width, __itemCount) == 0)
+ {
+
+ blockWidth[0] = blockWidth[1] = blockWidth[2] = __itemArea.width / __itemCount;
+ }
+ else
+ {
+ width = __itemArea.width / __itemCount;
+ blockWidth[0] = blockWidth[1] = blockWidth[2] = width;
+ int balanceWidth = Math::Round((fmod(__itemArea.width, 3) + 0.00001f) * 10.0f);
+ while (balanceWidth > 0)
+ {
+ for (int i = 0; i < __itemCount; i++)
+ {
+ if (balanceWidth > 0)
+ {
+ blockWidth[i] += 0.1f;
+ balanceWidth = balanceWidth - 1;
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+ }
if (__pButtonItems[LEFT_BUTTON])
{
{
__pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
- __pItems.at(2)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] - 1,
- (GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth + 1, itemHeight));
+ __pItems.at(2)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1],
+ (GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth, itemHeight));
}
else
{
__pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],
- (GetSizeF().height - itemHeight) / 2, blockWidth[2] + 2, itemHeight));
+ (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight));
}
}
else
__pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - blockWidth[2],
- (GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth + 1, itemHeight));
+ (GetSizeF().height - itemHeight) / 2, blockWidth[2] - dividerWidth, itemHeight));
}
else
{
__pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],
- (GetSizeF().height - itemHeight) / 2, blockWidth[2] + 1, itemHeight));
+ (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight));
}
}
+ for (int i = 0; i < 3; i++)
+ {
+ __pItems.at(i)->SetBounds(CoordinateSystem::AlignToDevice(__pItems.at(i)->GetBoundsF()));
+
+ }
+
for (int i = 0; i < __itemCount; i++)
{
if (__pItems.at(i)->GetChildCount() != 0)
}
}
- GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_FONT_SIZE, GetOrientation(), fontSize);//32
+ if (__style == TOOLBAR_TITLE) // item 1, HEADER_STYLE_TITLE_BUTTON
+ {
+ GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30
+ }
+ else
+ {
+ GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_FONT_SIZE, GetOrientation(), fontSize); //32
+ }
for (int i = 0; i < __itemCount; i++)
{
}
}
- //__pItems.at(i)->SetMargin(__pItems.at(i)->GetLeftMarginF(), 0.0f, __pItems.at(i)->GetRightMarginF(), 0.0f);
__pItems.at(i)->SetTextSize(fontSize, FONT_STYLE_BOLD);
__pItems.at(i)->SetMultilineTextSize(multilineFontSize);
}
r = __pToolbarPresenter->SetDescriptionText(__descriptionText);
- if(__pTitleTextElement)
+ if (__pTitleTextElement)
{
if (text.IsEmpty())
{
{
__titleText = text.ToString();
- if(__pTitleTextElement)
+ if (__pTitleTextElement)
{
__pTitleTextElement->SetLabel(__titleText);
}
Bitmap* pColorReplacedBitmap = null;
Color badgeIconBgNormalColor;
Color badgeIconTextNormalColor;
+ float sideMargin = 0.0f;
GET_BITMAP_CONFIG_N(HEADER::BADGE_ICON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNumberedBadgeIconBitmap);
+ GET_SHAPE_CONFIG(HEADER::BADGE_SIDE_MARGIN, GetOrientation(), sideMargin);
bool customTheme = IS_CUSTOM_BITMAP(HEADER::BADGE_ICON_BG_NORMAL);
if (customTheme == false)
delete pNumberedBadgeIconEffectBitmap;
}
- __pTitleBadgeIcon->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
+ __pTitleBadgeIcon->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
__pTitleBadgeIcon->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
__pTitleBadgeIcon->SetTextColor(badgeIconTextNormalColor);
- __pTitleBadgeIcon->SetMargin(0, 10);
+ __pTitleBadgeIcon->SetMargin(sideMargin, 0.0f, sideMargin, 0.0f);
float fontSize = 0.0f;
float height = 0.0f;
float width = 0.0f;
+ float minWidth = 0.0f;
GET_SHAPE_CONFIG(HEADER::BADGE_FONT_SIZE, GetOrientation(), fontSize);
GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT, GetOrientation(), height);
+ GET_SHAPE_CONFIG(HEADER::BADGE_MIN_WIDTH, GetOrientation(), minWidth);
- if (number < 10)
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_1DIGIT, GetOrientation(), width);
- }
- else if (number < 100)
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_2DIGIT, GetOrientation(), width);
- }
- else if (number < 1000)
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_3DIGIT, GetOrientation(), width);
- }
- else if (number < 10000)
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_4DIGIT, GetOrientation(), width);
- }
- else
- {
- GET_SHAPE_CONFIG(HEADER::BADGE_WIDTH_5DIGIT, GetOrientation(), width);
- }
-
- __pTitleBadgeIcon->SetBounds(FloatRectangle(0.0f, 0.0f, width, height));
__pTitleBadgeIcon->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
Integer tempNumber(number);
__pTitleBadgeIcon->SetText(tempNumber.ToString());
+ width = __pTitleBadgeIcon->GetTextExtentSizeF();
+
+ if (width < minWidth)
+ {
+ width = minWidth;
+ }
+
+ width += sideMargin * 2;
+
+ __pTitleBadgeIcon->SetBounds(FloatRectangle(0.0f, 0.0f, width, height));
+
AttachChild(*__pTitleBadgeIcon);
SetChildAlwaysOnTop(*__pTitleBadgeIcon);
}
DrawDescriptionText();
- if(!__titleText.IsEmpty())
+ if (!__titleText.IsEmpty())
{
__fontSize = fontSize;
{
int firstEnabledItemIndex = __pToolbar->GetFirstEnabledItemIndex();
- if(firstEnabledItemIndex != -1)
+ if (firstEnabledItemIndex != -1)
{
__pToolbar->SetItemSelected(firstEnabledItemIndex, true, false);
}
{
GET_SHAPE_CONFIG(HEADER::TAB_LARGE_DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight);
}
- else
+ else if (__pToolbar->IsHeader()) //All header styles
{
GET_SHAPE_CONFIG(HEADER::DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight);
}
+ else
+ {
+ GET_SHAPE_CONFIG(FOOTER::DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight);
+ }
FloatRectangle bounds(0.0f, 0.0f, __pToolbar->GetBoundsF().width, __pToolbar->GetBoundsF().height);
}
}
- Canvas * pCanvas = null;
+ Canvas* pCanvas = null;
int Z_ORDER_GROUP_CONTROL = 2001;
if (__pDividerVe == null)
}
delete pReColorSubTitleEffectBitmap;
+ delete pSubTitleEffectBitmap;
}
delete pCanvas;
__descriptionRect.y = __titleRect.y + __titleRect.height;
- if(__titleText.IsEmpty())
+ if (__titleText.IsEmpty())
{
__descriptionRect.width = __toolbarUsableArea.width;
}
void
_ToolbarPresenter::DrawEditItem(const FloatPoint& point)
{
- if (__pEditItem == null )
+ if (__pEditItem == null)
{
return;
}
{
GET_SHAPE_CONFIG(HEADER::TAB_LARGE_DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight);
}
- else
+ else if (__pToolbar->IsHeader()) //All header styles
{
GET_SHAPE_CONFIG(HEADER::DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight);
}
+ else //footer
+ {
+ GET_SHAPE_CONFIG(FOOTER::DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight);
+ }
if (__pToolbar->IsHeader() == true)
{
if (pTitleIcon)
{
- totalWidth += (pTitleIcon->GetWidthF() + usableArea.x);
+ totalWidth += (pTitleIcon->GetWidthF() + iconRightMargin);
}
__titleRect.x = leftMargin + pTitleIcon->GetWidthF() + iconRightMargin;
__titleRect.y = headerTopMargin + (titleDisplayHeight - titleHeight) / 2;
- if(__pTitleTextObject->GetAlignment() & TEXT_OBJECT_ALIGNMENT_CENTER)
+ if (__pTitleTextObject->GetAlignment() & TEXT_OBJECT_ALIGNMENT_CENTER)
{
- leftMargin = (__titleRect.width - titleTextDimension.width) / 2 - leftMargin;
+ leftMargin = (__titleRect.width - titleTextDimension.width) / 2;
}
- else if(__pTitleTextObject->GetAlignment() & TEXT_OBJECT_ALIGNMENT_RIGHT)
+ else if (__pTitleTextObject->GetAlignment() & TEXT_OBJECT_ALIGNMENT_RIGHT)
{
- leftMargin = __titleRect.width - titleTextDimension.width - leftMargin * 3;
+ leftMargin = __titleRect.width - titleTextDimension.width - iconRightMargin * 2;
}
pCanvas->DrawBitmap(FloatPoint(leftMargin, headerTopMargin + (titleDisplayHeight - pTitleIcon->GetHeightF()) / 2), *(pTitleIcon));
titleBadgeIconTopMargin));
}
- __titleRect.width -= (pTitleIcon->GetWidthF() + usableArea.x);
+ __titleRect.width -= (pTitleIcon->GetWidthF() + iconRightMargin);
}
else
{
{
pTitleIcon->Scale(FloatDimension(iconWidth, iconWidth));
- if(__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER)
+ if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER)
{
leftMargin = (leftMargin + usableArea.width - (pTitleIcon->GetWidthF() + processingAnimationIconGap + processingAnimationIconSize)) / 2;
}
- else if(__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT)
+ else if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT)
{
leftMargin = leftMargin + usableArea.width - (pTitleIcon->GetWidthF() + processingAnimationIconGap + processingAnimationIconSize);
}
{
pTitleIcon->Scale(FloatDimension(iconWidth, iconWidth));
- if(__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER)
+ if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER)
{
leftMargin = usableArea.width / 2;
}
- else if(__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT)
+ else if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT)
{
leftMargin = usableArea.width - pTitleIcon->GetWidthF();
}
}
else
{
- if(__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER)
+ if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER)
{
leftMargin = (usableArea.width - (processingAnimationIconGap + processingAnimationIconSize))/ 2;
}
- else if(__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT)
+ else if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT)
{
leftMargin = usableArea.width - (processingAnimationIconGap + processingAnimationIconSize);
}
return E_OUT_OF_MEMORY;
}
__pDescriptionTextObject->Construct();
+
TextSimple* pSimpleText = new (std::nothrow) TextSimple(tempString, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
+
+ pSimpleText->SetTextShadowEnabled(true);
+ pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, 2.0f));
+
__pDescriptionTextObject->AppendElement(*pSimpleText);
__pDescriptionTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
__pDescriptionTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER);
}
__pTitleTextObject->Construct();
__pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
+
TextSimple* pSimpleText = new (std::nothrow) TextSimple(tempString, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
- __pTitleTextObject->AppendElement(*pSimpleText);
+ pSimpleText->SetTextShadowEnabled(true);
+ pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, 2.0f));
+
+ __pTitleTextObject->AppendElement(*pSimpleText);
__pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
__titleSliding = false;
}
__pEditItem = _Label::CreateLabelN();
- SysTryCatch(NID_UI_CTRL, __pEditItem, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_UI_CTRL, __pEditItem, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
Canvas* pCanvas = pButton->GetCanvasN();
SysTryCatch(NID_UI_CTRL, pCanvas, , E_INVALID_STATE, "[E_INVALID_STATE] Unable to retrieve a Canvas.");
itemBounds = __pToolbar->GetItem(0)->GetBoundsF();
if (itemBounds.x + distance > 0.0f)
{
- distance = itemBounds.x - distance;
+ distance = 0.0f;
}
}
else
itemBounds = __pToolbar->GetItem(itemCount - 4)->GetBoundsF();
if (itemBounds.x + distance < 0.0f)
{
- distance = itemBounds.x - distance;
+ distance = 0.0f;
}
}
{
// cast to IFastScrollListener
_IUiFastScrollListener* pFastScrollListener = dynamic_cast <_IUiFastScrollListener*>(&listener);
- SysTryReturnVoidResult(NID_UI, pFastScrollListener, E_INVALID_ARG, "[E_INVALID_ARG] listener type is invalid.");
+ SysTryReturnVoidResult(NID_UI, pFastScrollListener, E_INVALID_ARG, "[%s] Invalid argument is used. Listener type is invalid.", GetErrorMessage(E_INVALID_ARG));
// cast to __UiFastScrollEventArg
_UiFastScrollEventArg* pArg = (_UiFastScrollEventArg*) const_cast <IEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[E_INVALID_ARG] Event argument type is invalid.");
+ SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[%s] Invalid argument is used. Event argument type is invalid.", GetErrorMessage(E_INVALID_ARG));
pFastScrollListener->OnUiFastScrollIndexSelected(*pArg->GetSource(), const_cast <Tizen::Ui::Controls::_FastScrollIndex&>(pArg->GetIndex()));
}
{
ClearLastResult();
result r = _Event::Initialize();
- SysTryReturn(NID_UI, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnResult(NID_UI, (r == E_SUCCESS), r, "Propagating.");
// set event source
__pSource = const_cast <_Control*>(&source);
_UiScrollEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
{
_IScrollEventListener* pScrollEventListener = dynamic_cast <_IScrollEventListener*>(&listener);
- SysTryReturnVoidResult(NID_UI_CTRL, (pScrollEventListener != null), E_INVALID_ARG, "The invalid listener was given.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (pScrollEventListener != null), E_INVALID_ARG, "[%s] Invalid argument is used. The listener type is not valid.", GetErrorMessage(E_INVALID_ARG));
// cast Argument
const _UiScrollEventArg* pArg = dynamic_cast <const _UiScrollEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI_CTRL, (pArg != null), E_INVALID_ARG, "The invalid Event Argument was given.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (pArg != null), E_INVALID_ARG, "[%s] Invalid argument is used. The event argument is not valid.", GetErrorMessage(E_INVALID_ARG));
switch (pArg->GetEventType())
{
pScrollEventListener->OnScrollJumpToTop(*pArg->GetSource());
break;
default:
- SysTryReturnVoidResult(NID_UI_CTRL, false, E_INVALID_ARG, "The invalid Event Argument was given.");
+ SysTryReturnVoidResult(NID_UI_CTRL, false, E_INVALID_ARG, "[%s] Invalid argument is used. The event argument is not valid.", GetErrorMessage(E_INVALID_ARG));
break;
}
}
_UiScrollEventArg::GetScrollEventArgN(const _Control& source)
{
_UiScrollEventArg* pEventArg = new (std::nothrow) _UiScrollEventArg(SCROLL_EVENT_ON_SCROLL_STOPPED, source);
- SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pEventArg;
}
_UiScrollEventArg::GetScrollJumpToTopEventArgN(const _Control& source)
{
_UiScrollEventArg* pEventArg = new (std::nothrow) _UiScrollEventArg(SCROLL_EVENT_ON_SCROLL_JUMP_TO_TOP, source);
- SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pEventArg;
}
_UiScrollEventArg::GetScrollEventArgN(const _Control& source, float scrollPosition)
{
_UiScrollEventArg* pEventArg = new (std::nothrow) _UiScrollEventArg(SCROLL_EVENT_ON_SCROLL_POSITION_CHANGED, source, scrollPosition);
- SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pEventArg;
}
_UiScrollEventArg::GetScrollEventArgN(const _Control& source, ScrollEndEvent scrollType)
{
_UiScrollEventArg* pEventArg = new (std::nothrow) _UiScrollEventArg(SCROLL_EVENT_ON_SCROLL_END_REACHED, source, -1.0f, scrollType);
- SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] The memory is insufficient.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
return pEventArg;
}
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+/**
+ * @file FUiCtrl_Frame.cpp
+ * @brief This is the implementation file for the _Frame class.
+ */
+
+#include <new>
+#include <FBaseErrorDefine.h>
+#include <FBaseInteger.h>
+#include <FBaseSysLog.h>
+#include <FApp_AppInfo.h>
+#include "FUi_UiNotificationEvent.h"
+#include "FUi_UiEventManager.h"
+#include "FUi_ControlManager.h"
+#include "FUi_EcoreEvasMgr.h"
+#include "FUi_EcoreEvas.h"
+#include "FUi_TouchManager.h"
+#include "FUi_CoordinateSystemUtils.h"
+#include "FUiCtrl_Frame.h"
+#include "FUiCtrl_FramePresenter.h"
+#include "FUiCtrl_FrameEvent.h"
+#include "FUiCtrl_IFrameEventListener.h"
+#include "FUiCtrl_IFormActivationChangeEventListener.h"
+#include "FUiCtrl_Form.h"
+#include "FUiCtrl_FormImpl.h"
+#include "FUiCtrl_FrameImpl.h"
+#include "FUiAnim_VisualElement.h"
+#include "FUiAnim_RootVisualElement.h"
+#include "FUiAnim_EflLayer.h"
+#include "FUi_AccessibilityManager.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Ui::Animations;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Graphics;
+
+namespace Tizen { namespace Ui { namespace Controls {
+
+const wchar_t* _ACTIVATE_FRAME = L"ActivateFrame";
+
+_Frame::_Frame(void)
+ : __pFramePresenter(null)
+ , __pFrameEvent(null)
+ , __floatingBounds(0.0f, 0.0f, 0.0f, 0.0f)
+ , __floatingOrientation(_CONTROL_ORIENTATION_PORTRAIT)
+ , __showMode(FRAME_SHOW_MODE_FULL_SCREEN)
+ , __restore(false)
+ , __minimized(false)
+ , __activated(false)
+ , __constructed(false)
+ , __rotation(false)
+ , __changingBoundsEnabled(true)
+ , __skipSetBounds(false)
+ , __pFormActivationChangeEventListener(null)
+{
+ _FramePresenter* pPresenter = new (std::nothrow) _FramePresenter(*this);
+ SysTryReturnVoidResult(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF();
+ __floatingBounds.width = screen.width;
+ __floatingBounds.height = screen.height;
+
+ __pFrameEvent = _FrameEvent::CreateInstanceN(*this);
+ SysTryCatch(NID_UI_CTRL, __pFrameEvent, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+ SetPresenter(*pPresenter);
+ SetClipChildrenEnabled(false);
+
+ ClearLastResult();
+
+ return;
+
+CATCH:
+ delete pPresenter;
+ pPresenter = null;
+}
+
+_Frame::~_Frame(void)
+{
+ if (__pFrameEvent)
+ {
+ delete __pFrameEvent;
+ __pFrameEvent = null;
+ }
+
+ delete __pFramePresenter;
+ __pFramePresenter = null;
+
+ ClearLastResult();
+}
+
+_Frame*
+_Frame::CreateFrameN(void)
+{
+ result r = E_SUCCESS;
+ _RootVisualElement* pRootVE = null;
+ _EflLayer* pLayer = null;
+ int appType = _AppInfo::GetAppType();
+
+ _Frame* pFrame = new (std::nothrow) _Frame;
+ SysTryCatch(NID_UI_CTRL, pFrame, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+ SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+ if (appType & _APP_TYPE_IME_APP)
+ {
+ SysLog(NID_UI_CTRL, "[Ime Rotation]");
+ r = pFrame->CreateRootVisualElement(_WINDOW_TYPE_SUB);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pFrame->CreateRootVisualElement();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ pRootVE = pFrame->GetRootVisualElement();
+ SysAssert(pRootVE);
+
+ pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer());
+ SysAssert(pLayer);
+
+ if (!(appType & _APP_TYPE_IME_APP))
+ {
+ pLayer->SetOpacity(1);
+ }
+
+ pFrame->AcquireHandle();
+
+ GetEcoreEvasMgr()->GetEcoreEvas()->SetDragAndDropEnabled(*pFrame);
+#if defined(PARTIAL_SCREEN)
+ GetEcoreEvasMgr()->GetEcoreEvas()->SetPartialScreenEnabled(*pFrame);
+#endif
+
+ SetLastResult(E_SUCCESS);
+
+ return pFrame;
+
+CATCH:
+ delete pFrame;
+
+ return null;
+}
+
+result
+_Frame::SetPresenter(const _FramePresenter& framePresenter)
+{
+ __pFramePresenter = const_cast <_FramePresenter*>(&framePresenter);
+
+ return E_SUCCESS;
+}
+
+void
+_Frame::OnDraw(void)
+{
+ if (__pFramePresenter)
+ {
+ __pFramePresenter->Draw();
+ }
+}
+
+void
+_Frame::OnActivated(void)
+{
+ SysLog(NID_UI, "activated(%d)", __activated);
+
+ _Window::OnActivated();
+
+ _Form* pCurrentForm = GetCurrentForm();
+ if (pCurrentForm == null)
+ {
+ return;
+ }
+
+ pCurrentForm->AddIndicatorObject();
+ pCurrentForm->ActivateIndicator();
+
+ SetFocusWindowActivationChecked(true);
+ _Control* pFocusControl = pCurrentForm->GetFocusControl();
+ if (pFocusControl)
+ {
+ pFocusControl->SetFocused();
+ }
+ else
+ {
+ pCurrentForm->SetFocused();
+ }
+ SetFocusWindowActivationChecked(false);
+ _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM);
+}
+
+
+void
+_Frame::OnDeactivated(void)
+{
+ SysLog(NID_UI, "deactivated(%d)", __activated);
+
+ _Window::OnDeactivated();
+
+ _Form* pCurrentForm = GetCurrentForm();
+ if (pCurrentForm == null)
+ {
+ return;
+ }
+
+ pCurrentForm->DeactivateIndicator();
+
+}
+
+
+bool
+_Frame::OnNotifiedN(const _Control& source, IList* pArgs)
+{
+ SysTryReturn(NID_UI_CTRL, pArgs, false, E_SYSTEM, "[E_SYSTEM] pArgs is null.")
+
+ String* pType = dynamic_cast <String*>(pArgs->GetAt(0));
+ SysTryReturn(NID_UI_CTRL, pType, false, E_SYSTEM, "[E_SYSTEM] pType is null.")
+
+ if (*pType == L"VisibilityEvent")
+ {
+ int obscured = 0;
+
+ Integer* pObscured = dynamic_cast<Integer*>(pArgs->GetAt(1));
+ if (pObscured == null)
+ {
+ pArgs->RemoveAll(true);
+ delete pArgs;
+
+ return true;
+ }
+
+ obscured = pObscured->ToInt();
+ if (obscured == 0)
+ {
+ SetNativeWindowActivated(true);
+ __activated = true;
+ OnFrameActivated();
+ }
+ else
+ {
+ SetNativeWindowActivated(false);
+ __activated = false;
+ OnFrameDeactivated();
+ }
+
+ pArgs->RemoveAll(true);
+ delete pArgs;
+
+ return true;
+ }
+ else if (*pType == _ACTIVATE_FRAME)
+ {
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ if (pEcoreEvas)
+ {
+ pEcoreEvas->ActivateWindow(*this);
+ }
+
+ pArgs->RemoveAll(true);
+ delete pArgs;
+
+ return true;
+ }
+
+ return false;
+}
+
+void
+_Frame::OnFrameActivated(void)
+{
+ int childcount = GetChildCount();
+
+ for (int i = 0 ; i < childcount ; i++)
+ {
+ _Control* pChild = GetChild(i);
+ _Form* pForm = dynamic_cast<_Form*>(pChild);
+ if (pForm)
+ {
+ pForm->MoveOverlayRegion(true);
+ }
+ }
+
+ // Fire Event.
+ IEventArg* pArg = _FrameEvent::CreateFrameEventArgN(*this, _FRAME_STATUS_ACTIVATED);
+ __pFrameEvent->Fire(*pArg);
+
+ if (GetChildCount() < 1)
+ {
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ SysTryReturnVoidResult(NID_UI_CTRL, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] Unable to get evas");
+
+ if (GetShowMode() == FRAME_SHOW_MODE_FULL_SCREEN)
+ {
+ pEcoreEvas->SetIndicatorShowState(*GetRootWindow(), false);
+ }
+ }
+ _Form* pCurrentForm = GetCurrentForm();
+ if (pCurrentForm)
+ {
+ _Control* pFocusTraversalControl = pCurrentForm->GetFocusTraversalControl();
+ if (pFocusTraversalControl)
+ {
+ pFocusTraversalControl->OnTraversalControlFocusGained();
+ }
+ }
+}
+
+void
+_Frame::OnFrameDeactivated(void)
+{
+ int childcount = GetChildCount();
+
+ for (int i = 0 ; i < childcount ; i++)
+ {
+ _Control* pChild = GetChild(i);
+ _Form* pForm = dynamic_cast<_Form*>(pChild);
+ if (pForm)
+ {
+ pForm->MoveOverlayRegion(false);
+ }
+ }
+
+ // Fire Event.
+ IEventArg* pArg = _FrameEvent::CreateFrameEventArgN(*this, _FRAME_STATUS_DEACTIVATED);
+ __pFrameEvent->Fire(*pArg);
+
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
+ if (pTouchManager)
+ {
+ pTouchManager->SetTouchCanceled(null);
+ }
+}
+
+void
+_Frame::OnFrameMinimized(void)
+{
+ IEventArg* pArg = _FrameEvent::CreateFrameEventArgN(*this, _FRAME_STATUS_MINIMIZED);
+ __pFrameEvent->Fire(*pArg);
+}
+
+void
+_Frame::OnFrameRestored(void)
+{
+ __minimized = false;
+
+ IEventArg* pArg = _FrameEvent::CreateFrameEventArgN(*this, _FRAME_STATUS_RESTORED);
+ __pFrameEvent->Fire(*pArg);
+}
+
+void
+_Frame::SetCurrentForm(const _Form* pForm)
+{
+ result r = E_SUCCESS;
+
+ SysTryReturnVoidResult(NID_UI_CTRL, pForm != null, E_INVALID_ARG, "[E_INVALID_ARG] Form to become a new current form is null");
+ _Form* pNewForm = const_cast<_Form*>(pForm);
+
+ _Form* pCurrentForm = GetCurrentForm();
+ pNewForm->AddIndicatorObject();
+
+ if (pCurrentForm != null)
+ {
+ if (pCurrentForm != pForm)
+ {
+ // Change order
+ r = MoveChildToTop(*pForm);
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ pNewForm->MoveOverlayRegion(true);
+
+ pCurrentForm->SetVisibleState(false);
+ pCurrentForm->MoveOverlayRegion(false);
+
+ pCurrentForm->OnFormDeactivated();
+
+ if (__pFormActivationChangeEventListener)
+ {
+ __pFormActivationChangeEventListener->OnFormDeactivated(*pCurrentForm);
+ }
+ }
+ }
+
+ pNewForm->SetVisibleState(true);
+ pNewForm->OnFormActivated();
+ _Control* pFocus = pNewForm->GetFocusControl();
+ if (pFocus)
+ {
+ pFocus->SetFocused();
+ }
+ else
+ {
+ pNewForm->SetFocused();
+ }
+ _Control* pFocusTraversalControl = pNewForm->GetFocusTraversalControl();
+ if (pFocusTraversalControl)
+ {
+ pFocusTraversalControl->OnTraversalControlFocusGained();
+ }
+ pNewForm->SetUpdateLayoutState(true);
+
+ if (__pFormActivationChangeEventListener)
+ {
+ __pFormActivationChangeEventListener->OnFormActivated(*pNewForm);
+ }
+
+ SetLastResult(E_SUCCESS);
+
+ return;
+}
+
+_Form*
+_Frame::GetCurrentForm(void) const
+{
+ _Form* pCurrentForm = null;
+ int controlCount = GetChildCount();
+
+ if (controlCount > 0)
+ {
+ for (int i = controlCount; i > 0; i--)
+ {
+ pCurrentForm = dynamic_cast<_Form*>(GetChild(i - 1));
+ SysTryReturn(NID_UI_CTRL, pCurrentForm != null, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ if (pCurrentForm->IsVisible())
+ {
+ break;
+ }
+ }
+ }
+
+ return pCurrentForm;
+}
+
+bool
+_Frame::IsOrientationRoot(void) const
+{
+ return true;
+}
+
+void
+_Frame::SetRotation(bool rotation)
+{
+ __rotation = rotation;
+}
+
+void
+_Frame::AddFrameEventListener(const _IFrameEventListener& listener)
+{
+ __constructed = true;
+
+ result r = __pFrameEvent->AddListener(listener);
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+}
+
+void
+_Frame::RemoveFrameEventListener(const _IFrameEventListener& listener)
+{
+ result r = E_SUCCESS;
+
+ if (__pFrameEvent)
+ {
+ r = __pFrameEvent->RemoveListener(listener);
+ }
+
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+}
+
+void
+_Frame::SetFormActivationChangeEventListener(const _IFormActivationChangeEventListener* plistener)
+{
+ __pFormActivationChangeEventListener = const_cast<_IFormActivationChangeEventListener*>(plistener);
+}
+
+
+void
+_Frame::SetFloatingBounds(const FloatRectangle& rect)
+{
+ __floatingBounds = rect;
+}
+
+void
+_Frame::SetFloatingBounds(const Rectangle& rect)
+{
+ __floatingBounds = _CoordinateSystemUtils::ConvertToFloat(rect);
+}
+
+void
+_Frame::SetFloatingOrientation(_ControlOrientation orientation)
+{
+ if ((__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING))
+ {
+ __floatingOrientation = orientation;
+ }
+}
+
+result
+_Frame::SetShowMode(FrameShowMode showMode)
+{
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ SysTryReturnResult(NID_UI_CTRL, pEcoreEvas, E_SYSTEM, "The method cannot proceed due to a severe system error.");
+
+ if (showMode == FRAME_SHOW_MODE_MINIMIZED)
+ {
+ if (__minimized == true)
+ {
+ return E_SUCCESS;
+ }
+
+ pEcoreEvas->MinimizeWindow(*GetRootWindow());
+ __minimized = true;
+
+ return E_SUCCESS;
+ }
+ else
+ {
+ if (__minimized == true)
+ {
+ return E_SYSTEM;
+ }
+ }
+
+ bool changeMode = true;
+
+ if ((showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING))
+ {
+ _Form* pCurrentForm = GetCurrentForm();
+
+ if (pCurrentForm)
+ {
+ if (pCurrentForm->GetFormStyle() & _FORM_STYLE_INDICATOR)
+ {
+ changeMode = false;
+ }
+ }
+ }
+
+ SysTryReturnResult(NID_UI_CTRL, changeMode == true, E_SYSTEM, "The method cannot proceed due to a severe system error.");
+
+ int oldShowMode = __showMode;
+ __showMode = showMode;
+
+ // depend on WM.
+ // App decides floating bounds directly.
+/*
+ if ((__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING))
+ {
+ _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT;
+ _Form* pCurForm = GetCurrentForm();
+ if (pCurForm)
+ {
+ orientation = pCurForm->GetOrientation();
+ }
+ else
+ {
+ orientation = GetOrientation();
+ }
+
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (__floatingOrientation == _CONTROL_ORIENTATION_LANDSCAPE)
+ {
+ FloatDimension screenSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
+ FloatPoint prevPoint(__floatingBounds.x, __floatingBounds.y);
+ FloatPoint curPoint(prevPoint.x, prevPoint.y);
+ float ratio = screenSize.width / screenSize.height;
+
+ if (prevPoint.x > 0.0f)
+ {
+ curPoint.x = prevPoint.x * ratio;
+ }
+
+ if (prevPoint.y > 0.0f)
+ {
+ curPoint.y = prevPoint.y / ratio;
+ }
+
+ __floatingBounds.x = curPoint.x;
+ __floatingBounds.y = curPoint.y;
+ }
+ }
+ else
+ {
+ if (__floatingOrientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ FloatDimension screenSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
+ FloatPoint prevPoint(__floatingBounds.x, __floatingBounds.y);
+ FloatPoint curPoint(prevPoint.x, prevPoint.y);
+ float ratio = screenSize.width / screenSize.height;
+
+ if (prevPoint.x > 0.0f)
+ {
+ curPoint.x = prevPoint.x / ratio;
+ }
+
+ if (prevPoint.y > 0.0f)
+ {
+ curPoint.y = prevPoint.y * ratio;
+ }
+
+ __floatingBounds.x = curPoint.x;
+ __floatingBounds.y = curPoint.y;
+ }
+ }
+ }
+*/
+
+ result r = E_SUCCESS;
+ Rectangle floatingBounds = _CoordinateSystemUtils::ConvertToInteger(__floatingBounds);
+ switch (__showMode)
+ {
+ case FRAME_SHOW_MODE_FULL_SCREEN:
+ if (oldShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING)
+ {
+ r = pEcoreEvas->SetFloatingMode(*GetRootWindow(), false);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ if (oldShowMode != FRAME_SHOW_MODE_FULL_SCREEN)
+ {
+ FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF();
+
+ __restore = true;
+
+ if (__skipSetBounds == false)
+ {
+ if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ SetBounds(FloatRectangle(0.0f, 0.0f, screen.width, screen.height));
+ }
+ else
+ {
+ SetBounds(FloatRectangle(0.0f, 0.0f, screen.height, screen.width));
+ }
+ }
+
+ __restore = false;
+ }
+
+ SetChangedPositionByUser(false);
+
+ break;
+ case FRAME_SHOW_MODE_PARTIAL_SCREEN:
+ SysLog(NID_UI, "[WM ROTATION]<M>[WIN 0x%x] Set floating bounds(%d, %d, %d, %d).",
+ GetNativeHandle(), floatingBounds.x, floatingBounds.y, floatingBounds.width, floatingBounds.height);
+ if (oldShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING)
+ {
+ r = pEcoreEvas->SetFloatingMode(*GetRootWindow(), false);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ if (oldShowMode == FRAME_SHOW_MODE_FULL_SCREEN)
+ {
+ SetBounds(__floatingBounds);
+ }
+ else if (oldShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING)
+ {
+ pEcoreEvas->SetWindowBounds(*GetRootWindow(), _CoordinateSystemUtils::ConvertToInteger(__floatingBounds));
+ }
+
+ break;
+ case FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING:
+ SysLog(NID_UI, "[WM ROTATION]<M>[WIN 0x%x] Set floating bounds(%d, %d, %d, %d).",
+ GetNativeHandle(), floatingBounds.x, floatingBounds.y, floatingBounds.width, floatingBounds.height);
+ if (oldShowMode != FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING)
+ {
+ r = pEcoreEvas->SetFloatingMode(*GetRootWindow(), true);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ if (oldShowMode == FRAME_SHOW_MODE_FULL_SCREEN)
+ {
+ if (IsChangedPositionByUser() == true)
+ {
+ SetBounds(__floatingBounds);
+ }
+ else
+ {
+ SetSize(FloatDimension(__floatingBounds.width, __floatingBounds.height));
+ }
+ }
+
+ break;
+ default:
+ break;
+ }
+
+ if ((__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING))
+ {
+ _Form* pCurForm = GetCurrentForm();
+ if (pCurForm)
+ {
+ __floatingOrientation = pCurForm->GetOrientation();
+ }
+ else
+ {
+ __floatingOrientation = GetOrientation();
+ }
+ }
+
+ return E_SUCCESS;
+}
+
+FrameShowMode
+_Frame::GetShowMode(bool minimize) const
+{
+ if (minimize)
+ {
+ if (__minimized == true)
+ {
+ return FRAME_SHOW_MODE_MINIMIZED;
+ }
+ else
+ {
+ return __showMode;
+ }
+ }
+ else
+ {
+ return __showMode;
+ }
+}
+
+bool
+_Frame::IsFrameActivated(void) const
+{
+ return __activated;
+}
+
+void
+_Frame::OnChildAttached(const _Control& child)
+{
+ _Form* pCurrentForm = GetCurrentForm();
+
+ if (pCurrentForm == &child)
+ {
+ int controlCount = GetChildCount();
+
+ if (controlCount > 1)
+ {
+ _Control* pOldCurrentForm = GetChild(controlCount - 2);
+ SysTryReturnVoidResult(NID_UI_CTRL, pOldCurrentForm != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ pOldCurrentForm->SetVisibleState(false);
+ }
+ }
+}
+
+void
+_Frame::OnChildDetached(const _Control& child)
+{
+ int controlCount = GetChildCount();
+
+ if (controlCount > 0)
+ {
+ _Control* pCurrentForm = GetChild(controlCount - 1);
+ SysTryReturnVoidResult(NID_UI_CTRL, pCurrentForm, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ pCurrentForm->SetVisibleState(true);
+ }
+ else
+ {
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ SysTryReturnVoidResult(NID_UI_CTRL, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] Unable to get evas");
+ pEcoreEvas->SetIndicatorShowState(*GetRootWindow(), false);
+ }
+}
+
+result
+_Frame::OnBoundsChanging(const FloatRectangle& bounds)
+{
+ int appType = _AppInfo::GetAppType();
+ if (appType & _APP_TYPE_IME_APP)
+ {
+ SysLog(NID_UI_CTRL, "[Ime Rotation]");
+ return E_SUCCESS;
+ }
+
+ if (__restore == false)
+ {
+ __floatingBounds = bounds;
+ }
+
+ if ((__showMode == FRAME_SHOW_MODE_FULL_SCREEN) && (__restore == false))
+ {
+ if (__constructed == false)
+ {
+ return E_SUCCESS;
+ }
+ else
+ {
+ if (__rotation == true)
+ {
+ return E_SUCCESS;
+ }
+ else
+ {
+ return E_UNSUPPORTED_OPERATION;
+ }
+ }
+ }
+
+ if (__changingBoundsEnabled == false)
+ {
+ return E_SUCCESS;
+ }
+
+ if (__restore == true)
+ {
+ return E_SUCCESS;
+ }
+
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ bool changePosition = IsChangedPositionByUser();
+ SysLog(NID_UI_CTRL, "[WM ROTATION]<M>[WIN 0x%x] IsChangedPositionByUser = %d", GetNativeHandle(), changePosition);
+ pEcoreEvas->SetWindowBounds(*GetRootWindow(), _CoordinateSystemUtils::ConvertToInteger(bounds), (changePosition ? false : true));
+ result r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
+
+result
+_Frame::OnAttached(void)
+{
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ SysAssert(pEcoreEvas);
+
+ pEcoreEvas->SetWindowVisibleState(*GetRootWindow(), true);
+
+ return E_SUCCESS;
+}
+
+void
+_Frame::OnBackgroundColorChanged(Color& backgroundColor)
+{
+ _RootVisualElement* pRootVE = GetRootVisualElement();
+ SysAssert(pRootVE);
+
+ _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer());
+ SysAssert(pLayer);
+
+ byte alpha = backgroundColor.GetAlpha();
+ float opacity = static_cast<float>(alpha) / 255.0f;
+
+ pLayer->SetOpacity(opacity);
+
+ // Restore
+ FrameShowMode showMode = GetShowMode(false);
+ __skipSetBounds = true;
+ SetShowMode(FRAME_SHOW_MODE_FULL_SCREEN);
+ __skipSetBounds = false;
+
+ SetShowMode(showMode);
+
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ if (!pEcoreEvas)
+ {
+ return;
+ }
+
+ Orientation mode = ORIENTATION_PORTRAIT;
+
+ _Form* pCurrentForm = GetCurrentForm();
+ if (pCurrentForm)
+ {
+ _FormImpl* pFormImpl = static_cast<_FormImpl*>(pCurrentForm->GetUserData());
+ if (pFormImpl)
+ {
+ mode = pFormImpl->GetOrientation();
+ }
+ }
+ else
+ {
+ _FrameImpl* pFrameImpl = static_cast<_FrameImpl*>(GetUserData());
+ if (pFrameImpl)
+ {
+ mode = pFrameImpl->GetOrientation();
+ }
+ }
+
+ switch (mode)
+ {
+ case ORIENTATION_PORTRAIT:
+ pEcoreEvas->SetWindowPreferredRotation(*this, 0, true);
+ break;
+ case ORIENTATION_LANDSCAPE:
+ pEcoreEvas->SetWindowPreferredRotation(*this, 270, true);
+ break;
+ case ORIENTATION_PORTRAIT_REVERSE:
+ pEcoreEvas->SetWindowPreferredRotation(*this, 180, true);
+ break;
+ case ORIENTATION_LANDSCAPE_REVERSE:
+ pEcoreEvas->SetWindowPreferredRotation(*this, 90, true);
+ break;
+ case ORIENTATION_AUTOMATIC:
+ {
+ pEcoreEvas->SetWindowPreferredRotation(*this, -1);
+ int autoRotation[3] = {0, 90, 270};
+ pEcoreEvas->SetWindowAvailabledRotation(*this, autoRotation, 3, true);
+ }
+ break;
+ case ORIENTATION_AUTOMATIC_FOUR_DIRECTION:
+ {
+ pEcoreEvas->SetWindowPreferredRotation(*this, -1);
+ int autoFourRotation[4] = {0, 90, 180, 270};
+ pEcoreEvas->SetWindowAvailabledRotation(*this, autoFourRotation, 4, true);
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+void
+_Frame::ResetFocusList(void)
+{
+ Tizen::Ui::Controls::_Form* pCurrentForm = GetCurrentForm();
+ if (pCurrentForm)
+ {
+ pCurrentForm->ResetFocusList();
+ }
+}
+
+_Control*
+_Frame::GetFocusControl(const _Control* pControl) const
+{
+ const _Form* pForm = null;
+ _Frame* pFrame = null;
+ const _Control* pTempControl = pControl;
+ while(pTempControl)
+ {
+ pForm = dynamic_cast<_Form*>(const_cast<_Control*>(pTempControl));
+
+ if (pForm)
+ {
+ pFrame = dynamic_cast<_Frame*>(pForm->GetParent());
+ if (pFrame)
+ {
+ break;
+ }
+ else
+ {
+ pTempControl = pTempControl->GetParent();
+ }
+ }
+ else
+ {
+ pTempControl = pTempControl->GetParent();
+ }
+ }
+ if (pForm)
+ {
+ return pForm->GetFocusControl();
+ }
+ return null;
+}
+
+_Control*
+_Frame::GetCurrentFocusControl(void) const
+{
+ _Form* pForm = GetCurrentForm();
+ if (pForm)
+ {
+ return pForm->GetFocusControl();
+ }
+ return null;
+}
+void
+_Frame::SetFocusControl(const _Control* pControl , bool on)
+{
+ SysTryReturnVoidResult(NID_UI, pControl, E_SYSTEM, "[E_SYSTEM] The pControl cannot be NULL.");
+ _ControlManager* pControlMgr = _ControlManager::GetInstance();
+ SysAssert(pControlMgr);
+ _Form* pForm = null;
+ _Form* pCurrentForm = GetCurrentForm();
+ _Frame* pFrame = null;
+ const _Control* pTempControl = pControl;
+ bool isCurrentForm = false;
+
+ while(pTempControl)
+ {
+ pForm = dynamic_cast<_Form*>(const_cast<_Control*>(pTempControl));
+
+ if (pForm)
+ {
+ pFrame = dynamic_cast<_Frame*>(pForm->GetParent());
+ if (pFrame)
+ {
+ break;
+ }
+ else
+ {
+ pTempControl = pTempControl->GetParent();
+ }
+ }
+ else
+ {
+ pTempControl = pTempControl->GetParent();
+ }
+ }
+
+ if (pForm == pCurrentForm)
+ {
+ isCurrentForm = true;
+ }
+
+ if (pForm)
+ {
+ if (on)
+ {
+ pForm->SetFocusControl(pControl);
+ if (isCurrentForm && pFrame && pFrame->IsActivated())
+ {
+ pControlMgr->SetFocusControl(*pControl);
+ }
+ }
+ else
+ {
+ pControlMgr->SetFocusControl(*this, false);
+ pForm->SetFocused();
+ }
+ }
+}
+
+void
+_Frame::SetChangingBoundsEnabled(bool enable)
+{
+ __changingBoundsEnabled = enable;
+}
+
+void
+_Frame::SetPartialScreenEnabled(bool enable)
+{
+#if defined(PARTIAL_SCREEN)
+ _RootVisualElement* pRootVE = GetRootVisualElement();
+ if (pRootVE)
+ {
+ _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer());
+ if (pLayer)
+ {
+ pLayer->SetConfigured(true);
+ SysLog(NID_UI_CTRL, "[WM ROTATION]<P>[WIN 0x%x] enable = %d", GetNativeHandle(), enable);
+ }
+ }
+#endif
+
+ if (enable == true)
+ {
+ __showMode = FRAME_SHOW_MODE_PARTIAL_SCREEN;
+ }
+ else
+ {
+ SetShowMode(FRAME_SHOW_MODE_FULL_SCREEN);
+ }
+}
+
+Tizen::Base::Collection::IListT<_Control*>*
+_Frame::GetFocusList(void) const
+{
+ _Form* pForm = GetCurrentForm();
+ if (pForm)
+ {
+ return pForm->GetFocusList();
+ }
+ return null;
+}
+
+_Control*
+_Frame::GetFocusTraversalControl(_Control* pControl) const
+{
+ _Form* pForm = null;
+ _Control* pTempControl = pControl;
+ _Frame* pFrame = null;
+ while(pTempControl)
+ {
+ pForm = dynamic_cast<_Form*>(const_cast<_Control*>(pTempControl));
+
+ if (pForm)
+ {
+ pFrame = dynamic_cast<_Frame*>(pForm->GetParent());
+ if (pFrame)
+ {
+ break;
+ }
+ else
+ {
+ pTempControl = pTempControl->GetParent();
+ }
+ }
+ else
+ {
+ pTempControl = pTempControl->GetParent();
+ }
+ }
+
+ if (pForm)
+ {
+ return pForm->GetFocusTraversalControl();
+ }
+ return null;
+}
+
+void
+_Frame::SetFocusTraversalControl(_Control* pControl, bool on)
+{
+ _Form* pForm = null;
+ _Control* pTempControl = pControl;
+ _Frame* pFrame = null;
+ while(pTempControl)
+ {
+ pForm = dynamic_cast<_Form*>(const_cast<_Control*>(pTempControl));
+
+ if (pForm)
+ {
+ pFrame = dynamic_cast<_Frame*>(pForm->GetParent());
+ if (pFrame)
+ {
+ break;
+ }
+ else
+ {
+ pTempControl = pTempControl->GetParent();
+ }
+ }
+ else
+ {
+ pTempControl = pTempControl->GetParent();
+ }
+ }
+
+ if (pForm)
+ {
+ if (on)
+ {
+ pForm->SetFocusTraversalControl(pControl);
+ }
+ else
+ {
+ pForm->SetFocusTraversalControl(pForm);
+ }
+ }
+}
+
+bool
+_Frame::IsChildAttachable(_Control& child) const
+{
+ return (dynamic_cast<_Form*>(&child) != null);
+}
+
+}}} // Tizen::Ui::Controls
const char* _UiEffectError::NO_EFFECT_FILE = "Specified Effect file doesn't exist: %s";
const char* _UiEffectError::EFFECT_FILE_ERROR = "Error in Effect File \"%s\" in Line %i: %s";
const char* _UiEffectError::FEED_TOUCH_IS_BLOCKED = "For effect [%i, %s] TOUCH_EVENTs are blocked";
-const char* _UiEffectError::OUT_OF_MEMORY = "Memory is insufficient";
+const char* _UiEffectError::OUT_OF_MEMORY = "[E_OUT_OF_MEMORY] Memory allocation failed";
const char* _UiEffectError::NO_EFFECT = "Effect with specified name [%s] doesn't exist";
const char* _UiEffectError::LISTENER_IS_NOT_ASSIGNED = "For Effect with name [%s] EventListener is not assigned";
const char* _UiEffectError::PROVIDER_IS_NOT_ASSIGNED = "For Effect with name [%s] ResourceProvider is not assigned";
_EffectImpl::InitializeEffect(void)
{
Tizen::App::App* pApp = Tizen::App::App::GetInstance();
- SysTryReturnVoidResult(NID_UI_EFFECT, pApp != null, E_FILE_NOT_FOUND, "Effects. The pointer to application instance equals null");
+ SysTryReturnVoidResult(NID_UI_EFFECT, pApp != null, E_FILE_NOT_FOUND, "[E_FILE_NOT_FOUND] The pointer to application instance equals null");
std::wstring tempWStr = std::wstring((pApp->GetAppRootPath()).GetPointer());
tempWStr += L"data/";
std::string dataDirStr(tempWStr.begin(), tempWStr.end());
SysAssertf(resultInsert.second == true, _UiEffectError::INTERNAL_ERROR);
bool isLuaError = (__pModel->GetState() != _EFFECT_STATE_RUNNABLE);
- SysTryReturnVoidResult(NID_UI_EFFECT, !isLuaError, E_PARSING_FAILED, _UiEffectError::LUA_RUNTIME_ERROR);
+ SysTryReturnVoidResult(NID_UI_EFFECT, !isLuaError, E_PARSING_FAILED,"[E_PARSING_FAILED] %s", _UiEffectError::LUA_RUNTIME_ERROR);
}
}}} // Tizen::Ui::Effects
id, iterationCount, modelSpeed, environmentResistance, __currentGravityForce, __currentGravityForceValue, groundLevel);
SysTryCatchLabel(NID_UI_EFFECT, newModelSurface != null, result = false, CATCH1, E_OUT_OF_MEMORY,
- "Effects. [E_OUT_OF_MEMORY] NOT CREATED: ModelSurface\n"
+ "Effects. [E_OUT_OF_MEMORY] Memory allocation is failed. NOT CREATED: ModelSurface\n"
"Effects. Building a model failed: an object of ModelSurface hasn't been created");
__currentGravityForce = Vec3f(0, 0, 0);
void
EffectRenderer::DeleteSurface(EGLSurface surface)
{
- SysTryReturnVoidResult(NID_UI_EFFECT, surface != EGL_NO_SURFACE, E_OPERATION_FAILED, "DeleteSurface EGL_NO_SURFACE");
+ SysTryReturnVoidResult(NID_UI_EFFECT, surface != EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] DeleteSurface EGL_NO_SURFACE");
eglDestroySurface(__eglDisplay, surface);
static int SetMetatable(lua_State* tolua_S, const char* type, const char* operation, lua_CFunction func)
{
char ctype[128] = "const ";
- strcat(ctype,type);
+ strncat(ctype, type, sizeof(ctype)-1);
const char* types[2] = {type, ctype};
for (short i = 0; i < 2; ++i)
#include "FUiAnim_NativeLayer.h"
//#define USE_WORKAROUND
+//#define XWINDOW_DEBUG
namespace Tizen { namespace Ui { namespace Animations
{
virtual result OnConstructed(void);
virtual result SetBounds(const Tizen::Graphics::FloatRectangle& bounds);
+ virtual result SetPosition(const Tizen::Graphics::FloatPoint& point);
+ virtual result SetSize(const Tizen::Graphics::FloatDimension& size);
+ void HasUpdatedWindowSize(const Tizen::Graphics::FloatDimension&);
virtual Tizen::Graphics::FloatRectangle GetBounds(void) const;
virtual result SetShowState(bool show);
virtual bool GetShowState(void) const;
void SetOpacity(float opacity);
float GetOpacity(void);
- result SetOrientationChanged(void);
- result SetInternalBounds(void);
+ result SetOrientationChanged(int orientation);
void SetOwner(_EflLayer* pOwner);
- int GetRotation(void);
-
_RootVisualElement* GetRootVisualElement(void) const
{
return _pRootVisualElement;
_isMapped = map;
}
+ bool IsMapped(void)
+ {
+ return _isMapped;
+ }
+
+ void SetConfigured(bool configure)
+ {
+ _isConfigured = configure;
+ }
+
+ bool IsConfigured(void)
+ {
+ return _isConfigured;
+ }
+
protected:
result Initialize(Evas_Object* pWindow);
virtual result Configure(_RootVisualElement& rootElement);
bool _isMainType;
bool _needRender;
bool _isMapped;
+ bool _isConfigured;
bool _needForceManualRender;
static int _countOfLayer;
Ecore_Event_Handler* _pOnWindowDamagedHandler;
bool __isWinObject;
Tizen::Graphics::FloatRectangle __bounds;
_EflLayerConfiguration* _pConfiguration;
+ int __orientation;
};
}}} //namespace Tizen { namespace Ui { namespace Animations
virtual result SetBounds(const Tizen::Graphics::FloatRectangle& bounds) = 0;
/**
+ * Sets the position of this instance.
+ *
+ * @since 2.0
+ *
+ * @return An error code
+ */
+ virtual result SetPosition(const Tizen::Graphics::FloatPoint& point) = 0;
+
+ /**
+ * Sets the size of this instance.
+ *
+ * @since 2.0
+ *
+ * @return An error code
+ */
+ virtual result SetSize(const Tizen::Graphics::FloatDimension& size) = 0;
+
+ /**
* Gets the position and the size of this instance.
*
* @since 2.0
*/
virtual bool OnPrepareDraw(void);
+ result SetPosition(const Tizen::Graphics::FloatPoint& point);
+ result SetSize(const Tizen::Graphics::FloatDimension& size);
+
result SetClipToParent(bool clipToParent);
result SetBackBufferEnabled(bool enable);
result SetSurfaceOpaque(bool isSurfaceOpaque);
_VisualElementCoordinateSystem::MakeIntegralDimension(width, height);
}
- result SetBoundsI(const Tizen::Graphics::FloatRectangle& bounds);
+ result SetBoundsI(const Tizen::Graphics::FloatRectangle& bounds, bool& sizeChanged);
result SetZPositionI(float zPosition);
result SetShowOpacityI(float showOpacity);
result SetShowStateI(bool show);
result Stop(void);
result Pause(void);
AnimationStatus GetStatus(void) const;
+ bool IsInternalAnimation();
virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
virtual void OnDraw(void);
virtual void OnBoundsChanged(void);
virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds);
- static _Animation* CreateAnimationN(void);
+ static _Animation* CreateAnimationN(bool isFramework = false);
+ bool IsAttachedToMainTree(void);
private:
_Animation(const _Animation& rhs);
_Animation& operator =(const _Animation& rhs);
private:
+ static bool __isInternalAnimation;
_AnimationPresenter* __pAnimationPresenter;
Tizen::Ui::Control* __pControlAnimation;
_AnimationEvent* __pAnimationEvent;
Tizen::Base::Collection::IList* __pAnimationFrames;
Tizen::Ui::_AccessibilityElement* __pAccessibilityElement;
+ bool __isAttachedToMainTree;
}; // _Animation
bool __isTimerRunning;
Tizen::Ui::Animations::_VisualElement* __pVisualElement;
bool __lazyDecode;
+ bool __isPlayCalledBeforeAttach;
}; // _AnimationPresenter
result SetTabTextSlide(bool tabTextSlide);
bool IsTabTextSlide(void) const;
+ bool IsButtonStatusSelected(void) const;
protected:
result SetPresenter(const _ButtonPresenter& buttonPresenter);
{
static const int BUTTON_ITEM_ACTION_ID_MIN = 0;
-static const int BUTTON_ITEM_ACTION_ID_MAX = INT_MAX;
static const int BUTTON_ITEM_MAX_STATE_COUNT = 4;
class _ButtonItemImpl
bool __touchMoveHandled;
bool __lazyDecode;
bool __showUnderlineBitmap;
+ bool __isKeyPressed;
Tizen::Graphics::Font* __pFont;
Tizen::Graphics::_Text::TextObject* __pTextObject;
virtual bool OnFocusLost(const _Control& source);
public:
- result LoadDefaultBackgroundBitmap(void);
-
result SetSelected(bool select);
bool IsSelected(void) const;
GroupStyle GetGroupStyle(void) const;
_CheckButtonStatus GetCheckButtonStatus(void) const;
+ result LoadDefaultBitmap(void);
+
Tizen::Graphics::Bitmap* GetMarkBgBitmap(_CheckButtonStatus checkButtonStatus) const;
Tizen::Graphics::Bitmap* GetMarkBitmap(_CheckButtonStatus checkButtonStatus) const;
Tizen::Graphics::Color __highlightedColor;
Tizen::Graphics::Color __selectedColor;
- Tizen::Graphics::Bitmap* __pMarkBgNormalBitmap[NUMBER_OF_CHECK_BUTTON_STATUS];
+ Tizen::Graphics::Bitmap* __pMarkBgBitmap[NUMBER_OF_CHECK_BUTTON_STATUS];
Tizen::Graphics::Bitmap* __pMarkBitmap[NUMBER_OF_CHECK_BUTTON_STATUS];
- Tizen::Graphics::Bitmap* __pOnOffBgNormalBitmap[NUMBER_OF_CHECK_BUTTON_STATUS];
+ Tizen::Graphics::Bitmap* __pOnOffBgBitmap[NUMBER_OF_CHECK_BUTTON_STATUS];
Tizen::Graphics::Bitmap* __pOnOffBitmap[NUMBER_OF_CHECK_BUTTON_STATUS];
Tizen::Graphics::Bitmap* __pOnOffSlidingBgBitmap[NUMBER_OF_CHECK_BUTTON_STATUS];
_ColorPickerComponentType GetTouchActionType(const Tizen::Graphics::FloatPoint& position) const;
- result DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap);
+ result DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap, bool isCustomBitmap = false, bool isHandlerBitmap = false);
_ColorPickerPresenter(_ColorPicker& colorPicker);
const int CONTEXT_MENU_ITEM_STATUS_COUNT = 3;
const int MAX_CONTEXTMENU_LIST_SHOW_ITEM = 4;
-const int MAX_CONTEXTMENU_ICON_SHOW_ITEM = 5;
enum ContextMenuCoreStyle
{
Tizen::Ui::Controls::_ActionEvent* GetActionEvent(void) const;
const Tizen::Graphics::Bitmap* GetArrowNormalBitmap(ContextMenuCoreDropPosition dropPosition) const;
const Tizen::Graphics::Bitmap* GetArrowEffectBitmap(ContextMenuCoreDropPosition dropPosition) const;
+ Tizen::Graphics::Bitmap* GetPressedBitmap(void);
const Tizen::Graphics::Bitmap* GetBackgroundNormalBitmap(void) const;
const Tizen::Graphics::Bitmap* GetBackgroundEffectBitmap(void) const;
ContextMenuCoreDropPosition GetDropPosition(void) const;
virtual void OnFrameMinimized(const Tizen::Ui::Controls::_Frame& source);
virtual void OnFrameRestored(const Tizen::Ui::Controls::_Frame& source);
virtual void OnDraw(void);
+ virtual bool OnFocusGained(const _Control& source);
+ virtual bool OnFocusLost(const _Control& source);
virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(const int mainIndex) const;
void AddAccessibilityElement(const _AccessibilityElement& element);
+ void SetAllAccessibilityElement(void);
_ContextMenuItemInfo GetItemFromPosition(const Tizen::Graphics::FloatPoint& position) const;
_ContextMenuItemInfo FindItem(int index) const;
result LoadBitmap(void);
result LoadColorReplacedBitmap(const Tizen::Graphics::Color& color);
void AdjustDropPosition(void);
- void SetAllAccessibilityElement(void);
void RemoveAllAccessibilityElement(void);
private:
Tizen::Graphics::Bitmap* __pArrowEffectBitmap[CONTEXT_MENU_CORE_DROP_POSITION_MAX];
Tizen::Graphics::Bitmap* __pBackgroundNormalBitmap;
Tizen::Graphics::Bitmap* __pBackgroundEffectBitmap;
+ Tizen::Graphics::Bitmap* __pPressedBitmap;
enum ContextMenuCoreDropPosition __dropPosition;
Tizen::Ui::Controls::_Frame* __pCurrentFrame;
enum _ControlOrientation __layout;
virtual result Draw(void);
virtual result DrawBackground(Tizen::Graphics::Canvas* pCanvas);
virtual result DrawArrow(Tizen::Graphics::Canvas* pCanvas);
- virtual result AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
- virtual result InsertItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
- virtual result SetItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
+ virtual result AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
+ virtual result InsertItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
+ virtual result SetItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
virtual result DeleteItem(int index);
virtual result DeleteItemAll(void);
virtual int CalculateShowItemCount(void);
virtual bool IsChildControlFocusManage(void) const;
virtual void OnDrawFocus(void);
virtual void OnFocusModeStateChanged(void);
+ virtual bool OnFocusGained(const _Control& source);
+ virtual bool OnFocusLost(const _Control& source);
virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
virtual void OnFontInfoRequested(unsigned long& style, float& size);
virtual _ContextMenuItemInfo GetItemFromPosition(const Tizen::Graphics::FloatPoint& position);
virtual _ContextMenuItemInfo FindItem(int index);
virtual result SetTopDrawnItemIndex(int index);
- virtual result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap);
+ virtual result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap, bool isAppBitmap = false);
private:
void LoadShape(void);
Tizen::Graphics::FloatDimension AdjustItemLayoutTabStyle(void);
bool IsLayoutBitmapOnly(void);
- _ContextMenuItem* CreateItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
+ _ContextMenuItem* CreateItemN(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
result DrawItem(Tizen::Graphics::Canvas* pCanvas);
result DrawLine(Tizen::Graphics::Canvas* pCanvas, Tizen::Graphics::FloatPoint point1, Tizen::Graphics::FloatPoint point2, bool drawVLine);
void SetItemSize(_ContextMenuItem* pItem);
bool __enterKeyPressed;
bool __backKeyPressed;
int __focusedIndex;
+ bool __focusLost;
}; // _ContextMenuGridPresenter
}}} // Tizen::Ui: Control
void SetPressedDrawRect(Tizen::Graphics::FloatRectangle rect);
Tizen::Graphics::FloatRectangle GetPressedDrawRect(void) const;
+ void SetPressedItemColor(Tizen::Graphics::Color color);
+
void SetParentScrollEnable(bool enable);
bool GetParentScrollEnable() const;
int Release(void);
void SetAndInvalidate(bool flag);
- const Tizen::Graphics::Bitmap* GetMagentaBgBitmap(void) const;
virtual void OnBoundsChanged(void);
// draw
float __textSize;
Tizen::Base::String __text;
Tizen::Graphics::Bitmap* __pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_MAX];
- Tizen::Graphics::Bitmap* __pMagentaBgBitmap;
+ Tizen::Graphics::Bitmap* __pNormalBgBitmap;
+ Tizen::Graphics::Bitmap* __pSelectedBgBitmap;
Tizen::Graphics::FloatDimension __size;
Tizen::Graphics::FloatRectangle __drawRect;
Tizen::Graphics::FloatRectangle __pressedDrawRect;
virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo);
virtual bool IsChildControlFocusManage(void) const;
- virtual void OnFocusModeStateChanged(void);
+ virtual void ResetFocus(void);
+ virtual bool OnFocusGained(const _Control& source);
+ virtual bool OnFocusLost(const _Control& source);
virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
virtual void OnFontInfoRequested(unsigned long& style, float& size);
virtual _ContextMenuItemInfo GetItemFromPosition(const Tizen::Graphics::FloatPoint& position);
virtual _ContextMenuItemInfo FindItem(int index);
virtual result SetTopDrawnItemIndex(int index);
- virtual result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap);
+ virtual result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap, bool isAppBitmap = false);
private:
void LoadShape(void);
void AdjustItemPosition(void);
Tizen::Graphics::FloatDimension AdjustItemLayoutStyle(void);
- _ContextMenuItem* CreateItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
+ _ContextMenuItem* CreateItemN(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const;
void CalculateItemMaximumWidth(void);
bool __enterKeyPressed;
bool __backKeyPressed;
int __focusedIndex;
+ bool __focusLost;
}; // _ContextMenuListPresenter
}}} // Tizen::Ui: Control
virtual void OnVisualElementAnimationRepeated (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, long currentRepeatCount){}
virtual void OnVisualElementAnimationStarted (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target){}
+ void ChangeLayout(void);
+ void ClearPreviousText(void);
+
private:
_DateTimeBar(void);
virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+ void ChangeLayout(void);
+ void ClearPreviousText(void);
+
private:
result AddItem(int actionId);
result InsertItems(int actionId);
_FlickAnimation __flickAnimation;
Tizen::Base::String __selectedText;
Tizen::Base::String __focusedText;
+ Tizen::Base::String __prevFocusedText;
+ Tizen::Base::String __prevSelectedText;
static const int FLICK_ANIMATION_TIMER_PERIOD = 10;
static const int FLICK_ANIMATION_FPS_DATE_TIME_BAR = 30;
int __focusedValue;
static const int UPDATE_ITEM_COUNT = 6;
bool __isFlickCanceled;
+ bool __isChangeLayout;
}; // _DateTimeBarPresenter
#include "FUi_TouchLongPressGestureDetector.h"
#include "FUi_TouchTapGestureDetector.h"
#include "FUiCtrl_ExpandableEditAreaEvent.h"
+#include "FUiCtrl_Frame.h"
#include "FUiCtrl_IActionEventListener.h"
#include "FUiCtrl_IExpandableEditAreaEventListener.h"
+#include "FUiCtrl_IFormActivationChangeEventListener.h"
#include "FUiCtrl_IKeypadEventListener.h"
#include "FUiCtrl_ITextBlockEventListener.h"
#include "FUiCtrl_ITextEventListener.h"
#include "FUiCtrl_ILanguageEventListener.h"
+#include "FUiCtrl_IScrollEventListener.h"
#include "FUiCtrl_IScrollPanelEventListener.h"
#include "FUiCtrl_IUiLinkEventListener.h"
#include "FUiCtrl_KeypadEvent.h"
namespace Tizen { namespace Ui
{
class _AccessibilityElement;
+class _DragAndDropItem;
+
}} // Tizen::Ui
namespace Tizen { namespace Ui { namespace Animations
const int EDIT_STYLE_SINGLE_LINE = 0x00000001;
const int EDIT_STYLE_NORMAL = 0x00000002;
-const int EDIT_STYLE_BORDER = 0x00000004;
const int EDIT_STYLE_TITLE_LEFT = 0x00000010;
const int EDIT_STYLE_TITLE_TOP = 0x00000020;
const int EDIT_STYLE_PASSWORD = 0x00000100;
const int EDIT_STYLE_VIEWER = 0x00000200;
const int EDIT_STYLE_NOSCROLL = 0x00000400;
const int EDIT_STYLE_CLEAR = 0x00001000;
-const int EDIT_STYLE_ICON_EMBEDDED = 0x00010000;
-const int EDIT_STYLE_DASHBOARD_EMBEDDED = 0x00100000;
const int EDIT_STYLE_FLEXIBLE = 0x01000000;
const int EDIT_STYLE_TOKEN = 0x02000000;
const int EDIT_COLOR_OPACITY = 100;
const int EDIT_FIELD_DEFAULT_LIMIT_LENGTH = 100;
const int EDIT_COLOR_MAX = 4;
-const int EDIT_TEXT_COLOR_MAX = 4;
-const int EDIT_MARGIN_COUNT_MAX = 2;
const float DEFAULT_LINE_SPACE = 1.0f;
/**
, public _ITouchLongPressGestureEventListener
, public _ITouchTapGestureEventListener
, public IClipboardPopupEventListener
+ , public _IFormActivationChangeEventListener
, public _IEditTextFilter
+ , public _IScrollEventListener
, virtual public Tizen::System::ISettingEventListener
{
public:
Tizen::Graphics::Bitmap* GetBackgroundBitmap(EditStatus status) const;
result LoadDefaultBackgroundBitmap(GroupStyle groupStyle);
result ReplaceDefaultBackgroundBitmapForSearchBar(void);
- void SetSearchFieldFocus(bool state);
- bool IsSearchFieldFocused(void) const;
Tizen::Graphics::Bitmap* GetDefaultBackgroundBitmap(EditStatus status) const;
bool IsCustomDefaultBackgroundBitmap(EditStatus status) const;
Tizen::Graphics::Bitmap* GetDefaultBackgroundEffectBitmap(void) const;
- Tizen::Graphics::Bitmap* GetDefaultFocusBitmap(void) const;
void GetBlockRange(int& start, int& end) const;
Tizen::Graphics::Color GetBlockTextColor(void) const;
Tizen::Graphics::Color GetColor(EditStatus status) const;
bool IsTextEventEnabled(void) const;
virtual void SetAutoShrinkModeEnabled(bool enable);
virtual bool IsAutoShrinkModeEnabled(void) const;
+ bool IsTouchMoving(void) const;
result PasteText(void);
result ReleaseTextBlock(void);
result AttachScrollPanelEvent(void);
result DetachScrollPanelEvent(void);
+ result AddClipboardShowTriggerEventListener(void);
+ result RemoveClipboardShowTriggerEventListener(void);
+
result SendExpandableEditAreaEvent(_ExpandableEditAreaEventStatus status, int newLineCount = 0);
result SendKeypadEvent(CoreKeypadAction keypadAction, CoreKeypadEventStatus eventstatus);
result SendLanguageEvent(Tizen::Locales::LanguageCode prevLanguageCode, Tizen::Locales::LanguageCode currentLanguageCode);
virtual void OnAncestorEnableStateChanged(const _Control& control);
virtual void OnAncestorVisibleStateChanged(const _Control& control);
virtual void OnSettingChanged(Tizen::Base::String& key);
-
virtual void OnDrawFocus(void);
+ virtual _Window* OnDragAndDropBeginning(void);
+ virtual void OnDragAndDropDropping(void);
+
+ virtual void OnDragAndDropEntered(void);
+ virtual void OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position);
+ virtual void OnDragAndDropLeft(void);
+ virtual void OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem);
+
+ virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type) {};
+ virtual void OnScrollStopped(Tizen::Ui::_Control& source);
+ virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition);
+
+ virtual void OnFormActivated(const Tizen::Ui::Controls::_Form& source);
+ virtual void OnFormDeactivated(const Tizen::Ui::Controls::_Form& source);
+ virtual void OnFormActivating(const Tizen::Ui::Controls::_Form& source);
+ virtual void OnFormDeactivating(const Tizen::Ui::Controls::_Form& source);
+
_EditPresenter* GetPresenter(void) const;
Tizen::Graphics::FloatDimension GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const;
bool IsInternalFocused(void) const;
//Default Bitmap
Tizen::Graphics::Bitmap* __pDefaultBackgroundBitmap[EDIT_COLOR_MAX];
Tizen::Graphics::Bitmap* __pDefaultBackgroundEffectBitmap;
- Tizen::Graphics::Bitmap* __pDefaultFocusBitmap;
Tizen::Ui::_TouchFlickGestureDetector* __pGestureFlick;
Tizen::Ui::_TouchLongPressGestureDetector* __pGestureLongPress;
bool __isAccessibilityCreated;
bool __isFullScreenKeypadEdit;
bool __internalFocus;
+ _Frame* __pCurrentFrame;
bool __isDestroyed;
IEditTextFilter* __pTextFilter;
Tizen::Graphics::FloatRectangle __previousBounds;
bool __isTouchMoving;
- bool __isSearchFieldFocused;
bool __isTextEventEnabled;
}; // _Edit
public:
void CreateCopyPastePopup(void);
void CreateHandle(void);
+ void CreateHandle(int start, int end, int startRowIndex, int startColumnIndex, int endRowIndex, int endColumnIndex);
void Show(void);
bool CheckHandleBounds(const Tizen::Graphics::FloatPoint& point);
- bool CheckHandlePosition(bool leftHandle, int cursorPosition);
void RefreshBlock(bool isLeftHandle = false);
Tizen::Graphics::FloatRectangle GetCursorBoundsF(bool isAbsRect) const;
int GetCursorPositionAt(const Tizen::Graphics::FloatPoint& touchPoint) const;
int GetCursorPosition(void) const;
int GetHandlerCursorPosition(HandlerType handlerType) const;
void SendTextBlockEvent(void);
- void Release(void);
+ void ReleaseHandle(void);
void ReleaseCopyPastePopup(void);
bool IsCopyPastePopup(const _Control& control) const;
bool IsCopyPasteHandle(const _Control& control) const;
Tizen::Graphics::FloatRectangle GetEditVisibleAreaF(void) const;
_ContextMenu* GetCopyPastePopup(void) const;
void GetHandlerRowColumnIndex(bool singleHandler, bool leftHandler, int& rowIndex, int& columnIndex) const;
+ void DestroyCopyPasteMagnifier(void);
+ void CreateCopyPasteMagnifier(void);
private:
_EditCopyPasteManager(const _EditCopyPasteManager& value);
_EditCopyPasteManager& operator =(const _EditCopyPasteManager& value);
bool __needToReleaseBlock;
bool __isHandlerMoving;
Tizen::Graphics::FloatRectangle __editVisibleArea;
- _Window* __pParentWindow;
- bool __parentWindowClipFlagChanged;
}; // _EditCopyPasteManager
}}} // Tizen::Ui::Controls
#define _FUI_CTRL_INTERNAL_EDITDATE_H_
#include <FSysISettingEventListener.h>
+#include <FUiAnimIAnimationTransactionEventListener.h>
#include "FUi_Control.h"
#include "FUi_UiTouchEvent.h"
#include "FUiCtrl_IDateTimeChangeEventListener.h"
#include "FUiCtrl_DateTimeChangeEvent.h"
#include "FUiCtrl_IActionEventListener.h"
#include "FUiCtrl_DateTimeBar.h"
+#include "FUiCtrl_ScrollPanel.h"
+#include "FUiCtrl_ScrollPanelEvent.h"
namespace Tizen { namespace Ui
{
: public _Control
, public _IDateTimeChangeEventListener
, public _IActionEventListener
+ , public Tizen::Ui::Animations::IAnimationTransactionEventListener
, virtual public Tizen::Base::Runtime::IEventListener
, virtual public _IUiEventListener
, virtual public _IUiEventPreviewer
+ , public _IScrollEventListener
, virtual public Tizen::System::ISettingEventListener
{
DECLARE_CLASS_BEGIN(_EditDate, _Control);
void OnAncestorEnableStateChanged(const _Control& control);
void OnAncestorVisibleStateChanged(const _Control& control);
+ // Tizen::Ui::Animations::IAnimationTransactionEventListener
+ virtual void OnAnimationTransactionStarted(int transactionId);
+ virtual void OnAnimationTransactionStopped(int transactionId);
+ virtual void OnAnimationTransactionFinished(int transactionId);
+
+ void InitializeParentPanel(void);
+
+ //_ScrollEventListener
+ virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type) {};
+ virtual void OnScrollStopped(Tizen::Ui::_Control& source);
+ virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition);
+
private:
_EditDate(void);
bool __isCalledBoundsChanged;
bool __isXmlBoundsExist;
static const float _TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.08f;
+ _ScrollPanel* __pParentPanel;
+ bool __isEnterKeyPressed;
}; // _EditDate
}}} // Tizen::Ui::Controls
#include <FGrp_TextTextObject.h>
#include "FUi_Control.h"
#include "FUiCtrl_DateTimeDefine.h"
-#include "FUiAnimIVisualElementAnimationStatusEventListener.h"
namespace Tizen { namespace Ui { namespace Controls
{
class _EditDatePresenter
: public Tizen::Base::Object
- , Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener
{
public:
_EditDatePresenter(void);
virtual bool OnFocusLost(const _Control& source);
void OnFocusModeStateChanged(void);
virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
- virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo);
-
- virtual void OnVisualElementAnimationFinished (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, bool completedNormally);
- virtual void OnVisualElementAnimationRepeated (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, long currentRepeatCount){}
- virtual void OnVisualElementAnimationStarted (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target){}
+ virtual bool OnKeyReleased(const _Control& source, const _KeyCode& keyCode);
+ void EndTransaction(void);
private:
_EditDatePresenter(const _EditDatePresenter&);
_EditDatePresenter& operator =(const _EditDatePresenter&);
result DrawTitle(Tizen::Graphics::Canvas& canvas);
result DrawText(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Base::String& text, _DateTimeId boxId = DATETIME_ID_NONE);
result DrawContentBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, _DateTimeId displayBoxId);
- result DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap);
+ result DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap, bool isCustomBitmap = false);
_DateTimeId GetBoxIdFromPosition(const Tizen::Graphics::FloatPoint& point) const;
private:
static const int __dividerCount = 2;
bool __isEnterKeyPressed;
bool __isFocused;
+ int __transactionId;
}; // _EditDatePresenter
}}} // Tizen::Ui::Controls
{
const int EDIT_SCROLLFRAME_MAX = 5;
const int EDIT_PASSWORD_BUFFER_MAX = 1024;
-const int SCROLL_STYLE_VERTICAL = 2;
-const int ANIMATION_DURATION = 333;
enum _EditFooterVisibleStatus
{
class _Scroll;
class _ScrollPanel;
-class _EditAnimationProvider
- : public Tizen::Ui::Animations::VisualElementAnimationProvider
-{
-public:
- _EditAnimationProvider(void);
-
- virtual ~_EditAnimationProvider(void);
-
- virtual Tizen::Ui::Animations::VisualElementAnimation* CreateAnimationForProperty(Tizen::Ui::Animations::VisualElement& source, const Tizen::Base::String& property);
-}; // _EditAnimationProvider
-
class _EditPresenter
: public Tizen::Base::Object
virtual void OnClipboardPopupClosed(const ClipboardItem* pClipboardItem);
virtual result SetInitialBounds(void);
- virtual result Draw(Tizen::Graphics::Canvas& canvas);
+ virtual result Draw(void);
virtual result DrawCursor(Tizen::Graphics::Canvas& canvas, Tizen::Graphics::FloatRectangle& cursorRect, bool isCursorOpaque);
virtual result DrawScrollBar(void);
virtual void ChangeToUnbindState(bool removeFocus);
result AppendCharacter(const Tizen::Base::Character& character);
result AppendText(const Tizen::Base::String& text);
result BeginTextBlock(void);
- result CalculateAbsoluteCursorBounds(int index, Tizen::Graphics::FloatRectangle& absCursorBounds);
- result CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, FloatRectangle& absCursorBounds);
+ result CalculateAbsoluteCursorBounds(int index, Tizen::Graphics::FloatRectangle& absCursorBounds, bool clipCursorHeight = true);
+ result CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, FloatRectangle& absCursorBounds, bool clipCursorHeight = true);
virtual result ChangeLayout(_ControlOrientation orientation);
virtual result ChangeLayout(_ControlRotation rotation);
result ClearText(void);
Tizen::Graphics::_Text::TextObject* GetTextObject(void) const;
EditStatus GetCurrentStatus(void);
result ScrollContents(float moveY);
+ result ScrollContentsOnKey(const Tizen::Ui::_KeyCode keyCode);
virtual void DrawText(void);
void DrawTextBlockLine(Canvas& canvas);
virtual bool IsGuideTextActivated(void) const;
result SetPasswordVisible(bool visible);
bool IsPasswordVisible(void) const;
bool IsClearIconPressed(void) const;
- result DrawFocusRing(Tizen::Graphics::Canvas& canvas);
+ virtual result DrawFocusRing(Tizen::Graphics::Canvas& canvas);
+ void DrawDragAndDropVisualCue(void);
+ void ResetDragAndDrop(void);
+ bool IsDragAndDropStarted(void) const;
+
+ virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition);
+ virtual void OnScrollStopped(Tizen::Ui::_Control& source);
+
+ virtual _Window* OnDragAndDropBeginning(void);
+ virtual void OnDragAndDropDropping(void);
+
+ virtual void OnDragAndDropEntered(void);
+ virtual void OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position);
+ virtual void OnDragAndDropLeft(void);
+ virtual void OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem);
protected:
void StopTitleSlidingTimer(void);
_Scroll* GetScrollBar(void) const;
_Edit* GetEditView(void) const;
bool AdjustRTLTextAlignment(const _EditTextType textType);
+ void RestoreCopyPasteManager(void);
+ bool IsHorizontalDirection(const _TouchInfo& touchInfo);
private:
virtual void OnEditCopyPasteStatusChanged(CoreCopyPasteStatus status, CoreCopyPasteAction action);
void InitializeParentPanel(void);
result InitializeEditFieldClientRect(void);
result SetInitialEditFieldBounds(void);
+ result AdjustTextBounds(bool clearIconVisible);
virtual result AdjustFlexibleHeight(void);
result SetKeypadCommandButton(const Tizen::Graphics::FloatRectangle& bounds);
result SetTitleTextSlidingAction(Tizen::Graphics::_Text::TextObjectActionType action);
result DrawTextForEntireFontSetting(Tizen::Graphics::Canvas& canvas);
result DrawTitleText(void);
result MoveCursor(const Tizen::Graphics::FloatRectangle& fromRect, const Tizen::Graphics::FloatRectangle& toRect);
- bool IsHorizontalDirection(const _TouchInfo& touchInfo);
result ScrollContentsOnFlick(void);
result ChangePasswordToEchoCharacter(wchar_t* dspStrBuffer, wchar_t echoChar);
// todo : move to PastePasswordEchoCharacter
Tizen::Graphics::Font* __pFont;
Tizen::Ui::Animations::_VisualElement* __pCursorVisualElement;
+ Tizen::Ui::Animations::_VisualElement* __pDragAndDropCueVisualElement;
Tizen::Ui::Animations::_VisualElement* __pTextVisualElement;
Tizen::Ui::Animations::_VisualElement* __pTitleTextVisualElement;
bool __isTouchMoving;
bool __isTouchPressed;
bool __isClearIconPressed;
+ bool __isClearIconVisible;
bool __isCursorOpaque;
bool __isTouchReleaseSkipped;
bool __isViewerModeEnabled;
_EditTextStatus __ContentTextStatus;
- _EditAnimationProvider* __pEditVEDelegator;
-
bool __isAutoShrinkEnabled;
GroupStyle __groupStyle;
bool __isPasswordVisible;
bool __needToCreateCopyPastePopup;
FloatRectangle __calculatedCursorBounds;
-
+ bool __dragAndDropStarted;
+ Tizen::Base::String __dragAndDropString;
+ bool __isTouchLongPressed;
}; // _EditPresenter
}}} // Tizen::Ui::Controls
#define _FUI_CTRL_INTERNAL_EDITTIME_H_
#include <FSysISettingEventListener.h>
+#include <FUiAnimIAnimationTransactionEventListener.h>
#include "FUi_Control.h"
#include "FUi_UiTouchEvent.h"
+#include "FUi_IAccessibilityListener.h"
#include "FUiCtrl_IDateTimeChangeEventListener.h"
#include "FUiCtrl_DateTimeChangeEvent.h"
#include "FUiCtrl_IActionEventListener.h"
-#include "FUi_IAccessibilityListener.h"
#include "FUiCtrl_DateTimeBar.h"
+#include "FUiCtrl_ScrollPanel.h"
+#include "FUiCtrl_ScrollPanelEvent.h"
namespace Tizen { namespace Ui
{
, public _IDateTimeChangeEventListener
, public _IActionEventListener
, public _IAccessibilityListener
+ , public Tizen::Ui::Animations::IAnimationTransactionEventListener
, virtual public Tizen::Base::Runtime::IEventListener
, virtual public _IUiEventListener
, virtual public _IUiEventPreviewer
+ , public _IScrollEventListener
, virtual public Tizen::System::ISettingEventListener
{
virtual bool OnAccessibilityActionPerformed(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
virtual bool OnAccessibilityValueIncreased(const Tizen::Ui::_AccessibilityContainer&, const Tizen::Ui::_AccessibilityElement&);
virtual bool OnAccessibilityValueDecreased(const Tizen::Ui::_AccessibilityContainer&, const Tizen::Ui::_AccessibilityElement&);
+
+ // Tizen::Ui::Animations::IAnimationTransactionEventListener
+ virtual void OnAnimationTransactionStarted(int transactionId);
+ virtual void OnAnimationTransactionStopped(int transactionId);
+ virtual void OnAnimationTransactionFinished(int transactionId);
+
+ void InitializeParentPanel(void);
+
+ //_ScrollEventListener
+ virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type) {};
+ virtual void OnScrollStopped(Tizen::Ui::_Control& source);
+ virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition);
+
private:
_EditTime(void);
bool __isCalledBoundsChanged;
bool __isXmlBoundsExist;
static const float _TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.08f;
+ _ScrollPanel* __pParentPanel;
+ bool __isEnterKeyPressed;
}; // _EditTime
}}} // Tizen::Ui::Controls
#include <FGrp_TextTextObject.h>
#include "FUi_Control.h"
#include "FUiCtrl_DateTimeDefine.h"
-#include "FUiAnimIVisualElementAnimationStatusEventListener.h"
namespace Tizen { namespace Ui { namespace Controls
{
class _EditTimePresenter
: public Tizen::Base::Object
- , Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener
{
public:
_EditTimePresenter(const Tizen::Base::String& title);
bool OnFocusLost(const _Control& source);
void OnFocusModeStateChanged(void);
bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
- bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo);
+ bool OnKeyReleased(const _Control& source, const _KeyCode& keyInfo);
virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
void UpdateTimeFormat(void);
void UpdateLastSelectedValue(_DateTimeId boxId, bool __isTouchPressed);
- virtual void OnVisualElementAnimationFinished (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, bool completedNormally);
- virtual void OnVisualElementAnimationRepeated (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, long currentRepeatCount){}
- virtual void OnVisualElementAnimationStarted (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target){}
result DrawFocus(void);
+ void EndTransaction(void);
+
private:
_EditTimePresenter(const _EditTimePresenter&);
result DrawColon(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds);
_DateTimeId GetBoxIdFromPosition(const Tizen::Graphics::FloatPoint& point) const;
result LoadResource(void);
- result DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap);
+ result DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap, bool isCustomBitmap = false);
float GetTimeElementWidth(void) const;
private:
bool __isEditTimeInitialized;
bool __isEnterKeyPressed;
bool __isFocused;
+ int __transactionId;
}; // _EditTimePresenter
}}} // Tizen::Ui::Controls
Tizen::Graphics::Color __popupBgColor;
Tizen::Graphics::Color __popupTextColor;
- Tizen::Graphics::Dimension __indexSizeMin;
+ Tizen::Graphics::FloatDimension __indexSizeMin;
Tizen::Graphics::FloatDimension __popupSize;
float __indexMarginTop;
const int DEVICE_SIZE_HORIZONTAL = 56; // LCD Width (mm)
const int DEVICE_SIZE_VERTICAL = 93; // LCD Hight (mm)
-const int FLICK_ANIMATION_FPS_LIST = 300; // List FPS
-const int FLICK_ANIMATION_SENSITIVITY_LIST = 150; // List Animation Sensitivity
-const int FLICK_ANIMATION_FPS_ICONLIST = 60; // IconList FPS
-const int FLICK_ANIMATION_SENSITIVITY_ICONLIST = 30;// IconList Animation Sensitivity
const int FLICK_ANIMATION_FPS_PANEL = 30; // Panel FPS
const int FLICK_ANIMATION_SENSITIVITY_PANEL = 30; // Panel Animation Sensitivity
class _PublicActionEvent;
const int FOOTER_MAX_STATE_COUNT = 7;
-const int FOOTER_BUTTON_MAX_STATE_COUNT = 4;
const int FOOTER_MAX_ITEM_COUNT_WITH_BUTTON = 3;
-const int FOOTER_BUTTON_MAX_COUNT = 3;
-const int FOOTER_ITEM_MAX_COUNT = 15;
const int FOOTER_ACTION_ID_MIN = 0;
-const int FOOTER_ACTION_ID_MAX = INT_MAX;
const int FOOTER_NUMBERD_BADGE_ICON_NUMBER_MAX = 99999;
class _FooterImpl
private:
result CheckItemValidate(const FooterItem& item);
+ result CheckItemExceed(const FooterItem& item);
+
_Button* ConvertButtonItem(const ButtonItem& buttonItem);
_Button* ConvertFooterItem(const FooterItem& footerItem);
{
static const int FOOTER_ITEM_ACTION_ID_MIN = 0;
-static const int FOOTER_ITEM_ACTION_ID_MAX = INT_MAX;
static const int FOOTER_ITEM_MAX_STATE_COUNT = 5;
class _FooterItemImpl
void SetIndicatorAutoHide(bool portrait, bool landscape);
result SetIndicatorOpacity(_IndicatorOpacity opacity);
- virtual bool OnMousePressed(const _Control& source, const _MouseInfo& mouseinfo);
- virtual bool OnMouseReleased(const _Control& source, const _MouseInfo& mouseinfo);
-
virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo);
void SetFormOrientationStatusEventListener(Tizen::Ui::Controls::_IFormOrientationStatusEventListener* pFormOrientationstatusEventListener);
Tizen::Ui::OrientationStatus GetFormOrientationStatus(void) const;
+ void ActivateIndicator(void);
+ void DeactivateIndicator(void);
+
//callback
virtual void OnDraw(void);
virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId);
virtual void OnBoundsChanged(void);
virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds);
virtual void OnVisibleStateChanged(void);
- void OnFormActivated(void);
+ virtual void OnFormActivated(void);
+ virtual void OnFormDeactivated(void);
// Focus UI
Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const;
_Control* GetFocusControl(void) const;
void SetFocusControl(const _Control* pControl);
+ void SetPartialScreenEnabled(bool enable);
+
// Accessor
protected:
result SetPresenter(const _FormPresenter& formPresenter);
_IFormMenuEventListener* __pFormMenuEventListener;
unsigned long __formStyle;
+ unsigned long __oldFormStyle;
_ActionEvent* __pActionEvent;
_Toolbar* __pHeader;
}}} // Tizen::Ui::Controls
-#endif // _FUI_CTRL_INTERNAL_FORM_H_
+#endif // _FUI_CTRL_INTERNAL_FORM_H_
\ No newline at end of file
class _IFormActivationChangeEventListener;
class _Form;
+enum _FormStatus
+{
+ _FORM_STATUS_ACTIVATING = 0,
+ _FORM_STATUS_DEACTIVATING,
+ _FORM_STATUS_ACTIVATED,
+ _FORM_STATUS_DEACTIVATED,
+};
+
/**
* @class _Frame
* @brief
// Callbacks
virtual void OnDraw(void);
virtual void OnActivated(void);
+ virtual void OnDeactivated(void);
+ virtual void OnChildAttaching(const Tizen::Ui::_Control& child);
virtual void OnChildAttached(const Tizen::Ui::_Control& child);
virtual void OnChildDetached(const Tizen::Ui::_Control& child);
virtual bool OnNotifiedN(const Tizen::Ui::_Control& source, Tizen::Base::Collection::IList* pArgs);
// Event listeners
void AddFrameEventListener(const Tizen::Ui::Controls::_IFrameEventListener& listener);
void RemoveFrameEventListener(const Tizen::Ui::Controls::_IFrameEventListener& listener);
- void SetFormActivationChangeEventListener(const Tizen::Ui::Controls::_IFormActivationChangeEventListener* plistener);
+ result AddFormActivationChangeEventListener(_IFormActivationChangeEventListener& listener);
+ result RemoveFormActivationChangeEventListener(_IFormActivationChangeEventListener& listener);
// Floating
void SetFloatingBounds(const Tizen::Graphics::Rectangle& rect);
// Internal
void SetChangingBoundsEnabled(bool enable);
+ void SetPartialScreenEnabled(bool enable);
protected:
result SetPresenter(const _FramePresenter& framePresenter);
_Frame(const _Frame&);
_Frame& operator =(const _Frame&);
+ virtual bool IsChildAttachable(_Control& child) const;
+ result FireFormActivationChangeEvent(_Form* pForm, _FormStatus status);
+
// Attribute
private:
_FramePresenter* __pFramePresenter;
bool __constructed;
bool __rotation;
bool __changingBoundsEnabled;
- _IFormActivationChangeEventListener* __pFormActivationChangeEventListener;
+ bool __skipSetBounds;
+ Tizen::Base::Collection::LinkedListT <Tizen::Ui::Controls::_IFormActivationChangeEventListener*>* __pFormActivationChangeEventListeners;
}; // _Frame
}}} // Tizen::Ui::Controls
virtual void OnSettingChanged(Tizen::Base::String& key);
+ virtual bool OnFocusGained(const _Control& source);
+ virtual void OnFocusModeStateChanged(void);
+ virtual bool OnFocusLost(const _Control& source);
+
private:
_Gallery(void);
result Construct(_GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor);
result RefreshList(int groupIndex, int itemIndex, int elementId);
- result UpdateList(void);
+ result UpdateList(bool isRestoreAnnexFocusValue = false);
result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const;
bool __redrawListView;
bool __isOrientationChanged;
+ bool __isUpdateListCalled;
bool __needReloadItems;
class _GroupedListViewPropagatedTouchEventListener;
void SetItemLazyDeletion(_ListViewItem* pItem);
+ _IListItemCommon* GetDefaultItem(void);
+
// Variable
private:
IGroupedListViewItemProvider* __pGroupedListViewProvider;
_ListViewItem* __pItemNeedsLazyDeletion;
_ListViewItem* __pLazyDeletionItem;
bool __usingFloatingPoint;
+
+ _IListItemCommon* __pDefaultItem;
}; // _GroupedListViewItemProviderAdaptor
}}} // Tizen::Ui::Controls
class _PublicActionEvent;
const int HEADER_MAX_ITEM_COUNT_WITH_BUTTON = 3;
-const int HEADER_BUTTON_MAX_COUNT = 2;
const int HEADER_ITEM_MAX_COUNT = 4;
-const int HEADER_MAX_WAITING_ANIMATION_POSITION = 3;
const int HEADER_TITLE_BUTTON_STYLE_MAX_ITEM_COUNT = 1;
const int HEADER_TAB_STYLE_MAX_ITEM_COUNT = 15;
const int HEADER_ACTION_ID_MIN = 0;
-const int HEADER_ACTION_ID_MAX = INT_MAX;
const int HEADER_NUMBERD_BADGE_ICON_NUMBER_MAX = 99999;
-const int HEADER_MORE_BUTTON_ACTION_ID = 500;
class _HeaderImpl
: public _ControlImpl
private:
result CheckItemValidate(const HeaderItem& item);
+ result CheckItemExceed(const HeaderItem& item);
+
ToolbarStyle ConvertHeaderStyle(HeaderStyle style);
_Button* ConvertButtonItem(const ButtonItem& buttonItem);
{
static const int HEADER_ITEM_ACTION_ID_MIN = 0;
-static const int HEADER_ITEM_ACTION_ID_MAX = INT_MAX;
static const int HEADER_ITEM_MAX_STATE_COUNT = 5;
class _HeaderItemImpl
virtual bool IsChildControlFocusManage(void) const { return false; };
virtual void OnDrawFocus(void) {};
virtual void OnFocusModeStateChanged(void) {};
+ virtual bool OnFocusGained(const _Control& source){return true;}
+ virtual bool OnFocusLost(const _Control& source){return true;}
+
+ virtual void CalculateItemMaximumWidth(void) {};
virtual void OnFontChanged(Tizen::Graphics::Font* pFont) = 0;
virtual void OnFontInfoRequested(unsigned long& style, float& size) = 0;
virtual _ContextMenuItemInfo GetItemFromPosition(const Tizen::Graphics::FloatPoint& position) = 0;
virtual _ContextMenuItemInfo FindItem(int index) = 0;
virtual result SetTopDrawnItemIndex(int index) = 0;
- virtual result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap) = 0;
+ virtual result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap, bool isAppBitmap = false) = 0;
}; //_IContextMenuPresenter
} // Control
* @brief This interface implements the listener for the form activation chage event.
* @since 2.0
*
- * The listener interface for receiving form activation chage event.
+ * The listener interface for receiving form activation change event.
*
*/
class _IFormActivationChangeEventListener
- : public Tizen::Base::Runtime::IEventListener
+ : virtual public Tizen::Base::Runtime::IEventListener
{
public:
/**
virtual void OnFormActivated(const Tizen::Ui::Controls::_Form& source) = 0;
virtual void OnFormDeactivated(const Tizen::Ui::Controls::_Form& source) = 0;
+ virtual void OnFormActivating(const Tizen::Ui::Controls::_Form& source) = 0;
+ virtual void OnFormDeactivating(const Tizen::Ui::Controls::_Form& source) = 0;
}; // _IFormActivationChangeEventListener
static _IconListItem* CreateIconListItemN(IconListViewItem* pIconListViewItem);
// _ListItemCommon
- virtual bool DrawItem(Tizen::Graphics::FloatRectangle& rect, ListItemState isFocused, int itemIndex = -1);
+ virtual bool DrawItem(Tizen::Graphics::FloatRectangle& rect, ListItemState isFocused, int itemIndex = -1, bool overwriteItemBG = false);
virtual void SetChecked(bool checked);
virtual void SetItemIndex(int groupIndex, int itemIndex);
virtual void GetItemIndex(int& groupIndex, int& itemIndex) const;
virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
virtual void OnFocusModeStateChanged(void);
virtual void OnDrawFocus(void);
+ virtual void OnFocusLost(void);
Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds);
// Tizen::Ui::_IKeyEventPreviewer
void DrawFocusUi(int focusUiIndex);
bool SetFocusUiIndexVerticalScrollList(const _KeyInfo& keyInfo);
bool SetFocusUiIndexHorizontalScrollList(const _KeyInfo& keyInfo);
+
+ void ChangeScrollBarVisibility(float viewRange, float scrollRange);
// Attribute
private:
static const int DEFAULT_GROUP_INDEX = 0;
result SetScrollStyle(IconListViewScrollStyle scrollStyle);
+ IconListViewScrollStyle GetScrollStyle(void) const;
+
result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap);
const Tizen::Graphics::Bitmap* GetBackgroundBitmap(void) const;
virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
virtual void OnFocusModeStateChanged(void);
virtual void OnDrawFocus(void);
+ virtual bool OnFocusLost(const _Control& source);
virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds);
// Tizen::Ui::_IKeyEventListenerPreviewer
#define _FUI_CTRL_INTERNAL_INDICATOR_H_
#include <FBaseRtTimer.h>
+#include <FUiAnimIVisualElementAnimationStatusEventListener.h>
#include "FUi_Control.h"
#include "FUi_EcoreEvas.h"
#include "FUiAnim_ControlVisualElement.h"
+#include "FUi_ITouchEventListener.h"
namespace Tizen { namespace Ui { namespace Animations
{
class _Indicator
: public Tizen::Ui::Animations::_ControlVisualElement
, public Tizen::Base::Runtime::ITimerEventListener
+ , public Tizen::Ui::_ITouchEventListener
+ , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener
{
public:
_Indicator(void);
void SetIndicatorOrientation(Tizen::Ui::_ControlOrientation orientation);
void SetWindow(Tizen::Ui::_Window* pWindow);
+ result ShowIndicatorEffect(bool down, int duration);
+ void RemoveIndicatorAnimations(void);
+
+ void Activate(void);
+ void Deactivate(void);
+
void OnChangeLayout(_ControlOrientation orientation);
result OnAttachedToMainTree(void);
virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
static void OnDisconnected(Ecore_Evas *pEe);
static void OnMessageHandle(Ecore_Evas *pEe, int msgDomain, int msgId, void *data, int size);
+ static Eina_Bool OnClientMessageReceived(void* pData, int type, void* pEvent);
virtual Animations::HitTestResult OnHitTest(const Tizen::Graphics::FloatPoint& point);
+ virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
+ virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
+ virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
+ virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo);
+
+ virtual void OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target);
+ virtual void OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount);
+ virtual void OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally);
+
private:
_Indicator(const _Indicator& value);
_Indicator& operator =(const _Indicator& value);
Evas_Object* __pPortraitIndicatorEvasObject;
Evas_Object* __pLandscapeIndicatorEvasObject;
Tizen::Base::Runtime::Timer* __pConnectionTimer;
+ Tizen::Base::Runtime::Timer* __pAnimationTimer;
Tizen::Ui::Animations::_VisualElement* __pPortraitVisualElement;
Tizen::Ui::Animations::_VisualElement* __pLandscapeVisualElement;
Tizen::Ui::Animations::_VisualElement* __pCurrentVisualElement;
bool __landscapeautohide;
_IndicatorOpacity __opacity;
Tizen::Ui::_ControlOrientation __orientation;
+ Tizen::Graphics::FloatPoint __startTouchPoint;
+ bool __animating;
+ bool __touchPressed;
+ int __pointId;
+ int __quickpanelOpened;
+ Ecore_Event_Handler* __pClientMessageReceived;
}; // _Indicator
}}} // Tizen::Ui::Controls
virtual bool IsLayoutChangable(void) const;
+ virtual void OnActivated(void);
+ virtual void OnDeactivated(void);
+
private:
_Keypad(void);
_Keypad(const _Keypad&);
float GetRightMarginF(void) const;
float GetBottomMarginF(void) const;
+ int GetTextExtentSize(void) const;
+ float GetTextExtentSizeF(void) const;
+
Tizen::Graphics::FloatDimension GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const;
protected:
result RefreshList(int index, int elementId);
- result UpdateList(void);
+ result UpdateList(bool isRestoreAnnexFocusValue = false);
int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const;
bool __redrawListView;
bool __isOrientationChanged;
+ bool __isUpdateListCalled;
bool __needReloadItems;
class _ListViewPropagatedTouchEventListener;
// Timer Callback API
void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
+ //TextSlide
+ virtual void ResetTextSlide(void);
+
private:
_ListViewItem(const _ListViewItem& rhs);
void OnTextSlideTimerExpired(void);
- void ResetTextSlide(void);
-
// UiLink
bool ParseCutlinkText(_ListViewItemElementText* pText);
bool ResetCutlinkFocus(void);
virtual void SetAccessibilityElement(void);
+ virtual Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(void);
virtual void SetAccessibilityElementLabel(void);
virtual void SetAccessibilityElementTrait(void);
virtual void SetAccessibilityElementValue(void);
-
+
private:
static const int TEXT_SLIDING_TIMER_DURATION = 60;
void SetItemLazyDeletion(_ListViewItem* pItem);
+ _IListItemCommon* GetDefaultItem(void);
+
// Variable
private:
IListViewItemProvider* __pListViewProvider;
_ListViewItem* __pItemNeedsLazyDeletion;
_ListViewItem* __pLazyDeletionItem;
bool __usingFloatingPoint;
+ _IListItemCommon* __pDefaultItem;
}; // _ListViewItemProviderAdaptor
}}} // Tizen::Ui::Controls
#include <FBaseString.h>
#include <FGrpColor.h>
+#include <FUiAnimIVisualElementAnimationStatusEventListener.h>
#include "FUi_Window.h"
#include "FUiCtrl_OptionMenuPresenter.h"
#include "FUiCtrl_ActionEvent.h"
#include "FUiCtrl_IActionEventListener.h"
#include "FUiCtrl_IFrameEventListener.h"
-
#include "FUiCtrl_ScrollPanel.h"
namespace Tizen { namespace Ui {
, virtual public _IUiEventPreviewer
, public _IAccessibilityListener
, virtual public _IFrameEventListener
+ , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener
{
DECLARE_CLASS_BEGIN(_OptionMenu, _Control);
DECLARE_PROPERTY("color", GetPropertyColor, SetPropertyColor);
static _OptionMenu* CreateOptionMenuN(void);
public:
+ void OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally);
+ void OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount){};
+ void OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target){};
result Install(void);
result Initialize(void);
result AddItem(const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
+ void CloseAnimation(int actionID);
+ void OpenAnimation();
virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(const int mainIndex) const;
void AddAccessibilityElement(const _AccessibilityElement& element);
+ void SetAllAccessibilityElement(void);
_OptionMenuItemInfo GetItemFromPosition(const Tizen::Graphics::FloatPoint& position) const;
_OptionMenuItemInfo FindItem(int index) const;
virtual bool OnFocusGained(const _Control& source);
virtual bool OnFocusLost(const _Control& source);
virtual void OnDrawFocus(void);
- virtual void OnFocusModeStateChanged(void);
+ virtual void ResetFocus(void);
protected:
result SetPresenter(const _OptionMenuPresenter& OptionMenuPresenter);
private:
result LoadBitmap(void);
result LoadColorReplacedBitmap(const Tizen::Graphics::Color& color);
- void SetAllAccessibilityElement(void);
void RemoveAllAccessibilityElement(void);
_OptionMenu(const _OptionMenu& rhs);
bool __isMaxVisibleCountSet;
bool __isFocused;
int __currentFocusedIndex;
+ int __selectedActionID;
+ bool __isAnimating;
+
+ static const int ANIMATION_DURATION = 333;
+
+ Tizen::Ui::Animations::IVisualElementAnimationTimingFunction* __pBoundsTimingFunction;
+ Tizen::Ui::Animations::IVisualElementAnimationTimingFunction* __pOpacityTimingFunction;
// attribute for position fo the window
Tizen::Graphics::FloatRectangle __windowRect; // OptionMenu window in the whole screen area
result SetBitmap(OptionMenuItemDrawingStatus status, const Tizen::Graphics::Bitmap* pBitmap);
const Tizen::Graphics::Bitmap* GetBitmap(OptionMenuItemDrawingStatus status) const;
+ void SetPressedItemColor(Tizen::Graphics::Color color);
+
void SetSize(Tizen::Graphics::FloatDimension size);
Tizen::Graphics::FloatDimension GetSize(void) const;
int Release(void);
void SetAndInvalidate(bool flag);
- const Tizen::Graphics::Bitmap* GetMagentaBgBitmap(void) const;
virtual void OnBoundsChanged(void);
// draw
float __textSize;
Tizen::Base::String __text;
Tizen::Graphics::Bitmap* __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_MAX];
- Tizen::Graphics::Bitmap* __pMagentaBgBitmap;
+ Tizen::Graphics::Bitmap* __pNormalBgBitmap;
+ Tizen::Graphics::Bitmap* __pSelectedBgBitmap;
Tizen::Graphics::Bitmap* __pArrowBitmap;
Tizen::Graphics::Bitmap* __pArrowPressedBitmap;
Tizen::Graphics::FloatDimension __size;
#include <FBaseString.h>
#include <FGrpColor.h>
#include <FGrpBitmap.h>
+#include <FGrpFloatMatrix4.h>
+#include <FUiAnimIVisualElementAnimationTimingFunction.h>
#include <FUiCtrlListView.h>
#include <FUiCtrlCustomItem.h>
#include "FUi_Control.h"
+#include "FUiAnim_VisualElement.h"
#include "FUiCtrl_OptionMenu.h"
#include "FUiCtrl_OptionMenuModel.h"
-#include "FUiAnim_VisualElement.h"
namespace Tizen { namespace Ui { namespace Controls
{
class _OptionMenuItem;
class _ListItem;
+class SineThirtyThreeTimingFunction
+ : public Tizen::Ui::Animations::IVisualElementAnimationTimingFunction
+{
+public:
+ float CalculateProgress(float timeProgress) const;
+}; // SineTimingFunction
+
+class SineSixtyTimingFunction
+ : public Tizen::Ui::Animations::IVisualElementAnimationTimingFunction
+{
+public:
+ float CalculateProgress(float timeProgress) const;
+}; // SineTimingFunction
+
struct _OptionMenuItemInfo
{
bool bListItem;
void AdjustItemPosition(void);
Tizen::Graphics::FloatDimension AdjustItemLayoutStyle(void);
- _OptionMenuItem* CreateItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap,
+ _OptionMenuItem* CreateItemN(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap,
const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, bool isSubItem = false);
int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const;
#ifndef _FUI_INTERNAL_OVERLAY_AGENT_H_
#define _FUI_INTERNAL_OVERLAY_AGENT_H_
+#define _FUI_INTERNAL_USE_THRESHOLD_EVENT_TIMER
#include <X11/Xlib.h>
#include <X11/extensions/Xvlib.h>
namespace Tizen { namespace Ui { namespace Controls
{
+static const int _OVERLAY_AGENT_PIXMAP_MAX = 3;
+typedef unsigned int (*GetPixmapCallback)(void *userData);
+typedef void (*GetPixmapErrorCallback)(unsigned int* pPixmap, void* userData);
+
+class _OverlayAgent;
enum OverlayAgentEvaluationOption
{
_OVERLAY_AGENT_STYLE_PANEL_GL
};
+enum _PixmapState
+{
+ _PIXMAP_STATE_FREE = 0,
+ _PIXMAP_STATE_DEQUEUE = 1,
+ _PIXMAP_STATE_ENQUEUE,
+};
+
+struct _OverlayAgentPixmap
+{
+ Pixmap __nativePixmap;
+ long long __timeStamp;
+ _PixmapState __pixmapState;
+};
+
+typedef struct
+{
+ int __displayMode;
+ Tizen::Graphics::Rectangle __displayBounds;
+}_UserProperties;
+
+typedef struct
+{
+ _UserProperties __userProperties;
+ void* __pInstance;
+ GetPixmapCallback __pPixmapCallback;
+ GetPixmapErrorCallback __pPixmapErrorCallback;
+}_UserData;
+
class _OverlayAgent
{
public:
static _OverlayAgent* CreateInstanceN(_OverlayAgentStyle style, const _Control& parentControl, const Tizen::Graphics::FloatRectangle& logicalBounds, const Tizen::Graphics::Rectangle& physicalBounds);
~_OverlayAgent(void);
- result CreatePixmap(const Tizen::Graphics::Rectangle& physicalBounds);
+ result CreatePixmap(const Tizen::Graphics::Rectangle& physicalBounds, int pixmapIndex = 0);
+ result CreateAdditionalPixmap(void);
void UngrabXvPort(void);
result Draw(void);
- Pixmap GetPixmap(void) const;
Evas_Object* GetRendererImageObject(void) const;
Tizen::Graphics::FloatRectangle GetBounds(void) const;
result SetRotation(_OverlayAgentRotation rotation);
result SetDestination(const Tizen::Graphics::FloatDimension& dimension);
result SetAspectRatio(bool enable);
- result SetRendererFlushNeeded(void);
-
+ result SetRendererFlushNeeded(unsigned int index);
bool IsValidDestinationDimension(const Tizen::Graphics::FloatDimension& dimension) const;
+ void SetBufferFree(int index);
+ Pixmap GetPixmap(int index) const;
+ unsigned int GetFreeBuffer(void);
+ static unsigned int GetFreeBuffer(void* userData);
+ static void PixmapErrorCallback(unsigned int* pPixmap, void* userData);
// static utilities
static result EvaluateBounds(OverlayAgentEvaluationOption option, Tizen::Graphics::FloatRectangle& rect, bool& modified);
result PutXvImage(void);
result PutEvasImage(void);
+ int FindFreeBuffer(void);
static int GetValueFromRegistry(const Tizen::Base::String& key);
private:
- const static int _OVERLAYAGENT_XV_PORT = 100;
+#ifdef _FUI_INTERNAL_USE_THRESHOLD_EVENT_TIMER
+ static const long long _DEQUEUE_THRESHOLD_EVENT_TIME = 700;
+#endif
+ static const int _OVERLAY_AGENT_XV_PORT = 100;
class _OverlayVisualElement
: public Tizen::Ui::Animations::_VisualElement
Evas_Object* GetImageObject(void) const;
void SetImageObject(Evas_Object* pImageObject);
void SetImageObjectShowStateChanged(void);
-
+
private:
void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
static void OnImageObjectHidden(void* pData, Evas *pEvas, Evas_Object *pImageObject, void *event_info);
private:
- Tizen::Base::Runtime::Timer* __pTimer;
+ Tizen::Base::Runtime::Timer* __pOverlayTimer;
Evas_Object* __pImageObject;
bool __showStateChanged;
};
Tizen::Base::ByteBuffer* __pConvertedSourceBuffer;
//(GL-Backend) Renderer Pixmap
- Ecore_X_Damage __pixmapDamageHandle;
+ Tizen::Ui::Animations::VisualElementSurface* __pSurfaceForPixmap;
+ Evas_Object* __pImageObjectForPixmap;
+ _OverlayAgentPixmap __pixmap[_OVERLAY_AGENT_PIXMAP_MAX];
+ Ecore_X_Damage __pixmapDamageHandle[_OVERLAY_AGENT_PIXMAP_MAX];
Ecore_Event_Handler* __pPixmapEventHandler;
- Pixmap __pixmap;
+ int __currentReadingPixmap;
+ bool __stopReadingPixmap;
+
+ _UserData __pixmapCallBackData;
+ Tizen::Base::Runtime::Mutex* __pMutex;
+ long long __prevTime;
//(GL-Backend) Xv Property
int __xvPort;
//(GL-Backend) XvPort variable
static int __baseXvPort;
- static bool __isPortGrabbed[_OVERLAYAGENT_XV_PORT];
+ static bool __isPortGrabbed[_OVERLAY_AGENT_XV_PORT];
// static util variable
static int __overlayAgentCount;
void GoForeground(void);
void GoBackground(void);
+ void SetShowState(bool show);
static result IsValidBounds(const Tizen::Graphics::Rectangle& physicalBounds);
static result SetPixelFormatList(void);
namespace Tizen { namespace Ui { namespace Controls
{
-class _Indicator;
class _PopupPresenter;
enum PopupModalResult
Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const;
Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const;
- _Indicator* GetIndicator(void) const;
Tizen::Graphics::Bitmap* GetTitleBackgroundBitmap(void);
Tizen::Graphics::Bitmap* GetTitleBackgroundEffectBitmap(void);
Tizen::Graphics::Color _titleTextColor;
- Tizen::Graphics::Bitmap* _pBgBitmap;
Tizen::Graphics::Bitmap* _pComposedBgBitmap;
Tizen::Graphics::Bitmap* _pOutlineBitmap;
Tizen::Graphics::Bitmap* _pComposedTitleBitmap;
Tizen::Graphics::FloatRectangle __bounds;
PopupModalResult __popupResult;
-
- _Indicator* __pIndicator;
}; // _Popup
_Progress* __pProgress;
_ProgressModel* __pProgressModel;
- Tizen::Graphics::Bitmap* __pResourceBitmap;
- Tizen::Graphics::Bitmap* __pResourceBarBgBitmap;
Tizen::Graphics::Bitmap* __pBarResourceEffectBitmap;
Tizen::Graphics::Bitmap* __pBarBgResourceEffectBitmap;
Tizen::Graphics::Bitmap* __pBarColorReplacementBitmap;
bool IsPageScrollFlickMoveLimitedOnePage(void) const;
+ bool IsScrollAnimationRunning(void) const;
+
// store SIP keypad binding control
const _Control* GetControlKeypadBinding(void) const;
void SetControlKeypadBinding(const _Control* pControl);
float CalculatePagingScrollPosition(float position) const;
void StopScrollBarLoadEffectTimer(void);
+ bool IsScrollAnimationRunning(void) const;
+
protected:
// Update Layout
virtual void UpdateLayout(void);
Tizen::Graphics::FloatPoint GetPreviousTouchPosition(void) const;
Tizen::Graphics::FloatPoint GetCurrentTouchPosition(void) const;
- bool IsScrollAnimationRunning(void) const;
-
float GetScrollPositionInternal(void) const;
bool IsModelUpdating(void) const;
// scroll to ...
bool IsControlOutOfView(const _Control& control) const;
void ScrollToControlWhenOutOfView(const _Control& control);
+ void ScrollToFocusedControl(void);
// scroll bar load effect
void DoScrollBarLoadEffect(void);
#include <FUiCtrlSearchBar.h>
#include "FUi_Control.h"
+#include "FUi_IAccessibilityListener.h"
#include "FUiCtrl_Button.h"
#include "FUiCtrl_Edit.h"
+#include "FUiCtrl_KeypadEvent.h"
+#include "FUiCtrl_LanguageEvent.h"
+#include "FUiCtrl_SearchBarEvent.h"
#include "FUiCtrl_IActionEventListener.h"
#include "FUiCtrl_IKeypadEventListener.h"
#include "FUiCtrl_ILanguageEventListener.h"
#include "FUiCtrl_ITextBlockEventListener.h"
#include "FUiCtrl_ITextEventListener.h"
#include "FUiCtrl_ISearchBarEventListener.h"
-#include "FUiCtrl_KeypadEvent.h"
-#include "FUiCtrl_LanguageEvent.h"
-#include "FUiCtrl_SearchBarEvent.h"
-#include "FUi_IAccessibilityListener.h"
const int SEARCHBAR_COLOR_MAX = 3;
const int SEARCHBAR_BUTTON_COLOR_MAX = 4;
static _SearchBar* CreateSearchBarN(void);
result Initialize(bool enableSearchBarButton = true, CoreKeypadAction keypadAction = CORE_KEYPAD_ACTION_SEARCH);
Tizen::Ui::_Control* GetContent(void) const;
+ result DetachContent(Tizen::Ui::_Control* pContent);
result SetContent(const Tizen::Ui::_Control* pContent);
result UpdateContentArea(bool invalidate = true);
result SetContentAreaVisible(bool visible, bool isCalledByApp = false);
void SetFocusCallbackParameter(bool state);
bool IsFocusCallbackToBeFired(void) const;
+ virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
+ virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo);
virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId);
virtual bool OnFocusLost(const _Control& source);
virtual void OnDrawFocus(void);
virtual bool IsChildControlFocusManage(void) const;
+ virtual void OnAncestorEnableStateChanged(const _Control& control);
virtual bool OnPreviewKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
bool __isButtonTextChangedByApp;
bool __contentVisibilitySetByApp;
bool __isFocusUiInitialized;
+ bool __isTouchMoved;
CoreKeypadAction __keypadAction;
#include <FUiCtrlSearchBar.h>
#include "FUi_ControlImpl.h"
+#include "FUiCtrl_PublicKeypadEvent.h"
+#include "FUiCtrl_PublicLanguageEvent.h"
+#include "FUiCtrl_PublicSearchBarEvent.h"
+#include "FUiCtrl_SearchBar.h"
#include "FUiCtrl_IActionEventListener.h"
#include "FUiCtrl_IKeypadEventListener.h"
#include "FUiCtrl_ILanguageEventListener.h"
#include "FUiCtrl_ITextBlockEventListener.h"
#include "FUiCtrl_ITextEventListener.h"
#include "FUiCtrl_ISearchBarEventListener.h"
-#include "FUiCtrl_PublicKeypadEvent.h"
-#include "FUiCtrl_PublicLanguageEvent.h"
-#include "FUiCtrl_PublicSearchBarEvent.h"
-#include "FUiCtrl_SearchBar.h"
namespace Tizen { namespace Ui { namespace Controls
Tizen::Graphics::Bitmap* __pReplacedSearchFieldNormalBitmap;
Tizen::Graphics::Bitmap* __pReplacedSearchFieldDisabledBitmap;
Tizen::Graphics::Bitmap* __pReplacedSearchBarBitmap;
- Tizen::Graphics::Bitmap* __pSearchBarBitmap;
Tizen::Graphics::Bitmap* __pSearchFieldEffectBitmap;
Tizen::Graphics::Bitmap* __pSearchBarEffectBitmap;
Tizen::Graphics::Color __currentBgColor;
virtual void OnFontInfoRequested(unsigned long& style, float& size);
virtual void OnAncestorEnableStateChanged(const _Control& control);
virtual void OnAncestorVisibleStateChanged(const _Control& control);
+ virtual void OnVisibleStateChanged(void);
// accessibility listener
virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;}
private:
- static const int SLIDER_OVERLAY_SINGLE_DIGIT = 1;
-
Tizen::Graphics::FloatRectangle __sliderRect;
Tizen::Graphics::FloatRectangle __sliderTouchRect;
Tizen::Graphics::FloatRectangle __sliderOverlayRect;
class _SliderPresenter
: public Tizen::Base::Object
- , public Tizen::Base::Runtime::ITimerEventListener
{
public:
virtual ~_SliderPresenter(void);
void OnFontChanged(Tizen::Graphics::Font* pFont);
void OnFontInfoRequested(unsigned long& style, float& size);
- virtual void OnAncestorEnableStateChanged(const _Control& control);
- virtual void OnAncestorVisibleStateChanged(const _Control& control);
+ void OnAncestorEnableStateChanged(const _Control& control);
+ void OnAncestorVisibleStateChanged(const _Control& control);
+ void OnVisibleStateChanged(void);
+
static _SliderPresenter* CreateInstanceN(const _Slider& slider);
result SetThumbBitmap(SliderThumbStatus status, const Tizen::Graphics::Bitmap& bitmap);
void SetThumbTextColor(SliderThumbStatus status, const Tizen::Graphics::Color& color);
void SetFocusMode(bool focusmode);
bool GetFocusMode(void);
- virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
private:
int CalculateSliderValue(float positionX, float offsetX);
Tizen::Base::Runtime::Timer* __pSlideTimer;
- Tizen::Graphics::Bitmap* __pResourceBgTopBitmap;
- Tizen::Graphics::Bitmap* __pResourceBgMiddleBitmap;
- Tizen::Graphics::Bitmap* __pResourceBgBottomBitmap;
- Tizen::Graphics::Bitmap* __pResourceBgSingleBitmap;
-
-
Tizen::Graphics::Bitmap* __pBgTopBitmap;
Tizen::Graphics::Bitmap* __pBgMiddleBitmap;
Tizen::Graphics::Bitmap* __pBgBottomBitmap;
Tizen::Graphics::Bitmap* __pBgBottomEffectBitmap;
Tizen::Graphics::Bitmap* __pBgSingleEffectBitmap;
- Tizen::Graphics::Bitmap* __pResourceBarBitmap;
- Tizen::Graphics::Bitmap* __pResourceBarBgBitmap;
Tizen::Graphics::Bitmap* __pBarResourceEffectBitmap;
Tizen::Graphics::Bitmap* __pBarBgResourceEffectBitmap;
Tizen::Graphics::Bitmap* __pBarColorReplacementBitmap;
Tizen::Graphics::Font* __pFont;
Tizen::Graphics::_Text::TextObject* __pTitleTextObject;
+ Tizen::Graphics::_Text::TextObject* __pHandleTextObject;
int __handleX;
- int __prevSliderValue;
int __handleOffset;
bool __isSliderPressed;
bool __isSetValue;
float __fontSize;
float __barOffset;
- bool __isTimerRunning;
-
- Tizen::Graphics::FloatPoint __currentPosition;
- static const int __timerValue = 5;
}; // _SliderPresenter
}}} // Tizen::Ui::Controls
_SPLIT_PANEL_ANIMATION_MAX
};
-const long ANIMATION_DURATION = 1000;
const float ANIMATION_ALPHA_HIDE = 0.0;
const float ANIMATION_ALPHA_SHOW = 1.0;
+const long ANIMATION_DURATION_MIN = 250;
+const long ANIMATION_DURATION_MAX = 1000;
class _SplitPanelPresenter
: public Tizen::Base::Object
Tizen::Ui::Control* GetPaneControl(SplitPanelPaneOrder paneOrder);
Tizen::Ui::Animations::AnimationTransactionStatus GetTransactionStatus(void);
Tizen::Graphics::FloatRectangle GetRestorePaneBounds(SplitPanelPaneOrder paneOrder);
- Tizen::Ui::Animations::VisualElementPropertyAnimation* GetVisualElementAnimation(Tizen::Base::String propertyName);
+ Tizen::Ui::Animations::VisualElementPropertyAnimation* GetVisualElementAnimation(Tizen::Base::String propertyName, int destination);
+ long GetAnimationDuration(int destination);
private:
_SplitPanelPresenter(const _SplitPanelPresenter& value);
void SetFirstLoadedItemIndex(void);
void SetLastLoadedItemIndex(void);
-// void StartScrollingEffect(void);
-// void SetOpacityVisualElement(float xPosition);
-
virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
private:
int __editItemIndex;
- //Tizen::Graphics::Bitmap* __pVerticalLineBitmap;
+
Tizen::Graphics::Bitmap* __pHorizontalLineBitmap;
-// Tizen::Graphics::Bitmap* __pFrontScrollingEffectBitmap;
-// Tizen::Graphics::Bitmap* __pRearScrollingEffectBitmap;
-// Tizen::Graphics::Bitmap* __pScrollingEffectBitmap;
Tizen::Graphics::Bitmap* __pFocusBitmap;
-// Tizen::Ui::Animations::_VisualElement* __pScrollingEffectVe;
Tizen::Base::Runtime::Timer* __pFlickAnimationTimer;
Tizen::Base::Runtime::Timer* __pScrollAnimationTimer;
int __firstLoadedItemIndex;
int __lastLoadedItemIndex;
-// bool __isScrollEffectEnded;
-// bool __isScrollEffectStarted;
int __timerCount;
bool __isTouchMove;
-// int __scrollFlag;
float __tabMinimumSize;
int __fontChangeItemCount;
//Focus
virtual bool OnFocusGained(const _Control& source);
+ bool OnTraversalControlFocusGained(void);
+ bool OnTraversalControlFocusLost(void);
+ void SetFocusItemOnPressedState(int groupIndex, int itemIndex);
+
+ //Accessibility
+ void SetCurrentAccessibilityIndex(int groupIndex, int itemIndex);
// gestureListener Callback API
virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture);
result SetReorderModeEnabled(bool enable);
//Restore list Focus
- void RestoreFocus(bool isRestoreFocus);
void SetAnnexFocused(bool isAnnexFocused);
+ bool IsAnnexFocused(void);
void SetTableViewFocused(bool focusStatus);
bool IsTableViewFocused(void);
+ result GetFocusedItemIndex(int& groupIndex, int& itemIndex) const;
_FastScroll* GetFastScrollBar(void) const;
result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon);
result RefreshTableView(int groupIndex, int itemIndex, TableViewRefreshType type, bool animation = true);
result RefreshAllItems(void);
- result UpdateTableView(void);
+ result UpdateTableView(bool isRestoreAnnexFocusValue = false);
result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const;
result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const;
void FireItemTouchReleasedEventDuringPressing(int groupIndex, int itemIndex);
+ Tizen::Ui::_Control* GetParentFormOrWindow(void) const;
+
virtual void OnDraw(void);
virtual void OnBoundsChanged(void);
+ virtual void OnChangeLayout(_ControlOrientation orientation);
virtual void OnChildAttached(const _Control& child);
virtual void OnChildDetached(const _Control& child);
result SetTableViewStatusChanged(bool changed);
-
+ void SetFocusDuringOrientationChange(void);
+ void RestoreEditCopyPasteManager(void);
// VE Value Animation
Tizen::Ui::Animations::VisualElementValueAnimation* GetVisualElementValueAnimation(const Tizen::Base::String& keyName) const;
bool IsAnnexOnOffSliding(void);
static float GetAnnexWidth(TableViewAnnexStyle style);
- void FireItemTouchReleased(void);
+ void FireItemTouchReleased(bool isTouchRelease = true);
void FireItemTouchPressed(void);
void SetSimpleLastItemEnabled(bool enable);
+ void SetSectionItem(bool isSectionItem);
void SetTouchPressOnScroll(bool isTouch);
bool IsTouchPressOnScroll(void) const;
+ void DrawFocusOnInternalItem(_Control* pChildControl);
+
// Accessibility
virtual void SetAccessibilityElement(void);
- Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(void);
+ virtual Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(void);
virtual result OnAttachedToMainTree(void);
virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo);
virtual bool IsChildControlFocusManage(void) const;
+ virtual void OnFocusModeStateChanged(void);
bool SetItemTapSoundEnabled(bool tapSoundEnabled);
bool GetItemTapSoundEnabled(void);
void DrawAnnexFocus(void);
+ void ResetItemState(void);
virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds);
//Accessibility
void SetPublicLabelUpdate(bool resetPublicLabelUpdate);
+ //TextSlide
+ virtual void ResetTextSlide(void);
protected:
_TableViewItem(float nItemHeight);
TableViewItemPressedControl GetPressedControl(void);
result StartTouchPressedTimer(const _Control& source, const _TouchInfo& touchinfo);
- void StopTouchPressedTimer(void);
+ void StopTouchPressedTimer(bool forceStop = false);
result StartTouchReleasedTimer(void);
- void StopTouchReleasedTimer(void);
+ void StopTouchReleasedTimer(bool forceStop = false);
void OnAncestorInputEnableStateChanged(const _Control& control);
result CreateOnOffButton(void);
result CreateDetailButton(void);
- _Label* GetLabelCore(Label* label);
+ _Label* GetLabelCore(Label* pLabel);
_Control* GetPreviousFocusChildControl(const _Control& source);
_Control* GetNextFocusChildControl(const _Control& source);
+ Tizen::Base::String GetChildAccessibilityLabelContent(const _Control& source);
+ void DeactivateChildAccessibilityContainer(const _Control& source);
+
private:
void* __pAppInfo;
int __refCount;
bool __isTabSoundPlayed;
bool __isSelectedDetailButton;
bool __isSimpleLastItem;
+ bool __isSectionItem;
bool __isTouchPressOnScroll;
bool __isTouchCancelOnPressRelease;
static const float BACKGROUND_DIMMED_OPACITY = 0.7f;
static const float BACKGROUND_DISABLED_OPACITY = 0.3f;
static const int DEFAULT_CAPTURED_CONTROL_COUNT = 10;
- static const int CHECKED_ANIMATION_DURATION = 30;
+ static const int CHECKED_ANIMATION_DURATION = 10;
static const int TOUCH_PRESSED_DURATION = 100;
static const int TOUCH_RELEASED_DURATION = 30;
static const int MAX_CHECKED_COUNT = 10;
bool operator!= (const _TableViewSectionStringAlignment& rhs) const;
};
+struct _TableViewItemHeight
+{
+ int groupIndex;
+ int itemIndex;
+ float itemHeight;
+ bool isFooterItem;
+
+ _TableViewItemHeight(void)
+ : groupIndex(0)
+ , itemIndex(-1)
+ , itemHeight(0)
+ , isFooterItem(false)
+ {
+ }
+
+ bool operator== (const _TableViewItemHeight& rhs) const;
+ bool operator!= (const _TableViewItemHeight& rhs) const;
+};
+
struct _TableViewScrollToItemTag
{
int groupIndex;
// event handler for window event
virtual void OnBoundsChanged(void);
virtual result Draw(void);
+ virtual void OnChangeLayout(_ControlOrientation orientation);
// Touch Event Previewer
virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchInfo);
result RefreshTableView(int groupIndex, int itemIndex, TableViewRefreshType type, bool animation);
result RefreshAllItems(void);
- result UpdateTableView(void);
+ result UpdateTableView(bool isRestoreAnnexFocusValue);
result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const;
result GetItemFromPosition(const Tizen::Graphics::FloatPoint& position, TableViewItemTag& itemPos) const;
result SetLeftMargin(float leftMargin);
//Restore Focus
- void RestoreFocus(bool isRestoreFocus);
void SetAnnexFocused(bool isAnnexFocused);
+ bool IsAnnexFocused(void);
void SetTableViewFocused(bool focusStatus);
bool IsTableViewFocused(void);
+ result GetFocusedItemIndex(int& groupIndex, int& itemIndex) const;
bool IsItemChecked(int groupIndex, int itemIndex) const;
result SetItemChecked(int groupIndex, int itemIndex, bool checked);
void FireItemTouchReleasedEventDuringPressing(int groupIndex, int itemIndex);
+ void SetFocusDuringOrientationChange(void);
+ bool OnTraversalControlFocusGained(void);
+ bool OnTraversalControlFocusLost(void);
+ void SetFocusItemOnPressedState(int groupIndex, int itemIndex);
+ void SetItemFocus(_TableViewItem* pItem, TableViewItemTag itemPos);
+ void RestoreEditCopyPasteManager(void);
+ void ChangeScrollBarVisibility(float viewRange, float scrollRange);
+
+ void SetCurrentAccessibilityIndex(int groupIndex, int itemIndex);
+
protected:
virtual float ScrollToInternal(float targetPosition);
virtual void FadeInScrollBar(void);
float GetItemHeight(TableViewItemTag itemTag) const;
float SetItemHeight(TableViewItemTag itemTag, float height);
bool CreateItemHeightList(float defaultGroupItemHeight, float defaultItemHeight);
+ bool RestoreItemHeightList(float defaultGroupItemHeight, float defaultItemHeight);
void DeleteItemHeightList(void);
void PresetItemHeightList(void);
bool RefreshItemHeightList(int groupIndex, int itemIndex, TableViewRefreshType refreshType);
TableViewItemTag __sweptItemTag;
TableViewItemTag __focusItemTag;
+ TableViewItemTag __focusItemTagOnTraversal;
+ TableViewItemTag __accessibilityTag;
TableViewItemTag __reservedScrollItemIndex;
TableViewScrollItemAlignment __reservedScrollItemAlignment;
_TableViewReorderInfo __reorderInfo;
- Tizen::Base::Collection::ArrayListT<float> __itemHeightList;
+ Tizen::Base::Collection::ArrayListT<_TableViewItemHeight> __itemHeightList;
Tizen::Base::Collection::ArrayListT<_TableViewSectionStringAlignment> __sectionAlignmentList;
float __itemTotalHeight;
_TableViewScrollToItemTag __scrollToItemTag;
+ bool __isOrientationChanged;
+ bool __isFocusedDuringOrientationChange;
+ bool __isUpdatingTableView;
+ bool __isUpdateTableViewCalledDuringTts;
+
static const int TABLEVIEW_MAX_ITEM_COUNT = 30;
static const int REORDER_SCROLL_ANIMATION_TIMER_DURATION = 10;
static const float REORDER_SCROLL_ANIMATION_DISTANCE;
result Initialize(const _Control& control);
- virtual result Draw(Tizen::Graphics::Canvas& canvas);
+ virtual result Draw(void);
result MakeToken(const Tizen::Base::String& tokenString);
virtual result SetInitialBounds(void);
- result CalculateDescriptionTextRect(const Tizen::Base::String& titleText);
+ result CalculateTitleTextRect(const Tizen::Base::String& titleText);
virtual void OnCursorTimerExpired(void);
bool IsAutoShrinkModeEnabled(void) const;
- void SetDescriptionText(Tizen::Base::String descriptionText);
+ void SetTitleText(Tizen::Base::String titleText);
- Tizen::Base::String GetDescriptionText(void) const;
+ Tizen::Base::String GetTitleText(void) const;
Tizen::Graphics::FloatRectangle GetTextBoundsF(void) const;
virtual void ResetTextBounds(void);
virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
- Tizen::Graphics::FloatRectangle GetDescriptionTextRect(void) const;
+ Tizen::Graphics::FloatRectangle GetTitleTextRect(void) const;
String GetTextAccessibilityElementText(void) const;
void RefreshAccessibilityElements(void);
result AddChildAccessibilityElements(void);
int GetFocusedTokenIndex(void) const;
void PrepareFocusUiMode(void);
void PerformRemoveTokenAnimation(Tizen::Ui::Animations::VisualElement& source);
+ result LoadTokenBgBitmap(TokenEditStatus status);
+ virtual result DrawFocusRing(Tizen::Graphics::Canvas&);
private:
bool DrawToken(int count = -1);
Tizen::Graphics::Color GetTokenEditColor(const TokenEditStatus status) const;
Tizen::Graphics::Color GetTokenEditTextColor(const TokenEditStatus status) const;
result InitializeTokenVisibilityAt(int index);
- bool DrawDescriptionText(void);
- result SetDescriptionTextRect(const Tizen::Graphics::FloatRectangle& rect);
+ bool DrawTitleText(void);
+ result SetTitleTextRect(const Tizen::Graphics::FloatRectangle& rect);
result TrimTokenAndAdjustEllipsisAt(int index);
int GetTokenIndexFromCoordinate(const Tizen::Graphics::FloatPoint point) const;
result SetEditingTokenTextBounds(int index, bool isSetText = true);
result CheckTokenScrolling(bool scrollToCursorPosition = false);
result SetTokenVisualElementBounds(int index, const Tizen::Graphics::FloatRectangle& bounds);
int CalculateVisibleTokenCount(void);
- result InitializeDescriptionText(void);
+ result InitializeTitleText(void);
bool CheckCopyPastePopupShowStatus(void);
result ChangeInternalLayout(_ControlOrientation orientation);
float GetMaxTextHeight(void);
Tizen::Base::String __delimiter;
- Tizen::Graphics::Bitmap* __pTokenBgBitmap;
+ Tizen::Graphics::Bitmap* __pReplacedTokenBgNormalBitmap;
+ Tizen::Graphics::Bitmap* __pReplacedTokenBgSelectedBitmap;
+ Tizen::Graphics::Bitmap* __pReplacedTokenBgHighlightedBitmap;
+ Tizen::Graphics::Bitmap* __pReplacedTokenBgDisabledBitmap;
Tizen::Graphics::Bitmap* __pTokenBgNormalEffectBitmap;
- Tizen::Graphics::Bitmap* __pTokenBgPressedEffectBitmap;
- Tizen::Graphics::Bitmap* __pTokenBgReplacementFocusBitmap;
- Tizen::Graphics::Bitmap* __pTokenBgFocusEffectBitmap;
+ Tizen::Graphics::Bitmap* __pTokenBgSelectedEffectBitmap;
+ Tizen::Graphics::Bitmap* __pTokenBgHighlightedEffectBitmap;
int __pressedTokenIndex;
bool __isEditModeEnabled;
- Tizen::Ui::Animations::_VisualElement* __pDescriptionTextVisualElement;
+ Tizen::Ui::Animations::_VisualElement* __pTitleTextVisualElement;
- Tizen::Graphics::_Text::TextObject* __pDescriptionTextTextObject;
+ Tizen::Ui::Animations::_VisualElement* __pFocusRingVisualElement;
- Tizen::Graphics::FloatRectangle __descriptionTextRect;
+ Tizen::Graphics::_Text::TextObject* __pTitleTextObject;
+
+ Tizen::Graphics::FloatRectangle __titleTextRect;
bool __isTokenEditingFinished;
bool __autoShrink;
- Tizen::Base::String __descriptionText;
+ Tizen::Base::String __titleText;
bool __isPopupVisible;
const Tizen::Ui::Animations::IVisualElementAnimationTimingFunction* __pTimingFunction;
- Tizen::Graphics::FloatRectangle __descriptionTextRectForScroll;
+ Tizen::Graphics::FloatRectangle __titleTextRectForScroll;
float __previousTitleWidth;
bool __accessibilityFocusIn;
+ int __transactionId;
+
+ bool __isDestroyed;
+
}; // _TokenEditPresenter
}}} // Tizen::Ui::Controls
const int TOOLBAR_BUTTON_MAX_STATE_COUNT = 4;
const int TOOLBAR_ITEM_MAX_STATE_COUNT = 5;
const int TOOLBAR_ACTION_ID_MIN = 0;
-const int TOOLBAR_ACTION_ID_MAX = (int) 0x7FFFFFFF;
-const int TOOLBAR_MORE_BUTTON_ID = -2;
const int TAB_ITEM_MAX = 15;
const int SEGMENTED_ITEM_MAX = 4;
result SetButtonColor(_ButtonStatus status, const Tizen::Graphics::Color& color);
+ void SetHighlightedState(ToolbarButton position);
+
result SetButtonEnabled(ToolbarButton position, bool enabled);
result SetButtonTextColor(_ButtonStatus status, const Tizen::Graphics::Color& color);
bool __isButtonTextColorSetByUser[TOOLBAR_BUTTON_MAX_STATE_COUNT];
-
HorizontalAlignment __titleTextAlignment;
std::vector<_Button*> __pItems;
bool __highlighted;
+ bool __isEnterKeyPressed;
+
+ bool __isAttachedToMainTree;
+
Tizen::Graphics::FloatRectangle __titleTextArea;
Tizen::Graphics::FloatRectangle __itemArea;
_ACCESSIBILITY_GESTURE_TYPE_THREE_FINGER_PANNING_FINISHED,
_ACCESSIBILITY_GESTURE_TYPE_VALUE_INCREASED,
_ACCESSIBILITY_GESTURE_TYPE_VALUE_DECREASED,
+ _ACCESSIBILITY_GESTURE_TYPE_HIGHLIGHT_PREV,
+ _ACCESSIBILITY_GESTURE_TYPE_HIGHLIGHT_NEXT,
+ _ACCESSIBILITY_GESTURE_TYPE_UNHIGHLIGHT,
_ACCESSIBILITY_GESTURE_TYPE_END
};
private:
bool __initialized;
- bool __activated;
+ bool __activated;
+ bool __extra;
tts_h __ttsHandle;
int __localeIdx;
tts_speed_e __speed;
AccessibilityScreenReaderStatus __status;
Tizen::Base::String __grammar;
+ Tizen::Base::String __readingContents;
Tizen::Locales::Locale* __pCurrentLocale;
Tizen::Base::Collection::IList* __pSupportedLocaleList;
_AccessibilityManager* __pManager;
#include "FUi_INotificationEventListener.h"
#include "FUi_PropertyBase.h"
#include "FUi_TouchGestureDetector.h"
+#include "FUi_DragAndDropEvent.h"
#include "FGrp_FontImpl.h"
namespace Tizen { namespace Base { namespace Collection {
class _Window;
class _DataBindingContext;
class _AccessibilityContainer;
+class _DragAndDropItem;
+class _IDragAndDropEventListener;
class _IControlDelegate
{
virtual void OnEvaluateSize(Tizen::Graphics::Dimension& evaluatedSize) = 0;
virtual bool OnEvaluateSize(Tizen::Graphics::FloatDimension& evaluatedSize) = 0;
virtual void OnParentBoundsChanged(const _Control& parent) = 0;
+ virtual void OnChildAttaching(const _Control& child) = 0;
virtual void OnChildAttached(const _Control& child) = 0;
virtual void OnChildDetaching(const _Control& child) = 0;
virtual void OnChildDetached(const _Control& child) = 0;
virtual bool IsChildControlFocusManage(void) const = 0;
virtual void OnFocusableStateChanged(bool focusalbeState) = 0;
virtual void OnFocusModeStateChanged(void) = 0;
+ virtual _Window* OnDragAndDropBeginning(void) = 0;
+ virtual void OnDragAndDropDropping(void) = 0;
+ virtual void OnDragAndDropEntered(void) = 0;
+ virtual void OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position) = 0;
+ virtual void OnDragAndDropLeft(void) = 0;
+ virtual void OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem) = 0;
+ virtual bool IsAnimating(void) const = 0;
};
class _IPropagatedTouchEventListener
virtual void OnTouchReleaseHandled(const _Control& control) = 0;
virtual void OnTouchMoveHandled(const _Control& control) = 0;
virtual void OnTouchCancelHandled(const _Control& control) = 0;
+ virtual bool OnTouchWheeled(const _Control& source, const _TouchInfo& touchinfo){return false;}
virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) = 0;
virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) = 0;
virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) = 0;
virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) = 0;
+ virtual _UiTouchEventDelivery OnPreviewTouchWheeled(const _Control& source, const _TouchInfo& touchinfo){return _UI_TOUCH_EVENT_DELIVERY_YES;}
};
class _IPropagatedKeyEventListener
virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo);
+ virtual _UiTouchEventDelivery OnPreviewTouchWheeled(const _Control& source, const _TouchInfo& touchinfo);
virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo);
- virtual _UiTouchEventDelivery OnPreviewMousePressed(const _Control& source, const _MouseInfo& mouseinfo);
- virtual _UiTouchEventDelivery OnPreviewMouseReleased(const _Control& source, const _MouseInfo& mouseinfo);
- virtual _UiTouchEventDelivery OnPreviewMouseMoved(const _Control& source, const _MouseInfo& mouseinfo);
- virtual _UiTouchEventDelivery OnPreviewMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo);
- virtual bool OnMousePressed(const _Control& source, const _MouseInfo& mouseinfo);
- virtual bool OnMouseReleased(const _Control& source, const _MouseInfo& mouseinfo);
- virtual bool OnMouseMoved(const _Control& source, const _MouseInfo& mouseinfo);
- virtual bool OnMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo);
+ virtual bool OnTouchWheeled(const _Control& source, const _TouchInfo& touchinfo);
virtual bool OnFocusGained(const _Control& source);
virtual bool OnFocusLost(const _Control& source);
+ virtual bool OnTraversalControlFocusGained(void);
+ virtual bool OnTraversalControlFocusLost(void);
virtual bool OnPreviewNotifiedN(const _Control& source, Tizen::Base::Collection::IList* pArgs); // [ToDo] Make the notification id as enumeration.
virtual bool OnNotifiedN(const _Control& source, Tizen::Base::Collection::IList* pArgs);
virtual void OnEvaluateSize(Tizen::Graphics::Dimension& evaluatedSize);
virtual bool OnEvaluateSize(Tizen::Graphics::FloatDimension& evaluatedSize);
virtual void OnParentBoundsChanged(const _Control& parent);
+ virtual void OnChildAttaching(const _Control& child);
virtual void OnChildAttached(const _Control& child);
virtual void OnChildDetaching(const _Control& child);
virtual void OnChildDetached(const _Control& child);
bool IsAncestorOf(const _Control& control) const;
bool IsAttachedToMainTree(void) const;
_Window* GetRootWindow(void) const;
- void InvalidateHierarchyRootWindow(void);
void Accept(Visitor& visitor);
void Accept(Visitor& visitor) const;
Tizen::Graphics::Rectangle GetInvalidatedBounds(void) const;
Tizen::Graphics::FloatRectangle GetInvalidatedBoundsF(void) const;
void SetDrawWhenVisible(bool draw);
- bool IsDrawWhenVisible(void);
+ bool IsDrawWhenVisible(void) const;
void SetTerminatingOrder(bool postOrderTraversal);
- bool IsPostOrderTraversal(void);
+ bool IsPostOrderTraversal(void) const;
// Font
result SetFont(const Tizen::Base::String& fontName);
bool IsNativeObjectFocusable(void) const;
void SetNativeObjectFocusable(bool focusable);
void SetFocusWindowActivationChecked(bool isChecked);
- bool IsFocusWindowActivationChecked(void);
+ bool IsFocusWindowActivationChecked(void) const;
// Focus UI
void SetPreviousFocus(_Control* pPreviousFocus);
_Control* GetNextFocus() const;
void DrawFocus(void);
Tizen::Base::Collection::IListT<_Control*>* GetFocusListN(void) const;
- void RemoveFocusRing(void);
+ void RemoveFocusRing(bool needToDelete = false);
bool HasFocusRing(void);
bool IsFocusModeStateEnabled(void) const;
void SetFocusNavigateEnabled(bool enable);
result SetPosition(const Tizen::Graphics::FloatPoint& position);
result SetSize(const Tizen::Graphics::Dimension& size);
result SetSize(const Tizen::Graphics::FloatDimension& size);
+ bool IsChangedPositionByUser(void) const;
+ void SetChangedPositionByUser(bool change);
Tizen::Graphics::Dimension GetMinimumSize(void) const;
Tizen::Graphics::FloatDimension GetMinimumSizeF(void) const;
Tizen::Graphics::FloatRectangle GetClientBoundsF(const Tizen::Graphics::FloatDimension& size) const;
Tizen::Graphics::Rectangle GetAbsoluteBounds(bool recalcAlways = false) const;
Tizen::Graphics::FloatRectangle GetAbsoluteBoundsF(bool recalcAlways = false) const;
- void InvalidateHierarchyAbsoluteBounds(void);
result SetClientBounds(const Tizen::Graphics::Rectangle& bounds);
result SetClientBounds(const Tizen::Graphics::FloatRectangle& bounds);
- bool IsCalledSetClientBounds(void);
+ bool IsCalledSetClientBounds(void) const;
virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds);
+ void InvalidateHierarchyAbsoluteBounds(_Control& control);
bool Contains(const Tizen::Graphics::Point& point) const;
bool Contains(const Tizen::Graphics::FloatPoint& point) const;
Animations::_VisualElement* GetVisualElement(void) const;
void PrintDescription(bool printChildren, int level);
+ void PrintBacktrace(bool printChildren, bool newBacktrace);
+
+// DragAndDrop
+ void DragAndDropBegin(const _DragAndDropItem& dragAndDropItem);
+ void DragAndDropDrop(void);
+ void DragAndDropCancel(void);
+ _Window* GetDragWindow(void) const;
+ _Control* GetDragSourceControl(void) const;
+ bool IsDragAndDropSource(void) const;
+ result AddDragAndDropEventListener(const _IDragAndDropEventListener& listener);
+ result RemoveDragAndDropEventListener(const _IDragAndDropEventListener& listener);
+
+ virtual _Window* OnDragAndDropBeginning(void);
+ virtual void OnDragAndDropDropping(void);
+ virtual void OnDragAndDropEntered(void);
+ virtual void OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position);
+ virtual void OnDragAndDropLeft(void);
+ virtual void OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem);
+
+ virtual bool IsAnimating(void) const;
+
+ result AdjustAbsoluteBounds(void);
protected:
_Control(void);
void DisposeControl(void);
void AcquireHandle(void);
void SetDataBindingContext(_DataBindingContext* pDataBindingContext);
+ void DoBacktrace(Tizen::Base::Collection::ArrayListT<void*>* pBacktraceList);
+ void SetDestroying(bool destroying);
+ bool IsDestroying(void) const;
private:
_Control(const _Control& rhs);
_Control& operator =(const _Control& rhs);
+ void Invalidate(_Control& control);
+ void InvalidateHierarchyRootWindow(_Control& control);
+ bool IsAncestorOf(const _Control& control, const _Control& ancestor) const;
+ void ChangeLayout(_Control& control, _ControlOrientation orientation);
+ void ChangeLayout(_Control& control, _ControlRotation rotation);
+
void ReleaseHandle(void);
+ virtual bool IsChildAttachable(_Control& child) const;
bool IsInSizeRange(const Tizen::Graphics::Dimension& size) const;
bool IsInSizeRange(const Tizen::Graphics::FloatDimension& size) const;
result AdjustSizeToRange(void);
result SetBoundsInternal(const Tizen::Graphics::FloatRectangle& bounds, bool callBoundsChangeCallbacks);
- result SetBoundsFinal(const Tizen::Graphics::FloatRectangle& newBounds, bool changeLayoutBaseRect, bool callBoundsChangeCallbacks);
+ result SetBoundsFinal(const Tizen::Graphics::FloatRectangle& newBounds, bool changeLayoutBaseRect, bool callBoundsChangeCallbacks, bool animating = false);
result UpdateBoundsOfVisualElement(const Tizen::Graphics::FloatRectangle& controlBounds);
- result AdjustAbsoluteBounds(void);
+ result AdjustAbsoluteBounds(_Control& control, bool update = true);
result StartAttaching(_Control& child, _ControlArea area);
result EndAttaching(_Control& child);
void SetParent(_Control* pParent);
- bool IsCalledCallAttachingToMainTree(void);
+ bool IsCalledCallAttachingToMainTree(void) const;
void SetCalledCallAttachingToMainTree(bool isAttaching);
- bool IsCalledCallPreAttachedToMainTree(void);
+ bool IsCalledCallPreAttachedToMainTree(void) const;
void SetCalledCallPreAttachedToMainTree(bool isAttached);
- bool IsCalledCallAttachedToMainTree(void);
+ bool IsCalledCallAttachedToMainTree(void) const;
void SetCalledCallAttachedToMainTree(bool isAttached);
result CallOnAttachingToMainTree(_Control& control);
result CallOnPreAttachedToMainTree(_Control& control);
result CallOnAttachedToMainTree(_Control& control);
result CallOnDetachingFromMainTree(_Control& control);
- void CallOnAncestorVisibleStateChanged(void);
- void CallOnAncestorEnableStateChanged(void);
- void CallOnAncestorInputEnableStateChanged(void);
+ void CallOnAncestorVisibleStateChanged(_Control& control);
+ void CallOnAncestorEnableStateChanged(_Control& control);
+ void CallOnAncestorInputEnableStateChanged(_Control& control);
void SetLayer(_ControlLayer layer);
int PrintDescription(bool printChildren, int depth, int level);
+ int PrintBacktrace(bool printChildren, int depth, bool newBacktrace);
_ITouchEventPreviewer* GetEventPreviewer(_IntToType<_UI_EVENT_TOUCH>) const;
_IKeyEventPreviewer* GetEventPreviewer(_IntToType<_UI_EVENT_KEY>) const;
void SetEventListener(_IntToType<_UI_EVENT_FOCUS>, _IFocusEventListener* pListener);
void SetEventListener(_IntToType<_UI_EVENT_NOTIFICAITON>, _INotificationEventListener* pListener);
+// DragAndDrop
+ void FireDragAndDropEvent(_DragAndDropState dragState, Tizen::Graphics::FloatPoint& dragPosition, _DragAndDropItem* pDragItem);
+
// Focus Ui
void MakeFocusList(const _Control* pControl, Tizen::Base::Collection::IListT<_Control*>* pFocusControlList) const;
void MakeChildContainerFocusList(const _Control* pControl, int startIndex, Tizen::Base::Collection::IListT<_Control*>* pFocusControlList) const;
bool __isFocusMode;
bool __isNavigatable;
bool __isFocusWindowActivationChecked;
+ bool __isChangedPositionByUser;
class ControlVisualElementContentProvider;
ControlVisualElementContentProvider* __pVisualElementContentProvider;
_Control* __pPreviousFocus;
_Control* __pNextFocus;
+ _Window* __pDragWindow;
+ bool __isDragAndDropSource;
+
struct _VisualElementDeleter
{
void operator()(Tizen::Ui::Animations::VisualElement* pVisualElement)
}
};
std::unique_ptr<Tizen::Ui::Animations::VisualElement, _VisualElementDeleter> __pFocusVisualElement;
+ std::unique_ptr<Tizen::Base::Collection::ArrayListT<void*> > __pNewBacktrace;
+ std::unique_ptr<Tizen::Base::Collection::ArrayListT<void*> > __pDeleteBacktrace;
+
+ std::unique_ptr<_DragAndDropEvent> __pDragAndDropEvent;
friend class _Window;
friend class _ControlManager;
virtual void OnEvaluateSize(Tizen::Graphics::Dimension& evaluatedSize);
virtual bool OnEvaluateSize(Tizen::Graphics::FloatDimension& evaluatedSize);
virtual void OnParentBoundsChanged(const _Control& parent);
+ virtual void OnChildAttaching(const _Control& child);
virtual void OnChildAttached(const _Control& child);
virtual void OnChildDetaching(const _Control& child);
virtual void OnChildDetached(const _Control& child);
virtual bool OnTouchReleased(const _ControlImpl& source, const _TouchInfo& touchinfo);
virtual bool OnTouchMoved(const _ControlImpl& source, const _TouchInfo& touchinfo);
virtual bool OnTouchCanceled(const _ControlImpl& source, const _TouchInfo& touchinfo);
+ virtual bool OnTouchWheeled(const _ControlImpl& source, const _TouchInfo& touchinfo);
virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _ControlImpl& source, const _TouchInfo& touchInfo);
virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _ControlImpl& source, const _TouchInfo& touchInfo);
virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _ControlImpl& source, const _TouchInfo& touchInfo);
virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _ControlImpl& source, const _TouchInfo& touchInfo);
-
- virtual _UiTouchEventDelivery OnPreviewMousePressed(const _ControlImpl& source, const _MouseInfo& mouseinfo);
- virtual _UiTouchEventDelivery OnPreviewMouseReleased(const _ControlImpl& source, const _MouseInfo& mouseinfo);
- virtual _UiTouchEventDelivery OnPreviewMouseMoved(const _ControlImpl& source, const _MouseInfo& mouseinfo);
- virtual _UiTouchEventDelivery OnPreviewMouseWheeled(const _ControlImpl& source, const _MouseInfo& mouseinfo);
-
- virtual bool OnMousePressed(const _ControlImpl& source, const _MouseInfo& mouseinfo);
- virtual bool OnMouseReleased(const _ControlImpl& source, const _MouseInfo& mouseinfo);
- virtual bool OnMouseMoved(const _ControlImpl& source, const _MouseInfo& mouseinfo);
- virtual bool OnMouseWheeled(const _ControlImpl& source, const _MouseInfo& mouseinfo);
+ virtual _UiTouchEventDelivery OnPreviewTouchWheeled(const _ControlImpl& source, const _TouchInfo& touchInfo);
virtual bool OnFocusGained(const _ControlImpl& source);
virtual bool OnFocusLost(const _ControlImpl& source);
+ virtual bool OnTraversalControlFocusGained(void);
+ virtual bool OnTraversalControlFocusLost(void);
virtual bool OnNotifiedN(const _ControlImpl& source, Tizen::Base::Collection::IList* pArgs);
virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+ virtual Tizen::Ui::_Window* OnDragAndDropBeginning(void);
+ virtual void OnDragAndDropDropping(void);
+ virtual void OnDragAndDropEntered(void);
+ virtual void OnDragAndDropMoved(const Tizen::Graphics::FloatPoint& position);
+ virtual void OnDragAndDropLeft(void);
+ virtual void OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem);
+ virtual bool IsAnimating(void) const;
+
// Control Hierarchy
bool IsAttachedToMainTree(void) const;
_ContainerImpl* GetParent(void) const;
result SetBounds(const Tizen::Graphics::Rectangle& bounds, bool callBoundsChangeCallbacks = true);
result SetBounds(const Tizen::Graphics::FloatRectangle& bounds, bool callBoundsChangeCallbacks = true);
result SetBoundsAndUpdateLayout(const Tizen::Graphics::Rectangle& bounds);
- result SetBoundsAndUpdateLayoutF(const Tizen::Graphics::FloatRectangle& bounds);
+ result SetBoundsAndUpdateLayout(const Tizen::Graphics::FloatRectangle& bounds);
result SetPosition(const Tizen::Graphics::Point& position);
result SetPosition(const Tizen::Graphics::FloatPoint& position);
result SetSize(const Tizen::Graphics::Dimension& size);
float GetTouchPressThreshold(void) const;
int GetTouchPressThresholdPixel(void) const;
+ bool IsDestroying(void) const;
+ void SetDestroyingFlag(bool destroying);
+
protected:
_ControlImpl(Control* pPublic, _Control* pCore);
static result CheckConstruction(_Control* pCore, _ControlImpl* pImpl); // Use this in the Factory methods.
bool __inputEventConsumed;
bool __focusableChangable;
+ bool __destroying;
class CoreEventListener;
CoreEventListener* __pCoreEventListener;
_Control* Release(const _ControlHandle& handle);
_Control* GetObject(const _ControlHandle& handle);
const _Control* GetObject(const _ControlHandle& handle) const;
+ _Control* GetObject(int handle);
+ const _Control* GetObject(int handle) const;
int GetUsedHandleCount(void) const;
// Operations
bool TakeFocusFromControl(const _Control& control);
// Queries
- _Control* GetTopmostTouchedControl(const Tizen::Graphics::Point& point);
+ _Control* GetTopmostTouchedControl(const Tizen::Graphics::Point& point, bool activation = false);
_Window* GetCurrentFrame(void) const;
bool IsFrameActivated(void) const;
virtual void OnSettingChanged(Tizen::Base::String& key);
+ class _HistoryInfo
+ {
+ public:
+ _HistoryInfo(_Control* pControl);
+ ~_HistoryInfo(void);
+
+ void SetBacktrace(Tizen::Base::Collection::ArrayListT<void*>& backtrace);
+
+ private:
+ _HistoryInfo(const _HistoryInfo& rhs);
+ _HistoryInfo& operator =(const _HistoryInfo& rhs);
+
+ private:
+ _Control* __pControl;
+ int __backtraceCount;
+ void** __pBacktrace;
+ };
+
+ void AddHistory(Tizen::Base::Collection::ArrayListT<_HistoryInfo*>* pHistoryList, _HistoryInfo* pHistoryInfo);
+
private:
Tizen::Base::_ObjectManagerT <_Control> __objectManager;
Tizen::Base::Collection::LinkedListT<_Window*>* __pWindowList;
int __screenDpi;
_Window* __pClipboardOwner;
std::unique_ptr<Tizen::Base::Collection::IListT<_IControlManagerEventListener*> > __pControlManagerEventListenerList;
+
+ Tizen::Base::Collection::ArrayListT<_HistoryInfo*>* __pNewHistory;
+ Tizen::Base::Collection::ArrayListT<_HistoryInfo*>* __pDeleteHistory;
}; // _ControlManager
}} // Tizen::Ui
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FUi_DragAndDropEvent.h
+ * @brief This is the header file containing the declaration of the _DragAndDropEvent class.
+ *
+ * This header file contains the declarations of the _DragAndDropEvent class.
+ */
+
+#ifndef _FUI_INTERNAL_DRAG_AND_DROP_EVENT_H_
+#define _FUI_INTERNAL_DRAG_AND_DROP_EVENT_H_
+
+#include <FBaseResult.h>
+#include <FBaseRt_Event.h>
+#include "FUi_IDragAndDropEventListener.h"
+
+namespace Tizen { namespace Ui
+{
+enum _DragAndDropState
+{
+ _DRAG_AND_DROP_STATE_BEGINNING,
+ _DRAG_AND_DROP_STATE_DROPPING,
+ _DRAG_AND_DROP_STATE_ENTERED,
+ _DRAG_AND_DROP_STATE_MOVED,
+ _DRAG_AND_DROP_STATE_LEFT,
+ _DRAG_AND_DROP_STATE_DROPPED,
+ _DRAG_AND_DROP_STATE_CANCELED,
+};
+
+class _Control;
+class _DragAndDropItem;
+
+class _DragAndDropEvent
+ : public Tizen::Base::Runtime::_Event
+{
+public:
+ static _DragAndDropEvent* CreateInstanceN(const _Control& source);
+ static Tizen::Base::Runtime::IEventArg* CreateDragAndDropEventArgN(const _Control& source, _DragAndDropState state, Tizen::Graphics::FloatPoint& point, _DragAndDropItem* pItem);
+
+ virtual ~_DragAndDropEvent(void);
+
+ const _Control* GetSource(void) const;
+
+protected:
+ virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg);
+
+private:
+ _DragAndDropEvent(const _Control& source);
+
+ _DragAndDropEvent(const _DragAndDropEvent& rhs);
+ _DragAndDropEvent& operator =(const _DragAndDropEvent& rhs);
+
+private:
+ const _Control* __pSource;
+}; // _DragAndDropEvent
+
+}} // Tizen::Ui
+
+#endif // _FUI_INTERNAL_DRAG_AND_DROP_EVENT_H_
\ No newline at end of file
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FUi_DragAndDropItem.h
+ * @brief This is the header file for the _DragAndDropItem class.
+ *
+ * This header file contains the declarations of the %_DragAndDropItem class.
+ */
+
+#ifndef _FUI_INTERNAL_DRAG_AND_DROP_ITEM_H_
+#define _FUI_INTERNAL_DRAG_AND_DROP_ITEM_H_
+
+#include <FBaseObject.h>
+
+namespace Tizen { namespace Ui
+{
+
+enum _DragAndDropType
+{
+ _DRAG_AND_DROP_TYPE_TEXT = 0x0001,
+};
+
+class _OSP_EXPORT_ _DragAndDropItem
+ : public Tizen::Base::Object
+{
+public:
+ static _DragAndDropItem* CreateInstanceN(_DragAndDropType type, const Tizen::Base::String& data);
+ virtual ~_DragAndDropItem(void);
+
+ _DragAndDropType GetDataType(void) const;
+ Tizen::Base::String GetData(void) const;
+
+private:
+ _DragAndDropItem(_DragAndDropType type, const Tizen::Base::String& data);
+ _DragAndDropItem(const _DragAndDropItem& rhs);
+ _DragAndDropItem& operator =(const _DragAndDropItem& rhs);
+
+private:
+ _DragAndDropType __type;
+ Tizen::Base::String __data;
+}; // _DragAndDropItem
+
+}} // Tizen::Ui
+
+#endif // _FUI_INTERNAL_DRAG_AND_DROP_ITEM_H_
bool IsWindowActivationEnabled(const _Window& window);
void SetWindowLevel(const _Window& window, _WindowLevel level);
_WindowLevel GetWindowLevel(const _Window& window) const;
- void SetWindowBounds(const _Window& window, const Tizen::Graphics::Rectangle& bounds);
- void SetWindowBounds(const _Window& window, const Tizen::Graphics::FloatRectangle& bounds);
+ void SetWindowBounds(const _Window& window, const Tizen::Graphics::Rectangle& bounds, bool resizeOnly = false);
+ void SetWindowBounds(const _Window& window, const Tizen::Graphics::FloatRectangle& bounds, bool resizeOnly = false);
void SetWindowVisibleState(const _Window& window, bool visibleState);
void AllowSetWindowBounds(bool allow);
bool IsWindowVisible(const _Window& window);
+ Tizen::Graphics::Rectangle GetWindowBounds(const _Window& window) const;
+ void SetPartialScreenEnabled(const _Window& window);
result SetEventPropagation(const _Control& control, bool enable);
result SetFocus(const _Control& control, bool focus);
bool IsAccessibilityScreenReaderActivated(void);
+ void SetDragAndDropEnabled(const _Window& window);
+ result DragAndDropBegin(const _Window& window, const Tizen::Base::String& string);
+ result DragAndDropDrop(const _Window& window);
+ Tizen::Graphics::Point GetDropPosition(void);
+ Tizen::Base::String GetDropData(void);
+ void SetDragAndDropState(bool state);
+ bool GetDragAndDropState(void) const;
+ void SetDragAndDropSourceHandle(_ControlHandle handle);
+ _ControlHandle GetDragAndDropSourceHandle(void) const;
+ void SetDragAndDropTargetHandle(_ControlHandle handle);
+ _ControlHandle GetDragAndDropTargetHandle(void) const;
+
// [ToDo] Remove API
bool GetFloatingMode(void) const;
Tizen::Graphics::Rectangle GetIndicatorBounds(const _Window& window) const;
const _Control* __pFrame;
bool __changeBounds;
bool __openClipboard;
+
+ Ecore_Event_Handler* __pDragAndDropEnter;
+ Ecore_Event_Handler* __pDragAndDropPosition;
+ Ecore_Event_Handler* __pDragAndDropLeave;
+ Ecore_Event_Handler* __pDragAndDropDrop;
+ Ecore_Event_Handler* __pDragAndDropSelection;
+ Ecore_Event_Handler* __pDragAndDropFinish;
+ Ecore_Event_Handler* __pDragAndDropStatus;
+
+ Tizen::Base::String __dropData;
+ bool __dragAndDropState;
+ _ControlHandle __dragAndDropSourceHandle;
+ _ControlHandle __dragAndDropTargetHandle;
}; // _EcoreEvas
}} // Tizen::Ui
static void ReleaseInstance(void);
bool IsFocusModeStateEnabled(void) const;
+ void SetFocusModeStateEnabled(bool enabled);
bool IsForwardDirection(void) const;
bool IsFocusable(_Control* pControl) const;
+ bool IsFocusControlListControl(_Control* pControl) const;
private:
/**
void StartFocusTraversal(_Control* pControl, FocusDirection focusDirection);
int GetNextIndex(int currentIndex, FocusDirection focusDirection, const Tizen::Base::Collection::IListT<_Control*>* pFocusControlList) const;
_Control* FindTraversalControlFromChild(_Control* pControl);
- bool IsFocusControlListControl(_Control* pControl) const;
private:
static _FocusManagerImpl* __pInstance;
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FUi_IDragAndDropEventListener.h
+ * @brief This is the header file for the %_IDragAndDropEventListener interface.
+ *
+ * This header file contains the declarations of the %_IDragAndDropEventListener interface. @n
+ * If the item event is generated, a method of this interface will be called. @n
+ * The applications that perform tasks related to the item event, must call methods of this interface.
+ */
+
+#ifndef _FUI_INTERNAL_IDRAG_AND_DROP_EVENT_LISTENER_H_
+#define _FUI_INTERNAL_IDRAG_AND_DROP_EVENT_LISTENER_H_
+
+#include <FBaseRtIEventListener.h>
+#include <FGrpFloatPoint.h>
+#include "FUi_DragAndDropItem.h"
+
+namespace Tizen { namespace Ui
+{
+class _Control;
+
+class _OSP_EXPORT_ _IDragAndDropEventListener
+ : virtual public Tizen::Base::Runtime::IEventListener
+{
+public:
+ virtual ~_IDragAndDropEventListener(void) {}
+
+ virtual void OnDragAndDropBeginning(const _Control& source) = 0;
+ virtual void OnDragAndDropDropping(const _Control& source) = 0;
+ virtual void OnDragAndDropEntered(const _Control& source) = 0;
+ virtual void OnDragAndDropMoved(const _Control& source, const Tizen::Graphics::FloatPoint& dragPosition) = 0;
+ virtual void OnDragAndDropLeft(const _Control& source) = 0;
+ virtual void OnDragAndDropDropped(const _Control& source, const _DragAndDropItem& item) = 0;
+ virtual void OnDragAndDropCanceled(const _Control& source) = 0;
+
+protected:
+ //
+ // This method is for internal use only. Using this method can cause behavioral, security-related,
+ // and consistency-related issues in the application.
+ //
+ // This method is reserved and may change its name at any time without prior notice.
+ //
+ virtual void _IDragAndDropEventListener_Reserved1(void) {}
+
+ //
+ // This method is for internal use only. Using this method can cause behavioral, security-related,
+ // and consistency-related issues in the application.
+ //
+ // This method is reserved and may change its name at any time without prior notice.
+ //
+ virtual void _IDragAndDropEventListener_Reserved2(void) {}
+
+ //
+ // This method is for internal use only. Using this method can cause behavioral, security-related,
+ // and consistency-related issues in the application.
+ //
+ // This method is reserved and may change its name at any time without prior notice.
+ //
+ virtual void _IDragAndDropEventListener_Reserved3(void) {}
+
+ //
+ // This method is for internal use only. Using this method can cause behavioral, security-related,
+ // and consistency-related issues in the application.
+ //
+ // This method is reserved and may change its name at any time without prior notice.
+ //
+ virtual void _IDragAndDropEventListener_Reserved4(void) {}
+
+ //
+ // This method is for internal use only. Using this method can cause behavioral, security-related,
+ // and consistency-related issues in the application.
+ //
+ // This method is reserved and may change its name at any time without prior notice.
+ //
+ virtual void _IDragAndDropEventListener_Reserved5(void) {}
+}; // _IDragAndDropEventListener
+
+}} // Tizen::Ui
+
+#endif // _FUI_INTERNAL_IDRAG_AND_DROP_EVENT_LISTENER_H_
class _Control;
class _TouchInfo;
-class _MouseInfo;
/**
* @interface _ITouchEventListener
*/
class _ITouchEventListener
: virtual public _IUiEventListener
- , virtual public Tizen::Base::Runtime::IEventListener
{
// Operation
public:
*/
virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) = 0;
- virtual bool OnMousePressed(const _Control& source, const _MouseInfo& mouseinfo){return false;}
-
- virtual bool OnMouseReleased(const _Control& source, const _MouseInfo& mouseinfo){return false;}
-
- virtual bool OnMouseMoved(const _Control& source, const _MouseInfo& mouseinfo){return false;}
-
- virtual bool OnMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo){return false;}
+ virtual bool OnTouchWheeled(const _Control& source, const _TouchInfo& touchinfo){return false;}
}; // _ITouchEventListener
}} // Tizen::Ui
class _Control;
class _TouchInfo;
-class _MouseInfo;
/**
* @interface _ITouchEventPreviewer
*/
class _ITouchEventPreviewer
: virtual public _IUiEventPreviewer
- , virtual public Tizen::Base::Runtime::IEventListener
{
// Operation
public:
*/
virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) = 0;
- virtual _UiTouchEventDelivery OnPreviewMousePressed(const _Control& source, const _MouseInfo& mouseinfo){return _UI_TOUCH_EVENT_DELIVERY_YES;}
-
- virtual _UiTouchEventDelivery OnPreviewMouseReleased(const _Control& source, const _MouseInfo& mouseinfo){return _UI_TOUCH_EVENT_DELIVERY_YES;}
-
- virtual _UiTouchEventDelivery OnPreviewMouseMoved(const _Control& source, const _MouseInfo& mouseinfo){return _UI_TOUCH_EVENT_DELIVERY_YES;}
-
- virtual _UiTouchEventDelivery OnPreviewMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo){return _UI_TOUCH_EVENT_DELIVERY_YES;}
+ virtual _UiTouchEventDelivery OnPreviewTouchWheeled(const _Control& source, const _TouchInfo& touchinfo){return _UI_TOUCH_EVENT_DELIVERY_YES;}
}; // _ITouchEventPreviewer
}} // Tizen::Ui
virtual result UnregisterKeyEventHandler(const _Control& control) = 0;
virtual result UnregisterTouchEventHandler(const _Control& control) = 0;
virtual result PostEvent(const _UiEvent& event) = 0;
+ virtual void ClearEventQueue(void) = 0;
}; // _IUiEventManager
}} // Tizen::Ui
int BeginMainLoop(unsigned long timeOut, int exitCode);
int EndMainLoop(int exitCode, bool endAllLoops);
int GetLastExitCode(void);
+ void SetLastExitCode(int lastExitCode);
virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
DECLARE_DIMENSION_CONFIG(DEFAULT_SIZE, 1);
DECLARE_DIMENSION_CONFIG(ARROW_BUTTON_ARROW_ICON_SIZE, 2);
//Shape config
- DECLARE_SHAPE_CONFIG(ARROW_BUTTON_LEFT_MARGIN, 1);
+ DECLARE_SHAPE_CONFIG(LEFT_RIGHT_MARGIN, 1);
DECLARE_SHAPE_CONFIG(ARROW_BUTON_TOP_MARGIN, 2);
DECLARE_SHAPE_CONFIG(BAR_TOP_MARGIN, 3);
DECLARE_SHAPE_CONFIG(BAR_LEFT_RIGHT_MARGIN, 4);
DECLARE_SHAPE_CONFIG(BAR_WIDTH, 11);
DECLARE_SHAPE_CONFIG(DIVIDER_MARGIN, 12);
DECLARE_SHAPE_CONFIG(DIVIDER_WIDTH, 13);
+ DECLARE_SHAPE_CONFIG(HEIGHT, 14);
//Fixed Value config
DECLARE_FIXED_VALUE_CONFIG(BLOCK_MARGIN, 1);
DECLARE_END_UI_CONFIG(COLORPICKER);
namespace Tizen { namespace Ui { namespace _Resource
{
-typedef bool (*_Init_Func)(MapContainer& table, const Tizen::Base::String& mode);
+typedef bool (*_Init_Func)(MapContainer& table, const Tizen::Base::String& mode, bool bPreInit);
class ConfigLoader
{
}\
}\
};\
- static void AddConfig(MapContainer & table, const Tizen::Base::String& mode, const Tizen::Base::String& version);\
- static bool Initialize(MapContainer & table, const Tizen::Base::String & mode)\
+ static void AddConfig(MapContainer & table, const Tizen::Base::String& mode, const Tizen::Base::String& version, bool bPreInit);\
+ static bool Initialize(MapContainer & table, const Tizen::Base::String & mode, bool bPreInit)\
{\
- AddConfig(table, mode, GetAPIVersion());\
+ AddConfig(table, mode, GetAPIVersion(), bPreInit);\
return true;\
};\
static const int _VALUE_ = TypeDefined::__##x##__ << 24;
}}\
namespace Tizen { namespace Ui { namespace _Resource\
{\
-void _##control::AddConfig(MapContainer & table, const Tizen::Base::String& mode, const Tizen::Base::String& version)\
+void _##control::AddConfig(MapContainer & table, const Tizen::Base::String& mode, const Tizen::Base::String& version, bool bPreInit)\
{
#define START_UI_CONFIG_API_VERSION(ver)\
#define END_UI_CONFIG_MODE(_mode)\
}
-#define ADD_DIMENSION_CONFIG(key, width, height) AddDimensionConfig(table, key##_DIMENSION, width, height);
-#define ADD_COLOR_CONFIG(key, value) AddColorConfig(table, key##_COLOR, #value);\
+#define ADD_DIMENSION_CONFIG(key, width, height) if(!bPreInit)AddDimensionConfig(table, key##_DIMENSION, width, height);
+#define ADD_COLOR_CONFIG(key, value) if(bPreInit)AddColorConfig(table, key##_COLOR, #value);\
-#define ADD_SHAPE_CONFIG(key, value) AddShapeConfig(table, key##_SHAPE, value);
-#define ADD_FIXED_VALUE_CONFIG(key, value) AddFixedValueConfig(table, key##_FIXED_VALUE, value);
-#define ADD_IMAGE_CONFIG(key, value) AddImageConfig(table, key##_IMAGE, #value);
+#define ADD_SHAPE_CONFIG(key, value) if(!bPreInit)AddShapeConfig(table, key##_SHAPE, value);
+#define ADD_FIXED_VALUE_CONFIG(key, value) if(!bPreInit)AddFixedValueConfig(table, key##_FIXED_VALUE, value);
+#define ADD_IMAGE_CONFIG(key, value) if(bPreInit)AddImageConfig(table, key##_IMAGE, #value);
#define START_ANIMATION_CONFIG(key)\
+ if(bPreInit)\
+ {\
Map* pAnimationMap = table.GetAnimationMap();\
if (pAnimationMap != null)\
{\
ResourceItem* pItem = new (std::nothrow) ResourceItem(RESOURCE_TYPE_ANIMATION);\
pItem->SetRawDataAnimation(pList);\
pAnimationMap->Add(key##_ANIMATION, pItem);\
- }
+ }}
#define END_UI_CONFIG(control)\
};\
DECLARE_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_HEIGHT, 43)
DECLARE_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_POSITION_X, 44)
DECLARE_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_POSITION_Y, 45)
+ DECLARE_SHAPE_CONFIG(DRAG_AND_DROP_WINDOW_WIDTH, 46)
+ DECLARE_SHAPE_CONFIG(DRAG_AND_DROP_WINDOW_HEIGHT, 47)
+
DECLARE_END_UI_CONFIG(EDIT);
#endif //_FUI_RESOURCE_EDIT_CONFIG_H_
DECLARE_SHAPE_CONFIG(BUTTON_ITEM_MULTILINE_FONT_SIZE, 44);
DECLARE_SHAPE_CONFIG(SOFTKEY_MULTILINE_TEXT_SIZE, 45);
DECLARE_SHAPE_CONFIG(TAB_LARGE_HEIGHT, 46);
+ DECLARE_SHAPE_CONFIG(DIVIDER_HEIGHT, 47);
+
DECLARE_DIMENSION_CONFIG(SOFTKEY_RECT, 1);
DECLARE_DIMENSION_CONFIG(SOFTKEY_RECT_WITH_TEXT, 2);
DECLARE_SHAPE_CONFIG(INDICATOR_HEIGHT, 2)
DECLARE_SHAPE_CONFIG(INDICATOR_MINIMIZE_WIDTH, 3)
DECLARE_SHAPE_CONFIG(INDICATOR_MINIMIZE_HEIGHT, 4)
+ DECLARE_SHAPE_CONFIG(INDICATOR_TOUCH_GAP, 5)
DECLARE_END_UI_CONFIG(FORM);
#endif //_FUI_RESOURCE_FORM_CONFIG_H_
\ No newline at end of file
DECLARE_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE_3_ITEM, 13);
DECLARE_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE_4_ITEM, 14);
DECLARE_SHAPE_CONFIG(BADGE_FONT_SIZE, 15);
- DECLARE_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON, 16);
- DECLARE_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON_2, 17);
+ //DECLARE_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON, 16);
+ //DECLARE_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON_2, 17);
DECLARE_SHAPE_CONFIG(TITLE_DISPLAY_HEIGHT, 18);
DECLARE_SHAPE_CONFIG(TITLE_TOP_MARGIN_WITH_DESCRIPTION, 19);
DECLARE_SHAPE_CONFIG(TITLE_DISPLAY_HEIGHT_WITH_DESCRIPTION, 20);
DECLARE_SHAPE_CONFIG(DIVIDER_WIDTH, 49);
DECLARE_SHAPE_CONFIG(DIVIDER_HEIGHT, 50);
DECLARE_SHAPE_CONFIG(BADGE_HEIGHT, 51);
- DECLARE_SHAPE_CONFIG(BADGE_HEIGHT_WITH_BUTTON, 52);
- DECLARE_SHAPE_CONFIG(BADGE_WIDTH_1DIGIT, 53);
- DECLARE_SHAPE_CONFIG(BADGE_WIDTH_2DIGIT, 54);
- DECLARE_SHAPE_CONFIG(BADGE_WIDTH_3DIGIT, 55);
- DECLARE_SHAPE_CONFIG(BADGE_WIDTH_4DIGIT, 56);
- DECLARE_SHAPE_CONFIG(BADGE_WIDTH_5DIGIT, 57);
+ //DECLARE_SHAPE_CONFIG(BADGE_HEIGHT_WITH_BUTTON, 52);
+ //DECLARE_SHAPE_CONFIG(BADGE_WIDTH_1DIGIT, 53);
+ //DECLARE_SHAPE_CONFIG(BADGE_WIDTH_2DIGIT, 54);
+ //DECLARE_SHAPE_CONFIG(BADGE_WIDTH_3DIGIT, 55);
+ //DECLARE_SHAPE_CONFIG(BADGE_WIDTH_4DIGIT, 56);
+ //DECLARE_SHAPE_CONFIG(BADGE_WIDTH_5DIGIT, 57);
DECLARE_SHAPE_CONFIG(TITLE_BADGE_ICON_GAP, 58);
DECLARE_SHAPE_CONFIG(TITLE_BADGE_TOP_MARGIN, 59);
DECLARE_SHAPE_CONFIG(HEADER_ITEM_SELECTED_BITMAP_MARGIN, 60);
//DECLARE_SHAPE_CONFIG(TAB_BUTTON_ITEM_TOP_TOUCH_MARGIN, 81);
//DECLARE_SHAPE_CONFIG(TAB_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 82);
//DECLARE_SHAPE_CONFIG(TAB_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 83);
-
+ DECLARE_SHAPE_CONFIG(BADGE_MIN_WIDTH, 84);
+ DECLARE_SHAPE_CONFIG(BADGE_SIDE_MARGIN, 85);
DECLARE_END_UI_CONFIG(HEADER);
class StringLoader;
class ConfigLoader;
class MapContainer;
+class ConfigParser;
}}}
namespace Tizen { namespace Ui
_RESOURCE_FEEDBACK_PATTERN_SLIDER_SWEEP
}; // enum _ResourceFeedbackPattern
- namespace Controls { namespace __Internal
- {
- const int OVERLAY_REGION_MIN_LENGTH = 16;
- }}//Tizen::Ui::Controls::__Internal
-
#define GET_SHAPE_CONFIG(shapeId, orientation, x)\
Tizen::Ui::_ResourceManager::GetInstance()->GetShape(Tizen::Ui::_Resource::_##shapeId##_SHAPE, orientation, x)
class _OSP_EXPORT_ _ResourceManager
{
public:
+ static void PreInitialize(void);
static _ResourceManager* GetInstance(void);
- result GetBitmapN(int bitmapId, Tizen::Graphics::BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool replacementColor, int color, Tizen::Graphics::Bitmap*& pBitmap);
+ result GetBitmapN(int bitmapId, Tizen::Graphics::BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool replacementColor, const Tizen::Graphics::Color& color, Tizen::Graphics::Bitmap*& pBitmap);
result GetString(const char* stringId, Tizen::Base::String& string);
result GetColor(int colorId, Tizen::Graphics::Color& color);
result GetShape(int shapeId, _ControlOrientation orientation, int& value);
~_ResourceManager(void);
static void CreateInstance(void);
+ void PostInitialize(void);
void DoPostInitialization(void);
+ void SelectConfigTable(void);
_ResourceManager(const _ResourceManager& rhs);
_ResourceManager& operator =(const _ResourceManager& rhs);
MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE = 3,
MAP_CONTAINER_TYPE_MAX = 4,
};
- result GetBitmapInternalN(const Tizen::Base::String& fileName, Tizen::Graphics::BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool isCustom, bool replacementColor, int color, Tizen::Graphics::Bitmap*& pBitmap);
+ result GetBitmapInternalN(const Tizen::Base::String& fileName, Tizen::Graphics::BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool isCustom, bool replacementColor, const Tizen::Graphics::Color& color, Tizen::Graphics::Bitmap*& pBitmap);
result GetDefaultShapeWithScaling(int shapeId, _ControlOrientation orientation, int& value);
result GetDefaultShapeWithScaling(int shapeId, _ControlOrientation orientation, Tizen::Graphics::Dimension& value);
result GetDefaultShapeWithScaling(int shapeId, _ControlOrientation orientation, float& value);
result GetDefaultShapeWithScaling(int shapeId, _ControlOrientation orientation, Tizen::Graphics::FloatDimension& value);
result LoadThemeInformation(Tizen::Base::String& systemTheme, Tizen::Base::String& userTheme);
bool InitializeTheme(_Resource::MapContainer& mapContainer);
- void LoadConfig(const Tizen::Base::String& resolution, _Resource::MapContainer& mapContainer, int width, int height);
+ void LoadConfig(const Tizen::Base::String& resolution, _Resource::MapContainer& mapContainer, int width, int height, bool preInit);
_Resource::MapContainer* GetMapContainer(MapContainerType type);
void SetSystemColor(void);
Tizen::Base::String FindImagePath(const Tizen::Base::String& fileName, int& findFolder, bool isCustom);
};
_Resource::StringLoader* __pStringLoader;
+ _Resource::ConfigParser* __pParser;
_Resource::MapContainer* __pMapContainer[MAP_CONTAINER_TYPE_MAX];
Tizen::Graphics::_ICoordinateSystemTransformer* __pTransformer;
Tizen::Base::String __appBasePortraitMode;
Tizen::Base::String __userTheme;
bool __appliedUserTheme;
bool __initializeFeedback;
+ bool __preInitialize;
+ bool __postInitialize;
int __appBaseWidth;
int __appBaseHeight;
int __targetWidth;
__charKey= null;
__pRefCount = null;
}
- /*
- ResourceKey& operator =(int value)
- {
- if(__intKey == value)
- {
- return *this;
- }
- if (*__pRefCount == 1)
- {
- delete[] __charKey;
- delete __pRefCount;
- }
- else
- {
- --(*__pRefCount);
- }
- __charKey= null;
- __pRefCount = null
- __intKey = value;
- return *this;
- }
-
- ResourceKey& operator =(char* value)
- {
- if (strcmp(__charKey, value) == 0)
- {
- return *this;
- }
- else
- {
- __intKey = 0;
- if (__bAllocate && __charKey)
- {
- delete [] __charKey;
- }
- int len = strlen(value);
- __charKey = new (std::nothrow) char [len+1];
- strcpy(__charKey, value);
- __charKey[len] = '\0';
- __bAllocate = true;
- }
- return *this;
- }
-*/
ResourceKey(const ResourceKey& rhs)
:__intKey(0)
, __hash(0)
return hash;
}
-private:
+//private:
int __intKey;
int __hash;
char* __charKey;
SysTryReturnVoidResult(NID_UI, __pComparer, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
__modifiedItemTable.Construct(0,0,*__pProvider, *__pComparer);
}
+
+ virtual result Add(const ResourceKey& key, ResourceItem*& value)
+ {
+ result r = E_SYSTEM;
+ bool exist = false;
+ Tizen::Base::Collection::HashMapT<ResourceKey, ResourceItem*>::ContainsKey(key,exist);
+ if(exist == false)
+ {
+ r = Tizen::Base::Collection::HashMapT<ResourceKey, ResourceItem*>::Add(key,value);
+ }
+ else
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+ }
virtual ~Map(void)
{
result r = E_SUCCESS;
Map* GetShapeMap(void) const;
Map* GetAnimationMap(void) const;
Map* GetPalette(void) const;
+ Map* GetPalette(const Tizen::Base::String& name) const;
+ void SetPalette(const Tizen::Base::String& name);
void SetVersion(const Tizen::Base::String& information);
Tizen::Base::String GetVersion(void);
void SetThemeName(const Tizen::Base::String& ThemeName);
Map* __pImageMap;
Map* __pShapeMap;
Map* __pAnimationMap;
+ Map* __pBlackPalette;
+ Map* __pWhitePalette;
+ Map* __pDefaultPalette;
Map* __pPalette;
+
Tizen::Base::Collection::IHashCodeProviderT<ResourceKey>* __pProvider;
Tizen::Base::Collection::IComparerT<ResourceKey>* __pComparer;
DECLARE_SHAPE_CONFIG(ITEM_BG_PRESSED_LEFT_RIGHT_MARGIN, 25);
DECLARE_SHAPE_CONFIG(ITEM_BG_PRESSED_TOP_BOTTOM_MARGIN, 26);
DECLARE_SHAPE_CONFIG(SCROLL_PANEL_MARGIN, 27);
+ DECLARE_SHAPE_CONFIG(ANIMATION_DISTANCE_Y, 28);
DECLARE_END_UI_CONFIG(OPTIONMENU);
DECLARE_SHAPE_CONFIG(ITEM_MAX_WIDTH, 7);
DECLARE_SHAPE_CONFIG(ITEM_HEIGHT, 8);
DECLARE_SHAPE_CONFIG(HEIGHT, 9);
- DECLARE_SHAPE_CONFIG(ITEM_COUNT_MAX, 10);
- DECLARE_SHAPE_CONFIG(ARROW_MARGIN, 11);
+ DECLARE_SHAPE_CONFIG(ARROW_MARGIN, 10);
+ DECLARE_FIXED_VALUE_CONFIG(ITEM_COUNT_MAX, 1);
DECLARE_END_UI_CONFIG(TABBAR);
#endif //_FUI_RESOURCE_TAB_BAR_CONFIG_H_
class _TouchEventArg;
class _ITouchEventListener;
+const int DEVICE_COUNT = 999;
+
class _OSP_EXPORT_ _TouchManager
{
public:
_Control* GetChangedTouchableTarget(void);
+ void SetListenerOnly(int pointId, bool listenerOnly);
+
+ bool IsListenerOnly(int pointId) const;
+
private:
/**
* This is the default class constructor.
bool __captureAllowOwnerBounds;
bool __isSendingDelayedEvent;
bool __touchCanceledOnGestureSuccess;
+ bool __listenerOnly[DEVICE_COUNT];
_Control* __changedTouchableTarget;
}; // _TouchManager
virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
+ void EnableToDeleteTimer(bool deleteTimer);
+ void ResetGestureTimerManager(void);
+ bool IsTouchCanceled(void) const;
+
private:
_TouchTapGestureDetector(const _TouchTapGestureDetector& value);
_TouchTapGestureDetector& operator =(const _TouchTapGestureDetector& value);
int __tapCount;
int __interval;
int __touchCount;
- float __oneTapMoveAllowance;
- bool __oneTapIsInBounds;
unsigned int __maxPointId;
Tizen::Graphics::FloatPoint __oneTapStartPoint;
_TouchGestureTimerManager* __pGestureTimerManager;
+ bool __deleteTimer;
+ bool __touchCanceled;
class _TapInfo;
Tizen::Base::Collection::ArrayListT<_TapInfo*>* __pTapInfoList;
#include <FGrpDimension.h>
#include <FBase_ObjectManagerT.h>
+#define PARTIAL_SCREEN // Temp
+
namespace Tizen { namespace Ui
{
#ifndef _FUI_INTERNAL_UI_BUILDER_CONFIG_H_
#define _FUI_INTERNAL_UI_BUILDER_CONFIG_H_
-const int UIBUILDER_CONTROL_TEXT_MAX_LENGTH = 1000;
const int UIBUILDER_CONTROL_ELEMENT_NUMBER = 100;
const int UIBUILDER_CONTROL_MAX_COUNT = 100;
result GenerateKeyEvent(KeyState keyState, _KeyCode keyCode, _KeyModifier keyModifier, bool async = true);
result GenerateTouchEvent(_TouchStatus touchStatus, int x, int y, bool async = true);
+ void ClearEventQueue(void);
+
_IUiEventManager* GetEventManager(void) const;
private:
_TOUCH_FOCUS_IN = TOUCH_FOCUS_IN, /**< Touch focus-in event type */
_TOUCH_FOCUS_OUT = TOUCH_FOCUS_OUT, /**< Touch focus-out event type */
_TOUCH_CANCELED = TOUCH_CANCELED, /**< Touch canceled event type */
- _WHEEL_MOVED = TOUCH_CANCELED+1, /**< Touch moved event type */
+ _TOUCH_WHEELED = TOUCH_CANCELED+1, /**< Touch wheeled event type */
+};
+
+enum _TouchButtons
+{
+ _TOUCH_BUTTON_NONE = 0,
+ _TOUCH_BUTTON_LEFT,
+ _TOUCH_BUTTON_WHEEL,
+ _TOUCH_BUTTON_RIGHT
};
enum _MouseButtons
{
public:
_TouchInfo(void);
- _TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::Point& current, const bool isFlick, long long timeStamp);
- _TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::FloatPoint& current, const bool isFlick, long long timeStamp);
+ _TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::Point& current, const bool isFlick, long long timeStamp, int zAxis = 0, unsigned int buttons = _TOUCH_BUTTON_NONE);
+ _TouchInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::FloatPoint& current, const bool isFlick, long long timeStamp, int zAxis = 0, unsigned int buttons = _TOUCH_BUTTON_NONE);
_TouchInfo(const _TouchInfo& rhs);
_TouchInfo& operator =(const _TouchInfo& rhs);
~_TouchInfo(void);
bool IsFlicked(void) const;
long long GetTimeStamp(void) const;
- void SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::Point& current, bool isFlick, long long timeStamp);
- void SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::FloatPoint& current, bool isFlick, long long timeStamp);
-
-private:
- unsigned long __pointId;
- _TouchStatus __touchStatus;
- Tizen::Graphics::FloatPoint __currentPosition;
- bool __isFlicked;
- long long __timeStamp;
-}; // _TouchInfo
-
-class _OSP_EXPORT_ _MouseInfo
-{
-public:
- _MouseInfo(void);
- _MouseInfo(unsigned long pointId, _TouchStatus status, const Tizen::Graphics::FloatPoint& current, int zAxis, int buttons, const bool isFlick, long long timeStamp);
- _MouseInfo(const _MouseInfo& rhs);
- _MouseInfo& operator =(const _MouseInfo& rhs);
- ~_MouseInfo(void);
-
-public:
- /**
- * This method returns the touch status.
- *
- * @since 2.0
- * @return The touch status
- */
- _TouchStatus GetTouchStatus(void) const;
-
- /**
- * This method returns the current position of the touch event.
- *
- * @since 2.0
- * @return The current position of the touch event
- */
- Tizen::Graphics::FloatPoint GetCurrentPosition(void) const;
-
- /**
- * This method returns the touch pointId.
- *
- * @since 2.0
- * @return The touch pointId
- */
- unsigned long GetPointId(void) const;
-
int GetZAxis(void) const;
-
- int GetButtons(void) const;
-
- bool IsFlicked(void) const;
- long long GetTimeStamp(void) const;
- void SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::Point& current, int zAxis, int buttons, bool isFlick, long long timeStamp);
- void SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::FloatPoint& current, int zAxis, int buttons, bool isFlick, long long timeStamp);
+ unsigned int GetButtons(void) const;
+ void SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::Point& current, bool isFlick, long long timeStamp, int zAxis = 0, unsigned int buttons = _TOUCH_BUTTON_NONE);
+ void SetTouchInfo(unsigned long pointId, _TouchStatus status, Tizen::Graphics::FloatPoint& current, bool isFlick, long long timeStamp, int zAxis = 0, unsigned int buttons = _TOUCH_BUTTON_NONE);
private:
unsigned long __pointId;
_TouchStatus __touchStatus;
Tizen::Graphics::FloatPoint __currentPosition;
- int __zAxis;
- int __buttons;
bool __isFlicked;
long long __timeStamp;
+ int __zAxis;
+ unsigned int __buttons;
}; // _TouchInfo
class _ITouchEventListener;
std::tr1::shared_ptr<Tizen::Base::Collection::IListT<_Control*> > __pForcedControlList;
}; // _UiTouchEvent
-/**
-* This is internal. If used in an application, the application can get rejected during the certification process.
-* @class _UiMouseEvent
-* @brief This class impliments _UiMouseEvent and
-* fire the Window Event object of a Ui Control.
-*/
-class _OSP_EXPORT_ _UiMouseEvent
- : public _UiEvent
-{
-// Lifecycle
-public:
- /**
- * This is the default class constructor.
- *
- */
- _UiMouseEvent(const _UiObjectHandle& destination, const _MouseInfo& mouseInfo, _UiEventRouteType routeType = _UI_EVENT_ROUTE_TUNNEL_BUBBLE, const _UiObjectHandle& source = _UiObjectHandle());
- _UiMouseEvent(const _UiMouseEvent& rhs);
-
- /**
- * This is the default class destructor.
- *
- */
- virtual ~_UiMouseEvent(void);
-
-public:
- _UiMouseEvent& operator =(const _UiMouseEvent& rhs);
-
-public:
- const _MouseInfo* GetTouchInfo(void) const;
-
-private:
- virtual _UiMouseEvent* CloneN(void) const;
- virtual _UiEventType GetEventType(void) const;
- virtual bool IsEventEnabled(const _Control& control) const;
- virtual result OnPreviewEventProcessing(const _Control& control, bool& isFiltered);
- virtual result OnEventProcessing(const _Control& control, bool& isFiltered);
- virtual result OnListenerProcessing(const _IUiEventListener& listener, bool& isFiltered);
- virtual result OnEventHandled(const _Control& control);
-
-private:
- result ProcessGesture(const _Control& control, bool& isFiltered);
- result FireListener(const _ITouchEventListener* pListener, const _Control* pControl, bool isTouchEvent, bool& isFiltered);
- result FirePreviewListener(const _ITouchEventPreviewer* pListener, const _Control* pControl, bool& isFiltered);
- Tizen::Graphics::FloatPoint GetRelativePoint(const _Control& control, const Tizen::Graphics::FloatPoint& point) const;
- result ResetTouchInfo(const _Control* pControl, const _MouseInfo& mouseInfo);
- bool ExistGlobalGesture(void);
-
-private:
- _MouseInfo __mouseInfo;
- std::tr1::shared_ptr<Tizen::Base::Collection::IListT<_Control*> > __pForcedControlList;
-};
-
}} // Tizen::Ui
#endif //_FUI_INTERNAL_UI_TOUCH_EVENT_H_
_Control* __pOwner;
_IWindowDelegate* __pWindowDelegate;
bool __activated;
- bool __destroying;
Tizen::Ui::Animations::_RootVisualElement* __pRootVisualElement;
Tizen::Ui::Animations::_NativeLayer* __pLayer;
ADD_IMAGE_CONFIG(SATURATION_BAR__LANDSCAPE_NORMAL, #00_color_picker_saturation_h.png);
ADD_IMAGE_CONFIG(BAR_BG_LANDSCAPE_NORMAL, #00_color_picker_custom_color_h.png);
- START_UI_CONFIG_MODE(800x480);
- {
- ADD_DIMENSION_CONFIG(DEFAULT_SIZE, 800, 225);
- }
- END_UI_CONFIG_MODE(800x480);
-
START_UI_CONFIG_MODE(720x1280);
{
- ADD_SHAPE_CONFIG(ARROW_BUTTON_LEFT_MARGIN, 16);
ADD_SHAPE_CONFIG(ARROW_BUTON_TOP_MARGIN, 19);
ADD_SHAPE_CONFIG(BAR_TOP_MARGIN, 26);
ADD_SHAPE_CONFIG(BAR_LEFT_RIGHT_MARGIN, 15);
ADD_FIXED_VALUE_CONFIG(BLOCK_MARGIN, 1);
ADD_SHAPE_CONFIG(BAR_WIDTH, 477);
ADD_SHAPE_CONFIG(DIVIDER_MARGIN, 16);
- ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 656);
+ ADD_SHAPE_CONFIG(LEFT_RIGHT_MARGIN, 16);
+ ADD_SHAPE_CONFIG(HEIGHT, 336);
ADD_DIMENSION_CONFIG(ARROW_BUTTON_ARROW_ICON_SIZE, 45, 45);
ADD_DIMENSION_CONFIG(DEFAULT_SIZE, 688, 336);
}
START_UI_CONFIG_MODE(1280x720);
{
- ADD_SHAPE_CONFIG(ARROW_BUTTON_LEFT_MARGIN, 184);
ADD_SHAPE_CONFIG(BAR_WIDTH, 702);
- ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 1216);
ADD_DIMENSION_CONFIG(DEFAULT_SIZE, 1248, 336);
}
END_UI_CONFIG_MODE(1280x720);
ADD_SHAPE_CONFIG(FIELD_BOTTOM_MARGIN, 0);
ADD_SHAPE_CONFIG(FIELD_TEXT_LEFT_MARGIN, 16);
ADD_SHAPE_CONFIG(FIELD_TEXT_RIGHT_MARGIN, 16);
- ADD_SHAPE_CONFIG(FIELD_TEXT_TOP_MARGIN, 10);
- ADD_SHAPE_CONFIG(FIELD_TEXT_BOTTOM_MARGIN, 10);
+ ADD_SHAPE_CONFIG(FIELD_TEXT_TOP_MARGIN, 3);
+ ADD_SHAPE_CONFIG(FIELD_TEXT_BOTTOM_MARGIN, 3);
ADD_SHAPE_CONFIG(FIELD_TITLE_TEXT_LEFT_MARGIN, 16);
ADD_SHAPE_CONFIG(FIELD_TITLE_TEXT_RIGHT_MARGIN, 16);
ADD_SHAPE_CONFIG(FIELD_TITLE_TEXT_TOP_MARGIN, 10);
ADD_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_HEIGHT, 70);
ADD_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_POSITION_X, 18);
ADD_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_POSITION_Y, 18);
+ ADD_SHAPE_CONFIG(DRAG_AND_DROP_WINDOW_WIDTH, 300);
+ ADD_SHAPE_CONFIG(DRAG_AND_DROP_WINDOW_HEIGHT, 40);
ADD_DIMENSION_CONFIG(MIN_SIZE, 48, 60);
ADD_DIMENSION_CONFIG(TITLE_STYLE_MIN_SIZE, 48, 102);
ADD_SHAPE_CONFIG(WIDTH, 720);
ADD_SHAPE_CONFIG(LEFT_MARGIN, 26);
ADD_SHAPE_CONFIG(VERTICAL_MARGIN, 0);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_FONT_SIZE, 24);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_MULTILINE_FONT_SIZE, 20);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_FONT_SIZE, 32);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_MULTILINE_FONT_SIZE, 32);
ADD_SHAPE_CONFIG(FOOTER_ITEM_FONT_SIZE, 32);
ADD_SHAPE_CONFIG(FOOTER_ITEM_ICON_SIZE, 63);
ADD_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_ICON_SIZE, 63);
ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_HEIGHT, 72);
ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_LEFT_MARGIN, 6);
ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_TOP_MARGIN, 6);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3, 26);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4, 26);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5, 26);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3_WITH_ICON, 26);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4_WITH_ICON, 26);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5_WITH_ICON, 26);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3, 32);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4, 32);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5, 32);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3_WITH_ICON, 32);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4_WITH_ICON, 32);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5_WITH_ICON, 32);
ADD_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE, 30);
ADD_SHAPE_CONFIG(SEGMENTED_ICON_TEXT_GAP, 20);
ADD_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_1_MAX, 496);
ADD_SHAPE_CONFIG(SOFTKEY_1_LEFT_MARGIN, 8);
ADD_SHAPE_CONFIG(SOFTKEY_ICON_SIZE, 92);
ADD_SHAPE_CONFIG(TAB_LARGE_HEIGHT, 126);
+ ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 78);
ADD_DIMENSION_CONFIG(SOFTKEY_RECT, 144, 117);
ADD_DIMENSION_CONFIG(SOFTKEY_RECT_WITH_TEXT, 207, 117);
ADD_DIMENSION_CONFIG(SOFTKEY_DISPLAY_RECT_WITH_TEXT, 196, 92);
ADD_SHAPE_CONFIG(WIDTH, _SCREEN_HEIGHT_);
ADD_SHAPE_CONFIG(LEFT_MARGIN, 26);
ADD_SHAPE_CONFIG(VERTICAL_MARGIN, 0);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_FONT_SIZE, 24);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_MULTILINE_FONT_SIZE, 20);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_FONT_SIZE, 32);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_MULTILINE_FONT_SIZE, 32);
ADD_SHAPE_CONFIG(FOOTER_ITEM_FONT_SIZE, 32);
ADD_SHAPE_CONFIG(FOOTER_ITEM_ICON_SIZE, 63);
ADD_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_ICON_SIZE, 63);
ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_HEIGHT, 72);
ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_LEFT_MARGIN, 6);
ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_TOP_MARGIN, 6);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3, 26);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4, 26);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5, 24);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3_WITH_ICON, 24);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4_WITH_ICON, 24);
- ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5_WITH_ICON, 20);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3, 32);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4, 32);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5, 32);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3_WITH_ICON, 32);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4_WITH_ICON, 32);
+ ADD_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5_WITH_ICON, 32);
ADD_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE, 30);
ADD_SHAPE_CONFIG(SEGMENTED_ICON_TEXT_GAP, 54);
ADD_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_1_MAX, 1012);
ADD_SHAPE_CONFIG(SOFTKEY_1_LEFT_MARGIN, 8);
ADD_SHAPE_CONFIG(SOFTKEY_ICON_SIZE, 92);
ADD_SHAPE_CONFIG(TAB_LARGE_HEIGHT, 126);
+ ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 65);
ADD_DIMENSION_CONFIG(SOFTKEY_RECT, 144, 117);
ADD_DIMENSION_CONFIG(SOFTKEY_RECT_WITH_TEXT, 207, 117);
ADD_DIMENSION_CONFIG(SOFTKEY_DISPLAY_RECT_WITH_TEXT, 196, 92);
START_UI_CONFIG_MODE(720x1280);
ADD_SHAPE_CONFIG(INDICATOR_WIDTH, 720);
ADD_SHAPE_CONFIG(INDICATOR_HEIGHT, 60);
+ ADD_SHAPE_CONFIG(INDICATOR_TOUCH_GAP, 40);
END_UI_CONFIG_MODE(720x1280);
START_UI_CONFIG_MODE(1280x720);
ADD_SHAPE_CONFIG(INDICATOR_WIDTH, _SCREEN_HEIGHT_);
ADD_SHAPE_CONFIG(INDICATOR_HEIGHT, 60);
+ ADD_SHAPE_CONFIG(INDICATOR_TOUCH_GAP, 40);
END_UI_CONFIG_MODE(1280x720);
START_UI_CONFIG_MODE(1280x720);
ADD_SHAPE_CONFIG(RIGHT_MARGIN, 26);
ADD_SHAPE_CONFIG(TITLE_FONT_SIZE, 50);
- ADD_SHAPE_CONFIG(TITLE_FONT_SIZE_WITH_DESCRIPTION, 44);
- ADD_SHAPE_CONFIG(TITLE_FONT_SIZE_WITH_SEGMENTED, 44);
- ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_FONT_SIZE, 32);
+ ADD_SHAPE_CONFIG(TITLE_FONT_SIZE_WITH_DESCRIPTION, 42);
+ ADD_SHAPE_CONFIG(TITLE_FONT_SIZE_WITH_SEGMENTED, 42);
+ ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_FONT_SIZE, 30);
ADD_SHAPE_CONFIG(BUTTON_ITEM_FONT_SIZE, 32);
ADD_SHAPE_CONFIG(BUTTON_ITEM_MULTILINE_FONT_SIZE, 32);
ADD_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE, 30);
ADD_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE_3_ITEM, 30);//720x1280
ADD_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE_4_ITEM, 30);
ADD_SHAPE_CONFIG(BADGE_FONT_SIZE, 26);
- ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON, 20);
- ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON_2, 16);
+ //ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON, 20);
+ //ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON_2, 16);
ADD_SHAPE_CONFIG(TITLE_DISPLAY_HEIGHT, 96);
ADD_SHAPE_CONFIG(TITLE_TOP_MARGIN_WITH_DESCRIPTION, 4);
ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 48);
ADD_SHAPE_CONFIG(BADGE_HEIGHT, 54);
- ADD_SHAPE_CONFIG(BADGE_HEIGHT_WITH_BUTTON, 45);
- ADD_SHAPE_CONFIG(BADGE_WIDTH_1DIGIT, 50);
- ADD_SHAPE_CONFIG(BADGE_WIDTH_2DIGIT, 64);
- ADD_SHAPE_CONFIG(BADGE_WIDTH_3DIGIT, 78);
- ADD_SHAPE_CONFIG(BADGE_WIDTH_4DIGIT, 92);
- ADD_SHAPE_CONFIG(BADGE_WIDTH_5DIGIT, 106);
+ //ADD_SHAPE_CONFIG(BADGE_HEIGHT_WITH_BUTTON, 45);
+ //ADD_SHAPE_CONFIG(BADGE_WIDTH_1DIGIT, 50);
+ //ADD_SHAPE_CONFIG(BADGE_WIDTH_2DIGIT, 64);
+ //ADD_SHAPE_CONFIG(BADGE_WIDTH_3DIGIT, 78);
+ //ADD_SHAPE_CONFIG(BADGE_WIDTH_4DIGIT, 92);
+ //ADD_SHAPE_CONFIG(BADGE_WIDTH_5DIGIT, 106);
+ ADD_SHAPE_CONFIG(BADGE_MIN_WIDTH, 30);
+ ADD_SHAPE_CONFIG(BADGE_SIDE_MARGIN, 12);
ADD_SHAPE_CONFIG(TITLE_BADGE_ICON_GAP, 2);
ADD_SHAPE_CONFIG(TITLE_BADGE_TOP_MARGIN, 3);
ADD_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE_3_ITEM, 30);
ADD_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE_4_ITEM, 30);
ADD_SHAPE_CONFIG(BADGE_FONT_SIZE, 26);
- ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON, 20);
- ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON_2, 16);
+ //ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON, 20);
+ //ADD_SHAPE_CONFIG(BADGE_FONT_SIZE_WITH_BUTTON_2, 16);
ADD_SHAPE_CONFIG(TITLE_DISPLAY_HEIGHT, 91);
ADD_SHAPE_CONFIG(TITLE_TOP_MARGIN_WITH_DESCRIPTION, 7.5);
ADD_SHAPE_CONFIG(TITLE_TOP_MARGIN_WITH_SEGMENTED_ITEM, 0);
ADD_SHAPE_CONFIG(TITLE_HEIGHT_WITH_SEGMENTED_ITEM, 70);
ADD_SHAPE_CONFIG(TITLE_DISPLAY_HEIGHT_WITH_SEGMENTED_ITEM, 70);
- ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_HEIGHT, 30);
+ ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_HEIGHT, 34);
ADD_SHAPE_CONFIG(BUTTON_ITEM_WIDTH, 115);
ADD_SHAPE_CONFIG(BUTTON_ITEM_WIDTH_WITH_TEXT, 183);
ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 48);
ADD_SHAPE_CONFIG(BADGE_HEIGHT, 54);
- ADD_SHAPE_CONFIG(BADGE_HEIGHT_WITH_BUTTON, 45);
- ADD_SHAPE_CONFIG(BADGE_WIDTH_1DIGIT, 50);
- ADD_SHAPE_CONFIG(BADGE_WIDTH_2DIGIT, 64);
- ADD_SHAPE_CONFIG(BADGE_WIDTH_3DIGIT, 78);
- ADD_SHAPE_CONFIG(BADGE_WIDTH_4DIGIT, 92);
- ADD_SHAPE_CONFIG(BADGE_WIDTH_5DIGIT, 106);
+ //ADD_SHAPE_CONFIG(BADGE_HEIGHT_WITH_BUTTON, 45);
+ //ADD_SHAPE_CONFIG(BADGE_WIDTH_1DIGIT, 50);
+ //ADD_SHAPE_CONFIG(BADGE_WIDTH_2DIGIT, 64);
+ //ADD_SHAPE_CONFIG(BADGE_WIDTH_3DIGIT, 78);
+ //ADD_SHAPE_CONFIG(BADGE_WIDTH_4DIGIT, 92);
+ //ADD_SHAPE_CONFIG(BADGE_WIDTH_5DIGIT, 106);
+ ADD_SHAPE_CONFIG(BADGE_MIN_WIDTH, 30);
+ ADD_SHAPE_CONFIG(BADGE_SIDE_MARGIN, 12);
ADD_SHAPE_CONFIG(TITLE_BADGE_ICON_GAP, 2);
ADD_SHAPE_CONFIG(TITLE_BADGE_TOP_MARGIN, 3);
ADD_IMAGE_CONFIG(BUTTON_EXPAND_OPENED_EFFECT, #00_button_expand_opened_ef.png);
START_UI_CONFIG_MODE(720x1280);
- ADD_SHAPE_CONFIG(EMPTY_LIST_TEXT_HEIGHT, 38);
+ ADD_SHAPE_CONFIG(EMPTY_LIST_TEXT_HEIGHT, 36);
ADD_DIMENSION_CONFIG(LIST_MIN_SIZE, 90, 72);
ADD_DIMENSION_CONFIG(GROUPEDLIST_MIN_SIZE, 270, 144);
ADD_FIXED_VALUE_CONFIG(LIST_ITEM_MAX_COUNT, 99);
END_UI_CONFIG_MODE(480x800);
START_UI_CONFIG_MODE(720x1280);
- ADD_SHAPE_CONFIG(EMPTY_LIST_TEXT_HEIGHT, 32);
+ ADD_SHAPE_CONFIG(EMPTY_LIST_TEXT_HEIGHT, 36);
ADD_SHAPE_CONFIG(EMPTY_LIST_HORIZONTAL_SPACING, 38);
ADD_SHAPE_CONFIG(ITEM_DEFAULT_HEIGHT, 90);
ADD_SHAPE_CONFIG(ITEM_DEFAULT_FONT_SIZE, 44);
ADD_SHAPE_CONFIG(GROUPITEM_ELEMENT_LEFT_MARGIN, 26);
ADD_SHAPE_CONFIG(GROUPITEM_ELEMENT_SPACING, 16);
ADD_SHAPE_CONFIG(GROUPITEM_DIVIDER_HEIGHT, 4);
- ADD_SHAPE_CONFIG(GROUPITEM_DIVIDER_LEFT_MARGIN, 0);
- ADD_SHAPE_CONFIG(GROUPITEM_DIVIDER_BOTTOM_MARGIN, 14);
+ ADD_SHAPE_CONFIG(GROUPITEM_DIVIDER_LEFT_MARGIN, 0);
+ ADD_SHAPE_CONFIG(GROUPITEM_DIVIDER_BOTTOM_MARGIN, 0);
ADD_SHAPE_CONFIG(CONTEXTITEM_LEFT_MARGIN_ONE, 117);
ADD_SHAPE_CONFIG(CONTEXTITEM_LEFT_MARGIN, 16);
ADD_SHAPE_CONFIG(CONTEXTITEM_ELEMENT_HEIGHT, 74);
, __pImageMap(null)
, __pShapeMap(null)
, __pAnimationMap(null)
+ , __pBlackPalette(null)
+ , __pWhitePalette(null)
+ , __pDefaultPalette(null)
, __pPalette(null)
, __pProvider(null)
, __pComparer(null)
__pShapeMap = null;
delete __pAnimationMap;
__pAnimationMap = null;
- delete __pPalette;
- __pPalette = null;
+ delete __pBlackPalette;
+ __pBlackPalette = null;
+ delete __pWhitePalette;
+ __pWhitePalette = null;
+ delete __pDefaultPalette;
+ __pDefaultPalette = null;
delete __pProvider;
__pProvider = null;
delete __pComparer;
__pColorMap = new (std::nothrow) Map(type);
SysTryReturnVoidResult(NID_UI, __pColorMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
__pColorMap->Construct(500, 0.75f, *__pProvider, *__pComparer);
- __pPalette = new (std::nothrow) Map(type);
- SysTryReturnVoidResult(NID_UI, __pPalette, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
- __pPalette->Construct(100, 0.75f, *__pProvider, *__pComparer);
+ __pBlackPalette = new (std::nothrow) Map(type);
+ SysTryReturnVoidResult(NID_UI, __pBlackPalette, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
+ __pWhitePalette = new (std::nothrow) Map(type);
+ SysTryReturnVoidResult(NID_UI, __pWhitePalette, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
+ __pDefaultPalette = new (std::nothrow) Map(type);
+ SysTryReturnVoidResult(NID_UI, __pDefaultPalette, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed.");
+ __pDefaultPalette->Construct(100, 0.75f, *__pProvider, *__pComparer);
+ __pWhitePalette->Construct(100, 0.75f, *__pProvider, *__pComparer);
+ __pBlackPalette->Construct(100, 0.75f, *__pProvider, *__pComparer);
}
break;
case RESOURCE_TYPE_DIMENSION:
{
__pColorMap->Initialize();
}
- if (__pPalette != null)
+ if (__pBlackPalette != null)
{
- __pPalette->Initialize();
+ __pBlackPalette->Initialize();
+ }
+ if (__pWhitePalette != null)
+ {
+ __pWhitePalette->Initialize();
+ }
+ if (__pDefaultPalette != null)
+ {
+ __pDefaultPalette->Initialize();
}
break;
case RESOURCE_TYPE_DIMENSION:
}
}
Map*
+MapContainer::GetPalette(const String& name) const
+{
+ if(name == L"black")
+ {
+ return __pBlackPalette;
+ }
+ else if(name == L"white")
+ {
+ return __pWhitePalette;
+ }
+ else if(name == L"default")
+ {
+ return __pDefaultPalette;
+ }
+ else
+ {
+ return null;
+ }
+}
+void
+MapContainer::SetPalette(const String& name)
+{
+ if(name == L"black")
+ {
+ __pPalette = __pBlackPalette;
+ }
+ else if(name == L"white")
+ {
+ __pPalette = __pWhitePalette;
+ }
+ else if(name == L"default")
+ {
+ __pPalette = __pDefaultPalette;
+ }
+ else
+ {
+ SysAssert(0);
+ }
+}
+Map*
MapContainer::GetPalette(void) const
{
return __pPalette;
ADD_SHAPE_CONFIG(ITEM_BG_PRESSED_LEFT_RIGHT_MARGIN, 4);
ADD_SHAPE_CONFIG(ITEM_BG_PRESSED_TOP_BOTTOM_MARGIN, 3);
ADD_SHAPE_CONFIG(SCROLL_PANEL_MARGIN, 3);
+ ADD_SHAPE_CONFIG(ANIMATION_DISTANCE_Y, 40);
}
END_UI_CONFIG_MODE(720x1280);
{
ADD_SHAPE_CONFIG(HORIZONTAL_MARGIN, 16);
ADD_SHAPE_CONFIG(VERTICAL_MARGIN, 10);
- ADD_SHAPE_CONFIG(TEXT_HORIZONTAL_MARGIN, 18);
- ADD_SHAPE_CONFIG(ICON_HORIZONTAL_MARGIN, 18);
+ ADD_SHAPE_CONFIG(TEXT_HORIZONTAL_MARGIN, 16);
+ ADD_SHAPE_CONFIG(ICON_HORIZONTAL_MARGIN, 16);
ADD_SHAPE_CONFIG(ICON_WIDTH, 45);
ADD_SHAPE_CONFIG(ICON_HEIGHT, 45);
ADD_SHAPE_CONFIG(MIN_HEIGHT, 86);
ADD_SHAPE_CONFIG(BUTTON_HEIGHT, 66);
ADD_SHAPE_CONFIG(BUTTON_LEFT_MARGIN, 10);
ADD_SHAPE_CONFIG(BUTTON_RIGHT_MARGIN, 16);
- ADD_SHAPE_CONFIG(EDIT_TEXT_SIZE, 32);
+ ADD_SHAPE_CONFIG(EDIT_TEXT_SIZE, 38);
ADD_SHAPE_CONFIG(BUTTON_TEXT_SIZE, 30);
}
END_UI_CONFIG_MODE(720x1280);
ADD_SHAPE_CONFIG(ICON_WIDTH, 72);
ADD_SHAPE_CONFIG(ICON_HEIGHT, 72);
ADD_SHAPE_CONFIG(ICON_LEFT_MARGIN, 26);
- ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 30);
+ ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 22);
ADD_SHAPE_CONFIG(TITLE_TEXT_POSITION_X, 12);
ADD_SHAPE_CONFIG(TITLE_TEXT_POSITION_Y, 16);
ADD_SHAPE_CONFIG(TITLE_TEXT_SIZE, 32);
ADD_SHAPE_CONFIG(TITLE_TEXT_HEIGHT, 49);
- ADD_SHAPE_CONFIG(OVERLAY_WIDTH, 90);
- ADD_SHAPE_CONFIG(OVERLAY_HEIGHT, 99);
- ADD_SHAPE_CONFIG(OVERLAY_HEIGHT_WITHOUT_ARROW, 81);
+ ADD_SHAPE_CONFIG(OVERLAY_WIDTH, 72);
+ ADD_SHAPE_CONFIG(OVERLAY_HEIGHT, 90);
+ ADD_SHAPE_CONFIG(OVERLAY_HEIGHT_WITHOUT_ARROW, 72);
ADD_SHAPE_CONFIG(OVERLAY_BOTTOM_MARGIN, 0);
- ADD_SHAPE_CONFIG(OVERLAY_MARGIN, 12);
+ ADD_SHAPE_CONFIG(OVERLAY_MARGIN, 0);
- ADD_SHAPE_CONFIG(OVERLAY_TEXT_SIZE, 72);
+ ADD_SHAPE_CONFIG(OVERLAY_TEXT_SIZE, 40);
ADD_SHAPE_CONFIG(NUMBER_SIZE, 58);
ADD_SHAPE_CONFIG(TEXT_SIZE, 28);
namespace
{
-const char* const SLP_SYSTEM_DOMAIN ="sys_string";
const char* const OSP_DOMAIN ="osp";
}
ADD_SHAPE_CONFIG(ITEM_MAX_WIDTH, 444);
ADD_SHAPE_CONFIG(ITEM_HEIGHT, 72);
ADD_SHAPE_CONFIG(HEIGHT, 90);
- ADD_SHAPE_CONFIG(ITEM_COUNT_MAX, 100);
ADD_SHAPE_CONFIG(ARROW_MARGIN, 8);
+
+ ADD_FIXED_VALUE_CONFIG(ITEM_COUNT_MAX, 100);
END_UI_CONFIG_MODE(720x1280);
}
END_UI_CONFIG(TABBAR);
ADD_SHAPE_CONFIG(GROUPITEM_BAR_TOP_MARGIN, 4);
ADD_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_HEIGHT, 4);
ADD_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_LEFT_MARGIN, 0);
- ADD_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_BOTTOM_MARGIN, 14);
+ ADD_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_BOTTOM_MARGIN, 0);
ADD_SHAPE_CONFIG(FASTSCROLL_INDEX_WIDTH, 51);
ADD_FIXED_VALUE_CONFIG(ITEM_DIVIDER_HEIGHT, 1);
ADD_FIXED_VALUE_CONFIG(SECTIONITEM_TOP_MARGIN, 0);
result r = E_SUCCESS;
__pSceneManagerImpl = new (std::nothrow) _SceneManagerImpl;
- SysTryReturnResult(NID_UI_SCENES, __pSceneManagerImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.",
- GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturnResult(NID_UI_SCENES, __pSceneManagerImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
r = __pSceneManagerImpl->Construct();
SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));