Commit Graph

60422 Commits

Author SHA1 Message Date
Jouk
6fbc2bd0b7 Add collheaderctrlg.cpp to OpenVMS makefile 2015-09-22 10:40:03 +02:00
Vadim Zeitlin
47e2fe4e55 PCH-less build fix for wxGenericCollapsibleHeaderCtrl
Add missing wx/dcclient.h inclusion.
2015-09-22 01:29:21 +02:00
VZ
744c3e773e Merge pull request #98 from TcT2k/osx_collpane_enhancement
Improve wxCollapsiblePane appearance on OS X
2015-09-21 16:26:47 +02:00
Tobias Taschner
90e939522f Implement wxRendererNative::DrawCollapseButton() for OSX.
The button can be painted using theme services.
2015-09-21 16:11:16 +02:00
Tobias Taschner
3c44dd85a0 Only draw focus rect on MSW in wxCollapsibleHeaderCtrl.
It is a native look on MSW but looks out of place on other plalforms.
2015-09-21 16:10:28 +02:00
Tobias Taschner
b012e559bc Add missing collheaderctrlg.cpp to cocoa xcode project. 2015-09-21 15:30:34 +02:00
Vadim Zeitlin
2f1e8c5402 Initialize wxFontRefData::m_sizeUsingPixels in wxMSW
Don't leave the variable uninitialized, even though it's not totally obvious
which value should it have for wxFontRefData objects created from native
fonts, using "true" seems more appropriate and is definitely better than not
initializing the field at all.
2015-09-20 18:29:06 +02:00
Vadim Zeitlin
3545e9d778 Disable OLE support if wxDataObject is disabled in wxMSW
wxDataObject is a basic requirement for too many OLE-related things.

See #17159.
2015-09-20 13:52:20 +02:00
Andreas Falkenhahn
e37842419e Add dependency of generic wxDatePickerCtrl on wxComboCtrl
The generic implementation requires wxComboCtrl, so pull it in if
wxDatePickerCtrl is enabled.

Explicitly testing for the platform here is ugly, as it duplicates the checks
in wx/datectrl.h and will get out of date when/if they're changed there, but
there just doesn't seem to be any other way.

See #17159.
2015-09-20 13:51:04 +02:00
Andreas Falkenhahn
bf41f447bf Check for dependency of wxAnimationCtrl on wxStreams
Disable the compilation of wxAnimationCtrl if stream support was disabled,
it's impossible to load animations without it.

See #17159.
2015-09-20 13:50:01 +02:00
Andreas Falkenhahn
02c8973a57 Refresh wxListCtrl with wxLC_HRULES in SetColumnWidth() in wxMSW
This is necessary to avoid corrupted rules display after changing the column
width.

See #17158.
2015-09-20 13:35:58 +02:00
Vadim Zeitlin
d72006f5b8 Don't force the use of DEBUG on application in autoconf macros
If WX_STANDARD_OPTIONS() is not used, we shouldn't add any debugging nor
optimization options to C{,XX}FLAGS as the application presumably handles it
on its own, it was completely unexpected to see -O2 appear in CXXFLAGS.

Fix this by only doing anything if DEBUG variable is defined. Even this is not
optimal as it's such a common name that it could clash with an unrelated
variable in the application configure script, but doing anything else risks
breaking existing scripts relying on it being named like this.
2015-09-20 02:23:06 +02:00
Vadim Zeitlin
9589eaa113 Document "expmode" argument of exported array macros
At least mention the previously missing "expmode" argument in the
documentation.

