<commit_before>/*
 * Copyright 2012-2013 Tri-Edge AI <<EMAIL>>
 * Copyright 2014 Haiku, Inc. All rights reserved.
 *
 * Distributed under the terms of the MIT license.
 *
 * Authors:
 *		Tri-Edge AI
 *		<NAME>, <EMAIL>
 */


#include "ConfigView.h"

#include <LayoutBuilder.h>
#include <GroupLayoutBuilder.h>
#include <GridLayoutBuilder.h>
#include <ListView.h>
#include <ScrollView.h>
#include <CheckBox.h>
#include <Slider.h>
#include <StringView.h>
#include <View.h>
#include <Path.h>
#include <TabView.h>
#include <ControlLook.h>

extern int32	fFPSLimit;
extern int32	fCPULimit;
extern int32	fQuality;
extern bool		fNoiseEnabled;
extern int32	fNoiseLevel;
extern bool		fFilmEnabled;
extern int32	fFilmLevel;
extern bool		fSepiaEnabled;
extern int32	fSepiaLevel;
extern bool		fFPSEnabled;
extern BPath	fFilename;
extern float	fLastDelay;


MainTabView::MainTabView(BRect rect, const char *name)
	:
	BGroupView(name, B_VERTICAL, 0)
{
	BStringView* titleString = new BStringView(B_EMPTY_STRING, "Hanarama 360");
	titleString->SetFont(be_bold_font);

	BStringView* copyrightString = new BStringView(B_EMPTY_STRING,
		"© 2013-2015 <NAME>");
	BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
		.SetInsets(B_USE_DEFAULT_SPACING)
		.Add(titleString)
		.AddGlue()
		.Add(copyrightString)
		.End();
}


void
MainTabView::AttachedToWindow()
{
	SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
}


PerformanceTabView::PerformanceTabView(BRect rect, const char *name)
	:
	BGroupView(name, B_VERTICAL, 0)
{<commit_msg>Add buttons<commit_after>/*
 * Copyright 2012-2013 Tri-Edge AI <<EMAIL>>
 * Copyright 2014 Haiku, Inc. All rights reserved.
 *
 * Distributed under the terms of the MIT license.
 *
 * Authors:
 *		Tri-Edge AI
 *		<NAME>, <EMAIL>
 */


#include "ConfigView.h"

#include <LayoutBuilder.h>
#include <GroupLayoutBuilder.h>
#include <GridLayoutBuilder.h>
#include <ListView.h>
#include <ScrollView.h>
#include <CheckBox.h>
#include <Button.h>
#include <Slider.h>
#include <StringView.h>
#include <View.h>
#include <Path.h>
#include <TabView.h>
#include <ControlLook.h>

extern int32	fFPSLimit;
extern int32	fCPULimit;
extern int32	fQuality;
extern bool		fNoiseEnabled;
extern int32	fNoiseLevel;
extern bool		fFilmEnabled;
extern int32	fFilmLevel;
extern bool		fSepiaEnabled;
extern int32	fSepiaLevel;
extern bool		fFPSEnabled;
extern BPath	fFilename;
extern float	fLastDelay;


MainTabView::MainTabView(BRect rect, const char *name)
	:
	BGroupView(name, B_VERTICAL, 0)
{
	BStringView* titleString = new BStringView(B_EMPTY_STRING, "Hanarama 360");
	titleString->SetFont(be_bold_font);

	BButton* defaultButton = new BButton("default", "Default",
		new BMessage('defl'),
		B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE);

	BButton* selectButton = new BButton("delect", "Select",
		new BMessage('open'),
		B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE);

	BStringView* copyrightString = new BStringView(B_EMPTY_STRING,
		"© 2013-2015 <NAME>");
	BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
		.SetInsets(B_USE_DEFAULT_SPACING)
		.Add(titleString)		
		.Add(copyrightString)
		.AddGlue()
		.AddGroup(B_HORIZONTAL, 0)
			.Add(defaultButton)
			.AddGlue()
			.Add(selectButton)
			.End()		
		.End();
}


void
MainTabView::AttachedToWindow()
{
	SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
}


PerformanceTabView::PerformanceTabView(BRect rect, const char *name)
	:
	BGroupView(name, B_VERTICAL, 0)
{
{'fraction_non_alphanumeric': 0.12326747272191094, 'fraction_numerical': 0.022707166027720438, 'mean_word_length': 5.599221789883268, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 42, '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': '6495036', 'n_tokens_mistral': 1412, 'n_tokens_neox': 1279, 'n_words': 287}