Commit 2a938af5 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

Add setParent() and setOpen() to AnnotPopup

parent 0af54643
......@@ -1324,6 +1324,25 @@ void AnnotPopup::initialize(XRef *xrefA, Dict *dict, Catalog *catalog) {
obj1.free();
}
void AnnotPopup::setParent(Object *parentA) {
parentA->copy(&parent);
update ("Parent", &parent);
}
void AnnotPopup::setParent(Annot *parentA) {
Ref parentRef = parentA->getRef();
parent.initRef(parentRef.num, parentRef.gen);
update ("Parent", &parent);
}
void AnnotPopup::setOpen(GBool openA) {
Object obj1;
open = openA;
obj1.initBool(open);
update ("Open", &obj1);
}
//------------------------------------------------------------------------
// AnnotMarkup
//------------------------------------------------------------------------
......
......@@ -586,7 +586,11 @@ public:
~AnnotPopup();
Object *getParent(Object *obj) { return parent.fetch (xref, obj); }
Object *getParentNF(Object *obj) { return &parent; }
void setParent(Object *parentA);
void setParent(Annot *parentA);
GBool getOpen() const { return open; }
void setOpen(GBool openA);
protected:
void initialize(XRef *xrefA, Dict *dict, Catalog *catalog);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment