Commit Graph

45 Commits

Author SHA1 Message Date
Vadim Zeitlin
ce95913319 Use wxWindow instead of wxControl in the widgets sample.
Not all widgets are controls and we don't use any of wxControl-specific
methods in the sample, so don't require RecreateWidget() to return a wxControl
when a simple wxWindow suffices.

No real changes.
2015-08-03 17:57:42 +02:00
Vadim Zeitlin
5662e86b61 Improve widgets sample UI consistency.
Ensure that the various attributes (colours, font, border, ...) are preserved
when a widget is recreated or the current page is changed. This is more
convenient and also avoids discrepancies between the state of the menu items
and the actual state of the widget.

Closes #16576.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-02 14:26:53 +00: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
40aa1a7e60 Implement GetSizeFromTextSize() for wxSpinCtrl.
Implement it for the native MSW and GTK versions and the generic one used in
the other ports and also for wxSpinCtrlDouble under MSW.

Also test this function in the spin page of the widgets sample.

Closes #14840.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-20 12:49:53 +00:00
Vadim Zeitlin
9bd25c8670 Generate wxEVT_COMMAND_TEXT_ENTER events for generic wxSpinCtrl.
Pass wxTE_PROCESS_ENTER to wxSpinCtrlTextGeneric if it's specified for
wxSpinCtrl itself and also forward wxEVT_COMMAND_TEXT_ENTER events from it to
wxSpinCtrl itself.

This fixes lack of these events for wxSpinCtrlDouble under MSW and also lack
of them for any kind of wxSpinCtrl in the ports using generic version (notably
wxOSX).

Closes #14604.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:25:01 +00:00
Vadim Zeitlin
9e565667d0 Add wxSpinCtrl::SetBase() to allow entering hexadecimal numbers.
Add a generic SetBase() API even though right now only bases 10 and 16 are
supported as we might support other ones (e.g. 8?) in the future. Implement it
for MSW, GTK and generic versions.

Add controls allowing to test this feature to the widgets sample.

Add "base" property support to the XRC handler for wxSpinCtrl, document it and
test it in the xrc sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:24:38 +00:00
Vadim Zeitlin
526954c596 Globally use "wxWindows licence" consistently.
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.

See #12165.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-13 13:29:13 +00:00
Vadim Zeitlin
ca288f2afe Use GetWidgets() in the widgets samples instead of GetWidget2().
Add a function which can be overridden to return an arbitrary number of
widgets instead of having just GetWidget() and GetWidget2(): spin control page
already uses 3 widgets (and defines GetWidget3() which is never called) and we
could have even more in the future. Just use a generic solution which will
always work.

