Commit Graph

5200 Commits

Author SHA1 Message Date
Vadim Zeitlin
62490e9ea7 Use text/uri-list instead of x-moz-url in wxGTK wxURLDataObject.
The standard exchange format for URLs is text/uri-list and not the deprecated
and Firefox-specific x-moz-url, support for which was moreover implemented
incorrectly anyhow.

Also add an example of copying URLs to the dnd sample.

See https://developer.mozilla.org/En/DragDrop/Recommended_Drag_Types for more
information.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-20 11:55:00 +00:00
Vadim Zeitlin
5c14ec2640 Add possibility to hide and show again wxRibbonBar pages.
Added wxRibbonBar::ShowPage(), HidePage() and IsPageShown() methods and show
them in the sample.

Also add GetPageNumber() helper.

Closes #14471.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-13 11:46:43 +00:00
Vadim Zeitlin
ce2532fbc6 Properly use RemoveTree() in fswatcher sample.
We need to use RemoveTree() to remove watches for the paths added with
AddTree().

See #14480.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-13 11:22:10 +00:00
Vadim Zeitlin
e3e7f6e573 Allow saving images under a different name in the image sample.
Also allow saving in XPM format.

See #13905.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-11 11:42:47 +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
Vadim Zeitlin
14b682f7c3 Increase version to 2.9.5.
Rebake all the project/make files.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-10 23:51:44 +00:00
Vadim Zeitlin
2de58153db Set string in wxEVT_COMMAND_COMBOBOX_SELECTED event in wxOSX/Cocoa.
Pass the selected string and not only its index in the event generated when
combobox selection changes in wxOSX/Cocoa.

Closes #14383.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-02 15:03:00 +00:00
Vadim Zeitlin
fcbf733155 Fix command line parsing in media player sample.
It was broken since the addition of the call to wxApp::OnInit() to
wxMediaPlayerApp::OnInit() -- as the base class parses the command line
itself, we need to use OnInitCmdLine() and OnCmdLineParsed() instead of doing
it manually if we call it.

Also don't load the play list saved in wxConfig if any command line parameters
were given as otherwise the saved files would be used first (this seems to
have been always broken...).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-02 00:16:12 +00:00
Vadim Zeitlin
3253852a7e VC6 compilation fix for the grid sample.
Use Connect() instead of Bind() which is not available for VC6.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 23:41:30 +00:00
Vadim Zeitlin
c21b99e0e2 Add wxRibbonBar::DeletePage() and ClearPages() methods.
Also add a trivial GetPageCount() helper.

Closes #14437.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:18 +00:00
Vadim Zeitlin
ff1aede620 Create wxStaticBoxSizer elements as children of wxStaticBox in XRC.
As we now recommend creating the controls shown inside wxStaticBox as its
children, and not siblings, follow our own recommendation by doing just this
in XRC handler of wxStaticBoxSizer.

Also add a test of using a tooltip with a wxStaticBoxSizer element to the XRC
demo showing that tooltips do work now for them, unlike before.

Closes #14431.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:10 +00:00
Vadim Zeitlin
7e3ea54f47 Add missing c_str() and similar calls to samples in STL build.
Don't rely on implicit conversion of wxString to char*/wxChar*, it doesn't
exist in STL build. Add explicit c_str(), wc_str() or t_str() calls.

Closes #14420.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 17:54:42 +00:00
Vadim Zeitlin
a15f0e42bc Fix ribbon sample compilation after r71642.
Add a missing header with declaration of wxMessageBox() for PCH-less
compilation.

Closes #14376.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-05 12:12:43 +00:00
Vadim Zeitlin
0a7ee6e0f4 Implement support for wxRIBBON_PANEL_EXT_BUTTON wxRibbonPanel style.
Show the "extension button" in the ribbon panel if this style is specified.

Also generate a specific event if this button is clicked.

Closes #14283.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-03 19:17:09 +00:00
Vadim Zeitlin
779e28da63 Add wxGrid::Render() for drawing the grid to any wxDC.
In particular, this allows to print the grid contents easily.

