Commit Graph

2165 Commits

Author SHA1 Message Date
Vadim Zeitlin
39ad820bee Check for Win32 exceptions inside our WindowProc().
Don't let unhandled Win32 (i.e. structured) exceptions escape from wxWndProc()
as they can just disappear into thin air when running under WOW64 as 32 bit
exceptions can't propagate through 64 bit kernel. So catch them immediately
and pass them to the global handler while we have the chance to do it, as
we're never going to get it in the outer __try/__catch block in wxEntry() in
src/msw/main.cpp.

In particular, this allows to catch crashes in wxEVT_PAINT handlers, such as
the one in debughlp sample, again.

Closes #16656.
2015-07-27 02:30:40 +02:00
Peter Tissen
328743bf2d Add Microsoft Visual Studio 2015 solution file for building wxMSW.
Allow building with VC14 out of the box.

Closes https://github.com/wxWidgets/wxWidgets/pull/48
2015-07-21 23:07:06 +02:00
Vadim Zeitlin
fc3d2bac2a Avoid bogus assert after calling wxDatePickerCtrl::SetRange() in wxMSW.
If the old value didn't lie inside the new range, it was changed by the native
control internally but the value stored by wxDatePickerCtrl itself remained
unchanged, resulting in asserts later when the mismatch between them was
detected.

Closes #13189.
2015-07-17 17:59:40 +02:00
Vadim Zeitlin
2eb04b44df Update Scintilla change log entry to use the latest 3.5.5 version.
Credit ARATA Mizuki for the latest round of updates (3.4.1 -> 3.5.5).

Closes #16776.
2015-06-15 02:28:14 +02:00
Roberto Perpuly
aa5dbad410 Use FSEvents in wxFileSystemWatcher on OS X
The FSEvents API allows for creating watches in entire trees of
directories in an efficient manner.

Closes #16969.
2015-06-06 02:37:35 +04:00
Vadim Zeitlin
39b9a6bbeb Don't generate bogus root item selection events in wxMSW wxTreeCtrl.
Setting focus to the control when receiving a selection event can result in
another selection event being generated by the control itself if it hadn't had
any selection before, which is completely artificial, i.e. doesn't correspond
to any user action, and so has to be suppressed.

Closes #16999.
2015-06-01 00:40:26 +02:00
Vadim Zeitlin
e78b57308f Get rid of wxListCtrl::m_count in wxMSW.
This simplifies the code and fixes the bug with GetItemCount() returning wrong
(old) value in wxEVT_LIST_INSERT_ITEM event handler as m_count wasn't updated
by then yet.

Closes #3793.
2015-06-01 00:32:09 +02:00
Olly Betts
ecf85bf4cb Remove WXWIN_OS_DESCRIPTION.
This constant wasn't very useful as it contained the description of the OS on
the machine where the library was built, not the one on which the application
using it was running. It also wasn't used anywhere in wxWidgets and apparently
wasn't meant to be used outside of it.

Finally, putting the output of `uname -r` into it created problems with
creating reproducible builds as just a change in the kernel version changed
the build results.

Closes #17002.
2015-05-22 02:29:49 +02:00
Vadim Zeitlin
0a6b08cca3 Don't cache cells being measured in wxHtmlListBox.
This can result in a crash if the measuring code is called, possibly
indirectly, from a method of a cell object itself and if that cell is
displaced from the cache while caching the cell created in OnMeasureItem().

Closes #16651.
2015-05-10 22:09:48 +02:00
Kevin B. McCarty
1298f5970b Fix race condition in Unix wxExecute() if child exited too quickly.
Check if the child has already finished before starting waiting for it.

Closes #16661.
2015-05-09 19:28:04 +02:00
Kevin B. McCarty
1ad4596e8c Fix setting "pressed" bitmap for wxToggleButton.
Move wxAnyButton::GetNormalState(), which allows wxToggleButton to override
what "normal" means for it, down to the platform-independent wxAnyButtonBase
class and use it now in wxGTK as well to correctly choose the pressed bitmap
for a toggle button in this state.

Closes #16771.
2015-05-09 19:22:28 +02:00
Kevin B. McCarty
178e9c9335 Improve wxFileCtrl::SetFilename() and SetPath() consistency.
Don't allow specifying the directory in the former and do check for the
directory existence in the latter.

Also update the file shown in the dialog in SetFilename().

Closes #16685.
2015-05-09 19:05:05 +02:00
Vadim Zeitlin
d1de0f3038 Document wxOSX non-BMP characters fix in the changelog.
This should have been part of the previous commit but was forgotten.

See #16979.
2015-05-09 18:21:36 +02:00
Dimitri Schoolwerth
6ca759b20b Update outdated year references to 2015.
Use 2015 insteaf of 201x, mostly in the manual and .plist files.
2015-04-30 16:11:30 +04:00
Nick Matthews
d13278ecc3 Add support for DOCTYPE to wxXmlDocument.
Allow retrieving the DOCTYPE specified in an existing document as well as
specifying the DOCTYPE to use when writing a new one.

Closes #13779.
2015-04-26 15:36:48 +02:00
Vadim Zeitlin
af01ef1bb0 Make default wxSizer border DPI-aware.
Scale the (still hard-coded) border in pixels by the content scale factor for
the platforms where this needs to be done, i.e. not wxGTK nor wxOSX where the
underlying toolkit already does it.
2015-04-23 19:18:10 +02:00
Vadim Zeitlin
277b848364 Handle all pixel values in XRC as being DPI-independent.
Pixel values in XRC can never be correct for high resolution displays, unlike
the pixel values passed to wxWidgets API, which could be already adjusted to
account for the resolution or obtained from resolution-dependent text metrics,
so scale them by the factor appropriate for the current resolution
automatically.
2015-04-23 19:18:09 +02:00
Vadim Zeitlin
16c22794b7 Give error messages for invalid sizer flags in XRC wxSizer handler.
This allows to give the exact line number of the error, unlike asserts that
happen in wxSizer code which don't point exactly to the error location when
sizers are created via XRC.

