Mercurial > hg > xemacs-beta
comparison lwlib/xlwgauge.c @ 3055:6c9e392b4307
[xemacs-hg @ 2005-11-10 15:47:33 by crestani]
Fix C++ build: new->new_.
author | crestani |
---|---|
date | Thu, 10 Nov 2005 15:47:33 +0000 |
parents | 04bc9d2f42c7 |
children | 174eb4da74fb |
comparison
equal
deleted
inserted
replaced
3054:f4a678ca6f3d | 3055:6c9e392b4307 |
---|---|
238 | 238 |
239 | 239 |
240 /* ARGSUSED */ | 240 /* ARGSUSED */ |
241 static void | 241 static void |
242 GaugeInit (Widget request, | 242 GaugeInit (Widget request, |
243 Widget new, | 243 Widget new_, |
244 ArgList UNUSED (args), | 244 ArgList UNUSED (args), |
245 Cardinal *UNUSED (num_args)) | 245 Cardinal *UNUSED (num_args)) |
246 { | 246 { |
247 GaugeWidget gw = (GaugeWidget) new; | 247 GaugeWidget gw = (GaugeWidget) new_; |
248 | 248 |
249 if( gw->gauge.v0 == 0 && gw->gauge.v1 == 0 ) { | 249 if( gw->gauge.v0 == 0 && gw->gauge.v1 == 0 ) { |
250 gw->gauge.autoScaleUp = gw->gauge.autoScaleDown = TRUE ; | 250 gw->gauge.autoScaleUp = gw->gauge.autoScaleDown = TRUE ; |
251 AutoScale(gw) ; | 251 AutoScale(gw) ; |
252 } | 252 } |
256 if( request->core.width == 0 || request->core.height == 0 ) | 256 if( request->core.width == 0 || request->core.height == 0 ) |
257 { | 257 { |
258 Dimension w,h ; | 258 Dimension w,h ; |
259 GaugeSize(gw, &w,&h, DEF_LEN) ; | 259 GaugeSize(gw, &w,&h, DEF_LEN) ; |
260 if( request->core.width == 0 ) | 260 if( request->core.width == 0 ) |
261 new->core.width = w ; | 261 new_->core.width = w ; |
262 if( request->core.height == 0 ) | 262 if( request->core.height == 0 ) |
263 new->core.height = h ; | 263 new_->core.height = h ; |
264 gw->core.widget_class->core_class.resize(new) ; | 264 gw->core.widget_class->core_class.resize(new_) ; |
265 } | 265 } |
266 | 266 |
267 gw->gauge.selected = None ; | 267 gw->gauge.selected = None ; |
268 gw->gauge.selstr = NULL ; | 268 gw->gauge.selstr = NULL ; |
269 | 269 |
499 */ | 499 */ |
500 | 500 |
501 static Boolean | 501 static Boolean |
502 GaugeSetValues (Widget old, | 502 GaugeSetValues (Widget old, |
503 Widget UNUSED (request), | 503 Widget UNUSED (request), |
504 Widget new, | 504 Widget new_, |
505 ArgList UNUSED (args), | 505 ArgList UNUSED (args), |
506 Cardinal *UNUSED (num_args)) | 506 Cardinal *UNUSED (num_args)) |
507 { | 507 { |
508 GaugeWidget oldgw = (GaugeWidget) old; | 508 GaugeWidget oldgw = (GaugeWidget) old; |
509 GaugeWidget gw = (GaugeWidget) new; | 509 GaugeWidget gw = (GaugeWidget) new_; |
510 Boolean was_resized = False; | 510 Boolean was_resized = False; |
511 | 511 |
512 if( gw->gauge.selected != None ) { | 512 if( gw->gauge.selected != None ) { |
513 XtDisownSelection(new, gw->gauge.selected, CurrentTime) ; | 513 XtDisownSelection(new_, gw->gauge.selected, CurrentTime) ; |
514 gw->gauge.selected = None ; | 514 gw->gauge.selected = None ; |
515 } | 515 } |
516 | 516 |
517 /* Changes to v0,v1,labels, ntics, nlabels require resize & redraw. */ | 517 /* Changes to v0,v1,labels, ntics, nlabels require resize & redraw. */ |
518 /* Change to value requires redraw and possible resize if autoscale */ | 518 /* Change to value requires redraw and possible resize if autoscale */ |
533 | 533 |
534 if( was_resized ) { | 534 if( was_resized ) { |
535 if( gw->label.resize ) | 535 if( gw->label.resize ) |
536 GaugeSize(gw, &gw->core.width, &gw->core.height, DEF_LEN) ; | 536 GaugeSize(gw, &gw->core.width, &gw->core.height, DEF_LEN) ; |
537 else | 537 else |
538 GaugeResize(new) ; | 538 GaugeResize(new_) ; |
539 } | 539 } |
540 | 540 |
541 if( gw->gauge.update != oldgw->gauge.update ) | 541 if( gw->gauge.update != oldgw->gauge.update ) |
542 { | 542 { |
543 if( gw->gauge.update > 0 ) | 543 if( gw->gauge.update > 0 ) |
546 DisableUpdate(gw) ; | 546 DisableUpdate(gw) ; |
547 } | 547 } |
548 | 548 |
549 if( gw->core.background_pixel != oldgw->core.background_pixel ) | 549 if( gw->core.background_pixel != oldgw->core.background_pixel ) |
550 { | 550 { |
551 XtReleaseGC(new, gw->gauge.inverse_GC) ; | 551 XtReleaseGC(new_, gw->gauge.inverse_GC) ; |
552 gw->gauge.inverse_GC = Get_GC(gw, gw->core.background_pixel) ; | 552 gw->gauge.inverse_GC = Get_GC(gw, gw->core.background_pixel) ; |
553 } | 553 } |
554 | 554 |
555 return was_resized || gw->gauge.value != oldgw->gauge.value || | 555 return was_resized || gw->gauge.value != oldgw->gauge.value || |
556 XtIsSensitive(old) != XtIsSensitive(new); | 556 XtIsSensitive(old) != XtIsSensitive(new_); |
557 } | 557 } |
558 | 558 |
559 | 559 |
560 static XtGeometryResult | 560 static XtGeometryResult |
561 GaugeQueryGeometry (Widget w, | 561 GaugeQueryGeometry (Widget w, |