Commit Graph

15511 Commits

Author SHA1 Message Date
Vadim Zeitlin
be7a086c0c Extract "Close" button creation from wxInfoBarGeneric into new function.
Such buttons may be needed in other places and it's not obvious to create
them, so add a new public wxBitmapButton::NewCloseButton() method to allow
creating them easily.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:14:14 +00:00
Vadim Zeitlin
e23fd60fe7 Change wxMSW-specific wxLoadUserResource() to accept standard RT_XXX types.
Resource types can be either strings for custom types or integers casted to a
TCHAR* for the standard ones. Using wxString for the resource type prevented
us from using the latter as any attempt to initialize wxString for such a
pseudo-string resulted in an immediate crash.

Change wxLoadUserResource() resource type parameter type to wxChar* to avoid
this and allow passing standard resource types, such as RT_RCDATE, to this
function directly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:13:28 +00:00
Vadim Zeitlin
5ddb3b8c53 Fix setting colours for the edit control part of wxComboBox.
Recognize this control as part of wxComboBox and so handle WM_CTLCOLOR for it.

To do this, override ContainsHWND() in wxComboBox and use it, on the parent
window, in wxControl::DoMSWControlColor(), if we fail to find the window
directly.

Closes #811.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:11:56 +00:00
Julian Smart
d07f2e1918 Added support for wxTEXT_ATTR_EFFECT_SMALL_CAPITALS.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-12 18:58:30 +00:00
Steve Lamerton
0bfd90b3e7 Add generic wxFileSystem support to wxWebView using wxWebViewFSHandler.
Closes #14623.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-11 09:26:58 +00:00
Steve Lamerton
e52aec972c Move wxWebViewIE missing definitions to webview_missing.h and add new definitions required for Find.
These are required as some compilers, notably MinGW and VC6, do not include up to date headers. Fixes #14621.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-10 20:02:58 +00:00
Vadim Zeitlin
44b7211689 Remove workarounds for wxTextCtrl::SetValue() events in pickers code.
Simply use ChangeValue() instead of SetValue() to avoid the unwanted events
instead of using guard variables.

No real changes but the code is simpler and shorter now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 13:35:57 +00:00
Vadim Zeitlin
06a419244f Simplify and correct setting of initial directory for wxFilePickerCtrl.
Create wxFileDialog with correct initial directory and default file name from
the very beginning instead of updating it later. This makes the code simpler
and also actually makes it work as the initial directory setting was
overwritten by setting the default path later even if it didn't contain any
directory component.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 13:34:49 +00:00
Vadim Zeitlin
f78b3d1fc0 Don't try to determine the clicked item ourselves in wxMSW wxListBox.
This doesn't work when the listbox is scrolled as the result of a click to
make the selected item fully visible and results in the index of the item
being off by 1 in the generated event which is a pretty serious problem.

Fix it by simply retrieving the item from the listbox itself, without doing
any hit testing. This seems to give the correct result in all cases and also
makes the code much simpler as we don't have to use 2 different ways of
finding the item depending on whether it was selected using the keyboard or
the mouse and makes it unnecessary to keep track of how the selection was done
completely, i.e. reverts r64498 which is not needed any more.

Closes #14635.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 00:44:26 +00:00
Vadim Zeitlin
e60165f72e Fix narrow/wide string concatenation in recently added wxSizerFlags assert.
This fixes MSVC build after r72434.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 21:48:57 +00:00
Vadim Zeitlin
71c3620229 Check validity of wxSizerFlags::Border() direction parameter.
Catch the misguided attempts to pass the size of the border as the first
parameter of the Border(direction, size) overload.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 15:46:50 +00:00
Václav Slavík
c4dae34da8 Add MUI_LANGUAGE_NAME to wx/msw/missing.h.
Fixes VC6 compilation after r72430.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 10:53:16 +00:00
Václav Slavík
01f953efb2 Add wxTranslations::GetBestTranslation().
Implement preferred language selection on modern systems (OS X, Windows
Vista+). User settings for locale (aka "regional settings") and UI
language are independent there and the UI language shouldn't be
determined from the locale.

Moreover, the OS provides a list of preferred languages, not a single
value (as with locale), so we should use the best language given user's
preferences and available translations. A Czech user may prefer Slovak
UI over English, for example, and we should use Slovak translation in
absence of Czech one in that case instead of falling back to English.

On Unix, locale is language and so things remain as before.

Notice that calling wxLocale::Init(wxLANGUAGE_DEFAULT) does the right
thing now: it sets the locale to whatever the user has configured in
regional settings and loads translations corresponding to default
wxTranslations language, which is determined as described above.
Previously, UI would be translated using a language corresponding to the
regional settings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 08:58:38 +00:00
Vadim Zeitlin
81b93d3e85 Fix wxVLogStatus definition.
This macro can be used with 2 arguments (format and argptr) or 3 (the frame
pointer as an additional first argument), so don't define it as taking 2
arguments but as a macro without arguments, as we already do for
wxVLogSysErrorfor the same reasons.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-01 22:38:40 +00:00
Vadim Zeitlin
9e565667d0 Add wxSpinCtrl::SetBase() to allow entering hexadecimal numbers.
Add a generic SetBase() API even though right now only bases 10 and 16 are
supported as we might support other ones (e.g. 8?) in the future. Implement it
for MSW, GTK and generic versions.

Add controls allowing to test this feature to the widgets sample.

Add "base" property support to the XRC handler for wxSpinCtrl, document it and
test it in the xrc sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:24:38 +00:00
Vadim Zeitlin
36090ae57e Remove wxOSX implementation of wxSpinCtrl and use the generic one.
wxOSX doesn't provide a native spinner+text control so it used a generic
implementation of wxSpinCtrl but a different one to the version found in
src/generic/spinctlg.cpp.

