History log of /haiku/src/apps/stylededit/StyledEditView.cpp
Revision Date Author Comments
# fa19dd44 10-Dec-2015 looncraz <looncraz@looncraz.net>

apps: Convert to using Set*UIColor.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0045-0075, 0077-0087 from looncraz, unmodified.


# e62d9cf8 30-Jun-2015 Philippe Saint-Pierre <stpere@gmail.com>

StyledEdit: Rework of the font color system

1) The default font color is now B_DOCUMENT_TEXT_COLOR
2) The font color menu now shows a palette
3) The font color menu now includes a "default" item, set
to B_DOCUMENT_TEXT_COLOR
4) Added a Todo mentionning it would be ideal to not save the default color
itself, but instead saving the fact the default color was used. Maybe allow the
StyleBuffer to use a Null color or something similar.


# 2cfeb3ca 04-Apr-2013 John Scipione <jscipione@gmail.com>

Update StyledEdit to use document background color. Style fixes.

See ticket #5293 Colors_picture2.png


# 0f4985d8 22-Dec-2012 Vlad Slepukhin <slp.vld@gmail.com>

StyledEdit:Implemented StatusLine and R5-like ReadOnly mode

This work was done during GCI2012.

Fixes #3655

Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>


# 0cc8d8ab 10-Dec-2012 Siarzhuk Zharski <zharik@gmx.li>

Node monitoring and on-the-fly textencoding change

This work is based on the draft node monitoring implementation
created by Vlad Slepukhin during GCI 2012 and includes following:

* Refactoring of the document "Reload" feature - it replaces
"Revert to saved" one because do the same things and a bit more.
Looks like we have to keep "Reload" menu entry alive until
StyledEdit will get more functional Undo/Redo features. Reload
functionality is also heavily used in node monitoring and
on-the-fly text encoding changing. Fixes #6887;

* Support for text encoding on-the-fly switching. This make
life easier for those who lives in countires with multiple
popular 8-bit encodings. Russia is the sample of such
de facto standards' clash (KOI-8R vs CP1251 etc.);

* Node Monitoring support with alerting user in case the file
size or modification time were changed. Another alert is shown
in case edited file was removed or moved outside of the current
volume. Moving file inside of current volume silently changes
references. Choosing "Ignore" will supress new change alerts
until next Reload or Save user request;

* Do not nag user on quiting window with zero-length untitled
document. Not a Big Deal but annoys in some cases using this
editor session as temporary storage.


# 48249b20 25-Jul-2012 Humdinger <humdingerb@gmail.com>

Stylefixes, no functional change.


# e7d3e55a 04-Jun-2010 Jérôme Duval <korli@users.berlios.de>

Fixed ReplaceAll behavior with mixed styles. Also suppress undo for replacements as it doesn't seem supported by BTextView.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37008 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8e26769c 29-Mar-2009 Rene Gollent <anevilyak@gmail.com>

Patch by Bryce Groff: add line number display to StyledEdit. Fixes ticket #2623. It does however expose an interesting curiosity in BTextView - CurrentLine() does not count a line until it's actually had some text put into it (i.e. simply hitting enter at the last line of the doc does not increment the number that CurrentLine() returns. Is this an oversight or does R5 behave this way also?



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29782 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f303cd6c 03-Sep-2007 Ryan Leavengood <leavengood@gmail.com>

Applied patch from "HOST", with a few small style fixes myself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22163 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0fc29af 17-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

StyledEdit now makes use of the new BTranslationUtils functions which
simplify the code quite a lot.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19845 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2583a582 03-Aug-2006 DarkWyrm <darkwyrm@gmail.com>

Fix build under R5


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18367 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b14ba1a 10-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Now uses BTextView::FreeTextRunArray() instead of just free() where appropriate.
* When reading/writing int32, the type of the variable should match.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16699 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 31139022 10-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed some minor bugs and oddities, improved error messages.
* Big-time cleanup, added license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16696 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 375cec2c 03-Feb-2006 Jérôme Duval <korli@users.berlios.de>

