Commit Graph

1887 Commits

Author SHA1 Message Date
Vadim Zeitlin
44bb92ecd5 Use wxTB_DEFAULT_STYLE as default value for wxToolBar style.
No real changes, but this is more consistent with the other controls.

It also highlights the ports which use non-default style, e.g. wxQt where
wxNO_BORDER should probably not be used as part of default toolbar style but
rather added in the ctor implementation.

Closes #16667.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 14:59:33 +00:00
Vadim Zeitlin
03e64f3c20 No changes, just move wxComboBox::Clear() out of line in wxGTK.
Make this function non-inline to facilitate further modifications.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-01 13:56:26 +00:00
Vadim Zeitlin
722057b3a0 Add a new wxUSE_STD_CONTAINERS_COMPATIBLY option.
This option, which is on by default unless the use of STL is disabled,
provides better interoperability with the standard library when it can be done
without breaking backwards compatibility.

The first example of its use is to allow passing std::vector<> of any string
compatible type to wxItemContainer::Append(), Insert() and Set(), allowing to
directly initialize various wxControls deriving from it such as wxChoice,
wxComboBox, wxListBox from a std::vector<> of strings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 21:54:51 +00:00
Paul Cornett
a776eb65d0 Fix ClientToScreen()/ScreenToClient() when used immediately after window creation.
And whenever window does not have an up-to-date GTK size allocation.
Closes #16061


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 00:59:20 +00:00
Vadim Zeitlin
cde3018236 Don't define wxUSE_GRAPHICS_GDIPLUS as 1 by default.
Define it and wxUSE_GRAPHICS_DIRECT2D, when it's supposed to be enabled, as
wxUSE_GRAPHICS_CONTEXT instead. This ensures they are set to 0 if the use of
wxGraphicsContext is entirely disabled, as is the case when using MinGW under
MSW by default for example.

Closes #16558.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-15 17:27:50 +00:00
Vadim Zeitlin
56d51c311a Fix wxUSE_GRAPHICS_DIRECT2D definition in setup.h files.
Define it in wx/msw/setup_inc.h and not in wx/msw/setup0.h itself to ensure
that it survives the regeneration of this file using build/update-setup-h.

Also only set wxUSE_GRAPHICS_DIRECT2D to 1 for VC10+ and not VC9 as the latter
lacks Direct2D header in its default SDK version.

Finally also update comments to explain the various settings more clearly and
remove outdated information (wxGraphicsContext is not experimental any more).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:52:28 +00:00
Bryan Petty
e63b4ccca0 Add wxUSE_TASKBARBUTTON under MSW port.
Taskbar button features are only available under MSW port.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 15:59:26 +00:00
Chaobin, Zhang
23ce61c395 Reverting failed mering of SOC2014_TASKBAR.
Command: git svn dcommit is aborted, and the two branches is diverged.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 11:57:58 +00:00
Chaobin, Zhang
559ccd703d Add wxUSE_TASKBARBUTTON under MSW port.
Taskbar button features are only available under MSW port.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 08:30:57 +00:00
Vadim Zeitlin
11bcefe243 Don't say that 15+ year old wxDateTime is relatively new.
Update the description of wxUSE_DATETIME in various setup.h files for the 21st
century.

Closes #16523.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-04 19:45:03 +00:00
Vadim Zeitlin
118e8e7286 Add wxBitmap ctor from wxCursor to wxGTK and wxMSW.
Allow converting wxCursor to wxBitmap in order to draw it, for example.

Closes #15699.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-04 19:44:52 +00:00
Vadim Zeitlin
e1655f5394 Stop duplicating wxFrame dtor in all ports.
wxGTK1, wxGTK, wxMSW and wxOSX all did the same thing in their wxFrame dtor,
so just do it in wxFrameBase instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-02 13:28:29 +00:00
Vadim Zeitlin
40f2cf0a78 Allow access to the currently shown wxInfoBar buttons.
Add wxInfoBar::GetButtonCount(), GetButtonId() and HasButtonId() methods.

Closes #15110.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-02 01:15:11 +00:00
Vadim Zeitlin
15f255cebb Remove support for Digital Mars compiler.
This compilers is not being developed any longer since many years, drop
support for it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 13:01:23 +00:00
Vadim Zeitlin
49b8d79c87 Remove (Open)Watcom support.
This compiler is not being developed since several years and almost certainly
can't be used to build the current wxWidgets sources anyhow, so remove all
support for it, including a lot of extremely ugly workarounds for its bugs
with template functions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 13:01:06 +00:00
Vadim Zeitlin
0d4ad161d5 Remove support for Win9x from wxMSW.
Most importantly, this allows us to remove all MSLU-related stuff.

Some functions which were previously loaded dynamically can now be just used
directly, too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 02:33:40 +00:00
Vadim Zeitlin
f4b80e5337 Remove MSVC6 support.
Don't support this compiler any more, this allows to get rid of tons of
MSVC6-specific workarounds, in particular we can now use Bind() and natural
template functions calls in the library code.