Just use the real generic version instead, it doesn't make sense to have two
different versions of the same generic control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:24:12 +00:00
Vadim Zeitlin
62f96636b5 Refactor text to/from double conversion in wxSpinCtrlGenericBase.
The code always used ToDouble() and Format("%g") which was a bit strange for
integer-valued wxSpinCtrl. Move the conversions to their own virtual functions
for clarity, perhaps correctness and, especially, flexibility as they will be
overridden in wxSpinCtrl soon.

Also move wxSpinCtrlGenericBase::m_format to wxSpinCtrlDouble as the base
class really doesn't need it at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:23:49 +00:00
Vadim Zeitlin
b9b1eec604 Remove wxRTTI macros from wxSpinCtrlGTKBase.
This is not a public class and it doesn't need to be appear in wxRTTI.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:23:26 +00:00
Vadim Zeitlin
cc699de848 Added wxSimplebook class: a wxBookCtrl without controller.
This new control allows the program to show one of the several pages without
allowing the user to change them (or even see that there are several of them)
himself.

This class is fully inline, so it doesn't add anything to the library and
hence doesn't need neither wxUSE_SIMPLEBOOK nor the corresponding configure
option.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:21:54 +00:00
Vadim Zeitlin
2e18fe7139 Virtualize showing/hiding the pages in wxBookCtrlBase.
No real changes, just make it possible to change how the pages are hidden and
shown in the derived classes. This is not used by any of them yet, but will be
used by wxSimplebook soon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:21:29 +00:00
Vadim Zeitlin
bfa78c63b9 Use wmain() if supported by the compiler/CRT instead of main().
This avoids a needless conversion from (originally Unicode) command line to
ANSI by the CRT and conversion back by wxWidgets and, especially, ensures that
there is no data loss if the Unicode command line arguments can't be converted
into the current charset.

See #14580.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:19:57 +00:00
Stefan Csomor
befe64edb4 add global NSLayoutManager instance
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-29 12:15:50 +00:00
Steve Lamerton
66ac040060 Add support for searching and highlighting a wxWebView.
Currently supports WebView on GTK and IE. Closes #14045.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-28 17:13:13 +00:00
Vadim Zeitlin
70f86dedfd Add page highlighting to wxRibbonBar.
Allow visually highlighting a page to make it more noticeable to the user.

Closes #14527.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:36 +00:00
Vadim Zeitlin
93b87dd910 Respect item max sizes in wxBoxSizer.
Don't give more space than the max size, if set, to wxBoxSizer elements.

Closes #11497.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:27 +00:00
Vadim Zeitlin
465de0be70 No real changes, just add wxSizerItem::AddBorderToSize() helper.
Factor out this function from GetMinSizeWithBorder() as it will be used for
max size too in a next commit.

See #11497.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:22 +00:00
Vadim Zeitlin
7d17499993 Add wxSize::DecToIfSpecified() helper.
This is similar to DecTo() but can be used even if the wxSize argument has
some components set to -1.

Notice that we don't need IncToIfSpecified() because IncTo() already works
correctly anyhow in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:15 +00:00
Vadim Zeitlin
947873e263 Restore the use of wxListCtrl in report view in wxListbook.
This reverts r71965 for wxMSW as the list mode there doesn't work correctly if
there are sufficiently many items: the native control insists on laying them
out in multiple columns which is inappropriate for wxListbook, so use report
mode for horizontal wxListbooks. Do use the list mode in the vertical case as
we do want to have multiple columns -- and not rows -- then.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 11:34:46 +00:00
Robin Dunn
c4bdd8225a fix some compile warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-14 07:13:39 +00:00
Robin Dunn
d01ca1e4d1 Update the wxVersionInfo, and don't forget to initialize the new attributes of the event class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-14 05:55:23 +00:00
Robin Dunn
54173563c3 Update new names to conform, add new event types and event attributes, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-14 05:55:08 +00:00
Robin Dunn
9b01abb82d Minimal tweaks and additions to get wxSTC compiling successfully again, with Scintilla 3.21
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-14 05:14:46 +00:00
Stefan Csomor
033f86db5f adding SetLabel -> SetTitle redirects, solves missing title updates using wxDocument/wxView
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-11 13:16:56 +00:00
Václav Slavík
e7aa9bb7c0 Show progress of printing in wxMSW.
Add the number of the page being printed as well as the total to the
wxMSW printing progress window. Improved the layout and fixed some i18n
issues in the process.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 15:52:15 +00:00
Václav Slavík
446659cac6 Return wxPrintAbortDialog from CreateAbortWindow().
Instead of returning a generic wxWindow*, return the type actually used.
It was part of the public header already, but not used in any publicly
visible way.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 15:52:08 +00:00
Václav Slavík
1a19b3210d Create wxPrintAbortDialog more sensibly.
Instead of having an empty constructor and filling the dialog with
controls from outside, do the work in the constructor.

