Commit Graph

15020 Commits

Author SHA1 Message Date
Stefan Neis
d0a341b34a Include some more declarations & defines.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-29 14:36:22 +00:00
Stefan Neis
21317c46b4 Reordered "extern" and WXDLLIMPEXP_CORE specifiers; fixes #13816.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-29 11:26:05 +00:00
Vadim Zeitlin
bde56d09bb Restore wxEVT_MENU_CLOSE generation under Windows 95 after r70151.
WM_UNINITMENUPOPUP is "only" available since Windows 98/2000 so restore the
old code using WM_EXITMENULOOP as fall back, just to avoid any regressions for
people who might still be using these systems.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-28 17:47:21 +00:00
Vadim Zeitlin
7f3f059ac5 Complete wxEVT_MENU_{OPEN,CLOSE} implementation in wxMSW and wxOSX.
Set the wxMenu correctly for wxEVT_MENU_CLOSE events in wxMSW.

Set the menu id correctly to allow wxMenuEvent::IsPopup() to work for both
wxEVT_MENU_OPEN and wxEVT_MENU_CLOSE in wxOSX.

Closes #11313.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-28 13:51:17 +00:00
Vadim Zeitlin
864181f4f6 Implement wxNotebook::CalcSizeFromPage() for wxGTK.
The implementation is far from perfect as it relies on hard-coded margins but
is better than nothing as it allows wxNotebook best size determination and
SetPageSize() method to work correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-24 18:19:26 +00:00
Paul Cornett
2861be020e remove improper use of paste operator
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-24 16:46:26 +00:00
Vadim Zeitlin
8c167bb199 Fix fatal bug with deleting the old contents in wxScopedArray::reset().
"delete" was wrongly used instead of "delete[]".

Closes #13806.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-24 15:43:14 +00:00
Vadim Zeitlin
7182483bf7 Use the correct function type cast in EVT_WEBKIT_NEW_WINDOW.
Use wxWebKitNewWindowEventHandler to perform a proper static_cast<>, which
detects incorrect casts during compilation, instead of
wxWebKitNewWindowEventFunction which was just doing an unsafe C-style cast.

Cloes #13805.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-24 15:43:12 +00:00
Vadim Zeitlin
70ef16f4e2 Add EVT_FSWATCHER event table macro.
It was documented, and ought to have existed anyhow for consistency with
wxEVT_FSWATCHER, but wasn't defined. Do it now.

Closes #13804.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-24 15:43:08 +00:00
Vadim Zeitlin
a601696dd5 Add EVT_WINDOW_MODAL_DIALOG_CLOSED() event table macro.
Add it for consistency with wxEVT_WINDOW_MODAL_DIALOG_CLOSED.

See #13804.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-24 15:43:05 +00:00
Vadim Zeitlin
b099835e8f Fix typo in wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK in documentation.
It was misspelt as wxEVT_COMMAND_RICHTEXT_DLEFT_CLICK.

Closes #13802.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-24 15:43:01 +00:00
Vadim Zeitlin
f179a616c7 Remove references to defunct event types in comments.
No real changes, just complete the changes of r58039 by removing the
references to non-existent (any more) event types from the comments too.

Closes #13801.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-24 15:42:57 +00:00
Julian Smart
c1431e59e3 Applied #13803: wxRichTextCtrl: missing event-table macro (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-24 11:39:40 +00:00
Steve Lamerton
b8800bfe8b Fix typo in ADD_RAW_IID macro.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-24 10:05:31 +00:00
Paul Cornett
7bc57fd972 fix tests for WXWIN_COMPATIBILITY_2_8, closes #13800
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-23 05:59:59 +00:00
Steve Lamerton
9f194b9de0 Use OLE helper macros in wxWebView to reduce the amount of duplicated code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-22 19:16:12 +00:00
Steve Lamerton
4b4ed3c942 Add new ADD_RAW_IID OLE helper macro to allow use with classes that do not start with IID_I.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-22 19:14:58 +00:00
Steve Lamerton
d04002224e Mark various OLE helper functions as DLL exported so they can be used from other libraries.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-22 19:08:43 +00:00
Vadim Zeitlin
4ffdb64018 Add wxLogFormatter to allow easier wxLog output customization.
Delegate the log string creation to wxLogFormatter. This allows defining a
custom object of a class derived from it to customize the log output instead
of having to override DoLogRecord() in wxLog itself.