Closes #17156.
2015-09-19 19:56:41 +02:00
Tobias Taschner
870a545345 Fix recently introduced crash in MSW wxTaskbarButton::New()
Fixed regression introduced in f7458dd03f ("Use
wxComPtr<> instead of raw pointers in wxTaskbarButton code", see #16557).

Closes https://github.com/wxWidgets/wxWidgets/pull/96
2015-09-19 19:55:03 +02:00
VZ
7e6836e9f5 Merge pull request #95 from TcT2k/collpane_enhancement
Improve wxCollapsiblePane appearance

Provide native look under MSW and improve the generic appearance (which is now also used under OS X) as well.
2015-09-19 19:49:15 +02:00
Tobias Taschner
d35e102007 Remove private wxDisclosureTriangle control.
Remove the private and undocumented control and it's usage in wxGenericCollapsiblePane. The class used a low resolution bitmap which looks bad on high resolution displays. The generic implementation using wxRendererNative::DrawCollapseButton() is better fit even on OS X.
2015-09-19 17:30:33 +02:00
Tobias Taschner
df24d925df Add wxCollapsibleHeaderCtrl widget.
This simple class has a collapsed state which is indicated by a small button and a label. It is now used in the generic implementation of wxCollapsiblePane.

It could be used in more complex layouts than wxCollapsiblePane and is therefore available and documented to the user.
2015-09-19 17:30:32 +02:00
Vadim Zeitlin
cc0a53dc96 Don't use -fno-strict-aliasing for optimized build
There doesn't seem to be any need for it, the library compiles fine without it
and the few warnings generated with -Wstrict-aliasing=2 are harmless (i.e. the
strict aliasing rule is not really broken).
2015-09-19 03:28:50 +02:00
Vadim Zeitlin
e563066c76 Avoid gcc -Wstrict-alias=2 warnings in wxAny
While wxWidgets itself is compiled with -fno-strict-aliasing, the user code
including wx headers can be compiled without it and, worse, even with
-Wstrict-aliasing=2 which would give tons of warnings (two for each
instantiation of the template class) of possibly breaking strict aliasing rule.

Fix this by using a union to cast between two pointers of different types
instead of using a reinterpret cast.
2015-09-19 03:25:57 +02:00
Tobias Taschner
ef5ff89008 Add wxRendererNative::DrawCollapseButton() for use in collapsible pane like controls.
Add a new method that should be used for controls like wxCollapsiblePane.

It is implemented natively for wxMSW (Windows Vista+) and provides a generic fallback for other ports and WinXP.
2015-09-19 00:06:42 +02:00
Tobias Taschner
2e424fcf38 Add wxCONTROL_SPECIAL menu toggle to renderer sample.
wxCONTROL_SPECIAL is currently only used by DrawTreeItemButton().
2015-09-18 21:29:15 +02:00
Vadim Zeitlin
e5fe3977f4 Merge branch 'system-theme'
Improvements for list/tree control appearance under MSW, see #16414.
2015-09-17 14:53:12 +02:00
Tobias Taschner
2fff3cd29f Add wxSystemThemedControl and use it in wxMSW
wxSystemThemedControl allows to use the "system theme" (i.e. the theme used by
the system applications such as file manager and which can, surprisingly, be
different from the default one). Currently it is only implemented for wxMSW
and does nothing under the other platforms.

Use wxSystemThemedControl for wxDataViewCtrl, wxListCtrl and, optionally, if
wxTR_TWIST_BUTTONS style is specified, wxTreeCtrl to give them more native
appearance under MSW.

Closes #16414.
2015-09-17 14:49:13 +02:00
Tobias Taschner
b7a89f8746 Add wxRendererNative::DrawItemText() for list-like controls
Add a new method that should be used for drawing the elements of list-like
controls (i.e. wx{List,Tree,DataView}Ctrl and similar).

Implement it for wxMSW natively and provide a straightforward generic fallback
for the other ports.

See #16414.
2015-09-17 14:49:13 +02:00
Tobias Taschner
ba4bfc5414 Implement wxRenderer::DrawItemSelectionRect() better for wxMSW
Use "LISTVIEW" theme element for drawing the selection rectangle for more
native appearance.

See #16414.
2015-09-17 14:49:10 +02:00
Tobias Taschner
f7458dd03f Use wxCOMPtr<> instead of raw pointers in wxTaskBarButton code
Simplify the code and ensure its safety by using smart pointers instead of raw
Release() calls.

Closes #16557.
2015-09-17 13:45:39 +02:00
Vadim Zeitlin
07380ba0b5 Copy fonts more faithfully and efficiently in wxGTK
Use pango_font_description_copy() to copy fonts instead of
pango_font_description_to_string() and pango_font_description_from_string()
via wxNativeFontInfo::{To,From}String() respectively.

This is not only more efficient but also preserves the original family whereas
wxNativeFontInfo::FromString() helpfully replaces any fonts it doesn't know
about with the normal font name. That behaviour is probably wrong on its own,
but for now at least avoid silently changing fonts when copying them.
2015-09-16 03:39:07 +02:00
Rick Nelson
7e8c2cc4a5 Fix handling of relative URLs starting with "/" in wxHTML
Don't interpret them relatively to the current path, so that an URL like
"/pictures/foo.png" in the file "/webpages/bar.html" is resolved correctly and
not as "/webpages/pictures/foo.png" as it was previously.

See #17148.
2015-09-16 00:26:33 +02:00
Vadim Zeitlin
7851535d02 Document wxAppConsole::Yield() and fix wxYield() documentation
Don't say that wxYield() is deprecated because it isn't.

Do document wxAppConsole::Yield() if only to redirect to
wxEvtLoopBase::Yield().
2015-09-15 21:09:07 +02:00
Vadim Zeitlin
f137753f28 Don't log drag events as well as move ones in the text sample
Dragging the mouse (even accidentally by a pixel or two) resulted in a
confusing "Unknown event" line in the log, so don't log these messages neither
just as we already don't log the mouse motion events.
2015-09-15 01:30:38 +02:00
Vadim Zeitlin
7f856bd633 Add a test for wxEVT_CONTEXT_MENU to the text sample.
Log a message if this message is received, which shows that it currently isn't
for the control with wxTE_RICH style under MSW.
2015-09-15 01:29:29 +02:00
Tim Kosse
3b047b58ce Escape filenames in wxFileDataObject::GetDataSize/GetDataHere
On wxGTK, wxFileDataObject::SetData calls g_filename_from_uri which
percent-decodes URIs. No corresponding percent-encoding was done in
wxFileDataObject::GetDataSize/GetDataHere. Use g_filename_to_uri instead in so
that filenames are properly escaped.

This commit also fixes the data being truncated if it contains non-ASCII
characters on wide-character builds, see the memcpy arguments in the original
code.
2015-09-14 11:42:38 +02:00
Artur Wieczorek
865c8565af Fixed setting colours of wxSlider and wxRadioBox in wxMSW.
Sibling windows (like labels and radio buttons) need to be explicitly
refreshed when foreground or background colour is changed. This is implemented
by invoking newly implemented method wxSubwindows::Refresh every time the
colour of the control is changed.

Note: Setting foreground colour of wxRadioBox still doesn't work correctly
when themes are enabled.

Closes #17142.
2015-09-12 03:01:30 +02:00
Vadim Zeitlin
7f08dbbf78 Another work around for VC8 compiler bug after ZIP64 changes
Apply the same fix as in ba851346b5 in another
place where the same bug occurs.
2015-09-11 14:59:32 +02:00
Paul Cornett
5905857dba Avoid bug in VS 2015 code generation
When using Whole Program Optimization, pItem->OnDrawItem() incorrectly calls the
base class wxOwnerDrawn::OnDrawItem() instead of the appropriate override, for
example wxCheckListBoxItem::OnDrawItem(). The problem can be avoided by not
using an unnecessary cast to wxListBoxItem*.
2015-09-09 22:38:42 -07:00
Vadim Zeitlin
ba851346b5 Try to work around VC8 compiler bug after ZIP64 changes
Add an explicit cast to ensure that both branches of the ternary operator have
the same type.
2015-09-09 03:39:17 +02:00
Paul Cornett
87202a9b02 Improve link color getters, and suppress deprecation warnings
Use default colors when link style is not set
2015-09-07 20:20:12 -07:00
Paul Cornett
8bceeba143 Show widget at GTK+ level regardless of "child visibility" status, see #17134, #4343 2015-09-07 09:43:18 -07:00
Vadim Zeitlin
2879ec5422 Fix wxiOS build after Enable{Max,Min}imizeButton() addition
Define stubs for pure virtual base class methods.

See #17133.
2015-09-07 12:47:38 +02:00
Paul Cornett
67fadfbbf1 Avoid GCC warning: base class should be explicitly initialized in the copy constructor 2015-09-06 21:27:37 -07:00
Paul Cornett
02f22eff71 avoid GCC warning: "__WXMSW__" is not defined 2015-09-06 21:24:32 -07:00
Paul Cornett
25b0ee43b8 add wx prefix in a couple places missed in 8f8d58d1 2015-09-06 21:07:06 -07:00
Paul Cornett
845444f35f Fix null pointer check from 198d7c6c (r40919)
operator '?:' has lower precedence than '+'
2015-09-06 20:56:59 -07:00
Paul Cornett
27a8d28029 more use of wxOVERRIDE 2015-09-06 17:20:42 -07:00
Vadim Zeitlin
4177593aef Fix vertical wheel scrolling direction in wxGenericCalendarCtrl
Make scrolling upwards (positive delta) go to the past (i.e. decrease the
date) for consistency with the native calendar controls.

See 50daf1feab (commitcomment-13087042)
2015-09-06 19:40:03 +02:00
Lauri Nurmi
50daf1feab Add mouse wheel handlign to wxGenericCalendarCtrl
Mimics the scrolling behaviour of native MSW and GTK calendars by allowing to
increment/decrement the month by scrolling anywhere on the generic calendar.

Additionally, use horizontal scrolling to increment/decrement the year.

Closes https://github.com/wxWidgets/wxWidgets/pull/88
2015-09-06 14:39:59 +02:00
Vadim Zeitlin
4d911fb059 Merge branch 'os_version'
Make strings returned by wxGetOsDescription() more readable for the users.
2015-09-06 14:24:57 +02:00
Vadim Zeitlin
8b2dc19dbb Don't translate OS X codenames in wxGetOsDescription()
OS X itself doesn't seem to do it.

See https://github.com/wxWidgets/wxWidgets/pull/76#issuecomment-138067426
2015-09-06 14:24:17 +02:00
John Roberts
fe9a5f47f4 Add wxTopLevelWindow::Enable{Maximize,Minimize}Button()
Allow to disable maximize and minimize buttons dynamically just as we already
allow to disable the "Close" button using EnableCloseButton().

Currently implemented for MSW and OSX only.

Closes #17133.
2015-09-06 14:17:46 +02:00
John Roberts
6055d8d0a5 Implement wxTopLevelWindow::EnableCloseButton() for wxOSX
Just forward this wx method to Cocoa standardWindowButton:NSWindowCloseButton.

See #17133
2015-09-06 14:16:39 +02:00