Commit Graph

77 Commits

Author SHA1 Message Date
Vadim Zeitlin
d319e70a7c Fix inheritance hierarchy of wxDatePickerCtrlGeneric too
This is very similar to 8a64b6acea (Fix inheritance hierarchy of
wxTimePickerCtrlGeneric, 2020-11-04) and is done for the same reasons
(avoid having to somehow implement MSW-specific virtual methods of the
native controls base class in the generic version) and suffers from the
same drawback (there is no common base class for the native and generic
version any more).

See https://github.com/wxWidgets/wxWidgets/pull/2109
2020-11-13 01:19:52 +01:00
Vadim Zeitlin
8a64b6acea Fix inheritance hierarchy of wxTimePickerCtrlGeneric
This class must not derive from the native wxDatePickerCtrl, as it
doesn't make much sense and resulted in the need for an ugly hack with
either overriding unused and inapplicable pure virtual methods in this
class itself, as was originally done in 569c7d8ccb (Add wxTimePickerCtrl
class., 2011-09-29) when it was introduced, or not making these methods
pure virtual in the first place, as was done in d0da5061ce (Dirty hack
to allow generic wxDatePickerCtrl to compile under MSW., 2011-10-20),
but didn't really fix the problem.

Do fix it now by using different hierarchies for the native and generic
classes. The main disadvantage of doing it is that there is no common
base class for wxTimePickerCtrl and wxTimePickerCtrlGeneric providing
SetTime() and GetTime() methods any more, but this seems like a
relatively small price to pay because real applications won't be using
these two classes simultaneously, as the calendar sample does, anyhow.
2020-11-05 00:34:10 +01:00
PB
f57f214122 Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
Maarten Bent
eb23d4735c Fix unannotated fall-through warnings 2018-11-25 21:29:37 +01:00
Blake Eryx
65827a0572 Remove unnecessary c_str() calls from the samples
Pass wxStrings directly to wxString::Format("%s") and similar
pseudo-vararg functions, there is no need for c_str() there since
wxWidgets 2.9.

Closes https://github.com/wxWidgets/wxWidgets/pull/1009
2018-11-03 22:52:57 +01:00
Blake-Eryx
f58ea62596 Remove (most) occurrences of wxT() macro from the samples
Also replace wxChar* with wxString.

Closes https://github.com/wxWidgets/wxWidgets/pull/945
2018-09-23 01:15:08 +02:00
Vadim Zeitlin
5f7a6bd15b Replace Connect() with Bind() in all samples and utils too
Still use Connect() in unit tests which were written explicitly for it
and in EventConnector, which can't use Bind() as it uses a variable for
the event type.

No real changes, just use the newer and more convenient function.
2018-05-31 16:19:23 +02:00
Vadim Zeitlin
f19012c62c Merge branch 'firstweekday' of https://github.com/lanurmi/wxWidgets
Add API for determining the first day of the week and use it in
wxCalendarCtrl.

Closes https://github.com/wxWidgets/wxWidgets/pull/522
2017-09-10 21:41:36 +02:00
Lauri Nurmi
e6a7a09d9d Use automatically selected first weekday by default in calendar sample
Also create a wxLocale object with wxLANGUAGE_DEFAULT so that automatic
selection has a better chance of doing the right thing across different
platforms.
2017-09-02 17:24:10 +03:00
Catalin
f61627fc7e Remove obsolete symbols from the samples
Mostly don't mention OS/2 in the comments about the icons.

Also replace a couple of occurrences of "wxWindows" with "wxWidgets".

Closes https://github.com/wxWidgets/wxWidgets/pull/138
2015-12-03 22:11:04 +01:00
Tobias Taschner
8282c1be0f Remove Windows CE support
Windows CE doesn't seem to be supported by Microsoft any longer. Last CE
release was in early 2013 and the PocketPC and Smartphone targets supported by
wxWidgets are long gone.

The build files where already removed in an earlier cleanup this commit
removes all files, every #ifdef and all documentation regarding the Windows CE
support.

Closes https://github.com/wxWidgets/wxWidgets/pull/81
2015-09-23 00:52:30 +02:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Paul Cornett
5b4a70247c use "new" wx-prefixed macros in samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 07:07:55 +00:00
Paul Cornett
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
244e36e8e2 Slightly improve the date/time dialogs in the calendar sample.
Use CreateStdDialogButtonSizer() instead of constructing
wxStdDialogButtonSizer directly, not only this is shorter but it also makes
the "OK" button default correctly.

Also initialize the labels instead of leaving them initially empty.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-04 23:55:22 +00:00
Dimitri Schoolwerth
2d143b6689 Removed ellipsis from "About..." occurrences.
MS and Apple guidelines mention ellipses should generally be used when a command needs additional information from the user before the operation can execute. This is not the case for showing an about dialog so the ellipses have been removed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-20 16:51:09 +00:00
Vadim Zeitlin
569c7d8ccb Add wxTimePickerCtrl class.
Implement wxTimePickerCtrl natively for MSW and add a generic implementation
(very loosely based on the original class by Paul Breen) for the other
platforms.

