Commit Graph

61486 Commits

Author SHA1 Message Date
Vadim Zeitlin
12d77bd1dc Don't check for Metrowerks compiler in configure under OS X
This is just a waste of time, this compiler doesn't exist since many years and
has never been used under OS X.
2016-03-21 00:59:04 +01:00
Vadim Zeitlin
bc4798c7df Avoid warnings about incompatible pointers with Xcode 7
Use __kindof NSView instead of id when __kindof is supported to avoid warnings
about casting between incompatible point types.
2016-03-20 19:26:14 +01:00
Vadim Zeitlin
5300caf385 No significant changes, just get rid of hard TABs
Replace TABs with spaces, get rid of trailing whitespace.
2016-03-20 19:18:46 +01:00
Vadim Zeitlin
e4c6385824 Get rid of pre-Leopard (10.5) compatibility code in wxOSX
Just use NSComparisonResult directly, we don't care about anything < 10.7.
2016-03-20 19:17:08 +01:00
Vadim Zeitlin
cd57de43dd Add missing wxOVERRIDE to OS X wxNotificationMessage::AddAction()
Thanks clang for a -Winconsistent-missing-override warning.
2016-03-20 19:06:48 +01:00
Vadim Zeitlin
1d5694429f Only create wxOSX/Cocoa tags in makeosxtags script
There is no need to handle Carbon port any more, so simplify the script and
just append the Cocoa-specific tags to the main tags file instead of creating
another one.
2016-03-20 19:06:01 +01:00
Vadim Zeitlin
f973ebe2d5 Also disable deprecation warnings in Obj-C++ code under OS X
Extend the changes of 2ad61b03a8 to Obj-C++
code, the intention was always to suppress all of them.
2016-03-20 17:02:06 +01:00
Vadim Zeitlin
2392423f39 Fix wrong calls to wxWindow::Refresh() in OS X wxRenderer
Refresh(&rect) was used instead of Refresh(true, &rect) mistakenly, thanks to
clang for warning about always-true-conversion-to-bool here.

Fix this by using less error-prone and more clear RefreshRect().
2016-03-20 16:59:09 +01:00
Vadim Zeitlin
608cee6965 Fix C++11 check when --with-cxx=11 is used
AX_CXX_COMPILE_STDCXX() macro does not define HAVE_CXX11 when C++11 is
required (and not optional, as with --enable-cxx11), so the build was broken
when --with-cxx=11 was used under OS X as -stdlib=libc++ was not used.

Fix this and also leave only a single AX_CXX_COMPILE_STDCXX() check for C++11,
this saves us ~1000 lines in configure.
2016-03-20 16:56:50 +01:00
Andreas Falkenhahn
0777bf6b92 Fix wrong TLW size with horizontal decorations in wxGTK
Compare min/max width with m_width, not m_height, in GTKUpdateDecorSize() for
the logic to work as expected.

Closes #17455.
2016-03-20 15:50:13 +01:00
Vadim Zeitlin
a20183440b Set item being edited earlier in wxDataViewRenderer
Partially undo the changes of e417913f46 and set
m_item in StartEditing() as it's supposed to be already set when
CreateEditorCtrl() is called and setting it in NotifyEditingStarted() was too
late for this.
2016-03-19 00:45:15 +01:00
Vadim Zeitlin
6316045e19 Remove unnecessary wxOSX_USE_COCOA checks in wx/osx/dvrenderers.h
These checks are not needed any more now that Carbon is not supported any
loner.
2016-03-19 00:17:14 +01:00
wanup
c4e892629f Implement wxDataViewChoiceByIndexRenderer for wxOSX
Add missing class implementation.

Closes #17452.
2016-03-19 00:17:13 +01:00
Vadim Zeitlin
9829446755 Refactor wxDataViewEvent constructors
Take care of all the common stuff such as setting the event object and the
model, which is used for all events, in the ctor. Also set both the column
pointer and the column index at once instead of having two separate setters
for them which could result in inconsistent event objects (and did, as
sometimes only one or only the other field was set).

This makes the code shorter (we save 160 lines) and more clear and ensures
that everything is always initialized.

Closes #12649.
2016-03-19 00:16:51 +01:00
Vadim Zeitlin
e2e7d3d391 Fix wxELLIPSIZE_END with wxALIGN_RIGHT in wxMSW wxDataViewCtrl
Using wxELLIPSIZE_END together with wxALIGN_RIGHT resulted in unnecessarily
ellipsizing or truncating the column contents in generic wxDataViewCtrl under
MSW due to the combination of b642747fd2 and
the native API behaviour.

Fix this by not using alignment in RenderText(): it is unnecessary anyhow and
not doing it avoids the problem as a side effect.

