Commit Graph

200 Commits

Author SHA1 Message Date
Kevin Hock
9440c3d0e9 wxTE_AUTO_URL for wxGTK2 from Mart R. [patch 1126182]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-19 02:55:32 +00:00
Włodzimierz Skiba
7d8268a1d6 wxTextPos for all GetLastPosition with constants for special cases. Make it virtual everywhere. Avoid doubling typedefs. Always include textctrl.h for combobox.h. Source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-19 16:25:34 +00:00
Kevin Hock
72e430cd97 For efficiency reasons, text controls no longer set the string for each text updated event, but rather query for the string value only when GetString is called from an event handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-18 15:17:05 +00:00
Robert Roebling
44c5573d2e Compile fixes for GTK 1.2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-08 15:41:04 +00:00
Robert Roebling
02a6e35839 Applied wxNO_BORDER patch for text control and combo box.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-08 10:35:15 +00:00
Włodzimierz Skiba
463c4d7193 wx/math.h integration
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-14 21:10:15 +00:00
Robert Roebling
77f706726c Implemented run-time checks for the GTK version
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-05 23:03:09 +00:00
Kevin Hock
b6ae8db82b Freeze/Thaw patch missed a place where m_buffer should be used
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-05 19:15:11 +00:00
Robert Roebling
41b81aed52 Applied Freeze()/Thaw() patch for wxTextCtrtl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-01 20:52:36 +00:00
Kevin Hock
254973247e Create wxGtkTextApplyTagsFromAttr for common processing of text attributes from both wxGtkTextInsert and SetStyle (and any other place needed in the future) -- from Mart R.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-01 04:28:40 +00:00
Robert Roebling
ad68ed32f7 Applied patch to remoce surplus text update evevt.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-24 14:51:44 +00:00
Kevin Hock
c2094564d7 At least under GTK2, we do not need m_widget->window to be non-NULL in order to successfully change the background colour
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-22 16:37:27 +00:00
Vadim Zeitlin
39ccbf9a31 fix for a crash with wxUSE_STL == 1: test for failed conversion in GetValue()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-21 12:21:14 +00:00
Julian Smart
22800f325f Can't use directives within a macro
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-29 20:21:02 +00:00
Vadim Zeitlin
74c5a810e5 show the cursor on screen after moving it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-23 21:56:25 +00:00
Vadim Zeitlin
8e033d81f2 don't crash if WriteText() argument can't be converted to UTF-8
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-23 21:34:19 +00:00
Vadim Zeitlin
1ce52aa64b implemented ScrollLines/Pages() for GTK+ 2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-23 21:32:44 +00:00
Vadim Zeitlin
c04ec49657 fixed inserting styled text into an empty control under GTK+ 2.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-23 19:59:00 +00:00
Vadim Zeitlin
692c9b8696 implemented HitTest() for GTK2; test it in the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-23 18:07:40 +00:00
Václav Slavík
bbde2e2999 re-enabled and fixed wxTextCtrl::Cut,Copy,Paste with GTK+ 2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-14 20:25:56 +00:00
Václav Slavík
53fbce27ba removed wrong bg colour handling code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-27 22:16:40 +00:00
Robin Dunn
9f88452895 * Implemented BestSize cache
* Added calls to InvalidateBestSize where things affecting BestSize
  are modified.  There are probably several other places where this
  still needs to be done...

* Added wxWindowBase::GetBestFittingSize that will merge the BestSize
  into the MinSize, (if any) and return the result.

* SetBestFittingSize will now only set the MinSize to the value that
  was passed to it, without merging in the BestSize


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-24 20:09:45 +00:00
Václav Slavík
f40fdaa339 fixed GTK styles handling:
1. don't modify the style unless something changed
2. use gtk_widget_modify_style instead of gtk_widget_set_style, the latter is not recommended by GTK+ developers


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-14 17:34:00 +00:00
Václav Slavík
98a8daf4cf corrected previous commit's wrongly applied patch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-25 12:55:56 +00:00
Václav Slavík
c663fbea68 implemented wxTE_RIGHT, wxTE_CENTRE for wxGTK2 (patch 957687)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-25 10:35:34 +00:00
Julian Smart
655719367a Use old licence name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 20:53:33 +00:00
Julian Smart
77ffb5937e Name and version changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 14:56:36 +00:00
Robin Dunn
16190e2a11 Oops, forgot to cleanup some commented-out code before last commit.
Setting attributes seems to work okay on both multiline and single
line widgets for both wxGTK and wxGTK2, so don't disable it for
multiline.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-06 17:33:09 +00:00
Robin Dunn
9d522606d0 Get(Class)DefaultAttributes() for wxGTK controls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-06 17:26:25 +00:00
Robin Dunn
abdeb9e700 Added wxControl::PostCreation for wxGTK. Moved calls to
InheritAttributes and ApplyWidgetStyle there, and added a call to
SetInitialBestSize.   Also removed calls to Show from Create since
PostCreation already does it.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-04 07:09:32 +00:00
Robert Roebling
055e633de6 Make multi-line text control focussable
by using tabs under GTK 2.0.
  Make hitting ENTER in a wxSpinCtrl to
    activate the default button work.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-01 22:42:07 +00:00
