27 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
43 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
50 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
63 if ((!buf) || (strcmp(buf,
"") == 0))
70 color.red = (uint16_t)(cl.
u.
RGBA[0] * 65535.0);
71 color.green = (uint16_t)(cl.
u.
RGBA[1] * 65535.0);
72 color.blue = (uint16_t)(cl.
u.
RGBA[2] * 65535.0);
73 gtk_color_button_set_color((GtkColorButton *)
74 glade_xml_get_widget(
xml, widget_name),
87 gtk_color_button_get_color((GtkColorButton *)
88 glade_xml_get_widget(
xml, widget_name),
90 snprintf(buf,
sizeof(buf),
"#%02x%02x%02x",
91 (
int) ((
float)
color.red / 65535.0 * 255.0),
92 (
int) ((
float)
color.green / 65535.0 * 255.0),
93 (
int) ((
float)
color.blue / 65535.0 * 255.0));
100 if (strlen(attrib) > 512)
103 glade_xml_get_widget(
xml, widget_name)));
110 if ((!buf) || (strcmp(buf,
"") == 0))
117 gtk_entry_set_text((GtkEntry *)
118 glade_xml_get_widget(
xml, widget_name), buf);
127 if ((!buf) || (strcmp(buf,
"") == 0))
136 gtk_toggle_button_set_active((GtkToggleButton *)
137 glade_xml_get_widget(
xml,
146 const int value = (int)gtk_toggle_button_get_active((GtkToggleButton *)
147 glade_xml_get_widget(
xml,
157 if ((!buf) || (strcmp(buf,
"") == 0))
163 value = (float) atof(buf);
164 gtk_spin_button_set_value((GtkSpinButton *)
165 glade_xml_get_widget(
xml, widget_name),
176 value = (float) gtk_spin_button_get_value((GtkSpinButton *)
177 glade_xml_get_widget(
xml,
179 snprintf(buf,
sizeof(buf),
"%f", value);
188 value = (float) gtk_range_get_value((GtkRange *)
189 glade_xml_get_widget(
xml,
191 snprintf(buf,
sizeof(buf),
"%f", value);
200 if ((!buf) || (strcmp(buf,
"") == 0))
207 value = (float) atof(buf);
208 gtk_range_set_value((GtkRange *)
209 glade_xml_get_widget(
xml, widget_name), value);
217 if ((!buf) || (strcmp(buf,
"") == 0))
224 gtk_combo_box_set_active((GtkComboBox *)
225 glade_xml_get_widget(
xml, widget_name), value);
232 const int value = (int)gtk_combo_box_get_active((GtkComboBox *)
233 glade_xml_get_widget(
xml, widget_name));
243 sym->
name + strlen(
"color_button="),
259 sym->
name + strlen(
"scale_button="),
269 sym->
name + strlen(
"color_button="),
273 sym->
name + strlen(
"check_box="),
277 sym->
name + strlen(
"text_box="),
281 sym->
name + strlen(
"combobox="),
285 sym->
name + strlen(
"spin_button="),
289 sym->
name + strlen(
"scale_button="),
298 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
299 gtk_widget_show(glade_xml_get_widget(
xml,
"dlgSettings"));
300 gtk_window_set_keep_above((GtkWindow *)
301 glade_xml_get_widget(
xml,
"dlgSettings"),
304 void *dlg = gtk_message_dialog_new(
NULL,
306 GTK_MESSAGE_QUESTION,
310 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)