Commit Graph

562 Commits

Author SHA1 Message Date
Christopher Jeffrey 2b33e34d3a even more listbar work. 2014-01-11 18:54:26 -06:00
Christopher Jeffrey 66933f63b6 remove old listbar.setItems. 2014-01-11 18:24:11 -06:00
Christopher Jeffrey 6ed2451e36 listbar work. 2014-01-11 18:23:38 -06:00
Christopher Jeffrey 045f8d6dc1 lots of work for different widgets. 2014-01-11 17:26:36 -06:00
Christopher Jeffrey 5b38ebfefd fix problem with textarea borders and cursors. 2014-01-05 01:01:21 -06:00
Christopher Jeffrey e4de476c7f fix double line feed problem in textboxes. 2014-01-04 16:02:10 -06:00
Christopher Jeffrey e3baaa9236 Revert "lazy loading for modules."
This reverts commit 999b47a71c58f0d327462067d126b592adce10eb.
2014-01-01 22:47:29 -06:00
Christopher Jeffrey 636bb45965 lazy loading for modules. 2014-01-01 22:47:29 -06:00
Christopher Jeffrey c73a6c47b9 expose screen.enter and screen.leave. fixes #29. 2014-01-01 22:47:29 -06:00
Christopher Jeffrey 42291fad3b Merge pull request #22 from naggie/master
add var self = this to progress bar
2014-01-01 19:54:56 -08:00
Christopher Jeffrey 6a393f5a32 fix spacing in tput.js. 2013-12-04 06:34:17 -06:00
Christopher Jeffrey 1451077f12 use bch properly. 2013-10-16 06:51:14 -05:00
Christopher Jeffrey c8116f6569 fix clock centering. 2013-10-16 06:46:02 -05:00
Christopher Jeffrey c5d2c45f19 readEditor error handling. 2013-09-14 00:02:00 -05:00
Callan Bryant 4d0ed49bac add var self = this to progress bar
Fixes crash when using progress bar:
	ReferenceError: self is not defined
	at ProgressBar.<anonymous>
	(/home/cbryant/bl/node_modules/blessed/lib/widget.js:4862:11)
	...
						v
