Commit Graph

55439 Commits

Author SHA1 Message Date
Stefan Csomor
3c7037000b make sure the pasteboard paste location is only set once
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-01 13:20:33 +00:00
Vadim Zeitlin
fa88bebec1 Implement wxDisplay::GetFromWindow() for wxGTK/Windows.
As wxWindow doesn't have an associated HWND when using wxGTK, use
MonitorFromPoint() instead of MonitorFromWindow() for this port.

Closes #14408.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-01 11:35:52 +00:00
Vadim Zeitlin
7462bddbaf Fix the use of AutoHBITMAP in recently added LoadImageFromResource().
Assignment operator of AutoHBITMAP doesn't work as expected (and probably
should be removed/fixed), avoid its use by explicitly calling Init().

Closes #14425.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-01 11:35:49 +00:00
Vadim Zeitlin
d01ec0965c No changes, just suppress an unused variable warning.
Omit the name of the exception object that we never use.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 23:41:33 +00:00
Vadim Zeitlin
3253852a7e VC6 compilation fix for the grid sample.
Use Connect() instead of Bind() which is not available for VC6.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 23:41:30 +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
Vadim Zeitlin
c55488dfff Add skeleton documentation for wxAuiNotebook-related classes.
Closes #14386.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 23:41:23 +00:00
Vadim Zeitlin
7447d53c35 Implement hatched/stippled pens/brushes in wxGraphicsContext for Cairo.
Refactor the pen/brushes classes to introduce a common base class for them
containing their colour and hatch pattern and stipple bitmap, if any.

And actually create the hatched pattern and use it.

Closes #11981.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 23:41:18 +00:00
Vadim Zeitlin
c17eafaaf1 Added internal wxHatchStyle enum.
It's annoying that the same code for hatched pens and brushes can't be reused
without relying on deprecated wxXXX_HATCH constants, so add new,
non-deprecated, wxHatchStyle enum that can be used in such code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 23:41:15 +00:00
Robin Dunn
e269b28e8e Only disable generation of dependencies if more than one architecture is being built.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 20:59:51 +00:00
Robin Dunn
ba8540022f Move a couple standard virtuals to protected sections so they can be overridden in derived classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 20:59:46 +00:00
Robin Dunn
55d47fc2b1 Interface fix for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 20:59:39 +00:00
Paul Cornett
9dc44eff02 support for GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 20:39:06 +00:00
Vadim Zeitlin
6f41c10973 Force wide char environment version initialization in wxGetEnvMap().
When using MSVC CRT, the wide character version of the environment is not
always initialized when using main() (and not _wmain()) as entry point, so
force initializing it before using _tenviron.

Closes #14231.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:40 +00:00
Vadim Zeitlin
a523d3c643 Add a unit test verifying that wxSpinCtrl ctor doesn't generate any events.
This shouldn't happen but did (and apparently still does, sometimes) under MSW
so add a test verifying that no events are generated by the ctor.

See #14428.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:36 +00:00
Vadim Zeitlin
9c505a36e7 Use wxString::t_str(), not fn_str(), with Windows API functions.
fn_str() is supposed to be used with the CRT functions taking file names only,
not Windows API functions that always take LPCTSTR with all compilers/CRT
versions.

Closes #14433.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:32 +00:00
Vadim Zeitlin
26cdd42d2c Define wxEntry() with WinMain-compatible signature for all Windows ports.
Make wxEntry(HINSTANCE, ...) available in wxGTK under Windows too.

Refactor the headers to allow this and extract Windows-specific wxEntry()
declarations in wx/msw/init.h from wx/msw/app.h for consistency with the
normal wxEntry(int, char**) declared in wx/init.h.

Closes #14423.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:28 +00:00
Vadim Zeitlin
327972e7b6 Use bitmaps from resources by default in wxGTK under Windows.
Use wxBITMAP_TYPE_{BMP,CUR,ICON}_RESOURCE by default under Windows, even for
non-wxMSW ports.

Also allow loading wxImage from resources in all ports under MSW as a side
effect of this change.

Closes #14425.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:23 +00:00
Vadim Zeitlin
c21b99e0e2 Add wxRibbonBar::DeletePage() and ClearPages() methods.
Also add a trivial GetPageCount() helper.

Closes #14437.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:18 +00:00
Vadim Zeitlin
34f5c1053a Update debugging macros overview in the docs.
Describe how the debugging macros really work since 2.9.1, i.e. explain
wxDEBUG_LEVEL and NDEBUG instead of __WXDEBUG__.

Closes #14435.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:14 +00:00
Vadim Zeitlin
ff1aede620 Create wxStaticBoxSizer elements as children of wxStaticBox in XRC.
As we now recommend creating the controls shown inside wxStaticBox as its
children, and not siblings, follow our own recommendation by doing just this
in XRC handler of wxStaticBoxSizer.

Also add a test of using a tooltip with a wxStaticBoxSizer element to the XRC
demo showing that tooltips do work now for them, unlike before.

Closes #14431.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:10 +00:00
Vadim Zeitlin
a19d4096a9 Don't hard code horizontal border for wxStaticBox in wxGTK.
Compute the border width from the average character width instead of hard
coding it to 5 pixels. Probably doesn't make much difference in practice, but
seems to make more sense.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:07 +00:00
Vadim Zeitlin
10da53a250 Fix vertical offset for wxGTK wxStaticBox without label.
Don't use different size for the vertical border in wxStaticBox just because
it doesn't have any label, this just doesn't seem necessary and results in
different appearance for the static box with and without label.

