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

ExCWindow.h

Aller à la documentation de ce fichier.
00001 /************************************************************************/
00002 /* ExNihilo 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 /*                                                                      */
00036 /************************************************************************/
00037 
00038 /************************************************************************/
00039 /* File Description                                                                                             */
00040 /************************************************************************/
00041 /* File Name   :ExCWindow.h                                                                                             */
00042 /*                                                                                                                                              */
00043 /* Star Date   :03/14/2003                                                                                              */
00044 /*                                                                                                                                              */
00045 /* Last Update :06/20/2003                                              */
00046 /*                                                                                                                                              */
00047 /* File Description :                                                                                                   */
00048 /*                                                                      */
00049 /* For update of this file check : www.ploksoftware.org                 */
00050 /************************************************************************/
00051 
00052 #ifndef __EXCWINDOW_H__
00053 #define __EXCWINDOW_H__
00054 //------------------------------------------------------------------------
00055 //Includes
00056 //------------------------------------------------------------------------
00057 #include "ExDefine.h"
00058 //------------------------------------------------------------------------
00059 #include "Math/ExMath.h"
00060 //------------------------------------------------------------------------
00061 #include "Manager/ExManagerWindow.h"
00062 //------------------------------------------------------------------------
00063 #include "Manager/ManagerObject/ExManagerTexture.h"
00064 //------------------------------------------------------------------------
00065 #include "Object/Object2D/WindowObject/ExCWindowObject.h"
00066 #include "Object/Object2D/WindowObject/ExCWindowControl.h"
00067 #include "Object/Object2D/WindowObject/ExCWindowButton.h"
00068 #include "Object/Object2D/WindowObject/ExCWindowButtonSwitch.h"
00069 #include "Object/Object2D/WindowObject/ExCWindowButtonSwitchOnMouse.h"
00070 #include "Object/Object2D/WindowObject/ExCWindowLabel.h"
00071 #include "Object/Object2D/WindowObject/ExCWindowEditLabel.h"
00072 #include "Object/Object2D/WindowObject/ExCWindowTitleBar.h"
00073 #include "Object/Object2D/WindowObject/ExCWindowContent.h"
00074 //------------------------------------------------------------------------
00075 class ExCWindow :public ExCWindowContent
00076 {
00077 //------------------------------------------------------------------------
00078 // Variable
00079 //------------------------------------------------------------------------
00080 protected:
00081         //Title Bar
00082         ExCWindowTitleBar               m_TitleBar;
00083         //Window content
00084         ExCWindowObject         m_Window;
00085 
00086         //Window state
00087         bool            m_CanMouve;
00088         bool            m_Mouving;
00089         bool            m_Reduced;
00090         bool            m_Maximized;
00091         bool            m_ShowWindow;
00092         bool            m_Active;                       //if windows is the active windows
00093 
00094         bool            m_RequestFocus;
00095 
00096 
00097         void Init(void);
00098 public:
00099 
00100 //--------------------------------
00101 // Constructor // Destructor
00102 //--------------------------------
00103         ExCWindow(void);
00104         ExCWindow(ExCVec2D Size);
00105         //inline ExCWindow(float x,float y){ExCWindow(ExCVec2D(x,y));};
00106         ExCWindow(ExCVec2D Size,ExCVec2D Position);
00107         /*inline ExCWindow(float x,float y,float xp,float yp)
00108                 {ExCWindow(ExCVec2D(x,y),ExCVec2D(xp,yp));};*/
00109         ExCWindow(ExCVec2D Size,ExCVec2D Position,std::string Title);
00110         /*inline ExCWindow(float x,float y,float xp,float yp,std::string Title)
00111                 {ExCWindow(ExCVec2D(x,y),ExCVec2D(xp,yp),Title);}*/
00112         ~ExCWindow(void);
00113 //--------------------------------
00114 // Methode
00115 //--------------------------------
00116         //State 
00117         inline bool IsMouving(void){return m_Mouving;}
00118         inline void     SetMouving(bool status){m_Mouving=status;}
00119         inline bool GetCanMouve(void){return m_CanMouve;}
00120         inline void     SetCanMouve(bool status){m_CanMouve=status;}
00121         inline bool IsReduced(void){return m_Reduced;}
00122         inline void     SetMaximized(bool status){m_Maximized=status;}
00123         inline bool IsMaximized(void){return m_Maximized;}
00124         inline void     SetReduced(bool status){m_Reduced=status;}
00125         inline bool IsShowWindow(void){return m_ShowWindow;}
00126         inline void     SetShowWindow(bool status){m_ShowWindow=status;}
00127         inline bool IsActive(void){return m_Active;}
00128         inline void     SetActive(bool status){m_Active=status;}
00129 
00130         void RefreshPosotion(void);
00131         void RefreshSize(void);
00132         bool    m_BeClosed;
00133         void SetManagerTexture(ExManagerTexture * Texture);
00134         void Draw(void);
00135         virtual ExCAction InputAction(ExCAction Action);
00136         virtual ExCAction InputCommand(ExCCommand Command);
00137         //GetPointer
00138         ExCWindowObject *GetWindowContentPointer(void){return &m_Window;}
00139         ExCWindowObject *GetWindowBarPointer(void){return &m_TitleBar;}
00140         ExCWindowButton *GetButtonClose(void){return m_CloseButton;}
00141         ExCWindowButton *GetButtonMaximize(void){return m_MaximizeButton;}
00142         ExCWindowButton *GetButtonMinimize(void){return m_MinimizeButton;}
00143         ExCWindowButton *GetButtonMinimizeToBar(void){return m_MinimizeToBarButton;}
00144 
00145         //Position and size
00146         void SetWindowSize(ExCVec2D vec);//{m_WindowSize=vec;}
00147         //inline ExCVec2D GetWindowSize(void){return m_WindowSize;}
00148         void SetOldWindowSize(ExCVec2D vec);//{m_OldSize=vec;}
00149         //inline ExCVec2D GetOldWindowSize(void){return m_OldSize;}
00150         void SetOldPosition(ExCVec2D vec);//{m_OldPosition=vec;}
00151         //inline ExCVec2D GetOldPosition(void){return m_OldPosition;}
00152         void SetTitleBarSize(float size);//{m_TitleBarSize=size;}
00153         //inline float GetTitleBarSize(void){return m_TitleBarSize;}
00154         void SetWindowPosition(ExCVec2D vec);
00155         inline bool IsShowWindowContent(void){return m_Window.IsShowWindow();}
00156         inline void     SetShowWindowContent(bool status){m_Window.SetShowWindow(status);}
00157         inline bool IsShowWindowBar(void){return m_TitleBar.IsShowWindow();}
00158         inline void     SetShowWindowBar(bool status){m_TitleBar.SetShowWindow(status);}
00159         //Title
00160         void SetWindowTitle(std::string Title);
00161         std::string GetWindowTitle(void);
00162         void SetWindowOldTitle(std::string Title);
00163         std::string GetWindowOldTitle(void);
00164         void    SetWindowTitleColor(ExCVec3D Color);
00165         ExCVec3D GetWindowTitleColor(void);
00166 
00167         bool PointInWindow(ExCVec2D point);
00168 
00169         bool LoadFile(std::string FileName);
00170         void ReadWindowSubObject(ExCWindow *win,std::string FileName);
00171         ExCWindowControl * ReadWindowControlObject(ExCWindowObject *win,std::string FileName);
00172 };
00173 //------------------------------------------------------------------------
00174 #endif //__EXCWINDOW_H__

Généré le Tue Oct 28 12:43:33 2003 pour ExNihilo par doxygen 1.3.4