added error checks around, hope it can help


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16217 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6dc85dbf 29-Oct-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a comment to some stuff which wasn't so clear (thanks to Andrew for clarifying this).
Now we free() the run_array allocated by "RunArray()" (as we're supposed to do), thus removing a leak.
Changed some includes from <> to "" just for my personal pleasure.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9648 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c33f5604 28-Jul-2004 shatty <shatty@nowhere.fake>

fix word wrap at file open time bug


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8495 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3f7e8e73 29-Dec-2003 shatty <shatty@nowhere.fake>

for faster, more reliable translation, using larger buffers


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5824 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c78d8ec 12-Aug-2003 shatty <shatty@nowhere.fake>

changed to not exercise r5 lib-style convert_to_utf8 behavior on 0 bytes because the r5 lib-style behavior contradicts the bebook specification


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4277 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 54b7d674 10-Aug-2003 shatty <shatty@nowhere.fake>

good boys delete what they new up when they get destroyed


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4266 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae6fb3b6 31-Jul-2003 shatty <shatty@nowhere.fake>

remove stdio


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4165 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0b6b71e9 31-Jul-2003 shatty <shatty@nowhere.fake>

flank more carefully change marking actions, return the result from convert_to_utf8


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4164 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 46555d8f 26-Jul-2003 shatty <shatty@nowhere.fake>

changed to use new BCharacterSet and BCharacterSetRoster from support kit. because libtextencoding.so is not finished yet it uses those sources directly instead of the library.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4092 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 62df02c3 15-Jul-2003 shatty <shatty@nowhere.fake>

set changes monitoring on return by error


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3984 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 155ae4c5 06-Jul-2003 shatty <shatty@nowhere.fake>

working input with formatting


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3869 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08db2111 06-Jul-2003 shatty <shatty@nowhere.fake>

format nuking, but working input conversion


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3868 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ebf4610f 06-Jul-2003 shatty <shatty@nowhere.fake>

broken but halfway working input conversion


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3867 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 670567f9 05-Jul-2003 shatty <shatty@nowhere.fake>

moved encoding handling into StyledEditView and began reading the be:encoding attribute


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3866 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5d46a494 05-Jul-2003 shatty <shatty@nowhere.fake>

fixed minor writing error


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3864 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a1a68508 05-Jul-2003 shatty <shatty@nowhere.fake>

working save as encoding


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3863 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8f63353b 22-Nov-2002 shatty <shatty@nowhere.fake>

lots of font related changes to reduce memory consumption and speed up initialization. also fixes for word wrapping screen width.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2062 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0b46ec98 21-Nov-2002 shatty <shatty@nowhere.fake>

improved soft wrapping, now saves alignment and wrapping states


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2061 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ed48868f 05-Nov-2002 shatty <shatty@nowhere.fake>

style cleanup ; undo, revert, redo, save, quit functions fixed up ; no more extra windows ; quit when all windows are closed ; fix grey lines when scrolling


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1848 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7afd44b 23-Sep-2002 Phil Greenway <sikosis@gmail.com>

Initial Check in. Coded by Mattias Sundblad.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1135 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e62d9cf8c568e4fd2c80e163cbdae5a4376e898f 30-Jun-2015 Philippe Saint-Pierre <stpere@gmail.com>

StyledEdit: Rework of the font color system

1) The default font color is now B_DOCUMENT_TEXT_COLOR
2) The font color menu now shows a palette
3) The font color menu now includes a "default" item, set
to B_DOCUMENT_TEXT_COLOR
4) Added a Todo mentionning it would be ideal to not save the default color
itself, but instead saving the fact the default color was used. Maybe allow the
StyleBuffer to use a Null color or something similar.


# 2cfeb3ca9cf0e90a154133fb14d9edf3f9fbad54 04-Apr-2013 John Scipione <jscipione@gmail.com>