Closes #13792.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-22 13:35:01 +00:00
Robin Dunn
2cc6b51b90 Avoid a problem in Phoenix by making UpdateMacScrollWindow not be pure virtual.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-22 01:26:11 +00:00
Vadim Zeitlin
fceac6bbfe Provide native implementation of wx{Date,Time}PickerCtrl for wxOSX/Cocoa.
Use NSDatePicker to implement both of these controls. Almost all of
wxDatePickerCtrl styles are not supported in the native version but the basic
functionality does work and looks much better than the generic version (which
is still available as wxDatePickerCtrlGeneric if needed) under Mac.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-20 21:27:14 +00:00
Vadim Zeitlin
36d07f78e4 Added helpers for translating between wxDateTime and NSDate.
These functions will be used in the upcoming native implementations of
wxDatePickerCtrl and wxTimePickerCtrl but could also be reused elsewhere in
wxOSX/Cocoa, notably in wxDataViewCtrl where strange ad hoc code is currently
used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-20 21:27:09 +00:00
Vadim Zeitlin
ee4d438064 Added support for wxEXEC_MAKE_GROUP_LEADER to wxExecute().
Map it to the native CREATE_NEW_PROCESS_GROUP flag as it's broadly similar to
Unix semantics.

Closes #13676.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 12:54:48 +00:00
Vadim Zeitlin
1c959a62ce Add possibility to set item background in generic wxDataViewCtrl.
Added wxDataViewItemAttr::SetBackgroundColour() and code to honour it in the
generic implementation of wxDataViewCtrl.

Closes #12621.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 12:54:38 +00:00
Vadim Zeitlin
02106526ea Don't use dummy "inline" in wxDEPRECATED_CONSTRUCTOR definition.
Apparently we need this bogus "inline" for g++ < 3.4 but there is no reason to
use it for the other compilers and this results in linking errors with e.g.
MSVC, so remove it.

Closes #13775.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 12:54:32 +00:00
Vadim Zeitlin
75cb911c7c Added wxFilePickerCtrl::SetInitialDirectory().
This method allows to configure the initial directory to be shown when
browsing for files in an initially empty wxFileDirPickerCtrl.

It is also available for wxDirPickerCtrl but is less useful there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-18 12:34:47 +00:00
Vadim Zeitlin
913ce2990e Make wxPalette ctor and Create() const-correct in wxMSW.
The input data is never modified so should be const (it is also documented as
being const and actually is const in the other ports).

Closes #13776.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-17 23:52:47 +00:00
Vadim Zeitlin
ecc610f1af Corrected the name of EVT_WEB_VIEW_ERROR event table macro.
It was mistakenly spelt EVT_WEB_VIEW_ERRROR.

Closes #13772.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-17 23:52:40 +00:00
Vadim Zeitlin
c05b000c71 Incremented the version number to 2.9.4 everywhere.
The misc/scripts/inc_release script was used to update the versions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-16 22:12:49 +00:00
Stefan Csomor
309f2b2031 adding defaults for Xcode builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-12 15:54:40 +00:00
Stefan Csomor
3d909cc42f reverting r69387 and r69389, fixes #13737
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-12 15:43:33 +00:00
Vadim Zeitlin
4cf1a9bf4a Ensure that Enter key presses are never stolen from wxButton in wxMSW.
This commit fixes the following bug: when an in-place editor control containing
an embedded button was used in wxDataViewCtrl, pressing Enter on the button
would close the editor, accepting changes, instead as (generic) wxDataViewCtrl
intercepts WXK_RETURN in its EVT_CHAR_HOOK handler. To prevent this from
happening, wxButton now handles EVT_CHAR_HOOK itself and never lets the parent
window intercept it if it's for WXK_RETURN. To ensure that normal
wxEVT_KEY_DOWN and wxEVT_CHAR are still generated in this case, wxButton
handler calls the new wxKeyEvent::DoAllowNextEvent() method that was added to
allow suppressing EVT_CHAR_HOOK only, without affecting the subsequent events.
DoAllowNextEvent() is currently only used in wxMSW but support for it was also
added to wxGTK and (both) wxOSX ports.

See #9102.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-11 17:03:56 +00:00
Robin Dunn
5eb16fe200 Use default values for some parameters of wxSizerItem and wxGBSizerItem ctors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-10 04:34:06 +00:00
Vadim Zeitlin
25fe875df6 Restore mouse capturing/releasing in wxPopupTransientWindow under MSW.
Partially revert the changes of r69350 to restore EVT_IDLE handling of
wxPopupTransientWindow under MSW. It turns out that we must release the mouse
for the embedded controls to work.

It would be better to solve the problem differently, e.g. perhaps maybe only
releasing mouse capture when mouse is clicked as the current code is fragile
but for now at least restore the functionality that used to work.

