Commit Graph

16950 Commits

Author SHA1 Message Date
Kevin B. McCarty
a922d576ec Use wxINT64_MIN for the value of invalid wxDateTime
Use 0xffffffffffffffff instead of the strange 0xffffffff00000000 that we used
before, for some reason.
2016-04-12 20:54:27 +02:00
Kevin B. McCarty
56aa94c61e Allow using wxDateTime::operator==() and !=() with invalid objects
Unlike the other operators, we comparing for equality has a well-defined
semantics even for invalid objects, so there doesn't seem any reason to not
allow it.
2016-04-12 20:50:09 +02:00
Kevin B. McCarty
fda904ea77 Implement wxDateTime::Is{EqualTo,{Earlier,Later}Than}() in terms of operators
Avoid duplicating the same code, even if it's trivial, in both places.

Notice that these functions are implemented in terms of operators and not vice
versa because we have no functions corresponding to operator<=() or
operator>=().
2016-04-12 20:45:15 +02:00
Kevin B. McCarty
d47efc42ff Remove redundant IsValid() checks from wxDateTime comparison methods
They're not necessary as GetValue() asserts when passed an invalid object
anyhow, there is no need to check for this twice.
2016-04-12 20:43:14 +02:00
orbitcowboy
e3f1423632 Fix typos in comments in C++ code
No real changes.

Closes https://github.com/wxWidgets/wxWidgets/pull/268
2016-04-12 17:15:23 +02:00
Vadim Zeitlin
bac5975b02 Merge branch 'rtl-fixes'
Fix appearance of wxNotebook children background when using RTL locales.
2016-04-10 20:51:33 +02:00
Vadim Zeitlin
eed5700a07 Refactor: remove wxNotebook::DoDrawBackground() in wxMSW
The code in QueryBgBitmap() and MSWPrintChild() is sufficiently different that
we can't easily reuse the drawing calls between them, so don't tie ourselves
in knots trying to do it, just duplicating these 2 calls in the 2 functions is
not that bad and the code is more clear.

No real changes.
2016-04-10 20:49:36 +02:00
Vadim Zeitlin
5368c72d37 Fix wxMSW build with wxUSE_DEFERRED_SIZING==0
Don't define BeginRepositioningChildren() and EndRepositioningChildren() at
all in this case instead of defining them as "do nothing" functions because
BeginRepositioningChildren() still needs to return a bool, so the old code
didn't compile and we would need to add another "#else" to fix this -- instead
make it simpler by just not compiling at all in this case.
2016-04-08 22:22:22 +02:00
New Pagodi
0a3057b83c Add GetDirect{Function,Pointer}() methods to wxStyledTextCtrl
These methods can be useful when working with dynamic lexers.

Closes #17481.
2016-04-03 15:50:21 +02:00
New Pagodi
a6e249ea1a Add support for loading external lexers to wxStyledTextCtrl
Implement Scintilla DynamicLibraryImpl and generate LoadLexerLibrary() and
GetLexerLanguage().

Closes #17480.
2016-04-03 15:47:48 +02:00
Vadim Zeitlin
8baaa652ef Merge branch 'dvc': miscellaneous wxDataViewCtrl-related fixes 2016-04-02 01:09:06 +02:00
Vadim Zeitlin
4e4286f0e2 Merge branch 'utf8-stdstring-interop' of https://github.com/minoki/wxWidgets
Make it easier to interoperate with the code using UTF-8-encoded std::strings.

Closes #17461.
2016-03-28 21:44:54 +02:00
Iwbnwif Yiw
00526cefb6 Return full virtual screen size from wxScreenDC::GetSize() in wxMSW
Return the size of the entire virtual screen, possibly composed from multiple
monitors, rather than just the size of the primary monitor.

This makes this method consistent with wxScreenDC actually representing the
entire virtual screen and not just the primary monitor and also with wxGTK.

Closes #13279.
2016-03-28 21:37:55 +02:00
ARATA Mizuki
70ddab243e Add wxMBConv parameter to wxString::ToStdString
See #17461.
2016-03-25 16:23:47 +09:00
ARATA Mizuki
81e6638585 Add overloads of wxString::FromUTF8/FromUTF8Unchecked taking a std::string
See #17461.
2016-03-25 16:23:47 +09:00
Václav Slavík
e37f1a84ce Disable warnings in the standard shlobj.h header with MSVC14
There is nothing we can do about these (harmless) warnings, so just
disable them. Also make sure that the header is included via
wx/msw/wrapshl.h  everywhere.
2016-03-23 14:46:59 +01:00
Vadim Zeitlin
716dace3d6 Make wxDataViewCtrl::Expand() expand ancestors in native ports too
Expand() called ExpandAncestors() in the generic wxDataViewCtrl implementation
but not in the native ones, resulting in observable difference in the
behaviour: for example, the wxDataViewTreeCtrl in the dataview sample appeared
initially expanded under MSW, using the generic version, but collapsed under
GTK and OSX.

Harmonize this among all ports. This also has a nice side effect of making
Expand() less horribly inefficient as it is not recursively called by
ExpandAncestors() which it itself used to call: now ExpandAncestors() only
calls DoExpand() which is a simple function that only expands the item passed
to it and does nothing else.

