Commit Graph

1921 Commits

Author SHA1 Message Date
Adrien Tétar
bc562289c6 Introduce wxPenInfo class 2017-09-10 01:02:06 +02:00
Vadim Zeitlin
1c946a469a Get rid of overridden wxTextCtrl::DoSetValue() in wxGTK
This method seems completely unnecessary, the base
wxTextEntry::DoSetValue(), which delegates to Remove() and WriteText(),
seems to work just as well and avoids code duplication between this
method and wxTextCtrl::WriteText().

Notice that gtk_text_buffer_set_text() is just a trivial wrapper around
gtk_text_buffer_delete() and gtk_text_buffer_insert() anyhow, so there
is no efficiency loss in not using it neither.
2017-08-24 22:30:33 +02:00
Paul Cornett
49605bc5a7 Use forward-declaration macro to avoid compiler warnings 2017-08-01 08:37:15 -07:00
Artur Wieczorek
8317bc2844 Fix determining the length of the text in wxTextEntry/wxTextCtrl (wxGTK)
Several functions of wxTextEntry and wxTextCtrl call to
gtk_entry_get_text_length() API to determine the length of the text in
GTKEntry. This API is available since GTK+ 2.14 so we have to implement
a fallback method for older GTK+ versions.
Dedicated function GTKGetEntryTextLength() is implemented in wxTextEntry
and exposed through its interface because it is also used in wxTextCtrl.
2017-07-31 21:39:48 +02:00
Paul Cornett
5b679bfbec Get rid of wxGTKDash, it's the same as wxDash 2017-07-31 10:19:44 -07:00
Paul Cornett
a533fb141d Fix unresponsive frame after using wxHtmlHelpFrame from a dialog. See #17837 2017-07-24 08:56:59 -07:00
Artur Wieczorek
79a7fa0330 Create new instance of wxPrintDC in wxGtkPrintDialog
GetPrintDC() should return a new device context created by the print
dialog, not the duplicate of existing context passed from the caller
(e.g. from wxGtkPrinter) through SetPrintDC(). Therefore SetPrintDC() is
no longer useful and can be removed.
2017-05-29 20:17:19 +02:00
Vadim Zeitlin
2f8a343b22 Add an option for reproducible library builds
This can be useful to the library packagers, notably under Debian.

Closes #17000.
2017-05-27 19:03:32 +02:00
Artur Wieczorek
ef3863a71e Implement GetPartialTextExtents() in wxGtkPrinterDC
Generic implementation from wxDCImpl doesn't work well with wxPrinterDC
under wxGTK.
(This implementation is adopted from wxCairoContext::GetPartialTextExtents.)
2017-05-26 00:32:49 +02:00
Scott Talbert
69e4f491b2 Move wx/gtk/webview_webkit2_extension.h to private directory
Make it more clear that this header is private, i.e. used only by the library
itself.

Close https://github.com/wxWidgets/wxWidgets/pull/473
2017-05-04 18:23:00 +02:00
Vadim Zeitlin
d0aaea5143 Merge branch 'staging' of https://github.com/stahta01/wxWidgets
Allow building wxGTK for MSW using MSys2 and configure.

Close https://github.com/wxWidgets/wxWidgets/pull/428
2017-05-04 02:51:52 +02:00
Scott Talbert
cbe0a1f049 Add support for WebKit2GTK+ in wxWebView 2017-04-22 20:00:48 +01:00
Tim S
a6f5a45cad Do NOT have method GetIconFromMimeType except under Unix. 2017-03-07 12:47:33 -05:00
Tim S
f11409ab09 When not Unix skip wxOVERRIDE in GetIconFromMimeType. 2017-03-03 13:37:24 -05:00
Maarten Bent
87308746be Resolve -Wsuggest-override warnings. 2017-02-24 23:37:44 +01:00
Vadim Zeitlin
e125c3b657 Allow disabling unsafe implicit conversions in wxString
While we have to keep these conversions enabled by default, they are very
dangerous as they can result in silent data loss on any system not using a
locale with UTF-8 encoding, i.e. always under MSW.

Allow mitigating this by defining wxNO_UNSAFE_WXSTRING_CONV when compiling the
application code using the library, which makes these conversions invisible to
the user code, and so can be used without recompiling the library.

