Commit Graph

53198 Commits

Author SHA1 Message Date
Stefan Csomor
73be128174 making sure clip (device coordinages) is applied before any transforms, fixes #13216
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-18 07:32:58 +00:00
Vadim Zeitlin
715efa4e25 Allow passing wxLongLong values directly to wx pseudo-vararg functions.
Allow passing wxLongLong objects when a "%lld" format specifier (or
equivalent) is used just as we already do for wxString objects when "%s" is
used. This is more convenient and makes wxLongLong closes to the native type.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-17 22:12:39 +00:00
Vadim Zeitlin
8ea26eedce Don't construct invalid wxDateTime in GTK calendar control callbacks.
GTK+ may momentarily return invalid date when switching the month in the
calendar control. Check for this and adjust the date ourselves to make it
valid if necessary in order to avoid the asserts from wxDateTime ctor.

Closes #13224.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-17 22:12:35 +00:00
Vadim Zeitlin
473d0f930e Fix client to screen translation in wxWindowMSW::PopupMenu().
Use wxWidgets ClientToScreen() function for computing the screen coordinates
of the popup menu instead of Windows ::ClientToScreen() as the latter doesn't
know about the toolbar which may be present in wxFrame and excluded from the
client area.

Closes #13223.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-17 13:35:04 +00:00
Vadim Zeitlin
352a7d6c46 Ensure that we never return negative client size.
wxMSW could return negative client size for tiny windows with borders, this
was unexpected and shouldn't happen so explicitly ensure it does not.

Also add a unit test to check that this problem doesn't exist in other ports.

Closes #13184.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-16 14:07:40 +00:00
Vadim Zeitlin
5f081e28fa No changes, just refactor the code in MSW wxGetOsDescription() slightly.
Construct the description string from several pieces: the OS name, its build
number and any extra information about it, instead of duplicating the code
appending the build number to the name in several places.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-16 10:01:12 +00:00
Vadim Zeitlin
7c7eed5656 Recognize Windows 7 and Server 2008 versions in wxGetOsDescription().
Use marketing names for these systems instead of just describing them as
"Window NT x.y".

Closes #13220.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-16 10:01:08 +00:00
Vadim Zeitlin
a699420104 Allow dragging floating AUI frames by the gripper.
Previously starting to drag a pane by its gripper worked but once it undocked
it was impossible to drag it by the gripper any more which was annoying for
the user and unexpected.

Fix this by ensuring that we move the correct top level window and not the
child window when dragging floating panes.

Closes #13177.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-15 16:16:11 +00:00
Vadim Zeitlin
efd516c29b Fix small error in floating AUI frames client size under wxMSW.
The client size of the floating frames ended up being wrong because we changed
the wxRESIZE_BORDER flag after setting it and this changed it (at least under
MSW).

Reset wxRESIZE_BORDER first now and set the client size correctly afterwards.

Closes #13043.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-14 14:18:20 +00:00
Vadim Zeitlin
55908cf096 Fix restoring of wxAuiManager::m_has_maximized when restoring perspective.
If the perspective being loaded contains a maximized pane, set the
m_has_maximized flag to true. Otherwise the flag and the effective pane state
was out of sync resulting in several problems in the UI behaviour.

Closes #12527.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-14 14:18:17 +00:00
Vadim Zeitlin
026c6eff70 Correct the drawing of check tools with a drop down button in wxAuiToolBar.
This combination was simply not covered by the existing code, add the missing
DrawDropDownButton() call.

Closes #11139.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-14 14:18:14 +00:00
Vadim Zeitlin
587151f730 Reset the checked state of the first radio item in wxAuiToolBar too.
Fix the condition of the loop in wxAuiToolBar::ToggleTool() to also uncheck
the item with index 0 that was always excluded before because of "i > 0" check
in the loop.

Also exclude the item being turned on itself from the loops, it's useless to
reset its checked state only to turn it on again below.

Closes #11110.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-14 14:18:09 +00:00
Vadim Zeitlin
a4e5e0b90c Check for NULL pane window in wxAuiManager.
Check that the AUI pane has a non-NULL associated frame before checking
whether it's shown.

This should fix a crash which could happen when docking an undocked toolbar.

Closes #10926.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-14 14:18:05 +00:00
Vadim Zeitlin
fdc5bc9f67 Improve checking for the landing point when docking windows in wxAUI.
This is especially important for multiple monitor setups in which the old code
could result in false positives and suggest docking a window on a wrong
display.

Closes #10612.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-14 14:18:02 +00:00
Vadim Zeitlin
2347971e99 Draw wxAuiToolbar button text even if it has no bitmap.
Don't skip drawing the button label if it doesn't have any bitmap.

