Changeset 7237
- Timestamp:
- 02/28/08 17:12:43 (5 years ago)
- Location:
- lang/actionscript/FxTerm/trunk
- Files:
-
- 1 removed
- 5 modified
-
FxTerm.as (modified) (7 diffs)
-
Telnet.as (modified) (3 diffs)
-
TelnetPanel.mxml (modified) (2 diffs)
-
Terminal.as (modified) (1 diff)
-
TerminalPanel.mxml (deleted)
-
TerminalTest.mxml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/actionscript/FxTerm/trunk/FxTerm.as
r7129 r7237 17 17 public class FxTerm extends Sprite implements IDataOutput 18 18 { 19 // XXX embed font 20 //[Embed(source='M+2VM+IPAG-circle.ttf', fontName='mplus-ipa')] 21 //private static const mPlusIPA:Class 19 22 20 23 private var screen:Array; // Array of Array of TextCell … … 114 117 115 118 displayTextFormat = new TextFormat(); 119 //displayTextFormat.font = "mplus-ipa"; // XXX embed font 116 120 displayTextFormat.font = "_typewriter"; 117 121 displayTextFormat.kerning = false; … … 157 161 { 158 162 displayTextFormat.size = value; 163 textFormat = displayTextFormat; 164 } 165 166 /** 167 * Get font family. 168 */ 169 public function get font():String 170 { 171 return displayTextFormat.font; 172 } 173 174 /** 175 * Set font family. 176 */ 177 public function set font(value:String):void 178 { 179 displayTextFormat.font = value; 159 180 textFormat = displayTextFormat; 160 181 } … … 279 300 tf.defaultTextFormat = displayTextFormat; 280 301 tf.selectable = true; 302 //tf.embedFonts = true; // XXX embed font 281 303 tf.x = 0; 282 304 // tf.y will be set at adjustDisplay() … … 827 849 } else if( p >= 30 && p <= 37 ) { // set fg 828 850 curattr = attrModifyForeground(curattr, p - 30); 851 } else if( p == 38 ) { 852 // TODO 256 background color 829 853 } else if( p >= 40 && p <= 47 ) { // set bg 830 854 curattr = attrModifyBackground(curattr, p - 40); 855 } else if( p == 38 ) { 856 // TODO 256 background color 831 857 } else if( p == 39 ) { // reset foreground to default 832 858 curattr = attrModifyForeground(curattr, 7); … … 976 1002 var range:Array = screen[crow].splice(ccol); 977 1003 for each(var cell:TextCell in poped) { cell.clear(); } 978 screen = screen[crow].concat(poped);979 screen = screen[crow].concat(range);1004 screen[crow] = screen[crow].concat(poped); 1005 screen[crow] = screen[crow].concat(range); 980 1006 981 1007 lineDirty[crow] = true; … … 989 1015 var poped:Array = screen[crow].splice(ccol); 990 1016 for each(var cell:TextCell in poped) { cell.clear(); } 991 screen = screen[crow].concat(poped);992 screen = screen[crow].concat(range);1017 screen[crow] = screen[crow].concat(poped); 1018 screen[crow] = screen[crow].concat(range); 993 1019 994 1020 var c:int; -
lang/actionscript/FxTerm/trunk/Telnet.as
r7124 r7237 96 96 private function closeHandler(event:Event):void 97 97 { 98 _socket.close(); 98 99 _active = false; 99 100 dispatchEvent(event); … … 102 103 private function ioErrorHandler(event:IOErrorEvent):void 103 104 { 105 _socket.close(); 104 106 _active = false; 105 107 dispatchEvent(event); … … 108 110 private function securityErrorHandler(event:SecurityErrorEvent):void 109 111 { 112 _socket.close(); 110 113 _active = false; 111 114 dispatchEvent(event); -
lang/actionscript/FxTerm/trunk/TelnetPanel.mxml
r7129 r7237 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" 3 creationComplete="init()" layout="vertical" xmlns="*" 3 creationComplete="init()" 4 layout="vertical" xmlns="*" 4 5 styleName="terminalPanel" 5 6 > … … 90 91 <mx:Spacer width="10"/> 91 92 <mx:Label text="Rows" styleName="terminalControlLabel"/> 92 <mx:NumericStepper value="{terminal.row}" minimum="1" maximum=" 40" id="rowStepper"93 <mx:NumericStepper value="{terminal.row}" minimum="1" maximum="200" id="rowStepper" 93 94 change="terminal.row=rowStepper.value" 94 95 styleName="terminalControl"/> 95 96 <mx:Spacer width="10"/> 96 97 <mx:Label text="Font size" styleName="terminalControlLabel"/> 97 <mx:NumericStepper value="{terminal.fontSize}" minimum=" 1" maximum="40" id="fontSizeStepper"98 <mx:NumericStepper value="{terminal.fontSize}" minimum="4" maximum="40" id="fontSizeStepper" 98 99 change="terminal.fontSize=fontSizeStepper.value" 99 100 styleName="terminalControl"/> -
lang/actionscript/FxTerm/trunk/Terminal.as
r7129 r7237 72 72 public function set fontSize(value:Number):void 73 73 { _term.fontSize = value as Object; resized(); } 74 75 [Bindable] 76 public function get font():String 77 { return _term.font; } 78 public function set font(value:String):void 79 { _term.font= value; resized(); } 74 80 75 81 public function set foregroundColors(color8:Array):void -
lang/actionscript/FxTerm/trunk/TerminalTest.mxml
r7136 r7237 7 7 Application { 8 8 backgroundColor: #999999; 9 backgroundAlpha: 0; 10 backgroundGradientAlphas: 0.0, 0.0; 9 11 } 10 12 ]]> … … 19 21 telnet.connect(host, Number(port)); 20 22 } else { 21 telnet.connect("localhost", 23); 23 //telnet.connect("localhost", 12880); 24 telnet.connect("localhost", 2751); 25 //telnet.connect("localhost", 23); 22 26 } 23 27 telnet.terminal.setFocus();
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)