Commit Graph
51 Commits
Author SHA1 Message Date
Stefano Ceccherini 2d60bd8b95 - Avoid setting the input method active if it is already
- Now we use the textview coordinate system correctly in OffsetAt()


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-04 07:36:23 +00:00
Stefano Ceccherini 84fed7e642 Line wrapping needs to work at charachter level, not byte level
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 11:54:38 +00:00
shatty 2d7662810e abs -> fabs, disable WidthBuffer, patch for confirmation in HandleInputMethodChanged
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9761 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 11:12:24 +00:00
Stefano Ceccherini 2f597f2eb7 fixed a warning, that amazingly didn't appear here (thanks andrew)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 09:40:27 +00:00
Stefano Ceccherini 8ca0bfcbb0 ifdeffed out some code in OffsetAt(), and added some simpler (and hopefully more correct) code, to handle multi byte charachters correctly when selecting via mouse.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 09:33:55 +00:00
Stefano Ceccherini a13f233057 Finished input method stuff: now we do also the red highlighting.
InlineInput.cpp will probably be simplified in the future.
Some subtle fixes to the keyboard/mouse selection code,
 which wasn't yet behaving as the real BTextView.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-25 06:34:51 +00:00
Stefano Ceccherini 7bb5b0eaed Fixed a bad bug in WidthBuffer, which would make BTextView behave in a weird way.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-18 21:37:00 +00:00
Stefano Ceccherini cbc9d62f52 Fixed issue with Lock/UnlockStaticBuffer() on R5
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9286 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-11 23:33:01 +00:00
Stefano Ceccherini 2910a19bbf Added an ifdef around static variables, so we use beos ones when COMPILE_FOR_R5 is defined.
That makes testing TextView under beos possible, again.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-11 13:43:39 +00:00
Stefano Ceccherini d51394ddd6 Fixed bad redrawing of the text when alignment is different than B_ALIGN_LEFT
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9122 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-30 13:10:43 +00:00
Stefano Ceccherini 5302d71190 Fixed LineWidth(): now it calls StyledWidth(). It's not an issue, since charachter widths are cached by _BWidthBuffer_.
Marc Flerackers lend me a hand and now alignments should work much better (if not perfectly)

