#
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>
|
#
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.
|
#
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.
|
#
639e1855 |
|
12-Jul-2012 |
Rene Gollent <anevilyak@gmail.com> |
Fix indentation and match parameter names with .cpp.
|
#
0e201201 |
|
12-Jul-2012 |
Rene Gollent <anevilyak@gmail.com> |
Fix build, header changes were forgotten in previous commit.
|
#
61eb1f1d |
|
22-Oct-2011 |
Alex Wilson <yourpalal2@gmail.com> |
Replace remaining InvalidateLayout()'s with LayoutInvalidated(). Also do a bit of cleanup/move methods around.
|
#
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
|
#
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
|
#
5569f333 |
|
06-Nov-2009 |
Axel Dörfler <axeld@pinc-software.de> |
* Someone obviously forgot to check in some header changes. Build fix. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33917 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
|
#
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
|
#
89208c77 |
|
27-Aug-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Finished unifying the Interface Kit headers: * Fixed copyrights (puncuation and capitalization, removed authors from headers) * Updated indentation style * Unified pointer/reference style * Re-ordered some methods for better grouping where it could be done (abd adopted source accordingly) * Small coding style fixes here and there No functional change intended. +alphabranch git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32745 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
|
#
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
|
#
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
|
#
02359fde |
|
27-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
[ should have been part of last commit ] 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@30459 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
|
#
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
|
#
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
|
#
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
|
#
9e163a7a |
|
21-Oct-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Made BScrollView work when using it with the layout system. * Added a layout friendly constructor - it's not so nice to use, though, since the original one already doesn't get a BRect (we just don't need the resizing mode, and have to set the B_SUPPORTS_LAYOUT flag). * Refactored size/frame computation a bit. * Cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28258 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
|
#
40ca6c57 |
|
21-Sep-2008 |
Rene Gollent <anevilyak@gmail.com> |
Declare BPoseView as a friend of BTextView. This allows it to use the private width buffer classes, and fixes the gcc4 build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27673 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
|
#
e6378518 |
|
21-Sep-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Fixed typo. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27662 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6168332c |
|
21-Sep-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Sorry, should have been part of r27660. Moved BTextView::UndoBuffer derivatives into BTextView class as well, hopefully fixing the GCC4 build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27661 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
|
#
37b98743 |
|
20-Sep-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Update header indentation style. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27643 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
|
#
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
|
#
f6e4cbb9 |
|
15-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class definitions). * Minor cleanup here and there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 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
|
#
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
|
#
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
|
#
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
|
#
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
|
#
e3338433 |
|
03-Feb-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Added Alloc/Copy/FreeRunArray() as Axel's suggestion, and used it internally in TextView. Also fixed small memory leak git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16224 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d601f6e8 |
|
11-Nov-2004 |
shatty <shatty@nowhere.fake> |
rename RecalLineBreaks to RecalculateLineBreaks ; use ceil() when computing the origins for lines git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9913 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bc1aaab6 |
|
03-Dec-2002 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
AutoResize() parameter was missing. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2147 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d734a8ce |
|
23-Oct-2002 |
beveloper <beveloper@nowhere.fake> |
some header files to be R5 compatible git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1617 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
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.
|
#
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.
|
#
639e18555f1572f33cd19d94701f6eae8062cfe4 |
|
12-Jul-2012 |
Rene Gollent <anevilyak@gmail.com> |
Fix indentation and match parameter names with .cpp.
|
#
0e20120117d4fa86db87a969d1f1181dd70c674f |
|
12-Jul-2012 |
Rene Gollent <anevilyak@gmail.com> |
Fix build, header changes were forgotten in previous commit.
|
#
61eb1f1d19eed26b6138b0701612e8eb31bb1d86 |
|
22-Oct-2011 |
Alex Wilson <yourpalal2@gmail.com> |
Replace remaining InvalidateLayout()'s with LayoutInvalidated(). Also do a bit of cleanup/move methods around.
|
#
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
|
#
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
|
#
5569f33367848cb60a62981cc84c40b4419b7a77 |
|
06-Nov-2009 |
Axel Dörfler <axeld@pinc-software.de> |
* Someone obviously forgot to check in some header changes. Build fix. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33917 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
|
#
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
|
#
89208c77f10235d43fda0c7b3fd6751db02cc12c |
|
27-Aug-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Finished unifying the Interface Kit headers: * Fixed copyrights (puncuation and capitalization, removed authors from headers) * Updated indentation style * Unified pointer/reference style * Re-ordered some methods for better grouping where it could be done (abd adopted source accordingly) * Small coding style fixes here and there No functional change intended. +alphabranch git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32745 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
|
#
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
|
#
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
|
#
02359fde690e038aa75c5d86f7a497ec8f98d188 |
|
27-Apr-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
[ should have been part of last commit ] 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@30459 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
|
#
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
|
#
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
|
#
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
|
#
9e163a7a93c4237b659bf8411513a48351ee60d3 |
|
21-Oct-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Made BScrollView work when using it with the layout system. * Added a layout friendly constructor - it's not so nice to use, though, since the original one already doesn't get a BRect (we just don't need the resizing mode, and have to set the B_SUPPORTS_LAYOUT flag). * Refactored size/frame computation a bit. * Cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28258 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
|
#
40ca6c57eee4bc410f779211e31dc68434ba8697 |
|
21-Sep-2008 |
Rene Gollent <anevilyak@gmail.com> |
Declare BPoseView as a friend of BTextView. This allows it to use the private width buffer classes, and fixes the gcc4 build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27673 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
|
#
e6378518c46eddcf6bf223630f3891979743aac0 |
|
21-Sep-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Fixed typo. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27662 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6168332c3507ece9ce5fac75819758fa6551d327 |
|
21-Sep-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Sorry, should have been part of r27660. Moved BTextView::UndoBuffer derivatives into BTextView class as well, hopefully fixing the GCC4 build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27661 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
|
#
37b9874302c933c7e742caa2e760486a16eca237 |
|
20-Sep-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Update header indentation style. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27643 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
|
#
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
|
#
f6e4cbb95290a74b33d012600438b84742b0e572 |
|
15-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class definitions). * Minor cleanup here and there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 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
|
#
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
|
#
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
|
#
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
|
#
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
|
#
e333843348e800ae9dddeb8af5d567d172e87185 |
|
03-Feb-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Added Alloc/Copy/FreeRunArray() as Axel's suggestion, and used it internally in TextView. Also fixed small memory leak git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16224 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d601f6e882f8e3cd41590c31ad5ac66c1c9e1373 |
|
11-Nov-2004 |
shatty <shatty@nowhere.fake> |
rename RecalLineBreaks to RecalculateLineBreaks ; use ceil() when computing the origins for lines git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9913 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bc1aaab684896b3255219c158e78f4d460580bb9 |
|
03-Dec-2002 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
AutoResize() parameter was missing. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2147 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d734a8ce5a83e48e17a2d0d6635090d48c5ad161 |
|
23-Oct-2002 |
beveloper <beveloper@nowhere.fake> |
some header files to be R5 compatible git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1617 a95241bf-73f2-0310-859d-f6bbb57e9c96
|