Closes #14294.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-27 13:00:19 +00:00
Vadim Zeitlin
816e7781b0 Fix menu sample compilation under wxOSX.
Include copy.xpm under all platforms as all of them support (even though
without necessarily implementing it) wxMenuItem::SetBitmap() now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-20 20:29:15 +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
3ecb4c01f2 Fix wrong format specifiers in the samples.
Use "%ld" instead of "%d" to format long values, using "%d" results in an
assert failure under LP64 systems as int and long have different sizes there.

Closes #14311.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-17 16:10:19 +00:00
Vadim Zeitlin
f919ae3477 Make variable containing port number an ushort in the sockets sample.
A port number is an unsigned short, not long, so don't make it long just
because wxCmdLineParser doesn't provide a convenient way to get the value of
an unsigned short option (it would be nice if it did...).

This fixes the problem with using "%d" format specifier with a long variable
as this resulted in an assert under LP64 systems.

See #14311.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-16 15:10:05 +00:00
Vadim Zeitlin
a0b13884b4 Don't use printf() with non-literal string as format.
Replace calls to printf() with puts() in the typetest sample.

See #14311.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-16 13:24:49 +00:00
Vadim Zeitlin
8e8d910979 Update the field widths on demand in wxStatusBarGeneric.
This ensures that the value returned from GetFieldRect() is always up to date,
even when this method is called from the user-defined wxEVT_SIZE handler, i.e.
before our own OnSize() could run.

Also remove the now unneeded hack with calling the base class OnSize() from
the statbar sample.

Closes #14268.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-05 11:22:09 +00:00
Vadim Zeitlin
f8ab0cdb3e Don't return NULL widget from wxFileCtrl page of widgets sample.
This makes all the common operations such as setting tooltip, colours &c on
this page simply crash.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 22:20:59 +00:00
Stefan Csomor
6e22db9e3e fixes #14178
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-02 18:44:23 +00:00
Vadim Zeitlin
c04be1a29f Added wxDataViewEvent::SetDragFlags() and GetDropEffect() methods.
Allow specifying the drag operation flags and retrieving the drop effect when
it's over for wxDataViewCtrl drag-and-drop.

Currently this is only implemented in the generic version.

Closes #12583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:25 +00:00
Vadim Zeitlin
b90aca4cba Enable wxComboBox::SetString() test in the widgets sample.
It was disabled because it wasn't implemented for wxGTK at some time in the
past -- but it is implemented now, so there is no reason to not allow testing
it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:21:57 +00:00
Vadim Zeitlin
c8648b64a6 Fix harmless warnings about hiding base class virtual in dialogs sample.
GetTitle() added in r71213 resulted in virtual function warnings from g++, fix
them by renaming it to GetBoxTitle().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:50 +00:00
Vadim Zeitlin
d60a9c00e4 Add possibility to change the test message box title in dialog sample.
All the other message box elements were configurable, so why not this one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-17 13:57:18 +00:00
Vadim Zeitlin
11527fc9f0 Added support for page tooltips to wxAuiNotebook.
Allow setting tooltips for the tabs of the individual pages of wxAuiNotebook.

Closes #14216.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-16 12:12:26 +00:00
Paul Cornett
55a0fa4e54 non-pch build fix, closes #14140
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-26 15:44:31 +00:00
Vadim Zeitlin
c0795ce8ea Added wxTimePickerCtrl::GetTime() and SetTime().
These methods, taking broken down time representation, avoid the problems
arising due to DST complications when using wxDateTime to represent the time
as special care needs to be taken in this case to avoid using the date part
corresponding to a DST change date at which time is discontinuous.

Document the problem with the old functions and use the new ones in the
sample.

See #14137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 23:17:01 +00:00
Vadim Zeitlin
dfb4176ac5 Add a test for wxComboBox::SetString() to the widgets sample.
This allows to easily test this function interactively, notably check what
happens when the currently selected string is changed under different ports.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-11 23:41:27 +00:00
Vadim Zeitlin
c1a9bcfbc5 Correct the test for wxHAS_IMAGES_IN_RESOURCES in listctrl sample.
wxHAS_XXX symbols need to be checked with #ifdef, not #if.

