Commit Graph

14879 Commits

Author SHA1 Message Date
Vadim Zeitlin
f9e19204bf Implement delayed destruction for wxPopupTransientWindow.
Windows of this class can be destroyed at any moment, even while some events
are still being processed, so delay the real destruction until we can be sure
that it's safe to delete the window.

This fixes problems (crashes due to dangling pointers) when the object is
deleted from the overridden OnDismiss(), for example.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 22:02:02 +00:00
Vadim Zeitlin
4506b42ce9 Fix inheriting parent background colour in wxPanel in wxMSW.
wxPanel didn't inherit the background colour set for its parent any more in
wxMSW because its HasTransparentBackground() didn't return true unless the
panel was a child of wxNotebook. This was wrong because not only themed
notebook background should be inherited but also any solid background
explicitly set for a panel parent.

Fix this by returning true from MSWHasInheritableBackground(), which is used
by wxPanel::HasTransparentBackground() under MSW, if the window has an
explicitly set and inheritable background colour.

Closes #13487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 22:01:57 +00:00
Steve Lamerton
a1a1790666 Reuse existing MinGW defines for all compilers that are missing them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 10:45:16 +00:00
Steve Lamerton
8acbf08b2a Fix various GCC warnings in wxWebView.
Closes #13532

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-06 17:55:43 +00:00
Steve Lamerton
f2ae0da1b5 Delete the filesystem used by wxWebViewArchiveHandler when we are done with it. Fixes a memory leak.
Closes #13500

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-05 21:21:51 +00:00
Steve Lamerton
3949871086 Store a pointer to each ClassFactory so we can correctly release it when the browser closes. This fixes a few more memory leaks.
See #13500

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-05 17:23:51 +00:00
Steve Lamerton
ad410224a3 Add new definitions required by MinGW for webview. Re-enable custom schemes as a result.
See #13509

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-02 16:20:15 +00:00
Steve Lamerton
2112ca2d61 Remove copied class definitions from missing.h. Disable custom scheme handling under MinGW as it lacks the correct definitions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-02 12:21:22 +00:00
Vadim Zeitlin
84ba6659ad Fix setting tooltips for wxSearchCtrl and other composite controls.
Propagate SetToolTip() call on wxCompositeWindow to all subwindows to ensure
that the tooltip is shown for all parts of the window.

Notice that this is still not ideal as the tooltip temporarily disappears when
mouse moves from one subwindow to another, instead of staying in place as it
does with "monolithic" windows and ideally we should find a way to avoid it
(should be possible at least under MSW with TTM_RELAYEVENT) but for now this
is already much better than nothing.

Closes #13523.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-02 11:28:54 +00:00
Vadim Zeitlin
2039dd917c Add wxWindowBase::CopyToolTip() method.
This method simply sets the same tooltip for the window but making copy of,
instead of taking ownership of, the wxToolTip passed in.

It's not especially useful on its own but is needed by wxCompositeWindow and
might be handy elsewhere.

See #13523.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-02 11:28:45 +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
Steve Lamerton
9e0fb96615 Correctly initialise ref count in custom scheme class factory.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-01 19:22:28 +00:00
Jouk Jansen
df016fc87e updates for OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-30 14:00:52 +00:00
Jouk Jansen
e26aff5636 Fixes for OpenVMS on IA64
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-29 13:47:38 +00:00
Vadim Zeitlin
6b9103c67b Added XRC handler for wxTimePickerCtrl.
Add a trivial handler modeled after the existing wxDateCtrlXmlHandler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-29 13:43:23 +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
Vadim Zeitlin
8957e55ed3 Refactor wxDatePickerCtrl to derive from wxDateTimePickerCtrl.
No real changes, just refactor wxMSW wxDatePickerCtrl to allow sharing code
with the upcoming wxTimePickerCtrl class. Even less changes for the other
platforms where wxDateTimePickerCtrl is trivial.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-29 13:43:02 +00:00
Steve Lamerton
e924e848f7 Fix compilation of wxWebView under mingw by adding missing definitions and dynamically loading urlmon.
Fixes #13509

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-28 14:54:56 +00:00
Vadim Zeitlin
88cb53908a Fix inconsistent DLL export declaration for wxBannerWindowNameStr too.
This variable is defined in "adv" library, not "core".

