1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
/*
ClanGUI, copyrights by various people. Have a look in the CREDITS file.
This sourcecode is distributed using the Library GNU Public Licence,
version 2 or (at your option) any later version. Please read LICENSE
for details.
*/
#ifdef WIN32
#pragma warning (disable:4786)
#endif
#include <ClanLib/Core/Resources/resource_manager.h>
#include <ClanLib/GUI/button.h>
#include <ClanLib/GUI/window.h>
#include "stylemanager_opengl.h"
#include "button_opengl.h"
#include "window_opengl.h"
// Construction:
CL_StyleManager_OpenGL::CL_StyleManager_OpenGL(CL_ResourceManager *resources)
: CL_StyleManager_Default(resources)
{
}
CL_StyleManager_OpenGL::~CL_StyleManager_OpenGL()
{
}
// Attributes:
// Overridables:
void CL_StyleManager_OpenGL::connect_styles(
const std::string &type,
CL_Component *owner)
{
if (type == "button")
{
CL_Button *button = (CL_Button *) owner;
button->attach_style(new CL_Button_OpenGL(button, this));
}
else if (type == "window")
{
CL_Window *window = (CL_Window *) owner;
window->attach_style(new CL_Window_OpenGL(window, this));
}
else
{
CL_StyleManager_Default::connect_styles(type, owner);
}
}
|