This changes the meaning of ctor's 'title' argument, but this class'
terrible API made it unusable for direct use anyway, so it doesn't seem
to be harmful.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 15:52:04 +00:00
Vadim Zeitlin
7a7fa93b0d A better fix for wxHash{Map,Set} with g++ 4.7.
This reverts r70556, i.e. removes the scope operators added by it to all
WX_DECLARE_HASH_{MAP,SET} macros, and implements a workaround for the problem
due to the use of empty base class optimization in g++ 4.7 standard library
implementations inside the macros themselves by prepending the hasher and
comparator classes with explicit "struct".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-06 11:06:45 +00:00
Vadim Zeitlin
03a1d86352 Fix wxAutomationObject compilation in PCH-less build.
Don't use LCID in a public header, windows.h might not be included. Use WXLCID
stand-in instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-05 22:44:31 +00:00
Vadim Zeitlin
c0feacc829 Add webview library in MSVC-specific setup.h.
wxNO_WEBVIEW_LIB was documented but not implemented: webview library was never
linked in implicitly at all. Fix this by adding the missing #pragma to
msvc/wx/setup.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-05 22:44:18 +00:00
Vadim Zeitlin
a3db17b122 Make wxGraphicsContext::GetSize() const.
Closes #14556.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-03 13:05:11 +00:00
Vadim Zeitlin
b3b3713300 Make wxRect2D::Get{Position,Size}() const.
Accessors should be const.

Closes #14555.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-03 12:50:03 +00:00
Robin Dunn
440ddb750f Have wxDCImpl::GetHandle return NULL by default instead of being pure virtual.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-02 20:25:06 +00:00
Vadim Zeitlin
6d93e28adf Fix comparisons of char and wchar_t with wxUniChar[Ref].
Comparisons didn't work correctly in the other direction as they were not
reversed as needed. Fix this by adding wxDEFINE_COMPARISON_REV() macro which
defines comparisons in terms of the reverse operations and use it for both
wxUniChar and wxUniCharRef.

Closes #14547.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 16:49:36 +00:00
Vadim Zeitlin
f239af65af Allow setting LCID used by wxAutomationObject.
Default user-locale-dependent LCID may be inappropriate for some situations,
notably Microsoft Excel uses localized formula names for non-English LCIDs.
So add a way to change the LCID to use at wxAutomationObject level while
preserving the old behaviour by default.

Closes #14540.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 10:31:55 +00:00
Vadim Zeitlin
5bdcb1f324 Use (newly) added wxStaticCastVariantData() to fix wxNO_RTTI build.
Don't define wxDynamicCastVariantData if RTTI is disabled and don't use it in
wxConvertVariantToOle() code as we don't really need it there anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-30 19:16:30 +00:00
Vadim Zeitlin
7c70331e28 Add expand/collapse button to wxRibbonBar.
This allows the user to toggle the ribbon bar visibility.

Closes #14530.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-30 17:53:36 +00:00
Vadim Zeitlin
42a4299bb3 Remove workaround for slow scrolling in wxStyledTextCtrl.
We don't need to drop mouse wheel events coming too fast after the previous
commit as now scrolling in wxStyledTextCtrl works quickly enough.

Closes #9057.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:31 +00:00
Vadim Zeitlin
1043456035 Generate clipboard events for wxComboBox in wxGTK too.
These events were only generated for wxTextCtrl but should be sent for
non-readonly wxComboBox too, so refactor the code to allow its reuse from
wxComboBox.

Also add EVT_TEXT_PASTE handlers for both controls to the widgets sample for
testing.

Closes #14520.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:15 +00:00
Vadim Zeitlin
756ead6f83 Revert HasModifiers() change in behaviour, add HasAnyModifiers().
In 2.8 wxKeyEvent::HasModifiers() returned false if (only) Shift was pressed
as it tested for Control and Alt only but when it was moved to wxKeyboardState
in r55745 it started checking for all modifiers as this made more sense now
that it was used by wxMouseEvent. However it broke existing code using it,
including in wxWidgets itself (in wxTreeCtrl), so revert it now and add
HasAnyModifiers() that does check for all modifiers, including Shift.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:09 +00:00
Vadim Zeitlin
c589dc030d Add a wxGTK-specific function to set wxNotificationMessage icon name.
It's trivial to use a stock icon with the given name in wxGTK with libnotify,
so provide a way to do it. However this is not as simple as that in other
implementations (notably Windows), so make it private to this port for now.

In the future we should try to support arbitrary wxIcons as well as extend
wxIconLocation to support FreeDesktop stock icon names.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:07:06 +00:00
Robin Dunn
2e66ffc737 Add GetHandle for wxGnomePrinterDCImpl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-28 21:52:37 +00:00
Robin Dunn
8e72f2cd18 wxDC::GetHandle support for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-28 19:31:18 +00:00
Robin Dunn
6d4b1e2759 wxDC::GetHandle support for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-28 19:31:09 +00:00
Robin Dunn
9eefb5c14a Adding wxDC::GetHandle for wxOSX-cocoa and wxOSX-carbon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-28 19:31:03 +00:00
Vadim Zeitlin
afbf46a317 Implement wxNotificationMessage using libnotify in wxGTK.
Use libnotify -- if detected by configure -- to provide native notifications
in wxGTK. Our API maps to libnotify one in rather straightforward way, we
might consider extending it to cover more of libnotify functionality
(categories, user-defined icons and, especially, actions) later.

Also update the dialogs sample to show another kind of notification and the
documentation to clarify the behaviour of various methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-27 15:36:54 +00:00
Vadim Zeitlin
5a92b56137 Add a private wrapper for GError to wxGTK.
This class simply calls g_error_free() automatically.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-27 15:36:45 +00:00
Vadim Zeitlin
b6a49c2b75 Add wxWebView::GetNativeBackend() method.
This allows to use platform-specific methods in user code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 21:59:21 +00:00
Vadim Zeitlin
2f7baaeccf Don't eagerly set wxKeyEvent position fields.
This results in a noticeable delay when using wxGTK via a remote X11
connection for every key event as a round trip to server is needed to get the
mouse pointer position every time a key is pressed or released.

