Commit Graph

153 Commits

Author SHA1 Message Date
Vadim Zeitlin
52ae67ef86 Replace dynamic casts with virtual wxWindow::WXGetTextEntry()
Instead of checking for all text-like controls one by one in
wxCommandEvent::GetString(), call a virtual function checking for this.

This is simpler, less error-prone and faster -- at the cost of
increasing the vtbl size of all wxWindow-derived classes.

Closes https://github.com/wxWidgets/wxWidgets/pull/1696
2020-01-09 23:25:49 +01:00
Maarten Bent
cd7e21ad2b Apply wxTextCtrl underline review suggestions 2019-07-19 21:06:10 +02:00
Maarten Bent
4afea28aab Improve underline changes of wxTextCtrl
Get rid of m_fontUnderlined, use m_fontUnderlineType instead.
Bugfixes in wxMSW, wxGTK and wxOSX code.
Show more underline usage in the text sample.
2019-07-11 00:34:27 +02:00
Igor Korot
f99ae84d7c Implement different underline styles for wxTextCtrl 2019-07-11 00:23:18 +02:00
Vadim Zeitlin
173ecd77c4 Fix clang -Winconsistent-missing-override in wxTextCtrl
Add missing wxOVERRIDE for OnDynamicBind().
2016-02-29 16:12:53 +01:00
Vadim Zeitlin
5591a20093 Detect attempts to catch wxEVT_TEXT_ENTER without wxTE_PROCESS_ENTER
This is never going to work, so complain about trying to do it to help with
catching this bug.

This is possible thanks to the new OnDynamicBind() method invoked whenever a
dynamic event handler is bound to a control, so this doesn't detect all
possible occurrences of the bug (such as specifying the handler in a static
event table or in a validator), but it's still better than nothing.

In the future OnDynamicBind() should be extended for other invalid calls, e.g.
binding a handler for wxEVT_TEXT_ENTER to a non-text control shouldn't work
neither, ideally.
2016-02-20 17:07:04 +01:00
Tobias Taschner
8282c1be0f Remove Windows CE support
Windows CE doesn't seem to be supported by Microsoft any longer. Last CE
release was in early 2013 and the PocketPC and Smartphone targets supported by
wxWidgets are long gone.

The build files where already removed in an earlier cleanup this commit
removes all files, every #ifdef and all documentation regarding the Windows CE
support.

Closes https://github.com/wxWidgets/wxWidgets/pull/81
2015-09-23 00:52:30 +02:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
e8374a47fe Allow setting hints for multi-line wxTextCtrl when supported.
Don't prevent people from using hints in wxMSW and wxGTK2, where they work
with multiline text controls too, even though they do not work with wxGTK3 nor
wxOSX.

Closes #14456.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-25 01:32:00 +00:00
Vadim Zeitlin
df13791078 Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 01:50:11 +00:00
Vadim Zeitlin
1ca1d77e01 Remove the inclusions of wx/cocoa headers which don't exist any more.
This should have been part of r76735: in addition to removing the old Cocoa
port headers, also remove the references to them from the common include
files.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-02 13:28:42 +00:00
Vadim Zeitlin
01f9accd19 Remove wxPM, wxWidgets port to OS/2.
This port is not used and is not being worked on, so remove it to reduce the
amount of the code which needs to be updated for every global change.

Also remove tests for VisualAge compiler which isn't used since ages.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 23:56:58 +00:00
Vadim Zeitlin
f4b80e5337 Remove MSVC6 support.
Don't support this compiler any more, this allows to get rid of tons of
MSVC6-specific workarounds, in particular we can now use Bind() and natural
template functions calls in the library code.

Also remove MSVC6 project and solution files and don't generate them when
bakefile_gen is ran any more (removing the remaining occurrences of msvc6prj
from the bakefiles results in weird bake-time errors, so it's simpler to just
leave them there).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 22:32:17 +00:00
Stefan Csomor
3da156b1be expose capitalize flag for ios as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-13 20:47:15 +00:00
Paul Cornett
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +00:00
Paul Cornett
967a94c91a remove WXWIN_COMPATIBILITY_2_6, add WXWIN_COMPATIBILITY_3_0
closes #15792

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 20:07:33 +00:00
Julian Smart
dc8678a4a9 Fixed clashing attribute values
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-13 17:43:17 +00:00
Julian Smart
3c6ec95608 Added wxTEXT_ATTR_AVOID_PAGE_BREAK_AFTER, wxTEXT_ATTR_AVOID_PAGE_BREAK_BEFORE attributes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-08 17:45:07 +00:00
Julian Smart
3ee8ea054e Fixed some wxRTC dialog layout issues, and added a couple of extra text effects flags.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-03 22:28:37 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
ce7fe42e84 Provide shorter synonyms for wxEVT_XXX constants.
Use the same short names as are used by the event table macros for the event
type constants themselves. This makes them much more comfortable to use, e.g.
Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED).