It also has the advantage of allowing to detect wrong use of wxALIGN_LEFT and
wxALIGN_TOP, unlike the asserts which can't do it because the value of both of
these flags is 0.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
78b98bf00c Validate wxBoxSizer flags instead of silently ignoring invalid combinations.
Detect using flags corresponding to the major sizer direction (which doesn't
make sense as only the proportion governs the behaviour in this direction) and
also combinations of alignment flags with wxEXPAND.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
fec1dcbd73 Don't send events for already selected radio popup menu items.
Selecting an already selected radio menu item didn't generate any events in
wxGTK nor in wxMSW with the top level (i.e. attached to a menu bar) menus but
did send them for popup menus under MSW.

Make the last case consistent with the rest of them and don't send any events
in this case neither.

Closes #16891.
2015-03-23 01:11:34 +01:00
Vadim Zeitlin
3f84cb17ca Add wxActivityIndicator control.
This is a simple animated control indicating some program activity.

Provide native GTK+ (for > 2.20) and OS X implementations as well as a generic
one used under MSW.

Update the sample and the documentation.
2015-03-20 00:08:37 +01:00
Vadim Zeitlin
00748bbaef Add wxWindow::FromDIP() for simpler high DPI support.
This method allows to scale a pixel value by a DPI-dependent factor to the
value used by the underlying toolkit only if necessary, i.e. when not using
GTK+ 3 or OS X which already do this internally.
2015-03-20 00:08:37 +01:00
Steve Browne
7f0963dcf7 Implement wxWindow::Disable() for non-native controls in wxOSX.
Previously disabling generic window simply didn't do anything.

Fix this by explicitly refusing to generate mouse/keyboard events for it.

Closes #13155.
2015-03-12 13:37:17 +01:00
Kinaou Hervé
de7e315557 Correct implement wxLIST_AUTOSIZE_XXX in the generic wxListCtrl.
Use both the contents and the header width when wxLIST_AUTOSIZE_USEHEADER is
given instead of just the latter.

Also make both wxLIST_AUTOSIZE_USEHEADER and the previously implemented
wxLIST_AUTOSIZE work efficiently for the virtual list controls by reusing
wxMaxWidthCalculatorBase already used in the generic wxDataViewCtrl.

Closes #10326.
2015-03-11 22:03:14 +01:00
Vadim Zeitlin
fe33cfc83f Add wxProcess::Activate() and implement it for MSW.
When launching child processes it can be convenient to be able to switch to
them later, provide a method in wxProcess to do it.

Currently this is only implemented in wxMSW but could almost certainly be done
for wxOSX too (it can be done using Apple Script, so presumably there is a way
to do it programmatically as well) and could be also made to work at least
under some Unix systems by emulating what wmctrl does (or just launching it?).
2015-03-10 20:31:24 +01:00
Vadim Zeitlin
b7388f36f2 Change wxFD_MULTIPLE value to avoid conflict with wxDIALOG_NO_PARENT.
This avoids GTK+ warnings about creating a dialog without parent when a
wxFileDialog with wxFD_MULTIPLE style is created.

Closes #16863.
2015-03-02 14:32:53 +01:00
Dimitri Schoolwerth
11a5b83e2c Add OS X implementation of wxAppProgressIndicator.
Closes #16638.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-15 20:09:10 +00:00
Vadim Zeitlin
ad527c5468 Show how to handle files on command line in docview sample.
This is not totally obvious, so show how to do it, including the Mac-specific
MacNewFile() overriding part.

Closes #16816.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-15 18:35:13 +00:00
Artur Wieczorek
b37d50db1d Initialize wxPGChoices object properly in its copy ctor if source object has no data.
Internal data must be always initialized whether the source object contains choices data or not.

Closes #16855

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-13 19:42:07 +00:00
Vadim Zeitlin
453897149f Add wxAddRemoveCtrl class.
This is a simple high level helper combining an arbitrary control showing
multiple items with the buttons allowing to add items to and remove items from
this control, but using the buttons and the layout appropriate for the current
platform.

Add the implementation itself, an example of using it to the dialogs sample
and the documentation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-09 00:26:11 +00:00
Vadim Zeitlin
3d2d8fc4ab Consistently refuse to create bitmaps with 0 width or height.
Homogenize the behaviour of all ports when creating bitmaps with 0 width or
height: just fail always as it doesn't seem to make sense to support this.

Closes #16828.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-03 18:28:21 +00:00
Vadim Zeitlin
3dff63b563 Add wxASSERT_MSG_AT() and wxFAIL_MSG_AT() macros.
These macros are useful for functions called from other macros to allow
pretending that an assert inside such function actually happens at the point
in the sources where the macro itself appears.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 22:08:41 +00:00
Vadim Zeitlin
f3833aa067 Don't change MDI children order after showing a file dialog in wxMSW.
Don't use the generic focus saving/restoring code for wxMDIParentFrame in
wxMSW as it already saves and restores the active MDI child on its own and we
should let it do it, as our code could change the active child when restoring
focus if it hadn't been saved correctly previously.

The fact that it is isn't saved is another bug, but even if it is fixed, we
should let MSW MDI implementation handle activation as we can't do it any
better -- but can do worse, as the bug described in #16635 shows.

Closes #16635.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 01:07:53 +00:00
Vadim Zeitlin
957f3c5b50 Fix reading of not NUL-terminated strings using wxRegKey.
Even though this is typically the case, some strings in Windows registry are
not NUL-terminated, deal with them correctly by using the explicit length.

