__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;
// 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;
}