Tom Hacohen
c9290ef41d
Evas textblock: Fix handling of newline in compatiblity mode.
...
This fixes an issue with newlines that were shoved in the middle of
other format parts like <font_size=46 \n>.
SVN revision: 58457
2011-04-07 15:25:19 +00:00
Tom Hacohen
87bba22028
Evas textblock: Fixed a major bug - don't recreate format items.
...
I added a mode to format parsing that doesn't create new format items.
The bug was that format items were created all the time although they were
not needed.
SVN revision: 58456
2011-04-07 14:25:48 +00:00
Tom Hacohen
0ced548b40
Revert "Evas textblock: Fixed a major bug. Forgot recreating a layout paragraph."
...
Apparently it was a mistake and I did handle everything correctly.
This reverts commit 58454.
SVN revision: 58455
2011-04-07 14:01:31 +00:00
Tom Hacohen
a855dd9ac0
Evas textblock: Fixed a major bug. Forgot recreating a layout paragraph.
...
We should create a layout paragraph when it's a new paragraph and when
we removed the previous one that was there because we wanted to
remake it. Forgot adding a paragraph in the second case.
SVN revision: 58454
2011-04-07 13:40:42 +00:00
Tom Hacohen
af1bdf3525
Evas textblock: Fixed a bug in newline compatible mode.
...
SVN revision: 58447
2011-04-07 13:13:41 +00:00
Tom Hacohen
0f964640ae
Evas textblock: Don't mark nodes as clean when in 'calc_only'.
...
SVN revision: 58446
2011-04-07 13:13:38 +00:00
Tom Hacohen
776aa8b507
Evas textblock: Add saftey check.
...
SVN revision: 58431
2011-04-07 12:27:35 +00:00
Tom Hacohen
eed9c92ee6
Evas textblock: Adding visible formats - only invalidate current node.
...
No need to invalidate all the nodes when adding visible formats because
they are "like regular text".
SVN revision: 58428
2011-04-07 12:22:16 +00:00
Tom Hacohen
80905b3802
Evas textblock: Only relayout paragraphs that have changed.
...
Remove deleted paragraphs, add new paragraphs and generally relayout
only when really needed. Also, don't relayout when width hasn't changed
and the paragraph haven't changed.
SVN revision: 58418
2011-04-07 11:24:15 +00:00
Tom Hacohen
8ea0800b21
Evas textblock: Clean the code a bit (remove node-invalidation func).
...
No need for that, just specifically mark where needed that a node has
changed. This is cleaner and nicer.
SVN revision: 58417
2011-04-07 11:24:11 +00:00
Tom Hacohen
2702074e76
Evas textblock: Cleaned code up a bit.
...
SVN revision: 58395
2011-04-06 15:51:14 +00:00
Tom Hacohen
86ca6e9ccf
Evas textblock: Removed deprecated code.
...
This logic is already done elsewhere, no need for this function (which is
broken anyway).
SVN revision: 58349
2011-04-05 10:39:24 +00:00
Tom Hacohen
32b352dde9
Evas textblock: clean up render_pre a bit.
...
* _relayout is the way to go when we want to relayout.
* no need to mark content_changed=0 all over the place, it's already
set in the first if.
* no need to call evas_object_render_pre_prev_cur_add more than once.
SVN revision: 58319
2011-04-04 11:14:38 +00:00
Tom Hacohen
d4e2a42dff
Evas textblock: Fixed native size calculation.
...
There was a bug (visible in elementary_test's Entry for example) that
made native size calculation of the textblock wrong in some cases.
SVN revision: 58289
2011-04-03 09:14:03 +00:00
Carsten Haitzler
cc151e55cf
actually can just mark as changed. let layout happen later when
...
requested.
SVN revision: 58227
2011-03-31 11:25:39 +00:00
Carsten Haitzler
b1c3fa8a88
ummm... tasn.. you broke scaling of tb's! fix.,
...
SVN revision: 58226
2011-03-31 11:19:17 +00:00
Tom Hacohen
e9327efd98
Evas textblock: Removed duplicated condition.
...
raster: don't drink and code :).
SVN revision: 58212
2011-03-30 12:58:09 +00:00
Carsten Haitzler
97600782de
verified. can remove the format forcing.
...
SVN revision: 58211
2011-03-30 12:26:07 +00:00
Tom Hacohen
eaa8f71523
Evas textblock: Init first paragraph's y correctly.
...
SVN revision: 58208
2011-03-30 12:19:05 +00:00
Carsten Haitzler
267bf54d8a
printf--
...
SVN revision: 58206
2011-03-30 12:17:45 +00:00
Tom Hacohen
2ffe5c197c
Evas textblock: We don't need to mark as changed here.
...
SVN revision: 58205
2011-03-30 12:08:50 +00:00
Carsten Haitzler
d3ce734dc9
handle align and ellipsis re-format right .
...
SVN revision: 58204
2011-03-30 12:05:07 +00:00
Carsten Haitzler
df16f26dc7
use o->valign.
...
SVN revision: 58202
2011-03-30 11:34:06 +00:00
Tom Hacohen
d47cefb425
Evas textblock: Actually use the valign value when layouting.
...
SVN revision: 58201
2011-03-30 11:10:23 +00:00
Carsten Haitzler
c404d42a22
ellipsis re-format on height change too if an ellipsis is set anywhere
...
SVN revision: 58200
2011-03-30 10:38:02 +00:00
Carsten Haitzler
12d1b2d24d
flesh out valign prop to have real api. untested currently.
...
SVN revision: 58199
2011-03-30 10:31:29 +00:00
Christopher Michael
672037e416
Evas: Textblock: Fix variable may be used uninitialized warning.
...
SVN revision: 58193
2011-03-30 05:48:39 +00:00
Tom Hacohen
a2cecf5ea7
Evas textblock: Implemented vertical alignment - no way to set it yet.
...
Implemented the code needed, but there's still no way to set it.
This should be discussed. Not sure whether this should be part of
the API, or should just be set in the default style.
SVN revision: 58185
2011-03-29 14:14:29 +00:00
Tom Hacohen
a9fb04ffb0
Evas Textblock/text: Add clipping until we fix inset handling.
...
Currently inset handling is not handled correctly so we just clip
to the left if there's no enough margin to draw the what overflows.
This is the same behavior that was done up until now because of the
global clipper that was applied.
SVN revision: 58184
2011-03-29 13:52:42 +00:00
Tom Hacohen
fabf5bc16b
Evas Textblock/text: Fix rendering outsize of zone and speed things up.
...
This speeds things up and uses "out of render zone" drawing.
In this commit we also start using width correctly so rendering should
be more exact.
SVN revision: 58183
2011-03-29 13:52:35 +00:00
Tom Hacohen
301d5da589
Evas textblock: Updated format_prepend/append docs.
...
SVN revision: 58031
2011-03-23 11:43:52 +00:00
Tom Hacohen
c116d8cc31
Evas textblock: Don't create text props if there's no font.
...
Thanks to Nash for letting me know about it. It's not really useful,
but at least it helps us avoid crashing.
SVN revision: 57984
2011-03-22 10:18:46 +00:00
Tom Hacohen
421621a7ac
Evas textblock: Fixed a small error in docs.
...
SVN revision: 57916
2011-03-20 13:56:08 +00:00
Carsten Haitzler
3b9219748d
warnings--
...
SVN revision: 57877
2011-03-19 03:56:35 +00:00
Tom Hacohen
1078e941fa
Evas textblock: Added a workaround for a segfault.
...
The problem is that we currently do try to split even if we can't.
We should overview things and fix it in a more proper way, but this is
a good enough solution in the meanwhile, because this part will be fixed
soon.
SVN revision: 57301
2011-02-24 15:18:10 +00:00
Tom Hacohen
a8f52f4378
Evas textblock: Don't set style if it's the same.
...
SVN revision: 57296
2011-02-24 08:43:38 +00:00
Tom Hacohen
38bf6ec94c
Evas textblock: Stringshare the style text of each style.
...
SVN revision: 57295
2011-02-24 08:43:34 +00:00
Tom Hacohen
28ee865391
Evas textblock: Fix wrong behavior when updating style.
...
When updating style we should not clear the utf8 text but we should relayout.
And definitely not reset it.
SVN revision: 57294
2011-02-24 08:43:30 +00:00
Tom Hacohen
b890c5397b
Evas textblock: Remove a redundant cast.
...
SVN revision: 57268
2011-02-23 16:50:59 +00:00
Tom Hacohen
ef3b7a72f2
Evas textblock: Fix the false-positive strict-aliasing issue with gcc.
...
Only happens with some versions of gcc. I think it's a false positive
because both of the items are compatible.
SVN revision: 57267
2011-02-23 16:49:31 +00:00
Tom Hacohen
7420939ddb
Evas textblock: Fixed setting cursor in evas_textblock_cursor_paragraph_char_last.
...
On empty paragraphs the cursor position was set to values < 0 which
is bad and caused issues in other places as well.
SVN revision: 57229
2011-02-22 09:31:19 +00:00
Tom Hacohen
bd0695d1b5
Evas encoding: Removed Evas_Encoding and moved to eina_unicode_utf8* instead.
...
SVN revision: 57096
2011-02-16 16:00:17 +00:00
Tom Hacohen
52807e1550
Evas textblock: Fixed possible issue with word/mixed wrapping.
...
SVN revision: 57089
2011-02-16 13:00:41 +00:00
Tom Hacohen
4f597bf730
Evas textblock: Fixed an issue with item size calculation.
...
This caused some issues in some cases. Just switch continue with a goto to the end of the loop so we'll be able to calculate the sizes even when we don't need to format the format item.
SVN revision: 57081
2011-02-16 09:43:57 +00:00
Tom Hacohen
24f943fa3d
Evas textblock: Fixed a small calculation in format item's size calculation. Was correct, but too complex, simplified it.
...
SVN revision: 57056
2011-02-15 16:50:14 +00:00
Tom Hacohen
d09431f2a1
Evas textblock: Fixed a bug that caused format item positions to be wrong in some cases.
...
Just sanitized some of the item coordinates calculation.
SVN revision: 57055
2011-02-15 16:50:07 +00:00
Tom Hacohen
0229e71b48
Evas textblock: Fixed evas_textblock_cursor_range_geometry_get which didn't work when across multiple paragraphs.
...
SVN revision: 57027
2011-02-14 16:14:26 +00:00
Tom Hacohen
b2bf107e38
Evas textblock: strcpy->strncpy in a place we use a cached len, to be on the safe side.
...
SVN revision: 57025
2011-02-14 15:02:58 +00:00
Tom Hacohen
5991e80d35
Evas textblock: Fixed compilation error, I don't understand what went wrong in my last two commits, sorry for the spam.
...
SVN revision: 57023
2011-02-14 14:44:47 +00:00
Tom Hacohen
38dc347fcf
Evas textblock: Fix compilation warning, for some reason this wasn't included in the previous patch.
...
SVN revision: 57022
2011-02-14 14:42:22 +00:00