Update StyledEdit to use document background color. Style fixes.

See ticket #5293 Colors_picture2.png


# 0f4985d884971e1c221cb02eae16b1f08708629a 22-Dec-2012 Vlad Slepukhin <slp.vld@gmail.com>

StyledEdit:Implemented StatusLine and R5-like ReadOnly mode

This work was done during GCI2012.

Fixes #3655

Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>


# 0cc8d8ab3e4ac684e0ac1c8d6b5b45046b8f6bea 10-Dec-2012 Siarzhuk Zharski <zharik@gmx.li>

Node monitoring and on-the-fly textencoding change

This work is based on the draft node monitoring implementation
created by Vlad Slepukhin during GCI 2012 and includes following:

* Refactoring of the document "Reload" feature - it replaces
"Revert to saved" one because do the same things and a bit more.
Looks like we have to keep "Reload" menu entry alive until
StyledEdit will get more functional Undo/Redo features. Reload
functionality is also heavily used in node monitoring and
on-the-fly text encoding changing. Fixes #6887;

* Support for text encoding on-the-fly switching. This make
life easier for those who lives in countires with multiple
popular 8-bit encodings. Russia is the sample of such
de facto standards' clash (KOI-8R vs CP1251 etc.);

* Node Monitoring support with alerting user in case the file
size or modification time were changed. Another alert is shown
in case edited file was removed or moved outside of the current
volume. Moving file inside of current volume silently changes
references. Choosing "Ignore" will supress new change alerts
until next Reload or Save user request;

* Do not nag user on quiting window with zero-length untitled
document. Not a Big Deal but annoys in some cases using this
editor session as temporary storage.


# 48249b20646d5a6a58b084eee73827953df407ca 25-Jul-2012 Humdinger <humdingerb@gmail.com>

Stylefixes, no functional change.


# e7d3e55ad60a62998aa0fbb10ac2bc93b2be1033 04-Jun-2010 Jérôme Duval <korli@users.berlios.de>

Fixed ReplaceAll behavior with mixed styles. Also suppress undo for replacements as it doesn't seem supported by BTextView.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37008 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8e26769c8b0451466b4334a54403c5f29277b358 29-Mar-2009 Rene Gollent <anevilyak@gmail.com>

Patch by Bryce Groff: add line number display to StyledEdit. Fixes ticket #2623. It does however expose an interesting curiosity in BTextView - CurrentLine() does not count a line until it's actually had some text put into it (i.e. simply hitting enter at the last line of the doc does not increment the number that CurrentLine() returns. Is this an oversight or does R5 behave this way also?



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29782 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f303cd6cc2bb3c3f415ca7083e2b90c720d99fa9 03-Sep-2007 Ryan Leavengood <leavengood@gmail.com>

Applied patch from "HOST", with a few small style fixes myself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22163 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0fc29af1fce2ab5ad25cb9bca43700f00b80a68 17-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

StyledEdit now makes use of the new BTranslationUtils functions which
simplify the code quite a lot.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19845 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2583a5828fddff79227fde638d3a2866d9580261 03-Aug-2006 DarkWyrm <darkwyrm@gmail.com>

Fix build under R5


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18367 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b14ba1a07feab7227a35a5013fbde4fe683eb78 10-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Now uses BTextView::FreeTextRunArray() instead of just free() where appropriate.
* When reading/writing int32, the type of the variable should match.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16699 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 31139022cd3056691fc8d6f64b2d9ffa9a101de3 10-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed some minor bugs and oddities, improved error messages.
* Big-time cleanup, added license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16696 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 375cec2c5e08ddde35579d4336a9d1946d1d122b 03-Feb-2006 Jérôme Duval <korli@users.berlios.de>

