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

Curve context menu (mouse right click) More...

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

Go to the source code of this file.

Functions

DataLayoutcurve_default_layout (project *pid, int rid, int cid)
 prepare the default layout for a curve
 
GtkWidget * shortcuts_window (int sections, int group_by_section[sections], int groups, int shortcut_by_group[groups], gchar *section_names[sections], gchar *group_names[groups], shortcuts shortcs[])
 Create the shortcuts information window.
 
void autoscale (gpointer data)
 autoscale callback
 
CurveExtrainit_extra (tint *id)
 create extra data set
 
void add_extra (ExtraSets *sets, tint *id)
 add set to the extra set(s)
 
void remove_extra (ExtraSets *sets, CurveExtra *ctmp)
 remove data from extra set(s)
 
void curve_window_add_menu_bar (tint *data)
 add menu bar to the curve window
 
void prep_extra_rid (tint *data)
 look up extra data set(s) for curve
 
void action_to_plot (gpointer data)
 add to plot, or, remove curve from plot
 
G_MODULE_EXPORT void curve_edit_menu_action (GSimpleAction *action, GVariant *parameter, gpointer data)
 curve menu edit action callback
 
G_MODULE_EXPORT void curve_add_remove_menu_action (GSimpleAction *action, GVariant *parameter, gpointer data)
 curve menu add / remove action callback
 
G_MODULE_EXPORT void curve_menu_bar_action (GSimpleAction *action, GVariant *parameter, gpointer data)
 curve menu action callback
 
gboolean was_not_added (ExtraSets *sets, int a, int b, int c)
 test if already in the menu or not
 
GMenu * curve_section (GSimpleActionGroup *action_group, gchar *act, ExtraSets *sets, gboolean add, int edit, int a, int b, tint *data)
 create curve submenu
 
GMenu * create_curve_submenu (GSimpleActionGroup *action_group, gchar *act, tint *data, gboolean add, int edit)
 create curve add / remove submenus
 
GIcon * get_gicon_from_data (int format, const gchar *icon)
 create a new icon using data
 
GMenu * create_curve_menu (gchar *str)
 create the curve submenu
 
GMenu * edit_data_section (GSimpleActionGroup *action_group, gchar *str, tint *data)
 create the edit data submenu
 
GMenu * curve_close_section (gchar *str)
 create the close menu item
 
GMenu * curve_help_menu (gchar *str)
 create the help menu item
 
GMenu * create_data_menu (GSimpleActionGroup *action_group, int pop, gchar *str, tint *data)
 create the save data submenu
 
GMenu * curve_menu_bar (project *this_proj, GSimpleActionGroup *action_group, gchar *str, tint *data)
 create the curve window menu bar
 
GMenu * create_add_remove_section (GSimpleActionGroup *action_group, gchar *act, int num, tint *data)
 create the add / remove curve submenus
 
GMenu * autoscale_section (gchar *str)
 create autoscale menu item
 
GtkWidget * curve_popup_menu (gpointer data)
 create curve popup menu
 

Variables

int ** extrarid
 
gchar * curve_section_names [] ={ "Curve window"}
 
int curve_group_by_section [] = { 2 }
 
gchar * curve_group_names [] ={"Edition", "Export"}
 
int curve_shortcut_by_group [] = { 3, 2 }
 
shortcuts curve_shortcuts []
 

Detailed Description

Curve context menu (mouse right click)

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 m_curve.c.

Function Documentation

◆ action_to_plot()

void action_to_plot ( gpointer data)

add to plot, or, remove curve from plot

Parameters
datathe associated data pointer

Definition at line 225 of file m_curve.c.

◆ add_extra()

void add_extra ( ExtraSets * sets,
tint * id )

add set to the extra set(s)

Parameters
setsthe extra set(s)
idthe associated data pointer

Definition at line 136 of file m_curve.c.

◆ autoscale()

void autoscale ( gpointer data)

autoscale callback

Parameters
datathe associated data pointer

Definition at line 100 of file m_curve.c.

◆ autoscale_section()

GMenu * autoscale_section ( gchar * str)

create autoscale menu item

Parameters
strthe action string id

Definition at line 690 of file m_curve.c.

◆ create_add_remove_section()

GMenu * create_add_remove_section ( GSimpleActionGroup * action_group,
gchar * act,
int num,
tint * data )

create the add / remove curve submenus

Parameters
action_groupthe menu action group
actthe action string
numthe number of curve(s) to add
datathe associatec data pointer

Definition at line 643 of file m_curve.c.

◆ create_curve_menu()

GMenu * create_curve_menu ( gchar * str)

create the curve submenu

Parameters
strthe action string

Definition at line 492 of file m_curve.c.

◆ create_curve_submenu()

GMenu * create_curve_submenu ( GSimpleActionGroup * action_group,
gchar * act,
tint * data,
gboolean add,
int edit )

create curve add / remove submenus

Parameters
action_groupthe menu action group
actthe action string
datathe associated data pointer
addremove (0) or add (1) menu
editdata edition (1 / 0)

Definition at line 416 of file m_curve.c.

◆ create_data_menu()

GMenu * create_data_menu ( GSimpleActionGroup * action_group,
int pop,
gchar * str,
tint * data )

create the save data submenu

Parameters
action_groupthe menu action group
pop0 = menu bar, 1 = popup menu
strthe action string
datathe associated data pointer

Definition at line 573 of file m_curve.c.

◆ curve_add_remove_menu_action()

