Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
gltemplate.c File Reference
#include <stdbool.h>
#include <stdlib.h>
#include <math.h>
#include "gui.h"
#include "viewport.h"
#include "gltemplate.h"
#include <cgraph/exit.h>
#include <glcomp/glutils.h>
#include "glexpose.h"
#include "glmotion.h"
#include <glcomp/glcompset.h>
#include "viewportcamera.h"
#include "gui/menucallbacks.h"
#include "arcball.h"
#include "appmouse.h"
Include dependency graph for gltemplate.c:

Go to the source code of this file.

Functions

static glMouseButtonType getGlCompMouseType (int n)
 
static void realize (GtkWidget *widget, gpointer data)
 
static gboolean configure_event (GtkWidget *widget, GdkEventConfigure *event, gpointer data)
 
gboolean expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer data)
 
static gboolean button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer data)
 
static gboolean button_release_event (GtkWidget *widget, GdkEventButton *event, gpointer data)
 
static gboolean key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer data)
 
static gboolean key_release_event (GtkWidget *widget, GdkEventKey *event, gpointer data)
 
static gboolean scroll_event (GtkWidget *widget, GdkEventScroll *event, gpointer data)
 
static gboolean motion_notify_event (GtkWidget *widget, GdkEventMotion *event, gpointer data)
 
GdkGLConfig * configure_gl (void)
 
void create_window (GdkGLConfig *glconfig, GtkWidget *vbox)
 

Variables

static float begin_x = 0.0
 
static float begin_y = 0.0
 
static float dx = 0.0
 
static float dy = 0.0
 

Function Documentation

◆ button_press_event()

static gboolean button_press_event ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  data 
)
static

Definition at line 183 of file gltemplate.c.

References appmouse_left_click_down(), appmouse_middle_click_down(), appmouse_right_click_down(), begin_x, begin_y, glCompSet::common, _ViewInfo::drawing_area, expose_event(), glCompCommon::functions, _ViewInfo::g, getGlCompMouseType(), glCompCallBacks::mousedown, NULL, view, and _ViewInfo::widgets.

Referenced by create_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ button_release_event()

static gboolean button_release_event ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  data 
)
static

Definition at line 212 of file gltemplate.c.

References appmouse_left_click_up(), appmouse_middle_click_up(), appmouse_right_click_up(), _ViewInfo::arcball, glCompSet::common, _ViewInfo::drawing_area, dx, dy, expose_event(), glCompCommon::functions, getGlCompMouseType(), _ArcBall_t::isDragging, glCompCallBacks::mouseup, NULL, view, and _ViewInfo::widgets.

Referenced by create_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configure_event()

static gboolean configure_event ( GtkWidget *  widget,
GdkEventConfigure *  event,
gpointer  data 
)
static

Definition at line 95 of file gltemplate.c.

References _ViewInfo::arcball, GL_VIEWPORT_FACTOR, glcompsetUpdateBorder(), _ViewInfo::h, init_arcBall(), view, _ViewInfo::w, and _ViewInfo::widgets.

Referenced by create_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configure_gl()

GdkGLConfig * configure_gl ( void  )

Definition at line 334 of file gltemplate.c.

References graphviz_exit(), and NULL.

Referenced by mShowToolBoxSlot(), and windowedMode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_window()

void create_window ( GdkGLConfig *  glconfig,
GtkWidget *  vbox 
)

Definition at line 363 of file gltemplate.c.

References button_press_event(), button_release_event(), configure_event(), _ViewInfo::drawing_area, expose_event(), key_press_event(), key_release_event(), motion_notify_event(), NULL, realize(), scroll_event(), view, and xml.

Referenced by windowedMode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ expose_event()

gboolean expose_event ( GtkWidget *  widget,
GdkEventExpose *  event,
gpointer  data 
)

Definition at line 147 of file gltemplate.c.

References _ViewInfo::activeGraph, add_graph_to_viewport_from_file(), close_graph(), glexpose_main(), _ViewInfo::initFile, _ViewInfo::initFileName, and view.

Referenced by button_press_event(), button_release_event(), create_window(), gl_main_expose(), glexpose(), and refreshViewport().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGlCompMouseType()

static glMouseButtonType getGlCompMouseType ( int  n)
static

Definition at line 33 of file gltemplate.c.

References glMouseLeftButton, glMouseMiddleButton, and glMouseRightButton.

Referenced by button_press_event(), and button_release_event().

Here is the caller graph for this function:

◆ key_press_event()

static gboolean key_press_event ( GtkWidget *  widget,
GdkEventKey *  event,
gpointer  data 
)
static

Definition at line 236 of file gltemplate.c.

References appmouse_key_press(), and view.

Referenced by create_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ key_release_event()

static gboolean key_release_event ( GtkWidget *  widget,
GdkEventKey *  event,
gpointer  data 
)
static

Definition at line 244 of file gltemplate.c.

References appmouse_key_release(), and view.

Referenced by create_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ motion_notify_event()

static gboolean motion_notify_event ( GtkWidget *  widget,
GdkEventMotion *  event,
gpointer  data 
)
static

Definition at line 283 of file gltemplate.c.

References appmouse_left_drag(), appmouse_middle_drag(), appmouse_move(), appmouse_right_drag(), begin_x, begin_y, glCompPoly::cnt, glCompSet::common, glCompMouse::down, glCompMouse::dragX, glCompMouse::dragY, dx, dy, glCompCommon::functions, glMouseLeftButton, glMouseMiddleButton, glMouseRightButton, _ViewInfo::mouse, glCompCallBacks::mouseover, topview::sel, _selection::selPoly, glCompMouse::t, _ViewInfo::Topview, view, and _ViewInfo::widgets.

Referenced by create_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ realize()

static void realize ( GtkWidget *  widget,
gpointer  data 
)
static

Definition at line 53 of file gltemplate.c.

References glCompColor::A, glCompColor::B, _ViewInfo::bgColor, glCompColor::G, glCompColor::R, and view.

Referenced by create_window().

Here is the caller graph for this function:

◆ scroll_event()

static gboolean scroll_event ( GtkWidget *  widget,
GdkEventScroll *  event,
gpointer  data 
)
static

Definition at line 256 of file gltemplate.c.

References glCompMouse::dragX, glexpose(), glmotion_zoom(), _ViewInfo::mouse, NULL, _ViewInfo::timer2, and view.

Referenced by create_window().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ begin_x

float begin_x = 0.0
static

Definition at line 27 of file gltemplate.c.

Referenced by button_press_event(), and motion_notify_event().

◆ begin_y

float begin_y = 0.0
static

Definition at line 28 of file gltemplate.c.

Referenced by button_press_event(), and motion_notify_event().

◆ dx

float dx = 0.0
static

Definition at line 29 of file gltemplate.c.

Referenced by button_release_event(), and motion_notify_event().

◆ dy

float dy = 0.0
static

Definition at line 30 of file gltemplate.c.

Referenced by button_release_event(), and motion_notify_event().