Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

guibutton.h

00001 /***************************************************************************
00002                         guibutton.h    -  description
00003                             -------------------
00004     begin                : lun 22 mar 2004
00005     copyright            : (C) 2004-2006 by Duong-Khang NGUYEN
00006     email                : neoneurone @ users sourceforge net
00007 
00008     $Id: guibutton.h 43 2006-09-12 21:29:41Z neoneurone $
00009  ***************************************************************************/
00010 
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   any later version.                                                    *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #if !defined(_OPENCITY_GUIBUTTON_H_)
00021 #define _OPENCITY_GUIBUTTON_H_ 1
00022 
00023 #include "main.h"
00024 #include "guimain.h"
00025 
00026 
00027 //========================================================================
00030 class GUIButton : public GUIMain {
00031 public:
00032     GUIButton() {};
00033     GUIButton(
00034         const int & rciX,
00035         const int & rciY,
00036         const uint & rcuiW,
00037         const uint & rcuiH,
00038         const string & strFile );
00039     ~GUIButton();
00040 
00041 
00042     void
00043     SetBackground(
00044         const Color& color );
00045 
00046     void
00047     SetForeground(
00048         const Color& color );
00049 
00050 
00051    //========================================================================
00052    // Inherited methods from GUIMain
00053    //========================================================================
00054     void
00055     Display() const;
00056 
00057 
00058    //========================================================================
00059    // Inherited methods from UI
00060    //========================================================================
00061     void
00062     uiKeyboard( const SDL_KeyboardEvent & rcsSDLKeyboardEvent );
00063 
00064     void
00065     uiMouseMotion( const SDL_MouseMotionEvent & rcsSDLMouseMotionEvent );
00066 
00067     void
00068     uiMouseButton( const SDL_MouseButtonEvent & rcsSDLMouseButtonEvent );
00069 
00070     void
00071     uiExpose( const SDL_ExposeEvent & rcsSDLExposeEvent );
00072 
00073     void
00074     uiResize( const SDL_ResizeEvent & rcsSDLResizeEvent );
00075 
00076 
00077 private:
00078     GLuint uiTexture, uiTextureOver;
00079 
00080     Color colorForeground;
00081     Color colorBackground;
00082 };
00083 
00084 #endif
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097 
00098 
00099 
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 
00111 
00112 
00113 
00114 
00115 

Generated on Sat Nov 11 10:21:10 2006 for OpenCity by  doxygen 1.4.2