Commit Graph

50178 Commits

Author SHA1 Message Date
Stefan Csomor
9118a24f52 remove workaround
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-09 07:26:10 +00:00
Stefan Csomor
e520834aea avoid double define warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-09 07:24:50 +00:00
Kevin Ollivier
ebf7d5c40a Add OSX prefix, and be clear that this is OS X only API to avoid any expectation that this API may work elsewhere.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-09 05:25:32 +00:00
Vadim Zeitlin
94b6ce7f4b Use X64 machine type for MSVC linker instead of old AMD64.
The officially supported machine type name is X64 now, even if AMD64 is still
supported.

Closes #10711.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 16:36:37 +00:00
Vadim Zeitlin
efe2190fa7 Fix duplicate accelerator use in animate sample.
Both "Play" and "Stop" used Ctrl+P.

Closes #11425.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62824 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 16:35:54 +00:00
Vadim Zeitlin
af7e24c33e Make wxPORTRAIT and wxLANDSCAPE elements of wxPrintOrientation enum.
Change wxPrintData::SetOrientation() to take wxPrintOrientation instead of
int.

Closes #11393.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 16:35:47 +00:00
Vadim Zeitlin
6087ca88c1 Visually show the cells boundaries in layout sample grid sizer test.
Closes #11456.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 15:56:26 +00:00
Vadim Zeitlin
f26c1c3e4a Don't override DoGetBestSize() in wxGenericStaticText, it's unnecessary.
The base class already does exactly the same thing -- except that it also
accounts for the borders properly.

Also fix access for a couple of DoXXX() member functions which should be
protected and an event handler which can be private.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 15:56:21 +00:00
Vadim Zeitlin
d7d943a71c Implement wxWindow::DoGetBorderSize() in the trivial case of wxBORDER_NONE.
This fixes an assert in wxGenericStaticText which overrode
DoGetBestClientSize() but not DoGetBorderSize().

It would still be useful to implement DoGetBorderSize() in wxGTK (and other
ports) in general too as using wxGenericStaticText with non-default border
still doesn't work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 15:56:14 +00:00
Vadim Zeitlin
efc8837250 Fix unused parameter warning after last commit (r62818).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 15:56:08 +00:00
Vadim Zeitlin
6f34fcb34e Fix event object in wxSysColourChangedEvent.
The handler for this event in the base class incorrectly changed the event
object of the original event instead of setting it for the event being sent to
the window children as it was supposed to.

Closes #11458.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 15:36:51 +00:00
Vadim Zeitlin
62354609e6 Don't set the initial size as minimal size for top level windows.
Correct the change of r62814: only call SetMinSize() for non-top-level windows
as the user should be able to resize the top-level ones to be smaller than
their initial size.

This also fixes the GTK+ warning resulting from calling wxTLW::SetMinSize()
from the ctor, before the window is realized.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 15:24:59 +00:00
Julian Smart
64178c3602 Speed up adding pages during freezing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 14:07:43 +00:00
Vadim Zeitlin
032e024c1c Set initial window size as its minimal size.
The change of r62306 broke the code which relied on the window created with a
given initial size to never become smaller than this size. This was to be
expected because the best size of such window is now (1, 1) and not its
initial size but we still need to preserve the old behaviour for compatibility
and also because it usually does make sense to avoid shrinking the window with
an explicitly specified initial size beneath this value.

So call SetMinSize() with the initial size explicitly now in wxWindowBase
ctor.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 23:37:36 +00:00
Vadim Zeitlin
89fb9e528f Reset wxTheApp when starting to destroy the object it points to.
Using wxTheApp when the corresponding object is already half destroyed can't
be a good idea so reset it to NULL as soon as possible.

Closes #11525.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 17:03:25 +00:00
Vadim Zeitlin
4b59c898ed Add a very simple example of a Win32 application using wx DLL.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 16:27:23 +00:00
Vadim Zeitlin
1acea7877b Use __declspec(dllexport) instead of WXEXPORT in dll sample header.
This header can be included from non-wx code so we can't use wx symbols in it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 16:27:14 +00:00
Vadim Zeitlin
c2ebca9b9c Document wxListCtrl::FindItem() return value.
In particular mention that it returns -1 if no items were found.

Closes #11523.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 15:26:31 +00:00
Julian Smart
d3785012e5 Don't crash if no document
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 15:23:09 +00:00
Julian Smart
63c639ec62 Safer access of member variables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 15:05:28 +00:00
Vadim Zeitlin
0639363014 Generate erase background events for native controls too under MSW.
Remove the test which prevented the generation of erase background events from
wxMSW::wxWindow::HandleEraseBkgnd(). Although it is true that native controls
mostly erase background on their own, there are exceptions: we must erase the
background of wxToolBar ourselves, for example. More importantly, there is no
reason to prevent the user code from defining wxEVT_ERASE_BACKGROUND handlers
for the native controls as this works just fine under MSW (although it doesn't
under GTK nor probably other ports...). So also add a test erase background
handler to the toolbar sample to verify that this does work.

