Commit Graph

5138 Commits

Author SHA1 Message Date
Vadim Zeitlin
f01e56249a Allow using wxEVT_UPDATE_UI with wxRibbonButtonBar.
Generate wxUpdateUIEvent for the ribbon buttons to allow updating their state
using wxEVT_UPDATE_UI. Also update the same to show this.

Closes #12003.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-29 22:05:34 +00:00
Vadim Zeitlin
d159e96495 Improve layout in the samples to avoid problems under Mac.
Changes the samples to look better under Mac and avoid the worst problems such
as overlapping buttons or truncated controls.

Closes #11651.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-28 13:51:21 +00:00
Vadim Zeitlin
51ec29ea5d Always link with expat in monolithic build.
Fix linking errors when using wxXML in sttaic monolithic build: in this case
we must link with expat but it was listed too early, before wxWidgets
libraries using it, in the bakefile-generated makefiles.

Now add it to the end of the linker command line too by including -lexpat in
EXTRALIBS_FOR_BASE which are appended to the linker arguments.

Notice that now -lexpat is linked twice because it is still added by
<wx-lib>xml</wx-lib> in bakefiles, even in monolithic build, but I don't know
how to avoid it and it is harmless anyhow.

Closes #12573.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-25 13:28:01 +00:00
Vadim Zeitlin
864181f4f6 Implement wxNotebook::CalcSizeFromPage() for wxGTK.
The implementation is far from perfect as it relies on hard-coded margins but
is better than nothing as it allows wxNotebook best size determination and
SetPageSize() method to work correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-24 18:19:26 +00:00
Vadim Zeitlin
59a2c19914 Added wxTimePickerCtrl page to the widgets sample.
Even if this page is pretty trivial, add it for consistency with
wxDatePickerCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-20 21:27:06 +00:00
Vadim Zeitlin
54450d0907 Reorganized the date picker page of the widgets sample.
Make it possible to set the picker styles and set its range and not only the
current value.

Also log the events generated by it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-20 21:27:02 +00:00
Vadim Zeitlin
4d0c23087a Fix horizontal alignment in icon view in generic wxListCtrl.
Ensure that all the items in the same column have the same width, so that
their labels are centred.

Closes #9227.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-20 21:21:38 +00:00
Vadim Zeitlin
08670ea85a Update version to 2.9.4 in version.bkl too and rebake everything.
Change the version for Unix shared libraries too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-18 14:35:50 +00:00
Vadim Zeitlin
75cb911c7c Added wxFilePickerCtrl::SetInitialDirectory().
This method allows to configure the initial directory to be shown when
browsing for files in an initially empty wxFileDirPickerCtrl.

It is also available for wxDirPickerCtrl but is less useful there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-18 12:34:47 +00:00
Vadim Zeitlin
c05b000c71 Incremented the version number to 2.9.4 everywhere.
The misc/scripts/inc_release script was used to update the versions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-16 22:12:49 +00:00
Vadim Zeitlin
4fe4a7c50f Add wxEXEC_HIDE_CONSOLE flag allowing to unconditionally do it under MSW.
Also renamed wxEXEC_NOHIDE to wxEXEC_SHOW_CONSOLE for symmetry (keeping the
old name for compatibility, of course).

Extend exec sample to allow easily testing the different flags and adding more
of them later.

See #13676.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-08 20:22:55 +00:00
Vadim Zeitlin
1863484b08 Use '1'..'9' to simulate digits instead of WXK_NUMPADn.
Using WXK_NUMPADn with wxUIActionSimulator doesn't work under Unix, the
resulting GDK events have wrong keyval for some reason.

It would, of course, be nice to fix this but in the meanwhile use ASCII codes
to simulate the digits to at least allow doing this at all.

Also extend uiaction sample to allow testing text simulation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-08 15:55:40 +00:00
Vadim Zeitlin
4c2b10acad Rebake after webview-related changes in common.bkl.
Forgot to rebake all files (and not just library ones) after changes of
r69589.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-02 12:04:51 +00:00
Vadim Zeitlin
edf5822ace Implement EVT_CHAR_HOOK for wxOSX/Cocoa.
Send wxEVT_CHAR_HOOK event from wxOSX/Cocoa code.

Also test for wxEVT_CHAR_HOOK in the keyboard sample and show the effect of
not skipping it.

Closes #12431.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-02 00:50:12 +00:00
Vadim Zeitlin
1d8d3cc5a1 Add support for custom numeric formats to wxGrid.
Allow %e and %g formats (as well as their upper-letter equivalents) in
addition to the default %f format for number display in wxGrid.

