Lines Matching defs:entry

190     SmeBSBObject entry = (SmeBSBObject) new;
192 if (entry->sme_bsb.label == NULL)
193 entry->sme_bsb.label = XtName(new);
195 entry->sme_bsb.label = XtNewString( entry->sme_bsb.label );
197 GetDefaultSize(new, &(entry->rectangle.width), &(entry->rectangle.height));
200 entry->sme_bsb.left_bitmap_width = entry->sme_bsb.left_bitmap_height = 0;
201 entry->sme_bsb.right_bitmap_width = entry->sme_bsb.right_bitmap_height = 0;
217 SmeBSBObject entry = (SmeBSBObject) w;
220 if (entry->sme_bsb.label != XtName(w))
221 XtFree(entry->sme_bsb.label);
240 SmeBSBObject entry = (SmeBSBObject) w;
244 XFontSetExtents *ext = XExtentsOfFontSet(entry->sme_bsb.fontset);
246 entry->sme_bsb.set_values_area_cleared = FALSE;
247 if ( entry->sme.international == True ) {
252 font_ascent = entry->sme_bsb.font->max_bounds.ascent;
253 font_descent = entry->sme_bsb.font->max_bounds.descent;
255 y_loc = entry->rectangle.y;
261 entry->sme_bsb.norm_gc, 0, y_loc,
262 (unsigned int) entry->rectangle.width,
263 (unsigned int) entry->rectangle.height);
264 gc = entry->sme_bsb.rev_gc;
267 gc = entry->sme_bsb.norm_gc;
270 gc = entry->sme_bsb.norm_gray_gc;
272 if (entry->sme_bsb.label != NULL) {
273 int x_loc = entry->sme_bsb.left_margin;
274 int len = strlen(entry->sme_bsb.label);
275 char * label = entry->sme_bsb.label;
277 switch(entry->sme_bsb.justify) {
281 if ( entry->sme.international == True ) {
282 t_width = XmbTextEscapement(entry->sme_bsb.fontset,label,len);
283 width = entry->rectangle.width - (entry->sme_bsb.left_margin +
284 entry->sme_bsb.right_margin);
287 t_width = XTextWidth(entry->sme_bsb.font, label, len);
288 width = entry->rectangle.width - (entry->sme_bsb.left_margin +
289 entry->sme_bsb.right_margin);
294 if ( entry->sme.international == True ) {
295 t_width = XmbTextEscapement(entry->sme_bsb.fontset,label,len);
296 x_loc = entry->rectangle.width - ( entry->sme_bsb.right_margin
300 t_width = XTextWidth(entry->sme_bsb.font, label, len);
301 x_loc = entry->rectangle.width - ( entry->sme_bsb.right_margin
313 if ( entry->sme.international==True ) {
314 y_loc += ((int)entry->rectangle.height -
318 entry->sme_bsb.fontset, gc, x_loc, y_loc, label, len);
321 y_loc += ((int)entry->rectangle.height -
348 SmeBSBObject entry = (SmeBSBObject) new;
352 if (old_entry->sme_bsb.label != entry->sme_bsb.label) {
356 if (entry->sme_bsb.label != XtName(new) )
357 entry->sme_bsb.label = XtNewString( entry->sme_bsb.label );
362 if (entry->rectangle.sensitive != old_entry->rectangle.sensitive )
365 if (entry->sme_bsb.left_bitmap != old_entry->sme_bsb.left_bitmap) {
370 if (entry->sme_bsb.right_bitmap != old_entry->sme_bsb.right_bitmap) {
375 if ( ( (old_entry->sme_bsb.font != entry->sme_bsb.font) &&
377 (old_entry->sme_bsb.foreground != entry->sme_bsb.foreground) ) {
383 if ( ( old_entry->sme_bsb.fontset != entry->sme_bsb.fontset) &&
390 &(entry->rectangle.width), &(entry->rectangle.height));
391 entry->sme_bsb.set_values_area_cleared = TRUE;
398 * Arguments: w - the menu entry object.
412 SmeBSBObject entry = (SmeBSBObject) w;
436 if ( ((mode & CWWidth) && (width == entry->rectangle.width)) &&
437 ((mode & CWHeight) && (height == entry->rectangle.height)) )
445 * Description: Invert the colors of the current entry.
446 * Arguments: w - the bsb menu entry widget.
454 SmeBSBObject entry = (SmeBSBObject) w;
457 if (entry->sme_bsb.set_values_area_cleared) {
462 entry->sme_bsb.invert_gc,
463 0, (int) entry->rectangle.y,
464 (unsigned int) entry->rectangle.width,
465 (unsigned int) entry->rectangle.height);
476 * this menu entry.
477 * Arguments: w - the menu entry widget.
487 SmeBSBObject entry = (SmeBSBObject) w;
489 if ( entry->sme.international == True ) {
490 XFontSetExtents *ext = XExtentsOfFontSet(entry->sme_bsb.fontset);
491 if (entry->sme_bsb.label == NULL)
494 *width = XmbTextEscapement(entry->sme_bsb.fontset, entry->sme_bsb.label,
495 strlen(entry->sme_bsb.label));
496 *width += entry->sme_bsb.left_margin + entry->sme_bsb.right_margin;
499 entry->sme_bsb.vert_space )) / ONE_HUNDRED;
502 if (entry->sme_bsb.label == NULL)
505 *width = XTextWidth(entry->sme_bsb.font, entry->sme_bsb.label,
506 strlen(entry->sme_bsb.label));
508 *width += entry->sme_bsb.left_margin + entry->sme_bsb.right_margin;
510 *height = (entry->sme_bsb.font->max_bounds.ascent +
511 entry->sme_bsb.font->max_bounds.descent);
514 entry->sme_bsb.vert_space )) / ONE_HUNDRED;
531 SmeBSBObject entry = (SmeBSBObject) w;
533 if ( (entry->sme_bsb.left_bitmap == None) &&
534 (entry->sme_bsb.right_bitmap == None) ) return;
540 if (entry->sme_bsb.left_bitmap != None) {
541 x_loc = (int)(entry->sme_bsb.left_margin -
542 entry->sme_bsb.left_bitmap_width) / 2;
544 y_loc = entry->rectangle.y +
545 (int)(entry->rectangle.height -
546 entry->sme_bsb.left_bitmap_height) / 2;
548 XCopyPlane(XtDisplayOfObject(w), entry->sme_bsb.left_bitmap,
550 entry->sme_bsb.left_bitmap_width,
551 entry->sme_bsb.left_bitmap_height, x_loc, y_loc, 1);
559 if (entry->sme_bsb.right_bitmap != None) {
560 x_loc = entry->rectangle.width -
561 (int)(entry->sme_bsb.right_margin +
562 entry->sme_bsb.right_bitmap_width) / 2;
564 y_loc = entry->rectangle.y +
565 (int)(entry->rectangle.height -
566 entry->sme_bsb.right_bitmap_height) / 2;
568 XCopyPlane(XtDisplayOfObject(w), entry->sme_bsb.right_bitmap,
570 entry->sme_bsb.right_bitmap_width,
571 entry->sme_bsb.right_bitmap_height, x_loc, y_loc, 1);
577 * Arguments: w - the bsb menu entry widget.
588 SmeBSBObject entry = (SmeBSBObject) w;
596 char* fmt1 = "%s Could not get %s Bitmap geometry information for menu entry \"%s\"";
597 char* def1 = "%s Could not get Bitmap geometry information for menu entry";
598 char* fmt2 = "%s %s Bitmap of entry \"%s\" is not one bit deep";
599 char* def2 = "%s Bitmap of entry is not one bit deep";
605 if (entry->sme_bsb.left_bitmap != None) {
607 entry->sme_bsb.left_bitmap, &root,
634 entry->sme_bsb.left_bitmap_width = (Dimension) width;
635 entry->sme_bsb.left_bitmap_height = (Dimension) height;
638 else if (entry->sme_bsb.right_bitmap != None) {
640 entry->sme_bsb.right_bitmap, &root,
667 entry->sme_bsb.right_bitmap_width = (Dimension) width;
668 entry->sme_bsb.right_bitmap_height = (Dimension) height;
682 SmeBSBObject entry = (SmeBSBObject) w;
687 values.background = entry->sme_bsb.foreground;
688 values.font = entry->sme_bsb.font->fid;
692 if ( entry->sme.international == True )
693 entry->sme_bsb.rev_gc = XtAllocateGC(w, 0, mask_i18n, &values, GCFont, 0 );
695 entry->sme_bsb.rev_gc = XtGetGC(w, mask, &values);
697 values.foreground = entry->sme_bsb.foreground;
699 if ( entry->sme.international == True )
700 entry->sme_bsb.norm_gc = XtAllocateGC(w, 0, mask_i18n, &values, GCFont, 0 );
702 entry->sme_bsb.norm_gc = XtGetGC(w, mask, &values);
706 entry->sme_bsb.foreground,
712 if ( entry->sme.international == True )
713 entry->sme_bsb.norm_gray_gc = XtAllocateGC(w, 0, mask_i18n, &values, GCFont, 0 );
715 entry->sme_bsb.norm_gray_gc = XtGetGC(w, mask, &values);
721 entry->sme_bsb.invert_gc = XtGetGC(w, mask, &values);
734 SmeBSBObject entry = (SmeBSBObject) w;
736 XtReleaseGC(w, entry->sme_bsb.norm_gc);
737 XtReleaseGC(w, entry->sme_bsb.norm_gray_gc);
738 XtReleaseGC(w, entry->sme_bsb.rev_gc);
739 XtReleaseGC(w, entry->sme_bsb.invert_gc);