当前位置: 首页>>代码示例>>C++>>正文


C++ CADrawerController类代码示例

本文整理汇总了C++中CADrawerController的典型用法代码示例。如果您正苦于以下问题:C++ CADrawerController类的具体用法?C++ CADrawerController怎么用?C++ CADrawerController使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CADrawerController类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

CDWebViewController::~CDWebViewController()
{
    CADrawerController* drawer = (CADrawerController*)CAApplication::getApplication()->getRootWindow()->getRootViewController();
    drawer->setTouchMoved(true);
    this->getView()->removeSubview(p_webView);
    p_webView = NULL;
}
开发者ID:alliadt,项目名称:CrossApp,代码行数:7,代码来源:CDWebViewController.cpp

示例2:

AutoCollectionViewHorizontalTest::AutoCollectionViewHorizontalTest()
{
    CADrawerController* drawer = (CADrawerController*)CAApplication::getApplication()->getRootWindow()->getRootViewController();
    drawer->setTouchMoved(false);
    
    HorizontalcolorArr.clear();
}
开发者ID:WoYang,项目名称:CrossApp,代码行数:7,代码来源:AutoCollectionViewHorizontalTest.cpp

示例3:

FSNewsView::FSNewsView()
{
    CADrawerController* drawer = (CADrawerController*)CAApplication::getApplication()->getRootWindow()->getRootViewController();
    drawer->setTouchMoved(false);
    
    m_chapterInfo =NULL;
    m_lineNumber = 20*3;
}
开发者ID:fx0883,项目名称:HighMessage,代码行数:8,代码来源:FSNewsView.cpp

示例4: FirstViewController

CAWindow* MainMenu::createWindow()
{
	FirstViewController* viewController1 = new FirstViewController();
	viewController1->init();

	SecondViewController* viewController2 = new SecondViewController();
	viewController2->init();
	viewController2->setTabBarItem(CATabBarItem::create("Second",
                                CAImage::create("tabbar_function/second_1.png"),
                                CAImage::create("tabbar_function/second_2.png")));


	ThirdViewController* viewController3 = new ThirdViewController();
	viewController3->init();
	viewController3->setTabBarItem(CATabBarItem::create("Third",
                                CAImage::create("tabbar_function/third_1.png"),
                                CAImage::create("tabbar_function/third_2.png")));


	FourthViewController* viewController4 = new FourthViewController();
	viewController4->init();
	viewController4->setTabBarItem(CATabBarItem::create("Fourth",
                                CAImage::create("tabbar_function/fourth_1.png"),
                                CAImage::create("tabbar_function/fourth_2.png")));


	std::vector<CAViewController*> controllerItem;
	controllerItem.push_back(viewController2);
	controllerItem.push_back(viewController3);
	controllerItem.push_back(viewController4);

	MainMenu* p_Funtion = new MainMenu();
	p_Funtion->initWithViewControllers(controllerItem);
	p_Funtion->showTabBarSelectedIndicator();

	CANavigationController* navigationController = new CANavigationController();
	navigationController->initWithRootViewController(p_Funtion);
	navigationController->getView()->setColor(CAColor_clear);

    CAWindow* p_Window = CAWindow::create();
	float winWidth = p_Window->getBounds().size.width;
	CADrawerController* drawerController = new CADrawerController();
	drawerController->initWithController(viewController1, navigationController, winWidth*0.7);
	drawerController->setBackgroundView(CAScale9ImageView::createWithImage(CAImage::create("background/1.jpg")));
    drawerController->setEffect3D(true);
	drawerController->autorelease();

	p_Window->setRootViewController(drawerController);
	viewController1->release();
	viewController2->release();
	viewController3->release();
	viewController4->release();

	p_Funtion->release();

	return p_Window;
}
开发者ID:PossibleZero,项目名称:CrossApp,代码行数:57,代码来源:MainMenu.cpp

示例5: tableViewDidSelectRowAtIndexPath

void SecondViewController::tableViewDidSelectRowAtIndexPath(CATableView* table, unsigned int section, unsigned int row)
{
    static bool s = true;
    
    CAWindow* window = CAApplication::getApplication()->getRootWindow();
    CADrawerController* drawer = (CADrawerController*)window->getRootViewController();
    CANavigationController* nav = (CANavigationController*)drawer->getRightViewController();
    CATabBarController* tab = (CATabBarController*)nav->getViewControllerAtIndex(0);
    nav->setNavigationBarHidden(!s, true);
    tab->setTabBarHidden(!s, true);
    s = !s;
    return;
}
开发者ID:Brian1900,项目名称:CrossApp,代码行数:13,代码来源:SecondViewController.cpp

示例6: FirstViewController

