Commit Graph

71 Commits

Author SHA1 Message Date
Maarten Bent
016f00777e Fix 'declaration hides previous local declaration' warnings 2019-11-29 00:21:01 +01:00
Paul Cornett
fe1737d399 Reduce the scope of some local variables 2019-04-05 10:44:02 -07:00
Paul Cornett
90ce6a4334 Remove unused variables 2019-04-04 10:40:45 -07:00
Vadim Zeitlin
8fbca5cb70 Remove all trailing spaces
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.

This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
2019-01-30 17:35:54 +01:00
Blake Eryx
65827a0572 Remove unnecessary c_str() calls from the samples
Pass wxStrings directly to wxString::Format("%s") and similar
pseudo-vararg functions, there is no need for c_str() there since
wxWidgets 2.9.

Closes https://github.com/wxWidgets/wxWidgets/pull/1009
2018-11-03 22:52:57 +01:00
Blake-Eryx
f58ea62596 Remove (most) occurrences of wxT() macro from the samples
Also replace wxChar* with wxString.

Closes https://github.com/wxWidgets/wxWidgets/pull/945
2018-09-23 01:15:08 +02:00
Catalin
f61627fc7e Remove obsolete symbols from the samples
Mostly don't mention OS/2 in the comments about the icons.

Also replace a couple of occurrences of "wxWindows" with "wxWidgets".

Closes https://github.com/wxWidgets/wxWidgets/pull/138
2015-12-03 22:11:04 +01: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
340a7f8526 Fix memory leak in richtext sample.
Destroy the children of wxRichTextFieldTypeCompositeTest when updating it
instead of just clearing the list and leaking the objects in it.

Closes #14324.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:56:51 +00:00
Tim Kosse
b3be8e77be Fix compilation if configured with --disable-printarch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 12:43:33 +00:00
Paul Cornett
5b4a70247c use "new" wx-prefixed macros in samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 07:07:55 +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
Vadim Zeitlin
d66e7af9aa Don't use deprecated wxBOLD, wxNORMAL and similar constants.
Replace them with wxFONTWEIGHT_BOLD, wxFONTSTYLE_NORMAL or wxFONTWEIGHT_NORMAL
and equivalents in the code of the library itself and in the samples.

Also simplify font construction using wxFontInfo where possible to avoid
specifying these constants at all if they are not needed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 14:25:30 +00:00
Julian Smart
4f24610ee9 Fixed image insertion in the wxRTC sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-12 06:15:07 +00:00
Julian Smart
a4f491405d Changed the capitalisation of 'span' of Set/GetRow/Colspan to be less jarring
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 15:35:05 +00:00
Julian Smart
f4ac09e8e9 Applied #15539: wxRichTextCtrl: demonstrate adding and deleting table rows and columns in the richtext sample (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-29 12:14:19 +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
Julian Smart
a640295faa Applied patch #15286: documentation and col/rowspan demo by dghart
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 10:06:15 +00:00
Julian Smart
f7667b84a6 Added support for sub-object virtual attributes (temporary attributes for characters within objects)
and also virtual text that can replace the actual text.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-04 12:52:14 +00:00
Paul Cornett
ea92bb677d use stock colour/pen/brush objects in samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 23:06:50 +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
e709239889 Use wxHAS_IMAGES_IN_RESOURCES instead of explicit platform checks.
Add a special symbol which is defined only if the icons and other images (e.g.
cursor) are in the separate resource files and don't need to be embedded as
XPMs in the main program.

This makes the checks more clear and more customizable as it's enough to
change wxHAS_IMAGES_IN_RESOURCES definition instead of changing many platform
checks.

