Commit Graph

16421 Commits

Author SHA1 Message Date
Mariano Reingart
3b12797953 Improve specific listctrl wxQT, thanks @seandpagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-29 04:21:26 +00:00
Mariano Reingart
0435721b3e Implement readonly dcscreen for wxQT, thanks @seandpagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-29 04:16:57 +00:00
Mariano Reingart
7940e70f51 Remove unused event table in wxQT, thanks @seandepagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-29 03:49:29 +00:00
Mariano Reingart
6a3bdf5f66 Support native font info in wxQT, thanks @seandepagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-29 03:43:31 +00:00
Mariano Reingart
09f176eed0 Fix frame client size in wxQT, thanks @seandepagnier
Compute frame size subtracting statusbar, and handle NULL status bar

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-29 03:01:42 +00:00
Mariano Reingart
b56a3f5235 Improve wxQT cursor implementation, thanks @seandepagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-29 02:55:33 +00:00
Vadim Zeitlin
908bf66242 Don't define wxSelectionStore::NO_SELECTION inline.
This results in link errors under Unix for some reason.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 23:29:32 +00:00
Vadim Zeitlin
adf8f9d0cd Handle multiple item insertion and deletion in wxSelectionStore.
Rename the existing but not implemented and never used OnItemAdd() method to
OnItemsInserted() and add OnItemsDeleted(), which is more efficient than
OnItemDelete() when many items are being removed from the control at once.

This is not used yet, but will be used in wxDataViewCtrl soon and maybe in the
other controls later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:21 +00:00
Vadim Zeitlin
06ab4da3f3 Add wxSelectionStore::IsEmpty() helper.
Just a simple and potentially (although not right now) more efficient
equivalent to GetSelectedCount() == 0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:18 +00:00
Vadim Zeitlin
d058c09e9f Add possibility to iterate over all selected items in wxSelectionStore.
This is necessary for retrieving all the selected items at once: while doing
this is not recommended for a control with a potentially very large number of
items, it must be possible to allow using wxSelectionStore for wxDataViewCtrl
implementation as wxDataViewCtrl must implement its GetSelections() method.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:15 +00:00
Vadim Zeitlin
0465215157 Avoid calling SetSize() from wxCompositeWindow::Create() under wxGTK.
This was unexpected and resulted in a crash in the case of wxDatePickerCtrl.
And while this particular crash could be fixed just by checking for the
pointers validity in the overridden wxDatePickerCtrl::SetSize(), it seems
better to avoid such unexpected calls to SetSize(), especially as they only
happen under wxGTK, which calls SetLayoutDirection(wxLayout_Default) from its
wxWindow::Create(), and so wouldn't be found by any amount of testing under
other platforms.

Closes #16589.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 16:12:29 +00:00
Artur Wieczorek
89364e95b9 In wxPropertyGridPageState use Boolean member variables to store Boolean values.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-25 17:29:50 +00:00
Vadim Zeitlin
51309ad50a make x11 dc could get cairo context, so the graphic module could use in x11. This use cairo xlib backend.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:06 +00:00
Vadim Zeitlin
b045f9506b Rewrite the wxX11 cliboard
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:44 +00:00
Vadim Zeitlin
ad84d9f97d make wxKeyEvent could get unicode key under x11, add a x11 keysym--unicode char map tab
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:37 +00:00
Vadim Zeitlin
d956d87f2e enable wxNEEDS_UTF8_FOR_TEXT_DATAOBJ flag for x11 TextDataObject, and add implementation of GetAllFormat function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:24 +00:00
Vadim Zeitlin
d6ae3804dd input handler should coreesponding the widget instance, wxListBox and wxCheckListBox has its own input handler, so create it differenctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:15 +00:00
Vadim Zeitlin
9ea0ff1374 wxComboCtrl::Clear() will call wxComboCtrl::SetValue(), but wxItemContainer::Clear() will call it too. So no need to call wxComboCtrl::Clear() here
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:39 +00:00
Vadim Zeitlin
cc3acf904b add GetLabel/SetLabel implementation to wxWindowX11, the function just store the label string, but do nothing with it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:33 +00:00
Vadim Zeitlin
fa2fa3dd9f adjust the implementation about max length limitation according review comments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:18 +00:00
Vadim Zeitlin
fe733e34c2 add maxline restriction in single line mode textCtrl. let textctrl will fire wxEVT_TEXT_MAXLEN and not recive the chars when the text length beyond the maxlength
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:12 +00:00
Vadim Zeitlin
d2573ed255 Add get/set strikeline support to wxFont/x11.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:48 +00:00
Vadim Zeitlin
ae1bc4fa82 make wxPalette under x11 could store/get uchar RGB value in palette and also could get the color number in palette.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:45 +00:00
Vadim Zeitlin
66ed21d69b Fix the position calculating of insert a radio menu item
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:46 +00:00
Vadim Zeitlin
02526cc9d2 use DoGetValue() in parent class will be enough, and add readonly support to SetValue()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:39 +00:00
Vadim Zeitlin
26ce3d6361 wxListBox in wxUniv need to overwrite DoListHistTest function, otherwise Listbox::HitTest will call DoListHitTest in wx/listbox.h, which will always return wxNOT_FOUND
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:36 +00:00
Vadim Zeitlin
a4e72041fb Add GetBitmap support to wxButton in wxUniv
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:22 +00:00
Vadim Zeitlin
58730bc356 Add wxEVT_SET_FOCUS and wxEVT_KILL_FOCUS event to wxX11
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:44 +00:00
Vadim Zeitlin
b413eeedea GetLabel should return the original label that with mnemonics, the original label stored in wxControlBase m_labelOrig, get it by wxControlBase::GetLabel()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:38 +00:00
Vadim Zeitlin
d1d874dd15 wxUniv focus on wx11 port, so modified unv/theme.h, make GTK theme as the default theme
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:06 +00:00
Vadim Zeitlin
8e238e367e wxX11 wxFont miss the wxFont (const wxString &nativeInfoString) ctor, it will cause build tests failed. Added and fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:38:51 +00:00
Vadim Zeitlin
43c99ef613 Refactor: create src/univ/anybutton.cpp.
Extract and pull the common functions from wxButton and wxToggleButton to
wxAnyButton in wxUniv too.

Also make wxToggleButton inherit from wxToggleButtonBase correctly

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:38:47 +00:00
Vadim Zeitlin
7172fdc01b Fix wxCompositeWindow compilation after the latest change.
SetSize() doesn't have any dependent parameters so call it via an explicit
"this->" to make it work with standard conforming compilers (and not MSVC).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 11:51:10 +00:00
Vadim Zeitlin
f24d204984 Update layout of wxCompositeWindow on layout direction change.
The children layout will almost always depend on the layout direction, so redo
it when the latter changes.

In particular, this fixes changing the layout of wxSpinCtrlDouble under MSW.

See #11583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 01:41:27 +00:00
Vadim Zeitlin
81ec161949 Fix setting layout direction for wxSpinCtrl in wxMSW.
Position the spin control components (the button and the text) correctly for
the current layout.

Also update the layout of the text explicitly.

See #11583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 01:41:22 +00:00
Vadim Zeitlin
e5755015e7 Fix setting layout direction for wxComboBox in wxMSW.
The EDIT control used by the native combobox is different from normal EDIT
controls and has to be handled specially.

We also need to explicitly forward WS_EX_LAYOUTRTL to the dropdown window as
it doesn't inherit it from the combobox itself automatically.

See #11583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 01:41:17 +00:00
Vadim Zeitlin
c5ee5b8ea7 Don't use wxMSW wxAppProgressIndicator if wxUSE_TASKBARBUTTON==0.
This class requires wxTaskBarButton to be really implemented, so there is no
need to even define the MSW-specific version of it if wxUSE_TASKBARBUTTON is 0
anyhow.

This fixes a compilation problem with wxUSE_TASKBARBUTTON==0 but, more
importantly, just makes more sense.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-20 22:07:37 +00:00
Vadim Zeitlin
4944c44676 Show the message of unexpected message boxes in wxTestingModalHook.
This is more informative than showing just the title and we can do it for the
message boxes and it's worth handling them specially just because they are so
common.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-20 22:07:34 +00:00
Vadim Zeitlin
66640e67d6 Allow customizing unexpected dialogs description in wxTestingModalHook.
Extract creation of the message describing an unexpected dialog in a separate
virtual method in order to allow customizing it, notably in order to add more
useful description of custom application dialogs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-20 22:07:31 +00:00
Vadim Zeitlin
6cf30c433c Mention the title of the unexpected dialog in wxTestingModalHook.
It's not very helpful to just say that an unexpected dialog was shown, using
its title provides at least some hint as to what dialog it was.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-20 22:07:29 +00:00
Vadim Zeitlin
c39f3db6a6 Return the caption from wxMessageDialog::GetTitle().
It was unexpected that wxMessageDialog::GetTitle() returned empty string even
when non-empty caption, which is just another word for title, was specified.

Implement GetTitle() as synonym for GetCaption() and also provide SetTitle()
for consistency.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-20 22:07:26 +00:00
Peter Most
12e989bdf3 Re-added wxQtPointer smart pointer for easier memory management.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-16 12:50:57 +00:00
Vadim Zeitlin
cde3018236 Don't define wxUSE_GRAPHICS_GDIPLUS as 1 by default.
Define it and wxUSE_GRAPHICS_DIRECT2D, when it's supposed to be enabled, as
wxUSE_GRAPHICS_CONTEXT instead. This ensures they are set to 0 if the use of
wxGraphicsContext is entirely disabled, as is the case when using MinGW under
MSW by default for example.

Closes #16558.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-15 17:27:50 +00:00
Vadim Zeitlin
28516f5643 Make wxAppProgressIndicator actually usable.
First of all, do define it under non-MSW platforms.

Second, don't crash in it when running under XP where wxTaskBarButton is not
available.

Also add IsAvailable() method to check for its availability explicitly and add
a demonstration of this class to the dialogs sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 23:58:26 +00:00
Vadim Zeitlin
03e245091f Use factory function for wxTaskBarButton creation.
This allows to encapsulate checking for errors, which should be handled when
using this class as task bar buttons API is not available under Windows XP.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 23:58:22 +00:00
Vadim Zeitlin
79fb4e2250 Fixes to wxFont strike-through support in wxOSX.
Don't create strike-through fonts by default.

Also add support for strike-through in wxCarbon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 11:17:54 +00:00
Vadim Zeitlin
c2e18d75e5 Fix wxCALL_FOR_EACH() to work with more than 2 arguments with MSVC.
Due to a bug in MSVC handling of __VA_ARGS__ (see
https://connect.microsoft.com/VisualStudio/feedback/details/380090/variadic-macro-replacement)
wxCALL_FOR_EACH() didn't work correctly as long as more than two arguments
were used with it.

Work around the bug by protecting __VA_ARGS__ from being incorrectly passed as
a single token to the macro being called on every step: this was already done
for wxCALL_FOR_EACH itself with wxCALL_FOR_EACH_, but we need to do it for all
the helper macros too.

Also add a test checking that this does, actually, work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 00:59:53 +00:00
Vadim Zeitlin
9ecf317092 Implement strike-through support in wxFont in wxOSX.
Implement support for this attribute in wxOSX too.

Closes #16547.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-11 17:05:33 +00:00
Vadim Zeitlin
56d51c311a Fix wxUSE_GRAPHICS_DIRECT2D definition in setup.h files.
Define it in wx/msw/setup_inc.h and not in wx/msw/setup0.h itself to ensure
that it survives the regeneration of this file using build/update-setup-h.

Also only set wxUSE_GRAPHICS_DIRECT2D to 1 for VC10+ and not VC9 as the latter
lacks Direct2D header in its default SDK version.

Finally also update comments to explain the various settings more clearly and
remove outdated information (wxGraphicsContext is not experimental any more).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:52:28 +00:00
Vadim Zeitlin
91b7aab4c2 Fix build with g++ 3.4 with -pedantic[-errors] option.
The use of variadic macros results in a warning/error if -pedantic[-errors]
is used when compiling C++98 code as they are only formally part of C99 (or
C++11). With g++ 4 and later, this can be avoided by using -Wno-variadic-macros
option, but it doesn't exist in g++ 3, so a nasty workaround in the header
itself is required: mark it as system header in order to fix compilation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:52:08 +00:00