CAWindow* MainMenu::createWindow()
{
	CAWindow* p_Window = CAWindow::create();

	FirstViewController* viewController1 = new FirstViewController();
	viewController1->init();
	viewController1->setNavigationBarItem(CANavigationBarItem::create("TestMenu")); 

	SecondViewController* viewController2 = new SecondViewController();
	viewController2->init();
	viewController2->setTabBarItem(CATabBarItem::create("Second", CAImage::create("tabbar_function/second_1.png"), CAImage::create("tabbar_function/second_2.png")));

	ThirdViewController* viewController3 = new ThirdViewController();
	viewController3->init();
	viewController3->setTabBarItem(CATabBarItem::create("Third", CAImage::create("tabbar_function/third_1.png"), CAImage::create("tabbar_function/third_2.png")));

	FourthViewController* viewController4 = new FourthViewController();
	viewController4->init();
	viewController4->setTabBarItem(CATabBarItem::create("Fourth", CAImage::create("tabbar_function/fourth_1.png"), CAImage::create("tabbar_function/fourth_2.png")));

	std::vector<CAViewController*> controllerItem;
	controllerItem.push_back(viewController2);
	controllerItem.push_back(viewController3);
	controllerItem.push_back(viewController4);

	MainMenu* p_Funtion = new MainMenu();
	p_Funtion->initWithViewControllers(controllerItem);
	p_Funtion->getTabBar()->showSelectedIndicator();

	CANavigationController* navigationController = new CANavigationController();
	navigationController->initWithRootViewController(viewController1);
	//navigationController->setTabBarItem(CATabBarItem::create("First", CAImage::create("tabbar_function/first_1.png"), CAImage::create("tabbar_function/first_2.png")));
	
	float winWidth = p_Window->getBounds().size.width;
	CADrawerController* drawerController = new CADrawerController();
	drawerController->initWithController(navigationController, p_Funtion, winWidth);
	drawerController->autorelease();

	p_Window->setRootViewController(drawerController);
	viewController1->release();
	viewController2->release();
	viewController3->release();
	viewController4->release();
	navigationController->release();
	p_Funtion->release();

	return p_Window;
}
开发者ID:dlpc,项目名称:CrossApp,代码行数:48,代码来源:MainMenu.cpp

示例7: DMTabBarController

bool RootWindow::init()
{
    if (!CAWindow::init())
    {
        return false;
    }
    this->setColor(ccc4(87, 154, 244, 255));

    DMTabBarController* tabBarController = new DMTabBarController();
    tabBarController->initWithTabBarController();

    CANavigationController* nav = new CANavigationController();
    nav->initWithRootViewController(tabBarController);
    nav->setNavigationBarHidden(true, false);

    DMClassificationViewController* classificationViewController = DMClassificationViewController::create();

    CADrawerController* drawer = new CADrawerController();
    drawer->initWithController(classificationViewController, nav, this->getBounds().size.width * 5/6.0f);
    drawer->setBackgroundView(CAView::createWithColor(CAColor_black));
    tabBarController->release();
    nav->release();

    CCRect rect = this->getBounds();
    rect.size.height /= 2;
    rect.origin.y = rect.size.height;
    drawer->getBackgroundView()->addSubview(CAView::createWithFrame(rect));

    this->setRootViewController(drawer);
    drawer->release();

    m_pRootTabBarController = tabBarController;
    m_pRootNavigationController = nav;
    m_pRootDrawerController = drawer;


    return true;
}
开发者ID:rvpoochen,项目名称:CartoonHouse,代码行数:38,代码来源:RootWindow.cpp

示例8:

SegmentedControlTest::SegmentedControlTest()
{
	CADrawerController* drawer = (CADrawerController*)CAApplication::getApplication()->getRootWindow()->getRootViewController();
	drawer->setTouchMoved(false);
}
开发者ID:Brian1900,项目名称:CrossApp,代码行数:5,代码来源:SegmentedControlTest.cpp

示例9:

PageViewTest::PageViewTest():pageViewIndex(0)
{
    CADrawerController* drawer = (CADrawerController*)CAApplication::getApplication()->getRootWindow()->getRootViewController();
    drawer->setTouchMoved(false);
}
开发者ID:WoYang,项目名称:CrossApp,代码行数:5,代码来源:PageViewTest.cpp

示例10:

ExtensionsTest::~ExtensionsTest()
{
	CADrawerController* drawer = (CADrawerController*)CAApplication::getApplication()->getRootWindow()->getRootViewController();
	drawer->setTouchMoved(true);
}
开发者ID:domzhaosh,项目名称:CrossApp,代码行数:5,代码来源:ExtensionsTest.cpp

示例11:

HttpRequestTest::HttpRequestTest() :cout(0)
{
	CADrawerController* drawer = (CADrawerController*)CAApplication::getApplication()->getRootWindow()->getRootViewController();
	drawer->setTouchMoved(false);
}
开发者ID:MingjunHu,项目名称:CrossApp,代码行数:5,代码来源:HttpRequestTest.cpp

示例12:

SliderTest::~SliderTest()
{
    CADrawerController* drawer = (CADrawerController*)CAApplication::getApplication()->getRootWindow()->getRootViewController();
    drawer->setTouchMoved(true);
    SliderNum = 0;
}
开发者ID:WoYang,项目名称:CrossApp,代码行数:6,代码来源:SliderTest.cpp


注:本文中的CADrawerController类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。