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 _utextsel_hpp_
00026
#define _utextsel_hpp_
00027
00028
00029
00030
class UTextsel {
00031
public:
00032 UTextsel(
const UColor* color,
const UColor* bgcolor,
const UFont* font,
00033
bool recursive_selection);
00034
00035
virtual UStr copyText() const;
00036 virtual
void copyText(
UStr&) const;
00041 virtual
void reset(
bool update);
00042
00043 protected:
00044 virtual
void copyText(
UStr&,
bool recursive) const;
00045 virtual
void start(class
UEvent&);
00046 virtual
void extend(class UEvent&);
00047 virtual
bool complete(class UEvent&);
00048
00049
bool beingSelected()
const {
return being_selected;}
00050
const UGroup* getObj()
const {
return inObj;}
00051
void setObj(
UGroup*_obj) {inObj = _obj;}
00052
00053
private:
00054
friend class UStr;
00055
friend class UFlow;
00056
00057
bool being_selected;
00058
bool recursiveSelection;
00059
UGroup *inObj;
00060
00061 ULink *fromLink, *toLink, *pressLink, *oldLink;
00062
int fromPos, toPos, pressPos, oldPos;
00063
const class UColor *color;
00064
const class UColor *bgcolor;
00065
const class UFont *font;
00066
00067
virtual void update(ULink *new_link2,
int new_pos2);
00068
virtual void paint(
int refreshFromPos,
int refreshToPos,
bool recursive);
00069
virtual void paintImpl(
UGroup* obj,
bool state,
00070
int refreshFromPos,
int refreshToPos,
bool recursive);
00071 };
00072
00073
00074
#endif
00075
00076