29 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
45 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
52 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
65 if ((!buf) || (strcmp(buf,
"") == 0))
72 color.red = (uint16_t)(cl.
u.
RGBA[0] * 65535.0);
73 color.green = (uint16_t)(cl.
u.
RGBA[1] * 65535.0);
74 color.blue = (uint16_t)(cl.
u.
RGBA[2] * 65535.0);
75 gtk_color_button_set_color((GtkColorButton *)
76 glade_xml_get_widget(
xml, widget_name),
89 gtk_color_button_get_color((GtkColorButton *)
90 glade_xml_get_widget(
xml, widget_name),
92 snprintf(buf,
sizeof(buf),
"#%02x%02x%02x",
93 (
int) ((
float)
color.red / 65535.0 * 255.0),
94 (
int) ((
float)
color.green / 65535.0 * 255.0),
95 (
int) ((
float)
color.blue / 65535.0 * 255.0));
102 if (strlen(attrib) > 512)
105 glade_xml_get_widget(
xml, widget_name)));
112 if ((!buf) || (strcmp(buf,
"") == 0))
119 gtk_entry_set_text((GtkEntry *)
120 glade_xml_get_widget(
xml, widget_name), buf);
129 if ((!buf) || (strcmp(buf,
"") == 0))
138 gtk_toggle_button_set_active((GtkToggleButton *)
139 glade_xml_get_widget(
xml,
148 const int value = (int)gtk_toggle_button_get_active((GtkToggleButton *)
149 glade_xml_get_widget(
xml,
159 if ((!buf) || (strcmp(buf,
"") == 0))
165 value = (float) atof(buf);
166 gtk_spin_button_set_value((GtkSpinButton *)
167 glade_xml_get_widget(
xml, widget_name),
178 value = (float) gtk_spin_button_get_value((GtkSpinButton *)
179 glade_xml_get_widget(
xml,
181 snprintf(buf,
sizeof(buf),
"%f", value);
190 value = (float) gtk_range_get_value((GtkRange *)
191 glade_xml_get_widget(
xml,
193 snprintf(buf,
sizeof(buf),
"%f", value);
202 if ((!buf) || (strcmp(buf,
"") == 0))
209 value = (float) atof(buf);
210 gtk_range_set_value((GtkRange *)
211 glade_xml_get_widget(
xml, widget_name), value);
219 if ((!buf) || (strcmp(buf,
"") == 0))
226 gtk_combo_box_set_active((GtkComboBox *)
227 glade_xml_get_widget(
xml, widget_name), value);
234 const int value = (int)gtk_combo_box_get_active((GtkComboBox *)
235 glade_xml_get_widget(
xml, widget_name));
245 sym->
name + strlen(
"color_button="),
261 sym->
name + strlen(
"scale_button="),
271 sym->
name + strlen(
"color_button="),
275 sym->
name + strlen(
"check_box="),
279 sym->
name + strlen(
"text_box="),
283 sym->
name + strlen(
"combobox="),
287 sym->
name + strlen(
"spin_button="),
291 sym->
name + strlen(
"scale_button="),
300 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
301 gtk_widget_show(glade_xml_get_widget(
xml,
"dlgSettings"));
302 gtk_window_set_keep_above((GtkWindow *)
303 glade_xml_get_widget(
xml,
"dlgSettings"),
306 void *dlg = gtk_message_dialog_new(
NULL,
308 GTK_MESSAGE_QUESTION,
312 gtk_widget_destroy(dlg);
void colorxlate(char *str, agxbuf *buf)
Agsym_t * agattr_text(Agraph_t *g, int kind, char *name, const char *value)
creates or looks up text 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)