Closes #10303.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-14 14:17:59 +00:00
Vadim Zeitlin
cb542c4046 Take the AUI floating title bar height into account when dragging it.
The cursor wasn't positioned correctly when a floating toolbar was dragged by
pressing the mouse over its gripper because its position didn't take into
account the difference between the client and window coordinates of the
floating window (which is basically the height of the window title bar).

Notice that the same problem still remains when starting to drag a docked
toolbar as it doesn't have the title bar initially but does have it later
so the same fix should probably be applied when we reparent the toolbar.

Closes #9984.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-14 14:17:55 +00:00
Vadim Zeitlin
2bd82d72f5 Cancel dragging in wxAuiNotebook on capture loss.
Don't leave the display and internal variables in inconsistent state when the
mouse capture is lost while a notebook page is being dragged (as can happen
if Alt-Tab is pressed under Windows, for example).

Closes #9976.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-14 14:17:52 +00:00
Vadim Zeitlin
7311debd0d Don't use the standard containers by default.
Revert the change of wxUSE_STD_CONTAINERS to 1 by default as this introduces
more incompatibilities which risk hamper upgrading to 3.0 unnecessarily.

Update the documentation to better explain why do the non-standard container
classes exist in wxWidgets and, especially, that they shouldn't be used when
possible. Also document the differences between the normal and STL containers
build in the manual.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-13 13:30:12 +00:00
Vadim Zeitlin
c4264a8317 Fix the comparison function in the list control sample to do what it says.
The comment in the function implied that it exchanged the items but in fact it
did not and kept their existing order instead.

Do revert them now, at least like this something visibly happens in the sample
when the items are sorted.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-13 13:30:07 +00:00
Vadim Zeitlin
d3ca848751 Make wxListCtrl sort function take wxIntPtr, not long, arguments.
As the arguments to the sort function contain the client data associated with
the items, they may be pointers and hence of greater size than long in Win64
builds. Use wxIntPtr instead of long everywhere to fix this.

Notice that this doesn't break compatibility for 32 bit code where long can
still be used as it is the same as wxIntPtr there after the previous commit.

Closes #4309.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-13 13:30:03 +00:00
Vadim Zeitlin
76b513074d Define wx[U]IntPtr as long, not [s]size_t, in 32 bit builds.
Defining wxIntPtr as ssize_t or long in 32 bit builds doesn't really change
anything but using long means that we can replace longs in the existing API
with wxIntPtr without breaking compatibility, like in wxListCtrl::SortItems().
It is also more compatible with 64 bit builds where wxIntPtr is long already.
So it has some minor advantages and no apparent drawbacks.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-13 13:29:59 +00:00
Vadim Zeitlin
aacbb5dc43 Remove duplicated portability warning from wxShowEvent description.
The warning about this event not being generated by all ports was already
present, remove the second copy.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-13 13:29:55 +00:00
Dimitri Schoolwerth
f32204b0c4 Fixed wxUSE_STD_DEFAULT==0 compilation.
ScintillaWX.cpp didn't compile because std::string is unknown. Include <string> in case the defines that (by default) are set to wxUSE_STD_DEFAULT are 0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-13 11:24:28 +00:00
Julian Smart
71185527a0 wxRTC doc updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-11 16:45:34 +00:00
Julian Smart
3395d7b48e Use more appropriate border style
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-11 16:44:19 +00:00
Vadim Zeitlin
293a6aaf0a Don't document wxFileSystemWatcher::AddTree() as pure virtual.
It isn't.

See #12847.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-11 15:52:04 +00:00
Stefan Csomor
3cac36541b separating observers for default mode (outer 'normal' loop) and common mode loops, fixes #13208
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-11 06:46:07 +00:00
Václav Slavík
76ba33d39a Clarify that wxFileName::GetPath() appends separator for toplevel dirs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-10 09:58:52 +00:00
Vadim Zeitlin
d3eec3b672 Attempt to work around Mac g++ 4.0 bug in fswatcher unit test.
Don't define the class overriding a virtual base class method inside the test
function as g++ 4.0 under OS X 10.5 fails to compile this for some mysterious
reason.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-10 08:54:20 +00:00
Vadim Zeitlin
a082862987 Fix inserting radio menu items in wxGTK too.
After fixing the insertion of radio menu items in wxMSW, also do it for wxGTK
to make the newly added unit test pass there as well.

Remove the unneeded wxMenu::m_prevRadio which doesn't make any sense neither
(just as the "current radio group" pointer removed from wxMSW code before) and
simply use the radio group of the existing item this radio item is being
inserted before or after instead.

See #13200.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-10 08:50:47 +00:00
Vadim Zeitlin
89511b4268 Rewrote wxMSW radio menu items code to support not only appending them.
Previously the radio menu items could only be appended to a menu in wxMSW,
inserting them (either in an existing radio group or to start a new one) not
only didn't work but could even result in crashes because invalid iterators in
the menu items list could be used.

