Commit Graph

53057 Commits

Author SHA1 Message Date
Jaakko Salli
a516284f67 Instead of just deleting m_popupInterface, call Destroy() of its wxWindow-based popup control obtained via GetControl() member function. Also still delete m_popupInterface if there was no popup control, or if it was implemented as a separate class (versus being multiple-inherited along side wxComboPopup, as has been the common practice).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 18:30:56 +00:00
Václav Slavík
0b669520c2 Always use gtk2-compat.h definitions.
We support building against newer GTK+ version and using an older
one at runtime, so we must provide our implementations of these
functions even if GTK_CHECK_VERSION would indicate the function is
already available in GTK+.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 17:23:43 +00:00
Václav Slavík
8bffcd08c2 Renamed wx/gtk/private/compat.h to gtk2-compat.h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 17:23:39 +00:00
Paul Cornett
08f0950400 more avoiding direct struct access
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 07:17:05 +00:00
Paul Cornett
281644b4c1 remove unused mouse event and redundant checks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 06:51:28 +00:00
Paul Cornett
2bca0d2033 a few changes for gtk3, avoiding direct struct access
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 06:38:44 +00:00
Václav Slavík
d58a44c371 Compilation fix for r67312: add explicit cast to GtkStateType.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-26 18:09:58 +00:00
Václav Slavík
fc9ab22a76 Use accessor functions instead of deprecated GTK+ macros.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-26 15:49:57 +00:00
Julian Smart
8337ae1e40 Fix for image saving speedup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-25 16:42:02 +00:00
Václav Slavík
80b8c88a63 Don't use deprecated gtk_widget_ref().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-25 15:08:25 +00:00
Václav Slavík
d6355645e7 Revert r67137.
GTK_DISABLE_SINGLE_INCLUDES causes trouble with other included
libraries (libgnomeprint this time) too. This check for trivially fixed
problems is not worth the continuing trouble.

Fixes #13078.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-25 11:00:56 +00:00
Paul Cornett
fbf49ef2b1 fix tool item enter/leave notify, fixes #13083
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-24 16:52:55 +00:00
Vadim Zeitlin
af2fdacdb8 Set m_inheritBgCol flag in wxPanel with a background bitmap.
This ensures that the panel background is used by its transparent children
under wxMSW even when the panel itself is inside a wxNotebook with themed
background: making InheritsBackgroundColour() return true prevents the
notebook from overriding our background.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-24 16:08:11 +00:00
Julian Smart
4dc7ae1ae8 Speeded up image saving to XML (WriteHex).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-24 10:59:47 +00:00
Paul Cornett
879e4f6e19 move deprecated GtkTooltips forward declaration to one place that still needs it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 17:37:14 +00:00
Paul Cornett
558a94bd4a clean up wxGTK tooltip code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 17:36:10 +00:00
Dimitri Schoolwerth
2a6545a5a7 Fixed buffer overflow when saving certain images in the Windows icon format.
When an image did not have a width with a multiple of 4 the calculations for the number of padding bytes (to get a scan line DWORD aligned) would be wrong. This caused a buffer overrun when saving the 1 bits per pixel mask.

Fixes #12937.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 15:20:25 +00:00
Václav Slavík
fce2dc61c3 Only react to clicks on the checkbox in wxDataViewToggleRenderer.
Previously, left click anywhere in the cell toggled the checkbox.
This was unexpected when the cursor was far from the checkbox
in a wide column. With this change, one has to be over the
checkbox to toggle it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 13:57:52 +00:00
Vadim Zeitlin
09bdb1cb3e Add WXK_CONTROL_A..WXK_CONTROL_Z constants.
These key codes provide nicer symbolic values for ASCII values in 1..26 range
generated by Ctrl+Letter keys.

Closes #13075.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 12:59:59 +00:00
Vadim Zeitlin
6c1de05621 Prevent event generation in wxGtkCalendarCtrl::SetDate().
Block not only gtk_day_selected_callback() but also gtk_month_changed_callback()
as we don't want wxEVT_CALENDAR_PAGE_CHANGED generated neither when calling
SetDate().

