Commit Graph

50039 Commits

Author SHA1 Message Date
Paul Cornett
eb7350290f remove unnecessary DoGetBestSize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 19:26:39 +00:00
Paul Cornett
b545684e13 simplify Enable()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 19:25:04 +00:00
Václav Slavík
61aba4609a Added samples/dll for showing how to use wxWidgets to implement
a DLL that is used from another application written with a different
toolkit (or different wx version).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 18:54:40 +00:00
Vadim Zeitlin
da00cef2d8 Implement wxNativeContainerWindow::IsShown() for MSW.
Simply use native ::IsWindowVisible() for IsShown() implementation.

Closes #11503.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 17:31:07 +00:00
Vadim Zeitlin
e01a788ee0 Add support for MSW unique volume names to wxFileName.
Recognize the paths starting with "\\?\Volume{GUID}" under MSW and provide a
way to test for them.

Closes #8874.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 17:31:00 +00:00
Vadim Zeitlin
2450225e87 Don't lock global mutex when deleting wxThread to avoid deadlocks.
Calling out the user-defined wxThread dtor while holding gs_mutexDeleteThread
lock is a bad idea as it may result in deadlocks if the dtor deletes another
thread. Only lock the mutex directly before manipulating the data it protects.

Thanks to Neno Ganchev.

