Page principale | Liste des namespaces | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Membres des namespaces | Composants | Déclarations

# ExCWindowObject.h

Aller à la documentation de ce fichier.

    00001 /************************************************************************/
    00002 /* Ex Nihlo Engine by Hermanns Christophe                                                               */
    00003 /************************************************************************/
    00004 /* This program is free software; you can redistribute it and/or                */
    00005 /* modify it under the terms of the GNU General Public License                  */
    00006 /* as published by the Free Software Foundation; either version 2               */
    00007 /* of the License, or (at your option) any later version.                               */
    00008 /*                                                                                                                                              */
    00009 /* This program is distributed in the hope that it will be useful,              */
    00010 /* but WITHOUT ANY WARRANTY; without even the implied warranty of               */
    00011 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                                 */
    00012 /*                                                                                                                                              */
    00013 /* See the GNU General Public License for more details.                                 */
    00014 /*                                                                                                                                              */
    00015 /* You should have received a copy of the GNU General Public License    */
    00016 /* along with this program; if not, write to the Free Software                  */
    00017 /* Foundation, Inc., 59 Temple Place - Suite 330,                                               */
    00018 /* Boston, MA  02111-1307, USA.                                                                                 */
    00019 /*                                                                                                                                              */
    00020 /* If you use a important part of this code please send me a mail               */
    00021 /* I just want to see where my code go thks :)                                                  */
    00022 /************************************************************************/
    00023
    00024 /************************************************************************/
    00025 /* Contact                                                              */
    00026 /************************************************************************/
    00027 /* ExNihilo Website :www.ploksoftware.org                               */
    00028 /*                                                                      */
    00029 /* Hermanns Christophe ExNihilo creator and main programmer             */
    00030 /*                                                                      */
    00031 /* Mail             : Data@ploksoftware.org                                                             */
    00032 /* ICQ              : 8030901                                                                                   */
    00033 /* MSN Messenger    : Data_7@hotmail.com                                                                */
    00034 /*                                                                      */
    00035 /* Benjamin Michotte Linux port, webmaster                              */
    00036 /*                                                                      */
    00037 /* Mail             :binny@ploksoftware.org                             */
    00038 /*                                                                      */
    00039 /************************************************************************/
    00040
    00041 /************************************************************************/
    00042 /* File Description                                                                                             */
    00043 /************************************************************************/
    00044 /* File Name   :ExCWindowObject.h                                                                                               */
    00045 /*                                                                                                                                              */
    00046 /* Star Date   :03/14/2003                                                                                              */
    00047 /*                                                                                                                                              */
    00048 /* Last Update :                                                        */
    00049
    00050 /*                                                                                                                                              */
    00051 /* File Description :                                                                                                   */
    00052 /*                                                                      */
    00053 /* For update of this file check : www.ploksoftware.org                 */
    00054 /************************************************************************/
    00055
    00056 #ifndef __ExCWindowObject_H__
    00057 #define __ExCWindowObject_H__
    00058 //--------------------------------
    00059 // File to include
    00060 //--------------------------------
    00061 #include "ExDefine.h"
    00062 #include "Math/ExMath.h"
    00063 #include "Object/Object2D/ExCObject2D.h"
    00064 #include "Manager/ManagerObject/ExManagerTexture.h"
    00065 #include "Manager/ExManagerWindow.h"
    00066 //--------------------------------
    00067 class ExCWindowObject :public ExCObject2D
    00068 {
    00069 //--------------------------------
    00070 // Variable
    00071 //--------------------------------
    00072 protected:
    00073         ExManagerTexture                        *ManagerTexture;
    00074         ExManagerWindow                         *ManagerWindow;
    00075
    00076         ExCWindowObject *m_Parent;
    00077
    00078         ExCVec2D        m_OldMousePosition;
    00079
    00080         //Title
    00081         bool            m_ShowWindowTitle;
    00082         std::string     m_WindowTitle;
    00083         std::string     m_WindowOldTitle;
    00084         ExCVec3D        m_WindowTitleColor;
    00085         //Size and position
    00086         ExCVec2D        m_WindowSize;
    00087         ExCVec2D        m_OldSize;
    00088         float           m_TitleBarSize;
    00089         ExCVec2D        m_OldPosition;
    00090         //Color and blending
    00091         bool            m_Blending;
    00092         ExCVec3D        m_BackroundColor;
    00093         float           m_BackroundBlending;
    00094         //Border
    00095         ExCVec3D        m_BorderColor;
    00096         float           m_BorderSize;
    00097         bool            m_ShowBorder;
    00098         //Texturing
    00099         bool            m_BackroundIsTexturing1;
    00100         std::string m_BackroundTexture1;
    00101         bool            m_BackroundIsTexturing2;
    00102         std::string m_BackroundTexture2;
    00103         bool            m_TextureIsMouving;
    00104         ExCVec2D        m_TextureMouvingVec;
    00105         //Window state
    00106         bool            m_CanMouve;
    00107         bool            m_Mouving;
    00108         bool            m_Reduced;
    00109         bool            m_Maximized;
    00110         bool            m_ShowWindow;
    00111         bool            m_Active;                       //if windows is the active windows
    00112
    00113         bool            m_RequestFocus;
    00114
    00115
    00116         std::vector<ExCWindowObject *>                          m_VecWindowObject;
    00117         ExCWindowObject *                               m_LastObjectFocus;
    00118         ExCWindowObject *                               m_CurrentObjectFocus;
    00119         ExCWindowObject *                               m_ObjectRequestFocus;
    00120         //void RefreshPosotion(void);
    00121         //void RefreshSize(void);
    00122 public:
    00123 //--------------------------------
    00124 // Constructor // Destructor
    00125 //--------------------------------
    00126         ExCWindowObject(void);
    00127         ExCWindowObject(ExCVec2D Size);
    00128         //inline ExCWindowObject(float x,float y){ExCWindowObject(ExCVec2D(x,y));};
    00129         ExCWindowObject(ExCVec2D Size,ExCVec2D Position);
    00130         /*inline ExCWindowObject(float x,float y,float xp,float yp)
    00131                 {ExCWindowObject(ExCVec2D(x,y),ExCVec2D(xp,yp));};*/
    00132         ExCWindowObject(ExCVec2D Size,ExCVec2D Position,std::string Title);
    00133         /*inline ExCWindowObject(float x,float y,float xp,float yp,std::string Title)
    00134                 {ExCWindowObject(ExCVec2D(x,y),ExCVec2D(xp,yp),Title);}*/
    00135         ~ExCWindowObject(void);
    00136 //--------------------------------
    00137 // Methode
    00138 //--------------------------------
    00139         void SetPosition(ExCVec2D Position);
    00140         inline std::vector<ExCWindowObject *> * GetVecWindowObject(void){return &m_VecWindowObject;}
    00141         void SetManagerTexture(ExManagerTexture * Texture);
    00142         inline void SetManagerWindow(ExManagerWindow *Window){ManagerWindow = Window;}
    00143
    00144         inline void SetParrent(ExCWindowObject *Parent){m_Parent=Parent;}
    00145         inline ExCWindowObject* GetParrent(void){return m_Parent;}
    00146
    00147         void Init(void);
    00148         virtual void Draw(void);
    00149         virtual ExCAction InputAction(ExCAction Action);
    00150         virtual ExCAction InputCommand(ExCCommand Command);
    00151
    00152         void AddObjectControl(ExCWindowObject *object);
    00153         //Title
    00154         inline void ShowWindowTitle(bool state){m_ShowWindowTitle=state;}
    00155         inline bool IsShowWindowTitle(void){return m_ShowWindowTitle;}
    00156         inline void SetWindowTitle(std::string Title){m_WindowTitle=Title;}
    00157         inline std::string GetWindowTitle(void){return m_WindowTitle;}
    00158         inline void SetWindowOldTitle(std::string Title){m_WindowOldTitle=Title;}
    00159         inline std::string GetWindowOldTitle(void){return m_WindowOldTitle;}
    00160         inline void     SetWindowTitleColor(ExCVec3D Color){m_WindowTitleColor=Color;}
    00161         inline ExCVec3D GetWindowTitleColor(void){return m_WindowTitleColor;}
    00162
    00163         //Position and size
    00164         inline void SetWindowSize(ExCVec2D vec){m_WindowSize=vec;}
    00165         inline ExCVec2D GetWindowSize(void){return m_WindowSize;}
    00166         inline void SetOldWindowSize(ExCVec2D vec){m_OldSize=vec;}
    00167         inline ExCVec2D GetOldWindowSize(void){return m_OldSize;}
    00168         inline void SetOldPosition(ExCVec2D vec){m_OldPosition=vec;}
    00169         inline ExCVec2D GetOldPosition(void){return m_OldPosition;}
    00170         inline void SetTitleBarSize(float size){m_TitleBarSize=size;}
    00171         inline float GetTitleBarSize(void){return m_TitleBarSize;}
    00172
    00173         //void SetWindowPosition(ExCVec2D vec);
    00174         //Check location
    00175         bool PointInWindow(ExCVec2D point);
    00176         //Texturing
    00177         inline bool IsBackroundTexturing1(void){return m_BackroundIsTexturing1;}
    00178         inline void     SetBackroundTexturing1(bool status,std::string texture){m_BackroundIsTexturing1=status;m_BackroundTexture1=texture;}
    00179         inline std::string GetBackroundTexture1(void){return m_BackroundTexture1;}
    00180         inline bool IsBackroundTexturing2(void){return m_BackroundIsTexturing2;}
    00181         inline void     SetBackroundTexturing2(bool status,std::string texture){m_BackroundIsTexturing2=status;m_BackroundTexture2=texture;}
    00182         inline std::string GetBackroundTexture2(void){return m_BackroundTexture2;}
    00183         inline bool IsTextureIsMouving(void){return m_TextureIsMouving;}
    00184         inline void SetTextureIsMouving(bool state){m_TextureIsMouving=state;}
    00185         inline void SetTextureMouvingVec(ExCVec2D vec){m_TextureMouvingVec=vec;}
    00186         inline ExCVec2D GetTextureMouvingVec(void ){return m_TextureMouvingVec;}
    00187         //Color and blending
    00188         inline bool IsBackroundBlending(void){return m_Blending;}
    00189         inline float GetBackroundBlending(void){return m_BackroundBlending;}
    00190         inline void SetBackroundBlending(bool state){m_Blending=state;}
    00191         inline void SetBackroundBlending(bool state,float value){m_Blending=state;m_BackroundBlending=value;}
    00192         inline void     SetBackroundColor(ExCVec3D Color){m_BackroundColor=Color;}
    00193         inline ExCVec3D GetBackroundColor(void){return m_BackroundColor;}
    00194         //Border Size en color
    00195         inline void SetBorderSize(float value){m_BorderSize=value;}
    00196         inline float GetBorderSize(void){return m_BorderSize;}
    00197         inline void     SetBorderColor(ExCVec3D Color){m_BorderColor=Color;}
    00198         inline ExCVec3D GetBorderColor(void){return m_BorderColor;}
    00199         inline bool GetShowBorder(void){return m_ShowBorder;}
    00200         inline void     SetShowBorder(bool status){m_ShowBorder=status;}
    00201
    00202         //State
    00203         inline bool IsMouving(void){return m_Mouving;}
    00204         inline void     SetMouving(bool status){m_Mouving=status;}
    00205         inline bool GetCanMouve(void){return m_CanMouve;}
    00206         inline void     SetCanMouve(bool status){m_CanMouve=status;}
    00207         inline bool IsReduced(void){return m_Reduced;}
    00208         inline void     SetMaximized(bool status){m_Maximized=status;}
    00209         inline bool IsMaximized(void){return m_Maximized;}
    00210         inline void     SetReduced(bool status){m_Reduced=status;}
    00211         inline bool IsShowWindow(void){return m_ShowWindow;}
    00212         inline void     SetShowWindow(bool status){m_ShowWindow=status;}
    00213         inline bool IsActive(void){return m_Active;}
    00214         inline void     SetActive(bool status){m_Active=status;}
    00215 };
    00216 #endif //__ExCWindowObject_H__