Closes #17363.
2016-03-18 22:33:31 +01:00
Vadim Zeitlin
dae0bd5441 Increment the version in the MSW readme automatically too
Update the version in the download link in docs/msw/install.txt in the
inc_release script.
2016-03-18 22:19:22 +01:00
Vadim Zeitlin
c5fad075d3 Replace SourceForge download link with a GitHub one
And remove ftp.wxwidgets.org which is not used any longer.
2016-03-18 22:17:16 +01:00
Vadim Zeitlin
db6e1c5b38 Make wxCOL_WIDTH_AUTOSIZE work dynamically in generic wxDataViewCtrl
Caching the best column widths broke autosizing behaviour if the column title
was updated after setting the width to wxCOL_WIDTH_AUTOSIZE.

Fix this by invaliding the column cached width if its text changes.
2016-03-17 22:34:14 +01:00
Vadim Zeitlin
ce1cc2cea5 Remove hard TABs in wxHTML introduced by recent commit
Reformat the code added in d96a25be12.

See https://github.com/wxWidgets/wxWidgets/pull/244
2016-03-17 22:11:30 +01:00
Vadim Zeitlin
df101cab76 Regenerate wx/msw/setup0.h after merging MinGW changes
The merge db70be1a7c accidentally reverted the
changes of d053a90486, restore them.
2016-03-17 22:04:48 +01:00
Artur Wieczorek
e7a9916878 Fixed calculating widths in wxCairoContext::GetPartialTextExtents (wxMSW).
Widths from the beginning of text to the corresponding character should be calculated instead of widths of individual characters.
2016-03-17 21:06:26 +01:00
Artur Wieczorek
e26e8f38b9 Fixed wxCairoContext ctor (wxMSW).
Variable referencing Cairo surface has to be initialized to NULL because otherwise crash can happen in dtor while attempting to destroy the surface.
2016-03-17 20:52:12 +01:00
Artur Wieczorek
494c2e3a6a Display graphics renderer info in the drawing sample.
Display on the status bar a description (name and version) of currently used graphics renderer.
2016-03-16 21:43:09 +01:00
Artur Wieczorek
3bf30d14fd Implemented GetPartialTextExtents for Cairo context (wxMSW).
This implementation should work fine not only for wxMSW port.
2016-03-16 21:42:37 +01:00
Artur Wieczorek
b8e82accbe Allow creating wxCairoContext from native window (wxMSW).
Implemented new wxCairoContext ctor to allow creating Cairo context in wxCairoRenderer::CreateContextFromNativeWindow.
2016-03-16 21:42:06 +01:00
Artur Wieczorek
1fa4efc47e Implemented measuring context for Cairo renderer (wxMSW). 2016-03-16 21:41:20 +01:00
X-L0rd
d96a25be12 Support backslashes in topics of HTML help files
HTML help file is a Microsoft format and it makes sense to support backslashes
in the file names used in it.

Closes https://github.com/wxWidgets/wxWidgets/pull/244
2016-03-16 02:23:29 +01:00
Vadim Zeitlin
db70be1a7c Merge branch 'stackwalk-mingw'
Support wxStackWalker when using MinGW54 or TDM-GCC.
2016-03-16 02:20:15 +01:00
zhivko
6e5a2b630a Fix crash when updating art provider of a ribbon with scroll buttons
Don't leave the scroll buttons with the old, possibly soon to be deleted, art
provider pointer.

Closes #17441.
2016-03-15 20:22:30 +01:00
Vadim Zeitlin
e405bf1607 Initialize CONTEXT ourselves in wxMSW wxStackWalker::Walk()
As we do it for MinGW now, do it also for MSVC in a similar way: this is more
straightforward and less annoying than raising an exception (which can be
caught by a debugger and, at least, is logged by it) and ensures we use
similar code for MinGW and MSVC which should hopefully minimizing the risk of
breaking one or the other without noticing in the future.