Closes #13583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-28 13:23:33 +00:00
Vadim Zeitlin
09c0ebcf96 Don't hardcode the number of toolbar tools in the toolbar sample.
Use GetToolsCount() instead of the hardcoded 10 (which can be wrong if any
tools were added or removed).

See #13673.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-28 12:47:26 +00:00
Vadim Zeitlin
c66c8042ad Corrected handling of wxTB_HORZ_TEXT in the toolbar sample.
The value of flag could be lost when toolbar was recreated without using text
at all.

Closes #13572.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-28 12:47:23 +00:00
Vadim Zeitlin
c0c9009c8d Add support for digits and +/- sign to wxUIActionSimulator::Text().
Support the characters needed for number entry in wxUIActionSimulator::Text()
too.

Closes #13671.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-15 15:56:55 +00:00
Vadim Zeitlin
b6963858fb Added wxIMAGE_OPTION_ORIGINAL_{WIDTH,HEIGHT} wxImage options.
These options allow to retrieve the original image size if the image was
scaled during load.

Closes #13662.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-14 13:35:48 +00:00
Steve Lamerton
c49d2434e3 Set focus on the browser window after loading a url. Also fix a warning.
Closes #13660

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-13 12:57:28 +00:00
Steve Lamerton
a178852467 Replace the sample animation timer with an idle loops and the animation with a busy cursor.
Fixes #13518, #13658

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-12 20:49:40 +00:00
Jouk Jansen
e2847646e5 Add compile support for widgets sample on OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-10 14:41:14 +00:00
Steve Lamerton
f9a786f870 Correctly escape the error log messages in the wxWebView sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-08 13:23:45 +00:00
Vadim Zeitlin
c052f780a4 Use wxWindowUpdateLocker to speed up updates of the static widgets sample page.
See #13619.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-05 11:24:00 +00:00
Vadim Zeitlin
3a6b6a9889 Fix adding a control to two different sizers in the widgets sample.
A checkbox on the static page was added to two sizers at once, resulting in
heap corruption later. Fix this by adding it to the right sizer only.

Closes #13619.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-05 11:23:57 +00:00
Vadim Zeitlin
853f4764c0 Make the initial sash position work in splitter sample.
The initial splitter size must be set correctly when using gravity with
wxSplitterWindow as otherwise the sash would jump on first resize -- which was
exactly what happened in the splitter sample.

Add a SetSize() call to the sample with the comment explaining why is it
needed and also actually make it stick as the cached last size was not updated
before the splitter was split before.

Closes #9821.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-30 19:48:44 +00:00
Paul Cornett
34949efe0d revert (presumably unintentional) change from r59562, which caused auto-scroll sample selection to be broken for last 2.5 years
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-23 18:03:20 +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
Václav Slavík
dc73d7f5d4 Cleanup of wxDataViewCtrl cell activation code.
Fix confusion of what cell activation is and inconsistence with native
handling in GTK+. Document the distinction between activating (~
editing) a cell and activating (double-clicking) the whole item.

Deprecate wxDataViewCustomRenderer::LeftClick() and Activate() methods,
replace them with single ActivateCell() that is called for both kinds of
activation.

Fix implementations so that ActivateCell() is not called on
double-click, when it shouldn't, and vice versa: don't send
wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED for cell activation.

Partially reverts r67099 -- restores old 2.9 signatures of compatibility
LeftClick() and Activate() methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-19 16:20:17 +00:00
Vadim Zeitlin
e520c3f75c Added wxRichToolTip class.
It can be used to show more customizable tooltips than the native wxToolTip
but at the price of using generic implementation in some cases (actually
almost always now, with the exceptions of text control tooltips under MSW).

Extra features include:
 - The balloon-like tooltip form.
 - Possibility to show an icon.
 - Title display in a different form.

More customization could be added later. It should be also possible to fully
implement this class natively under MSW.

Update the dialogs sample to show the rich tooltips in action.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-18 21:57:02 +00:00
Vadim Zeitlin
06b3e19fcb Make it possible to close "shaped" sample from the menu.
The sample didn't define any handler for wxID_EXIT menu item, do add it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-12 00:35:04 +00:00
Vadim Zeitlin
bbcf2821a1 Move SetBackgroundBitmap() from wxPanel to new wxCustomBackgroundWindow.
wxCustomBackgroundWindow is a new class allowing to set a custom bitmap for
the background of any window. The relevant code was mostly moved from wxPanel
to which it was added only recently (before 2.9.2) making it unnecessary to
preserve compatibility.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-11 17:07:43 +00:00
Vadim Zeitlin
fa378d369f Allow creating wxGraphicsFont without using wxFont.
This is mostly important to allow using wxImage-based wxGraphicsContext
without requiring X server connection under Unix: as wxFont can't be used
without X server, we needed another way to create wxGraphicsFont in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 22:07:29 +00:00
Vadim Zeitlin
0a470e5ea5 Allow creating wxGraphicsBitmap and wxGraphicsContext from wxImage.
Provide a way to use wxGraphicsContext to draw on wxImage.