Only provide the position on demand. And explain that it's actually not very
useful as it's simply the same as the current mouse position.

Closes #14361.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:52 +00:00
Vadim Zeitlin
7ce6da52a1 Extract OS X non-GUI event loop in a separate header.
This will allow its reuse from non-wxOSX ports, e.g. wxGTK under OS X.

Closes #14519.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:43 +00:00
Vadim Zeitlin
6619c4af1b Add wxDir::Close().
This is trivial to have and can sometimes be useful and also is symmetric to
Open().

Closes #14493.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:30 +00:00
Vadim Zeitlin
992ea4068c Refactor: extract GtkScrolledWindow creation from wxWindow::Create().
No real changes, just make it possible to reuse the scrolled window and
scrollbars creation code from derived classes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:21 +00:00
Vadim Zeitlin
a977376af3 No real changes, just avoid overloaded virtual wxWebView::SetPage().
Instead, have two public non-virtual SetPage() methods forwarding to a private
DoSetPage(), as usual.

This avoids the need for "using wxWebView::SetPage" which is needed to avoid
warnings about hiding the other base class virtual when implementing one of
them and which was forgotten in wxMSW version resulting in warnings when using
g++ to compile it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:10 +00:00
Vadim Zeitlin
4e3eeddebd Fix wxMSW wxTextEntry compilation in wxUSE_DYNLIB_CLASS==0 case.
Simply don't define DoAutoCompleteFileNames() as it needs wxDynamicLibrary to
compile and work.

Closes #14510.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-23 15:03:57 +00:00
Vadim Zeitlin
da0ee16ef9 Use __DARWIN__ instead of __WXOSX__ in non-GUI code.
This fixes compilation of non-wxOSX ports (e.g. wxGTK) under OS X.

Also make the difference between the two symbols more clear in the
documentation.

Closes #14503.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-23 15:03:42 +00:00
Vadim Zeitlin
7d17efb14d Define wxGUIAppTraits for wxGTK/Windows port.
Closes #14505.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-23 15:03:30 +00:00
Vadim Zeitlin
c3980646f6 Fix crash on wxWebViewWebKit window destruction.
We were getting crashes due to using methods of already half-destroyed object
when wxWebView window was destroyed in wxGTK, with the following abbreviated
stack:

 #0  wxgtk_webview_webkit_load_status (widget=0x12eb380, webKitCtrl=0x13ee040) at src/gtk/webview_webkit.cpp:38
...
 #8  0x00007ffff05ca281 in dispatchDidFailLoad (error=..., this=0x7fffe32db900) at ../Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp:1054
 #9  WebKit::FrameLoaderClient::dispatchDidFailLoad (this=0x7fffe32db900, error=...) at ../Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp:1049
 #10 0x00007ffff0b0de54 in WebCore::FrameLoader::checkLoadCompleteForThisFrame (this=0x7fffe3221b70) at ../Source/WebCore/loader/FrameLoader.cpp:2128
 #11 0x00007ffff0b0cfde in WebCore::FrameLoader::checkLoadComplete (this=<optimized out>) at ../Source/WebCore/loader/FrameLoader.cpp:2370
 #12 0x00007ffff0b0a3b2 in WebCore::FrameLoader::receivedMainResourceError (this=0x7fffe3221b70, error=..., isComplete=true) at ../Source/WebCore/loader/FrameLoader.cpp:2640
 #13 0x00007ffff0b423b7 in cancel (error=..., this=0x7fffe3279680) at ../Source/WebCore/loader/ResourceLoader.cpp:399
 #14 WebCore::ResourceLoader::cancel (this=0x7fffe3279680, error=...) at ../Source/WebCore/loader/ResourceLoader.cpp:353
 #15 0x00007ffff0b420c0 in WebCore::ResourceLoader::cancel (this=<optimized out>) at ../Source/WebCore/loader/ResourceLoader.cpp:350
 #16 0x00007ffff0afda9e in WebCore::DocumentLoader::stopLoading (this=0x7fffa081d800) at ../Source/WebCore/loader/DocumentLoader.cpp:258
 #17 0x00007ffff0b09561 in stopAllLoaders (clearProvisionalItemPolicy=WebCore::ShouldClearProvisionalItem, this=0x7fffe3221b70) at ../Source/WebCore/loader/FrameLoader.cpp:1523
 #18 WebCore::FrameLoader::stopAllLoaders (this=0x7fffe3221b70, clearProvisionalItemPolicy=WebCore::ShouldClearProvisionalItem) at ../Source/WebCore/loader/FrameLoader.cpp:1501
 #19 0x00007ffff0b0d17a in WebCore::FrameLoader::stopForUserCancel (this=0x7fffe3221b70, deferCheckLoadComplete=false) at ../Source/WebCore/loader/FrameLoader.cpp:1541
 #20 0x00007ffff05f3a36 in webkit_web_view_dispose (object=0x12eb380) at ../Source/WebKit/gtk/webkit/webkitwebview.cpp:1327
 #21 0x00007ffff27ff7a0 in g_object_run_dispose (object=0x12eb380) at /tmp/buildd/glib2.0-2.32.3/./gobject/gobject.c:1061
 #22 0x00007ffff4476c1e in gtk_scrolled_window_forall (container=0x7fff9c007d10, include_internals=0, callback=0x7ffff452cd20 <IA__gtk_widget_destroy>, callback_data=0x0)
     at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkscrolledwindow.c:1085
 #23 0x00007ffff439872f in gtk_container_destroy (object=0x7fff9c007d10) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkcontainer.c:1073
