Commit Graph

46 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
Paul Cornett
ea92bb677d use stock colour/pen/brush objects in samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 23:06:50 +00:00
Vadim Zeitlin
b4354db179 Refactor wxButton and wxToggleButton to derive from wxAnyButton.
Introduce wxAnyButton class, a common base class for wxButton and
wxToggleButton, allowing to reuse the same implementation for them.

This also allows to implement support for bitmaps in wxToggleButton for all
platforms and make wxBitmapToggleButton a trivial subclass of it everywhere,
similarly to wxBitmapButton and wxButton.

Closes #13198.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-06-14 13:00:42 +00:00
Vadim Zeitlin
825ce0af4f Use consistent sizes for all icons used in the button page of widgets sample.
Explicitly pass wxART_BUTTON to wxArtProvider to ensure that all the icons are
returned in the same size, otherwise they didn't look well and could result in
an assert too, see #12909.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-15 11:10:42 +00:00
Vadim Zeitlin
95912bddde Add markup support to wxMSW wxButton and show it in the sample.
Use recently added wxMarkupText to implement support for markup in wxMSW
wxButton.

Update the button page of the widgets sample to show markup support.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:48:26 +00:00
Vadim Zeitlin
b55bc1a2ca No changes, just add a couple of #if wxUSE_COMMANDLINKBUTTON tests.
Don't even declare m_chkCommandLink if we have no support for command link
buttons in the library.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:47:59 +00:00
Vadim Zeitlin
3571e1add4 Add new wxCommandLinkButton class.
A command link button wraps a native MSW control under recent Windows versions
and is implemented generically as a simple bitmap button elsewhere.

In the future, GTK implementation should allow using a different font for the
button label and its note.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-17 14:48:50 +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
f2d7fdf7b0 Add support for showing "elevation" icon in wxMSW buttons.
Add, document and test in the widgets sample wxButton::SetAuthNeeded().

Closes #11705.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-08 19:52:00 +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
f2a4f50e7d make bitmap button background more visible
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-09 13:11:52 +00:00
Vadim Zeitlin
d46a35d092 relayout the sizer containing the button after changing its label as this may change the button size
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-22 18:37:09 +00:00
Vadim Zeitlin
d5b98eb928 implement support for per-state bitmaps in wxMSW wxButton
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-15 20:18:10 +00:00
Vadim Zeitlin
233f10bf15 implement images support for wxButton under XP and later
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-15 04:23:54 +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
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
d8a731eed4 Tinderbox build fix: preprocessing directive not recognized within macro arg.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-19 10:17:43 +00:00
Włodzimierz Skiba
d8d07a796f wxUniv port mentioned instead of native, wxButton ports listed, minor placement fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-18 15:36:44 +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
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
Julian Smart
4ee8e5cde3 Don't pass wxALIGN_ flags to wxButton
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-18 09:16:59 +00:00
Vadim Zeitlin
3e764e2f80 added checkbox to enable setting (or not) individual wxBitmapButton bitmaps
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-11-03 19:29:18 +00:00
Vadim Zeitlin
1fdc16adf7 added SetHoverBitmap() and implemented it under wxMSW; extended the docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-11-03 01:48:10 +00:00
Vadim Zeitlin
552271d6ad added test of wxBitmapButton
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-11-03 01:28:17 +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
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
Vadim Zeitlin
8772bb0838 typos in comments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-25 12:23:52 +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
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
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
Vadim Zeitlin
c049568782 fixed the button alignment flags
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-02 12:29:44 +00:00
Vadim Zeitlin
ff8ebfaf5d compilation sample in !WXWIN_COMPATIBILITY_2_2 mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-20 23:30:23 +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
3379ed3789 tons of fixes for wxGTK/Univ - seems to work, more or less, now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-07-03 19:38:19 +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