Closes #11501.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 17:30:53 +00:00
Vadim Zeitlin
e5a1bd6409 Don't crash in wxActiveXContainer if FindConnectionPoint() failed.
This method is supposed to succeed but don't crash by calling Advise() on NULL
pointer if it did not.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 14:25:53 +00:00
Václav Slavík
384a14ff32 Documented that wxCriticalSection can be used before wxInitialize(), as a global object.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62778 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 09:05:45 +00:00
Vadim Zeitlin
51eb060619 Fix wxLogChain (and wxLogWindow deriving from it) broken by wxLog changes.
wxLogChain::DoLogRecord() only called DoLogRecord() on the old logger but not
the new one when the new logger was the same object as wxLogChain itself as is
always the case for wxLogWindow. The result was that nothing was logged into
the window.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 01:32:45 +00:00
Jaakko Salli
0564ae939d Exit wxPropertyGrid::RecalculateVirtualSize() immediately if it was called before the grid state was initialized.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62773 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-03 18:19:31 +00:00
Jaakko Salli
1103c4ca05 Handle the rare case where wxPropertyGrid::HandleCustomEditorEvent() may receive event before the grid state has been initialized.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-03 18:08:24 +00:00
Paul Cornett
cff9681b85 make access for virtuals match base
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-03 17:20:15 +00:00
Vadim Zeitlin
470ee71463 Suppress errors from static bitmap page of widgets sample.
Don't fail loudly if the image file is not found (which can happen under Unix
if the image sample wasn't built yet or if we're not running the sample from
its own directory) but just don't create the bitmap.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-03 16:26:25 +00:00
Vadim Zeitlin
8f79ece333 Don't assert if the path is not absolute in wxFileDialog::SetPath().
Remove the assert added in r62101 (see #10917), it was wrong as the other
ports do not assert in this case. Instead, just ensure that the path we use
with the GTK+ native chooser is absolute.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-03 16:26:15 +00:00
Paul Cornett
a243da29c8 make array data fully const
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-02 17:28:45 +00:00
Paul Cornett
d1750c03ce use const_cast where appropriate
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-02 17:27:17 +00:00
Paul Cornett
2a32b8071b check for self assignment in operator=
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-02 16:36:50 +00:00
Vadim Zeitlin
46b8d15a67 Compilation fix after r62754.
Don't pass second argument to wxPizza::New() any more in wxStaticBox.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-02 13:27:17 +00:00
Bryan Petty
6604fd4c23 Removed hard-coded timer Id in wxAUI for the transparent hint fade functionality. (fixes #11435)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-02 00:57:56 +00:00
Bryan Petty
0678e935b1 Forward-port of r62758 (Added wxHtmlEasyPrinting name accessor and modifier).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 20:23:29 +00:00
Paul Cornett
1827c0f538 remove m_backing_window member, to keep people from trying to use it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 17:16:28 +00:00
Vadim Zeitlin
030495ecf1 Add wxOSX_10_6_AND_LATER macro and use it.
Replace all occurrences of

	@interface wxFoo : NSFoo
	#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
	    <NSProtocol>
	#endif

which we used for protocols new in 10.6 with just

	@interface wxFoo : NSFoo wxOSX_10_6_AND_LATER(<NSProtocol>)

which looks better and simpler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 16:47:33 +00:00
Paul Cornett
0f52f61085 remove unused data member
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 16:23:48 +00:00
Vadim Zeitlin
589d208299 Define _CRT_NONSTDC_NO_WARNINGS to suppress MSVC warning in libtiff.
Defining lfind as _lfind is not enough and a warning C4996 is still generated
by MSVC9 when the function is called.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 00:43:15 +00:00
Vadim Zeitlin
41c89b9107 Define _CRT_SECURE_NO_WARNINGS when building 3rd party libs with MSVC.
Avoid dozens of warnings about "unsafe" use of the standard C library
functions in 3rd party code which are harmless and which we don't care about
in any case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 00:42:19 +00:00
Stefan Csomor
884dad8326 using 64bit APIs, closes #10184
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-30 17:47:37 +00:00
Francesco Montorsi
4f5dc9aad3 partially revert changes of r58531 as wxCollapsiblePane currently doesn't work with GTK+ 2.18.3 (altough it does work with GTK+ 2.12.2); all following changes (r58632,58718,61109) should have been preserved
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-30 13:17:06 +00:00
Kevin Ollivier
a029e98a41 orderBack puts it behind all windows in its level, including in other apps, so use orderFront instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-30 01:08:04 +00:00
Vadim Zeitlin
c8688139b0 Fix compilation of image sample with wxUSE_LIBPNG==0.
Also don't propose to save the file using the extensions not supported in this
library build.

Closes #11495.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-30 00:30:15 +00:00
Vadim Zeitlin
5fc0c309f7 Fix compilation in wxUSE_STL==1 case broken by r62738.
We need to use wxString::c_str() explicitly to convert wxString to const char
* in STL build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-30 00:30:08 +00:00
Kevin Ollivier
b487746ac4 Make sure we setup the base's Show state correctly and send a show event.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-29 21:46:15 +00:00
Jaakko Salli
86a6c828f8 Fixed regression: forgot to set wxPropertyGridPageState::m_anyModified to false in wxPropertyGridInterface::ClearModifiedStatus().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-29 09:42:45 +00:00
Kevin Ollivier
2c3ce6c46d Fix needed to allow shaped windows, and other windows without a title bar, to get the focus when clicked under OS X.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 20:09:00 +00:00
Stefan Csomor
9f43f2691c 64bit builds had problems with full circles, as we can use 10.4+ only APIs, use new implementation, fixes #11471
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 20:05:39 +00:00
Vadim Zeitlin
874dbd3a4a Allow calling wxStrchr() with a narrow string and wide character.
Calls to wxStrchr(char-string, wide-char) would previously fail if wide
character couldn't be converted to a single character in the current locale
encoding. Change it to simply return NULL in this case as it's a safe and
useful generalization: a narrow string will never contain a wide character not
representable in the current locale.

Add wxUniChar::GetAsChar() to help with implementing this.

Closes #11487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 14:37:03 +00:00
Vadim Zeitlin
85b1997c09 Define INVALID_FILE_ATTRIBUTES in filename.cpp too.
Fix VC6 compilation: INVALID_FILE_ATTRIBUTES is not defined in its headers so
we need to do it ourselves (this was done in filefn.cpp before but part of the
code using this constant was moved to filename.cpp in r62735 so now we need to
define it here too).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 03:37:41 +00:00
Vadim Zeitlin
aeef0d188c No changes, just remove unnecessary UTF-8 bytes.
The patch of #11187 (applied in r61884) unnecessarily used +U2019 which can't
be converted to latin1, remove it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 03:37:36 +00:00
Vadim Zeitlin
5bb596668f Implement wx{File,Dir}Exists() in terms of wxFileName methods.
Use wxFileName from the global functions instead of using global functions in
wxFileName methods as wxFileName is the preferred API for all these
operations.

Closes #11488.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 02:40:08 +00:00
Vadim Zeitlin
ad42f414c8 Don't override msw.remap system option value in wxToolbook.
Introducing a system option for all toolbars and then ignoring it inside wx
itself is ridiculous and just goes to prove that this option itself was a
mistake. But as we have it, we should respect whatever value it's set to
(which should hopefully be 0 anyhow for most modern systems) instead of
overriding it forcefully making the mockery of the whole "option" concept.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 02:29:08 +00:00
Vadim Zeitlin
1c54c4ed04 Avoid infinite recursion in wxToolbook::OnSize() under wxMSW.
Reset m_needsRealizing flag before calling wxToolBar::Realize() as doing this
can result in another call to wxToolbook::OnSize() itself.

Closes #11942.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 02:29:02 +00:00
Vadim Zeitlin
d395f181b3 Use OUTLINETEXTMETRIC::otmpFamilyName to get wxFont face name from MSW.
In spite of the name, we need to use otmpFamilyName member of
OUTLINETEXTMETRIC struct and not otmpFaceName to get the font face name: the
latter may contain (locale-dependent, so the changes of r62708 didn't work for
non-English versions of Windows) "Italic" or "Bold" suffix while the former
does not and is what we want.

This should really fix the unit test failures, even in French locale.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 02:28:57 +00:00
Vadim Zeitlin
9a67941f0b Compilation fix for wxUSE_CAIRO==0 after last commit.
Include wx/graphics.h when wxUSE_CAIRO==0 but wxUSE_GRAPHICS_CONTEXT==1 (as in
e.g. MSW builds).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-27 21:36:03 +00:00
Vadim Zeitlin
6c99dbd55e Define wxUSE_CAIRO in wx/chkconf.h to ensure that it's always defined.
wxUSE_CAIRO used to be defined only in wx/cairo.h but this header wasn't
included by src/common/dcgraph.cpp so the code there was compiled as if we
were not using Cairo even when we were (thanks g++ for the warning).

Define it in wx/chkconf.h (included from wx/defs.h, i.e. always) now to ensure
that not only this bug is fixed but also that it can't happen any more.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-27 21:06:03 +00:00
Vadim Zeitlin
a8f9fe13aa Use #ifdef to check for __WXMSW__ and __WXGTK__ and not #if.
Using #if doesn't work when symbols are not defined.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-27 21:05:57 +00:00
Vadim Zeitlin
cfbc15ee04 Allow changing horizontal alignment of numeric cells in wxGrid.
wxGridCellAttr didn't provide any way to query its alignment attributes
without falling back to the (always defined) default alignment so the code in
wxGridCellNumberRenderer and similar classes simply always used right
alignment,

Add a new wxGridCellAttr::GetNonDefaultAlignment() function which allows to
retrieve the alignment defined in the attribute and use it to use right
alignment by default but allow overriding it.

Add a test to the sample showing a non right-aligned numeric cell.

Incidentally fix a long-standing bug in wxGridCell{DateTime,Enum}Renderers
which used wxRIGHT instead of wxALIGN_RIGHT and so were not aligned properly
even by default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-27 01:47:38 +00:00
Vadim Zeitlin
ba0185b557 Add symbolic constant wxALIGN_INVALID and use it instead of -1 in wxGrid.
wxGridCellAttr was using literal -1 to indicate "no alignment" which wasn't
immediately obvious, use a new wxALIGN_INVALID (which has the same value)
instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-27 01:47:30 +00:00
Kevin Ollivier
5cbf522105 Build fix for OS X <= 10.5.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 23:14:28 +00:00
Kevin Ollivier
9ab7ff537d Allow OS X Cocoa (or any OS X port) to override GetBestSize and provide a native OS X Cocoa impl. Also, fix the line ending check under OS X Cocoa, and a sanity check for SetStyle.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 23:11:27 +00:00
Kevin Ollivier
b9cf2753b4 Add CheckSpelling support for OS X Cocoa, make sure NSTextView-based wxTextCtrls emit EVT_TEXT, and a fix for GetStyle when position == length.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 21:52:42 +00:00
Vadim Zeitlin
7430a4bbf8 Make wxFileDialog::Set/SetPath() behave consistently.
wxFileDialog::GetPath() didn't return the value set by a previous call to
SetPath() in wxMSW version. Fix this and also implement SetPath() and
SetDirectory() methods in the generic versions in the same way as
SetFilename().

Closes #3672.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 16:17:00 +00:00