Commit Graph

50394 Commits

Author SHA1 Message Date
Vadim Zeitlin
cd57c6d690 Don't explicitly set the background colour for wxChoice.
This is unnecessary and results in flicker when the control is resized because
we explicitly erase its background ourselves and then it does it itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-18 20:49:29 +00:00
Vadim Zeitlin
b8797d96ca No real changes, just change type of MSWGetBgBrush() argument.
Pass wxWindow instead of HWND to it as in most cases we already have wxWindow
for the HWND we have and calling wxFindWinFromHandle() once more is
unnecessary.

This also makes the code of MSWGetBgBrushForChild() slightly simpler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-18 20:49:23 +00:00
Vadim Zeitlin
b93051ef46 Don't force themed background for wxToolBar under MSW, just use the default.
Native toolbars don't have themed background under Vista/7 and don't look good
with rebar background (which is the same one as used for the menus) as
toolbars don't appear on the top of the window.

Erasing background ourselves also results in flicker and display problems and
makes the code much more complicated. Simply don't do this to avoid all the
problems.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-18 20:49:15 +00:00
Jaakko Salli
3b9ba64cce Have wxComboCtrl honour any custom foreground and background colour.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-18 17:28:42 +00:00
Vadim Zeitlin
d5892339a1 Don't access the first character of a possible empty USEMAP parameter.
This fixes an assert when using debug CRT in VC9.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-18 14:47:25 +00:00
Vadim Zeitlin
247afab527 Only call GetTextMetrics() in wxDC::GetTextExtent() if necessary.
A micro-optimization: avoid ::GetTextMetrics() call if we don't use its
results (as is the case if neither descent nor external leading were
requested).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-18 14:47:18 +00:00
Vadim Zeitlin
ec38225e66 Call SymCleanup() in wxStackWalker to fix problem with next call to it.
Calling SymInitialize() second and subsequent times failed (and hence so did
wxStackWalker::WalkFrom() and other methods) as we didn't call SymCleanup()
because of some problems with old versions of debughlp.dll. These problems
don't seem to exist any more so do call SymCleanup() so that we can walk the
stack more than once.

Closes #11544.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-18 14:47:08 +00:00
Vadim Zeitlin
dc09d66523 Don't use "-I @" in ctags command line as cmd.exe handles '@' specially.
Just use the file path instead as '@' is used for the "response files" by
cmd.exe, at least under Windows 7.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-18 14:46:58 +00:00
Vadim Zeitlin
e75390d4aa No changes, just minor cleanup.
Don't call wxWindow::PrepareDC() which doesn't do anything anyhow.

Use wxBitmap::IsOk() instead of Ok().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-18 14:46:44 +00:00
Vadim Zeitlin
388feca61b Restore the use of the correct brush for toolbar background erasing.
The call to SetBrush() was mistakenly removed in r62850 but it is needed
because wxClientDC only inherits background colour but not the brush used by
DrawRectangle() call in wxToolBar::MSWEraseRect(), so the wrong colour was
used under systems < Vista.

Restore this call now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-18 14:46:38 +00:00
Vadim Zeitlin
404013f849 Correct wxDateTime::GetWeekOfMonth() for days in the beginning of January.
This function was implemented in terms of GetWeekOfYear() which made it tricky
to get it right as GetWeekOfYear() can, correctly, return week number for the
previous year for the first days of January (and also from the next one for
the last days of December).

Replace this implementation with a simple one directly counting the number of
weeks since the first of the month, this seems to be much simpler and does
pass the new unit test case which the old version failed.

Also make the unit test failures more informative by using
WX_ASSERT_EQUAL_MESSAGE() instead of CPPUNIT_ASSERT_EQUAL().

See #11561.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-17 17:51:12 +00:00
Vadim Zeitlin
a30305f8b0 Add test of accelerators using both ASCII and non-ASCII keys to the sample.
Test using 'Ctrl-A', just 'A' and 'Esc' as accelerators as all of them except
the first one were reported not to work in some cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-17 16:44:22 +00:00
Vadim Zeitlin
4f04a4fd78 Always use FVIRTKEY for the accelerators under MSW.
Not using FVIRTKEY results in problems in non-US keyboard layouts and, in
fact, we were already always using it because wxCharCodeWXToMSW() returned
true in its output IsVirtual argument most of the time.

