Commit Graph

335 Commits

Author SHA1 Message Date
Stefan Csomor
9a44838055 using the base class wxHAS_NATIVE_ENABLED_MANAGEMENT in cocoa disabling/enabling child windows, fixes #16232, fixes #15495
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-06 15:49:15 +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
7e049a9692 Remove redundant forward declaration of wxCursor from wx/window.h.
We include wx/cursor.h from wx/window.h anyhow (and can't avoid it as we have
a member of wxCursor type in wxWindowBase).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 20:10:11 +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
178635b62a Add wxDEPRECATED_MSG() and use it in a couple of places.
This macro should be used instead of wxDEPRECATED() for the new deprecations
as it allows to give a helpful explanatory message (if supported by the
compiler) and also is simpler to use as it doesn't require wrapping the entire
declaration in it but can be simply used before it.

Also add wxDEPRECATED() support for clang as a side effect.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:22 +00:00
Vadim Zeitlin
3d777efedc No real changes, just make wxWindow::CanScroll() virtual.
This will allow overriding it in wxScrolled<>, see #15440.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 13:12:31 +00:00
Vadim Zeitlin
ae1cdb2d07 No changes, just move mouse capturing bookkeeping data out of wxWindow.
All mouse capture-related data doesn't have to be declared in wxWindow itself
and can just be global in wincmn.cpp, so move it there, this will facilitate
further changes as they won't require recompiling everything any more.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:02 +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
bd6ca54f63 Fix tab navigation bug with radio boxes without enabled items.
There was a bug similar to the one in the preceding commit with radio boxes
under wxMSW too: if all radio box buttons were disabled (or hidden, although
this should be much more rare in practice, unlike the disabled case which was
deemed to be rare in r74583 commit message but turned out to actually happen),
the radio box still pretended to accept focus but didn't really do it.

Fix this by allowing to override wxWindow::CanBeFocused() and do it in
wxRadioBox to check whether we have any enabled visible items.

Also add a check for CanBeFocused() to wxControlContainer code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-23 12:44:33 +00:00
Stefan Csomor
f082dcd598 using common GetContentScaleFactor throughout part 1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-19 20:28:01 +00:00
Stefan Csomor
f86190702b adding magnification API into the wxWindow classes for best retina support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-17 17:41:34 +00:00
Vadim Zeitlin
1a986642f5 Add wxWindow::BeginRepositioningChildren() and EndRepositioningChildren().
This is just a refactoring of wxMSW code to make it possible to use deferred
window positioning from other places in subsequent commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:03 +00:00
Vadim Zeitlin
00a399c062 Remove wxTextCtrl::OnEnabled() hack from wxGTK.
Don't change the background colour when the control is being enabled or
disabled, it doesn't seem necessary and it's unclear why was this added by
r10179 in the first place. It does result in problems however as it could
somehow make the selection of wxTextCtrl invisible when it lost focus and so
fixes a serious usability problem which happened to all wxTextCtrls for which
a wxEVT_UPDATE_UI handler using wxUpdateUIEvent::Enable() was defined.

Closes #14898.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-31 01:12:21 +00:00
Vadim Zeitlin
e0fddcefb6 Catch attempts to create a window with itself as parent.
This doesn't happen often but when it does, the results are catastrophic and
not always easy to debug, so try catch this as soon as possible.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 00:37:10 +00:00
Vadim Zeitlin
d119983947 Add wxWindow::GetBest{Height,Width}().
These functions will be used when it is necessary to determine the best size
of the control if one of its size components is fixed. Currently none of the
classes implements DoGetBestClient{Height,Width}() yet but wxListCtrl will do
it soon, see #13898.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 14:24:37 +00:00
Vadim Zeitlin
8b2f64c6c1 Added wxWindow::IsDescendant() helper.
This function checks if another window is a direct or indirect child of this
one, which can be needed in a number of situations.

See #3063.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 11:58:02 +00:00
Vadim Zeitlin
e94f303173 Deprecate wxWindow::MakeModal().
Using this function was never the right way to show a modal window and it
didn't really work correctly. Instead of futilely trying to fix it, just
deprecate it.

Closes #1561.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-07 23:50:21 +00:00
Vadim Zeitlin
1442168125 Implement wxBG_STYLE_TRANSPARENT support for wxGTK.
Use composited windows if supported by GTK+ for wxWindows with this background
style.

