Commit Graph

53797 Commits

Author SHA1 Message Date
Robin Dunn
ea8fa3c4e6 More interface updates for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-27 03:34:29 +00:00
Jouk Jansen
e38e588581 Disable webview on OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-26 14:28:32 +00:00
Václav Slavík
e9eda14ca6 Don't use install -d to create directories.
Always use `mkdir -p`, as install is problematic with regard to
permissions.

Fixes #13452.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-25 15:48:50 +00:00
Stefan Csomor
829c8572da adding missing autorelease pool, since this can be called from anywhere, fixes #13449
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-25 12:14:52 +00:00
Robin Dunn
6e350141f1 Fix missing or broken interface items for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-25 04:30:49 +00:00
Vadim Zeitlin
87d2c6f507 Add support for handling new multi-arch under Debian.
The libraries are now in /usr/lib/arch-linux-gnu and not /usr/lib{32,64} so
check for them there too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-23 22:33:17 +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
e427c04537 Improve appearance of wxTreeListCtrl during live resizing.
When using the generic wxDataViewCtrl version, forcefully refresh it after
changing its size to avoid artefacts during resizing of wxTreeListCtrl.

Closes #13502.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-22 10:36:01 +00:00
Vadim Zeitlin
6b719a1c09 Always give all the remaining space to the first wxTreeListCtrl column.
Under GTK the columns of wxDataViewCtrl (and hence wxTreeListCtrl) are always
resized to cover the entire control width. For consistency, also do it under
the other platforms and give the remaining space to the first column and not
to the last one as GTK does by default, as the first column is more important.

Do this even if this results in reducing the size of the column: presumably,
if the entire control itself can be resized, the user wouldn't bother resizing
the columns and, on the contrary, if the user did resize the columns, the
entire control size is unlikely to change, so in practice we don't risk
overriding the user preferences and reducing as well as increasing the first
column width works much better by default as it doesn't leave the other
columns invisible after making the control wider and than reverting it back to
its initial, more narrow, state again.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-22 10:35:58 +00:00
Vadim Zeitlin
7d0cf3f9be Fix scrolling in small wxVListBox with tall items.
Scrolling in a small wxVListBox with tall items (i.e. taller than the height
of wxVListBox itself) behaved wrongly: wrong item was being scrolled into view
and Page Up/Down didn't scroll as much as they should.

Fix both of these problems by checking for these corner cases explicitly.

Closes #13454.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-21 15:08:10 +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
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
7ed24cb652 Send EVT_DATAVIEW_ITEM_CONTEXT_MENU events even when not clicking on an item.
Always send this event, even if the user right clicked outside of the client
area. This is useful for showing item-independent commands in the context
menu.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-21 15:07:56 +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
b83d8f7339 Don't limit window size to (0, 0) in wxSizer if getting display size failed.
It's possible that wxDisplay::GetClientArea() returns (0, 0) size indicating
that it failed. Don't set the maximal window size to (0, 0) in this case as
this prevents the user from seeing the window at all and just don't do
anything instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-21 15:07:37 +00:00
Vadim Zeitlin
ad6f09f543 Refresh wxDisplay when a monitor is added to or removed from the system.
If a monitor was attached or detached while a wx program was running, the
monitor handles stored in wxDisplayFactoryMSW became invalid and all display
operations (e.g. getting display size) failed from this moment onwards
requiring a program restart to work again.

Fix this by updating the monitor handles when we get WM_SETTINGCHANGE as it is
sent when a monitor is added or removed (while it's also sent in quite a few
other cases re-enumerating the monitors shouldn't take very long so just do it
always).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-21 15:07:35 +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
Julian Smart
23a9a87c85 Remove pointless case insensitivity
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-20 20:03:42 +00:00
Vadim Zeitlin
1841f0790d Add GetExpanderColumnOrFirstOne() to avoid code duplication in generic wxDVC.
There were two strictly identical code snippets setting the expander column to
be the first one if it hadn't been set before, replace both of them with a
call to GetExpanderColumnOrFirstOne() function.

Also use this function instead of just GetExpanderColumn() (which might return
NULL) in a couple of places.

