本文整理汇总了C++中CAButton::setTitleFontSize方法的典型用法代码示例。如果您正苦于以下问题:C++ CAButton::setTitleFontSize方法的具体用法?C++ CAButton::setTitleFontSize怎么用?C++ CAButton::setTitleFontSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAButton
的用法示例。
在下文中一共展示了CAButton::setTitleFontSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initEditBottomView
void RecipeListViewController::initEditBottomView()
{
m_EditBottomView = CAView::createWithLayout(m_bottomViewLayout[0]);
this->getView()->addSubview(m_EditBottomView);
CAView* horizontallineview = CAView::createWithLayout(DLayout(DHorizontalLayout_L_R(1, 1), DVerticalLayout_T_H(1, 1)), CAColor_gray);
m_EditBottomView->addSubview(horizontallineview);
selectAllButton = CAButton::createWithLayout(DLayout(DHorizontalLayout_L_W(0, AppWidth/2 - 2), DVerticalLayoutFill), CAButtonTypeCustom);
selectAllButton->setTitleFontSize(FONT3);
selectAllButton->setTitleForState(CAControlState::CAControlStateAll, "全选");
selectAllButton->addTarget(this, CAControl_selector(RecipeListViewController::onClickSelectAllButton), CAControlEvents::CAControlEventTouchUpInSide);
m_EditBottomView->addSubview(selectAllButton);
CAView* verticalLineView = CAView::createWithLayout(DLayout(DHorizontalLayout_L_W(AppWidth/2, 1), DVerticalLayout_T_B(5, 5)), CAColor_gray);
m_EditBottomView->addSubview(verticalLineView);
CAButton *rightButton = CAButton::createWithLayout(DLayout(DHorizontalLayout_R_W(0, AppWidth/2 - 2), DVerticalLayoutFill), CAButtonTypeCustom);
rightButton->setTitleFontSize(FONT3);
rightButton->setTitleForState(CAControlState::CAControlStateAll, "删除");
rightButton->addTarget(this, CAControl_selector(RecipeListViewController::onClickDeleteButton), CAControlEvents::CAControlEventTouchUpInSide);
m_EditBottomView->addSubview(rightButton);
}
示例2: initMsgTableView
void SessionsViewController::initMsgTableView()
{
if (m_msg->empty())
{
showAlert();
return;
}
if (m_msgTableView == NULL)
{
m_listView = CAListView::createWithFrame(DRect(0,(120),m_winSize.width,(60)));
m_listView->setListViewDelegate(this);
m_listView->setListViewDataSource(this);
m_listView->setAllowsSelection(true);
m_listView->setAllowsMultipleSelection(false);
m_listView->setListViewOrientation(CAListViewOrientationHorizontal);
m_listView->setShowsScrollIndicators(false);
m_listView->setSeparatorColor(ccc4(0xf6, 0xf6, 0xf6, 0xff));
m_listView->setBackgroundImage(CAImage::create("common/gray_bg.png"));
m_listView->setTag(1);
//m_listView->setc
this->getView()->addSubview(m_listView);
m_msgTableView = CATableView::createWithFrame(DRect(0, (180), m_winSize.width, m_winSize.height - (180)));
m_msgTableView->setTableViewDataSource(this);
m_msgTableView->setTableViewDelegate(this);
m_msgTableView->setScrollViewDelegate(this);
m_msgTableView->setAllowsSelection(true);
m_msgTableView->setSeparatorColor(ccc4(200, 200, 200, 80));
//m_msgTableView->setSeparatorViewHeight((2));
this->getView()->addSubview(m_msgTableView);
CAPullToRefreshView *refreshDiscount = CAPullToRefreshView::create(CAPullToRefreshView::CAPullToRefreshTypeHeader);
refreshDiscount->setLabelColor(CAColor_black);
m_msgTableView->setHeaderRefreshView(refreshDiscount);
m_filterView = CAView::createWithFrame(DRect(0, (120), m_winSize.width, (60)));
CAScale9ImageView* imageView = CAScale9ImageView::createWithImage(CAImage::create("common/gray_bg.png"));
imageView->setFrame(DRect(0, 0, m_winSize.width, (60)));
m_filterView->addSubview(imageView);
this->getView()->addSubview(m_filterView);
m_filterViewVec.push_back(m_filterView);
for (int i = 0; i < 2; i++)
{
int cnt = 0;
if (i == 0) {
cnt = TrackNum;
} else if (i == 1) {
cnt = FormatNum;
}
m_filterBtn[i] = CAButton::createWithFrame(DRect(i * m_winSize.width / 2, 0, m_winSize.width / 2, (60)), CAButtonTypeCustom);
m_filterBtn[i]->setTitleForState(CAControlStateAll, filterItem[i]);
m_filterBtn[i]->setTitleFontName(SAP_FONT_ARIAL);
m_filterBtn[i]->setTitleFontSize((30));
m_filterBtn[i]->setTitleColorForState(CAControlStateAll, CAColor_gray);
m_filterBtn[i]->addTarget(this, CAControl_selector(SessionsViewController::buttonCallBack), CAControlEventTouchUpInSide);
m_filterBtn[i]->setTag(300 + i);
m_filterBtn[i]->setAllowsSelected(true);
m_filterView->addSubview(m_filterBtn[i]);
m_downView[i] = CAView::createWithFrame(DRect(i * m_winSize.width / 2, (180), m_winSize.width / 2, (50) * cnt + (20)));
CAScale9ImageView* imageView = CAScale9ImageView::createWithImage(CAImage::create("common/gray_bg.png"));
imageView->setFrame(DRect(0, 0, m_winSize.width / 2, (50) * cnt + (20)));
m_downView[i]->addSubview(imageView);
this->getView()->addSubview(m_downView[i]);
m_filterViewVec.push_back(m_downView[i]);
}
for (int i = 0; i < m_filterViewVec.size(); i++)
{
m_filterViewVec[i]->setVisible(false);
}
for (int i = 0; i < TrackNum; i++)
{
CAButton* button = CAButton::createWithFrame(DRect((20), (50) * i, m_winSize.width / 2 - (40), (50)), CAButtonTypeCustom);
button->setTitleForState(CAControlStateAll, trackFilterItem[i]);
button->setTitleFontName(SAP_FONT_ARIAL);
button->setTitleColorForState(CAControlStateAll, CAColor_gray);
button->setTitleColorForState(CAControlStateSelected, CAColor_white);
button->setTitleFontSize((27));
button->setAllowsSelected(true);
//CAImageView* imageView = CAImageView::createWithImage(CAImage::create("common/white_bg.png"));
//button->setBackgroundViewForState(CAControlStateAll, imageView);
CAImageView* imageView = CAImageView::createWithImage(CAImage::create("common/sky_bg.png"));
button->setBackgroundViewForState(CAControlStateSelected, imageView);
button->addTarget(this, CAControl_selector(SessionsViewController::buttonCallBack), CAControlEventTouchUpInSide);
button->setTag(400 + i);
m_downView[0]->addSubview(button);
m_trackButtonVec.push_back(button);
}
for (int i = 0; i < FormatNum; i++)
{
CAButton* button = CAButton::createWithFrame(DRect((20), (50) * i, m_winSize.width / 2 - (40), (50)), CAButtonTypeCustom);
button->setTitleForState(CAControlStateAll, formatFilterItem[i]);
button->setTitleFontName(SAP_FONT_ARIAL);
button->setTitleColorForState(CAControlStateAll, CAColor_gray);
button->setTitleColorForState(CAControlStateSelected, CAColor_white);
//.........这里部分代码省略.........