2013-09-11 12:22:08 +01:00
Christopher Jeffrey 353794224c stop using termcap aliases. 2013-08-29 21:55:36 -05:00
Christopher Jeffrey b5026af628 always default to windows-ansi on windows. minor refactor. 2013-08-29 18:22:35 -05:00
Christopher Jeffrey a14650860d fix terminfo operators. fixes #19. 2013-08-29 17:47:14 -05:00
Christopher Jeffrey 97b6d6faee cleanup _prefix and readTermcap. 2013-08-29 17:41:19 -05:00
Christopher Jeffrey a1c91ccb99 cleanup. 2013-08-28 23:49:25 -05:00
Christopher Jeffrey 4b1365bccc always have list item selected. 2013-08-27 11:10:09 -05:00
Christopher Jeffrey 1625046d9c filemanager label. do not hook remove() from List. 2013-08-27 10:25:20 -05:00
Christopher Jeffrey f8c2ebef1d assume screen.tput is present. 2013-08-27 09:04:00 -05:00
Christopher Jeffrey 00ee15a32f better terminfo/cap discovery. fixes #17. 2013-08-24 22:31:33 -05:00
Christopher Jeffrey 38f234aa91 add getScrollHeight. fixes #16. 2013-08-20 13:34:18 -05:00
Christopher Jeffrey 0eaff0bb07 fix enter key workaround. minor. typo. 2013-08-18 15:02:35 -05:00
Christopher Jeffrey 18d97ce0d7 fix calls to clearPos in render hooks. 2013-08-15 07:14:56 -05:00
Christopher Jeffrey 65fd7d2529 fix shrink rendering bug. 2013-08-15 06:42:08 -05:00
Christopher Jeffrey 34e451bbfa minor fix. potential fixes. 2013-08-13 13:09:24 -05:00
Christopher Jeffrey 2953a469da do not scroll if detached. fixes #8. 2013-08-13 13:01:31 -05:00
Christopher Jeffrey 8460e1c8a0 possibly fix max autoPadding height+border problem
An element with a border has a child with no height or width properties, but a
left and top of 0: this causes the child elements background to cover the
bottom and right borders. It doesn't have a `position.right`, but `iright`
still needs to be subtracted.
2013-08-13 11:56:30 -05:00
Christopher Jeffrey 214ad84a66 add setIndex method. see #9. 2013-08-13 11:44:04 -05:00
Christopher Jeffrey 070cbd9001 decode mouse events and responses properly. 2013-08-13 11:30:44 -05:00
Christopher Jeffrey d42adf7e32 make enter and return keypresses identical on all platforms. see #2. 2013-08-13 11:30:20 -05:00
Christopher Jeffrey 6f9ae457e4 add button.value. add simple form example. 2013-08-13 10:54:17 -05:00
Christopher Jeffrey 185a05d759 rename bgChar. 2013-08-12 09:07:19 -05:00
Christopher Jeffrey 4b6cf96030 Merge pull request #12 from johnspackman/element-bg-char
Added a background fill character to Element
2013-08-12 06:50:19 -07:00
John Spackman ffd98d0f8e Added a background fill character to Element
This is used to fill the background of the element, EG for text area I
typically set this to '_' to show the extent of the field
2013-08-12 14:45:01 +01:00
Christopher Jeffrey 7b3557262f check TERMINFO_DIRS correctly. 2013-08-11 23:13:28 -05:00
Christopher Jeffrey 980e65bd2c try hex char representations for terminfo subdirectory. see #2. 2013-08-11 23:04:00 -05:00
Christopher Jeffrey a30d3ecbe8 switch back to old acs. 2013-08-10 15:48:27 -05:00
Christopher Jeffrey 66dc2118e7 add fastCSR option. 2013-08-10 10:02:29 -05:00
Christopher Jeffrey fc92dca39c remove old acs code. 2013-08-10 09:34:37 -05:00
Christopher Jeffrey 2ba6dcc2b8 acs work. potential wide char support. 2013-08-10 09:33:41 -05:00
Christopher Jeffrey 8c558dbf3f fix clearPos and clickable/keyable check on removal. fixes #6. 2013-08-08 13:47:59 -05:00
Christopher Jeffrey 94bdb41dd1 fix readme. improve tput._print. refactor test/tput.js. 2013-08-08 06:19:44 -05:00
Christopher Jeffrey 45f8f0e5bb add getScroll method. 2013-08-06 01:06:33 -05:00
Christopher Jeffrey 16bbb5ea24 allow zero-width elements. enforce minimums for shrink. 2013-08-04 09:20:50 -05:00
Christopher Jeffrey 6cb640c0e5 remove non-printable chars from comment. 2013-08-04 08:46:26 -05:00
Christopher Jeffrey abd89d3aee minor: fix indexOf call. 2013-08-04 08:40:53 -05:00
Christopher Jeffrey 4ad7d90c9d mark acs as broken if the terminal uses the pc alt charset as acs. 2013-08-04 08:36:51 -05:00
Christopher Jeffrey c05beb3059 setup method. use path.sep wherever possible. misc. 2013-08-04 08:13:01 -05:00
Christopher Jeffrey 8ebbbbac65 add setText and getText methods. expose element and node. 2013-08-04 04:59:28 -05:00
Christopher Jeffrey dadf185a87 cleanup mouse handler. improve "visible" getter. 2013-08-04 04:38:29 -05:00
Christopher Jeffrey c746cd7197 v0.0.20 2013-08-04 01:29:54 -05:00
Christopher Jeffrey 17c4cb1e2a minor changes and cleanup. 2013-08-04 01:21:48 -05:00
Christopher Jeffrey b5c7aed3ad clean up old code. 2013-08-04 01:21:48 -05:00
mscdex a1616aec0a Better Windows support 2013-08-02 21:59:49 -04:00
Christopher Jeffrey b7fa80cc2e fix uncaught error throwing. 2013-08-02 12:47:22 -05:00
Christopher Jeffrey 7a8a0d2591 setMouse improvements. do not allow fg changes on selected items. do not bubble render events. 2013-08-02 05:59:54 -05:00
Christopher Jeffrey 52a9f5d182 fix scroll rendering for children with padding. 2013-08-01 20:00:24 -05:00
Christopher Jeffrey c4a7f05025 obscure overlapping sides in scrolling elements. 2013-08-01 04:19:58 -05:00
Christopher Jeffrey 598be3bb88 refactor constructors. 2013-08-01 03:28:10 -05:00
Christopher Jeffrey d3c34f6f89 optimize clickable sort. better autofocus. flush on exception. 2013-08-01 02:52:03 -05:00
Christopher Jeffrey b2666ffecb add event bubbling. 2013-08-01 01:02:16 -05:00
Christopher Jeffrey 0e047b8e51 minor fixes. 2013-07-31 19:21:10 -05:00
Christopher Jeffrey f3df07a237 buffer everything. cancel acs at the end of draw() if necessary. 2013-07-31 17:43:03 -05:00
Christopher Jeffrey 51771dc19a add log method to program object. 2013-07-31 00:43:24 -05:00
Christopher Jeffrey 2e58aed1ea refactor position and new padding code. 2013-07-30 23:57:48 -05:00
Christopher Jeffrey 78a3726f2f add auto-positioning which respects padding and borders. 2013-07-30 23:46:07 -05:00
Christopher Jeffrey ac88ceaebe remove radio-button handling from checkbox. 2013-07-29 19:27:15 -05:00
Christopher Jeffrey 33214ee924 cleanup new dump method. 2013-07-29 19:06:22 -05:00
Christopher Jeffrey b7e7a8264b better dumps. 2013-07-29 19:00:31 -05:00
Christopher Jeffrey 81267dbd2a move el._focus to screen._focus. 2013-07-29 17:40:48 -05:00
Christopher Jeffrey af27e80447 fix readme typo. 2013-07-29 17:35:48 -05:00
Christopher Jeffrey 82322ac017 allow border option to be a string. 2013-07-29 17:22:21 -05:00
Christopher Jeffrey 1a4c0cd761 fix mwidth for elements with no content. 2013-07-29 16:49:44 -05:00
Christopher Jeffrey 36415f76b6 fix textbox/textarea. 2013-07-29 16:38:19 -05:00
Christopher Jeffrey d2226c3295 improve focus. fix getCoords. readme. 2013-07-29 15:49:09 -05:00
Christopher Jeffrey a3e2983b4b fix form errors. 2013-07-29 10:40:59 -05:00
Christopher Jeffrey 6a03ad42ff textbox. progressbar. misc. readme. 2013-07-29 09:14:03 -05:00
Christopher Jeffrey 2dfedf5e47 enable textbox input-on-focus. 2013-07-29 04:23:52 -05:00
Christopher Jeffrey 9b77e3df63 fix setEffects and failed fg/bg 256 color sequences. 2013-07-29 04:22:20 -05:00
Christopher Jeffrey 9a1411338c fix small error. 2013-07-28 14:49:01 -05:00
Christopher Jeffrey 3bcbd9b39f enable new parseTags method. clean up old code. 2013-07-28 14:18:28 -05:00
Christopher Jeffrey 084f28fcff content attribute and tag handling.
- handle content attributes with better respect to element's style.
- add a more sophisticated tag parser.
2013-07-28 13:20:52 -05:00
Christopher Jeffrey 927c40d2f3 fix mwidth. minor. 2013-07-28 10:51:43 -05:00
Christopher Jeffrey f8fbb2a0c8 remove dwidth characters for now. 2013-07-28 10:19:04 -05:00
Christopher Jeffrey f236898f73 optimize shrink width. 2013-07-28 10:02:04 -05:00
Christopher Jeffrey 9cc1f53d9a refactor wrapContent. 2013-07-28 09:43:28 -05:00
Christopher Jeffrey 88da43bfaf fix empty lines in wrapContent. 2013-07-28 09:24:08 -05:00
Christopher Jeffrey a82ad19110 fixed only affects one level of scrollable ancestors. 2013-07-28 03:01:09 -05:00
Christopher Jeffrey 38473b6bfa comments. enable csr for elements with scrollbars. 2013-07-27 08:13:29 -05:00
Christopher Jeffrey d9ca7112bc scrollbar track. 2013-07-27 07:34:32 -05:00
Christopher Jeffrey 80ae319225 back_color_erase comments. 2013-07-27 06:53:09 -05:00
Christopher Jeffrey 8f989eeadd fix scrollbar arithmetic. 2013-07-27 06:52:45 -05:00
Christopher Jeffrey 69f5993735 make new scrollable code compatible with get=false. add fixed option. 2013-07-27 05:37:53 -05:00
Christopher Jeffrey 2dc3146d1f cleanup scroll. 2013-07-27 05:19:32 -05:00
Christopher Jeffrey ee71a1ac61 more scroll work. 2013-07-27 05:14:02 -05:00
Christopher Jeffrey d63762fbe8 tput.js fixes. 2013-07-27 05:13:04 -05:00
Christopher Jeffrey efbae0c203 cleanup scroll code. 2013-07-26 01:45:39 -05:00
Christopher Jeffrey 8ea1fe4dab working nested scrolling. 2013-07-26 01:38:25 -05:00
Christopher Jeffrey ea857ea550 fix nested scrollable elements. 2013-07-25 18:09:00 -05:00
Christopher Jeffrey 19dd8a47d0 fix scrolling obfuscation for elements with borders. 2013-07-25 01:20:47 -05:00
Christopher Jeffrey 25133923e3 allow text to be obfuscated within child elements during a scroll. 2013-07-24 22:47:03 -05:00
Christopher Jeffrey 11d7a98303 make textbox inherit from textarea. 2013-07-24 20:41:11 -05:00
Christopher Jeffrey 633b76cec5 more textbox/textarea refactoring. 2013-07-24 18:20:30 -05:00
Christopher Jeffrey c1f17e866c refactor textbox and textarea render/setValue. 2013-07-24 18:05:56 -05:00
Christopher Jeffrey 6fde3e3a38 misc fixes for radiobutton, textarea, textbox, checkbox. 2013-07-24 17:16:55 -05:00
Christopher Jeffrey 1c9d25780a add a scrollable option. 2013-07-24 15:39:22 -05:00
Christopher Jeffrey 5e2f1061d1 misc - add a blessed.js file. 2013-07-24 14:41:02 -05:00
Christopher Jeffrey 1b5155cfae refactor and clean up program.js. 2013-07-24 14:17:52 -05:00
Christopher Jeffrey 0372788f2d add a buffering write function for program. 2013-07-24 13:23:35 -05:00
Christopher Jeffrey 2f7967031e readme. move Box methods onto Element. add clearBaseLine and getContent. 2013-07-23 18:38:55 -05:00
Christopher Jeffrey 31030113cf buffer everything - this prevents flickering on xterm and may improve terminal rendering speed. 2013-07-23 18:04:22 -05:00
Christopher Jeffrey b6bee303a9 fix scroll obfuscation. 2013-07-23 16:57:30 -05:00
Christopher Jeffrey 9aaabacf68 fix initial setContent call. fix spawn() cursor handling. 2013-07-23 16:37:54 -05:00
Christopher Jeffrey da49a89b28 refactor wrapContent. fix/use/improve getCoords(), scroll(), hide(). 2013-07-23 15:40:53 -05:00
Christopher Jeffrey 76cc6d37e7 make text wrapping optional. 2013-07-23 14:43:14 -05:00
Christopher Jeffrey f56d7386c6 more pre-wrap line handling improvements. 2013-07-23 14:37:44 -05:00
Christopher Jeffrey 36c5351fde allow handling of pre-wrapped text for line methods. 2013-07-23 14:16:20 -05:00
Christopher Jeffrey 6bfb47632e list.items fix. box line methods. 2013-07-23 13:31:05 -05:00
Christopher Jeffrey b8f1241bca fix scrolling glitch. 2013-07-23 10:38:54 -05:00
Christopher Jeffrey 73939984b4 misc scrollable positioning. 2013-07-23 09:38:30 -05:00
Christopher Jeffrey add8aaa664 stop using the options object for positioning. 2013-07-23 07:04:52 -05:00
Christopher Jeffrey 11c6e7269f matchColor and BCE tput check. 2013-07-23 06:34:40 -05:00
Christopher Jeffrey 77885514aa go back to using arrays for out for now. 2013-07-23 03:29:37 -05:00
Christopher Jeffrey 8c4d70d1e1 fix BCE handling. 2013-07-23 03:07:57 -05:00
Christopher Jeffrey 8f936d00b7 tput.js refactor. rename variables. 2013-07-23 00:37:13 -05:00
Christopher Jeffrey 5e2ca90f04 more tput.js work, fixes. cleanup. 2013-07-23 00:25:04 -05:00
Christopher Jeffrey fe9406aba1 more tput fixes/improvements/refactoring. 2013-07-22 22:28:01 -05:00
Christopher Jeffrey e771fc9fc9 improvements to tput and colors. 2013-07-22 00:59:56 -05:00
Christopher Jeffrey 346e39b723 cleanup. improve BCE. remove old code. 2013-07-21 23:53:10 -05:00
Christopher Jeffrey 00e680d413 work on adding back_color_erase handling, acs optimization, and other stuff ncurses usually handles. 2013-07-21 21:05:35 -05:00
Christopher Jeffrey de79656b04 rewrite scrolling system a bit. 2013-07-21 05:36:45 -05:00
Christopher Jeffrey 62ebd04231 move el.focus code elsewhere. 2013-07-21 02:12:35 -05:00
Christopher Jeffrey a98bef4c90 more scrolling improvements. scrolling form. 2013-07-21 02:03:06 -05:00
Christopher Jeffrey 7af4dbaf1c allow for left/top/right/bottom padding. 2013-07-19 03:14:36 -05:00
Christopher Jeffrey e33838804b scrollable elements. 2013-07-19 01:58:55 -05:00
Christopher Jeffrey 0f4b60314b allow tabbing from textboxes in forms. 2013-07-18 22:49:06 -05:00
Christopher Jeffrey df317bb472 improve position, attribute parsing. misc. 2013-07-18 22:27:18 -05:00
Christopher Jeffrey 3ae01237be fix tput string concatenation. 2013-07-18 18:09:03 -05:00
Christopher Jeffrey b8e0fafaeb misc. options. refactor tests/bin. 2013-07-18 18:02:45 -05:00
Christopher Jeffrey f03f51267b only emit attach if the element was not previously attached. 2013-07-18 15:06:33 -05:00
Christopher Jeffrey 48c2bae2a0 do not violate 80 col limit. 2013-07-18 15:01:42 -05:00
Christopher Jeffrey 4333952081 fix recursion in Form object. 2013-07-18 14:33:00 -05:00
Christopher Jeffrey 61653e3f19 optimize terminfo compilation by using string concatenation instead of array.join. 2013-07-18 09:31:06 -05:00
Christopher Jeffrey 6141b383f1 add a getCoords() method. 2013-07-18 03:56:12 -05:00
Christopher Jeffrey 3c42a91fc5 add wrapContent to Element prototype. 2013-07-18 02:44:31 -05:00
Christopher Jeffrey 42351724d3 move wrapContent. 2013-07-18 02:37:18 -05:00