Notice that there are still a lot of places in the code where the column 0 is
hard coded as being the expander column, this would need to be fixed to really
support non-first expander column.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-20 18:37:11 +00:00
Vadim Zeitlin
42cbde5162 Reset the expander column when clearing columns in generic wxDVC.
The expander column becomes invalid when all columns are cleared, don't keep
a dangling pointer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-20 18:37:08 +00:00
Michael Wetherell
4fcffaf066 Move ravnsgaards build to brandt32 while its down.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-20 17:25:55 +00:00
Vadim Zeitlin
c5512cab0f Minor fixes to code examples in wxPropertyGrid documentation.
Fix typo in wxPGProperty name and add missing parameter of GetVIterator()
call.

Closes #13486.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-18 20:28:37 +00:00
Vadim Zeitlin
4cbe0dd816 Fix test for wxUSE_TREELISTCTRL in configure.
wxUSE_TREECTRL was wrongly used instead.

Closes #13470.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-18 20:26:38 +00:00
Robin Dunn
ba4f890e49 FIx broken or missing interface items for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-18 04:38:01 +00:00
Vadim Zeitlin
5c79993559 Fix format specifiers used for "unsigned long" in wxPG code.
"unsigned long" quantities must be formatted using "%l[xou]" and not just
"%[xou]" as the latter doesn't work correctly on 64 bit platforms.

Closes #13447.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-17 11:06:15 +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
f8ec7b81b2 Add wxUSE_TREELISTCTRL checks to treelist.cpp itself.
The contents of this file was still compiled even when wxUSE_TREELISTCTRL was
turned off. Fix this by adding the missing "#if wxUSE_TREELISTCTRL" check
around it.

Closes #13470.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-17 11:06:05 +00:00
Vadim Zeitlin
6ab3e0396c Fix the library of wxGenericDirCtrl in the documentation.
Closes #13482.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-17 11:06:01 +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
Vadim Zeitlin
792339b963 Fix wxFont::GetFaceName() for not realized yet fonts in wxMSW.
GetFaceName() could be called for a font that hadn't been really used yet and
hence its wxFontRefData::m_hFont could be 0 and couldn't be used in
GetMSWFaceName().

Fix this by using GetHFONT() accessor instead of m_hFont directly to create
the font if necessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-16 22:44:04 +00:00
Robin Dunn
e932127792 fixes for missing or broken interface items for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-16 17:03:01 +00:00
Vadim Zeitlin
e23e368bc4 Fix int field of wxCommandEvents generated by menu items in wxMSW.
Set the int field of wxCommandEvent generated by clicking on the menu items
correctly for not checkable items: it is supposed to be -1 and not 0 (which is
the value for checkable but currently unchecked items). This was already the
case for wxGTK and wxOSX and implied by the comments in the code.

Make wxMSW behave like this too and clearly document this behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-16 13:23:14 +00:00
Vadim Zeitlin
99893e284f Fix int field of wxCommandEvent generated by popup menu items in wxMSW.
The intention of the code generating the event for popup menu items was to
pass false (0) or true (1) in the int field of wxCommandEvent to indicate
whether the item was checked or not but, because wxMenu::SendEvent() takes int
as second argument and not book, we passed either 0 or MF_CHECKED (== 8).

Fix this by correctly passing a boolean for checkable items.

See #11644.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-16 13:23:10 +00:00
Vadim Zeitlin
3f8502f7fc Fix checked state for the popup menu items in the events generated by them.
We incorrectly passed the sign-extended int id to ::GetMenuState() function
that expects an unsigned WORD id, so it never found the item if the WORD id
had the high bit set. Fix this by correctly passing the unsigned id to it.

Closes #11644.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-16 13:23:05 +00:00
Stefan Csomor
7aab7c77f4 reverting change, for precompiled headers, unfortunately this means that WXROOT must not contain spaces unless properly escaped
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-15 19:05:06 +00:00
Jouk Jansen
d2758163a9 Repair compile sequenze for wxGTK on OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-15 14:25:50 +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
8240dea400 Update configure to only define wxUSE_WEBVIEW_WEBKIT if all the required components are available.
Fixes #13474

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-14 14:03:34 +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
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
30e2c04682 Only build the wxWebView tests if there is an available backend.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-14 07:39:28 +00:00
Steve Lamerton
d04f535c7e Correctly disable webkit backend if the appropriate headers cannot be found.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-13 21:26:41 +00:00
Steve Lamerton
6edb39127b Correct a typo in the wxWebView tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-13 19:39:38 +00:00
Steve Lamerton
af5fccc140 Disable webkit backend if the appropriate headers cannot be found.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-13 12:06: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