This fixes partial resetting of the just set value in wxDatePickerCtrl as
calling SetDate() there resulted in the date being reset from inside it and
the behaviour of the control was clearly wrong as could be seen in the widgets
sample.

Closes #13073.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 10:37:38 +00:00
Vadim Zeitlin
6418e3ae72 Use correct month in the date picker page of the widgets sample.
Months returned by wxDateTime::GetMonth() start from 0 while people mostly
expect to have 1-based months in the UI.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 10:37:35 +00:00
Václav Slavík
9445e542a0 Fix <object_ref> processing to respect overridden attributes.
r60494 accidentally broke this, by adding faster code path for
child-less <object_ref>s. Unfortunately, this made it ignore
<object_ref>s without children, but with attributes overrides.

Fixes #13061.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 19:13:28 +00:00
Stefan Csomor
c560088c4d wiring notifications
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 18:44:43 +00:00
Vadim Zeitlin
dd1af40c59 Add wxUSE_THREADS checks around wxMSW functions dealing with threads.
This removes the code unneeded in wxUSE_THREADS==0 build and also fixes
compilation of wxGUIAppTraits::WaitForThread() which didn't compile any more
with wxUSE_THREADS==0 since r67185.

Closes #13050.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 17:15:56 +00:00
Vadim Zeitlin
20ca563279 Don't consider fully opaque bitmaps as having alpha in wxMSW.
Remove the alpha channel from the DIB we create not only if all of its pixels
are fully transparent but also if they are all fully opaque. This prevents us
from erroneously creating bitmaps with alpha channel when none is needed nor
expected.

Closes #13056.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 17:15:49 +00:00
Vadim Zeitlin
23a9142e27 Add wxText{Input,Output}Stream::Get{Input,Output}Stream() methods.
These methods simply return the underlying low-level stream.

See #10807.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 17:15:45 +00:00
Vadim Zeitlin
b83144c46f Post size events to the event handler and not window itself.
Post the artificial wxSizeEvent to the window event handler and not window
itself in SendSizeEvent() as otherwise any event handlers wouldn't see this
event at all.

Closes #13066.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 17:15:38 +00:00
Vadim Zeitlin
b78a53aca0 Use disabled version of normal bitmap for disabled one in wxMSW::wxButton.
Initialize the disabled button bitmap with a greyed out version of the normal
one instead of using the same normal bitmap for it. This is more consistent
with the other ports and makes more sense.

Closes #13070.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 17:15:34 +00:00
Stefan Csomor
38e4bfde17 first version of osx_cocoa implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 16:40:28 +00:00
Stefan Csomor
869aa41b51 only remove from parent if not content view, fixes #13068
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 16:39:26 +00:00
Vadim Zeitlin
a3b89fa936 Correctly align background brush when erasing owner drawn bitmaps in wxMSW.
Add a hack to work around the problem with background alignment when drawing
the owner-drawn buttons in wxMSW. This fixes the alignment for any custom
brushes used for background painting but doesn't help with user-defined
EVT_ERASE_BACKGROUND handlers which still don't work well with the owner-drawn
buttons. Unfortunately DrawThemeParentBackground() remains a mystery and I
couldn't understand why not only doesn't it position the DC correctly on its
own but also ignores any attempts to do it manually.

This also doesn't help with the stubbornly remaining one pixel non-transparent
border around non-owner-drawn buttons which I just can't get rid of.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 15:07:20 +00:00
Dimitri Schoolwerth
4c51a665c6 Fixed various typos.
Applied patch by snowleopard2 fixing a bunch of typos such as misspellings and double words in the documentation. Combined the patch with some local queued typos waiting to be committed as well as adding new typo fixes inspired by the patch.

Function names with American spelling were not changed nor was third-party code touched. The only code changes involve some changes in strings that are translated ("Can not" -> "Cannot").

