Root/
Source at commit a9ed5b30aa457704a4c0c912367bfe8c57db8d03 created 8 years 7 days ago. By Werner Almesberger, fped.1: update for new options; fix typo; bump date | |
---|---|
1 | /* |
2 | * gui_status.h - GUI, status area |
3 | * |
4 | * Written 2009, 2010, 2012 by Werner Almesberger |
5 | * Copyright 2009, 2010, 2012 by Werner Almesberger |
6 | * |
7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by |
9 | * the Free Software Foundation; either version 2 of the License, or |
10 | * (at your option) any later version. |
11 | */ |
12 | |
13 | |
14 | #ifndef GUI_STATUS_H |
15 | #define GUI_STATUS_H |
16 | |
17 | #include <gtk/gtk.h> |
18 | |
19 | #include "coord.h" |
20 | #include "expr.h" |
21 | #include "obj.h" |
22 | |
23 | |
24 | enum curr_unit { |
25 | curr_unit_mm, |
26 | curr_unit_mil, |
27 | curr_unit_auto, |
28 | curr_unit_n |
29 | }; |
30 | |
31 | |
32 | extern enum curr_unit curr_unit; |
33 | |
34 | |
35 | void edit_var_type(struct var *var); |
36 | void edit_pad_type(enum pad_type *type); |
37 | |
38 | void edit_unique(const char **s, int (*validate)(const char *s, void *ctx), |
39 | void *ctx, const char *tooltip); |
40 | void edit_unique_null(const char **s, int (*validate)(const char *s, void *ctx), |
41 | void *ctx, const char *tooltip); |
42 | void edit_unique_with_values(const char **s, |
43 | int (*validate)(const char *s, void *ctx), void *ctx, |
44 | void (*set_values)(void *user, const struct value *values, int n_values), |
45 | void *user, int max_values, const char *tooltip); |
46 | void edit_name(char **s, int (*validate)(const char *s, void *ctx), void *ctx, |
47 | const char *tooltip); |
48 | void edit_expr(struct expr **expr, const char *tooltip); |
49 | void edit_expr_list(struct expr *expr, |
50 | void (*set_values)(void *user, const struct value *values, int n_values), |
51 | void *user, const char *tooltip); |
52 | void edit_dist_expr(struct expr **expr, const char *tooltip); |
53 | void edit_x(struct expr **expr, const char *tooltip); |
54 | void edit_y(struct expr **expr, const char *tooltip); |
55 | void edit_nothing(void); |
56 | |
57 | void set_with_units(void (*set)(const char *tooltip, const char *fmt, ...), |
58 | const char *prefix, unit_type u, const char *tooltip); |
59 | |
60 | #define SETTER(name) \ |
61 | void status_set_##name(const char *tooltip, const char *fmt, ...) \ |
62 | __attribute__((format(printf, 2, 3))) \ |
63 | |
64 | SETTER(type_x); |
65 | SETTER(type_y); |
66 | SETTER(type_entry); |
67 | SETTER(name); |
68 | SETTER(x); |
69 | SETTER(y); |
70 | SETTER(r); |
71 | SETTER(angle); |
72 | SETTER(sys_x); |
73 | SETTER(sys_y); |
74 | SETTER(user_x); |
75 | SETTER(user_y); |
76 | SETTER(zoom); |
77 | SETTER(grid); |
78 | SETTER(unit); |
79 | |
80 | #undef SETTER |
81 | |
82 | void status_set_icon(GtkWidget *image); |
83 | void status_set_xy(struct coord coord); |
84 | void status_set_angle_xy(const char *tooltip, struct coord v); |
85 | |
86 | void status_begin_reporting(void); |
87 | |
88 | void make_status_area(GtkWidget *vbox); |
89 | void cleanup_status_area(void); |
90 | |
91 | #endif /* !GUI_STATUS_H */ |
92 |
Branches:
master