See #1614 (as this change was part of the patch submitted there, even if the
ticket itself is unrelated).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-09 10:12:43 +00:00
Vadim Zeitlin
1862529285 Exclude wxMSW-only code from wxUniversal build under Windows.
wxListCtrl::EndEditLabel() isn't available in wxUniv, it's wxMSW-only.

This fixes the sample compilation in wxUniv/MSW build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-09 10:12:40 +00:00
Vadim Zeitlin
c0430d964d Added wxSplitterWindow::SetSashInvisible() and IsSashInvisible().
Also fix handling of wxSP_NOSASH.

Closes #14074.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-08 13:23:39 +00:00
Paul Cornett
d9a1b21859 avoid using wxDC::Blit() and wxDC::GetPixel() on window that is being painted, results are unpredictable on wxGTK
see #14067

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-06 04:26:33 +00:00
Vadim Zeitlin
bb5a951418 Use __WINDOWS__ for OS checks and __WXMSW__ for GUI checks (round 2).
This is continuation of r70796 and serves the same purpose.

Closes #14065, #14066.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-04 20:31:42 +00:00
Vadim Zeitlin
1580a10d87 Always provide wxMenuItem bitmap-related methods in wxMSW.
Define these methods even when wxUSE_OWNER_DRAWN is turned off for some
reason. This allows to avoid ugly tests for !defined(__WXMSW__) ||
wxUSE_OWNER_DRAWN in the code that just wants to set a bitmap for a menu item.

Closes #12664.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-04 00:29:55 +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
Vadim Zeitlin
b02dd12239 Use /bin/echo for creation of Mac OS X PkgInfo files.
The built-in of /bin/sh doesn't handle "-n" option that we use (at least not
under OS X 10.6), so we were getting "-n APPL????" in the generated files.
Fix this by using /bin/echo which does support this option.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-28 22:48:39 +00:00
Vadim Zeitlin
7193abfbc8 Use wxPageSetupDialogData instead of old wxPageSetupData everywhere.
No real changes, just don't use the old and kept for compatibility only
wxPageSetupData name.

Closes #13992.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-20 21:55:55 +00:00
Vadim Zeitlin
8b6af8eedd Don't use deprecated wxDataViewCtrl::StartEditor() in the sample.
Also document this deprecation in the change log and explain how to update the
existing code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-12 22:18:59 +00:00
Vadim Zeitlin
1442168125 Implement wxBG_STYLE_TRANSPARENT support for wxGTK.
Use composited windows if supported by GTK+ for wxWindows with this background
style.

Also add wxWindow::IsTransparentBackgroundSupported() and show how to use it
in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-11 16:26:52 +00:00
Vadim Zeitlin
49a63afbad Avoid CRT deprecation warnings for MSVC build using makefiles too.
Define _CRT_SECURE_NO_DEPRECATE, _CRT_NON_CONFORMING_SWPRINTFS and
_SCL_SECURE_NO_WARNINGS when using makefiles to build the library too for
consistency with the project files.

These defines are only needed for VC8 and later but should do no harm for the
previous versions.

See #11009.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-07 21:38:31 +00:00
Vadim Zeitlin
ba7512e14d Rebake all project files to reflect MSVC deprecation warnings defines.
Rebake all the projects after the changes of r70182, even if they're only
really needed for the library itself, the other project files should
correspond to the bakefiles contents too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-07 21:38:09 +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
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
Dimitri Schoolwerth
6e9d06080d deleted CodeWarrior project files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-21 00:53:21 +00:00
Dimitri Schoolwerth
fdfa35b4d7 Fixed mismatch in amount of format specifiers in Japanese translation for i18n sample.
The translation was missing a %s, copied the translation from the same string at samples/internat/ja/internat.po.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-21 00:01:00 +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