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

Functions to create the 'atomic labels' tab of the atom(s) / clone(s) advanced configuration window
Functions to create the measure labels window of the 'Measures' window. More...

#include "global.h"
#include "interface.h"
#include "glview.h"
#include "glwindow.h"
+ Include dependency graph for w_labels.c:

Go to the source code of this file.

Macros

#define LABEL_FORMATS   4
 

Functions

G_MODULE_EXPORT void set_measure_style (GtkComboBox *box, gpointer data)
 change measure style
 
G_MODULE_EXPORT void set_labels_format (GtkComboBox *box, gpointer data)
 change label(s) format
 
G_MODULE_EXPORT void set_labels_render (GtkComboBox *box, gpointer data)
 change label(s) rendering mode
 
void init_labels_colors (image *img, int sp, int id)
 initialize atomic labels colors
 
G_MODULE_EXPORT void use_atom_default_colors (GtkToggleButton *but, gpointer data)
 use default atom colors - toggle callback GTK3
 
G_MODULE_EXPORT void set_labels_font (GtkFontButton *fontb, gpointer data)
 change label(s) font
 
G_MODULE_EXPORT void set_label_color (GtkColorChooser *colob, gpointer data)
 change label(s) color
 
G_MODULE_EXPORT void set_labels_position (GtkComboBox *box, gpointer data)
 change label(s) position
 
void label_shift_has_changed (gpointer data, double value)
 change label(s) shift
 
G_MODULE_EXPORT gboolean scroll_set_label_shift (GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data)
 change label(s) shift - scroll callback
 
G_MODULE_EXPORT void set_label_shift (GtkRange *range, gpointer data)
 change label(s) shift - range callback
 
G_MODULE_EXPORT void set_labels_scale (GtkToggleButton *but, gpointer data)
 change label(s) scale - toggle callback GTK3
 
G_MODULE_EXPORT void set_labels_tilt (GtkComboBox *box, gpointer data)
 change label(s) tilt
 
void mesure_factor_has_changed (gpointer data, double value)
 change measure scale factor
 
G_MODULE_EXPORT gboolean scroll_set_measure_factor (GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data)
 change measure scall factor - scroll callback
 
G_MODULE_EXPORT void set_measure_factor (GtkRange *range, gpointer data)
 change measure scall factor - range callback
 
void measure_width_has_changed (gpointer data, double value)
 change measure width
 
G_MODULE_EXPORT gboolean scroll_set_measure_width (GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data)
 change measure width - scroll callback
 
G_MODULE_EXPORT void set_measure_width (GtkRange *range, gpointer data)
 change measure width - range callback
 
G_MODULE_EXPORT void enable_lines (GtkToggleButton *but, gpointer data)
 toggle enable measure lines callback GTK3
 
GtkWidget * labels_tab (glwin *view, int lid)
 create atomic label(s) tab for the atom(s) / clone(s) window
 

Variables

gchar * lab_formats [LABEL_FORMATS] = {"Element name", "Atomic symbol", "Atomic symbol + ID number", "ID number"}
 
GtkWidget * atom_color_box
 
GtkWidget ** color_title
 
GtkWidget * tilt
 
GtkWidget * line_box
 
GtkWidget * lstyle
 

Detailed Description

Functions to create the 'atomic labels' tab of the atom(s) / clone(s) advanced configuration window
Functions to create the measure labels window of the 'Measures' 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_labels.c.

Macro Definition Documentation

◆ LABEL_FORMATS

#define LABEL_FORMATS   4

Definition at line 70 of file w_labels.c.

Function Documentation

◆ enable_lines()

G_MODULE_EXPORT void enable_lines ( GtkToggleButton * but,
gpointer data )

toggle enable measure lines callback GTK3

Parameters
butthe GtkToggleButton sending the signal
datathe associated data pointer

Definition at line 504 of file w_labels.c.

◆ init_labels_colors()

void init_labels_colors ( image * img,
int sp,
int id )

initialize atomic labels colors

Parameters
imgthe target image
spthe total number of chemical species
idatom(s) 0 or clone(s) 1

Definition at line 159 of file w_labels.c.

◆ label_shift_has_changed()

void label_shift_has_changed ( gpointer data,
double value )

change label(s) shift

Parameters
datathe associated data pointer
valuethe new label(s) shift

Definition at line 297 of file w_labels.c.

◆ labels_tab()

GtkWidget * labels_tab ( glwin * view,
int lid )

create atomic label(s) tab for the atom(s) / clone(s) window

Parameters
viewthe target glwin
lidlabel type (0 = atoms, 1 = clones, 3 = analysis measures, 4 = edition mode measures)

Definition at line 537 of file w_labels.c.

◆ measure_width_has_changed()

void measure_width_has_changed ( gpointer data,
double value )

change measure width

Parameters
datathe associated data pointer
valuethe new width value

Definition at line 444 of file w_labels.c.

◆ mesure_factor_has_changed()