This is similar to the fix of r69184.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-23 12:15:58 +00:00
Vadim Zeitlin
6de6ca4c74 Fix inconsistent DLL export declaration for wxTreeListCtrlNameStr.
This variable is defined in "adv" library, not "core".

See #13502.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-22 12:53:47 +00:00
Vadim Zeitlin
c559c4b3ef Change wxSound ctor from in-memory data to use size_t/void *.
This constructor previously used int and, especially annoyingly, wxByte* for
the data. Use standard void* for untyped binary data instead.

Also document this ctor as it seems to be implemented in all ports.

Closes #13451.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-21 15:08:02 +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
Vadim Zeitlin
15b8afdcb8 Reset previous sort column in generic wxDataViewColumn::SetSortOrder().
The sort indicator on the column previously used for sorting was only reset
when the user clicked on the column header (by wxDataViewHeaderWindow code
that explicitly called wxDataViewCtrl::SetSortingColumnIndex()) but not when
wxDataViewCtrl::SetSortOrder() was called directly.

Fix this and take care of updating everything in SetSortOrder() itself. This
makes the code simpler and also means that calling SetSortOrder() from the
program now works as expected (it resulted in having sort indicators in two
columns at once before).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-21 15:07:49 +00:00
Vadim Zeitlin
aadbdd1699 Remove wxHeaderColumn::SetAsSortKey() and only use SetSortOrder().
The two member functions, SetAsSortKey() and SetSortOrder(), were doing almost
the same thing but differently and the former was only used in the generic
wxDataViewCtrl implementation and not implemented in the native GTK/OS X one.

Remove SetAsSortKey() entirely and only keep UnsetAsSortKey() which is still
needed by generic/MSW wxDataViewCtrl. But only SetSortOrder() should now be
called to indicate that the column is used for sorting.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-21 15:07:46 +00:00
Vadim Zeitlin
8148ae02ef Add wxTreeListCtrl::GetView() and GetDataView().
It can be useful to have access to the window used to actually show the items
by wxTreeListCtrl, provide two accessors for m_view: a wxDataViewCtrl-specific
one and a generic one returning just a wxWindow that can be used to keep the
code isolated from wxDataViewCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-21 15:07:41 +00:00
Vadim Zeitlin
b481194f51 No changes, just extract wxCreateHiddenWindow() declaration in a header.
Add wx/msw/private/hiddenwin.h with wxCreateHiddenWindow() declaration instead
of declaring it manually in all the files using it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-21 15:07:32 +00:00
Vadim Zeitlin
32a925f832 Change wxDIALOG_NO_PARENT to avoid clash with wxICON_EXCLAMATION.
Use 0x20 (wxAPPLY) instead of 0x100 (wxICON_EXCLAMATION) for
wxDIALOG_NO_PARENT as otherwise using wxICON_EXCLAMATION with wxMessageBox in
wxGTK (and possibly other ports, although not wxMSW which doesn't honour
wxDIALOG_NO_PARENT for message boxes at all) resulted in not using the
specified parent for the message box and, as a side effect, not centering it
on its parent neither.

Closes #13464.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-17 11:06:11 +00:00
Vadim Zeitlin
88cc66f72d Only define wxUSE_WEBVIEW if wxWebView is really available.
Don't define wxUSE_WEBVIEW in configure if WebKit is not available under Unix
(we should also check for wxUSE_WEBVIEW_IE under Windows later) and add the
check that either wxUSE_WEBVIEW_WEBKIT or wxUSE_WEBVIEW_IE is defined if
wxUSE_WEBVIEW is to wx/chkconf.h.

This makes it possible to just check for wxUSE_WEBVIEW instead of checking for
wxUSE_WEBVIEW && (wxUSE_WEBVIEW_IE || wxUSE_WEBVIEW_WEBKIT) as the code did
previously which was ugly and error-prone.

