73extern char *
ctext[2];
89 cairo_surface_t * cst;
92 cst = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 80, 80);
93 tcst = cairo_create (cst);
95 cairo_set_dash (tcst, tdash ->
a, tdash ->
b, 0);
96 cairo_set_source_rgb (tcst, bcol.
red, bcol.
green, bcol.
blue);
98 cairo_set_source_rgb (tcst, dcol.
red, dcol.
green, dcol.
blue);
99 cairo_set_line_width (tcst, ti);
100 cairo_move_to (tcst, 10, 10);
101 cairo_line_to (tcst, 70, 10);
102 cairo_line_to (tcst, 70, 70);
103 cairo_line_to (tcst, 10, 70);
104 cairo_line_to (tcst, 10, 10);
107 cairo_destroy (tcst);
139 this_proj -> curves[
b][
c] ->
show_legend = gtk_check_button_get_active (leg);
141 this_proj -> curves[
b][
c] ->
show_legend = gtk_toggle_button_get_active (leg);
164 cairo_surface_t *
pix;
171 this_proj -> curves[
b][
c] -> legend_box_thickness,
172 this_proj -> curves[
b][
c] -> legend_box_color,
173 this_proj -> curves[
b][
c] -> backcolor);
176 cairo_surface_destroy (
pix);
214 this_proj -> curves[
b][
c] -> show_legend_box = gtk_check_button_get_active (bleg);
216 this_proj -> curves[
b][
c] -> show_legend_box = gtk_toggle_button_get_active (bleg);
237 g_free (this_proj -> curves[
b][
c] -> legend_font);
238 this_proj -> curves[
b][
c] -> legend_font = g_strdup_printf (
"%s", gtk_font_chooser_get_font (GTK_FONT_CHOOSER(fontb)));
283 if (
z >= 0.0 &&
z <= 1.0)
285 this_proj -> curves[
b][
c] -> legend_pos[
d] =
z;
368 GtkWidget * legend_area;
369 GtkWidget * legend_style_box;
370 GtkWidget * legend_dash_box;
371 GtkWidget * legend_thickness;
406 for ( i=0 ; i < 2 ; i++ )
427 for ( i=1 ; i <
ndash ; i++)
431 gtk_widget_set_size_request (legend_dash_box, 120, -1);
432 gtk_combo_box_set_active(GTK_COMBO_BOX(legend_dash_box), this_proj -> curves[
b][
c] -> legend_box_dash - 1);
433 g_signal_connect (G_OBJECT(legend_dash_box),
"changed", G_CALLBACK(
set_legend_box_line), data);
434 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
cbox (legend_style_box,
"Line style:"), legend_dash_box, FALSE, FALSE, 0);
438 update_entry_double (GTK_ENTRY(legend_thickness), this_proj -> curves[
b][
c] -> legend_box_thickness);
439 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
cbox (legend_style_box,
"Line width:"), legend_thickness, FALSE, FALSE, 0);
448 this_proj -> curves[
b][
c] -> legend_box_thickness,
449 this_proj -> curves[
b][
c] -> legend_box_color,
450 this_proj -> curves[
b][
c] -> backcolor);
452 cairo_surface_destroy (legend_pix);
Callback declarations for main window.
Variable declarations for the curve layout edition window.
curve_dash * selectdash(int iddash)
setup dash pointer
void update_curve(gpointer data)
update curve rendering
Variable declarations for the curve widget Functions for interactions with the curve widget.
void show_legend(cairo_t *cr, project *this_proj, int rid, int cid)
draw legend
double string_to_double(gpointer string)
convert string to double
Global variable declarations Global convenience function declarations Global data structure defin...
GtkWidget * create_entry(GCallback handler, int dim, int cdim, gboolean key_release, gpointer data)
Create a GtkEntry.
void update_entry_double(GtkEntry *entry, double doubleval)
update the content of a GtkEntry as double
GtkWidget * font_button(gchar *font, int dimx, int dimy, GCallback handler, gpointer data)
create a font selection button
const gchar * entry_get_text(GtkEntry *entry)
get the text in a GtkEntry
GtkWidget * fbox(GtkWidget *box, char *lab)
GtkWidget * check_button(gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data)
create a check button
GtkWidget * create_combo()
create a GtkCombox widget, note deprecated in GTK4
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
GtkWidget * cbox(GtkWidget *box, char *lab)
void add_box_child_start(int orientation, GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding)
Add a GtkWidget in a GtkBox at the initial position.
ColRGBA get_button_color(GtkColorChooser *colob)
get the ColRGBA color from a GtkColorChooser button
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
GtkWidget * create_image_from_data(int format, gpointer item_image)
create Gtk image for data
void combo_text_append(GtkWidget *combo, gchar *text)
append text in GtkComboBox widget
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
GtkWidget * color_button(ColRGBA col, gboolean alpha, int dimx, int dimy, GCallback handler, gpointer data)
create a color selection button
GtkWidget * bbox(GtkWidget *box, char *lab)
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
void show_the_widgets(GtkWidget *widg)
show GtkWidget
project * get_project_by_id(int p)
get project pointer using id number
void show_warning(char *warning, GtkWidget *win)
show warning
Messaging function declarations.
Function declarations for reading atomes project file Function declarations for saving atomes proje...
void set_legend_box_style(gpointer data)
update legend style widgets
G_MODULE_EXPORT void show_data_legend(GtkToggleButton *leg, gpointer data)
show / hide legend toggle callback GTK3
G_MODULE_EXPORT void set_legend_box_thickness(GtkEntry *entry, gpointer data)
set legend box thickness entry callback
G_MODULE_EXPORT void set_legend_color(GtkColorChooser *colob, gpointer data)
change legend color
G_MODULE_EXPORT void set_legend_box_color(GtkColorChooser *colob, gpointer data)
set legend color
cairo_surface_t * draw_legend_surface(int da, double ti, ColRGBA dcol, ColRGBA bcol)
draw legend preview
G_MODULE_EXPORT void set_legend_font(GtkFontButton *fontb, gpointer data)
change legend font
GtkWidget * legend_style_area
G_MODULE_EXPORT void show_data_legend_box(GtkToggleButton *bleg, gpointer data)
show / hide legend box toggle callback GTK3
G_MODULE_EXPORT void set_legend_pos(GtkEntry *entry, gpointer data)
set the legend position entry callback
GtkWidget * create_tab_3(gpointer data)
handle the creation of the 3rd tab of the curve edition dialog
GtkWidget * legend_box_style
G_MODULE_EXPORT void set_legend_box_line(GtkComboBox *fbox, gpointer data)
change the legend box line type