Some cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-30 12:49:34 +00:00
Stefano Ceccherini 70751f7bfc - Fixed every Styling issue (at least the ones exposed by StyledEdit). Setting fonts works now
- Cleaned up PageUp/Down handling code
- Now setups undo in Clear()
- Alignment now partially works
- Fixed some visual artifacts which could've showed up during typing with an input method
- Added a "known bugs" section


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-29 07:18:10 +00:00
Stefano Ceccherini 91f868aeb7 Ok, this time for real.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-27 23:10:13 +00:00
Stefano Ceccherini c3c637606a Fixed an annoying jump-to-last-line-on-END-bug (reported by Waldemar)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-27 22:50:23 +00:00
Stefano Ceccherini 6be70a0fa1 Finally fixed the problem with the styling code: now selecting two sections of text
with a different color and change the font size works correctly.
Fixed a problem with mouse selection (a regression introduced when I fixed selection with keyboard).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-23 06:40:22 +00:00
Stefano Ceccherini 7575ec2d87 Uncommented the code which makes auto indenting possible.
Correctly maintain fClickOffset in SetText().
Some small style fixes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-17 10:16:06 +00:00
Stefano Ceccherini f6cd639a4b Sheesh! No wonder the styling code wasn't fully working, as we were using different constants for font attributes than the ones used by BeOS R5. Now we use those constants directly. Still not ok, but we are on the right track now (I hope :))
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8738 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-31 07:08:49 +00:00
Stefano Ceccherini 74dca7b4f4 - Fixed crash during unarchiving, caused by the use of the wrong variable (thanks to Bill Hayden for reporting), and added a check which would have avoided the crash.
- Style changes to StyleBuffer.cpp plus a small fix in ContinuousGetStyle().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-30 09:02:31 +00:00
Stefano Ceccherini 6276c26824 - Some more error checking in some functions
- Fixed SetMaxBytes(), and made it delete the text if it's longer than the indicated bytes
- Fixed Delete(int32, int32) as it was doing bad things if you deleted the final part of the text
- Fixed PageDown handling (at least, it looks like so)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-27 08:35:15 +00:00
Stefano Ceccherini 758fe00be9 Started adding input methods "clauses" support.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-27 06:50:41 +00:00
Stefano Ceccherini 7fd612e59f And here's the blue highlight when an input method addon like the Japanese one is used (the red one isn't yet there)
Some minor changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-26 06:30:43 +00:00
Stefano Ceccherini 939b1a9c4c PageDown and PageUp now behave a bit better. Still not completely ok, plus the code is a mess.
Needs to cleanup


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 07:50:35 +00:00
Stefano Ceccherini 2a346d67a6 - Fixed a nasty regression which made the control unusable
- Fixed the "caret looks like a point" bug
- More work on the Styling code


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 06:49:43 +00:00
Stefano Ceccherini 9705d07a5d I tought I already committed this:
Some small fixes and error checks


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-17 13:52:18 +00:00
Stefano Ceccherini 660a04f377 Fixed some refresh bug I introduced in one of the latest commits. "Where are those millions open source code reviewers when you need them?". Word wrapping should work again. Some small style changes. Added some more TODO items and some comments.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-28 08:33:28 +00:00
Stefano Ceccherini 41e3acb043 Added some comments, some small style changes, and some TODO items.
Simplified some code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-23 09:58:25 +00:00
Stefano Ceccherini a901231dac Reworked Selection, as it was simply broken before. Still not 100% correct
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-22 09:40:40 +00:00
Stefano Ceccherini 539a90858a Home / End go to the start/end of the line, not to the start/end of the buffer.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-21 07:22:22 +00:00
Stefano Ceccherini c1fa3828af Fixed Home/End key handling. Thanks to Andrew for reporting.
I know this won't be the last one :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-20 07:41:47 +00:00
Stefano Ceccherini 6adf049cfa Inline input method handling for BTextView (still lacks the blue/red highlighting). Thanks to Andrew and Koki for the hints.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-19 14:38:35 +00:00
Stefano Ceccherini aaae158a2b Changed BTextView::GetText(), so that the real work is done by the backend. Should be much faster now.
Fixed _BTextGapBuffer_::RealCharAt(), some minor changes


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8408 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-16 06:37:54 +00:00
Stefano Ceccherini 6fb34cf9b2 Work in progress, almost synched with the code on my hard drive:
Moved some functionalities to private methods,
some small fix.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-07 07:04:37 +00:00
Stefano Ceccherini f3e0a5e9a5 Just a quick fix for some obviously wrong code. Added SetDrawingMode(B_OP_COPY) in AttachedToWindow, before starting work on asynchronous mouse tracking.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-28 09:50:51 +00:00
Stefano Ceccherini 5a5aa2e3c5 Now it checks (on KeyDown()) if the entered charachter is allowed, and it doesn't insert (and beeps) if not.
More documentation,
some more cleanups,
started implementing input methods messages handling (but don't hold your breath)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-25 10:00:29 +00:00
Stefano Ceccherini 75ad89705f - Started documenting the class
- Added the B_INPUT_METHOD_AWARE flag to the constructor
- Fixed an obvious error in ResolveSpecifier()
- Added some ToDO items


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-24 13:46:58 +00:00
Stefano Ceccherini a667ca3cde Implemented MakeResizable more correctly (at least, it looks like it). Replaced LONG_MAX with the right lines number in Refresh() calls. Started work to make the widget double buffered. More cleanups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8130 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 15:20:51 +00:00
Stefano Ceccherini 7889e7c9ed Fixed a crash when undoing an "internal text drop", some cleanups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-21 12:56:46 +00:00
Stefano Ceccherini 895207da06 Implemented BTextView::SetText(BFile *.... etc.)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8038 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 09:51:10 +00:00
haydentech 0ddc8de6c6 Wrong variable used during unarchive
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-26 16:43:58 +00:00
Stefano Ceccherini 7446a252ed Fixed a crash when running beshare with our BTextView (thanks to Andrew Bachmann for reporting), though it's a bit hackish, added some printfs to TextView.cpp to help finding/fixing bugs, a small optimization to WidthBuffer. Should convert and commit WidthBuffer's tests to cppunit tests sooner or later.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6989 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-15 07:19:27 +00:00
Stefano Ceccherini 008cfb1db2 WidthBuffer complete,
Changed some methods name,
reordered class members in TextViewSupportBuffer.h, now they are in the same order
OpenTracker says


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-17 07:48:58 +00:00
Stefano Ceccherini 356acd7d45 Fixed artifacts when highlighing text, added Hiroshi Lockheimer to the authors list (BTextView is based on his SteEngine), reformatted the code some more to comply with our guidelines
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-04 14:19:30 +00:00
Stefano Ceccherini aa4d8c571d Synching with the code on my hard drive... Archiving/unarchiving should (partially) work now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-17 10:34:29 +00:00
Stefano Ceccherini 76f8475798 Some more work on the undo buffer. Added a quick and dirty implementation of WidthBuffer (it's needed by OpenTracker). We'll want to implement it correctly.
Multi-byte character insertion/deletion works now in TextView (thanks to Marc Flerackers)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-24 10:12:35 +00:00
Stefano Ceccherini b032f97253 - Fixed text pasting
- Fixed text moving
- Almost completely implemented Undo capabilities
- in BTextView::GetSupportedSuites(BMessage *data): added the suites name
- fixed BTextView::Insert(int32, const char *, int32, const text_run_array *), it didn't
  take offset into account
- undo is disabled by default (even if the BeBook says the opposite)
- added B_SELECT_ALL message handler
- now it doesn't select anything if the object isn't selectable
- drag message is now filled in BTextView::GetDragMessage() as it should, and not in
  BTextView::InitiateDrag()
- changed all deprecated SetCursor() calls to SetViewCursor()
- added some NormalizeFont() calls, while trying to fix the multi-byte insertion bug


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5009 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-13 14:38:43 +00:00
Marc Flerackers b140f1de88 Some more work on TextView by Jack Burton and me, Undo partially works now
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-04 08:45:34 +00:00
ejakowatz 80a4aa919d Fixed compile errors; references to BFont* when should have been BFont&
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-29 22:33:17 +00:00
Stefano Ceccherini ba92606354 Fixed SetRunArray(). It was callign StyleBuffer::SetStyleRange() with a BFont** pointer instead of a BFont* one (that fix is by Marc Flerackers, as the whole class, BTW :)). Refactored CharClassification(), also added some more separator characters. Also foreign characters should be added here (Andrew?). Fixed [Allow][Disallow]Chars(). Fixed a linking issue when we don't link to libbe.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-29 09:29:25 +00:00
shatty 323ddd5728 update from jack burton
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4245 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-08 09:55:12 +00:00
shadow303 72f334d12f gcc 3 fixes; strip ^M characters from TextView.cpp
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-04 00:42:51 +00:00