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

window_generic.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 "window_generic.h"
00011 #include "API/GUI/component_options.h"
00012 
00013 CL_ComponentOptions CL_Window_Generic::create_options(
00014         const CL_Rect &pos,
00015         const std::string &title)
00016 {
00017         CL_ComponentOptions options;
00018 
00019         options.add_option_as_int("x", pos.x1);
00020         options.add_option_as_int("y", pos.y1);
00021         options.add_option_as_int("width", pos.get_width());
00022         options.add_option_as_int("height", pos.get_height());
00023         options.add_option("title", title);
00024 
00025         return options;
00026 }
00027 
00028 CL_Window_Generic::CL_Window_Generic(
00029         CL_Window *self,
00030         const CL_ComponentOptions &options,
00031         CL_StyleManager *style)
00032 :
00033         window(self),
00034         client_area(NULL)
00035 {
00036         if(options.exists("title"))
00037                 title = options.get_value("title");
00038 
00039         CL_Rect rect(3, 24, window->get_width() - 3, window->get_height() - 3);
00040         client_area = new CL_Component(rect, window, style);
00041 
00042 //      window->moveable(true);
00043 }
00044 
00045 CL_Window_Generic::~CL_Window_Generic()
00046 {
00047         delete client_area;
00048 }

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