...
 #28 0x00007ffff443cd60 in gtk_object_dispose (gobject=0x7fff9c007d10) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkobject.c:421
 #29 0x00007ffff27ff7a0 in g_object_run_dispose (object=0x7fff9c007d10) at /tmp/buildd/glib2.0-2.32.3/./gobject/gobject.c:1061
 #30 0x00007ffff6cb65ac in wxWindow::~wxWindow (this=0x13ee040, __in_chrg=<optimized out>) at src/gtk/window.cpp:2367
 #31 0x00007ffff6d71241 in wxControlBase::~wxControlBase (this=0x13ee040, __in_chrg=<optimized out>) at src/common/ctrlcmn.cpp:49
 #32 0x00000000005cf761 in wxControl::~wxControl (this=0x13ee040, __in_chrg=<optimized out>) at include/wx/gtk/control.h:27
 #33 0x00007ffff7bd1eae in wxWebView::~wxWebView (this=0x13ee040, __in_chrg=<optimized out>) at include/wx/webview.h:96
 #34 0x00007ffff7bd3443 in wxWebViewWebKit::~wxWebViewWebKit (this=0x13ee040, __in_chrg=<optimized out>) at include/wx/gtk/webview_webkit.h:26
 #35 0x00007ffff7bd34ae in wxWebViewWebKit::~wxWebViewWebKit (this=0x13ee040, __in_chrg=<optimized out>) at include/wx/gtk/webview_webkit.h:26

Fix this by setting m_isBeingDeleted flag for wxWebViewWebKit early and
checking it in the callback.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-23 15:03:05 +00:00
Vadim Zeitlin
1582a1db62 No changes, just fix some typos in comments.
Closes #14494.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-20 11:55:18 +00:00
Vadim Zeitlin
c56fd7a304 Use both URL-specific and plain text formats in wxGTK wxURLDataObject.
Just as in wxMSW, it makes sense to put URLs on clipboard (or drag them) in
both URL-specific and plain text formats to facilitate pasting (or dropping)
them into other applications.

So make wxURLDataObject in wxGTK a composite data object containing both its
old data object and wxTextDataObject.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-20 11:55:10 +00:00
Julian Smart
4ce3ebd3f5 Added continuation bullet style for supporting multiple paragraphs in a list item
The user can 'delete' the bullet to create a continuation paragraph


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-15 06:42:15 +00:00
Vadim Zeitlin
6c32fb8f9d Add support for CURRENCY and SCODE to MSW OLE helpers.
This allows to call OLE Automation methods taking parameters or returning
values of these types.

Closes #14225.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-14 20:10:58 +00:00
Paul Cornett
f30b9eed38 avoid creating and immediately destroying a wxGraphicsContext when creating a wxDC with wxGTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-13 16:58:37 +00:00
Vadim Zeitlin
3a2b37010c Rename wxFileSystemWatcherBase::DoAdd() to AddAny() and make it public.
Make this method public to fix compilation after the recent changes as
traverser classes can't call it otherwise (no idea why did it compile with
g++). And give it a better name just in case people decide to call it even
though it's not documented and described as private in comment (but perhaps we
could make it really public later).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-13 12:00:14 +00:00
Vadim Zeitlin
5c14ec2640 Add possibility to hide and show again wxRibbonBar pages.
Added wxRibbonBar::ShowPage(), HidePage() and IsPageShown() methods and show
them in the sample.

Also add GetPageNumber() helper.

Closes #14471.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-13 11:46:43 +00:00
Paul Cornett
e7042ce73b Avoid creating and immediately destroying a wxGraphicsContext for most uses of wxGCDC.
This also causes the dummy "measuring context" to be properly initialized with a default font


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-11 06:36:38 +00:00
Vadim Zeitlin
98b6b5abc5 Fix wxNativeContainerWindowId definition for wxGTK/Windows port.
It's a gpointer and not unsigned long as under Unix in this case.

Closes #14447.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-10 23:52:14 +00:00
Vadim Zeitlin
7dd65e5abe Forbid setting hints for multi-line text controls.
This doesn't work anyhow, so make it explicit by asserting if an attempt to do
it is made. And document this.

Also add a test of SetHint() to the text sample to verify it still works.

Closes #14456.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-10 23:52:10 +00:00
Vadim Zeitlin
e27f554012 Use the same console event loop in wxBase and wxCore in wxMSW.
Refactor the console event loop code into separate files to untangle it from
the GUI version and ensure that it doesn't depend on the GUI at all. It can
now be defined in the base library and simply reused by the core one.

This also makes the console event loop usable for other ports under Windows,
e.g. wxGTK.

Closes #14426.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-10 23:52:00 +00:00
Vadim Zeitlin
14b682f7c3 Increase version to 2.9.5.
Rebake all the project/make files.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-10 23:51:44 +00:00
Paul Cornett
ab78328d2a remove DoSetSize override, unneeded after r72001
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-10 17:27:41 +00:00
Paul Cornett
4e621d2471 update minimum GTK2 version requirement to 2.6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-10 16:39:44 +00:00
Robin Dunn
65fb4b3a4f Make a couple virtuals protected so they can be overridden.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-10 06:42:15 +00:00
Robin Dunn
e9fed11291 Revert r71595 for now, as the bug it fixed is the lesser of two evils with the potential bugs it causes. See #14453.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-08 03:48:55 +00:00
Vadim Zeitlin
97981439aa Replace "_amd64" with "_x64" in a few more places.
Fix bakefile presets and MSVC-specific setup.h.

Also document TARGET_CPU=X64 instead of AMD64.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-07 15:36:58 +00:00
Vadim Zeitlin
2643e2e496 Explicitly call base class ctor in wxRichTextFieldType copy ctor.
Failure to do this provokes g++ warnings with -Wextra and is, generally
speaking, wrong, even if it probably doesn't matter in this particular case.

