Commit Graph

281 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
2b5f62a0b2 merged 2.4 branch into the trunk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-12-04 14:11:26 +00:00
Vadim Zeitlin
a8bf182601 fixed some GTK2 compilation warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-23 19:01:47 +00:00
Julian Smart
1fc32b12ee Misc mods for feedback from Marcin Wojdyr <wojdyr@if.pw.edu.pl>
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-23 11:57:10 +00:00
Robert Roebling
f341e39bdf Compile fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-08 18:26:02 +00:00
Robert Roebling
fab591c5cc Lots of updates for Unicode and GTK 2.0 support.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-05 17:59:20 +00:00
Vadim Zeitlin
2e08b1a367 added missing extern "C" required for Sun CC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-05-14 12:28:07 +00:00
Julian Smart
4855a4773e textctrl.cpp: Removed assert from CanRedo/CanUndo since the best behaviour is
to return FALSE (Redo/Undo functions are unimplemented)
treectrlg.cpp: in InsertItem, allow previous item to be null in order
to insert at first position of possibly-empty child list
dcclient.cpp: allow setting of null font (common espec. on Windows)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-05-13 16:54:32 +00:00
Vadim Zeitlin
1c35b54e2d fixed crashes in GtkText when it was refreshed from inside wxYield
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-05-12 11:26:06 +00:00
Vadim Zeitlin
41b2e0e6db fixed bug with the text attr not being reset even after SetDefaultStyle(wxTextAttr()) call
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-25 18:12:53 +00:00
Robert Roebling
d7fa7eaa2d Various changes to focus handling when TLW start.
Changed wxWindow::Clear() to use m_clearRegion.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-17 22:44:31 +00:00
Vadim Zeitlin
9e691f46b2 changes to make wxGTK compile with GTK+ 2.0: now it does but the minimal
sample crashes on startup


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-03-12 19:24:30 +00:00
Robert Roebling
afbe906abd Some work on GTK focus handling and events.
Removed some code #ifdeffed for GTK from
    wxListCtrl.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-02-23 18:59:46 +00:00
Vadim Zeitlin
a66954a673 fix setting the font for a single-line text control (bug 508169)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-02-20 14:38:22 +00:00
Robert Roebling
2b328fc942 Added test for default action (button normally)
to combo box when hittinh return. In a normal
    Find&Replace dialog, hitting enter in one of
    the two fields will usually mean "OK".
  Corrected the same test in wxTextCtrl.
  Removed some debug code.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-02-19 21:48:03 +00:00
Václav Slavík
a756f21001 use the new wxSystemSettings API everywhere
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-01-08 23:53:01 +00:00
Vadim Zeitlin
eda40bfc08 superposition of text styles in wxTextCtrl now works as expected (and as documented)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-11-26 14:50:50 +00:00
Robert Roebling
ba3f6b4436 Fixed sveral problems with wxTextCtrl::WriteText and AppendText.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-11-17 12:54:48 +00:00
Vadim Zeitlin
6c5ac6e1f1 yet another fix for wxTextCtrl bg colour (patch 462838)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-09-28 14:33:54 +00:00
Robert Roebling
76fcf0f239 Various changes for simplification of focus event
code in wxGTK. It will also work for wxComboBox
    now, but not for GTK's other composite controls
    such as wxListBox and wxChoice.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-08-19 21:36:25 +00:00