G_MODULE_EXPORT void curve_add_remove_menu_action ( GSimpleAction * action,
GVariant * parameter,
gpointer data )

curve menu add / remove action callback

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

Definition at line 283 of file m_curve.c.

◆ curve_close_section()

GMenu * curve_close_section ( gchar * str)

create the close menu item

Parameters
strthe action string

Definition at line 538 of file m_curve.c.

◆ curve_default_layout()

DataLayout * curve_default_layout ( project * pid,
int rid,
int cid )
extern

prepare the default layout for a curve

Parameters
pidthe project id
ridthe analysis id
cidthe curve id

Definition at line 57 of file cwidget.c.

◆ curve_edit_menu_action()

G_MODULE_EXPORT void curve_edit_menu_action ( GSimpleAction * action,
GVariant * parameter,
gpointer data )

curve menu edit action callback

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

Definition at line 269 of file m_curve.c.

◆ curve_help_menu()

GMenu * curve_help_menu ( gchar * str)

create the help menu item

Parameters
strthe action string

Definition at line 554 of file m_curve.c.

◆ curve_menu_bar()

GMenu * curve_menu_bar ( project * this_proj,
GSimpleActionGroup * action_group,
gchar * str,
tint * data )

create the curve window menu bar

Parameters
this_projthe target project
action_groupthe menu action group
strthe action string
datathe associated data pointer

Definition at line 594 of file m_curve.c.

◆ curve_menu_bar_action()

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

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_popup_menu()

GtkWidget * curve_popup_menu ( gpointer data)

create curve popup menu

Parameters
datathe associated data pointer

Definition at line 706 of file m_curve.c.

◆ curve_section()

GMenu * curve_section ( GSimpleActionGroup * action_group,
gchar * act,
ExtraSets * sets,
gboolean add,
int edit,
int a,
int b,
tint * data )

create curve submenu

Parameters
action_groupthe menu action group
actthe action string
setsthe target extra sets
addremove (0) or add (1) menu
editdata edition (1 / 0)
atarget project
btarget calculation
datathe associated data pointer

Definition at line 371 of file m_curve.c.

◆ curve_window_add_menu_bar()

void curve_window_add_menu_bar ( tint * data)

add menu bar to the curve window

Parameters
datathe associated data pointer

Definition at line 612 of file m_curve.c.

◆ edit_data_section()

GMenu * edit_data_section ( GSimpleActionGroup * action_group,
gchar * str,
tint * data )

create the edit data submenu

Parameters
action_groupthe menu action group
strthe action string
datathe associated data pointer

Definition at line 513 of file m_curve.c.

◆ get_gicon_from_data()

GIcon * get_gicon_from_data ( int format,
const gchar * icon )
extern

create a new icon using data

Parameters
formatfor the data
iconimage name or file name

Definition at line 610 of file gui.c.

◆ init_extra()

CurveExtra * init_extra ( tint * id)

create extra data set

Parameters
idthe associated data pointer

Definition at line 115 of file m_curve.c.

◆ prep_extra_rid()

void prep_extra_rid ( tint * data)

look up extra data set(s) for curve

Parameters
datathe associated data pointer

Definition at line 202 of file m_curve.c.

◆ remove_extra()

void remove_extra ( ExtraSets * sets,
CurveExtra * ctmp )

remove data from extra set(s)

Parameters
setsthe extra set(s)
ctmpthe data set to remove from the extra set(s)

Definition at line 160 of file m_curve.c.

◆ shortcuts_window()

GtkWidget * shortcuts_window ( int sections,
int group_by_section[sections],
int groups,
int shortcut_by_group[groups],
gchar * section_names[sections],
gchar * group_names[groups],
shortcuts shortcs[] )
extern

Create the shortcuts information window.

Parameters
sectionsnumber of shortcut sections
group_by_sectionnumber of group by section
groupsnumber of groups
shortcut_by_groupnumber of shortcuts by group
shortcsshortcuts information

Definition at line 181 of file gui.c.

◆ was_not_added()

gboolean was_not_added ( ExtraSets * sets,
int a,
int b,
int c )

test if already in the menu or not

Parameters
setsthe target extra sets
athe target project
bthe target calculation
cthe target curve

Definition at line 339 of file m_curve.c.

Variable Documentation

◆ curve_group_by_section

int curve_group_by_section[] = { 2 }

Definition at line 78 of file m_curve.c.

◆ curve_group_names

gchar* curve_group_names[] ={"Edition", "Export"}

Definition at line 79 of file m_curve.c.

◆ curve_section_names

gchar* curve_section_names[] ={ "Curve window"}

Definition at line 77 of file m_curve.c.

◆ curve_shortcut_by_group

int curve_shortcut_by_group[] = { 3, 2 }

Definition at line 80 of file m_curve.c.

◆ curve_shortcuts

shortcuts curve_shortcuts[]
Initial value:
= {
{ "Autoscale", "Autoscale", GDK_KEY_a, "<Ctrl>a" },
{ "Edit curve", "Edit curve", GDK_KEY_e, "<Ctrl>e" },
{ "Close curve", "Close curve", GDK_KEY_c, "<Ctrl>c" },
{ "Export data", "Export data", GDK_KEY_s, "<Ctrl>s" },
{ "Save image", "Save image", GDK_KEY_i, "<Ctrl>i" }
}

Definition at line 82 of file m_curve.c.

◆ extrarid

int** extrarid

Definition at line 74 of file m_curve.c.