Julian Smart
fe5aa22c17
Fixed bugs in, and added operators and copy constructors to, style
...
sheet classes.
Now merges base, paragraph and content styles dynamically on
display or layout so that we can distinguish between them. This
means appling a paragraph style that has character formatting
doesn't wipe out the original content formatting. The old-style
static method can be enabled by setting wxRICHTEXT_USE_DYNAMIC_STYLES
to 0 in richtextbuffer.h.
The default style is initially empty, so that adding text
reflects the base and paragraph styles. Setting the default style
doesn't merge with the previous setting, but BeginStyle does.
Adding new paragraphs is now sensitive to the previous paragraph's
style and also whether its style has a next-paragraph style indication.
Added wxRichTextCtrl::ApplyStyleSheet which reapplies styles to
paragraphs with named styles.
Added style application command to sample to demonstrate how
styles can be changed and reapplied without affecting content
character formatting.
Fixed some range bugs in UI feedback and clipboard copying and pasting.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-29 08:53:23 +00:00
Julian Smart
3966a9f4f8
Better compatibility between wxRichTextCtrl and wxTextCtrlBase
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-19 17:06:54 +00:00
Julian Smart
ab14c7aa57
Setting the current style from the UI is a mode that is cancelled when moving away
...
from the current caret position. This must be done to avoid confusing default
attributes and attributes at the current caret position, in normal use.
Style feedback now correct when caret is at the start of a paragraph (don't use
previous paragraph's style), and out-by-one style feedback bug fixed (start/end
of styled content).
Added ApplyStyle for applying a character or paragraph style.
Some coding style cleanup.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-12 08:42:40 +00:00
Włodzimierz Skiba
02761f6cd4
Include wx/module.h according to precompiled headers of wx/wx.h (with other minor cleaning).
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-31 19:31:43 +00:00
Włodzimierz Skiba
28f92d74ee
Include wx/dataobj.h according to precompiled headers of wx/wx.h (with other minor cleaning).
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-27 12:57:16 +00:00
Włodzimierz Skiba
7947a48ab7
PCH build fix.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-25 11:15:13 +00:00
Włodzimierz Skiba
613992479a
Simplify PCH support. Minor source cleaning.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-25 08:39:57 +00:00
Julian Smart
27e20452c4
SetStyle/GetStyle corrections
...
Added compatibility ctor to wxTextAttrEx
wxRichTextCtrl should take a string value for wxTextCtrl compatibility
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-03 21:13:18 +00:00
Julian Smart
05b4fddf49
Implemented wxTextAttrEx::CombineEx and wxRichTextAttr::Combine
...
Setting the default style now combines the default with the
new style, instead of just overriding it, so it is possible to
select e.g. bold and italic simultaneously in the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-02 13:43:42 +00:00
Julian Smart
7f0d9d717d
Added support for tabs in wxRichTextCtrl (Ashish More)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-06-28 10:57:20 +00:00
Julian Smart
d5363f57fb
Make an image block beore writing it, if there's no data in the block
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-16 18:37:09 +00:00
Julian Smart
dd456db5e6
Applied patch [ 1463711 ] wxRichTextCtrl fix for pasting text
...
(too many linefeeds).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-12 13:33:48 +00:00
Vadim Zeitlin
0cc70962a1
Made wxList::compatibility_iterator a class in wxUSE_STL == 0 case too instead
...
of a simple typedef to "Node *" to be able to initialize it with NULL in ctor
which makes the behaviour of the code with and without wxUSE_STL the same.
The price to pay is that the code like
wxList:compatibility_iterator ci;
ci = cond ? list->GetFirst() : wxList::compatibility_iterator();
doesn't compile any more and has to be replaced with (more clear anyhow)
wxList:compatibility_iterator ci;
if ( cond )
ci = list->GetFirst();
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-21 14:05:11 +00:00
Vadim Zeitlin
f120af9d56
use wxCHECK instead of wxASSERT to avoid crashing later (coverity checker CID 19)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-08 00:09:37 +00:00
Vadim Zeitlin
648d8a8720
fixed VC7 unreachable code warning (given even in debug build)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-01 01:47:19 +00:00
Julian Smart
63886f6d98
Fixed bug introduced by compiler compatibility fix
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-12-18 12:25:21 +00:00
Michael Wetherell
4c9847e14e
Small fixes to allow compilation with --enable-stl
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-11-27 02:03:40 +00:00
Dimitri Schoolwerth
412e0d47c0
applied patch #1356901 "Yet another removal of extra semicolons", also fixed remaining similar cases of extra semicolons
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-11-20 21:55:35 +00:00
Włodzimierz Skiba
caae22fb66
eVC4 warning fixes.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-11-06 21:42:01 +00:00
Julian Smart
b01ca8b6a9
Applied patch [ 1339882 ] richtext misc cleanup
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-28 14:24:04 +00:00
Julian Smart
76bcd8154c
Don't clear background in Refresh (to suit poor implementations of Refresh)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-25 10:41:38 +00:00
Julian Smart
2f36e8dce5
Now works when derived from wxTextCtrlBase, using wxScrollHelper.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-22 13:44:30 +00:00
Julian Smart
09f1410821
Corrections for wxUSE_STL=1
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-22 11:40:32 +00:00
Julian Smart
9e31a66087
More Erase substitutions
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-22 09:24:49 +00:00
Julian Smart
11ef729d54
Added missing include
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-22 09:20:09 +00:00
Julian Smart
efbf673503
Replace node deletion with Erase
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-22 08:05:19 +00:00
Włodzimierz Skiba
39a1c2f2dd
wxTinderbox build fixes.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-22 07:45:54 +00:00
Julian Smart
d21423356e
Don't try to open clipboard if already open
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-21 20:43:02 +00:00
Julian Smart
ff2baa25d5
Switched antialiasing off since GetTextExtent doesn't work properly
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-21 16:31:07 +00:00
Julian Smart
4e09ebe880
Restored code uglies
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-21 13:54:15 +00:00
Julian Smart
dc043de063
Removed macros
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-21 13:14:16 +00:00
Julian Smart
4d551ad5e5
Fixed some styling bugs, optimized resize for large files
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-21 13:02:15 +00:00
Julian Smart
169adfa9c4
Resets scroll position on load
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-20 22:51:57 +00:00
Włodzimierz Skiba
e191ee8751
Warning fixes.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-20 14:40:47 +00:00
Julian Smart
1e967276d8
Efficiency measures; file loading bug fix
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-20 12:55:53 +00:00
Julian Smart
3811368401
Introduced invalidation of ranges for later optimization code
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-19 22:20:12 +00:00
Włodzimierz Skiba
7fe8059f58
const consistent for Clone(). Load/Save split to DoLoad/DoSave. Build fixes, warning fixes and other source cleaning.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-19 17:00:58 +00:00
Julian Smart
2c375f42cf
First part of a layout optimization
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-19 14:44:15 +00:00
Julian Smart
011b3dcbef
Only draw if inside client rectangle
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-19 13:54:32 +00:00
Julian Smart
5d7836c47d
Added wxRichTextCtrl
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-19 12:52:47 +00:00