Commit Graph

59231 Commits

Author SHA1 Message Date
Vadim Zeitlin
b045f9506b Rewrite the wxX11 cliboard
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:44 +00:00
Vadim Zeitlin
42d5c34c64 x11 alrady support GetUnicodeKey() by last commit, remove these check
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:41 +00:00
Vadim Zeitlin
ad84d9f97d make wxKeyEvent could get unicode key under x11, add a x11 keysym--unicode char map tab
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:37 +00:00
Vadim Zeitlin
3873c4db75 improve the commit according the comments of Catalin
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:33 +00:00
Vadim Zeitlin
f7beec1025 we must store the to be focused window before we kill focus on a window
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:30 +00:00
Vadim Zeitlin
83c0fca8da Remove the dead code that copied from gtk1 port. And initial implementation of x11 clipboard support. It only support text for now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:27 +00:00
Vadim Zeitlin
d956d87f2e enable wxNEEDS_UTF8_FOR_TEXT_DATAOBJ flag for x11 TextDataObject, and add implementation of GetAllFormat function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:24 +00:00
Vadim Zeitlin
0e998def86 Should not send event again when mouse release.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:18 +00:00
Vadim Zeitlin
d6ae3804dd input handler should coreesponding the widget instance, wxListBox and wxCheckListBox has its own input handler, so create it differenctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:15 +00:00
Vadim Zeitlin
786c64e040 refine the condition check and correct a check condition
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:12 +00:00
Vadim Zeitlin
17c3ad1914 wxX11 could not get UnicodeKey yet, not wxUniversal. And use AND instead OR. otherwise the check not work.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:09 +00:00
Vadim Zeitlin
813c7a15c1 add wxYield to make sure all event was executed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:06 +00:00
Vadim Zeitlin
3d317ceb84 Modifiers down should not generate wxEVT_CHAR event, and reset keyboardState when recieve modifiers up.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:04 +00:00
Vadim Zeitlin
d9b73c6365 refine the implementation of SetFocus, clean up unused static variables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:01 +00:00
Vadim Zeitlin
f6fdfe8ebc about focused window, replace static variables implementation by DoFindFocus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:58 +00:00
Vadim Zeitlin
adf61108be wxX11 return keycode by GetKeyCode directly, not support GetUnicodeKey yet
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:54 +00:00
Vadim Zeitlin
fdbc16ed8d add wxYield() after SetFocus, make sure the all event will be executed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:51 +00:00
Vadim Zeitlin
52377e3be4 replace DoSetValue by ChangeValue, which do not send event too, and consistent with docs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:49 +00:00
Vadim Zeitlin
e37d2ae438 completely disable the style in wxChoice constructor in wxUniv is wrong
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:44 +00:00
Vadim Zeitlin
f7f8dcd7bc call DoSetValue directly will allow us not send event.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:42 +00:00
Vadim Zeitlin
9ea0ff1374 wxComboCtrl::Clear() will call wxComboCtrl::SetValue(), but wxItemContainer::Clear() will call it too. So no need to call wxComboCtrl::Clear() here
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:39 +00:00
Vadim Zeitlin
e5123cf2f4 disable the unit test under wxUniv too. wxGrid implementation may has bug that work with simulator
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:36 +00:00
Vadim Zeitlin
cc3acf904b add GetLabel/SetLabel implementation to wxWindowX11, the function just store the label string, but do nothing with it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:33 +00:00
Vadim Zeitlin
31f0808ee2 reenable this tests under wxUniv/x11 port. EventPropagationTestCase::MenuEvent cause the problem, not these. MenuEvent will be fixed later
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:29 +00:00
Vadim Zeitlin
8faa7c54d4 check the return value of DoInsert and DoAppend, if failed, return NULL immediately
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77824 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:26 +00:00
Vadim Zeitlin
cc93948936 refine the wxEVT_TEXT_MAXLEN event handle implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:23 +00:00
Vadim Zeitlin
55eed80313 add check, if insert item failed, then return null
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:21 +00:00
Vadim Zeitlin
fa2fa3dd9f adjust the implementation about max length limitation according review comments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:18 +00:00
Vadim Zeitlin
d9b0c17412 modify the listbasetest.(10,5) is not a correct position in wxUniv/x11 listbase test. (10, 10) could work both on wxUniv/x11 and other ports(already tested)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:15 +00:00
Vadim Zeitlin
fe733e34c2 add maxline restriction in single line mode textCtrl. let textctrl will fire wxEVT_TEXT_MAXLEN and not recive the chars when the text length beyond the maxlength
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:12 +00:00
Vadim Zeitlin
db0d7e67a9 set enc to wxUnusedVar in unicode mode, remove the old ugly code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:03 +00:00
Vadim Zeitlin
08603120f4 in unicode, we did not need the font encoding parameter
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:00 +00:00
Vadim Zeitlin
df00ba55e0 adjust code to apply the wx coding guidelines
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:57 +00:00
Vadim Zeitlin
96413683c5 free the data in deconstructor that created in constructor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:55 +00:00
Vadim Zeitlin
c973dd7be5 the font data have to stroe in m_nativeFontInfo, otherwise the constructor that use wxNavtiveFontInfo as parameter could not retrive the data in it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:51 +00:00
Vadim Zeitlin
d2573ed255 Add get/set strikeline support to wxFont/x11.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:48 +00:00
Vadim Zeitlin
ae1bc4fa82 make wxPalette under x11 could store/get uchar RGB value in palette and also could get the color number in palette.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:45 +00:00
Vadim Zeitlin
5b52d6c752 Make sure the behaviour of slider in wxUniv is consistent with other ports, left to min, right to max
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:42 +00:00
Vadim Zeitlin
0947d75f2f Make the comment more accurate, and the SetFocus is comment before, this is just restore it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:39 +00:00
Vadim Zeitlin
f172294263 treat -1 as the last position in wxTextCtrl::SetInsertionPoint
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:36 +00:00
Vadim Zeitlin
0005984a4c Make slider thumb could moving when use mouse drag it, and also set the slider value according to the thumb position
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:33 +00:00
Vadim Zeitlin
83eca161d7 Mouse capture data should only release when mouse release. And also make sure the data will delete in desconstructor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:30 +00:00
Vadim Zeitlin
e6d49edf3d Add wxEVT_SLIDER support to wxSlider under wxUniv
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:24 +00:00
Vadim Zeitlin
ba7835e5c6 add wxYield() to make sure the former event will executed done
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:21 +00:00
Vadim Zeitlin
18ccc964ee In wxUniv x11 port. Should not set focus to popup control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:18 +00:00
Vadim Zeitlin
9d7a7ec556 after analisys the behaviour of treectrl in GTK and Qt, right arrow should not move down. Expand the current item will be fine
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:15 +00:00
Vadim Zeitlin
f83756c2e5 after reset the m_current(focused item) in ClearFocusedItem(), the test could pass under wxUniv. Due to wxGTK and wxOSX use it in same way. So remove the check in test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:12 +00:00
Vadim Zeitlin
f17b527764 ClearFocusedItem should reset the selected item
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:09 +00:00
Vadim Zeitlin
bc19f463a2 add wxYield() after SetFocus(), set focus event needs to be processed before the control can accept input
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:06 +00:00
Vadim Zeitlin
3a189686d7 add a check, make sure some action key could generate wxEVT_TEXT event. That is needed in some control, such as wxSpinCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:03 +00:00