Commit Graph

281 Commits

Author SHA1 Message Date
Paul Cornett
4d13f24dee 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/branches/WX_2_8_BRANCH@62555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-04 05:18:38 +00:00
Paul Cornett
7ab97504f3 use text cursor only when control is enabled, #10347
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@58030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-12 05:34:07 +00:00
Robert Roebling
a8aeb8d9d2 Rewrote code that prevents (double) TEXT_UPDATE events
in wxTextCtrl::SetValue(). This should fix
  [ 1735374 ] EVT_TEXT doesn't get called when changing wxTextCtrl


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-22 10:37:23 +00:00
Mart Raudsepp
09632bb00c Fix memory leak in wxTextCtrl au_check_word that was triggered only with wxTE_AUTO_URL style
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-18 05:53:03 +00:00
Václav Slavík
faf75a0f58 don't make read-only text controls editable when enabled
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-17 09:29:41 +00:00
Mart Raudsepp
5dd5470a3b [wxGTK2] Support wxTEXT_ALIGNMENT_JUSTIFIED in wxTextCtrl if GTK+ version is at least 2.11. This is for future benefits as stable gtk+-2.12 should come out much before wxWidgets new stable cycle
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-11 07:25:07 +00:00
Vadim Zeitlin
d5d363321c don't return the next line text from GetLineText() for empty lines (patch 1697208) [backport from HEAD]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-09 21:19:59 +00:00
Paul Cornett
b3ffb94d27 SetInsertionPointEnd should make the insert point visible, as SetInsertionPoint does
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-09 17:50:50 +00:00
Paul Cornett
5a3ef19432 fix for SetPosition/SetInsertionPoint when called during Freeze
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-09 06:21:15 +00:00
Paul Cornett
41e2aad530 use computed justification
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-07 07:18:03 +00:00
Vadim Zeitlin
927637fdaf allow dynamically changing most of text control styles in wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-04 12:39:52 +00:00
Vadim Zeitlin
403e664e5b removed empty and unused CalculateScrollbar() method
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-04 11:39:27 +00:00
Paul Cornett
442a960c14 fix memory leak and performance problem in Freeze
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-03 04:09:53 +00:00
Julian Smart
c68dea664d Undid completely wrong patch 1438117: other platforms do _not_ count
the visible lines, only the underlying lines. With the patch, you
can't reliably do anything with lines using the other functions.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-02 22:45:32 +00:00
Paul Cornett
b9060f3324 revert memory leak fix, it causes crash
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-02 18:37:23 +00:00
Vadim Zeitlin
14be47346e fixed reversed return value of IsEmpty() (closes 1585004)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-26 11:57:15 +00:00
Vadim Zeitlin
f8bf59a9f2 reset the internal flags at the end of DoSetValue(), whatever happened in the callback
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-24 12:23:18 +00:00
Paul Cornett
45388803ec fix memory leak in Freeze
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-19 02:53:54 +00:00
Mart Raudsepp
ae6a64b6af Implement left indentation and tab stops support in wxTextCtrl, patch #1518114 - Tim Kosse
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-11 13:45:44 +00:00
Vadim Zeitlin
ee2ec18e88 moved DoSetValue() to wxTextCtrlBase instead of having it in almost, but not quite all, derived classes; linking fixes for wxCocoa/wxX11/wxMotif
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 22:40:14 +00:00
Vadim Zeitlin
7e0fff428f small code simplification in DoSetValue() after the last change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 21:01:25 +00:00
Vadim Zeitlin
28fdd8db44 added wxTextCtrl::IsEmpty()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 17:52:39 +00:00
Vadim Zeitlin
f6519b40fe added wxTextCtrl::ChangeValue() which is the same as SetValue() but doesn't send the text changed event (first part of patch 1553551)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 17:46:12 +00:00
Paul Cornett
e808cf8a0a Don't free a string that is managed by wxGtkString, that's the whole _point_ of wxGtkString.
While we're at it, lets use it some more.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-03 16:01:18 +00:00
Vadim Zeitlin
8312c461b8 always let GtkTextView have mouse release events to avoid assertion failures in gtk_text_view_start_selection_drag()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-01 22:23:51 +00:00
Vadim Zeitlin
f5791b9983 do send text changed event from SetValue(), it wasn't done when setting the value of empty single line control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-31 22:59:15 +00:00
Vadim Zeitlin
ef5c70f96f Many changes:
- Introduced GTKGetWindow() which returns all GdkWindows associated with the
  given wxWindow