Also, define wxUSE_WEBVIEW_IE in configure under MSW. Currently this supposes
that the required IE headers/libraries are available which is probably wrong,
we should add checks for them later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-16 22:44:17 +00:00
Vadim Zeitlin
32cc8d13b8 Check for wxUSE_WEBVIEW being defined.
All wxUSE_XXX options must be always defined as we test for them with #if and
not #ifdef, so check for this one too for consistency.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-16 22:44:11 +00:00
Steve Lamerton
882ecaa631 Use integral value for OLECMDID_OPTICAL_ZOOM as we cannot tell if an enum value is already defined or not.
Fixes #13475

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-14 16:45:50 +00:00
Steve Lamerton
c78da4eb62 Make wxBookCtrlBase::GetSelection virtual, as per the documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-14 08:24:06 +00:00
Steve Lamerton
9d2f31db0c Update wxWebView guards to stop backend compilation when wxUSE_WEBVIEW is 0.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-12 18:35:39 +00:00
Steve Lamerton
7011055c55 Ensure that we have an available backend for wxWebView compilation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-11 13:26:24 +00:00
Steve Lamerton
d60b34a413 Update setup files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-11 10:15:28 +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
Robin Dunn
01bd848eb9 Enable the HWND of the task dialog to be fetched with GetHandle if it is being used.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-10 03:26:37 +00:00
Vadim Zeitlin
1a66177951 Allow setting colours and font of wxTreeListCtrl.
Use wxCompositeWindow<> to propagate changes of colours and font to
wxDataViewCtrl that wxTreeListCtrl uses internally.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-08 21:15:24 +00:00
Paul Cornett
29e461a210 remove unnecessary GTK declarations from defs.h, move things only used once to the place that needs them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-07 16:56:50 +00:00
Vadim Zeitlin
d6397a9f35 Add persistence support for wxSplitterWindow.
New wxPersistentSplitter class allows to easily save and restore the splitter
position in config.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-04 23:01:45 +00:00
Václav Slavík
bed74e488f Generic wxDataViewCtrl: resize autosized columns at idle time.
This is much more efficient than doing it immediately when adding large
number of items into a control with lots of them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-31 09:04:41 +00:00
Václav Slavík
297e2532b1 Make generic wxDataViewToggleRenderer react to activation.
Previously it only responded to single-clicks, which was to avoid the
need to double-click checkboxes. Fixed to react to activation via
double-click or keyboard too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-29 17:25:33 +00:00
Vadim Zeitlin
513d05952a Make it possible to TAB to wxTreeListCtrl contents.
Even though wxTreeListCtrl contains just one child window it still needs to
derive from wxNavigationEnabled<> to allow focus getting to its sole child.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-29 14:46:56 +00:00
Robin Dunn
932d0768aa * Implement dynamic loading of the Cairo DLL on Windows similar to how it was
done for GDI+.

* Enable the use of the wxCairoContext on MSW.

* Enable creating a wxGCDC from an exisiting wxGraphicsContext.

* Since it's possible for a DLL that is using wx to not be on the PATH nor in
  the same location as the .exe, change the wxDynamicLibrary::RawLoad method to
  explicitly look first in the same place as the main wx-using binary.  This way
  it will find DLLs that are in the same folder as the wx-using binary even if
  that would not be in the normal DLL search path.  

* Change wxDCImpl and wxDC::GetLogicalScale to be const methods.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 23:26:53 +00:00
Vadim Zeitlin
b18ebec956 Make wxBU_EXACTFIT fir the button text more exactly.
Too big margins were added for the buttons with wxBU_EXACTFIT style making
them larger than strictly necessary. Reduce the margins to make them really
as small as possible.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 14:11:28 +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
03dede4dc1 Add wxTextEntry::AutoCompleteDirectories().
As we already had MSW-specific AutoCompleteFileNames(), we can just as well
also add the also useful AutoCompleteDirectories() to be used with the text
controls used for path entry.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 14:11:13 +00:00
Vadim Zeitlin
d50fc4dc6d No changes, just fix a typo in wxBannerWindow documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 14:11:09 +00:00
Vadim Zeitlin
524cb04066 Add new wxTreeListCtrl class.
This is a facade for wxDataViewCtrl allowing to easily work with multi-column
trees, possibly with an optional checkbox in the first column. Its API is very
similar to wxTreeListCtrl and it provides a simple migration path from the
latter.

Add the class itself, documentation for it and minimal unit tests.

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