本文整理汇总了C++中Label::Draw方法的典型用法代码示例。如果您正苦于以下问题:C++ Label::Draw方法的具体用法?C++ Label::Draw怎么用?C++ Label::Draw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Label
的用法示例。
在下文中一共展示了Label::Draw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
Label label;
label.SetText( "This is a label" );
Button button;
button.SetDimensions( 10, 5 );
TextButton textButton;
textButton.SetText( "Click Me" );
textButton.SetDimensions( 10, 5 );
cout << endl << endl << "LABEL" << endl;
label.Draw();
cout << endl << endl << "BUTTON" << endl;
button.Draw();
cout << endl << endl << "TEXT BUTTON" << endl;
textButton.Draw();
return 0;
}
示例2: Label
result
SettingForm::OnInitializing(void)
{
result r = E_SUCCESS;
// TODO: Add your initialization code here
FooterItem footerItem[5];
AppResource* pAppResource = Application::GetInstance()->GetAppResource();
Image inActivation_Image[5];
String inActivation_Path[5];
Image Activation_Image[5];
String Activation_Path[5];
for(int i=0; i<5; i++)
{
inActivation_Image[i].Construct();
inActivation_Path[i] = App::GetInstance()->GetAppResourcePath();
Activation_Image[i].Construct();
Activation_Path[i] = App::GetInstance()->GetAppResourcePath();
}
inActivation_Path[0] += L"screen-density-xhigh/TimeLine_InAct.png";
Activation_Path[0] += L"screen-density-xhigh/TimeLine_Act.png";
footerItem[0].Construct(ID_FOOTER_ITEM1);
footerItem[0].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
inActivation_Image[0].DecodeN(inActivation_Path[0], BITMAP_PIXEL_FORMAT_ARGB8888));
footerItem[0].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
Activation_Image[0].DecodeN(Activation_Path[0], BITMAP_PIXEL_FORMAT_ARGB8888));
inActivation_Path[1] += L"screen-density-xhigh/Chatting_InAct.png";
Activation_Path[1] += L"screen-density-xhigh/Chatting_Act.png";
footerItem[1].Construct(ID_FOOTER_ITEM2);
footerItem[1].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
inActivation_Image[1].DecodeN(inActivation_Path[1], BITMAP_PIXEL_FORMAT_ARGB8888));
footerItem[1].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
Activation_Image[1].DecodeN(Activation_Path[1], BITMAP_PIXEL_FORMAT_ARGB8888));
inActivation_Path[2] += L"screen-density-xhigh/PartnerList_InAct.png";
Activation_Path[2] += L"screen-density-xhigh/PartnerList_Act.png";
footerItem[2].Construct(ID_FOOTER_ITEM3);
footerItem[2].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
inActivation_Image[2].DecodeN(inActivation_Path[2], BITMAP_PIXEL_FORMAT_ARGB8888));
footerItem[2].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
Activation_Image[2].DecodeN(Activation_Path[2], BITMAP_PIXEL_FORMAT_ARGB8888));
inActivation_Path[3] += L"screen-density-xhigh/PartnerResearch_InAct.png";
Activation_Path[3] += L"screen-density-xhigh/PartnerResearch_Act.png";
footerItem[3].Construct(ID_FOOTER_ITEM4);
footerItem[3].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
inActivation_Image[3].DecodeN(inActivation_Path[3], BITMAP_PIXEL_FORMAT_ARGB8888));
footerItem[3].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
Activation_Image[3].DecodeN(Activation_Path[3], BITMAP_PIXEL_FORMAT_ARGB8888));
inActivation_Path[4] += L"screen-density-xhigh/Setting_InAct.png";
Activation_Path[4] += L"screen-density-xhigh/Setting_Act.png";
footerItem[4].Construct(ID_FOOTER_ITEM5);
footerItem[4].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
inActivation_Image[4].DecodeN(inActivation_Path[4], BITMAP_PIXEL_FORMAT_ARGB8888));
footerItem[4].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
Activation_Image[4].DecodeN(Activation_Path[4], BITMAP_PIXEL_FORMAT_ARGB8888));
Label* pLabel;
pLabel = new Label();
pLabel->Construct(Rectangle(0,0,this->GetWidth(),this->GetHeight()),L"");
AppLog("%d ,,,,%d", this->GetWidth(),this->GetHeight());
pLabel->SetBackgroundBitmap(*pAppResource->GetBitmapN(L"fakepicture.png"));
pLabel->Draw();
AddControl(pLabel);
Footer* pFooter = GetFooter();
if (pFooter)
{
pFooter->AddActionEventListener(*this);
}
pFooter->AddItem(footerItem[0]);
pFooter->AddItem(footerItem[1]);
pFooter->AddItem(footerItem[2]);
pFooter->AddItem(footerItem[3]);
pFooter->AddItem(footerItem[4]);
// Setup back event listener
//.........这里部分代码省略.........