Just do it always now and also remove IsVirtual parameter with badly (if at
all...) defined meaning from wxCharCodeWXToMSW() as it's not used anywhere any
longer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-17 16:44:09 +00:00
Jaakko Salli
bca35e84c0 Allow wxPropertyGrid::RecalculateVirtualSize() execute even if pg is not completely initialized (otherwise virtual size calculations may go wrong)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-17 14:41:57 +00:00
Stefan Csomor
4c58f5c2c2 supporting sleep mode properly, see #11557
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-17 12:15:48 +00:00
Vadim Zeitlin
c50ab33de6 Initialize all fields of EXCEPINFO object to avoid crashes later.
We could call SysFreeString() on uninitialized pointers if IDispatch::Invoke()
failed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-17 10:52:02 +00:00
Vadim Zeitlin
dc47e0adfd Correct typo in wxEVT_COMMAND_LISTBOX_DOUBLECLICKED.
An underscore was omitted between LISTBOX and DOUBLECLICKED.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-16 19:27:34 +00:00
Jaakko Salli
01c226691a Fixed display of 'InlineHelp' attribute
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-16 18:59:46 +00:00
Jaakko Salli
1bc74ec9b7 Slightly improved check whether or not to execute wxPropertyGrid::RecalculateVirtualSize()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-16 18:48:42 +00:00
Paul Cornett
b50e6e416e preserve type when loaded image is rescaled, #11543
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-16 17:10:52 +00:00
Paul Cornett
d6b17e1aa3 allow setting client size to work properly before window is shown
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-16 06:32:23 +00:00
Vadim Zeitlin
9337df1f34 Avoid GTK+ errors when using AUI wxPseudoTransparentFrame hack.
wxPseudoTransparentFrame is not a top level window at all and the code in
wxGTK wxTopLevelWindow::DoSetSizeHints() fails for it when it is called from
wxWindowBase::CreateBase() because of it and spits GTK+ errors as it calls
gtk_window_set_geometry_hints() with NULL widget.

Fix this by simply skipping wxTopLevelWindow implementation of this method in
wxPseudoTransparentFrame. A better fix would be to get rid of this hack
completely, of course.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-15 22:44:54 +00:00
Vadim Zeitlin
c15cc7fa26 Remove asserts in wxChoicebook::Get/SetPageImage().
It's better to silently return an error code than assert when these methods
are called as their failure is relatively harmless and the user code may call
them via base class pointer without caring if it works with a control which
supports images or not.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-15 21:12:06 +00:00
Václav Slavík
c59422a40f define NDEBUG if not using debug CRT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-15 15:38:05 +00:00
Václav Slavík
e94be2b132 compilation fix for wxUSE_IMAGE=0 case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-15 11:25:11 +00:00
Václav Slavík
b5c4f0dfd9 compilation fix for wxUSE_IMAGE=0 caseinclude/wx/iconbndl.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-15 11:24:50 +00:00
Václav Slavík
bdf14bff10 PCH compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-15 11:24:17 +00:00
Vadim Zeitlin
f03c22f9b3 Avoid painting generic wxDataViewCtrl if it has no columns.
The code in wxDataViewMainWindow::OnPaint() relied on having at least the
first column and didn't work for a completely empty control. Just don't paint
it at all in this case as it's unnecessary anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-14 19:17:12 +00:00
Jaakko Salli
46fa86f720 Make wxPG_EX_MULTIPLE_SELECTION behave more like a Windows list box (regarding Ctrl and Shift keys)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-14 16:13:21 +00:00
Jaakko Salli
5ff9067686 Determine better whether the property editor needs to be refreshed in wxPGProperty::SetValue()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-14 15:33:50 +00:00
Jaakko Salli
b5aaf62e97 'Set to Unspecified' -> 'Set Value to Unspecified'
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-14 15:18:52 +00:00
Jaakko Salli
cae41346c9 Set correct m_state in wxPGCheckBoxEditor::SetValueToUnspecified()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-14 15:17:02 +00:00
Jaakko Salli
269619bfbd Always refresh the editor when setting property value to unspecified.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-14 15:15:35 +00:00
Jaakko Salli
5900bb7c5f Fixed unspecified property value rendering for various editor types (including check box)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-14 15:12:29 +00:00
Vadim Zeitlin
5851e64078 Restore correct access to wxGenericStaticText::Set{Font,Label}.
Accessibility of these methods was accidentally changed to protected in r62821
and this broke wxUniv compilation, make them public again.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-14 12:41:55 +00:00
Vadim Zeitlin
03773e400b Remove unnecessary Mac-specific TOOLKIT_LOWERCASE setting.
TOOLKIT is never set to "MAC" at all (it is one of OSX_{CARBON,COCOA,IPHONE})
so it is not necessary to test for it. And for the other cases the special
logic for OS X ports was the same as the general case so it seems to be
unnecessary as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-13 12:52:59 +00:00
Vadim Zeitlin
80aa2a2f06 Add --with-[osx_]iphone switch to configure.
This is another Mac (wxUSE_MAC is defined) port with TOOLKIT=OSX_IPHONE.