Fix this by storing the ranges of all radio groups in wxMenu itself instead of
storing the information about the radio group an item belongs to in the item
itself and by updating this data whenever a new radio item is inserted. Also
get rid of the notion of "current radio group" in wxMenu which doesn't really
make any sense.

Finally add a unit test checking that inserting radio items works as expected.

Closes #13200.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-10 08:50:38 +00:00
Jaakko Salli
a6ca624a27 Fixed a bug: Disabling a property didn't work properly if a child item was selected.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-09 19:44:40 +00:00
Julian Smart
d476d8541a Added further wxRTC files to files.bkl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-09 10:08:27 +00:00
Vadim Zeitlin
1bdeb24eea Document wxBitmapToggleButton XRC parameters.
Describe the properties specific to this class in the XRC format
documentation.

Closes #13204.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-09 09:21:25 +00:00
Vadim Zeitlin
8c7f440c2e Add wx/richtext/richtextuicustomization.h to the headers list.
This header wasn't installed before, add it to RICHTEXT_HDR files list in
files.bkl to fix this.

Closes #13203.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-09 09:21:20 +00:00
Vadim Zeitlin
b3c6dd3b53 No changes, just sort richtext files in files.bkl.
Sort RICHTEXT_{SRC,HDR} contents in alphabetical order, just as it's done for
all the other files list and to make it easier to check if a file already
occurs in these lists or not.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-09 09:21:14 +00:00
Julian Smart
7afd2b58c5 More work on improving wxRTC documentation, copied buffer and control headers to interface folder.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-08 18:29:51 +00:00
Dimitri Schoolwerth
5c98cb9b75 Fixed failing to load ANI, BMP, and ICO images from non-seekable streams.
Guarded recently added SeekI() calls by calling is IsSeekable() first.

Regression since r67671.

Closes #12861 (again).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-05 23:52:07 +00:00
Robin Dunn
066bd25191 When we're using GDI+, the DC might have transforms applied to it, but the renderer APIs don't respect them. So we need to apply the transforms to the rect ourselves.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-05 17:56:18 +00:00
Robin Dunn
44cba02ea7 Adda virtual dtor to silence warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-04 00:41:16 +00:00
Robin Dunn
5be8929895 Wipe the old framework (if any) when building a new one. Fix symlinks. Add a plist.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-04 00:40:36 +00:00
Vadim Zeitlin
6a9455d3f0 Fix compilation of wxFileSystemWatcher unit test in non-PCH build.
Add #include of wx/timer.h needed when not using PCH.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-04 00:01:58 +00:00
Vadim Zeitlin
2b6259fe1c Fix wxFileSystemWatcher usage instructions.
Don't mention the virtual OnXXX() functions which were removed from the final
API.

Also mention AddTree() limitations on non-MSW platforms.

See #12847.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-03 23:31:43 +00:00
Vadim Zeitlin
f8d3714816 Implement watching directory correctly in MSW wxFileSystemWatcher.
The directories used to be always monitored recursively, even when this wasn't
requested, in wxMSW implementation. Change this but also implement efficient
support for monitoring the entire hierarchies using the native support for
this.

Also update the sample to allow monitoring directories recursively as well.

See #12847.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-03 23:31:39 +00:00
Vadim Zeitlin
4610ad4ecb Don't watch directories recursively in wxMSW wxFileSystemWatcher.
MSW implementation of this class always watched the added entries recursively,
i.e. always behaved as if the entry to watch was added using AddTree().

Fix this simply by not asking ::ReadDirectoryChangesW() to watch the entire
subtree.

See #12847.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-03 23:31:35 +00:00
Vadim Zeitlin
51fb867819 Fix wxFileSystemWatcher::Remove() in wxMSW.
Removing the path watched by wxFileSystemWatcher didn't do anything in wxMSW
implementation so we still continued getting events for the changes to this
path even after calling Remove().

Fix this by really implementing Remove() properly. Also add a unit test
checking that we don't get any events after calling Remove().

See #12847.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-03 23:31:29 +00:00
Vadim Zeitlin
17e23c0cb9 No changes, just slightly simplify wxFileSystemWatcher unit test.
CheckResult() method of the test event handler doesn't need to return
anything, it uses CPPUNIT_ASSERTs and related macros inside it to check that
everything is expected.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-03 23:31:24 +00:00
Vadim Zeitlin
ad94cb2b4f Fix assert when creating wxBitmapButton without a valid bitmap in wxMSW.
wxBitmapButton can be created without a valid bitmap if SetBitmapLabel() is
called later, so don't call SetBitmapLabel() from the constructor if no bitmap
was provided.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-03 23:31:15 +00:00
Stefan Csomor
a6df08eca3 project files for xcode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-03 19:05:24 +00:00
Stefan Csomor
71447e56a7 removing old xcode files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-03 18:28:49 +00:00