Also add wxUSE_UNSAFE_WXSTRING_CONV which can be set to 0 when compiling the
library to disable these conversions globally for all applications using it.

Closes #11830.
2017-02-12 02:29:30 +01:00
Vadim Zeitlin
4cc45797a1 Fix wxUSE_DC_TRANSFORM_MATRIX comment in wx/setup_inc.h
Propagate the change done in 49000defcf to the
generated include/wx/msw/setup0.h file to wx/setup_inc.h, so that this change
won't be lost during future regenerations.
2017-02-12 02:27:22 +01:00
Václav Slavík
8b5387bc3d Enable wxUSE_ACCESSIBILITY by default (MSW)
Compile accessibility support on Windows by default now that the generic
wxDataViewCtrl control implements accessible interface. After the
changes from 7dab555f71, accessibility
support is much more lightweight and doesn't interfere with normal win32
behavior, so this change shouldn't affect accessibility-unaware code in
any way.
2016-12-13 18:56:20 +01:00
Václav Slavík
ff1dba498e Add wxDataViewValueAdjuster
Add wxDataViewRenderer:: SetValueAdjuster() and a
wxDataViewValueAdjuster class. This can be used to customize rendering
of values depending on whether they are highlighted (selection) or not,
without having to implement an entire new custom renderer.
2016-12-11 15:20:42 +01:00
Paul Cornett
d5681ee4a8 Fix infinite sizing loop caused by 3b4ee5a0
Avoid the problems 3b4ee5a0 attempted to address in a much simpler way:
when a "size-allocate" is in progress, call gtk_widget_size_allocate()
directly, rather than deferring a call to gtk_widget_queue_resize().
See #17585
2016-12-09 21:38:35 -08:00
Paul Cornett
0ef695ef9b Revert d30673e5, it's completely broken. See #17089 2016-11-23 09:28:28 -08:00
Paul Cornett
1b0e7c17e3 Enable choosing paper size and orientation on print dialog, see #17712 2016-11-14 22:32:03 -08:00
Paul Cornett
101c43d0aa Partial workaround for stale styling information with GTK3
We can trigger size events when we know the style cache has been updated.
See #16088
2016-11-01 23:18:26 -07:00
Václav Slavík
a6be5bdae3 Fix wxGTK wxDataViewRenderers' alignment handling
Don't apply alignment to native controls in SetAlignment() method, where
it may not be known yet due to column-to-renderer inheritance if
wxDVR_DEFAULT_ALIGNMENT is used (the default). Move such code to
GtkUpdateAlignment() (which was made virtual) in all renderers.

This fixes unintended right-aligning of columns with GTK+ 2 when default
alignment was used.
2016-10-21 17:50:34 +02:00
ARATA Mizuki
8cfc74491a Replace wxEXPLICIT with the 'explicit' keyword
See #17655.
2016-09-14 18:45:12 +09:00
Kolya Kosenko
897ffb58b0 Use native MIME and display classes in wxGTK/Win32 build
Use Windows file associations when running under this OS, even when using
wxGTK, because this is the right thing to do.

Also use native wxDisplay implementation because it works better than the GTK+
one under this platform.

Closes #17651.
2016-09-08 00:48:41 +02:00
Artur Wieczorek
ba4b8d5670 Fix retrieving clipping box after changing wxDC coordinates (GTK)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when wxDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale(), SetLogicalScale(), SetTransformMatrix() or ResetTransformMatrix().
When any of these functions is called then clipping box data are marked as invalid and updated by recalculating extents of the clipping region in new coordinates at nearest call to GetClippingBox().

Closes #17646.
2016-09-01 21:42:13 +02:00
Vadim Zeitlin
74c0462c84 Add wxDataViewTextRenderer::EnableMarkup()
Implement the new method to all the implementations (generic, GTK, OS X), show
it in the sample and update the documentation.
2016-06-16 00:06:23 +02:00
Vadim Zeitlin
4dfde501df Add support for returning item location to wxGTK wxMimeTypesManager.
This is a squash merge of gtk_mimetype branch from
https://github.com/Hanmac/wxWidgets.git with some extra minor cleanup.

