Commit Graph

58957 Commits

Author SHA1 Message Date
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
7e6515e1ad Remove the files remaining from project-specific MSVS solutions.
These files are not used any more since r77008, there is only wx_setup.props
now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-07 21:06:55 +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
Vadim Zeitlin
afbec1b9cd Don't document wxFileType::GetIcon() as unimplemented under OS X.
It is implemented and supposed to work.

See #4562.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-06 23:01:18 +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
Vadim Zeitlin
5575cc59c2 Remove wx/unix/execute.h from the master list of files too.
This should have been part of r76683.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-05 22:01:45 +00:00
Vadim Zeitlin
946fbf4d14 Use the same project files for all MSBuild-based MSVS versions.
Get rid of version-specific MSVS project files, we can reuse the same projects
for all MSBuild-based versions, i.e. 2010, 2011 and 2013.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-05 22:01:41 +00:00
Vadim Zeitlin
449b6454d9 Take into account wxAnimationCtrl "animation" property in wxrc.
The files used as the values of this property need to be included in the
generated file too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-04 18:58:15 +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
Vadim Zeitlin
bc4261e3c7 Add a more complete example of different controls variants in XRC.
Add a dialog showing all the existing variants of a few common controls to
allow seeing at a glance how do they look.

See #16247.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 17:56:20 +00:00
Vadim Zeitlin
bd0301b05b Show "hint" wxTextCtrl attribute in the xrc sample.
Rearrange the contents of the wxTextCtrl page in two columns to make space for
the new control.

This should have been part of r76629 but was forgotten.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 17:56:16 +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
Vadim Zeitlin
ab50aed57b Fix wxListCtrl sort callback signature in the test under Win64.
Use wxIntPtr instead of long which is not big enough to hold a pointer in
Win64 builds.

Closes #4309.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 15:50:54 +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
db65392b95 Disable a harmless deprecation MSVC warning for wxNORMAL in a test.
Explicitly disable the warning just for the code using wxNORMAL as the use of
this deprecated constant can't be avoided in the code which tests for its
support.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:32 +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
Vadim Zeitlin
0ab7522921 Add wxRESERVE_SPACE_EVEN_IF_HIDDEN flag to the XRC schema.
It seems that this one was forgotten somehow and so is not recognized.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:18 +00:00
Vadim Zeitlin
05d56ded40 Really add "hint" property to wxTextCtrl XRC handler schema description.
This was supposed to be done in r76629 but the property was mistakenly added
to wxRichTextCtrl instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:14 +00:00
Vadim Zeitlin
316da5d468 Auto-link expat and zlib even in non-GUI programs when using MSVC.
These libraries are not GUI-specific and should be included even in console
applications.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:44:40 +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
c3c0ae03fe No changes, just update the file name in the header.
Update the name in the header to match the actual file name.

See #12904.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-26 10:50:38 +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
Stefan Csomor
03275cc759 fixing Life demo for OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-25 13:45:23 +00:00
Vadim Zeitlin
bdc5c6e628 Add --disable-sys-libs configure option.
This allows to disable the use of all system libraries with a single option
instead of having to use --with-{lib{png,jpeg,tiff},regex,zlib,expat}=builtin
or similar.

This is especially useful under OS X where we want to avoid the dependencies
on any locally installed homebrew or similar libraries.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-24 11:34:14 +00:00
Vadim Zeitlin
1a2e0268f0 Include the required headers from wx/custombgwin.h.
Make this header self-contained, i.e. safe to include as the first wxWidgets
header being included from the user code.

Closes #16391.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-24 10:58:47 +00:00