Closes #14803.
2016-03-22 21:22:36 +01:00
Vadim Zeitlin
aa9e7d3326 Don't make wxDataViewCtrl::ExpandAncestors() virtual
This method has a common implementation and is not supposed to be overridden.
2016-03-22 21:14:10 +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
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
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
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
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
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
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
c03ae2a8f8 Propagate changes to generated wx/msw/setup0.h back to setup_inc.h
Changes of d053a90486 only updated the generated
wx/msw/setup0.h file but not the file wx/msw/setup_inc.h from which it is
generated and so would have been lost after the next modification to the
latter.

Modify the latter one too to ensure that the changes stick.

See https://github.com/wxWidgets/wxWidgets/pull/238
2016-03-13 15:37:08 +01:00
Vadim Zeitlin
81570ae070 Deprecate wxGRIDTABLE_REQUEST_VIEW_{GET,SEND}_VALUES
These grid table requests seem to have been never used and were not doing much
in wxGrid neither, moreover they were never documented, so just stop
supporting them.
2016-03-12 19:01:44 +01:00
Vadim Zeitlin
ef6d42e865 Merge branch 'xrc-aui'
Add XRC handlers for wxAuiManager and wxAuiPaneInfo.

Closes #13520.
2016-03-12 18:21:24 +01:00
Kolya Kosenko
da195023c1 Fix wxGTK/MSW build in wxDIB.
Don't define wxMSW-specific wxDIB::CreatePalette() method when not building
wxMSW.

Closes #17248.
2016-03-09 15:42:51 +01:00
Andrea Zanellato
cf5fa7d5f1 Add support for wxAuiManager and wxAuiPaneInfo to XRC
Add XRC handler for wxAuiManager and include the existing wxAuiNotebook
handler into it (but notice that wxAuiToolBar handler added by a later #15686
in f269f868d7 remains separate).

Also update the AUI dialog in the sample and stop hardcoding its size in
pixels.

See #13520.
2016-03-09 01:11:16 +01:00
Vadim Zeitlin
6f80021950 Fix wxGTK wxHyperlinkCtrl compilation problem with g++ 5.2
Make wxHyperlinkCtrl ctors non-inline to work around an error about incomplete
wxHyperlinkCtrlColData in the inline ctor body with this compiler (but not
with g++ 4.9 nor 5.3, somehow).

Closes #17089.
2016-03-07 19:41:58 +01:00
Vadim Zeitlin
6ac52b3bab Merge setting link colours for wxGTK3 wxHyperlinkCtrl
Closes https://github.com/wxWidgets/wxWidgets/pull/249
2016-03-07 16:17:11 +01:00
Vadim Zeitlin
c32fad09b8 Don't use __has_include() to test for C++11 headers
This is unnecessary as we know that we have them in C++11 mode and we can't
compile them in non-C++11 mode even if they exist.

Not doing it simplifies the code and works around a bug in clang 3.2.

Closes https://github.com/wxWidgets/wxWidgets/pull/247
2016-03-07 16:16:45 +01:00
Hans Mackowiak
d30673e507 Implement setting link colours in wxHyperlinkCtrl for GTK+3
Use GtkCssProvider to customize the colours used.

Closes #17089.
2016-03-07 15:00:07 +01:00
Hans Mackowiak
1e70c05759 Add wxWindow::ApplyCssStyle() helper to wxGTK
This is useful for styling GTK+ 3 widgets.

See #17089.
2016-03-07 13:22:57 +01:00
Vadim Zeitlin
b4d6348c6b Don't use a dummy menu with wxHtmlHelpFrame under OS X
Contrary to the comment in wxHtmlHelpFrame::Create(), this doesn't seem to be
necessary and can be actually problematic.

Never adding this menu obviates the need for the wxHF_MENU style from #15538.

Closes #15538.
2016-03-06 22:12:29 +01:00
Artur Wieczorek
31ab9d8f3f Make pointer to wxWindow a const argument.
State of referenced window is not going to be changed and let caller know about it.
2016-03-06 21:26:14 +01:00
Artur Wieczorek
912eb6fef9 Use enum instead of macros to represent wxPropertyGrid internal flags. 2016-03-06 21:19:07 +01:00
Vadim Zeitlin
f4fd4b8bde Merge with master to get bakefile changes 2016-03-05 17:46:36 +01:00
Troels Knakkergaard
c9a3a23e5a Add wxHtmlPrintout::SetMargins(wxPageSetupDialogData) overload
Make it simpler to set the user-configured margins.

Closes #16872.
2016-03-05 03:33:08 +01:00
Troels Knakkergaard
cda7209101 Add wxFileType::GetExpandedCommand()
This new method allows to get the command expanded with the given file name
for commands other than "Open" and "Print".

Closes #17367.
2016-03-05 03:09:59 +01:00
Tobias Taschner
c17202c696 Remove extra handling of wxAppTraits::GetStandardPaths() on OS X.
Since the removal of carbon in 5ba67c67e4 there is no longer any special handling required.
2016-03-04 15:34:51 +01:00
Tobias Taschner
1125dd8c12 Remove remaining unused carbon implementation code.
Remove code and files which should have already been removed in 5ba67c67e4.
2016-03-04 15:34:51 +01:00