added error checks around, hope it can help


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16217 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6dc85dbf523ba9b59a81ccefe2994bffa214af1d 29-Oct-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a comment to some stuff which wasn't so clear (thanks to Andrew for clarifying this).
Now we free() the run_array allocated by "RunArray()" (as we're supposed to do), thus removing a leak.
Changed some includes from <> to "" just for my personal pleasure.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9648 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c33f56042745a9654939bce362ba7416a60879fe 28-Jul-2004 shatty <shatty@nowhere.fake>

fix word wrap at file open time bug


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8495 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3f7e8e7395428cadab1afd6bd54906e8b481e404 29-Dec-2003 shatty <shatty@nowhere.fake>

for faster, more reliable translation, using larger buffers


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5824 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c78d8ec9e251e9e20b709a9ec6d9cccd32719c9 12-Aug-2003 shatty <shatty@nowhere.fake>

changed to not exercise r5 lib-style convert_to_utf8 behavior on 0 bytes because the r5 lib-style behavior contradicts the bebook specification


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4277 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 54b7d67454e55e3e9210cec9f896e4e610a51ad7 10-Aug-2003 shatty <shatty@nowhere.fake>

good boys delete what they new up when they get destroyed


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4266 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae6fb3b6f521076a0ea0fd19319a6cdbc439542c 31-Jul-2003 shatty <shatty@nowhere.fake>

remove stdio


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4165 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0b6b71e99a06634465c346d8dae04b9edb69dc62 31-Jul-2003 shatty <shatty@nowhere.fake>

flank more carefully change marking actions, return the result from convert_to_utf8


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4164 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 46555d8f436bd50ad3a657c87c8db6b6b3a3fd99 26-Jul-2003 shatty <shatty@nowhere.fake>

changed to use new BCharacterSet and BCharacterSetRoster from support kit. because libtextencoding.so is not finished yet it uses those sources directly instead of the library.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4092 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 62df02c3e6ba1da44075387cef356d32f14bcba1 15-Jul-2003 shatty <shatty@nowhere.fake>

set changes monitoring on return by error


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3984 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 155ae4c5cba43a304c7fd7e55a21d906ff8ad720 06-Jul-2003 shatty <shatty@nowhere.fake>

working input with formatting


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3869 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08db2111e11a202956f2f4294a1f9b1cc2a8ef01 06-Jul-2003 shatty <shatty@nowhere.fake>

format nuking, but working input conversion


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3868 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ebf4610ff0f2a8f6d3bd7418c6e340e0efcc55e3 06-Jul-2003 shatty <shatty@nowhere.fake>

broken but halfway working input conversion


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3867 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 670567f9d4b17d6a7b0ef7bdbc9834b56890d7de 05-Jul-2003 shatty <shatty@nowhere.fake>

moved encoding handling into StyledEditView and began reading the be:encoding attribute


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3866 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5d46a49425235725ccdc14338222c2bdf576a0bb 05-Jul-2003 shatty <shatty@nowhere.fake>

fixed minor writing error


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3864 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a1a685089bf7832d3eccea564e632676797f17b0 05-Jul-2003 shatty <shatty@nowhere.fake>

working save as encoding


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3863 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8f63353baff01e03aaeb5a26b04988fd588a0074 22-Nov-2002 shatty <shatty@nowhere.fake>

lots of font related changes to reduce memory consumption and speed up initialization. also fixes for word wrapping screen width.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2062 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0b46ec9848d666ead1fbdf4bdff9cb50182d5213 21-Nov-2002 shatty <shatty@nowhere.fake>

improved soft wrapping, now saves alignment and wrapping states


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2061 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ed48868f638d5129cdd21b59f36e8e227a05aaaa 05-Nov-2002 shatty <shatty@nowhere.fake>

style cleanup ; undo, revert, redo, save, quit functions fixed up ; no more extra windows ; quit when all windows are closed ; fix grey lines when scrolling


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1848 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7afd44bda63d8eb9a9bc62683fbfc73b6b232b7 23-Sep-2002 Phil Greenway <sikosis@gmail.com>

Initial Check in. Coded by Mattias Sundblad.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1135 a95241bf-73f2-0310-859d-f6bbb57e9c96