Also remove MSVC6 project and solution files and don't generate them when
bakefile_gen is ran any more (removing the remaining occurrences of msvc6prj
from the bakefiles results in weird bake-time errors, so it's simpler to just
leave them there).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 22:32:17 +00:00
Paul Cornett
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +00:00
Vadim Zeitlin
399371921f Add font colour support to wxFontPickerCtrl.
Currently this is only really implemented under Windows, just as the colour
support in wxFontDialog, but make the API available under all platforms for
consistency.

Closes #11614.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 17:23:13 +00:00
Paul Cornett
d2e4b3520b for GTK+ 3.6 and later, invalidate cached best size when GTK's style cache is updated, see #16088
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-15 18:44:02 +00:00
Vadim Zeitlin
f740cc3881 Refactor YieldFor() to avoid code duplication among the ports.
Don't repeat the same code in all the ports, move it to the common base class
and add a new virtual DoYieldFor() for the really port-specific code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 18:58:00 +00:00
Paul Cornett
8f97969383 add missing GTK3 implementations of GTKGetWindow()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 19:53:17 +00:00
Paul Cornett
9d0d2b7e98 Fix wxSetCursorEvent handling
For compatibility with wxMSW, send event up the parent chain.
Properly handle setting the cursor for a wxSetCursorEvent, and don't overwrite the window cursor.
see #15801


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 08:54:17 +00:00
Paul Cornett
0dfeb74e78 Different fix for cursor inheritance and busy cursor/global cursor.
Previous work was not compatible with GTK < 2.18 and did not properly handle some cases
see #15801


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 04:43:46 +00:00
Paul Cornett
adeb914098 fix running with GTK < 2.18 when built with later GTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 20:05:43 +00:00
Paul Cornett
9f09241cd0 Fix cursor inheritance and busy cursor/global cursor, closes #15801
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 18:27:13 +00:00
Vadim Zeitlin
8b8dfdde4c Disable the use of compiler TLS by default under Windows.
While compiler TLS support is simpler to use and much faster than using our
own Win32 API-based TLS implementation, it results in difficult to debug
crashes when used inside a dynamically loaded DLL under Windows XP, so disable
it by default to be safe.

Closes #13116.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-07 21:54:42 +00:00
Vadim Zeitlin
bd30752410 Just deprecate but don't schedule for removal wxNORMAL and friends.
Deprecate the use of the old untyped constants but don't schedule them from
removal in a future wx version by removing "#if WXWIN_COMPATIBILITY_3_0" tests
around their definition and use. Provoking deprecation warnings in the code
using these constants is worth it as they are unclear and it's easy to make
mistakes when using them, but breaking this code compilation outright can't be
justified -- even in the future.

Also use more informational wxDEPRECATED_MSG() instead of a simple
wxDEPRECATED() as it might not be obvious at all how should the code be
updated exactly.

Finally, avoid the use of deprecated constants inside the library itself.

As a side effect, this closes #15814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-06 12:42:37 +00:00
Paul Cornett
967a94c91a remove WXWIN_COMPATIBILITY_2_6, add WXWIN_COMPATIBILITY_3_0
closes #15792

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 20:07:33 +00:00
Václav Slavík
065deffd86 Implement wxTextEntry::SetHint() natively for GTK+3.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 17:46:27 +00:00
Paul Cornett
54e89f14bb use G_VALUE_INIT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-10 18:13:27 +00:00
Paul Cornett
5b2dfdccd1 get correct best size for wxSpinButton
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-02 16:29:21 +00:00
Paul Cornett
3623888929 make m_modalShowing private
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-17 16:37:28 +00:00
Paul Cornett
e23af7f0e9 remove GetMaskBitmap() declaration, should have been part of r73409
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-16 17:23:29 +00:00
Vadim Zeitlin
9ed99f82da Remove support for Gnome printing from wxGTK.
It was replaced by GTK+ printing several years ago and is almost never used
any longer anyhow, so any problems in this code (and there are some) would
never be found and fixed.

Also update the message catalogs to avoid having the strings not used any
more, as they were only used in Gnome printing code.

Closes #15517.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 17:09:02 +00:00
Steve Lamerton
fe7cefd493 Handle WebKitWebView create-web-view.
In some cases a new window is signalled using create-web-view rather than new-window-policy-decision-requested and so we need to handle it to emit the correct new window events.

Fixes #15447.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-13 12:55:08 +00:00
Vadim Zeitlin
69384772ac Fix wxMenu::GetTitle() before the menu is appended to the menu bar.
The mnemonics conversion was not done correctly when the menu title contained
them but the menu hadn't been appended to the menu bar yet.

Closes #15461.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-30 23:32:37 +00:00
Vadim Zeitlin
029a401d74 Make wxWindow::HasScrollbar() respect wxScrolled::ShowScrollbars().
Override CanScroll() in wxScrolled to return the real state of the scrollbar
instead of just relying on the wx[HV]SCROLL styles.

