Commit Graph

49682 Commits

Author SHA1 Message Date
Vadim Zeitlin
95e74456a2 Fix bug in the hook which prevented committing makefiles.
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
2009-09-23 16:00:08 +00:00
Vadim Zeitlin
5c858faa15 Suppress harmless mingw32 warning about unused value.
Add an explicit cast to void to Header_SetImageList() call to avoid "warning:
value computed is not used".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 14:29:04 +00:00
Vadim Zeitlin
670d01778a Extract default grid header renderers from wxGridCellAttrProvider.
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
2009-09-23 14:28:55 +00:00
Vadim Zeitlin
cb7c02fd46 Remove DLL export declaration from wxScrolled.
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
2009-09-23 14:28:42 +00:00
Vadim Zeitlin
5ec3853fa6 Don't use deprecated integer mask with wxLogTrace().
Use string mask instead of the deprecated wxTraceMessages to fix compilation
with WXWIN_COMPATIBILITY_2_8==0.

Closes #11229.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 14:28:35 +00:00
Vadim Zeitlin
d4295ad159 Add ribbon libraries sources to the monolithic build.
Closes #11231.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 13:16:53 +00:00
Julian Smart
4fdc2c5f2a Added wxRICHTEXT_HANDLER_USE_CSS flag for HTML handler to use CSS
where possible.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 11:05:52 +00:00
Julian Smart
2f0baf9797 Resolved #4842 (accessors for member variables)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 08:15:13 +00:00
Julian Smart
2c48f03275 Fixed #10702 (encoding not used in HTML handler)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 07:53:22 +00:00
Julian Smart
0d6ca1c2f6 Fix for wrong line placement when centering or right-aligning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-23 07:38:42 +00:00
Julian Smart
346c54a4bb Clarified difference between SetInsertionPoint and MoveCaret.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 16:46:12 +00:00
Julian Smart
4427f297a6 Fix for #4696: added SetDefaultStyleToCursorStyle() to SetInsertionPoint() so style is taken from context, not the style at a previous location.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 16:36:58 +00:00
Julian Smart
140d93c024 Returning WVR_REDRAW triggers Windows bug that moves child windows, so don't use it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 15:20:17 +00:00
Jaakko Salli
57f2175441 Minor clarifation and typo fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 14:52:57 +00:00
Jouk Jansen
8110dab0ff Include compile support for propgrid & ribbon on OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 14:13:55 +00:00
Julian Smart
59a87eeaf6 Fixed #9996 (incorrect XML output in Ansi build for non-ASCII character)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 13:06:42 +00:00
Peter Cawley
77749ea963 Added automatic linking of ribbon libraries when using MSVC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 12:13:03 +00:00
Julian Smart
ec2d6790e9 Fixed wxBORDER_THEME breakage
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 10:58:06 +00:00
Julian Smart
7bc44d871c Don't use deprecated background style
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 10:03:04 +00:00
Jouk Jansen
1c294f7a90 Update OpenVMS makefile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 06:12:39 +00:00
Vadim Zeitlin
1c9919467b Call wxApp::ProcessPendingEvents() from wxX11 event loop.
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
2009-09-22 00:23:16 +00:00
Vadim Zeitlin
8e9d125855 Override DrawLabel() to avoid crossing out disabled labels in mono theme.
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
2009-09-22 00:23:09 +00:00
Vadim Zeitlin
fdc468a0a6 Add a separate wxControlRenderer::DrawButtonLabel() too.
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
2009-09-22 00:23:03 +00:00
Vadim Zeitlin
2344c32b7e Implement wxGetActiveWindow() for wxX11.
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
2009-09-22 00:22: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
f9837e4693 Define wxSetDetectableAutoRepeat() for X11-based ports only.
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
2009-09-22 00:22:44 +00:00
Vadim Zeitlin
ef3da29bf1 Move wxSetDetectableAutoRepeat() to a section compiled in wxCore.
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
2009-09-22 00:22:38 +00:00
Vadim Zeitlin
8a72770aa6 Recognize old wx{CHB,LB}_XXX styles in XRC.
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
2009-09-21 20:10:54 +00:00
Vadim Zeitlin
44c2703fbf Restore socket initialization times counter.
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
2009-09-21 14:45:52 +00:00
Vadim Zeitlin
ed2e973e9f Don't call wxSocketBase::IsInitialized() from worker threads.
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
2009-09-21 14:45:45 +00:00
Vadim Zeitlin
884ca4e484 Abort on asserts in worker threads.
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
2009-09-21 14:45:37 +00:00
Stefan Csomor
3ec9ba039f on iPhone default is to cover entire screen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 13:11:26 +00:00
Stefan Csomor
aa308c95fe fixing cast warnings on OSX 10.6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 13:10:01 +00:00
Stefan Csomor
1437127330 fixing include type
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 13:08:52 +00:00
Vadim Zeitlin
edd608b18a Account for the margins used by Windows around status bar text.
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
2009-09-21 13:00:36 +00:00
Vadim Zeitlin
bced985eb0 Add a test of precisely sized status bar fields.
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
2009-09-21 13:00:23 +00:00
Vadim Zeitlin
5eb65a3b70 Simplify the status bar sample by removing wxBitmapButton.
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
2009-09-21 13:00:16 +00:00
Vadim Zeitlin
ee38a8cf7f Show status bar panes rectangles in the sample.
Display the rectangles returned by wxStatusBar::GetFieldRect() to be able to
visually check if they are correct.

See #10696.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 13:00:07 +00:00
Vadim Zeitlin
06a0d3eaaf Clean up status bar sample.
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
2009-09-21 12:59:56 +00:00
Stefan Csomor
0a84f928e9 moving themeing include to private.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 12:57:12 +00:00
Vadim Zeitlin
0fd2ecfed3 Initialize wxMDIParentFrame::m_accelWindowMenu in default ctor.
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
2009-09-21 08:44:42 +00:00
Vadim Zeitlin
4017f5ca49 wxSocket::Initialize() and Shutdown() are for main thread only.
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
2009-09-21 08:44:35 +00:00
Vadim Zeitlin
7b7ad6a7f2 Fix harmless unused variable warning.
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
2009-09-21 08:44:25 +00:00
Jouk Jansen
0d83ac4cc4 Fix OpenVMS makefiles for inline function changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 06:08:50 +00:00
Vadim Zeitlin
45de347c10 Put wxAny implementation entirely in the header.
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
2009-09-20 12:37:16 +00:00
Vadim Zeitlin
97051666f0 Add missing header to fix wxAny test compilation under OS X.
And probably other Unix systems not using PCH.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-20 12:37:11 +00:00
Julian Smart
7fd86b2141 Avoid duplicate character event for VK_DECIMAL on numeric keypad
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-20 10:57:32 +00:00
Vadim Zeitlin
59d43911b4 Optionally return length from wxLoadUserResource().
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
2009-09-19 16:29:57 +00:00
Vadim Zeitlin
b0edecea48 Add wxColour::{Set,Get}RGB[A]().
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
2009-09-19 16:29:50 +00:00
Vadim Zeitlin
0193727824 Add curly braces around wxFAIL_MSG() to avoid g++ 4.3 warning.
g++ 4.3 warns about lack of explicit braces to make it happy.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-19 16:29:42 +00:00