Closes #13063 (again).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 14:17:38 +00:00
Bryan Petty
57ab6f2314 Extensive documentation typo patch (closes #13063).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 14:08:30 +00:00
Dimitri Schoolwerth
e4e0d4702b No code changes, removed tabs from source file.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 14:06:20 +00:00
Jouk Jansen
6853f5fbf9 Update OpenVMS makefiles for WXMARKUP
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 10:57:09 +00:00
Jaakko Salli
9cb80f3fa3 To have better support for themed and custom backgrounds for wxMSW wxComboCtrl, use WS_EX_COMPOSITED and wxBG_STYLE_ERASE instead of custom double-buffering (when made possible by the OS version)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 09:56:40 +00:00
Jaakko Salli
3e4e0908a7 In wxComboCtrlBase::DrawButton(), let the button background rendering changes also apply to buttons with user-defined bitmaps
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 08:59:59 +00:00
Jaakko Salli
ef72c99e5b Added entry for recent wxComboCtrl background rendering changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 08:45:48 +00:00
Stefan Csomor
32f701b096 fixes #13064
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 07:10:41 +00:00
Stefan Csomor
8ceae028c1 fixes #12579
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 06:44:08 +00:00
Vadim Zeitlin
55a40ad970 Fix wxMSW build without PCH after recent wxPanel changes.
Add missing include of wx/bitmap.h in !WX_PRECOMP case.

Closes #13060.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-21 11:00:03 +00:00
Vadim Zeitlin
019044877a Allow using milliseconds in wxLog timestamp.
Use wxDateTime::UNow() instead of time() and wxDateTime::Format() instead of
localtime() to make it possible to use "%l" specifier in wxLog time stamp.

Closes #13059.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-21 10:59:59 +00:00
Vadim Zeitlin
ab4387390c Added a simple example of semi-transparent window to the erase sample.
Show how to create a custom control with transparent background.

Notice that this doesn't work in wxGTK currently.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-20 22:33:25 +00:00
Vadim Zeitlin
fc0ae1e319 Remove keyboard-related code from the erase sample.
This code seems irrelevant in this sample and just complicates it
unnecessarily.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-20 22:33:21 +00:00
Vadim Zeitlin
c5d0e69d7d Don't draw the mysterious black rectangle in the erase sample.
The black rectangle drawn in EVT_PAINT handler in the sample prevented the
custom background from showing through the wxStaticBitmap. Maybe it was
initially done intentionally but this makes the sample look broken so just
don't do this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-20 22:33:16 +00:00
Dimitri Schoolwerth
4d37f425ff Made some TIFF reading adjustments.
Read a few TIFF tags that assist with having a similar TIFF file when saving the image again, instead of (by default) always saving as a 24-bit RGB image. Also, in accordance with libtiff, allow reading X and Y resolution values even if the resolution unit tag is not set.

Applied (modified) patch by scottb. Closes #13015.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-20 19:48:03 +00:00
Vadim Zeitlin
035fa7f78c Fix test for wxHAS_GENERIC_PANEL for PCH-less build.
wxHAS_GENERIC_PANEL is only defined in wx/panel.h so test for it after
including this file, not before.

This fixes link errors due to missing wxPanel symbols in PCH-less builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-20 11:50:47 +00:00
Stefan Csomor
2c9dad08b2 spinctrl on mac is generic, so the peer is a userpane, fixes #13058
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-20 11:50:39 +00:00
Jaakko Salli
bed867e3f9 Added wxComboCtrlBase::m_hasTcBgCol. Re-using base wxWindow::m_hasBgCol was trouble.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-20 11:15:17 +00:00
Jaakko Salli
10ba26777d Redone (generic) wxComboCtrl background painting and handling. The 'actual' wxWindow background colour is now largely ignored and overridden to refer the text-area's background colour instead (as is usually the case with controls like this). Base 'transparent' background is now only painted when double-buffered rendering is required, and otherwise delegated to the system, as appropriate. This should significantly improve control's appearance and compliancy with GTK+ and OS X themes and custom backgrounds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-20 10:59:22 +00:00