Closes #14050.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-04 00:28:58 +00:00
Julian Smart
b4e415df52 Use a non-native toolbar on Mac so small buttons aren't stretched horribly.
The style combo control also appears now that the toolbar is non-native.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-02 08:55:25 +00:00
Julian Smart
cc2aecdef5 Added further API for intercepting deletion and content insertion
Added simple implementation of locked objects to sample


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-25 15:10:09 +00:00
Dimitri Schoolwerth
2d143b6689 Removed ellipsis from "About..." occurrences.
MS and Apple guidelines mention ellipses should generally be used when a command needs additional information from the user before the operation can execute. This is not the case for showing an about dialog so the ellipses have been removed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-20 16:51:09 +00:00
Julian Smart
75936ec600 Applied patch #13534: wxRichTextCtrl: Make it easier to use TextEffects flags
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-22 13:19:40 +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
603f702b4a Implemented text boxes and tables, and further editing pages for backgrounds, borders and margins.
wxRTC functions now operate on the currently focused object, which by default is the whole buffer.
Up to three property commands are now shown on the context menu, depending on
available objects in the current hierarchy.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-14 11:57:44 +00:00
Julian Smart
5ad9ae3a29 Fixed #12566 (assert on deletion) due to inconsistent commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-14 18:06:02 +00:00
Julian Smart
bec80f4f4a Eliminated redundant wxRichTextAnchoredObject class; refactored XML I/O code
so that objects can stream themselves; added a wxXmlDocument-based method
of writing XML, though this turned out to be much slower than writing directly
so the direct approach is retained and is the default (can be changed with wxRICHTEXT_USE_XMLDOCUMENT_OUTPUT).
Loading and saving new attributes implemented. Added custom properties to objects.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-06 20:22:03 +00:00
Vadim Zeitlin
d275b15d14 Fix harmless unused variables warnings.
Don't initialize the variables we never use in richtext sample, this results
in g++ warnings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-05 13:37:25 +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
Vadim Zeitlin
cdaed652d7 Merge of SOC2010_RTC_IMAGES branch.
Added floating images and image property dialog to wxRichTextCtrl, by Mingquan
Yang as part of GSOC 2010. Also changed image block creation to use a memory
stream instead of creating a temporary file.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 10:27:07 +00:00
Vadim Zeitlin
9a83f86094 Globally replace _T() with wxT().
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 20:30:22 +00:00
Francesco Montorsi
004867dbc5 Change in wxWindow the access specifier of the wxEvtHandler event processing and queuing functions
from public to protected. Adapt wxWidgets code and wxWidgets samples to always use wxWindow::GetEventHandler()
when calling such functions on a wxWindow rather than directly using wxWindow::ProcessEvent, etc.
This enables correct event dispatching to the event handlers which have been pushed (with PushEventHandler) on the 
windows.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-25 11:58:39 +00:00
Francesco Montorsi
00621a0d17 fix sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-16 21:22:29 +00:00
Paul Cornett
bbe28fbb83 mark long-deprecated methods as such, and don't use them in wx code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-05 18:23:01 +00:00
Julian Smart
99404ab05f Fixed several style, paste and undo bugs
Added a reload function to the sample for quickly restoring original text


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-12 17:05:54 +00:00
Julian Smart
44cc96a80c Merged wxRichTextAttr and wxTextAttrEx into wxTextAttr, and added a font table
to wxRichTextBuffer to reduce wxFont consumption and increase performance.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-09 11:20:36 +00:00
Julian Smart
a047aff270 Added wxBORDER_THEME, wxWindow::GetDefaultBorderForControl(), wxWindow::CanApplyThemeBorder().
wxTextCtrl and wxSearchCtrl now get the correct border on wxMSW, and the wxRichTextCtrl sample
also now demonstrates correct borders.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-07 19:22:43 +00:00
Julian Smart
3e54156282 Implemented text background colour
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-05 15:22:07 +00:00
Vadim Zeitlin
45e6e6f8ab call OnInit() from all samples to allow using standard command line options with all of them (patch 1623971)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-04 00:34:18 +00:00
Julian Smart
c3e54dee91 Removed redundant code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-30 11:55:09 +00:00
Włodzimierz Skiba
50f65288b1 PCH build fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-25 06:50:19 +00:00
Vadim Zeitlin
d6b447a754 protect gs_allThreads with a mutex (modified patch 1518719)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-24 18:26:26 +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
8881d9f085 Demonstrates printing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-27 08:59:58 +00:00
Julian Smart
720cc10ac4 Added outline style sample and vetoing of style sheet changing when loading;
demos URL event


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-26 06:35:57 +00:00
Julian Smart
e472363403 Separated out list formatting into new menu.
Added use of style organiser dialog.
Demonstrated style organiser being used as Bullets & Numbers
dialog.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-19 14:05:36 +00:00
Julian Smart
082cfe55b9 Added various list commands to demonstrate new list features.
Now uses wxRichTextStyleListCtrl giving a choice of style types to display.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-17 14:12:03 +00:00