<commit_before>#include "MainEditor.h"
#include "IPlayer.h"
#include "PatternEditor.h"
#include "Oscilloscope.h"
#include "MacroEditor.h"
#include "EditorState.h"
#include "SequenceRowEditor.h"
#include "SequenceInfo.h"
#include "SongLengthInfo.h"
#include "MacroInfo.h"
#include "PatternLengthInfo.h"
#include "Macro.h"
#include "Pattern.h"
#include "TextEditor.h"
#include "PlayerState.h"
#include "Color.h"
#include "Song.h"
#include "Renderer.h"
#include "Label.h"
#include "ISynth.h"
#include "Value.h"
#include "SequenceRow.h"
#include "ITrackState.h"
#include "FileSection.h"
#include "OctaveInfo.h"
#include "TouchRegion.h"
#include "FileSelector.h"
#include "Emscripten.h"
#include "MessageManager.h"
#include "MessageDisplayer.h"
#include "SynthGrid.h"
#include "TooltipManager.h"
#include "TooltipDisplayer.h"
#include "App.h"
#include "SDL.h"
#include "Theme.h"
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <string>

#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif

// TODO: Move this somewhere

#ifndef SCALE
#define SCALE 2
#endif

MainEditor::MainEditor(EditorState& editorState, IPlayer& player, PlayerState& playerState, Song& song, ISynth& synth)
	: Editor(editorState), mPlayer(player), mPlayerState(playerState), mSong(song), mSynth(synth), mIsDragging(false)
{
	mOscillatorsProbePos = new Value();
	
	fileSelector = new FileSelector(editorState);
	
	mMessageManager = new MessageManager();
	mTooltipManager = new TooltipManager();
}


MainEditor::~MainEditor()
{
	delete mOscillatorsProbePos;
	delete fileSelector;
	
	deleteChildren();
	
	delete mMessageManager;
}


void MainEditor::deleteChildren()
{
	for (int index = 0; index < mNumChildren ; ++index)	<commit_msg>Delete tooltip manager on destruct<commit_after>#include "MainEditor.h"
#include "IPlayer.h"
#include "PatternEditor.h"
#include "Oscilloscope.h"
#include "MacroEditor.h"
#include "EditorState.h"
#include "SequenceRowEditor.h"
#include "SequenceInfo.h"
#include "SongLengthInfo.h"
#include "MacroInfo.h"
#include "PatternLengthInfo.h"
#include "Macro.h"
#include "Pattern.h"
#include "TextEditor.h"
#include "PlayerState.h"
#include "Color.h"
#include "Song.h"
#include "Renderer.h"
#include "Label.h"
#include "ISynth.h"
#include "Value.h"
#include "SequenceRow.h"
#include "ITrackState.h"
#include "FileSection.h"
#include "OctaveInfo.h"
#include "TouchRegion.h"
#include "FileSelector.h"
#include "Emscripten.h"
#include "MessageManager.h"
#include "MessageDisplayer.h"
#include "SynthGrid.h"
#include "TooltipManager.h"
#include "TooltipDisplayer.h"
#include "App.h"
#include "SDL.h"
#include "Theme.h"
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <string>

#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif

// TODO: Move this somewhere

#ifndef SCALE
#define SCALE 2
#endif

MainEditor::MainEditor(EditorState& editorState, IPlayer& player, PlayerState& playerState, Song& song, ISynth& synth)
	: Editor(editorState), mPlayer(player), mPlayerState(playerState), mSong(song), mSynth(synth), mIsDragging(false)
{
	mOscillatorsProbePos = new Value();
	
	fileSelector = new FileSelector(editorState);
	
	mMessageManager = new MessageManager();
	mTooltipManager = new TooltipManager();
}


MainEditor::~MainEditor()
{
	delete mOscillatorsProbePos;
	delete fileSelector;
	
	deleteChildren();
	
	delete mMessageManager;
	delete mTooltipManager;
}


void MainEditor::deleteChildren()
{
	for (int index = 0; index < mNumChildren ; ++index)	
{'fraction_non_alphanumeric': 0.14191134139320669, 'fraction_numerical': 0.0011514104778353484, 'mean_word_length': 6.791479820627803, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, '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': '4509548', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1229, 'n_words': 286}