• Main Page
  • Related Pages
  • Classes
  • Files
  • File List
  • File Members

win_theme.cc

Go to the documentation of this file.
00001 /*
00002    $Id: win_theme.cc,v 1.5 2002/04/25 15:34:11 gnurou Exp $ 
00003  
00004    (C) Copyright 2000 Joel Vennin
00005    Part of the Adonthell Project http://adonthell.linuxgames.com
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License.
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY.
00011 
00012    See the COPYING file for more details
00013 */
00014 
00015 #include "win_theme.h"
00016 
00017 win_theme::win_theme()
00018 {
00019   normal = NULL;
00020 
00021   mini = NULL;
00022 
00023   background = NULL;
00024 
00025   scrollbar = NULL;
00026 }
00027 
00028 win_theme::win_theme(char * theme)
00029 {
00030     string strtheme = string (theme) + "/";
00031 
00032   normal=new win_border((char *) strtheme.c_str(), WIN_BORDER_NORMAL_SIZE);
00033   
00034   mini=new win_border((char *) strtheme.c_str(), WIN_BORDER_MINI_SIZE);
00035   
00036   background=new win_background((char *) strtheme.c_str() );
00037   
00038   scrollbar=new win_scrollbar((char *) strtheme.c_str() );
00039 } 
00040 
00041 win_theme::win_theme(win_theme & th)
00042 {
00043   normal=NULL;
00044   
00045   mini=NULL;
00046   
00047   background=NULL;
00048   
00049   scrollbar=NULL;
00050   
00051   *this=th;
00052 }
00053 
00054 win_theme::~win_theme()
00055 {
00056   destroy();
00057 }
00058 
00059 win_theme & win_theme::operator=(win_theme & th)
00060 {
00061   destroy();
00062   
00063   normal = new win_border(*(th.normal));
00064   
00065   mini = new win_border(*(th.mini));
00066   
00067   background = new win_background(*(th.background));
00068   
00069   scrollbar=new win_scrollbar(*(th.scrollbar));
00070   
00071   return *this;
00072 }
00073 
00074 void win_theme::destroy()
00075 {
00076   if(normal)delete normal;
00077  
00078   if(mini) delete mini;
00079   
00080   if(background) delete background;
00081   
00082   if(scrollbar) delete scrollbar;
00083 }
00084 
00085 
00086 
00087 
00088 
00089 
00090 

Generated on Mon Sep 12 2011 for Adonthell by  doxygen 1.7.1