See #14459.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-07 13:27:36 +00:00
Vadim Zeitlin
57bf8a6f1e Return correct index from wxGenericListCtrl::InsertColumn().
It used to always return 0 in the generic version, return the correct index of
the newly inserted column now.

Closes #13677.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-07 13:27:31 +00:00
Vadim Zeitlin
0f79c83f89 Use list mode in wxListbook list control instead of report.
Use wxLC_LIST instead of wxLC_REPORT when we don't have any icons. This makes
the code simpler as wxLC_LIST is more similar to wxLC_ICON which we used, and
continue to use, when we do have icons, because we don't need to add and
remove any columns on the fly.

And it fixes the appearance of wxListbook without images with wxBK_TOP or
wxBK_BOTTOM styles as it now lays out its items horizontally and not
vertically as before.

It also fixes the best size calculation of wxListbook control since the
changes to wxListCtrl best size calculations in r71733 as a nice side effect.

Closes #14451.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-04 17:09:53 +00:00
Vadim Zeitlin
119e862ca9 Fix wxDataViewChoiceRenderer behaviour in wxOSX/Cocoa.
Changing the value of a "choice" cell in wxDataViewCtrl didn't work correctly
in wxOSX/Cocoa because wxDataViewChoiceRenderer used the base class version of
OSXOnCellChanged() which passed the integer index we received from NSOutlineView
to the model instead of the expected string.

Fix this by overriding OSXOnCellChanged() in wxDataViewChoiceRenderer itself
and using its argument as an integer index of the selection because this is
what it is, at least under OS X 10.7.

Closes #14373.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-02 14:36:56 +00:00
Vadim Zeitlin
87762892be No changes, just suppress an unused parameter warning in wxOSX build.
This one was especially annoying as it occurred in a header included by a
couple of dozens of files.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-02 12:46:11 +00:00
Vadim Zeitlin
69bacfaacf Fix wxMSW compilation without PCH.
Include wx/bitmap.h as we need its GetHBITMAP() method in wx/msw/dib.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-01 22:39:41 +00:00
Stefan Csomor
40aa05e0b8 common code for normalization
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-01 17:03:39 +00:00
Paul Cornett
7537769845 override DoSetValue() to avoid unnecessary clipboard operations, fixes #14369
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-01 16:43:16 +00:00
Stefan Csomor
14de8214d6 native drop target method for cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-01 15:46:56 +00:00
Stefan Csomor
f31c06b39e native hook for supported datatypes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-01 15:46:26 +00:00
Stefan Csomor
5ce7b0b55c adding native hook for drop target
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-01 15:45:15 +00:00
Vadim Zeitlin
005b12d8be Make wxBookCtrlBase::GetPage() virtual to fix it for wxAuiNotebook.
wxAuiNotebook doesn't store its page in the base class m_pages array, so
calling GetPage() on it via a wxBookCtrl pointer resulted in a crash.

Make GetPage() virtual to allow overriding it at wxAuiNotebook level.

Closes #13768.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 23:41:27 +00:00
Vadim Zeitlin
c17eafaaf1 Added internal wxHatchStyle enum.
It's annoying that the same code for hatched pens and brushes can't be reused
without relying on deprecated wxXXX_HATCH constants, so add new,
non-deprecated, wxHatchStyle enum that can be used in such code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 23:41:15 +00:00
Robin Dunn
ba8540022f Move a couple standard virtuals to protected sections so they can be overridden in derived classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 20:59:46 +00:00
Paul Cornett
9dc44eff02 support for GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 20:39:06 +00:00
Vadim Zeitlin
26cdd42d2c Define wxEntry() with WinMain-compatible signature for all Windows ports.
Make wxEntry(HINSTANCE, ...) available in wxGTK under Windows too.

Refactor the headers to allow this and extract Windows-specific wxEntry()
declarations in wx/msw/init.h from wx/msw/app.h for consistency with the
normal wxEntry(int, char**) declared in wx/init.h.

Closes #14423.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:28 +00:00
Vadim Zeitlin
327972e7b6 Use bitmaps from resources by default in wxGTK under Windows.
Use wxBITMAP_TYPE_{BMP,CUR,ICON}_RESOURCE by default under Windows, even for
non-wxMSW ports.

Also allow loading wxImage from resources in all ports under MSW as a side
effect of this change.

Closes #14425.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:23 +00:00
Vadim Zeitlin
c21b99e0e2 Add wxRibbonBar::DeletePage() and ClearPages() methods.
Also add a trivial GetPageCount() helper.

Closes #14437.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:18 +00:00
Vadim Zeitlin
0199dae316 Fix off by 1 error in wxHTML font size from points calculation.
m_FontSize is in 1..7 range, not 0..6, so add 1 to it when setting it from the
index into m_FontsSizes array.

Also update the comment explaining the valid range of m_FontsSize.

Closes #14442.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-28 11:58:55 +00:00
Robin Dunn
34c92eeeb7 Don't hide the m_mm_to_pix_x and m_mm_to_pix_y in the base class by redefining them in a derived class. Fixes #14399.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-26 18:25:29 +00:00
Paul Cornett
8f71e657f3 update size hints when decoration size becomes known, and preserve size hint increments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-24 16:18:28 +00:00
Vadim Zeitlin
fa3f11806e Use wx/msw/winundef.h for wxGTK under Windows too.
Avoid clashes due to <windows.h> definitions in wxGTK too.

Closes #14427.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 17:54:53 +00:00
Vadim Zeitlin
9597d39a2e Use C, not C++, comments in wx/gtk/chkconf.h.
Remove C++ comments added in r71796.