Closes #16719.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:24:58 +00:00
Vadim Zeitlin
7dd75c8844 Revert "Add support for reading multi string values to wxRegKey."
Reverts r78136 (see #15727) because the multi-string values in Windows
registry are actually not "name=value" pairs at all but just NUL-separated
strings and the API provided for reading them was inappropriate.

Also see #16719.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:24:52 +00:00
Vadim Zeitlin
ea47af08cb Add wxEVT_MAGNIFY mouse event.
Currently this is implemented for wxOSX only.

Closes #14322.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-16 13:59:26 +00:00
Vadim Zeitlin
494b66b5fb Fix appearance of wxMSW wxToggleButtons with bitmaps in pressed state.
Correct the "pushed" state determination in our own drawn code, it didn't work
for wxToggleButton which doesn't return BST_PUSHED from BM_GETSTATE. But it
does have BM_GETCHECK returning its state directly, so add a new virtual
MSWIsPushed() method and implement it differently for it.

Closes #13755.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-07 01:52:42 +00:00
Vadim Zeitlin
29cd13cc8f Fix checked disabled wxToolBar tools with custom images in wxMSW.
Windows doesn't use the correct image for checked disabled tools, at least up
to and including Windows 7, so don't put such tools in the "checked" state at
all: this doesn't matter as they are disabled anyhow, but shows the correct
image for them.

Closes #12989.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-05 22:19:25 +00:00
Vadim Zeitlin
a2b0b8dbaa Handle updating tooltip text in wxCompositeWindow correctly.
While calling SetToolTip(wxToolTip*) overload already worked correctly for
wxCompositeWindow, using SetToolTip(wxString) did not if a tooltip already
existed, as it didn't use the virtual DoSetToolTip() in this case, resulting
in e.g. impossibility to update wxSpinCtrlDouble tooltip using this method.

Fix this by introducing DoSetToolTipText() virtual which is used by that
overload now and overriding it in wxCompositeWindow.

Also don't override DoSetToolTip() in wxSpinCtrlGenericBase any more, it is
not necessary as it's already done by its base class wxCompositeWindow.

Closes #16595.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-05 22:19:10 +00:00
Vadim Zeitlin
2d20e3fc51 Harmonize wxMenuEvent handling between all major ports.
Send these events to the menu itself first, then to the menu bar containing
it or the window invoking it if it's a popup menu and, finally, to the top
level window in all of wxGTK, wxMSW and wxOSX.

In particular, this ensures that help strings are now shown in the parent MDI
frame status bar by default, even when the menus are attached to the client
MDI frame or shown as popup menus.

At the implementation level, this logic is now encapsulated in a new static
wxMenu::ProcessMenuEvent() method which can be easily modified and reused in
other ports.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-05 22:17:58 +00:00
Vadim Zeitlin
90639b8339 Send idle events from inside wxYield() in all ports, including wxMSW.
This means it can be now done in wxEventLoopBase itself and calls to
ProcessIdle() in the port-specific code are not needed any more, so remove
them.

This introduces a change in behaviour for wxMSW, where idle event handlers
were not invoked from inside wxYield() at all previously, and for wxOSX, where
only a single idle event is now generated from wxYield() instead of a stream
of them until no idle handler needs any more of them as before. But on the
bright side, the new behaviour seems to make most sense and is now the same in
all ports.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-05 22:17:23 +00:00
Paul Cornett
bb9515c729 fix crashes in wxGTK3 when running with non-X11 backend, see #16688
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-20 17:04:13 +00:00
Vadim Zeitlin
4797f01bc0 Credit Marco Trevisan for wxGTK3/Mir patches.
Closes #16688.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-19 13:29:32 +00:00
Artur Wieczorek
c0e2e0c5d8 Fix adding/removing categorized/alphabetic mode buttons in wxPropertyGridManager.
Modify wxPropertyGridManager::RecreateControls() to allow adding/removing categorized/alphabetic mode buttons to/from wxPG manager tool bar at any time (not only when creating the tool bar).
Modify wxPropertyGridManager::SetExtraStyle() to fully support manipulating these buttons via wxPG_EX_MODE_BUTTONS flag.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-15 17:14:39 +00:00
Vadim Zeitlin
89738ef01f Add support for reading multi string values to wxRegKey.
Add a wxRegKey::QueryValue() overload working with REG_MULTI_SZ values.

Closes #16653.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:03:00 +00:00
Vadim Zeitlin
dec924cdf1 Add wxCursor::GetHotSpot() and implement it for wxMSW and wxGTK.
Allow retrieving the coordinates of the cursor hot spot, at least for the
ports for which we know how to do it.

Closes #16539.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:02:50 +00:00
Vadim Zeitlin
8de1128c07 Return correct menu pointer for wxEVT_MENU_{OPEN,CLOSE} in MDI frames.
These events are supposed to carry a pointer to the menu which was opened or
closed, but wxMenuEvent::GetMenu() always returned NULL for the menus opened
when a child MDI frame was active, as its menu bar, containing the menu, was
not searched for it.

Fix this by overriding MSWFindMenuFromHMENU() at wxMDIParentFrame level, just
as we already do for FindItemInMenuBar().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:02:31 +00:00
Vadim Zeitlin
8b72652a28 Make results of wxDC::DrawEllipticArc() consistent across all platforms.
And also consistent with wxGraphicsContext method with the same name.

Document the rules determining what is drawn.

Closes #4437.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:02:14 +00:00
Vadim Zeitlin
844159792f Fix clearing wxCB_READONLY wxComboBox in wxGTK.
wxComboBox::Clear() must call wxTextEntry::SetValue() explicitly instead of
calling its Clear() which just forwards back to wxComboBox own SetValue(),
which (correctly) doesn't work for read-only comboboxes when passed an empty
string.

Closes #16654.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-01 13:56:30 +00:00
Vadim Zeitlin
722057b3a0 Add a new wxUSE_STD_CONTAINERS_COMPATIBLY option.
This option, which is on by default unless the use of STL is disabled,
provides better interoperability with the standard library when it can be done
without breaking backwards compatibility.

The first example of its use is to allow passing std::vector<> of any string
compatible type to wxItemContainer::Append(), Insert() and Set(), allowing to
directly initialize various wxControls deriving from it such as wxChoice,
wxComboBox, wxListBox from a std::vector<> of strings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 21:54:51 +00:00
Vadim Zeitlin
434c95e1a1 Allow customizing wxBusyInfo appearance.
Allow customizing wxBusyInfo window by passing wxBusyInfoFlags containing
information about the icon, title, colours and frame transparency to use.

Update the sample to show such "rich" busy info.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 21:54:38 +00:00
Vadim Zeitlin
069415c2a6 Fix wxStringTokenizer copy ctor and assignment operator.
Implement copying of wxStringTokenizer correctly: compiler-generated versions
didn't work as the position of the tokenizer didn't point into the correct
string after making the copy.

Fix this by adjusting the position iterator to use the copy of the string.

Closes #16339.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-20 15:08:09 +00:00
Vadim Zeitlin
a3cf902002 Update the bundled Scintilla version to 3.4.1.
There are relatively few changes, see Scintilla changelog at
http://www.scintilla.org/ScintillaHistory.html

Closes #16182.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:57:22 +00:00
Vadim Zeitlin
1f6fae0f3f Define unambiguous Is{List,Text}Empty() in wxOwnerDrawnComboBox.
Like in wxComboBox itself, it's useful to provide these methods to avoid
problems with ambiguous IsEmpty(), inherited from both wxTextEntry and
wxItemContainer.

Closes #16618.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-13 12:08:10 +00:00
Vadim Zeitlin
c0548a02fd Fix vertical cell alignment in wxDataViewCtrl in wxGTK.
Pass the alignment used when creating the column to the renderer.

Closes #16035.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-12 20:48:52 +00:00
Vadim Zeitlin
b9e0e606a8 Add support for 'z' size format specifier.
Assume that non-MSVC compilers support it directly and use 'I' for MSVC.

Closes #16596.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-12 20:48:41 +00:00
Vadim Zeitlin
793187de9d Add wxART_FULL_SCREEN icon.
Use stock GTK+ icon in wxGTK and Tango icon elsewhere.

See #2662.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-11 16:30:06 +00:00
Vadim Zeitlin
36a5983f64 Use wxSelectionStore in wxDataViewCtrl generic implementation.
This makes the code (slightly) shorter and more clear and is more efficient as
selecting all items in wxDataViewCtrl is now a O(1) operation instead of being
O(N), where N is the number of items -- and the latter could take quite a long
time (and consume non-negligible amount of memory) for large N.

Increase the size of the virtual list control from 1000 to 10000000 in the
sample to show this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:25 +00:00
Vadim Zeitlin
9ecf317092 Implement strike-through support in wxFont in wxOSX.
Implement support for this attribute in wxOSX too.

Closes #16547.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-11 17:05:33 +00:00
Vadim Zeitlin
1addaeaa75 Add wxUIActionSimulator::Select().
Add a helper to select an item in a wxChoice, wxComboBox, wxListBox or similar.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:52:01 +00:00
Vadim Zeitlin
9a377ec117 Implement wxListBox::EnsureVisible() for wxMSW.
Manually check whether the item is currently visible and scroll the listbox
just enough if it isn't.

Closes #3224.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:51:17 +00:00
Vadim Zeitlin
dc65fa8d5a Allow recursive calls to wxEventLoop::Yield().
There doesn't seem to be any reason to forbid them and this change allows
wxExecute() without wxEXEC_NOEVENTS to work without assertion failures when
called from inside wxYield().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:51:06 +00:00
Vadim Zeitlin
46a414097b Always disable "Back" wxWizard button for the starting page.
Do it even if the start page has a previous page (e.g. because the wizard has
been started in the middle for some reason).

Closes #16535.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-05 12:46:38 +00:00
Vadim Zeitlin
118e8e7286 Add wxBitmap ctor from wxCursor to wxGTK and wxMSW.
Allow converting wxCursor to wxBitmap in order to draw it, for example.

Closes #15699.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-04 19:44:52 +00:00
Vadim Zeitlin
56d0a94ec8 Specialize std::hash<> for wxString when using C++11.
This allows to use wxString as key type of std::unordered_{map,hash} out of
the box.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-02 15:35:02 +00:00
Vadim Zeitlin
51d715e46d Add wxPowerResourceBlocker for power management.
Add functions to acquire/release power resources, preventing/allowing back the
system to go to sleep or turn off the screen and a class wrapping them in a
safe way.

This patch implements the functions for MSW and OSX, adds documentation and
updates the sample to demonstrate the new functionality.

Closes #16413.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 23:22:15 +00:00
Artur Wieczorek
7e859ec6c9 Fix drawing custom colours for wxEnumProperty choice items in wxPG.
In order to draw choice items with custom colours there is necessary to merge custom cell object (wxPGCell) associated with individual item with default cell object (in wxPGProperty::GetDisplayInfo).
wxPGProperty::GetDisplayInfo function should return customized cell object instead of returning pointer to the default cell object only.

Closes #16509

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 21:17:16 +00:00
Vadim Zeitlin
3bcec846a0 Provide wxApp::StoreCurrentException() implementation for C++11.
When using C++11 we can provide implementations of wxApp::StoreCurrentException()
and RethrowStoredException() ourselves and thus make catching exceptions outside
of the event loop work by default.

Do this and update the documentation and the sample to reflect it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:31:52 +00:00
Vadim Zeitlin
1cecee5bb7 Add wxApp::StoreCurrentException() and RethrowStoredException().
These methods can be used to ensure that the exceptions thrown from event
handlers are safely rethrown from the code dispatching the events once the
control flow gets back there.

This allows to work around the problem with not being able to propagate
exceptions through non-C++ code and can be used, for example, to catch
exceptions thrown by the handlers invoked from inside wxYield() by a try/catch
block around wxYield() -- something that didn't work before, update the except
sample to show that it does work now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:31:44 +00:00
Vadim Zeitlin
df13791078 Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 01:50:11 +00:00
Vadim Zeitlin
21da20d579 Restore dynamic linking of GDI functions for non-MSVC.
This partially reverts the changes of r77029 and r77039: now functions such as
Set/GetLayout(), AlphaBlend() and GradientFill() are still called (almost)
directly when using MSVC but pass by dynamic loading with the other compilers,
which don't have #pragma comment(lib) and, in MinGW case, also lack some of
these functions in their libraries even if we do link with them.

Closes #16411.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-14 12:11:39 +00:00
Vadim Zeitlin
afdb989e87 Link wxMSW with msimg32.lib now that AlphaBlend() is used statically.
Implicitly link msimg32.lib in when using MSVC and add it to MinGW (and
Borland) makefiles.

This should have been part of r77029.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 18:03:23 +00:00
Vadim Zeitlin
86cf756ba9 Add wxRendererNative::DrawGauge() method.
Add the method with the native implementations for MSW and OS X and a generic
version fallback.

Closes #16406.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-08 01:03:31 +00:00
Vadim Zeitlin
3c7ba39135 Allow requesting core OpenGL profile and explicit OpenGL version.
Add WX_GL_CORE_PROFILE and WX_GL_{MAJOR,MINOR}_VERSION attributes which can be
used to use modern OpenGL with wxGLCanvas.

Closes #16402.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-06 23:31:41 +00:00
Vadim Zeitlin
1b90acc357 Add wxDateTime::GetWeekBasedYear().
It was just added as a private function to implement %V format specifier
support, just extract and document it as it could possibly be useful in its
own right.

See #11857.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:41 +00:00
Vadim Zeitlin
f88585b4ab Update wxSlider background when its parent background changes in wxMSW.
The native control doesn't redraw itself, so force it to do it from the
overridden DoMSWControlColor() which is called every time the background
colour might have changed.

See #12271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:26 +00:00
Vadim Zeitlin
bdc5c6e628 Add --disable-sys-libs configure option.
This allows to disable the use of all system libraries with a single option
instead of having to use --with-{lib{png,jpeg,tiff},regex,zlib,expat}=builtin
or similar.

This is especially useful under OS X where we want to avoid the dependencies
on any locally installed homebrew or similar libraries.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-24 11:34:14 +00:00
Artur Wieczorek
1dec9f059b Credit for patch (r76895).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-12 19:34:50 +00:00
Tim Kosse
705a1b547d Implement wxGenericListCtrl::EndEditLabel.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 10:32:42 +00:00
Vadim Zeitlin
e2e79bd000 Allow specifying custom comparator for wxSortedArrayString.
Add a possibility to order wxSortedArrayString in some order different from
the default alphabetical one.

Closes #16330.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 01:08:50 +00:00
Vadim Zeitlin
b6469b4369 Fix changing the label of a submenu in wxMSW.
Use position, not the ID, to find the native menu items to allow the code in
wxMenuItem::SetItemLabel() and DoSetBitmap() to also work with submenus and
not just the normal items.

Closes #16246.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-09 20:33:17 +00:00
Vadim Zeitlin
40f2cf0a78 Allow access to the currently shown wxInfoBar buttons.
Add wxInfoBar::GetButtonCount(), GetButtonId() and HasButtonId() methods.

Closes #15110.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-02 01:15:11 +00:00
Vadim Zeitlin
1467e6c5df Revert "Correctly detect cancelled drag-and-drop operations in wxGTK."
This reverts r75745 (and r75749 fixing a minor problem in it) as this change
broke the reporting of the result of the drag and drop operation instead of
fixing it.

See #15930.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-02 00:16:13 +00:00
Vadim Zeitlin
c7fd48db6b Correct handling of the characters outside of the BMP in wxSTC.
The code mapping positions for the units of the UTF-13/32 string used by
wxWidgets to positions for the units of the UTF-8 string used by Scintilla
didn't work correctly for the characters outside of the BMP, i.e. Unicode code
points >= 0x10000.

See #15621.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-29 23:48:46 +00:00
Vadim Zeitlin
a309157a66 Don't include "webview" in "standard" libraries.
This means `wx-config --libs` doesn't include webview in its output by default
any longer, it must be explicitly requested.

Closes #16291.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-27 23:59:10 +00:00
Vadim Zeitlin
1558349361 Improve RTL support in wxStyledTextCtrl.
Use the correct HDC, inheriting the right text orientation, when creating
wxMemoryDC in SurfaceImpl code.

There may still be problems with the actual RTL languages, but at the very
least English text displayed in RTL locale is not mirrored any more.

Closes #16230.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-10 16:16:01 +00:00
Vadim Zeitlin
47138ac8fa Add wxStyledTextCtrl copy/paste text events.
Add wxEVT_STC_CLIPBOARD_{COPY,PASTE} events, allowing to transform the text
being copied from or pasted into wxStyledTextCtrl.

Closes #16191.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-08 14:43:45 +00:00
Vadim Zeitlin
5b56498f88 Allow using sizers for laying out wxMDIClientWindow in wxMSW.
Let the user code put wxMDIParentFrame::GetClientWindow() into a sizer and
manage it as any other window, instead of having to do it manually.

Closes #16196.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-06 18:20:38 +00:00
Vadim Zeitlin
8a245f0ec3 Fix handling of multiple and rectangular selections in wxSTC.
Copy and paste rectangular selections in the standard format, this is
especially important under Windows where a (de facto) standard clipboard
format for such selections exists.

Also fix handling of multipaste, i.e. pasting clipboard contents into several
locations at once.

Closes #16221.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-05 14:42:35 +00:00
Vadim Zeitlin
fd65d4b4f5 Implement setting foreground colour for wxRadioButton in wxMSW.
Native radio buttons don't support changing their foreground colour, so use
owner drawn buttons if SetForegroundColour() was called, similarly to what was
already done for wxCheckBox.

Closes #10137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:13:12 +00:00
Vadim Zeitlin
2e8988c3d6 Add wxGridCellRenderer::GetBest{Height,Width}() and use them in wxGrid.
Allow the renderer to specify the best height at the given width (or vice
versa) instead of the best size in both direction which is not defined for
e.g. wxGridCellAutoWrapStringRenderer.

Closes #15943.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:12:42 +00:00
Vadim Zeitlin
ccaebf6520 Add wxThread::MSWGetHandle().
Under MSW a thread has both an ID, returned by wxThread::GetId(), and a
handle, which couldn't be retrieved so far. Add an accessor to do it.

Closes #16170.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-27 22:41:50 +00:00
Vadim Zeitlin
cbe6495307 Allow dropping data outside of item area in wxDataViewCtrl.
Implement this change for the generic and the native GTK versions and document
it.

Closes #16152.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-27 22:41:40 +00:00
Vadim Zeitlin
fc014a6f19 Don't set wxINTERPOLATION_GOOD quality by default in wxGDIPlusContext.
This is inconsistent with wxOSX and also doesn't play well with the existence
of wxINTERPOLATION_DEFAULT which is different from wxINTERPOLATION_GOOD.

See #14134.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-08 21:38:09 +00:00
Vadim Zeitlin
da319a87cd Make wxMSW owner drawn menu item code more clear and correct.
The user-visible effect of this change is that removing the item from the menu
and adding it back doesn't lose its icon any more.

At the code level, wxMenuItem::SetBitmaps() and related methods are
implemented outside of "#if wxUSE_OWNER_DRAWN" which allows to use them even
in minimalistic library builds. And IsOwnerDrawn() is not used any more to
determine whether the item has bitmaps, just only if it's really owner drawn,
making the code more clear and fixing at least the bug above and possible more.

Closes #13878.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-27 00:02:28 +00:00
Vadim Zeitlin
a3da62503f Fix setting menu item bitmaps after appending them in wxMSW.
Update the bitmap used by Windows when using non-owner-drawn items with
bitmaps.

Closes #9388.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 15:18:37 +00:00
Vadim Zeitlin
33ad33d447 Add wxOVERRIDE and use it in common and wxOSX code.
Make overriding virtual methods more explicit and enable additional checks
provided by C++11 compilers when "override" is used.

Closes #16100.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 13:26:28 +00:00
Vadim Zeitlin
8c4b1dcbd0 Add wxInt64 support to wxText{Input,Output}Stream.
Add explicit Read64[S]() and Write64() methods.

Closes #14685.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-19 22:57:44 +00:00
Vadim Zeitlin
399371921f Add font colour support to wxFontPickerCtrl.
Currently this is only really implemented under Windows, just as the colour
support in wxFontDialog, but make the API available under all platforms for
consistency.

Closes #11614.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 17:23:13 +00:00
Vadim Zeitlin
371928415a Add support for loading old V1 bitmap files to wxBMPHandler.
Such files are apparently still seen in the wild, even though this format has
been superseded since Windows 3.0 (!).

Closes #3433.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-14 01:36:54 +00:00
Vadim Zeitlin
64deeb94b9 Add support for saving 32bpp icons too.
Save in 32bpp format if alpha channel is present in the image being saved in
ICO format.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:24 +00:00
Vadim Zeitlin
818e5f3a48 Allow saving 24 bpp ICO file in wxImage.
Create ICO files with 24bpp if the image being saved contains more than 256
colours.

Also use smaller values (4 bpp or monochrome) if the image uses fewer colours.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:19 +00:00
Vadim Zeitlin
7e64a29edb Add support for saving 256*256 ICOs in PNG format.
Allow saving icons larger than 127*127 pixels (up to 256*256 which is the
maximal size supported by the ICO format) and save large icons with the item
data in PNG format, as it is normally done for these sizes.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:14 +00:00
Vadim Zeitlin
d6ace87b61 Upgrade included Scintilla to version 3.3.9.
Closes #15742.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 13:23:54 +00:00
Vadim Zeitlin
b356d1d3c7 Add wxFont::GetBaseFont().
This can be used to "undo" the result of Bold() ,Underlined() or Italic()
methods and returns an unadorned version of the font.

Closes #11815.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 20:48:20 +00:00
Vadim Zeitlin
61e323ad37 Add wxEnhMetaFile::Detach().
Allow getting the handle from this class, this is useful if it needs to be
passed to some other library, for example.

Closes #15706.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 16:04:22 +00:00
Vadim Zeitlin
9a61ced717 Correct wxThread::SetPriority() under Unix to hopefully work.
The old implementation was completely broken, the new should hopefully work if
pthread_setschedparam() behaviour really corresponds to its documentation.

Mapping of our priorities in 0..100 range to pthread 1..99 range remains ugly
but this seems to be unavoidable, unfortunately.

Closes #14985.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 16:04:17 +00:00
Vadim Zeitlin
f51dc81c85 Add wxDynamicLibrary::GetModuleFromAddress().
Use dladdr() under Unix, if available, to provide the same functionality as we
get from GetModuleHandleEx() under MSW and export it in a new public function.

Closes #15248.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 16:04:06 +00:00
Julian Smart
cd3fc53163 Added on-demand image loading option to wxRTC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-10 11:08:42 +00:00
Vadim Zeitlin
74f21995ca Make stretchable spacers work in vertical toolbars too in wxMSW.
Replace the old implementation of stretchable spacers based on changing the
size of the separators used as spacers as the toolbar size itself changed with
a new one, simply replacing the old separator with the new one of the correct
size, as it also works for the vertical toolbars, unlike the old approach.

Closes #13673.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-07 01:19:13 +00:00
Vadim Zeitlin
050fabe3b9 Add wxFD_NO_FOLLOW style for wxFileDialog.
This style tells the dialog to return the paths of the link being selected
without dereferencing it.

Currently only implemented under wxMSW as the links are not dereferenced by
default in wxGTK anyhow. But we may want to change this and implement it there
too for consistency in the future.

Closes #15429.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-05 16:29:46 +00:00
Vadim Zeitlin
779af88f43 Fix loading of bitmap with non-pre-multiplied alpha in wxMSW.
Detect when the bitmap file doesn't have pre-multiplied alpha and pre-multiply
it ourselves when loading it in this case.

Closes #12762.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 20:55:00 +00:00
Vadim Zeitlin
a2a846e473 Allow customizing bitmap handling in wxSVGFileDC.
Provide a built-in alternative for using external files for the bitmaps in
SVG: allow embedding them inside the SVG itself using "data:" URI.

And also allow to define custom handlers to make the behaviour even more
flexible.

Closes #15968.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 17:26:27 +00:00
Vadim Zeitlin
0206eb6161 Add support for fixed spacers and labels to wxAuiToolBar XRC handler.
Allow specifying "width" and "proportion" attributes for the "space" elements
and add "label" element support.

Closes #15964.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 15:05:52 +00:00
Julian Smart
2124c5688b Optimized wxRTC insertion and deletion when floating objects are present.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-15 16:19:43 +00:00
Vadim Zeitlin
5e6d30aa0b Add support for sorting by more than one column to generic wxDataViewCtrl.
Maintain a list of columns used for sorting instead of a single sort column
index and allow to add/remove columns to/from it interactively by right
clicking them if AllowMultiColumnSort() was used.

See https://github.com/wxWidgets/wxWidgets/pull/3

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 22:12:53 +00:00
Vadim Zeitlin
9d05d9a009 Allow using wxRearrangeList::Check() to change state programmatically.
Previous this resulted in an assert and broken behaviour as it didn't update
the internally stored state. Do update it now and remove the assert as it
isn't possible to distinguish between user code calling Check() and wxGTK
doing it itself from wxCheckListBox implementation.

Closes #15940.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 15:59:52 +00:00
Dimitri Schoolwerth
6d34b1b760 Added support for wxEVT_COMBOBOX_DROPDOWN and wxEVT_COMBOBOX_CLOSEUP events to wxOSX/Cocoa.
See #15762.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 09:32:16 +00:00
Vadim Zeitlin
0a86fd0f4f Support multiline strings in wxDC::DrawRotatedText() in wxMSW.
The native API doesn't support this, so do it by splitting the string into
lines manually.

Closes #9686.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-31 19:33:53 +00:00
Vadim Zeitlin
d0d22874c8 Correctly detect cancelled drag-and-drop operations in wxGTK.
The status of the drop operation wasn't propagated back to the initiator of
drag and drop, so failing to drop data over a possibly accepting recipient
could result in wrong behaviour and even data loss.

Closes #15930.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 19:40:35 +00:00
Vadim Zeitlin
5cfbf0dc4d Allow iterating over wxCmdLineParser arguments in order.
This allows the meaning of the options to depend on their order relatively to
the other options which wasn't possible before.

See http://review.bakefile.org/r/557/

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-28 13:04:55 +00:00
Vadim Zeitlin
5f30588ebd Delete the button object in wxRibbonButtonBar::DeleteButton().
Unlike ClearButtons(), DeleteButton() didn't actually delete the button.

Fix this and document this behaviour.

Closes #15909.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-25 17:39:21 +00:00
Vadim Zeitlin
69fe5785b6 Send events when toggling wxPropertyGrid nodes from keyboard.
Closes #15899.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 18:39:14 +00:00
Vadim Zeitlin
c96fc29a52 Draw the selected bitmap correctly in wxMSW buttons.
Clear the previously drawn bitmap before drawing the new one.

Closes #12550.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 18:39:09 +00:00
Vadim Zeitlin
95b5a81c0e Use AssocQueryString() instead of manual accessing registry in wxMSW.
AssocQueryString() is more reliable and should work under all Windows
versions, including Windows 8 for which our previous implementation, reading
the values directly from the registry, had some problems.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:15:48 +00:00
Vadim Zeitlin
91bd95beb7 Allow building wxGTK using GTK+3 under Windows too.
No real changes, just use the right libraries for GTK+3 port.

Closes #15871.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-10 14:18:54 +00:00
Vadim Zeitlin
7b7f3b0132 Revert "Don't intercept accelerators in wxTextValidator in wxGTK."
Testing for absence of Alt modifier is wrong as it could be specified for the
events generated by AltGr-letter key combinations (AltGr is Alt+Ctrl), so this
commit broke the validation of any such symbols entered from non-US keyboard.

This is worse than the problem it was trying to fix, so revert this for now.
The real fix will need to ensure that the mnemonics are checked first, i.e.
before generating EVT_CHAR, in wxGTK, just as it already happens in wxMSW.

This reverts r75453.

See #15777.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:34:05 +00:00
Vadim Zeitlin
5cd81ca598 Allow initializing wxScopedArray more conveniently.
Typical wxScopedArray initialization uses "new T[n]" expression, allow to omit
most of it and specify just n, the number of elements to allocate.

Use the new shorter form in the places where wxScopedArray(new ...) was used
(which is in almost all of them)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 14:03:34 +00:00
Vadim Zeitlin
b72899d142 Don't intercept accelerators in wxTextValidator in wxGTK.
Key events with modifiers shouldn't be filtered by the validator as they are
used as accelerators and not for the text entry at all.

Closes #15777.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:19:17 +00:00
Vadim Zeitlin
39edfa27a2 Make wxFILTER_INCLUDE_LIST in wxTextValidator actually usable.
Only check for its violation once the full text is entered as otherwise
nothing could ever be entered when it was used.

Closes #15778.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:43 +00:00
Vadim Zeitlin
fba8b37345 Add wxHtmlWindow::SetDefaultHTMLCursor().
This allows to change the cursors used by any HTML windows, before creating
them.

Closes #15324.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:43 +00:00
Vadim Zeitlin
8f305123db Add default ctor and Create() to wxContextHelpButton.
Allow two step creation of wxContextHelpButton.

Closes #14848.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:21 +00:00
Vadim Zeitlin
f269f868d7 Add XRC handler for wxAuiToolBar.
Also add the demonstration of AUI handlers (this one and the existing one for
wxAuiNotebook) to the xrc sample.

See #15686.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-23 00:34:55 +00:00
Vadim Zeitlin
4de86c0b26 Update version to 3.1.0.
And regenerate everything.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-21 13:47:05 +00:00
Vadim Zeitlin
5b5af41985 Start a new change log for the changes in wxWidgets 3.1 and later.
Keep the old change log as docs/changes_30.txt, it will need to be updated
with docs/changes.txt from the 3.0 branch in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-15 13:33:34 +00:00
Vadim Zeitlin
a7ec1d1cdf Fix crash when setting invalid label with "&" at the end.
We detected that the label was invalid and gave a debug warning message about
it but then still proceeded to crash by accessing the data beyond the end of
the string. Don't do this.

Closes #15665.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-13 12:53:10 +00:00
Vadim Zeitlin
9b31387508 Merge the changes from 3.0 branch.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-12 18:06:37 +00:00
Vadim Zeitlin
9337103a37 Use UTF-8 for saving wxTextCtrl contents now.
This ensures that the files created by wxTextCtrl::SaveFile() can be read back
by wxTextCtrl::LoadFile() as previously the files were saved using the current
locale encoding but read back using Latin1 (after first trying, and failing,
to read them as UTF-8).

This is a backwards incompatible change but it ensures that wxTextCtrl can
load its own files and is also consistent with the use of UTF-8 by default in
other places. Finally, and perhaps most importantly, this ensures that the
file contents can always be saved, i.e. there is no risk of conversion errors
any more.

Closes #15611.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-26 20:29:32 +00:00
Vadim Zeitlin
451e456a91 Fix special characters handling in wxSVGFileDC::DrawText().
Special XML characters need to be quoted before being saved in an SVG file
(which is also an XML file).

Closes #15602.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-25 21:23:11 +00:00
Vadim Zeitlin
2391d20d76 Use correct contributor name for Jonathan Liu.
Correct the changelog entry added by r73938, see #10625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-25 17:51:21 +00:00
Vadim Zeitlin
db7af3c2a7 Fix DrawArc() implementation in wxGtkPrinterDC.
It didn't count the angles correctly when they were equal to 90 degrees.

Also simplify the code by avoiding special cases for 90 degrees anyhow, just
call atan2() directly. And also avoid converting the angles to degrees just to
convert them back to radians immediately afterwards.

See #15609.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-25 17:38:37 +00:00
Vadim Zeitlin
b845aa636a Fix reading of files with Mac EOLs in wxTextFile.
The last CR-terminated line wasn't handled correctly.

Fix this now and add unit tests to ensure that it stays fixed.

Closes #15583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-15 13:04:23 +00:00
Vadim Zeitlin
6e6e6d179f Fix pointer truncation in wxListEvent::GetData() in LLP64 builds.
We must use wxUIntPtr and not long here to avoid truncating the upper half of
the pointer when sizeof(void*)>sizeof(long).

Closes #15578.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:40 +00:00
Vadim Zeitlin
910f1a96d2 Add wxOleConvertVariant_ReturnSafeArrays flag for better SAFEARRAY handling.
While we can't change the type of wxVariant to which SAFEARRAYs are converted
by default, it's much more convenient to work with the variant objects of the
correct type, i.e. using wxVariantDataSafeArray, when dealing with SAFEARRAYs,
so add a flag which can be set to tell a wxAutomationObject to behave in this
way.

Closes #14700.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:35 +00:00
Vadim Zeitlin
b881ffc9a9 Added a changelog section for 3.0-RC2.
List the most important changes since 3.0-RC1 already done.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:30 +00:00
Vadim Zeitlin
2489d4f5b2 Update announcement and changelog for 3.0.0-RC1.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 12:07:53 +00:00
Vadim Zeitlin
723276b7b2 Mention wxWebView in the list of major changes since 2.8.
It's certainly no less important than propgrid or ribbon (and arguably much
more so).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 12:07:50 +00:00
Vadim Zeitlin
d32895c5d8 Generate events with specific wxFSW_WARNING_OVERFLOW type if applicable.
This allows the program to distinguish between some other, unspecified,
warnings and this one which can and does happen whenever too many changes
occur too quickly but which has a clearly defined work around: the state kept
inside the program just needs to be refreshed by rescanning the directory anew.

See #12847.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 09:58:51 +00:00
Vadim Zeitlin
a05ae051d8 Fix capturing non-ASCII output using wxExecute().
Explicitly use wxConvLibc with wxTextInputStream to make sure we correctly
decode non-ASCII data in the subprocess output.

This is a hack, the real solution would be to make wxTextInputStream work
properly with wxConvAuto.

See #14720.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 23:30:52 +00:00
Vadim Zeitlin
8155d71a7d Improve handling of keyboard entry using IME.
Pass the keyboard events to the IME before generating our events for them, the
IME may need them for its own use.

Closes #15384.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 23:30:45 +00:00