~ubuntu-branches/debian/squeeze/stella/squeeze

« back to all changes in this revision

Viewing changes to src/debugger/gui/ToggleBitWidget.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Kitt
  • Date: 2010-07-12 23:49:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100712234936-juawrr3etzhr2qpv
Tags: 3.1.2-1
* New maintainer (closes: #532039).
* New upstream version (closes: #461121):
  - includes launcher (closes: #396058).
* Fix the reference to the X Window System in the description (closes:
  #411815).
* Move to main, DFSG-free ROMs are available (see README.Debian).
* Enhance the package description.
* Drop the libslang2-dev dependency (closes: #560274).
* Remove the Encoding entry from stella.desktop.
* Avoid ignoring errors when cleaning.
* Add ${misc:Depends} to the package dependencies.
* Provide a doc-base file to install the documentation using doc-base.
* Switch to debhelper 7 with a simplified rules file.
* Use autotools-dev to provide updated configuration files.
* Update to Standards-Version 3.9.0:
  - Move to menu section Applications/Emulators.
  - Move the homepage declaration.
* Re-write the manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
//  SS  SS   tt   ee      ll   ll  aa  aa
9
9
//   SSSS     ttt  eeeee llll llll  aaaaa
10
10
//
11
 
// Copyright (c) 1995-2008 by Bradford W. Mott and the Stella team
 
11
// Copyright (c) 1995-2010 by Bradford W. Mott, Stephen Anthony
 
12
// and the Stella Team
12
13
//
13
 
// See the file "license" for information on usage and redistribution of
 
14
// See the file "License.txt" for information on usage and redistribution of
14
15
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
15
16
//
16
 
// $Id: ToggleBitWidget.cxx,v 1.8 2008/02/06 13:45:20 stephena Exp $
 
17
// $Id: ToggleBitWidget.cxx 2001 2010-04-10 21:37:23Z stephena $
17
18
//
18
19
//   Based on code from ScummVM - Scumm Interpreter
19
20
//   Copyright (C) 2002-2004 The ScummVM project
74
75
void ToggleBitWidget::drawWidget(bool hilite)
75
76
{
76
77
//cerr << "ToggleBitWidget::drawWidget\n";
77
 
  FrameBuffer& fb = instance()->frameBuffer();
 
78
  FBSurface& s = dialog().surface();
78
79
  int row, col;
79
80
  string buffer;
80
81
 
81
82
  // Draw the internal grid and labels
82
83
  int linewidth = _cols * _colWidth;
83
84
  for (row = 0; row <= _rows; row++)
84
 
    fb.hLine(_x, _y + (row * _rowHeight), _x + linewidth, kColor);
 
85
    s.hLine(_x, _y + (row * _rowHeight), _x + linewidth, kColor);
85
86
  int lineheight = _rows * _rowHeight;
86
87
  for (col = 0; col <= _cols; col++)
87
 
    fb.vLine(_x + (col * _colWidth), _y, _y + lineheight, kColor);
 
88
    s.vLine(_x + (col * _colWidth), _y, _y + lineheight, kColor);
88
89
 
89
90
  // Draw the list items
90
91
  for (row = 0; row < _rows; row++)
97
98
 
98
99
      // Draw the selected item inverted, on a highlighted background.
99
100
      if (_currentRow == row && _currentCol == col && _hasFocus)
100
 
        fb.fillRect(x - 4, y - 2, _colWidth+1, _rowHeight+1, kTextColorHi);
 
101
        s.fillRect(x - 4, y - 2, _colWidth+1, _rowHeight+1, kTextColorHi);
101
102
 
102
103
      if(_stateList[pos])
103
104
        buffer = _onList[pos];
107
108
      // Highlight changes
108
109
      if(_changedList[pos])
109
110
      {
110
 
        fb.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, kDbgChangedColor);
111
 
        fb.drawString(_font, buffer, x, y, _colWidth, kDbgChangedTextColor);
 
111
        s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, kDbgChangedColor);
 
112
        s.drawString(_font, buffer, x, y, _colWidth, kDbgChangedTextColor);
112
113
      }
113
114
      else
114
 
        fb.drawString(_font, buffer, x, y, _colWidth, kTextColor);
 
115
        s.drawString(_font, buffer, x, y, _colWidth, kTextColor);
115
116
    }
116
117
  }
117
118
}