See #14412.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 17:54:38 +00:00
Vadim Zeitlin
acbed1149e Fixes for building wxGTK under Cygwin.
Test for __WXMSW__ instead of __CYGWIN__ to not affect building non-MSW ports
such as wxGTK under Cygwin.

See #14382.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-17 21:35:14 +00:00
Vadim Zeitlin
954fd05108 Disable creation of wxDIB from wxBitmap in non-wxMSW ports.
wxDIB can now be used with wxGTK under Windows, i.e. when not using wxMSW
version of wxBitmap but it can't be created from wxBitmap then as it doesn't
have a corresponding HBITMAP.

Simply disable this functionality when not using wxMSW.

Closes #14414.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-17 21:35:10 +00:00
Vadim Zeitlin
598fe99d56 Move wxBell() from base to core library.
This allows to get rid of ugly preprocessor checks due to the fact that this
function could be defined in one or the other library depending on the port
used and also fix a problem with it being defined differently in the base
library depending on which GUI port (Carbon or Cocoa) was used under OS X.
It also fixes the problem with wxBell() in wxGTK under Windows.

Closes #14406.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-17 21:35:06 +00:00
Vadim Zeitlin
54f59b007e Disable options that don't work with wxGTK in wx/chkconf.h.
When building wxGTK under Windows, some MSW-specific options can be defined
but can't be implemented when using GTK, forcefully disable them.

Also a few others that could be implemented but that don't work currently.

Finally, forcefully enable Cairo support as wxGTK always needs it.

Closes #14412.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-17 21:35:01 +00:00
Vadim Zeitlin
1383c34c91 Define wxGTK GTK version symbols in GTK-specific setup.h.
When not using configure __WXGTKxxx__ symbols should still be defined, assume
we use a recent GTK 2.x version and define all of them.

Closes #14411.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-17 21:34:57 +00:00
Vadim Zeitlin
b33e9f4031 Add wxUSE_COMPILER_TLS to allow disabling compiler TLS support.
Compiler TLS support is broken under Win32/MSVC when used for a code which is
part of a dynamically loaded DLL, so allow disabling it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-17 21:34:47 +00:00
Stefan Csomor
c657294b52 better naming wxCFEventLoopPauseIdleEvents
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-15 16:24:09 +00:00
Stefan Csomor
4c4cbded1f offer suppression of idle processing (delayed destruction happened too early eg when showing native message boxes)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71778 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-15 00:03:51 +00:00
Stefan Csomor
d20028be9a clang analyzer support specific for OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-14 22:02:06 +00:00
Stefan Csomor
a2c3d6b820 FixedWith support through CoreText
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-14 21:55:28 +00:00
Stefan Csomor
721ba9cbdc using CoreText under iOS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-14 21:53:06 +00:00
Stefan Csomor
2b760b6bc1 removing attribute, as assert is not guaranteed not to return, but may just go on
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-14 15:07:14 +00:00
Stefan Csomor
b625fff509 using WX_ATTRIBUTE_NORETURN for asserts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-13 23:33:52 +00:00
Stefan Csomor
9deded7972 adding WX_ATTRIBUTE_NORETURN support (for functions like assert, exit etc. that may not return)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-13 23:33:00 +00:00
Stefan Csomor
78f212178e exposing mainWindow for C++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-13 22:32:07 +00:00
Stefan Csomor
6ca7f2f6c4 indicating the memory ownership of our c-method for the clang analyzer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-13 18:43:37 +00:00
Stefan Csomor
cc510e1364 supporting clang memory management annotations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-13 18:42:51 +00:00
Vadim Zeitlin
d44d80da5b Add wx/setup.h header for wxGTK build under MSW.
This is identical to wx/msw/setup0.h but will be used by wxGTK builds using
MSVC when this is supported.

Closes #14395.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-12 21:41:59 +00:00
Vadim Zeitlin
1c0a0736a3 Don't use generic wxListCtrl style for wxListMainWindow.
This resulted in double border around wxListCtrl contents in wxOSX and almost
certainly other ports except wxGTK for which we already had an explicit
preprocessor check in the generic list control code. Remove it and simply
don't use any wxListCtrl-specific styles, including borders, for its main
window as it doesn't make any sense.

Closes #3701.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-12 21:41:50 +00:00
Robin Dunn
0681e07a14 Keep track of the area intended to be buffered, and use that in UnMask instead of defaulting to the buffer size. Only clip to the DC size if wxBUFFER_VIRTUAL_AREA is not set. This fixes the issue where buffering the full virtual area in a wxScrolledWindow would only draw an area the physical size of the window. Fixes #11612.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-08 19:26:19 +00:00
Vadim Zeitlin
9bd5c5fcda Use wxString::Clone() instead of c_str() in wxThreadEvent copy ctor.
Creating a new wxString from c_str() of the old one resulted in dropping all
string data after the first embedded NUL. Fix this by using Clone() method
that exists specifically for this purpose. It also makes the code more clear.

Closes #14380.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-08 18:44:14 +00:00
Robin Dunn
e1b8b76fcf Add export macro for wxTreeListEvent so the non-inline class info and things can be found where they're exepcted
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-07 04:43:15 +00:00
Paul Cornett
12a5cf1324 Workaround for Ubuntu 12.04 run time warning
"LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that doesn't believe we're it's parent."
Avoid calling gtk_widget_destroy() on a wxMenuBar attached to a frame
Fixes #14292


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-05 16:49:28 +00:00
Vadim Zeitlin
0a7ee6e0f4 Implement support for wxRIBBON_PANEL_EXT_BUTTON wxRibbonPanel style.
Show the "extension button" in the ribbon panel if this style is specified.

