~ubuntu-branches/ubuntu/quantal/texmacs/quantal

« back to all changes in this revision

Viewing changes to src/Typeset/Boxes/Composite/concat_boxes.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Atsuhito KOHDA, Kamaraju Kusumanchi, kohda
  • Date: 2008-04-06 15:11:41 UTC
  • mfrom: (1.1.7 upstream) (4.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080406151141-w0sg20jnv86mlt6f
Tags: 1:1.0.6.14-1
[Kamaraju Kusumanchi <kamaraju@gmail.com>]
* New upstream release
* 01_american.dpatch is updated
* Since thread support in guile-1.8 is now disabled, the segmentation faults
  should not arise anymore. More info at #439923. (Closes: #450499, #458685)
[kohda]
* This version fixed menu problem.  (Closes: #447083)
* Reverted orig.tar.gz to the upstream tarball.

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
    rectangles new_rs;
130
130
    rectangles mid_rs;
131
131
    rectangles count= rs;
132
 
    while (!nil (count)) {
 
132
    while (!is_nil (count)) {
133
133
      rectangle& r= count->item;
134
134
      if ((lbusy && (r->x1 < left)) || (rbusy && (r->x2 > right))) new_rs << r;
135
135
      else mid_rs << r;
136
136
      count= count->next;
137
137
    }
138
138
    rs= new_rs;
139
 
    if (!nil (mid_rs)) rs= rs * least_upper_bound (mid_rs);
 
139
    if (!is_nil (mid_rs)) rs= rs * least_upper_bound (mid_rs);
140
140
 
141
141
    // cout << "  out: " << rs << "\n\n";
142
142
  }
374
374
 
375
375
path
376
376
concat_box_rep::find_tree_path (path bp) {
377
 
  if (atom (bp)) {
 
377
  if (is_atom (bp)) {
378
378
    if (bp->item == 0) {
379
379
      if (is_accessible (lip)) return reverse (lip);
380
380
      else return reverse (descend_decode (lip, 0));
389
389
 
390
390
cursor
391
391
concat_box_rep::find_cursor (path bp) {
392
 
  if (atom (bp)) return box_rep::find_cursor (bp);
 
392
  if (is_atom (bp)) return box_rep::find_cursor (bp);
393
393
  else {
394
394
    int i= bp->item, j, n;
395
395
    cursor cu= bs[i]->find_cursor (bp->next);
422
422
selection
423
423
concat_box_rep::find_selection (path lbp, path rbp) {
424
424
  if ((N(bs) == 0) ||
425
 
      ((!atom (lbp)) && (!atom (rbp)) && (lbp->item == rbp->item)))
 
425
      ((!is_atom (lbp)) && (!is_atom (rbp)) && (lbp->item == rbp->item)))
426
426
    return composite_box_rep::find_selection (lbp, rbp);
427
427
 
428
428
  int  i;
429
 
  int  i1  = atom (lbp)? 0      : lbp->item;
430
 
  int  i2  = atom (rbp)? N(bs)-1: rbp->item;
431
 
  path lbp1= atom (lbp)? path (i1, bs[i1]->find_left_box_path ()) : lbp;
 
429
  int  i1  = is_atom (lbp)? 0      : lbp->item;
 
430
  int  i2  = is_atom (rbp)? N(bs)-1: rbp->item;
 
431
  path lbp1= is_atom (lbp)? path (i1, bs[i1]->find_left_box_path ()) : lbp;
432
432
  path rbp1= path (i1, bs[i1]->find_right_box_path ());
433
433
  path lbp2= path (i2, bs[i2]->find_left_box_path ());
434
 
  path rbp2= atom (rbp)? path (i2, bs[i2]->find_right_box_path ()): rbp;
 
434
  path rbp2= is_atom (rbp)? path (i2, bs[i2]->find_right_box_path ()): rbp;
435
435
 
436
436
  /*
437
437
  cout << "Find selection " << lbp << " --- " << rbp << "\n"
460
460
      path rbpi= path (i, bs[i]->find_right_box_path ());
461
461
      rs << find_selection (lbpi, rbpi)->rs;
462
462
    }
463
 
    if (nil (rs)) return selection (rectangles (), lp, rp);
 
463
    if (is_nil (rs)) return selection (rectangles (), lp, rp);
464
464
    rectangle r= least_upper_bound (rs);
465
465
    return selection (r, lp, rp);
466
466
  }
520
520
  phrase_box_rep (path ip, array<box> bs, array<SI> spc);
521
521
  ~phrase_box_rep ();
522
522
  void position_at (SI x, SI y, rectangles& change_log_ptr);
523
 
  void display (ps_device dev);
 
523
  void display (renderer ren);
524
524
};
525
525
 
526
526
phrase_box_rep::phrase_box_rep (path ip, array<box> bs, array<SI> spc):
546
546
}
547
547
 
548
548
void
549
 
phrase_box_rep::display (ps_device dev) {
550
 
  dev->apply_shadow (x1, y1, x2, y2);
 
549
phrase_box_rep::display (renderer ren) {
 
550
  ren->apply_shadow (x1, y1, x2, y2);
551
551
}
552
552
 
553
553
/******************************************************************************