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
Vadim Zeitlin
c46487ac0f
When append menu with titlt, the menu should set the title
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:59 +00:00
Vadim Zeitlin
7bc33811b9
revised wxRadioButton draw function
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:56 +00:00
Vadim Zeitlin
71a21c065d
rewrite the radio button draw function under gtk theme
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:53 +00:00
Vadim Zeitlin
66ed21d69b
Fix the position calculating of insert a radio menu item
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:46 +00:00
Vadim Zeitlin
2e2ff9e8b0
make sure the first item of a radio group is checked by default
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:43 +00:00
Vadim Zeitlin
02526cc9d2
use DoGetValue() in parent class will be enough, and add readonly support to SetValue()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:39 +00:00
Vadim Zeitlin
26ce3d6361
wxListBox in wxUniv need to overwrite DoListHistTest function, otherwise Listbox::HitTest will call DoListHitTest in wx/listbox.h, which will always return wxNOT_FOUND
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:36 +00:00
Vadim Zeitlin
831045ff45
if call SetSelection by wxNOT_FOUND in listbox of wxUniv, just deselect all
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:33 +00:00
Vadim Zeitlin
6fb16229f5
When call EnsureVisible in wxUniv, make sure reset visible lines range correctly.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:30 +00:00
Vadim Zeitlin
ec6777f17d
Adjust code, to consistent with the coding style
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:27 +00:00
Vadim Zeitlin
c2b83f1b72
wxCheckListBox must clear the object that created in parent class
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:24 +00:00
Vadim Zeitlin
a4e72041fb
Add GetBitmap support to wxButton in wxUniv
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:22 +00:00
Vadim Zeitlin
15908f0a43
If string are empty, DoGetTextExtent should not return descent by a random value
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:18 +00:00
Vadim Zeitlin
4363f9b578
These test will cause test_gui segmentation fault, disable for now.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:15 +00:00
Vadim Zeitlin
51ca7cdcd0
Enable these wxRegion constructor for x11 port
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:08 +00:00
Vadim Zeitlin
a8b36e90eb
The unit test will use WX_ASSERT_FAILS_WITH_ASSERT to check DoSetRegion(test/geometry/region.cpp:101) eventually, and the macro could handle exception, not true or false. Change it consistent with other port
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:05 +00:00
Vadim Zeitlin
8c6a9bd10d
Adjust the bitmapButton size according the bitmap size when set bitmap to BitmapButton in wxUniv port
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:02 +00:00
Vadim Zeitlin
fc8d46b34a
wxColurRefData in x11 did not overwrite CreateRef function, so it should not use AllocExclusive(), use UnRef() instead, just like InitRGBA() function in wxGTK port did
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:59 +00:00
Vadim Zeitlin
07a471df83
wxUniv not support unicode yet
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:56 +00:00
Vadim Zeitlin
44cf7023c0
Add more evidential comments, adjust code to follow coding style
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:53 +00:00
Vadim Zeitlin
c40871e8ce
Fix the prepocessor directive, from __WXOSX_COCOA__ to __WXOSX__
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77778 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:50 +00:00
Vadim Zeitlin
af4f17a553
Make wxSlider behaviours in wxUniv same as other ports, and generate proper wxScrollEvent
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:47 +00:00
Vadim Zeitlin
58730bc356
Add wxEVT_SET_FOCUS and wxEVT_KILL_FOCUS event to wxX11
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:44 +00:00
Vadim Zeitlin
2bfd94d59c
wxX11 use XColor directly, so wxX11 does not support alpha at all currently
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:41 +00:00
Vadim Zeitlin
b413eeedea
GetLabel should return the original label that with mnemonics, the original label stored in wxControlBase m_labelOrig, get it by wxControlBase::GetLabel()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:38 +00:00
Vadim Zeitlin
32b4a42cd1
Fix Error: Failed to initialize GUI: no built-in themes found
when run gui and load theme, by add WX_USE_THEME in the place that create them object
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77773 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:34 +00:00
Vadim Zeitlin
196227619d
Adjust comments
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:28 +00:00
Vadim Zeitlin
65b8a129ad
Fix code input mistakes and type convertion
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:25 +00:00
Vadim Zeitlin
f028e3325b
Remove the conditional preprocessor directive around wx/stockitem.h, the head file not cause any problem, revert the mistake that I made in 2e2b1313d97ea1c79a396333f40872157fd629d4
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:22 +00:00
Vadim Zeitlin
1c88c28c41
Solve textctrl handle char type event twice error, correct the insertion point calculation
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:19 +00:00
Vadim Zeitlin
d8618b6814
as convention, if a text range is (x, -1), it means from x to the end, so if to
was -1, set it to the last position
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:16 +00:00
Vadim Zeitlin
7138937cb1
in wxUniv, non-editable textctrl must be set focus, so that could get input value
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:13 +00:00
Vadim Zeitlin
c24ded647e
in wxGTK, wxOSX/Cocoa, plus wxUniv, GetNumberOfLines() always returns the number of logical, not physical, lines. See #12366 , maybe they did not test wxUniv at that time.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:08 +00:00
Vadim Zeitlin
d1d874dd15
wxUniv focus on wx11 port, so modified unv/theme.h, make GTK theme as the default theme
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:06 +00:00
Vadim Zeitlin
ccb64682eb
add if preprocessor directive, if wxUniv build with MSW, include wx/stockitem.h, others are not. with x11 and this head file will cause error
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:03 +00:00
Vadim Zeitlin
d807edb681
Add wx/stockitem.h to univ/button.cpp and univ/tglbtn.cpp, to fix wxUniv MSW complitaion error
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:00 +00:00
Vadim Zeitlin
3725133d05
Click scrollbar will cause recapture mouse twice error, add check sentence before capture and release mouse in HandleMouse()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:38:57 +00:00
Vadim Zeitlin
d45fdc114a
Release the mouse and capture data at the end of the function. This was not always done before and it was wrong because other event such as mouse left up will not release mouse
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:38:54 +00:00
Vadim Zeitlin
8e238e367e
wxX11 wxFont miss the wxFont (const wxString &nativeInfoString) ctor, it will cause build tests failed. Added and fixed
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:38:51 +00:00
Vadim Zeitlin
43c99ef613
Refactor: create src/univ/anybutton.cpp.
...
Extract and pull the common functions from wxButton and wxToggleButton to
wxAnyButton in wxUniv too.
Also make wxToggleButton inherit from wxToggleButtonBase correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:38:47 +00:00
Paul Cornett
16601713a4
cairo_image_surface_get_{width,height} have been available in cairo since version 1.0
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 16:37:15 +00:00
Vadim Zeitlin
7172fdc01b
Fix wxCompositeWindow compilation after the latest change.
...
SetSize() doesn't have any dependent parameters so call it via an explicit
"this->" to make it work with standard conforming compilers (and not MSVC).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 11:51:10 +00:00
Vadim Zeitlin
f24d204984
Update layout of wxCompositeWindow on layout direction change.
...
The children layout will almost always depend on the layout direction, so redo
it when the latter changes.
In particular, this fixes changing the layout of wxSpinCtrlDouble under MSW.
See #11583 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 01:41:27 +00:00
Vadim Zeitlin
81ec161949
Fix setting layout direction for wxSpinCtrl in wxMSW.
...
Position the spin control components (the button and the text) correctly for
the current layout.
Also update the layout of the text explicitly.
See #11583 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 01:41:22 +00:00
Vadim Zeitlin
e5755015e7
Fix setting layout direction for wxComboBox in wxMSW.
...
The EDIT control used by the native combobox is different from normal EDIT
controls and has to be handled specially.
We also need to explicitly forward WS_EX_LAYOUTRTL to the dropdown window as
it doesn't inherit it from the combobox itself automatically.
See #11583 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 01:41:17 +00:00
Vadim Zeitlin
da41c5d9bb
Don't leak global objects in Direct2D code.
...
Ensure that all globals are freed on library shutdown by using a module just
to perform this cleanup.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 01:41:14 +00:00
Vadim Zeitlin
db73e480ef
Don't call CoInitializeEx() from Direct2D code.
...
This is unnecessary, COM is already initialized on the application startup and
Direct2D can't be used before that anyhow.
This also fixes lack of matching CoUninitialize() call.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 01:41:10 +00:00
Vadim Zeitlin
b49d49435d
Document wxWindow::HitTest().
...
This is not a very useful method, but by providing at least some documentation
for it, we prevent it from inheriting the docs for the next method, which have
nothing to do with it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-20 22:12:20 +00:00
Vadim Zeitlin
7cccbaa15e
Fix double release in wxGLCanvas code.
...
The change in r77701 was partially wrong, we shouldn't release Objective-C
object if initializing it failed.
See #16555 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-20 22:07:52 +00:00