Vadim Zeitlin
2060e34cd2
Improve wxDatePickerCtrlGeneric best size calculation.
...
Make the control just wide enough to fully show the contents of its text part.
This is still not ideal as we don't take into account wxComboCtrl internal
complications but better than before.
Closes #14342 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-28 19:38:02 +00:00
Vadim Zeitlin
af184f1d2f
Work around wxDateTime::ParseFormat() problem in generic wxDateTimePickerCtrl.
...
Due to a bug in wxDateTime::ParseFormat(), calling it with wxString::c_str()
currently just crashes, so don't do this in generic wxDateTimePickerCtrl code.
The real fix is, of course, to correct the bug in wxDateTime itself but for
now this at least prevents the crash when executing the test suite. And using
c_str() here is unnecessary anyhow.
See #14214 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:05 +00:00
Vadim Zeitlin
162e221f76
Allow returning NULL windows from GetCompositeWindowParts().
...
wxCompositeWindow::GetCompositeWindowParts() becomes simpler to implement in
the derived classes with optionally shown elements if NULL windows are allowed
(and ignored) in the list returned by it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 12:13:18 +00:00
Dimitri Schoolwerth
88def1632e
Compilation fixes for wxUSE_LOCALE and wxUSE_XLOCALE set to 0.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-04 22:07:42 +00:00
Stefan Csomor
809d69287e
avoid populating the array with NULL controls during creation (SetWindowVariant calling SetFont crashing)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-26 15:52:41 +00:00
Vadim Zeitlin
a9e41db760
Add wxCompositeWindow<> and use it in wxDatePickerCtrlGeneric.
...
wxCompositeWindow<> is a convenient base class for composite windows, i.e.
windows consisting of several other wxWindows. Currently it just automatically
forwards various attributes setters calls to all of the composite window parts
but it could become more useful in the future.
Similarly, for now it is only used in wxDatePickerCtrlGeneric but it could
(and should) be used for other composite controls later and we probably should
even make this class public to allow its use in the client code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-03 11:24:13 +00:00
Dimitri Schoolwerth
df16cb09b1
Fixed compilation of datectlg.cpp.
...
Only including wx/datectrl.h does not always include wx/generic/datectrl.h, for example it does not for MSW non-Universal. As a result when compiling datectlg.cpp wxDatePickerCtrlGeneric is unknown and compilation fails. Fixed by including wx/generic/datectrl.h again (regression since r66524).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-03 11:01:59 +00:00
Vadim Zeitlin
4a40cd9bae
Forward declare classes instead of including their declarations.
...
No real changes, just reduce the compilation dependencies a bit by only
forward declaring wxComboCtrl and wxCalendarCtrl in wx/generic/datectrl.h
instead of including the headers with their full declarations.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-02 22:03:56 +00:00
Vadim Zeitlin
4d4c704c3e
Use wxLocale::GetInfo() to get date format in wxDatePickerCtrlGeneric.
...
Instead of trying (and failing) to manually decode the format used by "%x",
simply use wxLocale::GetInfo(wxLOCALE_SHORT_DATE_FMT) and just change "%y" to
"%Y" if necessary.
The new code is more than 10 times shorter and also gives correct results
unlike the old version.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-10 19:42:23 +00:00
Vadim Zeitlin
9a83f86094
Globally replace _T() with wxT().
...
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660 ).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 20:30:22 +00:00
Vadim Zeitlin
8f2a8de6e7
fix many mostly harmless warnings in wxOSX/Carbon build
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-20 00:21:53 +00:00
Vadim Zeitlin
2ccc6650ca
support wxDP_ALLOWNONE in generic wxDatePickerCtrl ( #3164 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-28 18:58:07 +00:00
Vadim Zeitlin
6c70323fcb
fix handling of wxDP_SHOWCENTURY for some non-C locales (one of the problems of #4743 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-22 15:06:57 +00:00
Vadim Zeitlin
b0fb790beb
fix for crash under wxX11: we get text event there when m_popup is still NULL
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-11 11:47:24 +00:00
Vadim Zeitlin
c245a01202
use native calendar control in wxDatePickerCtrl if available ( #9548 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-11 11:45:57 +00:00
Robin Dunn
d6781628fd
Merge r53510 from 2.8 branch
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-09 22:18:34 +00:00
Vadim Zeitlin
628e155d8c
added native GTK implementation of wxCalendarCtrl (modified patch 1925439)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-28 02:47:12 +00:00
Vadim Zeitlin
2fda1fe5fd
fix redundant storage of current date both in wxCalendarCtrl (which was itself redundantly stored as both wxDatePickerCtrl::m_cal and m_popup) and popup m_currentDate variable which resulted in multiple bugs, e.g. calendar didn't open at the current date value
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-16 15:39:06 +00:00
Václav Slavík
330e8ab901
dont use wxChar* arguments in wxDatePickerCtrlGeneric API
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-28 17:03:42 +00:00
Václav Slavík
e0a050e347
more changes to make wx compile without implicit wxString->char* conversion (for STL build)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-20 07:44:45 +00:00
Robin Dunn
d1b736b796
Send the calendar and date changed events to the datepicker ctrl first
...
(not its parent) so they can be caught by dynamic event handlers
connected directly to the picker.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-18 19:34:56 +00:00
Mattia Barbon
eafd76b02c
Replace direct calls to ProcessEvent() with
...
GetEventHandler()->ProcessEvent().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-09 16:43:23 +00:00
Robin Dunn
170acdc90e
GetBestFittingSize --> GetEffectiveMinSize
...
SetBestFittingSize --> SetInitialSize
SetBestSize --> SetInitialSize
SetInitialBestSize --> SetInitialSize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-31 08:50:17 +00:00
Robert Roebling
4427c0a3ff
[ 1585858 ] Fix wxDatePickerCtrlGeneric and wxComboCtrl kb navigation
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-27 18:02:21 +00:00
Włodzimierz Skiba
82df62ef8e
Warning fix.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-23 10:51:20 +00:00
Vadim Zeitlin
06077aaf2c
add alt popup window style allowing to use keyboard and comboboxes in the popup window and use it for the generic date picker (patch 1582391 from Jaakko)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-22 20:25:08 +00:00
Vadim Zeitlin
85fa9d60c4
use wxComboCtrl instead of custom popup window (patch 1575343)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-22 14:15:46 +00:00
Vadim Zeitlin
005eba5abd
fixed crash if the control is moved while the popup is open (patch 1539194)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-13 01:24:30 +00:00
Włodzimierz Skiba
68f2155bb7
Better temporary fix.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-17 06:28:39 +00:00
Włodzimierz Skiba
3d3d7d0994
Build fix to make tinderbox work, needs asap change.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-17 06:19:29 +00:00
Stefan Neis
40a33c46e3
Avoid trouble during initialisation & typo fix (patch #1523304 ).
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-16 20:41:48 +00:00
Vadim Zeitlin
6f02a879ed
make access specifiers for the virtual functions match their access in the base class (patch 1400131)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-08 21:47:09 +00:00
Vadim Zeitlin
17a1ebd101
first round of Intel compiler warning fixes: down from a few thousands just to slightly more than 100
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-25 19:59:19 +00:00
Vadim Zeitlin
2a5e6376f2
check that wxUSE_DATEPICKCTRL_GENERIC is defined before checking its value
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-08-04 00:34:03 +00:00
Vadim Zeitlin
58e041b753
fix assert when leaving control with wxDP_ALLOWNONE style (patch 1190145)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-22 22:17:47 +00:00
Vadim Zeitlin
aa74ad5b78
suppress events resulting from our own SetValue() calls
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-17 23:19:46 +00:00
Julian Smart
a9d13e1564
Added destructor to fix crash on Mac due to focus event causing
...
text control to be accessed while being deleted
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-04-16 11:07:30 +00:00
Julian Smart
caad76379f
Applied patch [ 1178610 ] datectlg.cpp: wxDropdownButton + bug fixes
...
Jaakko Salli
This patch modifies datectlg.cpp's wxDropdownButton in
such manner that it should be much easier to convert it
into a generic drop button class. Also, it is now more
universal in the respect that it should work on
platforms other than wxMSW and wxGTK (wxBitmapButton
being prime prerequisite).
Plus there are some bug fixes for wxDatePickerCtrlGeneric.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-04-16 10:38:23 +00:00
Robin Dunn
7e24348eb8
Applied patch [ 1170019 ] Fix for wxGTK drop button in datectlg.cpp
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-24 17:34:42 +00:00
Włodzimierz Skiba
f5c479ccfc
Build fixes.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-22 19:28:37 +00:00
Robert Roebling
83dc6964f0
Changed ComboDropDown button under GTK+ so that it
...
will create a transparent button. This works for
the date control, but should be generalized somehow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-28 14:38:47 +00:00
Vadim Zeitlin
98b5a1e920
don't hide m_cal when disabling the control (bug 1150830)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-28 13:08:47 +00:00
Vadim Zeitlin
2eda91db29
fix for disabling the control (bug 1150830)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-25 11:07:39 +00:00
Vadim Zeitlin
89448b5dd7
use different image for pressed button state
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-21 00:10:56 +00:00
Vadim Zeitlin
9d9e32a07a
don't use invalid font in wxDC used for measuring text extent
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-20 00:52:49 +00:00
Vadim Zeitlin
964f23b70e
fix for Create(wxDateInvalidDate)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-19 20:52:38 +00:00
Vadim Zeitlin
930fb29eb8
fixes for MSW
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-19 14:25:21 +00:00
Robin Dunn
d8b49350e6
Fix the use of Today() for when invalid date is passed to ctor. Also
...
set best/min size using size passed to ctor.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-18 17:58:25 +00:00
Vadim Zeitlin
94ab4d929b
minor cleanup
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-17 23:20:39 +00:00
Vadim Zeitlin
38511687af
more tweaks to drop down arrow drawing (Andreas Pflug)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-17 18:29:22 +00:00