Commit Graph

16962 Commits

Author SHA1 Message Date
Maarten Bent
82ed51d167 Add virtual dtor to wxMSW CustomDraw class
This class is used polymorphically and needs a virtual dtor.

See https://github.com/wxWidgets/wxWidgets/pull/276
2016-04-24 18:02:58 +02:00
Vadim Zeitlin
70b64b8c53 Merge branch 'rename-listctrl-checkbox-methods' of https://github.com/discnl/wxWidgets
Use consistent case for wxListCtrl::{Has,Enable}CheckBoxes() methods.

Closes https://github.com/wxWidgets/wxWidgets/pull/275
2016-04-23 18:53:41 +02:00
Vadim Zeitlin
bed710d9a7 Add wxDataViewCtrl::GenericGetHeader() accessor
And show how to use it to increase the header size in the sample.
2016-04-22 01:12:21 +02:00
Vadim Zeitlin
bed7d9fe74 Add wxDataViewCtrl::SetHeaderAttr() too
This is currently only implemented in the generic version but could be
implemented at least for GTK+ native one as well in the future.
2016-04-22 00:58:38 +02:00
Dimitri Schoolwerth
c78470b647 Rename wxListMainWindow::IsInsideCheckBox to IsInsideCheckbox 2016-04-21 17:47:10 +00:00
Dimitri Schoolwerth
602111f2b3 Rename wxListCtrl::HasCheckboxes() and EnableCheckboxes()
Rename them to HasCheckBoxes and EnableCheckBoxes for consistency with
wxCheckBox naming.

See also PR https://github.com/wxWidgets/wxWidgets/pull/153
2016-04-21 15:25:10 +00:00
Vadim Zeitlin
5388c7a72e Add wxListCtrl::SetHeaderAttr()
This method can be used to change the list view header appearance.

Add the method declaration, documentation, show it in the sample and implement
it for wxMSW (only, for now).
2016-04-17 18:26:13 +02:00
Vadim Zeitlin
dfb993274c Add equality operators to wxItemAttr
It can be necessary to compare two item attributes for equality, e.g. to check
if the attributes have changed, so provide a straightforward implementation of
equality and inequality operator for it.
2016-04-17 17:36:20 +02:00
Vadim Zeitlin
e84053ed64 Add wxItemAttr::HasColours() and IsDefault() accessors
They are trivial but useful to have as testing for HasBackgroundColour() ||
HasTextColour() || HasFont() is too verbose.
2016-04-17 17:19:20 +02:00
Vadim Zeitlin
c15f75b81d Use custom draw in wxMSW wxHeaderCtrl to support colours
Add a helper wxMSWImpl::CustomDraw class which will be reused in the other
places too and, for now, use it just to implement support for custom colours
in wxHeaderCtrl.

Notice that the control took care of the custom font on its anyhow and that
background colour is ignored when themes are enabled, so the net effect of
this change is that now changing the header foreground colour works, while
it was ignored before.
2016-04-17 17:01:08 +02:00
Vadim Zeitlin
246ae58c19 Replace wxTreeItemAttr and wxListItemAttr with wxItemAttr
The two existing structs were completely identical, just replace them with a
single wxItemAttr.

Notice that wxDataViewItemAttr is not quite the same, although pretty similar,
so it remains separate for now. It would be nice to combine it with this one
too in the future, e.g. to make it simpler to make items bold in a wxListCtrl.
2016-04-16 19:04:52 +02:00
Marek Temnyak
d4460435d9 Make source string const in wxPropertyGrid escape sequence methods
Source string is not changed in {Expand,Create}EscapeSequences() methods, so
make it const.

Closes https://github.com/wxWidgets/wxWidgets/pull/271
2016-04-14 16:05:10 +02:00
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