00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef _KJS_RANGE_H_
00022
#define _KJS_RANGE_H_
00023
00024
#include "ecma/kjs_dom.h"
00025
#include "dom/dom2_range.h"
00026
00027
namespace KJS {
00028
00029
class DOMRange :
public DOMObject {
00030
public:
00031 DOMRange(ExecState *exec, DOM::Range r);
00032 ~DOMRange();
00033
virtual Value tryGet(ExecState *exec,
const Identifier &p)
const;
00034 Value getValueProperty(ExecState *exec,
int token)
const;
00035
00036
virtual const ClassInfo* classInfo()
const {
return &info; }
00037
static const ClassInfo info;
00038
enum { StartContainer, StartOffset, EndContainer, EndOffset, Collapsed,
00039 CommonAncestorContainer,
00040 SetStart, SetEnd, SetStartBefore, SetStartAfter, SetEndBefore,
00041 SetEndAfter, Collapse, SelectNode, SelectNodeContents,
00042 CompareBoundaryPoints, DeleteContents, ExtractContents,
00043 CloneContents, InsertNode, SurroundContents, CloneRange, ToString,
00044 Detach, CreateContextualFragment };
00045 DOM::Range toRange()
const {
return range; }
00046
protected:
00047 DOM::Range range;
00048 };
00049
00050
00051
class RangeConstructor :
public DOMObject {
00052
public:
00053 RangeConstructor(ExecState *);
00054
virtual Value tryGet(ExecState *exec,
const Identifier &p)
const;
00055 Value getValueProperty(ExecState *,
int token)
const;
00056
00057
virtual const ClassInfo* classInfo()
const {
return &info; }
00058
static const ClassInfo info;
00059 };
00060
00061 Value getDOMRange(ExecState *exec, DOM::Range r);
00062 Value getRangeConstructor(ExecState *exec);
00063
00067 DOM::Range toRange(
const Value&);
00068
00069 }
00070
00071
#endif