Closes #11514.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 13:37:01 +00:00
Vadim Zeitlin
d2356abe70 Use white background by default for multiline readonly wxTextCtrl under MSW.
The best default behaviour seems to be to use white background for multiline
text controls even when they're read-only, as in previous wx versions.

Also see #11521 which could be implemented to make this configurable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 05:01:21 +00:00
Vadim Zeitlin
b7421ab625 Move wxMSW wxTextCtrl::GetDefaultAttributes() to wxTextCtrlBase.
This commit doesn't introduce any changes in the control behaviour, it simply
moves the existing method to the base class because it is not MSW-specific.

Also implement wxTextCtrlBase::GetClassDefaultAttributes() because if a class
implements GetDefaultAttributes() it should implement it as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 05:01:14 +00:00
Vadim Zeitlin
9f38fe4bfc Define MY_DLL_BUILDING symbol for dll sample DLL build.
This is necessary to properly define MY_DLL_DECL as either WXIMPORT or
WXEXPORT depending on whether my_dll.h is included from DLL itself or from
outside it. Without this, MSVC generated warnings about inconsistent dll
linkage.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 03:04:39 +00:00
Vadim Zeitlin
c118a47691 Add semi-public wxDynamicLibrary::MSWGetModuleHandle().
Rename old private wxGetModuleHandle() function to wxDynamicLibrary::
MSWGetModuleHandle() to allow its use in the dll sample.

This fixes the sample compilation with VC6 which lacks GetModuleHandleEx()-
related declarations.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 03:04:33 +00:00
Vadim Zeitlin
0530434efc Correct placement of calling convention keyword: must follow the return type.
Using __stdcall before the return type results in a warning with VC6 and an
error with VC9, place it after the return type.

Also use wxSTDCALL instead of just __stdcall for potentially better
compatibility with other compilers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 03:04:27 +00:00
Vadim Zeitlin
1ffe64ef70 Regenerate dll samples makefiles using the correct source file name.
The file is called wx_exe.cpp and not dll_user_wx.cpp in the svn, do use the
correct name.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 03:04:22 +00:00
Vadim Zeitlin
a60c479545 Remove a couple of VC6 workspace files for the samples.
See r62797.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 02:20:05 +00:00
Vadim Zeitlin
d6d362a81e Remove the MSVC solution files added with the new dll sample.
We don't keep solution files in svn for the other samples, there is no reason
for this one to be exceptional.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 02:18:10 +00:00
Kevin Ollivier
efb2fa41ff Add wxTLW::SetModified to allow apps to set the TLW's dirty state. On Mac this gives us the dot in the close button, not implemented elsewhere yet.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 01:54:21 +00:00
Kevin Ollivier
8301a0e89d Handle deprecated style so we don't assert and then crash.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-06 16:32:11 +00:00
Vadim Zeitlin
3c8b2423bd Restore TAB in accelerator string wrong removed by r62791.
See #11512.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-06 15:31:02 +00:00
Vadim Zeitlin
2730723380 Correct two bugs in wxMBConv::FromWChar() with non NUL-terminated strings.
The variable "lenChunk" was incorrectly used as the length of the wide string
chunk which could result in wrong output.

Worse, the output buffer could be overflown for the final chunk because it
didn't have to have enough space for the trailing NUL(s) in it.

Fix both bugs and added unit tests for them.

Based on patch by Kuang-che Wu.

Closes #11486.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-06 02:30:05 +00:00
Vadim Zeitlin
961326054f Minor corrections to ToWChar() comment.
Don't refer to the non-existent outputBuf parameter and don't imply that the
value of dstLen matters to decide whether we really convert or not -- only
whether dst pointer itself is NULL or not does.

See #11486.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-06 02:29:56 +00:00
Vadim Zeitlin
62b5065560 Use wxAcceleratorEntry::ToString() for undo/redo accelerator labels.
Don't hardcode the string representation of the accelerators, it was
inconsistent with the rest of wxWidgets which used '-' while here a '+' was
used.

Closes #11512.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-06 02:29:49 +00:00
Vadim Zeitlin
8b190e3310 Fix wxFD_CLR() definition for Intel compiler under Linux.
wxFD_CLR() should be void, not bool.

Closes #11517.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-06 02:29:42 +00:00
Paul Cornett
65391c8ffc minor cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 19:57:58 +00:00
Paul Cornett
00491f99f4 remove unused variables, minor cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 19:45:42 +00:00
Paul Cornett
9ed154da47 remove -I on nonexistent directory
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 19:29:06 +00:00
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