00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "precomp.h"
00010 #include "API/GUI/window.h"
00011 #include "API/GUI/component_options.h"
00012 #include "API/GUI/stylemanager.h"
00013 #include "window_generic.h"
00014
00016
00017
00018 CL_Window::CL_Window(
00019 const CL_ComponentOptions &options,
00020 CL_Component *parent,
00021 CL_StyleManager *style)
00022 :
00023 CL_Component(options, parent, style),
00024 impl(NULL)
00025 {
00026 impl = new CL_Window_Generic(this, options, get_style_manager());
00027 get_style_manager()->connect_styles("window", options, this);
00028 }
00029
00030 CL_Window::CL_Window(
00031 const CL_Rect &pos,
00032 const std::string &title,
00033 CL_Component *parent,
00034 CL_StyleManager *style)
00035 :
00036 CL_Component(CL_Window_Generic::create_options(pos, title), parent, style),
00037 impl(NULL)
00038 {
00039 CL_ComponentOptions options = CL_Window_Generic::create_options(pos, title);
00040 impl = new CL_Window_Generic(this, options, get_style_manager());
00041 get_style_manager()->connect_styles("window", options, this);
00042 }
00043
00044 CL_Window::CL_Window(
00045 const CL_Rect &pos,
00046 CL_Component *parent,
00047 CL_StyleManager *style)
00048 :
00049 CL_Component(CL_Window_Generic::create_options(pos, ""), parent, style),
00050 impl(NULL)
00051 {
00052 CL_ComponentOptions options = CL_Window_Generic::create_options(pos, "");
00053 impl = new CL_Window_Generic(this, options, get_style_manager());
00054 get_style_manager()->connect_styles("window", options, this);
00055 }
00056
00057 CL_Window::~CL_Window()
00058 {
00059 delete impl;
00060 }
00061
00063
00064
00065 CL_Component *CL_Window::get_client_area() const
00066 {
00067 return impl->client_area;
00068 }
00069
00070 const std::string &CL_Window::get_title() const
00071 {
00072 return impl->title;
00073 }
00074
00076
00077
00078 void CL_Window::set_title(const std::string &text)
00079 {
00080 impl->title = text;
00081 }
00082
00084