26 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
42 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
49 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
62 if ((!buf) || (strcmp(buf,
"") == 0))
69 color.red = (uint16_t)(cl.
u.
RGBA[0] * 65535.0);
70 color.green = (uint16_t)(cl.
u.
RGBA[1] * 65535.0);
71 color.blue = (uint16_t)(cl.
u.
RGBA[2] * 65535.0);
72 gtk_color_button_set_color((GtkColorButton *)
73 glade_xml_get_widget(
xml, widget_name),
86 gtk_color_button_get_color((GtkColorButton *)
87 glade_xml_get_widget(
xml, widget_name),
89 snprintf(buf,
sizeof(buf),
"#%02x%02x%02x",
90 (
int) ((
float)
color.red / 65535.0 * 255.0),
91 (
int) ((
float)
color.green / 65535.0 * 255.0),
92 (
int) ((
float)
color.blue / 65535.0 * 255.0));
99 if (strlen(attrib) > 512)
101 agattr(g,
AGRAPH, attrib, gtk_entry_get_text((GtkEntry*)
102 glade_xml_get_widget(
xml, widget_name)));
109 if ((!buf) || (strcmp(buf,
"") == 0))
116 gtk_entry_set_text((GtkEntry *)
117 glade_xml_get_widget(
xml, widget_name), buf);
126 if ((!buf) || (strcmp(buf,
"") == 0))
135 gtk_toggle_button_set_active((GtkToggleButton *)
136 glade_xml_get_widget(
xml,
148 value = (int) gtk_toggle_button_get_active((GtkToggleButton *)
149 glade_xml_get_widget(
xml,
151 snprintf(buf,
sizeof(buf),
"%d", value);
160 if ((!buf) || (strcmp(buf,
"") == 0))
166 value = (float) atof(buf);
167 gtk_spin_button_set_value((GtkSpinButton *)
168 glade_xml_get_widget(
xml, widget_name),
179 value = (float) gtk_spin_button_get_value((GtkSpinButton *)
180 glade_xml_get_widget(
xml,
182 snprintf(buf,
sizeof(buf),
"%f", value);
191 value = (float) gtk_range_get_value((GtkRange *)
192 glade_xml_get_widget(
xml,
194 snprintf(buf,
sizeof(buf),
"%f", value);
203 if ((!buf) || (strcmp(buf,
"") == 0))
210 value = (float) atof(buf);
211 gtk_range_set_value((GtkRange *)
212 glade_xml_get_widget(
xml, widget_name), value);
220 if ((!buf) || (strcmp(buf,
"") == 0))
227 gtk_combo_box_set_active((GtkComboBox *)
228 glade_xml_get_widget(
xml, widget_name), value);
239 gtk_combo_box_get_active((GtkComboBox *)
240 glade_xml_get_widget(
xml, widget_name));
242 snprintf(buf,
sizeof(buf),
"%d", value);
251 sym->
name + strlen(
"color_button="),
267 sym->
name + strlen(
"scale_button="),
277 sym->
name + strlen(
"color_button="),
281 sym->
name + strlen(
"check_box="),
285 sym->
name + strlen(
"text_box="),
289 sym->
name + strlen(
"combobox="),
293 sym->
name + strlen(
"spin_button="),
297 sym->
name + strlen(
"scale_button="),
306 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
307 gtk_widget_show(glade_xml_get_widget(
xml,
"dlgSettings"));
308 gtk_window_set_keep_above((GtkWindow *)
309 glade_xml_get_widget(
xml,
"dlgSettings"),
312 void *dlg = gtk_message_dialog_new(
NULL,
314 GTK_MESSAGE_QUESTION,
318 gtk_widget_hide(dlg);
void colorxlate(char *str, agxbuf *buf)
Agsym_t * agattr(Agraph_t *g, int kind, char *name, const char *value)
creates or looks up attributes of a graph
Agsym_t * agnxtattr(Agraph_t *g, int kind, Agsym_t *attr)
permits traversing the list of attributes of a given type
char * agget(void *obj, char *name)
static void color(Agraph_t *g)
static bool startswith(const char *s, const char *prefix)
does the string s begin with the string prefix?
systemgraphs systemGraphs
void updateSmGraph(Agraph_t *g, topview *t)
static void get_text_widget_to_attribute(char *attrib, char *widget_name, Agraph_t *g)
void on_settingsCancelBtn_clicked(GtkWidget *widget, void *user_data)
static void copy_attr(Agraph_t *destG, char *attrib, Agraph_t *g)
static void get_scalebtn_widget_to_attribute(char *attrib, char *widget_name, Agraph_t *g)
static void set_color_button_widget(char *attrib, char *widget_name)
static void set_checkbox_widget(char *attrib, char *widget_name)
void load_settings_from_graph(void)
static void get_color_button_widget_to_attribute(char *attrib, char *widget_name, Agraph_t *g)
void on_settingsOKBtn_clicked(GtkWidget *widget, void *user_data)
static void set_scalebtn_widget_to_attribute(char *attrib, char *widget_name)
void size_change_request(GtkWidget *widget, void *user_data)
void update_graph_from_settings(Agraph_t *g)
void on_settingsApplyBtn_clicked(GtkWidget *widget, void *user_data)
static void set_text_widget(char *attrib, char *widget_name)
static void get_combobox_widget_to_attribute(char *attrib, char *widget_name, Agraph_t *g)
void on_dlgSettings_close(GtkWidget *widget, void *user_data)
static void set_combobox_widget(char *attrib, char *widget_name)
static void set_spinbtn_widget(char *attrib, char *widget_name)
static void get_checkbox_widget_to_attribute(char *attrib, char *widget_name, Agraph_t *g)
static void get_spinbtn_widget_to_attribute(char *attrib, char *widget_name, Agraph_t *g)
void show_settings_form(void)
void set_viewport_settings_from_template(ViewInfo *vi, Agraph_t *g)