The practical consequence of this is that the "Enable/Disable" menu item now
also enables and disables the wxSpinCtrlDouble in the spin page, see #12045.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-13 15:31:30 +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
7e4952db83 add alignment flags support to wxSpinCtrl[Double] (closes #10621)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-22 09:18:46 +00:00
Vadim Zeitlin
fd07e185b4 honour wxSP_ARROW_KEYS in wxSpinCtrlGeneric and don't handle the arrows unless it's specified (closes #10565)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-10 15:36:17 +00:00
Vadim Zeitlin
55ab5200fb delete the old labels when recreating the spin controls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-14 19:53:31 +00:00
Vadim Zeitlin
242ec2f7e9 really, really fix handling Enter in spin controls: only request it for the control if wxTE_PROCESS_ENTER is used to avoid breaking the use of Enter for the default item activation if it isn't; also document wxTE_PROCESS_ENTER style for wxSpinCtrl and add it to the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-14 19:50:30 +00:00
Vadim Zeitlin
2a998b7344 label different controls on spin page (#9816)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-05 16:58:54 +00:00
Vadim Zeitlin
952ff7bc3c fix wxEVT_COMMAND_TEXT_ENTER generation in wxSpinCtrl; add a test for it to the widgets sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-28 11:31:09 +00:00
Vadim Zeitlin
8cd6a9ad50 added wxSpinCtrlDouble (slightly modified patch 1835864)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-18 14:04:19 +00:00
Vadim Zeitlin
6ceb105f1e added test for EVT_TEXT handler for spin contorl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-31 15:11:02 +00:00
Vadim Zeitlin
be16b85933 fix initial layout of the widgets pages: avoid calling Fit() on them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-03 13:43:44 +00:00
Vadim Zeitlin
6dd21271d9 empty spin range is valid and even useful (at least for testing purposes)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-10 00:45:37 +00:00
Włodzimierz Skiba
453535a739 On-demand creation of the pages for speedup of sample launch.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-06-06 14:10:06 +00:00
Włodzimierz Skiba
261357eb0a Small devices adjustements.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-26 14:07:47 +00:00
Włodzimierz Skiba
f0fa4312b1 Continuation of 'widgets' sample improvements.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-22 10:39:40 +00:00
Włodzimierz Skiba
f2fdc4d56e Rearranged widgets sample to show more and categorized widgets.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-17 19:49:09 +00:00
Włodzimierz Skiba
33cf9a1922 Warning fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-28 17:07:14 +00:00
Vadim Zeitlin
1301e2289f added a menu allowing to change the border style used by the widget
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-16 23:39:11 +00:00
Mattia Barbon
5378558e5c No significant changes. Remove reliance on wx/bookctrl.h being
included in wx/sizer.h.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-08-28 08:54:56 +00:00
Vadim Zeitlin
1c01dd1629 1. added possibility to test setting tooltip for the widget
2. added WidgetPage::GetWidget2() for pages like the spin one which shows
   2 widgets and not only one


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-28 01:15:46 +00:00
Włodzimierz Skiba
61c083e781 wxBookCtrl->wxBookCtrlBase. wxBookCtrl is now most suitable book for given platform. Samples adjustement.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-23 11:45:07 +00:00
Vadim Zeitlin
195df7a767 added tests for setting fg/bg colours
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-19 19:03:04 +00:00
Włodzimierz Skiba
8f6eaec925 Warning fixes to most detailed warning output of OpenWatcom. Tested under Borland, DigitalMars and MinGW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-04 20:25:15 +00:00
Julian Smart
be5a51fb59 More name changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-25 11:20:37 +00:00
Julian Smart
206d3a16ca Applied patch [ 829144 ] Compilation error fixes for samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-11 10:32:15 +00:00
Vadim Zeitlin
0a3d26b81f (Open Watcom but not only) compilation warning fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-04 11:18:02 +00:00
Julian Smart
c02e5a31c5 Removed some warnings in widgets sample
Reduced some flicker in wxNotebook when using
XP controls


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-31 13:59:28 +00:00
David Elliott
a6bc93cc74 Wrap file with #if wxUSE_SPINBTN instead of #if 1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-01 15:50:40 +00:00
Mattia Barbon
3bb70c4026 Add missing header.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-23 15:12:41 +00:00
Vadim Zeitlin
9dd96c0f6d compilation fix after wxSizer::Remove() change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-01-26 14:03:29 +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
Mattia Barbon
aec18ff785 Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth
Addresses:
  printf-format warinigs
  indentation/style
  unused variable warnings
  used wxID_ABOUT for about menu entry
  removed references to "minimal sample" in other samples
  some other misc warinigs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-01 19:12:24 +00:00
Julian Smart
59b9edf0b3 Initialized the controls on the widgets spinbutton page
and checked for NULL in one of the event handlers, since
on the Mac the event handler may be called before the
control is properly initialized
Tested for an empty string in Mac's textctrl.cpp
else we get a crash if there is nothing in the text control


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-05-14 11:28:13 +00:00
Julian Smart
7b12790064 Made widgets sample take up less space
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-09 10:31:37 +00:00
Gilles Depeyrot
5e173f35d2 removed trailing ; after DECLARE_ macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-11-25 15:18:38 +00:00
Vadim Zeitlin
32b8ec418a added more files (unchanged) from wxUniv branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-06-26 21:05:06 +00:00