00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#ifndef _udisp_hpp_
00026
#define _udisp_hpp_
00027
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
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
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
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
00169
00170 const
UStr& getDisplayName() const;
00172
00173
00174
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
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;
00204
class UConf& conf;
00205
UGroup winlist;
00206 UChain hardwin_list;
00207 UFlowList flowlist;
00208
UStr display_name;
00209
class UNatDisp* natdisp;
00210
#endif
00211
};
00212
00213
00214
#endif
00215
00216