Commit Graph

2025 Commits

Author SHA1 Message Date
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