The old long names are still kept for backwards compatibility and shouldn't be
removed as it doesn't really cost anything to continue providing them, but all
new event types should only use the short versions.

Closes #10661.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-25 10:11:03 +00:00
Vadim Zeitlin
a0e5592007 Revert all wxNOEXCEPT-related changes.
This reverts r72978, 72984, 72989 and 72992. Do not use wxNOEXCEPT for
wxTextCtrl dtor as this breaks compilation of any user-defined classes
inheriting from it unless they use wxNOEXCEPT as well and the benefits
(fixing a harmless warning for the niche ICC compiler) are just not worth
the compatibility breakage.

See #14826.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-20 12:49:03 +00:00
Vadim Zeitlin
1d9f819c69 Add wxNOEXCEPT and use it for std::streambuf-derived classes.
This fixes warnings from Intel compiler about overriding function using a
different exception specification than the base one and also incidentally
provides a handy macro that can be useful in other situations.

Closes #14826.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-17 23:56:23 +00:00
Vadim Zeitlin
1582a1db62 No changes, just fix some typos in comments.
Closes #14494.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-20 11:55:18 +00:00
Julian Smart
4ce3ebd3f5 Added continuation bullet style for supporting multiple paragraphs in a list item
The user can 'delete' the bullet to create a continuation paragraph


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-15 06:42:15 +00:00
Vadim Zeitlin
7dd65e5abe Forbid setting hints for multi-line text controls.
This doesn't work anyhow, so make it explicit by asserting if an attempt to do
it is made. And document this.

Also add a test of SetHint() to the text sample to verify it still works.

Closes #14456.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-10 23:52:10 +00:00
Julian Smart
32423dd824 Added pixel size capability to wxTextAttr and wxRichTextCtrl.
Fixed composite object positioning in centred and right-aligned
paragraphs.
Added field example to sample, and enabled pixel font size selection.
Added custom text and dimension scaling.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-20 12:25:22 +00:00
Vadim Zeitlin
2415cf6725 Remove support for MetroWerks CodeWarrior compiler.
This compiler doesn't exist any more and was probably unsupported even in 2.8,
let alone 2.9, so remove all the __MWERKS__ tests to simplify things.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-05 18:40:11 +00:00
Vadim Zeitlin
90761420ee Set wxTextAreaBase::m_filename in the methods of this class itself.
m_filename member was declared in wxTextAreaBase but set only in the
overridden wxTextCtrlBase methods. This meant that it wasn't updated correctly
in wxStyledTextCtrl which also derives from wxTextAreaBase and so saving
SaveFile() with empty file name didn't work there even when the control had
been originally loaded from a file.

Move the code updating m_filename to wxTextAreaBase itself to fix this. This
also simplifies the code as it's now not necessary to override
Do{Load,Save}File() in wxTextCtrlBase at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 11:58:09 +00:00
Vadim Zeitlin
c7a49742ec Add support for stricken-through fonts.
Support stricken-through fonts in wxMSW and wxGTK (including special support
in wxStaticText and wxTextCtrl).

Closes #9907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-23 11:28:28 +00:00
Vadim Zeitlin
bd362275b8 Remove Palm OS port.
The platform targeted by this port doesn't exist any more and the port never
achieved really working state so remove the code to avoid having to maintain
it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-15 01:05:28 +00:00
Vadim Zeitlin
6ce832135e Add wxTextCtrl::PositionToCoords() functions for wxMSW and wxGTK.
The new method allows to find the coordinates in pixels of the given character
in a text control.

Closes #13221.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-07-29 15:11:54 +00:00
Dimitri Schoolwerth
a1b806b982 Replaced Ok() occurrences with IsOk() throughout trunk.
Additionally renamed wxOSX' private wxNativePrinterDC::Ok() function to IsOk().

