Commit Graph

50202 Commits

Author SHA1 Message Date
Kevin Ollivier
509da835c5 To support playing async sounds on the stack on Mac, do not delete the wxSoundData when its wxSound object is destroyed if it's in the queue of sounds to be played. Instead, mark it to be deleted and delete it after it has played.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-30 17:41:29 +00:00
Michael Wetherell
c896c76129 Repair the stream tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-30 17:39:47 +00:00
Michael Wetherell
61a69259c4 Support large files with stdio on mingw.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-30 17:38:22 +00:00
Jaakko Salli
34c25d47c9 wxOwnerDrawComboCtrl -> wxComboCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-30 17:07:16 +00:00
Jaakko Salli
ebc8f4d354 Updated entries regarding wxPropertyGridManager
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-30 17:06:36 +00:00
Vadim Zeitlin
4e2c2c7062 Don't create an invalid iterator in wxDateTime::ParseTime().
Creating an iterator pointing beyond the string end resulted in an assert from
MSVC 9 CRT. Fix this by using wxString ctor taking length (which may be
greater than the length of the string) instead of the one taking two iterators
(which must both be valid).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-30 13:46:27 +00:00
Vadim Zeitlin
ede4fb2ffa Explicitly mention MSVC std::fstream(wxString) incompatibility issue.
The fact that std::fstream provides a non-standard constructor in MSVC CRT
implementation is sufficiently confusing to merit a special mention.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-30 13:38:06 +00:00
Stefan Csomor
b7a015cbb4 fixing SetSubMenu for OSX_Cocoa, fixes #11581
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-30 08:35:01 +00:00
Jaakko Salli
e16bff8e62 Changed wxPropertyCategory to use same cell rendering code as regular properties. This allows labels for category columns other than the first. Rendering code was heavily modified to allow 'merging' of cells when needed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-29 16:04:40 +00:00
Vadim Zeitlin
62f6be4448 Ensure that frame is re-laid out when its toolbar is deleted.
The code in wxFrameBase::SetToolBar() didn't work correctly when toolbar was
unset using SetToolBar(NULL) because the frame toolbar pointer was reset
before layout was done resulting in the frame not recognizing its (still
existing) toolbar child as one of its bars and so nothing was done at all when
the frame had a single child, as in the toolbar sample.

Correct this by carefully ensuring that the toolbar pointer is still set at
the moment of the layout but hide the toolbar to ensure that no place is
allocated for it.

Also mention that it is not necessary to call SetToolBar(NULL) at all if the
toolbar is being deleted anyhow in the sample as toolbar does this itself in
its destructor.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-28 16:18:37 +00:00
Vadim Zeitlin
93ffd498e6 Correct initial value of "Toggle toolbar" check menu item in the sample.
This item should initially be checked because the toolbar is initially shown.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-28 16:18:30 +00:00
Vadim Zeitlin
774f6b312a Account for cells spanning multiple grid cells better when autosizing.
The total size of a multi-span cell was accounted for each row/column it
covered, resulting in too much space being allocated to them.

Only take into account the average size of each row/column computed by
dividing the total cell size by number of rows/columns it occupies to fix
this.

Closes #11498.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-27 19:40:46 +00:00
Vadim Zeitlin
ea99e8e31e Return the kind of cells span from wxGrid::GetCellSize().
Behaviour of GetCellSize() may be very surprising for the unwary as it can
return negative or null "size" of the cell.

Add CellSpan return value to allow the caller to check what kind of cell are
we dealing with easier.