Václav Slavík
5819297093 compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-12 23:53:05 +00:00
Julian Smart
905f21104d Applied patch [ 810585 ] wxTextCtrl::GetTextLine returns empty String
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-11 07:12:27 +00:00
Robin Dunn
e8e24dfa93 Use InheritAttributes for wxGTK widgets so they will check
ShouldInheritColours.  Set wxButton to not inherit colours.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-03 03:24:47 +00:00
Vadim Zeitlin
45df080916 really applied Robert's patch (and not the converse of it)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-10-27 21:41:53 +00:00
Vadim Zeitlin
07e9d4f0ed don't refresh the font unnecessarily (patch from Robert Vazan)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-10-23 16:48:45 +00:00
Vadim Zeitlin
3a9fa0d6b5 added wxTextCtrl::MarkDirty()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-23 00:09:18 +00:00
Vadim Zeitlin
71aba8333c fix text scrolling in GTK2 (patch 703988)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-18 23:48:22 +00:00
Julian Smart
a61bbf8767 Applied patch2 of [ 703990 ] attrib support in wxGTK2 textctrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-15 08:17:03 +00:00
Václav Slavík
14f355c2b5 added support for gcc precompiled headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-09 12:46:53 +00:00
Robin Dunn
5b87f8bf2e Fix for wxTextCtrl::GetSelection for singel line controls in GTK2 mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-08 03:57:35 +00:00
Julian Smart
e39af974ef - Moved wxApp::SendIdleEvents and wxApp::ProcessIdle into common code.
- wxWindow::OnInternalIdle is now used in all ports, and ensures that
  user OnIdle events do not interfere with crucial internal processing.
- wxWindow::UpdateWindowUI is now a documented function that
  sends wxUpdateUIEvents, and can be overridden. It has a helper function
  DoUpdateWindowUI for taking appropriate wxUpdateUIEvent action.
- Added functions to wxUpdateUIEvent: Set/GetMode, Set/GetUpdateInterval,
  CanUpdate, to assist with optimising update event frequency.
- Added functions to wxIdleEvent: Set/GetMode, CanSend, to
  determine whether a window should receive idle events.
- Added wxWS_EX_PROCESS_IDLE, wxWS_EX_PROCESS_UI_UPDATES window
  styles for use with conservative idle and update event modes.
- wxMSW and wxGTK now send menu update events only when a menu is
  about to be used.
- Added WM_INITMENU processing instead of WM_ENTERMENULOOP, or
  accelerators don't always get called since menu items may still
  be disabled.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-09 10:15:21 +00:00
Julian Smart
0b30bb0bda Added wxFrameBase::OnMenuOpen, and wxUSE_IDLEMENUUPDATES in platform.h
Experimental wxUpdateUIEvent::SetUpdateInterval() function to limit
UI update frequency


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-07 16:21:44 +00:00
Vadim Zeitlin
fdd55287d8 forward ported patch to IsEditable()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-06 21:43:00 +00:00
Julian Smart
fb47b99f25 Applied patch [ 735588 ] Gtk2 textctrl selection fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-06-01 13:42:21 +00:00
Julian Smart
739e366ac9 Applied patch [ 705212 ] wxTextCtrl::SetSelection() for wxGTK2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-02 17:55:42 +00:00
Vadim Zeitlin
581ee8a9c5 implemented Remove() and Replace() for GTK2 (patch 705051 from Nerijus)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-24 23:03:19 +00:00
Robert Roebling
cc3da3f8a1 Text attributes for GTK2.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-16 13:47:47 +00:00
Robert Roebling
e136b74763 Better scrolling to cursor.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-16 13:28:56 +00:00
Ron Lee
12a3f2275c Deprecated wxSizer::Remove( wxWindow* ), s/Remove/Detach/ in most places.
Made wxSizer child list typesafe.  I've not added the wxList implicit
conversion kludge yet, let's see who complains first perhaps..

Deprecated wxSizer::{G,S}etOption in favour of {G,S}etProportion in line
with the parameter name change in the docs.

Added {G,S}etSpacer consistent with the accessors for windows/sizers.

Made all wxSizer index parameters size_t -- we support no sensible
interpretation for negative indexes in them.  Hopefully this will
cause no real problems, but code doing (eg. Remove( 0 )) will need
to change to use 0u to resolve the ambiguity with overloaded members.
This is probably a Good Thing though, ymmv.

s/FALSE/false/g ; s/TRUE/true/g ; s/wxASSERT/wxASSERT_MSG/g in sizer.{cpp,h}

Fixed (I hope) the brokenness in wxSizer::Show -- I have no code to test
this yet, so it's a blind change, but spacers should now be hidden correctly
instead of ignored, and it should be properly reversable over multiple
calls now too.

removed pointless private scoping around DECLARE_CLASS macros.

Replace 0's I added previously with NULL -- not like that will end the
email thread either..

Added Add( wxSizerItem * ) & co.  There are probably a couple of other
places we can usefully do something like this too.  Stopped short of
refactoring everything to raise some issues about sizer method recursion
on -dev.

Updated wxSizer docs some more, they are still incomplete but getting
better.

wrapped KeyCode in wxDEPRECATED, converted all (gtk build) instances
to GetKeyCode.  There may be a few left for other ports.

Fixed a couple of other random compile warnings along the way.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-01-07 10:22:07 +00:00