summaryrefslogtreecommitdiff
path: root/noncore/unsupported/qpdf/xpdf/FormWidget.h
authorsandman <sandman>2002-04-13 00:47:20 (UTC)
committer sandman <sandman>2002-04-13 00:47:20 (UTC)
commit98a1e3f36567639344f12932b629e526a8783aa8 (patch) (side-by-side diff)
tree0433d296857faceeafc54f7deabddb621f45a933 /noncore/unsupported/qpdf/xpdf/FormWidget.h
parent7e31b1fba119f69929d6744d7295555ff1727f4f (diff)
downloadopie-98a1e3f36567639344f12932b629e526a8783aa8.zip
opie-98a1e3f36567639344f12932b629e526a8783aa8.tar.gz
opie-98a1e3f36567639344f12932b629e526a8783aa8.tar.bz2
CVS import of QPdf
Diffstat (limited to 'noncore/unsupported/qpdf/xpdf/FormWidget.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/qpdf/xpdf/FormWidget.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/noncore/unsupported/qpdf/xpdf/FormWidget.h b/noncore/unsupported/qpdf/xpdf/FormWidget.h
new file mode 100644
index 0000000..7f07889
--- a/dev/null
+++ b/noncore/unsupported/qpdf/xpdf/FormWidget.h
@@ -0,0 +1,67 @@
+//========================================================================
+//
+// FormWidget.h
+//
+// Copyright 2000 Derek B. Noonburg
+//
+//========================================================================
+
+#ifndef FORMWIDGET_H
+#define FORMWIDGET_H
+
+#ifdef __GNUC__
+#pragma interface
+#endif
+
+class XRef;
+class Gfx;
+
+//------------------------------------------------------------------------
+// FormWidget
+//------------------------------------------------------------------------
+
+class FormWidget {
+public:
+
+ FormWidget(XRef *xrefA, Dict *dict);
+ ~FormWidget();
+ GBool isOk() { return ok; }
+
+ void draw(Gfx *gfx);
+
+ // Get appearance object.
+ Object *getAppearance(Object *obj) { return appearance.fetch(xref, obj); }
+
+private:
+
+ XRef *xref; // the xref table for this PDF file
+ Object appearance; // a reference to the Form XObject stream
+ // for the normal appearance
+ fouble xMin, yMin, // widget rectangle
+ xMax, yMax;
+ GBool ok;
+};
+
+//------------------------------------------------------------------------
+// FormWidgets
+//------------------------------------------------------------------------
+
+class FormWidgets {
+public:
+
+ // Extract widgets from array of annotations.
+ FormWidgets(XRef *xref, Object *annots);
+
+ ~FormWidgets();
+
+ // Iterate through list of widgets.
+ int getNumWidgets() { return nWidgets; }
+ FormWidget *getWidget(int i) { return widgets[i]; }
+
+private:
+
+ FormWidget **widgets;
+ int nWidgets;
+};
+
+#endif