Lines Matching refs:sme_bsb
49 #define offset(field) XtOffset(SmeBSBObject, sme_bsb.field)
174 if (entry->sme_bsb.label == NULL)
175 entry->sme_bsb.label = XtName(new);
177 entry->sme_bsb.label = XtNewString( entry->sme_bsb.label );
182 entry->sme_bsb.left_bitmap_width = entry->sme_bsb.left_bitmap_height = 0;
183 entry->sme_bsb.right_bitmap_width = entry->sme_bsb.right_bitmap_height = 0;
202 if (entry->sme_bsb.label != XtName(w))
203 XtFree(entry->sme_bsb.label);
225 entry->sme_bsb.set_values_area_cleared = FALSE;
226 font_ascent = entry->sme_bsb.font->max_bounds.ascent;
227 font_descent = entry->sme_bsb.font->max_bounds.descent;
234 entry->sme_bsb.norm_gc, 0, y_loc,
237 gc = entry->sme_bsb.rev_gc;
240 gc = entry->sme_bsb.norm_gc;
243 gc = entry->sme_bsb.norm_gray_gc;
245 if (entry->sme_bsb.label != NULL) {
246 int x_loc = entry->sme_bsb.left_margin;
247 int len = strlen(entry->sme_bsb.label);
248 char * label = entry->sme_bsb.label;
250 switch(entry->sme_bsb.justify) {
254 t_width = XTextWidth(entry->sme_bsb.font, label, len);
255 width = entry->rectangle.width - (entry->sme_bsb.left_margin +
256 entry->sme_bsb.right_margin);
260 t_width = XTextWidth(entry->sme_bsb.font, label, len);
261 x_loc = entry->rectangle.width - (entry->sme_bsb.right_margin +
297 if (old_entry->sme_bsb.label != entry->sme_bsb.label) {
298 if (old_entry->sme_bsb.label != XtName( new ) )
299 XtFree( (char *) old_entry->sme_bsb.label );
301 if (entry->sme_bsb.label != XtName(new) )
302 entry->sme_bsb.label = XtNewString( entry->sme_bsb.label );
310 if (entry->sme_bsb.left_bitmap != old_entry->sme_bsb.left_bitmap) {
315 if (entry->sme_bsb.right_bitmap != old_entry->sme_bsb.right_bitmap) {
320 if ( (old_entry->sme_bsb.font != entry->sme_bsb.font) ||
321 (old_entry->sme_bsb.foreground != entry->sme_bsb.foreground) ) {
330 entry->sme_bsb.set_values_area_cleared = TRUE;
395 if (entry->sme_bsb.set_values_area_cleared) return;
398 entry->sme_bsb.invert_gc, 0, (int) entry->rectangle.y,
424 if (entry->sme_bsb.label == NULL)
427 *width = XTextWidth(entry->sme_bsb.font, entry->sme_bsb.label,
428 strlen(entry->sme_bsb.label));
430 *width += entry->sme_bsb.left_margin + entry->sme_bsb.right_margin;
432 *height = (entry->sme_bsb.font->max_bounds.ascent +
433 entry->sme_bsb.font->max_bounds.descent);
436 entry->sme_bsb.vert_space )) / ONE_HUNDRED;
454 if ( (entry->sme_bsb.left_bitmap == None) &&
455 (entry->sme_bsb.right_bitmap == None) ) return;
461 if (entry->sme_bsb.left_bitmap != None) {
462 x_loc = (entry->sme_bsb.left_margin -
463 entry->sme_bsb.left_bitmap_width) / 2;
466 entry->sme_bsb.left_bitmap_height) / 2;
468 XCopyPlane(XtDisplayOfObject(w), entry->sme_bsb.left_bitmap,
470 entry->sme_bsb.left_bitmap_width,
471 entry->sme_bsb.left_bitmap_height, x_loc, y_loc, 1);
479 if (entry->sme_bsb.right_bitmap != None) {
480 x_loc = entry->rectangle.width - (entry->sme_bsb.right_margin +
481 entry->sme_bsb.right_bitmap_width) / 2;
484 entry->sme_bsb.right_bitmap_height) / 2;
486 XCopyPlane(XtDisplayOfObject(w), entry->sme_bsb.right_bitmap,
488 entry->sme_bsb.right_bitmap_width,
489 entry->sme_bsb.right_bitmap_height, x_loc, y_loc, 1);
514 if (entry->sme_bsb.left_bitmap != None) {
516 entry->sme_bsb.left_bitmap, &root,
529 entry->sme_bsb.left_bitmap_width = (Dimension) width;
530 entry->sme_bsb.left_bitmap_height = (Dimension) height;
533 else if (entry->sme_bsb.right_bitmap != None) {
535 entry->sme_bsb.right_bitmap, &root,
548 entry->sme_bsb.right_bitmap_width = (Dimension) width;
549 entry->sme_bsb.right_bitmap_height = (Dimension) height;
568 values.background = entry->sme_bsb.foreground;
569 values.font = entry->sme_bsb.font->fid;
572 entry->sme_bsb.rev_gc = XtGetGC(w, mask, &values);
574 values.foreground = entry->sme_bsb.foreground;
576 entry->sme_bsb.norm_gc = XtGetGC(w, mask, &values);
580 entry->sme_bsb.foreground,
585 entry->sme_bsb.norm_gray_gc = XtGetGC(w, mask, &values);
591 entry->sme_bsb.invert_gc = XtGetGC(w, mask, &values);
606 XtReleaseGC(w, entry->sme_bsb.norm_gc);
607 XtReleaseGC(w, entry->sme_bsb.norm_gray_gc);
608 XtReleaseGC(w, entry->sme_bsb.rev_gc);
609 XtReleaseGC(w, entry->sme_bsb.invert_gc);