Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/dvi/view.hh
diff options
context:
space:
mode:
authorSøren Sandmann <sandmann@redhat.com>2004-12-21 23:57:26 (GMT)
committer Søren Sandmann Pedersen <ssp@src.gnome.org>2004-12-21 23:57:26 (GMT)
commit4296951e94a43c723e9522b588cab178eb66d144 (patch)
tree63ba229741d10df67fe87f24b6241903e16e9764 /dvi/view.hh
parent3e73e947a3a8c03da8f35f52e2a42ba066e2be2a (diff)
New directory with the beginning of a .dvi backend.
Tue Dec 21 18:55:06 2004 Søren Sandmann <sandmann@redhat.com> * dvi/*: New directory with the beginning of a .dvi backend.
Diffstat (limited to 'dvi/view.hh')
-rwxr-xr-xdvi/view.hh37
1 files changed, 37 insertions, 0 deletions
diff --git a/dvi/view.hh b/dvi/view.hh
new file mode 100755
index 0000000..bdab6df
--- /dev/null
+++ b/dvi/view.hh
@@ -0,0 +1,37 @@
+// notes:
+/*
+ * hold en gdkpixbuf ved lige, og tegn den p en gtkdrawingarea
+ * ved passende lejligheder
+ */
+
+#include "model.hh"
+#include <gtk/gtk.h>
+#include "painter.hh"
+
+enum {
+ BASE_DPI = 300,
+ PAPER_WIDTH = 7, // inches
+ PAPER_HEIGHT = 17 // inches
+};
+
+class View : public Observer {
+private:
+ Model *model;
+ GtkWidget *drawing_area;
+ GdkPixmap *pixmap;
+public:
+ View (Model *model_arg);
+
+ GtkWidget *get_widget (void) { return drawing_area; }
+
+ void create_pixmap (void);
+ void expose (GdkEventExpose *event);
+ void notify (void) const;
+ void redraw (void) const;
+};
+
+void on_da_realize (GtkDrawingArea *da,
+ View *v);
+int on_da_expose (GtkWidget *widget,
+ GdkEventExpose *event,
+ View *v);