Also document the new return value as well as the function (and matching
SetCellSize()) itself carefully as its behaviour is far from obvious.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-27 19:40:41 +00:00
Vadim Zeitlin
653351d1cc Don't call SetMinSize() when creating the window if no initial size was given.
Calling SetMinSize() is unnecessary in this case. It also results in GTK+
errors when creating wxFileDialog as it is not created yet when this is called
(but it does take care to pass wxDefaultSize to this function as its size
can't be set yet).

See r62814 and r62817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-27 19:40:28 +00:00
Vadim Zeitlin
7b9cb2d1ef Avoid defining COMPILER_PREFIX for autoconf format.
This fixes a fatal bakefile error due to undefined COMPILER variable when
using wx presets with autoconf backend introduced in r62458.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-27 19:40:22 +00:00
Vadim Zeitlin
a49318f1c9 Correct wxUSE_MACOSX_VERSION_MIN setting when running under OS X 10.4.
sw_vers outputs e.g. 10.4.11 under 10.4 so comparing its result with just 10.4
is wrong, match it against "10.4*" using case instead to ensure that 10.4.11
is indeed recognized as 10.4.

Closes #11579.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-27 19:40:15 +00:00
Vadim Zeitlin
4d056a68ad Document wxString::operator<<(wxUniChar).
wxUniChar overload was somehow omitted from the list.

Closes #11568.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-27 19:40:08 +00:00
Vadim Zeitlin
3e97b55017 Override some methods in wxF(F)ileStream to resolve ambiguities.
Override virtual methods IsSeekable(), GetLength() and OnSysSeek/Tell() to
forward to wxF(F)InputStream base class as otherwise it's impossible to use
them at all because of ambiguity between the versions inherited from this
class and wxF(F)OutputStream (even though the two versions should do the same
thing as they operate on the same file descriptor/handle).

Also improve documentation of these classes: provide a brief description,
correct the base classes.

Closes #11577.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-27 19:39:55 +00:00
Vadim Zeitlin
9067c6c537 Take into account the initial buttons state when creating wxGTK toolbar.
With wxMSW it is possible to call e.g. wxToolBarTool::Enable(false) on a tool
before calling wxToolBar::Realize() to create the tool in an initially
disabled state but this wasn't done in wxGTK version.

Override Realize() now under wxGTK to bring the native toolbar buttons state
in sync with the internal state of the corresponding wxToolBarTools.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-26 16:36:39 +00:00
Vadim Zeitlin
cf7715db56 Don't forward declare wxSystemColour enum.
Forward declaring enums is illegal in standard C++ and while MSVC allows this
as an extension, it doesn't compile with g++.

Just include wx/settings.h instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-26 16:36:32 +00:00
Vadim Zeitlin
88046bdac5 No changes, just fix a typo in and rephrase a comment.
Comment in wxToolBarBase::Realize() was probably copied from some
port-specific file but didn't make sense any more in common code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-26 16:36:26 +00:00
Jaakko Salli
d6ae8b5b2b Reduced unnecessary wxT usage
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-26 10:51:39 +00:00
Jaakko Salli
534090e354 Replaced 'InlineHelp' property attribute with 'Hint'; Use SetHint() wxTextCtrl and wxComboCtrl member function to set it; Added a small section about help string and hint text in propgrid overview
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-26 10:45:04 +00:00
Jaakko Salli
107defe36a Added wxComboCtrl::SetHint(), GetHint()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-26 10:33:35 +00:00
Kevin Ollivier
1665389a9a Remove the native toolbar from the frame in Destroy() rather than the destructor, as removing it in the destructor causes resize / repaint events to fire on the native control, which then goes to wx controls being deleted.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-25 20:43:43 +00:00
Kevin Ollivier
849754a451 Use NSTrackingArea when available (building for 10.5+) so that we can get mouse moved events for inactive / non-focused windows too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-25 20:40:05 +00:00
Vadim Zeitlin
7591b0bb53 Always show hint in text entries, even when they have focus.
It was impossible to show the hint for the initially focused child of a dialog
before, as the hint was hidden from the very beginning. By showing it always
we avoid this problem.

We may want to add an option/flag for SetHint() to make this configurable
later if somebody really needs to show hints only for as long as the control
doesn't have focus.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-25 11:36:54 +00:00
Stefan Csomor
0aaa6ace7e removing event handlers on non-owned windows when the destroy event is sent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-25 09:47:30 +00:00
Jaakko Salli
22a2e3fa6b Refactored a very confusing condition in wxPGComboBox item paint code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-25 09:18:04 +00:00
Jaakko Salli
5f54075053 Added wxComboCtrlBase::SetFore/BackgroundColour()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-25 09:04:53 +00:00
Stefan Csomor
03ef5fefb8 fixing parameter names
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-25 08:39:11 +00:00
Jaakko Salli
f8e4413e5e Added documentation for wxPGEditor::SetControlAppearance()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-25 08:33:56 +00:00
Vadim Zeitlin
f3d0bc4364 Erase toolbar background even if it doesn't contain any controls/spaces.
Minor correction to changes in r62971: we still need to hook WM_ERASEBKGND in
toolbar parent when painting the toolbar itself even when there are no dummy
separators in it (and so we don't need to paint them over). Without this, the
background of simple toolbars without controls was not erased correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-23 21:42:06 +00:00
Vadim Zeitlin
fe0c328904 Don't pass 0 timer ids to ::SetTimer().
Creating timers with 0 id failed because Windows SetTimer() function requires
a non-zero id. Fix this by using a (impossible at wx API level) -1 id value in
this case instead.

Closes #11392.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-23 13:56:55 +00:00
Michael Wetherell
224d978ffb Add support for large stdio files for VC 8+. What versions of the other Windows
compilers?


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-22 21:22:59 +00:00
Jaakko Salli
3e6d8c3118 Added wxPropertyGrid::SetUnspecifiedValueAppearance(); Added wxPGEditor::SetControlAppearance() for applying wxPGCell attributes on a property editor.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-22 16:12:02 +00:00
Vadim Zeitlin
69bc65e3f8 Remove the test of erase background events from the toolbar sample.
Handling erase background events for toolbars never worked for the ports other
than wxMSW and now it doesn't work for MSW neither as we need to skip erasing
the background in WM_ERASEBKGND handler to avoid flicker which would result
from erasing the background twice, from there and from WM_PAINT handler which
must do it. So don't even try to test if it works, it's unlikely to be very
useful anyhow.

This reverts the change to this file in r62805.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-22 15:37:49 +00:00
Vadim Zeitlin
bec9bf3e20 Finally really correct background erasing for wxMSW wxToolBar.
Do use TBSTYLE_FLAT and TBSTYLE_TRANSPARENT (the former actually implies the
latter) for MSW toolbar as it is the only way to avoid the flicker of toolbar
buttons. These styles were disabled before because of lack of understanding
about how they worked: with them, the toolbar supposes that its parent takes
care of erasing its background but wx didn't do this (in fact wxFrame did
accidentally erase toolbar background because of the use of Win32 client
rectangle, including tool/status bars, instead of wx client rectangle,
excluding them, in wxWindowMSW::DoEraseBackground(), but it didn't do it
correctly).

Now we allow hooking WM_ERASEBKGND events processing in a parent window by a
child one and use this to handle toolbar background erasing in toolbar itself.
We still prevent the native toolbar from drawing dummy separators and always
erase the area occupied by them ourselves and thus avoid the flicker entirely.

The only remaining flicker in the toolbar sample is that of embedded
wxStaticText control. It does appear with correctly transparent background and
bitmaps with alpha channel also (still) are drawn correctly in wxStaticBitmaps
embedded in the toolbar.

Finally, we still use solid background brush for toolbar but we can easily use
a themed background if really desired, there is just a single function to
change to do it (MSWGetToolbarBgBrush()).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-22 15:37:43 +00:00
Vadim Zeitlin
4b601a59b5 Fix best size computation for buttons without image and with empty label.
If a button was initially created with an empty label (but without image
neither), its best size was computed and cached as being null. Correct this by
giving the button the default size instead, as expected.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-22 15:37:37 +00:00
Jaakko Salli
2ec335db78 Added wxMSW wxChoice::GetClassDefaultAttributes(), initially used in wxComboCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-21 15:20:37 +00:00
Francesco Montorsi
163bd4f700 fix miscellaneous Doxygen 1.6.1 warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-20 15:07:08 +00:00
Francesco Montorsi
69aa257b83 fix a few doxygen warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-20 14:50:50 +00:00
Francesco Montorsi
7145bcfc47 add a detailed description to wxMenuItem::SetItemLabel() partially moving docs from wxMenu::Append; add usage examples; organize wxMenuItem functions in 3 sections (getters, setters, checkers) to make it easier to browse the docs; use @onlyfor tag where necessary instead of the (Windows only) text
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-20 14:24:42 +00:00
Jaakko Salli
68174df30e Added wxPropertyGrid::GetUnspecifiedValueText(). Use it instead of assuming that the unspecified value text is always an empty string.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-20 12:48:41 +00:00
Jaakko Salli
0871417690 Added some missing SetupTextCtrlValue() calls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-20 12:31:24 +00:00
Jaakko Salli
b9de6a2187 Suppress 'unused argument' warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-19 15:07:52 +00:00
Jaakko Salli
a5b1be33b7 Added wxWindowMSW::MSWGetThemeColour(); initially use it in wxComboCtrl::OnThemeChange()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-19 14:47:37 +00:00
Jaakko Salli
bc0f253462 Properly notify active editor control when it receives the focus.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-19 12:08:00 +00:00
Vadim Zeitlin
42427d8950 Document wxSpinCtrlDouble in correct header file.
The public header for this class is wx/spinctrl.h, but it was documented in
wx/generic/spinctrg.h which didn't even correspond to an existing real header
file (which is called spinctlg.h). Move the documentation to wx/spinctrl.h and
remove the old file.

Closes #11548.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-19 12:00:16 +00:00
Vadim Zeitlin
16e40259d6 Document wxSizerItem::Assign{Window,Sizer,Spacer}() methods.
Also explain why SetSpacer() and SetSizer() are deprecated.

Closes #11555.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-19 12:00:04 +00:00