Closes https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-07 14:29:52 +02:00
Vadim Zeitlin
675d9d779d Add wxSecretStore
Add a new class allowing to store passwords and other sensitive information
using the OS-provided facilities.

Add implementations for all the main platforms, documentation and a new sample
(which contains an ad hoc unit test as the real unit test for this class would
probably be a bad idea as it wouldn't run in non-interactive contexts and
could show OS level dialog boxes if it did).
2016-06-04 18:29:15 +02:00
Vadim Zeitlin
a5d2f53f41 Inherit wxGauge from wxGaugeBase in wxGTK
Ensure the proper class hierarchy in wxGTK, this notably allows to override
SetValue() in classes derived from wxGauge, which didn't work in wxGTK (but
did in wxMSW and wxOSX) before.

Also remove the now unnecessary IsVertical().
2016-05-13 22:32:16 +02:00
Vadim Zeitlin
8baaa652ef Merge branch 'dvc': miscellaneous wxDataViewCtrl-related fixes 2016-04-02 01:09:06 +02:00
Vadim Zeitlin
716dace3d6 Make wxDataViewCtrl::Expand() expand ancestors in native ports too
Expand() called ExpandAncestors() in the generic wxDataViewCtrl implementation
but not in the native ones, resulting in observable difference in the
behaviour: for example, the wxDataViewTreeCtrl in the dataview sample appeared
initially expanded under MSW, using the generic version, but collapsed under
GTK and OSX.

Harmonize this among all ports. This also has a nice side effect of making
Expand() less horribly inefficient as it is not recursively called by
ExpandAncestors() which it itself used to call: now ExpandAncestors() only
calls DoExpand() which is a simple function that only expands the item passed
to it and does nothing else.

Closes #14803.
2016-03-22 21:22:36 +01:00
Vadim Zeitlin
841af56084 Allow using debug help API with non-MSVC compilers
MinGW64 and TDM-GCC come with imagehlp.h and can compile the code using debug
help API too, so enable wxUSE_DBGHELP when using these compilers by default
and also allow enabling it via a configure option.
2016-03-15 20:11:07 +01:00
Vadim Zeitlin
c03ae2a8f8 Propagate changes to generated wx/msw/setup0.h back to setup_inc.h
Changes of d053a90486 only updated the generated
wx/msw/setup0.h file but not the file wx/msw/setup_inc.h from which it is
generated and so would have been lost after the next modification to the
latter.

Modify the latter one too to ensure that the changes stick.

See https://github.com/wxWidgets/wxWidgets/pull/238
2016-03-13 15:37:08 +01:00
Vadim Zeitlin
6f80021950 Fix wxGTK wxHyperlinkCtrl compilation problem with g++ 5.2
Make wxHyperlinkCtrl ctors non-inline to work around an error about incomplete
wxHyperlinkCtrlColData in the inline ctor body with this compiler (but not
with g++ 4.9 nor 5.3, somehow).

Closes #17089.
2016-03-07 19:41:58 +01:00
Hans Mackowiak
d30673e507 Implement setting link colours in wxHyperlinkCtrl for GTK+3
Use GtkCssProvider to customize the colours used.

Closes #17089.
2016-03-07 15:00:07 +01:00
Hans Mackowiak
1e70c05759 Add wxWindow::ApplyCssStyle() helper to wxGTK
This is useful for styling GTK+ 3 widgets.

See #17089.
2016-03-07 13:22:57 +01:00
Vadim Zeitlin
c2821dcea0 Allow using arbitrary windows as wxDataViewCtrl editors in wxGTK
Previously the editor created by wxDataViewRenderer::CreateEditorCtrl() had to
be a native GTK+ widget implementing GtkCellEditable interface which prevented
using composite windows (e.g. a container for a text control and a button) as
editors.

Create a helper container wrapping them now and implementing GtkCellEditable
now to allow this.
2016-02-28 20:25:07 +01:00
Manuel Martin
bdc95f5766 Improve wxGLCanvas to be more type safe and better support modern OpenGL
Add wxGLAttribsBase, wxGLAttributes and wxGLContextAttrs replacing the old
untyped "int attributes[]".