Also update the calendar sample to show the new control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-29 13:43:15 +00:00
Vadim Zeitlin
106f0d98f8 Implement wxCalendarCtrl::SetDateRange() in the native GTK version.
While GTK+ doesn't support imposing ranges for dates selection natively, we
can do it ourselves by preventing the user from selecting any date outside of
the currently valid range.

This allows to use ranges under all platforms and not only in wxCalendarCtrl
itself but in wxDatePickerCtrl as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-06-19 22:46:36 +00:00
Vadim Zeitlin
3cb332c155 Remove unnecessary mondrian.{ico,xpm} files from samples directory.
Standardize on using sample.rc and sample icon in all the samples, it was
confusing that some of them used it and other didn't, without any apparent
logic.

Remove the now unnecessary icon files, including the dialogs sample icon which
seemed to be corrupted (this closes #11146).

Also replace multiple OS/2 resource files with a single one in the sample
directory. The OS/2 projects/makefiles would need to be updated to use them.

Remove dialogs sample icon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-20 17:42:33 +00:00
Vadim Zeitlin
7b342d55c3 Show the current range of valid dates in the calendar sample.
See #11081 (point C).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 22:24:54 +00:00
Vadim Zeitlin
a5cf7942c9 Test wxCalendarCtrl::SetDateRange() in the sample.
See #11060.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-05 13:40:39 +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
232b216277 added support for wxCAL_SHOW_WEEK_NUMBERS to generic version of wxCalendarCtrl (#10033)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-25 13:47:20 +00:00
Vadim Zeitlin
3c77890141 add more flexible and safer template Connect() overloads (#10000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-12 14:26:13 +00:00
Vadim Zeitlin
6d9b671692 mark holidays if wxCAL_SHOW_HOLIDAYS is on (replaces #9155)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-05 01:55:44 +00:00
Robert Roebling
7b0ccb8a60 [ 1936700 ] wxCAL_SHOW_WEEK_NUMBERS, slightly modified
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-17 15:31:50 +00:00
Vadim Zeitlin
db0b0942f8 implemented toggling of wxCAL_MONDAY_FIRST in the native MSW version of wxCalendarCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-04 16:35:43 +00:00
Vadim Zeitlin
82c6027b47 implemented Mark() in the native MSW version of wxCalendarCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-04 16:26:39 +00:00
Vadim Zeitlin
ee22a3a2a6 implemented HitTest() in the native MSW version; added test for it to the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-04 14:58:44 +00:00
Vadim Zeitlin
bf956fac0e move all appearace-related methods down to wxCalendarCtrlBase from wxGenericCalendarCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-01 23:43: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
a3c3a4cde5 add menu item to jump to DST start date
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-02 00:12:07 +00:00
Vadim Zeitlin
45e6e6f8ab call OnInit() from all samples to allow using standard command line options with all of them (patch 1623971)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-04 00:34:18 +00:00
Vadim Zeitlin
5f324bb622 test resizeable calendar control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-24 09:20:15 +00:00
Vadim Zeitlin
2522d52917 recreate the control when wxCAL_SEQUENTIAL_MONTH_SELECTION style is toggled
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-19 15:15:44 +00:00
Vadim Zeitlin
908f8fc481 removed code inside USE_SIZABLE_CALENDAR, we should allow making the main calendar control resizeable instead of adding another one just for this
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-19 15:03:01 +00:00
Vadim Zeitlin
404e855d9f added possibility to create wxDatePickerCtrl without any initial date
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-19 13:07:40 +00:00
Paul Cornett
574d4d1c4c include fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-06 17:37:30 +00:00
Włodzimierz Skiba
f9cc9706e4 wxWinCE (small screen) adjustements. Added possible testing of sizable calendar control.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-10 21:00:44 +00:00
Włodzimierz Skiba
d9210ab7b4 Tinderbox build fix (wxCococa).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-30 11:53:54 +00:00
Włodzimierz Skiba
b58a81c465 Tinderbox build fix (wxCococa).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-30 09:32:34 +00:00
Włodzimierz Skiba
482635118a wxCocoa build fix. Use XPM everywhere.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-24 08:30:25 +00:00
Vadim Zeitlin
bd019edddc removed pragma interface/implementation (useless and they were in wrong order provoking gcc 3.4 warning)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-24 00:37:19 +00:00
Robin Dunn
718903fe64 wxStdButtonSizer Finalise --> Realize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-18 17:49:03 +00:00
Włodzimierz Skiba
a7c58211db Minor editing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-14 18:28:56 +00:00
Vadim Zeitlin
b7e542bee8 fixes for wxDP_ALLOWNONE case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-13 13:08:13 +00:00
Vadim Zeitlin
3200f37d25 added support for wxDP_ALLOWNONE in wxMSW; documented it; added test for it in the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-13 12:57:38 +00:00
Vadim Zeitlin
7ff2dfbac2 added possibility to use generic date control if configured
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31543 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-21 15:05:32 +00:00
Vadim Zeitlin
d1fd3c2675 expanded the date picker part to show wxDP_XXX styles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-20 16:23:34 +00:00