Closes #15440.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 13:12:38 +00:00
Paul Cornett
c37b0f0907 Avoid calling gtk_window_get_position() from "configure-event" handler, if possible.
This avoids a round trip to the X server, which is expensive over a remote connection.
Closes #15116


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-17 16:25:13 +00:00
Vadim Zeitlin
dcbf35f87c Use RIAA wrapper for wxSpinCtrl event disabling in wxGTK.
The use of wxSpinCtrlEventDisabler class ensures that we never forget to
reenable the events after disabling them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 17:00:10 +00:00
Paul Cornett
cbabf356ce remove ancient defines left over from GTK1
and some minor cleanup

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-03 04:48:46 +00:00
Paul Cornett
59f76658d3 remove obsolete check for GTK 2.6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-03 04:39:45 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
a94529575a Add wxUSE_PREFERENCES_EDITOR and the corresponding configure option.
This was somehow forgotten when wxPreferencesEditor was added.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 15:14:59 +00:00
Vadim Zeitlin
ad653fa230 Disable wxUSE_ENH_METAFILE for wxGTK builds.
This can happen to be defined in wxGTK builds under Windows.

Closes #15332.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-14 17:12:48 +00:00
Paul Cornett
633e19307c avoid GTK+ prefixes for our tree entry code, it is not part of GTK+, should have been part of r74420
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 17:27:53 +00:00
Paul Cornett
11f1e38e26 avoid GTK+ prefixes for our tree entry code, it is not part of GTK+
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 16:35:40 +00:00
Paul Cornett
92d00a3615 remove symbol exports, this code is private to the library
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 16:04:28 +00:00
Paul Cornett
3540b72b5f remove empty GtkTreeEntryClass
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 15:58:42 +00:00
Paul Cornett
79bca169e5 move treeentry_gtk.h to include/wx/gtk/private/
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 15:44:21 +00:00
Vadim Zeitlin
71e9885be0 Make wxEventLoop::AddSourceForFD() static.
Any event sources should be registered with all the event loops, including the
ones that will be started in the future, and not only the current (and
potentially not even existing yet) one. So make AddSourceForFD() method static.

To still allow it to do different things in console and GUI applications, as
it must, virtualize it via the new wxEventLoopSourcesManager class which has
different implementations in the two cases, returned via wxAppTraits as usual.

Notice that this required moving the implementation of this method from
src/osx/core/evtloop_cf.cpp to src/osx/core/utilsexc_cf.cpp as the former file
is base-only and didn't have access to wxGUIAppTraits.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:28:42 +00:00
Vadim Zeitlin
d3ad22bdb3 Add wxEventLoop::ScheduleExit().
This method allows to request exiting from the given event loop even if it's
not the currently active one, unlike Exit() which would assert in this case.
With it, it becomes possible to ask the loop to terminate as soon as possible
even if a nested loop is currently running.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:26:13 +00:00
Vadim Zeitlin
c738d187e9 Add wxEventLoopBase::DoRun().
Call it from public Run() after setting the loop as active and resetting
m_shouldExit flag.

No real changes, just cut down on the code duplication among the ports and
make it easier to implement the upcoming changes. see #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:25:23 +00:00
Paul Cornett
e59127de8b remove unused function GTKSetItem()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-02 16:35:43 +00:00
Paul Cornett
8e125ff114 Use gtk_list_store_insert_with_values() to set entry at same time item is inserted.
This should ensure that the entry is always valid, removing the need for r74315.
Also simplify DoInsertItems() by using DoInsertItemsInLoop().


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-01 05:10:22 +00:00
Stefan Csomor
cfcab929d4 virtual method hiding in GTK, so add direct implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 15:41:23 +00:00
Vadim Zeitlin
926df8a162 Add wxFileDialog::GetCurrentlySelectedFilename().
Also send wxEVT_UPDATE_UI events for the extra controls in wxFileDialog.

The combination of these changes allows extra controls to update their state
depending on the current selection in the dialog. Show a simple example of
doing it in the dialogs sample.

