<commit_before>
#include <Application.h>
#include <Button.h>
#include <CheckBox.h>
#include <MenuField.h>
#include <MenuItem.h>
#include <PopUpMenu.h>
#include <Screen.h>
#include <SerialPort.h>
#include <stdio.h>

#include "globals.h"
#include "initwindow.h"

const uint32	MSG_IWCBLOG		= 'IW01';
const uint32	MSG_IWCBTERM	= 'IW02';
const uint32	MSG_IWBUTOK		= 'IW03';
const uint32	MSG_IWBUTQUIT	= 'IW04';
const uint32	MSG_IWDEVICE	= 'IW05';

initWindow::initWindow(const char *name) : BWindow(
		BRect(100,100,430,280),
		name,
		B_FLOATING_WINDOW_LOOK,
		B_MODAL_APP_WINDOW_FEEL, B_NOT_ZOOMABLE | B_NOT_RESIZABLE) {

	// initialize w/ defaults (or read config here)
	log = false;
	term = false;
	device = "";

	// center onscreen
	BScreen	*screen = new BScreen();
	MoveTo((int)((screen->Frame().Width()-Bounds().Width())/2), (int)((screen->Frame().Height()-Bounds().Height())/2));
	delete screen;

	BView *view = new BView(this->Bounds(), "initView", B_FOLLOW_ALL_SIDES, B_WILL_DRAW);
	this->AddChild(view);
	view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));

	BRect r = view->Bounds();
	r.InsetBy(16,10);
	BRect s = r;
	s.top = 25; s.bottom = s.top + 30;

	// enumerate ports to populate popupmenu<commit_msg>- changed defaults to developers' taste<commit_after>
#include <Application.h>
#include <Button.h>
#include <CheckBox.h>
#include <MenuField.h>
#include <MenuItem.h>
#include <PopUpMenu.h>
#include <Screen.h>
#include <SerialPort.h>
#include <stdio.h>

#include "globals.h"
#include "initwindow.h"

const uint32	MSG_IWCBLOG		= 'IW01';
const uint32	MSG_IWCBTERM	= 'IW02';
const uint32	MSG_IWBUTOK		= 'IW03';
const uint32	MSG_IWBUTQUIT	= 'IW04';
const uint32	MSG_IWDEVICE	= 'IW05';

initWindow::initWindow(const char *name) : BWindow(
		BRect(100,100,430,280),
		name,
		B_FLOATING_WINDOW_LOOK,
		B_MODAL_APP_WINDOW_FEEL, B_NOT_ZOOMABLE | B_NOT_RESIZABLE) {

	// initialize w/ defaults (or read config here)
	log = false;
	term = false;
	device = "";
	// my stuff
	log = term = true; device = "usb0";

	// center onscreen
	BScreen	*screen = new BScreen();
	MoveTo((int)((screen->Frame().Width()-Bounds().Width())/2), (int)((screen->Frame().Height()-Bounds().Height())/2));
	delete screen;

	BView *view = new BView(this->Bounds(), "initView", B_FOLLOW_ALL_SIDES, B_WILL_DRAW);
	this->AddChild(view);
	view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));

	BRect r = view->Bounds();
	r.InsetBy(16,10);
	BRect s = r;
	s.top = 25; s.bottom = s.top + 30;

	// enumerate ports to populate popupmenu
{'fraction_non_alphanumeric': 0.16361464968152867, 'fraction_numerical': 0.033837579617834394, 'mean_word_length': 5.189655172413793, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 33, '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': '601580', 'n_tokens_mistral': 1100, 'n_tokens_neox': 1016, 'n_words': 213}