Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

window.cpp

Go to the documentation of this file.
00001 /*
00002         ClanGUI, copyrights by various people. Have a look in the CREDITS file.
00003         
00004         This sourcecode is distributed using the Library GNU Public Licence,
00005         version 2 or (at your option) any later version. Please read LICENSE
00006         for details.
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 // Construction
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 // Attributes:
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 // Operations:
00077 
00078 void CL_Window::set_title(const std::string &text)
00079 {
00080         impl->title = text;
00081 }
00082 
00084 // Signals:

Generated at Wed Apr 4 19:54:04 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001