Closes #15235.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:27 +00:00
Vadim Zeitlin
268331f0db Fix regression in wxGTK wxFilePickerCtrl due to wxFileDialog changes.
Revert the changes of r72979 and fix wxFileDialog::GetDirectory() return
value bug (see #14786) differently to avoid breaking wxFilePickerCtrl which
relies on getting wxEVT_BUTTON event when the associated dialog is dismissed.

Closes #15218.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-22 13:36:14 +00:00
Vadim Zeitlin
0553426814 Delete the associated dialog in wxGTK wx{File,Dir}Button.
The code seemed to rely on Destroy() being called for deleting the dialog, but
it's actually not used for child windows, so do it in dtor instead.

Closes #15156.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-19 12:38:18 +00:00
Vadim Zeitlin
b960795ea8 Add wxFontInfo class to allow using named parameters for wxFont creation.
This helper class allows to create wxFonts using shorter and more readable
code, e.g.

	wxFont font(12, wxFONTFLAG_DEFAULT,
		    wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, true,
		    "DejaVu Sans");

can now be written simply as

	wxFont font(wxFontInfo(12).FaceName("DejaVu Sans").Underlined());

Remove the ctor from font flags added in r70445 as it's not needed any longer
now that we have this one and adding it resulted in compilation errors in the
existing code which compiled with 2.8 because of ambiguities between that ctor
and wxFont(int size, int family, int style, int weight. bool underlined, ...)
one, e.g.

	wxFont(12, wxFONTFAMILY_SWISS, wxNORMAL, wxNORMAL)

didn't compile any more but it does compile again now.

See #9907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-30 10:27:38 +00:00
Vadim Zeitlin
f75b1bd31c Make wxToolBar styles consistent and add wxTB_DEFAULT_STYLE.
Don't include wxBORDER_NONE in neither wxToolBar ctor and Create() nor
wxFrame::CreateToolBar() flags parameter, override GetDefaultBorder() in
wxToolBar itself instead to use the border style appropriate for the current
platform by default. This has the same effect -- the default border style is
used unless another one is explicitly specified -- but is more clear and
consistent.

Also add wxTB_DEFAULT_STYLE for consistency with the other classes.

Closes #15037.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-31 01:12:27 +00:00
Vadim Zeitlin
00a399c062 Remove wxTextCtrl::OnEnabled() hack from wxGTK.
Don't change the background colour when the control is being enabled or
disabled, it doesn't seem necessary and it's unclear why was this added by
r10179 in the first place. It does result in problems however as it could
somehow make the selection of wxTextCtrl invisible when it lost focus and so
fixes a serious usability problem which happened to all wxTextCtrls for which
a wxEVT_UPDATE_UI handler using wxUpdateUIEvent::Enable() was defined.

Closes #14898.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-31 01:12:21 +00:00
Vadim Zeitlin
348357a1d7 No changes, just remove wxGtkIMData forward declarations.
This class doesn't exist any more, so clean up references to it.

See #3158.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-26 00:59:22 +00:00
Vadim Zeitlin
1eb194bf0e Add GdkEventKey declaration fix PCH-less build.
Declare it in wx/gtk/textentry.h too, not only wx/gtk/window.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-22 14:13:02 +00:00
Vadim Zeitlin
b2c357747d Add IM and full wxEVT_CHAR support to wxTextCtrl and wxComboBox in wxGTK.
Generate wxEVT_CHAR events for non-ASCII characters entered in these controls
by intercepting their insert-text signal.

Also try to use GtkEntry/GtkTextView internal IM objects but unsuccessfully so
far.

Closes #3158.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-21 22:37:09 +00:00
Vadim Zeitlin
afa9873106 Refactor wxGTK IM-related code to allow future modifications.
No real changes, just make it possible to use a different IM than the one
allocated in wxWindow for input handling. This will be used in the upcoming
changes to wxTextEntry and the related classes.

See #3158.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-21 22:37:01 +00:00
Vadim Zeitlin
d3bd8b1a48 Create a small helper class for Unity global menu bug workaround.
Encapsulate the code temporarily incrementing wxOpenModalDialogsCount in a
small helper class to make it easier to reuse it elsewhere.

See #14823.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-21 22:36:42 +00:00
Vadim Zeitlin
bdffa92004 Don't connect to the same signal multiple times in wxGTK wxClipboard.
We called g_signal_connect("selection_get") in wxClipboard code each time its
AddData() method was called. This resulted in progressive but noticeable
slowdown as the handler was called more and more times.

Only connect to the handler once now.

Closes #15038.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-15 12:40:13 +00:00
Steve Lamerton
236cff7334 Rename all WEB_VIEW* style identifiers to WEBVIEW*.
This makes wxWebView consistent with the rest of the toolkit. 

Closes #15013

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-01 09:38:53 +00:00
Vadim Zeitlin
0444602e46 Derive wxCheckListBox from wxCheckListBoxBase in wxGTK.
This ensures that any methods defined in wxCheckListBoxBase will be available
in wxGTK wxCheckListBox too.

See #14969.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-21 11:18:50 +00:00
Paul Cornett
5ca21fe7bf add wxMask::GetBitmap(), closes #9381
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-20 06:28:11 +00:00
Paul Cornett
4787c92d39 use const arrays for wxDC array parameters, closes #10712
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-18 17:27:51 +00:00
Paul Cornett
dddda0eb88 add support for GtkFontChooserDialog, new in GTK 3.2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-15 05:55:15 +00:00
Steve Lamerton
4c687fff5e Allow registering of custom wxWebView backends.
Add wxWebViewFactory as an abstract factory to provide backend creation. Remove old factory methods using wxWebViewBackend enum in favour of the new wxString based method.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-13 19:22:24 +00:00
Paul Cornett
b387025d5d simplify code setting backing pixmap
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-10 06:28:18 +00:00
Paul Cornett
ddb19489c0 remove ancient SetModal(), it was deprecated long ago and is not present in wxMSW or wxOSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-03 05:09:20 +00:00
Steve Lamerton
c420d57be0 Add context menu enabling and disabling to wxWebView, all backends supported.
Closes #14789.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-31 13:21:21 +00:00
Paul Cornett
4011652414 reference count the GtkMenuItem in wxMenuItem as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-29 07:07:29 +00:00
Paul Cornett
bf487502d9 make GTKNeedsParent() private
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-29 06:29:52 +00:00
Paul Cornett
f1a3ae7dc9 m_menubar does not need to be public for hildon, it's the same as m_widget in that case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-29 06:21:01 +00:00
Paul Cornett
bb3a9c6dee use wxDEPRECATED_CONSTRUCTOR() instead of inline
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-28 18:38:55 +00:00
Paul Cornett
b0d053c1ea Use client size determined by size-allocate when possible
Our client size calculation can be wrong for reasons beyond our control,
notably on Ubuntu 12.04 with overlay scrollbars where the GtkScrolledWindow
"scrollbar-spacing" is wrong. By using the true size from size-allocate
when it becomes available, we can recover from an earlier incorrect client
size calculation. See #14871


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-20 18:46:58 +00:00
Paul Cornett
4ea2d0d573 Fix for toolbars and menus not being disabled on Ubuntu
Ubuntu overlay scrollbar changes the GtkWindowGroup for its toplevel, which is
disastrous for modal windows. Put in a hack to detect and undo this.
Fixes #14855


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-16 07:14:40 +00:00
Vadim Zeitlin
5b82415eba wxGTK linking fix after r73102.
Remove SendSelectionChangedEvent() declaration, it's now in the base class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-03 00:34:28 +00:00
Paul Cornett
b3ee9f4d2e remove unnecessary include of wx/cairo.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 03:35:37 +00:00
Paul Cornett
7af131ab0e disconnect "toggled" signal in dtor when style has wxALIGN_RIGHT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-26 18:30:08 +00:00
Paul Cornett
1897abe1d8 avoid functions deprecated in GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-25 03:41:42 +00:00
Paul Cornett
7fff16b863 Simplify GetDefaultAttributesFromGTKWidget() by passing the widget to use,
rather than a pointer to a function to create the widget


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-25 02:23:34 +00:00
Vadim Zeitlin
93c609c737 Add wxApp::GTKIsUsingGlobalMenu() helper to wxGTK.
This allows to check whether the global menu is being used and will be mostly
useful for working around various bugs/problems uncovered by it.

See #14302.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-25 00:15:26 +00:00
Vadim Zeitlin
40aa1a7e60 Implement GetSizeFromTextSize() for wxSpinCtrl.
Implement it for the native MSW and GTK versions and the generic one used in
the other ports and also for wxSpinCtrlDouble under MSW.

Also test this function in the spin page of the widgets sample.

Closes #14840.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-20 12:49:53 +00:00
Vadim Zeitlin
a0e5592007 Revert all wxNOEXCEPT-related changes.
This reverts r72978, 72984, 72989 and 72992. Do not use wxNOEXCEPT for
wxTextCtrl dtor as this breaks compilation of any user-defined classes
inheriting from it unless they use wxNOEXCEPT as well and the benefits
(fixing a harmless warning for the niche ICC compiler) are just not worth
the compatibility breakage.

See #14826.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-20 12:49:03 +00:00
Vadim Zeitlin
24f54e45dc Add wxNOEXCEPT to all wxTextCtrl dtors.
Fix compilation with some compilers after r72978 which added wxNOEXCEPT to
wxTextCtrlBase dtor and wxTextCtrl dtor in wxMSW but not in all the other
ports.

See #14826.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 11:53:49 +00:00
Vadim Zeitlin
0508392167 Fix path returned from wxGTK wxFileDialog too.
This is similar to the fixes to wxDirDialog in r72779.

Closes #14786.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-17 23:56:47 +00:00
Vadim Zeitlin
7a78a93782 Add wxControl::GetSizeFromTextSize() to size the control to its text.
This function can be used to size a, say, wxTextCtrl to be exactly of the size
needed to enter the given amount of text in it.

This patch adds wxGTK implementation for wxTextCtrl, wxChoice and wxCombobox;
changes to the samples and the documentation.

Closes #14812.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-09 21:11:37 +00:00
Vadim Zeitlin
346634a0d3 No changes, just remove unnecessary forward declarations.
wxToggleBitmapButton doesn't exist any more, don't forward declare it.

wxToggleButton does exist but is (fully) declared just below, so don't forward
declare it neither.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-08 14:20:53 +00:00
Paul Cornett
80a77e3c73 fix setting background color in wxGTK3 with themes which use background images or gradients, fixes #14759
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-04 17:39:55 +00:00
Vadim Zeitlin
c94c3a77b8 Allow creating wxTextMeasure without specifying the font.
Use the default window/DC font by default as this is the most common case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 17:15:22 +00:00
Vadim Zeitlin
e0da9e871a Allow constructing wxGTK wxTextMeasure with NULL font.
The font is explicitly documented as being possibly NULL in the base class and
wxMSW handles NULL font just fine, so also handle it in the GTK version.

See #14706.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 17:15:15 +00:00
Vadim Zeitlin
c70155b8ee Just fix header comments of wxTextMeasure-related files, no real changes.
See #14781.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-27 12:27:48 +00:00
Vadim Zeitlin
5a7c1881a1 Store the selected directory in wxGTK wxDirDialog.
This should help with the selected directory not being remembered since
GTK+ 2.24.11 as apparently gtk_file_chooser_get_filename() doesn't work any
more now after hiding the dialog -- so call it before doing this and save the
result.

Also get rid of the ugly and apparently completely unnecessary OnFakeOk().

Closes #14525.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-25 23:26:36 +00:00
Vadim Zeitlin
8cd79b7af0 Factor out text measurement from wxDC and wxWindow into wxTextMeasure.
Add a new private wxTextMeasure class implementing methods for measuring text
and move the often duplicated (but not always identically) code for doing the
same from wxDC and wxWindow into it.

Currently this class is only really implemented in wxMSW and wxGTK.

Also extend the test for text measuring functions and rename it to
MeasuringTextTestCase from MeasuringContextTestCase as it's not wxGC-specific
any more.

Closes #14705.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-17 22:35:49 +00:00
Paul Cornett
8ab7533289 Disconnect all GTK signals referencing a wx object which is being destructed
or which is destroying the associated GTK object


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-17 16:23:18 +00:00
Vadim Zeitlin
bb03d283be Recreate GtkPrintOperation every time when printing in wxGTK.
Apparently reusing GtkPrintOperation is not allowed, so create a new one
every time we need it.

Closes #14731.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-08 12:09:37 +00:00
Paul Cornett
95dc31e001 make more Init() functions private
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-02 15:57:03 +00:00
Paul Cornett
ec373f2a81 make wxWindowGTK::Init() private, it is not meant to be called from derived classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 16:55:40 +00:00
Paul Cornett
603e7f6d0c Avoid unrealizing a frozen window
It seems to continue to prevent updates to the affected area

Fixes #13543


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 16:09:12 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Paul Cornett
3b7067a05d Remove use of "size-request" signal for wxWindow sizing.
This signal has been removed from GTK3. Instead have wxPizza keep track of child
size, and use gtk_widget_set_size_request() for wxWindows in native containers.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-17 15:29:50 +00:00
Robin Dunn
7bb22bd68d Add wxDropSource::SetIcon for wxGTK to mimic SetCursor on the other ports.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-03 23:30:40 +00:00
Robin Dunn
70175534bf Make wxTaskBarIcon's ctor have the same API on all platforms even though setting the icon type can only be done on wxOSX-cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-20 05:41:54 +00:00
Vadim Zeitlin
c282e47d8f Always use UTF-8 for file names passed to GTK+ functions under MSW.
When building wxGTK under MSW, always use UTF-8 as file name encoding because
GTK+ doesn't use G_FILENAME_ENCODING there.

Add a helper wxGTK_CONV_FN() macro to hide the difference between the
platforms.

Closes #14035.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-08 18:10:29 +00:00
Vadim Zeitlin
527f168b34 No real changes, just add extra brackets to wxGTK_CONV() macro.
These brackets are probably not really necessary but add them just in case
they can help with parsing some strange expressions and for consistency with
the other wxGTK_CONV_XXX() macros.

See #14035.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-08 18:10:21 +00:00
Steve Lamerton
34326da778 Minor changes, just trim trailing spaces in webview code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-28 18:00:30 +00:00
Paul Cornett
6b1f115551 remove unneeded includes and forward declaration
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 23:34:42 +00:00
Paul Cornett
54195d23c2 replace wxBitmap::SetPixbuf() with wxBitmap ctor taking pixbuf
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 23:33:18 +00:00
Vadim Zeitlin
740dd154a5 Add a private GetNotebookWidget() accessor to wxGTK.
This is similar to the other existing functions and allows to access
GtkNotebook-specific style.

See #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:55:49 +00:00
Vadim Zeitlin
5c26126c14 Export wxGTK private widget creation functions from core library.
This is necessary to allow using them from other libraries, e.g. wxAUI that
will do it in the upcoming commits.

See #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:55:45 +00:00
Vadim Zeitlin
8d241dea5c Fix display of "const" methods in wxGTK assert dialog.
Don't separate the function name and its arguments types in 2 different
columns in the assert dialog, this doesn't really work with const methods as
"const" can't be separated from the function like this. The old code just
didn't take "const" into account at all and mangled all the const methods by
showing ") cons" (no typo) at the end.

Just show everything in one column to avoid the problem and also simplify the
code.

Closes #14104.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-21 00:11:12 +00:00
Paul Cornett
2d13e22fbf make wxMask pixmap member private
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-20 23:07:33 +00:00
Vadim Zeitlin
e3f54c8f7c Implement wxDirDialog:: and wxFileDialog::Create() in wxGTK.
Simply move the code from non-default constructor to Create(). This allows to
create the dialogs using 2-step creation if necessary.

Closes #14069.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-14 12:32:27 +00:00
Vadim Zeitlin
a9ed8caa09 Update the text part of combobox when changing text of selected item in wxGTK.
Add a call to SetValue() to wxComboBox::SetString() in wxGTK if the item being
changed is the currently selected one. The new behaviour is consistent with
wxMSW and also makes more sense.

Document it too to remove any doubts about what is supposed to happen in this
case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-11 23:55:19 +00:00
Robin Dunn
f2b6dd8c50 Make the CreateTool factories be public so they can be used from application code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-10 00:01:09 +00:00
Paul Cornett
7cf17ea27b remove signal-blocking variable, instead just connect to signal when ready
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-01 16:44:31 +00:00
Paul Cornett
4c9bde5ec0 use m_ prefix for web_view member, and make it a WebKitWebView* to eliminate many casts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-01 16:36:58 +00:00
Paul Cornett
f705fbf007 remove unnecessary override of AddChildGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-28 17:25:59 +00:00
Paul Cornett
cafc6e0f1f fix virtual override broken in r58875
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-28 17:06:56 +00:00
Paul Cornett
fac46b97d6 use 0 (== GTK_STATE_NORMAL) for state parameter default
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-27 17:49:33 +00:00
Paul Cornett
ac900e6ba5 remove wxGraphicsContext dependency for transparent background support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-11 19:39:23 +00:00
Vadim Zeitlin
1442168125 Implement wxBG_STYLE_TRANSPARENT support for wxGTK.
Use composited windows if supported by GTK+ for wxWindows with this background
style.

Also add wxWindow::IsTransparentBackgroundSupported() and show how to use it
in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-11 16:26:52 +00:00
Stefan Neis
a8ed16c999 Reverted bogus fix for bogus bug report #13402.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-05 22:53:39 +00:00
Stefan Neis
6dadeb495b Mark unused parameter as such, fixes #13402.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-05 22:20:57 +00:00
Paul Cornett
b9ced7a914 remove virtual override that just calls base
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-31 17:44:32 +00:00
Paul Cornett
99f8cf22db move Pango underline workaround into wxFont::GTKSetPangoAttrs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-29 08:14:34 +00:00
Paul Cornett
c7e99122a0 move SetPangoAttrsForFont to wxFont
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-29 08:00:15 +00:00
Vadim Zeitlin
58d77880bb Forward declare wxFont in wx/gtk/private.h.
This fixes compilation in STL build (for some strange reason it doesn't affect
the default build however).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-25 00:05:06 +00:00
Vadim Zeitlin
c7a49742ec Add support for stricken-through fonts.
Support stricken-through fonts in wxMSW and wxGTK (including special support
in wxStaticText and wxTextCtrl).

Closes #9907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-23 11:28:28 +00:00
Vadim Zeitlin
0634700a96 Add wxFont ctor taking a single flags argument instead of style/weight/...
Currently this ctor just does the same thing as the existing ctors in a
different way but it will be extended to support wxFONTFLAG_STRIKETHROUGH in
the next commits.

See #9907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-23 11:28:21 +00:00
Václav Slavík
907f09f44b Replace wxDataViewCtrl::StartEditor() with EditItem().
This is more consistent with other wxDVC methods (taking column pointer
as its argument) and other DVC-like classes where the name EditLabel()
is used for similar purposes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-17 14:05:17 +00:00
Václav Slavík
ee1377e1fa Add wxDataViewCtrl::GetCurrentColumn().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-17 14:05:07 +00:00
Vadim Zeitlin
e4a23857ec Implement wxMenuBar::EnableTop() for wxMSW and wxGTK.
This method was only available in wxUniv before and just always returned true
in the other ports. Implement it for wxMSW and wxGTK too now and document it.
Also add a unit test.

Closes #795.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-15 13:41:17 +00:00
Paul Cornett
02800dde9e move render params out of wxDataViewCustomRenderer
they only need to exist for the duration of the render() call

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 06:31:07 +00:00
Stefan Neis
6dd0883d55 Do not put semicolons after the definition of an inline function.
Even though most compilers just ignore this, it's just wrong and if you
do get warnings about header files, they can become quite overwhelming.
Forward port of r70163.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-29 14:42:13 +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
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
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
Paul Cornett
46a1983ae4 use int instead of size_t for a couple member variables
it's simpler, and there is no point in using size_t anyway since they are assigned from ints

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-25 00:52:24 +00:00
Robin Dunn
a0ff361188 Don't include webkit headers from wx headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-17 01:23:03 +00:00
Vadim Zeitlin
cf0a0f9303 Move GDK_META_MASK definition in the header in which it is also used.
The code using GDK_META_MASK was moved to wx/gtk/private/event.h from
gtk/window.cpp but the fallback definition of GDK_META_MASK for GTK+ < 2.10
remained in window.cpp.

Move it to the header as well now so that it can be compiled with GTK+ < 2.10
again.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-08 11:02:05 +00:00
Vadim Zeitlin
b6dd4afdf8 Compilation fixes for GTK+ 2.4.
Add missing GTK_CHECK_VERSION(2,6,0) checks.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-08 11:02:02 +00:00
Paul Cornett
4ccb6db090 add gdk_window_get_height/width
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-31 05:42:10 +00:00
Vadim Zeitlin
1da8e6e400 Make GTK callbacks passed to GTKConnectWidget() extern "C".
This fixes (harmless but annoying) warnings about mixing C++ and C linkage
function pointers from Sun compiler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-27 21:10:45 +00:00
Paul Cornett
3ec3c160bc fix wxMDIChildFrame after r69390 and r69468, TLW realization code should not be called, fixes #13593
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-25 16:56:57 +00:00
Václav Slavík
4a99d59750 Move InitMouseEvent<T>() to wx/gtk/private/event.h.
It is needed in wxDataViewCtrl now too, in addition to wxWindow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-19 16:20:10 +00:00
Václav Slavík
1d3a930e82 Use wxDatePickerCtrl in wxDataViewDateRenderer.
Inline editor is more in line with the behavior of other editors,
requiring double click to edit values was unexpected.

Also merge the two almost-but-not-quite identical implementations in
generic and GTK+ versions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-19 16:20:06 +00:00
Vadim Zeitlin
46ea442ca2 Added wxNonOwnedWindow::SetShape(wxGraphicsPath).
TODO: Document.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-18 21:56:52 +00:00
Vadim Zeitlin
a82afab363 Implement SetShape() for wxPopupWindow in wxGTK.
Move SetShape() implementation from wxTopLevelWindow to wxNonOwnedWindow so
that wxPopupWindow, which also inherits from the latter, could use it as well.

This makes it possible to have popup windows with irregular shapes in wxGTK as
well as in wxMSW and wxOSX.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-13 12:45:56 +00:00
Vadim Zeitlin
612515aff1 Added wxWindow::GTKHandleRealized() virtual method to wxGTK.
This allows to easily do something in the derived classes when the widget is
realized, without having to deal with GTK+ signals. In particular, get rid of
another "realize" signal handler in wxTopLevelWindow and simply override this
virtual method there.

It also incidentally makes the callback code simpler as the window doesn't
need to be constantly dereferenced.

This shouldn't result in any changes to behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-12 16:22:14 +00:00
Vadim Zeitlin
aadbdd1699 Remove wxHeaderColumn::SetAsSortKey() and only use SetSortOrder().
The two member functions, SetAsSortKey() and SetSortOrder(), were doing almost
the same thing but differently and the former was only used in the generic
wxDataViewCtrl implementation and not implemented in the native GTK/OS X one.

Remove SetAsSortKey() entirely and only keep UnsetAsSortKey() which is still
needed by generic/MSW wxDataViewCtrl. But only SetSortOrder() should now be
called to indicate that the column is used for sorting.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-21 15:07:46 +00:00
Steve Lamerton
9d2f31db0c Update wxWebView guards to stop backend compilation when wxUSE_WEBVIEW is 0.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-12 18:35:39 +00:00
Steve Lamerton
1d156af324 Merge in from trunk r68684 - r69046
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@69047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-10 15:09:22 +00:00
Paul Cornett
29e461a210 remove unnecessary GTK declarations from defs.h, move things only used once to the place that needs them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-07 16:56:50 +00:00
Vadim Zeitlin
fa93d732e2 Harmonize wxDataViewCtrl::GetSelection() behaviour in all ports.
wxDataViewCtrl::GetSelection() now always returns invalid item if more than
a single item is selected in a multi-selection control.

Also add HasSelection() and GetSelectedItemsCount() to allow checking if any
items are selected.

Updated the documentation, all ports and added a test for all these functions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-22 12:41:19 +00:00
Vadim Zeitlin
0eec47e4a2 No changes, just add wxGtkList to ensure g_list_free() is always called.
Add an extremely simple RAII wrapper around GList and use it.

Also add wxGtkTreePathList which also automatically frees its contents to
simplify working with the lists of GtkTreePaths.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-22 12:41:00 +00:00
Vadim Zeitlin
1871b9facb No changes, just use symbolic NO_IMAGE constant instead of -1 or wxNOT_FOUND.
Existing declarations used -1 in several places to indicate the absence of the
image which wasn't especially clear and was also inconsistent with other
places that used wxNOT_FOUND which didn't make much sense in this context.

Add a new symbolic constant NO_IMAGE in wxWithImages and use it in the classes
deriving from it. This still doesn't help with wx{Tree,List}Ctrl but improves
clarity for the other classes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-21 14:08:49 +00:00
Vadim Zeitlin
36a96421b3 Replace wxComboBox::IsEmpty() with Is{List,Text}Empty().
IsEmpty() didn't exist in all ports (notably not wxMSW) and its meaning was
unclear anyhow, so remove it even from the ports where it did exist and add
clear Is{List,Text}Empty() replacements instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-21 12:06:16 +00:00
Steve Lamerton
467d261e9d Rename web library to webview.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-19 10:45:16 +00:00
Steve Lamerton
39ab701469 Remove MoveWindow method.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-18 09:26:52 +00:00
Steve Lamerton
4d0dddc7ad Rename LoadUrl to LoadURL. This corrects the capitalisation as it is an acronym, and brings it into line with GetCurrentURL.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-17 10:55:59 +00:00
Steve Lamerton
fba4c7c91b Make a few internal methods private.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-17 10:36:14 +00:00
Steve Lamerton
e669ddde23 Const correct the wxWebView api.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-17 10:26:09 +00:00
Steve Lamerton
c13d6ac1ea Rename wxWebHistoryItem to wxWebViewHistoryItem.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-15 12:31:31 +00:00
Steve Lamerton
7d8d6163ad Rename wxWebFileHandler to wxWebViewArchiveHandler, wxWebHandler to wxWebViewHandler. Update the documentation and the sample. Add a constructor taking a wxString to specify the scheme in wxWebViewHandler.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-14 12:15:34 +00:00
Steve Lamerton
94e0018723 Merge in from trunk r64802 - r68625
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-10 18:10:42 +00:00
Steve Lamerton
3baf235f60 Use shared pointers to hold wxWebHandlers throughout.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-08 15:12:33 +00:00
Steve Lamerton
211da8a57d Add support for loading resources in custom schemes for the WebKitGTK+ backend.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-05 09:06:45 +00:00