If both makefiles and any source files were committed, makefiles were
mistakenly added to changed_sources and were flagged as containing TABs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We must be able to use them even when we have no attributes at all
and even when we have no associated table, so use default renderers in wxGrid
implementation of Draw{Row,Column}Label()/DrawBorder() in this case.
Closes#11230.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As this class has only inline methods it doesn't need to be exported from the
DLL and actually exporting it results in linking problems when using
wxScrolled<wxWindow> (which, unlike wxScrolled<wxPanel>, is not used in wx
itself and so doesn't seem to be instantiated) in DLL client even with VC > 6.
An alternative solution would be to change WXDLLIMPEXP_TEMPLATE_INSTANCE_CORE
macro to explicitly instantiate the template in the DLL even for VC > 6 but
this wouldn't solve the problem for wxScrolled<CustomClass> while removing the
DLL export declaration should.
Also use wxScrolled<wxWindow> in addition to wxScrolled<wxPanel> in the scroll
sample to test that it links correctly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Now that this function is not called from idle time (because it should be
called before, see r61441), the event loop must call explicitly so do it from
wxGUIEventLoop::Dispatch() in wxX11.
A probably better (but more time-consuming) fix would be to make wxX11 use
wxEventLoopManual as there doesn't seem to be any reason not to.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
DrawButtonLabel() crosses out the buttons to indicate that they are disabled
(for lack of any other options in mono renderer) but this looks really bad for
the labels, so don't do it.
Closes#11220.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxControlRenderer::DrawLabel() was used by both wxStaticText and wxButton but
their labels may need to be drawn differently and wxRenderer does have
different DrawLabel() and DrawButtonLabel() to do it. Now also add a separate
method for the buttons to wxControlRenderer.
See #11220.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Now that wxGetActiveWindow() is used when showing modal dialogs, it became
critical to implement it as otherwise an assert happens every time a dialog is
shown and because creating the assert dialog itself results in another (same)
assert, this immediately results in a crash.
So implement it even if in a very trivial (but hopefully not too incorrect)
way.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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
This function is not needed in wxGTK2 as GTK+ sets detectable auto-repeat on
its own in gdk_display_open() anyhow, so move its implementation to
src/x11/utilsx.cpp where it can be used by wxX11 and wxMotif which do need it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function was mistakenly defined in a section of utilscmn.cpp compiled as
part of wxBase, so it wasn't correctly exported from the core library and
linking any wxX11 applications failed when using compiler with visibility
support.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Situation with wxBK_XXX vs wxXXB_XXX remains confusing, the comments in the
code suggest that the former is preferred but the latter are documented for
wxListbook and wxChoicebook (although they don't even exist for wxTreebook).
So it seems unwise to not recognize the wxXXB_XXX versions in XRC as people
could easily decide to use them instead of wxBK_XXX values -- and this is also
consisten with wxNotebookXmlHandler which does recognize both wxBK_XXX and
wxNB_XXX already.
Change wxListbookXmlHandler and wxChoicebookXmlHandler to also always
recognize these styles.
Closes#10725.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The change of the counter to a simple boolean in r61985 broke the code which
called both Initialize() and Shutdown() multiple (but the same number of)
times. As this is the documented correct behaviour, restore the counter to
cater for it even if we don't really need it any longer.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function should be used in the main thread only and calling it from
wxSockAddress unconditionally resulted in asserts in the unit test.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Throwing an exception from worker threads is useless as it is not caught by
our wxUnitTestProtector which only protects the main thread, so abort
immediately to be sure to provide at least some information about the problem
as otherwise nothing may be output at all and the program can end up
deadlocked.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Because Windows uses margins around the text drawn in the status bar, naively
setting a field width to the size of the text didn't work (see previous
commit for an example). As this seems a natural enough thing to do, account
for this margin inside wxStatusBar itself to avoid the user code the trouble
of having to call some special function to do it. Notice that this does mean
that fields not containing text may be slightly larger than needed, but we
consider that this (rarer) case is less important.
Also account correctly for the status bar grip size. And while we still hard
code its size, do it in a clearly named function instead of using completely
mysterious constants here and there.
Closes#10696.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Modify the status bar sample to use two fields of just the right size for
their contents to confirm that this doesn't work correctly under at least MSW
currently (see #10696).
Notice that we need two fields because the behaviour/problem is different for
the last field and all the other ones.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The sample code was complicated by having USE_STATIC_BITMAP and using
wxStaticBitmap or wxBitmapButton depending on it. Neither important for
a wxStatusBar sample so just use wxStaticBitmap always and make the code
simpler and more readable.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just:
- Fix code which couldn't compile in USE_MDI_PARENT_FRAME case
- Use wxMenu::AppendCheckItem() instead of Append(..., true)
- Remove unnecessary #ifdef __WXMAC__
- Wrap excessively long lines
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If wxMDIParentFrame object was created without its Create() ever being called,
it crashed in its dtor trying to delete an uninitialized pointer, so do
initialize it to NULL in all ctors (via a helper Init() method, as usual).
Closes#11216.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Calling Initialize() from another thread could never work before but it wasn't
clear that this was the case so document it in the functions comments and
documentation now and add asserts checking that they are called from the main
thread only.
Also simplify the code as we don't actually need to do any reference-counting
here and a simple boolean flag indicating whether the sockets are initialized
is enough.
Closes#11119.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The value of wxColour::Alpha() was assigned to a temporary variable which
wasn't used afterwards and Mac OS g++ warned about it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to remove WXDLLIMPEXP_BASE from the class declaration and should
hopefully fix VC6 linking errors when building the unit test.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add optional length output parameter and also change the return type to "char
*" from "wxChar *" to which it apparently was blindly changed just to make
this code compile even though this function never returned any strings.
Closes#11214.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These methods allow to operate with all 3 or 4 colour channels at once.
Add their implementation, documentation and a unit test for wxColour
exercising them.
Closes#9918.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775