Commit Graph

58830 Commits

Author SHA1 Message Date
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
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
Vadim Zeitlin
c3ba472abb Fix test for __WXOSX__ in common code.
Check whether it's defined, not whether it's true.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-16 22:55:08 +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
b7e1443081 mediactrl for ios
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-15 19:56:26 +00:00
Stefan Csomor
5d11b53ddb mediactrl for ios
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-15 19:52:32 +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
0d6d012936 common type for native rectangle
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-15 17:14:21 +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
Vadim Zeitlin
789f1a7975 Replace anonymous namespace with a named one in the test helpers.
This should avoid clang warnings about the function in anonymous namespace
being unused.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 19:17:12 +00:00
Stefan Csomor
4cbf03f4ec trying xcrun notation for sdk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 18:38:25 +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
cc48521426 forgotten commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 17:15:59 +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
e144fe614c adding standard options for OS compatibility
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 16:27:01 +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
Stefan Csomor
c6201f2d70 completing in place swapping macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 16:03:03 +00:00
Stefan Csomor
14c736b89b fixing commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 15:50:13 +00:00
Stefan Csomor
b8c3fc0771 adding in place replacements avoiding self assignment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 15:42:34 +00:00
Stefan Csomor
c87149d7df attempt at getting rid of unused-function warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 15:37:21 +00:00