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;
}
pButton->AddActionEventListener(*this);
// Adds the button to the form
- AddControl(*pButton);
+ AddControl(pButton);
return r;
}
__pEditTime->AddTimeChangeEventListener(*this);
//Adds the edit time to the form
- AddControl(*__pEditTime);
+ AddControl(__pEditTime);
return r;
}
__pIconList->AddItem(&itemText2, pBitmapNormal2, pBitmapFocused2, ID_LIST_SECONDITEM);
// Adds the icon list to the form
- AddControl(*__pIconList);
+ AddControl(__pIconList);
// Deallocates bitmaps
delete pBitmapNormal1;
__pPanel->SetBackgroundColor(Color(0x50, 0xFF, 0x38));
//Adds the panel to the form
- AddControl(*__pPanel);
+ AddControl(__pPanel);
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;
}
{
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;
, 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;
}
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());