#
e26329ce |
|
01-Dec-2023 |
John Scipione <jscipione@gmail.com> |
BTextView: Prevent scrolling if text rect is inside view rect No horizontal (or vertical) scrolling allowed if the text rect is inside the view rect in x (or y). This fixes issues with right-aligned text views getting scrolled within bounds becoming left-aligned text views. Prevent scrolling so that this cannot happen unless text is outside the view. You can still get DeskCalc to be in a scrolled over no-longer- right-aligned state by scrolling and resizing repeatedly, but it's better than before and it is at least fixable. This is most likely a bug in DeskCalc. This also fixes issues not being able to scroll all the way right after scrolling left dragging with the mouse. Do not set any limits in _PerformAutoScroll(), all limits are set by the code that does the keyboard handling. Set x and y and call _ScrollBy(); Update limits set in _ScrollBy() to accommodate both keyboard and mouse (taking from mouse and using on keyboard as well). This unifies keyboard and mouse scroll limits in x and y. Change-Id: I0dd24ce03f9b95651bcee4e190564b77f0343863 Reviewed-on: https://review.haiku-os.org/c/haiku/+/7161 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: John Scipione <jscipione@gmail.com>
|
#
64a2e733 |
|
28-Nov-2023 |
John Scipione <jscipione@gmail.com> |
Add _ViewWidth(), _ViewHeight(), _TextWidth(), _TextHeight() private convenience methods to calculate the text view width and height with insets and the text rect width and height without insets respectively. Also add _ViewRect() and _TextRect() methods for completeness, but they are not currently used. Change-Id: I0582bc93a0a3a6820bbb2262a1d726457309ab9f Reviewed-on: https://review.haiku-os.org/c/haiku/+/7162 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
#
0509d19b |
|
01-Dec-2023 |
John Scipione <jscipione@gmail.com> |
BTextView: Stylish fix, -x is clear we don't need -1 * x Change-Id: I38a5e6c88e2ba3b2f82c49aa760942e1799a7595 Reviewed-on: https://review.haiku-os.org/c/haiku/+/7171 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
#
52050c56 |
|
19-Aug-2023 |
PulkoMandy <pulkomandy@pulkomandy.tk> |
BTextView: improve GetHeightForWidth in non editable mode In non editable mode, BTextView computes a preferred size that just fits the current text. This did not take into account the insets from SetInsets, so, when these are used, the resulting view size was too small. Additionally, avoid calling _Refresh that has two problems: it needs the view to already be attached to a window, and it does a lot of things we don't really need here: recomputing scrollbars, clearing the empty space below the text to avoid flickering, and so on. We just need to recompute fTextRect according to the suggested width, to do that, it is enough to call _RecalculateLineBreaks instead. Finally, also restore the text rect at the end of the method, since it is not actually resizing the view, it is very unexpected that it changes the text rect. This is not perfect, as the line breaks from _RecalculateLineBreaks are not undone. But, since the next step is probably to resize the view according to the computed width/height, this will be sorted out at that time. If this proves to be a problem, we can add a second call to _RecalculateLineBreaks after restoing the original text rect, or refactor _RelcalculateLineBreaks so that it can return the new height without actually changing the lines. Change-Id: Ie2fa60c1b2314c8a3346d03ab3ff6843aebaf3dc Reviewed-on: https://review.haiku-os.org/c/haiku/+/6845 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
#
cfbfb847 |
|
03-May-2023 |
John Scipione <jscipione@gmail.com> |
BTextView: Allow nav on selectable but non-editable views This allows arrow keys, page keys, home, end and the blinking cursor on selectable views even if they are non-editable. Input of text characters and backspace are guarded on editable. Paste remains disabled. Change-Id: Ifa5ed8673104e9abd51c52d394894aef48243965 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6407 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
#
7912dad9 |
|
17-Jan-2021 |
John Scipione <jscipione@gmail.com> |
BTextView: Fix Tracker edit name Don't resize text view in FrameResized() if resizable, this is done in _AutoResize() instead. Set text rect width to width of max line when word-wrap is off. Text rect width shrinks to the width of the text matching behavior of BeOS R5 and previous Haiku. This fixes Tracker Edit name. Limit max width to column width in list mode or 30em in icon mode. Filter paste messages limiting to max width in Tracker Edit name. General BTextView fixes: As a consequence of the text rect shrinking to fit the text, adjust highlighting to go at least to edge of the view even if text rect width is narrower. Extend the invalidation area beyond text rect when redrawing to include highlighted areas. Text views behave properly when overflow occurs i.e. when you type text off the end of the text view. The text is nudged over as you type/scroll so that the previous text is visible. This sorta worked before but now works better. Fix text rect centering by replacing switch with BLayoutUtils::AlignOnRect(). Coalesce consecutive draw calls when inserting and deleting text to prevent flashing for example when resizing the window. Redraw text when the text view scrolls fixing a bug I noticed in StyledEdit. Workaround negative height Beezer bug. Fixes #16642, #16476 Change-Id: I2d32d6039944d2dc3218ce4de71f2966cc98c866 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3642 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
d00fc0e3 |
|
07-Apr-2021 |
X512 <danger_mail@list.ru> |
BTextView: fix Text field scripting Change-Id: I2048d7f01fa3694d5687447cf7058fecf03ae15d Reviewed-on: https://review.haiku-os.org/c/haiku/+/4007 Reviewed-by: X512 <danger_mail@list.ru> Reviewed-by: John Scipione <jscipione@gmail.com> Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
|
#
08e58a41 |
|
12-Jan-2020 |
X512 <danger_mail@list.ru> |
TextView: Select dropped text if focused This is convenient and used in most text editors. Change-Id: Ia39b9e6f16cc381a62e10b248033729179a0996c Reviewed-on: https://review.haiku-os.org/c/haiku/+/2110 Reviewed-by: waddlesplash <waddlesplash@gmail.com> Reviewed-by: John Scipione <jscipione@gmail.com> Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
|
#
18970361 |
|
23-Nov-2020 |
John Scipione <jscipione@gmail.com> |
BTextView: ensure text rect width and height is > 0 Helps wth #16476 #16568 Change-Id: Idc8d399cf69776d26e492f568c9ef83bcd7a6686 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3413 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
b76afa5b |
|
24-Sep-2020 |
John Scipione <jscipione@gmail.com> |
BTextView: Draw string even if foundTab Fixes #16544 (regression from hrev54549.) Change-Id: Icca0b50f5432351b9c7ffcb82b1c8195a7ed286b Reviewed-on: https://review.haiku-os.org/c/haiku/+/3267 Reviewed-by: humdinger <humdingerb@gmail.com> Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
|
#
d9385a9d |
|
20-Jul-2020 |
John Scipione <jscipione@gmail.com> |
IK: align BTextView text rect/fix alignment Recalculate line breaks in FrameResized() if word-wrap is on, otherwise only move the text rect into position. StyledEdit was recalculating line breaks before on resize (we have to in this mode) and the frame offset updates for non-wrapping text views are inexpensive. This makes resizing text view's work like StyledEdit everywhere. Scroll to cursor when word-wrap setting changes if text view is editable. If you are viewing a long document changing word-wrap can move the cursor quite far, so scroll back to it. Fix _ActualTabWidth() pen location for right and center-aligned text views so that tabs widths are calculated correctly. Reset fTextRect horizontal limits to bounds minus insets in _RecalculateLineBreaks(), then grow fTextRect based on alignment when wrap is off. Fixing insets also fixes right and center-aligned BTextViews. Left-aligned text view's grow right, right-aligned ones grow left, and center-aligned ones grow out. Make extra scrolling space for all aligned text views go the other way from how it did in hrev24130 (and on left-aligned text view's too) so that half the text is visible when you edit past the end or before the beginnning of a text view instead of none of it. Fixes #1651 #12608 #13796 #15189 Do not _RecalculateLineBreaks() if text view bounds are invalid. In SetText() detect invalid text view bounds and resize the view to the width and height of the first line. Then recalculate line breaks. This fixes BAlert text view size issues. Fixes #16481 (regression from hrev54496.) Remove useless and heavy computation. There is no point in computing line breaks for a 10px wide text view and it takes a long time because it needs a lot of linebreaks. The view eventually gets laid out properly. Fixes #5582 (which was not locale-related, after all.) Only apply default insets if text rect is set to bounds. This ensures that apps that manipulate the text rect can continue to do so without the default insets interfering while apps that don't can benefit from the defaults. If you want to set the text rect to bounds and not use the default insets you must override the default by calling SetInsets(). This prevent the default insets from being applied once apps have changed the text rect fixing a bug in Icon-O-Matic where the text rect insets were being applied incorrectly. Fixes #16488 (regression from hrev54496.) Reduce left and right insets inside text views from full label spacing to half label spacing. Unify padding between BTextControl and BTextView. Move fLayoutData->UpdateInsets() to private BTextView::_UpdateInsets() because we need access to BTextView member variables when deciding whether or not to add the default padding or not. _UpdateInsets() changes: * Don't update insets if BTextView::SetInsets() was called. * Don't add default insets unless fTextRect is set to view Bounds(). * Do not set the right and bottom insets to left and top if negative, set them to 0 like we do to left and top -- DeskCalc bug otherwise. Fixes #15688 Other BTextView fixes: * Replace max_c and min_c with std::max and std::min respectively. * Remove scrolling from one instance of BTextView::SetText() as it produced undesired results while editing a scrolled text view. * Add default insets in _UpdateInsets() * Fix scrolling when entering and deleting text so that some part of the text is always visible. Make visible scroll width depend on font size. * Allow scrolling to a negative offset in x but not y. This allows you to scroll the entire contents of right and centered-aligned text views whose content does not fit in the box. * Change _Refresh() to take an offset instead of a bool so that you can scroll to any offset. * Replace TextLength() with fText->Length() in a couple of places. TextControl changes: * Set text rect in BTextControl::DoLayout(). * Remove AlignTextRect() from TextInput. Fix the following problems in apps: ScreenSaver: Set text rect in PreviewView::AddPreview(). Tracker: Set "Edit name" text view insets to 2. Tweek text rect position to be on top of label in icon, mini-icon, and list mode. Add a TODO that the text rect is a pixel off from the name on some files. Mail: Remove _AlignTextRect() and FrameResized() from AddressTextControl. Use default insets on the text view, defaults are fine here. DeskCalc: Set insets based on font size in ExpressionTextView SetTextRect() instead of manipulating the text rect. Remove _CheckTextRect() and related methods from InputTextView. Icon-O-Matic: Remove _CheckTextRect() and related methods from InputTextView. WebPositive: Remove _AlignTextRect() and FrameResized() from URLTextView and call SetInsets(). StyledEdit: Word-wrap and FrameResized() changes ported to BTextView. Fixes #16476 #16480 #16488 (regressions from hrev54496.) Change-Id: Ifeca6077f8815ccd86d5a3880f99556298aaf0fe Reviewed-on: https://review.haiku-os.org/c/haiku/+/3152 Reviewed-by: John Scipione <jscipione@gmail.com>
|
#
6148533e |
|
22-Aug-2020 |
John Scipione <jscipione@gmail.com> |
Revert "BTextView: remove useless and heavy computation" This reverts commit ca6302dded7e62f3605efe70e652354827e8ec1d.
|
#
22758f16 |
|
17-Aug-2020 |
John Scipione <jscipione@gmail.com> |
Revert "IK: align BTextView text rect/fix alignment" This reverts commit a9b301871d06c0ebe42d22b31c685abed5107acd. hrev54496 Change-Id: Ife3c834ad98d330f04976d9adf3b1553e7aca034 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3153 Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
|
#
a9b30187 |
|
20-Jul-2020 |
John Scipione <jscipione@gmail.com> |
IK: align BTextView text rect/fix alignment Preserve passed in text rect in fTextRext (unless in layout) and create an internal version fAlignedTextRect which is used in place of fTextRect. fAlignedTextRext is aligned to fit the text rect bounds and grows to fit. fAlignedTextRect always grows vertically but only grows horizontally if wrap is off. Left-aligned text view's grow right, right-aligned ones grow left, and center center aligned ones grow out. Set fTextRect to bounds in _DoLayout(). Reduce left and right padding inside text views from full label spacing to half label spacing. Unify padding between BTextControl and BTextView. Fixing padding also fixes right and center-aligned BTextViews. Undo extra scrolling for non-left text views from hrev24130 fixing a scrolling left and right with mouse bug when it shouldn't. Replace max_c and min_c with std::max and std::min respectively. Remove scrolling from one instance of BTextView::SetText as it produced undesired results while editing a scrolled text view. Set text rect in BTextControl::DoLayout() and ScreenSaver PreviewView::AddPreview(). Don't add padding if BTextView::SetInsets() is called. Set insets to 0 in Tracker "Edit name" setting which prevents default padding from being added. This is so that when you rename a file in Tracker the TextView appears on top of the file name text with no padding. 80 char limit fixes. Fixes #1651 #12608 #13796 #15189 #15688 Change-Id: I8c6106effc612f49aff374f29742471628b5df86 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3054 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
ca6302dd |
|
05-Aug-2020 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
BTextView: remove useless and heavy computation There is no point in computing line breaks for a 10px wide text view and it takes a long time because it needs a lot of linebreaks. The view eventually gets laid out properly. This may cause regressions, the TODO here is very old and I don't know to which "other parts of the code" it refers. Possibly they were rewritten, possibly not. In any case, there is no point in keeping this nonsense initial text rect computation, it's better to fix the actual problems. Fixes #5582 (which was not locale-related, after all)
|
#
67597f42 |
|
15-Mar-2020 |
X512 <danger_mail@list.ru> |
Interface kit: fix regression introduced in hrev53944 In hrev53944 selection is cleared if text view lose focus, but it don't work properly in StyledEdit, causing clearing selection when menu is opened. Clear selection on lose focus is needed for text controls, so when you click on another text control, previosly focused text control should clear selection. This behavior is working in BeOS, so some investigation is required. Fixes #15810. Change-Id: Ie104fc1d7e76c2cd2b97d3a0462856fe70cccbbf Reviewed-on: https://review.haiku-os.org/c/haiku/+/2355 Reviewed-by: Stefano Ceccherini <stefano.ceccherini@gmail.com>
|
#
1c9c7729 |
|
12-Jan-2020 |
X512 <danger_mail@list.ru> |
Interface Kit: make BTextControl behave like BeOS Contents of BTextControl should be not selected if text is directly clicked. Selection should be removed if BTextView lose focus. Change-Id: Ifba914c2ada4fc1aac88205f69a64a4356009469 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2109 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
#
bb501d4c |
|
12-Dec-2019 |
X512 <danger_mail@list.ru> |
BTextView and BListView: fix scripting fix #15539 Change-Id: I5139b91214e19b35af1ead203c070837b7a15bd9 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2017 Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
|
#
9c89ceb8 |
|
26-Sep-2019 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
BTextView: missing archiving of HideTyping() This was not stored in BeOS, but that looks like an oversight on their part and adding it is unlikely to break anything. Change-Id: I5dbaeb85adf97afc5040a3ecc1bff264af0b0b57 Reviewed-on: https://review.haiku-os.org/c/haiku/+/1888 Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
|
#
07838f4c |
|
26-Sep-2019 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
BTextView: preserve ViewUIColor when unarchiving When unarchiving, we can rely on BView to properly restore the colors, and we should not alter them. So move the code doing that outside of _InitObject, and into all non-unarchiving constructors instead. Change-Id: I98050c69bb3b8edf6e77ad0498e2dade5eaadb1d Reviewed-on: https://review.haiku-os.org/c/haiku/+/1887 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
#
1ec8732c |
|
16-Jul-2019 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
PVS V506: using pointer to deallocated stack space Change-Id: I43f7d0208f7d644d6f4274a9a718773f7a1346a0 Reviewed-on: https://review.haiku-os.org/c/1600 Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
|
#
17c9e987 |
|
10-Jul-2019 |
Kacper Kasper <kacperkasper@gmail.com> |
TextView: add shortcuts for wordwise delete Change-Id: Ie67f6255c3f5d9d8ccc6699ed42dd71ae593fa16 Reviewed-on: https://review.haiku-os.org/c/1573 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
df4074fb |
|
24-Nov-2018 |
Augustin Cavalier <waddlesplash@gmail.com> |
Remove a lot of unused constants. Spotted by Clang. No functional change intended.
|
#
7cf48d4e |
|
13-Feb-2018 |
hy che <cvghy116@gmail.com> |
TextView: Remove redundant check in ScrollToOffset as PointAt() already does the check. Change-Id: I2bf541fca84ef27749484ee1be05fb9debac32e2
|
#
346d1496 |
|
05-Nov-2017 |
Humdinger <humdingerb@gmail.com> |
Properly terminate property_info lists BListView's property_info list lacked termination, resulting in garbage output at the and of 'hey getsuites'. Use { 0 } everywhere for sake of consistency. Thanks to waddlesplash for spotting the bug an providing the easy fix.
|
#
e683838e |
|
19-May-2017 |
Sean Healy <jalopeura@users.noreply.github.com> |
BTextView: Fix archiving after setting and unsetting disallowed characters. If you disallow and then re-allow characters, so that the number of disallowed chars returns to zero, BTextView::Archive will fail with "Invalid Argument". Fixes #13520. Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
|
#
7a96554c |
|
09-Dec-2015 |
looncraz <looncraz@looncraz.net> |
kits/interface: Convert to using Set*UIColor. Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com> Patches 0003-0017 from looncraz, unmodified.
|
#
3c857341 |
|
31-Dec-2015 |
Augustin Cavalier <waddlesplash@gmail.com> |
BTextView: Don't crash if the file supplied is zero-length. Fixes #12551.
|
#
103adddb |
|
17-Aug-2015 |
Axel Dörfler <axeld@pinc-software.de> |
BTextView: do not restrict max size in GetHeightForWidth().
|
#
e27a53b2 |
|
30-Jul-2015 |
Axel Dörfler <axeld@pinc-software.de> |
BTextView: implemented height-for-width when read-only. * This is not an ideal implementation, as it actually relayouts the text view. IOW it's actually wrong, but it does seem to work without any issues.
|
#
53253ac4 |
|
13-Mar-2015 |
Humdinger <humdingerb@gmail.com> |
Sentence casing in context menus. Thanks Janus for noticing.
|
#
ce39d3a3 |
|
09-Jan-2015 |
Adrien Destugues <pulkomandy@gmail.com> |
BTextView: use calloc to replace malloc+memset Fixes #11721.
|
#
dc4ae0e9 |
|
24-Jul-2014 |
John Scipione <jscipione@gmail.com> |
TextView: Fix regression for Home and End ... while Shift is held down in a selection. Before this commit, if you had some text selected and you pressed Home or End with a Shift held down the selection would not change. This was annoying and most likely unintentional. Thank you Axel for informing me of this problem. After this commit if you have some text selected and you press Home with a Shift key held down it will move the end of the selection to the first character of the same line that the end of selection is on and if you press End with a Shift key held down it will move the end of the selection to the last character of the same line that the end of the selection is on. I looked at how a bunch of different OS's and applications handled this and found that there are a bunch of different behaviors we could use here, and there doesn't appear to be any consensus as to what the "right" or "wrong" way to do this is so please forgive me if this doesn't work exactly as you expect it to. Note that the implementation used here is very different from how BeOS R5 worked. In BeOS R5 pressing Home or End with Shift held down always extended the selection, it never subtracted from it. In BeOS pressing Home with Shift held down extended the selection from the left-most part of the selection to the first charcter of the same line. Pressing End with Shift held down extended the selection from the right-most part of the selection to the end of the same line.
|
#
1d1e61bb |
|
23-Jul-2014 |
John Scipione <jscipione@gmail.com> |
TextView: include re-arrange style fix * Put #include TextView.h first as our style guide suggests. * Put #include <new> in it's own C++ includes section * also remove an extra newline
|
#
b55f61d6 |
|
23-Jul-2014 |
John Scipione <jscipione@gmail.com> |
TextView: update comments Private Method docs are/should be in doxygen format. Remove \brief as doxygen doesn't need this if you document along side the method. Remove brief description comments from public methods, you'll need to look in the Haiku Book for this now. style squash
|
#
1f424632 |
|
11-Jun-2014 |
John Scipione <jscipione@gmail.com> |
Style fixes to IK, focus on docs
|
#
f5c284ee |
|
01-Apr-2014 |
John Scipione <jscipione@gmail.com> |
Style fixes to BTextView
|
#
77acb432 |
|
01-Feb-2014 |
John Scipione <jscipione@gmail.com> |
TextView: Remove Cmd+Up and Cmd+Down Shortcuts to go to the beginning and end of the document.
|
#
08751732 |
|
31-Jan-2014 |
John Scipione <jscipione@gmail.com> |
TextView: Update nav shortcuts again Make Cmd+Left and Cmd+Right work the same as Option+Left and Option+Right, that is, they do word-wise navigation. Make Option+Up go to beginning of paragraph and Option+Down go to end of paragraph like Cmd+Left and Cmd+Right used to. Unfortunately option shortcuts are currently eaten by S&T until #9431 gets fixed.
|
#
eb774c29 |
|
10-Jan-2014 |
John Scipione <jscipione@gmail.com> |
TextView: Update navigation shortcuts * Command+Left goes to beginning of line, ignoring softwrap * Command+Right goes to the end of line, ignoring softwrap * Home goes to beginning of line, accounting for softwrap * End goes to end of line, accounting for softwrap * Option+Left goes to previous word * Option+Right goes to next word * Command+Home and Command+Up go to beginning of document * Command+End and Command+Down go to end of document Shift with any of the above also selects the text. This is similar to how the text editor Eddie works.
|
#
7f94398c |
|
26-Oct-2013 |
Siarzhuk Zharski <zharik@gmx.li> |
TextView:Restore caret offset on B_HOME/B_END in R/O mode Handling Ctrl-Home / Ctrl-End shortcuts in non-editable mode left the caret offset unchanged. That provoked stuck of the page scrolling mode. Reset the caret offset on such actions. Fixes #9407.
|
#
ab21cedc |
|
16-Mar-2013 |
John Scipione <jscipione@gmail.com> |
Remove docs and refactor style of TextView class. * Make pointer style consistent, const char* name instead of const char *name. * Lots of parameter renaming. * in parameters don't get anything special, just font, or length instead of inFont, inLength. * out parameters get a leading _ so *outWidth becomes *_width for example. * We don't detail private function in the Haiku book and this class has a bunch so keep the documentation in the file but use regular comments instead. * Normalize the parameter names between cpp file and header. * Some minor whitespace fixes. No functional change intended.
|
#
dc871e32 |
|
14-Jan-2013 |
Przemysław Buczkowski <przemub@yahoo.pl> |
TextView:Cmd/Ctrl-Home/End Shift-selection support Fixes #6859 Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>
|
#
74f911be |
|
16-Dec-2012 |
Siarzhuk Zharski <zharik@gmx.li> |
Gently guessing prev. line caret pos on UP_ARROW Fixes #3656
|
#
0d3bd614 |
|
16-Dec-2012 |
Siarzhuk Zharski <zharik@gmx.li> |
Do not include CR-terminator in line width-height calculations Fixes #3658
|
#
c077f500 |
|
26-Nov-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fix #9217 - BTextView should clamp given offsets to avoid crashes * applied patch provided with ticket, thanks! * extended patch to implement offset clamping for all public methods of BTextView and remove some checks from private methods to define a clear baseline for sanity of offsets used in the code
|
#
402c3b2c |
|
04-Nov-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
BTextView uses cmd instead of ctrl for navigation * Adjust BTextView to use B_COMMAND_KEY instead of B_CONTROL_KEY for wordwise navigation and jumping to the top and bottom. This requires a shortcut, which is only installed if there is none already (for the groups B_LEFT_ARROW/B_RIGHT_ARROW and B_HOME/B_END). As a result, wordwise navigation no longer works in Mail, for instance.
|
#
6e1a7a15 |
|
06-Aug-2012 |
x-ist <fakeEmail@fakesite.fake> |
Fix BTextView tab calculation. In rare cases such as described in #7955 BTextView happens to calculate the width of a tab close to zero (e.g. 0.000031). This patch adds a fallback to the default tab width in that case. Signed-off-by: Ryan Leavengood <leavengood@gmail.com>
|
#
9be774b5 |
|
30-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Compilation and 64-bit fixes to libbe.so sources. Fixed the usual issues - printf format strings, uint32 instead of addr_t, etc. One thing that isn't so nice is several places where BList is used to store (u)int32, these require a double cast to addr_t then void* to silence a warning on x86_64.
|
#
639ac470 |
|
12-Jul-2012 |
Hamish Morrison <hamish@lavabit.com> |
BTextView should not accept disallowed chars being pasted. * Patch from #6885: This filters out any disallowed characters from text being pasted or dropped in. If the resulting filtered text is zero characters long, it beeps. Works with styled text too. * Coding style: variables renaming by korli.
|
#
546208a5 |
|
16-Apr-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
More catalog-related cleanup. * rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO * adjust all uses of both macros in Haiku's source tree * use correct header guard for collecting/Catalog.h The renamed macros require adjustments to all external applications using catalogs.
|
#
eaa5e093 |
|
14-Apr-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fix #8452 (app's crashing for non-existent system catalog) * make the system catalog a BCatalog instead of a BCatalogAddOn*, such that using a non-existing system catalog won't crash but simply return the untranslated string instead * rename MutableLocaleRoster::GetSystemCatalog() to LoadSystemCatalog() and adjust it to use BCatalog::SetTo() in order to replace the data used by the given catalog * adjust all users of gSystemCatalog accordingly
|
#
60f75e90 |
|
04-Apr-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
Merge liblocale.so into libbe.so. * Make the locale kit a part of libbe. * Drop the LocaleBackend kludge used from within libbe (and from other places, too) in order to access system catalog strings. This is now done via gSystemCatalog, which is provided and initialized by libbe. * Drop all references to liblocale.so from all Jamfiles. * Add legacy symlink liblocale.so in order to keep optional packages that rely on it in a working state. TODO: the documentation hasn't been updated.
|
#
44c991ef |
|
25-Feb-2012 |
Jerome Duval <jerome.duval@gmail.com> |
interface kit: added compatibility symbol for BeAE * added _ZN9BTextView16InvalidateLayoutEb for GCC4
|
#
3e2017d2 |
|
11-Feb-2012 |
Fredrik Holmqvist <fredrik.holmqvist@gmail.com> |
Some cleanup in interface kit. From unused code warnings (before I updated buildtools).
|
#
1b6bc267 |
|
08-Feb-2012 |
Alexander von Gluck IV <kallisti5@unixzen.com> |
kits: Some spelling cleanup of common mistyped words * Little whitespace cleanup * No functional change
|
#
7cd8f5f9 |
|
02-Jan-2012 |
Philippe Saint-Pierre <stpere@gmail.com> |
TextView: initialize buttons variable CID 10751.
|
#
f6c8d242 |
|
19-Dec-2011 |
Rene Gollent <anevilyak@gmail.com> |
Use the correct perform invocation for these functions.
|
#
466f2b8f |
|
18-Dec-2011 |
Rene Gollent <anevilyak@gmail.com> |
Add compatibility symbols for removed LayoutChanged() calls.
|
#
9f65f3dd |
|
06-Dec-2011 |
Michael Lotz <mmlr@mlotz.ch> |
Rename variable so it is clear what is measured (bytes).
|
#
61eb1f1d |
|
22-Oct-2011 |
Alex Wilson <yourpalal2@gmail.com> |
Replace remaining InvalidateLayout()'s with LayoutInvalidated(). Also do a bit of cleanup/move methods around.
|
#
eee4243d |
|
20-Oct-2011 |
Alex Wilson <yourpalal2@gmail.com> |
De-virtualize BView::InvalidateLayout() and introduce LayoutInvalidated() hook, like BLayout.
|
#
91f0846f |
|
27-Jan-2011 |
Ryan Leavengood <leavengood@gmail.com> |
Add a default right click context menu to BTextView. This fixes #7022 and is mostly based on the patch attached to that ticket, with these changes: - The patch was adding this to the private _TextInput_ class, not BTextView. - The patch had a Clear menu item too. I removed that due to the different semantics between Clear in a BTextView and in a TextInput. The former just clears the selection where the latter clears the whole view. We could later add a virtual callback for adding menu items to this context menu which could be used to add Clear with the two semantics in each class (this is mainly needed for the enabling logic...each class could handle a clear message in its own way.) This callback could also obviously be used for other things, like a spell-check menu or whatever an application would want to add. Since BTextView has 10 free virtual slots it seems reasonable to add. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40305 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
676c1e96 |
|
26-Sep-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Let client applications set a DrawingMode() which will be the default drawing mode for text rendering. Don't override it with B_OP_COPY (still the default). Should not have any consequences in any existing use-case. The MediaPlayer can use BTextViews to render semi-transparent subtitles this way. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38823 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e1a64227 |
|
18-Aug-2010 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fix #6458 - crash in BTextView when entering Japanese characters * when I changed InsertText() to adjust the caret position recently, I forgot to drop that adjustment from all callers - _HandleInputMethodChanged() was still doing it, leading to out of bounds access git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38243 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e70da3e1 |
|
10-Aug-2010 |
Oliver Tappe <zooey@hirschkaefer.de> |
Closing #5959: * _DoInsertText() must not assume that the text is actually being inserted by InsertText(), since that's a virtual method meant to be overridden by subclasses. So the updating of caret-position and selection start/end has to happen in InsertText(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38006 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5af79883 |
|
25-Apr-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Make sure to invalidate the region that was previously within the text rect, but which is outside the new text rect, when changing the text rect. Solves dirty regions in BTextViews. For example the black bar along the top of the URL input in WebPositive after starting it. Or random bits of text left-over in Beam when switching emails. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36470 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3417c110 |
|
24-Apr-2010 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fix #5725, single pixel caret drawing artefact in an empty BTextView: * _NullStyleHeight() must return the height including the 1 pixel gap between the lines, as that's how it's being used git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36469 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5292aff1 |
|
21-Apr-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Reverted the BTextView part of r35731 again - turns out this usually doesn't do what one would want. This closes ticket #5671. * I'm not sure if we want to resurrect the pose view part of r35731 again; it adds bitmap and text clips to dragged files. At least the bitmap change was unrelated, but I'm a bit torn if that is the way this should be handled. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36390 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5c4e7641 |
|
15-Apr-2010 |
Michael Lotz <mmlr@mlotz.ch> |
zooey+mmlr: * Large cleanup in _FindLineBreak(), be a bit more clever by storing the found offsets instead of calculating them multiple times, use _TabExpandedStyledWidth() instead of _StyledWidth() and manual tab calculation which was also broken (it assumed tabs were consequtive which was possibly not the case). * Modified CanEndLine() to also return true when going from non-whitespace to whitespace and the other way around which is more logical (so we'd break after the word and not after word + whitespace, even though we actually do that in the end by eating whitespace after words in _FindLineBreak()). * The TextGapBuffer is not necessarily 0 terminated, so RealCharAt() needs to check if the index is at the end of the string and return 0 in that case. Before it would access the buffer "out by one" which could've lead to a crash. * Simplified the gap moving calculations by removing some no-op calculations. * Added debugger calls in TextGapBuffer in case of invalid use. * Some minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36304 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c944d11f |
|
13-Apr-2010 |
Stephan Aßmus <superstippi@gmx.de> |
bonefish+stippi: All views which cache layout information need to call ResetLayoutInvalidation() when they have updated the cached information. Otherwise calling InvalidateLayout() once they are already attached to a layout may not have any effect. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36217 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
575625f1 |
|
11-Apr-2010 |
Oliver Tappe <zooey@hirschkaefer.de> |
fix drawing artefacts when the caret is being clipped, which lead to parts of the caret being inverted: * instead of always inverting the caret rect, we now invalidate when the caret should be hidden git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36153 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9521d557 |
|
24-Mar-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Always sync the view cursor immediately, not only when entering the view. Should fix the remaining issues pointed out in #3198. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35946 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7c0f5738 |
|
02-Mar-2010 |
Rene Gollent <anevilyak@gmail.com> |
Remove Tracker's special DnD handling. Instead, BTextView/BTextControl now honors drag messages containing entry refs and resolves the path of the first one contained. Will work on a more sophisticated solution that would allow optionally extracting the file text instead via right click drag context menu when I have more time. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35731 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cd591a3e |
|
08-Jan-2010 |
Oliver Tappe <zooey@hirschkaefer.de> |
* BTextView no longer inverts the caret although there is a selection, which would yield double inversion of the caret position, causing #5006 * cleanup with respect to when the selection can be highlighted and/or the caret can be shown/hidden git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34944 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5f917b22 |
|
06-Nov-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Implement a suggestion of Humdinger in the aftermath of #4785: * make word-wise navigation via cursor keys match Pe, such that it is consistent throughout haiku (unless some applications brew their own) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33913 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bd34734f |
|
04-Nov-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
fixed regression of r33882 reported by Michael Weirauch: * wrapping must always be possible at a newline! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33886 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a85a827c |
|
04-Nov-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* introduced two new private methods, _PreviousWordStart() and _NextWordStart(), which are now being used to implement the word-wise keyboard navigation, fixing #4785 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33885 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
32c29a08 |
|
04-Nov-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Reworked character class handling in BTextView: * Word selection via double-click now works like in R5, except that '_' is now being considered part of a textual word, too. This fixes #4754. * Adjusted CanEndLine() to make much more sense (at least for western languages). While I have tested the wrapping quite a bit, it is not unlikely that these changes introduce regressions. If you spot one, please tell! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33882 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
baa33660 |
|
04-Nov-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* the textrect.right should always be rounded up to the next integer - fixes #4894 * PointAt() now rounds x- and y-positions to the next integer instead of always rounding them up - this yields improved caret-positions (e.g. before an 'f' character) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33877 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4b0f176d |
|
28-Oct-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fix more regressions in _AutoResize() visible when renaming a file in Tracker (reported by Axel): * _AutoResize() can no longer check the difference between the textrect and the maximum line width, as the textrect is no being adjusted earlier during the line-calculation code - instead, it needs to measure the difference between the bounds and the textrect width plus the insets. * MakeResizable(true) needs to reset the right inset, as otherwise the auto- resizing would get confused about how large the textview needs to be (seems to be an artefact of how Tracker creates the textview). * GetInsets() doesn't need to compute the insets, as they're maintained in fLayoutData. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33813 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ec397948 |
|
21-Oct-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
fix regression reported in #4826: * SetTextRect for non-wrapped textviews needs to update the insets, as otherwise several misalignments occur within several apps - renaming in Tracker was effected the worst, though git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33717 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
32c8ab89 |
|
21-Oct-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* added _TabExpandedStyledWidth(), which makes sure to expand all tab chars during the width calculation * used _TabExpandedStyledWidth() at all places that need to expand tabs, fixing #4822 * removed _StyledWidthUTF8Safe() as it didn't make sense - we now perform the same auto-scrolling horizontally as we do vertically git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33713 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b18f133d |
|
21-Oct-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
generally overhauled non-wrapping mode of BTextView, as it was considerably broken: * switching from wrapping to non-wrapping mode triggers a recomputation of the text rect * non-wrapping mode now triggers updating of the data rect for the horizontal scrollbar as needed, fixing #4705 * corrected a couple of width computations that confused bounds and text rect width, leading to drawing artefacts at the end of a line * unified computation of text rect width to always take all lines into account (not just the first one) * some cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33703 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7a842ef7 |
|
04-Oct-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Check negative out-of-bounds index in BTextView::OffsetAt(). According to #4707, this is the BeOS behavior. I have not checked myself and the BeBook is very brief on this, but similar methods do trim indices to be in range. Another alternative would be returning an index indicating an error (-1). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33439 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
58465926 |
|
07-Sep-2009 |
Michael Lotz <mmlr@mlotz.ch> |
Fix auto indent feature of BTextView. The indent was inserted before the line break instead of after. Also whitespace after the cursor position wasn't ignored. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32993 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9946ba71 |
|
16-Aug-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* reordered members of BTextView to be compatible with R5 again, although it should have been safe before, too, since BTextView neither has inline methods nor any friends that live outside of libbe * added new member fLastClickOffset in order to be able to restore the triple-click handling (linewise selection) * renamed fClickOffset to fCaretOffset, as that is what it really is now git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32444 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
360495a3 |
|
03-Aug-2009 |
Axel Dörfler <axeld@pinc-software.de> |
* Only use the new preferred computation method if word wrap is disabled, or else this won't work as is (this is something that could be done, better, though). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32077 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0b1db200 |
|
03-Aug-2009 |
Axel Dörfler <axeld@pinc-software.de> |
* The preferred size is now actually the preferred size - the size that is needed to show all of the text view's contents. No idea what the previous solution was about. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32075 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f2e0ac2c |
|
30-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* Instead of moving bounds-height during paging, we now determine the exact next position of the caret and only scroll the distance between the current and the next position. This fixes #3981 * When paging upwards, we need to compensate for the fact that the caret position is always considered at the top of the line, as otherwise a page-up would pass one more line than a page-down git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30933 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4b6aea9b |
|
30-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixed bug in BTextView reported by Matt: * when selecting via mouse, the caret position now follows the direction of the selection - which is less surprising than not moving the caret at all git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30928 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b62daa48 |
|
15-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* adjusted _HandleInputMethodChanged() to not blindly insert the string that has been given via the inline input method, but to feed the individual UTF8-characters it contains to KeyDown() - this way special keys like B_BACKSPACE and cursor keys will be handled correctly instead of producing a "unknown char rectangle" git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30764 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
78da6449 |
|
14-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* corrected the computation of alignment offsets for centered or right-aligned textviews, such that the characters are drawn at their correct positions and there are no longer any mismatches between caret and character positions * fixed too large widths returned by LineWidth() for lines ending with a newline: the newline character must not contribute to the width This makes the textcontrol in DiskProbe work properly again. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30762 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8ca914d1 |
|
13-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* removed debug output git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30758 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f287ca7d |
|
13-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
fixed behaviour of non-editable textviews: * non-editable textviews no longer draw the caret * the cursor keys scroll immediately, not only when the (invisible) caret reaches the views bounds * HOME/END work more reliably * any selection stays active throughout keyboard navigation Tested with AboutSystem, Mail, StyledEdit and Beam - seems to work ok git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30756 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6f260d07 |
|
10-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixed two bug(let)s in BTextView that I encountered when working on the Keymap preflet: * obscure the cursor only if the textview has the focus * initiate a drag not only if the cursor has moved to another index, but also when the cursor has moved more than three pixels, since otherwise it was impossible to drag the first character to the left or top of the view (as the corresponding index was always zero) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30698 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
73af36d4 |
|
01-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* maintain width of 80 chars per line * automatic whitespace cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30533 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5cc8dc2f |
|
01-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* unified application of style into a separate method _ApplyStyleRange() in order to maintain the null-style appropriately, if required * finally fix #3040 for real (a single style is now maintained at all times for non-stylable textviews) * the caret is now being drawn with the correct size, even if it is on the empty line at the end of the buffer and a specific font size has been requested git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30532 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
435455ab |
|
30-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* textviews that aren't editable no longer perform cut or paste actions (again reported by kirilla, thanks!) * when tracking the mouse in order to detect drags, it is not necessary to check if the pointer is within the selection, as that causes problems when you e.g. click on the border of the selection and then move the mouse outside of it (we'd still want to initiate a drag in that case) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30519 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c27ffb3a |
|
30-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixed a bug reported by kirilla: * the textview now only initiates a drag after the mouse has been moved to another offset, making it possible to click into the selection in order to position the caret at the offset corresponding to the point of the click (just as R5 does it) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30518 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
819c98a3 |
|
30-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixing #3040 (DeskCalcs textview showing wrong/multiple styles) * fixed crash in StyleBuffer::SetStyleFromMode() if any of the given pointers is NULL (which is perfectly valid) * BTextView::SetFontAndColor() now syncs the null style before it sets the range, thus making sure that there is only one style if the view is not stylable git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30516 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
62417557 |
|
27-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixed all wrapping issues that I know of (non-working wrapping at end of text, broken hard-wrapping of overlong words, visual leftovers after a word got wrapped): * adjusted _FindLineBreak() to no longer expect that only whitespace can end a line, as that is simply not true * CanEndLine() returns true for characters that are followed by end-of-text or a separator * activated the commented lines in CanEndLine() that allow '...' to be treated as a word As I have nothing more relating to BTextView on my todo-list, I will start doing something else now, but please *do* send any complaints my way ;-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30473 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cad2c3d0 |
|
27-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* fixed bug in autoscrolling that caused the content to jump between the view's top and bottom if you moved the pointer above the view and reached the top * increased auto-scrolling speed to 40 scroll steps per second and changed _PerformAutoScrolling() to behave as R5: do soft scrolling git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30463 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
588b46ea |
|
27-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
more work concerning navigation within BTextView: * pressing HOME on last line works again * made public versions of LineAt() do what is required to pass back the correct value even for the last line of the buffer (original implementation has been moved to private _LineAt()) * PAGE_UP/PAGE_DOWN now moves the view by the bounds-height, making the behaviour somewhat less confusing (IMHO, please shout if that's not acceptable for you) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30458 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2ae836db |
|
27-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* temporarily removed parts of my last change as this completely ruins single-lined textviews - needs some more thinking ... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30456 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8fd209b4 |
|
26-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixed incompatibility with R5 (and general PITA) - LineAt(TextLength()) returned one less than it should, causing unexpected moves of the caret, for instance when pressing HOME on the last (empty) line: * LineBuffer::OffsetToLine() and LineBuffer::PixelToLine() did not check for the last line in their binary search * removed a special case from TextView::PointAt() which now is no longer necessary (not sure if it was, before) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30435 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f7c48ade |
|
26-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* fixed a couple of inconsistencies with respect to handling of cursor- and paging-keys, especially extending the selection via shift was more or less broken git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30431 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ed4f2d88 |
|
15-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixed a regression pointed out by Rene: * Select() did not adjust fClickOffset, which resulted in the cursor position not being where on would expect (noticable when pressing cursor-up/-down) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30184 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
78772ca5 |
|
09-Apr-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Should fix the problems with dirty selection left-overs when editing and also other situations. Basically, I made DeleteText() adjust the selection according to the deleted range. Some places where DeleteText() was called forgot to adopt the selection. Other places adopted the selection. Maybe some of those could be removed now, but some also change fClickOffset, so I just left them as they are. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30076 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bedfcd63 |
|
09-Apr-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Improve the word wrapping a bit. This should eventually use the LocalKit when it's ready. For now, I just tried to fix stuff like breaking before punctuations. I had trouble wrapping my mind around the wrapping code, so I didn't include as much cases as I wanted. Basically, the wrapping code assumes that a spot where CanEndLine() returns true must be a white space character, which wouldn't be the case. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30075 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b2a271d2 |
|
08-Apr-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Changing the text selection region calculation was not such a good idea, it needs more testing before I can do that, but in principle, I think the idea was an ok one... :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30048 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
82d9f508 |
|
08-Apr-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Some BTextView fixes, most importantly the annoying up/down ping pong when triggering auto-scrolling in BTextControls... * _BTextInput_::MinSize() added 1 to the line height, but when aligning the text rect, at least one pixel is added at the top and bottom, which makes for at least two extra pixels. * BTextView::_PerformAutoScrolling() had some code which was supposed to prevent from out-of-bounds scrolling, but the bottom maximum coordinate was not correctly calculated. This and the above item led to the ping-pong effect. * Additionally, I prevented scrolling vertically for one-line text views completely. * On mouse-up, reset the cursor. It may have to be the I-Beam cursor again, for example after de-selecting. * While mouse tracking the selection, always use the I-Beam cursor. * Also when mouse tracking, do not use the minimum/maximum text offset when the mouse is above/below the text rect. Do this only when it's also outside on left/right sides. This is less irritating and works like on other platforms. It means the first/last line can still be selected, without having to constrain the mouse to the inside of the text view. * When calculating the selection region, don't make the bottom one pixel too far up. Lines which contain glyphs that extend below the base-line have one more pixel below the glyphs that is inverted now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30046 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
200da682 |
|
07-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* implemented wordwise navigation via control + arrow keys * renamed _FindXXXWordBoundary() methods to _Previous/_NextWordBoundary() since the respective per-char methods are named this way * started to work on improving the behaviour of page-up/page-down git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30012 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ed5f1fd3 |
|
07-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* fix off-by-one error in my last change that reverted the editing direction - oops ;-) * undo is now active by default git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29996 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3f3ab162 |
|
07-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
continued work on BTextView: * reverted my recent change that caused Mail to always show the end of mails 8-) and now invoke ScrollToOffset() wherever it was missing (mostly in keyboard-related methods) * _DoInsertText() only moves the caret if the text has been inserted in front of the caret, not after it * overhauled selection by char/word/line and their extension mechanism (which now behaves as the haiku shell) * use strnlen() instead of strlen() in those versions of Insert() which accept a length parameter, as strlen can potentially waste a lot of cycles skipping the whole string, when all we want is to clamp the length. * cleanup (some of it automatic removal of trailing whitespace) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29995 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
940901b6 |
|
06-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
applied two textview-patches from Blub that fixes #3458: * Select() did not re-show the caret when it should * GoToLine() must hide/show the caret to avoid drawing artefacts git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29983 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4e50f1ae |
|
06-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* Instead of invoking _DrawLines out of the app-server drawing context, we request the drawing via Invalidate() - this make use of the app-server's potential double buffering, whenever that is active. This change reduces flickering in VESA mode considerably. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29962 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2da74964 |
|
06-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
fixed two scalability problems that made BTextView perform rather slow with large contents: * when searching for tab characters in DrawLine(), we now limit the search to the current line, too (not only the end of the style) - this avoids scanning to the end of large contents repeatedly * there's no need to refresh from the edit location to the end of the content in _DoInsertText(), we only need to refresh the part that has changed git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29960 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c06e2871 |
|
04-Apr-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Olivier Coursiere: Fixes ticket #3673. Thanks a lot! NOTE: There are some more problems with regard to this, if you resize DeskCalc (which sets a new font size on the expression view, and then type something, the newly typed stuff will have the old font still...) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29911 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
339dcf9c |
|
28-Mar-2009 |
Stephan Aßmus <superstippi@gmx.de> |
When changing the text rect, simply invalidate the view. Otherwise it leaves dirt in various cases. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29760 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b7c9f42b |
|
11-Mar-2009 |
Ryan Leavengood <leavengood@gmail.com> |
Fix the bug on the mailing list where TextView does not go to the beginning of the buffer when Ctrl-Home is pressed and to the end when Ctrl-End is pressed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29476 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2f86ba45 |
|
15-Feb-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Implemented a new look for the Haiku interface controls. It was overheard that they looked too ninety-ish. TODO: The code behind this is work in progress. The basic idea is to extract all drawing code into a new class BControlLook, of which there is a global instance be_control_look, instantiated in InterfaceDefs.cpp. At the moment, all the old drawing code is still there, and the usage of be_control_look is inside if-bodies checking the instance against NULL. In another words, by not instanitating be_control_look, you can revert back to the old look. BControlLook's job is to provide reusable methods for drawing certain types of frames, backgrounds and labels, so that application developers can make controls that re-use the same drawing code as built-in controls and adopt to changes made there. I have added the notion of "borders". Each of the frame drawing methods can be made to draw certain borders only, which is supposed to help when controls shall visually attach. This feature is not fully explored at all ATM. TODO: Update BColumnListView header view and BStringItem text spacing. Update other apps where it makes sense to use BControlLook. For the moment, only Tracker and LaunchBox are updated. More... NOTE: The new look is not very radically different, so that existing apps do not immediately look too ugly or out of place. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29221 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b545073f |
|
06-Nov-2008 |
Stephan Aßmus <superstippi@gmx.de> |
* Moved the global BPrivate::WidthBuffer from BTextView into BPrivate as gWidthBuffer. * Tracker PoseView now uses BPrivate::gWidthBuffer instead of it's own instance. * TextView.h and PoseView.h are now a little cleaner. * InterfaceDefs.cpp now deletes gWidthBuffer in _fini_interface_kit_(). * Added binary compatibility support for NetPositive in WidthBuffer.h and .cpp. Obviously it kind of defeats the purpose of having WidthBuffer neatly tucked away in the BPrivate namespace, but Haiku should run NetPositive, I guess. Fixes #2879. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28532 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c1513476 |
|
04-Nov-2008 |
Stephan Aßmus <superstippi@gmx.de> |
SetWordWrap() did not work when the BTextView was not (yet) attached to a window this fixes the tool tip size/layout in apps that use BubbleHelper (Beam, WonderBrush, ...). Thanks to Rene and Stefano for sending me a test application. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28489 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c470027d |
|
02-Nov-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Tracked down a busy loop that I could reproduce pretty reliably with tool tips in WonderBrush. The reason was that the text rect is getting smaller and smaller each time the tool tip is shown (even though there is only one word), and the line break moves one char towards the beginning each time. After four times, the busy loop would kick in reliably. I cannot really say that I understand the code, though. But that's the spot anyways. Stefano, could you have a look? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28471 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9f3fce1e |
|
16-Oct-2008 |
Oliver Tappe <zooey@hirschkaefer.de> |
Stippi + zooey: * fixed LineHeight() for the case when the textview does not yet contain anything - instead of returning 0 we now return the lineheight of the default style (or the textview's font). Fixes #2231 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28194 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1cbca49a |
|
15-Oct-2008 |
Stephan Aßmus <superstippi@gmx.de> |
zooey + stippi: * Fix the calculation of the fTextRect member. The BeOS behavior (and also the previous Haiku behavior) was to recalculate the "bottom" always. This was not taken care of in SetTextRect() (needs to override the passed bottom). * The insets are already tracked in fLayoutData, use this in _UpdateScrollBars() to calculate the correct data width/height (an improvement over the BeOS behavior it seems). * Try to minimize the need to call _Refresh(), which reduces flickering a whole lot. * Fix several instances where fTextRect was recalculated based on Bounds() and the saved insets, where it was broken when the BTextView was scrolled. Fixes #2784. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28151 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
39fbf550 |
|
15-Oct-2008 |
Oliver Tappe <zooey@hirschkaefer.de> |
bonefish + zooey: * Fixed a general problem with respect to overriding of the reserved virtual function slots: instead of statically invoking the method that corresponds to the reserved slot on the class that contains the slot, we now invoke the virtual Perform() method. Perform() then dispatches the method invocation to the "proper" class, i.e. the highest class in the hierarchy that actually implements the requested method. This fixes a crash in apps that use liblayout's MSlider class and should fix one or other spurious bug with old apps or libraries, too. * added new header folder 'binary_compatibility' that contains files that define the method codes and data structures required by Perform() * looked for and implemented all used reserved virtual slot functions to invoke Perform() where necessary or to pass on the method call statically (for slots that were already maintained by Be) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28124 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4df6a8c3 |
|
01-Oct-2008 |
Stephan Aßmus <superstippi@gmx.de> |
* As with other controls, for BeOS compatibly behavior, don't shrink a BTextView via GetPreferredSize() if it is large enough. (Have not confirmed this is necessary... gut feeling.) * Calculate a minimum line height even if the BTextView is empty yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27828 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
90b7764d |
|
21-Sep-2008 |
Rene Gollent <anevilyak@gmail.com> |
Move WidthBuffer and TextGapBuffer into BPrivate and use them from there in BPoseView and BTextView. This (correctly) fixes the previous gcc4 build issues. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27675 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
88643347 |
|
21-Sep-2008 |
Stephan Aßmus <superstippi@gmx.de> |
* First steps towards making BTextView behave well within the layout management. * The class calculates a minimum width now, which is based on the line height, this may also fix the bug with the small text inputs in the Pe Find window. * Added TODOs about implementing GetHeightForWidth(), which may be a good idea when a BTextView is used as non-editable informative text in an interface, and one wants to make sure that the entire text is shown. * Replaced the call to _Refresh() in Draw(), which recalculates all the line breaks for no reason with _DrawLines() again. The TODO mentioned that text will be drawn without drawing the background first, but maybe this is a relict from times where Draw() was invoked directly? At least I cannot see any negative consequences, and this should be much more efficient. (Other than that, this patch should hopefully have no potential negative side effects...<crosses fingers>) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27670 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8ab8c63d |
|
21-Sep-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Moved BTextView::UndoBuffer derivatives into the BTextView class as well, hopefully fixing the GCC4 build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27660 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a682d981 |
|
20-Sep-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Quite a cleanup action to avoid polluting the global namespace with private BTextView classes: * Declared the directly used BTextView helper classes as private BTextView classes and changed all affected files. * Realized that Tracker's BPoseView was (accidentally?) using what used to be _BWidthBuffer_. It had declared it's own class with the same name and same members/size in headers/private/tracker/TextViewSupport.h, but the implementation was nowhere to be found. I can only explain this that the BTextView implementation was then actually linked and used. But the big problem was that it was used without locking (unlike in BTextView)! When many Tracker windows opened during system startup or later and they happened to each request characters not yet in the cache, I imagine things could have gone bad and corrupted memory. Anyways, since I can see the usefulness of the cache, BPoseView uses BTextView::WidthBuffer on purpose now. And I moved the locking inside BTextView::WidthBuffer::StringWidth(). * Adjusted InterfaceDefs.cpp accordingly. * TODO: Move subsequent classes into BTextView namespace as well, ie derived classes that BTextView doesn't directly know about. All stuff in src/kits/ inteface/textview_support/ * Added preliminary and not yet implemented layout friendly BTextView constructors. * I will try to handle the insets imposed by BTextView::fTextRect a bit differently when used inside the new layout management framework. For this, I added BTextView::SetInsets() and GetInsets(). SetInsets() doesn't do anything yet. So far, everything seems to work still... ;-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27654 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
fc16834e |
|
12-Sep-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
buffer is an array, so use delete[]. CID 130 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27439 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2a739c31 |
|
15-Jul-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Insignificant cleanup and comment typo fixes... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26420 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4c1f76cb |
|
15-May-2008 |
Jérôme Duval <korli@users.berlios.de> |
Patch from Shinta: don't send B_INPUT_METHOD_STOPPED when IM is not active fix bug #2220 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25518 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bd78dbf8 |
|
07-May-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Fixed bad text antialiasing against the colored background used for input methods. Fixes #2209. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25349 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a01db67d |
|
26-Feb-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Do not scroll to the bottom of the current line if that means the top of the line will be scrolled out of view. (Fixes text jumping one pixel up/down in Vision with each new char you type into Visions text box.) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24136 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
46ea5b1e |
|
25-Feb-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Further improvements to auto scrolling and text rect + container view resizing: * Renaming things in Tracker list mode no longer magically grows the text view. * ScrollToOffset() is not supposed to depend on the existence of any scroll bars, in R5 text views simply scroll to where they need to. This fixes renaming things in Tracker when hitting the window bounds (text widget stops growing and starts to autoscroll) and also the Text tool in WonderBrush. * _ScrollToOffset() is therefor no longer needed. * The insets of the text rect are not so interesting as the original width. In auto resizing mode, the original width is important when there is no container view. In this setup, the text rect auto resizing is mainly needed for auto scrolling, but it should never shrink below the original size. * Further improved auto scrolling for right aligned and center aligned text views, it works like R5 now. Also take the line height into account when checking for the bounds bottom. Removed extra spacing for vertical scrolling. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24130 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b8872c02 |
|
24-Feb-2008 |
Stephan Aßmus <superstippi@gmx.de> |
BTextControl: * Placed _BTextInput_ into BPrivate namespace. * Made _BTextInput_::AlignTextRect() smarter, it centers the line vertically, for the case that the BTextControl has a larger label font. Improved insets for asthetics. * Used _BTextInput_::AlignTextRect() consistently in BTextControl, no more custom calls to SetTextRect(). Account for minimum vertical inset of 2 pixels in GetPreferredSize(). * Consistendly select all text when gaining focus in _BTextInput_. * Override MouseDown() in case the control did not have focus before, or else BTextView::MouseDown() will deselct the text again and place the cursor. (in line with BeOS behavior) * Removed unused fBool member from _BTextInput_ and other cleanup. BTextView: * Reimplemented BTextView::_AutoResize() so that it works well with BTextControl and autoscrolling when the alignment is not B_ALIGN_LEFT. I needed two new members for this, fLeftInset and fRightInset which are the original insets from the fTextRects. It might currently be broken for renaming things in Tracker, I will have to check. _AutoResize() no longer messes up the fTextRect insets. * Fixed stray carrets sometimes being left over, mostly when auto scrolling, but I observed them in other cases as well. * Prevent negative scrolling offsets when autoscrolling. Fixes weird scrolling offsets when navigating to the left. * Reset scrolling to B_ORIGIN when SetText() is called. Fixes for example starting to type in the middle of the control in Vision when entering new text and autoscrolling was triggered before. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24101 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
13bba42e |
|
03-Feb-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Previous revision break all sorts of stuff. Fixed. hopefully git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23837 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9d73eec0 |
|
30-Jan-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Fixed a couple of problems with inserting text when there was a selection (for example, moving around text with the mouse). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23789 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bc7e472d |
|
30-Jan-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
DragMessage() makes a copy of the passed message. We were leaking inside BTextView::_InitiateDrag(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23787 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8afaa473 |
|
17-Jan-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Fixed warning git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23606 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
75ee0a29 |
|
17-Jan-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Respect the maximum bytes set by SetMaxBytes() in Insert() and on keydown. Fixed SetMaxBytes() so that it respect multibyte characters (it removes the whole character in case it doesn't fit). This can be seen in BColorControls, where you can't write numbers with more than 3 characters anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23605 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2c2176ce |
|
01-Jan-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Removed SetViewCursor() from BTextView::_Deactivate(), as suggested by cl21. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23203 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cb752f18 |
|
22-Nov-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
xdiff -> xDiff, useHorz -> useHorizontal... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22978 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c9dcf797 |
|
22-Nov-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
BTextView::_ScrollToOffset() just didn't work correctly most of the times, since xdiff and ydiff didn't take the point returned by PointAt() into account. Thanks to Andrea Anzani for noticing this. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22977 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
23b6ac7e |
|
01-Nov-2007 |
Stephan Aßmus <superstippi@gmx.de> |
this should complete the work on password mode for BTextView: * fixed +/- 1 bug in _BTextGapBuffer_::GetString() * used the correct text and offsets in BTextView whenever the visible text is to be used * when copying to the clipboard, copy the bullets * when dragging the text, drag the bullets TODO: * test more with UTF8 chars in the original text (I am unsure if fSelStart and so on is really in bytes rather than glyphs) * test with multiple font styles git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22787 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
13ca2d94 |
|
23-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
Patch by Vasilis Kaoutsis - thanks!: * Rewrote TextView.h * Renamed all private methods to have the underscore prefix. And also: * Whitespace and line width cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22688 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
17dee652 |
|
08-Oct-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
and there, the usual commit which removes the forgotten debug output... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22490 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c0441727 |
|
08-Oct-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
I was wrong after all. InsertText() doesn't call SetRunArray() (and hence CancelInputMethod()), but it implements part of it. To avoid code duplication, I added a private _SetRunArray() call, which does most of the work, except cancelling the input method, and calling Refresh(). Removed some unneeded code from CancelInputMethod(), some small changes in HandleInputMethodChanged. -Questa linea, e quelle sotto di essa, saranno ignorate-- M src/kits/interface/TextView.cpp M headers/os/interface/TextView.h git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22489 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6fc1a5d0 |
|
04-Oct-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Mail's inherited InsertText() calls CancelInputMethod() indirectly, and since InsertText() is called inside BTextView::HandleInputMethodChanged(), this method would see fInline slip away from under its feet.. Now we call the BTextView version explicitly. Fixes bug #1022, although I'm not sure if this is completely correct. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22444 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
94b9294f |
|
04-Oct-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
oops! Somehow I managed to commit a version with some extra debug code enabled. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22433 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f2476bcc |
|
04-Oct-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Patch by Rene Gollent: TextViews now can scroll even if they aren't attached to a BScrollView. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22432 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b33a19a2 |
|
01-Sep-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Adjusted a bit BTextView::AutoResize() so that the text rect is more centered. At least renaming a file in tracker looks a bit better now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22139 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e94ad1e2 |
|
31-Aug-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
If typing is hidden, don't reply to B_COPY or B_CUT messages, but beep() in this case. Note that the public methods still let you copy and cut the real text. Also prevented stealing passwords via scripting (not tested, though). Fixes bug #1354 Got rid of the _BTextGapBuffer_::[] operator since using it creates less readable code. Also Implemented _BTextGapBuffer_::RealText() and used it instead of Text() inside BTextView. Will make sense later. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22129 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6a9c969b |
|
28-Aug-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
If line breaks have changed, don't take the startOffset into account. Fixes bug #1430 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22095 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c6811df0 |
|
13-Aug-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* I am turning this back on, it seems the problems are fixed, and if not, I would like to fix them. Using the string width cache results in a great drawing speed up, for example in StyledEdit and Mail. Any app that uses a larger BTextView. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21928 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
98eadf4b |
|
09-Aug-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Scrolling didn't work correctly if the user didn't move the mouse all the time. Fixed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21868 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
99584ef9 |
|
04-Jul-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Added _Show/_HideCaret() and used them in place of more bug-prone code. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21558 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c57ff658 |
|
27-Jun-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Avoid scrolling vertically if scrolling area is outside the text rect. Pin parameters in Select() before doing other checks on them (reported by Marc Flerackers) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21511 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1a2a0e07 |
|
22-May-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Check scrolling against text rect limits. Fixes bug 1240 (and maybe 1241 too) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21207 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
107ce0bb |
|
03-May-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Fixed a bug in selection via keyboard (the problem described in bug #716, comment #4) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20997 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f96bec01 |
|
30-Apr-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
small cleanups. Moved some code into a _DrawLine() method. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20940 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0d4fbcc8 |
|
27-Apr-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
made _BInlineInput_::AddClause() more robust in low memory conditions git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20870 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a1c03614 |
|
18-Apr-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Use LineHeight() instead of StyledWidthUTF8Safe() to get the height of the line in PointAt(), since the former didn't return the correct result, due to the fact that there were 0 charachters on that line. Fixed a bug in TextHeight() which ended up doubling the height of the line if we requested the last line. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20745 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1a64df76 |
|
23-Jan-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
BTextView::FreeRunArray() now accepts a NULL pointer too (like free()) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19937 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ee144512 |
|
16-Jan-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
use Invalidate() and UpdateIfNeeded() in BTextView::SetTextRect(). Fixes bug #571 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19824 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
25df172b |
|
04-Jan-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Implemented auto horizontal scrolling (by fixed steps for now), moved auto scrolling to its own method, introduced a new private StyledWidthUTF8Safe method. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19694 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
23fb6e0e |
|
04-Jan-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
- Fixed wrong redrawing of the caret in some particular circumstancies (most notably when you clicked the first time on the textview, the caret would be left "drawn" on the old position. - Implemented vertical auto scrolling (horizontal auto scrolling is still missing). Note that the view jumps when there is nothing to scroll, might be a bug in BView::ScrollBy() ? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19692 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
59f9192c |
|
21-Dec-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
added nothrow git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19590 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7ca29518 |
|
02-Nov-2006 |
Axel Dörfler <axeld@pinc-software.de> |
Applied Stefano's patch to bug #886. Also does nothing now if startOffset is larger than endOffset. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19169 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
fe23fb66 |
|
29-Oct-2006 |
Axel Dörfler <axeld@pinc-software.de> |
* Renamed private BMenu::SelectItem() to _SelectItem(), and made its arguments a bit more sane. * Fixed two GCC 4 warnings. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19139 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f0cd9e9d |
|
24-Oct-2006 |
Axel Dörfler <axeld@pinc-software.de> |
Canceling an input method now removes the complete inline from the text. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19118 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3956f772 |
|
24-Oct-2006 |
Axel Dörfler <axeld@pinc-software.de> |
No longer ignores the text that comes with a confirmed B_INPUT_METHOD_CHANGED event; it now only deactivates the inline in that case. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19115 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4dd74f29 |
|
04-Oct-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
disabled the use of _BWidthBuffer_ until the app_server font backend implements B_BITMAP_SPACING. Small cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19004 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
de20f0fa |
|
01-Oct-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
some changes, fixed a rendering bug git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18987 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1e17db8a |
|
28-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
put common code for Insert() methods into DoInsertText(), this avoids an extra strlen() call git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18968 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7d8ee43e |
|
28-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
now checks the real lenght of the passed buffer in BTextView::Insert(). Seems to fix bug 675 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18967 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
25ba188a |
|
27-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
added a parameter to _BTextGapBuffer_::GetString() so that the caller knows how many bytes are really returned. password mode looks better now git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18965 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f70a414b |
|
27-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
fixed broken endlines in case there were TAB charachters (bug 865). A better solution is also coming. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18959 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3091f56a |
|
28-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
more bugs fixed in keyboard text selection git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18956 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a09f0db1 |
|
28-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
fixed some remaining bugs in keyboard selection, reimported code for up/down keys handling git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18954 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7184af5e |
|
28-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
improved keyboard text selection. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18953 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4a718fa3 |
|
26-Sep-2006 |
Jérôme Duval <korli@users.berlios.de> |
fix for gcc4 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18944 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9205b411 |
|
26-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
fixed word by word selection git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18943 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6343dc98 |
|
26-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Implemented working asynchronous mouse tracking, dropped synchronous tracking. Selecting text is now also much faster. Auto scrolling is missing for the moment, though git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18942 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d67b1efc |
|
17-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Fixed broken endlines. This breaks a bit more 'password mode', but it wasn't 100% working yet anyway git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18874 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
575a68b3 |
|
14-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Implemented BTextView::HideTyping(). Now it will display B_UTF8_BULLET chars instead of the real text if this option is enabled. Note that there are problems with the text width, i.e. the calculation is still done with the "real" chars, leading to text corruption. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18837 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3a70724f |
|
14-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Finally nailed that bug which caused text not to be drawn in some cases... OffsetAt() was returning 1 instead of 0 if you clicked on an empty BTextView due to a bug in NextInitialByte() . Some cleanups git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18836 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
91b381a9 |
|
28-Aug-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Moved TextView.cpp out of the BTextView (soon to be renamed) folder git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18661 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
103adddb37d379a722b6cc9bca82879abaafc5a0 |
|
17-Aug-2015 |
Axel Dörfler <axeld@pinc-software.de> |
BTextView: do not restrict max size in GetHeightForWidth().
|
#
e27a53b231ad97ed357932f329ad975bccdafcd2 |
|
30-Jul-2015 |
Axel Dörfler <axeld@pinc-software.de> |
BTextView: implemented height-for-width when read-only. * This is not an ideal implementation, as it actually relayouts the text view. IOW it's actually wrong, but it does seem to work without any issues.
|
#
53253ac470cd7bd3d470bf2f403f432606ad7ed2 |
|
13-Mar-2015 |
Humdinger <humdingerb@gmail.com> |
Sentence casing in context menus. Thanks Janus for noticing.
|
#
ce39d3a366f7d7b5c8055aa594f33668cd8724d8 |
|
09-Jan-2015 |
Adrien Destugues <pulkomandy@gmail.com> |
BTextView: use calloc to replace malloc+memset Fixes #11721.
|
#
dc4ae0e9c00262d45c7995704d87ce12a168f862 |
|
24-Jul-2014 |
John Scipione <jscipione@gmail.com> |
TextView: Fix regression for Home and End ... while Shift is held down in a selection. Before this commit, if you had some text selected and you pressed Home or End with a Shift held down the selection would not change. This was annoying and most likely unintentional. Thank you Axel for informing me of this problem. After this commit if you have some text selected and you press Home with a Shift key held down it will move the end of the selection to the first character of the same line that the end of selection is on and if you press End with a Shift key held down it will move the end of the selection to the last character of the same line that the end of the selection is on. I looked at how a bunch of different OS's and applications handled this and found that there are a bunch of different behaviors we could use here, and there doesn't appear to be any consensus as to what the "right" or "wrong" way to do this is so please forgive me if this doesn't work exactly as you expect it to. Note that the implementation used here is very different from how BeOS R5 worked. In BeOS R5 pressing Home or End with Shift held down always extended the selection, it never subtracted from it. In BeOS pressing Home with Shift held down extended the selection from the left-most part of the selection to the first charcter of the same line. Pressing End with Shift held down extended the selection from the right-most part of the selection to the end of the same line.
|
#
1d1e61bb3996660f2c9a1c3ebd54473e2dc7b442 |
|
23-Jul-2014 |
John Scipione <jscipione@gmail.com> |
TextView: include re-arrange style fix * Put #include TextView.h first as our style guide suggests. * Put #include <new> in it's own C++ includes section * also remove an extra newline
|
#
b55f61d65c1ee6fd176ccd8cbc4acbb98f76d163 |
|
23-Jul-2014 |
John Scipione <jscipione@gmail.com> |
TextView: update comments Private Method docs are/should be in doxygen format. Remove \brief as doxygen doesn't need this if you document along side the method. Remove brief description comments from public methods, you'll need to look in the Haiku Book for this now. style squash
|
#
1f424632be5dcad5b81a23080eb205ab6471cd7b |
|
11-Jun-2014 |
John Scipione <jscipione@gmail.com> |
Style fixes to IK, focus on docs
|
#
f5c284eeed90fe140403abf733259adfcfd28d59 |
|
01-Apr-2014 |
John Scipione <jscipione@gmail.com> |
Style fixes to BTextView
|
#
77acb4327395b8212c8ceb9270615afcd6a5eae1 |
|
01-Feb-2014 |
John Scipione <jscipione@gmail.com> |
TextView: Remove Cmd+Up and Cmd+Down Shortcuts to go to the beginning and end of the document.
|
#
08751732464f81c837f3cff0b6ef1236ea8023ca |
|
31-Jan-2014 |
John Scipione <jscipione@gmail.com> |
TextView: Update nav shortcuts again Make Cmd+Left and Cmd+Right work the same as Option+Left and Option+Right, that is, they do word-wise navigation. Make Option+Up go to beginning of paragraph and Option+Down go to end of paragraph like Cmd+Left and Cmd+Right used to. Unfortunately option shortcuts are currently eaten by S&T until #9431 gets fixed.
|
#
eb774c294887ef01359b09183a0cc1cdea40e782 |
|
10-Jan-2014 |
John Scipione <jscipione@gmail.com> |
TextView: Update navigation shortcuts * Command+Left goes to beginning of line, ignoring softwrap * Command+Right goes to the end of line, ignoring softwrap * Home goes to beginning of line, accounting for softwrap * End goes to end of line, accounting for softwrap * Option+Left goes to previous word * Option+Right goes to next word * Command+Home and Command+Up go to beginning of document * Command+End and Command+Down go to end of document Shift with any of the above also selects the text. This is similar to how the text editor Eddie works.
|
#
7f94398c21d5091b7232939ac063b8c822affa8e |
|
26-Oct-2013 |
Siarzhuk Zharski <zharik@gmx.li> |
TextView:Restore caret offset on B_HOME/B_END in R/O mode Handling Ctrl-Home / Ctrl-End shortcuts in non-editable mode left the caret offset unchanged. That provoked stuck of the page scrolling mode. Reset the caret offset on such actions. Fixes #9407.
|
#
ab21cedcce7774904821253a3cd6986b04c70634 |
|
16-Mar-2013 |
John Scipione <jscipione@gmail.com> |
Remove docs and refactor style of TextView class. * Make pointer style consistent, const char* name instead of const char *name. * Lots of parameter renaming. * in parameters don't get anything special, just font, or length instead of inFont, inLength. * out parameters get a leading _ so *outWidth becomes *_width for example. * We don't detail private function in the Haiku book and this class has a bunch so keep the documentation in the file but use regular comments instead. * Normalize the parameter names between cpp file and header. * Some minor whitespace fixes. No functional change intended.
|
#
dc871e324d59c1cd691fdedca8807d11e5b959d0 |
|
14-Jan-2013 |
Przemysław Buczkowski <przemub@yahoo.pl> |
TextView:Cmd/Ctrl-Home/End Shift-selection support Fixes #6859 Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>
|
#
74f911be7405f34a43bcc173e00d7981e2bd269a |
|
16-Dec-2012 |
Siarzhuk Zharski <zharik@gmx.li> |
Gently guessing prev. line caret pos on UP_ARROW Fixes #3656
|
#
0d3bd614c779194cb1394de2c84156538328273b |
|
16-Dec-2012 |
Siarzhuk Zharski <zharik@gmx.li> |
Do not include CR-terminator in line width-height calculations Fixes #3658
|
#
c077f5002f86850a9f57ac61cd826c7fa40ecdd6 |
|
26-Nov-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fix #9217 - BTextView should clamp given offsets to avoid crashes * applied patch provided with ticket, thanks! * extended patch to implement offset clamping for all public methods of BTextView and remove some checks from private methods to define a clear baseline for sanity of offsets used in the code
|
#
402c3b2c0980aab7b94a4f9fb2ceec530c110456 |
|
04-Nov-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
BTextView uses cmd instead of ctrl for navigation * Adjust BTextView to use B_COMMAND_KEY instead of B_CONTROL_KEY for wordwise navigation and jumping to the top and bottom. This requires a shortcut, which is only installed if there is none already (for the groups B_LEFT_ARROW/B_RIGHT_ARROW and B_HOME/B_END). As a result, wordwise navigation no longer works in Mail, for instance.
|
#
6e1a7a15cd824d8ba1846fa8f009e55e6d21bec3 |
|
06-Aug-2012 |
x-ist <fakeEmail@fakesite.fake> |
Fix BTextView tab calculation. In rare cases such as described in #7955 BTextView happens to calculate the width of a tab close to zero (e.g. 0.000031). This patch adds a fallback to the default tab width in that case. Signed-off-by: Ryan Leavengood <leavengood@gmail.com>
|
#
9be774b553296a712704078314f2291ae5fc352c |
|
30-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Compilation and 64-bit fixes to libbe.so sources. Fixed the usual issues - printf format strings, uint32 instead of addr_t, etc. One thing that isn't so nice is several places where BList is used to store (u)int32, these require a double cast to addr_t then void* to silence a warning on x86_64.
|
#
639ac47052e9c01a2a00f38e5a09bfe3bd53dc2c |
|
12-Jul-2012 |
Hamish Morrison <hamish@lavabit.com> |
BTextView should not accept disallowed chars being pasted. * Patch from #6885: This filters out any disallowed characters from text being pasted or dropped in. If the resulting filtered text is zero characters long, it beeps. Works with styled text too. * Coding style: variables renaming by korli.
|
#
546208a53940a26c6379c48a7854ade1a8250fc5 |
|
16-Apr-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
More catalog-related cleanup. * rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO * adjust all uses of both macros in Haiku's source tree * use correct header guard for collecting/Catalog.h The renamed macros require adjustments to all external applications using catalogs.
|
#
eaa5e0936d94e7d0bb2e6066a87d485e7613414c |
|
14-Apr-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fix #8452 (app's crashing for non-existent system catalog) * make the system catalog a BCatalog instead of a BCatalogAddOn*, such that using a non-existing system catalog won't crash but simply return the untranslated string instead * rename MutableLocaleRoster::GetSystemCatalog() to LoadSystemCatalog() and adjust it to use BCatalog::SetTo() in order to replace the data used by the given catalog * adjust all users of gSystemCatalog accordingly
|
#
60f75e901ce3063c63441ac644dd0e55a17d5d09 |
|
04-Apr-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
Merge liblocale.so into libbe.so. * Make the locale kit a part of libbe. * Drop the LocaleBackend kludge used from within libbe (and from other places, too) in order to access system catalog strings. This is now done via gSystemCatalog, which is provided and initialized by libbe. * Drop all references to liblocale.so from all Jamfiles. * Add legacy symlink liblocale.so in order to keep optional packages that rely on it in a working state. TODO: the documentation hasn't been updated.
|
#
44c991efdbdfac7aeeb8872d6ec4329589eed9c8 |
|
25-Feb-2012 |
Jerome Duval <jerome.duval@gmail.com> |
interface kit: added compatibility symbol for BeAE * added _ZN9BTextView16InvalidateLayoutEb for GCC4
|
#
3e2017d24e3912c42e583a508caea971a195f666 |
|
11-Feb-2012 |
Fredrik Holmqvist <fredrik.holmqvist@gmail.com> |
Some cleanup in interface kit. From unused code warnings (before I updated buildtools).
|
#
1b6bc2675fe3691538c8764ab016593f3b06ca53 |
|
08-Feb-2012 |
Alexander von Gluck IV <kallisti5@unixzen.com> |
kits: Some spelling cleanup of common mistyped words * Little whitespace cleanup * No functional change
|
#
7cd8f5f9b905033a28d2b3be7da15093ad127e3d |
|
02-Jan-2012 |
Philippe Saint-Pierre <stpere@gmail.com> |
TextView: initialize buttons variable CID 10751.
|
#
f6c8d242946d814ca47bca8eb49219979f009686 |
|
19-Dec-2011 |
Rene Gollent <anevilyak@gmail.com> |
Use the correct perform invocation for these functions.
|
#
466f2b8f997acaecf0397f9f1c8b36a2b1fc5a4e |
|
18-Dec-2011 |
Rene Gollent <anevilyak@gmail.com> |
Add compatibility symbols for removed LayoutChanged() calls.
|
#
9f65f3dd6601b69ee7f7bfb072e04d4a56ef98df |
|
06-Dec-2011 |
Michael Lotz <mmlr@mlotz.ch> |
Rename variable so it is clear what is measured (bytes).
|
#
61eb1f1d19eed26b6138b0701612e8eb31bb1d86 |
|
22-Oct-2011 |
Alex Wilson <yourpalal2@gmail.com> |
Replace remaining InvalidateLayout()'s with LayoutInvalidated(). Also do a bit of cleanup/move methods around.
|
#
eee4243d35225a35d0964ebebe94490eaca14261 |
|
20-Oct-2011 |
Alex Wilson <yourpalal2@gmail.com> |
De-virtualize BView::InvalidateLayout() and introduce LayoutInvalidated() hook, like BLayout.
|
#
91f0846f8a689e0d8c4da6fc5f1c584556b2249d |
|
27-Jan-2011 |
Ryan Leavengood <leavengood@gmail.com> |
Add a default right click context menu to BTextView. This fixes #7022 and is mostly based on the patch attached to that ticket, with these changes: - The patch was adding this to the private _TextInput_ class, not BTextView. - The patch had a Clear menu item too. I removed that due to the different semantics between Clear in a BTextView and in a TextInput. The former just clears the selection where the latter clears the whole view. We could later add a virtual callback for adding menu items to this context menu which could be used to add Clear with the two semantics in each class (this is mainly needed for the enabling logic...each class could handle a clear message in its own way.) This callback could also obviously be used for other things, like a spell-check menu or whatever an application would want to add. Since BTextView has 10 free virtual slots it seems reasonable to add. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40305 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
676c1e96941a11b038ed3df4903aee0800512d45 |
|
26-Sep-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Let client applications set a DrawingMode() which will be the default drawing mode for text rendering. Don't override it with B_OP_COPY (still the default). Should not have any consequences in any existing use-case. The MediaPlayer can use BTextViews to render semi-transparent subtitles this way. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38823 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e1a64227273b2f6fb55b6b0ba4b2b5d2998866b2 |
|
18-Aug-2010 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fix #6458 - crash in BTextView when entering Japanese characters * when I changed InsertText() to adjust the caret position recently, I forgot to drop that adjustment from all callers - _HandleInputMethodChanged() was still doing it, leading to out of bounds access git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38243 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e70da3e14ca84e8f0e40f141a441be4dada34265 |
|
10-Aug-2010 |
Oliver Tappe <zooey@hirschkaefer.de> |
Closing #5959: * _DoInsertText() must not assume that the text is actually being inserted by InsertText(), since that's a virtual method meant to be overridden by subclasses. So the updating of caret-position and selection start/end has to happen in InsertText(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38006 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5af798836a5e1263dac134c124e8c4fb38b13ca8 |
|
25-Apr-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Make sure to invalidate the region that was previously within the text rect, but which is outside the new text rect, when changing the text rect. Solves dirty regions in BTextViews. For example the black bar along the top of the URL input in WebPositive after starting it. Or random bits of text left-over in Beam when switching emails. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36470 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3417c110cf5bc38f47ae44d845dcb55b91557d31 |
|
24-Apr-2010 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fix #5725, single pixel caret drawing artefact in an empty BTextView: * _NullStyleHeight() must return the height including the 1 pixel gap between the lines, as that's how it's being used git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36469 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5292aff148266c58e9134663b51181cd94122f3a |
|
21-Apr-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Reverted the BTextView part of r35731 again - turns out this usually doesn't do what one would want. This closes ticket #5671. * I'm not sure if we want to resurrect the pose view part of r35731 again; it adds bitmap and text clips to dragged files. At least the bitmap change was unrelated, but I'm a bit torn if that is the way this should be handled. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36390 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5c4e7641a732891a776f88c3c46b237de9220f88 |
|
15-Apr-2010 |
Michael Lotz <mmlr@mlotz.ch> |
zooey+mmlr: * Large cleanup in _FindLineBreak(), be a bit more clever by storing the found offsets instead of calculating them multiple times, use _TabExpandedStyledWidth() instead of _StyledWidth() and manual tab calculation which was also broken (it assumed tabs were consequtive which was possibly not the case). * Modified CanEndLine() to also return true when going from non-whitespace to whitespace and the other way around which is more logical (so we'd break after the word and not after word + whitespace, even though we actually do that in the end by eating whitespace after words in _FindLineBreak()). * The TextGapBuffer is not necessarily 0 terminated, so RealCharAt() needs to check if the index is at the end of the string and return 0 in that case. Before it would access the buffer "out by one" which could've lead to a crash. * Simplified the gap moving calculations by removing some no-op calculations. * Added debugger calls in TextGapBuffer in case of invalid use. * Some minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36304 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c944d11f7e0a6775ab04ced50dd929e539c7d10f |
|
13-Apr-2010 |
Stephan Aßmus <superstippi@gmx.de> |
bonefish+stippi: All views which cache layout information need to call ResetLayoutInvalidation() when they have updated the cached information. Otherwise calling InvalidateLayout() once they are already attached to a layout may not have any effect. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36217 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
575625f15572f5f0d783903a568b5543cc558c22 |
|
11-Apr-2010 |
Oliver Tappe <zooey@hirschkaefer.de> |
fix drawing artefacts when the caret is being clipped, which lead to parts of the caret being inverted: * instead of always inverting the caret rect, we now invalidate when the caret should be hidden git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36153 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9521d5576da47ffd76d3140080084c545ee99707 |
|
24-Mar-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Always sync the view cursor immediately, not only when entering the view. Should fix the remaining issues pointed out in #3198. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35946 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7c0f5738b33a58712977111a27d67bbee3df6633 |
|
02-Mar-2010 |
Rene Gollent <anevilyak@gmail.com> |
Remove Tracker's special DnD handling. Instead, BTextView/BTextControl now honors drag messages containing entry refs and resolves the path of the first one contained. Will work on a more sophisticated solution that would allow optionally extracting the file text instead via right click drag context menu when I have more time. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35731 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cd591a3e0017773118121e7279f5a627694e38e7 |
|
08-Jan-2010 |
Oliver Tappe <zooey@hirschkaefer.de> |
* BTextView no longer inverts the caret although there is a selection, which would yield double inversion of the caret position, causing #5006 * cleanup with respect to when the selection can be highlighted and/or the caret can be shown/hidden git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34944 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5f917b22c880e946571d67201f5da7ff417c0388 |
|
06-Nov-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Implement a suggestion of Humdinger in the aftermath of #4785: * make word-wise navigation via cursor keys match Pe, such that it is consistent throughout haiku (unless some applications brew their own) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33913 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bd34734f1132734e751b7cde5bf6a1f6f5ea7fa8 |
|
04-Nov-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
fixed regression of r33882 reported by Michael Weirauch: * wrapping must always be possible at a newline! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33886 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a85a827cd0df535159856c3f31d187d5f2ae952e |
|
04-Nov-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* introduced two new private methods, _PreviousWordStart() and _NextWordStart(), which are now being used to implement the word-wise keyboard navigation, fixing #4785 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33885 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
32c29a08ba280a85bd5419322df4354490a996e9 |
|
04-Nov-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Reworked character class handling in BTextView: * Word selection via double-click now works like in R5, except that '_' is now being considered part of a textual word, too. This fixes #4754. * Adjusted CanEndLine() to make much more sense (at least for western languages). While I have tested the wrapping quite a bit, it is not unlikely that these changes introduce regressions. If you spot one, please tell! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33882 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
baa3366093870ef1ca2fe94a3128e4a0822a7ed0 |
|
04-Nov-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* the textrect.right should always be rounded up to the next integer - fixes #4894 * PointAt() now rounds x- and y-positions to the next integer instead of always rounding them up - this yields improved caret-positions (e.g. before an 'f' character) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33877 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4b0f176d9c1beb3ef4a0f609eafa418295ef290e |
|
28-Oct-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fix more regressions in _AutoResize() visible when renaming a file in Tracker (reported by Axel): * _AutoResize() can no longer check the difference between the textrect and the maximum line width, as the textrect is no being adjusted earlier during the line-calculation code - instead, it needs to measure the difference between the bounds and the textrect width plus the insets. * MakeResizable(true) needs to reset the right inset, as otherwise the auto- resizing would get confused about how large the textview needs to be (seems to be an artefact of how Tracker creates the textview). * GetInsets() doesn't need to compute the insets, as they're maintained in fLayoutData. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33813 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ec397948975da960afe4fe625bd06d8b0b0341e6 |
|
21-Oct-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
fix regression reported in #4826: * SetTextRect for non-wrapped textviews needs to update the insets, as otherwise several misalignments occur within several apps - renaming in Tracker was effected the worst, though git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33717 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
32c8ab89a9e7d318dab3908eb4f3b0f452cd7457 |
|
21-Oct-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* added _TabExpandedStyledWidth(), which makes sure to expand all tab chars during the width calculation * used _TabExpandedStyledWidth() at all places that need to expand tabs, fixing #4822 * removed _StyledWidthUTF8Safe() as it didn't make sense - we now perform the same auto-scrolling horizontally as we do vertically git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33713 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b18f133db36bceee02e144e86993e1ba684b79ae |
|
21-Oct-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
generally overhauled non-wrapping mode of BTextView, as it was considerably broken: * switching from wrapping to non-wrapping mode triggers a recomputation of the text rect * non-wrapping mode now triggers updating of the data rect for the horizontal scrollbar as needed, fixing #4705 * corrected a couple of width computations that confused bounds and text rect width, leading to drawing artefacts at the end of a line * unified computation of text rect width to always take all lines into account (not just the first one) * some cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33703 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7a842ef77c057a64ccda5ed71765d50658442747 |
|
04-Oct-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Check negative out-of-bounds index in BTextView::OffsetAt(). According to #4707, this is the BeOS behavior. I have not checked myself and the BeBook is very brief on this, but similar methods do trim indices to be in range. Another alternative would be returning an index indicating an error (-1). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33439 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
58465926de9711d44a7b4849580d70456b9a3cc2 |
|
07-Sep-2009 |
Michael Lotz <mmlr@mlotz.ch> |
Fix auto indent feature of BTextView. The indent was inserted before the line break instead of after. Also whitespace after the cursor position wasn't ignored. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32993 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9946ba71ad43f0916003b99a89f7c238e139b408 |
|
16-Aug-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* reordered members of BTextView to be compatible with R5 again, although it should have been safe before, too, since BTextView neither has inline methods nor any friends that live outside of libbe * added new member fLastClickOffset in order to be able to restore the triple-click handling (linewise selection) * renamed fClickOffset to fCaretOffset, as that is what it really is now git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32444 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
360495a3bf0264d238db1caf795304307a93e577 |
|
03-Aug-2009 |
Axel Dörfler <axeld@pinc-software.de> |
* Only use the new preferred computation method if word wrap is disabled, or else this won't work as is (this is something that could be done, better, though). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32077 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0b1db200dfa7afd69c576aa1db9093a8db753b03 |
|
03-Aug-2009 |
Axel Dörfler <axeld@pinc-software.de> |
* The preferred size is now actually the preferred size - the size that is needed to show all of the text view's contents. No idea what the previous solution was about. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32075 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f2e0ac2cd78f00f306c30fdd289e05992d3ade0c |
|
30-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* Instead of moving bounds-height during paging, we now determine the exact next position of the caret and only scroll the distance between the current and the next position. This fixes #3981 * When paging upwards, we need to compensate for the fact that the caret position is always considered at the top of the line, as otherwise a page-up would pass one more line than a page-down git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30933 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4b6aea9b7492821678087019ffc663d70a1de0d5 |
|
30-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixed bug in BTextView reported by Matt: * when selecting via mouse, the caret position now follows the direction of the selection - which is less surprising than not moving the caret at all git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30928 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b62daa4867e8551f7d54ee45c76cf921d94cc646 |
|
15-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* adjusted _HandleInputMethodChanged() to not blindly insert the string that has been given via the inline input method, but to feed the individual UTF8-characters it contains to KeyDown() - this way special keys like B_BACKSPACE and cursor keys will be handled correctly instead of producing a "unknown char rectangle" git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30764 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
78da6449b00c2e240f3b1fb889d03e2a41617075 |
|
14-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* corrected the computation of alignment offsets for centered or right-aligned textviews, such that the characters are drawn at their correct positions and there are no longer any mismatches between caret and character positions * fixed too large widths returned by LineWidth() for lines ending with a newline: the newline character must not contribute to the width This makes the textcontrol in DiskProbe work properly again. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30762 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8ca914d177c8716a100c7fdc2eb4a44aec0000b5 |
|
13-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* removed debug output git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30758 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f287ca7dc8ff31c2baa2a65178ca7348e4c8214e |
|
13-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
fixed behaviour of non-editable textviews: * non-editable textviews no longer draw the caret * the cursor keys scroll immediately, not only when the (invisible) caret reaches the views bounds * HOME/END work more reliably * any selection stays active throughout keyboard navigation Tested with AboutSystem, Mail, StyledEdit and Beam - seems to work ok git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30756 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6f260d075b6e20c339d129e375cde0ec21fe46d4 |
|
10-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixed two bug(let)s in BTextView that I encountered when working on the Keymap preflet: * obscure the cursor only if the textview has the focus * initiate a drag not only if the cursor has moved to another index, but also when the cursor has moved more than three pixels, since otherwise it was impossible to drag the first character to the left or top of the view (as the corresponding index was always zero) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30698 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
73af36d459836af7c4afd2d87e22dabb55ca5133 |
|
01-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* maintain width of 80 chars per line * automatic whitespace cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30533 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5cc8dc2fe3d270f7b101c18ec85b71d6219558e9 |
|
01-May-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* unified application of style into a separate method _ApplyStyleRange() in order to maintain the null-style appropriately, if required * finally fix #3040 for real (a single style is now maintained at all times for non-stylable textviews) * the caret is now being drawn with the correct size, even if it is on the empty line at the end of the buffer and a specific font size has been requested git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30532 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
435455abc1d3e5243b9d4e156bca752129e71bb7 |
|
30-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* textviews that aren't editable no longer perform cut or paste actions (again reported by kirilla, thanks!) * when tracking the mouse in order to detect drags, it is not necessary to check if the pointer is within the selection, as that causes problems when you e.g. click on the border of the selection and then move the mouse outside of it (we'd still want to initiate a drag in that case) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30519 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c27ffb3a231c2bf8a7645664e67723d32bd626e1 |
|
30-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixed a bug reported by kirilla: * the textview now only initiates a drag after the mouse has been moved to another offset, making it possible to click into the selection in order to position the caret at the offset corresponding to the point of the click (just as R5 does it) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30518 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
819c98a3831dc7367a34fef6928d2e3b6a736358 |
|
30-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixing #3040 (DeskCalcs textview showing wrong/multiple styles) * fixed crash in StyleBuffer::SetStyleFromMode() if any of the given pointers is NULL (which is perfectly valid) * BTextView::SetFontAndColor() now syncs the null style before it sets the range, thus making sure that there is only one style if the view is not stylable git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30516 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6241755766e31dc196374d5cb40e3dec71e107da |
|
27-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixed all wrapping issues that I know of (non-working wrapping at end of text, broken hard-wrapping of overlong words, visual leftovers after a word got wrapped): * adjusted _FindLineBreak() to no longer expect that only whitespace can end a line, as that is simply not true * CanEndLine() returns true for characters that are followed by end-of-text or a separator * activated the commented lines in CanEndLine() that allow '...' to be treated as a word As I have nothing more relating to BTextView on my todo-list, I will start doing something else now, but please *do* send any complaints my way ;-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30473 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cad2c3d0a5bcd9f0ea18a41391165e2fab509d13 |
|
27-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* fixed bug in autoscrolling that caused the content to jump between the view's top and bottom if you moved the pointer above the view and reached the top * increased auto-scrolling speed to 40 scroll steps per second and changed _PerformAutoScrolling() to behave as R5: do soft scrolling git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30463 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
588b46eacd9e654c801a12fa60e73259f93af5b7 |
|
27-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
more work concerning navigation within BTextView: * pressing HOME on last line works again * made public versions of LineAt() do what is required to pass back the correct value even for the last line of the buffer (original implementation has been moved to private _LineAt()) * PAGE_UP/PAGE_DOWN now moves the view by the bounds-height, making the behaviour somewhat less confusing (IMHO, please shout if that's not acceptable for you) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30458 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2ae836dbe00be1d3d2245edc2c8657490fe6b481 |
|
27-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* temporarily removed parts of my last change as this completely ruins single-lined textviews - needs some more thinking ... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30456 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8fd209b4de878c718aae2844e87a0fab7cb2feb9 |
|
26-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixed incompatibility with R5 (and general PITA) - LineAt(TextLength()) returned one less than it should, causing unexpected moves of the caret, for instance when pressing HOME on the last (empty) line: * LineBuffer::OffsetToLine() and LineBuffer::PixelToLine() did not check for the last line in their binary search * removed a special case from TextView::PointAt() which now is no longer necessary (not sure if it was, before) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30435 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f7c48ade9337ba689508d221ef5fb2550b2645d0 |
|
26-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* fixed a couple of inconsistencies with respect to handling of cursor- and paging-keys, especially extending the selection via shift was more or less broken git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30431 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ed4f2d880548b5a11e7b3d55a36f53648bb62ed5 |
|
15-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
Fixed a regression pointed out by Rene: * Select() did not adjust fClickOffset, which resulted in the cursor position not being where on would expect (noticable when pressing cursor-up/-down) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30184 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
78772ca58ce4c36d69e70b0738ad535e6d968305 |
|
09-Apr-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Should fix the problems with dirty selection left-overs when editing and also other situations. Basically, I made DeleteText() adjust the selection according to the deleted range. Some places where DeleteText() was called forgot to adopt the selection. Other places adopted the selection. Maybe some of those could be removed now, but some also change fClickOffset, so I just left them as they are. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30076 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bedfcd63af3784b0379091db9f77a1b36411477c |
|
09-Apr-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Improve the word wrapping a bit. This should eventually use the LocalKit when it's ready. For now, I just tried to fix stuff like breaking before punctuations. I had trouble wrapping my mind around the wrapping code, so I didn't include as much cases as I wanted. Basically, the wrapping code assumes that a spot where CanEndLine() returns true must be a white space character, which wouldn't be the case. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30075 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b2a271d29fdaf9444d16c982a216b655b7fb8834 |
|
08-Apr-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Changing the text selection region calculation was not such a good idea, it needs more testing before I can do that, but in principle, I think the idea was an ok one... :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30048 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
82d9f508418d3d622861afc797967daf4f986267 |
|
08-Apr-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Some BTextView fixes, most importantly the annoying up/down ping pong when triggering auto-scrolling in BTextControls... * _BTextInput_::MinSize() added 1 to the line height, but when aligning the text rect, at least one pixel is added at the top and bottom, which makes for at least two extra pixels. * BTextView::_PerformAutoScrolling() had some code which was supposed to prevent from out-of-bounds scrolling, but the bottom maximum coordinate was not correctly calculated. This and the above item led to the ping-pong effect. * Additionally, I prevented scrolling vertically for one-line text views completely. * On mouse-up, reset the cursor. It may have to be the I-Beam cursor again, for example after de-selecting. * While mouse tracking the selection, always use the I-Beam cursor. * Also when mouse tracking, do not use the minimum/maximum text offset when the mouse is above/below the text rect. Do this only when it's also outside on left/right sides. This is less irritating and works like on other platforms. It means the first/last line can still be selected, without having to constrain the mouse to the inside of the text view. * When calculating the selection region, don't make the bottom one pixel too far up. Lines which contain glyphs that extend below the base-line have one more pixel below the glyphs that is inverted now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30046 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
200da6828fde5c007be093a458752137ca8a5626 |
|
07-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* implemented wordwise navigation via control + arrow keys * renamed _FindXXXWordBoundary() methods to _Previous/_NextWordBoundary() since the respective per-char methods are named this way * started to work on improving the behaviour of page-up/page-down git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30012 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ed5f1fd36793414fca50835448cc4c3b74a0789b |
|
07-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* fix off-by-one error in my last change that reverted the editing direction - oops ;-) * undo is now active by default git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29996 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3f3ab1625c45e1d58ea1b5443343a91d381e1e0c |
|
07-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
continued work on BTextView: * reverted my recent change that caused Mail to always show the end of mails 8-) and now invoke ScrollToOffset() wherever it was missing (mostly in keyboard-related methods) * _DoInsertText() only moves the caret if the text has been inserted in front of the caret, not after it * overhauled selection by char/word/line and their extension mechanism (which now behaves as the haiku shell) * use strnlen() instead of strlen() in those versions of Insert() which accept a length parameter, as strlen can potentially waste a lot of cycles skipping the whole string, when all we want is to clamp the length. * cleanup (some of it automatic removal of trailing whitespace) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29995 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
940901b615846b8456b78fedce25cdf8b222ecfc |
|
06-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
applied two textview-patches from Blub that fixes #3458: * Select() did not re-show the caret when it should * GoToLine() must hide/show the caret to avoid drawing artefacts git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29983 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4e50f1ae68edb5d53d853a28325f004d23a6811b |
|
06-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* Instead of invoking _DrawLines out of the app-server drawing context, we request the drawing via Invalidate() - this make use of the app-server's potential double buffering, whenever that is active. This change reduces flickering in VESA mode considerably. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29962 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2da74964c08221fba8875a5bb1d4374ee89b86f6 |
|
06-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
fixed two scalability problems that made BTextView perform rather slow with large contents: * when searching for tab characters in DrawLine(), we now limit the search to the current line, too (not only the end of the style) - this avoids scanning to the end of large contents repeatedly * there's no need to refresh from the edit location to the end of the content in _DoInsertText(), we only need to refresh the part that has changed git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29960 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c06e28719b063bb3cb05b529b43b188538e864b7 |
|
04-Apr-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Olivier Coursiere: Fixes ticket #3673. Thanks a lot! NOTE: There are some more problems with regard to this, if you resize DeskCalc (which sets a new font size on the expression view, and then type something, the newly typed stuff will have the old font still...) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29911 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
339dcf9c81a6a987542276f8436ba2493175398d |
|
28-Mar-2009 |
Stephan Aßmus <superstippi@gmx.de> |
When changing the text rect, simply invalidate the view. Otherwise it leaves dirt in various cases. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29760 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b7c9f42b942fbb52c79929f4a12684d0c075f8f8 |
|
11-Mar-2009 |
Ryan Leavengood <leavengood@gmail.com> |
Fix the bug on the mailing list where TextView does not go to the beginning of the buffer when Ctrl-Home is pressed and to the end when Ctrl-End is pressed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29476 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2f86ba45579bdc9648b232175f87edc62ab71b54 |
|
15-Feb-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Implemented a new look for the Haiku interface controls. It was overheard that they looked too ninety-ish. TODO: The code behind this is work in progress. The basic idea is to extract all drawing code into a new class BControlLook, of which there is a global instance be_control_look, instantiated in InterfaceDefs.cpp. At the moment, all the old drawing code is still there, and the usage of be_control_look is inside if-bodies checking the instance against NULL. In another words, by not instanitating be_control_look, you can revert back to the old look. BControlLook's job is to provide reusable methods for drawing certain types of frames, backgrounds and labels, so that application developers can make controls that re-use the same drawing code as built-in controls and adopt to changes made there. I have added the notion of "borders". Each of the frame drawing methods can be made to draw certain borders only, which is supposed to help when controls shall visually attach. This feature is not fully explored at all ATM. TODO: Update BColumnListView header view and BStringItem text spacing. Update other apps where it makes sense to use BControlLook. For the moment, only Tracker and LaunchBox are updated. More... NOTE: The new look is not very radically different, so that existing apps do not immediately look too ugly or out of place. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29221 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b545073f089282445eaf00a96e2b8f4699079c84 |
|
06-Nov-2008 |
Stephan Aßmus <superstippi@gmx.de> |
* Moved the global BPrivate::WidthBuffer from BTextView into BPrivate as gWidthBuffer. * Tracker PoseView now uses BPrivate::gWidthBuffer instead of it's own instance. * TextView.h and PoseView.h are now a little cleaner. * InterfaceDefs.cpp now deletes gWidthBuffer in _fini_interface_kit_(). * Added binary compatibility support for NetPositive in WidthBuffer.h and .cpp. Obviously it kind of defeats the purpose of having WidthBuffer neatly tucked away in the BPrivate namespace, but Haiku should run NetPositive, I guess. Fixes #2879. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28532 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c1513476b3d726a9e43f12bfb97e8f2058cb566c |
|
04-Nov-2008 |
Stephan Aßmus <superstippi@gmx.de> |
SetWordWrap() did not work when the BTextView was not (yet) attached to a window this fixes the tool tip size/layout in apps that use BubbleHelper (Beam, WonderBrush, ...). Thanks to Rene and Stefano for sending me a test application. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28489 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c470027d27f5c4e48d7706834b6eb8a78ad393a0 |
|
02-Nov-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Tracked down a busy loop that I could reproduce pretty reliably with tool tips in WonderBrush. The reason was that the text rect is getting smaller and smaller each time the tool tip is shown (even though there is only one word), and the line break moves one char towards the beginning each time. After four times, the busy loop would kick in reliably. I cannot really say that I understand the code, though. But that's the spot anyways. Stefano, could you have a look? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28471 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9f3fce1eac49627262f5b60051e28ec1617a1787 |
|
16-Oct-2008 |
Oliver Tappe <zooey@hirschkaefer.de> |
Stippi + zooey: * fixed LineHeight() for the case when the textview does not yet contain anything - instead of returning 0 we now return the lineheight of the default style (or the textview's font). Fixes #2231 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28194 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1cbca49a83413070679edb9c7b01dacdc63f6c12 |
|
15-Oct-2008 |
Stephan Aßmus <superstippi@gmx.de> |
zooey + stippi: * Fix the calculation of the fTextRect member. The BeOS behavior (and also the previous Haiku behavior) was to recalculate the "bottom" always. This was not taken care of in SetTextRect() (needs to override the passed bottom). * The insets are already tracked in fLayoutData, use this in _UpdateScrollBars() to calculate the correct data width/height (an improvement over the BeOS behavior it seems). * Try to minimize the need to call _Refresh(), which reduces flickering a whole lot. * Fix several instances where fTextRect was recalculated based on Bounds() and the saved insets, where it was broken when the BTextView was scrolled. Fixes #2784. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28151 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
39fbf5509b8740d9883b61649027478dc8a3ead8 |
|
15-Oct-2008 |
Oliver Tappe <zooey@hirschkaefer.de> |
bonefish + zooey: * Fixed a general problem with respect to overriding of the reserved virtual function slots: instead of statically invoking the method that corresponds to the reserved slot on the class that contains the slot, we now invoke the virtual Perform() method. Perform() then dispatches the method invocation to the "proper" class, i.e. the highest class in the hierarchy that actually implements the requested method. This fixes a crash in apps that use liblayout's MSlider class and should fix one or other spurious bug with old apps or libraries, too. * added new header folder 'binary_compatibility' that contains files that define the method codes and data structures required by Perform() * looked for and implemented all used reserved virtual slot functions to invoke Perform() where necessary or to pass on the method call statically (for slots that were already maintained by Be) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28124 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4df6a8c3fbb9bdfeaa7781ac43af4d17dd8d5861 |
|
01-Oct-2008 |
Stephan Aßmus <superstippi@gmx.de> |
* As with other controls, for BeOS compatibly behavior, don't shrink a BTextView via GetPreferredSize() if it is large enough. (Have not confirmed this is necessary... gut feeling.) * Calculate a minimum line height even if the BTextView is empty yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27828 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
90b7764dc354ff1bcb01abf78dafe16faa820725 |
|
21-Sep-2008 |
Rene Gollent <anevilyak@gmail.com> |
Move WidthBuffer and TextGapBuffer into BPrivate and use them from there in BPoseView and BTextView. This (correctly) fixes the previous gcc4 build issues. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27675 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8864334702e9e50713e6cf50e606d072e145c3b6 |
|
21-Sep-2008 |
Stephan Aßmus <superstippi@gmx.de> |
* First steps towards making BTextView behave well within the layout management. * The class calculates a minimum width now, which is based on the line height, this may also fix the bug with the small text inputs in the Pe Find window. * Added TODOs about implementing GetHeightForWidth(), which may be a good idea when a BTextView is used as non-editable informative text in an interface, and one wants to make sure that the entire text is shown. * Replaced the call to _Refresh() in Draw(), which recalculates all the line breaks for no reason with _DrawLines() again. The TODO mentioned that text will be drawn without drawing the background first, but maybe this is a relict from times where Draw() was invoked directly? At least I cannot see any negative consequences, and this should be much more efficient. (Other than that, this patch should hopefully have no potential negative side effects...<crosses fingers>) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27670 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8ab8c63d26d82df2226f531a915cf198e6f1eb36 |
|
21-Sep-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Moved BTextView::UndoBuffer derivatives into the BTextView class as well, hopefully fixing the GCC4 build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27660 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a682d9819fae1e26cef1390bb33b5d5c73304642 |
|
20-Sep-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Quite a cleanup action to avoid polluting the global namespace with private BTextView classes: * Declared the directly used BTextView helper classes as private BTextView classes and changed all affected files. * Realized that Tracker's BPoseView was (accidentally?) using what used to be _BWidthBuffer_. It had declared it's own class with the same name and same members/size in headers/private/tracker/TextViewSupport.h, but the implementation was nowhere to be found. I can only explain this that the BTextView implementation was then actually linked and used. But the big problem was that it was used without locking (unlike in BTextView)! When many Tracker windows opened during system startup or later and they happened to each request characters not yet in the cache, I imagine things could have gone bad and corrupted memory. Anyways, since I can see the usefulness of the cache, BPoseView uses BTextView::WidthBuffer on purpose now. And I moved the locking inside BTextView::WidthBuffer::StringWidth(). * Adjusted InterfaceDefs.cpp accordingly. * TODO: Move subsequent classes into BTextView namespace as well, ie derived classes that BTextView doesn't directly know about. All stuff in src/kits/ inteface/textview_support/ * Added preliminary and not yet implemented layout friendly BTextView constructors. * I will try to handle the insets imposed by BTextView::fTextRect a bit differently when used inside the new layout management framework. For this, I added BTextView::SetInsets() and GetInsets(). SetInsets() doesn't do anything yet. So far, everything seems to work still... ;-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27654 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
fc16834e55a741b2f6ab186fcbd120b39dce7189 |
|
12-Sep-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
buffer is an array, so use delete[]. CID 130 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27439 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2a739c3115ee11467d5c24dfc90b1a30620337f5 |
|
15-Jul-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Insignificant cleanup and comment typo fixes... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26420 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4c1f76cbf463458e4af68bbdb03b45297fffb343 |
|
15-May-2008 |
Jérôme Duval <korli@users.berlios.de> |
Patch from Shinta: don't send B_INPUT_METHOD_STOPPED when IM is not active fix bug #2220 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25518 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bd78dbf81cfbde12ea168cee63172149446e67b7 |
|
07-May-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Fixed bad text antialiasing against the colored background used for input methods. Fixes #2209. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25349 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a01db67de036d8a38a77d2f9a00b0d346442b0e9 |
|
26-Feb-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Do not scroll to the bottom of the current line if that means the top of the line will be scrolled out of view. (Fixes text jumping one pixel up/down in Vision with each new char you type into Visions text box.) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24136 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
46ea5b1e49005fa48c79898fb3ad9f8f28476b52 |
|
25-Feb-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Further improvements to auto scrolling and text rect + container view resizing: * Renaming things in Tracker list mode no longer magically grows the text view. * ScrollToOffset() is not supposed to depend on the existence of any scroll bars, in R5 text views simply scroll to where they need to. This fixes renaming things in Tracker when hitting the window bounds (text widget stops growing and starts to autoscroll) and also the Text tool in WonderBrush. * _ScrollToOffset() is therefor no longer needed. * The insets of the text rect are not so interesting as the original width. In auto resizing mode, the original width is important when there is no container view. In this setup, the text rect auto resizing is mainly needed for auto scrolling, but it should never shrink below the original size. * Further improved auto scrolling for right aligned and center aligned text views, it works like R5 now. Also take the line height into account when checking for the bounds bottom. Removed extra spacing for vertical scrolling. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24130 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b8872c02c1d02d892037bcdb6cbbb3dfe482b98b |
|
24-Feb-2008 |
Stephan Aßmus <superstippi@gmx.de> |
BTextControl: * Placed _BTextInput_ into BPrivate namespace. * Made _BTextInput_::AlignTextRect() smarter, it centers the line vertically, for the case that the BTextControl has a larger label font. Improved insets for asthetics. * Used _BTextInput_::AlignTextRect() consistently in BTextControl, no more custom calls to SetTextRect(). Account for minimum vertical inset of 2 pixels in GetPreferredSize(). * Consistendly select all text when gaining focus in _BTextInput_. * Override MouseDown() in case the control did not have focus before, or else BTextView::MouseDown() will deselct the text again and place the cursor. (in line with BeOS behavior) * Removed unused fBool member from _BTextInput_ and other cleanup. BTextView: * Reimplemented BTextView::_AutoResize() so that it works well with BTextControl and autoscrolling when the alignment is not B_ALIGN_LEFT. I needed two new members for this, fLeftInset and fRightInset which are the original insets from the fTextRects. It might currently be broken for renaming things in Tracker, I will have to check. _AutoResize() no longer messes up the fTextRect insets. * Fixed stray carrets sometimes being left over, mostly when auto scrolling, but I observed them in other cases as well. * Prevent negative scrolling offsets when autoscrolling. Fixes weird scrolling offsets when navigating to the left. * Reset scrolling to B_ORIGIN when SetText() is called. Fixes for example starting to type in the middle of the control in Vision when entering new text and autoscrolling was triggered before. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24101 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
13bba42efc07a157d33f72832fa9fe61e853777f |
|
03-Feb-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Previous revision break all sorts of stuff. Fixed. hopefully git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23837 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9d73eec0ef3145a44fa5d15c350fed5cd30d39b8 |
|
30-Jan-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Fixed a couple of problems with inserting text when there was a selection (for example, moving around text with the mouse). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23789 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bc7e472d88ae1700efd1f9d505113afa2c19a851 |
|
30-Jan-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
DragMessage() makes a copy of the passed message. We were leaking inside BTextView::_InitiateDrag(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23787 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8afaa47365398d9f83c869092256b8868e4bd5d4 |
|
17-Jan-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Fixed warning git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23606 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
75ee0a2911a4942882ed31ed659b71cd0ebca300 |
|
17-Jan-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Respect the maximum bytes set by SetMaxBytes() in Insert() and on keydown. Fixed SetMaxBytes() so that it respect multibyte characters (it removes the whole character in case it doesn't fit). This can be seen in BColorControls, where you can't write numbers with more than 3 characters anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23605 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2c2176ceba781e2084dfc29db5d7e6ec6070f39e |
|
01-Jan-2008 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Removed SetViewCursor() from BTextView::_Deactivate(), as suggested by cl21. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23203 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cb752f18227a62e22d5f94c798cc6472dda73c84 |
|
22-Nov-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
xdiff -> xDiff, useHorz -> useHorizontal... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22978 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c9dcf7979ba66a535bfcb15065e9d8f3ccde1631 |
|
22-Nov-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
BTextView::_ScrollToOffset() just didn't work correctly most of the times, since xdiff and ydiff didn't take the point returned by PointAt() into account. Thanks to Andrea Anzani for noticing this. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22977 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
23b6ac7e15e7144d28d15007a29361bc41ec4537 |
|
01-Nov-2007 |
Stephan Aßmus <superstippi@gmx.de> |
this should complete the work on password mode for BTextView: * fixed +/- 1 bug in _BTextGapBuffer_::GetString() * used the correct text and offsets in BTextView whenever the visible text is to be used * when copying to the clipboard, copy the bullets * when dragging the text, drag the bullets TODO: * test more with UTF8 chars in the original text (I am unsure if fSelStart and so on is really in bytes rather than glyphs) * test with multiple font styles git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22787 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
13ca2d942d44c4d9952c1fa35bd91baf640ea269 |
|
23-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
Patch by Vasilis Kaoutsis - thanks!: * Rewrote TextView.h * Renamed all private methods to have the underscore prefix. And also: * Whitespace and line width cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22688 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
17dee6524b95fec06ed72a763f9f15c1ded54329 |
|
08-Oct-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
and there, the usual commit which removes the forgotten debug output... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22490 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c0441727047d13b662eef26bff0f2b02786fe2ac |
|
08-Oct-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
I was wrong after all. InsertText() doesn't call SetRunArray() (and hence CancelInputMethod()), but it implements part of it. To avoid code duplication, I added a private _SetRunArray() call, which does most of the work, except cancelling the input method, and calling Refresh(). Removed some unneeded code from CancelInputMethod(), some small changes in HandleInputMethodChanged. -Questa linea, e quelle sotto di essa, saranno ignorate-- M src/kits/interface/TextView.cpp M headers/os/interface/TextView.h git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22489 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6fc1a5d0eacc399f7d4acaa8df67976fbedf91a6 |
|
04-Oct-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Mail's inherited InsertText() calls CancelInputMethod() indirectly, and since InsertText() is called inside BTextView::HandleInputMethodChanged(), this method would see fInline slip away from under its feet.. Now we call the BTextView version explicitly. Fixes bug #1022, although I'm not sure if this is completely correct. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22444 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
94b9294f485fc8e096c70fd4a76eaa2764d3b8a8 |
|
04-Oct-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
oops! Somehow I managed to commit a version with some extra debug code enabled. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22433 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f2476bcc9c193632711781727a96a3222ee1df05 |
|
04-Oct-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Patch by Rene Gollent: TextViews now can scroll even if they aren't attached to a BScrollView. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22432 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b33a19a278205b03216773026eeda3aa616cc21e |
|
01-Sep-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Adjusted a bit BTextView::AutoResize() so that the text rect is more centered. At least renaming a file in tracker looks a bit better now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22139 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e94ad1e24d1fafa275a99a7edad869d2a1a825d4 |
|
31-Aug-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
If typing is hidden, don't reply to B_COPY or B_CUT messages, but beep() in this case. Note that the public methods still let you copy and cut the real text. Also prevented stealing passwords via scripting (not tested, though). Fixes bug #1354 Got rid of the _BTextGapBuffer_::[] operator since using it creates less readable code. Also Implemented _BTextGapBuffer_::RealText() and used it instead of Text() inside BTextView. Will make sense later. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22129 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6a9c969bcc9ce993c08966c4e23d6bb9439a0cd0 |
|
28-Aug-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
If line breaks have changed, don't take the startOffset into account. Fixes bug #1430 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22095 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c6811df0c311db7536241b539b3b72ca35db23cc |
|
13-Aug-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* I am turning this back on, it seems the problems are fixed, and if not, I would like to fix them. Using the string width cache results in a great drawing speed up, for example in StyledEdit and Mail. Any app that uses a larger BTextView. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21928 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
98eadf4b9d1508bacdd4e1a4783622bb9583cdef |
|
09-Aug-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Scrolling didn't work correctly if the user didn't move the mouse all the time. Fixed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21868 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
99584ef9a27169930f363f873a72c9afbdb3c2af |
|
04-Jul-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Added _Show/_HideCaret() and used them in place of more bug-prone code. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21558 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c57ff65839c3dec3c8a9d16cb42cc75107996762 |
|
27-Jun-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Avoid scrolling vertically if scrolling area is outside the text rect. Pin parameters in Select() before doing other checks on them (reported by Marc Flerackers) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21511 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1a2a0e07c648ab4997b1fabecc8e2766e179415e |
|
22-May-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Check scrolling against text rect limits. Fixes bug 1240 (and maybe 1241 too) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21207 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
107ce0bba036f729959f41635aa2cb01401e5807 |
|
03-May-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Fixed a bug in selection via keyboard (the problem described in bug #716, comment #4) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20997 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f96bec013d4bf86e8ed4a3906da19daf901457cc |
|
30-Apr-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
small cleanups. Moved some code into a _DrawLine() method. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20940 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0d4fbcc8fea16e76c48937dedca56c8ef6774706 |
|
27-Apr-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
made _BInlineInput_::AddClause() more robust in low memory conditions git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20870 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a1c0361478225d33ad1dc69575c374dd57b8f6b7 |
|
18-Apr-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Use LineHeight() instead of StyledWidthUTF8Safe() to get the height of the line in PointAt(), since the former didn't return the correct result, due to the fact that there were 0 charachters on that line. Fixed a bug in TextHeight() which ended up doubling the height of the line if we requested the last line. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20745 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1a64df767e30bf29ea0eabe777b49bcddce6f000 |
|
23-Jan-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
BTextView::FreeRunArray() now accepts a NULL pointer too (like free()) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19937 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ee144512ec5bf0a32d7cb4ff816eea06e30c17d4 |
|
16-Jan-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
use Invalidate() and UpdateIfNeeded() in BTextView::SetTextRect(). Fixes bug #571 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19824 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
25df172b722bb7e9c703dcdc31370499255f88c6 |
|
04-Jan-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Implemented auto horizontal scrolling (by fixed steps for now), moved auto scrolling to its own method, introduced a new private StyledWidthUTF8Safe method. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19694 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
23fb6e0efe46a7d093f4105545ed805f8fcb293b |
|
04-Jan-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
- Fixed wrong redrawing of the caret in some particular circumstancies (most notably when you clicked the first time on the textview, the caret would be left "drawn" on the old position. - Implemented vertical auto scrolling (horizontal auto scrolling is still missing). Note that the view jumps when there is nothing to scroll, might be a bug in BView::ScrollBy() ? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19692 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
59f9192c3b17e65cd32cfe47a0dbac5a06d4ecb0 |
|
21-Dec-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
added nothrow git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19590 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7ca295180f183b5c18effb11159280e330cae0ca |
|
02-Nov-2006 |
Axel Dörfler <axeld@pinc-software.de> |
Applied Stefano's patch to bug #886. Also does nothing now if startOffset is larger than endOffset. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19169 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
fe23fb6699f41536bf1990fcdca05c8a72930383 |
|
29-Oct-2006 |
Axel Dörfler <axeld@pinc-software.de> |
* Renamed private BMenu::SelectItem() to _SelectItem(), and made its arguments a bit more sane. * Fixed two GCC 4 warnings. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19139 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f0cd9e9d8724d11f41a6497eca8ca4156e2e139d |
|
24-Oct-2006 |
Axel Dörfler <axeld@pinc-software.de> |
Canceling an input method now removes the complete inline from the text. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19118 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3956f772e130020df4f817a0fa72643ef41c2db9 |
|
24-Oct-2006 |
Axel Dörfler <axeld@pinc-software.de> |
No longer ignores the text that comes with a confirmed B_INPUT_METHOD_CHANGED event; it now only deactivates the inline in that case. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19115 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4dd74f2945436359f2a2fbb9f6836e0de3c2340d |
|
04-Oct-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
disabled the use of _BWidthBuffer_ until the app_server font backend implements B_BITMAP_SPACING. Small cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19004 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
de20f0facaa2afcc46cde051e683bd65af8e3f84 |
|
01-Oct-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
some changes, fixed a rendering bug git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18987 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1e17db8ac67612bd9372561d02a20a77e1d9fcf1 |
|
28-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
put common code for Insert() methods into DoInsertText(), this avoids an extra strlen() call git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18968 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7d8ee43e802c9976d7e1f1c0e7b241bd694acfea |
|
28-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
now checks the real lenght of the passed buffer in BTextView::Insert(). Seems to fix bug 675 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18967 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
25ba188a07355107b2da915d49d8c21308511cb6 |
|
27-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
added a parameter to _BTextGapBuffer_::GetString() so that the caller knows how many bytes are really returned. password mode looks better now git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18965 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f70a414b8b3a54b4a61b2b4fa451326071fd889b |
|
27-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
fixed broken endlines in case there were TAB charachters (bug 865). A better solution is also coming. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18959 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3091f56a1a21750dd3e32073ff8caea4eb1912ca |
|
28-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
more bugs fixed in keyboard text selection git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18956 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a09f0db16947ed686d2cc6335c18f7ede8391ae6 |
|
28-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
fixed some remaining bugs in keyboard selection, reimported code for up/down keys handling git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18954 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7184af5e4e7638a3d2ecb55a0a45c7783fd7c358 |
|
28-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
improved keyboard text selection. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18953 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4a718fa33d5b3843d475ce7c23fbe26caec9762e |
|
26-Sep-2006 |
Jérôme Duval <korli@users.berlios.de> |
fix for gcc4 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18944 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9205b41148f710afca7b52474413b6cb58da822c |
|
26-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
fixed word by word selection git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18943 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6343dc98552547cabd7f392cd2bceffcd68e281d |
|
26-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Implemented working asynchronous mouse tracking, dropped synchronous tracking. Selecting text is now also much faster. Auto scrolling is missing for the moment, though git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18942 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d67b1efc99f2d26dab785e0475a544186cede11a |
|
17-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Fixed broken endlines. This breaks a bit more 'password mode', but it wasn't 100% working yet anyway git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18874 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
575a68b31798043cc91b0f5d648514525dabaf99 |
|
14-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Implemented BTextView::HideTyping(). Now it will display B_UTF8_BULLET chars instead of the real text if this option is enabled. Note that there are problems with the text width, i.e. the calculation is still done with the "real" chars, leading to text corruption. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18837 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3a70724f430df4f06ff9d209ef7f02f2aaf6116c |
|
14-Sep-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Finally nailed that bug which caused text not to be drawn in some cases... OffsetAt() was returning 1 instead of 0 if you clicked on an empty BTextView due to a bug in NextInitialByte() . Some cleanups git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18836 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
91b381a9527e113f169c96c64ac5e6be0b480833 |
|
28-Aug-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Moved TextView.cpp out of the BTextView (soon to be renamed) folder git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18661 a95241bf-73f2-0310-859d-f6bbb57e9c96
|