<commit_before>/////////////////////////////////////////
//
//             OpenLieroX
//
// code under LGPL, based on JasonBs work,
// enhanced by <NAME> and <NAME>
//
//
/////////////////////////////////////////



#include <libxml/xmlmemory.h>
#include <libxml/parser.h>

#include "SkinnedGUI/CGuiSkinnedLayout.h"
#include "SkinnedGUI/CGuiSkin.h"
#include "LieroX.h"
#include "Debug.h"
#include "Cursor.h"
#include "MathLib.h"
#include "GfxPrimitives.h"
#include "AuxLib.h"
#include "StringUtils.h"
#include "XMLutils.h"
#include "FindFile.h"


namespace SkinnedGUI {

////////////////
// Create
CGuiSkinnedLayout::CGuiSkinnedLayout() : CContainerWidget("_TopLayout", NULL) {
	cFocused = NULL;
	iType = wid_GuiLayout;
	iModalsRunning = 0;
	iClientWidth = iClientHeight = iClientX = iClientY = 0;
	bFullRepaint = false;
	cSkin = NULL;

	if (SDL_GetVideoSurface())
		Resize(0, 0, SDL_GetVideoSurface()->w, SDL_GetVideoSurface()->h);
}

CGuiSkinnedLayout::CGuiSkinnedLayout(COMMON_PARAMS) : CContainerWidget(name, parent)
{
	cFocused = NULL;
	iType = wid_GuiLayout;
	iModalsRunning = 0;
	iClientWidth = iClientHeight = iClientX = iClientY = 0;
	bFullRepaint = false;
	cSkin = NULL;
}

///////////////////
// Shutdown the gui layout
CGuiSkinnedLayout::~CGuiSkinnedLayout()
{
	for( std::list<CWidget *>::iterator w = cWidgets.begin() ; w != cWidgets.end() ; w++)
		delete (*w);

	cWidgets.clear();

	cFocused = NULL;
	setParent(NULL);
}

///////////////////
// Add a widget to the gui layout
// HINT: this is called from the widget constructor<commit_msg>(old) fix bad usage of SDL_GetVideoSurface<commit_after>/////////////////////////////////////////
//
//             OpenLieroX
//
// code under LGPL, based on JasonBs work,
// enhanced by <NAME> and <NAME>
//
//
/////////////////////////////////////////



#include <libxml/xmlmemory.h>
#include <libxml/parser.h>

#include "SkinnedGUI/CGuiSkinnedLayout.h"
#include "SkinnedGUI/CGuiSkin.h"
#include "LieroX.h"
#include "Debug.h"
#include "Cursor.h"
#include "MathLib.h"
#include "GfxPrimitives.h"
#include "AuxLib.h"
#include "StringUtils.h"
#include "XMLutils.h"
#include "FindFile.h"


namespace SkinnedGUI {

////////////////
// Create
CGuiSkinnedLayout::CGuiSkinnedLayout() : CContainerWidget("_TopLayout", NULL) {
	cFocused = NULL;
	iType = wid_GuiLayout;
	iModalsRunning = 0;
	iClientWidth = iClientHeight = iClientX = iClientY = 0;
	bFullRepaint = false;
	cSkin = NULL;

	if (VideoPostProcessor::videoSurface())
		Resize(0, 0, VideoPostProcessor::videoSurface()->w, VideoPostProcessor::videoSurface()->h);
}

CGuiSkinnedLayout::CGuiSkinnedLayout(COMMON_PARAMS) : CContainerWidget(name, parent)
{
	cFocused = NULL;
	iType = wid_GuiLayout;
	iModalsRunning = 0;
	iClientWidth = iClientHeight = iClientX = iClientY = 0;
	bFullRepaint = false;
	cSkin = NULL;
}

///////////////////
// Shutdown the gui layout
CGuiSkinnedLayout::~CGuiSkinnedLayout()
{
	for( std::list<CWidget *>::iterator w = cWidgets.begin() ; w != cWidgets.end() ; w++)
		delete (*w);

	cWidgets.clear();

	cFocused = NULL;
	setParent(NULL);
}

///////////////////
// Add a widget to the gui layout
// HINT: this is called from the widget constructor
{'fraction_non_alphanumeric': 0.2150063051702396, 'fraction_numerical': 0.0037831021437578815, 'mean_word_length': 3.0266497461928936, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '5001610', 'n_tokens_mistral': 1124, 'n_tokens_neox': 1093, 'n_words': 242}