Also generate a specific event if this button is clicked.

Closes #14283.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-03 19:17:09 +00:00
Vadim Zeitlin
07c7226468 Add wxRibbonControl::GetAncestorRibbonBar() helper.
New method allowing to find the ribbon bar containing the given window.

See #14283.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-03 19:17:03 +00:00
Vadim Zeitlin
017dc06b50 Use wxString::t_str() in calls to Windows API functions in wxMSW.
Use t_str() instead of wx_str() to make the code work correctly in UTF-8 build
in which wx_str() returns a pointer to UTF-8 buffer while we need a wchar_t
pointer for Windows.

Closes #14371.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-03 19:16:59 +00:00
Steve Lamerton
f40f8e1722 Use wxCOMPtr throughout wxWebViewIE to simplify the code and reduce the chance of memory leaks. Also mark PPV_ARGS_CHECK as inline so it can be used from multiple libraries.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-03 17:41:32 +00:00
Vadim Zeitlin
41087dc90a Add support for MSVC 11 (a.k.a. MSVS 2012) to MSVC-specific setup.h.
Use vc110 prefix for VC11.

Closes #14366.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 22:34:21 +00:00
Vadim Zeitlin
125afca0c0 Add wxMSW_CONV_LPCTSTR() and related macros and use them in wxBase.
Add macros hiding the ugly casts needed to pass wxStrings to Windows API
functions and use them in a couple of places in wxBase to simplify the code.

Closes #14338.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 22:34:13 +00:00
Vadim Zeitlin
2253f18176 Add support for CP1258 (Vietnamese) and CP1361 (Korean Johab) encodings.
Recognize these encodings names and translate them to/from the corresponding
charset constants in wxMSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:46 +00:00
Vadim Zeitlin
4e116788a2 Use float instead of double division in wxHashMap code.
We don't need double precision for determining the hash table fill rate and
using double constant also results in float-to-double promotion warnings from
gcc 4.7.

See #14362.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:34 +00:00
Vadim Zeitlin
80a4659776 Use wxCLASSINFO() instead of deprecated CLASSINFO().
No real changes, just use the version of the macro with a "wx" prefix.

Closes #14356.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:24 +00:00
Vadim Zeitlin
f00acdb8f4 No changes, just refactor wxGrid::Render() to simplify it.
Introduce a couple of new helpers to make the main Render() function smaller
and more clear.

Closes #14347.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:00:58 +00:00
Robin Dunn
b8acf11e74 A patch adding wxHTMLDataObject which can be used for handling the standard platform formats for transfering HTML formatted text.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-30 19:21:42 +00:00
Robin Dunn
5ad24e6dbb Adjust the client area origin and the client size of the MSW wxStaticBox according to the guidelines on http://msdn.microsoft.com/en-us/library/aa511279.aspx. This is so widgets that are children of the static box will not overlap the label or box borders.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-30 03:13:35 +00:00
Vadim Zeitlin
779e28da63 Add wxGrid::Render() for drawing the grid to any wxDC.
In particular, this allows to print the grid contents easily.

Closes #14294.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-27 13:00:19 +00:00
Vadim Zeitlin
b55d57aa24 Add wxGrid::DrawRangeGridLines().
This method draws only the grid lines for the cells in the specified range and
not for all of them.

It is not used yet but will be by the upcoming wxGrid::Render(), see #14294.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-27 13:00:13 +00:00
Vadim Zeitlin
f31d3faf7a No changes, just refactor wxGrid::DrawAllGridLines().
Extract the actual drawing of the lines into a new DoDrawGridLines() method.

This will be used by the upcoming commits for drawing grid lines for a part of
the grid only, see #14294.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-27 13:00:09 +00:00
Julian Smart
4ba36292f4 Added full scaling to wxRTC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-26 14:17:46 +00:00
Vadim Zeitlin
7ed9cd2891 Fix bug with unloading wxPluginLibrary objects in "wrong" order.
wxPluginLibrary objects had to be unloaded in exactly the reverse order to
which they were loaded in. This was not documented and was a serious
limitation for any realistic use of plugins anyhow, so fix it and allow
unloading them in any order now.

Instead of keeping a pointer to the last wxClassInfo not created by this
plugin, now keep a pointer to the first wxClassInfo that was created by it.
This makes the code slightly more complex but this pointer, unlike the old
one, remains valid even if another plugin was unloaded.

Closes #14261.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-26 12:29:54 +00:00
Vadim Zeitlin
fcb9299bda Move include/wx/osx/private/objcid.h to include/wx/osx/core.
This header is used by public headers and hence is not really private, move it
to a better place and add it to the list of OSX headers in the bakefile.

Closes #14339.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-26 12:29:39 +00:00
Vadim Zeitlin
5fb4b6cd65 Add wxDataViewListCtrl::GetItemCount().
This method is convenient and (almost, except for the return value) compatible
with wxListCtrl.

See #11088.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 17:02:40 +00:00
Vadim Zeitlin
518cef0470 Add wxDataViewListCtrl::{Set,Get}ItemData() methods.
These methods are convenient when migrating the code that previously used
wxListCtrl to wxDataViewCtrl.

Closes #11088.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 17:02:35 +00:00
Vadim Zeitlin
41abc29aa6 Use wxUIntPtr instead of wxClientData in wxDataViewListCtrl.
Do not delete the client data in wxDataViewListCtrl, this class mainly exists
for compatibility with wxListCtrl and as the latter doesn't delete its client
data, neither should the former.

See #11088.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 17:02:31 +00:00