* Get current width of value. width2p is only valid for SV_VALUE types. */
| 2245 | * Get current width of value. width2p is only valid for SV_VALUE types. |
| 2246 | */ |
| 2247 | static void |
| 2248 | get_widths(struct X_status_value *sv, int *width1p, int *width2p) |
| 2249 | { |
| 2250 | Arg args[1]; |
| 2251 | Dimension width; |
| 2252 | |
| 2253 | switch (sv->type) { |
| 2254 | case SV_VALUE: |
| 2255 | *width1p = get_name_width(sv->w); |
| 2256 | *width2p = get_value_width(sv->w); |
| 2257 | break; |
| 2258 | case SV_LABEL: |
| 2259 | case SV_NAME: |
| 2260 | XtSetArg(args[0], XtNwidth, &width); |
| 2261 | XtGetValues(sv->w, args, ONE); |
| 2262 | *width1p = width; |
| 2263 | *width2p = 0; |
| 2264 | break; |
| 2265 | default: |
| 2266 | panic("get_widths: unknown type %d", sv->type); |
| 2267 | } |
| 2268 | } |
| 2269 | |
| 2270 | static void |
| 2271 | set_widths(struct X_status_value *sv, int width1, int width2) |
no test coverage detected