This is implemented internally by drawing on wxGraphicsBitmap which can be now
also created from wxImage.

Add a test of the new functionality to the image sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 22:07:22 +00:00
Steve Lamerton
7cd038613b Work around the fact that wxWebViewIE doesn't send page changing and page changed events during a refresh, yet IsBusy returns true.
Closes #13518

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-07 21:25:59 +00:00
Steve Lamerton
24fb46ea48 Delete the timer on close in the wxWebView sample. Fixes another memory leak.
See #13500

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-05 08:05:42 +00:00
Steve Lamerton
873ff54b1f Derive wxAuiNotebook from wxBookCtrlBase. Document wxAuiNotebookEvent which now derives from wxBookCtrlEvent. Update the notebook sample to add wxAuiNotebook as an option.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-02 10:29:00 +00:00
Vadim Zeitlin
569c7d8ccb Add wxTimePickerCtrl class.
Implement wxTimePickerCtrl natively for MSW and add a generic implementation
(very loosely based on the original class by Paul Breen) for the other
platforms.

Also update the calendar sample to show the new control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-29 13:43:15 +00:00
Steve Lamerton
7892e035c9 Delete the menu on close in the wxWebView sample. Fixes most of the memory leaks.
See #13500

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-28 19:44:35 +00:00
Vadim Zeitlin
d7b3992a5f Replace erroneous comma with a semicolon in keyboard sample.
Fix typo in the sample, comma was used instead of a semicolon. The code still
worked correctly but make it look correctly too now.

Closes #13453.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-21 15:08:06 +00:00
Vadim Zeitlin
da2e758f83 Implement sorting in wxTreeListCtrl.
Allow the user to sort the control contents by clicking on the columns with
wxCOL_SORTABLE flag and also provide SetSortColumn() method to sort the
control programmatically.

Also add wxTreeListItemComparator class and SetItemComparator() method to
allow customizing the way the items are compared.

Update the sample to show how to define a custom comparator.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-21 15:07:53 +00:00
Steve Lamerton
4794f127cd Cause a compile time error in the wxWebView sample if no backend exists.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-14 12:39:30 +00:00
Jouk Jansen
821c2a3750 add compile support for thread sample on OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-12 10:57:44 +00:00
Steve Lamerton
92b4653a62 Rebake trunk after wxWebView merge and add missing project files for the wxWebView library.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-11 10:12:19 +00:00
Steve Lamerton
b2b31b87fb Merge the new wxWebView classes from the SOC2011_WEBVIEW branch.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-10 18:09:12 +00:00
Steve Lamerton
1d156af324 Merge in from trunk r68684 - r69046
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@69047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-10 15:09:22 +00:00
Vadim Zeitlin
2669319136 Better support for flat lists in wxTreeListCtrl.
Override wxDataViewModel::IsListModel() to return true if wxTreeListCtrl
doesn't have any depth. This results in better display when using the generic
implementation of wxDataViewCtrl as no space is reserved for the (unnecessary)
expanders in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-30 13:40:44 +00:00
Vadim Zeitlin
75bc8b3454 Added wxFLP_SMALL and wxDIRP_SMALL styles for wx{File,Dir}PickerCtrl.
These styles allow to use a smaller browse button as the standard one takes
too much space, often leaving too little of it for the more important text
control part.

Notice that both styles are, in fact, equal to wxPB_SMALL but only file and
directory pickers currently use it as it doesn't make sense for the colour and
font pickers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 14:11:25 +00:00
Vadim Zeitlin
ea7ff9ad2a Auto complete file names in the text controls of wx{File,Dir}PickerCtrl.
There doesn't seem to be any reason not to do this in the controls which we
know are meant for entering file or directory names into them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 14:11:20 +00:00
Vadim Zeitlin
9a995b1a42 Make the file and dir picket controls expand in widgets sample.
The controls were too small to see long paths in them comfortably while there
was plenty of space in the page, use wxEXPAND flag for them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 14:11:17 +00:00