Permalink
Browse files

silly Silly SILLY regressions... I need to reorganize the Iterable cl…

…asses.
  • Loading branch information...
1 parent 0e3c5b6 commit 53a801a863b20a1c345dedca1d1507b29aab2445 @wilkie committed May 26, 2010
Showing with 923 additions and 775 deletions.
  1. +34 −34 cui/filebox.d
  2. +34 −34 cui/listbox.d
  3. +19 −17 cui/tabbox.d
  4. +601 −602 cui/window.d
  5. +0 −1 data/iterable.d
  6. +64 −61 decoders/audio/mp2.d
  7. +170 −25 math/vector.d
  8. +1 −1 tools/seshat/dependencylist.d
View
@@ -21,6 +21,40 @@ import djehuty;
import data.list;
class CuiFileBox : CuiWidget, Iterable!(string) {
+protected:
+
+ void drawLine(uint pos) {
+ Console.position(0, pos - _firstVisible);
+
+ if(pos == _pos) {
+ Console.backcolor = _selectedBackcolor;
+ Console.forecolor = _selectedForecolor;
+ }
+ else {
+ Console.backcolor = _backcolor;
+ Console.forecolor = _forecolor;
+ }
+
+ Console.put(_list[pos]);
+
+ if(_list[pos].length < this.width) {
+ Console.putSpaces(this.width - _list[pos].length);
+ }
+ }
+
+ uint _pos = 0;
+ uint _firstVisible = 0;
+
+ Directory _path;
+ List!(string) _list;
+
+ Color _forecolor = Color.White;
+ Color _backcolor = Color.Black;
+
+ Color _selectedForecolor = Color.Yellow;
+ Color _selectedBackcolor = Color.Black;
+
+public:
this(uint x, uint y, uint width, uint height) {
super(x,y,width,height);
_path = new Directory();
@@ -350,38 +384,4 @@ class CuiFileBox : CuiWidget, Iterable!(string) {
void selectedBackcolor(Color value) {
_selectedBackcolor = value;
}
-
-protected:
-
- void drawLine(uint pos) {
- Console.position(0, pos - _firstVisible);
-
- if(pos == _pos) {
- Console.backcolor = _selectedBackcolor;
- Console.forecolor = _selectedForecolor;
- }
- else {
- Console.backcolor = _backcolor;
- Console.forecolor = _forecolor;
- }
-
- Console.put(_list[pos]);
-
- if(_list[pos].length < this.width) {
- Console.putSpaces(this.width - _list[pos].length);
- }
- }
-
- uint _pos = 0;
- uint _firstVisible = 0;
-
- Directory _path;
- List!(string) _list;
-
- Color _forecolor = Color.White;
- Color _backcolor = Color.Black;
-
- Color _selectedForecolor = Color.Yellow;
- Color _selectedBackcolor = Color.Black;
-
}
View
@@ -12,6 +12,40 @@ import cui.widget;
// Description: This console control abstracts a simple list of items.
class CuiListBox : CuiWidget, Iterable!(string) {
+protected:
+
+ uint _pos = 0;
+ uint _firstVisible = 0;
+
+ char[] _spacestr;
+
+ List!(string) _list;
+
+ Color _forecolor = Color.White;
+ Color _backcolor = Color.Black;
+
+ Color _selectedForecolor = Color.Yellow;
+ Color _selectedBackcolor = Color.Black;
+ void drawLine(uint pos) {
+ Console.position(0, pos - _firstVisible);
+
+ if(pos == _pos) {
+ Console.forecolor = _selectedForecolor;
+ Console.backcolor = _selectedBackcolor;
+ }
+ else {
+ Console.forecolor = _forecolor;
+ Console.backcolor = _backcolor;
+ }
+
+ Console.put(_list[pos]);
+
+ if(_list[pos].length < this.width) {
+ Console.putSpaces(this.width - _list[pos].length);
+ }
+ }
+
+public:
this( uint x, uint y, uint width, uint height ) {
super(x,y,width,height);
@@ -294,38 +328,4 @@ class CuiListBox : CuiWidget, Iterable!(string) {
void selectedBackcolor(Color value) {
_selectedBackcolor = value;
}
-
-protected:
-
- void drawLine(uint pos) {
- Console.position(0, pos - _firstVisible);
-
- if(pos == _pos) {
- Console.forecolor = _selectedForecolor;
- Console.backcolor = _selectedBackcolor;
- }
- else {
- Console.forecolor = _forecolor;
- Console.backcolor = _backcolor;
- }
-
- Console.put(_list[pos]);
-
- if(_list[pos].length < this.width) {
- Console.putSpaces(this.width - _list[pos].length);
- }
- }
-
- uint _pos = 0;
- uint _firstVisible = 0;
-
- char[] _spacestr;
-
- List!(string) _list;
-
- Color _forecolor = Color.White;
- Color _backcolor = Color.Black;
-
- Color _selectedForecolor = Color.Yellow;
- Color _selectedBackcolor = Color.Black;
}
View
@@ -31,6 +31,25 @@ import io.console;
// (eventually.. like check the size when containers are switched to reduce overhead)
class CuiTabBox : CuiContainer, Iterable!(CuiContainer) {
+protected:
+
+ override void _reportMove(uint x, uint y) {
+ _base_y++;
+ super._reportMove(x,y);
+ }
+
+ uint _old_base_y;
+ size_t _curTab = 0;
+
+ List!(CuiContainer) _tabList;
+
+ Color _forecolor = Color.Gray;
+ Color _backcolor = Color.Black;
+
+ Color _selectedForecolor = Color.Yellow;
+ Color _selectedBackcolor = Color.Black;
+
+public:
this(uint x, uint y, uint width, uint height) {
super(x,y,width,height);
_tabList = new List!(CuiContainer);
@@ -332,22 +351,5 @@ class CuiTabBox : CuiContainer, Iterable!(CuiContainer) {
}
}
-protected:
-
- override void _reportMove(uint x, uint y) {
- _base_y++;
- super._reportMove(x,y);
- }
-
- uint _old_base_y;
- size_t _curTab = 0;
-
- List!(CuiContainer) _tabList;
-
- Color _forecolor = Color.Gray;
- Color _backcolor = Color.Black;
-
- Color _selectedForecolor = Color.Yellow;
- Color _selectedBackcolor = Color.Black;
}
Oops, something went wrong.

0 comments on commit 53a801a

Please sign in to comment.