atomes 1.1.16
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
w_curve.c File Reference

Functions to create the graph/curve window. More...

#include <stdlib.h>
#include <math.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <cairo.h>
#include "global.h"
#include "callbacks.h"
#include "curve.h"
#include "cedit.h"
#include "datab.h"
+ Include dependency graph for w_curve.c:

Go to the source code of this file.

Functions

void autoscale (gpointer data)
 autoscale callback
 
void curve_menu_bar_action (GSimpleAction *action, GVariant *parameter, gpointer data)
 curve menu action callback
 
void curve_zoom_in_out (gboolean state, gdouble event_x, gdouble event_y, gpointer data)
 curve zoom in or out
 
void curve_button_event (GdkEvent *event, double event_x, double event_y, guint event_button, guint event_type, guint32 event_time, gpointer data)
 handle mouse button event on the curve window GTK3
 
G_MODULE_EXPORT gboolean on_curve_button_event (GtkWidget *widget, GdkEvent *event, gpointer data)
 mouse button event on the curve window
 
void curve_key_pressed (guint keyval, GdkModifierType state, gpointer data)
 the keyboard shortcut actions for the curve window
 
G_MODULE_EXPORT gboolean on_curve_key_pressed (GtkEventControllerKey *self, guint keyval, guint keycode, GdkModifierType state, gpointer data)
 keyboard key press event for the curve window GTK4
 
int get_curve_shift (project *this_proj, int b, int c)
 get cruve window size shift
 
G_MODULE_EXPORT void on_curve_realize (GtkWidget *widg, gpointer data)
 curve window realize callback
 
GtkWidget * create_curve (tint *data)
 create the curve data plot window
 

Variables

int curve_action_id = -1
 
int activeg = 0
 
int activec = 0
 
int activer = 0
 

Detailed Description

Functions to create the graph/curve window.

Author
Sébastien Le Roux sebas.nosp@m.tien.nosp@m..lero.nosp@m.ux@i.nosp@m.pcms..nosp@m.unis.nosp@m.tra.f.nosp@m.r

Definition in file w_curve.c.

Function Documentation

◆ autoscale()

void autoscale ( gpointer data)
extern

autoscale callback

Parameters
datathe associated data pointer

Definition at line 100 of file m_curve.c.

◆ create_curve()

GtkWidget * create_curve ( tint * data)

create the curve data plot window

Parameters
datathe associated data pointer

Definition at line 605 of file w_curve.c.

◆ curve_button_event()

void curve_button_event ( GdkEvent * event,
double event_x,
double event_y,
guint event_button,
guint event_type,
guint32 event_time,
gpointer data )

handle mouse button event on the curve window GTK3

Parameters
eventthe GdkEvent triggering the signal
event_xx position
event_yy position
event_buttonevent button
event_typeevent type
event_timeevent time
datathe associated data pointer

Definition at line 333 of file w_curve.c.

◆ curve_key_pressed()

void curve_key_pressed ( guint keyval,
GdkModifierType state,
gpointer data )

the keyboard shortcut actions for the curve window

Parameters
keyvalthe key pressed
statethe keyboard modifier
datathe associated data pointer

Definition at line 503 of file w_curve.c.

◆ curve_menu_bar_action()

void curve_menu_bar_action ( GSimpleAction * action,
GVariant * parameter,
gpointer data )
extern

curve menu action callback

Parameters
actionthe GAction sending the signal
parameterGVariant parameter of the GAction, if any
datathe associated data pointer

Definition at line 297 of file m_curve.c.

◆ curve_zoom_in_out()

void curve_zoom_in_out ( gboolean state,
gdouble event_x,
gdouble event_y,
gpointer data )

curve zoom in or out

Parameters
statemouse button state (pressed or released)
event_xx position
event_yy position
datathe associated data pointer

Definition at line 102 of file w_curve.c.

◆ get_curve_shift()

int get_curve_shift ( project * this_proj,
int b,
int c )

get cruve window size shift

Parameters
this_projthe target project
bthe calculation id
cthe curve id

Definition at line 576 of file w_curve.c.

◆ on_curve_button_event()

G_MODULE_EXPORT gboolean on_curve_button_event ( GtkWidget * widget,
GdkEvent * event,
gpointer data )

mouse button event on the curve window

Parameters
widgetthe GtkWidget sending the signal
eventthe GdkEvent triggering the signal
datathe associated data pointer

Definition at line 486 of file w_curve.c.

◆ on_curve_key_pressed()

G_MODULE_EXPORT gboolean on_curve_key_pressed ( GtkEventControllerKey * self,
guint keyval,
guint keycode,
GdkModifierType state,
gpointer data )

keyboard key press event for the curve window GTK4

Parameters
selfthe GtkEventControllerKey sending the signal
keyvalnumber of times it was pressed
keycodethe key pressed
statethe keyboard modifier
datathe associated data pointer

Definition at line 560 of file w_curve.c.

◆ on_curve_realize()

G_MODULE_EXPORT void on_curve_realize ( GtkWidget * widg,
gpointer data )

curve window realize callback

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 589 of file w_curve.c.

Variable Documentation

◆ activec

int activec = 0

Definition at line 73 of file w_curve.c.

◆ activeg

int activeg = 0

Definition at line 72 of file w_curve.c.

◆ activer

int activer = 0

Definition at line 74 of file w_curve.c.

◆ curve_action_id

int curve_action_id = -1

Definition at line 71 of file w_curve.c.