Commit Graph

59409 Commits

Author SHA1 Message Date
Václav Slavík
a0fe90c644 Fix wxStaticText::Disable() to respect text color on OS X
wxStaticText emulates disabled state on OS X by changing text color to
light grey. When re-enabling the control, though, it always set the
color to the standard text color, which broke static texts with a custom
color.

Fix this by keeping track of the original color and restoring it back
when setEnabled:YES is called.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 06:57:50 +00:00
Paul Cornett
c3596d4591 fix infinite sizing loop with GTK3 when using a non-default target window, closes #16668
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 04:13:18 +00:00
Artur Wieczorek
b2588d907e Remove unused wxPG member variable.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-08 18:17:24 +00:00
Artur Wieczorek
774a58ff20 Use Boolean variable to store Boolean values.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-08 18:12:53 +00:00
Julian Smart
46d4a7d01c Don't take right indent into account twice when aligning lines
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 17:32:07 +00:00
Julian Smart
702e83210c Fix a rounding error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 17:13:12 +00:00
Jouk Jansen
df5b5baab3 Implement wxNativeFontInfo::GetStrikethrough() for wxX11 without pango
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 15:14:19 +00:00
Vadim Zeitlin
44bb92ecd5 Use wxTB_DEFAULT_STYLE as default value for wxToolBar style.
No real changes, but this is more consistent with the other controls.

It also highlights the ports which use non-default style, e.g. wxQt where
wxNO_BORDER should probably not be used as part of default toolbar style but
rather added in the ctor implementation.

Closes #16667.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 14:59:33 +00:00
Vadim Zeitlin
50354a2540 Remove wxTB_FLAT from wxTB_DEFAULT_STYLE.
The actual default styles for the toolbars don't include wxTB_FLAT anywhere,
so don't include it in the (currently almost unused) wxTB_DEFAULT_STYLE
neither.

See #16667.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 14:59:27 +00:00
Jouk Jansen
fe443d5392 Fix for compilation of wxX11 without UTF
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 13:22:00 +00:00
Jouk Jansen
04458a61f8 Update compile support for wxX11 on OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 13:17:24 +00:00
Jouk Jansen
47ac6fbd59 Fix compilation for wxGTK1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 13:08:48 +00:00
Jouk Jansen
7d63c9560f Update setup.h for OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-05 09:33:05 +00:00
Artur Wieczorek
ed186d3ad8 In 3.0 compatibility mode member variable holding pending delete editor objects is emulated by hash map item.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-04 22:56:12 +00:00
Artur Wieczorek
d6e23dd99b Do not mark selected wxPG property as 'being deleted'.
Only unselected wxPG property can be marked as 'being deleted'.
If this is done for selected wxGP property then in some circumstances it cannot be unselected and hence cannot be safely deleted.

See #16617.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-04 19:23:01 +00:00
Václav Slavík
642528bf5e Fix simulated toggle in OS X wxToolBar wiht HiDPI bitmaps
Use scaled size and scale factor when creating wxMemoryDC so that the
modified output bitmap has same physical dimensions as the source one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-04 16:21:00 +00:00
Václav Slavík
06ddf44a27 Fix wxToolBarBase::AdjustToolBitmapSize() for HiDPI on OS X
wxOSX's wxToolBar code uses toolbar size computed by
AdjustToolBitmapSize() to determine which of the builtin toolbar sizes
to use. Because AdjustToolBitmapSize() returned 2x the "logical" size,
it would always pick NSToolbarSizeModeRegular regardless of icon size,
resulting in differently-sized toolbar on HiDPI and low-DPI screens.
Use scaled size instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-02 16:28:12 +00:00
Vadim Zeitlin
7e96398e63 Restore code for closing inherited file descriptors under non-OS X.
The code for doing this was accidentally disabled in r74957, which intended to
disable it for Darwin, but ended up disabling it for everything but Darwin.

Reenable it for all platforms now, clearly it didn't hurt to have it enabled
under Darwin, and we do need to do it, e.g. see #12636.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-01 14:00:04 +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
03e64f3c20 No changes, just move wxComboBox::Clear() out of line in wxGTK.
Make this function non-inline to facilitate further modifications.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-01 13:56:26 +00:00
Artur Wieczorek
8a971c12ad Fix deleting wxPG properties with sub-properties.
If property contains sub-properties they should be deselected prior deleting the property.

See #16617.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-31 16:04:44 +00:00
Vadim Zeitlin
b1989ee7fe Make Clear() virtual in wxItemContainer base class.
This ensures that overridden wxComboBox::Clear() is called even when it's
invoked via a pointer or a reference to wxItemContainer (and not just one
to wxComboBox itself or its other base wxTextEntry).

Closes #16654.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-31 13:19:46 +00:00
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