Also use this port by default for arm-apple-darwin platforms.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-13 12:52:53 +00:00
Vadim Zeitlin
06a0867994 Test for sw_vers availability before calling it in configure.
There is no sw_vers when cross-compiling, just assume 10.4 system in this
case and point the user to --with-macosx-version-min which can be used to
override this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-13 12:52:47 +00:00
Vadim Zeitlin
f10f4c8785 Rename --with-cocoa configure switch to --with-old_cocoa to avoid confusion.
Change --with-cocoa to be synonym for --with-osx_cocoa, add --with-carbon as a
synonym for --with-osx_carbon for consistency and --with-osx as a synonym for
--with-mac.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-13 12:52:42 +00:00
Jaakko Salli
f525476870 Added wxPropertyGridManager header support; Refactored wxPropertyGrid DoSetSplitterPosition() code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-13 12:00:04 +00:00
Stefan Csomor
9804064630 rearranging contentview, adding toolbar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-12 14:01:28 +00:00
Stefan Csomor
de7cb655ae rearranging contentview, adding toolbar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-12 13:40:24 +00:00
Jaakko Salli
00b4dbd74e wxHeaderColumnBase -> wxHeaderColumn; Fixed UpdateColumnWidthToFit() sample code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-12 12:24:28 +00:00
Jaakko Salli
70708ad282 On Windows, force read-only property editor wxTextCtrl to have 'white' background (for now...)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-12 10:10:15 +00:00
Jaakko Salli
9d136b8b50 Added a proper log frame to the propgrid sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-12 09:59:20 +00:00
Jaakko Salli
5405bfb439 Generate wxPropertyGrid splitter (column divider) events: wxEVT_PG_COL_BEGIN_DRAG, wxEVT_PG_COL_DRAGGING, wxEVT_PG_COL_END_DRAG
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-12 09:38:10 +00:00
Jaakko Salli
9dac189e72 Fixed incorrect use of RemoveAt() in wxPropertyGridPageState::SetColumnCount() (fixes #11539)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-11 15:50:04 +00:00
Vadim Zeitlin
cc26010927 Add support for stretchable spaces to wxToolBar.
Stretchable spaces consume all extra toolbar space not allocated to the fixed
size items. They can in particular be used to right-align (some) toolbar tools.

Add and document the new API, change the sample to show it and implement it
for MSW, GTK and OS X/Cocoa.

Also refactor MSW background erasing/repainting code to avoid duplicated calls
to DrawThemeBackground(), call it from a new helper MSWEraseRect() function.

Note that we may want to add support for "invisible" separators, IOW
non-stretchable spaces. This could be easily done for MSW after the changes in
this commit and is supported natively by GTK+ and Cocoa so implementing this
would be trivial if there is any interest.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-10 03:04:19 +00:00
Vadim Zeitlin
0b83552acf Rename gtk{,1}/tbargtk.{h,cpp} to toolbar.{h,cpp}.
We don't use crptknm$port.cpp naming convention even for MSW any more and
there is really no reason to continue to do it for just this one file in
wxGTK.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-10 03:04:07 +00:00
Vadim Zeitlin
563f85a956 Set correct toolbar width in wxMSW wxFrame.
The hack introduced in r22410 artificially set wrong size for toolbar under
MSW. This completely breaks any calculations that can be done using it (e.g.
to find the space available for the stretchable part of the toolbar) and is
completely and utterly unexpected.

Revert it, toolbar flicker must be dealt in another way if it is still a
problem.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-10 02:59:16 +00:00