- Renamed IsOwnGtkWindow() to GTKIsOwnWindow() to avoid confusion with the old
  virtual function (the new one is non-virtual and is implemented in terms of
  GTKGetWindow())
- Refactored/simplified event handlers code in gtk/window.cpp
- Fixed some header guards names (__GTKFOO__ -> _WX_GTK_FOO_H_)
- Added GTKUpdateCursor() which sets the current cursor for all windows
  returned by GTKGetWindow()
- Factored out code from many different classes in wxControl::OnInternalIdle()
  which now updates the cursor, checks for internal focus and sends update UI
  events


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-25 12:59:28 +00:00
Vadim Zeitlin
27dee9ae02 try to deal more gracefully (than simply not showing anything at all) with invalid UTF-8 strings (e.g. ISO-8859-1 strings inserted in controls with default (UTF-8) font
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-24 17:50:10 +00:00
Vadim Zeitlin
0d91b2342a respect the encoding of the text style and not only the global control font encoding when inserting the text in the control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-23 13:33:04 +00:00
Vadim Zeitlin
7581272214 no real changes, just use IsSingle/MultiLine() insteadof testing m_windowStyle directly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-23 13:04:05 +00:00
Robert Roebling
7317857df7 Add the new showOnIdle code to various other
widget which override OnInternalIdle().


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-22 21:50:28 +00:00
Mart Raudsepp
01207937f6 Return false from PositionToXY if passed in position is larger than the buffer. This should restore the
functionality of the boolean return value, while not returning false for valid input from end of buffer.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-14 04:22:38 +00:00
Mart Raudsepp
5025996266 gtk_text_iter_get_line and get_line_offset work fine on the end iter. Don't bail if we are at the end of buffer.
Fixes one part of bug #1516281, the other part is controversial and probably not reasonable to change.
Also deal with NULL being passed as the x or y pointer, as is done also on wxMSW (this was done on 2.6 branch as
well, but not noted).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-14 03:46:40 +00:00
Julian Smart
9d11268884 Added wxTextCtrlBase to type info, useful if different text control
implementations are available


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-02 07:41:02 +00:00
Paul Cornett
c668531784 1. more accurate conversion from 8-bit wx color to 16-bit GDK color
2. eliminate possiblity of wxColour RGB values changing depending on colormap
3. don't allow non-const pointer access to internal GdkColor


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-06-15 19:29:08 +00:00
Włodzimierz Skiba
18680f8651 Include wx/math.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-06-15 17:58:49 +00:00
Włodzimierz Skiba
9eddec696f Include wx/settings.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-24 07:16:32 +00:00
Paul Cornett
add7cadd99 scrollbar handling simplification
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-17 04:54:13 +00:00
Vadim Zeitlin
6964cbbac9 make sure that IsModified() returns false when it's called from EVT_TEXT handler invoked because of SetValue() call
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-17 00:20:20 +00:00
Vadim Zeitlin
781acf8347 removed GTK-specific SetModified() as we already have a public MarkDirty() which does the same thing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-16 23:58:20 +00:00
Vadim Zeitlin
c85f2eb19f implemented clipboard events support for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-16 23:16:36 +00:00
Mart Raudsepp
7d1fea10d4 No cast necessary for g_object_set first arg (it takes a gpointer).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-15 16:00:59 +00:00
Paul Cornett
cb1476c34d unused variables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-12 17:06:05 +00:00
Paul Cornett
8539643021 unused member variables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-09 16:54:24 +00:00
Włodzimierz Skiba
8e609c8259 Include wx/panel.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-04 18:10:27 +00:00
Włodzimierz Skiba
de6185e212 Include wx/utils.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-02 10:39:23 +00:00
Włodzimierz Skiba
e4db172a3b Include wx/log.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-26 08:21:31 +00:00
Włodzimierz Skiba
88a7a4e10e Include wx/intl.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-25 14:38:19 +00:00
Vadim Zeitlin
265c34ee78 emit only 1, not 2, events when changing text of a single line text control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-23 21:35:33 +00:00
Robin Dunn
ea5449ae51 Add code to remove the selection (if any) in wxTextCtrl::WriteText for multi-line controls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-20 04:23:36 +00:00