Commit Graph

70 Commits

Author SHA1 Message Date
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
Paul Cornett
967a94c91a remove WXWIN_COMPATIBILITY_2_6, add WXWIN_COMPATIBILITY_3_0
closes #15792

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 20:07:33 +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
4f9ccec517 Add wxBookCtrlBase::DoSetSelectionAfterRemoval() and use it in wxSimplebook.
This fixes the wrong handling of the selection in wxSimplebook when the
currently selected page was deleted.

Also extend the unit tests to check for this bug.

Closes #15188.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 16:39:39 +00:00
Vadim Zeitlin
ce7fe42e84 Provide shorter synonyms for wxEVT_XXX constants.
Use the same short names as are used by the event table macros for the event
type constants themselves. This makes them much more comfortable to use, e.g.
Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED).

The old long names are still kept for backwards compatibility and shouldn't be
removed as it doesn't really cost anything to continue providing them, but all
new event types should only use the short versions.

Closes #10661.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-25 10:11:03 +00:00
Vadim Zeitlin
ce4ae5639b Added wxBookCtrlBase::FindPage().
Add helper function to find the index of the given page.

Closes #15125.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-29 19:53:13 +00:00
Vadim Zeitlin
2e18fe7139 Virtualize showing/hiding the pages in wxBookCtrlBase.
No real changes, just make it possible to change how the pages are hidden and
shown in the derived classes. This is not used by any of them yet, but will be
used by wxSimplebook soon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:21:29 +00:00
Vadim Zeitlin
005b12d8be Make wxBookCtrlBase::GetPage() virtual to fix it for wxAuiNotebook.
wxAuiNotebook doesn't store its page in the base class m_pages array, so
calling GetPage() on it via a wxBookCtrl pointer resulted in a crash.

Make GetPage() virtual to allow overriding it at wxAuiNotebook level.

Closes #13768.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 23:41:27 +00:00
Steve Lamerton
c78da4eb62 Make wxBookCtrlBase::GetSelection virtual, as per the documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-14 08:24:06 +00:00
Vadim Zeitlin
1871b9facb No changes, just use symbolic NO_IMAGE constant instead of -1 or wxNOT_FOUND.
Existing declarations used -1 in several places to indicate the absence of the
image which wasn't especially clear and was also inconsistent with other
places that used wxNOT_FOUND which didn't make much sense in this context.

Add a new symbolic constant NO_IMAGE in wxWithImages and use it in the classes
deriving from it. This still doesn't help with wx{Tree,List}Ctrl but improves
clarity for the other classes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-21 14:08:49 +00:00
Vadim Zeitlin
abfdefede3 Add wxWithImages helper mix-in with {Set,Get,Assign}ImageList() methods.
Avoid defining SetImageList() in several different places in wx API as not
only this resulted in (trivial) code duplication but this method also had
different semantics before: it didn't take ownership of the pointer passed to
it in wxTreeCtrl, wxListCtrl and wxBookCtrl and derived classes but did take
its ownership in wxDataViewTreeCtrl and wxRichTextFormattingDialog.

Harmonize this for all the classes now: SetImageList() never takes ownership
while AssignImageList() (which is now available in all classes having
SetImageList()) always does.

Also add convenience wxWithImages::GetImage() helper to avoid (more) code
duplication in wxDataViewTreeCtrl code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-21 14:08:43 +00:00
Vadim Zeitlin
60d5c563d2 Avoid events when implicitly selecting first wxBookCtrl page.
The first page added to a wxBookCtrlBase-derived control is always selected,
even if "bSelect" argument of AddPage() was false. This is necessary because
a non-empty book control must always have a selection but the "selection
changed" event generated when doing it is unexpected.

Fix this by not generating any events when the first page is implicitly
selected.

Closes #12075.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-31 13:33:34 +00:00
Vadim Zeitlin
681be2ef80 Refactor: use wxBookCtrlBase::m_selection in all derived classes.
All book control classes with the exception of wxGTK wxNotebook stored the
currently selected page in m_selection or m_nSelection (or, in wxUniv
wxNotebook case, m_sel) variable. Remove all of them and add m_selection
directly to the base class itself so that it can be reused everywhere.

Closes #12622.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-27 16:54:36 +00:00
Vadim Zeitlin
7e837615b9 No real changes, just replace -1 with wxNOT_FOUND in wxBookCtrl code.
Make the code consistently use wxNOT_FOUND instead of -1 everywhere.

See #12622.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-27 16:54:24 +00:00
Vadim Zeitlin
175363f6b8 Implement wxBookCtrlBase::CalcSizeFromPage() in the base class.
The definition of this method was needlessly duplicated in all of
wx{Choice,List,Tool,Tree}book and in all of them except the first one it
didn't account correctly for the case when the size of the controller was
greater than the size of the page.

Avoid the duplication and fix the best size determination in such case by
providing a single, correct version of the function in the base class itself.

Closes #11793.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-05 23:55:19 +00:00
Vadim Zeitlin
1d2b7f06a3 No changes, just remove redundant GetControllerSize() definitions.
For some reasons wxBookCtrlBase::GetControllerSize() was redefined in several
derived classes even though it did exactly the same thing in all of them.