Closes #14430.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:04 +00:00
Vadim Zeitlin
38b1843b5c Fix generation of wxEVT_CHAR in wxMSW wxComboBox.
wxEVT_CHAR shouldn't be generated at all if wxEVT_KEY_DOWN was handled but it
still was for wxComboBox because the code in its MSW implementation directly
called HandleKeyDown() and HandleChar() methods, bypassing the logic dealing
with m_lastKeyDownProcessed at wxWindow level.

Fix this by calling MSWHandleMessage() instead to ensure that WM_CHAR after a
handled WM_KEYDOWN are ignored as they ought to.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-29 23:55:54 +00:00
Jouk Jansen
2026fd77f5 Add wxUSE_COMPILER_TLS to OpenVMS setup file
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-29 06:44:00 +00:00
Stefan Csomor
d1a00499b1 unconditionally include coretext-replacement function when having a deployment target of 10.5
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-28 12:11:50 +00:00
Vadim Zeitlin
0199dae316 Fix off by 1 error in wxHTML font size from points calculation.
m_FontSize is in 1..7 range, not 0..6, so add 1 to it when setting it from the
index into m_FontsSizes array.

Also update the comment explaining the valid range of m_FontsSize.

Closes #14442.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-28 11:58:55 +00:00
Robin Dunn
5812de8ade Interface fix for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-28 06:55:54 +00:00
Robin Dunn
34c92eeeb7 Don't hide the m_mm_to_pix_x and m_mm_to_pix_y in the base class by redefining them in a derived class. Fixes #14399.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-26 18:25:29 +00:00
Robin Dunn
1fe9a78fd0 Add missing parent classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-26 02:01:09 +00:00
Stefan Csomor
0476fe3d73 adding new API needed for screenshots as old method stopped working in 10.7
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-25 15:23:50 +00:00
Julian Smart
e58471c77f Fix for page break problem: fixes #14429
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-25 08:02:32 +00:00
Paul Cornett
8f71e657f3 update size hints when decoration size becomes known, and preserve size hint increments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-24 16:18:28 +00:00
Paul Cornett
6186cb7416 implement wxCairoContext::GetPartialTextExtents for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-24 06:33:07 +00:00
Vadim Zeitlin
8bc6150f03 Clarify wxFileOffset description a bit.
It wasn't clear how wxFileOffset was defined under Windows without
wxHAS_HUGE_FILES.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-23 12:27:14 +00:00
Paul Cornett
e8440ff58c properly handle stupidly small maximum size hints
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-23 03:33:08 +00:00
Robin Dunn
3668a019dc Add simple document for wxGUIEventLoop
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-23 00:44:14 +00:00
Paul Cornett
f94d58dd75 fix SetSizeHints when wxDefaultSize is given for min or max size
GTK does unexpected things if both min and max size are not explicitly set

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-22 06:41:56 +00:00
Julian Smart
b5a1cc93f3 Fixed #14429: Printing a large table in wxRichTextCtrl fails
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-21 20:12:44 +00:00
Julian Smart
a8a15de623 Prevent index access error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-21 19:12:04 +00:00
Julian Smart
59c9dd5c61 Compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-21 18:39:34 +00:00
Vadim Zeitlin
5da0507745 Don't call gtk_window_set_geometry_hints() if there are no hints to set.
Calling gtk_window_set_geometry_hints() with the hints mask of 0 doesn't work
correctly and sets the window size to the smallest possible. Avoid this by
simply not calling this function at all if there is nothing to do.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-21 13:19:30 +00:00
Vadim Zeitlin
692a0709d3 Add MSVS autoexp.dat fragment for some common wxWidgets types.
As we have gdb pretty printers under the version control, it makes sense to
also put MSVS visualizers there as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71824 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 18:24:22 +00:00
Vadim Zeitlin
fa3f11806e Use wx/msw/winundef.h for wxGTK under Windows too.
Avoid clashes due to <windows.h> definitions in wxGTK too.

Closes #14427.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 17:54:53 +00:00
Vadim Zeitlin
6fafab0ea3 No real changes, just simplify wxGDIPlusContext::GetTextExtent() a bit.
Don't call Font::GetSize() and FontFamily::GetEmHeight() thrice, just do it
once and store the results. This makes the code both simpler and shorter and
marginally more efficient.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 17:54:49 +00:00
Vadim Zeitlin
b437ff98b0 Fix text extent computation in wxMSW wxGraphicsContext.
The results were incorrect for italic or bold fonts as we hardcoded
FontStyleRegular instead of using the real font style.

Closes #14421.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 17:54:46 +00:00
Vadim Zeitlin
7e3ea54f47 Add missing c_str() and similar calls to samples in STL build.
Don't rely on implicit conversion of wxString to char*/wxChar*, it doesn't
exist in STL build. Add explicit c_str(), wc_str() or t_str() calls.

Closes #14420.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 17:54:42 +00:00
Vadim Zeitlin
9597d39a2e Use C, not C++, comments in wx/gtk/chkconf.h.
Remove C++ comments added in r71796.

See #14412.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 17:54:38 +00:00
Robin Dunn
e1b7217e23 Interface tweaks for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 17:10:23 +00:00
Stefan Csomor
372d999e64 make sure native font exists, before asking about fixed width
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 10:34:30 +00:00