Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

udisp.hpp

00001 /* ==================================================== ======== ======= * 00002 * 00003 * udisp.hpp 00004 * Ubit Project [Elc][2003] 00005 * Author: Eric Lecolinet 00006 * 00007 * Part of the Ubit Toolkit: A Brick Construction Game Model for Creating GUIs 00008 * 00009 * (C) 1999-2003 Eric Lecolinet @ ENST Paris 00010 * WWW: http://www.enst.fr/~elc/ubit Email: elc@enst.fr (subject: ubit) 00011 * 00012 * *********************************************************************** 00013 * COPYRIGHT NOTICE : 00014 * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY AND WITHOUT EVEN THE 00015 * IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 00016 * YOU CAN REDISTRIBUTE IT AND/OR MODIFY IT UNDER THE TERMS OF THE GNU 00017 * GENERAL PUBLIC LICENSE AS PUBLISHED BY THE FREE SOFTWARE FOUNDATION; 00018 * EITHER VERSION 2 OF THE LICENSE, OR (AT YOUR OPTION) ANY LATER VERSION. 00019 * SEE FILES 'COPYRIGHT' AND 'COPYING' FOR MORE DETAILS. 00020 * *********************************************************************** 00021 * 00022 * ==================================================== [Elc:03] ======= * 00023 * ==================================================== ======== ======= */ 00024 00025 #ifndef _udisp_hpp_ 00026 #define _udisp_hpp_ 00027 //pragma ident "@(#)udisp.hpp ubit:03.05.06" 00028 #include <ubit/ustr.hpp> 00029 #include <ubit/ugroup.hpp> 00030 00033 typedef std::vector<class UFlow*> UFlowList; 00034 typedef std::vector<class UDisp*> UDispList; 00035 00036 /* ==================================================== ======== ======= */ 00041 class UDisp { 00042 public: 00043 enum Stat { 00044 CannotOpen = -1, 00045 NotOpened = 0, 00046 Opened = 1, 00047 OpenGL = 2 00048 }; 00049 00050 UDisp(int disp_id, class UAppli&, const UStr& display_name); 00051 UDisp(int disp_id, class UAppli&, class UConf&); 00063 virtual ~UDisp(); 00064 00065 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 00066 00067 int getID() const {return id;} 00069 00070 class UAppli& getAppli() const {return appli;} 00072 00073 const class UConf& getConf() const {return conf;} 00075 00076 int getStatus() const; 00082 virtual bool isRealized() const; 00084 00085 virtual void realize(); 00093 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 00094 // Windows 00095 00096 virtual void add(class UWin*); 00097 virtual void add(class UWin&); 00111 virtual void remove(UWin& child, int remove_mode); 00112 virtual void remove(UWin* child, int remove_mode); 00114 00115 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 00116 // Multiple Event Flows. 00117 00118 class UFlow* openFlow(int flow_id); 00122 void closeFlow(class UFlow*); 00124 00125 class UFlow* getFlow(int flow_id); 00130 unsigned int getFlowCount() const; 00131 const UFlowList& getFlows() const {return flowlist;} 00132 00133 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 00134 // Graphics. 00135 00136 int setTrueColors(int depth_hint); 00137 int setPseudoColors(int depth_hint); 00153 int getScreenWidth() const; 00154 int getScreenHeight() const; 00156 00157 int getDepth() const; 00159 00160 int getScreenDefaultDepth() const; 00164 int getScreenNumber() const; 00166 00167 int getScreenCount() const; 00168 //< returns the total number of Screens on this X Server. 00169 00170 const UStr& getDisplayName() const; 00172 00173 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 00174 // implementation 00175 00176 class UNatDisp* getNatDisp() const {return natdisp;} 00178 00179 void deleteNotify(class UView* deleted_view); 00180 void deleteNotify(class UGroup* deleted_group); 00182 00183 #ifndef NO_DOC 00184 00185 // will manage the events of this window if it is realized and shown 00186 void addHardwin(class UWin*); 00187 void removeHardwin(class UWin*); 00188 00189 bool realizeFont(const class UFont&); 00190 bool realizeColor(class UColor&); 00191 bool realizeCursor(class UCursor&); 00192 00193 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 00194 00195 protected: 00196 friend class UConf; 00197 friend class UWin; 00198 friend class UGraph; 00199 friend class UWinGraph; 00200 friend class UNatDisp; 00201 00202 const int id; 00203 class UAppli& appli; // corresponding UAppli 00204 class UConf& conf; // configuration data (may be shared with UAppli) 00205 UGroup winlist; // list of windows belonging to this display 00206 UChain hardwin_list; // list of hardwins that are event managed 00207 UFlowList flowlist; // list of event flows (doit etre detruit en dernier!) 00208 UStr display_name; // name of the X Display 00209 class UNatDisp* natdisp; // native Display 00210 #endif 00211 }; 00212 00213 00214 #endif 00215 /* ==================================================== [TheEnd] ======= */ 00216 /* ==================================================== [Elc:03] ======= */

Generated on Fri Aug 13 12:12:14 2004 for Ubit[Eric.Lecolinet@enst.fr] by doxygen 1.3.7