Normally there should be no changes in behaviour.
2016-03-15 20:11:12 +01:00
Vadim Zeitlin
ccac9d0557 Enable wxStackWalker in MinGW64 builds
This class can be used even without SEH, provided debug help API is available,
so just make wxUSE_STACKWALKER dependent on wxUSE_DBGHELP instead of
unconditionally disabling it if SEH support is not available.
2016-03-15 20:11:10 +01:00
Vadim Zeitlin
07dcfc52bf Use depth argument in wxMSW wxStackWalker::Walk()
There doesn't seem to be any reason to not pass it to WalkFrom(), it was
probably just an oversight.
2016-03-15 20:11:09 +01:00
Vadim Zeitlin
423b631dff Use 0 instead of NULL for a non-pointer SymEnumSymbols() argument
The base DLL address passed to this function is not a pointer, so don't use
NULL here to avoid warnings from gcc.
2016-03-15 20:11:08 +01:00
Vadim Zeitlin
841af56084 Allow using debug help API with non-MSVC compilers
MinGW64 and TDM-GCC come with imagehlp.h and can compile the code using debug
help API too, so enable wxUSE_DBGHELP when using these compilers by default
and also allow enabling it via a configure option.
2016-03-15 20:11:07 +01:00
Vadim Zeitlin
f62d6bf6fd Don't check MSW-specific configure options unless targeting MSW
This doesn't really change much as these options are not used anyhow, but
seems tidier.
2016-03-15 20:11:06 +01:00
Vadim Zeitlin
15c1b97786 Explicitly include wx/dynlib.h from src/msw/dlmsw.cpp
Don't rely on wx/dynlib.h being included implicitly via wx/msw/debughlp.h.
2016-03-15 20:11:05 +01:00
Artur Wieczorek
21d8fd8677 Use Boolean value directly instead of executing conditional statement. 2016-03-14 21:05:39 +01:00
Artur Wieczorek
07274d7925 Allow creating wxGraphicsContext from memory DC with Cairo renderer (wxMSW).
Not only paint DC but also memory DC can be used as a source to create wxGraphicsContext with Cairo renderer.
2016-03-14 21:03:31 +01:00
Gilbert Pelletier
46df3a1794 Allow creating wxGraphicsContext from cairo_t object (wxMSW).
Input void* parameter of wxCairoRenderer::CreateContextFromNativeContext can represent either DC handle or pointer to cairo_t object. It can be checked if it is a real HDC or not and proper wxCairoContext ctor can be invoked.

Closes #16991.
2016-03-14 21:03:11 +01:00
ousnius
c3a2994931 Add support for wxSL_MIN_MAX_LABELS and wxSL_VALUE_LABEL to XRC
Recognize these flags in wxSlider XRC handler.

Closes #16949.

Closes https://github.com/wxWidgets/wxWidgets/pull/253
2016-03-14 18:50:13 +01:00
Vadim Zeitlin
8979566dd2 Make wx/stackwalk.h self-sufficient
Don't rely on wx/string.h being already included, but include it explicitly
ourselves to fix compilation error when wx/stackwalk.h is the first wx header
to be included.
2016-03-14 01:15:43 +01:00
Vadim Zeitlin
7907711e82 Work around assert on wxDatePickerCtrl creation due to a WINE bug
Don't use invalid SYSTEMTIME returned by DateTime_GetRange() under WINE which
always returns GDTR_MIN, even if the min value is not actually valid, see
https://bugs.winehq.org/show_bug.cgi?id=40301

This avoids an assert which otherwise happened whenever wxDatePickerCtrl was
created.
2016-03-14 01:09:48 +01:00
Vadim Zeitlin
a9be974d5b Avoid unnecessarily refreshing last column in generic wxDataViewCtrl
UpdateColumnSizes() was called whenever the control was modified in any way
since 4156e1a5c9 and it refreshed the entire
last column even if absolutely nothing changed.

Don't do this unless the last column width has really changed.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
d613fb75f6 Don't update if column width didn't change in generic wxDataViewCtrl
Avoid calling UpdateDisplay() unnecessarily if the column width didn't really
change. This doesn't result in anything really bad happening right now, but it
could easily result in an infinite stream of updates if the code were only
slightly different and it just seems useless to do it.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
34b0e534f8 Make wxDataViewCtrl::IsMultiColumnSortAllowed() exist in all ports
Contrary to the documentation, this method only existed in the generic
control, add it to the base class now so that the code using it could compile
when using the native ports too.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
062444ee50 Make generic wxDataViewCtrl EnsureVisible() overload non-virtual
There doesn't seem to be any reason for this method to be virtual other than
preventing "virtual function hiding" warnings from gcc, so just rename it to
have a different name than the virtual EnsureVisible() inherited from the base
class instead.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
b70109ee7a Don't make some generic wxDataViewCtrl unnecessarily virtual
These methods are not supposed to be overridden and don't override any base
class methods neither.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
a3fa628669 No changes, just add wxOVERRIDE to wx/generic/dataview.h
Mark the overridden virtual functions as being overridden.

Also reformat some methods to put them on several lines to prevent the lines
from becoming way too long.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
e7c8349d9b Avoid MSVC 14 warning about variable hiding in dataview sample
The warning is harmless but it was indeed confusing to call "parent" both a
local variable and a function parameter, so don't do it.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
c7a3785a5c Avoid mixing code and declarations in C expat code
Some compilers, notably MSVC, don't support C99 and C89 doesn't allow this.

Fixes MSVS compilation after 7e22fb4f64.
2016-03-14 00:12:07 +01:00