Closes #13740.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-09 15:20:55 +00:00
Vadim Zeitlin
4fe4a7c50f Add wxEXEC_HIDE_CONSOLE flag allowing to unconditionally do it under MSW.
Also renamed wxEXEC_NOHIDE to wxEXEC_SHOW_CONSOLE for symmetry (keeping the
old name for compatibility, of course).

Extend exec sample to allow easily testing the different flags and adding more
of them later.

See #13676.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-08 20:22:55 +00:00
Vadim Zeitlin
7ef791557a Allow using wxEvtHandler::Bind() with IBM xlC compiler v7+.
xlC 7 seems to be able to deal with this code without problems under AIX 5.3
so white list it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-08 15:58:45 +00:00
Vadim Zeitlin
4ce3452d32 Only declare wxComboBox::Popup/Dismiss() when using Cocoa in wxOSX.
wxOSX/Carbon doesn't use the core implementation file so declaring these
methods for the Carbon version resulted in linking errors. Just don't do this,
they're not implemented for Carbon anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-08 14:47:37 +00:00
Vadim Zeitlin
ff8cb900da Implement wxComboBox::Popup() and Dismiss() for wxOSX/Cocoa.
Unlike in the other ports, these methods currently don't generate any events
under OS X because these events are never generated at all there.

Closes #12642.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-07 23:41:06 +00:00
Vadim Zeitlin
30e92ba333 Remove vertical wxTextCtrl adjustment hacks for wxMSW in wxComboCtrl code.
Because wxTextCtrl used to wrongly report its best size in wxNO_BORDER case
under MSW, wxComboCtrl manually adjusted its position to work around this.
However since r69066 wxTextCtrl::GetBestSize() was fixed and now these
adjustments resulted in wrong vertical position for the control.

Just remove all manual adjustments completely now to fix this.

Closes #13722.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-07 14:05:11 +00:00
Vadim Zeitlin
64652bee94 Enable wxEvtHandler::Bind() for Sun CC.
At least 5.10+ are good enough to compile it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-07 00:59:46 +00:00
Vadim Zeitlin
ecb35373ee Add virtual dtor to wxCustomBackgroundWindowBase.
Suppress g++ warnings about a class with virtual methods but non-virtual dtor
by making the dtor virtual even if we don't need it to be virtual in this
class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-04 23:57:36 +00:00
Vadim Zeitlin
f27f9577ca Allow 2-step creation of wxGenericProgressDialog.
Add default ctor and Create() with the same parameters as the non-default
ctor.

Closes #13555.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-03 23:52:39 +00:00
Vadim Zeitlin
64ac3db840 Update all controls using in-place editors to handle Escape/Return correctly.
Define EVT_CHAR_HOOK handlers to ensure that pressing Escape/Return while an
in-place edit control is active affects only it and is not used for the
keyboard navigation.

Closes #9102.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-02 00:50:41 +00:00
Vadim Zeitlin
4e4841b0ba No changes, just move wxTreeCtrlBase ctor to the source file.
Move inline ctor out of line to prepare for changing it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-02 00:50:33 +00:00
Vadim Zeitlin
3a95f73c00 Make wxEVT_CHAR_HOOK propagate upwards and send it to the window itself.
Send wxEVT_CHAR_HOOK events to the focused window itself but make them
propagatable to ensure that the parent windows (including the top level
parent) still get it. This still allows the TLW parent to intercept keyboard
handling in its child but allows the child (or an intermediate parent window)
to have some say in the matter.

See #9102.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-02 00:50:25 +00:00
Vadim Zeitlin
e45d90901d Added wxKeyEvent ctor for creating event of the different type for same key.
This is useful for implementation code in a couple of ports so provide a
higher level ctor doing this instead of having to use a copy ctor and then
manually changing the event type.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-02 00:50:19 +00:00
Vadim Zeitlin
dfc7216da7 Refactor wxKeyEvent copying code.
Avoid duplication between copy ctor and assignment operator.

Also extract the assignment of everything not including the event type in a
reusable function as this can be useful for key event generation code in wxGTK
and possibly other ports.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-02 00:50:16 +00:00
Vadim Zeitlin
b9697cb410 Added wxCriticalSection::TryEnter() method.
This is similar to wxMutex::TryLock() and useful for the same reasons.

Closes #13638.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-01 14:22:15 +00:00
Paul Cornett
0f29501b66 Fix crash when appending menuitem after removing it from another menu.
Also remove unused return value from GtkAppend

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-01 06:57:44 +00:00
Vadim Zeitlin
37bea8d229 Don't include all wx/xxx/webviewhistoryitem_xxx.h headers.
Only one of these headers is available for each platform so include at most
one of them.

Closes #13705.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-30 10:21:43 +00:00