• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ap_UnixTopRuler.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 #ifndef AP_UNIXTOPRULER_H
00021 #define AP_UNIXTOPRULER_H
00022 
00023 // Class for dealing with the horizontal ruler at the top of
00024 // a document window.
00025 
00026 /*****************************************************************/
00027 
00028 #include <gtk/gtk.h>
00029 #include <gdk/gdk.h>
00030 #include "ut_types.h"
00031 #include "ap_TopRuler.h"
00032 #include "xap_UnixCustomWidget.h"
00033 
00034 class XAP_Frame;
00035 
00036 /*****************************************************************/
00037 
00038 class AP_UnixTopRuler : public AP_TopRuler, public XAP_UnixCustomWidget
00039 {
00040 public:
00041     AP_UnixTopRuler(XAP_Frame * pFrame);
00042     virtual ~AP_UnixTopRuler(void);
00043 
00044     GtkWidget *     createWidget(void);
00045     virtual void    setView(AV_View * pView);
00046 
00047     // cheats for the callbacks
00048     void                getWidgetPosition(gint * x, gint * y);
00049     GtkWidget *         getWidget(void) { return m_wTopRuler; };
00050     GdkWindow *     getRootWindow(void);
00051 
00052     void _ruler_style_context_changed (void);
00053 
00054 protected:
00055     GtkWidget *         m_wTopRuler;
00056     GdkWindow * m_rootWindow;
00057     gulong          m_iStyleID;
00058     class _fe
00059     {
00060     public:
00061         static void realize(AP_UnixTopRuler *self);
00062         static void unrealize(AP_UnixTopRuler *self);
00063         static gint button_press_event(GtkWidget * w, GdkEventButton * e);
00064         static gint button_release_event(GtkWidget * w, GdkEventButton * e);
00065         static gint configure_event(GtkWidget* w, GdkEventConfigure *e);
00066         static gint motion_notify_event(GtkWidget* w, GdkEventMotion* e);
00067         static gint key_press_event(GtkWidget* w, GdkEventKey* e);
00068         static gint delete_event(GtkWidget * w, GdkEvent * /*event*/, gpointer /*data*/);
00069         static void destroy (GtkWidget * /*widget*/, gpointer /*data*/);
00070     };
00071 
00072 };
00073 
00074 #endif /* AP_UNIXTOPRULER_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1