Commit Graph

59537 Commits

Author SHA1 Message Date
Vadim Zeitlin
38016a11ad Fixes to wxGA_TEXT and wxGA_PROGRESS documentation.
Correct the HTML output format for wxGA_PROGRESS, it was indented incorrectly
because Doxygen appears to need a blank line (i.e. end of paragraph) after a
"@since".

Also improve the wording of the styles descriptions a little.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-30 12:56:31 +00:00
Vadim Zeitlin
e847a2390e Re-add wxFD_OVERWRITE_PROMPT and wxFD_FILE_MUST_EXIST to wxGenericFileDialog.
Support for these styles was accidentally removed in r48733, re-add them back.

Closes #16652.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-28 18:57:40 +00:00
Vadim Zeitlin
47e8f3e50d Don't use "@overload" to document methods without parameters.
Documentation generated by @overload is misleading in this case as it refers
to the "different argument [the function] accepts", but there are none, the
methods can be overloaded only by const modifier as well.

Use \copydetails instead to reuse the original documentation, this is less
confusing and arguably more useful as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-27 20:09:55 +00:00
Vadim Zeitlin
3a94fbf452 German translation fixes from Sebastian Walderich.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-27 17:36:03 +00:00
Vadim Zeitlin
0c6f5c346d Update mouse capture stack when showing modal dialog in wxGTK.
GTKReleaseMouseAndNotify(), which is called before showing a modal dialog in
wxGTK to ensure that the mouse does not remain captured by the window which
will be disabled by the modal dialog soon, should update the mouse capture
stack and so must call ReleaseMouse() to do it, not just DoReleaseMouse().

See #16647, #8657.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-27 17:31:03 +00:00
Václav Slavík
454c50929f Use subtler grey for emulated toolbar toggle on OS X
Use a lighter shade of gray to avoid problems with user icons and to
match the look of OS X 10.10's rendering of selected toolbar items.

Fixes #16645.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-26 11:44:33 +00:00
Paul Cornett
2b4b8e044b use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-25 18:06:36 +00:00
Václav Slavík
f97112a21e Fix wxFontDialog exceptions on OS X Yosemite
Opening the font dialog would result in an exception in
RunMixedFontDialog:

-[NSView resetFlags]: unrecognized selector sent to instance 0x6080001285c0

The code in question assumed that NSFontPanel's accessory view either
didn't exist or was created by wx, and casted it to
wxMacFontPanelAccView* without checking. But this assumption is no
longer true on OS X 10.10, the view is apparently pre-set to some
default NSView instance.

Fix the code to check accessoryView's class before treating it as
wxMacFontPanelAccView.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-25 12:49:11 +00:00
Artur Wieczorek
fd9d67e9f4 Get wxPGProperty items to be deleted with deferral directly from the corresponding internal list of items.
Don't use iterator to collect wxPGProperty items in wxPropertyGridPageState::DoClear().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-25 12:35:14 +00:00
Vadim Zeitlin
743aa6d74f More fixes for PCH-less build after r78063.
Add missing headers/forward declarations now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 23:23:10 +00:00
Vadim Zeitlin
fdcf2676f0 Fix typo which broke PCH-less builds in r78063.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 22:55:47 +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
30c93fd705 Work around bad wxStaticText best size calculation under wxOSX.
Expand wxStaticText controls in wxBusyInfo and centre them to avoid the
problem with their contents being truncated when using markup under wxOSX.

This should, of course, be fixed in wxStaticText itself, and when it is, this
change should be reverted. But for now this at least allows wxBusyInfo to
appear correctly under OS X.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 21:54:44 +00:00
Vadim Zeitlin
011a1356a8 Clip the last word of wxStaticText if it doesn't fit in wxOSX/Cocoa.
Until this change the entire last word disappeared, presumably because it was
wrapped to the next line, which was not shown at all. Now as much of it as
fits into the available space is shown, which is not ideal, but better than
before, especially if we're only a pixel or two short.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 21:54:41 +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
693f41781b Auto resize wxGenericStaticText when its label or font is changed.
This makes the generic version consistent with the native control behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 21:54:34 +00:00
Vadim Zeitlin
f0aea4098c Refactor: extra wxStaticText auto-resizing code from wxMSW to common.
This will allow its reuse in wxGenericStaticText and maybe other ports that
need it in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 21:54:31 +00:00
Vadim Zeitlin
4936366716 Slightly improve sizing of wxInfoFrame used by wxBusyInfo.
Specify the margin around the text in dialog units, not pixels.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 21:54:27 +00:00
Vadim Zeitlin
f9788f7e27 Don't use wxRESIZE_BORDER for wxInfoFrame, used by wxBusyInfo, under wxX11.
This doesn't make sense, this frame should never be resizeable, so clean up
the code a little.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 21:54:25 +00:00
Vadim Zeitlin
7e3b5314dd Don't specify the title for wxInfoFrame used in wxBusyInfo.
The title is not shown to the user anyhow because this frame doesn't have
wxCAPTION style. And if it were shown, it should have been translated, but as
it isn't, just remove it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 21:54:22 +00:00
Vadim Zeitlin
9ecf21c57e Use its own foreground colour in wxGenericStaticText.
For some reason, the control always drew itself using wxSYS_COLOUR_BTNTEXT.
This is a good default, but it shouldn't ignore the explicitly set foreground
colour, so use it instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 21:54:18 +00:00
Vadim Zeitlin
9650c5b55b Avoid spurious error messages for WM_MDISETMENU under Windows XP.
WM_MDISETMENU handler doesn't seem to reset the last error under Windows XP
and this could result in spurious debug error messages when setting the
initial menu in which case NULL is returned to indicate that there was no
previous menu, but this doesn't indicate that an error occurred.

