* @return An error code
* @param[in] transform The transform matrix
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The input parameter is incorrect. @n
- * The E_INVALID_ARG exception occurs when the specified @c transform is not invertible.
+ * @exception E_INVALID_ARG The input parameter is incorrect.
* @see GetTransformMatrix()
*/
result SetTransformMatrix(const Tizen::Graphics::FloatMatrix4& transform);
* @return An error code
* @param[in] transform The transform matrix
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The input parameter is incorrect. @n
- * The E_INVALID_ARG exception occurs when the specified @c transform is not invertible.
+ * @exception E_INVALID_ARG The input parameter is incorrect.
* @see GetChildrenTransformMatrix()
*/
result SetChildrenTransformMatrix(const Tizen::Graphics::FloatMatrix4& transform);
__pButton->SetText(L"Start animation");
__pButton->SetActionId(ID_BUTTON);
__pButton->AddActionEventListener(*this);
- AddControl(*__pButton);
+ AddControl(__pButton);
return r;
}
// Adds forms to the frame
Frame *pFrame = GetAppFrame()->GetFrame();
- pFrame->AddControl(*pForm1);
- pFrame->AddControl(*pForm2);
+ pFrame->AddControl(pForm1);
+ pFrame->AddControl(pForm2);
// Sets the current form
- pFrame->SetCurrentForm(*pForm1);
+ pFrame->SetCurrentForm(pForm1);
// Display the form
pForm1->Invalidate();
pFrameAnimator->SetFormTransitionAnimation (FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_LEFT,
1000,
ANIMATION_INTERPOLATOR_LINEAR );
- r = pFrameAnimator->SetCurrentForm (*nextForm);
+ r = pFrameAnimator->SetCurrentForm (nextForm);
if (IsFailed(r))
{
AppLog("SetCurrentForm on the Form2 Failed.\n");
pFrameAnimator->SetFormTransitionAnimation(FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_RIGHT,
1000,
ANIMATION_INTERPOLATOR_LINEAR );
- r = pFrameAnimator->SetCurrentForm (*nextForm);
+ r = pFrameAnimator->SetCurrentForm (nextForm);
if (IsFailed(r))
{
AppLog("SetCurrentForm on the Form1 Failed.\n");
__pRect->SetShowState(true);
__pRect->SetContentProvider(this);
- GetVisualElement()->AttachChild(*__pRect);
+ GetVisualElement()->AttachChild(__pRect);
__pRect->InvalidateRectangle(null);
return E_SUCCESS;
* @code
// Sample code for CardLayoutSample.cpp
#include <FGraphics.h>
+#include <FUiCardLayout.h>
#include "CardLayoutSample.h"
result
CardLayoutSample::OnInitializing(void)
{
- result = E_SUCCESS;
+ result r = E_SUCCESS;
// Creates an instance of 1st panel
Panel* pFirstPanel = new Panel();
pFirstPanel->SetBackgroundColor(Color(0xFF, 0x40, 0x40, 0xFF));
// Adds the 1st panel to the form
- AddControl(*pFirstPanel);
+ AddControl(pFirstPanel);
// Creates an instance of 2nd panel
Panel* pSecondPanel = new Panel();
pSecondPanel->SetBackgroundColor(Color(0x40, 0x40, 0xFF, 0xFF));
// Adds the 2nd panel to the form
- AddControl(*pSecondPanel);
+ AddControl(pSecondPanel);
return r;
}
pButton->Construct(Rectangle(50, 50, 200, 80), "COPY");
pButton->SetActionId(ID_BUTTON_OK);
pButton->AddActionEventListener(*this);
- AddControl(*pButton);
+ AddControl(pButton);
__pLabel = new Label();
__pLabel->Construct(Rectangle(0, 200, GetClientAreaBounds().width, 80), L"..");
- AddControl(*__pLabel);
+ AddControl(__pLabel);
return r;
}
pAnimation->AddAnimationEventListener(*this);
// Adds the animation to the form
- AddControl(*pAnimation);
+ AddControl(pAnimation);
// Plays the animation
pAnimation->Play();
__pButton->SetActionId(ID_BUTTON);
__pButton->AddActionEventListener(*this);
- AddControl(*__pButton);
+ AddControl(__pButton);
// Creates an instance of Button for bitmap button
__pBitmapButton = new Button();
delete pBitmapPressed;
// Adds the bitmap button to the form
- AddControl(*__pBitmapButton);
+ AddControl(__pBitmapButton);
return r;
}
__pCheckButton->AddActionEventListener(*this);
// Add a CheckButton to the Form
- AddControl(*__pCheckButton);
+ AddControl(__pCheckButton);
return r;
}
__pColorPicker->AddColorChangeEventListener(*this);
// Adds the color picker to the form
- AddControl(*__pColorPicker);
+ AddControl(__pColorPicker);
return r;
}
pButton->AddActionEventListener(*this);
// Adds the button to the form
- AddControl(*pButton);
+ AddControl(pButton);
return r;
}
}
// Adds the custom list to the form
- AddControl(*__pCustomList);
+ AddControl(__pCustomList);
// Deallocates bitmaps
delete pBitmapNormal;
pButton->AddActionEventListener(*this);
// Adds the button to the form
- AddControl(*pButton);
+ AddControl(pButton);
// Creates an instance of DateTimePicker
__pDateTimePicker = new DateTimePicker();
__pEditArea->AddTextEventListener(*this);
// Adds the edit area to the form
- AddControl(*__pEditArea);
+ AddControl(__pEditArea);
return r;
}
__pEditDate->AddDateChangeEventListener(*this);
// Adds an instance of IDateChangeEventListener
- AddControl(*__pEditDate);
+ AddControl(__pEditDate);
return r;
}
__pEditField->AddTextEventListener(*this);
//Adds the edit field to the Form
- AddControl(*__pEditField);
+ AddControl(__pEditField);
return r;
}
__pEditTime->AddTimeChangeEventListener(*this);
//Adds the edit time to the form
- AddControl(*__pEditTime);
+ AddControl(__pEditTime);
return r;
}
__pExpandableEdit->AddKeypadEventListener(*this);
__pExpandableEdit->AddExpandableEditAreaEventListener(*this);
- AddControl(*__pExpandableEdit);
+ AddControl(__pExpandableEdit);
// Sets a focus to the expandable edit area
__pExpandableEdit->SetFocus();
AddListSubItem(*pExpandableList, ID_LIST_MAINITEM, L"SubItem");
// Adds the expandable list to the form
- AddControl(*pExpandableList);
+ AddControl(pExpandableList);
// Deallocates bitmaps
delete pBitmapNormal;
__pGallery->SetItemProvider(*this);
__pGallery->AddGalleryEventListener(*this);
- AddControl(*__pGallery);
+ AddControl(__pGallery);
return r;
}
}
// Adds the grouped list to the form
- AddControl(*__pGroupedList);
+ AddControl(__pGroupedList);
// Deallocates bitmaps
delete pBitmapNormal;
__pGroupedListView->AddGroupedListViewItemEventListener(*this);
// Adds the icon list view to the form
- AddControl(*__pGroupedListView);
+ AddControl(__pGroupedListView);
// Creates an instance of ListContextItem
__pItemContext = new ListContextItem();
// Creates an instance of TableView
__pGroupedTableView = new GroupedTableView();
__pGroupedTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), true, TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL);
- __pGroupedTableView->SetItemProvider(*this);
+ __pGroupedTableView->SetItemProvider(this);
__pGroupedTableView->AddGroupedTableViewItemEventListener(*this);
__pGroupedTableView->AddFastScrollListener(*this);
__pGroupedTableView->SetFastScrollIndex(L"ABCDEFGHIJKLMNOPQRSTUVWXYZ", true);
// Adds the TableView to the form
- AddControl(*__pGroupedTableView);
+ AddControl(__pGroupedTableView);
// Creates an instance of TableViewContextItem
__pContextItem = new TableViewContextItem();
Button* pButton2 = new Button();
pButton2->Construct(Rectangle(250, 10, 200, 80), L"Context2");
- __pContextItem->AddControl(*pButton);
- __pContextItem->AddControl(*pButton2);
+ __pContextItem->AddControl(pButton);
+ __pContextItem->AddControl(pButton2);
return r;
}
result r = E_SUCCESS;
// Deallocates the item context
- delete __pItemContext;
- __pItemContext = null;
+ delete __pContextItem;
+ __pContextItem = null;
return r;
}
text.Format(30, L"Group title %d", groupIndex);
Label* pLabel = new Label();
- pLabel->Construct(Rectangle(0, 0, itemWidth, GetDefaultGroupItemHeight(), text);
+ pLabel->Construct(Rectangle(0, 0, itemWidth, GetDefaultGroupItemHeight()), text);
- pItem->AddControl(*pLable);
+ pItem->AddControl(pLabel);
return pItem;
}
text.Format(30, L"TableViewItem %d", itemIndex);
Label* pLabel = new Label();
- pLabel->Construct(Rectangle(0, 0, itemWidth, GetDefaultItemHeight(), text);
+ pLabel->Construct(Rectangle(0, 0, itemWidth, GetDefaultItemHeight()), text);
- pItem->AddControl(*pLabel);
+ pItem->AddControl(pLabel);
pItem->SetContextItem(__pContextItem);
return pItem;
}
bool
-GroupedTableViewSample::DeleteItem(int groupIndex, int itemIndex, Controls::TableViewItem* pItem)
+GroupedTableViewSample::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
{
pItem->Destroy();
}
void
-GroupedTableViewSample::UpdateItem(int groupIndex, int itemIndex, Controls::TableViewItem* pItem)
+GroupedTableViewSample::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
{
// ....
}
* @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
* IGalleryItemProvider::DeleteItem() method.
+ * The returned item should not be a null pointer.
*/
virtual Tizen::Ui::Controls::GalleryItem* CreateItem(int index) = 0;
* 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.
*/
virtual Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, int itemWidth) = 0;
* 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.
*/
virtual Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, float itemWidth) = 0;
* 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.
*/
virtual TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth) = 0;
* 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.
*/
virtual TableViewGroupItem* CreateGroupItem(int groupIndex, float itemWidth) = 0;
* @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.
+ * DeleteItem() and applications are in charge of deallocating the item. @n
+ * The returned item should not be a null pointer.
*
*/
virtual Tizen::Ui::Controls::IconListViewItem* CreateItem(int index) = 0;
* - 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.
* @see DeleteItem()
* - 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.
* @see DeleteItem()
* - 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.
* - Note that when the item is not required, the %SectionTableView control calls ISectionTableViewItemProvider::DeleteItem() and the application
* deallocates the item.
* @see DeleteItem()
* - 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.
* - Note that when the item is not required, the %SectionTableView control calls ISectionTableViewItemProviderF::DeleteItem() and the application
* deallocates the item.
* @see DeleteItem()
* - 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.
* - Note that when the item is not required, the %TableView control calls ITableViewItemProvider::DeleteItem(),
* allowing the application to deallocate the item.
* @see DeleteItem()
* - 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.
* - Note that when the item is not required, the %TableView control calls ITableViewItemProvider::DeleteItem(),
* allowing the application to deallocate the item.
* @see DeleteItem()
__pIconList->AddItem(&itemText2, pBitmapNormal2, pBitmapFocused2, ID_LIST_SECONDITEM);
// Adds the icon list to the form
- AddControl(*__pIconList);
+ AddControl(__pIconList);
// Deallocates bitmaps
delete pBitmapNormal1;
__pIconListView->AddIconListViewItemEventListener(*this);
// Adds the icon list view to the form
- AddControl(*__pIconListView);
+ AddControl(__pIconListView);
// Gets instances of Bitmap
AppResource* pAppResource = Application::GetInstance()->GetAppResource();
pButton->Construct(Rectangle(50, 50, 150, 150), L"Show Keypad");
pButton->SetActionId(ID_BUTTON);
pButton->AddActionEventListener(*this);
- AddControl(*pButton);
+ AddControl(pButton);
// Creates an instance of Keypad
__pKeypad = new Keypad();
__pLabel->SetBackgroundColor(Color::GetColor(COLOR_ID_BLUE));
// Adds the label to the form
- AddControl(*__pLabel);
+ AddControl(__pLabel);
return r;
}
__pList->AddItem(&itemText2, null, null, null, ID_LIST_SECONDITEM);
// Adds the list to the form
- AddControl(*__pList);
+ AddControl(__pList);
return r;
}
__pListView->AddListViewItemEventListener(*this);
// Adds the list view to the form
- AddControl(*__pListView);
+ AddControl(__pListView);
// Creates an instance of ListContextItem
__pItemContext = new ListContextItem();
pButton->AddActionEventListener(*this);
// Adds the button to the form
- AddControl(*pButton);
+ AddControl(pButton);
return r;
}
Label* pLabel = new Label();
pLabel->Construct(Rectangle(positionX, positionY, 400, 80),L"OverlayRegion Sample");
pLabel->SetTextColor(Color::GetColor(COLOR_ID_RED));
- AddControl(*pLabel);
+ AddControl(pLabel);
Button* pButton = new Button();
pButton->Construct(Rectangle(positionX + widthVideo - 200, positionX + HeightVideo - 100, 180, 80),L"BUTTON");
- AddControl(*pButton);
+ AddControl(pButton);
return r;
}
__pPanel->SetBackgroundColor(Color(0x50, 0xFF, 0x38));
//Adds the panel to the form
- AddControl(*__pPanel);
+ AddControl(__pPanel);
return r;
}
pCloseButton->AddActionEventListener(*this);
// Adds the button to the popup
- __pPopup->AddControl(*pCloseButton);
+ __pPopup->AddControl(pCloseButton);
// Creates an instance of Button to open the popup.
Button* pOpenButton = new Button();
pOpenButton->AddActionEventListener(*this);
// Adds the button to the form
- AddControl(*pOpenButton);
+ AddControl(pOpenButton);
return r;
}
pButton->AddActionEventListener(*this);
// Adds the __pProgress and the pButton to the form
- AddControl(*__pProgress);
- AddControl(*pButton);
+ AddControl(__pProgress);
+ AddControl(pButton);
return r;
}
class ProgressPopupSample
: public Tizen::Ui::Controls::Form
, public Tizen::Ui::IProgressPopupEventListener
+ , public Tizen::Ui::IActionEventListener
{
public:
ProgressPopupSample(void);
// Creates an instance of Button to open the ProgressPopup.
Button* pButtonProgressPopup = new Button();
- pButtonProgressPopup->Construct(Rectangle(10, 10, 250, 60), L"Open ProgressPopup");
+ pButtonProgressPopup->Construct(Rectangle(50, 50, 350, 100), L"Open ProgressPopup");
pButtonProgressPopup->SetActionId(ID_BUTTON_PROGRESSPOPUP);
pButtonProgressPopup->AddActionEventListener(*this);
+ AddControl(pButtonProgressPopup);
return r;
}
pCheckButton2->AddActionEventListener(*this);
// Adds check buttons to the form
- AddControl(*pCheckButton1);
- AddControl(*pCheckButton2);
+ AddControl(pCheckButton1);
+ AddControl(pCheckButton2);
// Creates an instance of RadioGroup
__pRadioGroup = new RadioGroup();
__pRadioGroup->Construct();
// Adds the check buttons to the radio group
- __pRadioGroup->Add(*pCheckButton1);
- __pRadioGroup->Add(*pCheckButton2);
+ __pRadioGroup->Add(pCheckButton1);
+ __pRadioGroup->Add(pCheckButton2);
return r;
}
pEdit->SetText(L"Edit");
// Adds the button and the edit field to the ScrollPanel
- __pScrollPanel->AddControl(*pButton);
- __pScrollPanel->AddControl(*pEdit);
+ __pScrollPanel->AddControl(pButton);
+ __pScrollPanel->AddControl(pEdit);
// Adds the ScrollPanel to the form
- AddControl(*__pScrollPanel);
+ AddControl(__pScrollPanel);
return r;
}
__pSearchBar->SetContent(__pSearchBarListView);
// Adds controls to the form
- AddControl(*__pSearchBar);
+ AddControl(__pSearchBar);
return r;
}
{
public:
SectionTableViewSample(void)
- : __pSectionTableView(null)
- , __pContextItem(null){}
+ : __pSectionTableView(null){}
bool Initialize(void);
virtual result OnInitializing(void);
result r = E_SUCCESS;
// Creates an instance of TableView
- __pSectionTableView = new TableView();
+ __pSectionTableView = new SectionTableView();
__pSectionTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), true, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
- __pSectionTableView->SetItemProvider(*this);
+ __pSectionTableView->SetItemProvider(this);
__pSectionTableView->AddSectionTableViewItemEventListener(*this);
// Adds the Section TableView to the form
- AddControl(*__pSectionTableView);
+ AddControl(__pSectionTableView);
return r;
}
bool
SectionTableViewSample::HasSectionHeader(int sectionIndex)
{
- true;
+ return true;
}
bool
SectionTableViewSample::HasSectionFooter(int sectionIndex)
{
- true;
+ return true;
}
String
text.Format(30, L"TableViewItem %d", itemIndex);
Label* pLabel = new Label();
- pLabel->Construct(Rectangle(0, 0, itemWidth, GetDefaultItemHeight(), text);
+ pLabel->Construct(Rectangle(0, 0, itemWidth, GetDefaultItemHeight()), text);
- pItem->AddControl(*pLabel);
+ pItem->AddControl(pLabel);
return pItem;
__pSlidableGroupedList->AddGroup(L"Group3", null, ITEM_COUNT_GROUP3, ITEM_COUNT_GROUP3 * ITEM_HEIGHT);
// Adds the slidable grouped list to the form
- AddControl(*__pSlidableGroupedList);
+ AddControl(__pSlidableGroupedList);
return r;
}
__pCustomListItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(220, 10, 70, 80));
// Adds the slidable list to the form
- AddControl(*__pSlidableList);
+ AddControl(__pSlidableList);
return r;
}
__pSlider->AddAdjustmentEventListener(*this);
// Adds the slider to the form
- AddControl(*__pSlider);
+ AddControl(__pSlider);
return r;
}
, __pFirstPanel(null)
, __pSecondPanel(null){}
+ bool Initialize(void);
virtual result OnInitializing(void);
virtual result OnTerminating(void);
__pSplitPanel->SetPane(__pSecondPanel, SPLIT_PANEL_PANE_ORDER_SECOND);
// Adds the split panel to the form
- AddControl(*__pSplitPanel);
+ AddControl(__pSplitPanel);
return E_SUCCESS;
}
__pTabBar->AddActionEventListener(*this);
// Adds the tab bar to the form
- AddControl(*__pTabBar);
+ AddControl(__pTabBar);
return r;
}
__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->AddTableViewItemEventListener(this);
// Adds the TableView to the form
- AddControl(*__pTableView);
+ AddControl(__pTableView);
// Creates an instance of TableViewContextItem
__pContextItem = new TableViewContextItem();
Button* pButton2 = new Button();
pButton2->Construct(Rectangle(250, 10, 200, 80), L"Context2");
- __pContextItem->AddControl(*pButton);
- __pContextItem->AddControl(*pButton2);
+ __pContextItem->AddControl(pButton);
+ __pContextItem->AddControl(pButton2);
return r;
}
result r = E_SUCCESS;
// Deallocates the item context
- delete __pItemContext;
- __pItemContext = null;
+ delete __pContextItem;
+ __pContextItem = null;
return r;
}
text.Format(30, L"TableViewItem %d", itemIndex);
Label* pLabel = new Label();
- pLabel->Construct(Rectangle(0, 0, itemWidth, GetDefaultItemHeight(), text);
+ pLabel->Construct(Rectangle(0, 0, itemWidth, GetDefaultItemHeight()), text);
pItem->AddControl(*pLabel);
pItem->SetContextItem(__pContextItem);
__pTextBox->AppendText(L"\nTizen SDK");
// Adds the text box to the form
- AddControl(*__pTextBox);
+ AddControl(__pTextBox);
return r;
}
, public Tizen::Ui::IActionEventListener
{
public:
- DataBindingSample(void);
- virtual ~DataBindingSample(void);
-
virtual bool Initialize(void);
virtual result OnInitializing(void);
virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
DataBindingSample::Initialize(void)
{
Construct(FORM_STYLE_NORMAL| FORM_STYLE_INDICATOR| FORM_STYLE_HEADER| FORM_STYLE_FOOTER);
- SetFooter();
return true;
}
__pUpdateBindingButton = new (std::nothrow) Button();
__pUpdateBindingButton->Construct(Rectangle(10, rect.height / 6, rect.width - 20, rect.height / 6), L"BindingTarget");
__pUpdateBindingButton->SetName("Target");
- AddControl(*__pUpdateBindingButton);
+ AddControl(__pUpdateBindingButton);
__pTargetButton = new (std::nothrow) Button();
__pTargetButton->Construct(Rectangle(10, (rect.height / 3) + 10 , (rect.width - 20), rect.height / 6), L"Update Binding");
__pTargetButton->SetActionId(ID_BUTTON_UPDATE_BINDING);
__pTargetButton->AddActionEventListener(*this);
- AddControl(*__pTargetButton);
+ AddControl(__pTargetButton);
__pUnbindButton = new (std::nothrow) Button();
__pUnbindButton->Construct(Rectangle(10, (rect.height * 2 / 3), (rect.width / 2) - 10, rect.height / 6), L"Unbind");
__pUnbindButton->SetActionId(ID_BUTTON_UNBIND);
__pUnbindButton->AddActionEventListener(*this);
- AddControl(*__pUnbindButton);
+ AddControl(__pUnbindButton);
__pBindButton = new (std::nothrow) Button();
__pBindButton->Construct(Rectangle((rect.width / 2) + 10 , (rect.height * 2 / 3), (rect.width / 2) - 20 , rect.height / 6), L"Bind");
__pBindButton->SetActionId(ID_BUTTON_BIND);
__pBindButton->AddActionEventListener(*this);
- AddControl(*__pBindButton);
+ AddControl(__pBindButton);
DataBindingContext* pContext = GetDataBindingContextN();
r = pContext->Bind(L"bindingcount", L"Target", L"text", __bindIntegerToButtonText, DATA_BINDING_DATA_TYPE_INTEGER, DATA_BINDING_FLOW_ONE_WAY, DATA_BINDING_TRIGGER_EXPLICIT, null, null, null);
Label* pLabel1 = new Label();
pLabel1->Construct(Rectangle(0, 0, 100, 200), L"Label1\n(0, 0)");
pLabel1->SetBackgroundColor(Color(0x00, 0x10, 0x80, 0xFF));
- pPanel->AddControl(*pLabel1);
+ pPanel->AddControl(pLabel1);
Label* pLabel2 = new Label();
pLabel2->Construct(Rectangle(0, 0, 100, 200), L"Label2\n(0, 1)");
pLabel2->SetBackgroundColor(Color(0x00, 0x20, 0xA0, 0xFF));
- pPanel->AddControl(*pLabel2);
+ pPanel->AddControl(pLabel2);
Label* pLabel3 = new Label();
pLabel3->Construct(Rectangle(0, 0, 100, 200), L"Label3\n(0, 2)");
pLabel3->SetBackgroundColor(Color(0x00, 0x30, 0xC0, 0xFF));
- pPanel->AddControl(*pLabel3);
+ pPanel->AddControl(pLabel3);
Label* pLabel4 = new Label();
pLabel4->Construct(Rectangle(0, 0, 100, 200), L"Label4\n(1, 0)");
pLabel4->SetBackgroundColor(Color(0x00, 0x40, 0xE0, 0xFF));
- pPanel->AddControl(*pLabel4);
+ pPanel->AddControl(pLabel4);
Button* pButton = new Button();
pButton->Construct(Rectangle(0, 0, 100, 200), L"Button\n(1, 1)");
- pPanel->AddControl(*pButton);
+ pPanel->AddControl(pButton);
// Sets position to each label and button in grid layout
gridPanelLayout.SetPosition(*pLabel1, 0, 0, 1, 1);
}
// Adds the top panel to the form
- AddControl(*pPanel);
+ AddControl(pPanel);
return r;
}
pLabel1->Construct(Rectangle(0,0,GetClientAreaBounds().width/4,100), L"TOP");
pLabel1->SetTextConfig(20, LABEL_TEXT_STYLE_NORMAL);
pLabel1->SetBackgroundColor(Color(0x00, 0x10, 0x80, 0xFF));
- pTopPanel->AddControl(*pLabel1);
+ pTopPanel->AddControl(pLabel1);
Label* pLabel2 = new Label();
pLabel2->Construct(Rectangle(0,0,GetClientAreaBounds().width/4,100), L"MIDDLE");
pLabel2->SetTextConfig(20, LABEL_TEXT_STYLE_NORMAL);
pLabel2->SetBackgroundColor(Color(0x00, 0x20, 0xA0, 0xFF));
- pTopPanel->AddControl(*pLabel2);
+ pTopPanel->AddControl(pLabel2);
Label* pLabel3 = new Label();
pLabel3->Construct(Rectangle(0,0,GetClientAreaBounds().width/4,100), L"BOTTOM");
pLabel3->SetTextConfig(20, LABEL_TEXT_STYLE_NORMAL);
pLabel3->SetBackgroundColor(Color(0x00, 0x30, 0xC0, 0xFF));
- pTopPanel->AddControl(*pLabel3);
+ pTopPanel->AddControl(pLabel3);
Button* pButton = new Button();
pButton->Construct(Rectangle(0,0,GetClientAreaBounds().width/4 - 10,100), L"FIT\nTO\nPARENT");
pButton->SetTextSize(20);
- pTopPanel->AddControl(*pButton);
+ pTopPanel->AddControl(pButton);
// Sets relations each label and button
topPanelLayout.SetVerticalAlignment(*pLabel1, LAYOUT_VERTICAL_ALIGN_TOP);
topPanelLayout.SetVerticalFitPolicy(*pButton, FIT_POLICY_PARENT);
}
// Adds the top panel to the form
- AddControl(*pTopPanel);
+ AddControl(pTopPanel);
// Creates an instance of HorizontalBoxLayout for bottom panel
HorizontalBoxLayout bottomPanelLayout;
Label* pLabel1 = new Label();
pLabel1->Construct(Rectangle(0,0,30,100), L"W\n1.0f");
pLabel1->SetBackgroundColor(Color(0x00, 0x10, 0x80, 0xFF));
- pBottomPanel->AddControl(*pLabel1);
+ pBottomPanel->AddControl(pLabel1);
Label* pLabel2 = new Label();
pLabel2->Construct(Rectangle(0,0,30,100), L"W\n2.0f");
pLabel2->SetBackgroundColor(Color(0x00, 0x20, 0xA0, 0xFF));
- pBottomPanel->AddControl(*pLabel2);
+ pBottomPanel->AddControl(pLabel2);
Label* pLabel3 = new Label();
pLabel3->Construct(Rectangle(0,0,30,100), L"W\n3.0f");
pLabel3->SetBackgroundColor(Color(0x00, 0x30, 0xC0, 0xFF));
- pBottomPanel->AddControl(*pLabel3);
+ pBottomPanel->AddControl(pLabel3);
// Sets relations each label
bottomPanelLayout.SetVerticalFitPolicy(*pLabel1, FIT_POLICY_PARENT);
}
// Adds the bottom panel to the form
- AddControl(*pBottomPanel);
+ AddControl(pBottomPanel);
//Gets the layout of the form
VerticalBoxLayout* pFormLayout = dynamic_cast<VerticalBoxLayout*>(this->GetLayoutN());
// Creates instances of Button
Button* pUpButton = new Button();
pUpButton->Construct(Rectangle(0,0,200,100), "UP");
- pTopRelativePanel->AddControl(*pUpButton);
+ pTopRelativePanel->AddControl(pUpButton);
Button* pMiddleButton = new Button();
pMiddleButton->Construct(Rectangle(0,0,200,100), "CENTER");
- pTopRelativePanel->AddControl(*pMiddleButton);
+ pTopRelativePanel->AddControl(pMiddleButton);
Button* pDownButton = new Button();
pDownButton->Construct(Rectangle(0,0,200,100), "DOWN");
- pTopRelativePanel->AddControl(*pDownButton);
+ pTopRelativePanel->AddControl(pDownButton);
// Sets relations between the pUpButton and pMiddleButton
- topPanelLayout.SetRelation(*pUpButton, *pMiddleButton, RECT_EDGE_RELATION_LEFT_TO_LEFT);
- topPanelLayout.SetRelation(*pUpButton, *pMiddleButton, RECT_EDGE_RELATION_BOTTOM_TO_TOP);
+ topPanelLayout.SetRelation(*pUpButton, pMiddleButton, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ topPanelLayout.SetRelation(*pUpButton, pMiddleButton, RECT_EDGE_RELATION_BOTTOM_TO_TOP);
topPanelLayout.SetMargin(*pUpButton, 0, 0, 0, 10);
// Sets the middle button
topPanelLayout.SetMargin(*pMiddleButton, 10, 10, 10, 10);
// Sets relations between the pDownButton and the pMiddleButton
- topPanelLayout.SetRelation(*pDownButton, *pMiddleButton, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
- topPanelLayout.SetRelation(*pDownButton, *pMiddleButton, RECT_EDGE_RELATION_TOP_TO_BOTTOM);
+ topPanelLayout.SetRelation(*pDownButton, pMiddleButton, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+ topPanelLayout.SetRelation(*pDownButton, pMiddleButton, RECT_EDGE_RELATION_TOP_TO_BOTTOM);
topPanelLayout.SetMargin(*pDownButton, 0, 0, 10, 0);
}
// Adds the top panel to the form
- AddControl(*pTopRelativePanel);
+ AddControl(pTopRelativePanel);
// Creates an instance of RelativeLayout for the bottom panel
RelativeLayout bottomPanelLayout;
pFixedLabel->Construct(Rectangle(0, 0, 150, 80), L"FIXED");
pFixedLabel->SetBackgroundColor(Color::GetColor(COLOR_ID_YELLOW));
pFixedLabel->SetTextColor(Color::GetColor(COLOR_ID_BLACK));
- pBottomRelativePanel->AddControl(*pFixedLabel);
+ pBottomRelativePanel->AddControl(pFixedLabel);
Label* pScalableLabel = new Label();
pScalableLabel->Construct(Rectangle(0, 0, 150, 80), L"SCALABLE <=>");
pScalableLabel->SetBackgroundColor(Color::GetColor(COLOR_ID_BLUE));
pScalableLabel->SetTextColor(Color::GetColor(COLOR_ID_BLACK));
- pBottomRelativePanel->AddControl(*pScalableLabel);
+ pBottomRelativePanel->AddControl(pScalableLabel);
// Sets relations between the fixed label and the panel
bottomPanelLayout.SetCenterAligned(*pFixedLabel, CENTER_ALIGN_VERTICAL);
- bottomPanelLayout.SetRelation(*pFixedLabel, *pBottomRelativePanel, RECT_EDGE_RELATION_LEFT_TO_LEFT);
- bottomPanelLayout.SetRelation(*pFixedLabel, *pBottomRelativePanel, RECT_EDGE_RELATION_TOP_TO_TOP);
+ bottomPanelLayout.SetRelation(*pFixedLabel, pBottomRelativePanel, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ bottomPanelLayout.SetRelation(*pFixedLabel, pBottomRelativePanel, RECT_EDGE_RELATION_TOP_TO_TOP);
bottomPanelLayout.SetMargin(*pFixedLabel, 30, 30, 30, 30);
// Sets relations between the scalable label and the panel
bottomPanelLayout.SetCenterAligned(*pScalableLabel, CENTER_ALIGN_VERTICAL);
- bottomPanelLayout.SetRelation(*pScalableLabel, *pFixedLabel, RECT_EDGE_RELATION_LEFT_TO_RIGHT);
- bottomPanelLayout.SetRelation(*pScalableLabel, *pFixedLabel, RECT_EDGE_RELATION_LEFT_TO_RIGHT);
- bottomPanelLayout.SetRelation(*pScalableLabel, *pBottomRelativePanel, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
- bottomPanelLayout.SetRelation(*pScalableLabel, *pBottomRelativePanel, RECT_EDGE_RELATION_TOP_TO_TOP);
+ bottomPanelLayout.SetRelation(*pScalableLabel, pFixedLabel, RECT_EDGE_RELATION_LEFT_TO_RIGHT);
+ bottomPanelLayout.SetRelation(*pScalableLabel, pFixedLabel, RECT_EDGE_RELATION_LEFT_TO_RIGHT);
+ bottomPanelLayout.SetRelation(*pScalableLabel, pBottomRelativePanel, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+ bottomPanelLayout.SetRelation(*pScalableLabel, pBottomRelativePanel, RECT_EDGE_RELATION_TOP_TO_TOP);
bottomPanelLayout.SetMargin(*pScalableLabel, 30, 30, 30, 30);
}
// Adds the bottom panel to the form
- AddControl(*pBottomRelativePanel);
+ AddControl(pBottomRelativePanel);
//Gets the layout of the form
RelativeLayout* pFormLayout = dynamic_cast<RelativeLayout*>(this->GetLayoutN());
// Sets relations of the top relative panel
- pFormLayout->SetRelation(*pTopRelativePanel, *this, RECT_EDGE_RELATION_LEFT_TO_LEFT);
- pFormLayout->SetRelation(*pTopRelativePanel, *this, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
- pFormLayout->SetRelation(*pTopRelativePanel, *this, RECT_EDGE_RELATION_TOP_TO_TOP);
+ pFormLayout->SetRelation(*pTopRelativePanel, this, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ pFormLayout->SetRelation(*pTopRelativePanel, this, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+ pFormLayout->SetRelation(*pTopRelativePanel, this, RECT_EDGE_RELATION_TOP_TO_TOP);
// Sets relations of the bottom relative panel
- pFormLayout->SetRelation(*pBottomRelativePanel, *this, RECT_EDGE_RELATION_LEFT_TO_LEFT);
- pFormLayout->SetRelation(*pBottomRelativePanel, *this, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
- pFormLayout->SetRelation(*pBottomRelativePanel, *this, RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM);
+ pFormLayout->SetRelation(*pBottomRelativePanel, this, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ pFormLayout->SetRelation(*pBottomRelativePanel, this, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+ pFormLayout->SetRelation(*pBottomRelativePanel, this, RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM);
// Sets relations between the top relative panel and the bottom relative panel
pFormLayout->SetHorizontalFitPolicy(*pTopRelativePanel, FIT_POLICY_PARENT);
pFormLayout->SetHorizontalFitPolicy(*pBottomRelativePanel, FIT_POLICY_PARENT);
pFormLayout->SetVerticalFitPolicy(*pBottomRelativePanel, FIT_POLICY_FIXED);
- pFormLayout->SetRelation(*pTopRelativePanel, *pBottomRelativePanel, RECT_EDGE_RELATION_BOTTOM_TO_TOP);
+ pFormLayout->SetRelation(*pTopRelativePanel, pBottomRelativePanel, RECT_EDGE_RELATION_BOTTOM_TO_TOP);
return r;
}
/**
* Sets the relation of a specified child control for the edge with other control.
*
- * @since 2.0
+ * @since 2.1
*
* @return An error code
* @param[in] childControl The control for which the relation is set
Label* pLabel1 = new Label();
pLabel1->Construct(Rectangle(0,0,150,80), L"RIGHT");
pLabel1->SetBackgroundColor(Color(0x00, 0x10, 0x80, 0xFF));
- pTopPanel->AddControl(*pLabel1);
+ pTopPanel->AddControl(pLabel1);
Label* pLabel2 = new Label();
pLabel2->Construct(Rectangle(0,0,200,80), L"CENTER");
pLabel2->SetBackgroundColor(Color(0x00, 0x20, 0xA0, 0xFF));
- pTopPanel->AddControl(*pLabel2);
+ pTopPanel->AddControl(pLabel2);
Label* pLabel3 = new Label();
pLabel3->Construct(Rectangle(0,0,150,80), L"LEFT");
pLabel3->SetBackgroundColor(Color(0x00, 0x30, 0xC0, 0xFF));
- pTopPanel->AddControl(*pLabel3);
+ pTopPanel->AddControl(pLabel3);
Button* pButton = new Button();
pButton->Construct(Rectangle(0,0,150,80), "FIT TO PARENT");
- pTopPanel->AddControl(*pButton);
+ pTopPanel->AddControl(pButton);
// Sets relations each label and button
topPanelLayout.SetHorizontalAlignment(*pLabel1, LAYOUT_HORIZONTAL_ALIGN_RIGHT);
}
// Adds the top panel to the form
- AddControl(*pTopPanel);
+ AddControl(pTopPanel);
// Creates an instance of VerticalBoxLayout for the bottom panel
VerticalBoxLayout bottomPanelLayout;
Label* pLabel1 = new Label();
pLabel1->Construct(Rectangle(0,0,100,50), L"WEIGHT = 1.0f");
pLabel1->SetBackgroundColor(Color(0x00, 0x10, 0x80, 0xFF));
- pBottomPanel->AddControl(*pLabel1);
+ pBottomPanel->AddControl(pLabel1);
Label* pLabel2 = new Label();
pLabel2->Construct(Rectangle(0,0,100,50), L"WEIGHT = 2.0f");
pLabel2->SetBackgroundColor(Color(0x00, 0x20, 0xA0, 0xFF));
- pBottomPanel->AddControl(*pLabel2);
+ pBottomPanel->AddControl(pLabel2);
Label* pLabel3 = new Label();
pLabel3->Construct(Rectangle(0,0,100,50), L"WEIGHT = 3.0f");
pLabel3->SetBackgroundColor(Color(0x00, 0x30, 0xC0, 0xFF));
- pBottomPanel->AddControl(*pLabel3);
+ pBottomPanel->AddControl(pLabel3);
// Sets relations each label
bottomPanelLayout.SetHorizontalFitPolicy(*pLabel1, FIT_POLICY_PARENT);
}
// Adds the bottom panel to the form
- AddControl(*pBottomPanel);
+ AddControl(pBottomPanel);
//Gets the layout of the form
VerticalBoxLayout* pFormLayout = dynamic_cast<VerticalBoxLayout*>(this->GetLayoutN());
for (int currentDensity = DENSITY_XHIGH; currentDensity >= DENSITY_LOW; currentDensity--)
{
- SysAssert(densityIndex > 0 && densityIndex < DENSITY_MAX);
-
if (static_cast<int>(__sortedDensity[0]) == currentDensity)
{
continue;
}
+ SysAssert(densityIndex > 0 && densityIndex < DENSITY_MAX);
__sortedDensity[densityIndex] = static_cast<_Density>(currentDensity);
if (GetDirectoryPath(resourceFolder, __sortedDensity[densityIndex], __sortedDensityDirectories[densityIndex]) == false)
#include <FUiCtrlFrame.h>
#include <FBaseRt_Process.h>
-#include <FSys_PowerManagerImpl.h>
#include <FUi_ControlImplManager.h>
#include <FUi_KeyEventManager.h>
#include <FUi_WindowImpl.h>
#include <FUi_UiNotificationEvent.h>
#include <FUi_UiEventManager.h>
#include <FUiCtrl_FrameImpl.h>
-#include <FUi_ControlManager.h>
+#include <FSys_PowerManagerImpl.h>
#include "FApp_AppFrame.h"
#include "FApp_AppInfo.h"
long
_UiAppImpl::OnWindowHandleRequest(void)
{
- _Window* pWin = _ControlManager::GetInstance()->GetTopVisibleWindow();
- if (pWin)
- {
- unsigned int han = pWin->GetNativeHandle();
- return han;
- }
-
- return -1;
+ const _EcoreEvas* const pEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+ return (pEvas) ? static_cast<long>(pEvas->GetXWindow()) : -1;
}
, E_INVALID_ARG, E_INVALID_ARG
, "[E_INVALID_ARG] The argument is invalid.");
+ if (__pTextObject.use_count() > 1)
+ {
+ return E_SUCCESS;
+ }
+
result r = E_SUCCESS;
int count = GetTextElementCount();
TextElement* pTextElement = null;
SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED
, "[E_OPERATION_FAILED] This instance is not constructed yet.");
+ if (__pTextObject.use_count() > 1)
+ {
+ return E_SUCCESS;
+ }
+
int textElementIndex = 0;
result r = E_SUCCESS;
TextElement* pTextElement = null;
SysTryReturnVoidResult(NID_GRP, rhs.__pTextObject, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not initialized.");
result r = E_SUCCESS;
- TextElement* pTextElement = null;
-
FloatDimension size = rhs.GetSizeF();
__width = size.width;
}
__pTextElement = new (std::nothrow) TextElement();
- SysTryCatch(NID_GRP, __pTextElement, , r, "[E_OUT_OF_MEMORY] Fail to create element.");
-
- r = __pTextElement->Construct();
- SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to construct text element.", GetErrorMessage(r));
-
- for (int i = 0; i < __pLinkedListTextElementList->GetCount(); i++)
+ if (__pTextElement == null)
{
- pTextElement = dynamic_cast < TextElement* >(__pLinkedListTextElementList->GetAt(i));
- if (pTextElement == null) //Bitmap
- {
- Bitmap* pBitmap = dynamic_cast < Bitmap* >(pTextElement);
- SysTryCatch(NID_GRP, pBitmap, , r, "[%s] Fails to get a bitmap.", GetErrorMessage(r));
-
- Bitmap* pNewBitmap = new (std::nothrow) Bitmap();
- SysTryCatch(NID_GRP, pNewBitmap, r = E_OUT_OF_MEMORY, r, "[E_OUT_OF_MEMORY] Fail to create a bitmap.");
-
- r = pNewBitmap->Construct(*pBitmap, FloatRectangle(0, 0, pBitmap->GetWidthF(), pBitmap->GetHeightF()));
- SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fails to insert image.", GetErrorMessage(r));
-
- r = __pLinkedListTextElementList->InsertAt(*pNewBitmap, i);
- SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fails to insert image.", GetErrorMessage(r));
- }
- else
- {
- TextElement* pNewTextElement = _TextElementImpl::CreateTextElementN(*pTextElement);
- SysTryCatch(NID_GRP, pNewTextElement, r = E_OUT_OF_MEMORY, r, "[E_OUT_OF_MEMORY] Fail to create a TextElement.");
-
- _TextElementImpl* pTextElementImpl = _TextElementImpl::GetInstance(*pNewTextElement);
- SysTryCatch(NID_GRP, pTextElementImpl, r = E_OUT_OF_MEMORY, r, "[E_OUT_OF_MEMORY] Fail to create a TextElementImpl.");
-
- pTextElementImpl->SetRegisteringEnrichedText(this);
+ delete __pLinkedListTextElementList;
- r = __pLinkedListTextElementList->InsertAt(*pNewTextElement, i);
- SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fails to insert TextElement.", GetErrorMessage(r));
- }
+ SetLastResult(E_OUT_OF_MEMORY);
+ SysLog(NID_GRP, "[E_OUT_OF_MEMORY] Fail to create element.");
}
- return;
-
-CATCH:
- if (__pLinkedListTextElementList)
+ r = __pTextElement->Construct();
+ if (r != E_SUCCESS)
{
- __pLinkedListTextElementList->RemoveAll(true);
delete __pLinkedListTextElementList;
- __pLinkedListTextElementList = null;
- }
-
- if (__pTextElement)
- {
delete __pTextElement;
- __pTextElement = null;
+
+ SysLog(NID_GRP, "[%s] Fail to construct text element.", GetErrorMessage(r));
}
}
__count = 0;
__linkOffset = 0;
__pTextComponent = null;
- __refCount = 1;
}
_TextElementImpl::~_TextElementImpl(void)
return __outlineColorEnable;
}
-void
-_TextElementImpl::AddRef(void)
-{
- __refCount++;
-}
-
-void
-_TextElementImpl::Release(void)
-{
- if (__refCount >= 1)
- {
- __refCount--;
- if (__refCount == 0)
- {
- delete this;
- }
- }
-}
-
-TextElement*
-_TextElementImpl::CreateTextElementN(TextElement& textElement)
-{
- TextElement* pTextElement = new (std::nothrow) TextElement;
- SysTryReturn(NID_GRP, pTextElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
-
- pTextElement->__pImpl = textElement.__pImpl;
- pTextElement->__pImpl->AddRef();
-
- return pTextElement;
-}
-
-int
-_TextElementImpl::GetReferenceCount(void) const
-{
- return __refCount;
-}
-
_TextElementImpl*
_TextElementImpl::GetInstance(TextElement& element)
{
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;
}}} // Tizen::Graphics::_Text
bool IsOutlineColorEnable(void) const;
bool IsConstructed(void) const;
- static TextElement* CreateTextElementN(TextElement& textElement);
- void AddRef(void);
- void Release(void);
- int GetReferenceCount(void) const;
-
static _TextElementImpl* GetInstance(TextElement& element);
static const _TextElementImpl* GetInstance(const TextElement& element);
int __linkOffset;
Tizen::Graphics::_Text::TextElement* __pTextComponent;
- int __refCount;
-
private:
_TextElementImpl(const _TextElementImpl& textElementImpl);
_TextElementImpl& operator =(const _TextElementImpl& rhs);
, (unsigned int)surface
, (unsigned int)context
, (unsigned int)eglGetError());
-
- if (__pPreviousSglInfo->glVersion == 1)
- {
- _GlClear_1(GL_COLOR_BUFFER_BIT);
- }
- else
- {
- _GlClear_2(GL_COLOR_BUFFER_BIT);
- }
}
}
SysTryReturn(NID_GRP, length >= 0 && length < pSimpleText->GetTextLength()
, E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",length, pSimpleText->GetTextLength());
- if (pText[length] == (wchar_t)L' ')
+ if (pText[length] == (wchar_t)L' ' || pText[length] == TEXT_JAPANESE_SPACE)
{
GetRegion(length + elementTextOffset, 1, spaceCharDim.width, spaceCharDim.height);
textLength--;
SysTryReturn(NID_GRP, index >= 0 && index < pSimpleText->GetTextLength()
, E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",index, pSimpleText->GetTextLength());
- if (pText[index] == (wchar_t)L' ')
+ if (pText[index] == (wchar_t)L' ' || pText[index] == TEXT_JAPANESE_SPACE)
{
GetRegion(textIndexFromElementOffset, 1, spaceCharDim.width, spaceCharDim.height);
textLength--;
SysTryReturn(NID_GRP, length >= 0 && length < pSimpleText->GetTextLength()
, E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",length, pSimpleText->GetTextLength());
- if (pText[length] == (wchar_t)L' ')
+ if (pText[length] == (wchar_t)L' ' || pText[length] == TEXT_JAPANESE_SPACE)
{
GetRegion(length + elementTextOffset, 1, spaceCharDim.width, spaceCharDim.height);
textLength--;
SysTryReturn(NID_GRP, index >= 0 && index < pSimpleText->GetTextLength()
, E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",index, pSimpleText->GetTextLength());
- if (pText[index] == (wchar_t)L' ')
+ if (pText[index] == (wchar_t)L' ' || pText[index] == TEXT_JAPANESE_SPACE)
{
GetRegion(textIndexFromElementOffset, 1, spaceCharDim.width, spaceCharDim.height);
textLength--;
SysTryReturn(NID_GRP, length >= 0 && length < pSimpleText->GetTextLength()
, E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",length, pSimpleText->GetTextLength());
- if (pText[length] == (wchar_t)L' ')
+ if (pText[length] == (wchar_t)L' ' || pText[length] == TEXT_JAPANESE_SPACE)
{
GetRegion(length + elementTextOffset, 1, spaceCharDim.width, spaceCharDim.height);
textLength--;
SysTryReturn(NID_GRP, index >= 0 && index < pSimpleText->GetTextLength()
, E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",index, pSimpleText->GetTextLength());
- if (pText[index] == (wchar_t)L' ')
+ if (pText[index] == (wchar_t)L' ' || pText[index] == TEXT_JAPANESE_SPACE)
{
GetRegion(textIndexFromElementOffset, 1, spaceCharDim.width, spaceCharDim.height);
textLength--;
SysTryReturn(NID_GRP, length >= 0 && length < pSimpleText->GetTextLength()
, E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",length, pSimpleText->GetTextLength());
- if (pText[length] == (wchar_t)L' ')
+ if (pText[length] == (wchar_t)L' ' || pText[length] == TEXT_JAPANESE_SPACE)
{
GetRegion(length + elementTextOffset, 1, spaceCharDim.width, spaceCharDim.height);
textLength--;
SysTryReturn(NID_GRP, index >= 0 && index < pSimpleText->GetTextLength()
, E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",index, pSimpleText->GetTextLength());
- if (pText[index] == (wchar_t)L' ')
+ if (pText[index] == (wchar_t)L' ' || pText[index] == TEXT_JAPANESE_SPACE)
{
GetRegion(textIndexFromElementOffset, 1, spaceCharDim.width, spaceCharDim.height);
textLength--;
, String(L""), E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)"
,index, pSimpleText->GetTextLength());
- if (pText[index] == (wchar_t)L' ')
+ if (pText[index] == (wchar_t)L' ' || pText[index] == TEXT_JAPANESE_SPACE)
{
remainingLength--;
lineOffset++;
#include <new>
#include <FBaseCharacter.h>
#include <FBaseSysLog.h>
+#include "FGrp_TextCommon.h"
#include "FGrp_TextTextCutLinkParser.h"
using namespace Tizen::Base;
index++;
}
}
- else if (text[index] != null && text[index] != L' ' && text[index] != L')' &&
- text[index] != L']' && text[index] != 0xFFFC &&
- text[index] != 0x000A && text[index] != 0x000D)
+ else if (text[index] != null && text[index] != L' ' && text[index] != TEXT_JAPANESE_SPACE &&
+ text[index] != L')' && text[index] != L']' && text[index] != 0xFFFC &&
+ text[index] != 0x000A && text[index] != 0x000D)
{
return false;
}
{
oneDot = true;
}
- else if (text[index + j] == L' ' || text[index + j] == L'(' || text[index + j] == L')')
+ else if (text[index + j] == L' ' || text[index + j] == TEXT_JAPANESE_SPACE || text[index + j] == L'(' || text[index + j] == L')')
{
// empty statement
}
while (index < totalLength &&
(Character::IsDigit(text[index]) || (text[index] == L'*') ||
(text[index] == L'#') || (text[index] == L'-') ||
- (text[index] == L' ') || (text[index] == L'+') ||
+ (text[index] == L' ') || (text[index] == TEXT_JAPANESE_SPACE) || (text[index] == L'+') ||
(text[index] == L'.') || (text[index] == L'(') ||
(text[index] == L')') || (index == linkOffset && (text[linkOffset] == L'+'))))
{
index++;
- if (blankCount == 0 && text[index] == L' ')
+ if (blankCount == 0 && (text[index] == L' ' || text[index] == TEXT_JAPANESE_SPACE))
{
blankCount++;
}
- else if (blankCount == 1 && text[index] == L' ')
+ else if (blankCount == 1 && (text[index] == L' ' || text[index] == TEXT_JAPANESE_SPACE))
{
blankCount++;
break;
}
}
- if (text[index - 1] == L' ')
+ if (text[index - 1] == L' ' || text[index - 1] == TEXT_JAPANESE_SPACE)
{
index -= 1;
- while (text[index] == L' ')
+ while (text[index] == L' ' || text[index] == TEXT_JAPANESE_SPACE)
{
index--;
}
SysTryReturn(NID_GRP, i >= 0 && i < pSimpleText->GetTextLength(), -1, E_OUT_OF_RANGE
, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",i, pSimpleText->GetTextLength());
- if (pText[i] == L' ')
+ if (pText[i] == L' ' || pText[i] == TEXT_JAPANESE_SPACE)
{
index--;
}
{
return TEXT_RETBY_LINEFEED;
}
- else if (*pLastCharacter == (wchar_t)L' ' || *pLastCharacter == TEXT_OBJ_CHARACTER)
+ else if (*pLastCharacter == (wchar_t)L' ' || *pLastCharacter == TEXT_JAPANESE_SPACE ||
+ *pLastCharacter == TEXT_OBJ_CHARACTER || *pLastCharacter == TEXT_JAPANESE_DOT|| *pLastCharacter == TEXT_JAPANESE_COMMA)
{
return TEXT_RETBY_NORMAL;
}
{
return TEXT_RETBY_NORMAL;
}
- else if (*pText == (wchar_t)L' ')
+ else if (*pText == (wchar_t)L' ' || *pText == TEXT_JAPANESE_SPACE)
{
actualLength--;
length--;
return TEXT_RETBY_NORMAL;
}
+ actualLength--;
+ length--;
+ pText--;
+
while ((length >= 0) && (*pText != 0))
{
- if (*pText == (wchar_t)L' ' || *pText == TEXT_OBJ_CHARACTER)
+ if (*pText == (wchar_t)L' ' || *pText == TEXT_JAPANESE_SPACE || *pText == TEXT_OBJ_CHARACTER ||
+ *pText == TEXT_JAPANESE_DOT || *pText == TEXT_JAPANESE_COMMA)
{
actualLength++;
length++;
{
_AccessibilityManager::GetInstance()->Unregister(__handle);
}
+ int count = __childContainerList.GetCount();
+ _AccessibilityContainer* pContainer = null;
+ for (int i = 0; i< count;i++)
+ {
+ if(__childContainerList.GetAt(i, pContainer) == E_SUCCESS)
+ {
+ pContainer->SetParent(null);
+ }
+ }
+ if(__pParent)
+ {
+ __pParent->RemoveChildContainer(*this);
+ }
}
_Control&
result r = E_SYSTEM;
_AccessibilityContainer* _child = &const_cast<_AccessibilityContainer&>(child);
- _child->SetParent(*this);
+ _child->SetParent(this);
__childContainerList.Add(_child);
return r;
}
{
return E_SUCCESS;
}
- _AccessibilityManager::GetInstance()->NeedRefreshItem();
+ _AccessibilityManager::GetInstance()->NeedRefreshItem();
return __elementList.Add(&const_cast<_AccessibilityElement&>(element));
}
pElement->SetParent(*this);
}
}
- _AccessibilityManager::GetInstance()->NeedRefreshItem();
+ _AccessibilityManager::GetInstance()->NeedRefreshItem();
return __elementList.AddItems(elementList);
}
_AccessibilityContainer::InsertElement(const _AccessibilityElement& element, int index)
{
const_cast<_AccessibilityElement&>(element).SetParent(*this);
- _AccessibilityManager::GetInstance()->NeedRefreshItem();
+ _AccessibilityManager::GetInstance()->NeedRefreshItem();
return __elementList.InsertAt(&const_cast<_AccessibilityElement&>(element), index);
}
}
}
__elementList.RemoveAll();
- _AccessibilityManager::GetInstance()->NeedRefreshItem();
+ _AccessibilityManager::GetInstance()->NeedRefreshItem();
return E_SUCCESS;
}
}
bool
-_AccessibilityContainer::SetParent(const _AccessibilityContainer& parent)
+_AccessibilityContainer::SetParent(const _AccessibilityContainer* pParent)
{
- if (__pParent == null)
- {
- __pParent = &const_cast<_AccessibilityContainer&>(parent);
- return true;
- }
- else
- {
- return false;
- }
+ __pParent = const_cast<_AccessibilityContainer*>(pParent);
+ return true;
}
_AccessibilityContainer*
{
return __pParent;
}
-
+_AccessibilityContainer*
+_AccessibilityContainer::GetRootParent(void) const
+{
+ _AccessibilityContainer* pParent = __pParent;
+ while(pParent != null && pParent->GetParent() != null)
+ {
+ pParent = pParent->GetParent();
+ }
+ return pParent;
+}
void
_AccessibilityContainer::SetCurrentFocusedElement(_AccessibilityElement*pElement)
{
SysTryReturn(NID_UI, ControlCoreExists(__coreHandle), E_SYSTEM, E_SYSTEM,"[E_SYSTEM] A core of control is invalid.");
AccessibilityElement* pElement = const_cast<AccessibilityElement*>(&(element.GetPublic()));
result r = __elementList.Remove(pElement);
- if (r == E_SUCCESS)
- {
- const_cast<_AccessibilityElementImpl&>(element).GetCore().Activate(false);
- delete pElement;
- }
+ const_cast<_AccessibilityElementImpl&>(element).GetCore().Activate(false);
+ delete pElement;
return r;
}
}
__elementList.RemoveAll();
}
+ if (__pCore)
+ {
+ LinkedListT<_AccessibilityElement*> list;
+ __pCore->GetElements(list);
+ int count = list.GetCount();
+ for (int i = 0; i < count; i++)
+ {
+ _AccessibilityElement* pElement = null;
+ if (list.GetAt(i, pElement) == E_SUCCESS)
+ {
+ pElement->Activate(false);
+ }
+ }
+ }
return r;
}
return true;
}
bool
-_AccessibilityContainerImpl::OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+_AccessibilityContainerImpl::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
int count = __listenerList.GetCount();
if (count > 0)
_AccessibilityElement::Activate(bool enable)
{
__activated = enable;
- if(enable == false)
- {
- __pUserData = null;
- }
}
bool
_AccessibilityElement::IsActivated(void) const
, __pCore(null)
{
__pPublic = &const_cast<AccessibilityElement&>(element);
- __pCore = new (std::nothrow) _AccessibilityElement();
+ __pCore = new (std::nothrow) _AccessibilityElement(false);
SysTryReturn(NID_UI, __pCore, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed");
__pCore->SetUserData(this);
}
{
if (__pCore)
{
- if(__pCore->GetParent() == null)
+ if(__pCore->IsSystemElement())
{
- delete __pCore;
+ __pCore->Activate(false);
+ __pCore->SetUserData(null);
__pCore = null;
}
else
{
- __pCore->Activate(false);
- __pCore->SetUserData(null);
+ _AccessibilityContainer* pContainer = __pCore->GetParent();
+ if(pContainer != null)
+ {
+ pContainer->RemoveElement(*__pCore);
+ }
+ else
+ {
+ delete __pCore;
+ }
__pCore = null;
}
}
#include <FGrpBitmap.h>
#include <FBase_StringConverter.h>
#include <FGrp_BitmapImpl.h>
+#include <FSys_SystemTimeImpl.h>
#include "FUi_AccessibilityGesture.h"
#include "FUi_AccessibilitySystemSettingLoader.h"
#include "FUi_AccessibilityTtsPlayer.h"
using namespace Tizen::Graphics;
using namespace Tizen::Ui::Animations;
using namespace Tizen::Ui::Controls;
-
+using namespace Tizen::System;
namespace
{
class GuidePopupTimer
}
pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame();
-
if (pFrame != null)
{
int accesibilityVisualElementLevel = 3000;
{
if (__pTargetElement)
{
- pListener->OnAccessibilityReadedElement(*__pTargetContainer, *__pTargetElement);
+ pListener->OnAccessibilityReadElement(*__pTargetContainer, *__pTargetElement);
}
}
}
controlList.Add(pControl);
}
DownVisitor(*pControl, controlList);
- _AccessibilityItemComparer<_Control*> controlComparer;
- //controlList.Sort(controlComparer);
+ count = controlList.GetCount();
+ Dimension screen = _ResourceManager::GetInstance()->GetLogicalScreenSizen();
+ int margin = _ControlManager::GetInstance()->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT ? screen.width : screen.height;
+
+ for(int i = 0 ; i < count ; i++)
+ {
+ if (controlList.GetAt(i, pControl) == E_SUCCESS)
+ {
+ FloatRectangle rect = pControl->GetAbsoluteBoundsF();
+ if (rect.x + rect.width <= 0.0f || (rect.x) >= margin)
+ {
+ bool inside = false;
+ _Control* _pControl = pControl;
+ while(_pControl)
+ {
+ if(dynamic_cast<_IScrollableContainer*>(_pControl))
+ {
+ if (rect.x + rect.width > 0.0f && (rect.x) < margin)
+ {
+ inside = true;
+ break;
+ }
+ }
+ _pControl = _pControl->GetParent();
+ }
+ if(!inside)
+ {
+ _AccessibilityContainer* pContainer = pControl->GetAccessibilityContainer()->GetRootParent();
+ if(pContainer != null)
+ {
+ rect = pContainer->GetAbsoluteBounds();
+ if (rect.x + rect.width > 0.0f && (rect.x) < margin)
+ {
+ inside = true;
+ }
+ }
+ }
+ if(!inside)
+ {
+ controlList.Remove(pControl);
+ i--;
+ count--;
+ }
+ }
+ }
+ }
for (int i = 0; i < controlList.GetCount() ; i++)
{
if (controlList.GetAt(i, pControl) == E_SUCCESS)
}
_AccessibilityElement* pElement = null;
-
- Dimension screen = _ResourceManager::GetInstance()->GetLogicalScreenSizen();
- int margin = _ControlManager::GetInstance()->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT ? screen.width : screen.height;
-
for (int i = 0 ; i < count ; i++)
{
r = __candidateList.GetAt(i, pElement);
__candidateList.Remove(pElement);
__candidateList.InsertAt(pElement, 0);
}
- if (pElement->GetAbsoluteBounds().x + pElement->GetAbsoluteBounds().width <= 1.0
- || (int)(pElement->GetAbsoluteBounds().x) >= margin - 1)
- {
- __candidateList.Remove(pElement);
- i--;
- count--;
- }
}
return;
}
SetGestureMode(MODE_TAP);
__candidateList.RemoveAll();
}
+ _Control* pControl = null;
Point pt((int)point.x, (int)point.y);
- _Control* pControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(pt);
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
+ _Control* pCapturedControl = pTouchManager->GetCapturedControl();
+ if (pCapturedControl)
+ {
+ if(pCapturedControl->GetAbsoluteBounds().Contains(pt))
+ {
+ pControl = pCapturedControl;
+ }
+ }
+ else
+ {
+ pControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(pt);
+ }
if (pControl == null)
{
return false;
ReadContent(L"Unavailable");
return true;
}
-
if (__pTargetElement->GetSupportOperatingGesture())
{
+ long long tick = 0;
+ if (_SystemTimeImpl::GetTicks(tick) != E_SUCCESS)
+ {
+ tick = 0;
+ }
FloatRectangle rect = __pTargetElement->GetAbsoluteBounds();
Point _point((int)(rect.x + rect.width/2), (int)(rect.y + rect.height/2));
- _UiTouchEvent pressedEvent(_pControl->GetHandle(), _TouchInfo(0, _TOUCH_PRESSED, _point, false, 0));
- _UiTouchEvent releasedEvent(_pControl->GetHandle(), _TouchInfo(0, _TOUCH_RELEASED, _point, false, 0));
+ _UiTouchEvent pressedEvent(_pControl->GetHandle(), _TouchInfo(0, _TOUCH_PRESSED, _point, false, tick));
+ _UiTouchEvent releasedEvent(_pControl->GetHandle(), _TouchInfo(0, _TOUCH_RELEASED, _point, false, tick+1));
pressedEvent.SetAccessibilityEvent(true);
releasedEvent.SetAccessibilityEvent(true);
_Control* pControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(pt);
if (pControl == null)
{
+ SysLog(NID_UI, "Two finger panning is started. but control is null");
return false;
}
-
- _UiTouchEvent pressedEvent(pControl->GetHandle(), _TouchInfo(0, _TOUCH_PRESSED, pt, false, 0));
+ long long tick = 0;
+ if (_SystemTimeImpl::GetTicks(tick) != E_SUCCESS)
+ {
+ tick = 0;
+ }
+ _UiTouchEvent pressedEvent(pControl->GetHandle(), _TouchInfo(0, _TOUCH_PRESSED, pt, false, tick));
unsigned int pointId = 0;
pointId = _TouchManager::GetInstance()->GeneratePointId(0);
_UiEventManager::GetInstance()->SendEvent(pressedEvent);
__pPanningControl = pControl;
- _UiTouchEvent movedEvent(__pPanningControl->GetHandle(), _TouchInfo(0, _TOUCH_MOVED, pt, false, 0));
- pointId = _TouchManager::GetInstance()->GetPointId(0);
- _UiEventManager::GetInstance()->SendEvent(movedEvent);
SetGestureMode(MODE_PANNING);
- }
+ SysLog(NID_UI, "Two finger panning is started. x:%d, y:%d", pt.x, pt.y);
+ }
break;
case _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_CHANGED:
{
if (__pPanningControl == null || GetGestureMode() != MODE_PANNING)
{
SetGestureMode(MODE_TAP);
+ SysLog(NID_UI, "Two finger panning is started. but control is null");
return false;
}
+ long long tick = 0;
+ if (_SystemTimeImpl::GetTicks(tick) != E_SUCCESS)
+ {
+ tick = 0;
+ }
Point pt((int)point.x, (int)point.y);
- _UiTouchEvent movedEvent(__pPanningControl->GetHandle(), _TouchInfo(0, _TOUCH_MOVED, pt, false, 0));
+ _UiTouchEvent movedEvent(__pPanningControl->GetHandle(), _TouchInfo(0, _TOUCH_MOVED, pt, false, tick));
unsigned int pointId = 0;
pointId = _TouchManager::GetInstance()->GetPointId(0);
_UiEventManager::GetInstance()->SendEvent(movedEvent);
+ SysLog(NID_UI, "Two finger panning is moved. x:%d, y:%d", pt.x, pt.y);
}
break;
case _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_FINISHED:
if (__pPanningControl == null || GetGestureMode() != MODE_PANNING)
{
SetGestureMode(MODE_TAP);
+ SysLog(NID_UI, "Two finger panning is started. but control is null");
return false;
}
+ long long tick = 0;
+ if (_SystemTimeImpl::GetTicks(tick) != E_SUCCESS)
+ {
+ tick = 0;
+ }
Point pt((int)point.x, (int)point.y);
- _UiTouchEvent releasedEvent(__pPanningControl->GetHandle(), _TouchInfo(0, _TOUCH_RELEASED, pt, false, 0));
+ _UiTouchEvent releasedEvent(__pPanningControl->GetHandle(), _TouchInfo(0, _TOUCH_RELEASED, pt, false, tick));
unsigned int pointId = 0;
pointId = _TouchManager::GetInstance()->GetPointId(0);
_UiEventManager::GetInstance()->SendEvent(releasedEvent);
__pPanningControl = null;
SetGestureMode(MODE_TAP);
+ SysLog(NID_UI, "Two finger panning is finished. x:%d, y:%d", pt.x, pt.y);
}
break;
default:
IsFocusable(), E_INVALID_OPERATION,
E_INVALID_OPERATION, "[E_INVALID_OPERATION] This Control isn't focusable control.");
+ bool isVisible = IsVisible();
+ if (isVisible == false)
+ {
+ return E_SUCCESS;
+ }
+
if (on)
{
_Window* pTop = GetRootWindow();
#include "FUi_WindowImpl.h"
#include "FUiAnim_VisualElement.h"
#include "FUiAnim_VisualElementImpl.h"
+#include "FUiCtrl_Popup.h"
//#define _TC_PASS
using namespace Tizen::Ui::Animations;
using namespace Tizen::App;
using namespace Tizen::Base::Utility;
+using namespace Tizen::Ui::Controls;
namespace Tizen { namespace Ui {
return GetCore().GetSizeF();
}
-void
-_ControlImpl::UpdateBuilderBounds(const Tizen::Graphics::FloatRectangle& bounds)
+_ControlOrientation
+_ControlImpl::GetUiBuilderOrientation(void) const
{
- FloatRectangle builderBounds;
_ControlOrientation controlOrientation = _CONTROL_ORIENTATION_PORTRAIT;
- bool exist = GetBuilderBoundsF(controlOrientation, builderBounds);
- if (exist)
+
+ _Window* pWindow = GetCore().GetRootWindow();
+ if (!pWindow)
{
- if (IsAttachedToMainTree())
+ return controlOrientation;
+ }
+
+ _ControlImplManager* pControlImplManager = _ControlImplManager::GetInstance();
+ if (!pControlImplManager)
+ {
+ return controlOrientation;
+ }
+
+ if (pWindow->IsOrientationRoot())
+ {
+ // Frame
+ OrientationStatus status = pControlImplManager->GetFormOrientationStatus(this);
+
+ if ((status == ORIENTATION_STATUS_LANDSCAPE) || (status == ORIENTATION_STATUS_LANDSCAPE_REVERSE))
{
- _Window* pWindow = GetCore().GetRootWindow();
- if (pWindow->IsOrientationRoot())
- {
- // Frame
- _ControlImplManager* pControlImplManager = _ControlImplManager::GetInstance();
- OrientationStatus orientationStatus = pControlImplManager->GetFormOrientationStatus(this);
+ controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE;
+ }
+ else
+ {
+ controlOrientation = _CONTROL_ORIENTATION_PORTRAIT;
+ }
+ }
+ else
+ {
+ // Ownee Window
+ bool owner = false;
- if ((orientationStatus == ORIENTATION_STATUS_LANDSCAPE) || (orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE))
- {
- controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE;
- }
- else
- {
- controlOrientation = _CONTROL_ORIENTATION_PORTRAIT;
- }
- }
- else
+ Tizen::Ui::Controls::_Popup* pPopup = dynamic_cast<Tizen::Ui::Controls::_Popup*>(pWindow);
+ if (pPopup)
+ {
+ if (pWindow->IsOrientationCallbackModeEnabled() == false)
{
- // Window
- controlOrientation = GetCore().GetOrientation();
+ owner = true;
}
+ }
- if (controlOrientation == _CONTROL_ORIENTATION_LANDSCAPE)
- {
- SetBuilderBounds(_CONTROL_ORIENTATION_LANDSCAPE, bounds);
- }
- else
+ if (owner)
+ {
+ _Control* pOwner = pWindow->GetOwner();
+ if (pOwner)
{
- SetBuilderBounds(_CONTROL_ORIENTATION_PORTRAIT, bounds);
+ _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(pOwner->GetUserData());
+ if (pControlImpl)
+ {
+ OrientationStatus status = pControlImplManager->GetFormOrientationStatus(pControlImpl);
+ if ((status == ORIENTATION_STATUS_LANDSCAPE) || (status == ORIENTATION_STATUS_LANDSCAPE_REVERSE))
+ {
+ controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE;
+ }
+ else
+ {
+ controlOrientation = _CONTROL_ORIENTATION_PORTRAIT;
+ }
+ }
}
}
else
{
+ controlOrientation = GetCore().GetOrientation();
+ }
+ }
+
+ return controlOrientation;
+}
+
+void
+_ControlImpl::UpdateBuilderBounds(const Tizen::Graphics::FloatRectangle& bounds)
+{
+ FloatRectangle builderBounds;
+ _ControlOrientation controlOrientation = GetUiBuilderOrientation();
+ bool exist = GetBuilderBoundsF(controlOrientation, builderBounds);
+ if (exist)
+ {
+ if (IsAttachedToMainTree())
+ {
+ SetBuilderBounds(controlOrientation, bounds);
+ }
+ else
+ {
SetBuilderBounds(_CONTROL_ORIENTATION_PORTRAIT, bounds);
SetBuilderBounds(_CONTROL_ORIENTATION_LANDSCAPE, bounds);
}
_ControlImpl::UpdateBuilderSize(const Tizen::Graphics::FloatDimension& dimension)
{
FloatRectangle builderBounds;
- _ControlOrientation controlOrientation = GetCore().GetOrientation();
+ _ControlOrientation controlOrientation = GetUiBuilderOrientation();
bool exist = GetBuilderBoundsF(controlOrientation, builderBounds);
if (exist)
}
}
+void
+_ControlImpl::UpdateBuilderPosition(const FloatPoint& position)
+{
+ FloatRectangle builderBounds;
+ _ControlOrientation controlOrientation = GetUiBuilderOrientation();
+
+ bool exist = GetBuilderBoundsF(controlOrientation, builderBounds);
+ if (exist)
+ {
+ builderBounds.x = position.x;
+ builderBounds.y = position.y;
+ UpdateBuilderBounds(builderBounds);
+ }
+}
+
result
_ControlImpl::SetBounds(const Rectangle& bounds, bool callBoundsChangeCallbacks)
{
result
_ControlImpl::SetPosition(const Point& position)
{
+ UpdateBuilderPosition(_CoordinateSystemUtils::ConvertToFloat(position));
return GetCore().SetPosition(position);
}
result
_ControlImpl::SetPosition(const FloatPoint& position)
{
+ UpdateBuilderPosition(position);
return GetCore().SetPosition(position);
}
}
OrientationStatus
-_ControlImplManager::GetFormOrientationStatus(_ControlImpl* pControlImpl)
+_ControlImplManager::GetFormOrientationStatus(const _ControlImpl* pControlImpl) const
{
- _FormImpl* pParentImpl = null;
+ const _FormImpl* pFormImpl = null;
OrientationStatus orientation = ORIENTATION_STATUS_NONE;
+
while(pControlImpl)
{
- pParentImpl = dynamic_cast<_FormImpl*>(pControlImpl->GetParent());
+ pFormImpl = dynamic_cast<const _FormImpl*>(pControlImpl);
- if (pParentImpl != null)
+ if (pFormImpl)
{
break;
}
}
}
- if (pParentImpl)
+ if (pFormImpl)
{
- orientation = pParentImpl->GetOrientationStatus();
+ orientation = pFormImpl->GetOrientationStatus();
}
return orientation;
SysLog(NID_UI, "[Clipboard] Clipboard is closed.");
_Clipboard::GetInstance()->FirePopupEvent(_CLIPBOARD_POPUP_STATE_CLOSED, 0, 0);
__clipboardHeight = 0;
+ _Clipboard::GetInstance()->HidePopup();
}
}
else if (pEv->atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY)
if (pLongPressGesture)
{
- if (pLongPressGesture->IsTouchCanceled())
- {
- pLongPressGesture->ResetGestureTimerManager();
- }
+ pLongPressGesture->ResetGestureTimerManager();
}
}
}
break;
+ case _TOUCH_CANCELED:
+ pFingerInfo->SetStatus(_TOUCH_CANCELED);
+ break;
+
default:
break;
}
_UiEventManager* pEventManager = _UiEventManager::GetInstance();
SysTryReturnVoidResult(NID_UI, pEventManager, E_SYSTEM, "[E_SYSTEM] _UiEventManager does not exist.");
- pEventManager->SendEvent(event);
-
_TouchManager* pTouchManager = _TouchManager::GetInstance();
SysTryReturnVoidResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist.");
+ result r = pTouchManager->AddPoint(touchInfo.GetPointId(), currentPoint, _TOUCH_CANCELED);
+ SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+
+ pEventManager->SendEvent(event);
+
IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN();
SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
#endif
, __preferredRotation(false)
#endif
+ , __orientationCallbackMode(false)
{
SetControlDelegate(*this);
SetWindowDelegate(*this);
return __pDimmingLayer;
}
+void
+_Window::SetOrientationCallbackModeEnabled(bool enable)
+{
+ __orientationCallbackMode = enable;
+}
+
+bool
+_Window::IsOrientationCallbackModeEnabled(void) const
+{
+ return __orientationCallbackMode;
+}
+
}} // Tizen::Ui
_AnimationManager::~_AnimationManager(void)
{
+ if (__pCurrentTransaction)
+ {
+ delete __pCurrentTransaction;
+ __pCurrentTransaction = null;
+ }
+
__committedList.RemoveAllNodes();
}
{
_VisualElementImpl* pRootPresentationImpl = _VisualElementImpl::GetInstance(*pPresentationRoot);
-#ifdef OLD
- if (likely((pRootPresentationImpl->__childrenNeedsUpdateProps & ~_VisualElementImpl::HIERARCHY_PROPERTY_CONTENT) != 0) ||
-#else
if (likely(pRootPresentationImpl->__childrenNeedsUpdateProps) ||
-#endif
likely(pRootPresentationImpl->__pSharedData->NeedNativeReconfigure()) ||
unlikely(root.GetNeedsContentUpdate()) ||
unlikely(pPresentationRoot->GetNeedsContentUpdate()))
, __decomposedTransform()
, __childrenTransform()
, __decomposedChildrenTransform()
-#ifdef OLD
- , __childrenNeedsUpdateProps(HIERARCHY_PROPERTY_MASK & ~HIERARCHY_PROPERTY_CONTENT)
- , __invalidatedProps(HIERARCHY_PROPERTY_MASK& ~HIERARCHY_PROPERTY_CONTENT)
-#else
, __childrenNeedsUpdateProps(HIERARCHY_PROPERTY_MASK)
, __invalidatedProps(HIERARCHY_PROPERTY_MASK)
-#endif
, __matrixFromTopValid(false)
, __matrixFromTopInvertible(true)
, __matrixToSuperValid(false)
, __decomposedTransform(modelImpl.__decomposedTransform)
, __childrenTransform(modelImpl.__childrenTransform)
, __decomposedChildrenTransform(modelImpl.__decomposedChildrenTransform)
-#ifdef OLD
- , __childrenNeedsUpdateProps(HIERARCHY_PROPERTY_MASK & ~HIERARCHY_PROPERTY_CONTENT)
- , __invalidatedProps(HIERARCHY_PROPERTY_MASK & ~HIERARCHY_PROPERTY_CONTENT)
-#else
, __childrenNeedsUpdateProps(HIERARCHY_PROPERTY_MASK)
, __invalidatedProps(HIERARCHY_PROPERTY_MASK)
-#endif
, __matrixFromTopValid(false)
, __matrixFromTopInvertible(true)
, __matrixToSuperValid(false)
{
ClearLastResult();
- //GetSharedData().AddRef();
-
__children.Construct();
-
- //GetSharedData().invalidatedNativeProps = HIERARCHY_PROPERTY_MASK;
-
- // for MODEL object
- //modelImpl.__pPresentation = this;
}
_VisualElementImpl::~_VisualElementImpl(void)
{
__pDestroyedCallback(__pDestroyedCallbackData);
}
-
-
- // Remove property observer finally
-// if (IsPropertyChangeEventListenerAdded())
-// {
-// RemovePropertyChangeEventListener(_VisualElementModelObserver::GetInstance());
-// }
}
void
pElement->GetSharedData().childrenSurfaceChanged = true;
pElement = pElement->__pParent;
}
-#ifdef OLD
- __pPresentation->InvalidateHierarchyProps(HIERARCHY_PROPERTY_SURFACE, false, false);
-#endif
}
}
else
pElement->GetSharedData().childrenSurfaceChanged = true;
pElement = pElement->__pParent;
}
-#ifdef OLD
- InvalidateHierarchyProps(HIERARCHY_PROPERTY_SURFACE, false, false);
-#endif
}
}
_VisualElementImpl::SetContentBounds(const FloatRectangle& contentBounds)
{
SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object.");
-#if 0
- return SetContentBoundsI(contentBounds);
-#else
result r = InvokeOnSetPropertyRequested(*pVePropContentBounds, Variant(contentBounds));
SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r));
return r;
-#endif
}
FloatRectangle
{
ClearLastResult();
- // TBD: forward using property or direct return ?
-#if 0
- bool isImplicitAnimationEnabled = InvokeOnGetPropertyRequested(*pVePropImplicitAnimationEnabled).ToBool();
- if (GetLastResult() != E_SUCCESS)
- return false;
-
- return isImplicitAnimationEnabled;
-#else
return __isImplicitAnimationEnabled;
-#endif
}
result
{
ClearLastResult();
- // TBD: forward using property or direct return ?
-#if 0
- FloatRectangle bounds = InvokeOnGetPropertyRequested(*pVePropBounds).ToFloatRectangle();
- if (GetLastResult() != E_SUCCESS)
- {
- return FloatRectangle();
- }
-
- return bounds;
-#else
return __bounds;
-#endif
}
result
if (unlikely(!NEED_SURFACE(this)))
InvalidateVisibleRectToRenderTarget(null);
- // if (sizeChanged)
- // SysLog(NID_UI_ANIM, "size changing to " VELOGRECTTAG, VELOGRECT(boundsAdjusted));
-
__bounds.x = boundsAdjusted.Left();
__bounds.y = boundsAdjusted.Top();
__bounds.width = newWidth;
{
ClearLastResult();
- // TBD: forward using property or direct return ?
-#if 0
- float zPosition = (const_cast< _VisualElementImpl* >(this))->InvokeOnGetPropertyRequested(*pVePropZPosition).ToFloat();
- if (GetLastResult() != E_SUCCESS)
- {
- return 0.0f;
- }
-
- return zPosition;
-#else
return __zPosition;
-#endif
}
result
return IsVisibleI();
}
-#if 0
-bool
-_VisualElementImpl::IsVisibleI(void) const
-{
-#if 0
- const _VisualElementImpl* pElement = this;
- const _VisualElementImpl* pRoot = GetRoot();
-
- if (unlikely(!pRoot))
- return false;
-
- while (pElement)
- {
- if (!VE_VISIBLE(pElement))
- {
- return false;
- }
-
-#if 0
- if (!pElement->__pParent)
- {
- if (dynamic_cast< const _RootVisualElement* >(pElement) == null)
- {
- return false;
- }
- }
-#else
- if (!pElement->__pParent && pElement != pRoot)
- return false;
-#endif
-
- pElement = pElement->__pParent;
- }
-
- return true;
-#else
- if (unlikely(IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES)))
- {
- const_cast< _VisualElementImpl* >(this)->RebuildCoordinates();
- }
-
- return __isVisible;
-#endif
-}
-#endif
-
bool
_VisualElementImpl::GetShowState(void) const
{
ClearLastResult();
- // TBD: forward using property or direct return ?
-#if 0
- return InvokeOnGetPropertyRequested(*pVePropShowState).ToBool();
-#else
return VE_VISIBLE(this);
-#endif
}
result
{
ClearLastResult();
- // TBD: forward using property or direct return ?
-#if 0
- return InvokeOnGetPropertyRequested(*pVePropContentOpacity).ToFloat();
-#else
return __contentOpacity;
-#endif
}
result
{
ClearLastResult();
- // TBD: forward using property or direct return ?
-#if 0
- return InvokeOnGetPropertyRequested(*pVePropOpacity).ToFloat();
-#else
return __opacity;
-#endif
}
result
{
ClearLastResult();
- // TBD: forward using property or direct return ?
-#if 0
- return InvokeOnGetPropertyRequested(*pVePropAnchor).ToFloatPoint();
-#else
return __anchor;
-#endif
}
result
{
ClearLastResult();
- // TBD: forward using property or direct return ?
-#if 0
- return InvokeOnGetPropertyRequested(*pVePropAnchorZ).ToFloat();
-#else
return __anchorZ;
-#endif
}
result
{
ClearLastResult();
- // TBD: forward using property or direct return ?
-#if 0
- return InvokeOnGetPropertyRequested(*pVePropTransform).ToFloatMatrix4();
-#else
return __transform;
-#endif
}
result
{
ClearLastResult();
- // TBD: forward using property or direct return ?
-#if 0
- return InvokeOnGetPropertyRequested(*pVePropChildrenTransform).ToFloatMatrix4();
-#else
return __childrenTransform;
-#endif
}
{
ClearLastResult();
- // TBD: forward using property or direct return ?
-#if 0
- return InvokeOnGetPropertyRequested(*pVePropClipToParent).ToBool();
-#else
return false;
-#endif
}
// TBD: clipToParent is not animatable, right??
{
ClearLastResult();
- // TBD: forward using property or direct return ?
-#if 0
- return InvokeOnGetPropertyRequested(*pVePropSurfaceOpaque).ToBool();
-#else
return GetSharedData().isSurfaceOpaque;
-#endif
}
result
{
ClearLastResult();
-#if 0
- return InvokeOnGetPropertyRequested(*pVePropName).ToString();
-#else
return GetSharedData().name;
-#endif
}
result
// WARNING:
// Even when surface exists, the size might be invalidated by changing bounds.
//
-#if 0
- RebuildHierarchyProps(HIERARCHY_PROPERTY_MASK & (~HIERARCHY_PROPERTY_CONTENT), true);
- if (!HAVE_SURFACE(this))
- {
- return __visibleRect;
- }
-#endif
if (HAVE_SURFACE(this) && GetSharedData().fixedSurfaceSize)
{
return FloatRectangle(0.0f, 0.0f, GetSharedData().pSurface->GetSizeF().width, GetSharedData().pSurface->GetSizeF().height);
if (unlikely(!__boundingBoxValid))
{
-#if 0
- float x[4] = { 0.0f, __bounds.width, 0.0f, __bounds.width };
- float y[4] = { 0.0f, 0.0f, __bounds.height, __bounds.height };
- float z[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
-
- for (int i = 0; i < 4; i++)
- {
- _MatrixUtilTransform(GetMatrixToTop(), &x[i], &y[i], &z[i]);
- }
-
- pThis->__boundingBox.SetBounds(x[0], y[0], x[0], y[0]);
-
- float l = x[0];
- float r = x[0];
- float t = y[0];
- float b = y[0];
- for (int i = 1; i < 4; i++)
- {
- if (x[i] < l)
- {
- l = x[i];
- }
-
- if (y[i] < t)
- {
- t = y[i];
- }
-
- if (x[i] > r)
- {
- r = x[i];
- }
-
- if (y[i] > b)
- {
- b = y[i];
- }
- }
-
- pThis->__boundingBox.SetBounds(l, t, r - l, b - t);
-#else
float x[4] = { 0.0f, __bounds.width, 0.0f, __bounds.width };
float y[4] = { 0.0f, 0.0f, __bounds.height, __bounds.height };
CalculateBoundingBox(x, y, pThis->__boundingBox);
-#endif
pThis->__boundingBoxValid = true;
}
return;
}
-#ifdef OLD
- if (unlikely(props & HIERARCHY_PROPERTY_SURFACE) && unlikely(IsPropsInvalidated(HIERARCHY_PROPERTY_SURFACE)))
- {
- SetPropsValidaty(HIERARCHY_PROPERTY_SURFACE, 0);
- }
-#endif
-
if (likely(props & HIERARCHY_PROPERTY_CONTENTBOUNDS) && likely(IsPropsInvalidated(HIERARCHY_PROPERTY_CONTENTBOUNDS)))
{
SetPropsValidaty(HIERARCHY_PROPERTY_CONTENTBOUNDS, 0);
{
// WARNING:
// HIERARCHY_PROPERTY_CONTENT is not handled here, but in drawing logic.
-#ifdef OLD
- const int mask = HIERARCHY_PROPERTY_MASK & (~HIERARCHY_PROPERTY_CONTENT);
-#else
const int mask = HIERARCHY_PROPERTY_MASK;
-#endif
if (unlikely((__childrenNeedsUpdateProps & mask) == 0 && GetSharedData().childrenSurfaceChanged == false))
return;
{
InvalidateRectangleI(pDirtyRectangle);
}
-#if 0 // exposing object without content changes is not needed for EFL
- else
- {
- SetFlushNeeded();
- }
-#endif
}
result
result
_VisualElementImpl::InvalidateRectangle(const FloatRectangle* pRectangle)
{
-//!!! don't have to check attached state
-// SysTryReturnResult(NID_UI_ANIM, IS_ATTACHED(this), E_INVALID_STATE, "Invalidating VisualElement should be attached to the root tree.");
-
return InvalidateRectangleI(pRectangle);
}
GetSharedData().invalidatedRegion = invRect;
-#ifdef OLD
- InvalidateHierarchyProps(HIERARCHY_PROPERTY_CONTENT, false, false);
-#else
_VisualElementImpl* pElement = this;
while (pElement)
{
pElement->GetSharedData().childrenInvalidated = true;
pElement = pElement->GetParent();
}
-#endif
SetRootNeedsContentUpdate();
return E_SUCCESS;
// if (IS_PRESENTATION(this))
// __UpdateHierarchyProps();
-#ifdef OLD
- if (unlikely((__childrenNeedsUpdateProps & HIERARCHY_PROPERTY_CONTENT) != 0))
-#else
if (unlikely(GetSharedData().childrenInvalidated))
-#endif
{
// if (unlikely(!IS_PRESENTATION(this)))
// __UpdateHierarchyProps();
return E_SUCCESS;
}
-#ifdef OLD
- if (unlikely((__childrenNeedsUpdateProps & HIERARCHY_PROPERTY_CONTENT) != 0))
-#else
if (unlikely(GetSharedData().childrenInvalidated))
-#endif
{
_VisualElementImpl* pRenderTarget = GetRenderTarget();
pRenderTarget->DrawRectangle(GetSharedData().invalidatedRegion);
-#ifdef OLD
- if (likely((__childrenNeedsUpdateProps & HIERARCHY_PROPERTY_CONTENT) == 0))
-#else
if (likely(GetSharedData().childrenInvalidated == false))
-#endif
{
return E_SUCCESS;
}
for (int i = 0; i < count; i++)
{
pChild = __children.GetChildAt(i);
-#ifdef OLD
- if (!pChild || (pChild->__childrenNeedsUpdateProps & HIERARCHY_PROPERTY_CONTENT) == 0)
-#else
if (!pChild || (pChild->GetSharedData().childrenInvalidated == false))
-#endif
{
continue;
}
pChild->DrawForAnimation();
-#ifdef OLD
- if ((pChild->__childrenNeedsUpdateProps & HIERARCHY_PROPERTY_CONTENT) != 0)
-#else
if ((pChild->GetSharedData().childrenInvalidated))
-#endif
{
childrenNeedUpdate = true;
}
// update 'needUpdate' flag regarding children only if no invalidated-region
if (GetSharedData().invalidatedRegion.IsEmpty())
{
-#ifdef OLD
- SetPropsValidaty(HIERARCHY_PROPERTY_CONTENT, 0);
- if (childrenNeedUpdate)
- {
- __childrenNeedsUpdateProps |= HIERARCHY_PROPERTY_CONTENT;
- }
- else
- {
- __childrenNeedsUpdateProps &= ~HIERARCHY_PROPERTY_CONTENT;
- }
-#else
if (childrenNeedUpdate)
{
GetSharedData().childrenInvalidated = true;
}
-#endif
}
}
void
_VisualElementImpl::DrawRectangleIfNeeded(const FloatRectangle& drawRect)
{
-#ifdef OLD
- if (unlikely(!IsVisibleI()) || (__childrenNeedsUpdateProps & HIERARCHY_PROPERTY_CONTENT) == 0)
-#else
if (unlikely(!IsVisibleI()) || GetSharedData().childrenInvalidated == false)
-#endif
{
return;
}
// needUpdate flag may be 'true' after drawring invalidated region.
// This means that some children still need to be updated !
//
-#ifdef OLD
- if (likely((__childrenNeedsUpdateProps & HIERARCHY_PROPERTY_CONTENT) == 0))
-#else
if (likely(GetSharedData().childrenInvalidated == false))
-#endif
{
return;
}
for (int i = 0; i < count; i++)
{
pChild = __children.GetChildAt(i);
-#ifdef OLD
- if (!pChild || (pChild->__childrenNeedsUpdateProps & HIERARCHY_PROPERTY_CONTENT) == 0)
-#else
if (!pChild || pChild->GetSharedData().childrenInvalidated == false)
-#endif
{
continue;
}
pChild->DrawRectangleIfNeeded(updateRect);
}
-#ifdef OLD
- if ((pChild->__childrenNeedsUpdateProps & HIERARCHY_PROPERTY_CONTENT) != 0)
-#else
if (pChild->GetSharedData().childrenInvalidated)
-#endif
{
childrenNeedUpdate = true;
}
// update 'needUpdate' flag regarding children only if no invalidated-region
if (GetSharedData().invalidatedRegion.IsEmpty())
{
-#ifdef OLD
- SetPropsValidaty(HIERARCHY_PROPERTY_CONTENT, 0);
- if (childrenNeedUpdate)
- {
- __childrenNeedsUpdateProps |= HIERARCHY_PROPERTY_CONTENT;
- }
- else
- {
- __childrenNeedsUpdateProps &= ~HIERARCHY_PROPERTY_CONTENT;
- }
-#else
- if (childrenNeedUpdate)
- {
- GetSharedData().childrenInvalidated = true;
- }
-#endif
+ if (childrenNeedUpdate)
+ {
+ GetSharedData().childrenInvalidated = true;
+ }
}
}
// Clear *BEFORE* drawing because 'OnDraw' may add invalidated regions...
//
GetSharedData().invalidatedRegion.SetBounds(0.0f, 0.0f, 0.0f, 0.0f); // SetEmpty()
-
-#ifdef OLD
- SetPropsValidaty(HIERARCHY_PROPERTY_CONTENT, 0);
- __childrenNeedsUpdateProps &= ~HIERARCHY_PROPERTY_CONTENT;
-#else
GetSharedData().childrenInvalidated = false;
-#endif
}
pChild->DrawRectangle(drawRectVisible);
}
-#ifdef OLD
- if ((pChild->__childrenNeedsUpdateProps & HIERARCHY_PROPERTY_CONTENT) != 0)
-#else
if (pChild->GetSharedData().childrenInvalidated)
-#endif
{
childrenNeedUpdate = true;
}
//
if (childrenNeedUpdate)
{
-#ifdef OLD
- __childrenNeedsUpdateProps |= HIERARCHY_PROPERTY_CONTENT;
-#else
GetSharedData().childrenInvalidated = true;
-#endif
}
}
_SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this);
SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use.");
- return pSplitPanelImpl->SetPane(const_cast <_ControlImpl*>(_ControlImpl::GetInstance(*pControl)), paneOrder);
+ if (pControl == null)
+ {
+ return pSplitPanelImpl->SetPane(null, paneOrder);
+ }
+
+ _ControlImpl* pImpl = _ControlImpl::GetInstance(*pControl);
+ SysAssertf(pImpl != null, "Parameter pControl is not yet constructed. Construct() should be called before use.");
+
+ return pSplitPanelImpl->SetPane(pImpl, paneOrder);
}
Control*
virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
- virtual bool OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
+ virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
{
result r = E_SUCCESS;
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundNormalEffectBitmap);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundPressedEffectBitmap);
-
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopNormalEffectBitmap);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundTopPressedEffectBitmap);
-
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddleNormalEffectBitmap);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundMiddlePressedEffectBitmap);
-
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_NORMAL]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_DISABLED]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_PRESSED]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_HIGHLIGHTED]);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomBitmap[_CHECK_BUTTON_STATUS_SELECTED]);
-
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomNormalEffectBitmap);
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundBottomPressedEffectBitmap);
+ 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]);
layoutSize.width = maxWidth - __itemGap;
layoutSize.height = lineCount * __itemHeight + (lineCount - 1) *__itemGap;
- if (lineCount == 1)
- {
- return layoutSize;
- }
-
// divide margin
int itemIndex = 0;
for (int line = 0; line < lineCount; line++)
}
FloatRectangle rect = pItem->GetDrawRect();
-
// divder
bool drawDivider = pItem->HasLowerDivider();
if (drawDivider == true)
if (pActionEvent == null)
{
+ __pContextMenu->SetVisibleState(false);
return true;
}
{
__selectedIndex = -1;
__pressedIndex = -1;
+ __pContextMenu->SetVisibleState(false);
return true;
}
__selectedIndex = -1;
__pressedIndex = -1;
- __pContextMenu->SetVisibleState(false);
int actionId = pItem->GetActionId();
if (pEventArg == null)
{
+ __pContextMenu->SetVisibleState(false);
return true;
}
PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP);
+ __pContextMenu->SetVisibleState(false);
pActionEvent->Fire(*pEventArg);
}
#include "FUi_AccessibilityContainer.h"
#include "FUi_AccessibilityElement.h"
#include "FUi_CoordinateSystemUtils.h"
+#include "FUi_Math.h"
#include "FUi_ResourceManager.h"
+#include "FUiCtrl_ScrollPanel.h"
#include "FUiCtrl_ContextMenuItem.h"
using namespace Tizen::Base;
SetBackgroundColor(Color(0, 0, 0, 0));
- if (!__upperDividerLine)
- {
- topMargin = __bgPressedMargin;
- }
-
- if (!__lowerDividerLine)
- {
- bottomMargin = __bgPressedMargin;
- }
-
if (__pBackgroundLabel == null)
{
__pBackgroundLabel = _Label::CreateLabelN();
}
FloatRectangle bounds = GetBoundsF();
+ _ScrollPanel* pScrollPanel = static_cast<_ScrollPanel*>(GetParent());
+ FloatRectangle boundsScrollPanel = pScrollPanel->GetBoundsF();
+
+ float topOverlap = pScrollPanel->GetScrollPosition() - bounds.y;
+ if (topOverlap > 0.0f)
+ {
+ topMargin = topOverlap + __bgPressedMargin;
+ }
+ else if (!__upperDividerLine)
+ {
+ topMargin = __bgPressedMargin;
+ }
+
+ float bottomOverlap = bounds.y + bounds.height - (pScrollPanel->GetScrollPosition() + boundsScrollPanel.height);
+ if (bottomOverlap > 0.0f)
+ {
+ bottomMargin = bottomOverlap + __bgPressedMargin;
+ }
+ else if (!__lowerDividerLine)
+ {
+ bottomMargin = __bgPressedMargin;
+ }
+
__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()));
}
bool
-_DateTimeBar::OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+_DateTimeBar::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
return false;
}
, __internalFocus(false)
, __isDestroyed(false)
, __pTextFilter(null)
+ , __previousBounds()
{
for (int status = 0; status < EDIT_COLOR_MAX; status++)
{
FloatRectangle previousRect = pTextObject->GetBoundsF();
FloatRectangle newRect = previousRect;
- bool fitToHorizontal = false;
- bool fitToVertical = true;
-
- if (fitToHorizontal)
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
- if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
- {
- newRect.width = _ControlManager::GetInstance()->GetScreenSizeF().width;
- }
- else
- {
- newRect.width = _ControlManager::GetInstance()->GetScreenSizeF().height;
- }
- newRect.width -= (GetBoundsF().x + leftMargin + rightMargin);
+ newRect.height = _ControlManager::GetInstance()->GetScreenSizeF().height;
}
- if (fitToVertical)
+ else
{
- if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
- {
- newRect.height = _ControlManager::GetInstance()->GetScreenSizeF().height;
- }
- else
- {
- newRect.height = _ControlManager::GetInstance()->GetScreenSizeF().width;
- }
- newRect.height -= (GetBoundsF().y + textTopMargin + textBottomMargin);
+ newRect.height = _ControlManager::GetInstance()->GetScreenSizeF().width;
}
+ newRect.height -= (GetBoundsF().y + textTopMargin + textBottomMargin);
pTextObject->SetBounds(newRect);
pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE);
pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD);
pTextObject->Compose();
- if (fitToHorizontal && fitToVertical)
- {
- dimension = pTextObject->GetTextExtentF(0, pTextObject->GetTextLength());
- float height = pTextObject->GetTotalHeightF();
- if (height < newRect.height)
- {
- dimension.height = height;
- }
- else
- {
- dimension.height = newRect.height;
- }
- }
- else if (fitToHorizontal)
+ float height = pTextObject->GetTotalHeightF();
+ if (height < newRect.height)
{
- dimension = pTextObject->GetTextExtentF(0, pTextObject->GetTextLength());
- dimension.height = GetBoundsF().height;
+ dimension.height = height;
}
- else if (fitToVertical)
+ else
{
- float height = pTextObject->GetTotalHeightF();
- if (height < newRect.height)
- {
- dimension.height = height;
- }
- else
- {
- dimension.height = newRect.height;
- }
- dimension.width = newRect.width;
+ dimension.height = newRect.height;
}
+ dimension.width = newRect.width;
// restore
pTextObject->SetBounds(previousRect);
pTextObject->SetWrap(previousWrapType);
pTextObject->Compose();
- if (fitToHorizontal)
- {
- dimension.width += leftMargin + rightMargin + textLeftMargin + textRightMargin;
- }
- if (fitToVertical)
- {
- dimension.height += textTopMargin + textBottomMargin;
- }
+ dimension.height += textTopMargin + textBottomMargin;
return dimension;
}
if (_pEditPresenter->IsUpdateInitialBounds())
{
FloatRectangle editBounds = GetBoundsF();
- _pEditPresenter->SetControlInitialBounds(editBounds);
+ if (__previousBounds.height != editBounds.height || __previousBounds.width != editBounds.width)
+ {
+ _pEditPresenter->SetControlInitialBounds(editBounds);
+ }
+ else
+ {
+ _pEditPresenter->SetControlInitialPosition(FloatPoint(editBounds.x, editBounds.y));
+ }
+ __previousBounds = editBounds;
+ }
+ else
+ {
+ __previousBounds = GetBoundsF();
}
}
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
break;
case GROUP_STYLE_SINGLE:
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
break;
case GROUP_STYLE_TOP:
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
break;
case GROUP_STYLE_MIDDLE:
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
break;
case GROUP_STYLE_BOTTOM:
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
+ r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
break;
default:
{
result r = E_SUCCESS;
float editDateHeight = 0.0f;
- float editDateWidth = 0.0f;
float dateLeftMargin = 0.0f;
float titleLeftMargin = 0.0f;
float titledateMargin = 0.0f;
float dayElementMinWidth = 0.0f;
FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f);
- GET_SHAPE_CONFIG(EDITDATE::WIDTH, __pEditDate->GetOrientation(), editDateWidth);
GET_SHAPE_CONFIG(EDITDATE::HEIGHT, __pEditDate->GetOrientation(), editDateHeight);
GET_SHAPE_CONFIG(EDITDATE::TITLE_TEXT_LEFT_MARGIN, __pEditDate->GetOrientation(), titleLeftMargin);
GET_SHAPE_CONFIG(EDITDATE::ITEM_DIVIDER_HEIGHT, __pEditDate->GetOrientation(), __dividerLineHeight);
{
__titleBounds.x = titleLeftMargin;
__titleBounds.y = (editDateHeight - (__titleBounds.height + titledateMargin + dateHeight)) / 2.0f;
- __titleBounds.width = editDateWidth - __titleBounds.x;
+ __titleBounds.width = __pEditDate->GetBoundsF().width - __titleBounds.x;
bounds.y = __titleBounds.y + __titleBounds.height + titledateMargin;
__titleObject.SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE);
__titleObject.SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
__titleObject.SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
+ __titleObject.SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL);
return r;
}
float _EditPresenter::__initialParentHeight = 0.0f;
float _EditPresenter::__clipboardHeight = 0.0f;
_EditFooterVisibleStatus _EditPresenter::__initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_NONE;
+bool _EditPresenter::__footerVisibleChanged = false;
_EditAnimationProvider::_EditAnimationProvider(void)
{
if (__isInputConnectionBound && __isUSBKeyboardConnected) // hide callback from external condition(usb mode off->on), focus remaining
{
- if (!__isKeypadCommandButtonVisible)
+ if (!__isKeypadCommandButtonVisible && !__isClipboardExist)
{
SetFooterVisible(true);// must be called ahead of DeflateClientRectHeight
}
{
if (__isInputConnectionBound)// keypad drag down
{
- if (!__isKeypadCommandButtonVisible)
+ if (!__isKeypadCommandButtonVisible && !__isClipboardExist)
{
SetFooterVisible(true);// must be called ahead of DeflateClientRectHeight
}
}
else
{
+ __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CLOSED);
+
if (!__isClipboardExist)
{
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CLOSE);
}
- __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CLOSED);
}
}
SysLog(NID_UI_CTRL, "[EDIT] clipboard closed! [KeypadExist:%d]keypad height = %f", __isKeypadExist, absKeypadBounds.height);
- ChangeLayoutInternal(__pEdit->GetOrientation());
+ if (__isInputConnectionBound)
+ {
+ ChangeLayoutInternal(__pEdit->GetOrientation());
+ }
if (__isKeypadExist)
{
}
else
{
+ if (__footerVisibleChanged)
+ {
+ SetFooterVisible(true);
+ }
+
AdjustParentPanelHeight(true);
if (__pParentForm)
{
CheckUSBKeyboardStatus();
- if (__clipboardConnected) //Edit control removed after FocusLost or without FocusLost callback.
+ if (__isInputConnectionBound || __isKeypadHiding || __clipboardConnected) //Edit control removed without FocusLost callback or HideKeypad.
{
- __pClipboard->HidePopup();
- __isClipboardExist = false;
-
- if (__pParentForm)
+ if (__clipboardConnected) //Edit control removed after FocusLost or without FocusLost callback.
{
- __pParentForm->SetClipboardShowState(false);
+ __pClipboard->HidePopup();
+ __isClipboardExist = false;
}
- }
- if (__isInputConnectionBound || __isKeypadHiding) //Edit control removed without FocusLost callback or HideKeypad.
- {
if (__pCommandButton && __isKeypadCommandButtonVisible)
{
__pCommandButton->SetVisibleState(false);
{
SysLog(NID_UI_CTRL, "[EDIT] Form deflate RESET!!!!!!!!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
- __pParentForm->SetKeypadShowState(false);
+
+ if (__clipboardConnected)
+ {
+ __pParentForm->SetClipboardShowState(false);
+ }
+ else
+ {
+ __pParentForm->SetKeypadShowState(false);
+ }
if (__pParentForm->GetFooter())
{
AdjustParentPanelHeight(true);
__isKeypadExist = false;
- __initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_NONE;
}
+ __initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_NONE;
+ __footerVisibleChanged = false;
+
if (__pParentForm)
{
if (__pParentForm->GetFooter())
cursorPos = 0;
}
+ if (__isInputConnectionBound && __isTextComposing)
+ {
+ __pInputConnection->FinishTextComposition();
+ __isTextComposing = false;
+ __composingTextLength = 0;
+ }
+
GetWordPosition(cursorPos, start, end);
SetBlockRange(start, end);
ScrollPanelToCursorPosition();
__pCopyPasteManager->Show();
__isCopyPasteManagerExist = true;
- if (__isInputConnectionBound && __isTextComposing)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
__pEdit->Draw();
}
__initialBounds = initBounds;
}
+void
+_EditPresenter::SetControlInitialPosition(FloatPoint initPosition)
+{
+ __initialBounds.x = initPosition.x;
+ __initialBounds.y = initPosition.y;
+}
+
bool
_EditPresenter::IsUpdateInitialBounds(void)
{
if (__pClipboard)
{
__pClipboard->HidePopup();
+ OnClipboardPopupClosed();
}
}
if (isVisible)
{
SysLog(NID_UI_CTRL, "[EDIT] SetFooterVisible TRUE!!!!!");
+ __footerVisibleChanged = false;
}
else
{
SysLog(NID_UI_CTRL, "[EDIT] SetFooterVisible FALSE!!!!!");
+ __footerVisibleChanged = true;
}
pFooter->SetVisibleState(isVisible);
__isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation()); //prediction alreaedy exists
- if (__initialFooterVisibleStatus == EDIT_FOOTER_VISIBLE_STATUS_NONE)
- {
- CheckInitialFooterVisibleState();
- }
-
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)
+ {
+ CheckInitialFooterVisibleState();
+ }
+
SetFooterVisible(false);
ChangeLayoutInternal(__pEdit->GetOrientation());
AdjustParentPanelHeight(false);
}
else
{
+ if (__initialFooterVisibleStatus == EDIT_FOOTER_VISIBLE_STATUS_NONE)
+ {
+ CheckInitialFooterVisibleState();
+ }
+
if (__isKeypadExist)
{
ChangeLayoutInternal(__pEdit->GetOrientation());
CheckInitialFooterVisibleState();
}
}
+ else
+ {
+ if (__footerVisibleChanged)
+ {
+ SetFooterVisible(true);
+ }
+
+ if (__initialFooterVisibleStatus == EDIT_FOOTER_VISIBLE_STATUS_NONE)
+ {
+ CheckInitialFooterVisibleState();
+ }
+ }
if (__isKeypadCommandButtonVisible)
{
if (__isUSBKeyboardConnected)
{
SysLog(NID_UI_CTRL, "[EDIT]HideKeypad called in USB ON mode!!!!");
- SetFooterVisible(true);
if (__pCommandButton && __isKeypadCommandButtonVisible)
{
+ SetFooterVisible(true);
+
__pCommandButton->SetVisibleState(false);
if (__pParentForm)
if (!__isKeypadExist)
{
SetFooterVisible(true);//must be called ahead of DeflateClientRectHeights
+
if (__pParentForm)
{
SysLog(NID_UI_CTRL, "[EDIT] Form deflate RESET!!!!!!!!!!");
__isTextComposing = false;
__composingTextLength = 0;
- if (__isKeypadExist && focus)
+ if (__isKeypadExist)
{
__isKeypadHiding = true;
}
}
bool
-_EditTime::OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+_EditTime::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
return false;
}
_EditTimePresenter::SetTitleBounds(void)
{
GET_SHAPE_CONFIG(EDITTIME::TITLE_TEXT_LEFT_MARGIN, __pEditTime->GetOrientation(), __titleBounds.x);
- GET_SHAPE_CONFIG(EDITTIME::WIDTH, __pEditTime->GetOrientation(), __titleBounds.width);
GET_SHAPE_CONFIG(EDITTIME::TITLE_HEIGHT, __pEditTime->GetOrientation(), __titleBounds.height);
- __titleBounds.width = __titleBounds.width - __titleBounds.x;
+ __titleBounds.width = __pEditTime->GetBoundsF().width - __titleBounds.x;
return;
}
__titleObject.SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE);
__titleObject.SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
__titleObject.SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
+ __titleObject.SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL);
return r;
}
float indexHeight = GetIndexHeight() / pIndex->GetChildCount();
int omissionIndexOrder = 0;
- if (!(_FloatCompare(touchY, 0.0f) || _FloatCompare(indexHeight, 0.0f)))
+ if ((touchY > 0.0f) && !_FloatCompare(indexHeight, 0.0f))
{
omissionIndexOrder = _CoordinateSystemUtils::ConvertToInteger(touchY / indexHeight);
}
void
_FastScrollIndexView::SetSelectedIndexInOmittedIndex(_FastScrollIndex* pIndex)
{
+ if (pIndex == __pSelectedIndexInOmittedIndex)
+ {
+ return;
+ }
+
__pFormerIndex = __pSelectedIndexInOmittedIndex;
__pSelectedIndexInOmittedIndex = pIndex;
}
{
pSelectedIndex = pFocusedIndexView->GetOmissionIndexAtPoint(pIndex,
FloatPoint(pFocusedIndexView->GetIndexBoundsF().x, point.y));
+ if (pSelectedIndex == null)
+ {
+ pSelectedIndex = pFocusedIndexView->GetSelectedIndexInOmittedIndex();
+ }
}
pFocusedIndexView->SetSelectedIndexInOmittedIndex(pSelectedIndex);
else
{
pSelectedIndex = pFocusedIndexView->GetSelectedIndex();
+ if (pSelectedIndex && pSelectedIndex->GetOmitted() == true)
+ {
+ pSelectedIndex = pFocusedIndexView->GetSelectedIndexInOmittedIndex();
+ }
selectedIndexLevel = __focusedIndexLevel;
}
}
using namespace Tizen::System;
using namespace Tizen::Ui::Effects;
+namespace {
+ const float TOUCH_INSENSITIVE = 0.08f;
+ const int GALLERY_GESTURE_TAP_MOVE_ALLOWANCE = 50;
+} // unnamed namespace
+
namespace Tizen { namespace Ui { namespace Controls {
_Gallery::_Gallery(void)
r = _Control::AddGestureDetector(__twoTapGesture);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = __twoTapGesture.SetMoveAllowance(GALLERY_GESTURE_TAP_MOVE_ALLOWANCE);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set TapMoveAllowance", GetErrorMessage(r));
+
__oneTapGesture.StartOnFailureOf(__twoTapGesture);
SetMultiTouchEnabled(true);
r = _SettingInfoImpl::AddSettingEventListenerForInternal(*this);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ SetTouchPressThreshold(TOUCH_INSENSITIVE);
+
SetRenderer((_GalleryRenderer &)*pRenderer);
SetPresenter((_GalleryPresenter &)*pPresenter);
void
_GroupedListViewImpl::OnChangeLayout(_ControlOrientation orientation)
{
- _ControlImpl::OnChangeLayout(orientation);
-
__isOrientationChanged = true;
+
+ _ControlImpl::OnChangeLayout(orientation);
}
void
rotation = 0;
break;
case ORIENTATION_STATUS_LANDSCAPE :
- rotation = 90;
+ rotation = 270;
break;
case ORIENTATION_STATUS_PORTRAIT_REVERSE :
rotation = 180;
break;
case ORIENTATION_STATUS_LANDSCAPE_REVERSE :
- rotation = 270;
+ rotation = 90;
break;
default :
break;
pTextObject->Compose();
dimension = pTextObject->GetTextExtentF(0, pTextObject->GetTextLength());
- contentRect.width = _ControlManager::GetInstance()->GetScreenSizeF().width;
+ _ControlOrientation orientation = GetOrientation();
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ contentRect.width = _ControlManager::GetInstance()->GetScreenSizeF().width;
+ }
+ else
+ {
+ contentRect.width = _ControlManager::GetInstance()->GetScreenSizeF().height;
+ }
if (dimension.width > contentRect.width - GetBoundsF().x - __leftMargin * 2)
{
void
_ListViewImpl::OnChangeLayout(_ControlOrientation orientation)
{
- _ControlImpl::OnChangeLayout(orientation);
-
__isOrientationChanged = true;
+
+ _ControlImpl::OnChangeLayout(orientation);
}
void
_IListItemCommon*
_ListViewModel::GetItemFromContainer(int groupIndex, int itemIndex) const
{
- SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __countOfAllGroups), null, E_INVALID_ARG,
- "[E_INVALID_ARG] The group index is not valid.");
+ if (groupIndex < 0 || groupIndex >= __countOfAllGroups)
+ {
+ return null;
+ }
_ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex);
SysTryReturn(NID_UI_CTRL, pListGroupNode != null, null, GetLastResult(),
}
// check validation of groupIndex
- SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __countOfAllGroups), null, E_INVALID_ARG,
- "[E_INVALID_ARG] Wrong group index.(%d)", groupIndex);
+ if (groupIndex < 0 || groupIndex >= __countOfAllGroups)
+ {
+ return null;
+ }
_ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex);
SysTryReturn(NID_UI_CTRL, pListGroupNode != null, null, GetLastResult(),
// check validation of item index
if (itemIndex < -1 || itemIndex >= pListGroupNode->__itemCountInGroup)
{
- SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The item index is not valid.");
return null;
}
_ListViewModel::IsValidItem(int groupIndex, int itemIndex) const
{
// check validation of groupIndex
- SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __countOfAllGroups), false, E_INVALID_ARG,
- "[E_INVALID_ARG] Wrong group index(%d).", groupIndex);
+ if (groupIndex < 0 || groupIndex >= __countOfAllGroups)
+ {
+ return false;
+ }
_ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex);
SysTryReturn(NID_UI_CTRL, pListGroupNode != null, false, GetLastResult(),
"[%s] Propagating.", GetErrorMessage(GetLastResult()));
// check validation of item index
- SysTryReturn(NID_UI_CTRL, (itemIndex >= -1 && itemIndex < pListGroupNode->__itemCountInGroup), false, E_INVALID_ARG,
- "[E_INVALID_ARG] Wrong item index(%d).", itemIndex);
+ if (itemIndex < -1 || itemIndex >= pListGroupNode->__itemCountInGroup)
+ {
+ return false;
+ }
return true;
}
_ListViewModel::IsLoadedItem(int groupIndex, int itemIndex) const
{
// check validation of groupIndex
- SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __countOfAllGroups), false, E_INVALID_ARG,
- "[E_INVALID_ARG] Wrong group index(%d).", groupIndex);
+ if (groupIndex < 0 || groupIndex >= __countOfAllGroups)
+ {
+ return false;
+ }
_ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex);
SysTryReturn(NID_UI_CTRL, pListGroupNode != null, false, GetLastResult(),
"[%s] Propagating.", GetErrorMessage(GetLastResult()));
// check validation of item index
- SysTryReturn(NID_UI_CTRL, (itemIndex < pListGroupNode->__itemCountInGroup), false, E_INVALID_ARG,
- "[E_INVALID_ARG] Wrong item index(%d).", itemIndex);
+ if (itemIndex < -1 || itemIndex >= pListGroupNode->__itemCountInGroup)
+ {
+ return false;
+ }
int temporaryGroupIndex = -1;
int temporaryItemIndex = -1;
_ListViewModel::GetItemCountInGroup(int groupIndex) const
{
// check validation of groupIndex
- SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __countOfAllGroups), -1, E_INVALID_ARG,
- "[E_INVALID_ARG] Wrong group index(%d).", groupIndex);
+ if (groupIndex < 0 || groupIndex >= __countOfAllGroups)
+ {
+ return -1;
+ }
int itemCount = -1;
__pTitleTextObject = new (std::nothrow) TextObject();
SysTryReturn(NID_UI_CTRL, __pTitleTextObject != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create TitleTextObject.");
- __pTitleTextObject->Construct();
+ r = __pTitleTextObject->Construct();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
FloatRectangle bounds = FloatRectangle(titleLeftMargin + transLeftMargin,
titleTopMargin + transTopMargin,
defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin),
__pBodyTextObject = new (std::nothrow) TextObject();
SysTryCatch(NID_UI_CTRL, __pBodyTextObject != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
- __pBodyTextObject->Construct();
+
+ r = __pBodyTextObject->Construct();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
labelHeight = GetLabelHeight(__pBodyTextObject, const_cast <wchar_t*>(__pMessageBox->GetText().GetPointer()),
__pMessageBox->GetText().GetLength(), bodyTextSize, __textBounds);
result r = SetFontInfo(FONT_STYLE_PLAIN, bodyTextSize);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set font.", GetErrorMessage(r));
- textObject->Construct();
-
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.");
CONTEXT_MENU_CORE_STYLE_LIST,
CONTEXT_MENU_CORE_ALIGN_UP);
+ __pSubMenu->SetFocusable(true);
+
if (__pSubMenu == null)
{
return GetLastResult();
}
__pSubMenu->Open();
- SetTouchCapture(false, false);
__subMenuIndex = mainIndex;
return E_SUCCESS;
result
_OptionMenu::OnAttachedToMainTree(void)
{
+ if (__pOptionMenuPresenter != null)
+ {
+ __pOptionMenuPresenter->CalculateBounds();
+
+ __pOptionMenuPresenter->PrepareAnimation();
+ __pOptionMenuPresenter->SetOptionMenuVisibility(true);
+ }
+
__pOptionMenuPresenter->OnAttachedToMainTree();
- return E_SUCCESS;
+
+ return _Window::OnAttachedToMainTree();
}
result
void
_OptionMenu::OnActivated(void)
{
- _Window::OnActivated();
-
if (GetOwner() != null)
{
ChangeLayout(GetOwner()->GetOrientation());
ChangeLayout(_ControlManager::GetInstance()->GetOrientation());
}
- if (__pOptionMenuPresenter != null)
- {
- __pOptionMenuPresenter->CalculateBounds();
-
- __pOptionMenuPresenter->PrepareAnimation();
- __pOptionMenuPresenter->SetOptionMenuVisibility(true);
- }
+ SetTouchCapture(true, false);
- SetTouchCapture(false, false);
+ _Window::OnActivated();
}
void
, __selectedIndex(-1)
, __isHandlerPressed(false)
, __isClosing(false)
- , __isAnimationStarted(true)
+ , __isAnimationStarted(false)
, __pOptionMenuVE(null)
, __pThirtyThreeTimingFunction(null)
, __pSixtyTimingFunction(null)
return false;
}
+ SysTryReturn(NID_UI_CTRL, (!__isAnimationStarted), false, E_SUCCESS, "[E_SUCCESS] Animation is in Progress.");
+
if (__pOptionMenu->IsSubMenuShown() == true)
{
__pOptionMenu->DestroySubMenu();
#include <new>
#include <sys/shm.h>
#include <unique_ptr.h>
-
-#define OVERLAY_PIXMAP_DUMP 0
-
-#if OVERLAY_PIXMAP_DUMP
-extern "C"{
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Xproto.h>
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <dri2.h>
-#include <tbm_bufmgr.h>
-#include <xf86drm.h>
-}
-#endif //OVERLAY_PIXMAP_DUMP
-
#include <Ecore_Evas.h>
#include <FBaseResult.h>
const int _ROTATION_270 = 270;
const int _ROTATION_360 = 360;
-#if OVERLAY_PIXMAP_DUMP
-
-tbm_bufmgr gTbmBufmgr = null;
-int gFileCount = 0;
-int gDrmFd = -1;
-
-void
-dump_bmp(const char* pFileName, const void* pData, int width, int height)
-{
- FILE* pFile = null;
-
- struct
- {
- unsigned char magic[2];
- } bmpfile_magic = { {'B', 'M'} };
-
- struct
- {
- unsigned int filesz;
- unsigned short creator1;
- unsigned short creator2;
- unsigned int bmp_offset;
- } bmpfile_header = { 0, 0, 0, 0x36 };
-
- struct
- {
- unsigned int header_sz;
- unsigned int width;
- unsigned int height;
- unsigned short nplanes;
- unsigned short bitspp;
- unsigned int compress_type;
- unsigned int bmp_bytesz;
- unsigned int hres;
- unsigned int vres;
- unsigned int ncolors;
- unsigned int nimpcolors;
- } bmp_dib_v3_header_t = { 0x28, 0, 0, 1, 24, 0, 0, 0, 0, 0, 0 };
-
- if (pFileName != null)
- {
- pFile = fopen(pFileName, "w+");
- }
-
- if (pFile == null)
- {
- SysSecureLog(NID_UI_CTRL,"Failed to open %s", pFileName);
- return;
- }
-
- bmpfile_header.filesz = sizeof(bmpfile_magic) + sizeof(bmpfile_header) + sizeof(bmp_dib_v3_header_t) + width * height * 3;
- bmp_dib_v3_header_t.header_sz = sizeof(bmp_dib_v3_header_t);
- bmp_dib_v3_header_t.width = width;
- bmp_dib_v3_header_t.height = -height;
- bmp_dib_v3_header_t.nplanes = 1;
- bmp_dib_v3_header_t.bmp_bytesz = width * height * 3;
-
- fwrite(&bmpfile_magic, sizeof(bmpfile_magic), 1, pFile);
- fwrite(&bmpfile_header, sizeof(bmpfile_header), 1, pFile);
- fwrite(&bmp_dib_v3_header_t, sizeof(bmp_dib_v3_header_t), 1, pFile);
-
- unsigned int* pBlocks = (unsigned int*)pData;
-
- for (int i = 0; i < (height * width); i++)
- {
- fwrite(&pBlocks[i], 3, 1, pFile);
- }
- fclose(pFile);
-
- return;
-}
-
-tbm_bufmgr
-bufmgr_get(Display* pDisplay, Pixmap pixmap)
-{
- int screen = DefaultScreen(pDisplay);
-
- // DRI2
- int eventBase = 0;
- int errorBase = 0;
- if (!DRI2QueryExtension(pDisplay, &eventBase, &errorBase))
- {
- SysSecureLog(NID_UI_CTRL, "Failed to get value of DRI2QueryExtension.");
- return null;
- }
-
- int dri2Major = 0;
- int dri2Minor = 0;
- if (!DRI2QueryVersion(pDisplay, &dri2Major, &dri2Minor))
- {
- SysSecureLog(NID_UI_CTRL, "Failed to get value of DRI2QueryVersion.");
- return null;
- }
-
- char* pDriverName = null;
- char* pDeviceName = null;
- if (!DRI2Connect(pDisplay, RootWindow(pDisplay, screen), &pDriverName, &pDeviceName))
- {
- SysSecureLog(NID_UI_CTRL, "Failed to get value of DRI2Connect.");
- return null;
- }
-
- SysSecureLog(NID_UI_CTRL, "The current name of open drm device is %s.", pDeviceName);
-
- // Get the drm_fd though opening the deviceName
- gDrmFd = open(pDeviceName, O_RDWR);
- if (gDrmFd < 0)
- {
- SysSecureLog(NID_UI_CTRL, "Failed to open drm device (%s)", pDeviceName);
- return null;
- }
-
- // Get the drm magic
- drm_magic_t magic;
- drmGetMagic(gDrmFd, &magic);
- if (!DRI2Authenticate(pDisplay, RootWindow(pDisplay, screen), magic))
- {
- SysSecureLog(NID_UI_CTRL, "Failed to get value of DRI2Authenticate.");
- close(gDrmFd);
- gDrmFd = -1;
- return null;
- }
-
- // tbm buffer manager init
- tbm_bufmgr bufmgr = tbm_bufmgr_init(gDrmFd);
- if (!bufmgr)
- {
- SysSecureLog(NID_UI_CTRL, "Failed to initialize buffer manager.");
- close(gDrmFd);
- gDrmFd = -1;
- return null;
- }
-
- DRI2CreateDrawable(pDisplay, pixmap);
-
- return bufmgr;
-}
-
-static void
-pixmap_update (Display* pDisplay, tbm_bufmgr bufmgr, Pixmap pixmap, int x, int y, int width, int height)
-{
- int dri2_width = 0;
- int dri2_height = 0;
- unsigned int attachments[1] = { DRI2BufferFrontLeft };
- int dri2_count = 1;
- int dri2_out_count = 0;
-
- int opt = TBM_OPTION_READ|TBM_OPTION_WRITE;
- char imgFile[100] = {0,};
-
- tbm_bo bo;
- tbm_bo_handle bo_handle;
-
- DRI2Buffer* pDri2_buffers = DRI2GetBuffers (pDisplay, pixmap, &dri2_width, &dri2_height, attachments, dri2_count, &dri2_out_count);
- SysTryLogCatch(NID_UI_CTRL, pDri2_buffers != null, , "Failed to get buffers.");
- SysTryLogCatch(NID_UI_CTRL, pDri2_buffers[0].name != null, , "Failed to get a handle of the dri2 buffer.");
-
- SysSecureLog(NID_UI_CTRL, "The current name of Dri2_buffers[0] is %d.", pDri2_buffers[0].name);
-
- bo = tbm_bo_import(bufmgr, pDri2_buffers[0].name);
- SysTryLogCatch(NID_UI_CTRL, bo != null, , "Failed to import bo (key : %d).", pDri2_buffers[0].name);
-
- bo_handle = tbm_bo_map(bo, TBM_DEVICE_CPU, opt);
- SysTryLogCatch(NID_UI_CTRL, bo_handle.ptr != null, , "Failed to get map.");
-
- memset(imgFile, 0, sizeof(imgFile));
- sprintf(imgFile,"./dump%d.bmp", gFileCount++);
-
- if (gFileCount == 5 || gFileCount == 20)
- {
- dump_bmp(imgFile, bo_handle.ptr, dri2_width, dri2_height);
- }
-
-CATCH:
- if (bo_handle.ptr)
- {
- tbm_bo_unmap(bo);
- }
-
- if (bo)
- {
- tbm_bo_unref(bo);
- }
-
- if (pDri2_buffers)
- {
- free(pDri2_buffers);
- }
-}
-#endif // OVERLAY_PIXMAP_DUMP
-
bool
_CheckXvExtension(Display* pDisplay, int* pFirstPort, int* pCountPort)
{
return false;
}
-// SysLog(NID_UI_CTRL, "========================================");
-// SysLog(NID_UI_CTRL, "XvQueryExtension returned the following:");
-// SysLog(NID_UI_CTRL, "version : %u", version);
-// SysLog(NID_UI_CTRL, "release : %u", release);
-// SysLog(NID_UI_CTRL, "request_base : %u", requestBase);
-// SysLog(NID_UI_CTRL, "event_base : %u", eventBase);
-// SysLog(NID_UI_CTRL, "error_base : %u", errorBase);
-// SysLog(NID_UI_CTRL, "========================================");
-
unsigned int adaptors = 0;
XvAdaptorInfo* pAdaptorInfo = null;
returnValue = XvQueryAdaptors(pDisplay, DefaultRootWindow(pDisplay), &adaptors, &pAdaptorInfo);
return false;
}
-// SysLog(NID_UI_CTRL, "XvQueryAdaptors returned the following:");
-// SysLog(NID_UI_CTRL, "%d adaptors available.", adaptors);
-
int port = -1;
if (adaptors > 0 && pAdaptorInfo != null)
{
for (unsigned int i = 0; i < adaptors; i++)
{
- // SysLog(NID_UI_CTRL, " name: %s"
- // " type: %s%s%s%s%s"
- // " first port: %ld"
- // " ports: %ld",
- // pAdaptorInfo[i].name,
- // (pAdaptorInfo[i].type & XvInputMask) ? "input | " : "",
- // (pAdaptorInfo[i].type & XvOutputMask) ? "output | " : "",
- // (pAdaptorInfo[i].type & XvVideoMask) ? "video | " : "",
- // (pAdaptorInfo[i].type & XvStillMask) ? "still | " : "",
- // (pAdaptorInfo[i].type & XvImageMask) ? "image | " : "",
- // pAdaptorInfo[i].base_id,
- // pAdaptorInfo[i].num_ports);
- // SysLog(NID_UI_CTRL, " format list: %d", i);
-
for (unsigned int j = 0; j < pAdaptorInfo[i].num_formats; j++)
{
SysSecureLog(NID_UI_CTRL, "The current value of depth is %d and visual is %ld.",
evas_object_image_filled_set(pImageObject, EINA_TRUE);
evas_object_image_data_update_add(pImageObject, 0, 0, w, h);
-#if OVERLAY_PIXMAP_DUMP
-
- if (gDrmFd > -1)
- {
- close(gDrmFd);
- gDrmFd = -1;
- }
-
- if (gTbmBufmgr)
- {
- tbm_bufmgr_deinit(gTbmBufmgr);
- gTbmBufmgr = null;
- }
-
- if (gTbmBufmgr == null)
- {
- gTbmBufmgr = bufmgr_get((Display*)ecore_x_display_get(), pixmap);
- }
-
- if (gTbmBufmgr != null)
- {
- pixmap_update((Display*)ecore_x_display_get(), gTbmBufmgr, pixmap, 0, 0, w, h);
- }
- else
- {
- SysSecureLog(NID_UI_CTRL, "can't get pixmap gBufmgr");
- }
-
- SysSecureLog(NID_UI_CTRL, "dump pixmap[%d]", pixmap);
-
-#endif // OVERLAY_PIXMAP_DUMP
-
return ECORE_CALLBACK_DONE;
}
{
int _OverlayAgent::__overlayAgentXvPortCount = 0;
int _OverlayAgent::__baseXvPort = 0;
-bool _OverlayAgent::__isPortGrapped[]={false,};
+bool _OverlayAgent::__isPortGrabbed[]={false,};
int _OverlayAgent::__overlayAgentcount = 0;
int _OverlayAgent::__dstRectMinWidth = -1;
__pVisualElement = null;
}
-#if OVERLAY_PIXMAP_DUMP
-
- if (gDrmFd > -1)
- {
- close(gDrmFd);
- gDrmFd = -1;
- }
-
- if (gTbmBufmgr)
- {
- tbm_bufmgr_deinit(gTbmBufmgr);
- gTbmBufmgr = null;
- }
-
-#endif //OVERLAY_PIXMAP_DUMP
-
}
result
int i, tempPort = 0;
for (i = 0; i < portCount; i++)
{
- if(!__isPortGrapped[i])
+ if(!__isPortGrabbed[i])
{
tempPort = firstXvPort + i;
if (XvGrabPort(pDisplay, tempPort, 0) != Success)
{
__xvPort = tempPort;
__grabXvPort = true;
- __isPortGrapped[i] = true;
+ __isPortGrabbed[i] = true;
break;
}
}
SysSecureLog(NID_UI_CTRL, "The current value of UngrabXvPort port is %d, pixmap is %d and style is %d", __xvPort, __pixmap, __style);
- __isPortGrapped[__xvPort-__baseXvPort] = false;
+ __isPortGrabbed[__xvPort-__baseXvPort] = false;
__xvPort = -1;
__grabXvPort = false;
__overlayAgentXvPortCount--;
return false;
}
-
return true;
}
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
return pImpl;
-
-CATCH:
- delete pImpl;
-
- SetLastResult(r);
- return null;
}
const _PanelImpl*
return true;
}
+void
+_Popup::OnWindowStateChanged(void)
+{
+ SetOrientationCallbackModeEnabled(true);
+
+ _Window::OnWindowStateChanged();
+
+ SetOrientationCallbackModeEnabled(false);
+}
+
}}} // Tizen::Ui::Controls
__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();
+ r = __pTextObject->Construct();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS , , r, "[%s] Propagating.", GetErrorMessage(r));
pSimpleText = new (std::nothrow) TextSimple(const_cast <wchar_t*>(title.GetPointer()),
title.GetLength(),
r = SetFontInfo(FONT_STYLE_PLAIN, titleTextSize);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to set font.", GetErrorMessage(r));
- __pTitleTextObject->Construct();
+ r = __pTitleTextObject->Construct();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
TextSimple* pSimpleTextForTitleText = new (std::nothrow) TextSimple(const_cast <wchar_t*>(__pProgressPopup->GetTitleText().GetPointer()),
__pProgressPopup->GetTitleText().GetLength(),
TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
r = SetFontInfo(FONT_STYLE_PLAIN, bodyTextSize);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to set font.", GetErrorMessage(r));
- __pBodyTextObject->Construct();
+ r = __pBodyTextObject->Construct();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
TextSimple* pSimpleTextForBodyText = new (std::nothrow) TextSimple(const_cast <wchar_t*>(__pProgressPopup->GetText().GetPointer()),
__pProgressPopup->GetText().GetLength(),
TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
result
_ProgressPopupPresenter::StopProcessAnimation(void)
{
- __pAnimation->Stop();
+ if (__pAnimation != null)
+ {
+ __pAnimation->Stop();
- __pProgressPopup->DetachChild(*__pAnimation);
+ __pProgressPopup->DetachChild(*__pAnimation);
- delete __pAnimation;
- __pAnimation = null;
+ delete __pAnimation;
+ __pAnimation = null;
+ }
return E_SUCCESS;
}
return __pScrollPanelPresenter->OnAccessibilityReadingElement(control, element);
}
bool
-_ScrollPanel::OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+_ScrollPanel::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
ClearLastResult();
- return __pScrollPanelPresenter->OnAccessibilityReadedElement(control, element);
+ return __pScrollPanelPresenter->OnAccessibilityReadElement(control, element);
}
bool
pCore->SetFixingClientBoundsEnabled(!_AppInfo::IsOspCompat());
return pImpl;
-
-CATCH:
- delete pImpl;
-
- SetLastResult(r);
- return null;
}
const _ScrollPanelImpl*
return false;
}
bool
-_ScrollPanelPresenter::OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+_ScrollPanelPresenter::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
return false;
}
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
// for GROUP_STYLE_TOP
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgTopBitmap);
+ 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_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgTopEffectBitmap);
+ 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(PANEL::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgMiddleBitmap);
+ r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgMiddleBitmap);
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(PANEL::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgMiddleEffectBitmap);
+ 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(PANEL::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgBottomBitmap);
+ 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();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgBottomEffectBitmap);
+ 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(PANEL::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgSingleBitmap);
+ r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pResourceBgSingleBitmap);
SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
__pBgSingleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBgSingleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __currentBgColor);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgSingleEffectBitmap);
+ r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgSingleEffectBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
opacity = __currentBgColor.GetAlpha();
Bitmap* pBgBitmap = null;
Bitmap* pBgEffectBitmap = null;
Bitmap* pBgGroupBitmap = null;
+ bool isCustomBitmap = false;
int opacity = 0;
result r = E_SUCCESS;
switch (__groupStyle)
{
case GROUP_STYLE_TOP:
+ isCustomBitmap = IS_CUSTOM_BITMAP(SLIDER::GROUPED_TOP_BG_NORMAL);
pBgEffectBitmap = __pBgTopEffectBitmap;
if (__pSlider->GetColor() == __currentBgColor)
{
break;
case GROUP_STYLE_MIDDLE:
+ isCustomBitmap = IS_CUSTOM_BITMAP(SLIDER::GROUPED_MIDDLE_BG_NORMAL);
pBgEffectBitmap = __pBgMiddleEffectBitmap;
if (__pSlider->GetColor() == __currentBgColor)
{
break;
case GROUP_STYLE_BOTTOM:
+ isCustomBitmap = IS_CUSTOM_BITMAP(SLIDER::GROUPED_BOTTOM_BG_NORMAL);
pBgEffectBitmap = __pBgBottomEffectBitmap;
if (__pSlider->GetColor() == __currentBgColor)
{
break;
case GROUP_STYLE_SINGLE:
+ isCustomBitmap = IS_CUSTOM_BITMAP(SLIDER::GROUPED_SINGLE_BG_NORMAL);
pBgEffectBitmap = __pBgSingleEffectBitmap;
if (__pSlider->GetColor() == __currentBgColor)
{
DrawBitmap(canvas, __rect, pBgBitmap);
if ( __groupStyle != GROUP_STYLE_NONE)
{
- DrawBitmap(canvas, __rect, pBgEffectBitmap);
+ if (isCustomBitmap == false)
+ {
+ DrawBitmap(canvas, __rect, pBgEffectBitmap);
+ }
}
}
return E_SUCCESS;
if (__pFirstPaneParent)
{
- if (__pFirstPane)
- {
- __pFirstPaneParent->DetachChild(*__pFirstPane);
- }
-
DetachChild(*__pFirstPaneParent);
delete __pFirstPaneParent;
if (__pSecondPaneParent)
{
- if (__pSecondPane)
- {
- __pSecondPaneParent->DetachChild(*__pSecondPane);
- }
-
DetachChild(*__pSecondPaneParent);
delete __pSecondPaneParent;
__pDividerVisualElement = null;
}
+ if (__pFirstPaneParent)
+ {
+ DetachChild(*__pFirstPaneParent);
+
+ delete __pFirstPaneParent;
+ __pFirstPaneParent = null;
+ }
+
+ if (__pSecondPaneParent)
+ {
+ DetachChild(*__pSecondPaneParent);
+
+ delete __pSecondPaneParent;
+ __pSecondPaneParent = null;
+ }
+
ClearLastResult();
}
if (paneOrder == SPLIT_PANEL_PANE_ORDER_FIRST)
{
- r = __pFirstPaneParent->AttachChild(*pControl);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ if (pControl != null)
+ {
+ r = __pFirstPaneParent->AttachChild(*pControl);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
__pFirstPane = pControl;
}
else
{
- r = __pSecondPaneParent->AttachChild(*pControl);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ if (pControl != null)
+ {
+ r = __pSecondPaneParent->AttachChild(*pControl);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
__pSecondPane = pControl;
}
return false;
}
bool
-_Tab::OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+_Tab::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
return false;
}
}
bool
-_TabBar::OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+_TabBar::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
- return __pTabBarPresenter->OnAccessibilityReadedElement(control, element);
+ return __pTabBarPresenter->OnAccessibilityReadElement(control, element);
}
bool
, __sideMargin(0.0f)
, __itemMargin(0.0f)
, __arrowMargin(0.0f)
+ , __itemMaxWidth(0.0f)
, __pBgBitmapCached(null)
, __pBgEffectBitmapCached(null)
, __pLeftArrowBitmapCached(null)
__pItemBgBitmapCached[i] = null;
}
- GET_SHAPE_CONFIG(TABBAR::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __topMargin);
- GET_SHAPE_CONFIG(TABBAR::SIDE_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __sideMargin);
- GET_SHAPE_CONFIG(TABBAR::ITEM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __itemMargin);
- GET_SHAPE_CONFIG(TABBAR::ARROW_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __arrowMargin);
+ GET_SHAPE_CONFIG(TABBAR::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __topMargin);
+ GET_SHAPE_CONFIG(TABBAR::SIDE_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __sideMargin);
+ GET_SHAPE_CONFIG(TABBAR::ITEM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __itemMargin);
+ GET_SHAPE_CONFIG(TABBAR::ARROW_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __arrowMargin);
+ GET_SHAPE_CONFIG(TABBAR::ITEM_MAX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __itemMaxWidth);
}
_TabBarPresenter::~_TabBarPresenter(void)
__pTextObject->SetBounds(textRect);
__pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength());
__pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
+ if (itemBounds.width < __itemMaxWidth)
+ {
+ __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE);
+ }
+ else
+ {
+ __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
+ __pTextObject->SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL);
+ }
__pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas));
} // end for loop
}
}
bool
-_TabBarPresenter::OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+_TabBarPresenter::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
return false;
}
#include "FUiCtrl_TableView.h"
#include "FUi_CoordinateSystemUtils.h"
#include "FUi_Math.h"
+#include "FUiCtrl_LabelImpl.h"
using namespace Tizen::Base;
using namespace Tizen::Base::Runtime;
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth);
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight);
- __pItemAnnex = _Label::CreateLabelN();
+ __pItemAnnex = new (std::nothrow) Label();
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, __pItemAnnex != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin);
float itemHeight = ((__customHeight > 0) ? __customHeight : GetBoundsF().height);
- __pItemAnnex->SetBounds(FloatRectangle(leftMargin, ((itemHeight - annexHeight) / 2), annexWidth, annexHeight));
+ __pItemAnnex->Construct(FloatRectangle(leftMargin, ((itemHeight - annexHeight) / 2), annexWidth, annexHeight), L"");
__pItemAnnex->SetBackgroundColor(Color(0, 0, 0, 0));
- AttachSystemChild(*__pItemAnnex);
+ AttachSystemChild(*GetLabelCore(__pItemAnnex));
}
return r;
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth);
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight);
- __pItemAnnex = _Label::CreateLabelN();
+ __pItemAnnex = new (std::nothrow) Label();
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, __pItemAnnex != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin);
float itemHeight = ((__customHeight > 0) ? __customHeight : GetBoundsF().height);
- __pItemAnnex->SetBounds(FloatRectangle(leftMargin, ((itemHeight - annexHeight) / 2), annexWidth, annexHeight));
+ __pItemAnnex->Construct(FloatRectangle(leftMargin, ((itemHeight - annexHeight) / 2), annexWidth, annexHeight), L"");
__pItemAnnex->SetBackgroundColor(Color(0, 0, 0, 0));
- AttachSystemChild(*__pItemAnnex);
+ AttachSystemChild(*GetLabelCore(__pItemAnnex));
}
return r;
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth);
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight);
- __pItemAnnex = _Label::CreateLabelN();
+ __pItemAnnex = new (std::nothrow) Label();
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, __pItemAnnex != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
leftMargin += __pDrawingProperty->scrollMargin;
float itemHeight = ((__customHeight > 0) ? __customHeight : GetBoundsF().height);
- __pItemAnnex->SetBounds(FloatRectangle((GetBoundsF().width - annexWidth - leftMargin), ((itemHeight - annexHeight) / 2), annexWidth, annexHeight));
+ __pItemAnnex->Construct(FloatRectangle((GetBoundsF().width - annexWidth - leftMargin), ((itemHeight - annexHeight) / 2), annexWidth, annexHeight), L"");
__pItemAnnex->SetBackgroundColor(Color(0, 0, 0, 0));
- AttachSystemChild(*__pItemAnnex);
+ AttachSystemChild(*GetLabelCore(__pItemAnnex));
}
return r;
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MORE_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth);
GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MORE_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight);
- __pItemAnnex = _Label::CreateLabelN();
+ __pItemAnnex = new (std::nothrow) Label();
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, __pItemAnnex != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
leftMargin += __pDrawingProperty->scrollMargin;
float itemHeight = ((__customHeight > 0) ? __customHeight : GetBoundsF().height);
- __pItemAnnex->SetBounds(FloatRectangle((GetBoundsF().width - annexWidth - leftMargin), ((itemHeight - annexHeight) / 2), annexWidth, annexHeight));
+ __pItemAnnex->Construct(FloatRectangle((GetBoundsF().width - annexWidth - leftMargin), ((itemHeight - annexHeight) / 2), annexWidth, annexHeight), L"");
__pItemAnnex->SetBackgroundColor(Color(0, 0, 0, 0));
- AttachSystemChild(*__pItemAnnex);
+ AttachSystemChild(*GetLabelCore(__pItemAnnex));
}
return r;
}
+_Label*
+_TableViewItem::GetLabelCore(Label* label)
+{
+ if(label == null)
+ {
+ return null;
+ }
+
+ _LabelImpl* pImpl = _LabelImpl::GetInstance(*label);
+ return &pImpl->GetCore();
+}
+
void
_TableViewItem::ExposeContextItem(FloatRectangle itemBounds, float targetWidth)
{
{
__pressedControl = TABLE_VIEW_ITEM_PRESSED_ITEM;
}
- else if (&source == __pItemAnnex)
+ else if (&source == GetLabelCore(__pItemAnnex))
{
__pressedControl = TABLE_VIEW_ITEM_PRESSED_ANNEX;
{
__releasedControl = TABLE_VIEW_ITEM_PRESSED_ITEM;
}
- else if (&source == __pItemAnnex)
+ else if (&source == GetLabelCore(__pItemAnnex))
{
__releasedControl = TABLE_VIEW_ITEM_PRESSED_ANNEX;
}
SetItemChanged(true);
Invalidate();
}
- else if (&source == __pItemAnnex)
+ else if (&source == GetLabelCore(__pItemAnnex))
{
if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED)
{
if ((__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK) || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO))
{
- if (__pItemAnnex == &child)
+ if (GetLabelCore(__pItemAnnex) == &child)
{
return;
}
bounds.x += (leftMargin * 2) + annexWidth;
pControl->SetBounds(bounds);
}
- else if((__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING) || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER))
- {
- pControl->SetTouchPressThreshold(SENSITIVE);
- }
}
void
__individualSelectionControls.Remove(child, false);
}
- if (&child == __pSimpleItemText)
+ _Label* pSimpleItemTextCore = GetLabelCore(__pSimpleItemText);
+ _Label* pSimpleItemBitmapCore = GetLabelCore(__pSimpleItemBitmap);
+
+ if (&child == pSimpleItemTextCore)
{
__pSimpleItemText = null;
}
- if (&child == __pSimpleItemBitmap)
+ if (&child == pSimpleItemBitmapCore)
{
__pSimpleItemBitmap = null;
}
float annexWidth = 0.0f;
float annexHeight = 0.0f;
- Color canvasBackgroundColor;
-
if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL)
{
r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pCheckBoxBg);
pCanvas = new (std::nothrow) Canvas();
SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
- GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL, canvasBackgroundColor);
-
r = pCanvas->Construct(bounds);
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
if(__pItemAnnex)
{
__pItemAnnex->SetBackgroundBitmap(*pMergeBitmap);
- __pItemAnnex->Invalidate();
+ __pItemAnnex->Invalidate(false);
}
CATCH:
}
}
- if(__enabledState)
+ if(IsContextItem())
{
- if (__pDrawingProperty->sectionStyleEnabled == true)
- {
- DrawSectionStyleBackground();
- }
- else if (__itemType == TABLE_VIEW_ITEM_TYPE_HEADER || __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER)
- {
- SetBackgroundColor(Color(0, 0, 0, 0));
- __pHighlightVisualElement->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f));
- }
- else if(__itemType == TABLE_VIEW_ITEM_TYPE_TITLE)
- {
- __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
- }
- else
- {
- SetBackgroundColor(__colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL]);
-
- __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
-
- if (__pDrawingProperty->groupedLookEnabled == true)
- {
- DrawGroupedLook();
- }
- }
+ DrawContextItemBackground();
+ }
+ else if (__pDrawingProperty->sectionStyleEnabled == true)
+ {
+ DrawSectionStyleBackground();
}
else
{
- if (__pDrawingProperty->sectionStyleEnabled == true)
+ if(__enabledState)
{
- DrawSectionStyleBackground();
+ if (__itemType == TABLE_VIEW_ITEM_TYPE_HEADER || __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER)
+ {
+ SetBackgroundColor(Color(0, 0, 0, 0));
+ __pHighlightVisualElement->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f));
+ }
+ else if(__itemType == TABLE_VIEW_ITEM_TYPE_TITLE)
+ {
+ __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
+ }
+ else
+ {
+ SetBackgroundColor(__colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL]);
+
+ __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
+
+ if (__pDrawingProperty->groupedLookEnabled == true)
+ {
+ DrawGroupedLook();
+ }
+ }
}
else
{
}
void
+_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::CONTEXTITEM_BG_NORMAL, bgColor);
+ }
+ }
+ else
+ {
+ 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.");
+
+ 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;
+}
+
+
+void
_TableViewItem::CreateAnnexStyle(void)
{
switch (__annexStyle)
FloatRectangle bounds;
float annexWidth = 0.0f;
float annexHeight = 0.0f;
- Color canvasBackgroundColor;
if(__enabledState)
{
pCanvas = new (std::nothrow) Canvas();
SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
- GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL, canvasBackgroundColor);
-
pCanvas->Construct(bounds);
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
_BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true);
__pItemAnnex->SetBackgroundBitmap(*pMergeBitmap);
- __pItemAnnex->Invalidate();
+ __pItemAnnex->Invalidate(false);
CATCH:
delete pCheckBox;
FloatRectangle bounds;
float annexWidth = 0.0f;
float annexHeight = 0.0f;
- Color canvasBackgroundColor;
if(__enabledState)
{
pCanvas = new (std::nothrow) Canvas();
SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
- GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL, canvasBackgroundColor);
-
pCanvas->Construct(bounds);
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
_BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true);
__pItemAnnex->SetBackgroundBitmap(*pMergeBitmap);
- __pItemAnnex->Invalidate();
+ __pItemAnnex->Invalidate(false);
CATCH:
delete pRadioButton;
float annexWidth = 0.0f;
float annexHeight = 0.0f;
float annexMargin = 0.0f;
- Color canvasBackgroundColor;
if (IsChecked() == true)
{
pCanvas = new (std::nothrow) Canvas();
SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
- GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL, canvasBackgroundColor);
-
pCanvas->Construct(bounds);
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
_BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true);
__pItemAnnex->SetBackgroundBitmap(*pMergeBitmap);
- __pItemAnnex->Invalidate();
+ __pItemAnnex->Invalidate(false);
CATCH:
delete pOnOffButton;
float annexMargin = 0.0f;
float annexAbsoluteBoundsStart = 0.0f;
float annexAbsoluteBoundsEnd = 0.0f;
- Color canvasBackgroundColor;
float nextHandlerBounds = 0;
r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_HANDLER, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler);
pCanvas = new (std::nothrow) Canvas();
SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
- GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL, canvasBackgroundColor);
-
pCanvas->Construct(bounds);
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
_BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true);
__pItemAnnex->SetBackgroundBitmap(*pMergeBitmap);
- __pItemAnnex->Invalidate();
+ __pItemAnnex->Invalidate(false);
CATCH:
delete pOnOffButton;
FloatRectangle bounds;
float annexWidth = 0.0f;
float annexHeight = 0.0f;
- Color canvasBackgroundColor;
bool themeBackgroundBitmap = false;
themeBackgroundBitmap = IS_CUSTOM_BITMAP(TABLEVIEW::CIRCLE_BUTTON_BG_NORMAL);
pCanvas = new (std::nothrow) Canvas();
SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
- GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL, canvasBackgroundColor);
-
pCanvas->Construct(bounds);
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
_BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true);
__pItemAnnex->SetBackgroundBitmap(*pMergeBitmap);
- __pItemAnnex->Invalidate();
+ __pItemAnnex->Invalidate(false);
CATCH:
delete pDetail;
}
__pSimpleItemText->SetTextColor(textColor);
- __pSimpleItemText->Invalidate();
+ __pSimpleItemText->Invalidate(false);
}
}
result
__pSimpleItemBitmap->SetBackgroundBitmap(*pBitmap);
__pSimpleItemBitmap->SetBounds(bitmapRect);
- if (!__pSimpleItemBitmap->HasParent())
+ _Label* pSimpleItemBitmapCore = GetLabelCore(__pSimpleItemBitmap);
+ if (!pSimpleItemBitmapCore->HasParent())
{
- r = AttachChild(*__pSimpleItemBitmap);
+ r = AttachChild(*pSimpleItemBitmapCore);
SysTryReturn(NID_UI_CTRL, __pSimpleItemBitmap != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
__pSimpleItemText->SetText(text);
__pSimpleItemText->SetBounds(textRect);
- if (!__pSimpleItemText->HasParent())
+ _Label* pSimpleItemTextCore = GetLabelCore(__pSimpleItemText);
+ if (!pSimpleItemTextCore->HasParent())
{
- r = AttachChild(*__pSimpleItemText);
+ r = AttachChild(*pSimpleItemTextCore);
SysTryReturn(NID_UI_CTRL, __pSimpleItemText != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
if (__pSimpleItemText == null)
{
- __pSimpleItemText = _Label::CreateLabelN();
+ __pSimpleItemText = new (std::nothrow) Label();
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, __pSimpleItemText != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ __pSimpleItemText->Construct(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), L"");
+
__pSimpleItemText->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
__pSimpleItemText->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
if (__itemType == TABLE_VIEW_ITEM_TYPE_TITLE)
{
if (__pSimpleItemBitmap == null)
{
- __pSimpleItemBitmap = _Label::CreateLabelN();
+ __pSimpleItemBitmap = new (std::nothrow) Label();
+
+ r = GetLastResult();
SysTryReturn(NID_UI_CTRL, __pSimpleItemBitmap != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
- __pSimpleItemText->SetBackgroundColor(Color(0, 0, 0, 0));
+ __pSimpleItemBitmap->Construct(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), L"");
+
+ __pSimpleItemBitmap->SetBackgroundColor(Color(0, 0, 0, 0));
}
}
GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_TEXT_NORMAL, textColor);
GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_DEFAULT_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, contentsHeight);
- __pHeaderFooterItemText = _Label::CreateLabelN();
+ __pHeaderFooterItemText = new (std::nothrow) Label();
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, __pHeaderFooterItemText != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
- __pHeaderFooterItemText->SetTextHorizontalAlignment(alignment);
- __pHeaderFooterItemText->SetTextColor(textColor);
- __pHeaderFooterItemText->SetBackgroundColor(Color(0, 0, 0, 0));
-
if (isHeader)
{
positionY = GetBoundsF().height - contentsHeight;
}
+ __pHeaderFooterItemText->Construct(FloatRectangle(0.0f, positionY, GetBoundsF().width, contentsHeight), text);
- __pHeaderFooterItemText->SetBounds(FloatRectangle(0.0f, positionY, GetBoundsF().width, contentsHeight));
+ __pHeaderFooterItemText->SetTextHorizontalAlignment(alignment);
+ __pHeaderFooterItemText->SetTextColor(textColor);
+ __pHeaderFooterItemText->SetBackgroundColor(Color(0, 0, 0, 0));
- AttachChild(*__pHeaderFooterItemText);
+ _Label* pHeaderFooterItemTextCore = GetLabelCore(__pHeaderFooterItemText);
+ AttachChild(*pHeaderFooterItemTextCore);
}
- __pHeaderFooterItemText->SetText(text);
-
return E_SUCCESS;
}
if (__pHeaderFooterItemText != null)
{
__pHeaderFooterItemText->SetTextHorizontalAlignment(alignment);
- __pHeaderFooterItemText->Invalidate();
+ __pHeaderFooterItemText->Invalidate(false);
}
return E_SUCCESS;
// h align
if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER || __annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED)
{
- if (__pItemAnnex->HasParent())
+ _Label* pAnnexCore = GetLabelCore(__pItemAnnex);
+ if (pAnnexCore->HasParent())
{
FloatRectangle annexBounds = __pItemAnnex->GetBoundsF();
float annexPositionX = annexBounds.x;
}
bool
-_TableViewItem::OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+_TableViewItem::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
return false;
}
if (__pProviderAdaptor != null && __modelInitialized)
{
+ StopExpandCollapseAnimation();
+
if (__pTableView->IsReorderModeEnabled() && __reorderInfo.itemIndex != -1)
{
ResetReorderItem(__reorderInfo.groupIndex, __reorderInfo.itemIndex);
__sweepOccured = false;
- _VisualElement* pVisualElement = __pTableView->GetVisualElement();
- String animationName(L"EXPAND_GROUP_ANIMATION");
- VisualElementValueAnimation* pExpandGroupAnimation = dynamic_cast<VisualElementValueAnimation*>(pVisualElement->GetAnimationN(animationName));
- if (pExpandGroupAnimation != null)
- {
- pVisualElement->RemoveAnimation(animationName);
- delete pExpandGroupAnimation;
- }
-
- animationName = L"COLLAPSE_GROUP_ANIMATION";
- VisualElementValueAnimation* pCollapseGroupAnimation = dynamic_cast<VisualElementValueAnimation*>(pVisualElement->GetAnimationN(animationName));
- if (pCollapseGroupAnimation != null)
- {
- pVisualElement->RemoveAnimation(animationName);
- delete pCollapseGroupAnimation;
- }
+ StopExpandCollapseAnimation();
return _ScrollPanelPresenter::OnTouchPressed(source, touchInfo);
}
return __pListModel->IsGroupExpanded(groupIndex);
}
+void
+_TableViewPresenter::StopExpandCollapseAnimation(void)
+{
+ _VisualElement* pVisualElement = __pTableView->GetVisualElement();
+ String animationName(L"EXPAND_GROUP_ANIMATION");
+ VisualElementValueAnimation* pExpandGroupAnimation = dynamic_cast<VisualElementValueAnimation*>(pVisualElement->GetAnimationN(animationName));
+ if (pExpandGroupAnimation != null)
+ {
+ pVisualElement->RemoveAnimation(animationName);
+ delete pExpandGroupAnimation;
+ }
+
+ animationName = L"COLLAPSE_GROUP_ANIMATION";
+ VisualElementValueAnimation* pCollapseGroupAnimation = dynamic_cast<VisualElementValueAnimation*>(pVisualElement->GetAnimationN(animationName));
+ if (pCollapseGroupAnimation != null)
+ {
+ pVisualElement->RemoveAnimation(animationName);
+ delete pCollapseGroupAnimation;
+ }
+}
+
int
_TableViewPresenter::LoadAllItemsInGroup(int groupIndex, bool downward)
{
{
SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
- return __pTokenEditPresenter->GetTokenCount();
+ return __pTokenEditPresenter->GetTokenCount(true);
}
int
#include <FGrp_BitmapImpl.h>
#include <FUiAnimVisualElementAnimationGroup.h>
#include <FGrp_TextTextSimple.h>
+#include <FGrp_FontImpl.h>
#include "FUiAnim_VisualElement.h"
#include "FUi_UiTouchEvent.h"
#include "FUiCtrl_TokenEdit.h"
: public Object
{
public:
- _Token(const String& text, Font* pEditFont);
+ _Token(void);
+ result Construct(const String& text, Font* pEditFont);
virtual ~_Token(void);
float GetTextPixelWidth(void) const;
wchar_t* GetText(void) const;
_VisualElement* __pVisualElement;
}; // _Token
-_Token::_Token(const String& text, Font* pEditFont)
+_Token::_Token(void)
: pTextObject(null)
, pFont(null)
, currTokenLength(0)
, __textPixelHeight(0.0f)
, __pVisualElement(null)
{
+}
+
+result
+_Token::Construct(const String& text, Font* pEditFont)
+{
result r = E_SUCCESS;
currTokenLength = text.GetLength();
float tokenFontSize = 0.0f;
pTextObject = new (std::nothrow) TextObject;
- SysTryReturnVoidResult(NID_UI_CTRL, pTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturnResult(NID_UI_CTRL, pTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
// for default initialize.
r = pTextObject->Construct();
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, tokenFontSize);
- pFont = new (std::nothrow) Font;
- SysTryCatch(NID_UI_CTRL, pFont != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ pFont = _FontImpl::CloneN(*pEditFont);
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, pFont != null, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = pFont->Construct(pEditFont->GetFaceName(), FONT_STYLE_PLAIN, tokenFontSize);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ (_FontImpl::GetInstance(*pFont))->SetStyle(FONT_STYLE_PLAIN);
+ (_FontImpl::GetInstance(*pFont))->SetSize(tokenFontSize);
r = pTextObject->SetFont(pFont, 0, pTextObject->GetTextLength());
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
__pVisualElement = new (std::nothrow) _VisualElement;
- SysTryCatch(NID_UI_CTRL, __pVisualElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryCatch(NID_UI_CTRL, __pVisualElement != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
r = __pVisualElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct _VisualElement.", GetErrorMessage(r));
__pVisualElement->SetImplicitAnimationEnabled(false);
__pVisualElement->SetOpacity(0.0f);
- return;
+ return r;
CATCH:
delete pTextObject;
delete pFont;
pFont = null;
- return;
+ return r;
}
result
, __touchPressInfo(FloatPoint(-1.0f, -1.0f))
, __editContentFontSize(0.0f)
, __trackTokenIndex(-1)
+ , __isAnimationInProgress(false)
{
}
return E_INVALID_ARG;
}
- _Token* pToken = new (std::nothrow) _Token(inputTokenString, GetFont());
+ _Token* pToken = new (std::nothrow) _Token();
SysTryReturnResult(NID_UI_CTRL, pToken != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
+ r = pToken->Construct(inputTokenString, GetFont());
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct token.", GetErrorMessage(r));
+
r = __pTokenList->Add(static_cast <Object&>(*pToken));
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
return r;
CATCH:
+ __pTokenList->Remove(*pToken);
+
delete pToken;
pToken = null;
result r = E_SUCCESS;
- _Token* pToken = new (std::nothrow) _Token(token, GetFont());
+ _Token* pToken = new (std::nothrow) _Token();
SysTryReturnResult(NID_UI_CTRL, pToken != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
+ r = pToken->Construct(token, GetFont());
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct token.", GetErrorMessage(r));
+
r = __pTokenList->InsertAt(*pToken, index);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to insert token.", GetErrorMessage(r));
return r;
CATCH:
+ __pTokenList->Remove(*pToken);
delete pToken;
pToken = null;
}
int
-_TokenEditPresenter::GetTokenCount(void) const
+_TokenEditPresenter::GetTokenCount(bool isInvokedByApp) const
{
- return __pTokenList->GetCount();
+ if (!isInvokedByApp)
+ {
+ return __pTokenList->GetCount();
+ }
+ else
+ {
+ if(__isAnimationInProgress)
+ {
+ return __pTokenList->GetCount() -1;
+ }
+ else
+ {
+ return __pTokenList->GetCount();
+ }
+ }
}
int
if (pTokenVisualElement && __animatingIndex >= 0)
{
+ __isAnimationInProgress = true;
VisualElementAnimation* pAnimation = CreateAnimationN(*pTokenVisualElement, false);
pTokenVisualElement->AddAnimation(L"TokenAnimation", *pAnimation);
delete pAnimation;
void
_TokenEditPresenter::OnVisualElementAnimationFinished (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, bool completedNormally)
{
+ __isAnimationInProgress = false;
RemoveTokenAt(GetTokenCount() - 1);
CalculateTokenPositionFromIndex(GetTokenCount() - 1);
virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
- virtual bool OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
+ virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
#include "FUiAnim_TransformMatrix3Df.h"
#include "FUiAnim_VisualElementCoordinateSystem.h"
-//#define OLD
#define SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION
namespace Tizen { namespace Ui
void SetRootNeedsContentUpdate(void)
{
-#ifdef OLD
- if (unlikely(__childrenNeedsUpdateProps & HIERARCHY_PROPERTY_CONTENT))
-#else
if (unlikely(GetSharedData().childrenInvalidated))
-#endif
{
_RootVisualElement* pRoot = GetRootPublic();
if (likely(pRoot))
HIERARCHY_PROPERTY_SHOWSTATE = 0x04,
HIERARCHY_PROPERTY_CONTENTOPACITY = 0x08,
HIERARCHY_PROPERTY_NATIVENODE = HIERARCHY_PROPERTY_CONTENTOPACITY,
-#ifdef OLD
- HIERARCHY_PROPERTY_SURFACE = 0x10, // only for presentation element
- HIERARCHY_PROPERTY_CONTENT = 0x20,
-#endif
HIERARCHY_PROPERTY_CONTENTBOUNDS = 0x40,
-#ifdef OLD
- HIERARCHY_PROPERTY_MASK = 0x7F
-#else
HIERARCHY_PROPERTY_MASK = 0x4F
-#endif
};
int _zOrderGroup;
virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusMovedPrevious(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityReadingElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
- virtual bool OnAccessibilityReadedElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
+ virtual bool OnAccessibilityReadElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusIn(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusOut(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityActionPerformed(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
- virtual bool OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+ virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusMovedPrevious(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityReadingElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
- virtual bool OnAccessibilityReadedElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
+ virtual bool OnAccessibilityReadElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusIn(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusOut(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityValueIncreased(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
bool __internalFocus;
bool __isDestroyed;
IEditTextFilter* __pTextFilter;
+ Tizen::Graphics::FloatRectangle __previousBounds;
}; // _Edit
}}} // Tizen::Ui::Controls
Tizen::Ui::Animations::_VisualElement* GetTextVisualElement(void);
bool IsBounded(void) const;
void SetControlInitialBounds(Tizen::Graphics::FloatRectangle initBounds);
+ void SetControlInitialPosition(Tizen::Graphics::FloatPoint initPosition);
bool IsUpdateInitialBounds(void);
virtual Tizen::Graphics::Rectangle GetTextBounds(void) const;
virtual Tizen::Graphics::FloatRectangle GetTextBoundsF(void) const;
static float __initialParentHeight;
static float __clipboardHeight;
static _EditFooterVisibleStatus __initialFooterVisibleStatus;
+ static bool __footerVisibleChanged;
wchar_t __echoChar;
virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedPrevious(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
virtual bool OnAccessibilityReadingElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
- virtual bool OnAccessibilityReadedElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
+ virtual bool OnAccessibilityReadElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
virtual bool OnAccessibilityFocusIn(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
virtual bool OnAccessibilityFocusOut(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
virtual bool OnAccessibilityActionPerformed(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
static int __overlayAgentcount;
static int __overlayAgentXvPortCount;
static int __baseXvPort;
- static bool __isPortGrapped[_OVERLAYAGENT_XV_PORT];
+ static bool __isPortGrabbed[_OVERLAYAGENT_XV_PORT];
// staticutil variable
static int __dstRectMinWidth;
virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds);
virtual bool IsRotationSynchronized(void) const;
+ virtual void OnWindowStateChanged(void);
+
// Accessor
public:
void SetColor(const Tizen::Graphics::Color& color);
virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
- virtual bool OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+ virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
- virtual bool OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+ virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusMovedPrevious(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityReadingElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
- virtual bool OnAccessibilityReadedElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
+ virtual bool OnAccessibilityReadElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusIn(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusOut(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityActionPerformed(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusMovedPrevious(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityReadingElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
- virtual bool OnAccessibilityReadedElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
+ virtual bool OnAccessibilityReadElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusIn(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusOut(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityActionPerformed(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedPrevious(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
virtual bool OnAccessibilityReadingElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
- virtual bool OnAccessibilityReadedElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
+ virtual bool OnAccessibilityReadElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
virtual bool OnAccessibilityFocusIn(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
virtual bool OnAccessibilityFocusOut(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
virtual bool OnAccessibilityActionPerformed(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
- virtual bool OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+ virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element);
bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element);
bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element);
bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
- bool OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+ bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element);
bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element);
bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element);
float __sideMargin;
float __itemMargin;
float __arrowMargin;
+ float __itemMaxWidth;
Tizen::Graphics::Bitmap* __pBgBitmapCached;
Tizen::Graphics::Bitmap* __pBgEffectBitmapCached;
virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
- virtual bool OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+ virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element);
void DrawItemBackground(void);
void DrawSectionStyleBackground(void);
void DrawSectionStyleBackgroundCover(void);
+ void DrawContextItemBackground(void);
void DrawAnnexStyle(void);
void DrawCheckBox(void);
void DrawRadioBox(void);
result CreateOnOffButton(void);
result CreateDetailButton(void);
+ _Label* GetLabelCore(Label* label);
+
private:
void* __pAppInfo;
int __refCount;
_TableViewItemControl* __pItemDivider;
_TableViewItemControl* __pItemTopDivider;
- _Label* __pItemAnnex;
+ Label* __pItemAnnex;
_TableViewItemControl* __pItemCover;
_TableViewItemControl* __pItemAnnexLeftDivider;
_TableViewItemControl* __pItemAnnexRightDivider;
bool __itemDividerEnabled;
// Simple Item
- _Label* __pSimpleItemText;
- _Label* __pSimpleItemBitmap;
+ Label* __pSimpleItemText;
+ Label* __pSimpleItemBitmap;
Tizen::Graphics::Color __simpleItemTextColor[6];
int __simpleItemTextSize;
// Section header, footer
- _Label* __pHeaderFooterItemText;
+ Label* __pHeaderFooterItemText;
_Label* __pDimLayer;
result ExpandGroup(int groupIndex, bool withAnimation);
result CollapseGroup(int groupIndex, bool withAnimation);
bool IsGroupExpanded(int groupIndex) const;
+ void StopExpandCollapseAnimation(void);
result SetReorderMode(bool enabled);
namespace Tizen { namespace Ui { namespace Controls
{
-
-#define MAX_TOKEN_COUNT 100;
-const int ANIMATION_DURATION_BOUNDS = 167;
-const int ANIMATION_DURATION_OPACITY = 83;
-
class _TokenEdit;
class SineTimingFunction
Tizen::Base::String GetTokenAt(int index) const;
- int GetTokenCount(void) const;
+ int GetTokenCount(bool isInvokedByApp = false) const;
int GetSelectedTokenIndex(void) const;
int __trackTokenIndex;
+ bool __isAnimationInProgress;
+
+ static const int ANIMATION_DURATION_BOUNDS = 167;
+
+ static const int ANIMATION_DURATION_OPACITY = 83;
+
+
}; // _TokenEditPresenter
}}} // Tizen::Ui::Controls
void ResetFocus(void);
void SortElements(void);
- bool SetParent(const _AccessibilityContainer& parent);
+ bool SetParent(const _AccessibilityContainer* pParent);
_AccessibilityContainer* GetParent(void) const;
+ _AccessibilityContainer* GetRootParent(void) const;
void SetPriority(int level);
int GetPriority(void);
void SetEnableState(bool enabledState);
virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
- virtual bool OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+ virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element);
result SetBuilderBounds(_ControlOrientation orientation, const Tizen::Graphics::FloatRectangle& bounds);
void UpdateBuilderBounds(const Tizen::Graphics::FloatRectangle& bounds);
void UpdateBuilderSize(const Tizen::Graphics::FloatDimension& dimension);
+ void UpdateBuilderPosition(const Tizen::Graphics::FloatPoint& position);
+ _ControlOrientation GetUiBuilderOrientation(void) const;
// Layout
bool IsLayoutable(void) const;
_WindowImpl* GetCurrentFrame(void) const;
void OnScreenRotated(int rotation);
- OrientationStatus GetFormOrientationStatus(_ControlImpl *pControlImpl);
+ OrientationStatus GetFormOrientationStatus(const _ControlImpl *pControlImpl) const;
OrientationStatus GetOrientationStatus(Orientation mode) const;
private:
virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0;
virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0;
virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0;
- virtual bool OnAccessibilityReadedElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0;
+ virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0;
virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0;
virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0;
virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0;
DECLARE_IMAGE_CONFIG(DETAILED_ICON_SELECTED, 50);
DECLARE_IMAGE_CONFIG(DETAILED_ICON_EFFECT_NORMAL, 51);
DECLARE_IMAGE_CONFIG(DETAILED_ICON_EFFECT_PRESSED, 52);
+
+ DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, 53);
+ DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_DISABLED, 54);
+ DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_PRESSED, 55);
+ DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_HIGHLIGHTED, 56);
+ DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_SELECTED, 57);
+
+ DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, 58);
+ DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_PRESSED, 59);
+
+ DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, 60);
+ DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_DISABLED, 61);
+ DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_PRESSED, 62);
+ DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_HIGHLIGHTED, 63);
+ DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_SELECTED, 64);
+
+ DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, 65);
+ DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_PRESSED, 66);
+
+ DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, 67);
+ DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_DISABLED, 68);
+ DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_PRESSED, 69);
+ DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_HIGHLIGHTED, 70);
+ DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_SELECTED, 71);
+
+ DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, 72);
+ DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_PRESSED, 73);
+
+ DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, 74);
+ DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_DISABLED, 75);
+ DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_PRESSED, 76);
+ DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_HIGHLIGHTED, 77);
+ DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_SELECTED, 78);
+
+ DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, 79);
+ DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_PRESSED, 80);
+
//Dimension config
DECLARE_DIMENSION_CONFIG(MIN_SIZE, 1);
DECLARE_DIMENSION_CONFIG(MIN_DIMENSION, 2);
DECLARE_IMAGE_CONFIG(BG_ROUND_EFFECT, 14)
DECLARE_IMAGE_CONFIG(CLEAR_ICON_NORMAL, 15)
DECLARE_IMAGE_CONFIG(CLEAR_ICON_PRESSED, 16)
+ DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, 17)
+ DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, 18)
+ DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, 19)
+ DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, 20)
+ DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, 21)
+ DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, 22)
+ DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, 23)
+ DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, 24)
DECLARE_DIMENSION_CONFIG(MIN_SIZE, 1)
DECLARE_DIMENSION_CONFIG(TITLE_STYLE_MIN_SIZE, 2)
DECLARE_IMAGE_CONFIG(HANDLE_BG_EFFECT_HIGHLIGHTED, 12);
DECLARE_IMAGE_CONFIG(UPWARD_OVERLAY_BG_NORMAL, 13);
DECLARE_IMAGE_CONFIG(UPWARD_OVERLAY_BG_EFFECT, 14);
+ DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, 15);
+ DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, 16);
+ DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, 17);
+ DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, 18);
+ DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, 19);
+ DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, 20);
+ DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, 21);
+ DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, 22);
DECLARE_SHAPE_CONFIG(HANDLE_WIDTH, 1);
DECLARE_SHAPE_CONFIG(HANDLE_HEIGHT, 2);
DECLARE_SHAPE_CONFIG(HANDLE_OFFSET, 3);
DECLARE_IMAGE_CONFIG(SECTIONITEM_TOP_BG_DISABLED, 60);
DECLARE_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_DISABLED, 61);
DECLARE_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_DISABLED, 62);
+ DECLARE_IMAGE_CONFIG(QUICK_MENU_BG_NORMAL, 63);
+ DECLARE_IMAGE_CONFIG(QUICK_MENU_BG_EFFECT, 64);
DECLARE_DIMENSION_CONFIG(MIN_SIZE, 1);
DECLARE_SHAPE_CONFIG(ITEM_DEFAULT_FONT_SIZE, 1);
virtual result OnDetachingFromMainTree(void);
virtual void OnFocusableStateChanged(bool focusalbeState);
#if defined(WINDOW_BASE_ROTATE)
- void OnWindowStateChanged(void);
+ virtual void OnWindowStateChanged(void);
void SetPreferredRotation(bool enable);
bool GetPreferredRotation(void) const;
#if defined(WINDOW_OWNEE_PREFERRED)
void SetDimmingLayer(_DimmingLayer* pLayer);
_DimmingLayer* GetDimmingLayer(void);
+ void SetOrientationCallbackModeEnabled(bool enable);
+ bool IsOrientationCallbackModeEnabled(void) const;
+
protected:
_Window(void);
_IWindowDelegate& GetWindowDelegate(void) const;
bool __preferredRotation;
#endif
+ bool __orientationCallbackMode;
+
friend class _ControlManager;
}; // _Window
ADD_IMAGE_CONFIG(DETAILED_ICON_EFFECT_NORMAL, # #00_button_right_ef.png); //not supported by theme
ADD_IMAGE_CONFIG(DETAILED_ICON_EFFECT_PRESSED, # #00_button_right_ef.png); //not supported by theme
+ ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, #00_list_group_bg.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_DISABLED, #00_list_group_bg.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_PRESSED, #00_list_group_bg.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_HIGHLIGHTED, #00_groupedlist_bg_focus.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_SELECTED, #00_list_group_bg.#.png);
+
+ ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, #00_list_group_bg_ef.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_PRESSED, #00_list_group_bg_ef.#.png);
+
+ ADD_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, #00_list_group_bg_top.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_TOP_BG_DISABLED, #00_list_group_bg_top.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_TOP_BG_PRESSED, #00_list_group_bg_top.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_TOP_BG_HIGHLIGHTED, #00_groupedlist_top_bg_focus.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_TOP_BG_SELECTED, #00_list_group_bg_top.#.png);
+
+ ADD_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, #00_list_group_bg_top_ef.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_PRESSED, #00_list_group_bg_top_ef.#.png);
+
+ ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, #00_list_group_bg_center.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_DISABLED, #00_list_group_bg_center.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_PRESSED, #00_list_group_bg_center.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_HIGHLIGHTED, #00_groupedlist_center_bg_focus.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_SELECTED, #00_list_group_bg_center.#.png);
+
+ ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, #00_list_group_bg_center_ef.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_PRESSED, #00_list_group_bg_center_ef.#.png);
+
+ ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, #00_list_group_bg_bottom.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_DISABLED, #00_list_group_bg_bottom.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_PRESSED, #00_list_group_bg_bottom.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_HIGHLIGHTED, #00_groupedlist_bottom_bg_focus.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_SELECTED, #00_list_group_bg_bottom.#.png);
+
+ ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, #00_list_group_bg_bottom_ef.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_PRESSED, #00_list_group_bg_bottom_ef.#.png);
+
START_UI_CONFIG_MODE(480x800);
ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0);
END_UI_CONFIG_MODE(480x800);
if (__pMapContainer->GetImageMap()->GetValue(resourceKey, pItem) == E_SUCCESS)
{
int len = ((char*) pAttributes[i]+1 != null) ? mbstowcs(null, (char*) pAttributes[i]+1, 0) : 0;
- wchar_t* pValue = new (std::nothrow) wchar_t [len +1];
- len = mbstowcs(pValue, (char*) pAttributes[i]+1, len);
- pValue[len] = '\0';
- pItem->SetImageFileName(pValue);
- __pMapContainer->GetImageMap()->ChangeValue(resourceKey, pItem);
+ if(len > 0)
+ {
+ wchar_t* pValue = new (std::nothrow) wchar_t [len +1];
+ len = mbstowcs(pValue, (char*) pAttributes[i]+1, len);
+ pValue[len] = '\0';
+ pItem->SetImageFileName(pValue);
+ __pMapContainer->GetImageMap()->ChangeValue(resourceKey, pItem);
+ }
}
else
{
{
if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "Image") == 0)
{
- fileName = (char*) pAttributes[++i];
- fileName.SubString(1, fileName);
+ int len = ((char*) pAttributes[i+1]+1 != null) ? mbstowcs(null, (char*) pAttributes[i+1]+1, 0) : 0;
+ if(len > 0)
+ {
+ fileName = (char*) pAttributes[++i]+1;
+ }
}
if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "Duration") == 0)
{
__pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_SELECTED_IMAGE);
}
{
+ const char* key ="CHECKBUTTON::GROUPED_SINGLE_BG_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_SINGLE_BG_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_SINGLE_BG_DISABLED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_SINGLE_BG_DISABLED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_SINGLE_BG_PRESSED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_SINGLE_BG_PRESSED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_SINGLE_BG_HIGHLIGHTED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_SINGLE_BG_HIGHLIGHTED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_SINGLE_BG_SELECTED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_SINGLE_BG_SELECTED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_TOP_BG_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_TOP_BG_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_TOP_BG_DISABLED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_TOP_BG_DISABLED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_TOP_BG_PRESSED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_TOP_BG_PRESSED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_TOP_BG_HIGHLIGHTED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_TOP_BG_HIGHLIGHTED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_TOP_BG_SELECTED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_TOP_BG_SELECTED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_MIDDLE_BG_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_MIDDLE_BG_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_MIDDLE_BG_DISABLED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_MIDDLE_BG_DISABLED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_MIDDLE_BG_PRESSED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_MIDDLE_BG_PRESSED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_MIDDLE_BG_HIGHLIGHTED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_MIDDLE_BG_HIGHLIGHTED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_MIDDLE_BG_SELECTED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_MIDDLE_BG_SELECTED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_BOTTOM_BG_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_BOTTOM_BG_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_BOTTOM_BG_DISABLED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_BOTTOM_BG_DISABLED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_BOTTOM_BG_PRESSED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_BOTTOM_BG_PRESSED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_BOTTOM_BG_HIGHLIGHTED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_BOTTOM_BG_HIGHLIGHTED_IMAGE);
+ }
+ {
+ const char* key ="CHECKBUTTON::GROUPED_BOTTOM_BG_SELECTED";
+ __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_BOTTOM_BG_SELECTED_IMAGE);
+ }
+ {
const char* key ="COLORPICKER::ARROW_BUTTON_BG_NORMAL";
__pImageKeyTable->Add(ResourceKey(key), _COLORPICKER::ARROW_BUTTON_BG_NORMAL_IMAGE);
}
__pImageKeyTable->Add(ResourceKey(key), _EDIT::CLEAR_ICON_PRESSED_IMAGE);
}
{
+ const char* key ="EDIT::GROUPED_SINGLE_BG_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_SINGLE_BG_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="EDIT::GROUPED_SINGLE_BG_EFFECT_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_SINGLE_BG_EFFECT_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="EDIT::GROUPED_TOP_BG_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_TOP_BG_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="EDIT::GROUPED_TOP_BG_EFFECT_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_TOP_BG_EFFECT_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="EDIT::GROUPED_MIDDLE_BG_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_MIDDLE_BG_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="EDIT::GROUPED_MIDDLE_BG_EFFECT_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_MIDDLE_BG_EFFECT_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="EDIT::GROUPED_BOTTOM_BG_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_BOTTOM_BG_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="EDIT::GROUPED_BOTTOM_BG_EFFECT_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_BOTTOM_BG_EFFECT_NORMAL_IMAGE);
+ }
+ {
const char* key ="EDITDATE::CONTENT_BG_NORMAL";
__pImageKeyTable->Add(ResourceKey(key), _EDITDATE::CONTENT_BG_NORMAL_IMAGE);
}
__pImageKeyTable->Add(ResourceKey(key), _SLIDER::UPWARD_OVERLAY_BG_NORMAL_IMAGE);
}
{
+ const char* key ="SLIDER::GROUPED_TOP_BG_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _SLIDER::GROUPED_TOP_BG_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="SLIDER::GROUPED_MIDDLE_BG_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _SLIDER::GROUPED_MIDDLE_BG_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="SLIDER::GROUPED_BOTTOM_BG_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _SLIDER::GROUPED_BOTTOM_BG_NORMAL_IMAGE);
+ }
+ {
+ const char* key ="SLIDER::GROUPED_SINGLE_BG_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _SLIDER::GROUPED_SINGLE_BG_NORMAL_IMAGE);
+ }
+ {
const char* key ="SPLITPANEL::DIVIDER_BG_NORMAL";
__pImageKeyTable->Add(ResourceKey(key), _SPLITPANEL::DIVIDER_BG_NORMAL_IMAGE);
}
ADD_IMAGE_CONFIG(BG_ROUND_EFFECT, #00_edit_field_line_round_bg_01.#.png);
ADD_IMAGE_CONFIG(CLEAR_ICON_NORMAL, #00_edit_field_clear.png);
ADD_IMAGE_CONFIG(CLEAR_ICON_PRESSED, #00_edit_field_clear.png);
+ ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, #00_edit_group_bg.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, #00_edit_group_bg_ef.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, #00_edit_group_bg_top.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, #00_edit_group_bg_top_ef.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, #00_edit_group_bg_center.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, #00_edit_group_bg_center_ef.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, #00_edit_group_bg_bottom.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, #00_edit_group_bg_bottom_ef.#.png);
START_UI_CONFIG_MODE(480x800);
ADD_IMAGE_CONFIG(UPWARD_OVERLAY_BG_NORMAL, #00_slider_popup_bg.#.png);
ADD_IMAGE_CONFIG(UPWARD_OVERLAY_BG_EFFECT, #00_slider_popup_bg_ef.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, #00_list_group_bg_top.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, #00_list_group_bg_center.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, #00_list_group_bg_bottom.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, #00_list_group_bg_top_ef.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, #00_list_group_bg_center_ef.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, #00_list_group_bg_bottom_ef.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, #00_list_group_bg.#.png);
+ ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, #00_list_group_bg_ef.#.png);
+
START_UI_CONFIG_MODE(720x1280);
{
ADD_SHAPE_CONFIG(HANDLE_WIDTH, 72);
ADD_IMAGE_CONFIG(SECTIONITEM_TOP_BG_DISABLED, #00_list_group_bg_top.#.png);
ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_DISABLED, #00_list_group_bg_center.#.png);
ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_DISABLED, #00_list_group_bg_bottom.#.png);
+ ADD_IMAGE_CONFIG(QUICK_MENU_BG_NORMAL, #00_quick_menu_bg.#.png);
+ ADD_IMAGE_CONFIG(QUICK_MENU_BG_EFFECT, #00_quick_menu_bg_ef.#.png);
void
_SceneManagerImpl::OnSceneControlEventReceived(_SceneControlEventArg::SceneControlEventType eventType, const SceneId& sceneId)
{
- SysLog(NID_UI_SCENES, "Received type= 0x%x, sceneId=%ls", eventType, &sceneId);
+ SysSecureLog(NID_UI_SCENES, "Received type= 0x%x, sceneId=%ls", eventType, sceneId.GetPointer());
switch (eventType)
{
SysLog(NID_UI_SCENES, "Safety operation ongoing. Animation may not working, Please check the problems!");
}
- r = pFrame->SetCurrentForm(form);
- SysTryReturnResult(NID_UI_SCENES, !IsFailed(r), E_SYSTEM, "A system error has been occurred. Can not set current form.");
+ // Check the current Form, if already current one then skip the SetCurrentForm().
+ if (GetCurrentForm() == &form)
+ {
+ SysSecureLog(NID_UI_SCENES, "The Form already set as current form, skip the SetCurrentForm()");
+ }
+ else
+ {
+ r = pFrame->SetCurrentForm(form);
+ SysTryReturnResult(NID_UI_SCENES, !IsFailed(r), E_SYSTEM, "A system error has been occurred. Can not set current form.");
+ }
return E_SUCCESS;
}