Don't use global object for creating OpenGL > 3.0 contexts.

Closes #16909.
2016-02-23 00:32:54 +01:00
Paul Cornett
6674ca57da implement wxDC::GetContentScaleFactor() for GTK3 2016-02-22 09:52:26 -08:00
Vadim Zeitlin
80d4993119 Merge wxNotificationMessage for OS X and MSW 8+
Closes https://github.com/wxWidgets/wxWidgets/pull/92
2016-02-18 23:09:05 +01:00
Paul Cornett
f95fd11e08 Allow drawing HiDPI bitmaps with GTK3
1. Override wxWindow::GetContentScaleFactor() to use gdk_window_get_scale_factor()
   when available, and to use correct scale (1.0) otherwise, as wxDC::GetPPI()
   (used by overridden method) is not properly implemented for wxGTK
2. Record scale in wxBitmap(wxImage&) ctor and wxBitmap::CreateScaled()
3. Adjust cairo scale for drawing bitmap, and (inversely) for drawing on bitmap
2016-02-14 13:12:52 -08:00
Tobias Taschner
72db8a6265 Add basic support to use WinRT APIs.
Some Windows8+ APIs are only accessible via WinRT which is based on COM. However there are a few dependencies to get to the interfaces via functions defined in roapi.h. Using RoInitialize, RoUninitialize, etc. directly from it's windows headers adds dependencies to the WinRT dlls leaving the resulting exe unable to launch on earlier Windows versions. The wxWinRT functions wrap this with dynamic loading. Additionally wxWinRT::TempStringRef adds a convenient wrapper to HSTRING which is used extensively in WinRT APIs.
2016-02-10 20:38:11 +01:00
Tobias Taschner
bf5e403a68 Restructure wxNotificationMessage.
wxNotificationMessage has been refactored to always use wxNotificationMessageImpl (this was previously already done in the MSW implementation)

This adds various features and fixes to wxNotificationMessage:
- OS X Notification Center implementation
- Generic "toast" notifications
- SetIcon() to specify a custom icon
- AddAction() to add actions to notifications
- Events to get notify of notification clicks, dismiss or actions
2016-02-10 20:38:10 +01:00
Vadim Zeitlin
7a8684a8bd Add RAII wrapper for GTKDisableEvents/GTKEnableEvents() calls
Ensure GTKEnableEvents() is called automatically on scope exit whenever
GTKDisableEvents() is called.

This fixes a couple of potential bugs where GTKEnableEvents() could be not
called if wxCHECK() condition failed and makes the code shorter and safer.
2016-02-06 19:13:35 +01:00
Vadim Zeitlin
6768695d14 Extract wxGtkTreePath from src/gtk/dataview.cpp
Put this class into its own header so that it could be reused from other
places.

No real changes.
2016-02-06 19:13:35 +01:00
Andreas Falkenhahn
6a01623a80 Add wxListBox::GetTopItem() and GetCountPerPage()
Implement these methods for all the major ports, add them to the widgets
sample and documentation.

