本文整理汇总了C++中Header::AddActionEventListener方法的典型用法代码示例。如果您正苦于以下问题:C++ Header::AddActionEventListener方法的具体用法?C++ Header::AddActionEventListener怎么用?C++ Header::AddActionEventListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Header
的用法示例。
在下文中一共展示了Header::AddActionEventListener方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrepareHeader
void BaseWordForm::PrepareHeader()
{
Header *header = GetHeader();
if (header)
{
if (!__pICHeader)
__pICHeader = Utils::GetBitmapN("ic_header.png");
header->SetTitleIcon(__pICHeader);
header->RemoveAllButtons();
header->RemoveAllItems();
if (__pContextMenu)
{
ButtonItem btnMenu;
btnMenu.Construct(BUTTON_ITEM_STYLE_ICON, ID_MENU);
btnMenu.SetIcon(BUTTON_ITEM_STATUS_NORMAL, Utils::GetBitmapN(L"ic_menu.png"));
header->SetButton(BUTTON_POSITION_RIGHT, btnMenu);
}
// ButtonItem btnAddWord;
// btnAddWord.Construct(BUTTON_ITEM_STYLE_ICON, ID_ADD_WORD);
// //btnAddWord.SetText(GetString("IDS_ADD_WORD_BUTTON"));
// btnAddWord.SetIcon(BUTTON_ITEM_STATUS_NORMAL, Utils::GetBitmap(L"ic_add_word.png"));
// HeaderItem headerItem1;
// header->SetTitleText("voc4u");
// header->SetButton(BUTTON_POSITION_RIGHT, btnAddWord);
// header->PlayWaitingAnimation(HEADER_ANIMATION_POSITION_BUTTON_LEFT);
header->SetTitleText("Voc4u");
header->AddActionEventListener(*this);
}
}
示例2: OnInitializing
result HeaderForm::OnInitializing(int index) {
result r = E_SUCCESS;
headerIndex = index;
/*
* I18N
*/
String routePlanner = "Routeplanner";
String liveboard = "Liveboard";
AppResource* appRes = Application::GetInstance()->GetAppResource();
appRes->GetString(L"HEADER_ROUTEPLANNER", routePlanner);
appRes->GetString(L"HEADER_LIVEBOARD", liveboard);
/*
* set OrientationListener
*/
this->SetOrientation(ORIENTATION_AUTOMATIC);
this->AddOrientationEventListener(*this);
// set header
Header* headerObj = this->GetHeader();
headerObj->SetStyle(HEADER_STYLE_SEGMENTED);
// Liveboard header
HeaderItem liveBoardHeaderItem;
liveBoardHeaderItem.Construct(HEADER_ID_LIVEBOARD);
liveBoardHeaderItem.SetText(liveboard);
liveBoardHeaderItem.SetActionId(this->ACTION_HEADER_ID_LIVEBOARD);
// routePlanner header
HeaderItem routePlannerHeaderItem;
routePlannerHeaderItem.Construct(HEADER_ID_ROUTE_PLANNER);
routePlannerHeaderItem.SetText(routePlanner);
routePlannerHeaderItem.SetActionId(this->ACTION_HEADER_ID_ROUTE_PLANNER);
/*
* create HeaderItems
*/
headerObj->AddItem(routePlannerHeaderItem);
headerObj->AddItem(liveBoardHeaderItem);
headerObj->SetItemSelected(index);
/*
* add header action listener
*/
headerObj->AddActionEventListener(*this);
return r;
}
示例3: GetHeader
void
OverlayKeypadForm::OnKeypadOpened(Control& source)
{
Header* pHeader = GetHeader();
HeaderItem doneItem;
HeaderItem cancelItem;
doneItem.Construct(ID_BUTTON_DONE);
doneItem.SetText("Done");
cancelItem.Construct(ID_BUTTON_CANCEL);
cancelItem.SetText("Cancel");
pHeader->SetStyle(HEADER_STYLE_BUTTON);
pHeader->AddItem(doneItem);
pHeader->AddItem(cancelItem);
pHeader->AddActionEventListener(*this);
}
示例4: GetHeader
result
ShoppingListMainForm::OnInitializing(void)
{
result r = E_SUCCESS;
Header* pHeader = GetHeader();
if (pHeader)
{
pHeader->AddActionEventListener(*this);
}
SetFormBackEventListener(this);
SetFormMenuEventListener(this);
pOptionMenu = new (std::nothrow) OptionMenu();
pOptionMenu->Construct();
pOptionMenu->AddItem(L"Add a new list", ID_OPTION_ADD);
pOptionMenu->AddActionEventListener(*this);
pOptionMenu->SetShowState(false);
return r;
}
示例5: GetHeader
result
EventListForm::OnInitializing(void)
{
result r = E_SUCCESS;
Header* pHeader = GetHeader();
AppAssert(pHeader);
DateTime today;
String formattedString;
SystemTime::GetCurrentTime(WALL_TIME, today);
__pLocaleCalendar = Tizen::Locales::Calendar::CreateInstanceN(CALENDAR_GREGORIAN);
__pLocaleCalendar->SetTime(today);
DateTimeFormatter* pDateFormatter = DateTimeFormatter::CreateDateFormatterN(DATE_TIME_STYLE_DEFAULT);
String customizedPattern = L"dd MMM yyyy";
pDateFormatter->ApplyPattern(customizedPattern);
pDateFormatter->Format(*__pLocaleCalendar, formattedString);
HeaderItem headerDaily;
headerDaily.Construct(ID_HEADER_DAILY);
headerDaily.SetText(L"일");
HeaderItem headerMonthly;
headerMonthly.Construct(ID_HEADER_MONTHLY);
headerMonthly.SetText(L"월");
pHeader->SetStyle(HEADER_STYLE_SEGMENTED_WITH_TITLE);
pHeader->SetTitleText(formattedString);
pHeader->AddItem(headerDaily);
pHeader->AddItem(headerMonthly);
pHeader->AddActionEventListener(*this);
Footer* pFooter = GetFooter();
AppAssert(pFooter);
pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
FooterItem footerCreate;
footerCreate.Construct(ID_FOOTER_CREATE);
footerCreate.SetText(L"일정 생성");
pFooter->AddItem(footerCreate);
SetFormBackEventListener(this);
pFooter->AddActionEventListener(*this);
Tizen::Ui::Controls::Button* pPreviousButton = new (std::nothrow) Button();
pPreviousButton->Construct(Rectangle(0, 0, GetClientAreaBounds().width / 2, 72), L"이전");
pPreviousButton->SetActionId(ID_BUTTON_PREV);
pPreviousButton->AddActionEventListener(*this);
AddControl(pPreviousButton);
Tizen::Ui::Controls::Button* pNextButton = new (std::nothrow) Button();
pNextButton->Construct(Rectangle(GetClientAreaBounds().width / 2, 0, GetClientAreaBounds().width / 2, 72), L"다음");
pNextButton->SetActionId(ID_BUTTON_NEXT);
pNextButton->AddActionEventListener(*this);
AddControl(pNextButton);
__pGroupedListView = new (std::nothrow) GroupedListView();
__pGroupedListView->Construct(Rectangle(0, 72, GetClientAreaBounds().width, GetClientAreaBounds().height - 72), GROUPED_LIST_VIEW_STYLE_INDEXED, true, SCROLL_STYLE_FADE_OUT);
__pGroupedListView->SetTextOfEmptyList(L"일정 없음");
__pGroupedListView->SetItemProvider(*this);
__pGroupedListView->AddGroupedListViewItemEventListener(*this);
__pGroupedListView->SetItemDividerColor(Tizen::Graphics::Color::GetColor(COLOR_ID_BLACK));
AddControl(__pGroupedListView);
LocaleManager localeManager;
localeManager.Construct();
__timeZone = localeManager.GetSystemTimeZone();
return r;
}