Vadim Zeitlin
ab7f003482
More compilation fixes after wxNOEXCEPT introduction.
...
This is a temporary change, r72984 and the following changes (see #14826 ) will
probably be reverted soon anyhow, but for now at least fix wxGTK compilation.
Closes #14837 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 18:01:01 +00:00
Vadim Zeitlin
04f8a852c1
Handle wxBORDER_NONE in wxGTK wxTextCtrl::DoGetSizeFromTextSize().
...
Don't add margins for the controls without borders, they are not used in this
case.
See #14816 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-14 13:47:13 +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
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
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
Paul Cornett
6be306d4dc
fix deleting a frozen multi-line wxTextCtrl, see #13543
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 17:55:00 +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
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
d5027818a4
fix warnings about conversion to bool, closes #14381
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-07 05:18:30 +00:00
Vadim Zeitlin
eccace042d
No real changes, just fix misspellings in comments in wxGTK code.
...
Also remove a couple of wrong $Id$ expansions.
Closes #14203 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-15 23:18:01 +00:00
Vadim Zeitlin
36cc76505c
Use wxStrnicmp() instead of strncasecmp() in wxGTK code.
...
This fixes compilation under Windows where strncasecmp() is not available --
but portable wxStrnicmp() always is.
Closes #14036 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-23 13:56:14 +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
Paul Cornett
990cf3b959
use correct function to free GtkTextAttributes
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-11-11 16:38:48 +00:00
Vadim Zeitlin
6ce832135e
Add wxTextCtrl::PositionToCoords() functions for wxMSW and wxGTK.
...
The new method allows to find the coordinates in pixels of the given character
in a text control.
Closes #13221 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-07-29 15:11:54 +00:00
Dimitri Schoolwerth
a1b806b982
Replaced Ok() occurrences with IsOk() throughout trunk.
...
Additionally renamed wxOSX' private wxNativePrinterDC::Ok() function to IsOk().
Didn't deprecate the various Ok() functions: given the amount of changes already introduced in 3.0 a trivial one like this seems more suitable for after 3.0.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-03 16:29:04 +00:00
Paul Cornett
385e8575dd
avoid deprecated functions and direct struct access
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-28 06:27:49 +00:00
Václav Slavík
fc9ab22a76
Use accessor functions instead of deprecated GTK+ macros.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-26 15:49:57 +00:00
Stefan Csomor
2895324520
merging back XTI branch part 2
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-04 08:31:53 +00:00
Vadim Zeitlin
490e22fdd0
Replace some stray _T()s with wxT().
...
We use wxT() exclusively now so replace some _T()s which crept in unnoticed.
This also fixes compilation using Sun CC.
See #12452 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-27 12:55:28 +00:00
Vadim Zeitlin
6eb6062821
Fix wxTextEntry::SelectAll() in presence of hints in wxGTK.
...
Translation of wx (-1, -1) selection to (0, GetValue().length()) in
wxTextCtrl::SetSelection() was unnecessary as it ended up calling the base
class wxTextEntry::SetSelection() version which didn't need it. Moreover, this
translation was actually harmful when the text control happened to show a hint
string as its official value was empty in this case and so SetSelection(0, 0)
was called which didn't do anything and broke clearing/changing the controls
text when it was showing a hint.
Simply don't translate the indices when using a single line control to fix
this.
See #12475 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-15 22:10:07 +00:00
Robert Roebling
c2246a3881
Applied patch, fixes #12090 : wxGTK cursor handling revamp
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-26 17:37:55 +00:00
Paul Cornett
69cecdb1c4
work around probable bug in GTK+ 2.18 when calling WriteText on a new, empty control, #11409
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-04 05:18:38 +00:00
Vadim Zeitlin
2205ca7463
Also support fonts in wxTextCtrl::GetStyle() in wxGTK.
...
This extends the change of r62262 with support for the fonts.
Closes #11281 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-08 22:38:10 +00:00
Vadim Zeitlin
e9ee227022
Partially implement wxTextCtrl::GetStyle() in wxGTK.
...
Support retrieving the (both foreground and background) colours for the given
position.
Closes #11281 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:53:26 +00:00
Jaakko Salli
0847e36eff
wxTextEntry::SetMargins(), GetMargins() - implemented on wxMSW and wxGTK (GTK+ 2.10+); also added similar functions into wxComboCtrl, deprecated old indent-functions; wxPropertyGrid modified to use the new functionality
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-05 12:39:12 +00:00
Vadim Zeitlin
9a83f86094
Globally replace _T() with wxT().
...
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660 ).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 20:30:22 +00:00
Robert Roebling
496e7ec647
More GTK prefixing for internal methods
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-13 10:25:38 +00:00
Paul Cornett
8caabedb27
use text cursor only when control is enabled, #10347
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-12 05:34:07 +00:00
Jouk Jansen
844cada162
my previous commit patched the wrong file
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-08 13:49:27 +00:00
Jouk Jansen
3a249a9fb3
Insert missing include file
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-08 11:13:19 +00:00
Paul Cornett
648d2bb8f4
fix SetStyle tag removing, broken in r45186
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-11 05:52:22 +00:00
Robert Roebling
183b82cc61
Use gtk_text_buffer_select_range for selecting programmatically
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-05 10:09:47 +00:00
Robert Roebling
e3cb990e68
Set cursor to <from> in wxTextCtrk::SetSelection
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-27 14:29:16 +00:00
Robert Roebling
5edfb38495
Disable focus out events during menu popup
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-27 14:19:18 +00:00
Vadim Zeitlin
a5125dc6ed
set selection point to end in wxTextEntryBase::SetValue() as this should be done in all ports and in all controls (fixes a unit test failure for wxComboBox)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-19 10:13:38 +00:00
Paul Cornett
9ff9d30c0a
Hold a reference on m_widget for the life of the associated wxWindow object.
...
This allows removing some ugly hacks, and leaking of GtkWidgets by wxNotebook.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-26 16:19:23 +00:00
Vadim Zeitlin
e2ccb25092
use #if wxUSE_UNICODE instead of #ifdefs (which totally broke ANSI build)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-21 02:51:26 +00:00
Robert Roebling
d5d20078e0
Don't use font encoding in Unicode mode
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-24 19:16:47 +00:00
Robert Roebling
d1263a3992
Simplify SetValue() with empty string
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-23 19:40:28 +00:00
Václav Slavík
5f346ddc0a
implemented Freeze/Thaw in wxGTK
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-04 10:03:01 +00:00
Vadim Zeitlin
17808a7596
move Freeze() and Thaw() to wxWindowBase to ensure that they behave consistently (i.e. recursively, as described in the docs) in all ports; removed different duplications of freeze count from derived classes
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-05 00:21:31 +00:00
Robert Roebling
888dde65f4
DC reorganization
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-30 13:48:22 +00:00
Václav Slavík
937013e0fd
1. added wxEvtHandler::SafelyProcessEvent() and wxWindow::HandleWindowEvent() to correctly handle exceptions in even handlers in wxGTK
...
2. use HandleWindowEvent() everywhere as more obvious and convenient shortcut for GetEventHandler()->ProcessEvent(); also for consistency with wxGTK where it's required
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-29 17:00:58 +00:00
Vadim Zeitlin
3cfe87da6e
always call GTKSetActivatesDefault(), not only if wxTE_PROCESS_ENTER style was given (patch 1835260)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-28 02:10:32 +00:00
Vadim Zeitlin
ff654490b7
removed all compile- and run-time checks for GTK+ < 2.4; don't include the generic files which are now never used in wxGTK in the build
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-05 22:31:24 +00:00
Vadim Zeitlin
ff805cac74
use gtk_entry_set_activates_default() instead of redoing its work manually ourselves
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-04 16:34:36 +00:00
Vadim Zeitlin
e4161a2a08
use -Wunused-parameter with gcc for consistency with MSVC and other compilers which warn about this; fix the uncovered warnings in wxGTK
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-23 22:19:34 +00:00
Julian Smart
44cc96a80c
Merged wxRichTextAttr and wxTextAttrEx into wxTextAttr, and added a font table
...
to wxRichTextBuffer to reduce wxFont consumption and increase performance.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-09 11:20:36 +00:00
Vadim Zeitlin
0ec1179b86
added wxTextEntry common base class for both wxTextCtrl and wxComboBox; refactor wxGTK code to put common parts of these classes in the base class; fixed some inconsistencies in the text control behaviour between platforms
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-26 00:30:22 +00:00
Vadim Zeitlin
74ab5f5b9d
various warning fixes for icc 9.1 compilation
...
- variable shadowing
- unused code and variables
- extra semicolons
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-21 12:00:25 +00:00