Closes #17189.
2016-02-06 19:13:35 +01:00
Paul Cornett
413d7c220c Fix running with GTK+ 2.22 or earlier when built with 2.24
Previous versions define gdk_window_get_visual as gdk_drawable_get_visual
2016-02-05 23:14:48 -08:00
Paul Cornett
56701052eb remove const from pass-by-value parameters 2016-01-16 10:55:01 -08:00
Vadim Zeitlin
52a4fac626 Add proper support for wxUSE_NATIVE_PROGRESSDLG
This symbol was wrongly added to include/wx/msw/setup0.h directly in
075ef6551e, so it didn't work when
cross-compiling from Unix (which doesn't use this file) and would have been
lost after any future modification of include/wx/setup_inc.h where it should
have been added in the first place.

Do this now and also make the check for this symbol in wx/progdlg.h a bit more
readable.
2015-12-30 18:54:35 +01:00
Vadim Zeitlin
69b66e9e2e Add wxTextEntry::ForceUpper()
Allow automatically converting lower-case letters entered into wxTextCtrl to
upper-case equivalents. Provide generic fallback and implement the method
natively for all the major platforms.

Also update the text sample to show it in action.
2015-12-08 03:02:46 +01:00
Paul Cornett
cc48c42e17 remove no-longer-needed OnInternalIdle() override 2015-12-06 20:24:59 -08:00
JulianSmart
a797c9d956 Make wxBitmap ctors consistent wrt passing scale for conversion from wxImage; HiDPI adaptation for propgrid buffer and wxRTC images 2015-11-15 12:49:25 +00:00
Paul Cornett
a0173ec13e add compatibility header for older GTK3 versions 2015-10-10 11:38:06 -07:00
Paul Cornett
27a8d28029 more use of wxOVERRIDE 2015-09-06 17:20:42 -07:00
Paul Cornett
2fbd2a7800 Implement SetVisited()/GetVisited()
and set the visited state when the link is clicked
2015-09-03 09:30:42 -07:00
Vadim Zeitlin
602783facb Merge branch 'dvc-type-check'
Various fixes to make wxDataViewCtrl behaviour more homogeneous across all
ports.
2015-09-03 00:01:24 +02:00
Paul Cornett
83ce88402c Add gtk_cell_renderer_set_padding() compatibility function 2015-09-01 08:41:15 -07:00
Vadim Zeitlin
361c6357b4 Use wxDataViewRenderer::PrepareForItem() in all ports
wxOSX and wxGTK previously used their own methods for handling the enabled
state and the attributes of the items being rendered, change them to reuse the
same methods as the generic implementation, i.e. SetEnabled() and SetAttr()
and remove the port-specific GtkSetAttr(), OSXApplyAttr() and so on.

This has the advantage of ensuring that the logic is the same for all
platforms (e.g. item enabled status wasn't handled in the same way in wxGTK as
in the other ports previously) and hopefully makes the code simpler by cutting
down on the number of virtual methods.

Notice that GtkSupportsAttrs() optimization was removed as it didn't seem to
be worth the bother (we basically saved a call to a virtual model method at a
price of a virtual renderer method call) and preserving it would have
complicated things needlessly.
2015-08-31 22:20:33 +02:00
Tobias Taschner
5f75b7506f Remove Hildon framework support.
The Hildon framework was used for Nokia 770 and other Maemo devices.
This platform discontinued and hasn't seen a new release since 2011.
2015-08-26 22:49:53 +02:00
Paul Cornett
0ff96c620f fix wxHyperlinkCtrl opening URL twice, see #13813 2015-08-18 23:02:33 -07:00
Paul Cornett
9cfda3ca4d IsShown() now returns false for non-selected wxNotebook pages, see #4343 2015-08-15 11:04:20 -07:00
Paul Cornett
b7cf54d24a Avoid using gdk_window_freeze_updates() to implement Freeze()
Implement Freeze() by blocking the GtkWindow "expose-event"/"draw" signal
instead. Since the introduction of client-side windows in GTK+ 2.18,
gdk_window_freeze_updates() is unuseable because the impl_window (and thus the
update_freeze_count) for a given GdkWindow can change unpredictably. See #16795
2015-06-24 08:43:30 -07:00
Vadim Zeitlin
c0ae81ced7 No changes, just rename GTKGetCurrentState() to be more clear.
Update the name and the comment to explain better that this method returns the
state for which the bitmap is currently shown, not necessarily the current
state.

See #16771.
2015-05-09 19:17:41 +02:00
Paul Cornett
f0a2a6472f Fix GTK warnings after 4b9485a when TLW is closed while editor is still shown, see #16850 2015-04-26 11:01:44 -07:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
6d92f45385 Remove all mentions of wxGauge shadow width and bezel face.
The shadow width was only used by wxMotif and bezel face not used at all since
a very, very long time, so just remove these methods from the ports which still
had them (just doing nothing) and remove support of the corresponding XRC
attributes.
2015-04-20 18:46:55 +02:00
Dimitri Schoolwerth
66cfa40643 Deal with remaining cvs/svn keywords.
A few $Id$ references remained after commit
3f66f6a5b3 or appeared in newly added files.
Remove the lines containing svn keywords except when it concerns
third-party files. In that case keep the line as-is or collapse it to the
keyword if it had been expanded to contain wx commit information (only
occurs with src/zlib/ChangeLog).
2015-04-09 03:32:23 +04:00
Vadim Zeitlin
3f84cb17ca Add wxActivityIndicator control.
This is a simple animated control indicating some program activity.

Provide native GTK+ (for > 2.20) and OS X implementations as well as a generic
one used under MSW.

Update the sample and the documentation.
2015-03-20 00:08:37 +01:00
Vadim Zeitlin
6ad2d4f264 Fix handling of disabled cells in wxGTK wxDataViewCtrl.
The original code (see r66404 and r66416) didn't work because it used
wxDataViewRenderer::SetMode() to make the renderer inactive but then used its
GetMode() to restore the previous state -- which was lost. The result of this
was that if the overridden IsEnabled() in the model ever returned false for
any row, all the cells in this column, in all the rows, became insensitive, as
could be seen by the inability to edit any rating in the first page of the
dataview sample (even though it was disabled for a single row only) and any
checkboxes on its third page (even though only the last two of them were
supposed to be disabled).

Fix this simply by making the renderer insensitive at GTK level only, but do
not change the mode at wx level.

See #12686.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-10 23:14:48 +00:00
Vadim Zeitlin
453897149f Add wxAddRemoveCtrl class.
This is a simple high level helper combining an arbitrary control showing
multiple items with the buttons allowing to add items to and remove items from
this control, but using the buttons and the layout appropriate for the current
platform.

Add the implementation itself, an example of using it to the dialogs sample
and the documentation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-09 00:26:11 +00:00
Vadim Zeitlin
adb339078e Add an accessor for GtkToolbar widget of wxToolBar.
This can be used to customize the toolbar beyond the capabilities of wx API.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-09 00:25:51 +00:00
Vadim Zeitlin
e8374a47fe Allow setting hints for multi-line wxTextCtrl when supported.
Don't prevent people from using hints in wxMSW and wxGTK2, where they work
with multiline text controls too, even though they do not work with wxGTK3 nor
wxOSX.

Closes #14456.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-25 01:32:00 +00:00
Vadim Zeitlin
615b49692c Add GetDefaultType() to all standard wxDataViewRenderer-derived classes.
This makes it possible to refer to the associated wxVariant types without hard
coding the string constants, i.e. instead of writing "string" (error prone as
typos are not detected) it is now possible to write wxDataViewTextRenderer::
GetDefaultType().

This will also make it simpler to write generic (in C++ templates sense) code
using renderers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-20 21:51:54 +00:00
Vadim Zeitlin
a580f0b994 Remove unnecessary wxUSE_MFC option.
This didn't do (almost) anything, so just remove it, using MFC and wxWidgets
together works just fine without it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-16 20:16:16 +00:00
Stefan Neis
99d08bcc4b No real changes, just fixed a couple of typos in comments, fixes #16726.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-14 11:12:31 +00:00
Paul Cornett
9bee2091d4 clarify comment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-19 19:00:00 +00:00
Vadim Zeitlin
45e972943f Provide trivial GDK_IS_X11_DISPLAY() definition for GTK+2.
This will be useful for upcoming patches using it to fix problems with GTK+ 3
without breaking GTK+ 2 compilation.

See #16688.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-19 13:29:07 +00:00
Paul Cornett
dc555a92e3 notify all windows in capture stack about capture lost, and empty the stack
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-15 17:02:21 +00:00
Paul Cornett
7913d200c8 fix creating wxFont with non-ascii name, closes #16671
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-12 07:43:06 +00:00
Paul Cornett
ff4af7693e non-pch build fix after r78134
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 07:50:33 +00:00
Vadim Zeitlin
dec924cdf1 Add wxCursor::GetHotSpot() and implement it for wxMSW and wxGTK.
Allow retrieving the coordinates of the cursor hot spot, at least for the
ports for which we know how to do it.

Closes #16539.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:02:50 +00:00
Vadim Zeitlin
e737363e6b Introduce wxCursorBase class defining common wxCursor API.
This is done in preparation for adding a new wxCursor method and will allow us
to define it in a single place by default instead of having to provide stubs
for all ports.

See #16539.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:02:45 +00:00
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