Commit Graph

83 Commits

Author SHA1 Message Date
Julian Smart
12cc29c56a Small cleanup.
Set caret position when calling SetSelection.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-18 22:27:48 +00:00
Julian Smart
5912d19ef7 Removed obsolete code
Added some more event types
Added back GetStyleForRange


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-17 14:28:47 +00:00
Julian Smart
b774c69893 Added wxRICHTEXT_HANDLER_NO_HEADER_FOOTER to allow saving HTML fragments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-17 08:40:01 +00:00
Julian Smart
523d2f145e Added wxRICHTEXT_SETSTYLE_RESET SetStyleEx() flag to allow for clearing attributes before setting new ones
SetStyle() now looks up and applies named paragraph or character style
Fixed a bug in text entry (taking previous paragraph's style)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-17 08:33:34 +00:00
Julian Smart
7d5232b815 Removed new function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-16 07:33:19 +00:00
Julian Smart
c7134e1c9c Made new functions non-virtual
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-15 23:03:18 +00:00
Julian Smart
a7ed48a590 Small bug fixes
Added GetStyleForRange to wxRichTextCtrl
HasCharacter/ParagraphAttributes range now consistent with other functions in wxRichTextCtrl


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-15 15:59:06 +00:00
Julian Smart
4d6d8bf4fb Added outline level
Removed unnecessary wxRichTextAttr::CopyTo


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-10 15:48:46 +00:00
Julian Smart
1f65137f8d Some documentation enhancements for wxRichTextCtrl
Comment fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-09 20:22:33 +00:00
Julian Smart
4e8d95587c Add ctor parameters to match wxTextCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-08 18:51:03 +00:00
Julian Smart
42688aea2d Added a couple of text effects
Added style description
Fixed some bugs in style comparison
Fixed extra newline when loading


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-08 14:05:50 +00:00
Julian Smart
4f32b3cf15 Style application fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-02 13:19:07 +00:00
Julian Smart
6a81734334 Copy constructor warning elimination
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-30 18:15:31 +00:00
Julian Smart
ea160b2e92 Reuse wxCaret object
Add page break specification
Optimize drawing after character input


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-30 17:51:38 +00:00
Julian Smart
8871035d85 Digital Mars doesn't like the identifiers being declared later
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-29 22:01:06 +00:00
Michael Wetherell
6df6e35a3e Fixes for semicolons, commas and wxSTRING_MAXLEN from Wlodek Szafran.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-29 07:37:09 +00:00
Julian Smart
85d8909ba3 Corrected a clearing bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-28 09:29:07 +00:00
Julian Smart
c81c3d2db2 Typo fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-27 09:27:47 +00:00
Julian Smart
44219ff04f First cut at printing support for wxRichTextCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-27 08:43:44 +00:00
Julian Smart
d8dd214c1b Fixed initialisation order warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-26 08:05:18 +00:00
Julian Smart
cbfc8d9a61 Typo fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-26 08:02:00 +00:00
Julian Smart
d2d0adc776 Added URL support to attribute objects and to wxRichTextCtrl,
generating a wxTextUrlEvent as appropriate.
Added outline list support and updated previews.
Added alignment support for bullets.
Added single right parenthesis support.
Added XML stylesheet reading/writing.
Changed SetBulletSymbol to SetBulletText so it can support
bullet text more generally (e.g. for cached outline list numbering)
Added wxRichTextRenderer to isolate e.g. bullet drawing and make
it customisable.
Added event handler support to wxRichTextBuffer.
Updated documentation.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-26 06:32:47 +00:00
Włodzimierz Skiba
37702a44db Make wxRichTextCtrl again buildable on WinCE.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-25 15:50:15 +00:00
Stefan Neis
d9c9196e34 Corrected port name used in headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-21 17:19:11 +00:00
Julian Smart
f089713f9e Added the ability to use built-in bullet styles, currently standard/circle or standard/square.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-20 13:04:12 +00:00
Włodzimierz Skiba
41a852156f Whitespaces and headers cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-20 07:48:31 +00:00
Julian Smart
8987e7d6e8 Added missing WXDLLIMPEXP_RICHTEXT symbol
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-19 19:55:49 +00:00
Julian Smart
bcedac4469 Compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-19 15:56:40 +00:00
Julian Smart
dadd4f5523 Added a list style editor page to the formatting dialog.
Added a style organiser dialog, which can be used to browse
for and apply styles and can be limited to show one of
the three style types, or all three.
Added a font name cache since it's an expensive operation
that's used frequently by the rich text dialogs.
Added ability to switch off tooltips for new dialogs
(off by default). Improved the previews. Pressing tab or shift-tab
at the start of a list item now demotes or promotes the item.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-19 14:04:13 +00:00
Włodzimierz Skiba
1b88201ff5 Headers cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-17 14:44:52 +00:00
Julian Smart
38f833b10c Added list style to text attributes, independent from paragraph style
Added list style definition
Added SetListStyle, ClearListStyle, NumberList, PromoteList to
buffer and control classes
Changed style listbox so double-click applies style instead of
single click. This allows for multiple items to be applicable,
and also in future to edit styles from this listbox without
accidentally applying the style to content.
Added wxRichTextStyleListCtrl which also shows a wxChoice for
selecting the type of style to display.
Style sheets can form a chain to allow inheritance from current
style sheet (not yet supported by style list controls).
Added PushStyleSheet/PopStyleSheet.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-17 14:09:14 +00:00
Robin Dunn
f1d6804f7c Add wxRichTextModuleInit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-16 18:12:17 +00:00
Julian Smart
cfa3b25626 Fixed tab selection bug
Slight improvement to kerning-related jumpy text when selecting
Default tab efficiency improvement and naming conventions cleanup


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-13 14:30:40 +00:00
Julian Smart
2a6c3e2566 Added back necessary defines 'cleaned' away. If folks could resist the urge to delete
them again, I'd be much obliged. We can change the symbol name if necessary.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-11 16:28:35 +00:00
Julian Smart
1807a1f3cf Return type change
Added support for help button to formatting dialog


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-10 17:01:36 +00:00
Włodzimierz Skiba
2b741a391c Use wxBookCtrl wrapper rather than wxNotebook in common code for native book (Smartphone fix).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-09 14:37:53 +00:00
Włodzimierz Skiba
b68603d535 Warnings, build errors, headers, licence, prefered api and non-PCH support cleaning of fresh richtext code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-09 10:26:18 +00:00
Paul Cornett
38b130853f non-pch build fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-09 07:36:26 +00:00
Vadim Zeitlin
343ae70d4c fix compilation after recent wxTextCtrl changes
notice that it has become unfortunately impossible (or at least much more
difficult) to maintain compilation when wxRICHTEXT_DERIVES_FROM_TEXTCTRLBASE
is unset so I simply removed it as the code wouldn't compile anyhow


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 22:42:20 +00:00
Vadim Zeitlin
b7cacb43db add IsOk() to all classes having Ok() method (patch 1570985)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 21:56:55 +00:00
Julian Smart
97ff49b383 Added a customisable formatting dialog for wxRichTextCtrl. Control the
visible tabs with flags passed to the constructor.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 14:05:17 +00:00
Julian Smart
ebf0a02930 Added a symbol selection dialog, with optional font selection and full
Unicode range with subranges.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 14:04:18 +00:00
Julian Smart
86015e55eb Added option to set style from style listbox when single
clicking or not. Changed DoSelection name to ApplyStyle.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 14:02:28 +00:00
Julian Smart
27507b618a Use paragraph's attributes for paragraph-related styles, and also
use combined attributes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 14:00:55 +00:00
Julian Smart
3e3a754f9c Don't use double buffering on platforms that do it automatically.
Filters out unrecognised keycodes in OnChar, and added numeric
keypad navigation keycodes.

Added SetStyleEx which takes flags for specifying option such
as optimization (only apply necessary styles), char/para style
only, and use undo. Used SetStyleEx when applying styles to
avoid applying character styles to paragraph objects, and vice versa.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 14:00:04 +00:00
Julian Smart
59509217cd Added paragraph symbol font (Get/SetSymbolFont in attribute)
and use this font instead of paragraph font if specified.

wxRichTextBuffer::SetStyle extended to respond to flags for
specifying undo, optimization (only apply the style necessary
for display when content/base/paragraph attributes are combined),
and para/character styles only.

wxRichTextBuffer::GetStyleForRange gets the common attributes
for a range, e.g. for showing common attributes in a formatting
dialog.

Implemented Roman numeral bullet points.

Fixed wxRichTextImage copy bug.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 13:59:07 +00:00
Włodzimierz Skiba
b3298d1d26 GCC warning fix. Minor cleanup.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-02 11:18:35 +00:00
Julian Smart
0ca07313fb Added rich text buffer clipboard support.
Added double-left-click word selection support.
Now saves only the active attributes to XML.
Eliminated wxRichTextFragment class to allow  wxRichTextBuffer
to be used where wxRichTextFragment was used.
Fixed AddParagraph virtual function hiding warning.
Miscellaneous small wxRichTextCtrl bug fixes and cleanup.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-01 14:46:03 +00:00
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
3306aec124 Added DoLoadFile, DoSaveFile to wxTextCtrlBase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-24 11:40:33 +00:00