Didn't deprecate the various Ok() functions: given the amount of changes already introduced in 3.0 a trivial one like this seems more suitable for after 3.0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-03 16:29:04 +00:00
Julian Smart
2477747881 wxRTC no longer derives from wxTextCtrlBase; added wxRichTextAttr deriving from wxTextAttr
with CSS-like attributes for future developments; removed image-specific attributes object


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-04 08:37:31 +00:00
Julian Smart
8698cfea93 Added missing wxTEXT_ATTR_PAGE_BREAK from wxTEXT_ATTR_PARAGRAPH
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-28 21:21:22 +00:00
Vadim Zeitlin
501358073b Move SendTextUpdatedEvent() down to wxTextEntryBase from wxTextCtrlBase.
This will allow reusing it in wxComboBox implementation as well.

Also add SendTextUpdatedEventIfAllowed() which can be used to only send the
events if they were not blocked at wxTextEntry level.

No real changes otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 18:46:24 +00:00
Vadim Zeitlin
b7421ab625 Move wxMSW wxTextCtrl::GetDefaultAttributes() to wxTextCtrlBase.
This commit doesn't introduce any changes in the control behaviour, it simply
moves the existing method to the base class because it is not MSW-specific.

Also implement wxTextCtrlBase::GetClassDefaultAttributes() because if a class
implements GetDefaultAttributes() it should implement it as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 05:01:14 +00:00
Paul Cornett
cff9681b85 make access for virtuals match base
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-03 17:20:15 +00:00
Vadim Zeitlin
3396739da1 Refactor wxStyledTextCtrl to share common file save/load code.
Keep the code for saving and loading text contents from files in a single
place instead of doing it differently in wxTextCtrl and wxStyledTextCtrl.

This required adding Set/GetValue() methods to wxTextAreaBase just so that its
DoLoad/SaveFile() could use them, even if they are the same as wxTextEntryBase
methods and are overridden in wxTextCtrlBase to be implemented in terms of the
latter.

Notice that wxRichTextCtrl might need to be refactored to use this code too in
the future.

Also notice that this reverts the change of r62081 which replaced SetValue()
with ChangeValue() in DoLoadFile() as wxTextAreaBase only has SetValue() and
it's not worth adding ChangeValue() to it too just to preserve this recent
change in behaviour.

Closes #10715.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 13:26:16 +00:00
Vadim Zeitlin
63f7d5022e added wxTextEntry::SetHint() (a.k.a. cue banner or placeholder string)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-02 12:25:01 +00:00
Vadim Zeitlin
c0c133e13b add wx-prefixed and semicolon-requiring versions of DECLARE_NO_{COPY,ASSIGN}_CLASS macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-08 11:45:59 +00:00
Vadim Zeitlin
9b11752c4f require semicolon after wxDECLARE/DEFINE_EVENT() (closes #10456)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-07 18:59:25 +00:00
Francesco Montorsi
7d76fbd5a1 use enumerations instead of integers for wxFont style/weight/family
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-16 20:46:20 +00:00
Julian Smart
9c4cb61167 Added font family to wxTextAttr
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-15 09:20:55 +00:00
Vadim Zeitlin
3c77890141 add more flexible and safer template Connect() overloads (#10000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-12 14:26:13 +00:00
Francesco Montorsi
7e7a19f152 Fix wxCalendarEvent and wxTextUrlEvent event classes implementing Clone() correctly (as pointed out by the new runtime check)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-27 14:23:38 +00:00
Francesco Montorsi
c6cf894ae2 interface revisions of ta*h te*h headers; grouped wxTextAttr #defines into enums to make it easier to document them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-04 11:01:50 +00:00
Vadim Zeitlin
053ac76fa2 deprecate wxTE_AUTO_SCROLL as it's always on in the ports which support it anyhow (#2176)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-28 18:18:54 +00:00
Stefan Csomor
ef0e92205a fixing file paths after renaming
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-11 19:17:41 +00:00
Vadim Zeitlin
9e50ed28d9 fix wxTextCtrl::operator<<('\n') in Unicode build (should use char overload, not int); corrected mangled documentation of these operators
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-28 12:32:32 +00:00