<commit_before>/**
 * Appcelerator Titanium Mobile
 * Copyright (c) 2012 by Appcelerator, Inc. All Rights Reserved.
 * Licensed under the terms of the Apache Public License
 * Please see the LICENSE included with this distribution for details.
 */

#ifndef TI_PAGE_SCENE_H
#define TI_PAGE_SCENE_H

#include <bb/cascades/Page>

#include "Scene.h"
#include "WindowGroup.h"

namespace titanium {

class PageScene : public Scene {
    Q_OBJECT

public:
    PageScene() {
        page_ = bb::cascades::Page::create();
        setPane(page_);

        // The content of the page is the window group container.
        windowGroup_ = new WindowGroup();
        page_->setContent(windowGroup_);
    }

    virtual WindowGroup* windowGroup() const {
        return windowGroup_;
    }

    virtual void addAction(bb::cascades::ActionItem* item) {
        page_->addAction(item);
    }

private:
    WindowGroup* windowGroup_;
    bb::cascades::Page* page_;
};

} // namespace titanium

#endif
<commit_msg>Show action items on bar by default.<commit_after>/**
 * Appcelerator Titanium Mobile
 * Copyright (c) 2012 by Appcelerator, Inc. All Rights Reserved.
 * Licensed under the terms of the Apache Public License
 * Please see the LICENSE included with this distribution for details.
 */

#ifndef TI_PAGE_SCENE_H
#define TI_PAGE_SCENE_H

#include <bb/cascades/Page>

#include "Scene.h"
#include "WindowGroup.h"

namespace titanium {

class PageScene : public Scene {
    Q_OBJECT

public:
    PageScene() {
        page_ = bb::cascades::Page::create();
        setPane(page_);

        // The content of the page is the window group container.
        windowGroup_ = new WindowGroup();
        page_->setContent(windowGroup_);
    }

    virtual WindowGroup* windowGroup() const {
        return windowGroup_;
    }

    virtual void addAction(bb::cascades::ActionItem* item) {
        // TODO(josh): expose setting placement of action item.
        page_->addAction(item, bb::cascades::ActionBarPlacement::OnBar);
    }

private:
    WindowGroup* windowGroup_;
    bb::cascades::Page* page_;
};

} // namespace titanium

#endif

{'fraction_non_alphanumeric': 0.1018867924528302, 'fraction_numerical': 0.0037735849056603774, 'mean_word_length': 3.3109756097560976, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4393126', 'n_tokens_mistral': 661, 'n_tokens_neox': 621, 'n_words': 188}