Also add wxWindow::IsTransparentBackgroundSupported() and show how to use it
in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-11 16:26:52 +00:00
Vadim Zeitlin
0e1f8ea4a3 Remove wxMGL port.
The company behind MGL toolkit (SciTech) doesn't exist since several years and
this port is not used by anybody, so remove it to ease maintenance burden.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-15 14:46:41 +00:00
Vadim Zeitlin
bd362275b8 Remove Palm OS port.
The platform targeted by this port doesn't exist any more and the port never
achieved really working state so remove the code to avoid having to maintain
it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-15 01:05:28 +00:00
Vadim Zeitlin
2039dd917c Add wxWindowBase::CopyToolTip() method.
This method simply sets the same tooltip for the window but making copy of,
instead of taking ownership of, the wxToolTip passed in.

It's not especially useful on its own but is needed by wxCompositeWindow and
might be handy elsewhere.

See #13523.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-02 11:28:45 +00:00
Vadim Zeitlin
6e92c2991b Fix bug with TAB being able to switch focus between MDI frames.
The keyboard navigation code correctly checked that TAB was not propagated
above the TLW containing the window in which the key was pressed to avoid
switching focus between different TLWs by pressing TAB.

However wxMDIChildFrame is not a TLW and so it was possible to switch focus
between two different MDI child frames by pressing TAB. This was unexpected
and counterintuitive, especially because the frame receiving focus was not
even activated (which might be another bug).

Fix this by adding a new wxWindow::IsTopNavigationDomain() virtual method that
can be overridden to indicate that a window is a self-contained "keyboard
navigation domain" and that keyboard events shouldn't propagate outside of it
and override it in both wxTopLevelWindow and wxMDIChildFrame to ensure that it
behaves correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-03 00:45:42 +00:00
Dimitri Schoolwerth
d13b34d3f2 No code changes, fixed various typos.
Applied patch by snowleopard2 fixing typos in interface/. Extended the fixes throughout trunk.

Closes #13076.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-03 20:31:32 +00:00
Dimitri Schoolwerth
4c51a665c6 Fixed various typos.
Applied patch by snowleopard2 fixing a bunch of typos such as misspellings and double words in the documentation. Combined the patch with some local queued typos waiting to be committed as well as adding new typo fixes inspired by the patch.

Function names with American spelling were not changed nor was third-party code touched. The only code changes involve some changes in strings that are translated ("Can not" -> "Cannot").

Closes #13063 (again).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 14:17:38 +00:00
Vadim Zeitlin
e4c903b2ea Fix wxWrapSizer minimal size calculation.
Add a unit test checking that wxWrapSizer::CalcMin() returns the expected
results.

Closes #12464.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-08 13:36:13 +00:00
Paul Cornett
0c3e2a5baa Move SendIdleEvents() from wxApp to wxWindow.
Use it to properly implement idle events for
wxGTK menubar, toolbar and statusbar.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-08 06:42:41 +00:00
Paul Cornett
6a50a2c4d3 move default OnInternalIdle processing to wxWindowBase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-07 18:15:21 +00:00
Vadim Zeitlin
51b729af92 Add default value for GetPopupMenuSelectionFromUser() position argument.
Let the menu be popped up at the system-determined position, just as it can
already be done with PopupMenu() itself.

Closes #12530.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 14:33:53 +00:00
Vadim Zeitlin
b35549525f Implement wxWindow::DoGetBorderSize() for all ports.
Implement DoGetBorderSize() properly for wxGTK and use the difference between
the full window size and the client size for all the ports not implementing
this method. The latter is incorrect in the presence of the scrollbars but is
the best we can do in general.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 10:43:49 +00:00
Vadim Zeitlin
396e9eb8e2 Add wxWindow::ProcessWindowEventLocally() and use it in wxMSW MDI code.
Add ProcessWindowEventLocally() which wraps ProcessEventLocally() in the same
way as ProcessWindowEvent() wraps ProcessEvent(). I.e. it allows to process
the event in this window only, without propagating it upwards, but taking into
account any event handlers associated with it.

Use the new method in wxMDIParentFrame code in wxMSW to ensure that event
handlers pushed on MDI children frames are taken into account. Add a test for
this to the MDI sample.

Closes #11225.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-09 14:55:33 +00:00
Václav Slavík
5c3c137277 Fixed dialog units <-> pixels conversion.
The computation is now identical to Windows native one. To achieve this,
MSDN-recommended GetTextExtent() call is used instead of GetCharWidth().
wxMulDivInt32() is used instead of integer arithmetics to achieve
correct rounding.

Use toplevel parent's font instead of window's own. This makes more
sense, as dialog units are defined for TLWs, not individual subcontrols.