Explicitly reset the last error to ERROR_SUCCESS ourselves before using
WM_MDISETMENU to ensure that the last error can only be set after its return
if it was really done by the code handling it, i.e. if an error really
happened.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 13:45:41 +00:00
Vadim Zeitlin
4a34c928e5 Document wxScopedCharTypeBuffer::release().
Although this method is dangerous, it still (or, maybe, especially) needs to
be documented.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-23 13:56:04 +00:00
Vadim Zeitlin
e897361354 Revert "Use MaskBlt() with the correct ROP when drawing bitmaps with mask."
This reverts r78040 (see #16512) as it broke the appearance of the disabled
buttons in MSW toolbars as can be seen in the sample.

The change itself might still be correct and could have just uncovered some
other bug elsewhere, but for now still revert it just to make the toolbars
usable again.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-20 22:06:50 +00:00
Vadim Zeitlin
a8e0d97e0e Skip the menu events in wxFrameBase handlers.
While wxFrame may process these events for its own purposes, it shouldn't
prevent the user-defined fall back handlers for them (e.g. at wxApp level)
from running.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-20 22:06:46 +00:00
Vadim Zeitlin
0c359fa476 Avoid intercepting Ctrl-TAB keys in generic wxDataViewCtrl.
Check for the absence of modifiers before intercepting the TAB key, we only
want to do it for plain TAB or Shift-TAB but not Ctrl-TAB, for example, as
this prevented the user from switching between MDI windows when focus was on
wxDataViewCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-20 22:06:42 +00:00
Artur Wieczorek
72ecca770a Draw cursor image in wxCursorProperty using wxDC::DrawBitmap.
Since monochrome images are supported by wxBitmap (under MSW) there is no longer need to draw cursor image using native Win API.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-20 15:12:00 +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
82a591c138 Fix for PCH-less build after wake up changes.
Include wx/msw/private.h when not using PCH to get wxZeroMemory() (this makes
it unnecessary to include wx/msw/wrapwin.h as it's already included by the
other header).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 19:05:18 +00:00
Vadim Zeitlin
e1b09f3b5d Avoid spurious errors from wxFileType::GetCommand() under Windows XP too.
This problem was already fixed in r77649 for Windows 7 (and hopefully all the
other supported Windows versions), but it turns out that XP returns a
different error when the association is not found in the registry, so the
debug error message was still given under it.

Fix this by checking for both ERROR_NO_ASSOCIATION and ERROR_FILE_NOT_FOUND.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 14:16:22 +00:00
Vadim Zeitlin
cf8700162d Fix handling of spurious wake ups in GetNextMessageTimeout() in wxMSW.
It didn't take long to realize that changes of r78041 did break something
(see #9053), as MsgWaitForMultipleObjects() can return indicating the message
availability even if no message is actually available in the queue. This
notably happens when the application is activated.

Fix this by calling MsgWaitForMultipleObjects() in a loop until we do get a
message. Notice that this only works correctly with the infinite timeout as we
don't update the remaining time to wait after a spurious wake-up, but this
shouldn't be a problem in practice as no such wake-ups should happen anyhow
during a small timeout duration -- and nobody typically uses long ones.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 14:16:18 +00:00
Vadim Zeitlin
a786c5094a Don't leave wxSubwindows::m_ids uninitialized.
Normally it's initialized by calling Create(), but don't crash deleting an
invalid pointer in the dtor if Create() hadn't been called.

See #16630.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:57:31 +00:00
Vadim Zeitlin
50b8f2ee20 Only select the first radio button if there is one in wxMSW wxRadioBox.
Don't call SetSelection(0) if the radio box is empty.

See #16630.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:57:26 +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
6c40531fb7 Make main thread wake up code more efficient and less error-prone in wxMSW.
Use a kernel event object to signal the thread wake up instead of sending
WM_NULL to one of its windows. This is simpler as we don't need to look for
any windows and doesn't suffer from the problem of overflowing the Windows
message queue if we do it too many times as signalling an already signalled
event simply doesn't do anything.

Closes #9053.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:57:08 +00:00
Vadim Zeitlin
cf61bbb168 Use MaskBlt() with the correct ROP when drawing bitmaps with mask.
We need to AND the destination with the mask first and then XOR it with the
bitmap data to achieve the correct results.

Closes #16512.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:57:04 +00:00
Vadim Zeitlin
bb54c6569d Don't replace bitmap transparency with black when converting to icon in wxMSW.
This was a wrong workaround for incorrect drawing of the icons elsewhere and
isn't needed if the destination is first AND-ed with the mask, as it should be.

See #16512.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:57:00 +00:00
Vadim Zeitlin
d9947ba7f7 Fix creating wxBitmap from monochrome icon or cursor in wxMSW.
Handle the "AND" and "XOR" masks inside monochrome icons/cursors correctly
instead of simply copying the monochrome data which didn't work at all.

See #16512.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:56:56 +00:00
Vadim Zeitlin
340a7f8526 Fix memory leak in richtext sample.
Destroy the children of wxRichTextFieldTypeCompositeTest when updating it
instead of just clearing the list and leaking the objects in it.

Closes #14324.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:56:51 +00:00
Vadim Zeitlin
870051c765 Handle taskbar button recreation better in wxMSW.
Store the various parameters in wxTaskBarButton itself and reapply them when
the button is (re)created. This fixes problems with getting the "taskbar
button created" message twice, e.g. because Explorer was restarted, or getting
it too late, as now wxTaskBarButton can be configured both before and after
receiving this message.

Closes #16566.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:56:47 +00:00
Vadim Zeitlin
b8f5856171 Work around unavailability of std::exception_ptr with some g++ versions.
g++ headers only provide std::exception_ptr when __GCC_ATOMIC_INT_LOCK_FREE is
2, indicating that atomic operations on int are available, so check for this
before setting HAS_EXCEPTION_PTR as in some MinGW builds (TDM gcc 4.7) this
symbol is not defined as 2.

Closes #16634.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:56:42 +00:00
Vadim Zeitlin
3b1de0dc8b Use TLW parent for wxMessageDialog in all ports.
This avoids problems with deleting child windows which are parents of
wxMessageDialog before the dialog itself is destroyed and was already done in
wxGTK, but not in wxMSW nor wxOSX. Do it in all ports now by calling
GetParentForModalDialog() from wxMessageDialogBase ctor itself instead of
depending on the port-specific wxMessageDialog to do it.

Closes #16631.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:56:37 +00:00
Paul Cornett
a776eb65d0 Fix ClientToScreen()/ScreenToClient() when used immediately after window creation.
And whenever window does not have an up-to-date GTK size allocation.
Closes #16061


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 00:59:20 +00:00
Artur Wieczorek
53bb48808c Add drawing cursor images for wxCursorProperty under wxGTK.
Closes #16637

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-18 12:00:37 +00:00
Artur Wieczorek
f858486cec Fix deleting pending editor controls if wxPG is destructed from within its own event handler.
If wxPG dtor is invoked from within event handler then deleting its pending editor controls should be delegated to the global idle event handler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-18 09:37:33 +00:00
Artur Wieczorek
c234f5078f Fix deleting editor controls associated with wxPG properties from within event handler.
Editor controls (and their event handlers) deleted from within wxPG event handler shouldn't by deleted in global idle event handler but only in local wxPG event handler because global idle events can be generated also by calling e.g. wxYield when wxPG is not in the real idle state.

Closes #16617

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-16 22:49:01 +00:00
Artur Wieczorek
633b49ef6e Prevent renaming already renamed wxPG property waiting for deferred deletion.
Name of the property to be deleted with delay is changed to the some meaningless name in order to avoid conflict with other active properties.
It is enough to do this only once.

See #16617

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-16 22:33:33 +00:00
Artur Wieczorek
b72eb78c96 Accept only real idle events in wxPropertyGrid::OnIdle()
Fake idle events generated e.g. by calling wxYield from within the event handler should be skipped to avoid problems.

See #16617

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-16 22:27:42 +00:00
Vadim Zeitlin
d24f711f88 Only link webview library with libwebkitgtk in wxGTK, not the core one.
Add EXTRALIBS_WEBVIEW similar to the existing EXTRALIBS_MEDIA and such and set
it in configure instead of adding libwebkitgtk and dependent libraries
directly to GUI_TK_LIBRARY.

This ensure that the core library doesn't have any dependencies on
libwebkitgtk which it doesn't need.

Closes #16624.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-16 13:33:08 +00:00
Julian Smart
cf72b6c111 Don't calculate refresh optimizations if we're not going to use them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-16 10:13:48 +00:00