34 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
51 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
59 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
73 if ((!buf) || (strcmp(buf,
"") == 0))
81 color.green = (guint16)(cl.
u.
RGBA[1] * 65535.0);
82 color.blue = (guint16)(cl.
u.
RGBA[2] * 65535.0);
83 gtk_color_button_set_color((GtkColorButton *)
84 glade_xml_get_widget(
xml, widget_name),
97 gtk_color_button_get_color((GtkColorButton *)
98 glade_xml_get_widget(
xml, widget_name),
100 snprintf(buf,
sizeof(buf),
"#%02x%02x%02x",
101 (
int) ((
float)
color.red / 65535.0 * 255.0),
102 (
int) ((
float)
color.green / 65535.0 * 255.0),
103 (
int) ((
float)
color.blue / 65535.0 * 255.0));
110 if (strlen(attrib) > 512)
112 agattr(g,
AGRAPH, attrib, gtk_entry_get_text((GtkEntry*)
113 glade_xml_get_widget(
xml, widget_name)));
120 if ((!buf) || (strcmp(buf,
"") == 0))
127 gtk_entry_set_text((GtkEntry *)
128 glade_xml_get_widget(
xml, widget_name), buf);
137 if ((!buf) || (strcmp(buf,
"") == 0))
146 gtk_toggle_button_set_active((GtkToggleButton *)
147 glade_xml_get_widget(
xml,
159 value = (int) gtk_toggle_button_get_active((GtkToggleButton *)
160 glade_xml_get_widget(
xml,
162 snprintf(buf,
sizeof(buf),
"%d", value);
171 if ((!buf) || (strcmp(buf,
"") == 0))
177 value = (float) atof(buf);
178 gtk_spin_button_set_value((GtkSpinButton *)
179 glade_xml_get_widget(
xml, widget_name),
190 value = (float) gtk_spin_button_get_value((GtkSpinButton *)
191 glade_xml_get_widget(
xml,
193 snprintf(buf,
sizeof(buf),
"%f", value);
202 value = (float) gtk_range_get_value((GtkRange *)
203 glade_xml_get_widget(
xml,
205 snprintf(buf,
sizeof(buf),
"%f", value);
214 if ((!buf) || (strcmp(buf,
"") == 0))
221 value = (float) atof(buf);
222 gtk_range_set_value((GtkRange *)
223 glade_xml_get_widget(
xml, widget_name), value);
231 if ((!buf) || (strcmp(buf,
"") == 0))
238 gtk_combo_box_set_active((GtkComboBox *)
239 glade_xml_get_widget(
xml, widget_name), value);
250 gtk_combo_box_get_active((GtkComboBox *)
251 glade_xml_get_widget(
xml, widget_name));
253 snprintf(buf,
sizeof(buf),
"%d", value);
262 sym->
name + strlen(
"color_button="),
278 sym->
name + strlen(
"scale_button="),
288 sym->
name + strlen(
"color_button="),
292 sym->
name + strlen(
"check_box="),
296 sym->
name + strlen(
"text_box="),
300 sym->
name + strlen(
"combobox="),
304 sym->
name + strlen(
"spin_button="),
308 sym->
name + strlen(
"scale_button="),
317 gtk_widget_hide(glade_xml_get_widget(
xml,
"dlgSettings"));
318 gtk_widget_show(glade_xml_get_widget(
xml,
"dlgSettings"));
319 gtk_window_set_keep_above((GtkWindow *)
320 glade_xml_get_widget(
xml,
"dlgSettings"),
323 void *dlg = gtk_message_dialog_new(
NULL,
325 GTK_MESSAGE_QUESTION,
329 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)
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)
void on_dlgSettings_close(GtkWidget *widget, gpointer user_data)
void on_settingsCancelBtn_clicked(GtkWidget *widget, gpointer user_data)
static void set_color_button_widget(char *attrib, char *widget_name)
void on_settingsApplyBtn_clicked(GtkWidget *widget, gpointer user_data)
static void set_checkbox_widget(char *attrib, char *widget_name)
void load_settings_from_graph(void)
void color_change_request(GtkWidget *widget, gpointer user_data)
void size_change_request(GtkWidget *widget, gpointer user_data)
static void get_color_button_widget_to_attribute(char *attrib, char *widget_name, Agraph_t *g)
static void set_scalebtn_widget_to_attribute(char *attrib, char *widget_name)
void update_graph_from_settings(Agraph_t *g)
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)
static void set_combobox_widget(char *attrib, char *widget_name)
void on_settingsOKBtn_clicked(GtkWidget *widget, gpointer user_data)
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)