Also fixed wxMSW's wxButton::GetDefaultSize() to compute dialog units
correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-24 11:51:09 +00:00
Václav Slavík
0e7f59ab29 Make ConvertPixelsToDialog() and ConvertDialogToPixels() const.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63193 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-19 17:53:29 +00:00
Vadim Zeitlin
d7d943a71c Implement wxWindow::DoGetBorderSize() in the trivial case of wxBORDER_NONE.
This fixes an assert in wxGenericStaticText which overrode
DoGetBestClientSize() but not DoGetBorderSize().

It would still be useful to implement DoGetBorderSize() in wxGTK (and other
ports) in general too as using wxGenericStaticText with non-default border
still doesn't work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-08 15:56:14 +00:00
Paul Cornett
cff9681b85 make access for virtuals match base
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-03 17:20:15 +00:00
Vadim Zeitlin
eb6fda807a No real changes, just correct "synonim" typo in comments.
Closes #11408.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-05 14:59:30 +00:00
Vadim Zeitlin
2973301f6f Refactor initialization code in wxTopLevelWindowMSW::Create().
No real changes as the old code was, in fact, correct (although Create()
didn't initialize m_parent explicitly, it was still done in AddChild() if the
parent was not NUL) but just make it more explicit and clear.

Add a new helper wxWindowBase::CreateBase() overload for top level windows,
not taking the validator parameter which doesn't apply to them.

Also make CreateBase() protected as it is only meant to be called from derived
classes Create().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:58:15 +00:00
Vadim Zeitlin
ffa50e7361 Added wxSHOW_EFFECT_NONE.
Calling Show/HideWithEffect() with this effect is the same as calling just the normal Show/Hide().

This is convenient as it allows to use the same API, whether with effects or without them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:53:57 +00:00
Vadim Zeitlin
2c1a1ed190 Implement wxWindow::DoGetBorderSize() in wxUniv.
As some wxUniv classes implement DoGetBestClientSize(), the new code in
wxWindow::DoGetBestSize() implementation calls DoGetBorderSize() which asserts
because it's not implemented, making it impossible to even start the minimal
sample -- fix this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 00:22:52 +00:00
Vadim Zeitlin
c5cc7fbd27 Made wxWindow::HasScrollbar() do what it says.
Added wxWindow::CanScroll() with the old HasScrollbar() meaning but changed
HasScrollbar() to check for the scrollbar existence instead of just checking
if it might exist.

Closes #10897.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-10 11:18:09 +00:00
Vadim Zeitlin
3185abc278 Support delayed destruction in console applications too.\n\nThis only works if there is a running event loop but if there is one, we can have the same kind of problems with non-GUI objects such as sockets in console applications as we have with windows in GUI ones, so we must support this (see #10989).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-21 14:16:44 +00:00
Vadim Zeitlin
743b426605 Added DoGetClientBestSize() and use it for a couple of controls in wxMSW.
DoGetClientBestSize() returns the best size of the client area, without
accounting for the border which is done by GetBestSize() itself and
DoGetBorderSize() called from it.

Use DoGetClientBestSize() in wxStaticText (where it was done
insideDoGetBestSize() before) and in wxListBox, to fix its height calculation.

Also use correct height of listbox items as returned by the control itself
instead of trying to guess it.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-22 20:36:13 +00:00
Vadim Zeitlin
9c61c5b04b introduce wxBG_STYLE_{ERASE,PAINT} and implement their documented semantics in wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-16 23:04:42 +00:00
Vadim Zeitlin
6de7047076 add virtual DoGetTextExtent() to allow calling the overloaded wxWindowBase::GetTextExtent() on wxWindow objects without any ugly casts/scope resolution operators
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-10 16:41:41 +00:00
Vadim Zeitlin
6528a7f145 make wxWindow::SetAutoLayout() now works for all windows, not just panels
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-23 11:26:58 +00:00
Vadim Zeitlin
f27683e7da don't use access declarations with Watcom which doesn't support them correctly (closes #10749)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-02 15:31:14 +00:00
Vadim Zeitlin
8cc208e39f deprecate the old TryValidator/Parent() and replace them with the new and documented TryBefore/After()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-26 16:16:31 +00:00
Paul Cornett
5079735ca0 build fixes for wxUSE_THREADS==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-18 04:06:46 +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
Robert Roebling
26f7724c4b Don't use a cached best size if the window has a sizer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-30 20:08:14 +00:00
Robert Roebling
e81c715586 Move body of SetMinSize and SetMaxSize from header to cpp file for easier debugging. The methods are virtual anyway.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-30 09:49:29 +00:00