Back to index

easystroke  0.5.5.1
composite.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2008, Thomas Jaeger <ThJaeger@gmail.com>
00003  *
00004  * Permission to use, copy, modify, and/or distribute this software for any
00005  * purpose with or without fee is hereby granted, provided that the above
00006  * copyright notice and this permission notice appear in all copies.
00007  *
00008  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
00009  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
00010  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00011  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00012  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
00013  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
00014  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00015  */
00016 #ifndef __COMPOSITE_H__
00017 #define __COMPOSITE_H__
00018 #include <gtkmm.h>
00019 #include "trace.h"
00020 #include "main.h"
00021 #include <list>
00022 
00023 class Popup : public Gtk::Window {
00024        bool on_expose(GdkEventExpose* event);
00025        void draw_line(Cairo::RefPtr<Cairo::Context> ctx);
00026        Gdk::Rectangle rect;
00027 public:
00028        Popup(int x1, int y1, int x2, int y2);
00029        void invalidate(int x1, int y1, int x2, int y2);
00030 };
00031 
00032 class Composite : public Trace {
00033        int num_x, num_y;
00034        Popup ***pieces;
00035        virtual void draw(Point p, Point q);
00036        virtual void start_();
00037        virtual void end_();
00038 public:
00039        Composite();
00040        virtual ~Composite();
00041 };
00042 
00043 #endif