void mesure_factor_has_changed ( gpointer data,
double value )

change measure scale factor

Parameters
datathe associated data pointer
valuethe new scale factor

Definition at line 398 of file w_labels.c.

◆ scroll_set_label_shift()

G_MODULE_EXPORT gboolean scroll_set_label_shift ( GtkRange * range,
GtkScrollType scroll,
gdouble value,
gpointer data )

change label(s) shift - scroll callback

Parameters
rangethe GtkRange sending the signal
scrollthe associated scroll type
valuethe range value
datathe associated data pointer

Definition at line 318 of file w_labels.c.

◆ scroll_set_measure_factor()

G_MODULE_EXPORT gboolean scroll_set_measure_factor ( GtkRange * range,
GtkScrollType scroll,
gdouble value,
gpointer data )

change measure scall factor - scroll callback

Parameters
rangethe GtkRange sending the signal
scrollthe associated scroll type
valuethe range value
datathe associated data pointer

Definition at line 417 of file w_labels.c.

◆ scroll_set_measure_width()

G_MODULE_EXPORT gboolean scroll_set_measure_width ( GtkRange * range,
GtkScrollType scroll,
gdouble value,
gpointer data )

change measure width - scroll callback

Parameters
rangethe GtkRange sending the signal
scrollthe associated scroll type
valuethe range value
datathe associated data pointer

Definition at line 463 of file w_labels.c.

◆ set_label_color()

G_MODULE_EXPORT void set_label_color ( GtkColorChooser * colob,
gpointer data )

change label(s) color

Parameters
colobthe GtkColorChooser sending the signal
datathe associated data pointer

Definition at line 261 of file w_labels.c.

◆ set_label_shift()

G_MODULE_EXPORT void set_label_shift ( GtkRange * range,
gpointer data )

change label(s) shift - range callback

Parameters
rangethe GtkRange sending the signal
datathe associated data pointer

Definition at line 332 of file w_labels.c.

◆ set_labels_font()

G_MODULE_EXPORT void set_labels_font ( GtkFontButton * fontb,
gpointer data )

change label(s) font

Parameters
fontbthe GtkFontButton sending the signal
datathe associated data pointer

Definition at line 232 of file w_labels.c.

◆ set_labels_format()

G_MODULE_EXPORT void set_labels_format ( GtkComboBox * box,
gpointer data )

change label(s) format

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 103 of file w_labels.c.

◆ set_labels_position()

G_MODULE_EXPORT void set_labels_position ( GtkComboBox * box,
gpointer data )

change label(s) position

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 279 of file w_labels.c.

◆ set_labels_render()

G_MODULE_EXPORT void set_labels_render ( GtkComboBox * box,
gpointer data )

change label(s) rendering mode

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 125 of file w_labels.c.

◆ set_labels_scale()

G_MODULE_EXPORT void set_labels_scale ( GtkToggleButton * but,
gpointer data )

change label(s) scale - toggle callback GTK3

Parameters
butthe GtkToggleButton sending the signal
datathe associated data pointer

Definition at line 356 of file w_labels.c.

◆ set_labels_tilt()

G_MODULE_EXPORT void set_labels_tilt ( GtkComboBox * box,
gpointer data )

change label(s) tilt

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 380 of file w_labels.c.

◆ set_measure_factor()

G_MODULE_EXPORT void set_measure_factor ( GtkRange * range,
gpointer data )

change measure scall factor - range callback

Parameters
rangethe GtkRange sending the signal
datathe associated data pointer

Definition at line 431 of file w_labels.c.

◆ set_measure_style()

G_MODULE_EXPORT void set_measure_style ( GtkComboBox * box,
gpointer data )

change measure style

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 86 of file w_labels.c.

◆ set_measure_width()

G_MODULE_EXPORT void set_measure_width ( GtkRange * range,
gpointer data )

change measure width - range callback

Parameters
rangethe GtkRange sending the signal
datathe associated data pointer

Definition at line 477 of file w_labels.c.

◆ use_atom_default_colors()

G_MODULE_EXPORT void use_atom_default_colors ( GtkToggleButton * but,
gpointer data )

use default atom colors - toggle callback GTK3

Parameters
butthe GtkToggleButton sending the signal
datathe associated data pointer

Definition at line 192 of file w_labels.c.

Variable Documentation

◆ atom_color_box

GtkWidget* atom_color_box

Definition at line 74 of file w_labels.c.

◆ color_title

GtkWidget** color_title

Definition at line 75 of file w_labels.c.

◆ lab_formats

gchar* lab_formats[LABEL_FORMATS] = {"Element name", "Atomic symbol", "Atomic symbol + ID number", "ID number"}

Definition at line 72 of file w_labels.c.

◆ line_box

GtkWidget* line_box

Definition at line 482 of file w_labels.c.

◆ lstyle

GtkWidget* lstyle

Definition at line 483 of file w_labels.c.

◆ tilt

GtkWidget* tilt

Definition at line 76 of file w_labels.c.