📄 gseisviewaxis.c
字号:
/* * GTKSEISVIEWGL - Library for rendering of 2D seismic data * * Copyright (C) 2006 Vladimir Bashkardin * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more av. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Vladimir Bashkardin <vovizmus@users.sourceforge.net> */#include "gseisviewaxis.h"G_DEFINE_TYPE (GSeisViewAxis, g_seis_view_axis, G_TYPE_OBJECT)static void g_seis_view_axis_attach_notify_base (GSeisViewAxis *self, GtkWidget *seis_view_gl, GSeisViewDataVisibility *data_visibility) {}static void g_seis_view_axis_detach_notify_base (GSeisViewAxis *self, GtkWidget *seis_view_gl, GSeisViewDataVisibility *data_visibility) {}static void g_seis_view_axis_data_viewport_change_base (GSeisViewAxis *self, GtkWidget *seis_view_gl, GSeisViewDataVisibility *data_visibility) {}static void g_seis_view_axis_redraw_event_base (GSeisViewAxis *self, GtkWidget *seis_view_gl, GSeisViewDataVisibility *data_visibility) {}static void g_seis_view_axis_resize_event_base (GSeisViewAxis *self, GtkWidget *seis_view_gl, GSeisViewDataVisibility *data_visibility) {}static void g_seis_view_axis_reshape_base (GSeisViewAxis *self, GtkWidget *seis_view_gl) {}enum { PROP_0, PROP_TYPE,};static void g_seis_view_axis_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GSeisViewAxis *self = G_SEIS_VIEW_AXIS (object); switch (prop_id) { case PROP_TYPE: self->type = g_value_get_enum (value); g_object_notify (object, "type"); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; }}static void g_seis_view_axis_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GSeisViewAxis *self = G_SEIS_VIEW_AXIS (object); switch (prop_id) { case PROP_TYPE: g_value_set_enum (value, self->type); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; }}static GType g_seis_view_axis_type_get_type (void) { static GType etype = 0; if (etype == 0) { static const GEnumValue values[] = { { G_SEIS_VIEW_AXIS_TOP, "G_SEIS_VIEW_AXIS_TOP", "top" }, { G_SEIS_VIEW_AXIS_BOTTOM, "G_SEIS_VIEW_AXIS_BOTTOM", "bottom" }, { G_SEIS_VIEW_AXIS_LEFT, "G_SEIS_VIEW_AXIS_LEFT", "left" }, { G_SEIS_VIEW_AXIS_RIGHT, "G_SEIS_VIEW_AXIS_RIGHT", "right" }, { 0, NULL, NULL } }; etype = g_enum_register_static ("GSeisViewAxisType", values); } return etype;}static void g_seis_view_axis_init (GSeisViewAxis *self) {#ifdef DEBUG g_print ("<GSeisViewAxis is inited>\n");#endif}static void g_seis_view_axis_finalize (GObject *object) {#ifdef DEBUG g_print ("<GSeisViewAxis is finalized>\n");#endif if (G_OBJECT_CLASS (g_seis_view_axis_parent_class)->finalize) G_OBJECT_CLASS (g_seis_view_axis_parent_class)->finalize (object);}static void g_seis_view_axis_class_init (GSeisViewAxisClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = g_seis_view_axis_finalize; gobject_class->set_property = g_seis_view_axis_set_property; gobject_class->get_property = g_seis_view_axis_get_property; klass->view_attach_notify = g_seis_view_axis_attach_notify_base; klass->view_detach_notify = g_seis_view_axis_detach_notify_base; klass->view_data_viewport_change = g_seis_view_axis_data_viewport_change_base; klass->view_redraw_event = g_seis_view_axis_redraw_event_base; klass->view_resize_event = g_seis_view_axis_resize_event_base; klass->axis_reshape = g_seis_view_axis_reshape_base; g_object_class_install_property (gobject_class, PROP_TYPE, g_param_spec_enum ("type", "Type", "Type of axis - top, bottom, left or right", g_seis_view_axis_type_get_type (), G_SEIS_VIEW_AXIS_TOP, G_PARAM_READWRITE));#ifdef DEBUG g_print ("<GSeisViewAxis class is inited>\n");#endif}void g_seis_view_axis_attach_notify (GSeisViewAxis *axis, GtkWidget *seis_view_gl, GSeisViewDataVisibility *data_visibility) { G_SEIS_VIEW_AXIS_GET_CLASS (G_OBJECT (axis))->view_attach_notify (axis, seis_view_gl, data_visibility);}void g_seis_view_axis_detach_notify (GSeisViewAxis *axis, GtkWidget *seis_view_gl, GSeisViewDataVisibility *data_visibility) { G_SEIS_VIEW_AXIS_GET_CLASS (G_OBJECT (axis))->view_detach_notify (axis, seis_view_gl, data_visibility);}void g_seis_view_axis_data_viewport_change (GSeisViewAxis *axis, GtkWidget *seis_view_gl, GSeisViewDataVisibility *data_visibility) { G_SEIS_VIEW_AXIS_GET_CLASS (G_OBJECT (axis))->view_data_viewport_change (axis, seis_view_gl, data_visibility);}void g_seis_view_axis_redraw_event (GSeisViewAxis *axis, GtkWidget *seis_view_gl, GSeisViewDataVisibility *data_visibility) { G_SEIS_VIEW_AXIS_GET_CLASS (G_OBJECT (axis))->view_redraw_event (axis, seis_view_gl, data_visibility);}void g_seis_view_axis_resize_event (GSeisViewAxis *axis, GtkWidget *seis_view_gl, GSeisViewDataVisibility *data_visibility) { G_SEIS_VIEW_AXIS_GET_CLASS (G_OBJECT (axis))->view_resize_event (axis, seis_view_gl, data_visibility);}void g_seis_view_axis_reshape (GSeisViewAxis *axis, GtkWidget *seis_view_gl) { G_SEIS_VIEW_AXIS_GET_CLASS (G_OBJECT (axis))->axis_reshape (axis, seis_view_gl);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -