Commit Graph

33306 Commits

Author SHA1 Message Date
Vadim Zeitlin
21da20d579 Restore dynamic linking of GDI functions for non-MSVC.
This partially reverts the changes of r77029 and r77039: now functions such as
Set/GetLayout(), AlphaBlend() and GradientFill() are still called (almost)
directly when using MSVC but pass by dynamic loading with the other compilers,
which don't have #pragma comment(lib) and, in MinGW case, also lack some of
these functions in their libraries even if we do link with them.

Closes #16411.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-14 12:11:39 +00:00
Vadim Zeitlin
edad9616e7 Return correct string from wxEVT_TEXT wxComboBox events.
wxCommandEvent::GetString() could return empty string for the
programmatically-generated wxEVT_TEXT events from a wxComboBox.

Fix this by extending the on-demand string retrieval in wxCommandEvent to
wxComboBox as well (it was done only for wxTextCtrl).

Also add a unit test checking that the string has the expected value in the
events sent by all wxTextEntry-derived controls.

Closes #3901.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-11 11:53:01 +00:00
Stefan Csomor
53fc25b609 one call is enough
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-11 07:07:46 +00:00
Vadim Zeitlin
3a0c01cbea Use NMTVDISPINFO instead of TV_DISPINFO in wxMSW code.
The latest w32api 4.0.3, used by MinGW project, still didn't manage to apply a
one line fix to define TV_DISPINFO correctly, so tweak our sources to avoid
using it.

See #15537.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-10 16:11:49 +00:00
Stefan Csomor
3139f756a1 file not needed anymore
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 18:39:31 +00:00
Stefan Csomor
9fa8977992 remove outdated file
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 18:38:03 +00:00
Vadim Zeitlin
afdb989e87 Link wxMSW with msimg32.lib now that AlphaBlend() is used statically.
Implicitly link msimg32.lib in when using MSVC and add it to MinGW (and
Borland) makefiles.

This should have been part of r77029.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 18:03:23 +00:00
Vadim Zeitlin
c1a2d55dc5 Remove manual mirroring in RTL case from wxGrid code.
This is not necessary as wxDC already inherits RTL from the window itself and,
in fact, breaks the display when using RTL.

Closes #16250.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 18:03:15 +00:00
Stefan Csomor
0094b93dc6 removing code for pre 10.6 systems
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 17:27:19 +00:00
Stefan Csomor
b79595df2d removing code for pre 10.6 systems
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 17:20:20 +00:00
Stefan Csomor
1d21bd0877 removing code for pre 10.6 systems
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 17:07:54 +00:00
Stefan Csomor
f71ea69505 removing code for pre 10.6 systems
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 17:02:17 +00:00
Vadim Zeitlin
2bebe217c1 Remove dynamic loading of GDI functions from wxMSW wxDC code.
All of these functions (AlphaBlend(), SetLayout(), SetWorldTransform(), ...)
are available in XP which is the minimally required version.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 14:21:06 +00:00
Vadim Zeitlin
992671d2a7 Fix wxDC::DrawRectangle() when using RTL in wxMSW.
Extend the correct edge of the rectangle (always the physical right, not the
logical right) to fix off by one errors in RTL mode, affecting notably wxGrid.

See #16250.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 14:21:01 +00:00
Paul Cornett
099ca52b29 fix running on GTK < 2.10 when built with later, broken in r72935
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-08 20:37:24 +00:00
Artur Wieczorek
6871f5fe90 Remove temporary fix for drawing check box in the wxPG edit mode with RTL layout
Since the issue is fixed (r77020) this hack is no longer necessary (see #16254).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-08 07:13:03 +00:00
Vadim Zeitlin
07e57ebfbd wxOSX compilation fix after the last commit.
Add the missing wx/time.h header required for using wxGetLocalTimeMillis().

Also add WXUNUSED() around the unused parameters of DrawGauge().

See #16406.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-08 01:46:52 +00:00
Vadim Zeitlin
86cf756ba9 Add wxRendererNative::DrawGauge() method.
Add the method with the native implementations for MSW and OS X and a generic
version fallback.

Closes #16406.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-08 01:03:31 +00:00
Vadim Zeitlin
b5358cec94 Fix drawing on wxDC when using right-to-left layout in wxMSW.
Avoid integer overflow when setting wxDC scale. This affected (i.e. broke)
drawing in RTL but probably not only that.

Closes #16254.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-07 21:03:34 +00:00
Vadim Zeitlin
e871a2157d Add wxGCD() helper function.
It is needed in wxMSW code and it looks like it could be useful to the library
users, so make it public.

See #16254.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-07 21:03:25 +00:00
Vadim Zeitlin
3c7ba39135 Allow requesting core OpenGL profile and explicit OpenGL version.
Add WX_GL_CORE_PROFILE and WX_GL_{MAJOR,MINOR}_VERSION attributes which can be
used to use modern OpenGL with wxGLCanvas.

Closes #16402.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-06 23:31:41 +00:00
Artur Wieczorek
e58975a7e4 Remove unnecessary assertion in wxPGProperty::GetChoiceSelection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-06 23:28:40 +00:00
Tim Kosse
954557e23c Call wxWindow::Navigate when handling the tab key in wxAuiTabCtrl. This fixes tabbing on wxGTK where it was not possible to tab out of the wxAuiNotebook anymore.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-06 14:57:02 +00:00
Artur Wieczorek
138297786c Fix wxPGProperty::InsertChoice
Take into account that wxPGProperty::GetChoiceSelection can return either 0 (for wxEnumProperty) or -1 (for other properties) if choice value list is empty and initialize new selection index properly.

See #16401.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-06 13:34:01 +00:00
Artur Wieczorek
0f9ba6c59f Fix wxPGProperty::GetChoiceSelection
Return the index of the integer choice item on the list instead of item value itself.

See #16401.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-06 13:26:00 +00:00
Vadim Zeitlin
5f9bd3678f Add XRC handler for wxSimplebook.
Similar to wxNotebook but even simpler as wxSimplebook doesn't use images.

Also add wxSimplebook::Create() as the version inherited from wxBookCtrlBase
didn't _quite_ work: we need to add wxBK_TOP style to prevent asserts due to
unknown alignment in the base class when creating wxSimplebook.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-05 22:01:52 +00:00
Stefan Csomor
c69051e476 forwarding printing calls to graphics context as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-04 16:35:23 +00:00
Václav Slavík
964352934e Add window variant support to XRC.
Fixes #16247.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 17:10:24 +00:00
Artur Wieczorek
55a385d7ad Add missing index initialization in one of wxEnumProperty ctor.
In every wxEnumProperty ctor, initial index value of selected choice must be set to zero.

See #16401.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 15:22:54 +00:00
Vadim Zeitlin
bd2a350c42 Fix window position calculation in wxMSW when using RTL.
Just use the native ::MapWindowPoints() to do the coordinate transformation
instead of doing it ourselves: we did it wrongly by inheriting the layout
direction from wxTheApp instead of from the parent window, so fix this in the
best possible way by not doing it at all and just relying on Windows to do it
for us.

In particular, this corrects the display of wxStatusBar in RTL frames.

Closes #15031.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:51 +00:00
Vadim Zeitlin
d35c8954d6 Refresh the window when its layout direction changes in wxMSW.
Rearrange the window children and/or redraw its contents when its layout
direction changes.

See #15031.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:48 +00:00
Vadim Zeitlin
f1950d1111 Don't activate hidden buttons when Enter is pressed in wxMSW.
The keyboard handling code could decide to activate a button which wasn't
currently visible at all, e.g. because it was on a non-current, and hence
hidden, page of a wxBookCtrl. This didn't make any sense, so check for the
button visibility before activating it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:45 +00:00
Vadim Zeitlin
1b90acc357 Add wxDateTime::GetWeekBasedYear().
It was just added as a private function to implement %V format specifier
support, just extract and document it as it could possibly be useful in its
own right.

See #11857.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:41 +00:00
Vadim Zeitlin
29b68052bb Add support for "%V" and "%G" to wxDateTime::Format().
This is useful for creating ISO 8601 week number based stamps.

Closes #11857.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:36 +00:00
Vadim Zeitlin
e393f96dcc Fix static initialization order problem in wxStopWatch under MSW.
Don't rely on the static global gs_perfCounter being already initialized when
wxStopWatch::DoStart() is called, this may not be the case if wxStopWatch
variable is global.

Work around this by wrapping the variable inside a function to ensure that it
is initialized before being used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:30 +00:00
Vadim Zeitlin
f88585b4ab Update wxSlider background when its parent background changes in wxMSW.
The native control doesn't redraw itself, so force it to do it from the
overridden DoMSWControlColor() which is called every time the background
colour might have changed.

See #12271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:26 +00:00
Vadim Zeitlin
b932b899af Fix background of wxRadioBox buttons and wxSlider labels in wxMSW.
Handle WM_CTLCOLOR correctly for them, this wasn't done before because the
code assumed that sub-windows (i.e. HWNDs which belong to the same logical wx
control) were always children of the main window, but they could also be its
siblings (like in at least the two above mentioned cases).

Account for this case in wxControl::DoMSWControlColor() too now.

Closes #12271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:20 +00:00
Artur Wieczorek
7ef4c2d90b Fix regression caused by r76974 (inserting first choice item to wxEnumProperty).
This is a modified way of handling insertion of the first choice item to wxEnumProperty. Previous method based on special value (wxNOT_FOUND) used to indicate empty collection caused regression in wxPGProperty::DeleteChoice(). Currently, the size of the collection is checked directly in wxPGProperty::InsertChoice().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-02 21:19:41 +00:00
Vadim Zeitlin
220a8d1ac2 Correct wxGrid column labels when using SetTable() with native header.
Ensure that the table pointer inside wxGrid is updated before initializing the
native column header as it uses wxGrid::GetColLabelValue() which doesn't work
correctly without a valid table pointer.

Closes #16399.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-02 12:19:34 +00:00
Artur Wieczorek
c632599855 Fix inserting first choice item to wxEnumProperty
Situation when when first choice item is inserted (in wxPGProperty::InsertChoice) to the empty collection must be handled in a special way. In order to do so:
1. The state when there are no choice items in wxEnumProperty object and hence no item is selected must be explicitly indicated (by special index value wxNOT_FOUND).
2. This initial state must be handled in a special way when there is determined new selection index after insertion.

See #16401.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-01 22:12:53 +00:00
Václav Slavík
a49a3585fe Only filter requested events in wxEventBlocker.
Contrary to the documentation, wxEventBlocker always behaved as if the
event type to block was wxEVT_ANY: while it returned false for events
not on the blacklist, it never actually called the existing event
handler as it was meant to.

Fix by calling wxEvtHandler::ProcessEvent() in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-01 18:03:25 +00:00
Artur Wieczorek
acba2390e1 Fix wxPGProperty::SetChoiceSelection
When selected choice is changed then set as selected value the value corresponding to the new index, not the index itself.

Closes #16401.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-01 15:39:23 +00:00
Artur Wieczorek
965224405a Additional assertions in several wxPGProperty methods.
Check if property is attached to the property grid before wxPG methods are invoked. 

See #16401.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-01 15:19:04 +00:00
Artur Wieczorek
a07734febf Check if PG exists before adding or deleting a choice to wxPGProperty.
Because choice value can be added/deleted also to/from detached property object there is necessary to skip in wxPGProperty::InsertChoice and wxPGProperty::DeleteChoice the operations which are valid exclusively for property attached to the property grid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-01 15:09:18 +00:00
Vadim Zeitlin
960eedb920 No real changes, just a micro optimization in wxOSX DoGetAsBitmap().
Don't call wxWindow::GetSize() unnecessarily when we use the given fixed
rectangle anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-27 00:36:25 +00:00
Vadim Zeitlin
2098cafcad Implement bounding box computations for wxGDDC.
Update the bounding box in all the methods drawing something. This wasn't
done before in many of them, resulting in the bounding box remaining empty,
but it is updated now and a new test checking that it is was added.

Closes #12904.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-26 01:34:50 +00:00
Vadim Zeitlin
be0dcf769f Write delay between frames correctly when saving GIF files.
Deal with delays greater than ~2.5s correctly, their most significant byte was
previously lost resulting in 0 delay being written to the file.

Closes #16392.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-25 17:34:27 +00:00
Julian Smart
52747b8628 Capitalize style names if specified in the style
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-23 08:16:57 +00:00
Tim Kosse
744dabe350 Fix compilation if configured with --disable-coldlg
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-21 13:45:32 +00:00
Stefan Csomor
c7f1a920b1 supporting menu dimension retrieval for menubars, fixes #2570
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-20 15:28:20 +00:00
Vadim Zeitlin
c4691daac7 Don't consider hidden root item to be visible in wxGenericTreeCtrl.
This fixes wrong results returned by GetFirstVisibleItem() in the tree control
with wxTR_HIDE_ROOT style.

Closes #4482.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-16 22:55:11 +00:00
Artur Wieczorek
8d601fed17 Use the same macro to implement all wxPG property classes.
Currently, WX_PG_IMPLEMENT_PROPERTY_CLASS macro is used to implement most of the property classes (and also property classes in the propgrid sample) but few property classes are implemented in alternative way, using separate IMPLEMENT_DYNAMIC_CLASS and WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN macros.
These two macros can be replaced with WX_PG_IMPLEMENT_PROPERTY_CLASS macro (which is a concatenation of both) so property class implementation can be unified.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-16 20:10:06 +00:00
Stefan Csomor
2e2cfd9d55 fixing and expanding switches
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-15 19:28:05 +00:00
Stefan Csomor
a485823cb7 updating header info, adding AVKit support, iOS support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-15 17:12:35 +00:00
Artur Wieczorek
c85cfb1bc0 Fix for drawing check box in the wxPG edit mode when RTL layout direction is set under wxMSW.
Check box isn't drawn correctly in the edit mode under wxMSW due to the problems with RTL handling in wxAutoBufferedPaintDC and wxPaintDC (see #16254).
We need to only draw the image, no text, so we can work around the problem by overriding layout direction to LTR.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-15 16:30:10 +00:00
Artur Wieczorek
7203fd5c6b When drawing wxPG items (with double buffering) use the same layout direction as the window uses.
Memory DC used for double buffering purposes should inherit layout direction from the window DC to ensure that texts are rendered correctly.

Closes #15797.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-15 16:02:05 +00:00
Vadim Zeitlin
a29e7318e6 Remove unnecessary ConvertWXArrayToC() helper choice dialog code.
Just use the appropriate wxSingleChoiceDialog ctor directly.

Also some renamings/reformattings, but no other real changes.

Closes #16383.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-15 13:27:01 +00:00
Vadim Zeitlin
a325ade884 Compilation fix for wxMSW build with most features disabled.
Include wx/msw/ownerdrawnbutton.h outside of WX_PRECOMP check to ensure it's
always included.

Closes #16380.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-15 13:26:55 +00:00
Artur Wieczorek
bf01f0e791 Search through all properties in wxPG::GetPropertyByLabel.
Function should search for given label through all properties. This is consistent with searching by name (in GetPropertyByName) which is not limited to the subset of properties.

Closes #15251.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 17:35:59 +00:00
Artur Wieczorek
1a2983d433 Resolve ambiguity in multiple inheritance of function GetPropertyByLabel in wxPGPage.
In wxPropertyGridPage class derived from wxPropertyGridPageState and wxPropertyGridInterface, function GetPropertyByLabel is inherited from both base classes.
To resolve this ambiguity, function defined in wxPGInterface is introduced in wxPGPage through 'using-declaration'.
(This is a temporary fix and finally GetPropertyByLabel function should be removed from wxPropertyGridPageState.)

See #15251.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 17:18:58 +00:00
Stefan Csomor
a5d8826def removing extraneous parentheses
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 16:36:58 +00:00
Stefan Csomor
693452be18 using in place swapping macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 16:03:41 +00:00
Artur Wieczorek
f1c25a7838 Use native renderer for drawing check boxes in wxPG only if wxPG_USE_RENDERER_NATIVE flag is set.
wxPG_USE_RENDERER_NATIVE flag is used in wxPG code to control whether  native renderers can be called and we need to employ it. Legacy custom drawing code is used if this flag is no set.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 16:34:42 +00:00
Vadim Zeitlin
45adc64f9f Fix inserting an element of wxArrayString itself back into it.
Do the insertion/addition before deallocating the old memory to allow things
like array.Add(array[0]) to work correctly.

Closes #2290.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 14:30:22 +00:00
Vadim Zeitlin
bffc6bc753 Fix socket leaks in wxFTP if starting up/downloading fails.
Add the missing delete statements.

Closes #2250.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 13:53:06 +00:00
Vadim Zeitlin
446ff08ebb Don't DLL-export the private wxSimpleFontEnumerator class.
This class is only used internally, so there is no need to export it from the
shared library.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 12:22:26 +00:00
Vadim Zeitlin
61dfb42b6e Use dictionary sort for wxListBox strings.
This should result in more expected, and more consistent with MSW, order of
the items differing in case only.

Also do the same for wxChoice in wxGTK1.

Closes #16356.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 12:17:16 +00:00
Julian Smart
2d88120f54 Fix for context menu key under wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 08:52:02 +00:00
Julian Smart
aee4a52e64 Fix for text parsing when the text object has properties
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 08:47:41 +00:00
Julian Smart
6eec9dda58 Layout fix for paragraphs after floating objects not centering
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 08:44:22 +00:00
Artur Wieczorek
3adc631fa1 Use native renderer to draw check boxes in wxPG.
Use wxRendererNative procedure instead of custom check box drawing to get native look and feel of the check boxes in wxPG.

Closes #14881.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-12 16:34:27 +00:00
Artur Wieczorek
facbd123c2 Check if colour database exists before trying to use it in wxColourProperty.
Sanity check in wxColourProperty ctor.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-12 16:07:54 +00:00
Artur Wieczorek
498dc8161c Allow use of all wxPG colours.
wxPG-specific colours are added to the colour database when wxColourProperty is created (already existing colours are not overwritten by wxPG ones).
Original list of wxPG colours was restored.

Closes #15597.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-12 10:47:15 +00:00
Artur Wieczorek
0228d578ee Allow clearing wxPG from within wxPG event handlers.
If wxPG::Clear is called from within event handler then it is not possible to delete all property items directly because some vital internal wxPG data are still in use. In this case it is necessary to put all items on the list for deferred deletion in wxPG idle state.

Closes #16222.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-11 17:25:39 +00:00
Artur Wieczorek
c16808c380 Adjust list of items for deferred deletion/removal if wxPG property item is actually deleted/removed.
When property is actually deleted/removed it must be also removed from the respective list of items for deferred deletion/removal in order to avoid crashes when it would be attempted to delete/remove it again at next wxPG idle state.
Because lists of items for deferred operations can be updated at every actual deletion/removal it is necessary to rearrange iteration through these lists in wxPG::OnIdle.

See #16222.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-11 17:01:28 +00:00
Artur Wieczorek
3048aa50af Prevent duplicating wxPG property items on the list of items for deferred deletion/removal.
It is necessary to prevent duplicating items on the list of items to be deleted/removed later on (in wxPropertyGrid::OnIdle) to avoid crashes when it would be attempted to delete/remove already deleted/removed item.

See #16222.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-11 16:38:18 +00:00
Vadim Zeitlin
47187f84bb Fix using wrong variable in wxMotif DoSetSizeIntr().
Use y instead of using x twice.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-11 13:38:06 +00:00
Artur Wieczorek
3a87deed2a Use XOR operation to toggle the state of check box in wxPG.
Minor optimization by using single XOR operation instead of separate AND, OR operations to toggle the state of wxSimpleCheckBox.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-10 16:35:36 +00:00
Artur Wieczorek
295549d95b Defer using of editable check box in wxPG until it is fully initialized.
Currently, when wxPGCheckBoxEditor is clicked then associated check box (wxSimpleCheckBox) is created and immediately after that its state is changed. This causes problems when underlaying validation is performed because the check box object is not yet registered as an active editor and thus it is not visible from within e.g. validation function.
We need to defer changing the initial state of the check box until this box is registered by queuing the special event which will be processed after initialization.

Closes #16361.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-10 16:22:06 +00:00
Artur Wieczorek
63a9cc4c2e Use automatically generated ID values for wxPG sub-controls.
Currently in wxPG there are used fixed "magic" ID values to identify sub-controls and this can lead to side effects if these values overlap with ID values assigned to another controls in the application (like e.g. menu items).

Closes #13634.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-09 18:56:36 +00:00
Artur Wieczorek
954ee459b4 Fix wxEnumProperty::GetIndexForValue
GetIndexForValue should indicate that given property value does not exist by returning special index value(-1).

Closes #14450.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-08 15:56:34 +00:00
Artur Wieczorek
71db47d26a Refresh property grid when property is switched to read-only state.
Property grid is refreshed to reflect the new state of the property.
Small refactoring of wxPropertyGridInterface class: SetPropertyReadOnly() function body moved from header file to source file.

Closes #16306.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-07 22:32:57 +00:00
Tim Kosse
527d7d560c Tools can be specified without name in the XRC, so GetID() of the node returns wxID_ANY. Use the auto-assigned ID of the tool to refer to it instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-07 09:33:58 +00:00
Stefan Csomor
bf0a634c09 removing wxMacLaunch dependancy for ios
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 14:59:25 +00:00
Stefan Csomor
79eaaca192 fixing warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 14:58:41 +00:00
Stefan Csomor
2ade9eb811 added missing impl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 14:56:30 +00:00
Stefan Csomor
e765dc73b8 note for further action
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 14:55:54 +00:00
Tim Kosse
705a1b547d Implement wxGenericListCtrl::EndEditLabel.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 10:32:42 +00:00
Tim Kosse
f1501f0928 Do not assert if not editing a label when calling wxGenericTreeCtrl::EndEditLabel
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 10:01:31 +00:00
Stefan Csomor
ec73c71d6a supporting NSString also in Carbon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 16:58:03 +00:00
Stefan Csomor
9680ce04e2 resolving ambiguity
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 16:52:02 +00:00
Tim Kosse
b3be8e77be Fix compilation if configured with --disable-printarch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 12:43:33 +00:00
Vadim Zeitlin
cbc10bbd16 Skip mouse button release events in wxGenericListCtrl.
This is similar to r76094 for wxGenericTreeCtrl and fixes a similar problem:
clicking in a wxListCtrl inside wxNotebook confused GtkNotebook mouse tracking
logic because it didn't get some events.

Closes #16365.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76824 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 12:23:22 +00:00
Stefan Csomor
932d4e8ff7 fixing non-precomp build on carbon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 07:58:31 +00:00
Vadim Zeitlin
fb99672f62 Hopefully finish removing the old wxCocoa port.
Get rid of the rest of __WXCOCOA__ tests in the sources.

Drop configure option for using it.

Also remove the documentation for this port.

This should have also been part of r76735.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-03 22:03:21 +00:00
Tim Kosse
a2414fa1b7 wxListTextCtrlWrapper::Finish and wxTreeTextCtrl::Finish cannot be called multiple times without crashing. wxListTextCtrlWrapper already used to protect against this in the past, but revision 51150 removed the safety check.
This patch reimplements the functionality in a slighly different way for both controls, so that Finish is not called multiple times.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-03 14:25:30 +00:00
Vadim Zeitlin
8ebe2c4066 Fix wxMSW compilation with old MinGW versions without ASSOCXXX constants.
Define ASSOCF_NOTRUNCATE and ASSOCSTR_DEFAULTICON ourselves to let the code
compile with older MinGW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-02 13:28:33 +00:00
Vadim Zeitlin
e1655f5394 Stop duplicating wxFrame dtor in all ports.
wxGTK1, wxGTK, wxMSW and wxOSX all did the same thing in their wxFrame dtor,
so just do it in wxFrameBase instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-02 13:28:29 +00:00
Tim Kosse
9456ae3b91 Disabled bitmaps of toolbar tools are now rendered at the correct position if using GTK3. Extend toolbar sample to include a button with a custom disabled bitmap.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-30 18:43:03 +00:00
Vadim Zeitlin
496bcff52b Check for conversion failure correctly in wx[F]File::Write().
Check for the length of the buffer to determine whether the conversion failed
instead of checking whether it's NULL because this is currently never the case
because of the code in wxString::AsCharBuf() which returns "" and not NULL in
case of conversion failure.

This at least eliminates silent data loss when saving data that can't be
converted to the current locale encoding.

Closes #16348.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-30 01:00:45 +00:00