#include <string> #include <vContext.h> #include <vTitleTab.h> #include <sTypes.h> vTitleTab::vTitleTab(vContext * parent) : vContext(parent) { // Allocate a new font font = new ogBitFont(); // Set the title to nothing title = ""; // Retrieve the default font filename out of the style tree sString * fontFileName = dynamic_cast<sString *>(GetStyle("default font")); // Attempt to load the font if (NULL != fontFileName) { // I should check for failure here, although everything fails quietly... // so even if it does fail it won't matter much font->Load(fontFileName->name.c_str(), 0); } return; } // vTitleTab::vTitleTab void vTitleTab::SetTitle(const std::string newTitle) { title = newTitle; return; } // vTitleTab::SetTitle vTitleTab::~vTitleTab(void) { delete font; font = NULL; return; } // vTitleTab::~vTitleTab