ucond.hpp
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 _ucond_hpp_
00026
#define _ucond_hpp_
00027
00028
00029
00030
00037 class UCond {
00038
public:
00039
virtual bool verifies(
const UContext*,
const class UCtrl*)
const = 0;
00040
virtual void setParentModes(UCtrl *parent)
const {};
00041 };
00042
00043
00044
00045
class UNotCond :
public UCond {
00046
public:
00047 UNotCond(
const UCond&);
00048
virtual bool verifies(
const UContext*,
const class UCtrl*)
const;
00049
00050
private:
00051
const UCond& cond;
00052 };
00053
00054
00055
00056
00064 class UOn :
public UCond {
00065
public:
00066
00067
static UOn
00071
idle,
00072
00080
action,
00081
00091
arm,
disarm,
00092
00100
enter,
leave,
00101
mpress,
00102
mrelease,
00103
mdrag,
mmove,
mrelax,
00104
00115
mclick,
mbiclick,
mtriclick,
mquadclick,
00116
00123
ktype,
kpress,
krelease,
00124
00136
select,
unselect,
00137
00145
change,
00146
00156
propChange,
elemChange,
strChange,
00157
00165
add,
remove,
00166
00170
destruct,
00171
00175
close,
00176
00179
dragStart,
dragDone,
dropEnter,
dropLeave,
dropDone,
00180
00186
viewPaint,
viewResize,
viewMove,
00187
00214
preChildEvent,
00215
00220
00221
00222
00228
umessage,
00229
notifyEvent,
00230
rawEvent;
00231
00232
00233
00234
00235
enum ISTATE {
00236 ANY = -1,
00237 IDLE = 0,
00238 DISABLED, ENTERED, ARMED, ACTIONED, DRAGGED, DROP_ENTERED,
00239 ACTION_COUNT
00240
00241 };
00242
00243
UOn(u_state istate, u_modes bmodes, u_modes cmodes);
00244
00245
00246
virtual bool verifies(
const UContext*,
const class UCtrl*)
const;
00247
virtual void setParentModes(UCtrl *parent)
const;
00248
00249
private:
00250
friend class UCtrl;
00251
friend class UGroup;
00252 u_modes bmodes, cmodes;
00253 u_state istate;
00254 };
00255
00256
00257
00258
00266 class UFlag :
public UCond {
00267
public:
00268
static const UFlag none;
00269
00270
UFlag(
const char* name = null);
00271 friend UFlag&
uflag(
const char* name = null) {
return *
new UFlag(name);}
00273
00274
UCond& operator!() const;
00275
00276 const
char* getName()
const {
return name;}
00277
virtual bool verifies(
const UContext*,
const class UCtrl*)
const;
00278
00279
protected:
00280
const char *name;
00281
mutable class UNotCond* not_cond;
00282 };
00283
00284
00285
00286
00294 class USrange :
public UCond {
00295
public:
00296
USrange(
int,
int);
00297
friend USrange&
usrange(
int scale_min,
int scale_max);
00299
00300
int getMin()
const {
return scale_min;}
00301
int getMax()
const {
return scale_max;}
00302
00303
virtual bool verifies(
const UContext*,
const class UCtrl*)
const;
00304
00305
private:
00306
int scale_min, scale_max;
00307 };
00308
00309
00310
00311
#endif
00312
Generated on Tue Jul 27 18:01:55 2004 for Ubit[Eric.Lecolinet@enst.fr] by
1.3.7