Leave only the base class version and remove the other ones.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-05 23:55:09 +00:00
Julian Smart
95835bc453 Made DoSize and GetPageRect virtual for easier derivation without duplicating a lot of code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-13 09:22:23 +00:00
Vadim Zeitlin
c0c133e13b add wx-prefixed and semicolon-requiring versions of DECLARE_NO_{COPY,ASSIGN}_CLASS macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-08 11:45:59 +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
3e97a90518 use a single wxBookCtrlEvent class for all wxBookCtrlBase-derived controls (#9667)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-01 13:46:46 +00:00
Francesco Montorsi
53a2db124c substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-26 15:06:00 +00:00
Vadim Zeitlin
3056dddc54 remove the unnecessary non-const GetPage() overload
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-22 19:31:10 +00:00
Julian Smart
dc797d8e1b More border rationalisation. GetDefaultBorder is now mostly defined in base class files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-13 12:10:34 +00:00
Julian Smart
a047aff270 Added wxBORDER_THEME, wxWindow::GetDefaultBorderForControl(), wxWindow::CanApplyThemeBorder().
wxTextCtrl and wxSearchCtrl now get the correct border on wxMSW, and the wxRichTextCtrl sample
also now demonstrates correct borders.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-07 19:22:43 +00:00
Václav Slavík
b5dbe15d0b added WXDLLIMPEXP_FWD_FOO macros in addition to WXDLLIMPEXP_FOO for use with forward declarations (in preparation for GCC visibility support)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-09 10:09:52 +00:00
Vadim Zeitlin
3368424ae8 don't accept focus in book control itself
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-25 22:55:35 +00:00
Vadim Zeitlin
e8a147a6c3 invalidate best size of the book controller too when the pages are added/removed, this fixes a lot of sizing problems with treebook
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-04 12:20:09 +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
Vadim Zeitlin
73a0b98c1b define bookctrl (and -derived) classes flags in their headers instead of defs.h; don't deprecate the control-specific flags
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-20 11:32:30 +00:00
Vadim Zeitlin
deb325e3b2 avoid conflict between wxBookCtrlBase::DoSetSelection() and the derived classes; refactor more common code into the base class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-09 21:29:12 +00:00
Vadim Zeitlin
1d6fcbcc70 added wxBookCtrl::ChangeSelection() which is the same as SetSelection() but doesn't send the page change events (second part of patch 1553551)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 17:37:23 +00:00
Włodzimierz Skiba
f41cf3716e BookCtrl event handler added to default book layer.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-04 09:33:52 +00:00
Vadim Zeitlin
e71c530e03 added HasMultiplePages()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-28 23:46:32 +00:00
Włodzimierz Skiba
9804d5404a wxNB_HITTEST_* flags renamed to wxBK_HITTEST_* to serve all book controls.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-05 12:21:13 +00:00
Julian Smart
90f9b8ef0c Reverted last wxBookCtrl change and added alignment check to notebook
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-06-06 12:53:31 +00:00
Julian Smart
926395e16b Each book control should say what its default orientation. Use this info
if no alignment style, otherwise assertion will happen in GetPageRect.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-06-06 11:05:22 +00:00
Vadim Zeitlin
a18c21f000 show help for the page under mouse when the [?] button is used to request help
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-26 02:23:24 +00:00
Vadim Zeitlin
851b88c310 moved wxNotebook::HitTest() to the base book control class; implemented it for wxList/Treebook
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-26 02:09:44 +00:00
Włodzimierz Skiba
e0d5d9af8b All book controls shares wxBK_* flags [bug #1469980].
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-13 18:24:38 +00:00
Julian Smart
87cf52d8ac On screens with restricted space, it's useful to be able to add controls
to e.g. the wxChoice control of a wxChoicebook. GetControlSizer
allows an app to do that, and we also add a control margin which
may or may not be respected by individual book controls.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-13 14:22:32 +00:00
Włodzimierz Skiba
a5325ad672 Back to 'unsigned int' after reasearch of 'size_t' problems.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-24 07:51:55 +00:00
Włodzimierz Skiba
05fd6a8b82 More size_t in interface.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-15 18:46:24 +00:00
Julian Smart
da817fa6eb Changed function to SetFitToCurrentPage
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-06 17:51:11 +00:00
Julian Smart
93bfe54527 Introduced the ability to size a book control based on the currently selected page
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-31 13:51:33 +00:00
Julian Smart
233387bdcb Separated out book control sizing code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-30 15:19:48 +00:00
Vadim Zeitlin
b2f8e75a0a add Clone() to wxXXXbookEvent and copy ctor to wxBookCtrlBaseEvent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-11-10 11:24:19 +00:00
Włodzimierz Skiba
d8fd7acb8b Unified flags for orienting wxBookCtrls (with backward compatibility). Centralised code for sizing internals.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-21 18:53:51 +00:00
Włodzimierz Skiba
159e6235b2 Set/get for internal border in book based controls.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-18 12:31:11 +00:00
Vadim Zeitlin
eca15c0d54 Added wxTreebook:
- added the control itself
- added protected wxBookCtrlBase::AllowNullPage() to accommodate it
- big changes to the sample to get rid of (most) ugly macros
- added XRC handler for the control
- added docs
- and wxUSE_TREEBOOK everywhere


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-09 18:40:36 +00:00
Vadim Zeitlin
97c58531bf made GetPage() not virtual because it doesn't need to be virtual and this allows to have const overload of it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-09 17:26:09 +00:00